diff --git a/.dprint.json b/.dprint.json index 3b2376f786cb34..bd1279fd4a0c1d 100644 --- a/.dprint.json +++ b/.dprint.json @@ -13,7 +13,7 @@ }, "exec": { "commands": [{ - "command": "rustfmt --config imports_granularity=item", + "command": "rustfmt --config imports_granularity=item --config group_imports=StdExternalCrate", "exts": ["rs"] }] }, @@ -31,6 +31,8 @@ "cli/tsc/dts/lib.scripthost.d.ts", "cli/tsc/dts/lib.webworker*.d.ts", "cli/tsc/dts/typescript.d.ts", + "cli/tools/doc/prism.css", + "cli/tools/doc/prism.js", "ext/websocket/autobahn/reports", "gh-pages", "target", diff --git a/.github/mtime_cache/action.js b/.github/mtime_cache/action.js index 72821749e393f5..1bf5b492fc189f 100644 --- a/.github/mtime_cache/action.js +++ b/.github/mtime_cache/action.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // This file contains the implementation of a Github Action. Github uses // Node.js v20.x to run actions, so this is Node code and not Deno code. diff --git a/.github/workflows/cargo_publish.yml b/.github/workflows/cargo_publish.yml index 3af97f4662d1ea..eb72e3739f92bc 100644 --- a/.github/workflows/cargo_publish.yml +++ b/.github/workflows/cargo_publish.yml @@ -35,7 +35,7 @@ jobs: - name: Install deno uses: denoland/setup-deno@v2 with: - deno-version: v1.x + deno-version: v2.x - name: Publish env: diff --git a/.github/workflows/ci.generate.ts b/.github/workflows/ci.generate.ts index 5ed02d3cdece84..cf023a6febbfd1 100755 --- a/.github/workflows/ci.generate.ts +++ b/.github/workflows/ci.generate.ts @@ -1,11 +1,11 @@ #!/usr/bin/env -S deno run --allow-write=. --lock=./tools/deno.lock.json -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { stringify } from "jsr:@std/yaml@^0.221/stringify"; // Bump this number when you want to purge the cache. // Note: the tools/release/01_bump_crate_versions.ts script will update this version // automatically via regex, so ensure that this line maintains this format. -const cacheVersion = 25; +const cacheVersion = 32; const ubuntuX86Runner = "ubuntu-24.04"; const ubuntuX86XlRunner = "ubuntu-24.04-xl"; @@ -59,6 +59,15 @@ const Runners = { const prCacheKeyPrefix = `${cacheVersion}-cargo-target-\${{ matrix.os }}-\${{ matrix.arch }}-\${{ matrix.profile }}-\${{ matrix.job }}-`; +const prCacheKey = `${prCacheKeyPrefix}\${{ github.sha }}`; +const prCachePath = [ + // this must match for save and restore (https://github.com/actions/cache/issues/1444) + "./target", + "!./target/*/gn_out", + "!./target/*/gn_root", + "!./target/*/*.zip", + "!./target/*/*.tar.gz", +].join("\n"); // Note that you may need to add more version to the `apt-get remove` line below if you change this const llvmVersion = 19; @@ -196,7 +205,7 @@ const installNodeStep = { const installDenoStep = { name: "Install Deno", uses: "denoland/setup-deno@v2", - with: { "deno-version": "v1.x" }, + with: { "deno-version": "v2.x" }, }; const authenticateWithGoogleCloud = { @@ -475,6 +484,27 @@ const ci = { " -czvf target/release/deno_src.tar.gz -C .. deno", ].join("\n"), }, + { + name: "Cache Cargo home", + uses: "actions/cache@v4", + with: { + // See https://doc.rust-lang.org/cargo/guide/cargo-home.html#caching-the-cargo-home-in-ci + // Note that with the new sparse registry format, we no longer have to cache a `.git` dir + path: [ + "~/.cargo/.crates.toml", + "~/.cargo/.crates2.json", + "~/.cargo/bin", + "~/.cargo/registry/index", + "~/.cargo/registry/cache", + "~/.cargo/git/db", + ].join("\n"), + key: + `${cacheVersion}-cargo-home-\${{ matrix.os }}-\${{ matrix.arch }}-\${{ hashFiles('Cargo.lock') }}`, + // We will try to restore from the closest cargo-home we can find + "restore-keys": + `${cacheVersion}-cargo-home-\${{ matrix.os }}-\${{ matrix.arch }}-`, + }, + }, installRustStep, { if: @@ -598,23 +628,6 @@ const ci = { installBenchTools, ].join("\n"), }, - { - name: "Cache Cargo home", - uses: "actions/cache@v4", - with: { - // See https://doc.rust-lang.org/cargo/guide/cargo-home.html#caching-the-cargo-home-in-ci - // Note that with the new sparse registry format, we no longer have to cache a `.git` dir - path: [ - "~/.cargo/registry/index", - "~/.cargo/registry/cache", - ].join("\n"), - key: - `${cacheVersion}-cargo-home-\${{ matrix.os }}-\${{ matrix.arch }}-\${{ hashFiles('Cargo.lock') }}`, - // We will try to restore from the closest cargo-home we can find - "restore-keys": - `${cacheVersion}-cargo-home-\${{ matrix.os }}-\${{ matrix.arch }}`, - }, - }, { // Restore cache from the latest 'main' branch build. name: "Restore cache build output (PR)", @@ -622,13 +635,7 @@ const ci = { if: "github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/')", with: { - path: [ - "./target", - "!./target/*/gn_out", - "!./target/*/gn_root", - "!./target/*/*.zip", - "!./target/*/*.tar.gz", - ].join("\n"), + path: prCachePath, key: "never_saved", "restore-keys": prCacheKeyPrefix, }, @@ -709,6 +716,19 @@ const ci = { "df -h", ].join("\n"), }, + { + name: "Build denort release", + if: [ + "matrix.job == 'test' &&", + "matrix.profile == 'release' &&", + "github.repository == 'denoland/deno'", + ].join("\n"), + run: [ + "df -h", + "cargo build --profile=release-slim --locked --bin denort", + "df -h", + ].join("\n"), + }, { // Run a minimal check to ensure that binary is not corrupted, regardless // of our build mode @@ -755,10 +775,11 @@ const ci = { "cd target/release", "zip -r deno-${{ matrix.arch }}-unknown-linux-gnu.zip deno", "shasum -a 256 deno-${{ matrix.arch }}-unknown-linux-gnu.zip > deno-${{ matrix.arch }}-unknown-linux-gnu.zip.sha256sum", - "strip denort", - "zip -r denort-${{ matrix.arch }}-unknown-linux-gnu.zip denort", - "shasum -a 256 denort-${{ matrix.arch }}-unknown-linux-gnu.zip > denort-${{ matrix.arch }}-unknown-linux-gnu.zip.sha256sum", "./deno types > lib.deno.d.ts", + "cd ../release-slim", + "zip -r ../release/denort-${{ matrix.arch }}-unknown-linux-gnu.zip denort", + "cd ../release", + "shasum -a 256 denort-${{ matrix.arch }}-unknown-linux-gnu.zip > denort-${{ matrix.arch }}-unknown-linux-gnu.zip.sha256sum", ].join("\n"), }, { @@ -783,8 +804,9 @@ const ci = { "cd target/release", "zip -r deno-${{ matrix.arch }}-apple-darwin.zip deno", "shasum -a 256 deno-${{ matrix.arch }}-apple-darwin.zip > deno-${{ matrix.arch }}-apple-darwin.zip.sha256sum", - "strip denort", - "zip -r denort-${{ matrix.arch }}-apple-darwin.zip denort", + "cd ../release-slim", + "zip -r ../release/denort-${{ matrix.arch }}-apple-darwin.zip denort", + "cd ../release", "shasum -a 256 denort-${{ matrix.arch }}-apple-darwin.zip > denort-${{ matrix.arch }}-apple-darwin.zip.sha256sum", ] .join("\n"), @@ -801,7 +823,8 @@ const ci = { run: [ "Compress-Archive -CompressionLevel Optimal -Force -Path target/release/deno.exe -DestinationPath target/release/deno-${{ matrix.arch }}-pc-windows-msvc.zip", "Get-FileHash target/release/deno-${{ matrix.arch }}-pc-windows-msvc.zip -Algorithm SHA256 | Format-List > target/release/deno-${{ matrix.arch }}-pc-windows-msvc.zip.sha256sum", - "Compress-Archive -CompressionLevel Optimal -Force -Path target/release/denort.exe -DestinationPath target/release/denort-${{ matrix.arch }}-pc-windows-msvc.zip", + + "Compress-Archive -CompressionLevel Optimal -Force -Path target/release-slim/denort.exe -DestinationPath target/release/denort-${{ matrix.arch }}-pc-windows-msvc.zip", "Get-FileHash target/release/denort-${{ matrix.arch }}-pc-windows-msvc.zip -Algorithm SHA256 | Format-List > target/release/denort-${{ matrix.arch }}-pc-windows-msvc.zip.sha256sum", ].join("\n"), }, @@ -1080,14 +1103,8 @@ const ci = { if: "(matrix.job == 'test' || matrix.job == 'lint') && github.ref == 'refs/heads/main'", with: { - path: [ - "./target", - "!./target/*/gn_out", - "!./target/*/*.zip", - "!./target/*/*.sha256sum", - "!./target/*/*.tar.gz", - ].join("\n"), - key: prCacheKeyPrefix + "${{ github.sha }}", + path: prCachePath, + key: prCacheKey, }, }, ]), diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39a3afe76907c9..bcf83f0f1358b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -174,13 +174,26 @@ jobs: mkdir -p target/release tar --exclude=".git*" --exclude=target --exclude=third_party/prebuilt \ -czvf target/release/deno_src.tar.gz -C .. deno + - name: Cache Cargo home + uses: actions/cache@v4 + with: + path: |- + ~/.cargo/.crates.toml + ~/.cargo/.crates2.json + ~/.cargo/bin + ~/.cargo/registry/index + ~/.cargo/registry/cache + ~/.cargo/git/db + key: '32-cargo-home-${{ matrix.os }}-${{ matrix.arch }}-${{ hashFiles(''Cargo.lock'') }}' + restore-keys: '32-cargo-home-${{ matrix.os }}-${{ matrix.arch }}-' + if: '!(matrix.skip)' - uses: dsherret/rust-toolchain-file@v1 if: '!(matrix.skip)' - if: '!(matrix.skip) && (matrix.job == ''lint'' || matrix.job == ''test'' || matrix.job == ''bench'')' name: Install Deno uses: denoland/setup-deno@v2 with: - deno-version: v1.x + deno-version: v2.x - name: Install Python uses: actions/setup-python@v5 with: @@ -355,15 +368,6 @@ jobs: - name: Install benchmark tools if: '!(matrix.skip) && (matrix.job == ''bench'')' run: ./tools/install_prebuilt.js wrk hyperfine - - name: Cache Cargo home - uses: actions/cache@v4 - with: - path: |- - ~/.cargo/registry/index - ~/.cargo/registry/cache - key: '25-cargo-home-${{ matrix.os }}-${{ matrix.arch }}-${{ hashFiles(''Cargo.lock'') }}' - restore-keys: '25-cargo-home-${{ matrix.os }}-${{ matrix.arch }}' - if: '!(matrix.skip)' - name: Restore cache build output (PR) uses: actions/cache/restore@v4 if: '!(matrix.skip) && (github.ref != ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/''))' @@ -375,7 +379,7 @@ jobs: !./target/*/*.zip !./target/*/*.tar.gz key: never_saved - restore-keys: '25-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-' + restore-keys: '32-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-' - name: Apply and update mtime cache if: '!(matrix.skip) && (!startsWith(github.ref, ''refs/tags/''))' uses: ./.github/mtime_cache @@ -415,6 +419,15 @@ jobs: df -h cargo build --release --locked --all-targets df -h + - name: Build denort release + if: |- + !(matrix.skip) && (matrix.job == 'test' && + matrix.profile == 'release' && + github.repository == 'denoland/deno') + run: |- + df -h + cargo build --profile=release-slim --locked --bin denort + df -h - name: Check deno binary if: '!(matrix.skip) && (matrix.job == ''test'')' run: 'target/${{ matrix.profile }}/deno eval "console.log(1+2)" | grep 3' @@ -444,10 +457,11 @@ jobs: cd target/release zip -r deno-${{ matrix.arch }}-unknown-linux-gnu.zip deno shasum -a 256 deno-${{ matrix.arch }}-unknown-linux-gnu.zip > deno-${{ matrix.arch }}-unknown-linux-gnu.zip.sha256sum - strip denort - zip -r denort-${{ matrix.arch }}-unknown-linux-gnu.zip denort - shasum -a 256 denort-${{ matrix.arch }}-unknown-linux-gnu.zip > denort-${{ matrix.arch }}-unknown-linux-gnu.zip.sha256sum ./deno types > lib.deno.d.ts + cd ../release-slim + zip -r ../release/denort-${{ matrix.arch }}-unknown-linux-gnu.zip denort + cd ../release + shasum -a 256 denort-${{ matrix.arch }}-unknown-linux-gnu.zip > denort-${{ matrix.arch }}-unknown-linux-gnu.zip.sha256sum - name: Pre-release (mac) if: |- !(matrix.skip) && (matrix.os == 'macos' && @@ -463,8 +477,9 @@ jobs: cd target/release zip -r deno-${{ matrix.arch }}-apple-darwin.zip deno shasum -a 256 deno-${{ matrix.arch }}-apple-darwin.zip > deno-${{ matrix.arch }}-apple-darwin.zip.sha256sum - strip denort - zip -r denort-${{ matrix.arch }}-apple-darwin.zip denort + cd ../release-slim + zip -r ../release/denort-${{ matrix.arch }}-apple-darwin.zip denort + cd ../release shasum -a 256 denort-${{ matrix.arch }}-apple-darwin.zip > denort-${{ matrix.arch }}-apple-darwin.zip.sha256sum - name: Pre-release (windows) if: |- @@ -476,7 +491,7 @@ jobs: run: |- Compress-Archive -CompressionLevel Optimal -Force -Path target/release/deno.exe -DestinationPath target/release/deno-${{ matrix.arch }}-pc-windows-msvc.zip Get-FileHash target/release/deno-${{ matrix.arch }}-pc-windows-msvc.zip -Algorithm SHA256 | Format-List > target/release/deno-${{ matrix.arch }}-pc-windows-msvc.zip.sha256sum - Compress-Archive -CompressionLevel Optimal -Force -Path target/release/denort.exe -DestinationPath target/release/denort-${{ matrix.arch }}-pc-windows-msvc.zip + Compress-Archive -CompressionLevel Optimal -Force -Path target/release-slim/denort.exe -DestinationPath target/release/denort-${{ matrix.arch }}-pc-windows-msvc.zip Get-FileHash target/release/denort-${{ matrix.arch }}-pc-windows-msvc.zip -Algorithm SHA256 | Format-List > target/release/denort-${{ matrix.arch }}-pc-windows-msvc.zip.sha256sum - name: Upload canary to dl.deno.land if: |- @@ -682,10 +697,10 @@ jobs: path: |- ./target !./target/*/gn_out + !./target/*/gn_root !./target/*/*.zip - !./target/*/*.sha256sum !./target/*/*.tar.gz - key: '25-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-${{ github.sha }}' + key: '32-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-${{ github.sha }}' publish-canary: name: publish canary runs-on: ubuntu-24.04 diff --git a/.github/workflows/npm_publish.yml b/.github/workflows/npm_publish.yml new file mode 100644 index 00000000000000..5e58005926a034 --- /dev/null +++ b/.github/workflows/npm_publish.yml @@ -0,0 +1,45 @@ +name: npm_publish + +on: + workflow_dispatch: + inputs: + version: + description: 'Version' + type: string + release: + types: [published] + +permissions: + id-token: write + +jobs: + build: + name: npm publish + runs-on: ubuntu-latest + timeout-minutes: 30 + + steps: + - name: Configure git + run: | + git config --global core.symlinks true + git config --global fetch.parallel 32 + + - name: Clone repository + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Install Deno + uses: denoland/setup-deno@v2 + with: + deno-version: v2.x + - name: Install Node + uses: actions/setup-node@v4 + with: + node-version: '22.x' + registry-url: 'https://registry.npmjs.org' + + - name: Publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: ./tools/release/npm/build.ts ${{ github.event.inputs.version }} --publish diff --git a/.github/workflows/promote_to_release.yml b/.github/workflows/promote_to_release.yml index 79fefa6d6c94c5..4079118d92e027 100644 --- a/.github/workflows/promote_to_release.yml +++ b/.github/workflows/promote_to_release.yml @@ -42,7 +42,7 @@ jobs: - name: Install deno uses: denoland/setup-deno@v2 with: - deno-version: v1.x + deno-version: v2.x - name: Install rust-codesign run: |- diff --git a/.github/workflows/start_release.yml b/.github/workflows/start_release.yml index 40a44bb61aba64..35446c1adbcb71 100644 --- a/.github/workflows/start_release.yml +++ b/.github/workflows/start_release.yml @@ -36,7 +36,7 @@ jobs: - name: Install deno uses: denoland/setup-deno@v2 with: - deno-version: v1.x + deno-version: v2.x - name: Create Gist URL env: diff --git a/.github/workflows/version_bump.yml b/.github/workflows/version_bump.yml index 9038fe0d2295e9..306a8642ad1870 100644 --- a/.github/workflows/version_bump.yml +++ b/.github/workflows/version_bump.yml @@ -41,7 +41,7 @@ jobs: - name: Install deno uses: denoland/setup-deno@v2 with: - deno-version: v1.x + deno-version: v2.x - name: Run version bump run: | diff --git a/Cargo.lock b/Cargo.lock index 56d2417419e8e6..b054e9fe7ca836 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -39,9 +39,9 @@ dependencies = [ [[package]] name = "aead-gcm-stream" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4947a169074c7e038fa43051d1c4e073f4488b0e4b0a30658f1e1a1b06449ce8" +checksum = "e70c8dec860340effb00f6945c49c0daaa6dac963602750db862eabb74bf7886" dependencies = [ "aead", "aes", @@ -231,7 +231,7 @@ dependencies = [ "nom 7.1.3", "num-traits", "rusticata-macros", - "thiserror", + "thiserror 1.0.64", "time", ] @@ -284,6 +284,17 @@ dependencies = [ "tokio", ] +[[package]] +name = "async-recursion" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "async-stream" version = "0.3.5" @@ -369,7 +380,7 @@ dependencies = [ "rustversion", "serde", "sync_wrapper", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", ] @@ -394,6 +405,12 @@ dependencies = [ "tower-service", ] +[[package]] +name = "az" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b7e4c2464d97fe331d41de9d5db0def0a96f4d823b8b32a2efd503578988973" + [[package]] name = "backtrace" version = "0.3.73" @@ -579,9 +596,9 @@ dependencies = [ [[package]] name = "boxed_error" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69aae56aaf59d1994b902ed5c0c79024012bdc2426741def75a635999a030e7e" +checksum = "17d4f95e880cfd28c4ca5a006cf7f6af52b4bcb7b5866f573b2faa126fb7affb" dependencies = [ "quote", "syn 2.0.87", @@ -641,9 +658,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" [[package]] name = "cache_control" @@ -651,6 +668,37 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bf2a5fb3207c12b5d208ebc145f967fea5cac41a021c37417ccc31ba40f39ee" +[[package]] +name = "capacity_builder" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58ec49028cb308564429cd8fac4ef21290067a0afe8f5955330a8d487d0d790c" +dependencies = [ + "itoa", +] + +[[package]] +name = "capacity_builder" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f2d24a6dcf0cd402a21b65d35340f3a49ff3475dc5fdac91d22d2733e6641c6" +dependencies = [ + "capacity_builder_macros", + "ecow", + "hipstr", + "itoa", +] + +[[package]] +name = "capacity_builder_macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b4a6cae9efc04cc6cbb8faf338d2c497c165c83e74509cf4dbedea948bbf6e5" +dependencies = [ + "quote", + "syn 2.0.87", +] + [[package]] name = "caseless" version = "0.2.1" @@ -702,6 +750,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "chrono" version = "0.4.37" @@ -800,6 +854,7 @@ dependencies = [ "file_test_runner", "flaky_test", "hickory-client", + "hickory-proto", "hickory-server", "http 1.1.0", "http-body-util", @@ -812,6 +867,7 @@ dependencies = [ "regex", "reqwest", "serde", + "sys_traits", "test_server", "tokio", "url", @@ -882,9 +938,9 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "comrak" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c93ab3577cca16b4a1d80a88c2e0cd8b6e969e51696f0bbb0d1dcb0157109832" +checksum = "d8c32ff8b21372fab0e9ecc4e42536055702dc5faa418362bffd1544f9d12637" dependencies = [ "caseless", "derive_builder", @@ -1166,9 +1222,9 @@ checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] name = "data-url" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41b319d1b62ffbd002e057f36bebd1f42b9f97927c9577461d855f3513c4289f" +checksum = "5c297a1c74b71ae29df00c3e22dd9534821d60eb9af5a0192823fa2acea70c2a" [[package]] name = "debug-ignore" @@ -1188,14 +1244,16 @@ dependencies = [ [[package]] name = "deno" -version = "2.0.6" +version = "2.1.4" dependencies = [ "anstream", "async-trait", "base64 0.21.7", "bincode", + "boxed_error", "bytes", "cache_control", + "capacity_builder 0.5.0", "chrono", "clap", "clap_complete", @@ -1210,16 +1268,19 @@ dependencies = [ "deno_config", "deno_core", "deno_doc", + "deno_error", "deno_graph", "deno_lint", "deno_lockfile", "deno_npm", + "deno_npm_cache", "deno_package_json", - "deno_path_util", + "deno_path_util 0.3.0", "deno_resolver", "deno_runtime", "deno_semver", "deno_task_shell", + "deno_telemetry", "deno_terminal 0.2.0", "deno_tower_lsp", "dhat", @@ -1278,13 +1339,15 @@ dependencies = [ "sha2", "shell-escape", "spki", + "sqlformat", "strsim", + "sys_traits", "tar", "tempfile", "test_server", "text-size", "text_lines", - "thiserror", + "thiserror 2.0.3", "tokio", "tokio-util", "tracing", @@ -1292,7 +1355,7 @@ dependencies = [ "typed-arena", "uuid", "walkdir", - "which 4.4.2", + "which", "winapi", "winres", "zeromq", @@ -1313,13 +1376,14 @@ dependencies = [ [[package]] name = "deno_ast" -version = "0.43.3" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48d00b724e06d2081a141ec1155756a0b465d413d8e2a7515221f61d482eb2ee" +checksum = "eebc7aaabfdb3ddcad32aee1b62d250149dc8b35dfbdccbb125df2bdc62da952" dependencies = [ "base64 0.21.7", + "deno_error", "deno_media_type", - "deno_terminal 0.1.1", + "deno_terminal 0.2.0", "dprint-swc-ext", "once_cell", "percent-encoding", @@ -1350,14 +1414,14 @@ dependencies = [ "swc_visit", "swc_visit_macros", "text_lines", - "thiserror", + "thiserror 2.0.3", "unicode-width", "url", ] [[package]] name = "deno_bench_util" -version = "0.171.0" +version = "0.178.0" dependencies = [ "bencher", "deno_core", @@ -1366,37 +1430,45 @@ dependencies = [ [[package]] name = "deno_broadcast_channel" -version = "0.171.0" +version = "0.178.0" dependencies = [ "async-trait", "deno_core", - "thiserror", + "thiserror 2.0.3", "tokio", "uuid", ] [[package]] name = "deno_cache" -version = "0.109.0" +version = "0.116.0" dependencies = [ "async-trait", "deno_core", "rusqlite", "serde", "sha2", - "thiserror", + "thiserror 2.0.3", "tokio", ] [[package]] name = "deno_cache_dir" -version = "0.13.2" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08c1f52170cd7715f8006da54cde1444863a0d6fbd9c11d037a737db2dec8e22" +checksum = "e73ed17f285731a23df9779ca1e0e721de866db6776ed919ebd9235e0a107c4c" dependencies = [ + "async-trait", "base32", + "base64 0.21.7", + "boxed_error", + "cache_control", + "chrono", + "data-url", + "deno_error", "deno_media_type", - "deno_path_util", + "deno_path_util 0.3.0", + "http 1.1.0", "indexmap 2.3.0", "log", "once_cell", @@ -1404,30 +1476,31 @@ dependencies = [ "serde", "serde_json", "sha2", - "thiserror", + "sys_traits", + "thiserror 1.0.64", "url", ] [[package]] name = "deno_canvas" -version = "0.46.0" +version = "0.53.0" dependencies = [ "deno_core", "deno_webgpu", "image", "serde", - "thiserror", + "thiserror 2.0.3", ] [[package]] name = "deno_config" -version = "0.39.1" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a91aa99751ebe305a7edad12a3ad751f3b3b9f5ecddbfe4a0459e3cdc8493b6" +checksum = "b45aaf31e58ca915d5c0746bf8e2d07b94635154ad9e5afe5ff265cae6187b19" dependencies = [ "anyhow", "deno_package_json", - "deno_path_util", + "deno_path_util 0.3.0", "deno_semver", "glob", "ignore", @@ -1439,33 +1512,37 @@ dependencies = [ "phf", "serde", "serde_json", - "thiserror", + "sys_traits", + "thiserror 1.0.64", "url", ] [[package]] name = "deno_console" -version = "0.177.0" +version = "0.184.0" dependencies = [ "deno_core", ] [[package]] name = "deno_core" -version = "0.319.0" +version = "0.327.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9dbb841f9850534320d8927dce53ca8d64bafbab5576c2a98f03f9e08534215" +checksum = "eaf8dff204b9c2415deb47b9f30d4d38b0925d0d88f1f9074e8e76f59e6d7ded" dependencies = [ "anyhow", + "az", "bincode", "bit-set", "bit-vec", "bytes", + "capacity_builder 0.1.3", "cooked-waker", "deno_core_icudata", "deno_ops", "deno_unsync", "futures", + "indexmap 2.3.0", "libc", "memoffset", "parking_lot", @@ -1480,6 +1557,7 @@ dependencies = [ "tokio", "url", "v8", + "wasm_dep_analyzer", ] [[package]] @@ -1490,20 +1568,20 @@ checksum = "fe4dccb6147bb3f3ba0c7a48e993bfeb999d2c2e47a81badee80e2b370c8d695" [[package]] name = "deno_cron" -version = "0.57.0" +version = "0.64.0" dependencies = [ "anyhow", "async-trait", "chrono", "deno_core", "saffron", - "thiserror", + "thiserror 2.0.3", "tokio", ] [[package]] name = "deno_crypto" -version = "0.191.0" +version = "0.198.0" dependencies = [ "aes", "aes-gcm", @@ -1532,7 +1610,7 @@ dependencies = [ "sha2", "signature", "spki", - "thiserror", + "thiserror 2.0.3", "tokio", "uuid", "x25519-dalek", @@ -1540,42 +1618,72 @@ dependencies = [ [[package]] name = "deno_doc" -version = "0.156.0" +version = "0.161.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2585b98d6ad76dae30bf2d7b6d71b8363cae041158b8780d14a2f4fe17590a61" +checksum = "353a39c70d248af04600928cefc8066a9e4535fb6e7d7c518411e5efc822819f" dependencies = [ "anyhow", "cfg-if", "comrak", "deno_ast", "deno_graph", - "futures", + "deno_path_util 0.2.2", "handlebars", "html-escape", "import_map", "indexmap 2.3.0", "itoa", + "js-sys", "lazy_static", + "percent-encoding", "regex", "serde", + "serde-wasm-bindgen", "serde_json", - "syntect", "termcolor", + "url", + "wasm-bindgen", +] + +[[package]] +name = "deno_error" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "199c66ffd17ee1a948904d33f3d3f364573951c1f9fb3f859bfe7770bf33862a" +dependencies = [ + "deno_error_macro", + "libc", + "serde", + "serde_json", + "url", +] + +[[package]] +name = "deno_error_macro" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cd99df6ae75443907e1f959fc42ec6dcea67a7bd083e76cf23a117102c9a2ce" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", ] [[package]] name = "deno_fetch" -version = "0.201.0" +version = "0.208.0" dependencies = [ "base64 0.21.7", "bytes", "data-url", "deno_core", + "deno_path_util 0.3.0", "deno_permissions", "deno_tls", "dyn-clone", "error_reporter", "fast-socks5", + "h2 0.4.4", "hickory-resolver", "http 1.1.0", "http-body-util", @@ -1587,19 +1695,19 @@ dependencies = [ "rustls-webpki", "serde", "serde_json", - "thiserror", + "thiserror 2.0.3", "tokio", "tokio-rustls", "tokio-socks", "tokio-util", - "tower", + "tower 0.5.2", "tower-http", "tower-service", ] [[package]] name = "deno_ffi" -version = "0.164.0" +version = "0.171.0" dependencies = [ "deno_core", "deno_permissions", @@ -1612,21 +1720,21 @@ dependencies = [ "serde", "serde-value", "serde_json", - "thiserror", + "thiserror 2.0.3", "tokio", "winapi", ] [[package]] name = "deno_fs" -version = "0.87.0" +version = "0.94.0" dependencies = [ "async-trait", "base32", "boxed_error", "deno_core", "deno_io", - "deno_path_util", + "deno_path_util 0.3.0", "deno_permissions", "filetime", "junction", @@ -1635,21 +1743,23 @@ dependencies = [ "rand", "rayon", "serde", - "thiserror", + "thiserror 2.0.3", "winapi", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "deno_graph" -version = "0.84.1" +version = "0.86.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd4f4a14aa069087be41c2998077b0453f0191747898f96e6343f700abfc2c18" +checksum = "ace3acf321fac446636ae605b01723f2120b40ab3d32c6836aeb7d603a8e08f9" dependencies = [ "anyhow", "async-trait", + "capacity_builder 0.5.0", "data-url", "deno_ast", + "deno_path_util 0.3.0", "deno_semver", "deno_unsync", "encoding_rs", @@ -1664,14 +1774,16 @@ dependencies = [ "serde", "serde_json", "sha2", - "thiserror", + "sys_traits", + "thiserror 2.0.3", "twox-hash", "url", + "wasm_dep_analyzer", ] [[package]] name = "deno_http" -version = "0.175.0" +version = "0.182.0" dependencies = [ "async-compression", "async-trait", @@ -1703,14 +1815,14 @@ dependencies = [ "scopeguard", "serde", "smallvec", - "thiserror", + "thiserror 2.0.3", "tokio", "tokio-util", ] [[package]] name = "deno_io" -version = "0.87.0" +version = "0.94.0" dependencies = [ "async-trait", "deno_core", @@ -1726,12 +1838,12 @@ dependencies = [ "tokio", "uuid", "winapi", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "deno_kv" -version = "0.85.0" +version = "0.92.0" dependencies = [ "anyhow", "async-trait", @@ -1741,7 +1853,7 @@ dependencies = [ "chrono", "deno_core", "deno_fetch", - "deno_path_util", + "deno_path_util 0.3.0", "deno_permissions", "deno_tls", "denokv_proto", @@ -1757,15 +1869,15 @@ dependencies = [ "rand", "rusqlite", "serde", - "thiserror", + "thiserror 2.0.3", "url", ] [[package]] name = "deno_lint" -version = "0.68.0" +version = "0.68.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb994e6d1b18223df0a756c7948143b35682941d615edffef60d5b38822f38ac" +checksum = "ce713d564f76efd90535061113210bdc6b942ed6327b33eb1d5f76a5daf8e7a5" dependencies = [ "anyhow", "deno_ast", @@ -1781,21 +1893,21 @@ dependencies = [ [[package]] name = "deno_lockfile" -version = "0.23.1" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "579117d5815aa9bae0212637d6f4d5f45f9649bb2c8988dca434077545535039" +checksum = "632e835a53ed667d62fdd766c5780fe8361c831d3e3fbf1a760a0b7896657587" dependencies = [ "deno_semver", "serde", "serde_json", - "thiserror", + "thiserror 2.0.3", ] [[package]] name = "deno_media_type" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcf552fbdedbe81c89705349d7d2485c7051382b000dfddbdbf7fc25931cf83" +checksum = "a417f8bd3f1074185c4c8ccb6ea6261ae173781596cc358e68ad07aaac11009d" dependencies = [ "data-url", "serde", @@ -1804,7 +1916,7 @@ dependencies = [ [[package]] name = "deno_napi" -version = "0.108.0" +version = "0.115.0" dependencies = [ "deno_core", "deno_permissions", @@ -1813,8 +1925,8 @@ dependencies = [ "libuv-sys-lite", "log", "napi_sym", - "thiserror", - "windows-sys 0.52.0", + "thiserror 2.0.3", + "windows-sys 0.59.0", ] [[package]] @@ -1832,7 +1944,7 @@ dependencies = [ [[package]] name = "deno_net" -version = "0.169.0" +version = "0.176.0" dependencies = [ "deno_core", "deno_permissions", @@ -1840,16 +1952,17 @@ dependencies = [ "hickory-proto", "hickory-resolver", "pin-project", + "quinn", "rustls-tokio-stream", "serde", "socket2", - "thiserror", + "thiserror 2.0.3", "tokio", ] [[package]] name = "deno_node" -version = "0.114.0" +version = "0.122.0" dependencies = [ "aead-gcm-stream", "aes", @@ -1869,7 +1982,7 @@ dependencies = [ "deno_media_type", "deno_net", "deno_package_json", - "deno_path_util", + "deno_path_util 0.3.0", "deno_permissions", "deno_whoami", "der", @@ -1883,12 +1996,11 @@ dependencies = [ "faster-hex", "h2 0.4.4", "hkdf", - "home", "http 1.1.0", "http-body-util", "hyper 1.4.1", "hyper-util", - "idna 0.3.0", + "idna", "indexmap 2.3.0", "ipnetwork", "k256", @@ -1927,12 +2039,14 @@ dependencies = [ "sm3", "spki", "stable_deref_trait", - "thiserror", + "sys_traits", + "thiserror 2.0.3", "tokio", + "tokio-eld", "url", "webpki-root-certs", "winapi", - "windows-sys 0.52.0", + "windows-sys 0.59.0", "x25519-dalek", "x509-parser", "yoke", @@ -1940,12 +2054,13 @@ dependencies = [ [[package]] name = "deno_npm" -version = "0.25.4" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6b4dc4a9f1cff63d5638e7d93042f24f46300d1cc77b86f3caaa699a7ddccf7" +checksum = "5f818ad5dc4c206b50b5cfa6f10b4b94b127e15c8342c152768eba40c225ca23" dependencies = [ - "anyhow", "async-trait", + "capacity_builder 0.5.0", + "deno_error", "deno_lockfile", "deno_semver", "futures", @@ -1953,56 +2068,108 @@ dependencies = [ "monch", "serde", "serde_json", - "thiserror", + "thiserror 2.0.3", + "url", +] + +[[package]] +name = "deno_npm_cache" +version = "0.3.0" +dependencies = [ + "anyhow", + "async-trait", + "base64 0.21.7", + "boxed_error", + "deno_cache_dir", + "deno_core", + "deno_error", + "deno_npm", + "deno_path_util 0.3.0", + "deno_semver", + "deno_unsync", + "faster-hex", + "flate2", + "futures", + "http 1.1.0", + "log", + "parking_lot", + "percent-encoding", + "rand", + "ring", + "serde_json", + "sys_traits", + "tar", + "tempfile", + "thiserror 2.0.3", "url", ] [[package]] name = "deno_ops" -version = "0.195.0" +version = "0.203.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "797f348c38c07a5398bf790b280077c698e13fb49252f61ca6f6c5c616060292" +checksum = "b146ca74cac431843486ade58e2accc16c11315fb2c6934590a52a73c56b7ec3" dependencies = [ "proc-macro-rules", "proc-macro2", "quote", + "stringcase", "strum", "strum_macros", "syn 2.0.87", - "thiserror", + "thiserror 1.0.64", ] [[package]] name = "deno_package_json" -version = "0.1.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cbc4c4d3eb0960b58e8f43f9fc2d3f620fcac9a03cd85203e08db5b04e83c1f" +checksum = "e1d3c0f699ba2040669204ce24ab73720499fc290af843e4ce0fc8a9b3d67735" dependencies = [ + "boxed_error", + "deno_error", + "deno_path_util 0.3.0", "deno_semver", "indexmap 2.3.0", "serde", "serde_json", - "thiserror", + "sys_traits", + "thiserror 2.0.3", "url", ] [[package]] name = "deno_path_util" -version = "0.2.1" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b02c7d341e1b2cf089daff0f4fb2b4be8f3b5511b1d96040b3f7ed63a66c737b" +dependencies = [ + "deno_error", + "percent-encoding", + "thiserror 2.0.3", + "url", +] + +[[package]] +name = "deno_path_util" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff25f6e08e7a0214bbacdd6f7195c7f1ebcd850c87a624e4ff06326b68b42d99" +checksum = "420e8211aaba7fde83ccaa9a5dad855c3b940ed988d70c95159acd600a70dc87" dependencies = [ + "deno_error", "percent-encoding", - "thiserror", + "sys_traits", + "thiserror 2.0.3", "url", ] [[package]] name = "deno_permissions" -version = "0.37.0" +version = "0.43.0" dependencies = [ + "capacity_builder 0.5.0", "deno_core", - "deno_path_util", + "deno_path_util 0.3.0", "deno_terminal 0.2.0", "fqdn", "libc", @@ -2010,14 +2177,14 @@ dependencies = [ "once_cell", "percent-encoding", "serde", - "thiserror", - "which 4.4.2", + "thiserror 2.0.3", + "which", "winapi", ] [[package]] name = "deno_resolver" -version = "0.9.0" +version = "0.15.0" dependencies = [ "anyhow", "base32", @@ -2026,19 +2193,19 @@ dependencies = [ "deno_config", "deno_media_type", "deno_package_json", - "deno_path_util", + "deno_path_util 0.3.0", "deno_semver", "node_resolver", + "sys_traits", "test_server", - "thiserror", + "thiserror 2.0.3", "url", ] [[package]] name = "deno_runtime" -version = "0.186.0" +version = "0.192.0" dependencies = [ - "async-trait", "color-print", "deno_ast", "deno_broadcast_channel", @@ -2057,8 +2224,9 @@ dependencies = [ "deno_napi", "deno_net", "deno_node", - "deno_path_util", + "deno_path_util 0.3.0", "deno_permissions", + "deno_telemetry", "deno_terminal 0.2.0", "deno_tls", "deno_url", @@ -2084,59 +2252,80 @@ dependencies = [ "notify", "ntapi", "once_cell", - "opentelemetry", - "opentelemetry-http", - "opentelemetry-otlp", - "opentelemetry-semantic-conventions", - "opentelemetry_sdk", "percent-encoding", - "pin-project", "regex", "rustyline", "same-file", "serde", "signal-hook", "signal-hook-registry", + "sys_traits", "tempfile", "test_server", - "thiserror", + "thiserror 2.0.3", "tokio", "tokio-metrics", "twox-hash", "uuid", - "which 4.4.2", + "which", "winapi", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "deno_semver" -version = "0.5.16" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c957c6a57c38b7dde2315df0da0ec228911e56a74f185b108a488d0401841a67" +checksum = "4775271f9b5602482698f76d24ea9ed8ba27af7f587a7e9a876916300c542435" dependencies = [ + "capacity_builder 0.5.0", + "deno_error", + "ecow", + "hipstr", "monch", "once_cell", "serde", - "thiserror", + "thiserror 2.0.3", "url", ] [[package]] name = "deno_task_shell" -version = "0.18.1" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f444918f7102c1a5a143e9d57809e499fb4d365070519bf2e8bdb16d586af2a" +checksum = "fa3763bc068e17b6d488fb73ecda463c13ef792b0a5288b6018bc2119becd635" dependencies = [ "anyhow", "futures", "glob", "monch", + "nix", "os_pipe", "path-dedot", - "thiserror", + "thiserror 1.0.64", + "tokio", + "windows-sys 0.59.0", +] + +[[package]] +name = "deno_telemetry" +version = "0.6.0" +dependencies = [ + "async-trait", + "deno_core", + "http-body-util", + "hyper 1.4.1", + "hyper-util", + "log", + "once_cell", + "opentelemetry", + "opentelemetry-http", + "opentelemetry-otlp", + "opentelemetry-semantic-conventions", + "opentelemetry_sdk", + "pin-project", + "serde", "tokio", - "tokio-util", ] [[package]] @@ -2161,7 +2350,7 @@ dependencies = [ [[package]] name = "deno_tls" -version = "0.164.0" +version = "0.171.0" dependencies = [ "deno_core", "deno_native_certs", @@ -2170,7 +2359,7 @@ dependencies = [ "rustls-tokio-stream", "rustls-webpki", "serde", - "thiserror", + "thiserror 2.0.3", "tokio", "webpki-roots", ] @@ -2194,35 +2383,36 @@ dependencies = [ "serde_json", "tokio", "tokio-util", - "tower", + "tower 0.4.13", "tracing", ] [[package]] name = "deno_unsync" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f36b4ef61a04ce201b925a5dffa90f88437d37fee4836c758470dd15ba7f05e" +checksum = "d774fd83f26b24f0805a6ab8b26834a0d06ceac0db517b769b1e4633c96a2057" dependencies = [ + "futures", "parking_lot", "tokio", ] [[package]] name = "deno_url" -version = "0.177.0" +version = "0.184.0" dependencies = [ "deno_bench_util", "deno_console", "deno_core", "deno_webidl", - "thiserror", + "thiserror 2.0.3", "urlpattern", ] [[package]] name = "deno_web" -version = "0.208.0" +version = "0.215.0" dependencies = [ "async-trait", "base64-simd 0.8.0", @@ -2237,19 +2427,19 @@ dependencies = [ "flate2", "futures", "serde", - "thiserror", + "thiserror 2.0.3", "tokio", "uuid", ] [[package]] name = "deno_webgpu" -version = "0.144.0" +version = "0.151.0" dependencies = [ "deno_core", "raw-window-handle", "serde", - "thiserror", + "thiserror 2.0.3", "tokio", "wgpu-core", "wgpu-types", @@ -2257,7 +2447,7 @@ dependencies = [ [[package]] name = "deno_webidl" -version = "0.177.0" +version = "0.184.0" dependencies = [ "deno_bench_util", "deno_core", @@ -2265,7 +2455,7 @@ dependencies = [ [[package]] name = "deno_websocket" -version = "0.182.0" +version = "0.189.0" dependencies = [ "bytes", "deno_core", @@ -2281,18 +2471,18 @@ dependencies = [ "once_cell", "rustls-tokio-stream", "serde", - "thiserror", + "thiserror 2.0.3", "tokio", ] [[package]] name = "deno_webstorage" -version = "0.172.0" +version = "0.179.0" dependencies = [ "deno_core", "deno_web", "rusqlite", - "thiserror", + "thiserror 2.0.3", ] [[package]] @@ -2364,7 +2554,7 @@ dependencies = [ "rand", "rusqlite", "serde_json", - "thiserror", + "thiserror 1.0.64", "tokio", "tokio-stream", "uuid", @@ -2657,9 +2847,9 @@ dependencies = [ [[package]] name = "dprint-plugin-typescript" -version = "0.93.2" +version = "0.93.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ff29fd136541e59d51946f0d2d353fefc886776f61a799ebfb5838b06cef13b" +checksum = "5804d1809f6191a9261f423c41cd51a50e49567d61caa5a8f6224eea94ae0d12" dependencies = [ "anyhow", "deno_ast", @@ -2758,6 +2948,15 @@ dependencies = [ "spki", ] +[[package]] +name = "ecow" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e42fc0a93992b20c58b99e59d61eaf1635a25bfbe49e4275c34ba0aee98119ba" +dependencies = [ + "serde", +] + [[package]] name = "ed25519" version = "2.2.3" @@ -2805,7 +3004,7 @@ dependencies = [ "debug-ignore", "indexmap 2.3.0", "log", - "thiserror", + "thiserror 1.0.64", "zerocopy", ] @@ -2965,7 +3164,7 @@ dependencies = [ "anyhow", "async-trait", "log", - "thiserror", + "thiserror 1.0.64", "tokio", "tokio-stream", ] @@ -3000,7 +3199,7 @@ dependencies = [ "rand", "sha1", "simdutf8", - "thiserror", + "thiserror 1.0.64", "tokio", "utf-8", ] @@ -3049,16 +3248,16 @@ checksum = "c007b1ae3abe1cb6f85a16305acd418b7ca6343b953633fee2b76d8f108b830f" [[package]] name = "file_test_runner" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b23dcc1b671771c6f59fdace6da685735c925f859733e8fd07fba6cae6462a" +checksum = "cf50901549edf2241e33d1715aec0575adc5510a09724877a1e0afe7ffafb0fb" dependencies = [ "anyhow", "crossbeam-channel", "deno_terminal 0.1.1", "parking_lot", "regex", - "thiserror", + "thiserror 1.0.64", ] [[package]] @@ -3532,7 +3731,7 @@ dependencies = [ "pest_derive", "serde", "serde_json", - "thiserror", + "thiserror 1.0.64", ] [[package]] @@ -3560,6 +3759,20 @@ dependencies = [ "hashbrown 0.14.5", ] +[[package]] +name = "hdrhistogram" +version = "7.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "765c9198f173dd59ce26ff9f95ef0aafd0a0fe01fb9d72841bc5066a4c06511d" +dependencies = [ + "base64 0.21.7", + "byteorder", + "crossbeam-channel", + "flate2", + "nom 7.1.3", + "num-traits", +] + [[package]] name = "heck" version = "0.4.1" @@ -3592,9 +3805,9 @@ checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" [[package]] name = "hickory-client" -version = "0.24.1" +version = "0.25.0-alpha.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab9683b08d8f8957a857b0236455d80e1886eaa8c6178af556aa7871fb61b55" +checksum = "83536dab9a159b2b5cf2c20c47ecf188cee35316f96be028e63e8e1340d2724d" dependencies = [ "cfg-if", "data-encoding", @@ -3604,17 +3817,18 @@ dependencies = [ "once_cell", "radix_trie", "rand", - "thiserror", + "thiserror 2.0.3", "tokio", "tracing", ] [[package]] name = "hickory-proto" -version = "0.24.1" +version = "0.25.0-alpha.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07698b8420e2f0d6447a436ba999ec85d8fbf2a398bbd737b82cac4a2e96e512" +checksum = "d063c0692ee669aa6d261988aa19ca5510f1cc40e4f211024f50c888499a35d7" dependencies = [ + "async-recursion", "async-trait", "cfg-if", "data-encoding", @@ -3622,12 +3836,12 @@ dependencies = [ "futures-channel", "futures-io", "futures-util", - "idna 0.4.0", + "idna", "ipnet", "once_cell", "rand", "serde", - "thiserror", + "thiserror 2.0.3", "tinyvec", "tokio", "tracing", @@ -3636,46 +3850,60 @@ dependencies = [ [[package]] name = "hickory-resolver" -version = "0.24.1" +version = "0.25.0-alpha.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28757f23aa75c98f254cf0405e6d8c25b831b32921b050a66692427679b1f243" +checksum = "42bc352e4412fb657e795f79b4efcf2bd60b59ee5ca0187f3554194cd1107a27" dependencies = [ "cfg-if", "futures-util", "hickory-proto", "ipconfig", - "lru-cache", + "moka", "once_cell", "parking_lot", "rand", "resolv-conf", "serde", "smallvec", - "thiserror", + "thiserror 2.0.3", "tokio", "tracing", ] [[package]] name = "hickory-server" -version = "0.24.1" +version = "0.25.0-alpha.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9be0e43c556b9b3fdb6c7c71a9a32153a2275d02419e3de809e520bfcfe40c37" +checksum = "aa7154e905d5c8a79c15427881e479b2ba749c55412804f0dc87723a531e45bd" dependencies = [ "async-trait", "bytes", "cfg-if", + "data-encoding", "enum-as-inner", "futures-util", "hickory-proto", + "ipnet", + "prefix-trie", "serde", - "thiserror", + "thiserror 2.0.3", "time", "tokio", "tokio-util", "tracing", ] +[[package]] +name = "hipstr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97971ffc85d4c98de12e2608e992a43f5294ebb625fdb045b27c731b64c4c6d6" +dependencies = [ + "serde", + "serde_bytes", + "sptr", +] + [[package]] name = "hkdf" version = "0.12.4" @@ -3876,9 +4104,9 @@ dependencies = [ [[package]] name = "hyper-timeout" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" +checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ "hyper 1.4.1", "hyper-util", @@ -3889,9 +4117,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.7" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", @@ -3902,11 +4130,128 @@ dependencies = [ "pin-project-lite", "socket2", "tokio", - "tower", "tower-service", "tracing", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -3915,22 +4260,23 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.3.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", ] [[package]] -name = "idna" -version = "0.4.0" +name = "idna_adapter" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "icu_normalizer", + "icu_properties", ] [[package]] @@ -3980,7 +4326,7 @@ dependencies = [ "percent-encoding", "serde", "serde_json", - "thiserror", + "thiserror 1.0.64", "url", ] @@ -4052,6 +4398,9 @@ name = "ipnet" version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +dependencies = [ + "serde", +] [[package]] name = "ipnetwork" @@ -4130,9 +4479,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "jni-sys" @@ -4169,12 +4518,12 @@ dependencies = [ [[package]] name = "junction" -version = "0.2.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be39922b087cecaba4e2d5592dedfc8bda5d4a5a1231f143337cca207950b61d" +checksum = "72bbdfd737a243da3dfc1f99ee8d6e166480f17ab4ac84d7c34aacd73fc7bd16" dependencies = [ "scopeguard", - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -4186,7 +4535,7 @@ dependencies = [ "anyhow", "serde", "serde_json", - "thiserror", + "thiserror 1.0.64", "uuid", ] @@ -4284,9 +4633,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.153" +version = "0.2.168" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d" [[package]] name = "libffi" @@ -4324,7 +4673,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.52.4", + "windows-targets 0.52.6", ] [[package]] @@ -4390,18 +4739,18 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "linked-hash-map" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" - [[package]] name = "linux-raw-sys" version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +[[package]] +name = "litemap" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" + [[package]] name = "litrs" version = "0.4.1" @@ -4427,15 +4776,6 @@ dependencies = [ "serde", ] -[[package]] -name = "lru-cache" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" -dependencies = [ - "linked-hash-map", -] - [[package]] name = "lsp-types" version = "0.97.0" @@ -4473,9 +4813,9 @@ dependencies = [ [[package]] name = "markup_fmt" -version = "0.15.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebae65c91eab3d42231232bf48107f351e5a8d511454927218c53aeb68bbdb6f" +checksum = "fa7605bb4ad755a9ab5c96f2ce3bfd4eb8acd559b842c041fc8a5f84d63aed3a" dependencies = [ "aho-corasick", "css_dataset", @@ -4600,6 +4940,26 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "moka" +version = "0.12.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e0d88686dc561d743b40de8269b26eaf0dc58781bde087b0984646602021d08" +dependencies = [ + "crossbeam-channel", + "crossbeam-epoch", + "crossbeam-utils", + "once_cell", + "parking_lot", + "quanta", + "rustc_version 0.4.0", + "smallvec", + "tagptr", + "thiserror 1.0.64", + "triomphe", + "uuid", +] + [[package]] name = "monch" version = "0.5.0" @@ -4630,7 +4990,7 @@ dependencies = [ "serde", "spirv", "termcolor", - "thiserror", + "thiserror 1.0.64", "unicode-xid", ] @@ -4651,7 +5011,7 @@ dependencies = [ [[package]] name = "napi_sym" -version = "0.107.0" +version = "0.114.0" dependencies = [ "quote", "serde", @@ -4706,21 +5066,22 @@ dependencies = [ [[package]] name = "node_resolver" -version = "0.16.0" +version = "0.22.0" dependencies = [ "anyhow", "async-trait", "boxed_error", "deno_media_type", "deno_package_json", - "deno_path_util", + "deno_path_util 0.3.0", "futures", "lazy-regex", "once_cell", "path-clean", "regex", "serde_json", - "thiserror", + "sys_traits", + "thiserror 2.0.3", "tokio", "url", ] @@ -4879,31 +5240,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "onig" -version = "6.4.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c4b31c8722ad9171c6d77d3557db078cab2bd50afcc9d09c8b315c59df8ca4f" -dependencies = [ - "bitflags 1.3.2", - "libc", - "once_cell", - "onig_sys", -] - -[[package]] -name = "onig_sys" -version = "69.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b829e3d7e9cc74c7e315ee8edb185bf4190da5acde74afd7fc59c35b1f086e7" -dependencies = [ - "cc", - "pkg-config", -] +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "opaque-debug" @@ -4939,7 +5278,7 @@ dependencies = [ "js-sys", "once_cell", "pin-project-lite", - "thiserror", + "thiserror 1.0.64", ] [[package]] @@ -4969,7 +5308,7 @@ dependencies = [ "opentelemetry_sdk", "prost", "serde_json", - "thiserror", + "thiserror 1.0.64", "tokio", "tonic", "tracing", @@ -5011,7 +5350,7 @@ dependencies = [ "percent-encoding", "rand", "serde_json", - "thiserror", + "thiserror 1.0.64", "tracing", ] @@ -5195,7 +5534,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "311fb059dee1a7b802f036316d790138c613a4e8b180c822e3925a662e9f0c95" dependencies = [ "memchr", - "thiserror", + "thiserror 1.0.64", "ucd-trie", ] @@ -5398,6 +5737,16 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[package]] +name = "prefix-trie" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4defc8f5ac7522968431b7592a34432215d80cceb1cf7e0c06287087bca4f046" +dependencies = [ + "ipnet", + "num-traits", +] + [[package]] name = "pretty_assertions" version = "1.4.0" @@ -5593,6 +5942,21 @@ dependencies = [ "unicase", ] +[[package]] +name = "quanta" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5167a477619228a0b284fac2674e3c388cba90631d7b7de620e6f1fcd08da5" +dependencies = [ + "crossbeam-utils", + "libc", + "once_cell", + "raw-cpuid", + "wasi", + "web-sys", + "winapi", +] + [[package]] name = "quick-error" version = "1.2.3" @@ -5609,7 +5973,7 @@ dependencies = [ "indexmap 2.3.0", "quick-xml", "strip-ansi-escapes", - "thiserror", + "thiserror 1.0.64", "uuid", ] @@ -5624,49 +5988,54 @@ dependencies = [ [[package]] name = "quinn" -version = "0.11.2" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4ceeeeabace7857413798eb1ffa1e9c905a9946a57d81fb69b4b71c4d8eb3ad" +checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef" dependencies = [ "bytes", "pin-project-lite", "quinn-proto", "quinn-udp", - "rustc-hash 1.1.0", + "rustc-hash 2.0.0", "rustls", - "thiserror", + "socket2", + "thiserror 2.0.3", "tokio", "tracing", ] [[package]] name = "quinn-proto" -version = "0.11.8" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" +checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" dependencies = [ "bytes", + "getrandom", "rand", "ring", "rustc-hash 2.0.0", "rustls", + "rustls-pki-types", "slab", - "thiserror", + "thiserror 2.0.3", "tinyvec", "tracing", + "web-time", ] [[package]] name = "quinn-udp" -version = "0.5.2" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9096629c45860fc7fb143e125eb826b5e721e10be3263160c7d60ca832cf8c46" +checksum = "52cd4b1eff68bf27940dd39811292c49e007f4d0b4c357358dc9b0197be6b527" dependencies = [ + "cfg_aliases 0.2.1", "libc", "once_cell", "socket2", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -5757,6 +6126,15 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8a99fddc9f0ba0a85884b8d14e3592853e787d581ca1816c91349b10e4eeab" +[[package]] +name = "raw-cpuid" +version = "11.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ab240315c661615f2ee9f0f2cd32d5a7343a84d5ebcccb99d46e6637565e7b0" +dependencies = [ + "bitflags 2.6.0", +] + [[package]] name = "raw-window-handle" version = "0.6.1" @@ -5800,7 +6178,7 @@ checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" dependencies = [ "getrandom", "libredox", - "thiserror", + "thiserror 1.0.64", ] [[package]] @@ -6134,6 +6512,9 @@ name = "rustls-pki-types" version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" +dependencies = [ + "web-time", +] [[package]] name = "rustls-tokio-stream" @@ -6348,6 +6729,17 @@ dependencies = [ "serde", ] +[[package]] +name = "serde-wasm-bindgen" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3b143e2833c57ab9ad3ea280d21fd34e285a42837aeb0ee301f4f41890fa00e" +dependencies = [ + "js-sys", + "serde", + "wasm-bindgen", +] + [[package]] name = "serde_bytes" version = "0.11.14" @@ -6406,14 +6798,14 @@ dependencies = [ [[package]] name = "serde_v8" -version = "0.228.0" +version = "0.236.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfe23e75c9a167f4e9d67a90d9fcaa622d1eec9aecad526c270e99a92f6915ff" +checksum = "e23b3abce64010612f88f4ff689a959736f99eb3dc0dbf1c7903434b8bd8cda5" dependencies = [ "num-bigint", "serde", "smallvec", - "thiserror", + "thiserror 1.0.64", "v8", ] @@ -6684,6 +7076,24 @@ dependencies = [ "der", ] +[[package]] +name = "sptr" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b9b39299b249ad65f3b7e96443bad61c02ca5cd3589f46cb6d610a0fd6c0d6a" + +[[package]] +name = "sqlformat" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c38684453189293372e6fffa3bed1015d20488ce4cc09a23de050fd7411e46" +dependencies = [ + "nom 7.1.3", + "once_cell", + "regex", + "unicode_categories", +] + [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -6721,6 +7131,12 @@ dependencies = [ "syn 2.0.87", ] +[[package]] +name = "stringcase" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04028eeb851ed08af6aba5caa29f2d59a13ed168cee4d6bd753aeefcf1d636b0" + [[package]] name = "strip-ansi-escapes" version = "0.2.0" @@ -7262,25 +7678,24 @@ dependencies = [ ] [[package]] -name = "syntect" -version = "5.2.0" +name = "sys_traits" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "874dcfa363995604333cf947ae9f751ca3af4522c60886774c4963943b4746b1" +checksum = "b1c12873696bde6de3aea3cd27de8e52897177c5b368a6a30987fd4926e30f85" dependencies = [ - "bincode", - "bitflags 1.3.2", - "flate2", - "fnv", - "once_cell", - "onig", - "regex-syntax", - "serde", - "serde_derive", - "serde_json", - "thiserror", - "walkdir", + "filetime", + "getrandom", + "libc", + "parking_lot", + "windows-sys 0.59.0", ] +[[package]] +name = "tagptr" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417" + [[package]] name = "tap" version = "1.0.1" @@ -7418,7 +7833,16 @@ version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.64", +] + +[[package]] +name = "thiserror" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa" +dependencies = [ + "thiserror-impl 2.0.3", ] [[package]] @@ -7432,6 +7856,17 @@ dependencies = [ "syn 2.0.87", ] +[[package]] +name = "thiserror-impl" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "thousands" version = "0.2.0" @@ -7488,6 +7923,16 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinyvec" version = "1.6.0" @@ -7522,6 +7967,16 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "tokio-eld" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9166030f05d6bc5642bdb8f8c2be31eb3c02cd465d662bcdc2df82d4aa41a584" +dependencies = [ + "hdrhistogram", + "tokio", +] + [[package]] name = "tokio-macros" version = "2.2.0" @@ -7564,7 +8019,7 @@ checksum = "51165dfa029d2a65969413a6cc96f354b86b464498702f174a4efa13608fd8c0" dependencies = [ "either", "futures-util", - "thiserror", + "thiserror 1.0.64", "tokio", ] @@ -7630,7 +8085,7 @@ dependencies = [ "socket2", "tokio", "tokio-stream", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", "tracing", @@ -7656,6 +8111,21 @@ dependencies = [ "tracing", ] +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + [[package]] name = "tower-http" version = "0.6.1" @@ -7684,9 +8154,9 @@ checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -7815,12 +8285,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - [[package]] name = "unicode-id" version = "0.3.4" @@ -7890,12 +8354,12 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.4.1" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +checksum = "8d157f1b96d14500ffdc1f10ba712e780825526c03d9a49b4d0324b0d9113ada" dependencies = [ "form_urlencoded", - "idna 0.4.0", + "idna", "percent-encoding", "serde", ] @@ -7918,12 +8382,24 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + [[package]] name = "utf8-width" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3" +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" version = "0.2.1" @@ -7943,9 +8419,9 @@ dependencies = [ [[package]] name = "v8" -version = "130.0.1" +version = "130.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c23b5c2caff00209b03a716609b275acae94b02dd3b63c4648e7232a84a8402f" +checksum = "2ee0be58935708fa4d7efb970c6cf9f2d9511d24ee24246481a65b6ee167348d" dependencies = [ "bindgen", "bitflags 2.6.0", @@ -7955,7 +8431,7 @@ dependencies = [ "miniz_oxide", "once_cell", "paste", - "which 6.0.1", + "which", ] [[package]] @@ -7969,7 +8445,7 @@ dependencies = [ "indexmap 2.3.0", "num-bigint", "serde", - "thiserror", + "thiserror 1.0.64", "wtf8", ] @@ -8135,6 +8611,15 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wasm_dep_analyzer" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f270206a91783fd90625c8bb0d8fbd459d0b1d1bf209b656f713f01ae7c04b8" +dependencies = [ + "thiserror 1.0.64", +] + [[package]] name = "web-sys" version = "0.3.69" @@ -8145,6 +8630,16 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + [[package]] name = "webpki-root-certs" version = "0.26.6" @@ -8172,7 +8667,7 @@ dependencies = [ "arrayvec", "bit-vec", "bitflags 2.6.0", - "cfg_aliases", + "cfg_aliases 0.1.1", "codespan-reporting", "document-features", "indexmap 2.3.0", @@ -8186,7 +8681,7 @@ dependencies = [ "rustc-hash 1.1.0", "serde", "smallvec", - "thiserror", + "thiserror 1.0.64", "web-sys", "wgpu-hal", "wgpu-types", @@ -8204,7 +8699,7 @@ dependencies = [ "bit-set", "bitflags 2.6.0", "block", - "cfg_aliases", + "cfg_aliases 0.1.1", "core-graphics-types", "d3d12", "glow", @@ -8227,7 +8722,7 @@ dependencies = [ "raw-window-handle", "rustc-hash 1.1.0", "smallvec", - "thiserror", + "thiserror 1.0.64", "wasm-bindgen", "web-sys", "wgpu-types", @@ -8246,18 +8741,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix", -] - [[package]] name = "which" version = "6.0.1" @@ -8293,7 +8776,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b2b1bf557d947847a30eb73f79aa6cdb3eaf3ce02f5e9599438f77896a62b3c" dependencies = [ - "thiserror", + "thiserror 1.0.64", "windows", ] @@ -8335,7 +8818,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ "windows-core", - "windows-targets 0.52.4", + "windows-targets 0.52.6", ] [[package]] @@ -8344,7 +8827,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.6", ] [[package]] @@ -8362,7 +8845,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -8382,17 +8874,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.4", - "windows_aarch64_msvc 0.52.4", - "windows_i686_gnu 0.52.4", - "windows_i686_msvc 0.52.4", - "windows_x86_64_gnu 0.52.4", - "windows_x86_64_gnullvm 0.52.4", - "windows_x86_64_msvc 0.52.4", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -8403,9 +8896,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -8415,9 +8908,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -8427,9 +8920,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -8439,9 +8938,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -8451,9 +8950,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -8463,9 +8962,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -8475,9 +8974,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" @@ -8523,6 +9022,18 @@ version = "0.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "wtf8" version = "0.1.0" @@ -8563,7 +9074,7 @@ dependencies = [ "nom 7.1.3", "oid-registry", "rusticata-macros", - "thiserror", + "thiserror 1.0.64", "time", ] @@ -8707,12 +9218,34 @@ dependencies = [ "parking_lot", "rand", "regex", - "thiserror", + "thiserror 1.0.64", "tokio", "tokio-util", "uuid", ] +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "zip" version = "2.1.6" @@ -8726,7 +9259,7 @@ dependencies = [ "flate2", "indexmap 2.3.0", "memchr", - "thiserror", + "thiserror 1.0.64", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 9d625f082a7a23..fa2813caedcf3a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,4 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [workspace] resolver = "2" @@ -21,6 +21,7 @@ members = [ "ext/napi/sym", "ext/net", "ext/node", + "ext/telemetry", "ext/url", "ext/web", "ext/webgpu", @@ -29,6 +30,7 @@ members = [ "ext/webstorage", "resolvers/deno", "resolvers/node", + "resolvers/npm_cache", "runtime", "runtime/permissions", "tests", @@ -45,20 +47,20 @@ license = "MIT" repository = "https://github.com/denoland/deno" [workspace.dependencies] -deno_ast = { version = "=0.43.3", features = ["transpiling"] } -deno_core = { version = "0.319.0" } +deno_ast = { version = "=0.44.0", features = ["transpiling"] } +deno_core = { version = "0.327.0" } -deno_bench_util = { version = "0.171.0", path = "./bench_util" } -deno_config = { version = "=0.39.1", features = ["workspace", "sync"] } -deno_lockfile = "=0.23.1" -deno_media_type = { version = "0.2.0", features = ["module_specifier"] } -deno_npm = "=0.25.4" -deno_path_util = "=0.2.1" -deno_permissions = { version = "0.37.0", path = "./runtime/permissions" } -deno_runtime = { version = "0.186.0", path = "./runtime" } -deno_semver = "=0.5.16" +deno_bench_util = { version = "0.178.0", path = "./bench_util" } +deno_config = { version = "=0.42.0", features = ["workspace", "sync"] } +deno_lockfile = "=0.24.0" +deno_media_type = { version = "0.2.3", features = ["module_specifier"] } +deno_npm = "=0.27.0" +deno_path_util = "=0.3.0" +deno_permissions = { version = "0.43.0", path = "./runtime/permissions" } +deno_runtime = { version = "0.192.0", path = "./runtime" } +deno_semver = "=0.7.1" deno_terminal = "0.2.0" -napi_sym = { version = "0.107.0", path = "./ext/napi/sym" } +napi_sym = { version = "0.114.0", path = "./ext/napi/sym" } test_util = { package = "test_server", path = "./tests/util/server" } denokv_proto = "0.8.4" @@ -67,32 +69,34 @@ denokv_remote = "0.8.4" denokv_sqlite = { default-features = false, version = "0.8.4" } # exts -deno_broadcast_channel = { version = "0.171.0", path = "./ext/broadcast_channel" } -deno_cache = { version = "0.109.0", path = "./ext/cache" } -deno_canvas = { version = "0.46.0", path = "./ext/canvas" } -deno_console = { version = "0.177.0", path = "./ext/console" } -deno_cron = { version = "0.57.0", path = "./ext/cron" } -deno_crypto = { version = "0.191.0", path = "./ext/crypto" } -deno_fetch = { version = "0.201.0", path = "./ext/fetch" } -deno_ffi = { version = "0.164.0", path = "./ext/ffi" } -deno_fs = { version = "0.87.0", path = "./ext/fs" } -deno_http = { version = "0.175.0", path = "./ext/http" } -deno_io = { version = "0.87.0", path = "./ext/io" } -deno_kv = { version = "0.85.0", path = "./ext/kv" } -deno_napi = { version = "0.108.0", path = "./ext/napi" } -deno_net = { version = "0.169.0", path = "./ext/net" } -deno_node = { version = "0.114.0", path = "./ext/node" } -deno_tls = { version = "0.164.0", path = "./ext/tls" } -deno_url = { version = "0.177.0", path = "./ext/url" } -deno_web = { version = "0.208.0", path = "./ext/web" } -deno_webgpu = { version = "0.144.0", path = "./ext/webgpu" } -deno_webidl = { version = "0.177.0", path = "./ext/webidl" } -deno_websocket = { version = "0.182.0", path = "./ext/websocket" } -deno_webstorage = { version = "0.172.0", path = "./ext/webstorage" } +deno_broadcast_channel = { version = "0.178.0", path = "./ext/broadcast_channel" } +deno_cache = { version = "0.116.0", path = "./ext/cache" } +deno_canvas = { version = "0.53.0", path = "./ext/canvas" } +deno_console = { version = "0.184.0", path = "./ext/console" } +deno_cron = { version = "0.64.0", path = "./ext/cron" } +deno_crypto = { version = "0.198.0", path = "./ext/crypto" } +deno_fetch = { version = "0.208.0", path = "./ext/fetch" } +deno_ffi = { version = "0.171.0", path = "./ext/ffi" } +deno_fs = { version = "0.94.0", path = "./ext/fs" } +deno_http = { version = "0.182.0", path = "./ext/http" } +deno_io = { version = "0.94.0", path = "./ext/io" } +deno_kv = { version = "0.92.0", path = "./ext/kv" } +deno_napi = { version = "0.115.0", path = "./ext/napi" } +deno_net = { version = "0.176.0", path = "./ext/net" } +deno_node = { version = "0.122.0", path = "./ext/node" } +deno_telemetry = { version = "0.6.0", path = "./ext/telemetry" } +deno_tls = { version = "0.171.0", path = "./ext/tls" } +deno_url = { version = "0.184.0", path = "./ext/url" } +deno_web = { version = "0.215.0", path = "./ext/web" } +deno_webgpu = { version = "0.151.0", path = "./ext/webgpu" } +deno_webidl = { version = "0.184.0", path = "./ext/webidl" } +deno_websocket = { version = "0.189.0", path = "./ext/websocket" } +deno_webstorage = { version = "0.179.0", path = "./ext/webstorage" } # resolvers -deno_resolver = { version = "0.9.0", path = "./resolvers/deno" } -node_resolver = { version = "0.16.0", path = "./resolvers/node" } +deno_npm_cache = { version = "0.3.0", path = "./resolvers/npm_cache" } +deno_resolver = { version = "0.15.0", path = "./resolvers/deno" } +node_resolver = { version = "0.22.0", path = "./resolvers/node" } aes = "=0.8.3" anyhow = "1.0.57" @@ -100,10 +104,11 @@ async-trait = "0.1.73" base32 = "=0.5.1" base64 = "0.21.7" bencher = "0.1" -boxed_error = "0.2.2" +boxed_error = "0.2.3" brotli = "6.0.0" bytes = "1.4.0" cache_control = "=0.2.0" +capacity_builder = "0.5.0" cbc = { version = "=0.1.2", features = ["alloc"] } # Note: Do not use the "clock" feature of chrono, as it links us to CoreFoundation on macOS. # Instead use util::time::utc_now() @@ -112,9 +117,11 @@ color-print = "0.3.5" console_static_text = "=0.8.1" dashmap = "5.5.3" data-encoding = "2.3.3" -data-url = "=0.3.0" -deno_cache_dir = "=0.13.2" -deno_package_json = { version = "0.1.2", default-features = false } +data-url = "=0.3.1" +deno_cache_dir = "=0.16.0" +deno_error = "=0.5.2" +deno_package_json = { version = "0.4.0", default-features = false } +deno_unsync = "0.4.2" dlopen2 = "0.6.1" ecb = "=0.1.2" elliptic-curve = { version = "0.13.4", features = ["alloc", "arithmetic", "ecdh", "std", "pem", "jwk"] } @@ -128,7 +135,7 @@ fs3 = "0.5.0" futures = "0.3.21" glob = "0.3.1" h2 = "0.4.4" -hickory-resolver = { version = "0.24", features = ["tokio-runtime", "serde-config"] } +hickory-resolver = { version = "0.25.0-alpha.4", features = ["tokio-runtime", "serde"] } http = "1.0" http-body = "1.0" http-body-util = "0.1.2" @@ -136,13 +143,13 @@ http_v02 = { package = "http", version = "0.2.9" } httparse = "1.8.0" hyper = { version = "1.4.1", features = ["full"] } hyper-rustls = { version = "0.27.2", default-features = false, features = ["http1", "http2", "tls12", "ring"] } -hyper-util = { version = "=0.1.7", features = ["tokio", "client", "client-legacy", "server", "server-auto"] } +hyper-util = { version = "0.1.10", features = ["tokio", "client", "client-legacy", "server", "server-auto"] } hyper_v014 = { package = "hyper", version = "0.14.26", features = ["runtime", "http1"] } indexmap = { version = "2", features = ["serde"] } ipnet = "2.3" jsonc-parser = { version = "=0.26.2", features = ["serde"] } lazy-regex = "3" -libc = "0.2.126" +libc = "0.2.168" libz-sys = { version = "1.1.20", default-features = false } log = { version = "0.4.20", features = ["kv"] } lsp-types = "=0.97.0" # used by tower-lsp and "proposed" feature is unstable in patch releases @@ -186,26 +193,26 @@ slab = "0.4" smallvec = "1.8" socket2 = { version = "0.5.3", features = ["all"] } spki = "0.7.2" +sys_traits = "=0.1.6" tar = "=0.4.40" tempfile = "3.4.0" termcolor = "1.1.3" -thiserror = "1.0.61" +thiserror = "2.0.3" tokio = { version = "1.36.0", features = ["full"] } tokio-metrics = { version = "0.3.0", features = ["rt"] } tokio-rustls = { version = "0.26.0", default-features = false, features = ["ring", "tls12"] } tokio-socks = "0.5.1" tokio-util = "0.7.4" -tower = { version = "0.4.13", default-features = false, features = ["util"] } +tower = { version = "0.5.2", default-features = false, features = ["retry", "util"] } tower-http = { version = "0.6.1", features = ["decompression-br", "decompression-gzip"] } tower-lsp = { package = "deno_tower_lsp", version = "0.1.0", features = ["proposed"] } tower-service = "0.3.2" twox-hash = "=1.6.3" -# Upgrading past 2.4.1 may cause WPT failures -url = { version = "< 2.5.0", features = ["serde", "expose_internals"] } +url = { version = "2.5", features = ["serde", "expose_internals"] } uuid = { version = "1.3.0", features = ["v4"] } webpki-root-certs = "0.26.5" webpki-roots = "0.26" -which = "4.2.5" +which = "6" yoke = { version = "0.7.4", features = ["derive"] } zeromq = { version = "=0.4.1", default-features = false, features = ["tcp-transport", "tokio-runtime"] } zstd = "=0.12.4" @@ -233,9 +240,9 @@ syn = { version = "2", features = ["full", "extra-traits"] } nix = "=0.27.1" # windows deps -junction = "=0.2.0" +junction = "=1.2.0" winapi = "=0.3.9" -windows-sys = { version = "0.52.0", features = ["Win32_Foundation", "Win32_Media", "Win32_Storage_FileSystem", "Win32_System_IO", "Win32_System_WindowsProgramming", "Wdk", "Wdk_System", "Wdk_System_SystemInformation", "Win32_Security", "Win32_System_Pipes", "Wdk_Storage_FileSystem", "Win32_System_Registry", "Win32_System_Kernel"] } +windows-sys = { version = "0.59.0", features = ["Win32_Foundation", "Win32_Media", "Win32_Storage_FileSystem", "Win32_System_IO", "Win32_System_WindowsProgramming", "Wdk", "Wdk_System", "Wdk_System_SystemInformation", "Win32_Security", "Win32_System_Pipes", "Wdk_Storage_FileSystem", "Win32_System_Registry", "Win32_System_Kernel", "Win32_System_Threading", "Win32_UI", "Win32_UI_Shell"] } winres = "=0.1.12" [profile.release] @@ -244,6 +251,11 @@ incremental = true lto = true opt-level = 'z' # Optimize for size +[profile.release-slim] +inherits = "release" +panic = "abort" +strip = "symbols" + # Build release with debug symbols: cargo build --profile=release-with-debug [profile.release-with-debug] inherits = "release" diff --git a/LICENSE.md b/LICENSE.md index 56753af3674dfc..406ae093648359 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ MIT License -Copyright 2018-2024 the Deno authors +Copyright 2018-2025 the Deno authors 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 diff --git a/Releases.md b/Releases.md index 5ce25815bdb54d..aaae202a37acf9 100644 --- a/Releases.md +++ b/Releases.md @@ -6,6 +6,170 @@ https://github.com/denoland/deno/releases We also have one-line install commands at: https://github.com/denoland/deno_install +### 2.1.4 / 2024.12.11 + +- feat(unstable): support caching npm dependencies only as they're needed + (#27300) +- fix(compile): correct read length for transpiled typescript files (#27301) +- fix(ext/node): accept file descriptor in fs.readFile(Sync) (#27252) +- fix(ext/node): handle Float16Array in node:v8 module (#27285) +- fix(lint): do not error providing --allow-import (#27321) +- fix(node): update list of builtin node modules, add missing export to + _http_common (#27294) +- fix(outdated): error when there are no config files (#27306) +- fix(outdated): respect --quiet flag for hints (#27317) +- fix(outdated): show a suggestion for updating (#27304) +- fix(task): do not always kill child on ctrl+c on windows (#27269) +- fix(unstable): don't unwrap optional state in otel (#27292) +- fix: do not error when subpath has an @ symbol (#27290) +- fix: do not panic when fetching invalid file url on Windows (#27259) +- fix: replace the @deno-types with @ts-types (#27310) +- perf(compile): improve FileBackedVfsFile (#27299) + +### 2.1.3 / 2024.12.05 + +- feat(unstable): add metrics to otel (#27143) +- fix(fmt): stable formatting of HTML files with JS (#27164) +- fix(install): use locked version of jsr package when fetching exports (#27237) +- fix(node/fs): support `recursive` option in readdir (#27179) +- fix(node/worker_threads): data url not encoded properly with eval (#27184) +- fix(outdated): allow `--latest` without `--update` (#27227) +- fix(task): `--recursive` option not working (#27183) +- fix(task): don't panic with filter on missing task argument (#27180) +- fix(task): forward signals to spawned sub-processes on unix (#27141) +- fix(task): kill descendants when killing task process on Windows (#27163) +- fix(task): only pass args to root task (#27213) +- fix(unstable): otel context with multiple keys (#27230) +- fix(unstable/temporal): respect locale in `Duration.prototype.toLocaleString` + (#27000) +- fix: clear dep analysis when module loading is done (#27204) +- fix: improve auto-imports for npm packages (#27224) +- fix: support `workspace:^` and `workspace:~` version constraints (#27096) + +### 2.1.2 / 2024.11.28 + +- feat(unstable): Instrument Deno.serve (#26964) +- feat(unstable): Instrument fetch (#27057) +- feat(unstable): repurpose `--unstable-detect-cjs` to attempt loading more + modules as cjs (#27094) +- fix(check): support jsdoc `@import` tag (#26991) +- fix(compile): correct buffered reading of assets and files (#27008) +- fix(compile): do not error embedding same symlink via multiple methods + (#27015) +- fix(compile): handle TypeScript file included as asset (#27032) +- fix(ext/fetch): don't throw when `bodyUsed` inspect after upgrade (#27088) +- fix(ext/node): `tls.connect` socket upgrades (#27125) +- fix(ext/node): add `fs.promises.fstat` and `FileHandle#stat` (#26719) +- fix(ext/webgpu): normalize limits to number (#27072) +- fix(ext/webgpu): use correct variable name (#27108) +- fix(ext/websocket): don't throw exception when sending to closed socket + (#26932) +- fix(fmt): return `None` if sql fmt result is the same (#27014) +- fix(info): resolve bare specifier pointing to workspace member (#27020) +- fix(init): always force managed node modules (#27047) +- fix(init): support scoped npm packages (#27128) +- fix(install): don't re-set up node_modules if running lifecycle script + (#26984) +- fix(lsp): remove stray debug output (#27010) +- fix(lsp): support task object notation for tasks request (#27076) +- fix(lsp): wasm file import completions (#27018) +- fix(node): correct resolution of dynamic import of esm from cjs (#27071) +- fix(node/fs): add missing stat path argument validation (#27086) +- fix(node/fs): missing uv error context for readFile (#27011) +- fix(node/http): casing ignored in ServerResponse.hasHeader() (#27105) +- fix(node/timers): error when passing id to clearTimeout/clearInterval (#27130) +- fix(runtime/ops): Fix watchfs remove event (#27041) +- fix(streams): reject `string` in `ReadableStream.from` type (#25116) +- fix(task): handle carriage return in task description (#27099) +- fix(task): handle multiline descriptions properly (#27069) +- fix(task): strip ansi codes and control chars when printing tasks (#27100) +- fix(tools/doc): HTML resolve main entrypoint from config file (#27103) +- fix: support bun specifiers in JSR publish (#24588) +- fix: support non-function exports in Wasm modules (#26992) +- perf(compile): read embedded files as static references when UTF-8 and reading + as strings (#27033) +- perf(ext/webstorage): use object wrap for `Storage` (#26931) + +### 2.1.1 / 2024.11.21 + +- docs(add): clarification to add command (#26968) +- docs(doc): fix typo in doc subcommand help output (#26321) +- fix(node): regression where ts files were sometimes resolved instead of js + (#26971) +- fix(task): ensure root config always looks up dependencies in root (#26959) +- fix(watch): don't panic if there's no path provided (#26972) +- fix: Buffer global in --unstable-node-globals (#26973) + +### 2.1.0 / 2024.11.21 + +- feat(cli): add `--unstable-node-globals` flag (#26617) +- feat(cli): support multiple env file argument (#26527) +- feat(compile): ability to embed directory in executable (#26939) +- feat(compile): ability to embed local data files (#26934) +- feat(ext/fetch): Make fetch client parameters configurable (#26909) +- feat(ext/fetch): allow embedders to use `hickory_dns_resolver` instead of + default `GaiResolver` (#26740) +- feat(ext/fs): add ctime to Deno.stats and use it in node compat layer (#24801) +- feat(ext/http): Make http server parameters configurable (#26785) +- feat(ext/node): perf_hooks.monitorEventLoopDelay() (#26905) +- feat(fetch): accept async iterables for body (#26882) +- feat(fmt): support SQL (#26750) +- feat(info): show location for Web Cache (#26205) +- feat(init): add --npm flag to initialize npm projects (#26896) +- feat(jupyter): Add `Deno.jupyter.image` API (#26284) +- feat(lint): Add checked files list to the JSON output(#26936) +- feat(lsp): auto-imports with @deno-types directives (#26821) +- feat(node): stabilize detecting if CJS via `"type": "commonjs"` in a + package.json (#26439) +- feat(permission): support suffix wildcards in `--allow-env` flag (#25255) +- feat(publish): add `--set-version ` flag (#26141) +- feat(runtime): remove public OTEL trace API (#26854) +- feat(task): add --eval flag (#26943) +- feat(task): dependencies (#26467) +- feat(task): support object notation, remove support for JSDocs (#26886) +- feat(task): workspace support with --filter and --recursive (#26949) +- feat(watch): log which file changed on HMR or watch change (#25801) +- feat: OpenTelemetry Tracing API and Exporting (#26710) +- feat: Wasm module support (#26668) +- feat: fmt and lint respect .gitignore file (#26897) +- feat: permission stack traces in ops (#26938) +- feat: subcommand to view and update outdated dependencies (#26942) +- feat: upgrade V8 to 13.0 (#26851) +- fix(cli): preserve comments in doc tests (#26828) +- fix(cli): show prefix hint when installing a package globally (#26629) +- fix(ext/cache): gracefully error when cache creation failed (#26895) +- fix(ext/http): prefer brotli for `accept-encoding: gzip, deflate, br, zstd` + (#26814) +- fix(ext/node): New async setInterval function to improve the nodejs + compatibility (#26703) +- fix(ext/node): add autoSelectFamily option to net.createConnection (#26661) +- fix(ext/node): handle `--allow-sys=inspector` (#26836) +- fix(ext/node): increase tolerance for interval test (#26899) +- fix(ext/node): process.getBuiltinModule (#26833) +- fix(ext/node): use ERR_NOT_IMPLEMENTED for notImplemented (#26853) +- fix(ext/node): zlib.crc32() (#26856) +- fix(ext/webgpu): Create GPUQuerySet converter before usage (#26883) +- fix(ext/websocket): initialize `error` attribute of WebSocket ErrorEvent + (#26796) +- fix(ext/webstorage): use error class for sqlite error case (#26806) +- fix(fmt): error instead of panic on unstable format (#26859) +- fix(fmt): formatting of .svelte files (#26948) +- fix(install): percent encodings in interactive progress bar (#26600) +- fix(install): re-setup bin entries after running lifecycle scripts (#26752) +- fix(lockfile): track dependencies specified in TypeScript compiler options + (#26551) +- fix(lsp): ignore editor indent settings if deno.json is present (#26912) +- fix(lsp): skip code action edits that can't be converted (#26831) +- fix(node): handle resolving ".//" in npm packages (#26920) +- fix(node/crypto): support promisify on generateKeyPair (#26913) +- fix(permissions): say to use --allow-run instead of --allow-all (#26842) +- fix(publish): improve error message when missing exports (#26945) +- fix: otel resiliency (#26857) +- fix: update message for unsupported schemes with npm and jsr (#26884) +- perf(compile): code cache (#26528) +- perf(windows): delay load webgpu and some other dlls (#26917) +- perf: use available system memory for v8 isolate memory limit (#26868) + ### 2.0.6 / 2024.11.10 - feat(ext/http): abort event when request is cancelled (#26781) diff --git a/bench_util/Cargo.toml b/bench_util/Cargo.toml index d6eefc3a5d8c9e..3172426c27c75c 100644 --- a/bench_util/Cargo.toml +++ b/bench_util/Cargo.toml @@ -1,8 +1,8 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "deno_bench_util" -version = "0.171.0" +version = "0.178.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/bench_util/README.md b/bench_util/README.md index 12474a86b60392..30616a08fdabae 100644 --- a/bench_util/README.md +++ b/bench_util/README.md @@ -7,7 +7,6 @@ use deno_bench_util::bench_js_sync; use deno_bench_util::bench_or_profile; use deno_bench_util::bencher::benchmark_group; use deno_bench_util::bencher::Bencher; - use deno_core::Extension; #[op2] diff --git a/bench_util/benches/utf8.rs b/bench_util/benches/utf8.rs index 48af4dba7e5421..88afce86c3cce4 100644 --- a/bench_util/benches/utf8.rs +++ b/bench_util/benches/utf8.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_bench_util::bench_js_sync_with; use deno_bench_util::bench_or_profile; diff --git a/bench_util/js_runtime.rs b/bench_util/js_runtime.rs index a97d8ae50138c7..402c9a4b007918 100644 --- a/bench_util/js_runtime.rs +++ b/bench_util/js_runtime.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use bencher::Bencher; use deno_core::v8; use deno_core::Extension; diff --git a/bench_util/lib.rs b/bench_util/lib.rs index 39183be7fc8db1..22587a5f7e003d 100644 --- a/bench_util/lib.rs +++ b/bench_util/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. mod js_runtime; mod profiling; diff --git a/bench_util/profiling.rs b/bench_util/profiling.rs index 151a29e599bba9..1d2bfb51d2b330 100644 --- a/bench_util/profiling.rs +++ b/bench_util/profiling.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use bencher::DynBenchFn; use bencher::StaticBenchFn; use bencher::TestDescAndFn; diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 374f3dae5e8631..a2245b0806cf76 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -1,8 +1,8 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "deno" -version = "2.0.6" +version = "2.1.4" authors.workspace = true default-run = "deno" edition.workspace = true @@ -72,17 +72,20 @@ deno_ast = { workspace = true, features = ["bundler", "cjs", "codegen", "proposa deno_cache_dir.workspace = true deno_config.workspace = true deno_core = { workspace = true, features = ["include_js_files_for_snapshotting"] } -deno_doc = { version = "0.156.0", default-features = false, features = ["rust", "html", "syntect"] } -deno_graph = { version = "=0.84.1" } -deno_lint = { version = "=0.68.0", features = ["docs"] } +deno_doc = { version = "=0.161.3", features = ["rust", "comrak"] } +deno_error.workspace = true +deno_graph = { version = "=0.86.7" } +deno_lint = { version = "=0.68.2", features = ["docs"] } deno_lockfile.workspace = true deno_npm.workspace = true +deno_npm_cache.workspace = true deno_package_json.workspace = true deno_path_util.workspace = true -deno_resolver.workspace = true +deno_resolver = { workspace = true, features = ["sync"] } deno_runtime = { workspace = true, features = ["include_js_files_for_snapshotting"] } deno_semver.workspace = true -deno_task_shell = "=0.18.1" +deno_task_shell = "=0.20.2" +deno_telemetry.workspace = true deno_terminal.workspace = true libsui = "0.5.0" node_resolver.workspace = true @@ -91,8 +94,10 @@ anstream = "0.6.14" async-trait.workspace = true base64.workspace = true bincode = "=1.3.3" +boxed_error.workspace = true bytes.workspace = true cache_control.workspace = true +capacity_builder.workspace = true chrono = { workspace = true, features = ["now"] } clap = { version = "=4.5.16", features = ["env", "string", "wrap_help", "error-context"] } clap_complete = "=4.5.24" @@ -107,7 +112,7 @@ dotenvy = "0.15.7" dprint-plugin-json = "=0.19.4" dprint-plugin-jupyter = "=0.1.5" dprint-plugin-markdown = "=0.17.8" -dprint-plugin-typescript = "=0.93.2" +dprint-plugin-typescript = "=0.93.3" env_logger = "=0.10.0" fancy-regex = "=0.10.0" faster-hex.workspace = true @@ -129,7 +134,7 @@ libz-sys.workspace = true log = { workspace = true, features = ["serde"] } lsp-types.workspace = true malva = "=0.11.0" -markup_fmt = "=0.15.0" +markup_fmt = "=0.18.0" memmem.workspace = true monch.workspace = true notify.workspace = true @@ -151,7 +156,9 @@ serde_repr.workspace = true sha2.workspace = true shell-escape = "=0.1.5" spki = { version = "0.7", features = ["pem"] } +sqlformat = "=0.3.2" strsim = "0.11.1" +sys_traits = { workspace = true, features = ["getrandom", "filetime", "libc", "real", "strip_unc", "winapi"] } tar.workspace = true tempfile.workspace = true text-size = "=1.1.0" @@ -180,6 +187,7 @@ nix.workspace = true [dev-dependencies] deno_bench_util.workspace = true pretty_assertions.workspace = true +sys_traits = { workspace = true, features = ["memory"] } test_util.workspace = true [package.metadata.winres] diff --git a/cli/args/deno_json.rs b/cli/args/deno_json.rs index e9ab0189f506b8..c27b1d392443e3 100644 --- a/cli/args/deno_json.rs +++ b/cli/args/deno_json.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::collections::HashSet; @@ -8,60 +8,13 @@ use deno_semver::jsr::JsrDepPackageReq; use deno_semver::jsr::JsrPackageReqReference; use deno_semver::npm::NpmPackageReqReference; -#[cfg(test)] // happens to only be used by the tests at the moment -pub struct DenoConfigFsAdapter<'a>( - pub &'a dyn deno_runtime::deno_fs::FileSystem, -); - -#[cfg(test)] -impl<'a> deno_config::fs::DenoConfigFs for DenoConfigFsAdapter<'a> { - fn read_to_string_lossy( - &self, - path: &std::path::Path, - ) -> Result { - self - .0 - .read_text_file_lossy_sync(path, None) - .map_err(|err| err.into_io_error()) - } - - fn stat_sync( - &self, - path: &std::path::Path, - ) -> Result { - self - .0 - .stat_sync(path) - .map(|stat| deno_config::fs::FsMetadata { - is_file: stat.is_file, - is_directory: stat.is_directory, - is_symlink: stat.is_symlink, - }) - .map_err(|err| err.into_io_error()) - } - - fn read_dir( - &self, - path: &std::path::Path, - ) -> Result, std::io::Error> { - self - .0 - .read_dir_sync(path) - .map_err(|err| err.into_io_error()) - .map(|entries| { - entries - .into_iter() - .map(|e| deno_config::fs::FsDirEntry { - path: path.join(e.name), - metadata: deno_config::fs::FsMetadata { - is_file: e.is_file, - is_directory: e.is_directory, - is_symlink: e.is_symlink, - }, - }) - .collect() - }) - } +pub fn import_map_deps( + import_map: &serde_json::Value, +) -> HashSet { + let values = imports_values(import_map.get("imports")) + .into_iter() + .chain(scope_values(import_map.get("scopes"))); + values_to_set(values) } pub fn deno_json_deps( @@ -70,7 +23,41 @@ pub fn deno_json_deps( let values = imports_values(config.json.imports.as_ref()) .into_iter() .chain(scope_values(config.json.scopes.as_ref())); - values_to_set(values) + let mut set = values_to_set(values); + + if let Some(serde_json::Value::Object(compiler_options)) = + &config.json.compiler_options + { + // add jsxImportSource + if let Some(serde_json::Value::String(value)) = + compiler_options.get("jsxImportSource") + { + if let Some(dep_req) = value_to_dep_req(value) { + set.insert(dep_req); + } + } + // add jsxImportSourceTypes + if let Some(serde_json::Value::String(value)) = + compiler_options.get("jsxImportSourceTypes") + { + if let Some(dep_req) = value_to_dep_req(value) { + set.insert(dep_req); + } + } + // add the dependencies in the types array + if let Some(serde_json::Value::Array(types)) = compiler_options.get("types") + { + for value in types { + if let serde_json::Value::String(value) = value { + if let Some(dep_req) = value_to_dep_req(value) { + set.insert(dep_req); + } + } + } + } + } + + set } fn imports_values(value: Option<&serde_json::Value>) -> Vec<&String> { @@ -98,15 +85,23 @@ fn values_to_set<'a>( ) -> HashSet { let mut entries = HashSet::new(); for value in values { - if let Ok(req_ref) = JsrPackageReqReference::from_str(value) { - entries.insert(JsrDepPackageReq::jsr(req_ref.into_inner().req)); - } else if let Ok(req_ref) = NpmPackageReqReference::from_str(value) { - entries.insert(JsrDepPackageReq::npm(req_ref.into_inner().req)); + if let Some(dep_req) = value_to_dep_req(value) { + entries.insert(dep_req); } } entries } +fn value_to_dep_req(value: &str) -> Option { + if let Ok(req_ref) = JsrPackageReqReference::from_str(value) { + Some(JsrDepPackageReq::jsr(req_ref.into_inner().req)) + } else if let Ok(req_ref) = NpmPackageReqReference::from_str(value) { + Some(JsrDepPackageReq::npm(req_ref.into_inner().req)) + } else { + None + } +} + pub fn check_warn_tsconfig(ts_config: &TsConfigForEmit) { if let Some(ignored_options) = &ts_config.maybe_ignored_options { log::warn!("{}", ignored_options); diff --git a/cli/args/flags.rs b/cli/args/flags.rs index bd6b30e417b5c2..fb64b4eeaa9598 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -1,6 +1,5 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use std::borrow::Cow; use std::collections::HashSet; use std::env; use std::ffi::OsString; @@ -34,19 +33,16 @@ use deno_core::url::Url; use deno_graph::GraphKind; use deno_path_util::normalize_path; use deno_path_util::url_to_file_path; -use deno_runtime::deno_permissions::PermissionsOptions; use deno_runtime::deno_permissions::SysDescriptor; -use deno_runtime::ops::otel::OtelConfig; +use deno_telemetry::OtelConfig; +use deno_telemetry::OtelConsoleConfig; use log::debug; use log::Level; use serde::Deserialize; use serde::Serialize; -use crate::args::resolve_no_prompt; -use crate::util::fs::canonicalize_path; - use super::flags_net; -use super::jsr_url; +use crate::util::fs::canonicalize_path; #[derive(Clone, Debug, Default, Eq, PartialEq)] pub enum ConfigFlag { @@ -210,6 +206,7 @@ pub struct FmtFlags { pub no_semicolons: Option, pub watch: Option, pub unstable_component: bool, + pub unstable_sql: bool, } impl FmtFlags { @@ -221,6 +218,8 @@ impl FmtFlags { #[derive(Clone, Debug, Eq, PartialEq)] pub struct InitFlags { + pub package: Option, + pub package_args: Vec, pub dir: Option, pub lib: bool, pub serve: bool, @@ -242,7 +241,7 @@ pub struct InstallFlagsGlobal { } #[derive(Clone, Debug, Eq, PartialEq)] -pub enum InstallKind { +pub enum InstallFlags { Local(InstallFlagsLocal), Global(InstallFlagsGlobal), } @@ -254,11 +253,6 @@ pub enum InstallFlagsLocal { Entrypoints(Vec), } -#[derive(Clone, Debug, Eq, PartialEq)] -pub struct InstallFlags { - pub kind: InstallKind, -} - #[derive(Clone, Debug, Eq, PartialEq)] pub struct JSONReferenceFlags { pub json: deno_core::serde_json::Value, @@ -379,6 +373,9 @@ pub struct TaskFlags { pub cwd: Option, pub task: Option, pub is_run: bool, + pub recursive: bool, + pub filter: Option, + pub eval: bool, } #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] @@ -427,6 +424,7 @@ pub struct PublishFlags { pub allow_slow_types: bool, pub allow_dirty: bool, pub no_provenance: bool, + pub set_version: Option, } #[derive(Clone, Debug, Eq, PartialEq)] @@ -462,6 +460,7 @@ pub enum DenoSubcommand { Serve(ServeFlags), Task(TaskFlags), Test(TestFlags), + Outdated(OutdatedFlags), Types, Upgrade(UpgradeFlags), Vendor, @@ -469,6 +468,19 @@ pub enum DenoSubcommand { Help(HelpFlags), } +#[derive(Clone, Debug, PartialEq, Eq)] +pub enum OutdatedKind { + Update { latest: bool }, + PrintOutdated { compatible: bool }, +} + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct OutdatedFlags { + pub filters: Vec, + pub recursive: bool, + pub kind: OutdatedKind, +} + impl DenoSubcommand { pub fn is_run(&self) -> bool { matches!(self, Self::Run(_)) @@ -577,7 +589,9 @@ pub struct UnstableConfig { // TODO(bartlomieju): remove in Deno 2.5 pub legacy_flag_enabled: bool, // --unstable pub bare_node_builtins: bool, + pub detect_cjs: bool, pub sloppy_imports: bool, + pub npm_lazy_caching: bool, pub features: Vec, // --unstabe-kv --unstable-cron } @@ -674,97 +688,6 @@ impl PermissionFlags { || self.deny_write.is_some() || self.allow_import.is_some() } - - pub fn to_options(&self, cli_arg_urls: &[Cow]) -> PermissionsOptions { - fn handle_allow( - allow_all: bool, - value: Option, - ) -> Option { - if allow_all { - assert!(value.is_none()); - Some(T::default()) - } else { - value - } - } - - fn handle_imports( - cli_arg_urls: &[Cow], - imports: Option>, - ) -> Option> { - if imports.is_some() { - return imports; - } - - let builtin_allowed_import_hosts = [ - "jsr.io:443", - "deno.land:443", - "esm.sh:443", - "cdn.jsdelivr.net:443", - "raw.githubusercontent.com:443", - "gist.githubusercontent.com:443", - ]; - - let mut imports = - Vec::with_capacity(builtin_allowed_import_hosts.len() + 1); - imports - .extend(builtin_allowed_import_hosts.iter().map(|s| s.to_string())); - - // also add the JSR_URL env var - if let Some(jsr_host) = allow_import_host_from_url(jsr_url()) { - imports.push(jsr_host); - } - // include the cli arg urls - for url in cli_arg_urls { - if let Some(host) = allow_import_host_from_url(url) { - imports.push(host); - } - } - - Some(imports) - } - - PermissionsOptions { - allow_all: self.allow_all, - allow_env: handle_allow(self.allow_all, self.allow_env.clone()), - deny_env: self.deny_env.clone(), - allow_net: handle_allow(self.allow_all, self.allow_net.clone()), - deny_net: self.deny_net.clone(), - allow_ffi: handle_allow(self.allow_all, self.allow_ffi.clone()), - deny_ffi: self.deny_ffi.clone(), - allow_read: handle_allow(self.allow_all, self.allow_read.clone()), - deny_read: self.deny_read.clone(), - allow_run: handle_allow(self.allow_all, self.allow_run.clone()), - deny_run: self.deny_run.clone(), - allow_sys: handle_allow(self.allow_all, self.allow_sys.clone()), - deny_sys: self.deny_sys.clone(), - allow_write: handle_allow(self.allow_all, self.allow_write.clone()), - deny_write: self.deny_write.clone(), - allow_import: handle_imports( - cli_arg_urls, - handle_allow(self.allow_all, self.allow_import.clone()), - ), - prompt: !resolve_no_prompt(self), - } - } -} - -/// Gets the --allow-import host from the provided url -fn allow_import_host_from_url(url: &Url) -> Option { - let host = url.host()?; - if let Some(port) = url.port() { - Some(format!("{}:{}", host, port)) - } else { - use deno_core::url::Host::*; - match host { - Domain(domain) if domain == "jsr.io" && url.scheme() == "https" => None, - _ => match url.scheme() { - "https" => Some(format!("{}:443", host)), - "http" => Some(format!("{}:80", host)), - _ => None, - }, - } - } } fn join_paths(allowlist: &[String], d: &str) -> String { @@ -968,21 +891,43 @@ impl Flags { args } - pub fn otel_config(&self) -> Option { - if self + pub fn otel_config(&self) -> OtelConfig { + let has_unstable_flag = self .unstable_config .features - .contains(&String::from("otel")) - { - Some(OtelConfig { - runtime_name: Cow::Borrowed("deno"), - runtime_version: Cow::Borrowed(crate::version::DENO_VERSION_INFO.deno), - deterministic: std::env::var("DENO_UNSTABLE_OTEL_DETERMINISTIC") - .is_ok(), - ..Default::default() - }) - } else { - None + .contains(&String::from("otel")); + + let otel_var = |name| match std::env::var(name) { + Ok(s) if s.to_lowercase() == "true" => Some(true), + Ok(s) if s.to_lowercase() == "false" => Some(false), + _ => None, + }; + + let disabled = + !has_unstable_flag || otel_var("OTEL_SDK_DISABLED").unwrap_or(false); + let default = !disabled && otel_var("OTEL_DENO").unwrap_or(false); + + OtelConfig { + tracing_enabled: !disabled + && otel_var("OTEL_DENO_TRACING").unwrap_or(default), + metrics_enabled: !disabled + && otel_var("OTEL_DENO_METRICS").unwrap_or(default), + console: match std::env::var("OTEL_DENO_CONSOLE").as_deref() { + Ok(_) if disabled => OtelConsoleConfig::Ignore, + Ok("ignore") => OtelConsoleConfig::Ignore, + Ok("capture") => OtelConsoleConfig::Capture, + Ok("replace") => OtelConsoleConfig::Replace, + _ => { + if default { + OtelConsoleConfig::Capture + } else { + OtelConsoleConfig::Ignore + } + } + }, + deterministic: std::env::var("DENO_UNSTABLE_OTEL_DETERMINISTIC") + .as_deref() + == Ok("1"), } } @@ -1157,25 +1102,26 @@ static ENV_VARIABLES_HELP: &str = cstr!( Docs: https://docs.deno.com/go/env-vars DENO_AUTH_TOKENS A semi-colon separated list of bearer tokens and hostnames - to use when fetching remote modules from private repositories - (e.g. "abcde12345@deno.land;54321edcba@github.com") - DENO_CERT Load certificate authorities from PEM encoded file - DENO_DIR Set the cache directory - DENO_INSTALL_ROOT Set deno install's output directory - (defaults to $HOME/.deno/bin) - DENO_NO_PACKAGE_JSON Disables auto-resolution of package.json - DENO_NO_UPDATE_CHECK Set to disable checking if a newer Deno version is available - DENO_TLS_CA_STORE Comma-separated list of order dependent certificate stores. - Possible values: "system", "mozilla". - (defaults to "mozilla") - HTTP_PROXY Proxy address for HTTP requests - (module downloads, fetch) - HTTPS_PROXY Proxy address for HTTPS requests - (module downloads, fetch) - NO_COLOR Set to disable color - NO_PROXY Comma-separated list of hosts which do not use a proxy - (module downloads, fetch) - NPM_CONFIG_REGISTRY URL to use for the npm registry."# + to use when fetching remote modules from private repositories + (e.g. "abcde12345@deno.land;54321edcba@github.com") + DENO_CERT Load certificate authorities from PEM encoded file + DENO_DIR Set the cache directory + DENO_INSTALL_ROOT Set deno install's output directory + (defaults to $HOME/.deno/bin) + DENO_NO_PACKAGE_JSON Disables auto-resolution of package.json + DENO_NO_UPDATE_CHECK Set to disable checking if a newer Deno version is available + DENO_TLS_CA_STORE Comma-separated list of order dependent certificate stores. + DENO_TRACE_PERMISSIONS Environmental variable to enable stack traces in permission prompts. + Possible values: "system", "mozilla". + (defaults to "mozilla") + HTTP_PROXY Proxy address for HTTP requests + (module downloads, fetch) + HTTPS_PROXY Proxy address for HTTPS requests + (module downloads, fetch) + NO_COLOR Set to disable color + NO_PROXY Comma-separated list of hosts which do not use a proxy + (module downloads, fetch) + NPM_CONFIG_REGISTRY URL to use for the npm registry."# ); static DENO_HELP: &str = cstr!( @@ -1199,6 +1145,7 @@ static DENO_HELP: &str = cstr!( deno add jsr:@std/assert | deno add npm:express install Installs dependencies either in the local project or globally to a bin directory uninstall Uninstalls a dependency or an executable script in the installation root's bin directory + outdated Find and update outdated dependencies remove Remove dependencies from the configuration file Tooling: @@ -1209,7 +1156,7 @@ static DENO_HELP: &str = cstr!( compile Compile the script into a self contained executable deno compile main.ts | deno compile --target=x86_64-unknown-linux-gnu coverage Print coverage reports - doc Genereate and show documentation for a module or built-ins + doc Generate and show documentation for a module or built-ins deno doc | deno doc --json | deno doc --html mod.ts fmt Format source files deno fmt | deno fmt main.ts @@ -1374,23 +1321,24 @@ pub fn flags_from_vec(args: Vec) -> clap::error::Result { "doc" => doc_parse(&mut flags, &mut m)?, "eval" => eval_parse(&mut flags, &mut m)?, "fmt" => fmt_parse(&mut flags, &mut m)?, - "init" => init_parse(&mut flags, &mut m), + "init" => init_parse(&mut flags, &mut m)?, "info" => info_parse(&mut flags, &mut m)?, "install" => install_parse(&mut flags, &mut m)?, "json_reference" => json_reference_parse(&mut flags, &mut m, app), "jupyter" => jupyter_parse(&mut flags, &mut m), "lint" => lint_parse(&mut flags, &mut m)?, "lsp" => lsp_parse(&mut flags, &mut m), + "outdated" => outdated_parse(&mut flags, &mut m)?, "repl" => repl_parse(&mut flags, &mut m)?, "run" => run_parse(&mut flags, &mut m, app, false)?, "serve" => serve_parse(&mut flags, &mut m, app)?, - "task" => task_parse(&mut flags, &mut m), + "task" => task_parse(&mut flags, &mut m, app)?, "test" => test_parse(&mut flags, &mut m)?, "types" => types_parse(&mut flags, &mut m), "uninstall" => uninstall_parse(&mut flags, &mut m), "upgrade" => upgrade_parse(&mut flags, &mut m), "vendor" => vendor_parse(&mut flags, &mut m), - "publish" => publish_parse(&mut flags, &mut m), + "publish" => publish_parse(&mut flags, &mut m)?, _ => unreachable!(), } } else { @@ -1623,6 +1571,7 @@ pub fn clap_root() -> Command { .subcommand(json_reference_subcommand()) .subcommand(jupyter_subcommand()) .subcommand(uninstall_subcommand()) + .subcommand(outdated_subcommand()) .subcommand(lsp_subcommand()) .subcommand(lint_subcommand()) .subcommand(publish_subcommand()) @@ -1679,8 +1628,11 @@ fn add_subcommand() -> Command { "Add dependencies to your configuration file. deno add jsr:@std/path -You can add multiple dependencies at once: - deno add jsr:@std/path jsr:@std/assert" +You can also add npm packages: + deno add npm:react + +Or multiple dependencies at once: + deno add jsr:@std/path jsr:@std/assert npm:chalk" ), UnstableArgsConfig::None, ) @@ -1908,10 +1860,10 @@ On the first invocation with deno will download the proper binary and cache it i Arg::new("include") .long("include") .help( - cstr!("Includes an additional module in the compiled executable's module graph. + cstr!("Includes an additional module or file/directory in the compiled executable. Use this flag if a dynamically imported module or a web worker main module - fails to load in the executable. This flag can be passed multiple times, - to include multiple additional modules.", + fails to load in the executable or to embed a file or directory in the executable. + This flag can be passed multiple times, to include multiple additional modules.", )) .action(ArgAction::Append) .value_hint(ValueHint::FilePath) @@ -1939,6 +1891,7 @@ On the first invocation with deno will download the proper binary and cache it i ]) .help_heading(COMPILE_HEADING), ) + .arg(no_code_cache_arg()) .arg( Arg::new("no-terminal") .long("no-terminal") @@ -2290,7 +2243,7 @@ Ignore formatting a file by adding an ignore comment at the top of the file: .value_parser([ "ts", "tsx", "js", "jsx", "md", "json", "jsonc", "css", "scss", "sass", "less", "html", "svelte", "vue", "astro", "yml", "yaml", - "ipynb", + "ipynb", "sql" ]) .help_heading(FMT_HEADING).requires("files"), ) @@ -2409,6 +2362,14 @@ Ignore formatting a file by adding an ignore comment at the top of the file: .help_heading(FMT_HEADING) .hide(true), ) + .arg( + Arg::new("unstable-sql") + .long("unstable-sql") + .help("Enable formatting SQL files.") + .value_parser(FalseyValueParser::new()) + .action(ArgAction::SetTrue) + .help_heading(FMT_HEADING), + ) }) } @@ -2416,7 +2377,19 @@ fn init_subcommand() -> Command { command("init", "scaffolds a basic Deno project with a script, test, and configuration file", UnstableArgsConfig::None).defer( |cmd| { cmd - .arg(Arg::new("dir").value_hint(ValueHint::DirPath)) + .arg(Arg::new("args") + .num_args(0..) + .action(ArgAction::Append) + .value_name("DIRECTORY OR PACKAGE") + .trailing_var_arg(true) + ) + .arg( + Arg::new("npm") + .long("npm") + .help("Generate a npm create-* project") + .conflicts_with_all(["lib", "serve"]) + .action(ArgAction::SetTrue), + ) .arg( Arg::new("lib") .long("lib") @@ -2604,6 +2577,82 @@ fn jupyter_subcommand() -> Command { .conflicts_with("install")) } +fn outdated_subcommand() -> Command { + command( + "outdated", + cstr!("Find and update outdated dependencies. +By default, outdated dependencies are only displayed. + +Display outdated dependencies: + deno outdated + deno outdated --compatible + +Update dependencies to latest semver compatible versions: + deno outdated --update +Update dependencies to latest versions, ignoring semver requirements: + deno outdated --update --latest + +Filters can be used to select which packages to act on. Filters can include wildcards (*) to match multiple packages. + deno outdated --update --latest \"@std/*\" + deno outdated --update --latest \"react*\" +Note that filters act on their aliases configured in deno.json / package.json, not the actual package names: + Given \"foobar\": \"npm:react@17.0.0\" in deno.json or package.json, the filter \"foobar\" would update npm:react to + the latest version. + deno outdated --update --latest foobar +Filters can be combined, and negative filters can be used to exclude results: + deno outdated --update --latest \"@std/*\" \"!@std/fmt*\" + +Specific version requirements to update to can be specified: + deno outdated --update @std/fmt@^1.0.2 +"), + UnstableArgsConfig::None, + ) + .defer(|cmd| { + cmd + .arg( + Arg::new("filters") + .num_args(0..) + .action(ArgAction::Append) + .help(concat!("Filters selecting which packages to act on. Can include wildcards (*) to match multiple packages. ", + "If a version requirement is specified, the matching packages will be updated to the given requirement."), + ) + ) + .arg(no_lock_arg()) + .arg(lock_arg()) + .arg( + Arg::new("latest") + .long("latest") + .action(ArgAction::SetTrue) + .help( + "Update to the latest version, regardless of semver constraints", + ) + .conflicts_with("compatible"), + ) + .arg( + Arg::new("update") + .long("update") + .short('u') + .action(ArgAction::SetTrue) + .conflicts_with("compatible") + .help("Update dependency versions"), + ) + .arg( + Arg::new("compatible") + .long("compatible") + .action(ArgAction::SetTrue) + .help("Only output versions that satisfy semver requirements") + .conflicts_with("update"), + ) + .arg( + Arg::new("recursive") + .long("recursive") + .short('r') + .action(ArgAction::SetTrue) + .help("include all workspace members"), + ) + }) +} + fn uninstall_subcommand() -> Command { command( "uninstall", @@ -2778,6 +2827,7 @@ To ignore linting on an entire file, you can add an ignore comment at the top of .arg(watch_arg(false)) .arg(watch_exclude_arg()) .arg(no_clear_screen_arg()) + .arg(allow_import_arg()) }) } @@ -2920,7 +2970,10 @@ fn task_subcommand() -> Command { deno task build List all available tasks: - deno task" + deno task + +Evaluate a task from string + deno task --eval \"echo $(pwd)\"" ), UnstableArgsConfig::ResolutionAndRuntime, ) @@ -2936,6 +2989,27 @@ List all available tasks: .help("Specify the directory to run the task in") .value_hint(ValueHint::DirPath), ) + .arg( + Arg::new("recursive") + .long("recursive") + .short('r') + .help("Run the task in all projects in the workspace") + .action(ArgAction::SetTrue), + ) + .arg( + Arg::new("filter") + .long("filter") + .short('f') + .help("Filter members of the workspace by name, implies --recursive flag") + .value_parser(value_parser!(String)), + ) + .arg( + Arg::new("eval") + .long("eval") + .help( + "Evaluate the passed value as if it was a task in a configuration file", + ).action(ArgAction::SetTrue) + ) .arg(node_modules_dir_arg()) }) } @@ -3215,12 +3289,12 @@ fn publish_subcommand() -> Command { command("publish", "Publish the current working directory's package or workspace to JSR", UnstableArgsConfig::ResolutionOnly) .defer(|cmd| { cmd - .arg( - Arg::new("token") - .long("token") - .help("The API token to use when publishing. If unset, interactive authentication is be used") - .help_heading(PUBLISH_HEADING) - ) + .arg( + Arg::new("token") + .long("token") + .help("The API token to use when publishing. If unset, interactive authentication is be used") + .help_heading(PUBLISH_HEADING) + ) .arg(config_arg()) .arg(no_config_arg()) .arg( @@ -3228,29 +3302,38 @@ fn publish_subcommand() -> Command { .long("dry-run") .help("Prepare the package for publishing performing all checks and validations without uploading") .action(ArgAction::SetTrue) - .help_heading(PUBLISH_HEADING), + .help_heading(PUBLISH_HEADING), ) .arg( Arg::new("allow-slow-types") .long("allow-slow-types") .help("Allow publishing with slow types") .action(ArgAction::SetTrue) - .help_heading(PUBLISH_HEADING), + .help_heading(PUBLISH_HEADING), ) .arg( Arg::new("allow-dirty") .long("allow-dirty") .help("Allow publishing if the repository has uncommitted changed") .action(ArgAction::SetTrue) - .help_heading(PUBLISH_HEADING), - ).arg( - Arg::new("no-provenance") - .long("no-provenance") - .help(cstr!("Disable provenance attestation. + .help_heading(PUBLISH_HEADING), + ) + .arg( + Arg::new("no-provenance") + .long("no-provenance") + .help(cstr!("Disable provenance attestation. Enabled by default on Github actions, publicly links the package to where it was built and published from.")) - .action(ArgAction::SetTrue) - .help_heading(PUBLISH_HEADING) - ) + .action(ArgAction::SetTrue) + .help_heading(PUBLISH_HEADING) + ) + .arg( + Arg::new("set-version") + .long("set-version") + .help("Set version for a package to be published. + This flag can be used while publishing individual packages and cannot be used in a workspace.") + .value_name("VERSION") + .help_heading(PUBLISH_HEADING) + ) .arg(check_arg(/* type checks by default */ true)) .arg(no_check_arg()) }) @@ -3315,6 +3398,8 @@ fn permission_args(app: Command, requires: Option<&'static str>) -> Command { --deny-run | --deny-run="whoami,ps" --deny-ffi[=<...] (Unstable) Deny loading dynamic libraries. Optionally specify denied directories or files. --deny-ffi | --deny-ffi="./libfoo.so" + DENO_TRACE_PERMISSIONS Environmental variable to enable stack traces in permission prompts. + DENO_TRACE_PERMISSIONS=1 deno run main.ts "#)) .arg( { @@ -4212,7 +4297,7 @@ impl CommandExt for Command { ).arg( Arg::new("unstable-detect-cjs") .long("unstable-detect-cjs") - .help("Reads the package.json type field in a project to treat .js files as .cjs") + .help("Treats ambiguous .js, .jsx, .ts, .tsx files as CommonJS modules in more cases") .value_parser(FalseyValueParser::new()) .action(ArgAction::SetTrue) .hide(true) @@ -4245,6 +4330,16 @@ impl CommandExt for Command { }) .help_heading(UNSTABLE_HEADING) .display_order(next_display_order()) + ).arg( + Arg::new("unstable-npm-lazy-caching") + .long("unstable-npm-lazy-caching") + .help("Enable unstable lazy caching of npm dependencies, downloading them only as needed (disabled: all npm packages in package.json are installed on startup; enabled: only npm packages that are actually referenced in an import are installed") + .env("DENO_UNSTABLE_NPM_LAZY_CACHING") + .value_parser(FalseyValueParser::new()) + .action(ArgAction::SetTrue) + .hide(true) + .help_heading(UNSTABLE_HEADING) + .display_order(next_display_order()), ); for granular_flag in crate::UNSTABLE_GRANULAR_FLAGS.iter() { @@ -4319,6 +4414,31 @@ fn remove_parse(flags: &mut Flags, matches: &mut ArgMatches) { }); } +fn outdated_parse( + flags: &mut Flags, + matches: &mut ArgMatches, +) -> clap::error::Result<()> { + let filters = match matches.remove_many::("filters") { + Some(f) => f.collect(), + None => vec![], + }; + let recursive = matches.get_flag("recursive"); + let update = matches.get_flag("update"); + let kind = if update { + let latest = matches.get_flag("latest"); + OutdatedKind::Update { latest } + } else { + let compatible = matches.get_flag("compatible"); + OutdatedKind::PrintOutdated { compatible } + }; + flags.subcommand = DenoSubcommand::Outdated(OutdatedFlags { + filters, + recursive, + kind, + }); + Ok(()) +} + fn bench_parse( flags: &mut Flags, matches: &mut ArgMatches, @@ -4431,6 +4551,8 @@ fn compile_parse( }; ext_arg_parse(flags, matches); + flags.code_cache_enabled = !matches.get_flag("no-code-cache"); + flags.subcommand = DenoSubcommand::Compile(CompileFlags { source_file, output, @@ -4631,6 +4753,7 @@ fn fmt_parse( let prose_wrap = matches.remove_one::("prose-wrap"); let no_semicolons = matches.remove_one::("no-semicolons"); let unstable_component = matches.get_flag("unstable-component"); + let unstable_sql = matches.get_flag("unstable-sql"); flags.subcommand = DenoSubcommand::Fmt(FmtFlags { check: matches.get_flag("check"), @@ -4643,16 +4766,49 @@ fn fmt_parse( no_semicolons, watch: watch_arg_parse(matches)?, unstable_component, + unstable_sql, }); Ok(()) } -fn init_parse(flags: &mut Flags, matches: &mut ArgMatches) { +fn init_parse( + flags: &mut Flags, + matches: &mut ArgMatches, +) -> Result<(), clap::Error> { + let mut lib = matches.get_flag("lib"); + let mut serve = matches.get_flag("serve"); + let mut dir = None; + let mut package = None; + let mut package_args = vec![]; + + if let Some(mut args) = matches.remove_many::("args") { + let name = args.next().unwrap(); + let mut args = args.collect::>(); + + if matches.get_flag("npm") { + package = Some(name); + package_args = args; + } else { + dir = Some(name); + + if !args.is_empty() { + args.insert(0, "init".to_string()); + let inner_matches = init_subcommand().try_get_matches_from_mut(args)?; + lib = inner_matches.get_flag("lib"); + serve = inner_matches.get_flag("serve"); + } + } + } + flags.subcommand = DenoSubcommand::Init(InitFlags { - dir: matches.remove_one::("dir"), - lib: matches.get_flag("lib"), - serve: matches.get_flag("serve"), + package, + package_args, + dir, + lib, + serve, }); + + Ok(()) } fn info_parse( @@ -4697,15 +4853,14 @@ fn install_parse( let module_url = cmd_values.next().unwrap(); let args = cmd_values.collect(); - flags.subcommand = DenoSubcommand::Install(InstallFlags { - kind: InstallKind::Global(InstallFlagsGlobal { + flags.subcommand = + DenoSubcommand::Install(InstallFlags::Global(InstallFlagsGlobal { name, module_url, args, root, force, - }), - }); + })); return Ok(()); } @@ -4714,22 +4869,19 @@ fn install_parse( allow_scripts_arg_parse(flags, matches)?; if matches.get_flag("entrypoint") { let entrypoints = matches.remove_many::("cmd").unwrap_or_default(); - flags.subcommand = DenoSubcommand::Install(InstallFlags { - kind: InstallKind::Local(InstallFlagsLocal::Entrypoints( - entrypoints.collect(), - )), - }); + flags.subcommand = DenoSubcommand::Install(InstallFlags::Local( + InstallFlagsLocal::Entrypoints(entrypoints.collect()), + )); } else if let Some(add_files) = matches .remove_many("cmd") .map(|packages| add_parse_inner(matches, Some(packages))) { - flags.subcommand = DenoSubcommand::Install(InstallFlags { - kind: InstallKind::Local(InstallFlagsLocal::Add(add_files)), - }) + flags.subcommand = DenoSubcommand::Install(InstallFlags::Local( + InstallFlagsLocal::Add(add_files), + )) } else { - flags.subcommand = DenoSubcommand::Install(InstallFlags { - kind: InstallKind::Local(InstallFlagsLocal::TopLevel), - }); + flags.subcommand = + DenoSubcommand::Install(InstallFlags::Local(InstallFlagsLocal::TopLevel)); } Ok(()) } @@ -4861,6 +5013,7 @@ fn lint_parse( unstable_args_parse(flags, matches, UnstableArgsConfig::ResolutionOnly); ext_arg_parse(flags, matches); config_args_parse(flags, matches); + allow_import_parse(flags, matches); let files = match matches.remove_many::("files") { Some(f) => f.collect(), @@ -5042,7 +5195,11 @@ fn serve_parse( Ok(()) } -fn task_parse(flags: &mut Flags, matches: &mut ArgMatches) { +fn task_parse( + flags: &mut Flags, + matches: &mut ArgMatches, + mut app: Command, +) -> clap::error::Result<()> { flags.config_flag = matches .remove_one::("config") .map(ConfigFlag::Path) @@ -5051,10 +5208,23 @@ fn task_parse(flags: &mut Flags, matches: &mut ArgMatches) { unstable_args_parse(flags, matches, UnstableArgsConfig::ResolutionAndRuntime); node_modules_arg_parse(flags, matches); + let mut recursive = matches.get_flag("recursive"); + let filter = if let Some(filter) = matches.remove_one::("filter") { + recursive = false; + Some(filter) + } else if recursive { + Some("*".to_string()) + } else { + None + }; + let mut task_flags = TaskFlags { cwd: matches.remove_one::("cwd"), task: None, is_run: false, + recursive, + filter, + eval: matches.get_flag("eval"), }; if let Some((task, mut matches)) = matches.remove_subcommand() { @@ -5067,9 +5237,15 @@ fn task_parse(flags: &mut Flags, matches: &mut ArgMatches) { .flatten() .filter_map(|arg| arg.into_string().ok()), ); + } else if task_flags.eval { + return Err(app.find_subcommand_mut("task").unwrap().error( + clap::error::ErrorKind::MissingRequiredArgument, + "[TASK] must be specified when using --eval", + )); } flags.subcommand = DenoSubcommand::Task(task_flags); + Ok(()) } fn parallel_arg_parse(matches: &mut ArgMatches) -> Option { @@ -5215,7 +5391,10 @@ fn vendor_parse(flags: &mut Flags, _matches: &mut ArgMatches) { flags.subcommand = DenoSubcommand::Vendor } -fn publish_parse(flags: &mut Flags, matches: &mut ArgMatches) { +fn publish_parse( + flags: &mut Flags, + matches: &mut ArgMatches, +) -> clap::error::Result<()> { flags.type_check_mode = TypeCheckMode::Local; // local by default unstable_args_parse(flags, matches, UnstableArgsConfig::ResolutionOnly); no_check_arg_parse(flags, matches); @@ -5228,7 +5407,10 @@ fn publish_parse(flags: &mut Flags, matches: &mut ArgMatches) { allow_slow_types: matches.get_flag("allow-slow-types"), allow_dirty: matches.get_flag("allow-dirty"), no_provenance: matches.get_flag("no-provenance"), + set_version: matches.remove_one::("set-version"), }); + + Ok(()) } fn compile_args_parse( @@ -5742,8 +5924,11 @@ fn unstable_args_parse( flags.unstable_config.bare_node_builtins = matches.get_flag("unstable-bare-node-builtins"); + flags.unstable_config.detect_cjs = matches.get_flag("unstable-detect-cjs"); flags.unstable_config.sloppy_imports = matches.get_flag("unstable-sloppy-imports"); + flags.unstable_config.npm_lazy_caching = + matches.get_flag("unstable-npm-lazy-caching"); if matches!(cfg, UnstableArgsConfig::ResolutionAndRuntime) { for granular_flag in crate::UNSTABLE_GRANULAR_FLAGS { @@ -5778,9 +5963,10 @@ pub fn resolve_urls(urls: Vec) -> Vec { #[cfg(test)] mod tests { - use super::*; use pretty_assertions::assert_eq; + use super::*; + /// Creates vector of strings, Vec macro_rules! svec { ($($x:expr),* $(,)?) => (vec![$($x.to_string().into()),*]); @@ -6562,6 +6748,7 @@ mod tests { prose_wrap: None, no_semicolons: None, unstable_component: false, + unstable_sql: false, watch: Default::default(), }), ..Flags::default() @@ -6585,6 +6772,7 @@ mod tests { prose_wrap: None, no_semicolons: None, unstable_component: false, + unstable_sql: false, watch: Default::default(), }), ..Flags::default() @@ -6608,6 +6796,7 @@ mod tests { prose_wrap: None, no_semicolons: None, unstable_component: false, + unstable_sql: false, watch: Default::default(), }), ..Flags::default() @@ -6631,6 +6820,7 @@ mod tests { prose_wrap: None, no_semicolons: None, unstable_component: false, + unstable_sql: false, watch: Some(Default::default()), }), ..Flags::default() @@ -6645,7 +6835,8 @@ mod tests { "--unstable-css", "--unstable-html", "--unstable-component", - "--unstable-yaml" + "--unstable-yaml", + "--unstable-sql" ]); assert_eq!( r.unwrap(), @@ -6663,6 +6854,7 @@ mod tests { prose_wrap: None, no_semicolons: None, unstable_component: true, + unstable_sql: true, watch: Some(WatchFlags { hmr: false, no_clear_screen: true, @@ -6697,6 +6889,7 @@ mod tests { prose_wrap: None, no_semicolons: None, unstable_component: false, + unstable_sql: false, watch: Some(Default::default()), }), ..Flags::default() @@ -6720,6 +6913,7 @@ mod tests { prose_wrap: None, no_semicolons: None, unstable_component: false, + unstable_sql: false, watch: Default::default(), }), config_flag: ConfigFlag::Path("deno.jsonc".to_string()), @@ -6751,6 +6945,7 @@ mod tests { prose_wrap: None, no_semicolons: None, unstable_component: false, + unstable_sql: false, watch: Some(Default::default()), }), config_flag: ConfigFlag::Path("deno.jsonc".to_string()), @@ -6787,6 +6982,7 @@ mod tests { prose_wrap: Some("never".to_string()), no_semicolons: Some(true), unstable_component: false, + unstable_sql: false, watch: Default::default(), }), ..Flags::default() @@ -6817,6 +7013,7 @@ mod tests { prose_wrap: None, no_semicolons: Some(false), unstable_component: false, + unstable_sql: false, watch: Default::default(), }), ..Flags::default() @@ -6842,6 +7039,7 @@ mod tests { prose_wrap: None, no_semicolons: None, unstable_component: false, + unstable_sql: false, watch: Default::default(), }), ext: Some("html".to_string()), @@ -6877,6 +7075,7 @@ mod tests { let r = flags_from_vec(svec![ "deno", "lint", + "--allow-import", "--watch", "script_1.ts", "script_2.ts" @@ -6898,6 +7097,10 @@ mod tests { compact: false, watch: Some(Default::default()), }), + permissions: PermissionFlags { + allow_import: Some(vec![]), + ..Default::default() + }, ..Flags::default() } ); @@ -8335,15 +8538,15 @@ mod tests { assert_eq!( r.unwrap(), Flags { - subcommand: DenoSubcommand::Install(InstallFlags { - kind: InstallKind::Global(InstallFlagsGlobal { + subcommand: DenoSubcommand::Install(InstallFlags::Global( + InstallFlagsGlobal { name: None, module_url: "jsr:@std/http/file-server".to_string(), args: vec![], root: None, force: false, - }), - }), + } + ),), ..Flags::default() } ); @@ -8357,15 +8560,15 @@ mod tests { assert_eq!( r.unwrap(), Flags { - subcommand: DenoSubcommand::Install(InstallFlags { - kind: InstallKind::Global(InstallFlagsGlobal { + subcommand: DenoSubcommand::Install(InstallFlags::Global( + InstallFlagsGlobal { name: None, module_url: "jsr:@std/http/file-server".to_string(), args: vec![], root: None, force: false, - }), - }), + } + ),), ..Flags::default() } ); @@ -8378,15 +8581,15 @@ mod tests { assert_eq!( r.unwrap(), Flags { - subcommand: DenoSubcommand::Install(InstallFlags { - kind: InstallKind::Global(InstallFlagsGlobal { + subcommand: DenoSubcommand::Install(InstallFlags::Global( + InstallFlagsGlobal { name: Some("file_server".to_string()), module_url: "jsr:@std/http/file-server".to_string(), args: svec!["foo", "bar"], root: Some("/foo".to_string()), force: true, - }), - }), + } + ),), import_map_path: Some("import_map.json".to_string()), no_remote: true, config_flag: ConfigFlag::Path("tsconfig.json".to_owned()), @@ -10040,6 +10243,7 @@ mod tests { include: vec![] }), type_check_mode: TypeCheckMode::Local, + code_cache_enabled: true, ..Flags::default() } ); @@ -10048,7 +10252,7 @@ mod tests { #[test] fn compile_with_flags() { #[rustfmt::skip] - let r = flags_from_vec(svec!["deno", "compile", "--import-map", "import_map.json", "--no-remote", "--config", "tsconfig.json", "--no-check", "--unsafely-ignore-certificate-errors", "--reload", "--lock", "lock.json", "--cert", "example.crt", "--cached-only", "--location", "https:foo", "--allow-read", "--allow-net", "--v8-flags=--help", "--seed", "1", "--no-terminal", "--icon", "favicon.ico", "--output", "colors", "--env=.example.env", "https://examples.deno.land/color-logging.ts", "foo", "bar", "-p", "8080"]); + let r = flags_from_vec(svec!["deno", "compile", "--import-map", "import_map.json", "--no-code-cache", "--no-remote", "--config", "tsconfig.json", "--no-check", "--unsafely-ignore-certificate-errors", "--reload", "--lock", "lock.json", "--cert", "example.crt", "--cached-only", "--location", "https:foo", "--allow-read", "--allow-net", "--v8-flags=--help", "--seed", "1", "--no-terminal", "--icon", "favicon.ico", "--output", "colors", "--env=.example.env", "https://examples.deno.land/color-logging.ts", "foo", "bar", "-p", "8080"]); assert_eq!( r.unwrap(), Flags { @@ -10064,6 +10268,7 @@ mod tests { }), import_map_path: Some("import_map.json".to_string()), no_remote: true, + code_cache_enabled: false, config_flag: ConfigFlag::Path("tsconfig.json".to_owned()), type_check_mode: TypeCheckMode::None, reload: true, @@ -10230,6 +10435,9 @@ mod tests { cwd: None, task: Some("build".to_string()), is_run: false, + recursive: false, + filter: None, + eval: false, }), argv: svec!["hello", "world"], ..Flags::default() @@ -10244,6 +10452,9 @@ mod tests { cwd: None, task: Some("build".to_string()), is_run: false, + recursive: false, + filter: None, + eval: false, }), ..Flags::default() } @@ -10257,10 +10468,80 @@ mod tests { cwd: Some("foo".to_string()), task: Some("build".to_string()), is_run: false, + recursive: false, + filter: None, + eval: false, + }), + ..Flags::default() + } + ); + + let r = flags_from_vec(svec!["deno", "task", "--filter", "*", "build"]); + assert_eq!( + r.unwrap(), + Flags { + subcommand: DenoSubcommand::Task(TaskFlags { + cwd: None, + task: Some("build".to_string()), + is_run: false, + recursive: false, + filter: Some("*".to_string()), + eval: false, + }), + ..Flags::default() + } + ); + + let r = flags_from_vec(svec!["deno", "task", "--recursive", "build"]); + assert_eq!( + r.unwrap(), + Flags { + subcommand: DenoSubcommand::Task(TaskFlags { + cwd: None, + task: Some("build".to_string()), + is_run: false, + recursive: true, + filter: Some("*".to_string()), + eval: false, }), ..Flags::default() } ); + + let r = flags_from_vec(svec!["deno", "task", "-r", "build"]); + assert_eq!( + r.unwrap(), + Flags { + subcommand: DenoSubcommand::Task(TaskFlags { + cwd: None, + task: Some("build".to_string()), + is_run: false, + recursive: true, + filter: Some("*".to_string()), + eval: false, + }), + ..Flags::default() + } + ); + + let r = flags_from_vec(svec!["deno", "task", "--eval", "echo 1"]); + assert_eq!( + r.unwrap(), + Flags { + subcommand: DenoSubcommand::Task(TaskFlags { + cwd: None, + task: Some("echo 1".to_string()), + is_run: false, + recursive: false, + filter: None, + eval: true, + }), + ..Flags::default() + } + ); + + let r = flags_from_vec(svec!["deno", "task", "--eval"]); + assert!(r.is_err()); } #[test] @@ -10282,6 +10563,9 @@ mod tests { cwd: None, task: Some("build".to_string()), is_run: false, + recursive: false, + filter: None, + eval: false, }), argv: svec!["--", "hello", "world"], config_flag: ConfigFlag::Path("deno.json".to_owned()), @@ -10299,6 +10583,9 @@ mod tests { cwd: Some("foo".to_string()), task: Some("build".to_string()), is_run: false, + recursive: false, + filter: None, + eval: false, }), argv: svec!["--", "hello", "world"], ..Flags::default() @@ -10317,6 +10604,9 @@ mod tests { cwd: None, task: Some("build".to_string()), is_run: false, + recursive: false, + filter: None, + eval: false, }), argv: svec!["--"], ..Flags::default() @@ -10334,6 +10624,9 @@ mod tests { cwd: None, task: Some("build".to_string()), is_run: false, + recursive: false, + filter: None, + eval: false, }), argv: svec!["-1", "--test"], ..Flags::default() @@ -10351,6 +10644,9 @@ mod tests { cwd: None, task: Some("build".to_string()), is_run: false, + recursive: false, + filter: None, + eval: false, }), argv: svec!["--test"], ..Flags::default() @@ -10369,6 +10665,9 @@ mod tests { cwd: None, task: Some("build".to_string()), is_run: false, + recursive: false, + filter: None, + eval: false, }), log_level: Some(log::Level::Error), ..Flags::default() @@ -10386,6 +10685,9 @@ mod tests { cwd: None, task: None, is_run: false, + recursive: false, + filter: None, + eval: false, }), ..Flags::default() } @@ -10402,6 +10704,9 @@ mod tests { cwd: None, task: None, is_run: false, + recursive: false, + filter: None, + eval: false, }), config_flag: ConfigFlag::Path("deno.jsonc".to_string()), ..Flags::default() @@ -10419,6 +10724,9 @@ mod tests { cwd: None, task: None, is_run: false, + recursive: false, + filter: None, + eval: false, }), config_flag: ConfigFlag::Path("deno.jsonc".to_string()), ..Flags::default() @@ -10595,6 +10903,8 @@ mod tests { r.unwrap(), Flags { subcommand: DenoSubcommand::Init(InitFlags { + package: None, + package_args: vec![], dir: None, lib: false, serve: false, @@ -10608,6 +10918,8 @@ mod tests { r.unwrap(), Flags { subcommand: DenoSubcommand::Init(InitFlags { + package: None, + package_args: vec![], dir: Some(String::from("foo")), lib: false, serve: false, @@ -10621,6 +10933,8 @@ mod tests { r.unwrap(), Flags { subcommand: DenoSubcommand::Init(InitFlags { + package: None, + package_args: vec![], dir: None, lib: false, serve: false, @@ -10635,6 +10949,8 @@ mod tests { r.unwrap(), Flags { subcommand: DenoSubcommand::Init(InitFlags { + package: None, + package_args: vec![], dir: None, lib: true, serve: false, @@ -10648,6 +10964,8 @@ mod tests { r.unwrap(), Flags { subcommand: DenoSubcommand::Init(InitFlags { + package: None, + package_args: vec![], dir: None, lib: false, serve: true, @@ -10661,6 +10979,8 @@ mod tests { r.unwrap(), Flags { subcommand: DenoSubcommand::Init(InitFlags { + package: None, + package_args: vec![], dir: Some(String::from("foo")), lib: true, serve: false, @@ -10668,6 +10988,57 @@ mod tests { ..Flags::default() } ); + + let r = flags_from_vec(svec!["deno", "init", "--lib", "--npm", "vite"]); + assert!(r.is_err()); + + let r = flags_from_vec(svec!["deno", "init", "--serve", "--npm", "vite"]); + assert!(r.is_err()); + + let r = flags_from_vec(svec!["deno", "init", "--npm", "vite", "--lib"]); + assert_eq!( + r.unwrap(), + Flags { + subcommand: DenoSubcommand::Init(InitFlags { + package: Some("vite".to_string()), + package_args: svec!["--lib"], + dir: None, + lib: false, + serve: false, + }), + ..Flags::default() + } + ); + + let r = flags_from_vec(svec!["deno", "init", "--npm", "vite", "--serve"]); + assert_eq!( + r.unwrap(), + Flags { + subcommand: DenoSubcommand::Init(InitFlags { + package: Some("vite".to_string()), + package_args: svec!["--serve"], + dir: None, + lib: false, + serve: false, + }), + ..Flags::default() + } + ); + + let r = flags_from_vec(svec!["deno", "init", "--npm", "vite", "new_dir"]); + assert_eq!( + r.unwrap(), + Flags { + subcommand: DenoSubcommand::Init(InitFlags { + package: Some("vite".to_string()), + package_args: svec!["new_dir"], + dir: None, + lib: false, + serve: false, + }), + ..Flags::default() + } + ); } #[test] @@ -10741,6 +11112,7 @@ mod tests { "--allow-slow-types", "--allow-dirty", "--token=asdf", + "--set-version=1.0.1", ]); assert_eq!( r.unwrap(), @@ -10751,6 +11123,7 @@ mod tests { allow_slow_types: true, allow_dirty: true, no_provenance: true, + set_version: Some("1.0.1".to_string()), }), type_check_mode: TypeCheckMode::Local, ..Flags::default() @@ -10770,9 +11143,9 @@ mod tests { ..Flags::default() }, "install" => Flags { - subcommand: DenoSubcommand::Install(InstallFlags { - kind: InstallKind::Local(InstallFlagsLocal::Add(flags)), - }), + subcommand: DenoSubcommand::Install(InstallFlags::Local( + InstallFlagsLocal::Add(flags), + )), ..Flags::default() }, _ => unreachable!(), @@ -11081,8 +11454,6 @@ mod tests { ..Default::default() } ); - // just make sure this doesn't panic - let _ = flags.permissions.to_options(&[]); } #[test] @@ -11158,29 +11529,6 @@ Usage: deno repl [OPTIONS] [-- [ARGS]...]\n" ) } - #[test] - fn test_allow_import_host_from_url() { - fn parse(text: &str) -> Option { - allow_import_host_from_url(&Url::parse(text).unwrap()) - } - - assert_eq!(parse("https://jsr.io"), None); - assert_eq!( - parse("http://127.0.0.1:4250"), - Some("127.0.0.1:4250".to_string()) - ); - assert_eq!(parse("http://jsr.io"), Some("jsr.io:80".to_string())); - assert_eq!( - parse("https://example.com"), - Some("example.com:443".to_string()) - ); - assert_eq!( - parse("http://example.com"), - Some("example.com:80".to_string()) - ); - assert_eq!(parse("file:///example.com"), None); - } - #[test] fn allow_all_conflicts_allow_perms() { let flags = [ @@ -11199,4 +11547,85 @@ Usage: deno repl [OPTIONS] [-- [ARGS]...]\n" assert!(r.is_err()); } } + + #[test] + fn outdated_subcommand() { + let cases = [ + ( + svec![], + OutdatedFlags { + filters: vec![], + kind: OutdatedKind::PrintOutdated { compatible: false }, + recursive: false, + }, + ), + ( + svec!["--recursive"], + OutdatedFlags { + filters: vec![], + kind: OutdatedKind::PrintOutdated { compatible: false }, + recursive: true, + }, + ), + ( + svec!["--recursive", "--compatible"], + OutdatedFlags { + filters: vec![], + kind: OutdatedKind::PrintOutdated { compatible: true }, + recursive: true, + }, + ), + ( + svec!["--update"], + OutdatedFlags { + filters: vec![], + kind: OutdatedKind::Update { latest: false }, + recursive: false, + }, + ), + ( + svec!["--update", "--latest"], + OutdatedFlags { + filters: vec![], + kind: OutdatedKind::Update { latest: true }, + recursive: false, + }, + ), + ( + svec!["--update", "--recursive"], + OutdatedFlags { + filters: vec![], + kind: OutdatedKind::Update { latest: false }, + recursive: true, + }, + ), + ( + svec!["--update", "@foo/bar"], + OutdatedFlags { + filters: svec!["@foo/bar"], + kind: OutdatedKind::Update { latest: false }, + recursive: false, + }, + ), + ( + svec!["--latest"], + OutdatedFlags { + filters: svec![], + kind: OutdatedKind::PrintOutdated { compatible: false }, + recursive: false, + }, + ), + ]; + for (input, expected) in cases { + let mut args = svec!["deno", "outdated"]; + args.extend(input); + let r = flags_from_vec(args.clone()).unwrap(); + assert_eq!( + r.subcommand, + DenoSubcommand::Outdated(expected), + "incorrect result for args: {:?}", + args + ); + } + } } diff --git a/cli/args/flags_net.rs b/cli/args/flags_net.rs index abfcf2838279ca..c39e377e103872 100644 --- a/cli/args/flags_net.rs +++ b/cli/args/flags_net.rs @@ -1,10 +1,11 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use deno_core::url::Url; -use deno_runtime::deno_permissions::NetDescriptor; use std::net::IpAddr; use std::str::FromStr; +use deno_core::url::Url; +use deno_runtime::deno_permissions::NetDescriptor; + #[derive(Debug, PartialEq, Eq)] pub struct ParsePortError(String); diff --git a/cli/args/import_map.rs b/cli/args/import_map.rs index ff2f1587159ca5..ff7e42ef20d061 100644 --- a/cli/args/import_map.rs +++ b/cli/args/import_map.rs @@ -1,24 +1,24 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_core::error::AnyError; use deno_core::serde_json; use deno_core::url::Url; -use crate::file_fetcher::FileFetcher; +use crate::file_fetcher::CliFileFetcher; +use crate::file_fetcher::TextDecodedFile; pub async fn resolve_import_map_value_from_specifier( specifier: &Url, - file_fetcher: &FileFetcher, + file_fetcher: &CliFileFetcher, ) -> Result { if specifier.scheme() == "data" { let data_url_text = deno_graph::source::RawDataUrl::parse(specifier)?.decode()?; Ok(serde_json::from_str(&data_url_text)?) } else { - let file = file_fetcher - .fetch_bypass_permissions(specifier) - .await? - .into_text_decoded()?; + let file = TextDecodedFile::decode( + file_fetcher.fetch_bypass_permissions(specifier).await?, + )?; Ok(serde_json::from_str(&file.source)?) } } diff --git a/cli/args/lockfile.rs b/cli/args/lockfile.rs index 1805d264263baf..bc4c92638a9ed2 100644 --- a/cli/args/lockfile.rs +++ b/cli/args/lockfile.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::collections::HashSet; use std::path::PathBuf; @@ -9,20 +9,20 @@ use deno_core::anyhow::Context; use deno_core::error::AnyError; use deno_core::parking_lot::Mutex; use deno_core::parking_lot::MutexGuard; +use deno_core::serde_json; +use deno_lockfile::Lockfile; use deno_lockfile::WorkspaceMemberConfig; use deno_package_json::PackageJsonDepValue; +use deno_path_util::fs::atomic_write_file_with_retries; use deno_runtime::deno_node::PackageJson; use deno_semver::jsr::JsrDepPackageReq; -use crate::cache; -use crate::util::fs::atomic_write_file_with_retries; -use crate::Flags; - +use crate::args::deno_json::import_map_deps; use crate::args::DenoSubcommand; use crate::args::InstallFlags; -use crate::args::InstallKind; - -use deno_lockfile::Lockfile; +use crate::cache; +use crate::sys::CliSys; +use crate::Flags; #[derive(Debug)] pub struct CliLockfileReadFromPathOptions { @@ -34,6 +34,7 @@ pub struct CliLockfileReadFromPathOptions { #[derive(Debug)] pub struct CliLockfile { + sys: CliSys, lockfile: Mutex, pub filename: PathBuf, frozen: bool, @@ -90,8 +91,9 @@ impl CliLockfile { // do an atomic write to reduce the chance of multiple deno // processes corrupting the file atomic_write_file_with_retries( + &self.sys, &lockfile.filename, - bytes, + &bytes, cache::CACHE_PERM, ) .context("Failed writing lockfile.")?; @@ -100,8 +102,10 @@ impl CliLockfile { } pub fn discover( + sys: &CliSys, flags: &Flags, workspace: &Workspace, + maybe_external_import_map: Option<&serde_json::Value>, ) -> Result, AnyError> { fn pkg_json_deps( maybe_pkg_json: Option<&PackageJson>, @@ -109,9 +113,12 @@ impl CliLockfile { let Some(pkg_json) = maybe_pkg_json else { return Default::default(); }; - pkg_json - .resolve_local_package_json_deps() + let deps = pkg_json.resolve_local_package_json_deps(); + + deps + .dependencies .values() + .chain(deps.dev_dependencies.values()) .filter_map(|dep| dep.as_ref().ok()) .filter_map(|dep| match dep { PackageJsonDepValue::Req(req) => { @@ -126,21 +133,15 @@ impl CliLockfile { maybe_deno_json: Option<&ConfigFile>, ) -> HashSet { maybe_deno_json - .map(|c| { - crate::args::deno_json::deno_json_deps(c) - .into_iter() - .collect() - }) + .map(crate::args::deno_json::deno_json_deps) .unwrap_or_default() } if flags.no_lock || matches!( flags.subcommand, - DenoSubcommand::Install(InstallFlags { - kind: InstallKind::Global(..), - .. - }) | DenoSubcommand::Uninstall(_) + DenoSubcommand::Install(InstallFlags::Global(..)) + | DenoSubcommand::Uninstall(_) ) { return Ok(None); @@ -164,18 +165,25 @@ impl CliLockfile { .unwrap_or(false) }); - let lockfile = Self::read_from_path(CliLockfileReadFromPathOptions { - file_path, - frozen, - skip_write: flags.internal.lockfile_skip_write, - })?; + let lockfile = Self::read_from_path( + sys, + CliLockfileReadFromPathOptions { + file_path, + frozen, + skip_write: flags.internal.lockfile_skip_write, + }, + )?; // initialize the lockfile with the workspace's configuration let root_url = workspace.root_dir(); let config = deno_lockfile::WorkspaceConfig { root: WorkspaceMemberConfig { package_json_deps: pkg_json_deps(root_folder.pkg_json.as_deref()), - dependencies: deno_json_deps(root_folder.deno_json.as_deref()), + dependencies: if let Some(map) = maybe_external_import_map { + import_map_deps(map) + } else { + deno_json_deps(root_folder.deno_json.as_deref()) + }, }, members: workspace .config_folders() @@ -220,6 +228,7 @@ impl CliLockfile { } pub fn read_from_path( + sys: &CliSys, opts: CliLockfileReadFromPathOptions, ) -> Result { let lockfile = match std::fs::read_to_string(&opts.file_path) { @@ -238,6 +247,7 @@ impl CliLockfile { } }; Ok(CliLockfile { + sys: sys.clone(), filename: lockfile.filename.clone(), lockfile: Mutex::new(lockfile), frozen: opts.frozen, diff --git a/cli/args/mod.rs b/cli/args/mod.rs index ec75d7a100b157..35f79a9c3ee94d 100644 --- a/cli/args/mod.rs +++ b/cli/args/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. pub mod deno_json; mod flags; @@ -7,9 +7,37 @@ mod import_map; mod lockfile; mod package_json; +use std::borrow::Cow; +use std::collections::HashMap; +use std::env; +use std::io::BufReader; +use std::io::Cursor; +use std::io::Read; +use std::io::Seek; +use std::net::SocketAddr; +use std::num::NonZeroUsize; +use std::path::Path; +use std::path::PathBuf; +use std::sync::Arc; + use deno_ast::MediaType; +use deno_ast::ModuleSpecifier; use deno_ast::SourceMapOption; +use deno_cache_dir::file_fetcher::CacheSetting; +pub use deno_config::deno_json::BenchConfig; +pub use deno_config::deno_json::ConfigFile; +use deno_config::deno_json::FmtConfig; +pub use deno_config::deno_json::FmtOptionsConfig; +use deno_config::deno_json::LintConfig; +pub use deno_config::deno_json::LintRulesConfig; use deno_config::deno_json::NodeModulesDirMode; +pub use deno_config::deno_json::ProseWrap; +use deno_config::deno_json::TestConfig; +pub use deno_config::deno_json::TsConfig; +pub use deno_config::deno_json::TsConfigForEmit; +pub use deno_config::deno_json::TsConfigType; +pub use deno_config::deno_json::TsTypeLib; +pub use deno_config::glob::FilePatterns; use deno_config::workspace::CreateResolverOptions; use deno_config::workspace::FolderConfigs; use deno_config::workspace::PackageJsonDepResolution; @@ -21,40 +49,20 @@ use deno_config::workspace::WorkspaceDiscoverOptions; use deno_config::workspace::WorkspaceDiscoverStart; use deno_config::workspace::WorkspaceLintConfig; use deno_config::workspace::WorkspaceResolver; +use deno_core::anyhow::bail; +use deno_core::anyhow::Context; +use deno_core::error::AnyError; use deno_core::resolve_url_or_path; +use deno_core::serde_json; +use deno_core::url::Url; use deno_graph::GraphKind; +pub use deno_json::check_warn_tsconfig; +use deno_lint::linter::LintConfig as DenoLintConfig; use deno_npm::npm_rc::NpmRc; use deno_npm::npm_rc::ResolvedNpmRc; use deno_npm::resolution::ValidSerializedNpmResolutionSnapshot; use deno_npm::NpmSystemInfo; use deno_path_util::normalize_path; -use deno_runtime::ops::otel::OtelConfig; -use deno_semver::npm::NpmPackageReqReference; -use import_map::resolve_import_map_value_from_specifier; - -pub use deno_config::deno_json::BenchConfig; -pub use deno_config::deno_json::ConfigFile; -pub use deno_config::deno_json::FmtOptionsConfig; -pub use deno_config::deno_json::LintRulesConfig; -pub use deno_config::deno_json::ProseWrap; -pub use deno_config::deno_json::TsConfig; -pub use deno_config::deno_json::TsConfigForEmit; -pub use deno_config::deno_json::TsConfigType; -pub use deno_config::deno_json::TsTypeLib; -pub use deno_config::glob::FilePatterns; -pub use deno_json::check_warn_tsconfig; -pub use flags::*; -pub use lockfile::CliLockfile; -pub use lockfile::CliLockfileReadFromPathOptions; -pub use package_json::NpmInstallDepsProvider; -pub use package_json::PackageJsonDepValueParseWithLocationError; - -use deno_ast::ModuleSpecifier; -use deno_core::anyhow::bail; -use deno_core::anyhow::Context; -use deno_core::error::AnyError; -use deno_core::serde_json; -use deno_core::url::Url; use deno_runtime::deno_permissions::PermissionsOptions; use deno_runtime::deno_tls::deno_native_certs::load_native_certs; use deno_runtime::deno_tls::rustls; @@ -62,35 +70,30 @@ use deno_runtime::deno_tls::rustls::RootCertStore; use deno_runtime::deno_tls::rustls_pemfile; use deno_runtime::deno_tls::webpki_roots; use deno_runtime::inspector_server::InspectorServer; +use deno_semver::npm::NpmPackageReqReference; +use deno_semver::StackString; +use deno_telemetry::OtelConfig; +use deno_telemetry::OtelRuntimeConfig; use deno_terminal::colors; use dotenvy::from_filename; +pub use flags::*; +use import_map::resolve_import_map_value_from_specifier; +pub use lockfile::CliLockfile; +pub use lockfile::CliLockfileReadFromPathOptions; use once_cell::sync::Lazy; +pub use package_json::NpmInstallDepsProvider; +pub use package_json::PackageJsonDepValueParseWithLocationError; use serde::Deserialize; use serde::Serialize; -use std::borrow::Cow; -use std::collections::HashMap; -use std::env; -use std::io::BufReader; -use std::io::Cursor; -use std::io::Read; -use std::io::Seek; -use std::net::SocketAddr; -use std::num::NonZeroUsize; -use std::path::Path; -use std::path::PathBuf; -use std::sync::Arc; +use sys_traits::EnvHomeDir; use thiserror::Error; -use crate::cache; use crate::cache::DenoDirProvider; -use crate::file_fetcher::FileFetcher; +use crate::file_fetcher::CliFileFetcher; +use crate::sys::CliSys; use crate::util::fs::canonicalize_path_maybe_not_exists; use crate::version; -use deno_config::deno_json::FmtConfig; -use deno_config::deno_json::LintConfig; -use deno_config::deno_json::TestConfig; - pub fn npm_registry_url() -> &'static Url { static NPM_REGISTRY_DEFAULT_URL: Lazy = Lazy::new(|| { let env_var_name = "NPM_CONFIG_REGISTRY"; @@ -215,47 +218,6 @@ pub fn ts_config_to_transpile_and_emit_options( )) } -/// Indicates how cached source files should be handled. -#[derive(Debug, Clone, Eq, PartialEq)] -pub enum CacheSetting { - /// Only the cached files should be used. Any files not in the cache will - /// error. This is the equivalent of `--cached-only` in the CLI. - Only, - /// No cached source files should be used, and all files should be reloaded. - /// This is the equivalent of `--reload` in the CLI. - ReloadAll, - /// Only some cached resources should be used. This is the equivalent of - /// `--reload=jsr:@std/http/file-server` or - /// `--reload=jsr:@std/http/file-server,jsr:@std/assert/assert-equals`. - ReloadSome(Vec), - /// The usability of a cached value is determined by analyzing the cached - /// headers and other metadata associated with a cached response, reloading - /// any cached "non-fresh" cached responses. - RespectHeaders, - /// The cached source files should be used for local modules. This is the - /// default behavior of the CLI. - Use, -} - -impl CacheSetting { - pub fn should_use_for_npm_package(&self, package_name: &str) -> bool { - match self { - CacheSetting::ReloadAll => false, - CacheSetting::ReloadSome(list) => { - if list.iter().any(|i| i == "npm:") { - return false; - } - let specifier = format!("npm:{package_name}"); - if list.contains(&specifier) { - return false; - } - true - } - _ => true, - } - } -} - pub struct WorkspaceBenchOptions { pub filter: Option, pub json: bool, @@ -289,6 +251,7 @@ impl BenchOptions { #[derive(Clone, Debug, Default, PartialEq, Eq, Hash)] pub struct UnstableFmtOptions { pub component: bool, + pub sql: bool, } #[derive(Clone, Debug)] @@ -322,6 +285,7 @@ impl FmtOptions { options: resolve_fmt_options(fmt_flags, fmt_config.options), unstable: UnstableFmtOptions { component: unstable.component || fmt_flags.unstable_component, + sql: unstable.sql || fmt_flags.unstable_sql, }, files: fmt_config.files, } @@ -607,7 +571,7 @@ fn discover_npmrc( // TODO(bartlomieju): update to read both files - one in the project root and one and // home dir and then merge them. // 3. Try `.npmrc` in the user's home directory - if let Some(home_dir) = cache::home_dir() { + if let Some(home_dir) = crate::sys::CliSys::default().env_home_dir() { match try_to_read_npmrc(&home_dir) { Ok(Some((source, path))) => { return try_to_parse_npmrc(source, &path).map(|r| (r, Some(path))); @@ -799,19 +763,23 @@ pub struct CliOptions { maybe_node_modules_folder: Option, npmrc: Arc, maybe_lockfile: Option>, + maybe_external_import_map: Option<(PathBuf, serde_json::Value)>, overrides: CliOptionOverrides, pub start_dir: Arc, pub deno_dir_provider: Arc, } impl CliOptions { + #[allow(clippy::too_many_arguments)] pub fn new( + sys: &CliSys, flags: Arc, initial_cwd: PathBuf, maybe_lockfile: Option>, npmrc: Arc, start_dir: Arc, force_global_cache: bool, + maybe_external_import_map: Option<(PathBuf, serde_json::Value)>, ) -> Result { if let Some(insecure_allowlist) = flags.unsafely_ignore_certificate_errors.as_ref() @@ -829,8 +797,10 @@ impl CliOptions { } let maybe_lockfile = maybe_lockfile.filter(|_| !force_global_cache); - let deno_dir_provider = - Arc::new(DenoDirProvider::new(flags.internal.cache_path.clone())); + let deno_dir_provider = Arc::new(DenoDirProvider::new( + sys.clone(), + flags.internal.cache_path.clone(), + )); let maybe_node_modules_folder = resolve_node_modules_folder( &initial_cwd, &flags, @@ -849,12 +819,13 @@ impl CliOptions { maybe_node_modules_folder, overrides: Default::default(), main_module_cell: std::sync::OnceLock::new(), + maybe_external_import_map, start_dir, deno_dir_provider, }) } - pub fn from_flags(flags: Arc) -> Result { + pub fn from_flags(sys: &CliSys, flags: Arc) -> Result { let initial_cwd = std::env::current_dir().with_context(|| "Failed getting cwd.")?; let maybe_vendor_override = flags.vendor.map(|v| match v { @@ -877,7 +848,6 @@ impl CliOptions { log::debug!("package.json auto-discovery is disabled"); } WorkspaceDiscoverOptions { - fs: Default::default(), // use real fs deno_json_cache: None, pkg_json_cache: Some(&node_resolver::PackageJsonThreadLocalCache), workspace_cache: None, @@ -899,6 +869,7 @@ impl CliOptions { ConfigFlag::Discover => { if let Some(start_paths) = flags.config_path_args(&initial_cwd) { WorkspaceDirectory::discover( + sys, WorkspaceDiscoverStart::Paths(&start_paths), &resolve_workspace_discover_options(), )? @@ -909,6 +880,7 @@ impl CliOptions { ConfigFlag::Path(path) => { let config_path = normalize_path(initial_cwd.join(path)); WorkspaceDirectory::discover( + sys, WorkspaceDiscoverStart::ConfigFile(&config_path), &resolve_workspace_discover_options(), )? @@ -924,17 +896,46 @@ impl CliOptions { let (npmrc, _) = discover_npmrc_from_workspace(&start_dir.workspace)?; - let maybe_lock_file = CliLockfile::discover(&flags, &start_dir.workspace)?; + fn load_external_import_map( + deno_json: &ConfigFile, + ) -> Result, AnyError> { + if !deno_json.is_an_import_map() { + if let Some(path) = deno_json.to_import_map_path()? { + let contents = std::fs::read_to_string(&path).with_context(|| { + format!("Unable to read import map at '{}'", path.display()) + })?; + let map = serde_json::from_str(&contents)?; + return Ok(Some((path, map))); + } + } + Ok(None) + } + + let external_import_map = + if let Some(deno_json) = start_dir.workspace.root_deno_json() { + load_external_import_map(deno_json)? + } else { + None + }; + + let maybe_lock_file = CliLockfile::discover( + sys, + &flags, + &start_dir.workspace, + external_import_map.as_ref().map(|(_, v)| v), + )?; log::debug!("Finished config loading."); Self::new( + sys, flags, initial_cwd, maybe_lock_file.map(Arc::new), npmrc, Arc::new(start_dir), false, + external_import_map, ) } @@ -962,9 +963,7 @@ impl CliOptions { match self.sub_command() { DenoSubcommand::Cache(_) => GraphKind::All, DenoSubcommand::Check(_) => GraphKind::TypesOnly, - DenoSubcommand::Install(InstallFlags { - kind: InstallKind::Local(_), - }) => GraphKind::All, + DenoSubcommand::Install(InstallFlags::Local(_)) => GraphKind::All, _ => self.type_check_mode().as_graph_kind(), } } @@ -1000,24 +999,24 @@ impl CliOptions { // https://nodejs.org/api/process.html match target.as_str() { "aarch64-apple-darwin" => NpmSystemInfo { - os: "darwin".to_string(), - cpu: "arm64".to_string(), + os: "darwin".into(), + cpu: "arm64".into(), }, "aarch64-unknown-linux-gnu" => NpmSystemInfo { - os: "linux".to_string(), - cpu: "arm64".to_string(), + os: "linux".into(), + cpu: "arm64".into(), }, "x86_64-apple-darwin" => NpmSystemInfo { - os: "darwin".to_string(), - cpu: "x64".to_string(), + os: "darwin".into(), + cpu: "x64".into(), }, "x86_64-unknown-linux-gnu" => NpmSystemInfo { - os: "linux".to_string(), - cpu: "x64".to_string(), + os: "linux".into(), + cpu: "x64".into(), }, "x86_64-pc-windows-msvc" => NpmSystemInfo { - os: "win32".to_string(), - cpu: "x64".to_string(), + os: "win32".into(), + cpu: "x64".into(), }, value => { log::warn!( @@ -1054,10 +1053,10 @@ impl CliOptions { pub async fn create_workspace_resolver( &self, - file_fetcher: &FileFetcher, + file_fetcher: &CliFileFetcher, pkg_json_dep_resolution: PackageJsonDepResolution, ) -> Result { - let overrode_no_import_map = self + let overrode_no_import_map: bool = self .overrides .import_map_specifier .as_ref() @@ -1085,7 +1084,19 @@ impl CliOptions { value, }) } - None => None, + None => { + if let Some((path, import_map)) = + self.maybe_external_import_map.as_ref() + { + let path_url = deno_path_util::url_from_file_path(path)?; + Some(deno_config::workspace::SpecifiedImportMap { + base_url: path_url, + value: import_map.clone(), + }) + } else { + None + } + } } }; Ok(self.workspace().create_resolver( @@ -1124,7 +1135,7 @@ impl CliOptions { } } - pub fn otel_config(&self) -> Option { + pub fn otel_config(&self) -> OtelConfig { self.flags.otel_config() } @@ -1319,6 +1330,7 @@ impl CliOptions { let workspace = self.workspace(); UnstableFmtOptions { component: workspace.has_unstable("fmt-component"), + sql: workspace.has_unstable("fmt-sql"), } } @@ -1347,9 +1359,7 @@ impl CliOptions { Ok(result) } - pub fn resolve_deno_lint_config( - &self, - ) -> Result { + pub fn resolve_deno_lint_config(&self) -> Result { let ts_config_result = self.resolve_ts_config_for_emit(TsConfigType::Emit)?; @@ -1358,11 +1368,11 @@ impl CliOptions { ts_config_result.ts_config, )?; - Ok(deno_lint::linter::LintConfig { + Ok(DenoLintConfig { default_jsx_factory: (!transpile_options.jsx_automatic) - .then(|| transpile_options.jsx_factory.clone()), + .then_some(transpile_options.jsx_factory), default_jsx_fragment_factory: (!transpile_options.jsx_automatic) - .then(|| transpile_options.jsx_fragment_factory.clone()), + .then_some(transpile_options.jsx_fragment_factory), }) } @@ -1516,20 +1526,100 @@ impl CliOptions { self.flags.no_npm } - pub fn permission_flags(&self) -> &PermissionFlags { - &self.flags.permissions + pub fn permissions_options(&self) -> PermissionsOptions { + // bury this in here to ensure people use cli_options.permissions_options() + fn flags_to_options(flags: &PermissionFlags) -> PermissionsOptions { + fn handle_allow( + allow_all: bool, + value: Option, + ) -> Option { + if allow_all { + assert!(value.is_none()); + Some(T::default()) + } else { + value + } + } + + PermissionsOptions { + allow_all: flags.allow_all, + allow_env: handle_allow(flags.allow_all, flags.allow_env.clone()), + deny_env: flags.deny_env.clone(), + allow_net: handle_allow(flags.allow_all, flags.allow_net.clone()), + deny_net: flags.deny_net.clone(), + allow_ffi: handle_allow(flags.allow_all, flags.allow_ffi.clone()), + deny_ffi: flags.deny_ffi.clone(), + allow_read: handle_allow(flags.allow_all, flags.allow_read.clone()), + deny_read: flags.deny_read.clone(), + allow_run: handle_allow(flags.allow_all, flags.allow_run.clone()), + deny_run: flags.deny_run.clone(), + allow_sys: handle_allow(flags.allow_all, flags.allow_sys.clone()), + deny_sys: flags.deny_sys.clone(), + allow_write: handle_allow(flags.allow_all, flags.allow_write.clone()), + deny_write: flags.deny_write.clone(), + allow_import: handle_allow(flags.allow_all, flags.allow_import.clone()), + prompt: !resolve_no_prompt(flags), + } + } + + let mut permissions_options = flags_to_options(&self.flags.permissions); + self.augment_import_permissions(&mut permissions_options); + permissions_options + } + + fn augment_import_permissions(&self, options: &mut PermissionsOptions) { + // do not add if the user specified --allow-all or --allow-import + if !options.allow_all && options.allow_import.is_none() { + options.allow_import = Some(self.implicit_allow_import()); + } } - pub fn permissions_options(&self) -> PermissionsOptions { + fn implicit_allow_import(&self) -> Vec { + // allow importing from anywhere when using cached only + if self.cache_setting() == CacheSetting::Only { + vec![] // allow all imports + } else { + // implicitly allow some trusted hosts and the CLI arg urls + let cli_arg_urls = self.get_cli_arg_urls(); + let builtin_allowed_import_hosts = [ + "jsr.io:443", + "deno.land:443", + "esm.sh:443", + "cdn.jsdelivr.net:443", + "raw.githubusercontent.com:443", + "gist.githubusercontent.com:443", + ]; + let mut imports = Vec::with_capacity( + builtin_allowed_import_hosts.len() + cli_arg_urls.len() + 1, + ); + imports + .extend(builtin_allowed_import_hosts.iter().map(|s| s.to_string())); + // also add the JSR_URL env var + if let Some(jsr_host) = allow_import_host_from_url(jsr_url()) { + if jsr_host != "jsr.io:443" { + imports.push(jsr_host); + } + } + // include the cli arg urls + for url in cli_arg_urls { + if let Some(host) = allow_import_host_from_url(&url) { + imports.push(host); + } + } + imports + } + } + + fn get_cli_arg_urls(&self) -> Vec> { fn files_to_urls(files: &[String]) -> Vec> { - files - .iter() - .filter_map(|f| Url::parse(f).ok().map(Cow::Owned)) - .collect() + files.iter().filter_map(|f| file_to_url(f)).collect() } - // get a list of urls to imply for --allow-import - let cli_arg_urls = self + fn file_to_url(file: &str) -> Option> { + Url::parse(file).ok().map(Cow::Owned) + } + + self .resolve_main_module() .ok() .map(|url| vec![Cow::Borrowed(url)]) @@ -1540,15 +1630,19 @@ impl CliOptions { DenoSubcommand::Check(check_flags) => { Some(files_to_urls(&check_flags.files)) } - DenoSubcommand::Install(InstallFlags { - kind: InstallKind::Global(flags), - }) => Url::parse(&flags.module_url) - .ok() - .map(|url| vec![Cow::Owned(url)]), + DenoSubcommand::Install(InstallFlags::Global(flags)) => { + file_to_url(&flags.module_url).map(|url| vec![url]) + } + DenoSubcommand::Doc(DocFlags { + source_files: DocSourceFileFlag::Paths(paths), + .. + }) => Some(files_to_urls(paths)), + DenoSubcommand::Info(InfoFlags { + file: Some(file), .. + }) => file_to_url(file).map(|url| vec![url]), _ => None, }) - .unwrap_or_default(); - self.flags.permissions.to_options(&cli_arg_urls) + .unwrap_or_default() } pub fn reload_flag(&self) -> bool { @@ -1599,6 +1693,11 @@ impl CliOptions { || self.workspace().has_unstable("bare-node-builtins") } + pub fn unstable_detect_cjs(&self) -> bool { + self.flags.unstable_config.detect_cjs + || self.workspace().has_unstable("detect-cjs") + } + pub fn detect_cjs(&self) -> bool { // only enabled when there's a package.json in order to not have a // perf penalty for non-npm Deno projects of searching for the closest @@ -1621,8 +1720,10 @@ impl CliOptions { DenoSubcommand::Install(_) | DenoSubcommand::Add(_) | DenoSubcommand::Remove(_) + | DenoSubcommand::Init(_) + | DenoSubcommand::Outdated(_) ) { - // For `deno install/add/remove` we want to force the managed resolver so it can set up `node_modules/` directory. + // For `deno install/add/remove/init` we want to force the managed resolver so it can set up `node_modules/` directory. return false; } if self.node_modules_dir().ok().flatten().is_none() @@ -1666,7 +1767,10 @@ impl CliOptions { "sloppy-imports", "byonm", "bare-node-builtins", + "detect-cjs", "fmt-component", + "fmt-sql", + "lazy-npm-caching", ]) .collect(); @@ -1745,6 +1849,19 @@ impl CliOptions { ), } } + + pub fn unstable_npm_lazy_caching(&self) -> bool { + self.flags.unstable_config.npm_lazy_caching + || self.workspace().has_unstable("npm-lazy-caching") + } + + pub fn default_npm_caching_strategy(&self) -> NpmCachingStrategy { + if self.flags.unstable_config.npm_lazy_caching { + NpmCachingStrategy::Lazy + } else { + NpmCachingStrategy::Eager + } + } } /// Resolves the path to use for a local node_modules folder. @@ -1904,6 +2021,10 @@ pub fn resolve_no_prompt(flags: &PermissionFlags) -> bool { flags.no_prompt || has_flag_env_var("DENO_NO_PROMPT") } +pub fn has_trace_permissions_enabled() -> bool { + has_flag_env_var("DENO_TRACE_PERMISSIONS") +} + pub fn has_flag_env_var(name: &str) -> bool { let value = env::var(name); matches!(value.as_ref().map(|s| s.as_str()), Ok("1")) @@ -1912,15 +2033,17 @@ pub fn has_flag_env_var(name: &str) -> bool { pub fn npm_pkg_req_ref_to_binary_command( req_ref: &NpmPackageReqReference, ) -> String { - let binary_name = req_ref.sub_path().unwrap_or(req_ref.req().name.as_str()); - binary_name.to_string() + req_ref + .sub_path() + .map(|s| s.to_string()) + .unwrap_or_else(|| req_ref.req().name.to_string()) } pub fn config_to_deno_graph_workspace_member( config: &ConfigFile, ) -> Result { - let name = match &config.json.name { - Some(name) => name.clone(), + let name: StackString = match &config.json.name { + Some(name) => name.as_str().into(), None => bail!("Missing 'name' field in config file."), }; let version = match &config.json.version { @@ -1955,6 +2078,34 @@ fn load_env_variables_from_env_file(filename: Option<&Vec>) { } } +/// Gets the --allow-import host from the provided url +fn allow_import_host_from_url(url: &Url) -> Option { + let host = url.host()?; + if let Some(port) = url.port() { + Some(format!("{}:{}", host, port)) + } else { + match url.scheme() { + "https" => Some(format!("{}:443", host)), + "http" => Some(format!("{}:80", host)), + _ => None, + } + } +} + +#[derive(Debug, Clone, Copy)] +pub enum NpmCachingStrategy { + Eager, + Lazy, + Manual, +} + +pub fn otel_runtime_config() -> OtelRuntimeConfig { + OtelRuntimeConfig { + runtime_name: Cow::Borrowed("deno"), + runtime_version: Cow::Borrowed(crate::version::DENO_VERSION_INFO.deno), + } +} + #[cfg(test)] mod test { use pretty_assertions::assert_eq; @@ -2045,4 +2196,26 @@ mod test { let reg_api_url = jsr_api_url(); assert!(reg_api_url.as_str().ends_with('/')); } + + #[test] + fn test_allow_import_host_from_url() { + fn parse(text: &str) -> Option { + allow_import_host_from_url(&Url::parse(text).unwrap()) + } + + assert_eq!( + parse("http://127.0.0.1:4250"), + Some("127.0.0.1:4250".to_string()) + ); + assert_eq!(parse("http://jsr.io"), Some("jsr.io:80".to_string())); + assert_eq!( + parse("https://example.com"), + Some("example.com:443".to_string()) + ); + assert_eq!( + parse("http://example.com"), + Some("example.com:80".to_string()) + ); + assert_eq!(parse("file:///example.com"), None); + } } diff --git a/cli/args/package_json.rs b/cli/args/package_json.rs index 7dc75550c31a97..efa5d469662d0a 100644 --- a/cli/args/package_json.rs +++ b/cli/args/package_json.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::path::PathBuf; use std::sync::Arc; @@ -8,20 +8,23 @@ use deno_core::serde_json; use deno_core::url::Url; use deno_package_json::PackageJsonDepValue; use deno_package_json::PackageJsonDepValueParseError; +use deno_package_json::PackageJsonDepWorkspaceReq; use deno_semver::npm::NpmPackageReqReference; use deno_semver::package::PackageReq; +use deno_semver::StackString; +use deno_semver::VersionReq; use thiserror::Error; #[derive(Debug)] pub struct InstallNpmRemotePkg { - pub alias: Option, + pub alias: Option, pub base_dir: PathBuf, pub req: PackageReq, } #[derive(Debug)] pub struct InstallNpmWorkspacePkg { - pub alias: Option, + pub alias: Option, pub target_dir: PathBuf, } @@ -29,7 +32,7 @@ pub struct InstallNpmWorkspacePkg { #[error("Failed to install '{}'\n at {}", alias, location)] pub struct PackageJsonDepValueParseWithLocationError { pub location: Url, - pub alias: String, + pub alias: StackString, #[source] pub source: PackageJsonDepValueParseError, } @@ -95,16 +98,20 @@ impl NpmInstallDepsProvider { if let Some(pkg_json) = &folder.pkg_json { let deps = pkg_json.resolve_local_package_json_deps(); - let mut pkg_pkgs = Vec::with_capacity(deps.len()); - for (alias, dep) in deps { + let mut pkg_pkgs = Vec::with_capacity( + deps.dependencies.len() + deps.dev_dependencies.len(), + ); + for (alias, dep) in + deps.dependencies.iter().chain(deps.dev_dependencies.iter()) + { let dep = match dep { Ok(dep) => dep, Err(err) => { pkg_json_dep_errors.push( PackageJsonDepValueParseWithLocationError { location: pkg_json.specifier(), - alias, - source: err, + alias: alias.clone(), + source: err.clone(), }, ); continue; @@ -113,30 +120,39 @@ impl NpmInstallDepsProvider { match dep { PackageJsonDepValue::Req(pkg_req) => { let workspace_pkg = workspace_npm_pkgs.iter().find(|pkg| { - pkg.matches_req(&pkg_req) + pkg.matches_req(pkg_req) // do not resolve to the current package && pkg.pkg_json.path != pkg_json.path }); if let Some(pkg) = workspace_pkg { workspace_pkgs.push(InstallNpmWorkspacePkg { - alias: Some(alias), + alias: Some(alias.clone()), target_dir: pkg.pkg_json.dir_path().to_path_buf(), }); } else { pkg_pkgs.push(InstallNpmRemotePkg { - alias: Some(alias), + alias: Some(alias.clone()), base_dir: pkg_json.dir_path().to_path_buf(), - req: pkg_req, + req: pkg_req.clone(), }); } } - PackageJsonDepValue::Workspace(version_req) => { + PackageJsonDepValue::Workspace(workspace_version_req) => { + let version_req = match workspace_version_req { + PackageJsonDepWorkspaceReq::VersionReq(version_req) => { + version_req.clone() + } + PackageJsonDepWorkspaceReq::Tilde + | PackageJsonDepWorkspaceReq::Caret => { + VersionReq::parse_from_npm("*").unwrap() + } + }; if let Some(pkg) = workspace_npm_pkgs.iter().find(|pkg| { - pkg.matches_name_and_version_req(&alias, &version_req) + pkg.matches_name_and_version_req(alias, &version_req) }) { workspace_pkgs.push(InstallNpmWorkspacePkg { - alias: Some(alias), + alias: Some(alias.clone()), target_dir: pkg.pkg_json.dir_path().to_path_buf(), }); } diff --git a/cli/auth_tokens.rs b/cli/auth_tokens.rs deleted file mode 100644 index ef9f9d0746727c..00000000000000 --- a/cli/auth_tokens.rs +++ /dev/null @@ -1,369 +0,0 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. - -use base64::prelude::BASE64_STANDARD; -use base64::Engine; -use deno_core::ModuleSpecifier; -use log::debug; -use log::error; -use std::borrow::Cow; -use std::fmt; -use std::net::IpAddr; -use std::net::Ipv4Addr; -use std::net::Ipv6Addr; -use std::net::SocketAddr; -use std::str::FromStr; - -#[derive(Debug, Clone, PartialEq, Eq)] -pub enum AuthTokenData { - Bearer(String), - Basic { username: String, password: String }, -} - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct AuthToken { - host: AuthDomain, - token: AuthTokenData, -} - -impl fmt::Display for AuthToken { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - match &self.token { - AuthTokenData::Bearer(token) => write!(f, "Bearer {token}"), - AuthTokenData::Basic { username, password } => { - let credentials = format!("{username}:{password}"); - write!(f, "Basic {}", BASE64_STANDARD.encode(credentials)) - } - } - } -} - -/// A structure which contains bearer tokens that can be used when sending -/// requests to websites, intended to authorize access to private resources -/// such as remote modules. -#[derive(Debug, Clone)] -pub struct AuthTokens(Vec); - -/// An authorization domain, either an exact or suffix match. -#[derive(Debug, Clone, PartialEq, Eq)] -pub enum AuthDomain { - Ip(IpAddr), - IpPort(SocketAddr), - /// Suffix match, no dot. May include a port. - Suffix(Cow<'static, str>), -} - -impl From for AuthDomain { - fn from(value: T) -> Self { - let s = value.to_string().to_lowercase(); - if let Ok(ip) = SocketAddr::from_str(&s) { - return AuthDomain::IpPort(ip); - }; - if s.starts_with('[') && s.ends_with(']') { - if let Ok(ip) = Ipv6Addr::from_str(&s[1..s.len() - 1]) { - return AuthDomain::Ip(ip.into()); - } - } else if let Ok(ip) = Ipv4Addr::from_str(&s) { - return AuthDomain::Ip(ip.into()); - } - if let Some(s) = s.strip_prefix('.') { - AuthDomain::Suffix(Cow::Owned(s.to_owned())) - } else { - AuthDomain::Suffix(Cow::Owned(s)) - } - } -} - -impl AuthDomain { - pub fn matches(&self, specifier: &ModuleSpecifier) -> bool { - let Some(host) = specifier.host_str() else { - return false; - }; - match *self { - Self::Ip(ip) => { - let AuthDomain::Ip(parsed) = AuthDomain::from(host) else { - return false; - }; - ip == parsed && specifier.port().is_none() - } - Self::IpPort(ip) => { - let AuthDomain::Ip(parsed) = AuthDomain::from(host) else { - return false; - }; - ip.ip() == parsed && specifier.port() == Some(ip.port()) - } - Self::Suffix(ref suffix) => { - let hostname = if let Some(port) = specifier.port() { - Cow::Owned(format!("{}:{}", host, port)) - } else { - Cow::Borrowed(host) - }; - - if suffix.len() == hostname.len() { - return suffix == &hostname; - } - - // If it's a suffix match, ensure a dot - if hostname.ends_with(suffix.as_ref()) - && hostname.ends_with(&format!(".{suffix}")) - { - return true; - } - - false - } - } - } -} - -impl AuthTokens { - /// Create a new set of tokens based on the provided string. It is intended - /// that the string be the value of an environment variable and the string is - /// parsed for token values. The string is expected to be a semi-colon - /// separated string, where each value is `{token}@{hostname}`. - pub fn new(maybe_tokens_str: Option) -> Self { - let mut tokens = Vec::new(); - if let Some(tokens_str) = maybe_tokens_str { - for token_str in tokens_str.trim().split(';') { - if token_str.contains('@') { - let mut iter = token_str.rsplitn(2, '@'); - let host = AuthDomain::from(iter.next().unwrap()); - let token = iter.next().unwrap(); - if token.contains(':') { - let mut iter = token.rsplitn(2, ':'); - let password = iter.next().unwrap().to_owned(); - let username = iter.next().unwrap().to_owned(); - tokens.push(AuthToken { - host, - token: AuthTokenData::Basic { username, password }, - }); - } else { - tokens.push(AuthToken { - host, - token: AuthTokenData::Bearer(token.to_string()), - }); - } - } else { - error!("Badly formed auth token discarded."); - } - } - debug!("Parsed {} auth token(s).", tokens.len()); - } - - Self(tokens) - } - - /// Attempt to match the provided specifier to the tokens in the set. The - /// matching occurs from the right of the hostname plus port, irrespective of - /// scheme. For example `https://www.deno.land:8080/` would match a token - /// with a host value of `deno.land:8080` but not match `www.deno.land`. The - /// matching is case insensitive. - pub fn get(&self, specifier: &ModuleSpecifier) -> Option { - self.0.iter().find_map(|t| { - if t.host.matches(specifier) { - Some(t.clone()) - } else { - None - } - }) - } -} - -#[cfg(test)] -mod tests { - use super::*; - use deno_core::resolve_url; - - #[test] - fn test_auth_token() { - let auth_tokens = AuthTokens::new(Some("abc123@deno.land".to_string())); - let fixture = resolve_url("https://deno.land/x/mod.ts").unwrap(); - assert_eq!( - auth_tokens.get(&fixture).unwrap().to_string(), - "Bearer abc123" - ); - let fixture = resolve_url("https://www.deno.land/x/mod.ts").unwrap(); - assert_eq!( - auth_tokens.get(&fixture).unwrap().to_string(), - "Bearer abc123".to_string() - ); - let fixture = resolve_url("http://127.0.0.1:8080/x/mod.ts").unwrap(); - assert_eq!(auth_tokens.get(&fixture), None); - let fixture = - resolve_url("https://deno.land.example.com/x/mod.ts").unwrap(); - assert_eq!(auth_tokens.get(&fixture), None); - let fixture = resolve_url("https://deno.land:8080/x/mod.ts").unwrap(); - assert_eq!(auth_tokens.get(&fixture), None); - } - - #[test] - fn test_auth_tokens_multiple() { - let auth_tokens = - AuthTokens::new(Some("abc123@deno.land;def456@example.com".to_string())); - let fixture = resolve_url("https://deno.land/x/mod.ts").unwrap(); - assert_eq!( - auth_tokens.get(&fixture).unwrap().to_string(), - "Bearer abc123".to_string() - ); - let fixture = resolve_url("http://example.com/a/file.ts").unwrap(); - assert_eq!( - auth_tokens.get(&fixture).unwrap().to_string(), - "Bearer def456".to_string() - ); - } - - #[test] - fn test_auth_tokens_space() { - let auth_tokens = AuthTokens::new(Some( - " abc123@deno.land;def456@example.com\t".to_string(), - )); - let fixture = resolve_url("https://deno.land/x/mod.ts").unwrap(); - assert_eq!( - auth_tokens.get(&fixture).unwrap().to_string(), - "Bearer abc123".to_string() - ); - let fixture = resolve_url("http://example.com/a/file.ts").unwrap(); - assert_eq!( - auth_tokens.get(&fixture).unwrap().to_string(), - "Bearer def456".to_string() - ); - } - - #[test] - fn test_auth_tokens_newline() { - let auth_tokens = AuthTokens::new(Some( - "\nabc123@deno.land;def456@example.com\n".to_string(), - )); - let fixture = resolve_url("https://deno.land/x/mod.ts").unwrap(); - assert_eq!( - auth_tokens.get(&fixture).unwrap().to_string(), - "Bearer abc123".to_string() - ); - let fixture = resolve_url("http://example.com/a/file.ts").unwrap(); - assert_eq!( - auth_tokens.get(&fixture).unwrap().to_string(), - "Bearer def456".to_string() - ); - } - - #[test] - fn test_auth_tokens_port() { - let auth_tokens = - AuthTokens::new(Some("abc123@deno.land:8080".to_string())); - let fixture = resolve_url("https://deno.land/x/mod.ts").unwrap(); - assert_eq!(auth_tokens.get(&fixture), None); - let fixture = resolve_url("http://deno.land:8080/x/mod.ts").unwrap(); - assert_eq!( - auth_tokens.get(&fixture).unwrap().to_string(), - "Bearer abc123".to_string() - ); - } - - #[test] - fn test_auth_tokens_contain_at() { - let auth_tokens = AuthTokens::new(Some("abc@123@deno.land".to_string())); - let fixture = resolve_url("https://deno.land/x/mod.ts").unwrap(); - assert_eq!( - auth_tokens.get(&fixture).unwrap().to_string(), - "Bearer abc@123".to_string() - ); - } - - #[test] - fn test_auth_token_basic() { - let auth_tokens = AuthTokens::new(Some("abc:123@deno.land".to_string())); - let fixture = resolve_url("https://deno.land/x/mod.ts").unwrap(); - assert_eq!( - auth_tokens.get(&fixture).unwrap().to_string(), - "Basic YWJjOjEyMw==" - ); - let fixture = resolve_url("https://www.deno.land/x/mod.ts").unwrap(); - assert_eq!( - auth_tokens.get(&fixture).unwrap().to_string(), - "Basic YWJjOjEyMw==".to_string() - ); - let fixture = resolve_url("http://127.0.0.1:8080/x/mod.ts").unwrap(); - assert_eq!(auth_tokens.get(&fixture), None); - let fixture = - resolve_url("https://deno.land.example.com/x/mod.ts").unwrap(); - assert_eq!(auth_tokens.get(&fixture), None); - let fixture = resolve_url("https://deno.land:8080/x/mod.ts").unwrap(); - assert_eq!(auth_tokens.get(&fixture), None); - } - - #[test] - fn test_parse_ip() { - let ip = AuthDomain::from("[2001:db8:a::123]"); - assert_eq!("Ip(2001:db8:a::123)", format!("{ip:?}")); - let ip = AuthDomain::from("[2001:db8:a::123]:8080"); - assert_eq!("IpPort([2001:db8:a::123]:8080)", format!("{ip:?}")); - let ip = AuthDomain::from("1.1.1.1"); - assert_eq!("Ip(1.1.1.1)", format!("{ip:?}")); - } - - #[test] - fn test_case_insensitive() { - let domain = AuthDomain::from("EXAMPLE.com"); - assert!( - domain.matches(&ModuleSpecifier::parse("http://example.com").unwrap()) - ); - assert!( - domain.matches(&ModuleSpecifier::parse("http://example.COM").unwrap()) - ); - } - - #[test] - fn test_matches() { - let candidates = [ - "example.com", - "www.example.com", - "1.1.1.1", - "[2001:db8:a::123]", - // These will never match - "example.com.evil.com", - "1.1.1.1.evil.com", - "notexample.com", - "www.notexample.com", - ]; - let domains = [ - ("example.com", vec!["example.com", "www.example.com"]), - (".example.com", vec!["example.com", "www.example.com"]), - ("www.example.com", vec!["www.example.com"]), - ("1.1.1.1", vec!["1.1.1.1"]), - ("[2001:db8:a::123]", vec!["[2001:db8:a::123]"]), - ]; - let url = |c: &str| ModuleSpecifier::parse(&format!("http://{c}")).unwrap(); - let url_port = - |c: &str| ModuleSpecifier::parse(&format!("http://{c}:8080")).unwrap(); - - // Generate each candidate with and without a port - let candidates = candidates - .into_iter() - .flat_map(|c| [url(c), url_port(c)]) - .collect::>(); - - for (domain, expected_domain) in domains { - // Test without a port -- all candidates return without a port - let auth_domain = AuthDomain::from(domain); - let actual = candidates - .iter() - .filter(|c| auth_domain.matches(c)) - .cloned() - .collect::>(); - let expected = expected_domain.iter().map(|u| url(u)).collect::>(); - assert_eq!(actual, expected); - - // Test with a port, all candidates return with a port - let auth_domain = AuthDomain::from(&format!("{domain}:8080")); - let actual = candidates - .iter() - .filter(|c| auth_domain.matches(c)) - .cloned() - .collect::>(); - let expected = expected_domain - .iter() - .map(|u| url_port(u)) - .collect::>(); - assert_eq!(actual, expected); - } - } -} diff --git a/cli/bench/cache_api.js b/cli/bench/cache_api.js index af55fc132e25fe..4b092ab627f789 100644 --- a/cli/bench/cache_api.js +++ b/cli/bench/cache_api.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. const cacheName = "cache-v1"; const cache = await caches.open(cacheName); diff --git a/cli/bench/command.js b/cli/bench/command.js index 5b7c300d261dd1..5916dcfee26e06 100644 --- a/cli/bench/command.js +++ b/cli/bench/command.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. Deno.bench("echo deno", async () => { await new Deno.Command("echo", { args: ["deno"] }).output(); diff --git a/cli/bench/console.js b/cli/bench/console.js index 1d336fbbde84a7..c1704549c6ca56 100644 --- a/cli/bench/console.js +++ b/cli/bench/console.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-console diff --git a/cli/bench/deno_common.js b/cli/bench/deno_common.js index 3693333915ab04..011a1244aa13f6 100644 --- a/cli/bench/deno_common.js +++ b/cli/bench/deno_common.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // v8 builtin that's close to the upper bound non-NOPs Deno.bench("date_now", { n: 5e5 }, () => { diff --git a/cli/bench/encode_into.js b/cli/bench/encode_into.js index ab5e11b04db847..57313ca04ab8b5 100644 --- a/cli/bench/encode_into.js +++ b/cli/bench/encode_into.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-console no-process-globals let [total, count] = typeof Deno !== "undefined" diff --git a/cli/bench/fs/run.mjs b/cli/bench/fs/run.mjs index 94240f20d4d1fe..7f080daf6a88f9 100644 --- a/cli/bench/fs/run.mjs +++ b/cli/bench/fs/run.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. let total = 5; let current = ""; diff --git a/cli/bench/fs/serve.jsx b/cli/bench/fs/serve.jsx index 51125235fe8bcb..8b3328617af522 100644 --- a/cli/bench/fs/serve.jsx +++ b/cli/bench/fs/serve.jsx @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /** @jsx h */ import results from "./deno.json" assert { type: "json" }; diff --git a/cli/bench/getrandom.js b/cli/bench/getrandom.js index fe99bbcbdf7c91..775d02fc75a208 100644 --- a/cli/bench/getrandom.js +++ b/cli/bench/getrandom.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-console no-process-globals let [total, count] = typeof Deno !== "undefined" diff --git a/cli/bench/lsp.rs b/cli/bench/lsp.rs index 7baaffca7eb969..7a93dcae1eb93e 100644 --- a/cli/bench/lsp.rs +++ b/cli/bench/lsp.rs @@ -1,14 +1,15 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::collections::HashMap; +use std::path::Path; +use std::str::FromStr; +use std::time::Duration; use deno_core::serde::Deserialize; use deno_core::serde_json; use deno_core::serde_json::json; use deno_core::serde_json::Value; use lsp_types::Uri; -use std::collections::HashMap; -use std::path::Path; -use std::str::FromStr; -use std::time::Duration; use test_util::lsp::LspClientBuilder; use test_util::PathRef; use tower_lsp::lsp_types as lsp; diff --git a/cli/bench/lsp_bench_standalone.rs b/cli/bench/lsp_bench_standalone.rs index 3c946cfbe30403..45d8788256660f 100644 --- a/cli/bench/lsp_bench_standalone.rs +++ b/cli/bench/lsp_bench_standalone.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_bench_util::bencher::benchmark_group; use deno_bench_util::bencher::benchmark_main; diff --git a/cli/bench/main.rs b/cli/bench/main.rs index c3c42d24882f04..e7f71f8cfa4df4 100644 --- a/cli/bench/main.rs +++ b/cli/bench/main.rs @@ -1,11 +1,8 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. #![allow(clippy::print_stdout)] #![allow(clippy::print_stderr)] -use deno_core::error::AnyError; -use deno_core::serde_json; -use deno_core::serde_json::Value; use std::collections::HashMap; use std::convert::From; use std::env; @@ -15,6 +12,10 @@ use std::path::PathBuf; use std::process::Command; use std::process::Stdio; use std::time::SystemTime; + +use deno_core::error::AnyError; +use deno_core::serde_json; +use deno_core::serde_json::Value; use test_util::PathRef; mod lsp; diff --git a/cli/bench/napi/bench.js b/cli/bench/napi/bench.js index c12c7aacbcba08..f40611e7a81feb 100644 --- a/cli/bench/napi/bench.js +++ b/cli/bench/napi/bench.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { loadTestLibrary } from "../../../tests/napi/common.js"; diff --git a/cli/bench/napi/bench_node.mjs b/cli/bench/napi/bench_node.mjs index a772eeafa14a47..557c4daefdd24a 100644 --- a/cli/bench/napi/bench_node.mjs +++ b/cli/bench/napi/bench_node.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { bench, run } from "mitata"; import { createRequire } from "module"; diff --git a/cli/bench/op_now.js b/cli/bench/op_now.js index 7c1427c8096b6b..26c4958fe0403a 100644 --- a/cli/bench/op_now.js +++ b/cli/bench/op_now.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-console no-process-globals const queueMicrotask = globalThis.queueMicrotask || process.nextTick; diff --git a/cli/bench/secure_curves.js b/cli/bench/secure_curves.js index 912b75cccd8c0b..a3fb4ebc414398 100644 --- a/cli/bench/secure_curves.js +++ b/cli/bench/secure_curves.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-console no-process-globals let [total, count] = typeof Deno !== "undefined" diff --git a/cli/bench/stdio/stdio.c b/cli/bench/stdio/stdio.c index acce207995d26f..15df42240561ab 100644 --- a/cli/bench/stdio/stdio.c +++ b/cli/bench/stdio/stdio.c @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // From https://github.com/just-js/benchmarks/tree/main/01-stdio #include diff --git a/cli/bench/stdio/stdio.js b/cli/bench/stdio/stdio.js index 81bea835a6f9c0..1ca947809ab40e 100644 --- a/cli/bench/stdio/stdio.js +++ b/cli/bench/stdio/stdio.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // // From https://github.com/just-js/benchmarks/tree/main/01-stdio diff --git a/cli/bench/tcp.js b/cli/bench/tcp.js index b9f05e3a7e5a1c..6681eeeb5263cb 100644 --- a/cli/bench/tcp.js +++ b/cli/bench/tcp.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. const listener = Deno.listen({ port: 4500 }); const response = new TextEncoder().encode( diff --git a/cli/bench/tty.js b/cli/bench/tty.js index e494e76af72354..c61541ffa64af4 100644 --- a/cli/bench/tty.js +++ b/cli/bench/tty.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-console no-process-globals const queueMicrotask = globalThis.queueMicrotask || process.nextTick; diff --git a/cli/bench/url_parse.js b/cli/bench/url_parse.js index 9cb0045f644e25..80579d6f6bd392 100644 --- a/cli/bench/url_parse.js +++ b/cli/bench/url_parse.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-console no-process-globals const queueMicrotask = globalThis.queueMicrotask || process.nextTick; diff --git a/cli/bench/webstorage.js b/cli/bench/webstorage.js index d19f024c63102d..d284378d60b82d 100644 --- a/cli/bench/webstorage.js +++ b/cli/bench/webstorage.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-console diff --git a/cli/bench/write_file.js b/cli/bench/write_file.js index 747503ce2a10f8..c7200a6f5b595a 100644 --- a/cli/bench/write_file.js +++ b/cli/bench/write_file.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-console no-process-globals const queueMicrotask = globalThis.queueMicrotask || process.nextTick; diff --git a/cli/build.rs b/cli/build.rs index 2678a8dbb027e0..83290599e6bf06 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::env; use std::path::PathBuf; @@ -8,16 +8,18 @@ use deno_runtime::*; mod shared; mod ts { - use super::*; + use std::collections::HashMap; + use std::io::Write; + use std::path::Path; + use std::path::PathBuf; + use deno_core::error::custom_error; use deno_core::error::AnyError; use deno_core::op2; use deno_core::OpState; use serde::Serialize; - use std::collections::HashMap; - use std::io::Write; - use std::path::Path; - use std::path::PathBuf; + + use super::*; #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] @@ -400,6 +402,24 @@ fn main() { println!("cargo:rustc-env=TARGET={}", env::var("TARGET").unwrap()); println!("cargo:rustc-env=PROFILE={}", env::var("PROFILE").unwrap()); + if cfg!(windows) { + // these dls load slowly, so delay loading them + let dlls = [ + // webgpu + "d3dcompiler_47", + "OPENGL32", + // network related functions + "iphlpapi", + ]; + for dll in dlls { + println!("cargo:rustc-link-arg-bin=deno=/delayload:{dll}.dll"); + println!("cargo:rustc-link-arg-bin=denort=/delayload:{dll}.dll"); + } + // enable delay loading + println!("cargo:rustc-link-arg-bin=deno=delayimp.lib"); + println!("cargo:rustc-link-arg-bin=denort=delayimp.lib"); + } + let c = PathBuf::from(env::var_os("CARGO_MANIFEST_DIR").unwrap()); let o = PathBuf::from(env::var_os("OUT_DIR").unwrap()); diff --git a/cli/cache/cache_db.rs b/cli/cache/cache_db.rs index 329ed2d9704dff..02394d4cfd6eba 100644 --- a/cli/cache/cache_db.rs +++ b/cli/cache/cache_db.rs @@ -1,4 +1,9 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::io::IsTerminal; +use std::path::Path; +use std::path::PathBuf; +use std::sync::Arc; use deno_core::error::AnyError; use deno_core::parking_lot::Mutex; @@ -9,10 +14,6 @@ use deno_runtime::deno_webstorage::rusqlite::Connection; use deno_runtime::deno_webstorage::rusqlite::OptionalExtension; use deno_runtime::deno_webstorage::rusqlite::Params; use once_cell::sync::OnceCell; -use std::io::IsTerminal; -use std::path::Path; -use std::path::PathBuf; -use std::sync::Arc; use super::FastInsecureHasher; diff --git a/cli/cache/caches.rs b/cli/cache/caches.rs index 54371cee48bf1f..b83364c61b3bf7 100644 --- a/cli/cache/caches.rs +++ b/cli/cache/caches.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::path::PathBuf; use std::sync::Arc; diff --git a/cli/cache/check.rs b/cli/cache/check.rs index ca4e938533b480..a886f9fe0f4b5b 100644 --- a/cli/cache/check.rs +++ b/cli/cache/check.rs @@ -1,12 +1,13 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use deno_ast::ModuleSpecifier; +use deno_core::error::AnyError; +use deno_runtime::deno_webstorage::rusqlite::params; use super::cache_db::CacheDB; use super::cache_db::CacheDBConfiguration; use super::cache_db::CacheDBHash; use super::cache_db::CacheFailure; -use deno_ast::ModuleSpecifier; -use deno_core::error::AnyError; -use deno_runtime::deno_webstorage::rusqlite::params; pub static TYPE_CHECK_CACHE_DB: CacheDBConfiguration = CacheDBConfiguration { table_initializer: concat!( diff --git a/cli/cache/code_cache.rs b/cli/cache/code_cache.rs index abcd0d46ac1cff..27ec544b5f6375 100644 --- a/cli/cache/code_cache.rs +++ b/cli/cache/code_cache.rs @@ -1,4 +1,6 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::sync::Arc; use deno_ast::ModuleSpecifier; use deno_core::error::AnyError; @@ -9,6 +11,7 @@ use super::cache_db::CacheDB; use super::cache_db::CacheDBConfiguration; use super::cache_db::CacheDBHash; use super::cache_db::CacheFailure; +use crate::worker::CliCodeCache; pub static CODE_CACHE_DB: CacheDBConfiguration = CacheDBConfiguration { table_initializer: concat!( @@ -82,6 +85,12 @@ impl CodeCache { } } +impl CliCodeCache for CodeCache { + fn as_code_cache(self: Arc) -> Arc { + self + } +} + impl code_cache::CodeCache for CodeCache { fn get_sync( &self, diff --git a/cli/cache/common.rs b/cli/cache/common.rs index 0a68e95159a5a6..da607a27f260da 100644 --- a/cli/cache/common.rs +++ b/cli/cache/common.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::hash::Hasher; diff --git a/cli/cache/deno_dir.rs b/cli/cache/deno_dir.rs index 7b7059c224df3c..1b35f5307132d2 100644 --- a/cli/cache/deno_dir.rs +++ b/cli/cache/deno_dir.rs @@ -1,33 +1,48 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. +use std::env; +use std::path::PathBuf; + +use deno_cache_dir::DenoDirResolutionError; use once_cell::sync::OnceCell; use super::DiskCache; - -use std::env; -use std::path::PathBuf; +use crate::sys::CliSys; /// Lazily creates the deno dir which might be useful in scenarios /// where functionality wants to continue if the DENO_DIR can't be created. pub struct DenoDirProvider { + sys: CliSys, maybe_custom_root: Option, - deno_dir: OnceCell>, + deno_dir: OnceCell>, } impl DenoDirProvider { - pub fn new(maybe_custom_root: Option) -> Self { + pub fn new(sys: CliSys, maybe_custom_root: Option) -> Self { Self { + sys, maybe_custom_root, deno_dir: Default::default(), } } - pub fn get_or_create(&self) -> Result<&DenoDir, std::io::Error> { + pub fn get_or_create(&self) -> Result<&DenoDir, DenoDirResolutionError> { self .deno_dir - .get_or_init(|| DenoDir::new(self.maybe_custom_root.clone())) + .get_or_init(|| { + DenoDir::new(self.sys.clone(), self.maybe_custom_root.clone()) + }) .as_ref() - .map_err(|err| std::io::Error::new(err.kind(), err.to_string())) + .map_err(|err| match err { + DenoDirResolutionError::NoCacheOrHomeDir => { + DenoDirResolutionError::NoCacheOrHomeDir + } + DenoDirResolutionError::FailedCwd { source } => { + DenoDirResolutionError::FailedCwd { + source: std::io::Error::new(source.kind(), source.to_string()), + } + } + }) } } @@ -42,33 +57,20 @@ pub struct DenoDir { } impl DenoDir { - pub fn new(maybe_custom_root: Option) -> std::io::Result { - let maybe_custom_root = - maybe_custom_root.or_else(|| env::var("DENO_DIR").map(String::into).ok()); - let root: PathBuf = if let Some(root) = maybe_custom_root { - root - } else if let Some(cache_dir) = dirs::cache_dir() { - // We use the OS cache dir because all files deno writes are cache files - // Once that changes we need to start using different roots if DENO_DIR - // is not set, and keep a single one if it is. - cache_dir.join("deno") - } else if let Some(home_dir) = dirs::home_dir() { - // fallback path - home_dir.join(".deno") - } else { - panic!("Could not set the Deno root directory") - }; - let root = if root.is_absolute() { - root - } else { - std::env::current_dir()?.join(root) - }; + pub fn new( + sys: CliSys, + maybe_custom_root: Option, + ) -> Result { + let root = deno_cache_dir::resolve_deno_dir( + &sys_traits::impls::RealSys, + maybe_custom_root, + )?; assert!(root.is_absolute()); let gen_path = root.join("gen"); let deno_dir = Self { root, - gen_cache: DiskCache::new(&gen_path), + gen_cache: DiskCache::new(sys, &gen_path), }; Ok(deno_dir) @@ -166,112 +168,3 @@ impl DenoDir { self.root.join("dl") } } - -/// To avoid the poorly managed dirs crate -#[cfg(not(windows))] -pub mod dirs { - use std::path::PathBuf; - - pub fn cache_dir() -> Option { - if cfg!(target_os = "macos") { - home_dir().map(|h| h.join("Library/Caches")) - } else { - std::env::var_os("XDG_CACHE_HOME") - .map(PathBuf::from) - .or_else(|| home_dir().map(|h| h.join(".cache"))) - } - } - - pub fn home_dir() -> Option { - std::env::var_os("HOME") - .and_then(|h| if h.is_empty() { None } else { Some(h) }) - .or_else(|| { - // TODO(bartlomieju): - #[allow(clippy::undocumented_unsafe_blocks)] - unsafe { - fallback() - } - }) - .map(PathBuf::from) - } - - // This piece of code is taken from the deprecated home_dir() function in Rust's standard library: https://github.com/rust-lang/rust/blob/master/src/libstd/sys/unix/os.rs#L579 - // The same code is used by the dirs crate - unsafe fn fallback() -> Option { - let amt = match libc::sysconf(libc::_SC_GETPW_R_SIZE_MAX) { - n if n < 0 => 512_usize, - n => n as usize, - }; - let mut buf = Vec::with_capacity(amt); - let mut passwd: libc::passwd = std::mem::zeroed(); - let mut result = std::ptr::null_mut(); - match libc::getpwuid_r( - libc::getuid(), - &mut passwd, - buf.as_mut_ptr(), - buf.capacity(), - &mut result, - ) { - 0 if !result.is_null() => { - let ptr = passwd.pw_dir as *const _; - let bytes = std::ffi::CStr::from_ptr(ptr).to_bytes().to_vec(); - Some(std::os::unix::ffi::OsStringExt::from_vec(bytes)) - } - _ => None, - } - } -} - -/// To avoid the poorly managed dirs crate -// Copied from -// https://github.com/dirs-dev/dirs-sys-rs/blob/ec7cee0b3e8685573d847f0a0f60aae3d9e07fa2/src/lib.rs#L140-L164 -// MIT license. Copyright (c) 2018-2019 dirs-rs contributors -#[cfg(windows)] -pub mod dirs { - use std::ffi::OsString; - use std::os::windows::ffi::OsStringExt; - use std::path::PathBuf; - use winapi::shared::winerror; - use winapi::um::combaseapi; - use winapi::um::knownfolders; - use winapi::um::shlobj; - use winapi::um::shtypes; - use winapi::um::winbase; - use winapi::um::winnt; - - fn known_folder(folder_id: shtypes::REFKNOWNFOLDERID) -> Option { - // SAFETY: winapi calls - unsafe { - let mut path_ptr: winnt::PWSTR = std::ptr::null_mut(); - let result = shlobj::SHGetKnownFolderPath( - folder_id, - 0, - std::ptr::null_mut(), - &mut path_ptr, - ); - if result == winerror::S_OK { - let len = winbase::lstrlenW(path_ptr) as usize; - let path = std::slice::from_raw_parts(path_ptr, len); - let ostr: OsString = OsStringExt::from_wide(path); - combaseapi::CoTaskMemFree(path_ptr as *mut winapi::ctypes::c_void); - Some(PathBuf::from(ostr)) - } else { - None - } - } - } - - pub fn cache_dir() -> Option { - known_folder(&knownfolders::FOLDERID_LocalAppData) - } - - pub fn home_dir() -> Option { - if let Some(userprofile) = std::env::var_os("USERPROFILE") { - if !userprofile.is_empty() { - return Some(PathBuf::from(userprofile)); - } - } - - known_folder(&knownfolders::FOLDERID_Profile) - } -} diff --git a/cli/cache/disk_cache.rs b/cli/cache/disk_cache.rs index 2fee1efe09bef9..f03b60854ff002 100644 --- a/cli/cache/disk_cache.rs +++ b/cli/cache/disk_cache.rs @@ -1,11 +1,5 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use super::CACHE_PERM; -use crate::util::fs::atomic_write_file_with_retries; - -use deno_cache_dir::url_to_filename; -use deno_core::url::Host; -use deno_core::url::Url; use std::ffi::OsStr; use std::fs; use std::path::Component; @@ -14,16 +8,26 @@ use std::path::PathBuf; use std::path::Prefix; use std::str; +use deno_cache_dir::url_to_filename; +use deno_core::url::Host; +use deno_core::url::Url; +use deno_path_util::fs::atomic_write_file_with_retries; + +use super::CACHE_PERM; +use crate::sys::CliSys; + #[derive(Debug, Clone)] pub struct DiskCache { + sys: CliSys, pub location: PathBuf, } impl DiskCache { /// `location` must be an absolute path. - pub fn new(location: &Path) -> Self { + pub fn new(sys: CliSys, location: &Path) -> Self { assert!(location.is_absolute()); Self { + sys, location: location.to_owned(), } } @@ -120,20 +124,21 @@ impl DiskCache { pub fn set(&self, filename: &Path, data: &[u8]) -> std::io::Result<()> { let path = self.location.join(filename); - atomic_write_file_with_retries(&path, data, CACHE_PERM) + atomic_write_file_with_retries(&self.sys, &path, data, CACHE_PERM) } } #[cfg(test)] mod tests { - use super::*; use test_util::TempDir; + use super::*; + #[test] fn test_set_get_cache_file() { let temp_dir = TempDir::new(); let sub_dir = temp_dir.path().join("sub_dir"); - let cache = DiskCache::new(&sub_dir.to_path_buf()); + let cache = DiskCache::new(CliSys::default(), &sub_dir.to_path_buf()); let path = PathBuf::from("foo/bar.txt"); cache.set(&path, b"hello").unwrap(); assert_eq!(cache.get(&path).unwrap(), b"hello"); @@ -147,7 +152,7 @@ mod tests { PathBuf::from("/deno_dir/") }; - let cache = DiskCache::new(&cache_location); + let cache = DiskCache::new(CliSys::default(), &cache_location); let mut test_cases = vec![ ( @@ -203,7 +208,7 @@ mod tests { } else { "/foo" }; - let cache = DiskCache::new(&PathBuf::from(p)); + let cache = DiskCache::new(CliSys::default(), &PathBuf::from(p)); let mut test_cases = vec![ ( @@ -251,7 +256,7 @@ mod tests { PathBuf::from("/deno_dir/") }; - let cache = DiskCache::new(&cache_location); + let cache = DiskCache::new(CliSys::default(), &cache_location); let mut test_cases = vec!["unknown://localhost/test.ts"]; diff --git a/cli/cache/emit.rs b/cli/cache/emit.rs index 3c9eecfcbdb6b2..2ba43d58b946c7 100644 --- a/cli/cache/emit.rs +++ b/cli/cache/emit.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::path::PathBuf; @@ -160,11 +160,13 @@ mod test { use test_util::TempDir; use super::*; + use crate::sys::CliSys; #[test] pub fn emit_cache_general_use() { let temp_dir = TempDir::new(); - let disk_cache = DiskCache::new(temp_dir.path().as_path()); + let disk_cache = + DiskCache::new(CliSys::default(), temp_dir.path().as_path()); let cache = EmitCache { disk_cache: disk_cache.clone(), file_serializer: EmitFileSerializer { diff --git a/cli/cache/fast_check.rs b/cli/cache/fast_check.rs index 43be1b71863e90..323312d0579182 100644 --- a/cli/cache/fast_check.rs +++ b/cli/cache/fast_check.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_core::error::AnyError; use deno_graph::FastCheckCacheItem; diff --git a/cli/cache/incremental.rs b/cli/cache/incremental.rs index 2d31b4125ec55a..9ba343f2734d92 100644 --- a/cli/cache/incremental.rs +++ b/cli/cache/incremental.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::collections::HashMap; use std::path::Path; diff --git a/cli/cache/mod.rs b/cli/cache/mod.rs index 50fc135ddffcd3..868811c5876122 100644 --- a/cli/cache/mod.rs +++ b/cli/cache/mod.rs @@ -1,18 +1,14 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::args::jsr_url; -use crate::args::CacheSetting; -use crate::errors::get_error_class_name; -use crate::file_fetcher::FetchNoFollowOptions; -use crate::file_fetcher::FetchOptions; -use crate::file_fetcher::FetchPermissionsOptionRef; -use crate::file_fetcher::FileFetcher; -use crate::file_fetcher::FileOrRedirect; -use crate::util::fs::atomic_write_file_with_retries; -use crate::util::fs::atomic_write_file_with_retries_and_fs; -use crate::util::fs::AtomicWriteFileFsAdapter; +use std::collections::HashMap; +use std::path::PathBuf; +use std::sync::Arc; use deno_ast::MediaType; +use deno_cache_dir::file_fetcher::CacheSetting; +use deno_cache_dir::file_fetcher::FetchNoFollowErrorKind; +use deno_cache_dir::file_fetcher::FileOrRedirect; +use deno_core::error::AnyError; use deno_core::futures; use deno_core::futures::FutureExt; use deno_core::ModuleSpecifier; @@ -20,14 +16,15 @@ use deno_graph::source::CacheInfo; use deno_graph::source::LoadFuture; use deno_graph::source::LoadResponse; use deno_graph::source::Loader; -use deno_runtime::deno_fs; use deno_runtime::deno_permissions::PermissionsContainer; use node_resolver::InNpmPackageChecker; -use std::collections::HashMap; -use std::path::Path; -use std::path::PathBuf; -use std::sync::Arc; -use std::time::SystemTime; + +use crate::args::jsr_url; +use crate::file_fetcher::CliFetchNoFollowErrorKind; +use crate::file_fetcher::CliFileFetcher; +use crate::file_fetcher::FetchNoFollowOptions; +use crate::file_fetcher::FetchPermissionsOptionRef; +use crate::sys::CliSys; mod cache_db; mod caches; @@ -48,7 +45,8 @@ pub use caches::Caches; pub use check::TypeCheckCache; pub use code_cache::CodeCache; pub use common::FastInsecureHasher; -pub use deno_dir::dirs::home_dir; +/// Permissions used to save a file in the disk caches. +pub use deno_cache_dir::CACHE_PERM; pub use deno_dir::DenoDir; pub use deno_dir::DenoDirProvider; pub use disk_cache::DiskCache; @@ -60,116 +58,9 @@ pub use node::NodeAnalysisCache; pub use parsed_source::LazyGraphSourceParser; pub use parsed_source::ParsedSourceCache; -/// Permissions used to save a file in the disk caches. -pub const CACHE_PERM: u32 = 0o644; - -#[derive(Debug, Clone)] -pub struct RealDenoCacheEnv; - -impl deno_cache_dir::DenoCacheEnv for RealDenoCacheEnv { - fn read_file_bytes(&self, path: &Path) -> std::io::Result> { - std::fs::read(path) - } - - fn atomic_write_file( - &self, - path: &Path, - bytes: &[u8], - ) -> std::io::Result<()> { - atomic_write_file_with_retries(path, bytes, CACHE_PERM) - } - - fn canonicalize_path(&self, path: &Path) -> std::io::Result { - crate::util::fs::canonicalize_path(path) - } - - fn create_dir_all(&self, path: &Path) -> std::io::Result<()> { - std::fs::create_dir_all(path) - } - - fn modified(&self, path: &Path) -> std::io::Result> { - match std::fs::metadata(path) { - Ok(metadata) => Ok(Some( - metadata.modified().unwrap_or_else(|_| SystemTime::now()), - )), - Err(err) if err.kind() == std::io::ErrorKind::NotFound => Ok(None), - Err(err) => Err(err), - } - } - - fn is_file(&self, path: &Path) -> bool { - path.is_file() - } - - fn time_now(&self) -> SystemTime { - SystemTime::now() - } -} - -#[derive(Debug, Clone)] -pub struct DenoCacheEnvFsAdapter<'a>( - pub &'a dyn deno_runtime::deno_fs::FileSystem, -); - -impl<'a> deno_cache_dir::DenoCacheEnv for DenoCacheEnvFsAdapter<'a> { - fn read_file_bytes(&self, path: &Path) -> std::io::Result> { - self - .0 - .read_file_sync(path, None) - .map_err(|err| err.into_io_error()) - } - - fn atomic_write_file( - &self, - path: &Path, - bytes: &[u8], - ) -> std::io::Result<()> { - atomic_write_file_with_retries_and_fs( - &AtomicWriteFileFsAdapter { - fs: self.0, - write_mode: CACHE_PERM, - }, - path, - bytes, - ) - } - - fn canonicalize_path(&self, path: &Path) -> std::io::Result { - self.0.realpath_sync(path).map_err(|e| e.into_io_error()) - } - - fn create_dir_all(&self, path: &Path) -> std::io::Result<()> { - self - .0 - .mkdir_sync(path, true, None) - .map_err(|e| e.into_io_error()) - } - - fn modified(&self, path: &Path) -> std::io::Result> { - self - .0 - .stat_sync(path) - .map(|stat| { - stat - .mtime - .map(|ts| SystemTime::UNIX_EPOCH + std::time::Duration::from_secs(ts)) - }) - .map_err(|e| e.into_io_error()) - } - - fn is_file(&self, path: &Path) -> bool { - self.0.is_file_sync(path) - } - - fn time_now(&self) -> SystemTime { - SystemTime::now() - } -} - -pub type GlobalHttpCache = deno_cache_dir::GlobalHttpCache; -pub type LocalHttpCache = deno_cache_dir::LocalHttpCache; -pub type LocalLspHttpCache = - deno_cache_dir::LocalLspHttpCache; +pub type GlobalHttpCache = deno_cache_dir::GlobalHttpCache; +pub type LocalHttpCache = deno_cache_dir::LocalHttpCache; +pub type LocalLspHttpCache = deno_cache_dir::LocalLspHttpCache; pub use deno_cache_dir::HttpCache; pub struct FetchCacherOptions { @@ -183,31 +74,31 @@ pub struct FetchCacherOptions { /// a concise interface to the DENO_DIR when building module graphs. pub struct FetchCacher { pub file_header_overrides: HashMap>, - file_fetcher: Arc, - fs: Arc, + file_fetcher: Arc, global_http_cache: Arc, in_npm_pkg_checker: Arc, module_info_cache: Arc, permissions: PermissionsContainer, + sys: CliSys, is_deno_publish: bool, cache_info_enabled: bool, } impl FetchCacher { pub fn new( - file_fetcher: Arc, - fs: Arc, + file_fetcher: Arc, global_http_cache: Arc, in_npm_pkg_checker: Arc, module_info_cache: Arc, + sys: CliSys, options: FetchCacherOptions, ) -> Self { Self { file_fetcher, - fs, global_http_cache, in_npm_pkg_checker, module_info_cache, + sys, file_header_overrides: options.file_header_overrides, permissions: options.permissions, is_deno_publish: options.is_deno_publish, @@ -269,9 +160,8 @@ impl Loader for FetchCacher { // symlinked to `/my-project-2/node_modules`), so first we checked if the path // is in a node_modules dir to avoid needlessly canonicalizing, then now compare // against the canonicalized specifier. - let specifier = crate::node::resolve_specifier_into_node_modules( - specifier, - self.fs.as_ref(), + let specifier = node_resolver::resolve_specifier_into_node_modules( + &self.sys, specifier, ); if self.in_npm_pkg_checker.in_npm_package(&specifier) { return Box::pin(futures::future::ready(Ok(Some( @@ -313,18 +203,18 @@ impl Loader for FetchCacher { LoaderCacheSetting::Only => Some(CacheSetting::Only), }; file_fetcher - .fetch_no_follow_with_options(FetchNoFollowOptions { - fetch_options: FetchOptions { - specifier: &specifier, - permissions: if is_statically_analyzable { - FetchPermissionsOptionRef::StaticContainer(&permissions) - } else { - FetchPermissionsOptionRef::DynamicContainer(&permissions) - }, - maybe_auth: None, - maybe_accept: None, - maybe_cache_setting: maybe_cache_setting.as_ref(), - }, + .fetch_no_follow( + &specifier, + FetchPermissionsOptionRef::Restricted(&permissions, + if is_statically_analyzable { + deno_runtime::deno_permissions::CheckSpecifierKind::Static + } else { + deno_runtime::deno_permissions::CheckSpecifierKind::Dynamic + }), + FetchNoFollowOptions { + maybe_auth: None, + maybe_accept: None, + maybe_cache_setting: maybe_cache_setting.as_ref(), maybe_checksum: options.maybe_checksum.as_ref(), }) .await @@ -341,7 +231,7 @@ impl Loader for FetchCacher { (None, None) => None, }; Ok(Some(LoadResponse::Module { - specifier: file.specifier, + specifier: file.url, maybe_headers, content: file.source, })) @@ -354,18 +244,46 @@ impl Loader for FetchCacher { } }) .unwrap_or_else(|err| { - if let Some(io_err) = err.downcast_ref::() { - if io_err.kind() == std::io::ErrorKind::NotFound { - return Ok(None); - } else { - return Err(err); - } - } - let error_class_name = get_error_class_name(&err); - match error_class_name { - "NotFound" => Ok(None), - "NotCached" if options.cache_setting == LoaderCacheSetting::Only => Ok(None), - _ => Err(err), + let err = err.into_kind(); + match err { + CliFetchNoFollowErrorKind::FetchNoFollow(err) => { + let err = err.into_kind(); + match err { + FetchNoFollowErrorKind::NotFound(_) => Ok(None), + FetchNoFollowErrorKind::UrlToFilePath { .. } | + FetchNoFollowErrorKind::ReadingBlobUrl { .. } | + FetchNoFollowErrorKind::ReadingFile { .. } | + FetchNoFollowErrorKind::FetchingRemote { .. } | + FetchNoFollowErrorKind::ClientError { .. } | + FetchNoFollowErrorKind::NoRemote { .. } | + FetchNoFollowErrorKind::DataUrlDecode { .. } | + FetchNoFollowErrorKind::RedirectResolution { .. } | + FetchNoFollowErrorKind::CacheRead { .. } | + FetchNoFollowErrorKind::CacheSave { .. } | + FetchNoFollowErrorKind::UnsupportedScheme { .. } | + FetchNoFollowErrorKind::RedirectHeaderParse { .. } | + FetchNoFollowErrorKind::InvalidHeader { .. } => Err(AnyError::from(err)), + FetchNoFollowErrorKind::NotCached { .. } => { + if options.cache_setting == LoaderCacheSetting::Only { + Ok(None) + } else { + Err(AnyError::from(err)) + } + }, + FetchNoFollowErrorKind::ChecksumIntegrity(err) => { + // convert to the equivalent deno_graph error so that it + // enhances it if this is passed to deno_graph + Err( + deno_graph::source::ChecksumIntegrityError { + actual: err.actual, + expected: err.expected, + } + .into(), + ) + } + } + }, + CliFetchNoFollowErrorKind::PermissionCheck(permission_check_error) => Err(AnyError::from(permission_check_error)), } }) } diff --git a/cli/cache/module_info.rs b/cli/cache/module_info.rs index 060a6f4f0c94c4..671e7e3dc863e7 100644 --- a/cli/cache/module_info.rs +++ b/cli/cache/module_info.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::sync::Arc; @@ -284,6 +284,7 @@ fn serialize_media_type(media_type: MediaType) -> i64 { #[cfg(test)] mod test { + use deno_graph::JsDocImportInfo; use deno_graph::PositionRange; use deno_graph::SpecifierWithRange; @@ -308,18 +309,21 @@ mod test { ); let mut module_info = ModuleInfo::default(); - module_info.jsdoc_imports.push(SpecifierWithRange { - range: PositionRange { - start: deno_graph::Position { - line: 0, - character: 3, - }, - end: deno_graph::Position { - line: 1, - character: 2, + module_info.jsdoc_imports.push(JsDocImportInfo { + specifier: SpecifierWithRange { + range: PositionRange { + start: deno_graph::Position { + line: 0, + character: 3, + }, + end: deno_graph::Position { + line: 1, + character: 2, + }, }, + text: "test".to_string(), }, - text: "test".to_string(), + resolution_mode: None, }); cache .set_module_info( diff --git a/cli/cache/node.rs b/cli/cache/node.rs index e80342e5c017df..89e372de43b654 100644 --- a/cli/cache/node.rs +++ b/cli/cache/node.rs @@ -1,15 +1,14 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_core::error::AnyError; use deno_core::serde_json; use deno_runtime::deno_webstorage::rusqlite::params; -use crate::node::CliCjsAnalysis; - use super::cache_db::CacheDB; use super::cache_db::CacheDBConfiguration; use super::cache_db::CacheFailure; use super::CacheDBHash; +use crate::node::CliCjsAnalysis; pub static NODE_ANALYSIS_CACHE_DB: CacheDBConfiguration = CacheDBConfiguration { diff --git a/cli/cache/parsed_source.rs b/cli/cache/parsed_source.rs index 7e819ae9985ba3..15207f4ba75fd6 100644 --- a/cli/cache/parsed_source.rs +++ b/cli/cache/parsed_source.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::collections::HashMap; use std::sync::Arc; @@ -95,11 +95,21 @@ impl ParsedSourceCache { self.sources.lock().remove(specifier); } + /// Fress all parsed sources from memory. + pub fn free_all(&self) { + self.sources.lock().clear(); + } + /// Creates a parser that will reuse a ParsedSource from the store /// if it exists, or else parse. pub fn as_capturing_parser(&self) -> CapturingEsParser { CapturingEsParser::new(None, self) } + + #[cfg(test)] + pub fn len(&self) -> usize { + self.sources.lock().len() + } } /// It's ok that this is racy since in non-LSP situations diff --git a/cli/cdp.rs b/cli/cdp.rs index c5ff587dde6820..df82d58d9f7216 100644 --- a/cli/cdp.rs +++ b/cli/cdp.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /// use deno_core::serde_json::Value; diff --git a/cli/clippy.toml b/cli/clippy.toml index f1c25acfb87da6..21a544aebd31af 100644 --- a/cli/clippy.toml +++ b/cli/clippy.toml @@ -4,6 +4,7 @@ disallowed-methods = [ ] disallowed-types = [ { path = "reqwest::Client", reason = "use crate::http_util::HttpClient instead" }, + { path = "sys_traits::impls::RealSys", reason = "use crate::sys::CliSys instead" }, ] ignore-interior-mutability = [ "lsp_types::Uri", diff --git a/cli/emit.rs b/cli/emit.rs index 3cd23b7abbcaa6..32a636de3630fb 100644 --- a/cli/emit.rs +++ b/cli/emit.rs @@ -1,10 +1,8 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::cache::EmitCache; -use crate::cache::FastInsecureHasher; -use crate::cache::ParsedSourceCache; -use crate::resolver::CjsTracker; +use std::sync::Arc; +use deno_ast::EmittedSourceText; use deno_ast::ModuleKind; use deno_ast::SourceMapOption; use deno_ast::SourceRange; @@ -20,7 +18,11 @@ use deno_core::ModuleSpecifier; use deno_graph::MediaType; use deno_graph::Module; use deno_graph::ModuleGraph; -use std::sync::Arc; + +use crate::cache::EmitCache; +use crate::cache::FastInsecureHasher; +use crate::cache::ParsedSourceCache; +use crate::resolver::CjsTracker; #[derive(Debug)] pub struct Emitter { @@ -132,6 +134,7 @@ impl Emitter { &transpile_and_emit_options.0, &transpile_and_emit_options.1, ) + .map(|r| r.text) } }) .await @@ -166,7 +169,8 @@ impl Emitter { source.clone(), &self.transpile_and_emit_options.0, &self.transpile_and_emit_options.1, - )?; + )? + .text; helper.post_emit_parsed_source( specifier, &transpiled_source, @@ -177,6 +181,31 @@ impl Emitter { } } + pub fn emit_parsed_source_for_deno_compile( + &self, + specifier: &ModuleSpecifier, + media_type: MediaType, + module_kind: deno_ast::ModuleKind, + source: &Arc, + ) -> Result<(String, String), AnyError> { + let mut emit_options = self.transpile_and_emit_options.1.clone(); + emit_options.inline_sources = false; + emit_options.source_map = SourceMapOption::Separate; + // strip off the path to have more deterministic builds as we don't care + // about the source name because we manually provide the source map to v8 + emit_options.source_map_base = Some(deno_path_util::url_parent(specifier)); + let source = EmitParsedSourceHelper::transpile( + &self.parsed_source_cache, + specifier, + media_type, + module_kind, + source.clone(), + &self.transpile_and_emit_options.0, + &emit_options, + )?; + Ok((source.text, source.source_map.unwrap())) + } + /// Expects a file URL, panics otherwise. pub async fn load_and_emit_for_hmr( &self, @@ -282,7 +311,7 @@ impl<'a> EmitParsedSourceHelper<'a> { source: Arc, transpile_options: &deno_ast::TranspileOptions, emit_options: &deno_ast::EmitOptions, - ) -> Result { + ) -> Result { // nothing else needs the parsed source at this point, so remove from // the cache in order to not transpile owned let parsed_source = parsed_source_cache @@ -302,8 +331,7 @@ impl<'a> EmitParsedSourceHelper<'a> { source } }; - debug_assert!(transpiled_source.source_map.is_none()); - Ok(transpiled_source.text) + Ok(transpiled_source) } pub fn post_emit_parsed_source( diff --git a/cli/errors.rs b/cli/errors.rs index b1808f733908b4..6500efec503d03 100644 --- a/cli/errors.rs +++ b/cli/errors.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. //! There are many types of errors in Deno: //! - AnyError: a generic wrapper that can encapsulate any type of error. @@ -26,50 +26,55 @@ fn get_diagnostic_class(_: &ParseDiagnostic) -> &'static str { "SyntaxError" } -fn get_module_graph_error_class(err: &ModuleGraphError) -> &'static str { - use deno_graph::JsrLoadError; - use deno_graph::NpmLoadError; - +pub fn get_module_graph_error_class(err: &ModuleGraphError) -> &'static str { match err { ModuleGraphError::ResolutionError(err) | ModuleGraphError::TypesResolutionError(err) => { get_resolution_error_class(err) } - ModuleGraphError::ModuleError(err) => match err { - ModuleError::InvalidTypeAssertion { .. } => "SyntaxError", - ModuleError::ParseErr(_, diagnostic) => get_diagnostic_class(diagnostic), - ModuleError::UnsupportedMediaType { .. } - | ModuleError::UnsupportedImportAttributeType { .. } => "TypeError", - ModuleError::Missing(_, _) | ModuleError::MissingDynamic(_, _) => { - "NotFound" - } - ModuleError::LoadingErr(_, _, err) => match err { - ModuleLoadError::Loader(err) => get_error_class_name(err.as_ref()), - ModuleLoadError::HttpsChecksumIntegrity(_) - | ModuleLoadError::TooManyRedirects => "Error", - ModuleLoadError::NodeUnknownBuiltinModule(_) => "NotFound", - ModuleLoadError::Decode(_) => "TypeError", - ModuleLoadError::Npm(err) => match err { - NpmLoadError::NotSupportedEnvironment - | NpmLoadError::PackageReqResolution(_) - | NpmLoadError::RegistryInfo(_) => "Error", - NpmLoadError::PackageReqReferenceParse(_) => "TypeError", - }, - ModuleLoadError::Jsr(err) => match err { - JsrLoadError::UnsupportedManifestChecksum - | JsrLoadError::PackageFormat(_) => "TypeError", - JsrLoadError::ContentLoadExternalSpecifier - | JsrLoadError::ContentLoad(_) - | JsrLoadError::ContentChecksumIntegrity(_) - | JsrLoadError::PackageManifestLoad(_, _) - | JsrLoadError::PackageVersionManifestChecksumIntegrity(..) - | JsrLoadError::PackageVersionManifestLoad(_, _) - | JsrLoadError::RedirectInPackage(_) => "Error", - JsrLoadError::PackageNotFound(_) - | JsrLoadError::PackageReqNotFound(_) - | JsrLoadError::PackageVersionNotFound(_) - | JsrLoadError::UnknownExport { .. } => "NotFound", - }, + ModuleGraphError::ModuleError(err) => get_module_error_class(err), + } +} + +pub fn get_module_error_class(err: &ModuleError) -> &'static str { + use deno_graph::JsrLoadError; + use deno_graph::NpmLoadError; + + match err { + ModuleError::InvalidTypeAssertion { .. } => "SyntaxError", + ModuleError::ParseErr(_, diagnostic) => get_diagnostic_class(diagnostic), + ModuleError::WasmParseErr(..) => "SyntaxError", + ModuleError::UnsupportedMediaType { .. } + | ModuleError::UnsupportedImportAttributeType { .. } => "TypeError", + ModuleError::Missing(_, _) | ModuleError::MissingDynamic(_, _) => { + "NotFound" + } + ModuleError::LoadingErr(_, _, err) => match err { + ModuleLoadError::Loader(err) => get_error_class_name(err.as_ref()), + ModuleLoadError::HttpsChecksumIntegrity(_) + | ModuleLoadError::TooManyRedirects => "Error", + ModuleLoadError::NodeUnknownBuiltinModule(_) => "NotFound", + ModuleLoadError::Decode(_) => "TypeError", + ModuleLoadError::Npm(err) => match err { + NpmLoadError::NotSupportedEnvironment + | NpmLoadError::PackageReqResolution(_) + | NpmLoadError::RegistryInfo(_) => "Error", + NpmLoadError::PackageReqReferenceParse(_) => "TypeError", + }, + ModuleLoadError::Jsr(err) => match err { + JsrLoadError::UnsupportedManifestChecksum + | JsrLoadError::PackageFormat(_) => "TypeError", + JsrLoadError::ContentLoadExternalSpecifier + | JsrLoadError::ContentLoad(_) + | JsrLoadError::ContentChecksumIntegrity(_) + | JsrLoadError::PackageManifestLoad(_, _) + | JsrLoadError::PackageVersionManifestChecksumIntegrity(..) + | JsrLoadError::PackageVersionManifestLoad(_, _) + | JsrLoadError::RedirectInPackage(_) => "Error", + JsrLoadError::PackageNotFound(_) + | JsrLoadError::PackageReqNotFound(_) + | JsrLoadError::PackageVersionNotFound(_) + | JsrLoadError::UnknownExport { .. } => "NotFound", }, }, } diff --git a/cli/factory.rs b/cli/factory.rs index 7949a83a55bc6a..4ae1d94ea8e9fa 100644 --- a/cli/factory.rs +++ b/cli/factory.rs @@ -1,4 +1,33 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::future::Future; +use std::path::PathBuf; +use std::sync::Arc; + +use deno_cache_dir::npm::NpmCacheDir; +use deno_config::workspace::PackageJsonDepResolution; +use deno_config::workspace::WorkspaceResolver; +use deno_core::error::AnyError; +use deno_core::futures::FutureExt; +use deno_core::FeatureChecker; +use deno_resolver::cjs::IsCjsResolutionMode; +use deno_resolver::npm::NpmReqResolverOptions; +use deno_resolver::DenoResolverOptions; +use deno_resolver::NodeAndNpmReqResolver; +use deno_runtime::deno_fs; +use deno_runtime::deno_fs::RealFs; +use deno_runtime::deno_node::RealIsBuiltInNodeModuleChecker; +use deno_runtime::deno_permissions::Permissions; +use deno_runtime::deno_permissions::PermissionsContainer; +use deno_runtime::deno_tls::rustls::RootCertStore; +use deno_runtime::deno_tls::RootCertStoreProvider; +use deno_runtime::deno_web::BlobStore; +use deno_runtime::inspector_server::InspectorServer; +use deno_runtime::permissions::RuntimePermissionDescriptorParser; +use log::warn; +use node_resolver::analyze::NodeCodeTranslator; +use node_resolver::InNpmPackageChecker; +use once_cell::sync::OnceCell; use crate::args::check_warn_tsconfig; use crate::args::get_root_cert_store; @@ -11,7 +40,6 @@ use crate::args::StorageKeyResolver; use crate::args::TsConfigType; use crate::cache::Caches; use crate::cache::CodeCache; -use crate::cache::DenoCacheEnvFsAdapter; use crate::cache::DenoDir; use crate::cache::DenoDirProvider; use crate::cache::EmitCache; @@ -22,7 +50,7 @@ use crate::cache::ModuleInfoCache; use crate::cache::NodeAnalysisCache; use crate::cache::ParsedSourceCache; use crate::emit::Emitter; -use crate::file_fetcher::FileFetcher; +use crate::file_fetcher::CliFileFetcher; use crate::graph_container::MainModuleGraphContainer; use crate::graph_util::FileWatcherReporter; use crate::graph_util::ModuleGraphBuilder; @@ -32,6 +60,8 @@ use crate::module_loader::CliModuleLoaderFactory; use crate::module_loader::ModuleLoadPreparer; use crate::node::CliCjsCodeAnalyzer; use crate::node::CliNodeCodeTranslator; +use crate::node::CliNodeResolver; +use crate::node::CliPackageJsonResolver; use crate::npm::create_cli_npm_resolver; use crate::npm::create_in_npm_pkg_checker; use crate::npm::CliByonmNpmResolverCreateOptions; @@ -41,17 +71,18 @@ use crate::npm::CliNpmResolver; use crate::npm::CliNpmResolverCreateOptions; use crate::npm::CliNpmResolverManagedSnapshotOption; use crate::npm::CreateInNpmPkgCheckerOptions; +use crate::npm::NpmRegistryReadPermissionChecker; +use crate::npm::NpmRegistryReadPermissionCheckerMode; use crate::resolver::CjsTracker; use crate::resolver::CliDenoResolver; -use crate::resolver::CliDenoResolverFs; use crate::resolver::CliNpmReqResolver; use crate::resolver::CliResolver; use crate::resolver::CliResolverOptions; use crate::resolver::CliSloppyImportsResolver; -use crate::resolver::IsCjsResolverOptions; use crate::resolver::NpmModuleLoader; use crate::resolver::SloppyImportsCachedFs; -use crate::standalone::DenoCompileBinaryWriter; +use crate::standalone::binary::DenoCompileBinaryWriter; +use crate::sys::CliSys; use crate::tools::check::TypeChecker; use crate::tools::coverage::CoverageCollector; use crate::tools::lint::LintRuleProvider; @@ -63,35 +94,6 @@ use crate::util::progress_bar::ProgressBar; use crate::util::progress_bar::ProgressBarStyle; use crate::worker::CliMainWorkerFactory; use crate::worker::CliMainWorkerOptions; -use std::path::PathBuf; - -use deno_cache_dir::npm::NpmCacheDir; -use deno_config::workspace::PackageJsonDepResolution; -use deno_config::workspace::WorkspaceResolver; -use deno_core::error::AnyError; -use deno_core::futures::FutureExt; -use deno_core::FeatureChecker; - -use deno_resolver::npm::NpmReqResolverOptions; -use deno_resolver::DenoResolverOptions; -use deno_resolver::NodeAndNpmReqResolver; -use deno_runtime::deno_fs; -use deno_runtime::deno_node::DenoFsNodeResolverEnv; -use deno_runtime::deno_node::NodeResolver; -use deno_runtime::deno_node::PackageJsonResolver; -use deno_runtime::deno_permissions::Permissions; -use deno_runtime::deno_permissions::PermissionsContainer; -use deno_runtime::deno_tls::rustls::RootCertStore; -use deno_runtime::deno_tls::RootCertStoreProvider; -use deno_runtime::deno_web::BlobStore; -use deno_runtime::inspector_server::InspectorServer; -use deno_runtime::permissions::RuntimePermissionDescriptorParser; -use log::warn; -use node_resolver::analyze::NodeCodeTranslator; -use node_resolver::InNpmPackageChecker; -use once_cell::sync::OnceCell; -use std::future::Future; -use std::sync::Arc; struct CliRootCertStoreProvider { cell: OnceCell, @@ -185,7 +187,7 @@ struct CliFactoryServices { emit_cache: Deferred>, emitter: Deferred>, feature_checker: Deferred>, - file_fetcher: Deferred>, + file_fetcher: Deferred>, fs: Deferred>, global_http_cache: Deferred>, http_cache: Deferred>, @@ -199,13 +201,14 @@ struct CliFactoryServices { module_info_cache: Deferred>, module_load_preparer: Deferred>, node_code_translator: Deferred>, - node_resolver: Deferred>, + node_resolver: Deferred>, npm_cache_dir: Deferred>, npm_req_resolver: Deferred>, npm_resolver: Deferred>, parsed_source_cache: Deferred>, - permission_desc_parser: Deferred>, - pkg_json_resolver: Deferred>, + permission_desc_parser: + Deferred>>, + pkg_json_resolver: Deferred>, resolver: Deferred>, root_cert_store_provider: Deferred>, root_permissions_container: Deferred, @@ -255,7 +258,7 @@ impl CliFactory { pub fn cli_options(&self) -> Result<&Arc, AnyError> { self.services.cli_options.get_or_try_init(|| { - CliOptions::from_flags(self.flags.clone()).map(Arc::new) + CliOptions::from_flags(&self.sys(), self.flags.clone()).map(Arc::new) }) } @@ -318,8 +321,8 @@ impl CliFactory { pub fn global_http_cache(&self) -> Result<&Arc, AnyError> { self.services.global_http_cache.get_or_try_init(|| { Ok(Arc::new(GlobalHttpCache::new( + self.sys(), self.deno_dir()?.remote_folder_path(), - crate::cache::RealDenoCacheEnv, ))) }) } @@ -350,22 +353,28 @@ impl CliFactory { }) } - pub fn file_fetcher(&self) -> Result<&Arc, AnyError> { + pub fn file_fetcher(&self) -> Result<&Arc, AnyError> { self.services.file_fetcher.get_or_try_init(|| { let cli_options = self.cli_options()?; - Ok(Arc::new(FileFetcher::new( + Ok(Arc::new(CliFileFetcher::new( self.http_cache()?.clone(), - cli_options.cache_setting(), - !cli_options.no_remote(), self.http_client_provider().clone(), + self.sys(), self.blob_store().clone(), Some(self.text_only_progress_bar().clone()), + !cli_options.no_remote(), + cli_options.cache_setting(), + log::Level::Info, ))) }) } pub fn fs(&self) -> &Arc { - self.services.fs.get_or_init(|| Arc::new(deno_fs::RealFs)) + self.services.fs.get_or_init(|| Arc::new(RealFs)) + } + + pub fn sys(&self) -> CliSys { + CliSys::default() // very cheap to make } pub fn in_npm_pkg_checker( @@ -391,11 +400,10 @@ impl CliFactory { pub fn npm_cache_dir(&self) -> Result<&Arc, AnyError> { self.services.npm_cache_dir.get_or_try_init(|| { - let fs = self.fs(); let global_path = self.deno_dir()?.npm_folder_path(); let cli_options = self.cli_options()?; Ok(Arc::new(NpmCacheDir::new( - &DenoCacheEnvFsAdapter(fs.as_ref()), + &self.sys(), global_path, cli_options.npmrc().get_all_known_registries_urls(), ))) @@ -410,12 +418,11 @@ impl CliFactory { .npm_resolver .get_or_try_init_async( async { - let fs = self.fs(); let cli_options = self.cli_options()?; create_cli_npm_resolver(if cli_options.use_byonm() { CliNpmResolverCreateOptions::Byonm( CliByonmNpmResolverCreateOptions { - fs: CliDenoResolverFs(fs.clone()), + sys: self.sys(), pkg_json_resolver: self.pkg_json_resolver().clone(), root_node_modules_dir: Some( match cli_options.node_modules_dir_path() { @@ -433,6 +440,13 @@ impl CliFactory { } else { CliNpmResolverCreateOptions::Managed( CliManagedNpmResolverCreateOptions { + http_client_provider: self.http_client_provider().clone(), + npm_install_deps_provider: Arc::new( + NpmInstallDepsProvider::from_workspace( + cli_options.workspace(), + ), + ), + sys: self.sys(), snapshot: match cli_options.resolve_npm_resolution_snapshot()? { Some(snapshot) => { CliNpmResolverManagedSnapshotOption::Specified(Some( @@ -451,19 +465,12 @@ impl CliFactory { }, }, maybe_lockfile: cli_options.maybe_lockfile().cloned(), - fs: fs.clone(), - http_client_provider: self.http_client_provider().clone(), npm_cache_dir: self.npm_cache_dir()?.clone(), cache_setting: cli_options.cache_setting(), text_only_progress_bar: self.text_only_progress_bar().clone(), maybe_node_modules_path: cli_options .node_modules_dir_path() .cloned(), - npm_install_deps_provider: Arc::new( - NpmInstallDepsProvider::from_workspace( - cli_options.workspace(), - ), - ), npm_system_info: cli_options.npm_system_info(), npmrc: cli_options.npmrc().clone(), lifecycle_scripts: cli_options.lifecycle_scripts_config(), @@ -486,7 +493,7 @@ impl CliFactory { .get_or_try_init(|| { Ok(self.cli_options()?.unstable_sloppy_imports().then(|| { Arc::new(CliSloppyImportsResolver::new(SloppyImportsCachedFs::new( - self.fs().clone(), + self.sys(), ))) })) }) @@ -504,7 +511,12 @@ impl CliFactory { let resolver = cli_options .create_workspace_resolver( self.file_fetcher()?, - if cli_options.use_byonm() { + if cli_options.use_byonm() + && !matches!( + cli_options.sub_command(), + DenoSubcommand::Publish(_) + ) + { PackageJsonDepResolution::Disabled } else { // todo(dsherret): this should be false for nodeModulesDir: true @@ -642,21 +654,22 @@ impl CliFactory { )) } - pub async fn node_resolver(&self) -> Result<&Arc, AnyError> { + pub async fn node_resolver(&self) -> Result<&Arc, AnyError> { self .services .node_resolver .get_or_try_init_async( async { - Ok(Arc::new(NodeResolver::new( - DenoFsNodeResolverEnv::new(self.fs().clone()), + Ok(Arc::new(CliNodeResolver::new( self.in_npm_pkg_checker()?.clone(), + RealIsBuiltInNodeModuleChecker, self .npm_resolver() .await? .clone() .into_npm_pkg_folder_resolver(), self.pkg_json_resolver().clone(), + self.sys(), ))) } .boxed_local(), @@ -684,7 +697,6 @@ impl CliFactory { Ok(Arc::new(NodeCodeTranslator::new( cjs_esm_analyzer, - DenoFsNodeResolverEnv::new(self.fs().clone()), self.in_npm_pkg_checker()?.clone(), node_resolver, self @@ -693,6 +705,7 @@ impl CliFactory { .clone() .into_npm_pkg_folder_resolver(), self.pkg_json_resolver().clone(), + self.sys(), ))) }) .await @@ -708,7 +721,7 @@ impl CliFactory { let npm_resolver = self.npm_resolver().await?; Ok(Arc::new(CliNpmReqResolver::new(NpmReqResolverOptions { byonm_resolver: (npm_resolver.clone()).into_maybe_byonm(), - fs: CliDenoResolverFs(self.fs().clone()), + sys: self.sys(), in_npm_pkg_checker: self.in_npm_pkg_checker()?.clone(), node_resolver: self.node_resolver().await?.clone(), npm_req_resolver: npm_resolver.clone().into_npm_req_resolver(), @@ -717,12 +730,11 @@ impl CliFactory { .await } - pub fn pkg_json_resolver(&self) -> &Arc { - self.services.pkg_json_resolver.get_or_init(|| { - Arc::new(PackageJsonResolver::new(DenoFsNodeResolverEnv::new( - self.fs().clone(), - ))) - }) + pub fn pkg_json_resolver(&self) -> &Arc { + self + .services + .pkg_json_resolver + .get_or_init(|| Arc::new(CliPackageJsonResolver::new(self.sys()))) } pub async fn type_checker(&self) -> Result<&Arc, AnyError> { @@ -741,6 +753,7 @@ impl CliFactory { self.module_graph_builder().await?.clone(), self.node_resolver().await?.clone(), self.npm_resolver().await?.clone(), + self.sys(), ))) }) .await @@ -759,7 +772,6 @@ impl CliFactory { self.cjs_tracker()?.clone(), cli_options.clone(), self.file_fetcher()?.clone(), - self.fs().clone(), self.global_http_cache()?.clone(), self.in_npm_pkg_checker()?.clone(), cli_options.maybe_lockfile().cloned(), @@ -769,6 +781,7 @@ impl CliFactory { self.parsed_source_cache().clone(), self.resolver().await?.clone(), self.root_permissions_container()?.clone(), + self.sys(), ))) }) .await @@ -845,9 +858,12 @@ impl CliFactory { Ok(Arc::new(CjsTracker::new( self.in_npm_pkg_checker()?.clone(), self.pkg_json_resolver().clone(), - IsCjsResolverOptions { - detect_cjs: options.detect_cjs(), - is_node_main: options.is_node_main(), + if options.is_node_main() || options.unstable_detect_cjs() { + IsCjsResolutionMode::ImplicitTypeCommonJs + } else if options.detect_cjs() { + IsCjsResolutionMode::ExplicitTypeCommonJs + } else { + IsCjsResolutionMode::Disabled }, ))) }) @@ -855,10 +871,9 @@ impl CliFactory { pub fn permission_desc_parser( &self, - ) -> Result<&Arc, AnyError> { + ) -> Result<&Arc>, AnyError> { self.services.permission_desc_parser.get_or_try_init(|| { - let fs = self.fs().clone(); - Ok(Arc::new(RuntimePermissionDescriptorParser::new(fs))) + Ok(Arc::new(RuntimePermissionDescriptorParser::new(self.sys()))) }) } @@ -884,6 +899,7 @@ impl CliFactory { let cli_options = self.cli_options()?; Ok(DenoCompileBinaryWriter::new( self.cjs_tracker()?, + self.cli_options()?, self.deno_dir()?, self.emitter()?, self.file_fetcher()?, @@ -928,6 +944,19 @@ impl CliFactory { let cjs_tracker = self.cjs_tracker()?.clone(); let pkg_json_resolver = self.pkg_json_resolver().clone(); let npm_req_resolver = self.npm_req_resolver().await?; + let npm_registry_permission_checker = { + let mode = if cli_options.use_byonm() { + NpmRegistryReadPermissionCheckerMode::Byonm + } else if let Some(node_modules_dir) = cli_options.node_modules_dir_path() + { + NpmRegistryReadPermissionCheckerMode::Local(node_modules_dir.clone()) + } else { + NpmRegistryReadPermissionCheckerMode::Global( + self.npm_cache_dir()?.root_dir().to_path_buf(), + ) + }; + Arc::new(NpmRegistryReadPermissionChecker::new(self.sys(), mode)) + }; Ok(CliMainWorkerFactory::new( self.blob_store().clone(), @@ -950,21 +979,22 @@ impl CliFactory { None }, self.emitter()?.clone(), - fs.clone(), in_npm_pkg_checker.clone(), self.main_module_graph_container().await?.clone(), self.module_load_preparer().await?.clone(), node_code_translator.clone(), node_resolver.clone(), - npm_req_resolver.clone(), - cli_npm_resolver.clone(), NpmModuleLoader::new( self.cjs_tracker()?.clone(), fs.clone(), node_code_translator.clone(), ), + npm_registry_permission_checker, + npm_req_resolver.clone(), + cli_npm_resolver.clone(), self.parsed_source_cache().clone(), self.resolver().await?.clone(), + self.sys(), )), node_resolver.clone(), npm_resolver.clone(), @@ -972,9 +1002,11 @@ impl CliFactory { self.root_cert_store_provider().clone(), self.root_permissions_container()?.clone(), StorageKeyResolver::from_options(cli_options), + self.sys(), cli_options.sub_command().clone(), self.create_cli_main_worker_options()?, self.cli_options()?.otel_config(), + self.cli_options()?.default_npm_caching_strategy(), )) } diff --git a/cli/file_fetcher.rs b/cli/file_fetcher.rs index 640f83c35cbb98..cfc26d7e699f38 100644 --- a/cli/file_fetcher.rs +++ b/cli/file_fetcher.rs @@ -1,41 +1,44 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::args::CacheSetting; -use crate::auth_tokens::AuthTokens; -use crate::cache::HttpCache; -use crate::colors; -use crate::http_util::CacheSemantics; -use crate::http_util::FetchOnceArgs; -use crate::http_util::FetchOnceResult; -use crate::http_util::HttpClientProvider; -use crate::util::progress_bar::ProgressBar; +use std::borrow::Cow; +use std::collections::HashMap; +use std::sync::Arc; +use boxed_error::Boxed; use deno_ast::MediaType; +use deno_cache_dir::file_fetcher::AuthTokens; +use deno_cache_dir::file_fetcher::BlobData; +use deno_cache_dir::file_fetcher::CacheSetting; +use deno_cache_dir::file_fetcher::FetchNoFollowError; +use deno_cache_dir::file_fetcher::File; +use deno_cache_dir::file_fetcher::FileFetcherOptions; +use deno_cache_dir::file_fetcher::FileOrRedirect; +use deno_cache_dir::file_fetcher::SendError; +use deno_cache_dir::file_fetcher::SendResponse; +use deno_cache_dir::file_fetcher::TooManyRedirectsError; +use deno_cache_dir::file_fetcher::UnsupportedSchemeError; use deno_core::anyhow::Context; -use deno_core::error::custom_error; -use deno_core::error::generic_error; -use deno_core::error::uri_error; use deno_core::error::AnyError; use deno_core::parking_lot::Mutex; use deno_core::url::Url; use deno_core::ModuleSpecifier; +use deno_error::JsError; use deno_graph::source::LoaderChecksum; - -use deno_path_util::url_to_file_path; +use deno_runtime::deno_permissions::CheckSpecifierKind; +use deno_runtime::deno_permissions::PermissionCheckError; use deno_runtime::deno_permissions::PermissionsContainer; use deno_runtime::deno_web::BlobStore; use http::header; -use log::debug; -use std::borrow::Cow; -use std::collections::HashMap; -use std::env; -use std::fs; -use std::path::PathBuf; -use std::sync::Arc; -use std::time::SystemTime; +use http::HeaderMap; +use http::StatusCode; +use thiserror::Error; -pub const SUPPORTED_SCHEMES: [&str; 5] = - ["data", "blob", "file", "http", "https"]; +use crate::cache::HttpCache; +use crate::colors; +use crate::http_util::get_response_body_with_progress; +use crate::http_util::HttpClientProvider; +use crate::sys::CliSys; +use crate::util::progress_bar::ProgressBar; #[derive(Debug, Clone, Eq, PartialEq)] pub struct TextDecodedFile { @@ -47,63 +50,19 @@ pub struct TextDecodedFile { pub source: Arc, } -#[derive(Debug, Clone, Eq, PartialEq)] -pub enum FileOrRedirect { - File(File), - Redirect(ModuleSpecifier), -} - -impl FileOrRedirect { - fn from_deno_cache_entry( - specifier: &ModuleSpecifier, - cache_entry: deno_cache_dir::CacheEntry, - ) -> Result { - if let Some(redirect_to) = cache_entry.metadata.headers.get("location") { - let redirect = - deno_core::resolve_import(redirect_to, specifier.as_str())?; - Ok(FileOrRedirect::Redirect(redirect)) - } else { - Ok(FileOrRedirect::File(File { - specifier: specifier.clone(), - maybe_headers: Some(cache_entry.metadata.headers), - source: Arc::from(cache_entry.content), - })) - } - } -} - -/// A structure representing a source file. -#[derive(Debug, Clone, Eq, PartialEq)] -pub struct File { - /// The _final_ specifier for the file. The requested specifier and the final - /// specifier maybe different for remote files that have been redirected. - pub specifier: ModuleSpecifier, - pub maybe_headers: Option>, - /// The source of the file. - pub source: Arc<[u8]>, -} - -impl File { - pub fn resolve_media_type_and_charset(&self) -> (MediaType, Option<&str>) { - deno_graph::source::resolve_media_type_and_charset_from_headers( - &self.specifier, - self.maybe_headers.as_ref(), - ) - } - +impl TextDecodedFile { /// Decodes the source bytes into a string handling any encoding rules /// for local vs remote files and dealing with the charset. - pub fn into_text_decoded(self) -> Result { - // lots of borrow checker fighting here + pub fn decode(file: File) -> Result { let (media_type, maybe_charset) = deno_graph::source::resolve_media_type_and_charset_from_headers( - &self.specifier, - self.maybe_headers.as_ref(), + &file.url, + file.maybe_headers.as_ref(), ); - let specifier = self.specifier; + let specifier = file.url; match deno_graph::source::decode_source( &specifier, - self.source, + file.source, maybe_charset, ) { Ok(source) => Ok(TextDecodedFile { @@ -118,14 +77,146 @@ impl File { } } -#[derive(Debug, Clone, Default)] -struct MemoryFiles(Arc>>); +#[derive(Debug)] +struct BlobStoreAdapter(Arc); -impl MemoryFiles { - pub fn get(&self, specifier: &ModuleSpecifier) -> Option { - self.0.lock().get(specifier).cloned() +#[async_trait::async_trait(?Send)] +impl deno_cache_dir::file_fetcher::BlobStore for BlobStoreAdapter { + async fn get(&self, specifier: &Url) -> std::io::Result> { + let Some(blob) = self.0.get_object_url(specifier.clone()) else { + return Ok(None); + }; + Ok(Some(BlobData { + media_type: blob.media_type.clone(), + bytes: blob.read_all().await, + })) + } +} + +#[derive(Debug)] +struct HttpClientAdapter { + http_client_provider: Arc, + download_log_level: log::Level, + progress_bar: Option, +} + +#[async_trait::async_trait(?Send)] +impl deno_cache_dir::file_fetcher::HttpClient for HttpClientAdapter { + async fn send_no_follow( + &self, + url: &Url, + headers: HeaderMap, + ) -> Result { + async fn handle_request_or_server_error( + retried: &mut bool, + specifier: &Url, + err_str: String, + ) -> Result<(), ()> { + // Retry once, and bail otherwise. + if !*retried { + *retried = true; + log::debug!("Import '{}' failed: {}. Retrying...", specifier, err_str); + tokio::time::sleep(std::time::Duration::from_millis(50)).await; + Ok(()) + } else { + Err(()) + } + } + + let mut maybe_progress_guard = None; + if let Some(pb) = self.progress_bar.as_ref() { + maybe_progress_guard = Some(pb.update(url.as_str())); + } else { + log::log!( + self.download_log_level, + "{} {}", + colors::green("Download"), + url + ); + } + + let mut retried = false; // retry intermittent failures + loop { + let response = match self + .http_client_provider + .get_or_create() + .map_err(|err| SendError::Failed(err.into()))? + .send(url, headers.clone()) + .await + { + Ok(response) => response, + Err(crate::http_util::SendError::Send(err)) => { + if err.is_connect_error() { + handle_request_or_server_error(&mut retried, url, err.to_string()) + .await + .map_err(|()| SendError::Failed(err.into()))?; + continue; + } else { + return Err(SendError::Failed(err.into())); + } + } + Err(crate::http_util::SendError::InvalidUri(err)) => { + return Err(SendError::Failed(err.into())); + } + }; + if response.status() == StatusCode::NOT_MODIFIED { + return Ok(SendResponse::NotModified); + } + + if let Some(warning) = response.headers().get("X-Deno-Warning") { + log::warn!( + "{} {}", + crate::colors::yellow("Warning"), + warning.to_str().unwrap() + ); + } + + if response.status().is_redirection() { + return Ok(SendResponse::Redirect(response.into_parts().0.headers)); + } + + if response.status().is_server_error() { + handle_request_or_server_error( + &mut retried, + url, + response.status().to_string(), + ) + .await + .map_err(|()| SendError::StatusCode(response.status()))?; + } else if response.status().is_client_error() { + let err = if response.status() == StatusCode::NOT_FOUND { + SendError::NotFound + } else { + SendError::StatusCode(response.status()) + }; + return Err(err); + } else { + let body_result = get_response_body_with_progress( + response, + maybe_progress_guard.as_ref(), + ) + .await; + + match body_result { + Ok((headers, body)) => { + return Ok(SendResponse::Success(headers, body)); + } + Err(err) => { + handle_request_or_server_error(&mut retried, url, err.to_string()) + .await + .map_err(|()| SendError::Failed(err.into()))?; + continue; + } + } + } + } } +} +#[derive(Debug, Default)] +struct MemoryFiles(Mutex>); + +impl MemoryFiles { pub fn insert(&self, specifier: ModuleSpecifier, file: File) -> Option { self.0.lock().insert(specifier, file) } @@ -135,416 +226,96 @@ impl MemoryFiles { } } -/// Fetch a source file from the local file system. -fn fetch_local(specifier: &ModuleSpecifier) -> Result { - let local = url_to_file_path(specifier).map_err(|_| { - uri_error(format!("Invalid file path.\n Specifier: {specifier}")) - })?; - // If it doesnt have a extension, we want to treat it as typescript by default - let headers = if local.extension().is_none() { - Some(HashMap::from([( - "content-type".to_string(), - "application/typescript".to_string(), - )])) - } else { - None - }; - let bytes = fs::read(local)?; - - Ok(File { - specifier: specifier.clone(), - maybe_headers: headers, - source: bytes.into(), - }) +impl deno_cache_dir::file_fetcher::MemoryFiles for MemoryFiles { + fn get(&self, specifier: &ModuleSpecifier) -> Option { + self.0.lock().get(specifier).cloned() + } } -/// Return a validated scheme for a given module specifier. -fn get_validated_scheme( - specifier: &ModuleSpecifier, -) -> Result { - let scheme = specifier.scheme(); - if !SUPPORTED_SCHEMES.contains(&scheme) { - // NOTE(bartlomieju): this message list additional `npm` and `jsr` schemes, but they should actually be handled - // before `file_fetcher.rs` APIs are even hit. - let mut all_supported_schemes = SUPPORTED_SCHEMES.to_vec(); - all_supported_schemes.extend_from_slice(&["npm", "jsr"]); - all_supported_schemes.sort(); - let scheme_list = all_supported_schemes - .iter() - .map(|scheme| format!(" - \"{}\"", scheme)) - .collect::>() - .join("\n"); - Err(generic_error(format!( - "Unsupported scheme \"{scheme}\" for module \"{specifier}\". Supported schemes:\n{}", - scheme_list - ))) - } else { - Ok(scheme.to_string()) - } +#[derive(Debug, Boxed, JsError)] +pub struct CliFetchNoFollowError(pub Box); + +#[derive(Debug, Error, JsError)] +pub enum CliFetchNoFollowErrorKind { + #[error(transparent)] + #[class(inherit)] + FetchNoFollow(#[from] FetchNoFollowError), + #[error(transparent)] + #[class(generic)] + PermissionCheck(#[from] PermissionCheckError), } #[derive(Debug, Copy, Clone)] pub enum FetchPermissionsOptionRef<'a> { AllowAll, - DynamicContainer(&'a PermissionsContainer), - StaticContainer(&'a PermissionsContainer), + Restricted(&'a PermissionsContainer, CheckSpecifierKind), } +#[derive(Debug, Default)] pub struct FetchOptions<'a> { - pub specifier: &'a ModuleSpecifier, - pub permissions: FetchPermissionsOptionRef<'a>, pub maybe_auth: Option<(header::HeaderName, header::HeaderValue)>, pub maybe_accept: Option<&'a str>, pub maybe_cache_setting: Option<&'a CacheSetting>, } pub struct FetchNoFollowOptions<'a> { - pub fetch_options: FetchOptions<'a>, - /// This setting doesn't make sense to provide for `FetchOptions` - /// since the required checksum may change for a redirect. + pub maybe_auth: Option<(header::HeaderName, header::HeaderValue)>, + pub maybe_accept: Option<&'a str>, + pub maybe_cache_setting: Option<&'a CacheSetting>, pub maybe_checksum: Option<&'a LoaderChecksum>, } +type DenoCacheDirFileFetcher = deno_cache_dir::file_fetcher::FileFetcher< + BlobStoreAdapter, + CliSys, + HttpClientAdapter, +>; + /// A structure for resolving, fetching and caching source files. #[derive(Debug)] -pub struct FileFetcher { - auth_tokens: AuthTokens, - allow_remote: bool, - memory_files: MemoryFiles, - cache_setting: CacheSetting, - http_cache: Arc, - http_client_provider: Arc, - blob_store: Arc, - download_log_level: log::Level, - progress_bar: Option, +pub struct CliFileFetcher { + file_fetcher: DenoCacheDirFileFetcher, + memory_files: Arc, } -impl FileFetcher { +impl CliFileFetcher { + #[allow(clippy::too_many_arguments)] pub fn new( http_cache: Arc, - cache_setting: CacheSetting, - allow_remote: bool, http_client_provider: Arc, + sys: CliSys, blob_store: Arc, progress_bar: Option, + allow_remote: bool, + cache_setting: CacheSetting, + download_log_level: log::Level, ) -> Self { - Self { - auth_tokens: AuthTokens::new(env::var("DENO_AUTH_TOKENS").ok()), - allow_remote, - memory_files: Default::default(), - cache_setting, + let memory_files = Arc::new(MemoryFiles::default()); + let auth_tokens = AuthTokens::new_from_sys(&sys); + let file_fetcher = DenoCacheDirFileFetcher::new( + BlobStoreAdapter(blob_store), + sys, http_cache, - http_client_provider, - blob_store, - download_log_level: log::Level::Info, - progress_bar, - } - } - - pub fn cache_setting(&self) -> &CacheSetting { - &self.cache_setting - } - - /// Sets the log level to use when outputting the download message. - pub fn set_download_log_level(&mut self, level: log::Level) { - self.download_log_level = level; - } - - /// Fetch cached remote file. - /// - /// This is a recursive operation if source file has redirections. - pub fn fetch_cached( - &self, - specifier: &ModuleSpecifier, - redirect_limit: i64, - ) -> Result, AnyError> { - let mut specifier = Cow::Borrowed(specifier); - for _ in 0..=redirect_limit { - match self.fetch_cached_no_follow(&specifier, None)? { - Some(FileOrRedirect::File(file)) => { - return Ok(Some(file)); - } - Some(FileOrRedirect::Redirect(redirect_specifier)) => { - specifier = Cow::Owned(redirect_specifier); - } - None => { - return Ok(None); - } - } - } - Err(custom_error("Http", "Too many redirects.")) - } - - fn fetch_cached_no_follow( - &self, - specifier: &ModuleSpecifier, - maybe_checksum: Option<&LoaderChecksum>, - ) -> Result, AnyError> { - debug!( - "FileFetcher::fetch_cached_no_follow - specifier: {}", - specifier - ); - - let cache_key = self.http_cache.cache_item_key(specifier)?; // compute this once - let result = self.http_cache.get( - &cache_key, - maybe_checksum - .as_ref() - .map(|c| deno_cache_dir::Checksum::new(c.as_str())), - ); - match result { - Ok(Some(cache_data)) => Ok(Some(FileOrRedirect::from_deno_cache_entry( - specifier, cache_data, - )?)), - Ok(None) => Ok(None), - Err(err) => match err { - deno_cache_dir::CacheReadFileError::Io(err) => Err(err.into()), - deno_cache_dir::CacheReadFileError::ChecksumIntegrity(err) => { - // convert to the equivalent deno_graph error so that it - // enhances it if this is passed to deno_graph - Err( - deno_graph::source::ChecksumIntegrityError { - actual: err.actual, - expected: err.expected, - } - .into(), - ) - } + HttpClientAdapter { + http_client_provider: http_client_provider.clone(), + download_log_level, + progress_bar, + }, + memory_files.clone(), + FileFetcherOptions { + allow_remote, + cache_setting, + auth_tokens, }, - } - } - - /// Convert a data URL into a file, resulting in an error if the URL is - /// invalid. - fn fetch_data_url( - &self, - specifier: &ModuleSpecifier, - ) -> Result { - debug!("FileFetcher::fetch_data_url() - specifier: {}", specifier); - let data_url = deno_graph::source::RawDataUrl::parse(specifier)?; - let (bytes, headers) = data_url.into_bytes_and_headers(); - Ok(File { - specifier: specifier.clone(), - maybe_headers: Some(headers), - source: Arc::from(bytes), - }) - } - - /// Get a blob URL. - async fn fetch_blob_url( - &self, - specifier: &ModuleSpecifier, - ) -> Result { - debug!("FileFetcher::fetch_blob_url() - specifier: {}", specifier); - let blob = self - .blob_store - .get_object_url(specifier.clone()) - .ok_or_else(|| { - custom_error( - "NotFound", - format!("Blob URL not found: \"{specifier}\"."), - ) - })?; - - let bytes = blob.read_all().await; - let headers = - HashMap::from([("content-type".to_string(), blob.media_type.clone())]); - - Ok(File { - specifier: specifier.clone(), - maybe_headers: Some(headers), - source: Arc::from(bytes), - }) - } - - async fn fetch_remote_no_follow( - &self, - specifier: &ModuleSpecifier, - maybe_accept: Option<&str>, - cache_setting: &CacheSetting, - maybe_checksum: Option<&LoaderChecksum>, - maybe_auth: Option<(header::HeaderName, header::HeaderValue)>, - ) -> Result { - debug!( - "FileFetcher::fetch_remote_no_follow - specifier: {}", - specifier ); - - if self.should_use_cache(specifier, cache_setting) { - if let Some(file_or_redirect) = - self.fetch_cached_no_follow(specifier, maybe_checksum)? - { - return Ok(file_or_redirect); - } - } - - if *cache_setting == CacheSetting::Only { - return Err(custom_error( - "NotCached", - format!( - "Specifier not found in cache: \"{specifier}\", --cached-only is specified." - ), - )); - } - - let mut maybe_progress_guard = None; - if let Some(pb) = self.progress_bar.as_ref() { - maybe_progress_guard = Some(pb.update(specifier.as_str())); - } else { - log::log!( - self.download_log_level, - "{} {}", - colors::green("Download"), - specifier - ); - } - - let maybe_etag_cache_entry = self - .http_cache - .cache_item_key(specifier) - .ok() - .and_then(|key| { - self - .http_cache - .get( - &key, - maybe_checksum - .as_ref() - .map(|c| deno_cache_dir::Checksum::new(c.as_str())), - ) - .ok() - .flatten() - }) - .and_then(|cache_entry| { - cache_entry - .metadata - .headers - .get("etag") - .cloned() - .map(|etag| (cache_entry, etag)) - }); - let maybe_auth_token = self.auth_tokens.get(specifier); - - async fn handle_request_or_server_error( - retried: &mut bool, - specifier: &Url, - err_str: String, - ) -> Result<(), AnyError> { - // Retry once, and bail otherwise. - if !*retried { - *retried = true; - log::debug!("Import '{}' failed: {}. Retrying...", specifier, err_str); - tokio::time::sleep(std::time::Duration::from_millis(50)).await; - Ok(()) - } else { - Err(generic_error(format!( - "Import '{}' failed: {}", - specifier, err_str - ))) - } + Self { + file_fetcher, + memory_files, } - - let mut retried = false; // retry intermittent failures - let result = loop { - let result = match self - .http_client_provider - .get_or_create()? - .fetch_no_follow(FetchOnceArgs { - url: specifier.clone(), - maybe_accept: maybe_accept.map(ToOwned::to_owned), - maybe_etag: maybe_etag_cache_entry - .as_ref() - .map(|(_, etag)| etag.clone()), - maybe_auth_token: maybe_auth_token.clone(), - maybe_auth: maybe_auth.clone(), - maybe_progress_guard: maybe_progress_guard.as_ref(), - }) - .await? - { - FetchOnceResult::NotModified => { - let (cache_entry, _) = maybe_etag_cache_entry.unwrap(); - FileOrRedirect::from_deno_cache_entry(specifier, cache_entry) - } - FetchOnceResult::Redirect(redirect_url, headers) => { - self.http_cache.set(specifier, headers, &[])?; - Ok(FileOrRedirect::Redirect(redirect_url)) - } - FetchOnceResult::Code(bytes, headers) => { - self.http_cache.set(specifier, headers.clone(), &bytes)?; - if let Some(checksum) = &maybe_checksum { - checksum.check_source(&bytes)?; - } - Ok(FileOrRedirect::File(File { - specifier: specifier.clone(), - maybe_headers: Some(headers), - source: Arc::from(bytes), - })) - } - FetchOnceResult::RequestError(err) => { - handle_request_or_server_error(&mut retried, specifier, err).await?; - continue; - } - FetchOnceResult::ServerError(status) => { - handle_request_or_server_error( - &mut retried, - specifier, - status.to_string(), - ) - .await?; - continue; - } - }; - break result; - }; - - drop(maybe_progress_guard); - result } - /// Returns if the cache should be used for a given specifier. - fn should_use_cache( - &self, - specifier: &ModuleSpecifier, - cache_setting: &CacheSetting, - ) -> bool { - match cache_setting { - CacheSetting::ReloadAll => false, - CacheSetting::Use | CacheSetting::Only => true, - CacheSetting::RespectHeaders => { - let Ok(cache_key) = self.http_cache.cache_item_key(specifier) else { - return false; - }; - let Ok(Some(headers)) = self.http_cache.read_headers(&cache_key) else { - return false; - }; - let Ok(Some(download_time)) = - self.http_cache.read_download_time(&cache_key) - else { - return false; - }; - let cache_semantics = - CacheSemantics::new(headers, download_time, SystemTime::now()); - cache_semantics.should_use() - } - CacheSetting::ReloadSome(list) => { - let mut url = specifier.clone(); - url.set_fragment(None); - if list.iter().any(|x| x == url.as_str()) { - return false; - } - url.set_query(None); - let mut path = PathBuf::from(url.as_str()); - loop { - if list.contains(&path.to_str().unwrap().to_string()) { - return false; - } - if !path.pop() { - break; - } - } - true - } - } + pub fn cache_setting(&self) -> &CacheSetting { + self.file_fetcher.cache_setting() } #[inline(always)] @@ -579,7 +350,10 @@ impl FileFetcher { .fetch_inner( specifier, None, - FetchPermissionsOptionRef::StaticContainer(permissions), + FetchPermissionsOptionRef::Restricted( + permissions, + CheckSpecifierKind::Static, + ), ) .await } @@ -591,42 +365,50 @@ impl FileFetcher { permissions: FetchPermissionsOptionRef<'_>, ) -> Result { self - .fetch_with_options(FetchOptions { + .fetch_with_options( specifier, permissions, - maybe_auth, - maybe_accept: None, - maybe_cache_setting: None, - }) + FetchOptions { + maybe_auth, + maybe_accept: None, + maybe_cache_setting: None, + }, + ) .await } pub async fn fetch_with_options( &self, + specifier: &ModuleSpecifier, + permissions: FetchPermissionsOptionRef<'_>, options: FetchOptions<'_>, ) -> Result { - self.fetch_with_options_and_max_redirect(options, 10).await + self + .fetch_with_options_and_max_redirect(specifier, permissions, options, 10) + .await } async fn fetch_with_options_and_max_redirect( &self, + specifier: &ModuleSpecifier, + permissions: FetchPermissionsOptionRef<'_>, options: FetchOptions<'_>, max_redirect: usize, ) -> Result { - let mut specifier = Cow::Borrowed(options.specifier); - let mut maybe_auth = options.maybe_auth.clone(); + let mut specifier = Cow::Borrowed(specifier); + let mut maybe_auth = options.maybe_auth; for _ in 0..=max_redirect { match self - .fetch_no_follow_with_options(FetchNoFollowOptions { - fetch_options: FetchOptions { - specifier: &specifier, - permissions: options.permissions, + .fetch_no_follow( + &specifier, + permissions, + FetchNoFollowOptions { maybe_auth: maybe_auth.clone(), maybe_accept: options.maybe_accept, maybe_cache_setting: options.maybe_cache_setting, + maybe_checksum: None, }, - maybe_checksum: None, - }) + ) .await? { FileOrRedirect::File(file) => { @@ -642,92 +424,61 @@ impl FileFetcher { } } - Err(custom_error("Http", "Too many redirects.")) + Err(TooManyRedirectsError(specifier.into_owned()).into()) } /// Fetches without following redirects. - pub async fn fetch_no_follow_with_options( + pub async fn fetch_no_follow( &self, + specifier: &ModuleSpecifier, + permissions: FetchPermissionsOptionRef<'_>, options: FetchNoFollowOptions<'_>, - ) -> Result { - let maybe_checksum = options.maybe_checksum; - let options = options.fetch_options; - let specifier = options.specifier; - // note: this debug output is used by the tests - debug!( - "FileFetcher::fetch_no_follow_with_options - specifier: {}", - specifier - ); - let scheme = get_validated_scheme(specifier)?; - match options.permissions { + ) -> Result { + validate_scheme(specifier).map_err(|err| { + CliFetchNoFollowErrorKind::FetchNoFollow(err.into()).into_box() + })?; + match permissions { FetchPermissionsOptionRef::AllowAll => { // allow } - FetchPermissionsOptionRef::StaticContainer(permissions) => { - permissions.check_specifier( - specifier, - deno_runtime::deno_permissions::CheckSpecifierKind::Static, - )?; - } - FetchPermissionsOptionRef::DynamicContainer(permissions) => { - permissions.check_specifier( - specifier, - deno_runtime::deno_permissions::CheckSpecifierKind::Dynamic, - )?; + FetchPermissionsOptionRef::Restricted(permissions, kind) => { + permissions.check_specifier(specifier, kind)?; } } - if let Some(file) = self.memory_files.get(specifier) { - Ok(FileOrRedirect::File(file)) - } else if scheme == "file" { - // we do not in memory cache files, as this would prevent files on the - // disk changing effecting things like workers and dynamic imports. - fetch_local(specifier).map(FileOrRedirect::File) - } else if scheme == "data" { - self.fetch_data_url(specifier).map(FileOrRedirect::File) - } else if scheme == "blob" { - self - .fetch_blob_url(specifier) - .await - .map(FileOrRedirect::File) - } else if !self.allow_remote { - Err(custom_error( - "NoRemote", - format!("A remote specifier was requested: \"{specifier}\", but --no-remote is specified."), - )) - } else { - self - .fetch_remote_no_follow( - specifier, - options.maybe_accept, - options.maybe_cache_setting.unwrap_or(&self.cache_setting), - maybe_checksum, - options.maybe_auth, - ) - .await - } + self + .file_fetcher + .fetch_no_follow( + specifier, + deno_cache_dir::file_fetcher::FetchNoFollowOptions { + maybe_auth: options.maybe_auth, + maybe_checksum: options + .maybe_checksum + .map(|c| deno_cache_dir::Checksum::new(c.as_str())), + maybe_accept: options.maybe_accept, + maybe_cache_setting: options.maybe_cache_setting, + }, + ) + .await + .map_err(|err| CliFetchNoFollowErrorKind::FetchNoFollow(err).into_box()) } /// A synchronous way to retrieve a source file, where if the file has already /// been cached in memory it will be returned, otherwise for local files will /// be read from disk. - pub fn get_source(&self, specifier: &ModuleSpecifier) -> Option { - let maybe_file = self.memory_files.get(specifier); - if maybe_file.is_none() { - let is_local = specifier.scheme() == "file"; - if is_local { - if let Ok(file) = fetch_local(specifier) { - return Some(file); - } - } - None + pub fn get_cached_source_or_local( + &self, + specifier: &ModuleSpecifier, + ) -> Result, AnyError> { + if specifier.scheme() == "file" { + Ok(self.file_fetcher.fetch_local(specifier)?) } else { - maybe_file + Ok(self.file_fetcher.fetch_cached(specifier, 10)?) } } /// Insert a temporary module for the file fetcher. pub fn insert_memory_files(&self, file: File) -> Option { - self.memory_files.insert(file.specifier.clone(), file) + self.memory_files.insert(file.url.clone(), file) } pub fn clear_memory_files(&self) { @@ -735,23 +486,33 @@ impl FileFetcher { } } +fn validate_scheme(specifier: &Url) -> Result<(), UnsupportedSchemeError> { + match deno_cache_dir::file_fetcher::is_valid_scheme(specifier.scheme()) { + true => Ok(()), + false => Err(UnsupportedSchemeError { + scheme: specifier.scheme().to_string(), + url: specifier.clone(), + }), + } +} + #[cfg(test)] mod tests { - use crate::cache::GlobalHttpCache; - use crate::cache::RealDenoCacheEnv; - use crate::http_util::HttpClientProvider; - - use super::*; - use deno_core::error::get_custom_error_class; + use deno_cache_dir::file_fetcher::FetchNoFollowErrorKind; + use deno_cache_dir::file_fetcher::HttpClient; use deno_core::resolve_url; use deno_runtime::deno_web::Blob; use deno_runtime::deno_web::InMemoryBlobPart; use test_util::TempDir; + use super::*; + use crate::cache::GlobalHttpCache; + use crate::http_util::HttpClientProvider; + fn setup( cache_setting: CacheSetting, maybe_temp_dir: Option, - ) -> (FileFetcher, TempDir) { + ) -> (CliFileFetcher, TempDir) { let (file_fetcher, temp_dir, _) = setup_with_blob_store(cache_setting, maybe_temp_dir); (file_fetcher, temp_dir) @@ -760,22 +521,39 @@ mod tests { fn setup_with_blob_store( cache_setting: CacheSetting, maybe_temp_dir: Option, - ) -> (FileFetcher, TempDir, Arc) { + ) -> (CliFileFetcher, TempDir, Arc) { + let (file_fetcher, temp_dir, blob_store, _) = + setup_with_blob_store_and_cache(cache_setting, maybe_temp_dir); + (file_fetcher, temp_dir, blob_store) + } + + fn setup_with_blob_store_and_cache( + cache_setting: CacheSetting, + maybe_temp_dir: Option, + ) -> ( + CliFileFetcher, + TempDir, + Arc, + Arc, + ) { let temp_dir = maybe_temp_dir.unwrap_or_default(); let location = temp_dir.path().join("remote").to_path_buf(); let blob_store: Arc = Default::default(); - let file_fetcher = FileFetcher::new( - Arc::new(GlobalHttpCache::new(location, RealDenoCacheEnv)), - cache_setting, - true, + let cache = Arc::new(GlobalHttpCache::new(CliSys::default(), location)); + let file_fetcher = CliFileFetcher::new( + cache.clone(), Arc::new(HttpClientProvider::new(None, None)), + CliSys::default(), blob_store.clone(), None, + true, + cache_setting, + log::Level::Info, ); - (file_fetcher, temp_dir, blob_store) + (file_fetcher, temp_dir, blob_store, cache) } - async fn test_fetch(specifier: &ModuleSpecifier) -> (File, FileFetcher) { + async fn test_fetch(specifier: &ModuleSpecifier) -> (File, CliFileFetcher) { let (file_fetcher, _) = setup(CacheSetting::ReloadAll, None); let result = file_fetcher.fetch_bypass_permissions(specifier).await; assert!(result.is_ok()); @@ -786,27 +564,20 @@ mod tests { specifier: &ModuleSpecifier, ) -> (File, HashMap) { let _http_server_guard = test_util::http_server(); - let (file_fetcher, _) = setup(CacheSetting::ReloadAll, None); + let (file_fetcher, _, _, http_cache) = + setup_with_blob_store_and_cache(CacheSetting::ReloadAll, None); let result: Result = file_fetcher .fetch_with_options_and_max_redirect( - FetchOptions { - specifier, - permissions: FetchPermissionsOptionRef::AllowAll, - maybe_auth: None, - maybe_accept: None, - maybe_cache_setting: Some(&file_fetcher.cache_setting), - }, + specifier, + FetchPermissionsOptionRef::AllowAll, + Default::default(), 1, ) .await; - let cache_key = file_fetcher.http_cache.cache_item_key(specifier).unwrap(); + let cache_key = http_cache.cache_item_key(specifier).unwrap(); ( result.unwrap(), - file_fetcher - .http_cache - .read_headers(&cache_key) - .unwrap() - .unwrap(), + http_cache.read_headers(&cache_key).unwrap().unwrap(), ) } @@ -851,28 +622,6 @@ mod tests { ); } - #[test] - fn test_get_validated_scheme() { - let fixtures = vec![ - ("https://deno.land/x/mod.ts", true, "https"), - ("http://deno.land/x/mod.ts", true, "http"), - ("file:///a/b/c.ts", true, "file"), - ("file:///C:/a/b/c.ts", true, "file"), - ("data:,some%20text", true, "data"), - ("ftp://a/b/c.ts", false, ""), - ("mailto:dino@deno.land", false, ""), - ]; - - for (specifier, is_ok, expected) in fixtures { - let specifier = ModuleSpecifier::parse(specifier).unwrap(); - let actual = get_validated_scheme(&specifier); - assert_eq!(actual.is_ok(), is_ok); - if is_ok { - assert_eq!(actual.unwrap(), expected); - } - } - } - #[tokio::test] async fn test_insert_cached() { let (file_fetcher, temp_dir) = setup(CacheSetting::Use, None); @@ -880,7 +629,7 @@ mod tests { let specifier = ModuleSpecifier::from_file_path(&local).unwrap(); let file = File { source: Arc::from("some source code".as_bytes()), - specifier: specifier.clone(), + url: specifier.clone(), maybe_headers: Some(HashMap::from([( "content-type".to_string(), "application/javascript".to_string(), @@ -901,7 +650,7 @@ mod tests { let result = file_fetcher.fetch_bypass_permissions(&specifier).await; assert!(result.is_ok()); - let file = result.unwrap().into_text_decoded().unwrap(); + let file = TextDecodedFile::decode(result.unwrap()).unwrap(); assert_eq!( &*file.source, "export const a = \"a\";\n\nexport enum A {\n A,\n B,\n C,\n}\n" @@ -930,7 +679,7 @@ mod tests { let result = file_fetcher.fetch_bypass_permissions(&specifier).await; assert!(result.is_ok()); - let file = result.unwrap().into_text_decoded().unwrap(); + let file = TextDecodedFile::decode(result.unwrap()).unwrap(); assert_eq!( &*file.source, "export const a = \"a\";\n\nexport enum A {\n A,\n B,\n C,\n}\n" @@ -942,33 +691,36 @@ mod tests { #[tokio::test] async fn test_fetch_complex() { let _http_server_guard = test_util::http_server(); - let (file_fetcher, temp_dir) = setup(CacheSetting::Use, None); + let (file_fetcher, temp_dir, _, http_cache) = + setup_with_blob_store_and_cache(CacheSetting::Use, None); let (file_fetcher_01, _) = setup(CacheSetting::Use, Some(temp_dir.clone())); - let (file_fetcher_02, _) = setup(CacheSetting::Use, Some(temp_dir.clone())); + let (file_fetcher_02, _, _, http_cache_02) = + setup_with_blob_store_and_cache( + CacheSetting::Use, + Some(temp_dir.clone()), + ); let specifier = ModuleSpecifier::parse("http://localhost:4545/subdir/mod2.ts").unwrap(); let result = file_fetcher.fetch_bypass_permissions(&specifier).await; assert!(result.is_ok()); - let file = result.unwrap().into_text_decoded().unwrap(); + let file = TextDecodedFile::decode(result.unwrap()).unwrap(); assert_eq!( &*file.source, "export { printHello } from \"./print_hello.ts\";\n" ); assert_eq!(file.media_type, MediaType::TypeScript); - let cache_item_key = - file_fetcher.http_cache.cache_item_key(&specifier).unwrap(); + let cache_item_key = http_cache.cache_item_key(&specifier).unwrap(); let mut headers = HashMap::new(); headers.insert("content-type".to_string(), "text/javascript".to_string()); - file_fetcher - .http_cache + http_cache .set(&specifier, headers.clone(), file.source.as_bytes()) .unwrap(); let result = file_fetcher_01.fetch_bypass_permissions(&specifier).await; assert!(result.is_ok()); - let file = result.unwrap().into_text_decoded().unwrap(); + let file = TextDecodedFile::decode(result.unwrap()).unwrap(); assert_eq!( &*file.source, "export { printHello } from \"./print_hello.ts\";\n" @@ -977,22 +729,20 @@ mod tests { // the value above. assert_eq!(file.media_type, MediaType::JavaScript); - let headers2 = file_fetcher_02 - .http_cache + let headers2 = http_cache_02 .read_headers(&cache_item_key) .unwrap() .unwrap(); assert_eq!(headers2.get("content-type").unwrap(), "text/javascript"); headers = HashMap::new(); headers.insert("content-type".to_string(), "application/json".to_string()); - file_fetcher_02 - .http_cache + http_cache_02 .set(&specifier, headers.clone(), file.source.as_bytes()) .unwrap(); let result = file_fetcher_02.fetch_bypass_permissions(&specifier).await; assert!(result.is_ok()); - let file = result.unwrap().into_text_decoded().unwrap(); + let file = TextDecodedFile::decode(result.unwrap()).unwrap(); assert_eq!( &*file.source, "export { printHello } from \"./print_hello.ts\";\n" @@ -1002,20 +752,19 @@ mod tests { // This creates a totally new instance, simulating another Deno process // invocation and indicates to "cache bust". let location = temp_dir.path().join("remote").to_path_buf(); - let file_fetcher = FileFetcher::new( - Arc::new(GlobalHttpCache::new( - location, - crate::cache::RealDenoCacheEnv, - )), - CacheSetting::ReloadAll, - true, + let file_fetcher = CliFileFetcher::new( + Arc::new(GlobalHttpCache::new(CliSys::default(), location)), Arc::new(HttpClientProvider::new(None, None)), + CliSys::default(), Default::default(), None, + true, + CacheSetting::ReloadAll, + log::Level::Info, ); let result = file_fetcher.fetch_bypass_permissions(&specifier).await; assert!(result.is_ok()); - let file = result.unwrap().into_text_decoded().unwrap(); + let file = TextDecodedFile::decode(result.unwrap()).unwrap(); assert_eq!( &*file.source, "export { printHello } from \"./print_hello.ts\";\n" @@ -1031,73 +780,49 @@ mod tests { let specifier = resolve_url("http://localhost:4545/subdir/mismatch_ext.ts").unwrap(); + let http_cache = + Arc::new(GlobalHttpCache::new(CliSys::default(), location.clone())); let file_modified_01 = { - let file_fetcher = FileFetcher::new( - Arc::new(GlobalHttpCache::new( - location.clone(), - crate::cache::RealDenoCacheEnv, - )), - CacheSetting::Use, - true, + let file_fetcher = CliFileFetcher::new( + http_cache.clone(), Arc::new(HttpClientProvider::new(None, None)), + CliSys::default(), Default::default(), None, + true, + CacheSetting::Use, + log::Level::Info, ); let result = file_fetcher.fetch_bypass_permissions(&specifier).await; assert!(result.is_ok()); - let cache_key = - file_fetcher.http_cache.cache_item_key(&specifier).unwrap(); + let cache_key = http_cache.cache_item_key(&specifier).unwrap(); ( - file_fetcher - .http_cache - .read_modified_time(&cache_key) - .unwrap(), - file_fetcher - .http_cache - .read_headers(&cache_key) - .unwrap() - .unwrap(), - file_fetcher - .http_cache - .read_download_time(&cache_key) - .unwrap() - .unwrap(), + http_cache.read_modified_time(&cache_key).unwrap(), + http_cache.read_headers(&cache_key).unwrap().unwrap(), + http_cache.read_download_time(&cache_key).unwrap().unwrap(), ) }; let file_modified_02 = { - let file_fetcher = FileFetcher::new( - Arc::new(GlobalHttpCache::new( - location, - crate::cache::RealDenoCacheEnv, - )), - CacheSetting::Use, - true, + let file_fetcher = CliFileFetcher::new( + Arc::new(GlobalHttpCache::new(CliSys::default(), location)), Arc::new(HttpClientProvider::new(None, None)), + CliSys::default(), Default::default(), None, + true, + CacheSetting::Use, + log::Level::Info, ); let result = file_fetcher.fetch_bypass_permissions(&specifier).await; assert!(result.is_ok()); - let cache_key = - file_fetcher.http_cache.cache_item_key(&specifier).unwrap(); + let cache_key = http_cache.cache_item_key(&specifier).unwrap(); ( - file_fetcher - .http_cache - .read_modified_time(&cache_key) - .unwrap(), - file_fetcher - .http_cache - .read_headers(&cache_key) - .unwrap() - .unwrap(), - file_fetcher - .http_cache - .read_download_time(&cache_key) - .unwrap() - .unwrap(), + http_cache.read_modified_time(&cache_key).unwrap(), + http_cache.read_headers(&cache_key).unwrap().unwrap(), + http_cache.read_download_time(&cache_key).unwrap().unwrap(), ) }; @@ -1107,7 +832,8 @@ mod tests { #[tokio::test] async fn test_fetch_redirected() { let _http_server_guard = test_util::http_server(); - let (file_fetcher, _) = setup(CacheSetting::Use, None); + let (file_fetcher, _, _, http_cache) = + setup_with_blob_store_and_cache(CacheSetting::Use, None); let specifier = resolve_url("http://localhost:4546/subdir/redirects/redirect1.js") .unwrap(); @@ -1118,24 +844,27 @@ mod tests { let result = file_fetcher.fetch_bypass_permissions(&specifier).await; assert!(result.is_ok()); let file = result.unwrap(); - assert_eq!(file.specifier, redirected_specifier); + assert_eq!(file.url, redirected_specifier); assert_eq!( - get_text_from_cache(&file_fetcher, &specifier), + get_text_from_cache(http_cache.as_ref(), &specifier), "", "redirected files should have empty cached contents" ); assert_eq!( - get_location_header_from_cache(&file_fetcher, &specifier), + get_location_header_from_cache(http_cache.as_ref(), &specifier), Some("http://localhost:4545/subdir/redirects/redirect1.js".to_string()), ); assert_eq!( - get_text_from_cache(&file_fetcher, &redirected_specifier), + get_text_from_cache(http_cache.as_ref(), &redirected_specifier), "export const redirect = 1;\n" ); assert_eq!( - get_location_header_from_cache(&file_fetcher, &redirected_specifier), + get_location_header_from_cache( + http_cache.as_ref(), + &redirected_specifier + ), None, ); } @@ -1143,7 +872,8 @@ mod tests { #[tokio::test] async fn test_fetch_multiple_redirects() { let _http_server_guard = test_util::http_server(); - let (file_fetcher, _) = setup(CacheSetting::Use, None); + let (file_fetcher, _, _, http_cache) = + setup_with_blob_store_and_cache(CacheSetting::Use, None); let specifier = resolve_url("http://localhost:4548/subdir/redirects/redirect1.js") .unwrap(); @@ -1157,34 +887,40 @@ mod tests { let result = file_fetcher.fetch_bypass_permissions(&specifier).await; assert!(result.is_ok()); let file = result.unwrap(); - assert_eq!(file.specifier, redirected_02_specifier); + assert_eq!(file.url, redirected_02_specifier); assert_eq!( - get_text_from_cache(&file_fetcher, &specifier), + get_text_from_cache(http_cache.as_ref(), &specifier), "", "redirected files should have empty cached contents" ); assert_eq!( - get_location_header_from_cache(&file_fetcher, &specifier), + get_location_header_from_cache(http_cache.as_ref(), &specifier), Some("http://localhost:4546/subdir/redirects/redirect1.js".to_string()), ); assert_eq!( - get_text_from_cache(&file_fetcher, &redirected_01_specifier), + get_text_from_cache(http_cache.as_ref(), &redirected_01_specifier), "", "redirected files should have empty cached contents" ); assert_eq!( - get_location_header_from_cache(&file_fetcher, &redirected_01_specifier), + get_location_header_from_cache( + http_cache.as_ref(), + &redirected_01_specifier + ), Some("http://localhost:4545/subdir/redirects/redirect1.js".to_string()), ); assert_eq!( - get_text_from_cache(&file_fetcher, &redirected_02_specifier), + get_text_from_cache(http_cache.as_ref(), &redirected_02_specifier), "export const redirect = 1;\n" ); assert_eq!( - get_location_header_from_cache(&file_fetcher, &redirected_02_specifier), + get_location_header_from_cache( + http_cache.as_ref(), + &redirected_02_specifier + ), None, ); } @@ -1198,81 +934,53 @@ mod tests { resolve_url("http://localhost:4548/subdir/mismatch_ext.ts").unwrap(); let redirected_specifier = resolve_url("http://localhost:4546/subdir/mismatch_ext.ts").unwrap(); + let http_cache = + Arc::new(GlobalHttpCache::new(CliSys::default(), location.clone())); let metadata_file_modified_01 = { - let file_fetcher = FileFetcher::new( - Arc::new(GlobalHttpCache::new( - location.clone(), - crate::cache::RealDenoCacheEnv, - )), - CacheSetting::Use, - true, + let file_fetcher = CliFileFetcher::new( + http_cache.clone(), Arc::new(HttpClientProvider::new(None, None)), + CliSys::default(), Default::default(), None, + true, + CacheSetting::Use, + log::Level::Info, ); let result = file_fetcher.fetch_bypass_permissions(&specifier).await; assert!(result.is_ok()); - let cache_key = file_fetcher - .http_cache - .cache_item_key(&redirected_specifier) - .unwrap(); + let cache_key = http_cache.cache_item_key(&redirected_specifier).unwrap(); ( - file_fetcher - .http_cache - .read_modified_time(&cache_key) - .unwrap(), - file_fetcher - .http_cache - .read_headers(&cache_key) - .unwrap() - .unwrap(), - file_fetcher - .http_cache - .read_download_time(&cache_key) - .unwrap() - .unwrap(), + http_cache.read_modified_time(&cache_key).unwrap(), + http_cache.read_headers(&cache_key).unwrap().unwrap(), + http_cache.read_download_time(&cache_key).unwrap().unwrap(), ) }; let metadata_file_modified_02 = { - let file_fetcher = FileFetcher::new( - Arc::new(GlobalHttpCache::new( - location, - crate::cache::RealDenoCacheEnv, - )), - CacheSetting::Use, - true, + let file_fetcher = CliFileFetcher::new( + http_cache.clone(), Arc::new(HttpClientProvider::new(None, None)), + CliSys::default(), Default::default(), None, + true, + CacheSetting::Use, + log::Level::Info, ); let result = file_fetcher .fetch_bypass_permissions(&redirected_specifier) .await; assert!(result.is_ok()); - let cache_key = file_fetcher - .http_cache - .cache_item_key(&redirected_specifier) - .unwrap(); + let cache_key = http_cache.cache_item_key(&redirected_specifier).unwrap(); ( - file_fetcher - .http_cache - .read_modified_time(&cache_key) - .unwrap(), - file_fetcher - .http_cache - .read_headers(&cache_key) - .unwrap() - .unwrap(), - file_fetcher - .http_cache - .read_download_time(&cache_key) - .unwrap() - .unwrap(), + http_cache.read_modified_time(&cache_key).unwrap(), + http_cache.read_headers(&cache_key).unwrap().unwrap(), + http_cache.read_download_time(&cache_key).unwrap().unwrap(), ) }; @@ -1289,13 +997,9 @@ mod tests { let result = file_fetcher .fetch_with_options_and_max_redirect( - FetchOptions { - specifier: &specifier, - permissions: FetchPermissionsOptionRef::AllowAll, - maybe_auth: None, - maybe_accept: None, - maybe_cache_setting: Some(&file_fetcher.cache_setting), - }, + &specifier, + FetchPermissionsOptionRef::AllowAll, + Default::default(), 2, ) .await; @@ -1303,29 +1007,26 @@ mod tests { let result = file_fetcher .fetch_with_options_and_max_redirect( - FetchOptions { - specifier: &specifier, - permissions: FetchPermissionsOptionRef::AllowAll, - maybe_auth: None, - maybe_accept: None, - maybe_cache_setting: Some(&file_fetcher.cache_setting), - }, + &specifier, + FetchPermissionsOptionRef::AllowAll, + Default::default(), 1, ) .await; assert!(result.is_err()); - let result = file_fetcher.fetch_cached(&specifier, 2); + let result = file_fetcher.file_fetcher.fetch_cached(&specifier, 2); assert!(result.is_ok()); - let result = file_fetcher.fetch_cached(&specifier, 1); + let result = file_fetcher.file_fetcher.fetch_cached(&specifier, 1); assert!(result.is_err()); } #[tokio::test] async fn test_fetch_same_host_redirect() { let _http_server_guard = test_util::http_server(); - let (file_fetcher, _) = setup(CacheSetting::Use, None); + let (file_fetcher, _, _, http_cache) = + setup_with_blob_store_and_cache(CacheSetting::Use, None); let specifier = resolve_url( "http://localhost:4550/REDIRECT/subdir/redirects/redirect1.js", ) @@ -1337,24 +1038,27 @@ mod tests { let result = file_fetcher.fetch_bypass_permissions(&specifier).await; assert!(result.is_ok()); let file = result.unwrap(); - assert_eq!(file.specifier, redirected_specifier); + assert_eq!(file.url, redirected_specifier); assert_eq!( - get_text_from_cache(&file_fetcher, &specifier), + get_text_from_cache(http_cache.as_ref(), &specifier), "", "redirected files should have empty cached contents" ); assert_eq!( - get_location_header_from_cache(&file_fetcher, &specifier), + get_location_header_from_cache(http_cache.as_ref(), &specifier), Some("/subdir/redirects/redirect1.js".to_string()), ); assert_eq!( - get_text_from_cache(&file_fetcher, &redirected_specifier), + get_text_from_cache(http_cache.as_ref(), &redirected_specifier), "export const redirect = 1;\n" ); assert_eq!( - get_location_header_from_cache(&file_fetcher, &redirected_specifier), + get_location_header_from_cache( + http_cache.as_ref(), + &redirected_specifier + ), None ); } @@ -1364,16 +1068,15 @@ mod tests { let _http_server_guard = test_util::http_server(); let temp_dir = TempDir::new(); let location = temp_dir.path().join("remote").to_path_buf(); - let file_fetcher = FileFetcher::new( - Arc::new(GlobalHttpCache::new( - location, - crate::cache::RealDenoCacheEnv, - )), - CacheSetting::Use, - false, + let file_fetcher = CliFileFetcher::new( + Arc::new(GlobalHttpCache::new(CliSys::default(), location)), Arc::new(HttpClientProvider::new(None, None)), + CliSys::default(), Default::default(), None, + false, + CacheSetting::Use, + log::Level::Info, ); let specifier = resolve_url("http://localhost:4545/run/002_hello.ts").unwrap(); @@ -1381,8 +1084,19 @@ mod tests { let result = file_fetcher.fetch_bypass_permissions(&specifier).await; assert!(result.is_err()); let err = result.unwrap_err(); - assert_eq!(get_custom_error_class(&err), Some("NoRemote")); - assert_eq!(err.to_string(), "A remote specifier was requested: \"http://localhost:4545/run/002_hello.ts\", but --no-remote is specified."); + let err = err.downcast::().unwrap().into_kind(); + match err { + CliFetchNoFollowErrorKind::FetchNoFollow(err) => { + let err = err.into_kind(); + match &err { + FetchNoFollowErrorKind::NoRemote { .. } => { + assert_eq!(err.to_string(), "A remote specifier was requested: \"http://localhost:4545/run/002_hello.ts\", but --no-remote is specified."); + } + _ => unreachable!(), + } + } + _ => unreachable!(), + } } #[tokio::test] @@ -1390,21 +1104,25 @@ mod tests { let _http_server_guard = test_util::http_server(); let temp_dir = TempDir::new(); let location = temp_dir.path().join("remote").to_path_buf(); - let file_fetcher_01 = FileFetcher::new( - Arc::new(GlobalHttpCache::new(location.clone(), RealDenoCacheEnv)), - CacheSetting::Only, - true, + let file_fetcher_01 = CliFileFetcher::new( + Arc::new(GlobalHttpCache::new(CliSys::default(), location.clone())), Arc::new(HttpClientProvider::new(None, None)), + CliSys::default(), Default::default(), None, - ); - let file_fetcher_02 = FileFetcher::new( - Arc::new(GlobalHttpCache::new(location, RealDenoCacheEnv)), - CacheSetting::Use, true, + CacheSetting::Only, + log::Level::Info, + ); + let file_fetcher_02 = CliFileFetcher::new( + Arc::new(GlobalHttpCache::new(CliSys::default(), location)), Arc::new(HttpClientProvider::new(None, None)), + CliSys::default(), Default::default(), None, + true, + CacheSetting::Use, + log::Level::Info, ); let specifier = resolve_url("http://localhost:4545/run/002_hello.ts").unwrap(); @@ -1412,8 +1130,19 @@ mod tests { let result = file_fetcher_01.fetch_bypass_permissions(&specifier).await; assert!(result.is_err()); let err = result.unwrap_err(); - assert_eq!(err.to_string(), "Specifier not found in cache: \"http://localhost:4545/run/002_hello.ts\", --cached-only is specified."); - assert_eq!(get_custom_error_class(&err), Some("NotCached")); + let err = err.downcast::().unwrap().into_kind(); + match err { + CliFetchNoFollowErrorKind::FetchNoFollow(err) => { + let err = err.into_kind(); + match &err { + FetchNoFollowErrorKind::NotCached { .. } => { + assert_eq!(err.to_string(), "Specifier not found in cache: \"http://localhost:4545/run/002_hello.ts\", --cached-only is specified."); + } + _ => unreachable!(), + } + } + _ => unreachable!(), + } let result = file_fetcher_02.fetch_bypass_permissions(&specifier).await; assert!(result.is_ok()); @@ -1427,16 +1156,16 @@ mod tests { let (file_fetcher, temp_dir) = setup(CacheSetting::Use, None); let fixture_path = temp_dir.path().join("mod.ts"); let specifier = ModuleSpecifier::from_file_path(&fixture_path).unwrap(); - fs::write(fixture_path.clone(), r#"console.log("hello deno");"#).unwrap(); + fixture_path.write(r#"console.log("hello deno");"#); let result = file_fetcher.fetch_bypass_permissions(&specifier).await; assert!(result.is_ok()); - let file = result.unwrap().into_text_decoded().unwrap(); + let file = TextDecodedFile::decode(result.unwrap()).unwrap(); assert_eq!(&*file.source, r#"console.log("hello deno");"#); - fs::write(fixture_path, r#"console.log("goodbye deno");"#).unwrap(); + fixture_path.write(r#"console.log("goodbye deno");"#); let result = file_fetcher.fetch_bypass_permissions(&specifier).await; assert!(result.is_ok()); - let file = result.unwrap().into_text_decoded().unwrap(); + let file = TextDecodedFile::decode(result.unwrap()).unwrap(); assert_eq!(&*file.source, r#"console.log("goodbye deno");"#); } @@ -1528,29 +1257,169 @@ mod tests { test_fetch_remote_encoded("windows-1255", "windows-1255", expected).await; } + fn create_http_client_adapter() -> HttpClientAdapter { + HttpClientAdapter { + http_client_provider: Arc::new(HttpClientProvider::new(None, None)), + download_log_level: log::Level::Info, + progress_bar: None, + } + } + + #[tokio::test] + async fn test_fetch_string() { + let _http_server_guard = test_util::http_server(); + let url = Url::parse("http://127.0.0.1:4545/assets/fixture.json").unwrap(); + let client = create_http_client_adapter(); + let result = client.send_no_follow(&url, HeaderMap::new()).await; + if let Ok(SendResponse::Success(headers, body)) = result { + assert!(!body.is_empty()); + assert_eq!(headers.get("content-type").unwrap(), "application/json"); + assert_eq!(headers.get("etag"), None); + assert_eq!(headers.get("x-typescript-types"), None); + } else { + panic!(); + } + } + + #[tokio::test] + async fn test_fetch_gzip() { + let _http_server_guard = test_util::http_server(); + let url = Url::parse("http://127.0.0.1:4545/run/import_compression/gziped") + .unwrap(); + let client = create_http_client_adapter(); + let result = client.send_no_follow(&url, HeaderMap::new()).await; + if let Ok(SendResponse::Success(headers, body)) = result { + assert_eq!(String::from_utf8(body).unwrap(), "console.log('gzip')"); + assert_eq!( + headers.get("content-type").unwrap(), + "application/javascript" + ); + assert_eq!(headers.get("etag"), None); + assert_eq!(headers.get("x-typescript-types"), None); + } else { + panic!(); + } + } + + #[tokio::test] + async fn test_fetch_with_etag() { + let _http_server_guard = test_util::http_server(); + let url = Url::parse("http://127.0.0.1:4545/etag_script.ts").unwrap(); + let client = create_http_client_adapter(); + let result = client.send_no_follow(&url, HeaderMap::new()).await; + if let Ok(SendResponse::Success(headers, body)) = result { + assert!(!body.is_empty()); + assert_eq!(String::from_utf8(body).unwrap(), "console.log('etag')"); + assert_eq!( + headers.get("content-type").unwrap(), + "application/typescript" + ); + assert_eq!(headers.get("etag").unwrap(), "33a64df551425fcc55e"); + } else { + panic!(); + } + + let mut headers = HeaderMap::new(); + headers.insert("if-none-match", "33a64df551425fcc55e".parse().unwrap()); + let res = client.send_no_follow(&url, headers).await; + assert_eq!(res.unwrap(), SendResponse::NotModified); + } + + #[tokio::test] + async fn test_fetch_brotli() { + let _http_server_guard = test_util::http_server(); + let url = Url::parse("http://127.0.0.1:4545/run/import_compression/brotli") + .unwrap(); + let client = create_http_client_adapter(); + let result = client.send_no_follow(&url, HeaderMap::new()).await; + if let Ok(SendResponse::Success(headers, body)) = result { + assert!(!body.is_empty()); + assert_eq!(String::from_utf8(body).unwrap(), "console.log('brotli');"); + assert_eq!( + headers.get("content-type").unwrap(), + "application/javascript" + ); + assert_eq!(headers.get("etag"), None); + assert_eq!(headers.get("x-typescript-types"), None); + } else { + panic!(); + } + } + + #[tokio::test] + async fn test_fetch_accept() { + let _http_server_guard = test_util::http_server(); + let url = Url::parse("http://127.0.0.1:4545/echo_accept").unwrap(); + let client = create_http_client_adapter(); + let mut headers = HeaderMap::new(); + headers.insert("accept", "application/json".parse().unwrap()); + let result = client.send_no_follow(&url, headers).await; + if let Ok(SendResponse::Success(_, body)) = result { + assert_eq!(body, r#"{"accept":"application/json"}"#.as_bytes()); + } else { + panic!(); + } + } + + #[tokio::test] + async fn test_fetch_no_follow_with_redirect() { + let _http_server_guard = test_util::http_server(); + let url = Url::parse("http://127.0.0.1:4546/assets/fixture.json").unwrap(); + // Dns resolver substitutes `127.0.0.1` with `localhost` + let target_url = + Url::parse("http://localhost:4545/assets/fixture.json").unwrap(); + let client = create_http_client_adapter(); + let result = client.send_no_follow(&url, Default::default()).await; + if let Ok(SendResponse::Redirect(headers)) = result { + assert_eq!(headers.get("location").unwrap(), target_url.as_str()); + } else { + panic!(); + } + } + + #[tokio::test] + async fn server_error() { + let _g = test_util::http_server(); + let url_str = "http://127.0.0.1:4545/server_error"; + let url = Url::parse(url_str).unwrap(); + let client = create_http_client_adapter(); + let result = client.send_no_follow(&url, Default::default()).await; + + if let Err(SendError::StatusCode(status)) = result { + assert_eq!(status, 500); + } else { + panic!("{:?}", result); + } + } + + #[tokio::test] + async fn request_error() { + let _g = test_util::http_server(); + let url_str = "http://127.0.0.1:9999/"; + let url = Url::parse(url_str).unwrap(); + let client = create_http_client_adapter(); + let result = client.send_no_follow(&url, Default::default()).await; + + assert!(matches!(result, Err(SendError::Failed(_)))); + } + #[track_caller] fn get_text_from_cache( - file_fetcher: &FileFetcher, + http_cache: &dyn HttpCache, url: &ModuleSpecifier, ) -> String { - let cache_key = file_fetcher.http_cache.cache_item_key(url).unwrap(); - let bytes = file_fetcher - .http_cache - .get(&cache_key, None) - .unwrap() - .unwrap() - .content; - String::from_utf8(bytes).unwrap() + let cache_key = http_cache.cache_item_key(url).unwrap(); + let bytes = http_cache.get(&cache_key, None).unwrap().unwrap().content; + String::from_utf8(bytes.into_owned()).unwrap() } #[track_caller] fn get_location_header_from_cache( - file_fetcher: &FileFetcher, + http_cache: &dyn HttpCache, url: &ModuleSpecifier, ) -> Option { - let cache_key = file_fetcher.http_cache.cache_item_key(url).unwrap(); - file_fetcher - .http_cache + let cache_key = http_cache.cache_item_key(url).unwrap(); + http_cache .read_headers(&cache_key) .unwrap() .unwrap() diff --git a/cli/graph_container.rs b/cli/graph_container.rs index c463d71a6a44fe..1fe30b47ab6387 100644 --- a/cli/graph_container.rs +++ b/cli/graph_container.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::sync::Arc; diff --git a/cli/graph_util.rs b/cli/graph_util.rs index 6ed0506dd70b30..ac9e75cff0bf95 100644 --- a/cli/graph_util.rs +++ b/cli/graph_util.rs @@ -1,62 +1,67 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::collections::HashSet; +use std::error::Error; +use std::ops::Deref; +use std::path::PathBuf; +use std::sync::Arc; -use crate::args::config_to_deno_graph_workspace_member; -use crate::args::jsr_url; -use crate::args::CliLockfile; -use crate::args::CliOptions; -use crate::args::DENO_DISABLE_PEDANTIC_NODE_WARNINGS; -use crate::cache; -use crate::cache::GlobalHttpCache; -use crate::cache::ModuleInfoCache; -use crate::cache::ParsedSourceCache; -use crate::colors; -use crate::errors::get_error_class_name; -use crate::file_fetcher::FileFetcher; -use crate::npm::CliNpmResolver; -use crate::resolver::CjsTracker; -use crate::resolver::CliResolver; -use crate::resolver::CliSloppyImportsResolver; -use crate::resolver::SloppyImportsCachedFs; -use crate::tools::check; -use crate::tools::check::TypeChecker; -use crate::util::file_watcher::WatcherCommunicator; -use crate::util::fs::canonicalize_path; use deno_config::deno_json::JsxImportSourceConfig; use deno_config::workspace::JsrPackageConfig; use deno_core::anyhow::bail; -use deno_graph::source::LoaderChecksum; -use deno_graph::source::ResolutionMode; -use deno_graph::FillFromLockfileOptions; -use deno_graph::JsrLoadError; -use deno_graph::ModuleLoadError; -use deno_graph::WorkspaceFastCheckOption; - use deno_core::error::custom_error; use deno_core::error::AnyError; use deno_core::parking_lot::Mutex; use deno_core::ModuleSpecifier; use deno_graph::source::Loader; +use deno_graph::source::LoaderChecksum; +use deno_graph::source::ResolutionKind; use deno_graph::source::ResolveError; +use deno_graph::FillFromLockfileOptions; use deno_graph::GraphKind; +use deno_graph::JsrLoadError; use deno_graph::ModuleError; use deno_graph::ModuleGraph; use deno_graph::ModuleGraphError; +use deno_graph::ModuleLoadError; use deno_graph::ResolutionError; use deno_graph::SpecifierError; +use deno_graph::WorkspaceFastCheckOption; use deno_path_util::url_to_file_path; -use deno_resolver::sloppy_imports::SloppyImportsResolutionMode; -use deno_runtime::deno_fs::FileSystem; +use deno_resolver::sloppy_imports::SloppyImportsResolutionKind; use deno_runtime::deno_node; use deno_runtime::deno_permissions::PermissionsContainer; use deno_semver::jsr::JsrDepPackageReq; use deno_semver::package::PackageNv; +use deno_semver::SmallStackString; use import_map::ImportMapError; use node_resolver::InNpmPackageChecker; -use std::collections::HashSet; -use std::error::Error; -use std::ops::Deref; -use std::path::PathBuf; -use std::sync::Arc; + +use crate::args::config_to_deno_graph_workspace_member; +use crate::args::jsr_url; +use crate::args::CliLockfile; +use crate::args::CliOptions; +pub use crate::args::NpmCachingStrategy; +use crate::args::DENO_DISABLE_PEDANTIC_NODE_WARNINGS; +use crate::cache; +use crate::cache::FetchCacher; +use crate::cache::GlobalHttpCache; +use crate::cache::ModuleInfoCache; +use crate::cache::ParsedSourceCache; +use crate::colors; +use crate::errors::get_error_class_name; +use crate::errors::get_module_graph_error_class; +use crate::file_fetcher::CliFileFetcher; +use crate::npm::CliNpmResolver; +use crate::resolver::CjsTracker; +use crate::resolver::CliResolver; +use crate::resolver::CliSloppyImportsResolver; +use crate::resolver::SloppyImportsCachedFs; +use crate::sys::CliSys; +use crate::tools::check; +use crate::tools::check::TypeChecker; +use crate::util::file_watcher::WatcherCommunicator; +use crate::util::fs::canonicalize_path; #[derive(Clone)] pub struct GraphValidOptions { @@ -77,7 +82,7 @@ pub struct GraphValidOptions { /// for the CLI. pub fn graph_valid( graph: &ModuleGraph, - fs: &Arc, + sys: &CliSys, roots: &[ModuleSpecifier], options: GraphValidOptions, ) -> Result<(), AnyError> { @@ -87,7 +92,7 @@ pub fn graph_valid( let mut errors = graph_walk_errors( graph, - fs, + sys, roots, GraphWalkErrorsOptions { check_js: options.check_js, @@ -108,6 +113,25 @@ pub fn graph_valid( } } +pub fn fill_graph_from_lockfile( + graph: &mut ModuleGraph, + lockfile: &deno_lockfile::Lockfile, +) { + graph.fill_from_lockfile(FillFromLockfileOptions { + redirects: lockfile + .content + .redirects + .iter() + .map(|(from, to)| (from.as_str(), to.as_str())), + package_specifiers: lockfile + .content + .packages + .specifiers + .iter() + .map(|(dep, id)| (dep, id.as_str())), + }); +} + #[derive(Clone)] pub struct GraphWalkErrorsOptions { pub check_js: bool, @@ -118,7 +142,7 @@ pub struct GraphWalkErrorsOptions { /// and enhances them with CLI information. pub fn graph_walk_errors<'a>( graph: &'a ModuleGraph, - fs: &'a Arc, + sys: &'a CliSys, roots: &'a [ModuleSpecifier], options: GraphWalkErrorsOptions, ) -> impl Iterator + 'a { @@ -141,29 +165,15 @@ pub fn graph_walk_errors<'a>( roots.contains(error.specifier()) } }; - let mut message = match &error { - ModuleGraphError::ResolutionError(resolution_error) => { - enhanced_resolution_error_message(resolution_error) - } - ModuleGraphError::TypesResolutionError(resolution_error) => { - format!( - "Failed resolving types. {}", - enhanced_resolution_error_message(resolution_error) - ) - } - ModuleGraphError::ModuleError(error) => { - enhanced_integrity_error_message(error) - .or_else(|| enhanced_sloppy_imports_error_message(fs, error)) - .unwrap_or_else(|| format_deno_graph_error(error)) - } - }; - - if let Some(range) = error.maybe_range() { - if !is_root && !range.specifier.as_str().contains("/$deno$eval") { - message.push_str("\n at "); - message.push_str(&format_range_with_colors(range)); - } - } + let message = enhance_graph_error( + sys, + &error, + if is_root { + EnhanceGraphErrorMode::HideRange + } else { + EnhanceGraphErrorMode::ShowRange + }, + ); if graph.graph_kind() == GraphKind::TypesOnly && matches!( @@ -175,10 +185,61 @@ pub fn graph_walk_errors<'a>( return None; } - Some(custom_error(get_error_class_name(&error.into()), message)) + if graph.graph_kind().include_types() + && (message.contains(RUN_WITH_SLOPPY_IMPORTS_MSG) + || matches!( + error, + ModuleGraphError::ModuleError(ModuleError::Missing(..)) + )) + { + // ignore and let typescript surface this as a diagnostic instead + log::debug!("Ignoring: {}", message); + return None; + } + + Some(custom_error(get_module_graph_error_class(&error), message)) }) } +#[derive(Debug, PartialEq, Eq)] +pub enum EnhanceGraphErrorMode { + ShowRange, + HideRange, +} + +pub fn enhance_graph_error( + sys: &CliSys, + error: &ModuleGraphError, + mode: EnhanceGraphErrorMode, +) -> String { + let mut message = match &error { + ModuleGraphError::ResolutionError(resolution_error) => { + enhanced_resolution_error_message(resolution_error) + } + ModuleGraphError::TypesResolutionError(resolution_error) => { + format!( + "Failed resolving types. {}", + enhanced_resolution_error_message(resolution_error) + ) + } + ModuleGraphError::ModuleError(error) => { + enhanced_integrity_error_message(error) + .or_else(|| enhanced_sloppy_imports_error_message(sys, error)) + .unwrap_or_else(|| format_deno_graph_error(error)) + } + }; + + if let Some(range) = error.maybe_range() { + if mode == EnhanceGraphErrorMode::ShowRange + && !range.specifier.as_str().contains("/$deno$eval") + { + message.push_str("\n at "); + message.push_str(&format_range_with_colors(range)); + } + } + message +} + pub fn graph_exit_integrity_errors(graph: &ModuleGraph) { for error in graph.module_errors() { exit_for_integrity_error(error); @@ -198,6 +259,7 @@ pub struct CreateGraphOptions<'a> { pub is_dynamic: bool, /// Specify `None` to use the default CLI loader. pub loader: Option<&'a mut dyn Loader>, + pub npm_caching: NpmCachingStrategy, } pub struct ModuleGraphCreator { @@ -226,10 +288,11 @@ impl ModuleGraphCreator { &self, graph_kind: GraphKind, roots: Vec, + npm_caching: NpmCachingStrategy, ) -> Result { let mut cache = self.module_graph_builder.create_graph_loader(); self - .create_graph_with_loader(graph_kind, roots, &mut cache) + .create_graph_with_loader(graph_kind, roots, &mut cache, npm_caching) .await } @@ -238,6 +301,7 @@ impl ModuleGraphCreator { graph_kind: GraphKind, roots: Vec, loader: &mut dyn Loader, + npm_caching: NpmCachingStrategy, ) -> Result { self .create_graph_with_options(CreateGraphOptions { @@ -245,6 +309,7 @@ impl ModuleGraphCreator { graph_kind, roots, loader: Some(loader), + npm_caching, }) .await } @@ -254,6 +319,23 @@ impl ModuleGraphCreator { package_configs: &[JsrPackageConfig], build_fast_check_graph: bool, ) -> Result { + struct PublishLoader(FetchCacher); + impl Loader for PublishLoader { + fn load( + &self, + specifier: &deno_ast::ModuleSpecifier, + options: deno_graph::source::LoadOptions, + ) -> deno_graph::source::LoadFuture { + if specifier.scheme() == "bun" { + return Box::pin(std::future::ready(Ok(Some( + deno_graph::source::LoadResponse::External { + specifier: specifier.clone(), + }, + )))); + } + self.0.load(specifier, options) + } + } fn graph_has_external_remote(graph: &ModuleGraph) -> bool { // Earlier on, we marked external non-JSR modules as external. // If the graph contains any of those, it would cause type checking @@ -271,12 +353,16 @@ impl ModuleGraphCreator { for package_config in package_configs { roots.extend(package_config.config_file.resolve_export_value_urls()?); } + + let loader = self.module_graph_builder.create_graph_loader(); + let mut publish_loader = PublishLoader(loader); let mut graph = self .create_graph_with_options(CreateGraphOptions { is_dynamic: false, graph_kind: deno_graph::GraphKind::All, roots, - loader: None, + loader: Some(&mut publish_loader), + npm_caching: self.options.default_npm_caching_strategy(), }) .await?; self.graph_valid(&graph)?; @@ -336,6 +422,7 @@ impl ModuleGraphCreator { graph_kind, roots, loader: None, + npm_caching: self.options.default_npm_caching_strategy(), }) .await?; @@ -384,8 +471,7 @@ pub struct ModuleGraphBuilder { caches: Arc, cjs_tracker: Arc, cli_options: Arc, - file_fetcher: Arc, - fs: Arc, + file_fetcher: Arc, global_http_cache: Arc, in_npm_pkg_checker: Arc, lockfile: Option>, @@ -395,6 +481,7 @@ pub struct ModuleGraphBuilder { parsed_source_cache: Arc, resolver: Arc, root_permissions_container: PermissionsContainer, + sys: CliSys, } impl ModuleGraphBuilder { @@ -403,8 +490,7 @@ impl ModuleGraphBuilder { caches: Arc, cjs_tracker: Arc, cli_options: Arc, - file_fetcher: Arc, - fs: Arc, + file_fetcher: Arc, global_http_cache: Arc, in_npm_pkg_checker: Arc, lockfile: Option>, @@ -414,13 +500,13 @@ impl ModuleGraphBuilder { parsed_source_cache: Arc, resolver: Arc, root_permissions_container: PermissionsContainer, + sys: CliSys, ) -> Self { Self { caches, cjs_tracker, cli_options, file_fetcher, - fs, global_http_cache, in_npm_pkg_checker, lockfile, @@ -430,6 +516,7 @@ impl ModuleGraphBuilder { parsed_source_cache, resolver, root_permissions_container, + sys, } } @@ -525,7 +612,8 @@ impl ModuleGraphBuilder { }; let cli_resolver = &self.resolver; let graph_resolver = self.create_graph_resolver()?; - let graph_npm_resolver = cli_resolver.create_graph_npm_resolver(); + let graph_npm_resolver = + cli_resolver.create_graph_npm_resolver(options.npm_caching); let maybe_file_watcher_reporter = self .maybe_file_watcher_reporter .as_ref() @@ -544,7 +632,7 @@ impl ModuleGraphBuilder { is_dynamic: options.is_dynamic, passthrough_jsr_specifiers: false, executor: Default::default(), - file_system: &DenoGraphFsAdapter(self.fs.as_ref()), + file_system: &self.sys, jsr_url_provider: &CliJsrUrlProvider, npm_resolver: Some(&graph_npm_resolver), module_analyzer: &analyzer, @@ -552,6 +640,7 @@ impl ModuleGraphBuilder { resolver: Some(&graph_resolver), locker: locker.as_mut().map(|l| l as _), }, + options.npm_caching, ) .await } @@ -562,6 +651,7 @@ impl ModuleGraphBuilder { roots: Vec, loader: &'a mut dyn deno_graph::source::Loader, options: deno_graph::BuildOptions<'a>, + npm_caching: NpmCachingStrategy, ) -> Result<(), AnyError> { // ensure an "npm install" is done if the user has explicitly // opted into using a node_modules directory @@ -572,7 +662,13 @@ impl ModuleGraphBuilder { .unwrap_or(false) { if let Some(npm_resolver) = self.npm_resolver.as_managed() { - npm_resolver.ensure_top_level_package_json_install().await?; + let already_done = + npm_resolver.ensure_top_level_package_json_install().await?; + if !already_done && matches!(npm_caching, NpmCachingStrategy::Eager) { + npm_resolver + .cache_packages(crate::npm::PackageCaching::All) + .await?; + } } } @@ -582,19 +678,7 @@ impl ModuleGraphBuilder { // populate the information from the lockfile if let Some(lockfile) = &self.lockfile { let lockfile = lockfile.lock(); - graph.fill_from_lockfile(FillFromLockfileOptions { - redirects: lockfile - .content - .redirects - .iter() - .map(|(from, to)| (from.as_str(), to.as_str())), - package_specifiers: lockfile - .content - .packages - .specifiers - .iter() - .map(|(dep, id)| (dep, id.as_str())), - }); + fill_graph_from_lockfile(graph, &lockfile); } } @@ -636,7 +720,7 @@ impl ModuleGraphBuilder { for (from, to) in graph.packages.mappings() { lockfile.insert_package_specifier( JsrDepPackageReq::jsr(from.clone()), - to.version.to_string(), + to.version.to_custom_string::(), ); } } @@ -673,7 +757,9 @@ impl ModuleGraphBuilder { let parser = self.parsed_source_cache.as_capturing_parser(); let cli_resolver = &self.resolver; let graph_resolver = self.create_graph_resolver()?; - let graph_npm_resolver = cli_resolver.create_graph_npm_resolver(); + let graph_npm_resolver = cli_resolver.create_graph_npm_resolver( + self.cli_options.default_npm_caching_strategy(), + ); graph.build_fast_check_type_graph( deno_graph::BuildFastCheckTypeGraphOptions { @@ -700,10 +786,10 @@ impl ModuleGraphBuilder { ) -> cache::FetchCacher { cache::FetchCacher::new( self.file_fetcher.clone(), - self.fs.clone(), self.global_http_cache.clone(), self.in_npm_pkg_checker.clone(), self.module_info_cache.clone(), + self.sys.clone(), cache::FetchCacherOptions { file_header_overrides: self.cli_options.resolve_file_header_overrides(), permissions, @@ -732,7 +818,7 @@ impl ModuleGraphBuilder { ) -> Result<(), AnyError> { graph_valid( graph, - &self.fs, + &self.sys, roots, GraphValidOptions { kind: if self.cli_options.type_check_mode().is_true() { @@ -787,18 +873,19 @@ pub fn enhanced_resolution_error_message(error: &ResolutionError) -> String { message } +static RUN_WITH_SLOPPY_IMPORTS_MSG: &str = + "or run with --unstable-sloppy-imports"; + fn enhanced_sloppy_imports_error_message( - fs: &Arc, + sys: &CliSys, error: &ModuleError, ) -> Option { match error { ModuleError::LoadingErr(specifier, _, ModuleLoadError::Loader(_)) // ex. "Is a directory" error | ModuleError::Missing(specifier, _) => { - let additional_message = CliSloppyImportsResolver::new(SloppyImportsCachedFs::new(fs.clone())) - .resolve(specifier, SloppyImportsResolutionMode::Execution)? - .as_suggestion_message(); + let additional_message = maybe_additional_sloppy_imports_message(sys, specifier)?; Some(format!( - "{} {} or run with --unstable-sloppy-imports", + "{} {}", error, additional_message, )) @@ -807,6 +894,19 @@ fn enhanced_sloppy_imports_error_message( } } +pub fn maybe_additional_sloppy_imports_message( + sys: &CliSys, + specifier: &ModuleSpecifier, +) -> Option { + Some(format!( + "{} {}", + CliSloppyImportsResolver::new(SloppyImportsCachedFs::new(sys.clone())) + .resolve(specifier, SloppyImportsResolutionKind::Execution)? + .as_suggestion_message(), + RUN_WITH_SLOPPY_IMPORTS_MSG + )) +} + fn enhanced_integrity_error_message(err: &ModuleError) -> Option { match err { ModuleError::LoadingErr( @@ -1035,77 +1135,12 @@ impl deno_graph::source::Reporter for FileWatcherReporter { } } -pub struct DenoGraphFsAdapter<'a>( - pub &'a dyn deno_runtime::deno_fs::FileSystem, -); - -impl<'a> deno_graph::source::FileSystem for DenoGraphFsAdapter<'a> { - fn read_dir( - &self, - dir_url: &deno_graph::ModuleSpecifier, - ) -> Vec { - use deno_core::anyhow; - use deno_graph::source::DirEntry; - use deno_graph::source::DirEntryKind; - - let dir_path = match dir_url.to_file_path() { - Ok(path) => path, - // ignore, treat as non-analyzable - Err(()) => return vec![], - }; - let entries = match self.0.read_dir_sync(&dir_path) { - Ok(dir) => dir, - Err(err) - if matches!( - err.kind(), - std::io::ErrorKind::PermissionDenied | std::io::ErrorKind::NotFound - ) => - { - return vec![]; - } - Err(err) => { - return vec![DirEntry { - kind: DirEntryKind::Error( - anyhow::Error::from(err) - .context("Failed to read directory.".to_string()), - ), - url: dir_url.clone(), - }]; - } - }; - let mut dir_entries = Vec::with_capacity(entries.len()); - for entry in entries { - let entry_path = dir_path.join(&entry.name); - dir_entries.push(if entry.is_directory { - DirEntry { - kind: DirEntryKind::Dir, - url: ModuleSpecifier::from_directory_path(&entry_path).unwrap(), - } - } else if entry.is_file { - DirEntry { - kind: DirEntryKind::File, - url: ModuleSpecifier::from_file_path(&entry_path).unwrap(), - } - } else if entry.is_symlink { - DirEntry { - kind: DirEntryKind::Symlink, - url: ModuleSpecifier::from_file_path(&entry_path).unwrap(), - } - } else { - continue; - }); - } - - dir_entries - } -} - -pub fn format_range_with_colors(range: &deno_graph::Range) -> String { +pub fn format_range_with_colors(referrer: &deno_graph::Range) -> String { format!( "{}:{}:{}", - colors::cyan(range.specifier.as_str()), - colors::yellow(&(range.start.line + 1).to_string()), - colors::yellow(&(range.start.character + 1).to_string()) + colors::cyan(referrer.specifier.as_str()), + colors::yellow(&(referrer.range.start.line + 1).to_string()), + colors::yellow(&(referrer.range.start.character + 1).to_string()) ) } @@ -1195,26 +1230,54 @@ impl<'a> deno_graph::source::Resolver for CliGraphResolver<'a> { &self, raw_specifier: &str, referrer_range: &deno_graph::Range, - mode: ResolutionMode, + resolution_kind: ResolutionKind, ) -> Result { self.resolver.resolve( raw_specifier, - referrer_range, - self - .cjs_tracker - .get_referrer_kind(&referrer_range.specifier), - mode, + &referrer_range.specifier, + referrer_range.range.start, + referrer_range + .resolution_mode + .map(to_node_resolution_mode) + .unwrap_or_else(|| { + self + .cjs_tracker + .get_referrer_kind(&referrer_range.specifier) + }), + to_node_resolution_kind(resolution_kind), ) } } +pub fn to_node_resolution_kind( + kind: ResolutionKind, +) -> node_resolver::NodeResolutionKind { + match kind { + ResolutionKind::Execution => node_resolver::NodeResolutionKind::Execution, + ResolutionKind::Types => node_resolver::NodeResolutionKind::Types, + } +} + +pub fn to_node_resolution_mode( + mode: deno_graph::source::ResolutionMode, +) -> node_resolver::ResolutionMode { + match mode { + deno_graph::source::ResolutionMode::Import => { + node_resolver::ResolutionMode::Import + } + deno_graph::source::ResolutionMode::Require => { + node_resolver::ResolutionMode::Require + } + } +} + #[cfg(test)] mod test { use std::sync::Arc; use deno_ast::ModuleSpecifier; use deno_graph::source::ResolveError; - use deno_graph::Position; + use deno_graph::PositionRange; use deno_graph::Range; use deno_graph::ResolutionError; use deno_graph::SpecifierError; @@ -1235,8 +1298,8 @@ mod test { specifier: input.to_string(), range: Range { specifier, - start: Position::zeroed(), - end: Position::zeroed(), + resolution_mode: None, + range: PositionRange::zeroed(), }, }; assert_eq!(get_resolution_error_bare_node_specifier(&err), output); @@ -1251,8 +1314,8 @@ mod test { let err = ResolutionError::InvalidSpecifier { range: Range { specifier, - start: Position::zeroed(), - end: Position::zeroed(), + resolution_mode: None, + range: PositionRange::zeroed(), }, error: SpecifierError::ImportPrefixMissing { specifier: input.to_string(), diff --git a/cli/http_util.rs b/cli/http_util.rs index 4b17936d688d9f..af6709c5d0ab0f 100644 --- a/cli/http_util.rs +++ b/cli/http_util.rs @@ -1,14 +1,12 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::auth_tokens::AuthToken; -use crate::util::progress_bar::UpdateGuard; -use crate::version; +use std::collections::HashMap; +use std::sync::Arc; +use std::thread::ThreadId; -use cache_control::Cachability; -use cache_control::CacheControl; -use chrono::DateTime; +use boxed_error::Boxed; +use deno_cache_dir::file_fetcher::RedirectHeaderParseError; use deno_core::error::custom_error; -use deno_core::error::generic_error; use deno_core::error::AnyError; use deno_core::futures::StreamExt; use deno_core::parking_lot::Mutex; @@ -18,195 +16,25 @@ use deno_core::url::Url; use deno_runtime::deno_fetch; use deno_runtime::deno_fetch::create_http_client; use deno_runtime::deno_fetch::CreateHttpClientOptions; +use deno_runtime::deno_fetch::ResBody; use deno_runtime::deno_tls::RootCertStoreProvider; -use http::header; use http::header::HeaderName; use http::header::HeaderValue; -use http::header::ACCEPT; -use http::header::AUTHORIZATION; use http::header::CONTENT_LENGTH; -use http::header::IF_NONE_MATCH; -use http::header::LOCATION; +use http::HeaderMap; use http::StatusCode; use http_body_util::BodyExt; - -use std::collections::HashMap; -use std::sync::Arc; -use std::thread::ThreadId; -use std::time::Duration; -use std::time::SystemTime; use thiserror::Error; -// TODO(ry) HTTP headers are not unique key, value pairs. There may be more than -// one header line with the same key. This should be changed to something like -// Vec<(String, String)> -pub type HeadersMap = HashMap; - -/// A structure used to determine if a entity in the http cache can be used. -/// -/// This is heavily influenced by -/// which is BSD -/// 2-Clause Licensed and copyright Kornel Lesiński -pub struct CacheSemantics { - cache_control: CacheControl, - cached: SystemTime, - headers: HashMap, - now: SystemTime, -} - -impl CacheSemantics { - pub fn new( - headers: HashMap, - cached: SystemTime, - now: SystemTime, - ) -> Self { - let cache_control = headers - .get("cache-control") - .map(|v| CacheControl::from_value(v).unwrap_or_default()) - .unwrap_or_default(); - Self { - cache_control, - cached, - headers, - now, - } - } - - fn age(&self) -> Duration { - let mut age = self.age_header_value(); - - if let Ok(resident_time) = self.now.duration_since(self.cached) { - age += resident_time; - } - - age - } - - fn age_header_value(&self) -> Duration { - Duration::from_secs( - self - .headers - .get("age") - .and_then(|v| v.parse().ok()) - .unwrap_or(0), - ) - } - - fn is_stale(&self) -> bool { - self.max_age() <= self.age() - } - - fn max_age(&self) -> Duration { - if self.cache_control.cachability == Some(Cachability::NoCache) { - return Duration::from_secs(0); - } - - if self.headers.get("vary").map(|s| s.trim()) == Some("*") { - return Duration::from_secs(0); - } - - if let Some(max_age) = self.cache_control.max_age { - return max_age; - } - - let default_min_ttl = Duration::from_secs(0); - - let server_date = self.raw_server_date(); - if let Some(expires) = self.headers.get("expires") { - return match DateTime::parse_from_rfc2822(expires) { - Err(_) => Duration::from_secs(0), - Ok(expires) => { - let expires = SystemTime::UNIX_EPOCH - + Duration::from_secs(expires.timestamp().max(0) as _); - return default_min_ttl - .max(expires.duration_since(server_date).unwrap_or_default()); - } - }; - } - - if let Some(last_modified) = self.headers.get("last-modified") { - if let Ok(last_modified) = DateTime::parse_from_rfc2822(last_modified) { - let last_modified = SystemTime::UNIX_EPOCH - + Duration::from_secs(last_modified.timestamp().max(0) as _); - if let Ok(diff) = server_date.duration_since(last_modified) { - let secs_left = diff.as_secs() as f64 * 0.1; - return default_min_ttl.max(Duration::from_secs(secs_left as _)); - } - } - } - - default_min_ttl - } - - fn raw_server_date(&self) -> SystemTime { - self - .headers - .get("date") - .and_then(|d| DateTime::parse_from_rfc2822(d).ok()) - .and_then(|d| { - SystemTime::UNIX_EPOCH - .checked_add(Duration::from_secs(d.timestamp() as _)) - }) - .unwrap_or(self.cached) - } - - /// Returns true if the cached value is "fresh" respecting cached headers, - /// otherwise returns false. - pub fn should_use(&self) -> bool { - if self.cache_control.cachability == Some(Cachability::NoCache) { - return false; - } - - if let Some(max_age) = self.cache_control.max_age { - if self.age() > max_age { - return false; - } - } - - if let Some(min_fresh) = self.cache_control.min_fresh { - if self.time_to_live() < min_fresh { - return false; - } - } - - if self.is_stale() { - let has_max_stale = self.cache_control.max_stale.is_some(); - let allows_stale = has_max_stale - && self - .cache_control - .max_stale - .map(|val| val > self.age() - self.max_age()) - .unwrap_or(true); - if !allows_stale { - return false; - } - } - - true - } - - fn time_to_live(&self) -> Duration { - self.max_age().checked_sub(self.age()).unwrap_or_default() - } -} - -#[derive(Debug, Eq, PartialEq)] -pub enum FetchOnceResult { - Code(Vec, HeadersMap), - NotModified, - Redirect(Url, HeadersMap), - RequestError(String), - ServerError(StatusCode), -} +use crate::util::progress_bar::UpdateGuard; +use crate::version; -#[derive(Debug)] -pub struct FetchOnceArgs<'a> { - pub url: Url, - pub maybe_accept: Option, - pub maybe_etag: Option, - pub maybe_auth_token: Option, - pub maybe_auth: Option<(header::HeaderName, header::HeaderValue)>, - pub maybe_progress_guard: Option<&'a UpdateGuard>, +#[derive(Debug, Error)] +pub enum SendError { + #[error(transparent)] + Send(#[from] deno_fetch::ClientSendError), + #[error(transparent)] + InvalidUri(#[from] http::uri::InvalidUri), } pub struct HttpClientProvider { @@ -273,8 +101,11 @@ pub struct BadResponseError { pub response_text: Option, } +#[derive(Debug, Boxed)] +pub struct DownloadError(pub Box); + #[derive(Debug, Error)] -pub enum DownloadError { +pub enum DownloadErrorKind { #[error(transparent)] Fetch(AnyError), #[error(transparent)] @@ -285,8 +116,8 @@ pub enum DownloadError { Json(#[from] serde_json::Error), #[error(transparent)] ToStr(#[from] http::header::ToStrError), - #[error("Redirection from '{}' did not provide location header", .request_url)] - NoRedirectHeader { request_url: Url }, + #[error(transparent)] + RedirectHeaderParse(RedirectHeaderParseError), #[error("Too many redirects.")] TooManyRedirects, #[error(transparent)] @@ -314,9 +145,7 @@ impl HttpClient { } pub fn get(&self, url: Url) -> Result { - let body = http_body_util::Empty::new() - .map_err(|never| match never {}) - .boxed(); + let body = deno_fetch::ReqBody::empty(); let mut req = http::Request::new(body); *req.uri_mut() = url.as_str().parse()?; Ok(RequestBuilder { @@ -348,9 +177,7 @@ impl HttpClient { S: serde::Serialize, { let json = deno_core::serde_json::to_vec(ser)?; - let body = http_body_util::Full::new(json.into()) - .map_err(|never| match never {}) - .boxed(); + let body = deno_fetch::ReqBody::full(json.into()); let builder = self.post(url, body)?; Ok(builder.header( http::header::CONTENT_TYPE, @@ -358,107 +185,22 @@ impl HttpClient { )) } - /// Asynchronously fetches the given HTTP URL one pass only. - /// If no redirect is present and no error occurs, - /// yields Code(ResultPayload). - /// If redirect occurs, does not follow and - /// yields Redirect(url). - pub async fn fetch_no_follow<'a>( + pub async fn send( &self, - args: FetchOnceArgs<'a>, - ) -> Result { - let body = http_body_util::Empty::new() - .map_err(|never| match never {}) - .boxed(); + url: &Url, + headers: HeaderMap, + ) -> Result, SendError> { + let body = deno_fetch::ReqBody::empty(); let mut request = http::Request::new(body); - *request.uri_mut() = args.url.as_str().parse()?; - - if let Some(etag) = args.maybe_etag { - let if_none_match_val = HeaderValue::from_str(&etag)?; - request - .headers_mut() - .insert(IF_NONE_MATCH, if_none_match_val); - } - if let Some(auth_token) = args.maybe_auth_token { - let authorization_val = HeaderValue::from_str(&auth_token.to_string())?; - request - .headers_mut() - .insert(AUTHORIZATION, authorization_val); - } else if let Some((header, value)) = args.maybe_auth { - request.headers_mut().insert(header, value); - } - if let Some(accept) = args.maybe_accept { - let accepts_val = HeaderValue::from_str(&accept)?; - request.headers_mut().insert(ACCEPT, accepts_val); - } - let response = match self.client.clone().send(request).await { - Ok(resp) => resp, - Err(err) => { - if err.is_connect_error() { - return Ok(FetchOnceResult::RequestError(err.to_string())); - } - return Err(err.into()); - } - }; - - if response.status() == StatusCode::NOT_MODIFIED { - return Ok(FetchOnceResult::NotModified); - } - - let mut result_headers = HashMap::new(); - let response_headers = response.headers(); - - if let Some(warning) = response_headers.get("X-Deno-Warning") { - log::warn!( - "{} {}", - crate::colors::yellow("Warning"), - warning.to_str().unwrap() - ); - } - - for key in response_headers.keys() { - let key_str = key.to_string(); - let values = response_headers.get_all(key); - let values_str = values - .iter() - .map(|e| e.to_str().unwrap().to_string()) - .collect::>() - .join(","); - result_headers.insert(key_str, values_str); - } - - if response.status().is_redirection() { - let new_url = resolve_redirect_from_response(&args.url, &response)?; - return Ok(FetchOnceResult::Redirect(new_url, result_headers)); - } + *request.uri_mut() = http::Uri::try_from(url.as_str())?; + *request.headers_mut() = headers; - let status = response.status(); - - if status.is_server_error() { - return Ok(FetchOnceResult::ServerError(status)); - } - - if status.is_client_error() { - let err = if response.status() == StatusCode::NOT_FOUND { - custom_error( - "NotFound", - format!("Import '{}' failed, not found.", args.url), - ) - } else { - generic_error(format!( - "Import '{}' failed: {}", - args.url, - response.status() - )) - }; - return Err(err); - } - - let body = - get_response_body_with_progress(response, args.maybe_progress_guard) - .await?; - - Ok(FetchOnceResult::Code(body, result_headers)) + self + .client + .clone() + .send(request) + .await + .map_err(SendError::Send) } pub async fn download_text(&self, url: Url) -> Result { @@ -488,7 +230,12 @@ impl HttpClient { Some(progress_guard), ) }, - |e| matches!(e, DownloadError::BadResponse(_) | DownloadError::Fetch(_)), + |e| { + matches!( + e.as_kind(), + DownloadErrorKind::BadResponse(_) | DownloadErrorKind::Fetch(_) + ) + }, ) .await } @@ -515,18 +262,21 @@ impl HttpClient { } else if !response.status().is_success() { let status = response.status(); let maybe_response_text = body_to_string(response).await.ok(); - return Err(DownloadError::BadResponse(BadResponseError { - status_code: status, - response_text: maybe_response_text - .map(|s| s.trim().to_string()) - .filter(|s| !s.is_empty()), - })); + return Err( + DownloadErrorKind::BadResponse(BadResponseError { + status_code: status, + response_text: maybe_response_text + .map(|s| s.trim().to_string()) + .filter(|s| !s.is_empty()), + }) + .into_box(), + ); } get_response_body_with_progress(response, progress_guard) .await - .map(Some) - .map_err(DownloadError::Fetch) + .map(|(_, body)| Some(body)) + .map_err(|err| DownloadErrorKind::Fetch(err).into_box()) } async fn get_redirected_response( @@ -543,7 +293,7 @@ impl HttpClient { .clone() .send(req) .await - .map_err(|e| DownloadError::Fetch(e.into()))?; + .map_err(|e| DownloadErrorKind::Fetch(e.into()).into_box())?; let status = response.status(); if status.is_redirection() { for _ in 0..5 { @@ -563,7 +313,7 @@ impl HttpClient { .clone() .send(req) .await - .map_err(|e| DownloadError::Fetch(e.into()))?; + .map_err(|e| DownloadErrorKind::Fetch(e.into()).into_box())?; let status = new_response.status(); if status.is_redirection() { response = new_response; @@ -572,17 +322,17 @@ impl HttpClient { return Ok((new_response, new_url)); } } - Err(DownloadError::TooManyRedirects) + Err(DownloadErrorKind::TooManyRedirects.into_box()) } else { Ok((response, url)) } } } -async fn get_response_body_with_progress( +pub async fn get_response_body_with_progress( response: http::Response, progress_guard: Option<&UpdateGuard>, -) -> Result, AnyError> { +) -> Result<(HeaderMap, Vec), AnyError> { use http_body::Body as _; if let Some(progress_guard) = progress_guard { let mut total_size = response.body().size_hint().exact(); @@ -597,45 +347,21 @@ async fn get_response_body_with_progress( progress_guard.set_total_size(total_size); let mut current_size = 0; let mut data = Vec::with_capacity(total_size as usize); - let mut stream = response.into_body().into_data_stream(); + let (parts, body) = response.into_parts(); + let mut stream = body.into_data_stream(); while let Some(item) = stream.next().await { let bytes = item?; current_size += bytes.len() as u64; progress_guard.set_position(current_size); data.extend(bytes.into_iter()); } - return Ok(data); + return Ok((parts.headers, data)); } } - let bytes = response.collect().await?.to_bytes(); - Ok(bytes.into()) -} -/// Construct the next uri based on base uri and location header fragment -/// See -fn resolve_url_from_location(base_url: &Url, location: &str) -> Url { - if location.starts_with("http://") || location.starts_with("https://") { - // absolute uri - Url::parse(location).expect("provided redirect url should be a valid url") - } else if location.starts_with("//") { - // "//" authority path-abempty - Url::parse(&format!("{}:{}", base_url.scheme(), location)) - .expect("provided redirect url should be a valid url") - } else if location.starts_with('/') { - // path-absolute - base_url - .join(location) - .expect("provided redirect url should be a valid url") - } else { - // assuming path-noscheme | path-empty - let base_url_path_str = base_url.path().to_owned(); - // Pop last part or url (after last slash) - let segs: Vec<&str> = base_url_path_str.rsplitn(2, '/').collect(); - let new_path = format!("{}/{}", segs.last().unwrap_or(&""), location); - base_url - .join(&new_path) - .expect("provided redirect url should be a valid url") - } + let (parts, body) = response.into_parts(); + let bytes = body.collect().await?.to_bytes(); + Ok((parts.headers, bytes.into())) } fn resolve_redirect_from_response( @@ -643,16 +369,11 @@ fn resolve_redirect_from_response( response: &http::Response, ) -> Result { debug_assert!(response.status().is_redirection()); - if let Some(location) = response.headers().get(LOCATION) { - let location_string = location.to_str()?; - log::debug!("Redirecting to {:?}...", &location_string); - let new_url = resolve_url_from_location(request_url, location_string); - Ok(new_url) - } else { - Err(DownloadError::NoRedirectHeader { - request_url: request_url.clone(), - }) - } + deno_cache_dir::file_fetcher::resolve_redirect_from_headers( + request_url, + response.headers(), + ) + .map_err(|err| DownloadErrorKind::RedirectHeaderParse(*err).into_box()) } pub async fn body_to_string(body: B) -> Result @@ -707,8 +428,6 @@ mod test { use deno_runtime::deno_tls::rustls::RootCertStore; - use crate::version; - use super::*; #[tokio::test] @@ -738,231 +457,9 @@ mod test { assert_eq!(err.to_string(), "Too many redirects."); } - #[test] - fn test_resolve_url_from_location_full_1() { - let url = "http://deno.land".parse::().unwrap(); - let new_uri = resolve_url_from_location(&url, "http://golang.org"); - assert_eq!(new_uri.host_str().unwrap(), "golang.org"); - } - - #[test] - fn test_resolve_url_from_location_full_2() { - let url = "https://deno.land".parse::().unwrap(); - let new_uri = resolve_url_from_location(&url, "https://golang.org"); - assert_eq!(new_uri.host_str().unwrap(), "golang.org"); - } - - #[test] - fn test_resolve_url_from_location_relative_1() { - let url = "http://deno.land/x".parse::().unwrap(); - let new_uri = resolve_url_from_location(&url, "//rust-lang.org/en-US"); - assert_eq!(new_uri.host_str().unwrap(), "rust-lang.org"); - assert_eq!(new_uri.path(), "/en-US"); - } - - #[test] - fn test_resolve_url_from_location_relative_2() { - let url = "http://deno.land/x".parse::().unwrap(); - let new_uri = resolve_url_from_location(&url, "/y"); - assert_eq!(new_uri.host_str().unwrap(), "deno.land"); - assert_eq!(new_uri.path(), "/y"); - } - - #[test] - fn test_resolve_url_from_location_relative_3() { - let url = "http://deno.land/x".parse::().unwrap(); - let new_uri = resolve_url_from_location(&url, "z"); - assert_eq!(new_uri.host_str().unwrap(), "deno.land"); - assert_eq!(new_uri.path(), "/z"); - } - - fn create_test_client() -> HttpClient { - HttpClient::new( - create_http_client("test_client", CreateHttpClientOptions::default()) - .unwrap(), - ) - } - - #[tokio::test] - async fn test_fetch_string() { - let _http_server_guard = test_util::http_server(); - // Relies on external http server. See target/debug/test_server - let url = Url::parse("http://127.0.0.1:4545/assets/fixture.json").unwrap(); - let client = create_test_client(); - let result = client - .fetch_no_follow(FetchOnceArgs { - url, - maybe_accept: None, - maybe_etag: None, - maybe_auth_token: None, - maybe_progress_guard: None, - maybe_auth: None, - }) - .await; - if let Ok(FetchOnceResult::Code(body, headers)) = result { - assert!(!body.is_empty()); - assert_eq!(headers.get("content-type").unwrap(), "application/json"); - assert_eq!(headers.get("etag"), None); - assert_eq!(headers.get("x-typescript-types"), None); - } else { - panic!(); - } - } - - #[tokio::test] - async fn test_fetch_gzip() { - let _http_server_guard = test_util::http_server(); - // Relies on external http server. See target/debug/test_server - let url = Url::parse("http://127.0.0.1:4545/run/import_compression/gziped") - .unwrap(); - let client = create_test_client(); - let result = client - .fetch_no_follow(FetchOnceArgs { - url, - maybe_accept: None, - maybe_etag: None, - maybe_auth_token: None, - maybe_progress_guard: None, - maybe_auth: None, - }) - .await; - if let Ok(FetchOnceResult::Code(body, headers)) = result { - assert_eq!(String::from_utf8(body).unwrap(), "console.log('gzip')"); - assert_eq!( - headers.get("content-type").unwrap(), - "application/javascript" - ); - assert_eq!(headers.get("etag"), None); - assert_eq!(headers.get("x-typescript-types"), None); - } else { - panic!(); - } - } - - #[tokio::test] - async fn test_fetch_with_etag() { - let _http_server_guard = test_util::http_server(); - let url = Url::parse("http://127.0.0.1:4545/etag_script.ts").unwrap(); - let client = create_test_client(); - let result = client - .fetch_no_follow(FetchOnceArgs { - url: url.clone(), - maybe_accept: None, - maybe_etag: None, - maybe_auth_token: None, - maybe_progress_guard: None, - maybe_auth: None, - }) - .await; - if let Ok(FetchOnceResult::Code(body, headers)) = result { - assert!(!body.is_empty()); - assert_eq!(String::from_utf8(body).unwrap(), "console.log('etag')"); - assert_eq!( - headers.get("content-type").unwrap(), - "application/typescript" - ); - assert_eq!(headers.get("etag").unwrap(), "33a64df551425fcc55e"); - } else { - panic!(); - } - - let res = client - .fetch_no_follow(FetchOnceArgs { - url, - maybe_accept: None, - maybe_etag: Some("33a64df551425fcc55e".to_string()), - maybe_auth_token: None, - maybe_progress_guard: None, - maybe_auth: None, - }) - .await; - assert_eq!(res.unwrap(), FetchOnceResult::NotModified); - } - - #[tokio::test] - async fn test_fetch_brotli() { - let _http_server_guard = test_util::http_server(); - // Relies on external http server. See target/debug/test_server - let url = Url::parse("http://127.0.0.1:4545/run/import_compression/brotli") - .unwrap(); - let client = create_test_client(); - let result = client - .fetch_no_follow(FetchOnceArgs { - url, - maybe_accept: None, - maybe_etag: None, - maybe_auth_token: None, - maybe_progress_guard: None, - maybe_auth: None, - }) - .await; - if let Ok(FetchOnceResult::Code(body, headers)) = result { - assert!(!body.is_empty()); - assert_eq!(String::from_utf8(body).unwrap(), "console.log('brotli');"); - assert_eq!( - headers.get("content-type").unwrap(), - "application/javascript" - ); - assert_eq!(headers.get("etag"), None); - assert_eq!(headers.get("x-typescript-types"), None); - } else { - panic!(); - } - } - - #[tokio::test] - async fn test_fetch_accept() { - let _http_server_guard = test_util::http_server(); - // Relies on external http server. See target/debug/test_server - let url = Url::parse("http://127.0.0.1:4545/echo_accept").unwrap(); - let client = create_test_client(); - let result = client - .fetch_no_follow(FetchOnceArgs { - url, - maybe_accept: Some("application/json".to_string()), - maybe_etag: None, - maybe_auth_token: None, - maybe_progress_guard: None, - maybe_auth: None, - }) - .await; - if let Ok(FetchOnceResult::Code(body, _)) = result { - assert_eq!(body, r#"{"accept":"application/json"}"#.as_bytes()); - } else { - panic!(); - } - } - - #[tokio::test] - async fn test_fetch_no_follow_with_redirect() { - let _http_server_guard = test_util::http_server(); - // Relies on external http server. See target/debug/test_server - let url = Url::parse("http://127.0.0.1:4546/assets/fixture.json").unwrap(); - // Dns resolver substitutes `127.0.0.1` with `localhost` - let target_url = - Url::parse("http://localhost:4545/assets/fixture.json").unwrap(); - let client = create_test_client(); - let result = client - .fetch_no_follow(FetchOnceArgs { - url, - maybe_accept: None, - maybe_etag: None, - maybe_auth_token: None, - maybe_progress_guard: None, - maybe_auth: None, - }) - .await; - if let Ok(FetchOnceResult::Redirect(url, _)) = result { - assert_eq!(url, target_url); - } else { - panic!(); - } - } - #[tokio::test] async fn test_fetch_with_cafile_string() { let _http_server_guard = test_util::http_server(); - // Relies on external http server. See target/debug/test_server let url = Url::parse("https://localhost:5545/assets/fixture.json").unwrap(); let client = HttpClient::new( @@ -978,24 +475,15 @@ mod test { ) .unwrap(), ); - let result = client - .fetch_no_follow(FetchOnceArgs { - url, - maybe_accept: None, - maybe_etag: None, - maybe_auth_token: None, - maybe_progress_guard: None, - maybe_auth: None, - }) - .await; - if let Ok(FetchOnceResult::Code(body, headers)) = result { - assert!(!body.is_empty()); - assert_eq!(headers.get("content-type").unwrap(), "application/json"); - assert_eq!(headers.get("etag"), None); - assert_eq!(headers.get("x-typescript-types"), None); - } else { - panic!(); - } + let response = client.send(&url, Default::default()).await.unwrap(); + assert!(response.status().is_success()); + let (parts, body) = response.into_parts(); + let headers = parts.headers; + let body = body.collect().await.unwrap().to_bytes(); + assert!(!body.is_empty()); + assert_eq!(headers.get("content-type").unwrap(), "application/json"); + assert_eq!(headers.get("etag"), None); + assert_eq!(headers.get("x-typescript-types"), None); } static PUBLIC_HTTPS_URLS: &[&str] = &[ @@ -1026,34 +514,15 @@ mod test { .unwrap(), ); - let result = client - .fetch_no_follow(FetchOnceArgs { - url, - maybe_accept: None, - maybe_etag: None, - maybe_auth_token: None, - maybe_progress_guard: None, - maybe_auth: None, - }) - .await; - + let result = client.send(&url, Default::default()).await; match result { - Err(_) => { - eprintln!("Fetch error: {result:?}"); - continue; + Ok(response) if response.status().is_success() => { + return; // success } - Ok( - FetchOnceResult::Code(..) - | FetchOnceResult::NotModified - | FetchOnceResult::Redirect(..), - ) => return, - Ok( - FetchOnceResult::RequestError(_) | FetchOnceResult::ServerError(_), - ) => { - eprintln!("HTTP error: {result:?}"); - continue; + _ => { + // keep going } - }; + } } // Use 1.1.1.1 and 8.8.8.8 as our last-ditch internet check @@ -1089,42 +558,13 @@ mod test { .unwrap(), ); - let result = client - .fetch_no_follow(FetchOnceArgs { - url, - maybe_accept: None, - maybe_etag: None, - maybe_auth_token: None, - maybe_progress_guard: None, - maybe_auth: None, - }) - .await; - - match result { - Err(_) => { - eprintln!("Fetch error (expected): {result:?}"); - return; - } - Ok( - FetchOnceResult::Code(..) - | FetchOnceResult::NotModified - | FetchOnceResult::Redirect(..), - ) => { - panic!("Should not have successfully fetched a URL"); - } - Ok( - FetchOnceResult::RequestError(_) | FetchOnceResult::ServerError(_), - ) => { - eprintln!("HTTP error (expected): {result:?}"); - return; - } - }; + let result = client.send(&url, HeaderMap::new()).await; + assert!(result.is_err() || !result.unwrap().status().is_success()); } #[tokio::test] async fn test_fetch_with_cafile_gzip() { let _http_server_guard = test_util::http_server(); - // Relies on external http server. See target/debug/test_server let url = Url::parse("https://localhost:5545/run/import_compression/gziped") .unwrap(); @@ -1143,27 +583,18 @@ mod test { ) .unwrap(), ); - let result = client - .fetch_no_follow(FetchOnceArgs { - url, - maybe_accept: None, - maybe_etag: None, - maybe_auth_token: None, - maybe_progress_guard: None, - maybe_auth: None, - }) - .await; - if let Ok(FetchOnceResult::Code(body, headers)) = result { - assert_eq!(String::from_utf8(body).unwrap(), "console.log('gzip')"); - assert_eq!( - headers.get("content-type").unwrap(), - "application/javascript" - ); - assert_eq!(headers.get("etag"), None); - assert_eq!(headers.get("x-typescript-types"), None); - } else { - panic!(); - } + let response = client.send(&url, Default::default()).await.unwrap(); + assert!(response.status().is_success()); + let (parts, body) = response.into_parts(); + let headers = parts.headers; + let body = body.collect().await.unwrap().to_bytes().to_vec(); + assert_eq!(String::from_utf8(body).unwrap(), "console.log('gzip')"); + assert_eq!( + headers.get("content-type").unwrap(), + "application/javascript" + ); + assert_eq!(headers.get("etag"), None); + assert_eq!(headers.get("x-typescript-types"), None); } #[tokio::test] @@ -1185,46 +616,29 @@ mod test { ) .unwrap(), ); - let result = client - .fetch_no_follow(FetchOnceArgs { - url: url.clone(), - maybe_accept: None, - maybe_etag: None, - maybe_auth_token: None, - maybe_progress_guard: None, - maybe_auth: None, - }) - .await; - if let Ok(FetchOnceResult::Code(body, headers)) = result { - assert!(!body.is_empty()); - assert_eq!(String::from_utf8(body).unwrap(), "console.log('etag')"); - assert_eq!( - headers.get("content-type").unwrap(), - "application/typescript" - ); - assert_eq!(headers.get("etag").unwrap(), "33a64df551425fcc55e"); - assert_eq!(headers.get("x-typescript-types"), None); - } else { - panic!(); - } + let response = client.send(&url, Default::default()).await.unwrap(); + assert!(response.status().is_success()); + let (parts, body) = response.into_parts(); + let headers = parts.headers; + let body = body.collect().await.unwrap().to_bytes().to_vec(); + assert!(!body.is_empty()); + assert_eq!(String::from_utf8(body).unwrap(), "console.log('etag')"); + assert_eq!( + headers.get("content-type").unwrap(), + "application/typescript" + ); + assert_eq!(headers.get("etag").unwrap(), "33a64df551425fcc55e"); + assert_eq!(headers.get("x-typescript-types"), None); - let res = client - .fetch_no_follow(FetchOnceArgs { - url, - maybe_accept: None, - maybe_etag: Some("33a64df551425fcc55e".to_string()), - maybe_auth_token: None, - maybe_progress_guard: None, - maybe_auth: None, - }) - .await; - assert_eq!(res.unwrap(), FetchOnceResult::NotModified); + let mut headers = HeaderMap::new(); + headers.insert("If-None-Match", "33a64df551425fcc55e".parse().unwrap()); + let res = client.send(&url, headers).await.unwrap(); + assert_eq!(res.status(), StatusCode::NOT_MODIFIED); } #[tokio::test] async fn test_fetch_with_cafile_brotli() { let _http_server_guard = test_util::http_server(); - // Relies on external http server. See target/debug/test_server let url = Url::parse("https://localhost:5545/run/import_compression/brotli") .unwrap(); @@ -1243,93 +657,18 @@ mod test { ) .unwrap(), ); - let result = client - .fetch_no_follow(FetchOnceArgs { - url, - maybe_accept: None, - maybe_etag: None, - maybe_auth_token: None, - maybe_progress_guard: None, - maybe_auth: None, - }) - .await; - if let Ok(FetchOnceResult::Code(body, headers)) = result { - assert!(!body.is_empty()); - assert_eq!(String::from_utf8(body).unwrap(), "console.log('brotli');"); - assert_eq!( - headers.get("content-type").unwrap(), - "application/javascript" - ); - assert_eq!(headers.get("etag"), None); - assert_eq!(headers.get("x-typescript-types"), None); - } else { - panic!(); - } - } - - #[tokio::test] - async fn bad_redirect() { - let _g = test_util::http_server(); - let url_str = "http://127.0.0.1:4545/bad_redirect"; - let url = Url::parse(url_str).unwrap(); - let client = create_test_client(); - let result = client - .fetch_no_follow(FetchOnceArgs { - url, - maybe_accept: None, - maybe_etag: None, - maybe_auth_token: None, - maybe_progress_guard: None, - maybe_auth: None, - }) - .await; - assert!(result.is_err()); - let err = result.unwrap_err(); - // Check that the error message contains the original URL - assert!(err.to_string().contains(url_str)); - } - - #[tokio::test] - async fn server_error() { - let _g = test_util::http_server(); - let url_str = "http://127.0.0.1:4545/server_error"; - let url = Url::parse(url_str).unwrap(); - let client = create_test_client(); - let result = client - .fetch_no_follow(FetchOnceArgs { - url, - maybe_accept: None, - maybe_etag: None, - maybe_auth_token: None, - maybe_progress_guard: None, - maybe_auth: None, - }) - .await; - - if let Ok(FetchOnceResult::ServerError(status)) = result { - assert_eq!(status, 500); - } else { - panic!(); - } - } - - #[tokio::test] - async fn request_error() { - let _g = test_util::http_server(); - let url_str = "http://127.0.0.1:9999/"; - let url = Url::parse(url_str).unwrap(); - let client = create_test_client(); - let result = client - .fetch_no_follow(FetchOnceArgs { - url, - maybe_accept: None, - maybe_etag: None, - maybe_auth_token: None, - maybe_progress_guard: None, - maybe_auth: None, - }) - .await; - - assert!(matches!(result, Ok(FetchOnceResult::RequestError(_)))); + let response = client.send(&url, Default::default()).await.unwrap(); + assert!(response.status().is_success()); + let (parts, body) = response.into_parts(); + let headers = parts.headers; + let body = body.collect().await.unwrap().to_bytes().to_vec(); + assert!(!body.is_empty()); + assert_eq!(String::from_utf8(body).unwrap(), "console.log('brotli');"); + assert_eq!( + headers.get("content-type").unwrap(), + "application/javascript" + ); + assert_eq!(headers.get("etag"), None); + assert_eq!(headers.get("x-typescript-types"), None); } } diff --git a/cli/integration_tests_runner.rs b/cli/integration_tests_runner.rs index 12e83a01940bab..7342e62fa0df8d 100644 --- a/cli/integration_tests_runner.rs +++ b/cli/integration_tests_runner.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. pub fn main() { let mut args = vec!["cargo", "test", "-p", "cli_tests", "--features", "run"]; diff --git a/cli/js.rs b/cli/js.rs index 2c93f004ca0a67..5337c53f76723f 100644 --- a/cli/js.rs +++ b/cli/js.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use log::debug; diff --git a/cli/js/40_bench.js b/cli/js/40_bench.js index b07df3993c802b..0ad05c5197f20e 100644 --- a/cli/js/40_bench.js +++ b/cli/js/40_bench.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file import { core, primordials } from "ext:core/mod.js"; diff --git a/cli/js/40_jupyter.js b/cli/js/40_jupyter.js index 198b6a350254eb..f392af1d43f798 100644 --- a/cli/js/40_jupyter.js +++ b/cli/js/40_jupyter.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file /* diff --git a/cli/js/40_lint.js b/cli/js/40_lint.js new file mode 100644 index 00000000000000..4adbc1baa12e6e --- /dev/null +++ b/cli/js/40_lint.js @@ -0,0 +1,1122 @@ +// Copyright 2018-2025 the Deno authors. MIT license. + +// @ts-check + +import { + compileSelector, + parseSelector, + splitSelectors, +} from "ext:cli/40_lint_selector.js"; +import { core, internals } from "ext:core/mod.js"; +const { + op_lint_create_serialized_ast, +} = core.ops; + +// Keep in sync with Rust +// These types are expected to be present on every node. Note that this +// isn't set in stone. We could revise this at a future point. +const AST_PROP_TYPE = 1; +const AST_PROP_PARENT = 2; +const AST_PROP_RANGE = 3; +const AST_PROP_LENGTH = 4; + +// Keep in sync with Rust +// Each node property is tagged with this enum to denote +// what kind of value it holds. +/** @enum {number} */ +const PropFlags = { + /** This is an offset to another node */ + Ref: 0, + /** This is an array of offsets to other nodes (like children of a BlockStatement) */ + RefArr: 1, + /** + * This is a string id. The actual string needs to be looked up in + * the string table that was included in the message. + */ + String: 2, + /** This value is either 0 = false, or 1 = true */ + Bool: 3, + /** No value, it's null */ + Null: 4, + /** No value, it's undefined */ + Undefined: 5, +}; + +/** @typedef {import("./40_lint_types.d.ts").AstContext} AstContext */ +/** @typedef {import("./40_lint_types.d.ts").VisitorFn} VisitorFn */ +/** @typedef {import("./40_lint_types.d.ts").CompiledVisitor} CompiledVisitor */ +/** @typedef {import("./40_lint_types.d.ts").LintState} LintState */ +/** @typedef {import("./40_lint_types.d.ts").RuleContext} RuleContext */ +/** @typedef {import("./40_lint_types.d.ts").NodeFacade} NodeFacade */ +/** @typedef {import("./40_lint_types.d.ts").LintPlugin} LintPlugin */ +/** @typedef {import("./40_lint_types.d.ts").TransformFn} TransformFn */ +/** @typedef {import("./40_lint_types.d.ts").MatchContext} MatchContext */ + +/** @type {LintState} */ +const state = { + plugins: [], + installedPlugins: new Set(), +}; + +/** + * Every rule gets their own instance of this class. This is the main + * API lint rules interact with. + * @implements {RuleContext} + */ +export class Context { + id; + + fileName; + + /** + * @param {string} id + * @param {string} fileName + */ + constructor(id, fileName) { + this.id = id; + this.fileName = fileName; + } +} + +/** + * @param {LintPlugin} plugin + */ +export function installPlugin(plugin) { + if (typeof plugin !== "object") { + throw new Error("Linter plugin must be an object"); + } + if (typeof plugin.name !== "string") { + throw new Error("Linter plugin name must be a string"); + } + if (typeof plugin.rules !== "object") { + throw new Error("Linter plugin rules must be an object"); + } + if (state.installedPlugins.has(plugin.name)) { + throw new Error(`Linter plugin ${plugin.name} has already been registered`); + } + state.plugins.push(plugin); + state.installedPlugins.add(plugin.name); +} + +/** + * @param {AstContext} ctx + * @param {number} offset + * @returns + */ +function getNode(ctx, offset) { + if (offset === 0) return null; + const cached = ctx.nodes.get(offset); + if (cached !== undefined) return cached; + + const node = new Node(ctx, offset); + ctx.nodes.set(offset, /** @type {*} */ (cached)); + return node; +} + +/** + * Find the offset of a specific property of a specific node. This will + * be used later a lot more for selectors. + * @param {Uint8Array} buf + * @param {number} search + * @param {number} offset + * @returns {number} + */ +function findPropOffset(buf, offset, search) { + // type + parentId + SpanLo + SpanHi + offset += 1 + 4 + 4 + 4; + + const propCount = buf[offset]; + offset += 1; + + for (let i = 0; i < propCount; i++) { + const maybe = offset; + const prop = buf[offset++]; + const kind = buf[offset++]; + if (prop === search) return maybe; + + if (kind === PropFlags.Ref) { + offset += 4; + } else if (kind === PropFlags.RefArr) { + const len = readU32(buf, offset); + offset += 4 + (len * 4); + } else if (kind === PropFlags.String) { + offset += 4; + } else if (kind === PropFlags.Bool) { + offset++; + } else if (kind === PropFlags.Null || kind === PropFlags.Undefined) { + // No value + } else { + offset++; + } + } + + return -1; +} + +const INTERNAL_CTX = Symbol("ctx"); +const INTERNAL_OFFSET = Symbol("offset"); + +// This class is a facade for all materialized nodes. Instead of creating a +// unique class per AST node, we have one class with getters for every +// possible node property. This allows us to lazily materialize child node +// only when they are needed. +class Node { + [INTERNAL_CTX]; + [INTERNAL_OFFSET]; + + /** + * @param {AstContext} ctx + * @param {number} offset + */ + constructor(ctx, offset) { + this[INTERNAL_CTX] = ctx; + this[INTERNAL_OFFSET] = offset; + } + + /** + * Logging a class with only getters prints just the class name. This + * makes debugging difficult because you don't see any of the properties. + * For that reason we'll intercept inspection and serialize the node to + * a plain JSON structure which can be logged and allows users to see all + * properties and their values. + * + * This is only expected to be used during development of a rule. + * @param {*} _ + * @param {Deno.InspectOptions} options + * @returns {string} + */ + [Symbol.for("Deno.customInspect")](_, options) { + const json = toJsValue(this[INTERNAL_CTX], this[INTERNAL_OFFSET]); + return Deno.inspect(json, options); + } + + [Symbol.for("Deno.lint.toJsValue")]() { + return toJsValue(this[INTERNAL_CTX], this[INTERNAL_OFFSET]); + } +} + +/** @type {Set} */ +const appliedGetters = new Set(); + +/** + * Add getters for all potential properties found in the message. + * @param {AstContext} ctx + */ +function setNodeGetters(ctx) { + if (appliedGetters.size === ctx.strByProp.length) return; + + for (let i = 0; i < ctx.strByProp.length; i++) { + const id = ctx.strByProp[i]; + if (id === 0 || appliedGetters.has(i)) continue; + appliedGetters.add(i); + + const name = getString(ctx.strTable, id); + + Object.defineProperty(Node.prototype, name, { + get() { + return readValue(this[INTERNAL_CTX], this[INTERNAL_OFFSET], i); + }, + }); + } +} + +/** + * Serialize a node recursively to plain JSON + * @param {AstContext} ctx + * @param {number} offset + * @returns {*} + */ +function toJsValue(ctx, offset) { + const { buf } = ctx; + + /** @type {Record} */ + const node = { + type: readValue(ctx, offset, AST_PROP_TYPE), + range: readValue(ctx, offset, AST_PROP_RANGE), + }; + + // type + parentId + SpanLo + SpanHi + offset += 1 + 4 + 4 + 4; + + const count = buf[offset++]; + for (let i = 0; i < count; i++) { + const prop = buf[offset++]; + const kind = buf[offset++]; + const name = getString(ctx.strTable, ctx.strByProp[prop]); + + if (kind === PropFlags.Ref) { + const v = readU32(buf, offset); + offset += 4; + node[name] = v === 0 ? null : toJsValue(ctx, v); + } else if (kind === PropFlags.RefArr) { + const len = readU32(buf, offset); + offset += 4; + const nodes = new Array(len); + for (let i = 0; i < len; i++) { + const v = readU32(buf, offset); + if (v === 0) continue; + nodes[i] = toJsValue(ctx, v); + offset += 4; + } + node[name] = nodes; + } else if (kind === PropFlags.Bool) { + const v = buf[offset++]; + node[name] = v === 1; + } else if (kind === PropFlags.String) { + const v = readU32(buf, offset); + offset += 4; + node[name] = getString(ctx.strTable, v); + } else if (kind === PropFlags.Null) { + node[name] = null; + } else if (kind === PropFlags.Undefined) { + node[name] = undefined; + } + } + + return node; +} + +/** + * Read a specific property from a node + * @param {AstContext} ctx + * @param {number} offset + * @param {number} search + * @returns {*} + */ +function readValue(ctx, offset, search) { + const { buf } = ctx; + const type = buf[offset]; + + if (search === AST_PROP_TYPE) { + return getString(ctx.strTable, ctx.strByType[type]); + } else if (search === AST_PROP_RANGE) { + const start = readU32(buf, offset + 1 + 4); + const end = readU32(buf, offset + 1 + 4 + 4); + return [start, end]; + } else if (search === AST_PROP_PARENT) { + const pos = readU32(buf, offset + 1); + return getNode(ctx, pos); + } + + offset = findPropOffset(ctx.buf, offset, search); + if (offset === -1) return undefined; + + const kind = buf[offset + 1]; + offset += 2; + + if (kind === PropFlags.Ref) { + const value = readU32(buf, offset); + return getNode(ctx, value); + } else if (kind === PropFlags.RefArr) { + const len = readU32(buf, offset); + offset += 4; + + const nodes = new Array(len); + for (let i = 0; i < len; i++) { + nodes[i] = getNode(ctx, readU32(buf, offset)); + offset += 4; + } + return nodes; + } else if (kind === PropFlags.Bool) { + return buf[offset] === 1; + } else if (kind === PropFlags.String) { + const v = readU32(buf, offset); + return getString(ctx.strTable, v); + } else if (kind === PropFlags.Null) { + return null; + } else if (kind === PropFlags.Undefined) { + return undefined; + } + + throw new Error(`Unknown prop kind: ${kind}`); +} + +const DECODER = new TextDecoder(); + +/** + * TODO: Check if it's faster to use the `ArrayView` API instead. + * @param {Uint8Array} buf + * @param {number} i + * @returns {number} + */ +function readU32(buf, i) { + return (buf[i] << 24) + (buf[i + 1] << 16) + (buf[i + 2] << 8) + + buf[i + 3]; +} + +/** + * Get a string by id and error if it wasn't found + * @param {AstContext["strTable"]} strTable + * @param {number} id + * @returns {string} + */ +function getString(strTable, id) { + const name = strTable.get(id); + if (name === undefined) { + throw new Error(`Missing string id: ${id}`); + } + + return name; +} + +/** + * @param {AstContext["buf"]} buf + * @param {number} child + * @returns {null | [number, number]} + */ +function findChildOffset(buf, child) { + let offset = readU32(buf, child + 1); + + // type + parentId + SpanLo + SpanHi + offset += 1 + 4 + 4 + 4; + + const propCount = buf[offset++]; + for (let i = 0; i < propCount; i++) { + const _prop = buf[offset++]; + const kind = buf[offset++]; + + switch (kind) { + case PropFlags.Ref: { + const start = offset; + const value = readU32(buf, offset); + offset += 4; + if (value === child) { + return [start, -1]; + } + break; + } + case PropFlags.RefArr: { + const start = offset; + + const len = readU32(buf, offset); + offset += 4; + + for (let j = 0; j < len; j++) { + const value = readU32(buf, offset); + offset += 4; + if (value === child) { + return [start, j]; + } + } + + break; + } + case PropFlags.String: + offset += 4; + break; + case PropFlags.Bool: + offset++; + break; + case PropFlags.Null: + case PropFlags.Undefined: + break; + } + } + + return null; +} + +/** @implements {MatchContext} */ +class MatchCtx { + /** + * @param {AstContext["buf"]} buf + * @param {AstContext["strTable"]} strTable + * @param {AstContext["strByType"]} strByType + */ + constructor(buf, strTable, strByType) { + this.buf = buf; + this.strTable = strTable; + this.strByType = strByType; + } + + /** + * @param {number} offset + * @returns {number} + */ + getParent(offset) { + return readU32(this.buf, offset + 1); + } + + /** + * @param {number} offset + * @returns {number} + */ + getType(offset) { + return this.buf[offset]; + } + + /** + * @param {number} offset + * @param {number[]} propIds + * @param {number} idx + * @returns {unknown} + */ + getAttrPathValue(offset, propIds, idx) { + const { buf } = this; + + const propId = propIds[idx]; + + switch (propId) { + case AST_PROP_TYPE: { + const type = this.getType(offset); + return getString(this.strTable, this.strByType[type]); + } + case AST_PROP_PARENT: + case AST_PROP_RANGE: + throw new Error(`Not supported`); + } + + offset = findPropOffset(buf, offset, propId); + if (offset === -1) return undefined; + const _prop = buf[offset++]; + const kind = buf[offset++]; + + if (kind === PropFlags.Ref) { + const value = readU32(buf, offset); + // Checks need to end with a value, not a node + if (idx === propIds.length - 1) return undefined; + return this.getAttrPathValue(value, propIds, idx + 1); + } else if (kind === PropFlags.RefArr) { + const count = readU32(buf, offset); + offset += 4; + + if (idx < propIds.length - 1 && propIds[idx + 1] === AST_PROP_LENGTH) { + return count; + } + + // TODO(@marvinhagemeister): Allow traversing into array children? + } + + // Cannot traverse into primitives further + if (idx < propIds.length - 1) return undefined; + + if (kind === PropFlags.String) { + const s = readU32(buf, offset); + return getString(this.strTable, s); + } else if (kind === PropFlags.Bool) { + return buf[offset] === 1; + } else if (kind === PropFlags.Null) { + return null; + } else if (kind === PropFlags.Undefined) { + return undefined; + } + + return undefined; + } + + /** + * @param {number} offset + * @param {number[]} propIds + * @param {number} idx + * @returns {boolean} + */ + hasAttrPath(offset, propIds, idx) { + const { buf } = this; + + const propId = propIds[idx]; + // If propId is 0 then the property doesn't exist in the AST + if (propId === 0) return false; + + switch (propId) { + case AST_PROP_TYPE: + case AST_PROP_PARENT: + case AST_PROP_RANGE: + return true; + } + + offset = findPropOffset(buf, offset, propId); + if (offset === -1) return false; + if (idx === propIds.length - 1) return true; + + const _prop = buf[offset++]; + const kind = buf[offset++]; + if (kind === PropFlags.Ref) { + const value = readU32(buf, offset); + return this.hasAttrPath(value, propIds, idx + 1); + } else if (kind === PropFlags.RefArr) { + const _count = readU32(buf, offset); + offset += 4; + + if (idx < propIds.length - 1 && propIds[idx + 1] === AST_PROP_LENGTH) { + return true; + } + + // TODO(@marvinhagemeister): Allow traversing into array children? + } + + // Primitives cannot be traversed further. This means we + // didn't found the attribute. + if (idx < propIds.length - 1) return false; + + return true; + } + + /** + * @param {number} offset + * @returns {number} + */ + getFirstChild(offset) { + const { buf } = this; + + // type + parentId + SpanLo + SpanHi + offset += 1 + 4 + 4 + 4; + + const count = buf[offset++]; + for (let i = 0; i < count; i++) { + const _prop = buf[offset++]; + const kind = buf[offset++]; + + switch (kind) { + case PropFlags.Ref: { + const v = readU32(buf, offset); + offset += 4; + return v; + } + case PropFlags.RefArr: { + const len = readU32(buf, offset); + offset += 4; + for (let j = 0; j < len; j++) { + const v = readU32(buf, offset); + offset += 4; + return v; + } + + return len; + } + + case PropFlags.String: + offset += 4; + break; + case PropFlags.Bool: + offset++; + break; + case PropFlags.Null: + case PropFlags.Undefined: + break; + } + } + + return -1; + } + + /** + * @param {number} offset + * @returns {number} + */ + getLastChild(offset) { + const { buf } = this; + + // type + parentId + SpanLo + SpanHi + offset += 1 + 4 + 4 + 4; + + let last = -1; + + const count = buf[offset++]; + for (let i = 0; i < count; i++) { + const _prop = buf[offset++]; + const kind = buf[offset++]; + + switch (kind) { + case PropFlags.Ref: { + const v = readU32(buf, offset); + offset += 4; + last = v; + break; + } + case PropFlags.RefArr: { + const len = readU32(buf, offset); + offset += 4; + for (let j = 0; j < len; j++) { + const v = readU32(buf, offset); + last = v; + offset += 4; + } + + break; + } + + case PropFlags.String: + offset += 4; + break; + case PropFlags.Bool: + offset++; + break; + case PropFlags.Null: + case PropFlags.Undefined: + break; + } + } + + return last; + } + + /** + * @param {number} id + * @returns {number[]} + */ + getSiblings(id) { + const { buf } = this; + + const result = findChildOffset(buf, id); + // Happens for program nodes + if (result === null) return []; + + if (result[1] === -1) { + return [id]; + } + + let offset = result[0]; + const count = readU32(buf, offset); + offset += 4; + + /** @type {number[]} */ + const out = []; + for (let i = 0; i < count; i++) { + const v = readU32(buf, offset); + offset += 4; + out.push(v); + } + + return out; + } +} + +/** + * @param {Uint8Array} buf + * @param {AstContext} buf + */ +function createAstContext(buf) { + /** @type {Map} */ + const strTable = new Map(); + + // The buffer has a few offsets at the end which allows us to easily + // jump to the relevant sections of the message. + const typeMapOffset = readU32(buf, buf.length - 16); + const propMapOffset = readU32(buf, buf.length - 12); + const strTableOffset = readU32(buf, buf.length - 8); + + // Offset of the topmost node in the AST Tree. + const rootOffset = readU32(buf, buf.length - 4); + + let offset = strTableOffset; + const stringCount = readU32(buf, offset); + offset += 4; + + // TODO(@marvinhagemeister): We could lazily decode the strings on an as needed basis. + // Not sure if this matters much in practice though. + let id = 0; + for (let i = 0; i < stringCount; i++) { + const len = readU32(buf, offset); + offset += 4; + + const strBytes = buf.slice(offset, offset + len); + offset += len; + const s = DECODER.decode(strBytes); + strTable.set(id, s); + id++; + } + + if (strTable.size !== stringCount) { + throw new Error( + `Could not deserialize string table. Expected ${stringCount} items, but got ${strTable.size}`, + ); + } + + offset = typeMapOffset; + const typeCount = readU32(buf, offset); + offset += 4; + + const typeByStr = new Map(); + const strByType = new Array(typeCount).fill(0); + for (let i = 0; i < typeCount; i++) { + const v = readU32(buf, offset); + offset += 4; + + strByType[i] = v; + typeByStr.set(strTable.get(v), i); + } + + offset = propMapOffset; + const propCount = readU32(buf, offset); + offset += 4; + + const propByStr = new Map(); + const strByProp = new Array(propCount).fill(0); + for (let i = 0; i < propCount; i++) { + const v = readU32(buf, offset); + offset += 4; + + strByProp[i] = v; + propByStr.set(strTable.get(v), i); + } + + /** @type {AstContext} */ + const ctx = { + buf, + strTable, + rootOffset, + nodes: new Map(), + strTableOffset, + strByProp, + strByType, + typeByStr, + propByStr, + matcher: new MatchCtx(buf, strTable, strByType), + }; + + setNodeGetters(ctx); + + // DEV ONLY: Enable this to inspect the buffer message + // _dump(ctx); + + return ctx; +} + +/** + * @param {*} _node + */ +const NOOP = (_node) => {}; + +/** + * Kick off the actual linting process of JS plugins. + * @param {string} fileName + * @param {Uint8Array} serializedAst + */ +export function runPluginsForFile(fileName, serializedAst) { + const ctx = createAstContext(serializedAst); + + /** @type {Map}>} */ + const bySelector = new Map(); + + const destroyFns = []; + + // Instantiate and merge visitors. This allows us to only traverse + // the AST once instead of per plugin. When ever we enter or exit a + // node we'll call all visitors that match. + for (let i = 0; i < state.plugins.length; i++) { + const plugin = state.plugins[i]; + + for (const name of Object.keys(plugin.rules)) { + const rule = plugin.rules[name]; + const id = `${plugin.name}/${name}`; + const ctx = new Context(id, fileName); + const visitor = rule.create(ctx); + + // deno-lint-ignore guard-for-in + for (let key in visitor) { + const fn = visitor[key]; + if (fn === undefined) continue; + + // Support enter and exit callbacks on a visitor. + // Exit callbacks are marked by having `:exit` at the end. + let isExit = false; + if (key.endsWith(":exit")) { + isExit = true; + key = key.slice(0, -":exit".length); + } + + const selectors = splitSelectors(key); + + for (let j = 0; j < selectors.length; j++) { + const key = selectors[j]; + + let info = bySelector.get(key); + if (info === undefined) { + info = { enter: NOOP, exit: NOOP }; + bySelector.set(key, info); + } + const prevFn = isExit ? info.exit : info.enter; + + /** + * @param {*} node + */ + const wrapped = (node) => { + prevFn(node); + + try { + fn(node); + } catch (err) { + throw new Error(`Visitor "${name}" of plugin "${id}" errored`, { + cause: err, + }); + } + }; + + if (isExit) { + info.exit = wrapped; + } else { + info.enter = wrapped; + } + } + } + + if (typeof rule.destroy === "function") { + const destroyFn = rule.destroy.bind(rule); + destroyFns.push(() => { + try { + destroyFn(ctx); + } catch (err) { + throw new Error(`Destroy hook of "${id}" errored`, { cause: err }); + } + }); + } + } + } + + // Create selectors + /** @type {TransformFn} */ + const toElem = (str) => { + const id = ctx.typeByStr.get(str); + return id === undefined ? 0 : id; + }; + /** @type {TransformFn} */ + const toAttr = (str) => { + const id = ctx.propByStr.get(str); + return id === undefined ? 0 : id; + }; + + /** @type {CompiledVisitor[]} */ + const visitors = []; + for (const [sel, info] of bySelector.entries()) { + // Selectors are already split here. + // TODO(@marvinhagemeister): Avoid array allocation (not sure if that matters) + const parsed = parseSelector(sel, toElem, toAttr)[0]; + const matcher = compileSelector(parsed); + + visitors.push({ info, matcher }); + } + + // Traverse ast with all visitors at the same time to avoid traversing + // multiple times. + try { + traverse(ctx, visitors, ctx.rootOffset); + } finally { + ctx.nodes.clear(); + + // Optional: Destroy rules + for (let i = 0; i < destroyFns.length; i++) { + destroyFns[i](); + } + } +} + +/** + * @param {AstContext} ctx + * @param {CompiledVisitor[]} visitors + * @param {number} offset + */ +function traverse(ctx, visitors, offset) { + // The 0 offset is used to denote an empty/placeholder node + if (offset === 0) return; + + const originalOffset = offset; + + const { buf } = ctx; + + /** @type {VisitorFn[] | null} */ + let exits = null; + + for (let i = 0; i < visitors.length; i++) { + const v = visitors[i]; + + if (v.matcher(ctx.matcher, offset)) { + if (v.info.exit !== NOOP) { + if (exits === null) { + exits = [v.info.exit]; + } else { + exits.push(v.info.exit); + } + } + + if (v.info.enter !== NOOP) { + const node = /** @type {*} */ (getNode(ctx, offset)); + v.info.enter(node); + } + } + } + + // Search for node references in the properties of the current node. All + // other properties can be ignored. + try { + // type + parentId + SpanLo + SpanHi + offset += 1 + 4 + 4 + 4; + + const propCount = buf[offset]; + offset += 1; + + for (let i = 0; i < propCount; i++) { + const kind = buf[offset + 1]; + offset += 2; // propId + propFlags + + if (kind === PropFlags.Ref) { + const next = readU32(buf, offset); + offset += 4; + traverse(ctx, visitors, next); + } else if (kind === PropFlags.RefArr) { + const len = readU32(buf, offset); + offset += 4; + + for (let j = 0; j < len; j++) { + const child = readU32(buf, offset); + offset += 4; + traverse(ctx, visitors, child); + } + } else if (kind === PropFlags.String) { + offset += 4; + } else if (kind === PropFlags.Bool) { + offset += 1; + } else if (kind === PropFlags.Null || kind === PropFlags.Undefined) { + // No value + } + } + } finally { + if (exits !== null) { + for (let i = 0; i < exits.length; i++) { + const node = /** @type {*} */ (getNode(ctx, originalOffset)); + exits[i](node); + } + } + } +} + +/** + * This is useful debugging helper to display the buffer's contents. + * @param {AstContext} ctx + */ +function _dump(ctx) { + const { buf, strTableOffset, strTable, strByType, strByProp } = ctx; + + // @ts-ignore dump fn + // deno-lint-ignore no-console + console.log(strTable); + + for (let i = 0; i < strByType.length; i++) { + const v = strByType[i]; + // @ts-ignore dump fn + // deno-lint-ignore no-console + if (v > 0) console.log(" > type:", i, getString(ctx.strTable, v), v); + } + // @ts-ignore dump fn + // deno-lint-ignore no-console + console.log(); + for (let i = 0; i < strByProp.length; i++) { + const v = strByProp[i]; + // @ts-ignore dump fn + // deno-lint-ignore no-console + if (v > 0) console.log(" > prop:", i, getString(ctx.strTable, v), v); + } + // @ts-ignore dump fn + // deno-lint-ignore no-console + console.log(); + + let offset = 0; + + while (offset < strTableOffset) { + const type = buf[offset]; + const name = getString(ctx.strTable, ctx.strByType[type]); + // @ts-ignore dump fn + // deno-lint-ignore no-console + console.log(`${name}, offset: ${offset}, type: ${type}`); + offset += 1; + + const parent = readU32(buf, offset); + offset += 4; + // @ts-ignore dump fn + // deno-lint-ignore no-console + console.log(` parent: ${parent}`); + + const start = readU32(buf, offset); + offset += 4; + const end = readU32(buf, offset); + offset += 4; + // @ts-ignore dump fn + // deno-lint-ignore no-console + console.log(` range: ${start} -> ${end}`); + + const count = buf[offset++]; + // @ts-ignore dump fn + // deno-lint-ignore no-console + console.log(` prop count: ${count}`); + + for (let i = 0; i < count; i++) { + const prop = buf[offset++]; + const kind = buf[offset++]; + const name = getString(ctx.strTable, ctx.strByProp[prop]); + + let kindName = "unknown"; + for (const k in PropFlags) { + // @ts-ignore dump fn + if (kind === PropFlags[k]) { + kindName = k; + } + } + + if (kind === PropFlags.Ref) { + const v = readU32(buf, offset); + offset += 4; + // @ts-ignore dump fn + // deno-lint-ignore no-console + console.log(` ${name}: ${v} (${kindName}, ${prop})`); + } else if (kind === PropFlags.RefArr) { + const len = readU32(buf, offset); + offset += 4; + // @ts-ignore dump fn + // deno-lint-ignore no-console + console.log(` ${name}: Array(${len}) (${kindName}, ${prop})`); + + for (let j = 0; j < len; j++) { + const v = readU32(buf, offset); + offset += 4; + // @ts-ignore dump fn + // deno-lint-ignore no-console + console.log(` - ${v} (${prop})`); + } + } else if (kind === PropFlags.Bool) { + const v = buf[offset]; + offset += 1; + // @ts-ignore dump fn + // deno-lint-ignore no-console + console.log(` ${name}: ${v} (${kindName}, ${prop})`); + } else if (kind === PropFlags.String) { + const v = readU32(buf, offset); + offset += 4; + // @ts-ignore dump fn + // deno-lint-ignore no-console + console.log( + ` ${name}: ${getString(ctx.strTable, v)} (${kindName}, ${prop})`, + ); + } else if (kind === PropFlags.Null) { + // @ts-ignore dump fn + // deno-lint-ignore no-console + console.log(` ${name}: null (${kindName}, ${prop})`); + } else if (kind === PropFlags.Undefined) { + // @ts-ignore dump fn + // deno-lint-ignore no-console + console.log(` ${name}: undefined (${kindName}, ${prop})`); + } + } + } +} + +// TODO(bartlomieju): this is temporary, until we get plugins plumbed through +// the CLI linter +/** + * @param {LintPlugin} plugin + * @param {string} fileName + * @param {string} sourceText + */ +function runLintPlugin(plugin, fileName, sourceText) { + installPlugin(plugin); + const serializedAst = op_lint_create_serialized_ast(fileName, sourceText); + + try { + runPluginsForFile(fileName, serializedAst); + } finally { + // During testing we don't want to keep plugins around + state.installedPlugins.clear(); + } +} + +// TODO(bartlomieju): this is temporary, until we get plugins plumbed through +// the CLI linter +internals.runLintPlugin = runLintPlugin; diff --git a/cli/js/40_lint_selector.js b/cli/js/40_lint_selector.js new file mode 100644 index 00000000000000..7b94c4f9609a59 --- /dev/null +++ b/cli/js/40_lint_selector.js @@ -0,0 +1,1014 @@ +// Copyright 2018-2025 the Deno authors. MIT license. + +// @ts-check + +/** @typedef {import("./40_lint_types.d.ts").LintState} LintState */ +/** @typedef {import("./40_lint_types.d.ts").AstContext} AstContext */ +/** @typedef {import("./40_lint_types.d.ts").MatchContext} MatchCtx */ +/** @typedef {import("./40_lint_types.d.ts").AttrExists} AttrExists */ +/** @typedef {import("./40_lint_types.d.ts").AttrBin} AttrBin */ +/** @typedef {import("./40_lint_types.d.ts").AttrSelector} AttrSelector */ +/** @typedef {import("./40_lint_types.d.ts").ElemSelector} ElemSelector */ +/** @typedef {import("./40_lint_types.d.ts").PseudoNthChild} PseudoNthChild */ +/** @typedef {import("./40_lint_types.d.ts").PseudoHas} PseudoHas */ +/** @typedef {import("./40_lint_types.d.ts").PseudoNot} PseudoNot */ +/** @typedef {import("./40_lint_types.d.ts").Relation} SRelation */ +/** @typedef {import("./40_lint_types.d.ts").Selector} Selector */ +/** @typedef {import("./40_lint_types.d.ts").SelectorParseCtx} SelectorParseCtx */ +/** @typedef {import("./40_lint_types.d.ts").NextFn} NextFn */ +/** @typedef {import("./40_lint_types.d.ts").MatcherFn} MatcherFn */ +/** @typedef {import("./40_lint_types.d.ts").TransformFn} Transformer */ + +const Char = { + Tab: 9, + Space: 32, + Bang: 33, + DoubleQuote: 34, + Quote: 39, + BraceOpen: 40, + BraceClose: 41, + Plus: 43, + Comma: 44, + Minus: 45, + Dot: 46, + Slash: 47, + n0: 49, + n9: 57, + Colon: 58, + Less: 60, + Equal: 61, + Greater: 62, + A: 65, + Z: 90, + BracketOpen: 91, + BackSlash: 92, + BracketClose: 93, + Underscore: 95, + a: 97, + z: 122, + Tilde: 126, +}; + +export const Token = { + EOF: 0, + Word: 1, + Space: 2, + Op: 3, + Colon: 4, + Comma: 7, + BraceOpen: 8, + BraceClose: 9, + BracketOpen: 10, + BracketClose: 11, + String: 12, + Number: 13, + Bool: 14, + Null: 15, + Undefined: 16, + Dot: 17, + Minus: 17, +}; + +export const BinOp = { + /** [attr="value"] or [attr=value] */ + Equal: 1, + /** [attr!="value"] or [attr!=value] */ + NotEqual: 2, + /** [attr>1] */ + Greater: 3, + /** [attr>=1] */ + GreaterThan: 4, + /** [attr<1] */ + Less: 5, + /** [attr<=1] */ + LessThan: 6, + Tilde: 7, + Plus: 8, + Space: 9, +}; + +/** + * @param {string} s + * @returns {number} + */ +function getAttrOp(s) { + switch (s) { + case "=": + return BinOp.Equal; + case "!=": + return BinOp.NotEqual; + case ">": + return BinOp.Greater; + case ">=": + return BinOp.GreaterThan; + case "<": + return BinOp.Less; + case "<=": + return BinOp.LessThan; + case "~": + return BinOp.Tilde; + case "+": + return BinOp.Plus; + default: + throw new Error(`Unknown attribute operator: '${s}'`); + } +} + +export class Lexer { + token = Token.Word; + start = 0; + end = 0; + ch = 0; + i = -1; + + value = ""; + + /** + * @param {string} input + */ + constructor(input) { + this.input = input; + this.step(); + this.next(); + } + + /** + * @param {number} token + */ + expect(token) { + if (this.token !== token) { + throw new Error( + `Expected token '${token}', but got '${this.token}'.\n\n${this.input}\n${ + " ".repeat(this.i) + }^`, + ); + } + } + + /** + * @param {number} token + */ + readAsWordUntil(token) { + const s = this.i; + while (this.token !== Token.EOF && this.token !== token) { + this.next(); + } + + this.start = s; + this.end = this.i - 1; + this.value = this.getSlice(); + } + + getSlice() { + return this.input.slice(this.start, this.end); + } + + step() { + this.i++; + if (this.i >= this.input.length) { + this.ch = -1; + } else { + this.ch = this.input.charCodeAt(this.i); + } + } + + next() { + this.value = ""; + + if (this.i >= this.input.length) { + this.token = Token.EOF; + return; + } + + // console.log( + // "NEXT", + // this.input, + // this.i, + // JSON.stringify(String.fromCharCode(this.ch)), + // ); + + while (true) { + switch (this.ch) { + case Char.Space: + while (this.isWhiteSpace()) { + this.step(); + } + + // Check if space preceeded operator + if (this.isOpContinue()) { + continue; + } + + this.token = Token.Space; + return; + case Char.BracketOpen: + this.token = Token.BracketOpen; + this.step(); + return; + case Char.BracketClose: + this.token = Token.BracketClose; + this.step(); + return; + case Char.BraceOpen: + this.token = Token.BraceOpen; + this.step(); + return; + case Char.BraceClose: + this.token = Token.BraceClose; + this.step(); + return; + case Char.Colon: + this.token = Token.Colon; + this.step(); + return; + case Char.Comma: + this.token = Token.Comma; + this.step(); + return; + case Char.Dot: + this.token = Token.Dot; + this.step(); + return; + case Char.Minus: + this.token = Token.Minus; + this.step(); + return; + + case Char.Plus: + case Char.Tilde: + case Char.Greater: + case Char.Equal: + case Char.Less: + case Char.Bang: { + this.token = Token.Op; + this.start = this.i; + this.step(); + + while (this.isOpContinue()) { + this.step(); + } + + this.end = this.i; + this.value = this.getSlice(); + + // Consume remaining space + while (this.isWhiteSpace()) { + this.step(); + } + + return; + } + + case Char.Quote: + case Char.DoubleQuote: { + this.token = Token.String; + const ch = this.ch; + + this.step(); + this.start = this.i; + + while (this.ch > 0 && this.ch !== ch) { + this.step(); + } + + this.end = this.i; + this.value = this.getSlice(); + this.step(); + + return; + } + + default: + this.start = this.i; + this.step(); + + while (this.isWordContinue()) { + this.step(); + } + + this.end = this.i; + this.value = this.getSlice(); + this.token = Token.Word; + return; + } + } + } + + isWordContinue() { + const ch = this.ch; + switch (ch) { + case Char.Minus: + case Char.Underscore: + return true; + default: + return (ch >= Char.a && ch <= Char.z) || + (ch >= Char.A && ch <= Char.Z) || + (ch >= Char.n0 && ch <= Char.n9); + } + } + + isOpContinue() { + const ch = this.ch; + switch (ch) { + case Char.Equal: + case Char.Bang: + case Char.Greater: + case Char.Less: + case Char.Tilde: + case Char.Plus: + return true; + default: + return false; + } + } + + isWhiteSpace() { + return this.ch === Char.Space || this.ch === Char.Tab; + } +} + +const NUMBER_REG = /^(\d+\.)?\d+$/; +const BIGINT_REG = /^\d+n$/; + +/** + * @param {string} raw + * @returns {any} + */ +function getFromRawValue(raw) { + switch (raw) { + case "true": + return true; + case "false": + return false; + case "null": + return null; + case "undefined": + return undefined; + default: + if (raw.startsWith("'") && raw.endsWith("'")) { + if (raw.length === 2) return ""; + return raw.slice(1, -1); + } else if (raw.startsWith('"') && raw.endsWith('"')) { + if (raw.length === 2) return ""; + return raw.slice(1, -1); + } else if (raw.startsWith("/")) { + const end = raw.lastIndexOf("/"); + if (end === -1) throw new Error(`Invalid RegExp pattern: ${raw}`); + const pattern = raw.slice(1, end); + const flags = end < raw.length - 1 ? raw.slice(end + 1) : undefined; + return new RegExp(pattern, flags); + } else if (NUMBER_REG.test(raw)) { + return Number(raw); + } else if (BIGINT_REG.test(raw)) { + return BigInt(raw.slice(0, -1)); + } + + return raw; + } +} + +export const ELEM_NODE = 1; +export const RELATION_NODE = 2; +export const ATTR_EXISTS_NODE = 3; +export const ATTR_BIN_NODE = 4; +export const PSEUDO_NTH_CHILD = 5; +export const PSEUDO_HAS = 6; +export const PSEUDO_NOT = 7; +export const PSEUDO_FIRST_CHILD = 8; +export const PSEUDO_LAST_CHILD = 9; + +/** + * Parse out all unique selectors of a selector list. + * @param {string} input + * @returns {string[]} + */ +export function splitSelectors(input) { + /** @type {string[]} */ + const out = []; + + let last = 0; + let depth = 0; + for (let i = 0; i < input.length; i++) { + const ch = input.charCodeAt(i); + switch (ch) { + case Char.BraceOpen: + depth++; + break; + case Char.BraceClose: + depth--; + break; + case Char.Comma: + if (depth === 0) { + out.push(input.slice(last, i).trim()); + last = i + 1; + } + break; + } + } + + if (last < input.length - 1) { + out.push(input.slice(last).trim()); + } + + return out; +} + +/** + * @param {string} input + * @param {Transformer} toElem + * @param {Transformer} toAttr + * @returns {Selector[]} + */ +export function parseSelector(input, toElem, toAttr) { + /** @type {Selector[]} */ + const result = []; + + /** @type {Selector[]} */ + const stack = [[]]; + + const lex = new Lexer(input); + + // Some subselectors like `:nth-child(.. of )` must have + // a single selector instead of selector list. + let throwOnComma = false; + + while (lex.token !== Token.EOF) { + const current = /** @type {Selector} */ (stack.at(-1)); + + if (lex.token === Token.Word) { + const value = lex.value; + const wildcard = value === "*"; + + const elem = !wildcard ? toElem(value) : 0; + current.push({ + type: ELEM_NODE, + elem, + wildcard, + }); + lex.next(); + + continue; + } else if (lex.token === Token.Space) { + lex.next(); + + if (lex.token === Token.Word) { + current.push({ + type: RELATION_NODE, + op: BinOp.Space, + }); + } + + continue; + } else if (lex.token === Token.BracketOpen) { + lex.next(); + lex.expect(Token.Word); + + // Check for value comparison + const prop = [toAttr(lex.value)]; + lex.next(); + + while (lex.token === Token.Dot) { + lex.next(); + lex.expect(Token.Word); + + prop.push(toAttr(lex.value)); + lex.next(); + } + + if (lex.token === Token.Op) { + const op = getAttrOp(lex.value); + lex.readAsWordUntil(Token.BracketClose); + + const value = getFromRawValue(lex.value); + current.push({ type: ATTR_BIN_NODE, prop, op, value }); + } else { + current.push({ + type: ATTR_EXISTS_NODE, + prop, + }); + } + + lex.expect(Token.BracketClose); + lex.next(); + continue; + } else if (lex.token === Token.Colon) { + lex.next(); + lex.expect(Token.Word); + + switch (lex.value) { + case "first-child": + current.push({ + type: PSEUDO_FIRST_CHILD, + }); + break; + case "last-child": + current.push({ + type: PSEUDO_LAST_CHILD, + }); + break; + case "nth-child": { + lex.next(); + lex.expect(Token.BraceOpen); + lex.next(); + + let mul = 1; + let repeat = false; + let step = 0; + if (lex.token === Token.Minus) { + mul = -1; + lex.next(); + } + + lex.expect(Token.Word); + const value = lex.getSlice(); + + if (value.endsWith("n")) { + repeat = true; + step = +value.slice(0, -1) * mul; + } else { + step = +value * mul; + } + + lex.next(); + + /** @type {PseudoNthChild} */ + const node = { + type: PSEUDO_NTH_CHILD, + of: null, + op: null, + step, + stepOffset: 0, + repeat, + }; + current.push(node); + + if (lex.token === Token.Space) lex.next(); + + if (lex.token !== Token.BraceClose) { + if (lex.token === Token.Op) { + node.op = lex.value; + lex.next(); + + if (lex.token === Token.Space) lex.next(); + } else if (lex.token === Token.Minus) { + node.op = "-"; + lex.next(); + + if (lex.token === Token.Space) { + lex.next(); + } + } + + lex.expect(Token.Word); + node.stepOffset = +lex.value; + lex.next(); + + if (lex.token !== Token.BraceClose) { + lex.next(); // Space + + if (lex.token === Token.Word) { + if (/** @type {string} */ (lex.value) !== "of") { + throw new Error( + `Expected 'of' keyword in ':nth-child' but got: ${lex.value}`, + ); + } + + lex.next(); + lex.expect(Token.Space); + lex.next(); + throwOnComma = true; + stack.push([]); + } + + continue; + } + + lex.expect(Token.BraceClose); + } else if (!node.repeat) { + // :nth-child(2) -> step is actually stepOffset + node.stepOffset = node.step - 1; + node.step = 0; + } + + lex.next(); + + continue; + } + + case "has": + case "where": + case "is": { + lex.next(); + lex.expect(Token.BraceOpen); + lex.next(); + + current.push({ + type: PSEUDO_HAS, + selectors: [], + }); + stack.push([]); + + continue; + } + case "not": { + lex.next(); + lex.expect(Token.BraceOpen); + lex.next(); + + current.push({ + type: PSEUDO_NOT, + selectors: [], + }); + stack.push([]); + + continue; + } + default: + throw new Error(`Unknown pseudo selector: '${lex.value}'`); + } + } else if (lex.token === Token.Comma) { + if (throwOnComma) { + throw new Error(`Multiple selector arguments not supported here`); + } + + lex.next(); + if (lex.token === Token.Space) { + lex.next(); + } + + popSelector(result, stack); + stack.push([]); + continue; + } else if (lex.token === Token.BraceClose) { + throwOnComma = false; + popSelector(result, stack); + } else if (lex.token === Token.Op) { + current.push({ + type: RELATION_NODE, + op: getAttrOp(lex.value), + }); + } + + lex.next(); + } + + if (stack.length > 0) { + result.push(stack[0]); + } + + return result; +} + +/** + * @param {Selector[]} result + * @param {Selector[]} stack + */ +function popSelector(result, stack) { + const sel = /** @type {Selector} */ (stack.pop()); + + if (stack.length === 0) { + result.push(sel); + stack.push([]); + } else { + const prev = /** @type {Selector} */ (stack.at(-1)); + if (prev.length === 0) { + throw new Error(`Empty selector`); + } + + const node = prev.at(-1); + if (node === undefined) { + throw new Error(`Empty node`); + } + + if (node.type === PSEUDO_NTH_CHILD) { + node.of = sel; + } else if (node.type === PSEUDO_HAS || node.type === PSEUDO_NOT) { + node.selectors.push(sel); + } else { + throw new Error(`Multiple selectors not allowed here`); + } + } +} + +const TRUE_FN = () => { + return true; +}; + +/** + * @param {Selector} selector + * @returns {MatcherFn} + */ +export function compileSelector(selector) { + /** @type {MatcherFn} */ + let fn = TRUE_FN; + + for (let i = 0; i < selector.length; i++) { + const node = selector[i]; + + switch (node.type) { + case ELEM_NODE: + fn = matchElem(node, fn); + break; + case RELATION_NODE: + switch (node.op) { + case BinOp.Space: + fn = matchDescendant(fn); + break; + case BinOp.Greater: + fn = matchChild(fn); + break; + case BinOp.Plus: + fn = matchAdjacent(fn); + break; + case BinOp.Tilde: + fn = matchFollowing(fn); + break; + default: + throw new Error(`Unknown relation op ${node.op}`); + } + break; + case ATTR_EXISTS_NODE: + fn = matchAttrExists(node, fn); + break; + case ATTR_BIN_NODE: + fn = matchAttrBin(node, fn); + break; + case PSEUDO_FIRST_CHILD: + fn = matchFirstChild(fn); + break; + case PSEUDO_LAST_CHILD: + fn = matchLastChild(fn); + break; + case PSEUDO_NTH_CHILD: + fn = matchNthChild(node, fn); + break; + case PSEUDO_HAS: + // FIXME + // fn = matchIs(part, fn); + throw new Error("TODO: :has"); + case PSEUDO_NOT: + fn = matchNot(node.selectors, fn); + break; + default: + // @ts-ignore error handling + // deno-lint-ignore no-console + console.log(node); + throw new Error(`Unknown selector node`); + } + } + + return fn; +} + +/** + * @param {NextFn} next + * @returns {MatcherFn} + */ +function matchFirstChild(next) { + return (ctx, id) => { + const parent = ctx.getParent(id); + const first = ctx.getFirstChild(parent); + return first === id && next(ctx, first); + }; +} + +/** + * @param {NextFn} next + * @returns {MatcherFn} + */ +function matchLastChild(next) { + return (ctx, id) => { + const parent = ctx.getParent(id); + const last = ctx.getLastChild(parent); + return last === id && next(ctx, id); + }; +} + +/** + * @param {PseudoNthChild} node + * @param {number} i + * @returns {number} + */ +function getNthAnB(node, i) { + const n = node.step * i; + + if (node.op === null) return n; + + switch (node.op) { + case "+": + return n + node.stepOffset; + case "-": + return n - node.stepOffset; + default: + throw new Error("Not supported nth-child operator: " + node.op); + } +} + +/** + * @param {PseudoNthChild} node + * @param {NextFn} next + * @returns {MatcherFn} + */ +function matchNthChild(node, next) { + const ofSelector = node.of !== null ? compileSelector(node.of) : TRUE_FN; + + // TODO(@marvinhagemeister): we should probably cache results here + + return (ctx, id) => { + const siblings = ctx.getSiblings(id); + const idx = siblings.indexOf(id); + + if (!node.repeat) { + return idx === node.stepOffset && next(ctx, id); + } + + for (let i = 0; i < siblings.length; i++) { + const n = getNthAnB(node, i); + + if (n > siblings.length - 1) return false; + + const search = siblings[n]; + if (id === search) { + if (node.of !== null && !ofSelector(ctx, id)) { + continue; + } else if (next(ctx, id)) { + return true; + } + } else if (n > idx) { + return false; + } + } + + return false; + }; +} + +/** + * @param {Selector[]} selectors + * @param {NextFn} next + * @returns {MatcherFn} + */ +function matchNot(selectors, next) { + /** @type {MatcherFn[]} */ + const compiled = []; + + for (let i = 0; i < selectors.length; i++) { + const sel = selectors[i]; + compiled.push(compileSelector(sel)); + } + + return (ctx, id) => { + for (let i = 0; i < compiled.length; i++) { + const fn = compiled[i]; + if (fn(ctx, id)) { + return false; + } + } + + return next(ctx, id); + }; +} + +/** + * @param {NextFn} next + * @returns {MatcherFn} + */ +function matchDescendant(next) { + // TODO(@marvinhagemeister): we should probably cache results here + return (ctx, id) => { + let current = ctx.getParent(id); + while (current > 0) { + if (next(ctx, current)) { + return true; + } + + current = ctx.getParent(current); + } + + return false; + }; +} + +/** + * @param {NextFn} next + * @returns {MatcherFn} + */ +function matchChild(next) { + return (ctx, id) => { + const parent = ctx.getParent(id); + if (parent < 0) return false; + + return next(ctx, parent); + }; +} + +/** + * @param {NextFn} next + * @returns {MatcherFn} + */ +function matchAdjacent(next) { + return (ctx, id) => { + const siblings = ctx.getSiblings(id); + const idx = siblings.indexOf(id) - 1; + + if (idx < 0) return false; + + const prev = siblings[idx]; + return next(ctx, prev); + }; +} + +/** + * @param {NextFn} next + * @returns {MatcherFn} + */ +function matchFollowing(next) { + return (ctx, id) => { + const siblings = ctx.getSiblings(id); + const idx = siblings.indexOf(id) - 1; + + if (idx < 0) return false; + + for (let i = idx; i >= 0; i--) { + const sib = siblings[i]; + if (next(ctx, sib)) return true; + } + + return false; + }; +} + +/** + * @param {ElemSelector} part + * @param {MatcherFn} next + * @returns {MatcherFn} + */ +function matchElem(part, next) { + return (ctx, id) => { + // Placeholder node cannot be matched + if (id === 0) return false; + // Wildcard always matches + else if (part.wildcard) return next(ctx, id); + // 0 means it's the placeholder node which + // can never be matched. + else if (part.elem === 0) return false; + + const type = ctx.getType(id); + if (type > 0 && type === part.elem) return next(ctx, id); + + return false; + }; +} + +/** + * @param {AttrExists} attr + * @param {MatcherFn} next + * @returns {MatcherFn} + */ +function matchAttrExists(attr, next) { + return (ctx, id) => { + return ctx.hasAttrPath(id, attr.prop, 0) ? next(ctx, id) : false; + }; +} + +/** + * @param {AttrBin} attr + * @param {MatcherFn} next + * @returns {MatcherFn} + */ +function matchAttrBin(attr, next) { + return (ctx, id) => { + if (!ctx.hasAttrPath(id, attr.prop, 0)) return false; + const value = ctx.getAttrPathValue(id, attr.prop, 0); + if (!matchAttrValue(attr, value)) return false; + return next(ctx, id); + }; +} + +/** + * @param {AttrBin} attr + * @param {*} value + * @returns {boolean} + */ +function matchAttrValue(attr, value) { + switch (attr.op) { + case BinOp.Equal: + return value === attr.value; + case BinOp.NotEqual: + return value !== attr.value; + case BinOp.Greater: + return typeof value === "number" && typeof attr.value === "number" && + value > attr.value; + case BinOp.GreaterThan: + return typeof value === "number" && typeof attr.value === "number" && + value >= attr.value; + case BinOp.Less: + return typeof value === "number" && typeof attr.value === "number" && + value < attr.value; + case BinOp.LessThan: + return typeof value === "number" && typeof attr.value === "number" && + value <= attr.value; + default: + return false; + } +} diff --git a/cli/js/40_lint_types.d.ts b/cli/js/40_lint_types.d.ts new file mode 100644 index 00000000000000..db2202981ab8a5 --- /dev/null +++ b/cli/js/40_lint_types.d.ts @@ -0,0 +1,132 @@ +// Copyright 2018-2025 the Deno authors. MIT license. + +export interface NodeFacade { + type: string; + range: [number, number]; + [key: string]: unknown; +} + +export interface AstContext { + buf: Uint8Array; + strTable: Map; + strTableOffset: number; + rootOffset: number; + nodes: Map; + strByType: number[]; + strByProp: number[]; + typeByStr: Map; + propByStr: Map; + matcher: MatchContext; +} + +// TODO(@marvinhagemeister) Remove once we land "official" types +export interface RuleContext { + id: string; +} + +// TODO(@marvinhagemeister) Remove once we land "official" types +export interface LintRule { + create(ctx: RuleContext): Record void>; + destroy?(ctx: RuleContext): void; +} + +// TODO(@marvinhagemeister) Remove once we land "official" types +export interface LintPlugin { + name: string; + rules: Record; +} + +export interface LintState { + plugins: LintPlugin[]; + installedPlugins: Set; +} + +export type VisitorFn = (node: unknown) => void; + +export interface CompiledVisitor { + matcher: (ctx: MatchContext, offset: number) => boolean; + info: { enter: VisitorFn; exit: VisitorFn }; +} + +export interface AttrExists { + type: 3; + prop: number[]; +} + +export interface AttrBin { + type: 4; + prop: number[]; + op: number; + // deno-lint-ignore no-explicit-any + value: any; +} + +export type AttrSelector = AttrExists | AttrBin; + +export interface ElemSelector { + type: 1; + wildcard: boolean; + elem: number; +} + +export interface PseudoNthChild { + type: 5; + op: string | null; + step: number; + stepOffset: number; + of: Selector | null; + repeat: boolean; +} + +export interface PseudoHas { + type: 6; + selectors: Selector[]; +} +export interface PseudoNot { + type: 7; + selectors: Selector[]; +} +export interface PseudoFirstChild { + type: 8; +} +export interface PseudoLastChild { + type: 9; +} + +export interface Relation { + type: 2; + op: number; +} + +export type Selector = Array< + | ElemSelector + | Relation + | AttrExists + | AttrBin + | PseudoNthChild + | PseudoNot + | PseudoHas + | PseudoFirstChild + | PseudoLastChild +>; + +export interface SelectorParseCtx { + root: Selector; + current: Selector; +} + +export interface MatchContext { + getFirstChild(id: number): number; + getLastChild(id: number): number; + getSiblings(id: number): number[]; + getParent(id: number): number; + getType(id: number): number; + hasAttrPath(id: number, propIds: number[], idx: number): boolean; + getAttrPathValue(id: number, propIds: number[], idx: number): unknown; +} + +export type NextFn = (ctx: MatchContext, id: number) => boolean; +export type MatcherFn = (ctx: MatchContext, id: number) => boolean; +export type TransformFn = (value: string) => number; + +export {}; diff --git a/cli/js/40_test.js b/cli/js/40_test.js index ea526a17d41bca..34d9ec65509edb 100644 --- a/cli/js/40_test.js +++ b/cli/js/40_test.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { core, primordials } from "ext:core/mod.js"; import { escapeName, withPermissions } from "ext:cli/40_test_common.js"; diff --git a/cli/js/40_test_common.js b/cli/js/40_test_common.js index 7711148f1e47e3..6b7828cd2d5910 100644 --- a/cli/js/40_test_common.js +++ b/cli/js/40_test_common.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { core, primordials } from "ext:core/mod.js"; import { serializePermissions } from "ext:runtime/10_permissions.js"; const ops = core.ops; diff --git a/cli/jsr.rs b/cli/jsr.rs index 767d304d60c5ad..34a2ec04e4de46 100644 --- a/cli/jsr.rs +++ b/cli/jsr.rs @@ -1,14 +1,16 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::sync::Arc; -use crate::args::jsr_url; -use crate::file_fetcher::FileFetcher; use dashmap::DashMap; use deno_core::serde_json; use deno_graph::packages::JsrPackageInfo; use deno_graph::packages::JsrPackageVersionInfo; use deno_semver::package::PackageNv; use deno_semver::package::PackageReq; -use std::sync::Arc; + +use crate::args::jsr_url; +use crate::file_fetcher::CliFileFetcher; /// This is similar to a subset of `JsrCacheResolver` which fetches rather than /// just reads the cache. Keep in sync! @@ -19,11 +21,11 @@ pub struct JsrFetchResolver { /// It can be large and we don't want to store it. info_by_nv: DashMap>>, info_by_name: DashMap>>, - file_fetcher: Arc, + file_fetcher: Arc, } impl JsrFetchResolver { - pub fn new(file_fetcher: Arc) -> Self { + pub fn new(file_fetcher: Arc) -> Self { Self { nv_by_req: Default::default(), info_by_nv: Default::default(), diff --git a/cli/lsp/analysis.rs b/cli/lsp/analysis.rs index 044b1573b9bb9d..968875e48a3821 100644 --- a/cli/lsp/analysis.rs +++ b/cli/lsp/analysis.rs @@ -1,26 +1,15 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use super::diagnostics::DenoDiagnostic; -use super::diagnostics::DiagnosticSource; -use super::documents::Document; -use super::documents::Documents; -use super::language_server; -use super::resolver::LspResolver; -use super::tsc; -use super::urls::url_to_uri; - -use crate::args::jsr_url; -use crate::lsp::logging::lsp_warn; -use crate::lsp::search::PackageSearchApi; -use crate::tools::lint::CliLinter; -use crate::util::path::relative_specifier; -use deno_config::workspace::MappedResolution; -use deno_graph::source::ResolutionMode; -use deno_lint::diagnostic::LintDiagnosticRange; +use std::borrow::Cow; +use std::cmp::Ordering; +use std::collections::HashMap; +use std::collections::HashSet; +use std::path::Path; use deno_ast::SourceRange; use deno_ast::SourceRangedForSpanned; use deno_ast::SourceTextInfo; +use deno_config::workspace::MappedResolution; use deno_core::error::custom_error; use deno_core::error::AnyError; use deno_core::serde::Deserialize; @@ -28,6 +17,7 @@ use deno_core::serde::Serialize; use deno_core::serde_json; use deno_core::serde_json::json; use deno_core::ModuleSpecifier; +use deno_lint::diagnostic::LintDiagnosticRange; use deno_path_util::url_to_file_path; use deno_runtime::deno_node::PathClean; use deno_semver::jsr::JsrPackageNvReference; @@ -37,21 +27,33 @@ use deno_semver::package::PackageNv; use deno_semver::package::PackageNvReference; use deno_semver::package::PackageReq; use deno_semver::package::PackageReqReference; +use deno_semver::SmallStackString; +use deno_semver::StackString; use deno_semver::Version; use import_map::ImportMap; -use node_resolver::NodeModuleKind; +use node_resolver::NodeResolutionKind; +use node_resolver::ResolutionMode; use once_cell::sync::Lazy; use regex::Regex; -use std::borrow::Cow; -use std::cmp::Ordering; -use std::collections::HashMap; -use std::collections::HashSet; -use std::path::Path; use text_lines::LineAndColumnIndex; use tower_lsp::lsp_types as lsp; use tower_lsp::lsp_types::Position; use tower_lsp::lsp_types::Range; +use super::diagnostics::DenoDiagnostic; +use super::diagnostics::DiagnosticSource; +use super::documents::Document; +use super::documents::Documents; +use super::language_server; +use super::resolver::LspResolver; +use super::tsc; +use super::urls::url_to_uri; +use crate::args::jsr_url; +use crate::lsp::logging::lsp_warn; +use crate::lsp::search::PackageSearchApi; +use crate::tools::lint::CliLinter; +use crate::util::path::relative_specifier; + /// Diagnostic error codes which actually are the same, and so when grouping /// fixes we treat them the same. static FIX_ALL_ERROR_CODES: Lazy> = @@ -270,13 +272,24 @@ impl<'a> TsResponseImportMapper<'a> { } } + if specifier.scheme() == "node" { + return Some(specifier.to_string()); + } + if let Some(jsr_path) = specifier.as_str().strip_prefix(jsr_url().as_str()) { let mut segments = jsr_path.split('/'); let name = if jsr_path.starts_with('@') { - format!("{}/{}", segments.next()?, segments.next()?) + let scope = segments.next()?; + let name = segments.next()?; + capacity_builder::StringBuilder::::build(|builder| { + builder.append(scope); + builder.append("/"); + builder.append(name); + }) + .unwrap() } else { - segments.next()?.to_string() + StackString::from(segments.next()?) }; let version = Version::parse_standard(segments.next()?).ok()?; let nv = PackageNv { name, version }; @@ -286,7 +299,9 @@ impl<'a> TsResponseImportMapper<'a> { &path, Some(&self.file_referrer), )?; - let sub_path = (export != ".").then_some(export); + let sub_path = (export != ".") + .then_some(export) + .map(SmallStackString::from_string); let mut req = None; req = req.or_else(|| { let import_map = self.maybe_import_map?; @@ -353,7 +368,12 @@ impl<'a> TsResponseImportMapper<'a> { let pkg_reqs = npm_resolver.resolve_pkg_reqs_from_pkg_id(&pkg_id); // check if any pkg reqs match what is found in an import map if !pkg_reqs.is_empty() { - let sub_path = self.resolve_package_path(specifier); + let sub_path = npm_resolver + .resolve_pkg_folder_from_pkg_id(&pkg_id) + .ok() + .and_then(|pkg_folder| { + self.resolve_package_path(specifier, &pkg_folder) + }); if let Some(import_map) = self.maybe_import_map { let pkg_reqs = pkg_reqs.iter().collect::>(); let mut matches = Vec::new(); @@ -368,8 +388,13 @@ impl<'a> TsResponseImportMapper<'a> { if let Some(key_sub_path) = sub_path.strip_prefix(value_sub_path) { - matches - .push(format!("{}{}", entry.raw_key, key_sub_path)); + // keys that don't end in a slash can't be mapped to a subpath + if entry.raw_key.ends_with('/') + || key_sub_path.is_empty() + { + matches + .push(format!("{}{}", entry.raw_key, key_sub_path)); + } } } } @@ -413,10 +438,16 @@ impl<'a> TsResponseImportMapper<'a> { fn resolve_package_path( &self, specifier: &ModuleSpecifier, + package_root_folder: &Path, ) -> Option { let package_json = self .resolver - .get_closest_package_json(specifier) + .pkg_json_resolver(specifier) + // the specifier might have a closer package.json, but we + // want the root of the package's package.json + .get_closest_package_json_from_file_path( + &package_root_folder.join("package.json"), + ) .ok() .flatten()?; let root_folder = package_json.path.parent()?; @@ -467,7 +498,7 @@ impl<'a> TsResponseImportMapper<'a> { &self, specifier: &str, referrer: &ModuleSpecifier, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, ) -> Option { let specifier_stem = specifier.strip_suffix(".js").unwrap_or(specifier); let specifiers = std::iter::once(Cow::Borrowed(specifier)).chain( @@ -481,13 +512,10 @@ impl<'a> TsResponseImportMapper<'a> { .as_cli_resolver(Some(&self.file_referrer)) .resolve( &specifier, - &deno_graph::Range { - specifier: referrer.clone(), - start: deno_graph::Position::zeroed(), - end: deno_graph::Position::zeroed(), - }, - referrer_kind, - ResolutionMode::Types, + referrer, + deno_graph::Position::zeroed(), + resolution_mode, + NodeResolutionKind::Types, ) .ok() .and_then(|s| self.tsc_specifier_map.normalize(s.as_str()).ok()) @@ -509,20 +537,17 @@ impl<'a> TsResponseImportMapper<'a> { &self, specifier_text: &str, referrer: &ModuleSpecifier, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, ) -> bool { self .resolver .as_cli_resolver(Some(&self.file_referrer)) .resolve( specifier_text, - &deno_graph::Range { - specifier: referrer.clone(), - start: deno_graph::Position::zeroed(), - end: deno_graph::Position::zeroed(), - }, - referrer_kind, - deno_graph::source::ResolutionMode::Types, + referrer, + deno_graph::Position::zeroed(), + resolution_mode, + NodeResolutionKind::Types, ) .is_ok() } @@ -589,18 +614,24 @@ fn try_reverse_map_package_json_exports( /// For a set of tsc changes, can them for any that contain something that looks /// like an import and rewrite the import specifier to include the extension pub fn fix_ts_import_changes( - referrer: &ModuleSpecifier, - referrer_kind: NodeModuleKind, changes: &[tsc::FileTextChanges], language_server: &language_server::Inner, ) -> Result, AnyError> { - let import_mapper = language_server.get_ts_response_import_mapper(referrer); let mut r = Vec::new(); for change in changes { + let Ok(referrer) = ModuleSpecifier::parse(&change.file_name) else { + continue; + }; + let referrer_doc = language_server.get_asset_or_document(&referrer).ok(); + let resolution_mode = referrer_doc + .as_ref() + .map(|d| d.resolution_mode()) + .unwrap_or(ResolutionMode::Import); + let import_mapper = + language_server.get_ts_response_import_mapper(&referrer); let mut text_changes = Vec::new(); for text_change in &change.text_changes { let lines = text_change.new_text.split('\n'); - let new_lines: Vec = lines .map(|line| { // This assumes that there's only one import per line. @@ -608,7 +639,7 @@ pub fn fix_ts_import_changes( let specifier = captures.iter().skip(1).find_map(|s| s).unwrap().as_str(); if let Some(new_specifier) = import_mapper - .check_unresolved_specifier(specifier, referrer, referrer_kind) + .check_unresolved_specifier(specifier, &referrer, resolution_mode) { line.replace(specifier, &new_specifier) } else { @@ -638,7 +669,7 @@ pub fn fix_ts_import_changes( /// resolution by Deno (includes the extension). fn fix_ts_import_action<'a>( referrer: &ModuleSpecifier, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, action: &'a tsc::CodeFixAction, language_server: &language_server::Inner, ) -> Option> { @@ -657,9 +688,11 @@ fn fix_ts_import_action<'a>( return Some(Cow::Borrowed(action)); }; let import_mapper = language_server.get_ts_response_import_mapper(referrer); - if let Some(new_specifier) = - import_mapper.check_unresolved_specifier(specifier, referrer, referrer_kind) - { + if let Some(new_specifier) = import_mapper.check_unresolved_specifier( + specifier, + referrer, + resolution_mode, + ) { let description = action.description.replace(specifier, &new_specifier); let changes = action .changes @@ -689,7 +722,8 @@ fn fix_ts_import_action<'a>( fix_id: None, fix_all_description: None, })) - } else if !import_mapper.is_valid_import(specifier, referrer, referrer_kind) { + } else if !import_mapper.is_valid_import(specifier, referrer, resolution_mode) + { None } else { Some(Cow::Borrowed(action)) @@ -1023,7 +1057,7 @@ impl CodeActionCollection { pub fn add_ts_fix_action( &mut self, specifier: &ModuleSpecifier, - specifier_kind: NodeModuleKind, + resolution_mode: ResolutionMode, action: &tsc::CodeFixAction, diagnostic: &lsp::Diagnostic, language_server: &language_server::Inner, @@ -1042,7 +1076,7 @@ impl CodeActionCollection { )); } let Some(action) = - fix_ts_import_action(specifier, specifier_kind, action, language_server) + fix_ts_import_action(specifier, resolution_mode, action, language_server) else { return Ok(()); }; @@ -1237,12 +1271,12 @@ impl CodeActionCollection { let text_info = parsed_source.text_info_lazy(); let specifier_range = SourceRange::new( text_info.loc_to_source_pos(LineAndColumnIndex { - line_index: import.specifier_range.start.line, - column_index: import.specifier_range.start.character, + line_index: import.specifier_range.range.start.line, + column_index: import.specifier_range.range.start.character, }), text_info.loc_to_source_pos(LineAndColumnIndex { - line_index: import.specifier_range.end.line, - column_index: import.specifier_range.end.character, + line_index: import.specifier_range.range.end.line, + column_index: import.specifier_range.range.end.character, }), ); @@ -1277,16 +1311,14 @@ impl CodeActionCollection { if json!(i.kind) != json!("es") && json!(i.kind) != json!("tsType") { return None; } - if !i.specifier_range.includes(&position) { + if !i.specifier_range.includes(position) { return None; } import_start_from_specifier(document, i) })?; let referrer = document.specifier(); - let referrer_kind = language_server - .is_cjs_resolver - .get_doc_module_kind(document); + let resolution_mode = document.resolution_mode(); let file_referrer = document.file_referrer(); let config_data = language_server .config @@ -1312,7 +1344,7 @@ impl CodeActionCollection { if !language_server.resolver.is_bare_package_json_dep( &dep_key, referrer, - referrer_kind, + resolution_mode, ) { return None; } @@ -1332,7 +1364,7 @@ impl CodeActionCollection { } if language_server .resolver - .npm_to_file_url(&npm_ref, referrer, referrer_kind, file_referrer) + .npm_to_file_url(&npm_ref, referrer, resolution_mode, file_referrer) .is_some() { // The package import has types. @@ -1376,7 +1408,7 @@ impl CodeActionCollection { character: import_start.column_index as u32, }; let new_text = format!( - "{}// @deno-types=\"{}\"\n", + "{}// @ts-types=\"{}\"\n", if position.character == 0 { "" } else { "\n" }, &types_specifier_text ); @@ -1389,7 +1421,7 @@ impl CodeActionCollection { }; Some(lsp::CodeAction { title: format!( - "Add @deno-types directive for \"{}\"", + "Add @ts-types directive for \"{}\"", &types_specifier_text ), kind: Some(lsp::CodeActionKind::QUICKFIX), diff --git a/cli/lsp/cache.rs b/cli/lsp/cache.rs index fbf9ea6f1b12f9..97fbbaff14ae38 100644 --- a/cli/lsp/cache.rs +++ b/cli/lsp/cache.rs @@ -1,4 +1,14 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::collections::BTreeMap; +use std::fs; +use std::path::Path; +use std::sync::Arc; +use std::time::SystemTime; + +use deno_core::url::Url; +use deno_core::ModuleSpecifier; +use deno_path_util::url_to_file_path; use crate::cache::DenoDir; use crate::cache::GlobalHttpCache; @@ -7,15 +17,7 @@ use crate::cache::LocalLspHttpCache; use crate::lsp::config::Config; use crate::lsp::logging::lsp_log; use crate::lsp::logging::lsp_warn; - -use deno_core::url::Url; -use deno_core::ModuleSpecifier; -use deno_path_util::url_to_file_path; -use std::collections::BTreeMap; -use std::fs; -use std::path::Path; -use std::sync::Arc; -use std::time::SystemTime; +use crate::sys::CliSys; pub fn calculate_fs_version( cache: &LspCache, @@ -91,12 +93,11 @@ impl LspCache { }) .ok() }); - let deno_dir = DenoDir::new(global_cache_path) + let sys = CliSys::default(); + let deno_dir = DenoDir::new(sys.clone(), global_cache_path) .expect("should be infallible with absolute custom root"); - let global = Arc::new(GlobalHttpCache::new( - deno_dir.remote_folder_path(), - crate::cache::RealDenoCacheEnv, - )); + let global = + Arc::new(GlobalHttpCache::new(sys, deno_dir.remote_folder_path())); Self { deno_dir, global, diff --git a/cli/lsp/capabilities.rs b/cli/lsp/capabilities.rs index 5cdb1224d85780..4c81edeea2c780 100644 --- a/cli/lsp/capabilities.rs +++ b/cli/lsp/capabilities.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. //! //! Provides information about what capabilities that are supported by the diff --git a/cli/lsp/client.rs b/cli/lsp/client.rs index 65865d5b324bdc..85ea1bb4e538ed 100644 --- a/cli/lsp/client.rs +++ b/cli/lsp/client.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::sync::Arc; @@ -12,12 +12,11 @@ use lsp_types::Uri; use tower_lsp::lsp_types as lsp; use tower_lsp::lsp_types::ConfigurationItem; -use crate::lsp::repl::get_repl_workspace_settings; - use super::config::WorkspaceSettings; use super::config::SETTINGS_SECTION; use super::lsp_custom; use super::testing::lsp_custom as testing_lsp_custom; +use crate::lsp::repl::get_repl_workspace_settings; #[derive(Debug)] pub enum TestingNotification { diff --git a/cli/lsp/code_lens.rs b/cli/lsp/code_lens.rs index a57ca3ac9fe141..bb72d0db776a50 100644 --- a/cli/lsp/code_lens.rs +++ b/cli/lsp/code_lens.rs @@ -1,13 +1,9 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::lsp::logging::lsp_warn; - -use super::analysis::source_range_to_lsp_range; -use super::config::CodeLensSettings; -use super::language_server; -use super::text::LineIndex; -use super::tsc; -use super::tsc::NavigationTree; +use std::cell::RefCell; +use std::collections::HashSet; +use std::rc::Rc; +use std::sync::Arc; use deno_ast::swc::ast; use deno_ast::swc::visit::Visit; @@ -25,13 +21,17 @@ use deno_core::ModuleSpecifier; use lazy_regex::lazy_regex; use once_cell::sync::Lazy; use regex::Regex; -use std::cell::RefCell; -use std::collections::HashSet; -use std::rc::Rc; -use std::sync::Arc; use tower_lsp::jsonrpc::Error as LspError; use tower_lsp::lsp_types as lsp; +use super::analysis::source_range_to_lsp_range; +use super::config::CodeLensSettings; +use super::language_server; +use super::text::LineIndex; +use super::tsc; +use super::tsc::NavigationTree; +use crate::lsp::logging::lsp_warn; + static ABSTRACT_MODIFIER: Lazy = lazy_regex!(r"\babstract\b"); static EXPORT_MODIFIER: Lazy = lazy_regex!(r"\bexport\b"); diff --git a/cli/lsp/completions.rs b/cli/lsp/completions.rs index 3ee8ae93e410f6..7309d984b40bd5 100644 --- a/cli/lsp/completions.rs +++ b/cli/lsp/completions.rs @@ -1,25 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. - -use super::client::Client; -use super::config::Config; -use super::config::WorkspaceSettings; -use super::documents::Documents; -use super::documents::DocumentsFilter; -use super::jsr::CliJsrSearchApi; -use super::lsp_custom; -use super::npm::CliNpmSearchApi; -use super::registries::ModuleRegistry; -use super::resolver::LspIsCjsResolver; -use super::resolver::LspResolver; -use super::search::PackageSearchApi; -use super::tsc; - -use crate::jsr::JsrFetchResolver; -use crate::util::path::is_importable_ext; -use crate::util::path::relative_specifier; -use deno_graph::source::ResolutionMode; -use deno_graph::Range; -use deno_runtime::deno_node::SUPPORTED_BUILTIN_NODE_MODULES; +// Copyright 2018-2025 the Deno authors. MIT license. use deno_ast::LineAndColumnIndex; use deno_ast::SourceTextInfo; @@ -31,16 +10,35 @@ use deno_core::serde_json::json; use deno_core::url::Position; use deno_core::ModuleSpecifier; use deno_path_util::url_to_file_path; +use deno_runtime::deno_node::SUPPORTED_BUILTIN_NODE_MODULES; use deno_semver::jsr::JsrPackageReqReference; use deno_semver::package::PackageNv; use import_map::ImportMap; use indexmap::IndexSet; use lsp_types::CompletionList; -use node_resolver::NodeModuleKind; +use node_resolver::NodeResolutionKind; +use node_resolver::ResolutionMode; use once_cell::sync::Lazy; use regex::Regex; use tower_lsp::lsp_types as lsp; +use super::client::Client; +use super::config::Config; +use super::config::WorkspaceSettings; +use super::documents::Documents; +use super::documents::DocumentsFilter; +use super::jsr::CliJsrSearchApi; +use super::lsp_custom; +use super::npm::CliNpmSearchApi; +use super::registries::ModuleRegistry; +use super::resolver::LspResolver; +use super::search::PackageSearchApi; +use super::tsc; +use crate::graph_util::to_node_resolution_mode; +use crate::jsr::JsrFetchResolver; +use crate::util::path::is_importable_ext; +use crate::util::path::relative_specifier; + static FILE_PROTO_RE: Lazy = lazy_regex::lazy_regex!(r#"^file:/{2}(?:/[A-Za-z]:)?"#); @@ -113,7 +111,7 @@ async fn check_auto_config_registry( /// which we want to ignore when replacing text. fn to_narrow_lsp_range( text_info: &SourceTextInfo, - range: &deno_graph::Range, + range: deno_graph::PositionRange, ) -> lsp::Range { let end_byte_index = text_info .loc_to_source_pos(LineAndColumnIndex { @@ -161,26 +159,25 @@ pub async fn get_import_completions( jsr_search_api: &CliJsrSearchApi, npm_search_api: &CliNpmSearchApi, documents: &Documents, - is_cjs_resolver: &LspIsCjsResolver, resolver: &LspResolver, maybe_import_map: Option<&ImportMap>, ) -> Option { let document = documents.get(specifier)?; - let specifier_kind = is_cjs_resolver.get_doc_module_kind(&document); let file_referrer = document.file_referrer(); - let (text, _, range) = document.get_maybe_dependency(position)?; - let range = to_narrow_lsp_range(document.text_info(), &range); + let (text, _, graph_range) = document.get_maybe_dependency(position)?; + let resolution_mode = graph_range + .resolution_mode + .map(to_node_resolution_mode) + .unwrap_or_else(|| document.resolution_mode()); + let range = to_narrow_lsp_range(document.text_info(), graph_range.range); let resolved = resolver .as_cli_resolver(file_referrer) .resolve( &text, - &Range { - specifier: specifier.clone(), - start: deno_graph::Position::zeroed(), - end: deno_graph::Position::zeroed(), - }, - specifier_kind, - ResolutionMode::Execution, + specifier, + deno_graph::Position::zeroed(), + resolution_mode, + NodeResolutionKind::Execution, ) .ok(); if let Some(completion_list) = get_jsr_completions( @@ -206,7 +203,7 @@ pub async fn get_import_completions( // completions for import map specifiers Some(lsp::CompletionResponse::List(completion_list)) } else if let Some(completion_list) = - get_local_completions(specifier, specifier_kind, &text, &range, resolver) + get_local_completions(specifier, resolution_mode, &text, &range, resolver) { // completions for local relative modules Some(lsp::CompletionResponse::List(completion_list)) @@ -361,7 +358,7 @@ fn get_import_map_completions( /// Return local completions that are relative to the base specifier. fn get_local_completions( referrer: &ModuleSpecifier, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, text: &str, range: &lsp::Range, resolver: &LspResolver, @@ -374,13 +371,10 @@ fn get_local_completions( .as_cli_resolver(Some(referrer)) .resolve( parent, - &Range { - specifier: referrer.clone(), - start: deno_graph::Position::zeroed(), - end: deno_graph::Position::zeroed(), - }, - referrer_kind, - ResolutionMode::Execution, + referrer, + deno_graph::Position::zeroed(), + resolution_mode, + NodeResolutionKind::Execution, ) .ok()?; let resolved_parent_path = url_to_file_path(&resolved_parent).ok()?; @@ -748,13 +742,16 @@ fn get_node_completions( } let items = SUPPORTED_BUILTIN_NODE_MODULES .iter() - .map(|name| { + .filter_map(|name| { + if name.starts_with('_') { + return None; + } let specifier = format!("node:{}", name); let text_edit = Some(lsp::CompletionTextEdit::Edit(lsp::TextEdit { range: *range, new_text: specifier.clone(), })); - lsp::CompletionItem { + Some(lsp::CompletionItem { label: specifier, kind: Some(lsp::CompletionItemKind::FILE), detail: Some("(node)".to_string()), @@ -763,7 +760,7 @@ fn get_node_completions( IMPORT_COMMIT_CHARS.iter().map(|&c| c.into()).collect(), ), ..Default::default() - } + }) }) .collect(); Some(CompletionList { @@ -824,17 +821,18 @@ fn get_workspace_completions( #[cfg(test)] mod tests { + use std::collections::HashMap; + + use deno_core::resolve_url; + use pretty_assertions::assert_eq; + use test_util::TempDir; + use super::*; use crate::cache::HttpCache; use crate::lsp::cache::LspCache; use crate::lsp::documents::Documents; use crate::lsp::documents::LanguageId; use crate::lsp::search::tests::TestPackageSearchApi; - use deno_core::resolve_url; - use deno_graph::Range; - use pretty_assertions::assert_eq; - use std::collections::HashMap; - use test_util::TempDir; fn setup( open_sources: &[(&str, &str, i32, LanguageId)], @@ -912,7 +910,7 @@ mod tests { ModuleSpecifier::from_file_path(file_c).expect("could not create"); let actual = get_local_completions( &specifier, - NodeModuleKind::Esm, + ResolutionMode::Import, "./", &lsp::Range { start: lsp::Position { @@ -1608,8 +1606,7 @@ mod tests { let text_info = SourceTextInfo::from_string(r#""te""#.to_string()); let range = to_narrow_lsp_range( &text_info, - &Range { - specifier: ModuleSpecifier::parse("https://deno.land").unwrap(), + deno_graph::PositionRange { start: deno_graph::Position { line: 0, character: 0, @@ -1632,8 +1629,7 @@ mod tests { let text_info = SourceTextInfo::from_string(r#""te"#.to_string()); let range = to_narrow_lsp_range( &text_info, - &Range { - specifier: ModuleSpecifier::parse("https://deno.land").unwrap(), + deno_graph::PositionRange { start: deno_graph::Position { line: 0, character: 0, diff --git a/cli/lsp/config.rs b/cli/lsp/config.rs index ea77e36bcfe1c1..afc976b8fe0d64 100644 --- a/cli/lsp/config.rs +++ b/cli/lsp/config.rs @@ -1,4 +1,13 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::collections::BTreeMap; +use std::collections::BTreeSet; +use std::collections::HashMap; +use std::ops::Deref; +use std::ops::DerefMut; +use std::path::Path; +use std::path::PathBuf; +use std::sync::Arc; use deno_ast::MediaType; use deno_config::deno_json::DenoJsonCache; @@ -9,8 +18,6 @@ use deno_config::deno_json::LintConfig; use deno_config::deno_json::NodeModulesDirMode; use deno_config::deno_json::TestConfig; use deno_config::deno_json::TsConfig; -use deno_config::fs::DenoConfigFs; -use deno_config::fs::RealDenoConfigFs; use deno_config::glob::FilePatterns; use deno_config::glob::PathOrPatternSet; use deno_config::workspace::CreateResolverOptions; @@ -41,14 +48,6 @@ use deno_path_util::url_to_file_path; use deno_runtime::deno_node::PackageJson; use indexmap::IndexSet; use lsp_types::ClientCapabilities; -use std::collections::BTreeMap; -use std::collections::BTreeSet; -use std::collections::HashMap; -use std::ops::Deref; -use std::ops::DerefMut; -use std::path::Path; -use std::path::PathBuf; -use std::sync::Arc; use tower_lsp::lsp_types as lsp; use super::logging::lsp_log; @@ -62,10 +61,11 @@ use crate::args::ConfigFile; use crate::args::LintFlags; use crate::args::LintOptions; use crate::cache::FastInsecureHasher; -use crate::file_fetcher::FileFetcher; +use crate::file_fetcher::CliFileFetcher; use crate::lsp::logging::lsp_warn; use crate::resolver::CliSloppyImportsResolver; use crate::resolver::SloppyImportsCachedFs; +use crate::sys::CliSys; use crate::tools::lint::CliLinter; use crate::tools::lint::CliLinterOptions; use crate::tools::lint::LintRuleProvider; @@ -458,6 +458,19 @@ impl Default for LanguagePreferences { } } +#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct SuggestionActionsSettings { + #[serde(default = "is_true")] + pub enabled: bool, +} + +impl Default for SuggestionActionsSettings { + fn default() -> Self { + SuggestionActionsSettings { enabled: true } + } +} + #[derive(Debug, Default, Clone, Deserialize, Serialize, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct UpdateImportsOnFileMoveOptions { @@ -489,6 +502,8 @@ pub struct LanguageWorkspaceSettings { #[serde(default)] pub suggest: CompletionSettings, #[serde(default)] + pub suggestion_actions: SuggestionActionsSettings, + #[serde(default)] pub update_imports_on_file_move: UpdateImportsOnFileMoveOptions, } @@ -1202,9 +1217,8 @@ impl ConfigData { specified_config: Option<&Path>, scope: &ModuleSpecifier, settings: &Settings, - file_fetcher: &Arc, + file_fetcher: &Arc, // sync requirement is because the lsp requires sync - cached_deno_config_fs: &(dyn DenoConfigFs + Sync), deno_json_cache: &(dyn DenoJsonCache + Sync), pkg_json_cache: &(dyn PackageJsonCache + Sync), workspace_cache: &(dyn WorkspaceCache + Sync), @@ -1214,6 +1228,7 @@ impl ConfigData { Ok(scope_dir_path) => { let paths = [scope_dir_path]; WorkspaceDirectory::discover( + &CliSys::default(), match specified_config { Some(config_path) => { deno_config::workspace::WorkspaceDiscoverStart::ConfigFile( @@ -1225,7 +1240,6 @@ impl ConfigData { } }, &WorkspaceDiscoverOptions { - fs: cached_deno_config_fs, additional_config_file_names: &[], deno_json_cache: Some(deno_json_cache), pkg_json_cache: Some(pkg_json_cache), @@ -1297,7 +1311,7 @@ impl ConfigData { member_dir: Arc, scope: Arc, settings: &Settings, - file_fetcher: Option<&Arc>, + file_fetcher: Option<&Arc>, ) -> Self { let (settings, workspace_folder) = settings.get_for_specifier(&scope); let mut watched_files = HashMap::with_capacity(10); @@ -1602,9 +1616,7 @@ impl ConfigData { || unstable.contains("sloppy-imports"); let sloppy_imports_resolver = unstable_sloppy_imports.then(|| { Arc::new(CliSloppyImportsResolver::new( - SloppyImportsCachedFs::new_without_stat_cache(Arc::new( - deno_runtime::deno_fs::RealFs, - )), + SloppyImportsCachedFs::new_without_stat_cache(CliSys::default()), )) }); let resolver = Arc::new(resolver); @@ -1818,13 +1830,12 @@ impl ConfigTree { &mut self, settings: &Settings, workspace_files: &IndexSet, - file_fetcher: &Arc, + file_fetcher: &Arc, ) { lsp_log!("Refreshing configuration tree..."); // since we're resolving a workspace multiple times in different // folders, we want to cache all the lookups and config files across // ConfigData::load calls - let cached_fs = CachedDenoConfigFs::default(); let deno_json_cache = DenoJsonMemCache::default(); let pkg_json_cache = PackageJsonMemCache::default(); let workspace_cache = WorkspaceMemCache::default(); @@ -1849,7 +1860,6 @@ impl ConfigTree { folder_uri, settings, file_fetcher, - &cached_fs, &deno_json_cache, &pkg_json_cache, &workspace_cache, @@ -1880,7 +1890,6 @@ impl ConfigTree { &scope, settings, file_fetcher, - &cached_fs, &deno_json_cache, &pkg_json_cache, &workspace_cache, @@ -1897,7 +1906,6 @@ impl ConfigTree { member_scope, settings, file_fetcher, - &cached_fs, &deno_json_cache, &pkg_json_cache, &workspace_cache, @@ -1912,21 +1920,24 @@ impl ConfigTree { #[cfg(test)] pub async fn inject_config_file(&mut self, config_file: ConfigFile) { + use sys_traits::FsCreateDirAll; + use sys_traits::FsWrite; + let scope = config_file.specifier.join(".").unwrap(); let json_text = serde_json::to_string(&config_file.json).unwrap(); - let test_fs = deno_runtime::deno_fs::InMemoryFs::default(); + let memory_sys = sys_traits::impls::InMemorySys::default(); let config_path = url_to_file_path(&config_file.specifier).unwrap(); - test_fs.setup_text_files(vec![( - config_path.to_string_lossy().to_string(), - json_text, - )]); + memory_sys + .fs_create_dir_all(config_path.parent().unwrap()) + .unwrap(); + memory_sys.fs_write(&config_path, json_text).unwrap(); let workspace_dir = Arc::new( WorkspaceDirectory::discover( + &memory_sys, deno_config::workspace::WorkspaceDiscoverStart::ConfigFile( &config_path, ), &deno_config::workspace::WorkspaceDiscoverOptions { - fs: &crate::args::deno_json::DenoConfigFsAdapter(&test_fs), ..Default::default() }, ) @@ -1999,11 +2010,14 @@ fn resolve_lockfile_from_path( lockfile_path: PathBuf, frozen: bool, ) -> Option { - match CliLockfile::read_from_path(CliLockfileReadFromPathOptions { - file_path: lockfile_path, - frozen, - skip_write: false, - }) { + match CliLockfile::read_from_path( + &CliSys::default(), + CliLockfileReadFromPathOptions { + file_path: lockfile_path, + frozen, + skip_write: false, + }, + ) { Ok(value) => { if value.filename.exists() { if let Ok(specifier) = ModuleSpecifier::from_file_path(&value.filename) @@ -2060,78 +2074,6 @@ impl deno_config::workspace::WorkspaceCache for WorkspaceMemCache { } } -#[derive(Default)] -struct CachedFsItems { - items: HashMap>, -} - -impl CachedFsItems { - pub fn get( - &mut self, - path: &Path, - action: impl FnOnce(&Path) -> Result, - ) -> Result { - let value = if let Some(value) = self.items.get(path) { - value - } else { - let value = action(path); - // just in case this gets really large for some reason - if self.items.len() == 16_384 { - return value; - } - self.items.insert(path.to_owned(), value); - self.items.get(path).unwrap() - }; - value - .as_ref() - .map(|v| (*v).clone()) - .map_err(|e| std::io::Error::new(e.kind(), e.to_string())) - } -} - -#[derive(Default)] -struct InnerData { - stat_calls: CachedFsItems, - read_to_string_calls: CachedFsItems, -} - -#[derive(Default)] -struct CachedDenoConfigFs(Mutex); - -impl DenoConfigFs for CachedDenoConfigFs { - fn stat_sync( - &self, - path: &Path, - ) -> Result { - self - .0 - .lock() - .stat_calls - .get(path, |path| RealDenoConfigFs.stat_sync(path)) - } - - fn read_to_string_lossy( - &self, - path: &Path, - ) -> Result { - self - .0 - .lock() - .read_to_string_calls - .get(path, |path| RealDenoConfigFs.read_to_string_lossy(path)) - } - - fn read_dir( - &self, - path: &Path, - ) -> Result, std::io::Error> { - // no need to cache these because the workspace cache will ensure - // we only do read_dir calls once (read_dirs are only used for - // npm workspace resolution) - RealDenoConfigFs.read_dir(path) - } -} - #[cfg(test)] mod tests { use deno_config::deno_json::ConfigParseOptions; @@ -2291,6 +2233,7 @@ mod tests { enabled: true, }, }, + suggestion_actions: SuggestionActionsSettings { enabled: true }, update_imports_on_file_move: UpdateImportsOnFileMoveOptions { enabled: UpdateImportsOnFileMoveEnabled::Prompt } @@ -2337,6 +2280,7 @@ mod tests { enabled: true, }, }, + suggestion_actions: SuggestionActionsSettings { enabled: true }, update_imports_on_file_move: UpdateImportsOnFileMoveOptions { enabled: UpdateImportsOnFileMoveEnabled::Prompt } diff --git a/cli/lsp/diagnostics.rs b/cli/lsp/diagnostics.rs index e4fb82e58d5122..cc9cca7f2357b5 100644 --- a/cli/lsp/diagnostics.rs +++ b/cli/lsp/diagnostics.rs @@ -1,30 +1,11 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use super::analysis; -use super::client::Client; -use super::config::Config; -use super::documents; -use super::documents::Document; -use super::documents::Documents; -use super::documents::DocumentsFilter; -use super::language_server; -use super::language_server::StateSnapshot; -use super::performance::Performance; -use super::tsc; -use super::tsc::TsServer; -use super::urls::uri_parse_unencoded; -use super::urls::url_to_uri; -use super::urls::LspUrlMap; - -use crate::graph_util; -use crate::graph_util::enhanced_resolution_error_message; -use crate::lsp::lsp_custom::DiagnosticBatchNotificationParams; -use crate::resolver::CliSloppyImportsResolver; -use crate::resolver::SloppyImportsCachedFs; -use crate::tools::lint::CliLinter; -use crate::tools::lint::CliLinterOptions; -use crate::tools::lint::LintRuleProvider; -use crate::util::path::to_percent_decoded_str; +use std::collections::HashMap; +use std::collections::HashSet; +use std::path::PathBuf; +use std::sync::atomic::AtomicUsize; +use std::sync::Arc; +use std::thread; use deno_ast::MediaType; use deno_config::deno_json::LintConfig; @@ -44,9 +25,9 @@ use deno_graph::source::ResolveError; use deno_graph::Resolution; use deno_graph::ResolutionError; use deno_graph::SpecifierError; +use deno_lint::linter::LintConfig as DenoLintConfig; use deno_resolver::sloppy_imports::SloppyImportsResolution; -use deno_resolver::sloppy_imports::SloppyImportsResolutionMode; -use deno_runtime::deno_fs; +use deno_resolver::sloppy_imports::SloppyImportsResolutionKind; use deno_runtime::deno_node; use deno_runtime::tokio_util::create_basic_runtime; use deno_semver::jsr::JsrPackageReqReference; @@ -55,18 +36,39 @@ use deno_semver::package::PackageReq; use import_map::ImportMap; use import_map::ImportMapError; use log::error; -use std::collections::HashMap; -use std::collections::HashSet; -use std::path::PathBuf; -use std::sync::atomic::AtomicUsize; -use std::sync::Arc; -use std::thread; use tokio::sync::mpsc; use tokio::sync::Mutex; use tokio::time::Duration; use tokio_util::sync::CancellationToken; use tower_lsp::lsp_types as lsp; +use super::analysis; +use super::client::Client; +use super::config::Config; +use super::documents; +use super::documents::Document; +use super::documents::Documents; +use super::documents::DocumentsFilter; +use super::language_server; +use super::language_server::StateSnapshot; +use super::performance::Performance; +use super::tsc; +use super::tsc::TsServer; +use super::urls::uri_parse_unencoded; +use super::urls::url_to_uri; +use super::urls::LspUrlMap; +use crate::graph_util; +use crate::graph_util::enhanced_resolution_error_message; +use crate::lsp::lsp_custom::DiagnosticBatchNotificationParams; +use crate::resolver::CliSloppyImportsResolver; +use crate::resolver::SloppyImportsCachedFs; +use crate::sys::CliSys; +use crate::tools::lint::CliLinter; +use crate::tools::lint::CliLinterOptions; +use crate::tools::lint::LintRuleProvider; +use crate::tsc::DiagnosticCategory; +use crate::util::path::to_percent_decoded_str; + #[derive(Debug)] pub struct DiagnosticServerUpdateMessage { pub snapshot: Arc, @@ -833,7 +835,7 @@ fn generate_lint_diagnostics( lint_rule_provider.resolve_lint_rules(Default::default(), None) }, fix: false, - deno_lint_config: deno_lint::linter::LintConfig { + deno_lint_config: DenoLintConfig { default_jsx_factory: None, default_jsx_fragment_factory: None, }, @@ -906,8 +908,22 @@ async fn generate_ts_diagnostics( } else { Default::default() }; - for (specifier_str, ts_json_diagnostics) in ts_diagnostics_map { + for (specifier_str, mut ts_json_diagnostics) in ts_diagnostics_map { let specifier = resolve_url(&specifier_str)?; + let suggestion_actions_settings = snapshot + .config + .language_settings_for_specifier(&specifier) + .map(|s| s.suggestion_actions.clone()) + .unwrap_or_default(); + if !suggestion_actions_settings.enabled { + ts_json_diagnostics.retain(|d| { + d.category != DiagnosticCategory::Suggestion + // Still show deprecated and unused diagnostics. + // https://github.com/microsoft/vscode/blob/ce50bd4876af457f64d83cfd956bc916535285f4/extensions/typescript-language-features/src/languageFeatures/diagnostics.ts#L113-L114 + || d.reports_deprecated == Some(true) + || d.reports_unnecessary == Some(true) + }); + } let version = snapshot .documents .get(&specifier) @@ -1262,11 +1278,11 @@ impl DenoDiagnostic { Self::NoAttributeType => (lsp::DiagnosticSeverity::ERROR, "The module is a JSON module and not being imported with an import attribute. Consider adding `with { type: \"json\" }` to the import statement.".to_string(), None), Self::NoCache(specifier) => (lsp::DiagnosticSeverity::ERROR, format!("Uncached or missing remote URL: {specifier}"), Some(json!({ "specifier": specifier }))), Self::NotInstalledJsr(pkg_req, specifier) => (lsp::DiagnosticSeverity::ERROR, format!("JSR package \"{pkg_req}\" is not installed or doesn't exist."), Some(json!({ "specifier": specifier }))), - Self::NotInstalledNpm(pkg_req, specifier) => (lsp::DiagnosticSeverity::ERROR, format!("NPM package \"{pkg_req}\" is not installed or doesn't exist."), Some(json!({ "specifier": specifier }))), + Self::NotInstalledNpm(pkg_req, specifier) => (lsp::DiagnosticSeverity::ERROR, format!("npm package \"{pkg_req}\" is not installed or doesn't exist."), Some(json!({ "specifier": specifier }))), Self::NoLocal(specifier) => { let maybe_sloppy_resolution = CliSloppyImportsResolver::new( - SloppyImportsCachedFs::new(Arc::new(deno_fs::RealFs)) - ).resolve(specifier, SloppyImportsResolutionMode::Execution); + SloppyImportsCachedFs::new(CliSys::default()) + ).resolve(specifier, SloppyImportsResolutionKind::Execution); let data = maybe_sloppy_resolution.as_ref().map(|res| { json!({ "specifier": specifier, @@ -1355,7 +1371,7 @@ fn diagnose_resolution( } // don't bother warning about sloppy import redirects from .js to .d.ts // because explaining how to fix this via a diagnostic involves using - // @deno-types and that's a bit complicated to explain + // @ts-types and that's a bit complicated to explain let is_sloppy_import_dts_redirect = doc_specifier.scheme() == "file" && doc.media_type().is_declaration() && !MediaType::from_specifier(specifier).is_declaration(); @@ -1523,7 +1539,7 @@ fn diagnose_dependency( .iter() .map(|i| documents::to_lsp_range(&i.specifier_range)) .collect(); - // TODO(nayeemrmn): This is a crude way of detecting `@deno-types` which has + // TODO(nayeemrmn): This is a crude way of detecting `@ts-types` which has // a different specifier and therefore needs a separate call to // `diagnose_resolution()`. It would be much cleaner if that were modelled as // a separate dependency: https://github.com/denoland/deno_graph/issues/247. @@ -1531,7 +1547,7 @@ fn diagnose_dependency( && !dependency.imports.iter().any(|i| { dependency .maybe_type - .includes(&i.specifier_range.start) + .includes(i.specifier_range.range.start) .is_some() }); @@ -1540,7 +1556,7 @@ fn diagnose_dependency( snapshot, dependency_key, if dependency.maybe_code.is_none() - // If not @deno-types, diagnose the types if the code errored because + // If not @ts-types, diagnose the types if the code errored because // it's likely resolving into the node_modules folder, which might be // erroring correctly due to resolution only being for bundlers. Let this // fail at runtime if necessary, but don't bother erroring in the editor @@ -1630,6 +1646,12 @@ fn generate_deno_diagnostics( #[cfg(test)] mod tests { + use std::sync::Arc; + + use deno_config::deno_json::ConfigFile; + use pretty_assertions::assert_eq; + use test_util::TempDir; + use super::*; use crate::lsp::cache::LspCache; use crate::lsp::config::Config; @@ -1640,11 +1662,6 @@ mod tests { use crate::lsp::language_server::StateSnapshot; use crate::lsp::resolver::LspResolver; - use deno_config::deno_json::ConfigFile; - use pretty_assertions::assert_eq; - use std::sync::Arc; - use test_util::TempDir; - fn mock_config() -> Config { let root_url = resolve_url("file:///").unwrap(); let root_uri = url_to_uri(&root_url).unwrap(); @@ -1707,7 +1724,6 @@ mod tests { documents: Arc::new(documents), assets: Default::default(), config: Arc::new(config), - is_cjs_resolver: Default::default(), resolver, }, ) @@ -1952,7 +1968,7 @@ let c: number = "a"; &[( "a.ts", r#" - // @deno-types="bad.d.ts" + // @ts-types="bad.d.ts" import "bad.js"; import "bad.js"; "#, @@ -2006,11 +2022,11 @@ let c: number = "a"; "range": { "start": { "line": 1, - "character": 23 + "character": 21 }, "end": { "line": 1, - "character": 33 + "character": 31 } }, "severity": 1, diff --git a/cli/lsp/documents.rs b/cli/lsp/documents.rs index b01544ddf98785..39408e25899923 100644 --- a/cli/lsp/documents.rs +++ b/cli/lsp/documents.rs @@ -1,19 +1,17 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use super::cache::calculate_fs_version; -use super::cache::LspCache; -use super::config::Config; -use super::resolver::LspIsCjsResolver; -use super::resolver::LspResolver; -use super::resolver::ScopeDepInfo; -use super::resolver::SingleReferrerGraphResolver; -use super::testing::TestCollector; -use super::testing::TestModule; -use super::text::LineIndex; -use super::tsc; -use super::tsc::AssetDocument; - -use crate::graph_util::CliJsrUrlProvider; +use std::borrow::Cow; +use std::collections::BTreeMap; +use std::collections::HashMap; +use std::collections::HashSet; +use std::fs; +use std::future::Future; +use std::ops::Range; +use std::pin::Pin; +use std::str::FromStr; +use std::sync::atomic::AtomicBool; +use std::sync::atomic::Ordering; +use std::sync::Arc; use dashmap::DashMap; use deno_ast::swc::visit::VisitWith; @@ -27,7 +25,6 @@ use deno_core::futures::future::Shared; use deno_core::futures::FutureExt; use deno_core::parking_lot::Mutex; use deno_core::ModuleSpecifier; -use deno_graph::source::ResolutionMode; use deno_graph::Resolution; use deno_path_util::url_to_file_path; use deno_runtime::deno_node; @@ -36,21 +33,23 @@ use deno_semver::npm::NpmPackageReqReference; use deno_semver::package::PackageReq; use indexmap::IndexMap; use indexmap::IndexSet; -use node_resolver::NodeModuleKind; -use std::borrow::Cow; -use std::collections::BTreeMap; -use std::collections::HashMap; -use std::collections::HashSet; -use std::fs; -use std::future::Future; -use std::ops::Range; -use std::pin::Pin; -use std::str::FromStr; -use std::sync::atomic::AtomicBool; -use std::sync::atomic::Ordering; -use std::sync::Arc; +use node_resolver::NodeResolutionKind; +use node_resolver::ResolutionMode; use tower_lsp::lsp_types as lsp; +use super::cache::calculate_fs_version; +use super::cache::LspCache; +use super::config::Config; +use super::resolver::LspResolver; +use super::resolver::ScopeDepInfo; +use super::resolver::SingleReferrerGraphResolver; +use super::testing::TestCollector; +use super::testing::TestModule; +use super::text::LineIndex; +use super::tsc; +use super::tsc::AssetDocument; +use crate::graph_util::CliJsrUrlProvider; + pub const DOCUMENT_SCHEMES: [&str; 5] = ["data", "blob", "file", "http", "https"]; @@ -65,7 +64,16 @@ pub enum LanguageId { Markdown, Html, Css, + Scss, + Sass, + Less, Yaml, + Sql, + Svelte, + Vue, + Astro, + Vento, + Nunjucks, Unknown, } @@ -81,7 +89,16 @@ impl LanguageId { LanguageId::Markdown => Some("md"), LanguageId::Html => Some("html"), LanguageId::Css => Some("css"), + LanguageId::Scss => Some("scss"), + LanguageId::Sass => Some("sass"), + LanguageId::Less => Some("less"), LanguageId::Yaml => Some("yaml"), + LanguageId::Sql => Some("sql"), + LanguageId::Svelte => Some("svelte"), + LanguageId::Vue => Some("vue"), + LanguageId::Astro => Some("astro"), + LanguageId::Vento => Some("vto"), + LanguageId::Nunjucks => Some("njk"), LanguageId::Unknown => None, } } @@ -96,7 +113,16 @@ impl LanguageId { LanguageId::Markdown => Some("text/markdown"), LanguageId::Html => Some("text/html"), LanguageId::Css => Some("text/css"), + LanguageId::Scss => None, + LanguageId::Sass => None, + LanguageId::Less => None, LanguageId::Yaml => Some("application/yaml"), + LanguageId::Sql => None, + LanguageId::Svelte => None, + LanguageId::Vue => None, + LanguageId::Astro => None, + LanguageId::Vento => None, + LanguageId::Nunjucks => None, LanguageId::Unknown => None, } } @@ -123,7 +149,16 @@ impl FromStr for LanguageId { "markdown" => Ok(Self::Markdown), "html" => Ok(Self::Html), "css" => Ok(Self::Css), + "scss" => Ok(Self::Scss), + "sass" => Ok(Self::Sass), + "less" => Ok(Self::Less), "yaml" => Ok(Self::Yaml), + "sql" => Ok(Self::Sql), + "svelte" => Ok(Self::Svelte), + "vue" => Ok(Self::Vue), + "astro" => Ok(Self::Astro), + "vento" => Ok(Self::Vento), + "nunjucks" => Ok(Self::Nunjucks), _ => Ok(Self::Unknown), } } @@ -228,6 +263,13 @@ impl AssetOrDocument { pub fn document_lsp_version(&self) -> Option { self.document().and_then(|d| d.maybe_lsp_version()) } + + pub fn resolution_mode(&self) -> ResolutionMode { + match self { + AssetOrDocument::Asset(_) => ResolutionMode::Import, + AssetOrDocument::Document(d) => d.resolution_mode(), + } + } } type ModuleResult = Result; @@ -313,6 +355,7 @@ pub struct Document { media_type: MediaType, /// Present if and only if this is an open document. open_data: Option, + resolution_mode: ResolutionMode, resolver: Arc, specifier: ModuleSpecifier, text: Arc, @@ -328,7 +371,6 @@ impl Document { maybe_lsp_version: Option, maybe_language_id: Option, maybe_headers: Option>, - is_cjs_resolver: &LspIsCjsResolver, resolver: Arc, config: Arc, cache: &Arc, @@ -340,7 +382,7 @@ impl Document { .or(file_referrer); let media_type = resolve_media_type(&specifier, maybe_headers.as_ref(), maybe_language_id); - let (maybe_parsed_source, maybe_module) = + let (maybe_parsed_source, maybe_module, resolution_mode) = if media_type_is_diagnosable(media_type) { parse_and_analyze_module( specifier.clone(), @@ -348,11 +390,10 @@ impl Document { maybe_headers.as_ref(), media_type, file_referrer.as_ref(), - is_cjs_resolver, &resolver, ) } else { - (None, None) + (None, None, ResolutionMode::Import) }; let maybe_module = maybe_module.and_then(Result::ok); let dependencies = maybe_module @@ -387,6 +428,7 @@ impl Document { maybe_parsed_source, maybe_semantic_tokens: Default::default(), }), + resolution_mode, resolver, specifier, text, @@ -396,7 +438,6 @@ impl Document { fn with_new_config( &self, - is_cjs_resolver: &LspIsCjsResolver, resolver: Arc, config: Arc, ) -> Arc { @@ -408,20 +449,20 @@ impl Document { let dependencies; let maybe_types_dependency; let maybe_parsed_source; + let found_resolution_mode; let is_script; let maybe_test_module_fut; if media_type != self.media_type { let parsed_source_result = parse_source(self.specifier.clone(), self.text.clone(), media_type); - let maybe_module = analyze_module( + let (maybe_module_result, resolution_mode) = analyze_module( self.specifier.clone(), &parsed_source_result, self.maybe_headers.as_ref(), self.file_referrer.as_ref(), - is_cjs_resolver, &resolver, - ) - .ok(); + ); + let maybe_module = maybe_module_result.ok(); dependencies = maybe_module .as_ref() .map(|m| Arc::new(m.dependencies.clone())) @@ -433,17 +474,21 @@ impl Document { maybe_parsed_source = Some(parsed_source_result); maybe_test_module_fut = get_maybe_test_module_fut(maybe_parsed_source.as_ref(), &config); + found_resolution_mode = resolution_mode; } else { let cli_resolver = resolver.as_cli_resolver(self.file_referrer.as_ref()); + let is_cjs_resolver = + resolver.as_is_cjs_resolver(self.file_referrer.as_ref()); let npm_resolver = resolver.create_graph_npm_resolver(self.file_referrer.as_ref()); let config_data = resolver.as_config_data(self.file_referrer.as_ref()); let jsx_import_source_config = config_data.and_then(|d| d.maybe_jsx_import_source_config()); + found_resolution_mode = is_cjs_resolver + .get_lsp_resolution_mode(&self.specifier, self.is_script); let resolver = SingleReferrerGraphResolver { valid_referrer: &self.specifier, - referrer_kind: is_cjs_resolver - .get_lsp_referrer_kind(&self.specifier, self.is_script), + module_resolution_mode: found_resolution_mode, cli_resolver, jsx_import_source_config: jsx_import_source_config.as_ref(), }; @@ -493,6 +538,7 @@ impl Document { maybe_language_id: self.maybe_language_id, maybe_test_module_fut, media_type, + resolution_mode: found_resolution_mode, open_data: self.open_data.as_ref().map(|d| DocumentOpenData { lsp_version: d.lsp_version, maybe_parsed_source, @@ -508,7 +554,6 @@ impl Document { fn with_change( &self, - is_cjs_resolver: &LspIsCjsResolver, version: i32, changes: Vec, ) -> Result, AnyError> { @@ -530,7 +575,7 @@ impl Document { } let text: Arc = content.into(); let media_type = self.media_type; - let (maybe_parsed_source, maybe_module) = if self + let (maybe_parsed_source, maybe_module, resolution_mode) = if self .maybe_language_id .as_ref() .map(|li| li.is_diagnosable()) @@ -542,11 +587,10 @@ impl Document { self.maybe_headers.as_ref(), media_type, self.file_referrer.as_ref(), - is_cjs_resolver, self.resolver.as_ref(), ) } else { - (None, None) + (None, None, ResolutionMode::Import) }; let maybe_module = maybe_module.and_then(Result::ok); let dependencies = maybe_module @@ -580,6 +624,7 @@ impl Document { maybe_navigation_tree: Mutex::new(None), maybe_test_module_fut, media_type, + resolution_mode, open_data: self.open_data.is_some().then_some(DocumentOpenData { lsp_version: version, maybe_parsed_source, @@ -613,6 +658,7 @@ impl Document { maybe_test_module_fut: self.maybe_test_module_fut.clone(), media_type: self.media_type, open_data: None, + resolution_mode: self.resolution_mode, resolver: self.resolver.clone(), }) } @@ -641,6 +687,7 @@ impl Document { maybe_test_module_fut: self.maybe_test_module_fut.clone(), media_type: self.media_type, open_data: self.open_data.clone(), + resolution_mode: self.resolution_mode, resolver: self.resolver.clone(), }) } @@ -664,6 +711,10 @@ impl Document { &self.text } + pub fn resolution_mode(&self) -> ResolutionMode { + self.resolution_mode + } + pub fn text_info(&self) -> &SourceTextInfo { // try to get the text info from the parsed source and if // not then create one in the cell @@ -677,14 +728,6 @@ impl Document { .get_or_init(|| SourceTextInfo::new(self.text.clone())) }) } - - /// If this is maybe a CJS script and maybe not an ES module. - /// - /// Use `LspIsCjsResolver` to determine for sure. - pub fn is_script(&self) -> Option { - self.is_script - } - pub fn line_index(&self) -> Arc { self.line_index.clone() } @@ -768,7 +811,7 @@ impl Document { }; self.dependencies().iter().find_map(|(s, dep)| { dep - .includes(&position) + .includes(position) .map(|r| (s.clone(), dep.clone(), r.clone())) }) } @@ -809,15 +852,15 @@ fn resolve_media_type( MediaType::from_specifier(specifier) } -pub fn to_lsp_range(range: &deno_graph::Range) -> lsp::Range { +pub fn to_lsp_range(referrer: &deno_graph::Range) -> lsp::Range { lsp::Range { start: lsp::Position { - line: range.start.line as u32, - character: range.start.character as u32, + line: referrer.range.start.line as u32, + character: referrer.range.start.character as u32, }, end: lsp::Position { - line: range.end.line as u32, - character: range.end.character as u32, + line: referrer.range.end.line as u32, + character: referrer.range.end.character as u32, }, } } @@ -832,7 +875,6 @@ impl FileSystemDocuments { pub fn get( &self, specifier: &ModuleSpecifier, - is_cjs_resolver: &LspIsCjsResolver, resolver: &Arc, config: &Arc, cache: &Arc, @@ -856,14 +898,7 @@ impl FileSystemDocuments { }; if dirty { // attempt to update the file on the file system - self.refresh_document( - specifier, - is_cjs_resolver, - resolver, - config, - cache, - file_referrer, - ) + self.refresh_document(specifier, resolver, config, cache, file_referrer) } else { old_doc } @@ -874,7 +909,6 @@ impl FileSystemDocuments { fn refresh_document( &self, specifier: &ModuleSpecifier, - is_cjs_resolver: &LspIsCjsResolver, resolver: &Arc, config: &Arc, cache: &Arc, @@ -883,15 +917,19 @@ impl FileSystemDocuments { let doc = if specifier.scheme() == "file" { let path = url_to_file_path(specifier).ok()?; let bytes = fs::read(path).ok()?; - let content = - deno_graph::source::decode_owned_source(specifier, bytes, None).ok()?; + let content = bytes_to_content( + specifier, + MediaType::from_specifier(specifier), + bytes, + None, + ) + .ok()?; Document::new( specifier.clone(), content.into(), None, None, None, - is_cjs_resolver, resolver.clone(), config.clone(), cache, @@ -908,7 +946,6 @@ impl FileSystemDocuments { None, None, None, - is_cjs_resolver, resolver.clone(), config.clone(), cache, @@ -923,20 +960,24 @@ impl FileSystemDocuments { specifier, Some(&cached_file.metadata.headers), ); - let content = deno_graph::source::decode_owned_source( + let media_type = resolve_media_type( specifier, - cached_file.content, + Some(&cached_file.metadata.headers), + None, + ); + let content = bytes_to_content( + specifier, + media_type, + cached_file.content.into_owned(), maybe_charset, ) .ok()?; - let maybe_headers = Some(cached_file.metadata.headers); Document::new( specifier.clone(), content.into(), None, None, - maybe_headers, - is_cjs_resolver, + Some(cached_file.metadata.headers), resolver.clone(), config.clone(), cache, @@ -977,8 +1018,6 @@ pub struct Documents { /// The DENO_DIR that the documents looks for non-file based modules. cache: Arc, config: Arc, - /// Resolver for detecting if a document is CJS or ESM. - is_cjs_resolver: Arc, /// A resolver that takes into account currently loaded import map and JSX /// settings. resolver: Arc, @@ -1014,7 +1053,6 @@ impl Documents { // the cache for remote modules here in order to get the // x-typescript-types? None, - &self.is_cjs_resolver, self.resolver.clone(), self.config.clone(), &self.cache, @@ -1049,7 +1087,7 @@ impl Documents { )) })?; self.dirty = true; - let doc = doc.with_change(&self.is_cjs_resolver, version, changes)?; + let doc = doc.with_change(version, changes)?; self.open_docs.insert(doc.specifier().clone(), doc.clone()); Ok(doc) } @@ -1181,7 +1219,6 @@ impl Documents { if let Some(old_doc) = old_doc { self.file_system_docs.get( specifier, - &self.is_cjs_resolver, &self.resolver, &self.config, &self.cache, @@ -1206,7 +1243,6 @@ impl Documents { } else { self.file_system_docs.get( &specifier, - &self.is_cjs_resolver, &self.resolver, &self.config, &self.cache, @@ -1261,7 +1297,8 @@ impl Documents { /// tsc when type checking. pub fn resolve( &self, - raw_specifiers: &[String], + // (is_cjs: bool, raw_specifier: String) + raw_specifiers: &[(bool, String)], referrer: &ModuleSpecifier, file_referrer: Option<&ModuleSpecifier>, ) -> Vec> { @@ -1271,11 +1308,12 @@ impl Documents { .and_then(|d| d.file_referrer()) .or(file_referrer); let dependencies = referrer_doc.as_ref().map(|d| d.dependencies()); - let referrer_kind = self - .is_cjs_resolver - .get_maybe_doc_module_kind(referrer, referrer_doc.as_deref()); let mut results = Vec::new(); - for raw_specifier in raw_specifiers { + for (is_cjs, raw_specifier) in raw_specifiers { + let resolution_mode = match is_cjs { + true => ResolutionMode::Require, + false => ResolutionMode::Import, + }; if raw_specifier.starts_with("asset:") { if let Ok(specifier) = ModuleSpecifier::parse(raw_specifier) { let media_type = MediaType::from_specifier(&specifier); @@ -1290,14 +1328,14 @@ impl Documents { results.push(self.resolve_dependency( specifier, referrer, - referrer_kind, + resolution_mode, file_referrer, )); } else if let Some(specifier) = dep.maybe_code.maybe_specifier() { results.push(self.resolve_dependency( specifier, referrer, - referrer_kind, + resolution_mode, file_referrer, )); } else { @@ -1306,19 +1344,16 @@ impl Documents { } else if let Ok(specifier) = self.resolver.as_cli_resolver(file_referrer).resolve( raw_specifier, - &deno_graph::Range { - specifier: referrer.clone(), - start: deno_graph::Position::zeroed(), - end: deno_graph::Position::zeroed(), - }, - referrer_kind, - ResolutionMode::Types, + referrer, + deno_graph::Position::zeroed(), + resolution_mode, + NodeResolutionKind::Types, ) { results.push(self.resolve_dependency( &specifier, referrer, - referrer_kind, + resolution_mode, file_referrer, )); } else { @@ -1337,7 +1372,6 @@ impl Documents { ) { self.config = Arc::new(config.clone()); self.cache = Arc::new(cache.clone()); - self.is_cjs_resolver = Arc::new(LspIsCjsResolver::new(cache)); self.resolver = resolver.clone(); node_resolver::PackageJsonThreadLocalCache::clear(); @@ -1361,21 +1395,14 @@ impl Documents { if !config.specifier_enabled(doc.specifier()) { continue; } - *doc = doc.with_new_config( - &self.is_cjs_resolver, - self.resolver.clone(), - self.config.clone(), - ); + *doc = doc.with_new_config(self.resolver.clone(), self.config.clone()); } for mut doc in self.file_system_docs.docs.iter_mut() { if !config.specifier_enabled(doc.specifier()) { continue; } - *doc.value_mut() = doc.with_new_config( - &self.is_cjs_resolver, - self.resolver.clone(), - self.config.clone(), - ); + *doc.value_mut() = + doc.with_new_config(self.resolver.clone(), self.config.clone()); } self.open_docs = open_docs; let mut preload_count = 0; @@ -1392,7 +1419,6 @@ impl Documents { { fs_docs.refresh_document( specifier, - &self.is_cjs_resolver, &self.resolver, &self.config, &self.cache, @@ -1467,27 +1493,24 @@ impl Documents { let type_specifier = jsx_config.default_types_specifier.as_ref()?; let code_specifier = jsx_config.default_specifier.as_ref()?; let cli_resolver = self.resolver.as_cli_resolver(Some(scope)); - let range = deno_graph::Range { - specifier: jsx_config.base_url.clone(), - start: deno_graph::Position::zeroed(), - end: deno_graph::Position::zeroed(), - }; let type_specifier = cli_resolver .resolve( type_specifier, - &range, + &jsx_config.base_url, + deno_graph::Position::zeroed(), // todo(dsherret): this is wrong because it doesn't consider CJS referrers - deno_package_json::NodeModuleKind::Esm, - ResolutionMode::Types, + ResolutionMode::Import, + NodeResolutionKind::Types, ) .ok()?; let code_specifier = cli_resolver .resolve( code_specifier, - &range, + &jsx_config.base_url, + deno_graph::Position::zeroed(), // todo(dsherret): this is wrong because it doesn't consider CJS referrers - deno_package_json::NodeModuleKind::Esm, - ResolutionMode::Execution, + ResolutionMode::Import, + NodeResolutionKind::Execution, ) .ok()?; dep_info @@ -1532,7 +1555,7 @@ impl Documents { &self, specifier: &ModuleSpecifier, referrer: &ModuleSpecifier, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, file_referrer: Option<&ModuleSpecifier>, ) -> Option<(ModuleSpecifier, MediaType)> { if let Some(module_name) = specifier.as_str().strip_prefix("node:") { @@ -1549,7 +1572,7 @@ impl Documents { let (s, mt) = self.resolver.npm_to_file_url( &npm_ref, referrer, - referrer_kind, + resolution_mode, file_referrer, )?; specifier = s; @@ -1561,8 +1584,12 @@ impl Documents { return Some((specifier, media_type)); }; if let Some(types) = doc.maybe_types_dependency().maybe_specifier() { - let specifier_kind = self.is_cjs_resolver.get_doc_module_kind(&doc); - self.resolve_dependency(types, &specifier, specifier_kind, file_referrer) + self.resolve_dependency( + types, + &specifier, + doc.resolution_mode(), + file_referrer, + ) } else { Some((doc.specifier().clone(), doc.media_type())) } @@ -1630,19 +1657,25 @@ fn parse_and_analyze_module( maybe_headers: Option<&HashMap>, media_type: MediaType, file_referrer: Option<&ModuleSpecifier>, - is_cjs_resolver: &LspIsCjsResolver, resolver: &LspResolver, -) -> (Option, Option) { +) -> ( + Option, + Option, + ResolutionMode, +) { let parsed_source_result = parse_source(specifier.clone(), text, media_type); - let module_result = analyze_module( + let (module_result, resolution_mode) = analyze_module( specifier, &parsed_source_result, maybe_headers, file_referrer, - is_cjs_resolver, resolver, ); - (Some(parsed_source_result), Some(module_result)) + ( + Some(parsed_source_result), + Some(module_result), + resolution_mode, + ) } fn parse_source( @@ -1665,52 +1698,74 @@ fn analyze_module( parsed_source_result: &ParsedSourceResult, maybe_headers: Option<&HashMap>, file_referrer: Option<&ModuleSpecifier>, - is_cjs_resolver: &LspIsCjsResolver, resolver: &LspResolver, -) -> ModuleResult { +) -> (ModuleResult, ResolutionMode) { match parsed_source_result { Ok(parsed_source) => { let npm_resolver = resolver.create_graph_npm_resolver(file_referrer); let cli_resolver = resolver.as_cli_resolver(file_referrer); + let is_cjs_resolver = resolver.as_is_cjs_resolver(file_referrer); let config_data = resolver.as_config_data(file_referrer); let valid_referrer = specifier.clone(); let jsx_import_source_config = config_data.and_then(|d| d.maybe_jsx_import_source_config()); + let module_resolution_mode = is_cjs_resolver.get_lsp_resolution_mode( + &specifier, + Some(parsed_source.compute_is_script()), + ); let resolver = SingleReferrerGraphResolver { valid_referrer: &valid_referrer, - referrer_kind: is_cjs_resolver.get_lsp_referrer_kind( - &specifier, - Some(parsed_source.compute_is_script()), - ), + module_resolution_mode, cli_resolver, jsx_import_source_config: jsx_import_source_config.as_ref(), }; - Ok(deno_graph::parse_module_from_ast( - deno_graph::ParseModuleFromAstOptions { - graph_kind: deno_graph::GraphKind::TypesOnly, - specifier, - maybe_headers, - parsed_source, - // use a null file system because there's no need to bother resolving - // dynamic imports like import(`./dir/${something}`) in the LSP - file_system: &deno_graph::source::NullFileSystem, - jsr_url_provider: &CliJsrUrlProvider, - maybe_resolver: Some(&resolver), - maybe_npm_resolver: Some(&npm_resolver), - }, - )) + ( + Ok(deno_graph::parse_module_from_ast( + deno_graph::ParseModuleFromAstOptions { + graph_kind: deno_graph::GraphKind::TypesOnly, + specifier, + maybe_headers, + parsed_source, + // use a null file system because there's no need to bother resolving + // dynamic imports like import(`./dir/${something}`) in the LSP + file_system: &deno_graph::source::NullFileSystem, + jsr_url_provider: &CliJsrUrlProvider, + maybe_resolver: Some(&resolver), + maybe_npm_resolver: Some(&npm_resolver), + }, + )), + module_resolution_mode, + ) } - Err(err) => Err(deno_graph::ModuleGraphError::ModuleError( - deno_graph::ModuleError::ParseErr(specifier, err.clone()), - )), + Err(err) => ( + Err(deno_graph::ModuleGraphError::ModuleError( + deno_graph::ModuleError::ParseErr(specifier, err.clone()), + )), + ResolutionMode::Import, + ), + } +} + +fn bytes_to_content( + specifier: &ModuleSpecifier, + media_type: MediaType, + bytes: Vec, + maybe_charset: Option<&str>, +) -> Result { + if media_type == MediaType::Wasm { + // we use the dts representation for Wasm modules + Ok(deno_graph::source::wasm::wasm_module_to_dts(&bytes)?) + } else { + Ok(deno_graph::source::decode_owned_source( + specifier, + bytes, + maybe_charset, + )?) } } #[cfg(test)] mod tests { - use super::*; - use crate::lsp::cache::LspCache; - use deno_config::deno_json::ConfigFile; use deno_config::deno_json::ConfigParseOptions; use deno_core::serde_json; @@ -1718,6 +1773,9 @@ mod tests { use pretty_assertions::assert_eq; use test_util::TempDir; + use super::*; + use crate::lsp::cache::LspCache; + async fn setup() -> (Documents, LspCache, TempDir) { let temp_dir = TempDir::new(); temp_dir.create_dir_all(".deno_dir"); diff --git a/cli/lsp/jsr.rs b/cli/lsp/jsr.rs index 9a738ec2871f7c..1bcd6f39304d58 100644 --- a/cli/lsp/jsr.rs +++ b/cli/lsp/jsr.rs @@ -1,10 +1,8 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::collections::HashMap; +use std::sync::Arc; -use crate::args::jsr_api_url; -use crate::args::jsr_url; -use crate::file_fetcher::FileFetcher; -use crate::jsr::partial_jsr_package_version_info_from_slice; -use crate::jsr::JsrFetchResolver; use dashmap::DashMap; use deno_cache_dir::HttpCache; use deno_core::anyhow::anyhow; @@ -17,13 +15,18 @@ use deno_graph::ModuleSpecifier; use deno_semver::jsr::JsrPackageReqReference; use deno_semver::package::PackageNv; use deno_semver::package::PackageReq; +use deno_semver::StackString; use deno_semver::Version; use serde::Deserialize; -use std::collections::HashMap; -use std::sync::Arc; use super::config::ConfigData; use super::search::PackageSearchApi; +use crate::args::jsr_api_url; +use crate::args::jsr_url; +use crate::file_fetcher::CliFileFetcher; +use crate::file_fetcher::TextDecodedFile; +use crate::jsr::partial_jsr_package_version_info_from_slice; +use crate::jsr::JsrFetchResolver; /// Keep in sync with `JsrFetchResolver`! #[derive(Debug)] @@ -32,8 +35,8 @@ pub struct JsrCacheResolver { /// The `module_graph` fields of the version infos should be forcibly absent. /// It can be large and we don't want to store it. info_by_nv: DashMap>>, - info_by_name: DashMap>>, - workspace_scope_by_name: HashMap, + info_by_name: DashMap>>, + workspace_scope_by_name: HashMap, cache: Arc, } @@ -58,7 +61,7 @@ impl JsrCacheResolver { continue; }; let nv = PackageNv { - name: jsr_pkg_config.name.clone(), + name: jsr_pkg_config.name.as_str().into(), version: version.clone(), }; info_by_name.insert( @@ -124,8 +127,8 @@ impl JsrCacheResolver { return nv.value().clone(); } let maybe_get_nv = || { - let name = req.name.clone(); - let package_info = self.package_info(&name)?; + let name = &req.name; + let package_info = self.package_info(name)?; // Find the first matching version of the package which is cached. let mut versions = package_info.versions.keys().collect::>(); versions.sort(); @@ -143,7 +146,10 @@ impl JsrCacheResolver { self.package_version_info(&nv).is_some() }) .cloned()?; - Some(PackageNv { name, version }) + Some(PackageNv { + name: name.clone(), + version, + }) }; let nv = maybe_get_nv(); self.nv_by_req.insert(req.clone(), nv.clone()); @@ -215,7 +221,10 @@ impl JsrCacheResolver { None } - pub fn package_info(&self, name: &str) -> Option> { + pub fn package_info( + &self, + name: &StackString, + ) -> Option> { if let Some(info) = self.info_by_name.get(name) { return info.value().clone(); } @@ -225,7 +234,7 @@ impl JsrCacheResolver { serde_json::from_slice::(&meta_bytes).ok() }; let info = read_cached_package_info().map(Arc::new); - self.info_by_name.insert(name.to_string(), info.clone()); + self.info_by_name.insert(name.clone(), info.clone()); info } @@ -262,12 +271,12 @@ fn read_cached_url( cache .get(&cache.cache_item_key(url).ok()?, None) .ok()? - .map(|f| f.content) + .map(|f| f.content.into_owned()) } #[derive(Debug)] pub struct CliJsrSearchApi { - file_fetcher: Arc, + file_fetcher: Arc, resolver: JsrFetchResolver, search_cache: DashMap>>, versions_cache: DashMap>>, @@ -275,7 +284,7 @@ pub struct CliJsrSearchApi { } impl CliJsrSearchApi { - pub fn new(file_fetcher: Arc) -> Self { + pub fn new(file_fetcher: Arc) -> Self { let resolver = JsrFetchResolver::new(file_fetcher.clone()); Self { file_fetcher, @@ -309,10 +318,8 @@ impl PackageSearchApi for CliJsrSearchApi { let file_fetcher = self.file_fetcher.clone(); // spawn due to the lsp's `Send` requirement let file = deno_core::unsync::spawn(async move { - file_fetcher - .fetch_bypass_permissions(&search_url) - .await? - .into_text_decoded() + let file = file_fetcher.fetch_bypass_permissions(&search_url).await?; + TextDecodedFile::decode(file) }) .await??; let names = Arc::new(parse_jsr_search_response(&file.source)?); diff --git a/cli/lsp/language_server.rs b/cli/lsp/language_server.rs index c93628555b511c..958c3a4606e6c8 100644 --- a/cli/lsp/language_server.rs +++ b/cli/lsp/language_server.rs @@ -1,6 +1,18 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::collections::BTreeMap; +use std::collections::BTreeSet; +use std::collections::HashMap; +use std::collections::HashSet; +use std::collections::VecDeque; +use std::env; +use std::fmt::Write as _; +use std::path::PathBuf; +use std::str::FromStr; +use std::sync::Arc; use deno_ast::MediaType; +use deno_cache_dir::file_fetcher::CacheSetting; use deno_config::workspace::WorkspaceDirectory; use deno_config::workspace::WorkspaceDiscoverOptions; use deno_core::anyhow::anyhow; @@ -22,19 +34,10 @@ use deno_semver::jsr::JsrPackageReqReference; use indexmap::Equivalent; use indexmap::IndexSet; use log::error; -use node_resolver::NodeModuleKind; +use node_resolver::NodeResolutionKind; +use node_resolver::ResolutionMode; use serde::Deserialize; use serde_json::from_value; -use std::collections::BTreeMap; -use std::collections::BTreeSet; -use std::collections::HashMap; -use std::collections::HashSet; -use std::collections::VecDeque; -use std::env; -use std::fmt::Write as _; -use std::path::PathBuf; -use std::str::FromStr; -use std::sync::Arc; use tokio::sync::mpsc::unbounded_channel; use tokio::sync::mpsc::UnboundedReceiver; use tokio::sync::mpsc::UnboundedSender; @@ -78,7 +81,6 @@ use super::parent_process_checker; use super::performance::Performance; use super::refactor; use super::registries::ModuleRegistry; -use super::resolver::LspIsCjsResolver; use super::resolver::LspResolver; use super::testing; use super::text; @@ -95,19 +97,19 @@ use crate::args::create_default_npmrc; use crate::args::get_root_cert_store; use crate::args::has_flag_env_var; use crate::args::CaData; -use crate::args::CacheSetting; use crate::args::CliOptions; use crate::args::Flags; use crate::args::InternalFlags; use crate::args::UnstableFmtOptions; use crate::factory::CliFactory; -use crate::file_fetcher::FileFetcher; +use crate::file_fetcher::CliFileFetcher; use crate::graph_util; use crate::http_util::HttpClientProvider; use crate::lsp::config::ConfigWatchedFileType; use crate::lsp::logging::init_log_file; use crate::lsp::tsc::file_text_changes_to_workspace_edit; use crate::lsp::urls::LspUrlKind; +use crate::sys::CliSys; use crate::tools::fmt::format_file; use crate::tools::fmt::format_parsed_source; use crate::tools::upgrade::check_for_upgrades_for_lsp; @@ -146,7 +148,6 @@ pub struct StateSnapshot { pub project_version: usize, pub assets: AssetsSnapshot, pub config: Arc, - pub is_cjs_resolver: Arc, pub documents: Arc, pub resolver: Arc, } @@ -206,7 +207,6 @@ pub struct Inner { pub documents: Documents, http_client_provider: Arc, initial_cwd: PathBuf, - pub is_cjs_resolver: Arc, jsr_search_api: CliJsrSearchApi, /// Handles module registries, which allow discovery of modules module_registry: ModuleRegistry, @@ -272,11 +272,16 @@ impl LanguageServer { open_docs: &open_docs, }; let graph = module_graph_creator - .create_graph_with_loader(GraphKind::All, roots.clone(), &mut loader) + .create_graph_with_loader( + GraphKind::All, + roots.clone(), + &mut loader, + graph_util::NpmCachingStrategy::Eager, + ) .await?; graph_util::graph_valid( &graph, - factory.fs(), + &CliSys::default(), &roots, graph_util::GraphValidOptions { kind: GraphKind::All, @@ -484,7 +489,6 @@ impl Inner { let initial_cwd = std::env::current_dir().unwrap_or_else(|_| { panic!("Could not resolve current working directory") }); - let is_cjs_resolver = Arc::new(LspIsCjsResolver::new(&cache)); Self { assets, @@ -496,7 +500,6 @@ impl Inner { documents, http_client_provider, initial_cwd: initial_cwd.clone(), - is_cjs_resolver, jsr_search_api, project_version: 0, task_queue: Default::default(), @@ -607,7 +610,6 @@ impl Inner { project_version: self.project_version, assets: self.assets.snapshot(), config: Arc::new(self.config.clone()), - is_cjs_resolver: self.is_cjs_resolver.clone(), documents: Arc::new(self.documents.clone()), resolver: self.resolver.snapshot(), }) @@ -629,7 +631,6 @@ impl Inner { } }); self.cache = LspCache::new(global_cache_url); - self.is_cjs_resolver = Arc::new(LspIsCjsResolver::new(&self.cache)); let deno_dir = self.cache.deno_dir(); let workspace_settings = self.config.workspace_settings(); let maybe_root_path = self @@ -959,15 +960,16 @@ impl Inner { } async fn refresh_config_tree(&mut self) { - let mut file_fetcher = FileFetcher::new( + let file_fetcher = CliFileFetcher::new( self.cache.global().clone(), - CacheSetting::RespectHeaders, - true, self.http_client_provider.clone(), + CliSys::default(), Default::default(), None, + true, + CacheSetting::RespectHeaders, + super::logging::lsp_log_level(), ); - file_fetcher.set_download_log_level(super::logging::lsp_log_level()); let file_fetcher = Arc::new(file_fetcher); self .config @@ -993,13 +995,10 @@ impl Inner { let resolver = inner.resolver.as_cli_resolver(Some(&referrer)); let Ok(specifier) = resolver.resolve( &specifier, - &deno_graph::Range { - specifier: referrer.clone(), - start: deno_graph::Position::zeroed(), - end: deno_graph::Position::zeroed(), - }, - NodeModuleKind::Esm, - deno_graph::source::ResolutionMode::Types, + &referrer, + deno_graph::Position::zeroed(), + ResolutionMode::Import, + NodeResolutionKind::Types, ) else { return; }; @@ -1396,13 +1395,18 @@ impl Inner { .fmt_config_for_specifier(&specifier) .options .clone(); - fmt_options.use_tabs = Some(!params.options.insert_spaces); - fmt_options.indent_width = Some(params.options.tab_size as u8); let config_data = self.config.tree.data_for_specifier(&specifier); + if !config_data.is_some_and(|d| d.maybe_deno_json().is_some()) { + fmt_options.use_tabs = Some(!params.options.insert_spaces); + fmt_options.indent_width = Some(params.options.tab_size as u8); + } let unstable_options = UnstableFmtOptions { component: config_data .map(|d| d.unstable.contains("fmt-component")) .unwrap_or(false), + sql: config_data + .map(|d| d.unstable.contains("fmt-sql")) + .unwrap_or(false), }; let document = document.clone(); move || { @@ -1635,8 +1639,8 @@ impl Inner { .get_ts_diagnostics(&specifier, asset_or_doc.document_lsp_version()); let specifier_kind = asset_or_doc .document() - .map(|d| self.is_cjs_resolver.get_doc_module_kind(d)) - .unwrap_or(NodeModuleKind::Esm); + .map(|d| d.resolution_mode()) + .unwrap_or(ResolutionMode::Import); let mut includes_no_cache = false; for diagnostic in &fixable_diagnostics { match diagnostic.source.as_deref() { @@ -1854,20 +1858,12 @@ impl Inner { } let changes = if code_action_data.fix_id == "fixMissingImport" { - fix_ts_import_changes( - &code_action_data.specifier, - maybe_asset_or_doc - .as_ref() - .and_then(|d| d.document()) - .map(|d| self.is_cjs_resolver.get_doc_module_kind(d)) - .unwrap_or(NodeModuleKind::Esm), - &combined_code_actions.changes, - self, - ) - .map_err(|err| { - error!("Unable to remap changes: {:#}", err); - LspError::internal_error() - })? + fix_ts_import_changes(&combined_code_actions.changes, self).map_err( + |err| { + error!("Unable to remap changes: {:#}", err); + LspError::internal_error() + }, + )? } else { combined_code_actions.changes }; @@ -1911,20 +1907,16 @@ impl Inner { asset_or_doc.scope().cloned(), ) .await?; - if kind_suffix == ".rewrite.function.returnType" { - refactor_edit_info.edits = fix_ts_import_changes( - &action_data.specifier, - asset_or_doc - .document() - .map(|d| self.is_cjs_resolver.get_doc_module_kind(d)) - .unwrap_or(NodeModuleKind::Esm), - &refactor_edit_info.edits, - self, - ) - .map_err(|err| { - error!("Unable to remap changes: {:#}", err); - LspError::internal_error() - })? + if kind_suffix == ".rewrite.function.returnType" + || kind_suffix == ".move.newFile" + { + refactor_edit_info.edits = + fix_ts_import_changes(&refactor_edit_info.edits, self).map_err( + |err| { + error!("Unable to remap changes: {:#}", err); + LspError::internal_error() + }, + )? } code_action.edit = refactor_edit_info.to_workspace_edit(self)?; code_action @@ -2267,7 +2259,6 @@ impl Inner { &self.jsr_search_api, &self.npm_search_api, &self.documents, - &self.is_cjs_resolver, self.resolver.as_ref(), self .config @@ -3624,11 +3615,11 @@ impl Inner { let workspace = match config_data { Some(d) => d.member_dir.clone(), None => Arc::new(WorkspaceDirectory::discover( + &CliSys::default(), deno_config::workspace::WorkspaceDiscoverStart::Paths(&[ initial_cwd.clone() ]), &WorkspaceDiscoverOptions { - fs: Default::default(), // use real fs, deno_json_cache: None, pkg_json_cache: None, workspace_cache: None, @@ -3645,6 +3636,7 @@ impl Inner { )?), }; let cli_options = CliOptions::new( + &CliSys::default(), Arc::new(Flags { internal: InternalFlags { cache_path: Some(self.cache.deno_dir().root.clone()), @@ -3676,6 +3668,7 @@ impl Inner { .unwrap_or_else(create_default_npmrc), workspace, force_global_cache, + None, )?; let open_docs = self.documents.documents(DocumentsFilter::OpenDiagnosable); @@ -3776,14 +3769,11 @@ impl Inner { fn task_definitions(&self) -> LspResult> { let mut result = vec![]; for config_file in self.config.tree.config_files() { - if let Some(tasks) = json!(&config_file.json.tasks).as_object() { - for (name, value) in tasks { - let Some(command) = value.as_str() else { - continue; - }; + if let Some(tasks) = config_file.to_tasks_config().ok().flatten() { + for (name, def) in tasks { result.push(TaskDefinition { name: name.clone(), - command: command.to_string(), + command: def.command.clone(), source_uri: url_to_uri(&config_file.specifier) .map_err(|_| LspError::internal_error())?, }); @@ -3795,7 +3785,7 @@ impl Inner { for (name, command) in scripts { result.push(TaskDefinition { name: name.clone(), - command: command.clone(), + command: Some(command.clone()), source_uri: url_to_uri(&package_json.specifier()) .map_err(|_| LspError::internal_error())?, }); @@ -3974,10 +3964,11 @@ impl Inner { #[cfg(test)] mod tests { - use super::*; use pretty_assertions::assert_eq; use test_util::TempDir; + use super::*; + #[test] fn test_walk_workspace() { let temp_dir = TempDir::new(); diff --git a/cli/lsp/logging.rs b/cli/lsp/logging.rs index 2b85d77ec1aa17..efb49b2d48c1f8 100644 --- a/cli/lsp/logging.rs +++ b/cli/lsp/logging.rs @@ -1,8 +1,5 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use chrono::DateTime; -use chrono::Utc; -use deno_core::parking_lot::Mutex; use std::fs; use std::io::prelude::*; use std::path::Path; @@ -12,6 +9,10 @@ use std::sync::atomic::Ordering; use std::thread; use std::time::SystemTime; +use chrono::DateTime; +use chrono::Utc; +use deno_core::parking_lot::Mutex; + static LSP_DEBUG_FLAG: AtomicBool = AtomicBool::new(false); static LSP_LOG_LEVEL: AtomicUsize = AtomicUsize::new(log::Level::Info as usize); static LSP_WARN_LEVEL: AtomicUsize = diff --git a/cli/lsp/lsp_custom.rs b/cli/lsp/lsp_custom.rs index b570b6d0e2f854..050fcf31843547 100644 --- a/cli/lsp/lsp_custom.rs +++ b/cli/lsp/lsp_custom.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_core::serde::Deserialize; use deno_core::serde::Serialize; @@ -14,9 +14,7 @@ pub const LATEST_DIAGNOSTIC_BATCH_INDEX: &str = #[serde(rename_all = "camelCase")] pub struct TaskDefinition { pub name: String, - // TODO(nayeemrmn): Rename this to `command` in vscode_deno. - #[serde(rename = "detail")] - pub command: String, + pub command: Option, pub source_uri: lsp::Uri, } diff --git a/cli/lsp/mod.rs b/cli/lsp/mod.rs index 79aa4d8f074d14..6b5d17798bee56 100644 --- a/cli/lsp/mod.rs +++ b/cli/lsp/mod.rs @@ -1,16 +1,15 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_core::error::AnyError; use deno_core::unsync::spawn; +pub use repl::ReplCompletionItem; +pub use repl::ReplLanguageServer; use tower_lsp::LspService; use tower_lsp::Server; +use self::diagnostics::should_send_diagnostic_batch_index_notifications; use crate::lsp::language_server::LanguageServer; use crate::util::sync::AsyncFlag; -pub use repl::ReplCompletionItem; -pub use repl::ReplLanguageServer; - -use self::diagnostics::should_send_diagnostic_batch_index_notifications; mod analysis; mod cache; @@ -56,9 +55,6 @@ pub async fn start() -> Result<(), AnyError> { LanguageServer::performance_request, ) .custom_method(lsp_custom::TASK_REQUEST, LanguageServer::task_definitions) - // TODO(nayeemrmn): Rename this to `deno/taskDefinitions` in vscode_deno and - // remove this alias. - .custom_method("deno/task", LanguageServer::task_definitions) .custom_method(testing::TEST_RUN_REQUEST, LanguageServer::test_run_request) .custom_method( testing::TEST_RUN_CANCEL_REQUEST, diff --git a/cli/lsp/npm.rs b/cli/lsp/npm.rs index 2decfc342906f0..d53c8cb2ab6bae 100644 --- a/cli/lsp/npm.rs +++ b/cli/lsp/npm.rs @@ -1,4 +1,6 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::sync::Arc; use dashmap::DashMap; use deno_core::anyhow::anyhow; @@ -8,24 +10,23 @@ use deno_npm::npm_rc::NpmRc; use deno_semver::package::PackageNv; use deno_semver::Version; use serde::Deserialize; -use std::sync::Arc; +use super::search::PackageSearchApi; use crate::args::npm_registry_url; -use crate::file_fetcher::FileFetcher; +use crate::file_fetcher::CliFileFetcher; +use crate::file_fetcher::TextDecodedFile; use crate::npm::NpmFetchResolver; -use super::search::PackageSearchApi; - #[derive(Debug)] pub struct CliNpmSearchApi { - file_fetcher: Arc, + file_fetcher: Arc, resolver: NpmFetchResolver, search_cache: DashMap>>, versions_cache: DashMap>>, } impl CliNpmSearchApi { - pub fn new(file_fetcher: Arc) -> Self { + pub fn new(file_fetcher: Arc) -> Self { let resolver = NpmFetchResolver::new( file_fetcher.clone(), Arc::new(NpmRc::default().as_resolved(npm_registry_url()).unwrap()), @@ -57,10 +58,8 @@ impl PackageSearchApi for CliNpmSearchApi { .append_pair("text", &format!("{} boost-exact:false", query)); let file_fetcher = self.file_fetcher.clone(); let file = deno_core::unsync::spawn(async move { - file_fetcher - .fetch_bypass_permissions(&search_url) - .await? - .into_text_decoded() + let file = file_fetcher.fetch_bypass_permissions(&search_url).await?; + TextDecodedFile::decode(file) }) .await??; let names = Arc::new(parse_npm_search_response(&file.source)?); diff --git a/cli/lsp/parent_process_checker.rs b/cli/lsp/parent_process_checker.rs index b8a42cd1a4deb9..b8ab60922bd0e3 100644 --- a/cli/lsp/parent_process_checker.rs +++ b/cli/lsp/parent_process_checker.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::time::Duration; @@ -52,10 +52,12 @@ fn is_process_active(process_id: u32) -> bool { #[cfg(test)] mod test { - use super::is_process_active; use std::process::Command; + use test_util::deno_exe_path; + use super::is_process_active; + #[test] fn process_active() { // launch a long running process diff --git a/cli/lsp/path_to_regex.rs b/cli/lsp/path_to_regex.rs index 88d8a2ec68d94a..65322da6d036f5 100644 --- a/cli/lsp/path_to_regex.rs +++ b/cli/lsp/path_to_regex.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // The logic of this module is heavily influenced by path-to-regexp at: // https://github.com/pillarjs/path-to-regexp/ which is licensed as follows: @@ -26,15 +26,16 @@ // THE SOFTWARE. // +use std::collections::HashMap; +use std::fmt; +use std::fmt::Write as _; +use std::iter::Peekable; + use deno_core::anyhow::anyhow; use deno_core::error::AnyError; use fancy_regex::Regex as FancyRegex; use once_cell::sync::Lazy; use regex::Regex; -use std::collections::HashMap; -use std::fmt; -use std::fmt::Write as _; -use std::iter::Peekable; static ESCAPE_STRING_RE: Lazy = lazy_regex::lazy_regex!(r"([.+*?=^!:${}()\[\]|/\\])"); diff --git a/cli/lsp/performance.rs b/cli/lsp/performance.rs index b3dc53b283afb7..8d836c7adfb76c 100644 --- a/cli/lsp/performance.rs +++ b/cli/lsp/performance.rs @@ -1,9 +1,5 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use deno_core::parking_lot::Mutex; -use deno_core::serde::Deserialize; -use deno_core::serde::Serialize; -use deno_core::serde_json::json; use std::cmp; use std::collections::HashMap; use std::collections::VecDeque; @@ -12,6 +8,11 @@ use std::sync::Arc; use std::time::Duration; use std::time::Instant; +use deno_core::parking_lot::Mutex; +use deno_core::serde::Deserialize; +use deno_core::serde::Serialize; +use deno_core::serde_json::json; + use super::logging::lsp_debug; #[derive(Debug, Deserialize, Serialize, PartialEq, Eq)] diff --git a/cli/lsp/refactor.rs b/cli/lsp/refactor.rs index 82751d3b1285a5..e1abd963a2dafa 100644 --- a/cli/lsp/refactor.rs +++ b/cli/lsp/refactor.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // The logic of this module is heavily influenced by // https://github.com/microsoft/vscode/blob/main/extensions/typescript-language-features/src/languageFeatures/refactor.ts diff --git a/cli/lsp/registries.rs b/cli/lsp/registries.rs index ade353e6834a99..f8c38d97ea46a6 100644 --- a/cli/lsp/registries.rs +++ b/cli/lsp/registries.rs @@ -1,4 +1,25 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::borrow::Cow; +use std::collections::HashMap; +use std::path::PathBuf; +use std::sync::Arc; + +use deno_cache_dir::file_fetcher::CacheSetting; +use deno_core::anyhow::anyhow; +use deno_core::error::AnyError; +use deno_core::serde::Deserialize; +use deno_core::serde_json; +use deno_core::serde_json::json; +use deno_core::serde_json::Value; +use deno_core::url::ParseError; +use deno_core::url::Position; +use deno_core::url::Url; +use deno_core::ModuleSpecifier; +use deno_graph::Dependency; +use log::error; +use once_cell::sync::Lazy; +use tower_lsp::lsp_types as lsp; use super::completions::IMPORT_COMMIT_CHARS; use super::logging::lsp_log; @@ -11,33 +32,14 @@ use super::path_to_regex::Matcher; use super::path_to_regex::StringOrNumber; use super::path_to_regex::StringOrVec; use super::path_to_regex::Token; - -use crate::args::CacheSetting; use crate::cache::GlobalHttpCache; use crate::cache::HttpCache; +use crate::file_fetcher::CliFileFetcher; use crate::file_fetcher::FetchOptions; use crate::file_fetcher::FetchPermissionsOptionRef; -use crate::file_fetcher::FileFetcher; +use crate::file_fetcher::TextDecodedFile; use crate::http_util::HttpClientProvider; - -use deno_core::anyhow::anyhow; -use deno_core::error::AnyError; -use deno_core::serde::Deserialize; -use deno_core::serde_json; -use deno_core::serde_json::json; -use deno_core::serde_json::Value; -use deno_core::url::ParseError; -use deno_core::url::Position; -use deno_core::url::Url; -use deno_core::ModuleSpecifier; -use deno_graph::Dependency; -use log::error; -use once_cell::sync::Lazy; -use std::borrow::Cow; -use std::collections::HashMap; -use std::path::PathBuf; -use std::sync::Arc; -use tower_lsp::lsp_types as lsp; +use crate::sys::CliSys; const CONFIG_PATH: &str = "/.well-known/deno-import-intellisense.json"; const COMPONENT: &percent_encoding::AsciiSet = &percent_encoding::CONTROLS @@ -418,7 +420,7 @@ enum VariableItems { pub struct ModuleRegistry { origins: HashMap>, pub location: PathBuf, - pub file_fetcher: Arc, + pub file_fetcher: Arc, http_cache: Arc, } @@ -428,19 +430,18 @@ impl ModuleRegistry { http_client_provider: Arc, ) -> Self { // the http cache should always be the global one for registry completions - let http_cache = Arc::new(GlobalHttpCache::new( - location.clone(), - crate::cache::RealDenoCacheEnv, - )); - let mut file_fetcher = FileFetcher::new( + let http_cache = + Arc::new(GlobalHttpCache::new(CliSys::default(), location.clone())); + let file_fetcher = CliFileFetcher::new( http_cache.clone(), - CacheSetting::RespectHeaders, - true, http_client_provider, + CliSys::default(), Default::default(), None, + true, + CacheSetting::RespectHeaders, + super::logging::lsp_log_level(), ); - file_fetcher.set_download_log_level(super::logging::lsp_log_level()); Self { origins: HashMap::new(), @@ -479,13 +480,15 @@ impl ModuleRegistry { let specifier = specifier.clone(); async move { file_fetcher - .fetch_with_options(FetchOptions { - specifier: &specifier, - permissions: FetchPermissionsOptionRef::AllowAll, - maybe_auth: None, - maybe_accept: Some("application/vnd.deno.reg.v2+json, application/vnd.deno.reg.v1+json;q=0.9, application/json;q=0.8"), - maybe_cache_setting: None, - }) + .fetch_with_options( + &specifier, +FetchPermissionsOptionRef::AllowAll, + FetchOptions { + maybe_auth: None, + maybe_accept: Some("application/vnd.deno.reg.v2+json, application/vnd.deno.reg.v1+json;q=0.9, application/json;q=0.8"), + maybe_cache_setting: None, + } + ) .await } }).await?; @@ -500,7 +503,7 @@ impl ModuleRegistry { ); self.http_cache.set(specifier, headers_map, &[])?; } - let file = fetch_result?.into_text_decoded()?; + let file = TextDecodedFile::decode(fetch_result?)?; let config: RegistryConfigurationJson = serde_json::from_str(&file.source)?; validate_config(&config)?; Ok(config.registries) @@ -584,12 +587,11 @@ impl ModuleRegistry { // spawn due to the lsp's `Send` requirement let file = deno_core::unsync::spawn({ async move { - file_fetcher + let file = file_fetcher .fetch_bypass_permissions(&endpoint) .await - .ok()? - .into_text_decoded() - .ok() + .ok()?; + TextDecodedFile::decode(file).ok() } }) .await @@ -983,12 +985,11 @@ impl ModuleRegistry { let file_fetcher = self.file_fetcher.clone(); // spawn due to the lsp's `Send` requirement let file = deno_core::unsync::spawn(async move { - file_fetcher + let file = file_fetcher .fetch_bypass_permissions(&specifier) .await - .ok()? - .into_text_decoded() - .ok() + .ok()?; + TextDecodedFile::decode(file).ok() }) .await .ok()??; @@ -1049,7 +1050,7 @@ impl ModuleRegistry { let file_fetcher = self.file_fetcher.clone(); let specifier = specifier.clone(); async move { - file_fetcher + let file = file_fetcher .fetch_bypass_permissions(&specifier) .await .map_err(|err| { @@ -1058,9 +1059,8 @@ impl ModuleRegistry { specifier, err ); }) - .ok()? - .into_text_decoded() - .ok() + .ok()?; + TextDecodedFile::decode(file).ok() } }) .await @@ -1095,7 +1095,7 @@ impl ModuleRegistry { let file_fetcher = self.file_fetcher.clone(); let specifier = specifier.clone(); async move { - file_fetcher + let file = file_fetcher .fetch_bypass_permissions(&specifier) .await .map_err(|err| { @@ -1104,9 +1104,8 @@ impl ModuleRegistry { specifier, err ); }) - .ok()? - .into_text_decoded() - .ok() + .ok()?; + TextDecodedFile::decode(file).ok() } }) .await @@ -1129,9 +1128,10 @@ impl ModuleRegistry { #[cfg(test)] mod tests { - use super::*; use test_util::TempDir; + use super::*; + #[test] fn test_validate_registry_configuration() { assert!(validate_config(&RegistryConfigurationJson { diff --git a/cli/lsp/repl.rs b/cli/lsp/repl.rs index b4aaa8cd0d0594..a30427312d3741 100644 --- a/cli/lsp/repl.rs +++ b/cli/lsp/repl.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::collections::HashMap; diff --git a/cli/lsp/resolver.rs b/cli/lsp/resolver.rs index 4ede799227204f..51820432f776e0 100644 --- a/cli/lsp/resolver.rs +++ b/cli/lsp/resolver.rs @@ -1,7 +1,15 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::borrow::Cow; +use std::collections::BTreeMap; +use std::collections::BTreeSet; +use std::collections::HashMap; +use std::collections::HashSet; +use std::sync::Arc; use dashmap::DashMap; use deno_ast::MediaType; +use deno_cache_dir::file_fetcher::CacheSetting; use deno_cache_dir::npm::NpmCacheDir; use deno_cache_dir::HttpCache; use deno_config::deno_json::JsxImportSourceConfig; @@ -9,50 +17,40 @@ use deno_config::workspace::PackageJsonDepResolution; use deno_config::workspace::WorkspaceResolver; use deno_core::parking_lot::Mutex; use deno_core::url::Url; -use deno_graph::source::ResolutionMode; use deno_graph::GraphImport; use deno_graph::ModuleSpecifier; use deno_graph::Range; use deno_npm::NpmSystemInfo; -use deno_path_util::url_from_directory_path; use deno_path_util::url_to_file_path; +use deno_resolver::cjs::IsCjsResolutionMode; use deno_resolver::npm::NpmReqResolverOptions; use deno_resolver::DenoResolverOptions; use deno_resolver::NodeAndNpmReqResolver; -use deno_runtime::deno_fs; -use deno_runtime::deno_node::NodeResolver; -use deno_runtime::deno_node::PackageJson; -use deno_runtime::deno_node::PackageJsonResolver; +use deno_runtime::deno_node::RealIsBuiltInNodeModuleChecker; use deno_semver::jsr::JsrPackageReqReference; use deno_semver::npm::NpmPackageReqReference; use deno_semver::package::PackageNv; use deno_semver::package::PackageReq; use indexmap::IndexMap; -use node_resolver::errors::ClosestPkgJsonError; use node_resolver::InNpmPackageChecker; -use node_resolver::NodeModuleKind; -use node_resolver::NodeResolutionMode; -use std::borrow::Cow; -use std::collections::BTreeMap; -use std::collections::BTreeSet; -use std::collections::HashMap; -use std::collections::HashSet; -use std::sync::Arc; +use node_resolver::NodeResolutionKind; +use node_resolver::ResolutionMode; use super::cache::LspCache; -use super::documents::Document; use super::jsr::JsrCacheResolver; use crate::args::create_default_npmrc; -use crate::args::CacheSetting; use crate::args::CliLockfile; use crate::args::NpmInstallDepsProvider; -use crate::cache::DenoCacheEnvFsAdapter; use crate::factory::Deferred; +use crate::graph_util::to_node_resolution_kind; +use crate::graph_util::to_node_resolution_mode; use crate::graph_util::CliJsrUrlProvider; use crate::http_util::HttpClientProvider; use crate::lsp::config::Config; use crate::lsp::config::ConfigData; use crate::lsp::logging::lsp_warn; +use crate::node::CliNodeResolver; +use crate::node::CliPackageJsonResolver; use crate::npm::create_cli_npm_resolver_for_lsp; use crate::npm::CliByonmNpmResolverCreateOptions; use crate::npm::CliManagedInNpmPkgCheckerCreateOptions; @@ -63,14 +61,13 @@ use crate::npm::CliNpmResolverManagedSnapshotOption; use crate::npm::CreateInNpmPkgCheckerOptions; use crate::npm::ManagedCliNpmResolver; use crate::resolver::CliDenoResolver; -use crate::resolver::CliDenoResolverFs; use crate::resolver::CliNpmReqResolver; use crate::resolver::CliResolver; use crate::resolver::CliResolverOptions; use crate::resolver::IsCjsResolver; use crate::resolver::WorkerCliNpmGraphResolver; +use crate::sys::CliSys; use crate::tsc::into_specifier_and_media_type; -use crate::util::fs::canonicalize_path_maybe_not_exists; use crate::util::progress_bar::ProgressBar; use crate::util::progress_bar::ProgressBarStyle; @@ -78,11 +75,12 @@ use crate::util::progress_bar::ProgressBarStyle; struct LspScopeResolver { resolver: Arc, in_npm_pkg_checker: Arc, + is_cjs_resolver: Arc, jsr_resolver: Option>, npm_resolver: Option>, - node_resolver: Option>, + node_resolver: Option>, npm_pkg_req_resolver: Option>, - pkg_json_resolver: Arc, + pkg_json_resolver: Arc, redirect_resolver: Option>, graph_imports: Arc>, dep_info: Arc>>, @@ -96,6 +94,7 @@ impl Default for LspScopeResolver { Self { resolver: factory.cli_resolver().clone(), in_npm_pkg_checker: factory.in_npm_pkg_checker().clone(), + is_cjs_resolver: factory.is_cjs_resolver().clone(), jsr_resolver: None, npm_resolver: None, node_resolver: None, @@ -134,7 +133,8 @@ impl LspScopeResolver { cache.for_specifier(config_data.map(|d| d.scope.as_ref())), config_data.and_then(|d| d.lockfile.clone()), ))); - let npm_graph_resolver = cli_resolver.create_graph_npm_resolver(); + let npm_graph_resolver = cli_resolver + .create_graph_npm_resolver(crate::graph_util::NpmCachingStrategy::Eager); let maybe_jsx_import_source_config = config_data.and_then(|d| d.maybe_jsx_import_source_config()); let graph_imports = config_data @@ -146,7 +146,7 @@ impl LspScopeResolver { .map(|(referrer, imports)| { let resolver = SingleReferrerGraphResolver { valid_referrer: &referrer, - referrer_kind: NodeModuleKind::Esm, + module_resolution_mode: ResolutionMode::Import, cli_resolver: &cli_resolver, jsx_import_source_config: maybe_jsx_import_source_config .as_ref(), @@ -180,16 +180,16 @@ impl LspScopeResolver { &req_ref, &referrer, // todo(dsherret): this is wrong because it doesn't consider CJS referrers - NodeModuleKind::Esm, - NodeResolutionMode::Types, + ResolutionMode::Import, + NodeResolutionKind::Types, ) .or_else(|_| { npm_pkg_req_resolver.resolve_req_reference( &req_ref, &referrer, // todo(dsherret): this is wrong because it doesn't consider CJS referrers - NodeModuleKind::Esm, - NodeResolutionMode::Execution, + ResolutionMode::Import, + NodeResolutionKind::Execution, ) }) .ok()?, @@ -205,6 +205,7 @@ impl LspScopeResolver { Self { resolver: cli_resolver, in_npm_pkg_checker, + is_cjs_resolver: factory.is_cjs_resolver().clone(), jsr_resolver, npm_pkg_req_resolver, npm_resolver, @@ -228,6 +229,7 @@ impl LspScopeResolver { Arc::new(Self { resolver: factory.cli_resolver().clone(), in_npm_pkg_checker: factory.in_npm_pkg_checker().clone(), + is_cjs_resolver: factory.is_cjs_resolver().clone(), jsr_resolver: self.jsr_resolver.clone(), npm_pkg_req_resolver: factory.npm_pkg_req_resolver().cloned(), npm_resolver: factory.npm_resolver().cloned(), @@ -342,7 +344,17 @@ impl LspResolver { file_referrer: Option<&ModuleSpecifier>, ) -> WorkerCliNpmGraphResolver { let resolver = self.get_scope_resolver(file_referrer); - resolver.resolver.create_graph_npm_resolver() + resolver + .resolver + .create_graph_npm_resolver(crate::graph_util::NpmCachingStrategy::Eager) + } + + pub fn as_is_cjs_resolver( + &self, + file_referrer: Option<&ModuleSpecifier>, + ) -> &IsCjsResolver { + let resolver = self.get_scope_resolver(file_referrer); + resolver.is_cjs_resolver.as_ref() } pub fn as_config_data( @@ -369,6 +381,14 @@ impl LspResolver { resolver.npm_resolver.as_ref().and_then(|r| r.as_managed()) } + pub fn pkg_json_resolver( + &self, + referrer: &ModuleSpecifier, + ) -> &Arc { + let resolver = self.get_scope_resolver(Some(referrer)); + &resolver.pkg_json_resolver + } + pub fn graph_imports_by_referrer( &self, file_referrer: &ModuleSpecifier, @@ -424,7 +444,7 @@ impl LspResolver { &self, req_ref: &NpmPackageReqReference, referrer: &ModuleSpecifier, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, file_referrer: Option<&ModuleSpecifier>, ) -> Option<(ModuleSpecifier, MediaType)> { let resolver = self.get_scope_resolver(file_referrer); @@ -434,8 +454,8 @@ impl LspResolver { .resolve_req_reference( req_ref, referrer, - referrer_kind, - NodeResolutionMode::Types, + resolution_mode, + NodeResolutionKind::Types, ) .ok()?, ))) @@ -492,7 +512,7 @@ impl LspResolver { &self, specifier_text: &str, referrer: &ModuleSpecifier, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, ) -> bool { let resolver = self.get_scope_resolver(Some(referrer)); let Some(npm_pkg_req_resolver) = resolver.npm_pkg_req_resolver.as_ref() @@ -503,24 +523,14 @@ impl LspResolver { .resolve_if_for_npm_pkg( specifier_text, referrer, - referrer_kind, - NodeResolutionMode::Types, + resolution_mode, + NodeResolutionKind::Types, ) .ok() .flatten() .is_some() } - pub fn get_closest_package_json( - &self, - referrer: &ModuleSpecifier, - ) -> Result>, ClosestPkgJsonError> { - let resolver = self.get_scope_resolver(Some(referrer)); - resolver - .pkg_json_resolver - .get_closest_package_json(referrer) - } - pub fn resolve_redirects( &self, specifier: &ModuleSpecifier, @@ -581,28 +591,27 @@ pub struct ScopeDepInfo { struct ResolverFactoryServices { cli_resolver: Deferred>, in_npm_pkg_checker: Deferred>, - node_resolver: Deferred>>, + is_cjs_resolver: Deferred>, + node_resolver: Deferred>>, npm_pkg_req_resolver: Deferred>>, npm_resolver: Option>, } struct ResolverFactory<'a> { config_data: Option<&'a Arc>, - fs: Arc, - pkg_json_resolver: Arc, + pkg_json_resolver: Arc, + sys: CliSys, services: ResolverFactoryServices, } impl<'a> ResolverFactory<'a> { pub fn new(config_data: Option<&'a Arc>) -> Self { - let fs = Arc::new(deno_fs::RealFs); - let pkg_json_resolver = Arc::new(PackageJsonResolver::new( - deno_runtime::deno_node::DenoFsNodeResolverEnv::new(fs.clone()), - )); + let sys = CliSys::default(); + let pkg_json_resolver = Arc::new(CliPackageJsonResolver::new(sys.clone())); Self { config_data, - fs, pkg_json_resolver, + sys, services: Default::default(), } } @@ -613,9 +622,10 @@ impl<'a> ResolverFactory<'a> { cache: &LspCache, ) { let enable_byonm = self.config_data.map(|d| d.byonm).unwrap_or(false); + let sys = CliSys::default(); let options = if enable_byonm { CliNpmResolverCreateOptions::Byonm(CliByonmNpmResolverCreateOptions { - fs: CliDenoResolverFs(Arc::new(deno_fs::RealFs)), + sys, pkg_json_resolver: self.pkg_json_resolver.clone(), root_node_modules_dir: self.config_data.and_then(|config_data| { config_data.node_modules_dir.clone().or_else(|| { @@ -631,12 +641,14 @@ impl<'a> ResolverFactory<'a> { .and_then(|d| d.npmrc.clone()) .unwrap_or_else(create_default_npmrc); let npm_cache_dir = Arc::new(NpmCacheDir::new( - &DenoCacheEnvFsAdapter(self.fs.as_ref()), + &sys, cache.deno_dir().npm_folder_path(), npmrc.get_all_known_registries_urls(), )); CliNpmResolverCreateOptions::Managed(CliManagedNpmResolverCreateOptions { http_client_provider: http_client_provider.clone(), + // only used for top level install, so we can ignore this + npm_install_deps_provider: Arc::new(NpmInstallDepsProvider::empty()), snapshot: match self.config_data.and_then(|d| d.lockfile.as_ref()) { Some(lockfile) => { CliNpmResolverManagedSnapshotOption::ResolveFromLockfile( @@ -645,10 +657,7 @@ impl<'a> ResolverFactory<'a> { } None => CliNpmResolverManagedSnapshotOption::Specified(None), }, - // Don't provide the lockfile. We don't want these resolvers - // updating it. Only the cache request should update the lockfile. - maybe_lockfile: None, - fs: Arc::new(deno_fs::RealFs), + sys: CliSys::default(), npm_cache_dir, // Use an "only" cache setting in order to make the // user do an explicit "cache" command and prevent @@ -656,11 +665,12 @@ impl<'a> ResolverFactory<'a> { // the user is typing. cache_setting: CacheSetting::Only, text_only_progress_bar: ProgressBar::new(ProgressBarStyle::TextOnly), + // Don't provide the lockfile. We don't want these resolvers + // updating it. Only the cache request should update the lockfile. + maybe_lockfile: None, maybe_node_modules_path: self .config_data .and_then(|d| d.node_modules_dir.clone()), - // only used for top level install, so we can ignore this - npm_install_deps_provider: Arc::new(NpmInstallDepsProvider::empty()), npmrc, npm_system_info: NpmSystemInfo::default(), lifecycle_scripts: Default::default(), @@ -720,7 +730,7 @@ impl<'a> ResolverFactory<'a> { }) } - pub fn pkg_json_resolver(&self) -> &Arc { + pub fn pkg_json_resolver(&self) -> &Arc { &self.pkg_json_resolver } @@ -744,17 +754,35 @@ impl<'a> ResolverFactory<'a> { }) } - pub fn node_resolver(&self) -> Option<&Arc> { + pub fn is_cjs_resolver(&self) -> &Arc { + self.services.is_cjs_resolver.get_or_init(|| { + Arc::new(IsCjsResolver::new( + self.in_npm_pkg_checker().clone(), + self.pkg_json_resolver().clone(), + if self + .config_data + .is_some_and(|d| d.unstable.contains("detect-cjs")) + { + IsCjsResolutionMode::ImplicitTypeCommonJs + } else { + IsCjsResolutionMode::ExplicitTypeCommonJs + }, + )) + }) + } + + pub fn node_resolver(&self) -> Option<&Arc> { self .services .node_resolver .get_or_init(|| { let npm_resolver = self.services.npm_resolver.as_ref()?; - Some(Arc::new(NodeResolver::new( - deno_runtime::deno_node::DenoFsNodeResolverEnv::new(self.fs.clone()), + Some(Arc::new(CliNodeResolver::new( self.in_npm_pkg_checker().clone(), + RealIsBuiltInNodeModuleChecker, npm_resolver.clone().into_npm_pkg_folder_resolver(), self.pkg_json_resolver.clone(), + self.sys.clone(), ))) }) .as_ref() @@ -769,10 +797,10 @@ impl<'a> ResolverFactory<'a> { let npm_resolver = self.npm_resolver()?; Some(Arc::new(CliNpmReqResolver::new(NpmReqResolverOptions { byonm_resolver: (npm_resolver.clone()).into_maybe_byonm(), - fs: CliDenoResolverFs(self.fs.clone()), in_npm_pkg_checker: self.in_npm_pkg_checker().clone(), node_resolver: node_resolver.clone(), npm_req_resolver: npm_resolver.clone().into_npm_req_resolver(), + sys: self.sys.clone(), }))) }) .as_ref() @@ -803,99 +831,10 @@ impl std::fmt::Debug for RedirectResolver { } } -#[derive(Debug)] -pub struct LspIsCjsResolver { - inner: IsCjsResolver, -} - -impl Default for LspIsCjsResolver { - fn default() -> Self { - LspIsCjsResolver::new(&Default::default()) - } -} - -impl LspIsCjsResolver { - pub fn new(cache: &LspCache) -> Self { - #[derive(Debug)] - struct LspInNpmPackageChecker { - global_cache_dir: ModuleSpecifier, - } - - impl LspInNpmPackageChecker { - pub fn new(cache: &LspCache) -> Self { - let npm_folder_path = cache.deno_dir().npm_folder_path(); - Self { - global_cache_dir: url_from_directory_path( - &canonicalize_path_maybe_not_exists(&npm_folder_path) - .unwrap_or(npm_folder_path), - ) - .unwrap_or_else(|_| { - ModuleSpecifier::parse("file:///invalid/").unwrap() - }), - } - } - } - - impl InNpmPackageChecker for LspInNpmPackageChecker { - fn in_npm_package(&self, specifier: &ModuleSpecifier) -> bool { - if specifier.scheme() != "file" { - return false; - } - if specifier - .as_str() - .starts_with(self.global_cache_dir.as_str()) - { - return true; - } - specifier.as_str().contains("/node_modules/") - } - } - - let fs = Arc::new(deno_fs::RealFs); - let pkg_json_resolver = Arc::new(PackageJsonResolver::new( - deno_runtime::deno_node::DenoFsNodeResolverEnv::new(fs.clone()), - )); - - LspIsCjsResolver { - inner: IsCjsResolver::new( - Arc::new(LspInNpmPackageChecker::new(cache)), - pkg_json_resolver, - crate::resolver::IsCjsResolverOptions { - detect_cjs: true, - is_node_main: false, - }, - ), - } - } - - pub fn get_maybe_doc_module_kind( - &self, - specifier: &ModuleSpecifier, - maybe_document: Option<&Document>, - ) -> NodeModuleKind { - self.get_lsp_referrer_kind( - specifier, - maybe_document.and_then(|d| d.is_script()), - ) - } - - pub fn get_doc_module_kind(&self, document: &Document) -> NodeModuleKind { - self.get_lsp_referrer_kind(document.specifier(), document.is_script()) - } - - pub fn get_lsp_referrer_kind( - &self, - specifier: &ModuleSpecifier, - is_script: Option, - ) -> NodeModuleKind { - self.inner.get_lsp_referrer_kind(specifier, is_script) - } -} - #[derive(Debug)] pub struct SingleReferrerGraphResolver<'a> { pub valid_referrer: &'a ModuleSpecifier, - pub referrer_kind: NodeModuleKind, + pub module_resolution_mode: ResolutionMode, pub cli_resolver: &'a CliResolver, pub jsx_import_source_config: Option<&'a JsxImportSourceConfig>, } @@ -924,16 +863,20 @@ impl<'a> deno_graph::source::Resolver for SingleReferrerGraphResolver<'a> { &self, specifier_text: &str, referrer_range: &Range, - mode: ResolutionMode, + resolution_kind: deno_graph::source::ResolutionKind, ) -> Result { // this resolver assumes it will only be used with a single referrer // with the provided referrer kind debug_assert_eq!(referrer_range.specifier, *self.valid_referrer); self.cli_resolver.resolve( specifier_text, - referrer_range, - self.referrer_kind, - mode, + &referrer_range.specifier, + referrer_range.range.start, + referrer_range + .resolution_mode + .map(to_node_resolution_mode) + .unwrap_or(self.module_resolution_mode), + to_node_resolution_kind(resolution_kind), ) } } @@ -1001,9 +944,7 @@ impl RedirectResolver { if chain.len() > 10 { break None; } - let Ok(target) = - deno_core::resolve_import(location, specifier.as_str()) - else { + let Ok(target) = specifier.join(location) else { break None; }; chain.push(( diff --git a/cli/lsp/search.rs b/cli/lsp/search.rs index 8933eeb186430b..281542742d42f6 100644 --- a/cli/lsp/search.rs +++ b/cli/lsp/search.rs @@ -1,9 +1,10 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::sync::Arc; use deno_core::error::AnyError; use deno_semver::package::PackageNv; use deno_semver::Version; -use std::sync::Arc; #[async_trait::async_trait] pub trait PackageSearchApi { @@ -15,10 +16,12 @@ pub trait PackageSearchApi { #[cfg(test)] pub mod tests { - use super::*; - use deno_core::anyhow::anyhow; use std::collections::BTreeMap; + use deno_core::anyhow::anyhow; + + use super::*; + #[derive(Debug, Default)] pub struct TestPackageSearchApi { /// [(name -> [(version -> [export])])] @@ -67,7 +70,9 @@ pub mod tests { &self, nv: &PackageNv, ) -> Result>, AnyError> { - let Some(exports_by_version) = self.package_versions.get(&nv.name) else { + let Some(exports_by_version) = + self.package_versions.get(nv.name.as_str()) + else { return Err(anyhow!("Package not found.")); }; let Some(exports) = exports_by_version.get(&nv.version) else { diff --git a/cli/lsp/semantic_tokens.rs b/cli/lsp/semantic_tokens.rs index 0cf154d0ff71d4..d2466f4c1479af 100644 --- a/cli/lsp/semantic_tokens.rs +++ b/cli/lsp/semantic_tokens.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // The logic of this module is heavily influenced by // https://github.com/microsoft/vscode/blob/main/extensions/typescript-language-features/src/languageFeatures/semanticTokens.ts @@ -7,6 +7,7 @@ use std::ops::Index; use std::ops::IndexMut; + use tower_lsp::lsp_types as lsp; use tower_lsp::lsp_types::SemanticToken; use tower_lsp::lsp_types::SemanticTokenModifier; diff --git a/cli/lsp/testing/collectors.rs b/cli/lsp/testing/collectors.rs index 2dd7ec0d96d342..8a36ca1f25bfd3 100644 --- a/cli/lsp/testing/collectors.rs +++ b/cli/lsp/testing/collectors.rs @@ -1,8 +1,7 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::lsp::analysis::source_range_to_lsp_range; - -use super::definitions::TestModule; +use std::collections::HashMap; +use std::collections::HashSet; use deno_ast::swc::ast; use deno_ast::swc::visit::Visit; @@ -11,10 +10,11 @@ use deno_ast::SourceRangedForSpanned; use deno_ast::SourceTextInfo; use deno_core::ModuleSpecifier; use lsp::Range; -use std::collections::HashMap; -use std::collections::HashSet; use tower_lsp::lsp_types as lsp; +use super::definitions::TestModule; +use crate::lsp::analysis::source_range_to_lsp_range; + /// Parse an arrow expression for any test steps and return them. fn visit_arrow( arrow_expr: &ast::ArrowExpr, @@ -626,12 +626,12 @@ impl Visit for TestCollector { #[cfg(test)] pub mod tests { - use crate::lsp::testing::definitions::TestDefinition; - - use super::*; use deno_core::resolve_url; use lsp::Position; + use super::*; + use crate::lsp::testing::definitions::TestDefinition; + pub fn new_range(l1: u32, c1: u32, l2: u32, c2: u32) -> Range { Range::new(Position::new(l1, c1), Position::new(l2, c2)) } diff --git a/cli/lsp/testing/definitions.rs b/cli/lsp/testing/definitions.rs index f23411852fd5a0..8277dcbf008091 100644 --- a/cli/lsp/testing/definitions.rs +++ b/cli/lsp/testing/definitions.rs @@ -1,8 +1,15 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::collections::HashMap; +use std::collections::HashSet; + +use deno_core::error::AnyError; +use deno_core::ModuleSpecifier; +use lsp::Range; +use tower_lsp::lsp_types as lsp; use super::lsp_custom; use super::lsp_custom::TestData; - use crate::lsp::client::TestingNotification; use crate::lsp::logging::lsp_warn; use crate::lsp::urls::url_to_uri; @@ -10,13 +17,6 @@ use crate::tools::test::TestDescription; use crate::tools::test::TestStepDescription; use crate::util::checksum; -use deno_core::error::AnyError; -use deno_core::ModuleSpecifier; -use lsp::Range; -use std::collections::HashMap; -use std::collections::HashSet; -use tower_lsp::lsp_types as lsp; - #[derive(Debug, Clone, PartialEq)] pub struct TestDefinition { pub id: String, diff --git a/cli/lsp/testing/execution.rs b/cli/lsp/testing/execution.rs index 88fb496e4eccda..3d6d6f6b734a5c 100644 --- a/cli/lsp/testing/execution.rs +++ b/cli/lsp/testing/execution.rs @@ -1,10 +1,34 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::borrow::Cow; +use std::collections::HashMap; +use std::collections::HashSet; +use std::num::NonZeroUsize; +use std::sync::Arc; +use std::time::Duration; +use std::time::Instant; + +use deno_core::anyhow::anyhow; +use deno_core::error::AnyError; +use deno_core::error::JsError; +use deno_core::futures::future; +use deno_core::futures::stream; +use deno_core::futures::StreamExt; +use deno_core::parking_lot::RwLock; +use deno_core::unsync::spawn; +use deno_core::unsync::spawn_blocking; +use deno_core::ModuleSpecifier; +use deno_runtime::deno_permissions::Permissions; +use deno_runtime::deno_permissions::PermissionsContainer; +use deno_runtime::tokio_util::create_and_run_current_thread; +use indexmap::IndexMap; +use tokio_util::sync::CancellationToken; +use tower_lsp::lsp_types as lsp; use super::definitions::TestDefinition; use super::definitions::TestModule; use super::lsp_custom; use super::server::TestServerTests; - use crate::args::flags_from_vec; use crate::args::DenoSubcommand; use crate::factory::CliFactory; @@ -20,30 +44,6 @@ use crate::tools::test::create_test_event_channel; use crate::tools::test::FailFastTracker; use crate::tools::test::TestFailureFormatOptions; -use deno_core::anyhow::anyhow; -use deno_core::error::AnyError; -use deno_core::error::JsError; -use deno_core::futures::future; -use deno_core::futures::stream; -use deno_core::futures::StreamExt; -use deno_core::parking_lot::RwLock; -use deno_core::unsync::spawn; -use deno_core::unsync::spawn_blocking; -use deno_core::ModuleSpecifier; -use deno_runtime::deno_permissions::Permissions; -use deno_runtime::deno_permissions::PermissionsContainer; -use deno_runtime::tokio_util::create_and_run_current_thread; -use indexmap::IndexMap; -use std::borrow::Cow; -use std::collections::HashMap; -use std::collections::HashSet; -use std::num::NonZeroUsize; -use std::sync::Arc; -use std::time::Duration; -use std::time::Instant; -use tokio_util::sync::CancellationToken; -use tower_lsp::lsp_types as lsp; - /// Logic to convert a test request into a set of test modules to be tested and /// any filters to be applied to those tests fn as_queue_and_filters( @@ -794,9 +794,10 @@ impl LspTestReporter { #[cfg(test)] mod tests { + use deno_core::serde_json::json; + use super::*; use crate::lsp::testing::collectors::tests::new_range; - use deno_core::serde_json::json; #[test] fn test_as_queue_and_filters() { diff --git a/cli/lsp/testing/lsp_custom.rs b/cli/lsp/testing/lsp_custom.rs index 84ac30de579e72..5ee6e84f52b876 100644 --- a/cli/lsp/testing/lsp_custom.rs +++ b/cli/lsp/testing/lsp_custom.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_core::serde::Deserialize; use deno_core::serde::Serialize; diff --git a/cli/lsp/testing/mod.rs b/cli/lsp/testing/mod.rs index d285481f06b9c4..1398ba1eca1161 100644 --- a/cli/lsp/testing/mod.rs +++ b/cli/lsp/testing/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. mod collectors; mod definitions; diff --git a/cli/lsp/testing/server.rs b/cli/lsp/testing/server.rs index c9c39d9ffc4d9e..e0570fcada11dc 100644 --- a/cli/lsp/testing/server.rs +++ b/cli/lsp/testing/server.rs @@ -1,16 +1,9 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use super::definitions::TestModule; -use super::execution::TestRun; -use super::lsp_custom; - -use crate::lsp::client::Client; -use crate::lsp::client::TestingNotification; -use crate::lsp::config; -use crate::lsp::documents::DocumentsFilter; -use crate::lsp::language_server::StateSnapshot; -use crate::lsp::performance::Performance; -use crate::lsp::urls::url_to_uri; +use std::collections::HashMap; +use std::collections::HashSet; +use std::sync::Arc; +use std::thread; use deno_core::error::AnyError; use deno_core::parking_lot::Mutex; @@ -18,15 +11,22 @@ use deno_core::serde_json::json; use deno_core::serde_json::Value; use deno_core::ModuleSpecifier; use deno_runtime::tokio_util::create_basic_runtime; -use std::collections::HashMap; -use std::collections::HashSet; -use std::sync::Arc; -use std::thread; use tokio::sync::mpsc; use tower_lsp::jsonrpc::Error as LspError; use tower_lsp::jsonrpc::Result as LspResult; use tower_lsp::lsp_types as lsp; +use super::definitions::TestModule; +use super::execution::TestRun; +use super::lsp_custom; +use crate::lsp::client::Client; +use crate::lsp::client::TestingNotification; +use crate::lsp::config; +use crate::lsp::documents::DocumentsFilter; +use crate::lsp::language_server::StateSnapshot; +use crate::lsp::performance::Performance; +use crate::lsp::urls::url_to_uri; + fn as_delete_notification( url: &ModuleSpecifier, ) -> Result { diff --git a/cli/lsp/text.rs b/cli/lsp/text.rs index 88f27915bb0f56..a9a5f0753af25b 100644 --- a/cli/lsp/text.rs +++ b/cli/lsp/text.rs @@ -1,10 +1,11 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::collections::HashMap; use deno_core::error::custom_error; use deno_core::error::AnyError; use dissimilar::diff; use dissimilar::Chunk; -use std::collections::HashMap; use text_size::TextRange; use text_size::TextSize; use tower_lsp::jsonrpc; diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs index fc7ff57948abcc..d2b501a539a1dc 100644 --- a/cli/lsp/tsc.rs +++ b/cli/lsp/tsc.rs @@ -1,52 +1,29 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use super::analysis::CodeActionData; -use super::code_lens; -use super::config; -use super::config::LspTsConfig; -use super::documents::AssetOrDocument; -use super::documents::Document; -use super::documents::DocumentsFilter; -use super::language_server; -use super::language_server::StateSnapshot; -use super::performance::Performance; -use super::performance::PerformanceMark; -use super::refactor::RefactorCodeActionData; -use super::refactor::ALL_KNOWN_REFACTOR_ACTION_KINDS; -use super::refactor::EXTRACT_CONSTANT; -use super::refactor::EXTRACT_INTERFACE; -use super::refactor::EXTRACT_TYPE; -use super::semantic_tokens; -use super::semantic_tokens::SemanticTokensBuilder; -use super::text::LineIndex; -use super::urls::uri_to_url; -use super::urls::url_to_uri; -use super::urls::INVALID_SPECIFIER; -use super::urls::INVALID_URI; - -use crate::args::jsr_url; -use crate::args::FmtOptionsConfig; -use crate::lsp::logging::lsp_warn; -use crate::tsc; -use crate::tsc::ResolveArgs; -use crate::tsc::MISSING_DEPENDENCY_SPECIFIER; -use crate::util::path::relative_specifier; -use crate::util::path::to_percent_decoded_str; -use crate::util::result::InfallibleResultExt; -use crate::util::v8::convert; -use crate::worker::create_isolate_create_params; -use deno_core::convert::Smi; -use deno_core::convert::ToV8; -use deno_core::error::StdAnyError; -use deno_core::futures::stream::FuturesOrdered; -use deno_core::futures::StreamExt; +use std::cell::RefCell; +use std::cmp; +use std::collections::BTreeMap; +use std::collections::HashMap; +use std::collections::HashSet; +use std::convert::Infallible; +use std::net::SocketAddr; +use std::ops::Range; +use std::path::Path; +use std::rc::Rc; +use std::sync::Arc; +use std::thread; use dashmap::DashMap; use deno_ast::MediaType; use deno_core::anyhow::anyhow; use deno_core::anyhow::Context as _; +use deno_core::convert::Smi; +use deno_core::convert::ToV8; use deno_core::error::AnyError; +use deno_core::error::StdAnyError; +use deno_core::futures::stream::FuturesOrdered; use deno_core::futures::FutureExt; +use deno_core::futures::StreamExt; use deno_core::op2; use deno_core::parking_lot::Mutex; use deno_core::resolve_url; @@ -64,30 +41,19 @@ use deno_core::OpState; use deno_core::PollEventLoopOptions; use deno_core::RuntimeOptions; use deno_path_util::url_to_file_path; +use deno_runtime::deno_node::SUPPORTED_BUILTIN_NODE_MODULES; use deno_runtime::inspector_server::InspectorServer; use deno_runtime::tokio_util::create_basic_runtime; use indexmap::IndexMap; use indexmap::IndexSet; use lazy_regex::lazy_regex; use log::error; -use node_resolver::NodeModuleKind; +use node_resolver::ResolutionMode; use once_cell::sync::Lazy; use regex::Captures; use regex::Regex; use serde_repr::Deserialize_repr; use serde_repr::Serialize_repr; -use std::cell::RefCell; -use std::cmp; -use std::collections::BTreeMap; -use std::collections::HashMap; -use std::collections::HashSet; -use std::convert::Infallible; -use std::net::SocketAddr; -use std::ops::Range; -use std::path::Path; -use std::rc::Rc; -use std::sync::Arc; -use std::thread; use text_size::TextRange; use text_size::TextSize; use tokio::sync::mpsc; @@ -98,6 +64,41 @@ use tower_lsp::jsonrpc::Error as LspError; use tower_lsp::jsonrpc::Result as LspResult; use tower_lsp::lsp_types as lsp; +use super::analysis::CodeActionData; +use super::code_lens; +use super::config; +use super::config::LspTsConfig; +use super::documents::AssetOrDocument; +use super::documents::Document; +use super::documents::DocumentsFilter; +use super::language_server; +use super::language_server::StateSnapshot; +use super::performance::Performance; +use super::performance::PerformanceMark; +use super::refactor::RefactorCodeActionData; +use super::refactor::ALL_KNOWN_REFACTOR_ACTION_KINDS; +use super::refactor::EXTRACT_CONSTANT; +use super::refactor::EXTRACT_INTERFACE; +use super::refactor::EXTRACT_TYPE; +use super::semantic_tokens; +use super::semantic_tokens::SemanticTokensBuilder; +use super::text::LineIndex; +use super::urls::uri_to_url; +use super::urls::url_to_uri; +use super::urls::INVALID_SPECIFIER; +use super::urls::INVALID_URI; +use crate::args::jsr_url; +use crate::args::FmtOptionsConfig; +use crate::lsp::logging::lsp_warn; +use crate::tsc; +use crate::tsc::ResolveArgs; +use crate::tsc::MISSING_DEPENDENCY_SPECIFIER; +use crate::util::path::relative_specifier; +use crate::util::path::to_percent_decoded_str; +use crate::util::result::InfallibleResultExt; +use crate::util::v8::convert; +use crate::worker::create_isolate_create_params; + static BRACKET_ACCESSOR_RE: Lazy = lazy_regex!(r#"^\[['"](.+)[\['"]\]$"#); static CAPTION_RE: Lazy = @@ -1297,16 +1298,10 @@ impl TsServer { { // When an LSP request is cancelled by the client, the future this is being // executed under and any local variables here will be dropped at the next - // await point. To pass on that cancellation to the TS thread, we make this - // wrapper which cancels the request's token on drop. - struct DroppableToken(CancellationToken); - impl Drop for DroppableToken { - fn drop(&mut self) { - self.0.cancel(); - } - } + // await point. To pass on that cancellation to the TS thread, we use drop_guard + // which cancels the request's token on drop. let token = token.child_token(); - let droppable_token = DroppableToken(token.clone()); + let droppable_token = token.clone().drop_guard(); let (tx, mut rx) = oneshot::channel::>(); let change = self.pending_change.lock().take(); @@ -1320,7 +1315,7 @@ impl TsServer { tokio::select! { value = &mut rx => { let value = value??; - drop(droppable_token); + droppable_token.disarm(); Ok(serde_json::from_str(&value)?) } _ = token.cancelled() => { @@ -3417,15 +3412,23 @@ fn parse_code_actions( additional_text_edits.extend(change.text_changes.iter().map(|tc| { let mut text_edit = tc.as_text_edit(asset_or_doc.line_index()); if let Some(specifier_rewrite) = &data.specifier_rewrite { - text_edit.new_text = text_edit.new_text.replace( - &specifier_rewrite.old_specifier, - &specifier_rewrite.new_specifier, - ); + let specifier_index = text_edit + .new_text + .char_indices() + .find_map(|(b, c)| (c == '\'' || c == '"').then_some(b)); + if let Some(i) = specifier_index { + let mut specifier_part = text_edit.new_text.split_off(i); + specifier_part = specifier_part.replace( + &specifier_rewrite.old_specifier, + &specifier_rewrite.new_specifier, + ); + text_edit.new_text.push_str(&specifier_part); + } if let Some(deno_types_specifier) = &specifier_rewrite.new_deno_types_specifier { text_edit.new_text = format!( - "// @deno-types=\"{}\"\n{}", + "// @ts-types=\"{}\"\n{}", deno_types_specifier, &text_edit.new_text ); } @@ -3593,17 +3596,22 @@ impl CompletionEntryDetails { &mut insert_replace_edit.new_text } }; - *new_text = new_text.replace( - &specifier_rewrite.old_specifier, - &specifier_rewrite.new_specifier, - ); + let specifier_index = new_text + .char_indices() + .find_map(|(b, c)| (c == '\'' || c == '"').then_some(b)); + if let Some(i) = specifier_index { + let mut specifier_part = new_text.split_off(i); + specifier_part = specifier_part.replace( + &specifier_rewrite.old_specifier, + &specifier_rewrite.new_specifier, + ); + new_text.push_str(&specifier_part); + } if let Some(deno_types_specifier) = &specifier_rewrite.new_deno_types_specifier { - *new_text = format!( - "// @deno-types=\"{}\"\n{}", - deno_types_specifier, new_text - ); + *new_text = + format!("// @ts-types=\"{}\"\n{}", deno_types_specifier, new_text); } } } @@ -3737,7 +3745,7 @@ pub struct CompletionItemData { #[serde(rename_all = "camelCase")] struct CompletionEntryDataAutoImport { module_specifier: String, - file_name: String, + file_name: Option, } #[derive(Debug)] @@ -3794,9 +3802,20 @@ impl CompletionEntry { else { return; }; - if let Ok(normalized) = specifier_map.normalize(&raw.file_name) { - self.auto_import_data = - Some(CompletionNormalizedAutoImportData { raw, normalized }); + if let Some(file_name) = &raw.file_name { + if let Ok(normalized) = specifier_map.normalize(file_name) { + self.auto_import_data = + Some(CompletionNormalizedAutoImportData { raw, normalized }); + } + } else if SUPPORTED_BUILTIN_NODE_MODULES + .contains(&raw.module_specifier.as_str()) + { + if let Ok(normalized) = + resolve_url(&format!("node:{}", &raw.module_specifier)) + { + self.auto_import_data = + Some(CompletionNormalizedAutoImportData { raw, normalized }); + } } } @@ -4449,16 +4468,12 @@ fn op_load<'s>( version: state.script_version(&specifier), is_cjs: doc .document() - .map(|d| state.state_snapshot.is_cjs_resolver.get_doc_module_kind(d)) - .unwrap_or(NodeModuleKind::Esm) - == NodeModuleKind::Cjs, + .map(|d| d.resolution_mode()) + .unwrap_or(ResolutionMode::Import) + == ResolutionMode::Require, }) }; - - lsp_warn!("op_load {} {}", &specifier, maybe_load_response.is_some()); - let serialized = serde_v8::to_v8(scope, maybe_load_response)?; - state.performance.measure(mark); Ok(serialized) } @@ -4483,17 +4498,9 @@ fn op_release( fn op_resolve( state: &mut OpState, #[string] base: String, - is_base_cjs: bool, - #[serde] specifiers: Vec, + #[serde] specifiers: Vec<(bool, String)>, ) -> Result>, AnyError> { - op_resolve_inner( - state, - ResolveArgs { - base, - is_base_cjs, - specifiers, - }, - ) + op_resolve_inner(state, ResolveArgs { base, specifiers }) } struct TscRequestArray { @@ -4516,6 +4523,7 @@ impl<'a> ToV8<'a> for TscRequestArray { let method_name = deno_core::FastString::from_static(method_name) .v8_string(scope) + .unwrap() .into(); let args = args.unwrap_or_else(|| v8::Array::new(scope, 0).into()); let scope_url = serde_v8::to_v8(scope, self.scope) @@ -4696,10 +4704,7 @@ fn op_script_names(state: &mut OpState) -> ScriptNames { let (types, _) = documents.resolve_dependency( types, specifier, - state - .state_snapshot - .is_cjs_resolver - .get_doc_module_kind(doc), + doc.resolution_mode(), doc.file_referrer(), )?; let types_doc = documents.get_or_load(&types, doc.file_referrer())?; @@ -5536,9 +5541,11 @@ impl TscRequest { #[cfg(test)] mod tests { + use pretty_assertions::assert_eq; + use test_util::TempDir; + use super::*; use crate::cache::HttpCache; - use crate::http_util::HeadersMap; use crate::lsp::cache::LspCache; use crate::lsp::config::Config; use crate::lsp::config::WorkspaceSettings; @@ -5546,8 +5553,6 @@ mod tests { use crate::lsp::documents::LanguageId; use crate::lsp::resolver::LspResolver; use crate::lsp::text::LineIndex; - use pretty_assertions::assert_eq; - use test_util::TempDir; async fn setup( ts_config: Value, @@ -5583,7 +5588,6 @@ mod tests { documents: Arc::new(documents), assets: Default::default(), config: Arc::new(config), - is_cjs_resolver: Default::default(), resolver, }); let performance = Arc::new(Performance::default()); @@ -5609,7 +5613,7 @@ mod tests { let (_tx, rx) = mpsc::unbounded_channel(); let state = State::new(state_snapshot, Default::default(), Default::default(), rx); - let mut op_state = OpState::new(None); + let mut op_state = OpState::new(None, None); op_state.put(state); op_state } @@ -5769,6 +5773,7 @@ mod tests { "sourceLine": " import { A } from \".\";", "category": 2, "code": 6133, + "reportsUnnecessary": true, }] }) ); @@ -5851,6 +5856,7 @@ mod tests { "sourceLine": " import {", "category": 2, "code": 6192, + "reportsUnnecessary": true, }, { "start": { "line": 8, @@ -5974,7 +5980,7 @@ mod tests { .global() .set( &specifier_dep, - HeadersMap::default(), + Default::default(), b"export const b = \"b\";\n", ) .unwrap(); @@ -6013,7 +6019,7 @@ mod tests { .global() .set( &specifier_dep, - HeadersMap::default(), + Default::default(), b"export const b = \"b\";\n\nexport const a = \"b\";\n", ) .unwrap(); @@ -6434,8 +6440,7 @@ mod tests { &mut state, ResolveArgs { base: temp_dir.url().join("a.ts").unwrap().to_string(), - is_base_cjs: false, - specifiers: vec!["./b.ts".to_string()], + specifiers: vec![(false, "./b.ts".to_string())], }, ) .unwrap(); diff --git a/cli/lsp/urls.rs b/cli/lsp/urls.rs index 6c7da4f1343d6f..91c04f11c0e78b 100644 --- a/cli/lsp/urls.rs +++ b/cli/lsp/urls.rs @@ -1,4 +1,8 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::collections::HashMap; +use std::str::FromStr; +use std::sync::Arc; use deno_ast::MediaType; use deno_core::error::AnyError; @@ -8,9 +12,6 @@ use deno_core::url::Url; use deno_core::ModuleSpecifier; use lsp_types::Uri; use once_cell::sync::Lazy; -use std::collections::HashMap; -use std::str::FromStr; -use std::sync::Arc; use super::cache::LspCache; use super::logging::lsp_warn; @@ -307,9 +308,10 @@ fn file_like_to_file_specifier(specifier: &Url) -> Option { #[cfg(test)] mod tests { - use super::*; use deno_core::resolve_url; + use super::*; + #[test] fn test_hash_data_specifier() { let fixture = resolve_url("data:application/typescript;base64,ZXhwb3J0IGNvbnN0IGEgPSAiYSI7CgpleHBvcnQgZW51bSBBIHsKICBBLAogIEIsCiAgQywKfQo=").unwrap(); diff --git a/cli/main.rs b/cli/main.rs index 7d3ef0e6a0563a..2e55d9d28646f9 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -1,7 +1,6 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. mod args; -mod auth_tokens; mod cache; mod cdp; mod emit; @@ -21,6 +20,7 @@ mod ops; mod resolver; mod shared; mod standalone; +mod sys; mod task_runner; mod tools; mod tsc; @@ -28,37 +28,37 @@ mod util; mod version; mod worker; -use crate::args::flags_from_vec; -use crate::args::DenoSubcommand; -use crate::args::Flags; -use crate::util::display; -use crate::util::v8::get_v8_flags_from_env; -use crate::util::v8::init_v8_flags; +use std::env; +use std::future::Future; +use std::io::IsTerminal; +use std::ops::Deref; +use std::path::PathBuf; +use std::sync::Arc; use args::TaskFlags; -use deno_resolver::npm::ByonmResolvePkgFolderFromDenoReqError; -use deno_resolver::npm::ResolvePkgFolderFromDenoReqError; -use deno_runtime::WorkerExecutionMode; -pub use deno_runtime::UNSTABLE_GRANULAR_FLAGS; - use deno_core::anyhow::Context; use deno_core::error::AnyError; use deno_core::error::JsError; use deno_core::futures::FutureExt; use deno_core::unsync::JoinHandle; use deno_npm::resolution::SnapshotFromLockfileError; +use deno_resolver::npm::ByonmResolvePkgFolderFromDenoReqError; +use deno_resolver::npm::ResolvePkgFolderFromDenoReqError; use deno_runtime::fmt_errors::format_js_error; use deno_runtime::tokio_util::create_and_run_current_thread_with_maybe_metrics; +use deno_runtime::WorkerExecutionMode; +pub use deno_runtime::UNSTABLE_GRANULAR_FLAGS; use deno_terminal::colors; use factory::CliFactory; use standalone::MODULE_NOT_FOUND; use standalone::UNSUPPORTED_SCHEME; -use std::env; -use std::future::Future; -use std::io::IsTerminal; -use std::ops::Deref; -use std::path::PathBuf; -use std::sync::Arc; + +use crate::args::flags_from_vec; +use crate::args::DenoSubcommand; +use crate::args::Flags; +use crate::util::display; +use crate::util::v8::get_v8_flags_from_env; +use crate::util::v8::init_v8_flags; #[cfg(feature = "dhat-heap")] #[global_allocator] @@ -144,9 +144,7 @@ async fn run_subcommand(flags: Arc) -> Result { } DenoSubcommand::Init(init_flags) => { spawn_subcommand(async { - // make compiler happy since init_project is sync - tokio::task::yield_now().await; - tools::init::init_project(init_flags) + tools::init::init_project(init_flags).await }) } DenoSubcommand::Info(info_flags) => { @@ -188,6 +186,11 @@ async fn run_subcommand(flags: Arc) -> Result { tools::lint::lint(flags, lint_flags).await } }), + DenoSubcommand::Outdated(update_flags) => { + spawn_subcommand(async move { + tools::registry::outdated(flags, update_flags).await + }) + } DenoSubcommand::Repl(repl_flags) => { spawn_subcommand(async move { tools::repl::run(flags, repl_flags).await }) } @@ -238,6 +241,9 @@ async fn run_subcommand(flags: Arc) -> Result { cwd: None, task: Some(run_flags.script.clone()), is_run: true, + recursive: false, + filter: None, + eval: false, }; new_flags.subcommand = DenoSubcommand::Task(task_flags.clone()); let result = tools::task::execute_script(Arc::new(new_flags), task_flags.clone()).await; @@ -431,20 +437,18 @@ fn resolve_flags_and_init( if err.kind() == clap::error::ErrorKind::DisplayVersion => { // Ignore results to avoid BrokenPipe errors. - util::logger::init(None); + util::logger::init(None, None); let _ = err.print(); deno_runtime::exit(0); } Err(err) => { - util::logger::init(None); + util::logger::init(None, None); exit_for_error(AnyError::from(err)) } }; - if let Some(otel_config) = flags.otel_config() { - deno_runtime::ops::otel::init(otel_config)?; - } - util::logger::init(flags.log_level); + deno_telemetry::init(crate::args::otel_runtime_config())?; + util::logger::init(flags.log_level, Some(flags.otel_config())); // TODO(bartlomieju): remove in Deno v2.5 and hard error then. if flags.unstable_config.legacy_flag_enabled { diff --git a/cli/mainrt.rs b/cli/mainrt.rs index 2951aa711a46d0..ce6fddaee90ef6 100644 --- a/cli/mainrt.rs +++ b/cli/mainrt.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Allow unused code warnings because we share // code between the two bin targets. @@ -8,7 +8,6 @@ mod standalone; mod args; -mod auth_tokens; mod cache; mod emit; mod errors; @@ -19,11 +18,18 @@ mod node; mod npm; mod resolver; mod shared; +mod sys; mod task_runner; mod util; mod version; mod worker; +use std::borrow::Cow; +use std::collections::HashMap; +use std::env; +use std::env::current_exe; +use std::sync::Arc; + use deno_core::error::generic_error; use deno_core::error::AnyError; use deno_core::error::JsError; @@ -32,11 +38,7 @@ use deno_runtime::tokio_util::create_and_run_current_thread_with_maybe_metrics; pub use deno_runtime::UNSTABLE_GRANULAR_FLAGS; use deno_terminal::colors; use indexmap::IndexMap; - -use std::borrow::Cow; -use std::collections::HashMap; -use std::env; -use std::env::current_exe; +use standalone::DenoCompileFileSystem; use crate::args::Flags; @@ -87,17 +89,20 @@ fn main() { let future = async move { match standalone { Ok(Some(data)) => { - if let Some(otel_config) = data.metadata.otel_config.clone() { - deno_runtime::ops::otel::init(otel_config)?; - } - util::logger::init(data.metadata.log_level); + deno_telemetry::init(crate::args::otel_runtime_config())?; + util::logger::init( + data.metadata.log_level, + Some(data.metadata.otel_config.clone()), + ); load_env_vars(&data.metadata.env_vars_from_env_file); - let exit_code = standalone::run(data).await?; + let fs = DenoCompileFileSystem::new(data.vfs.clone()); + let sys = crate::sys::CliSys::DenoCompile(fs.clone()); + let exit_code = standalone::run(Arc::new(fs), sys, data).await?; deno_runtime::exit(exit_code); } Ok(None) => Ok(()), Err(err) => { - util::logger::init(None); + util::logger::init(None, None); Err(err) } } diff --git a/cli/module_loader.rs b/cli/module_loader.rs index b9adfe642c4ac4..446397cad19766 100644 --- a/cli/module_loader.rs +++ b/cli/module_loader.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::borrow::Cow; use std::cell::RefCell; @@ -7,38 +7,10 @@ use std::path::PathBuf; use std::pin::Pin; use std::rc::Rc; use std::str; +use std::sync::atomic::AtomicU16; +use std::sync::atomic::Ordering; use std::sync::Arc; -use crate::args::jsr_url; -use crate::args::CliLockfile; -use crate::args::CliOptions; -use crate::args::DenoSubcommand; -use crate::args::TsTypeLib; -use crate::cache::CodeCache; -use crate::cache::FastInsecureHasher; -use crate::cache::ParsedSourceCache; -use crate::emit::Emitter; -use crate::graph_container::MainModuleGraphContainer; -use crate::graph_container::ModuleGraphContainer; -use crate::graph_container::ModuleGraphUpdatePermit; -use crate::graph_util::CreateGraphOptions; -use crate::graph_util::ModuleGraphBuilder; -use crate::node; -use crate::node::CliNodeCodeTranslator; -use crate::npm::CliNpmResolver; -use crate::resolver::CjsTracker; -use crate::resolver::CliNpmReqResolver; -use crate::resolver::CliResolver; -use crate::resolver::ModuleCodeStringSource; -use crate::resolver::NotSupportedKindInNpmError; -use crate::resolver::NpmModuleLoader; -use crate::tools::check; -use crate::tools::check::TypeChecker; -use crate::util::progress_bar::ProgressBar; -use crate::util::text_encoding::code_without_source_map; -use crate::util::text_encoding::source_map_from_code; -use crate::worker::CreateModuleLoaderResult; -use crate::worker::ModuleLoaderFactory; use deno_ast::MediaType; use deno_ast::ModuleKind; use deno_core::anyhow::anyhow; @@ -49,6 +21,7 @@ use deno_core::error::generic_error; use deno_core::error::AnyError; use deno_core::futures::future::FutureExt; use deno_core::futures::Future; +use deno_core::parking_lot::Mutex; use deno_core::resolve_url; use deno_core::ModuleCodeString; use deno_core::ModuleLoader; @@ -57,25 +30,61 @@ use deno_core::ModuleSourceCode; use deno_core::ModuleSpecifier; use deno_core::ModuleType; use deno_core::RequestedModuleType; -use deno_core::ResolutionKind; use deno_core::SourceCodeCacheInfo; -use deno_graph::source::ResolutionMode; use deno_graph::GraphKind; use deno_graph::JsModule; use deno_graph::JsonModule; use deno_graph::Module; use deno_graph::ModuleGraph; +use deno_graph::ModuleGraphError; use deno_graph::Resolution; +use deno_graph::WasmModule; use deno_runtime::code_cache; -use deno_runtime::deno_fs::FileSystem; use deno_runtime::deno_node::create_host_defined_options; use deno_runtime::deno_node::NodeRequireLoader; -use deno_runtime::deno_node::NodeResolver; use deno_runtime::deno_permissions::PermissionsContainer; use deno_semver::npm::NpmPackageReqReference; use node_resolver::errors::ClosestPkgJsonError; use node_resolver::InNpmPackageChecker; -use node_resolver::NodeResolutionMode; +use node_resolver::NodeResolutionKind; +use node_resolver::ResolutionMode; +use sys_traits::FsRead; + +use crate::args::jsr_url; +use crate::args::CliLockfile; +use crate::args::CliOptions; +use crate::args::DenoSubcommand; +use crate::args::TsTypeLib; +use crate::cache::CodeCache; +use crate::cache::FastInsecureHasher; +use crate::cache::ParsedSourceCache; +use crate::emit::Emitter; +use crate::errors::get_module_error_class; +use crate::graph_container::MainModuleGraphContainer; +use crate::graph_container::ModuleGraphContainer; +use crate::graph_container::ModuleGraphUpdatePermit; +use crate::graph_util::enhance_graph_error; +use crate::graph_util::CreateGraphOptions; +use crate::graph_util::EnhanceGraphErrorMode; +use crate::graph_util::ModuleGraphBuilder; +use crate::node::CliNodeCodeTranslator; +use crate::node::CliNodeResolver; +use crate::npm::CliNpmResolver; +use crate::npm::NpmRegistryReadPermissionChecker; +use crate::resolver::CjsTracker; +use crate::resolver::CliNpmReqResolver; +use crate::resolver::CliResolver; +use crate::resolver::ModuleCodeStringSource; +use crate::resolver::NotSupportedKindInNpmError; +use crate::resolver::NpmModuleLoader; +use crate::sys::CliSys; +use crate::tools::check; +use crate::tools::check::TypeChecker; +use crate::util::progress_bar::ProgressBar; +use crate::util::text_encoding::code_without_source_map; +use crate::util::text_encoding::source_map_from_code; +use crate::worker::CreateModuleLoaderResult; +use crate::worker::ModuleLoaderFactory; pub struct ModuleLoadPreparer { options: Arc, @@ -153,6 +162,7 @@ impl ModuleLoadPreparer { graph_kind: graph.graph_kind(), roots: roots.to_vec(), loader: Some(&mut cache), + npm_caching: self.options.default_npm_caching_strategy(), }, ) .await?; @@ -211,17 +221,54 @@ struct SharedCliModuleLoaderState { cjs_tracker: Arc, code_cache: Option>, emitter: Arc, - fs: Arc, in_npm_pkg_checker: Arc, main_module_graph_container: Arc, module_load_preparer: Arc, node_code_translator: Arc, - node_resolver: Arc, + node_resolver: Arc, + npm_module_loader: NpmModuleLoader, + npm_registry_permission_checker: Arc, npm_req_resolver: Arc, npm_resolver: Arc, - npm_module_loader: NpmModuleLoader, parsed_source_cache: Arc, resolver: Arc, + sys: CliSys, + in_flight_loads_tracker: InFlightModuleLoadsTracker, +} + +struct InFlightModuleLoadsTracker { + loads_number: Arc, + cleanup_task_timeout: u64, + cleanup_task_handle: Arc>>>, +} + +impl InFlightModuleLoadsTracker { + pub fn increase(&self) { + self.loads_number.fetch_add(1, Ordering::Relaxed); + if let Some(task) = self.cleanup_task_handle.lock().take() { + task.abort(); + } + } + + pub fn decrease(&self, parsed_source_cache: &Arc) { + let prev = self.loads_number.fetch_sub(1, Ordering::Relaxed); + if prev == 1 { + let parsed_source_cache = parsed_source_cache.clone(); + let timeout = self.cleanup_task_timeout; + let task_handle = tokio::spawn(async move { + // We use a timeout here, which is defined to 10s, + // so that in situations when dynamic imports are loaded after the startup, + // we don't need to recompute and analyze multiple modules. + tokio::time::sleep(std::time::Duration::from_millis(timeout)).await; + parsed_source_cache.free_all(); + }); + let maybe_prev_task = + self.cleanup_task_handle.lock().replace(task_handle); + if let Some(prev_task) = maybe_prev_task { + prev_task.abort(); + } + } + } } pub struct CliModuleLoaderFactory { @@ -235,17 +282,18 @@ impl CliModuleLoaderFactory { cjs_tracker: Arc, code_cache: Option>, emitter: Arc, - fs: Arc, in_npm_pkg_checker: Arc, main_module_graph_container: Arc, module_load_preparer: Arc, node_code_translator: Arc, - node_resolver: Arc, + node_resolver: Arc, + npm_module_loader: NpmModuleLoader, + npm_registry_permission_checker: Arc, npm_req_resolver: Arc, npm_resolver: Arc, - npm_module_loader: NpmModuleLoader, parsed_source_cache: Arc, resolver: Arc, + sys: CliSys, ) -> Self { Self { shared: Arc::new(SharedCliModuleLoaderState { @@ -261,17 +309,23 @@ impl CliModuleLoaderFactory { cjs_tracker, code_cache, emitter, - fs, in_npm_pkg_checker, main_module_graph_container, module_load_preparer, node_code_translator, node_resolver, + npm_module_loader, + npm_registry_permission_checker, npm_req_resolver, npm_resolver, - npm_module_loader, parsed_source_cache, resolver, + sys, + in_flight_loads_tracker: InFlightModuleLoadsTracker { + loads_number: Arc::new(AtomicU16::new(0)), + cleanup_task_timeout: 10_000, + cleanup_task_handle: Arc::new(Mutex::new(None)), + }, }), } } @@ -299,10 +353,13 @@ impl CliModuleLoaderFactory { let node_require_loader = Rc::new(CliNodeRequireLoader { cjs_tracker: self.shared.cjs_tracker.clone(), emitter: self.shared.emitter.clone(), - fs: self.shared.fs.clone(), + sys: self.shared.sys.clone(), graph_container, in_npm_pkg_checker: self.shared.in_npm_pkg_checker.clone(), - npm_resolver: self.shared.npm_resolver.clone(), + npm_registry_permission_checker: self + .shared + .npm_registry_permission_checker + .clone(), }); CreateModuleLoaderResult { module_loader, @@ -368,7 +425,9 @@ impl requested_module_type: RequestedModuleType, ) -> Result { let code_source = self.load_code_source(specifier, maybe_referrer).await?; - let code = if self.shared.is_inspecting { + let code = if self.shared.is_inspecting + || code_source.media_type == MediaType::Wasm + { // we need the code with the source map in order for // it to work with --inspect or --inspect-brk code_source.code @@ -378,6 +437,7 @@ impl }; let module_type = match code_source.media_type { MediaType::Json => ModuleType::Json, + MediaType::Wasm => ModuleType::Wasm, _ => ModuleType::JavaScript, }; @@ -474,21 +534,6 @@ impl raw_specifier: &str, referrer: &ModuleSpecifier, ) -> Result { - if self.shared.in_npm_pkg_checker.in_npm_package(referrer) { - return Ok( - self - .shared - .node_resolver - .resolve( - raw_specifier, - referrer, - self.shared.cjs_tracker.get_referrer_kind(referrer), - NodeResolutionMode::Execution, - )? - .into_url(), - ); - } - let graph = self.graph_container.graph(); let resolution = match graph.get(referrer) { Some(Module::Js(module)) => module @@ -509,13 +554,11 @@ impl } Resolution::None => Cow::Owned(self.shared.resolver.resolve( raw_specifier, - &deno_graph::Range { - specifier: referrer.clone(), - start: deno_graph::Position::zeroed(), - end: deno_graph::Position::zeroed(), - }, - self.shared.cjs_tracker.get_referrer_kind(referrer), - ResolutionMode::Execution, + referrer, + deno_graph::Position::zeroed(), + // if we're here, that means it's resolving a dynamic import + ResolutionMode::Import, + NodeResolutionKind::Execution, )?), }; @@ -528,8 +571,8 @@ impl .resolve_req_reference( &reference, referrer, - self.shared.cjs_tracker.get_referrer_kind(referrer), - NodeResolutionMode::Execution, + ResolutionMode::Import, + NodeResolutionKind::Execution, ) .map_err(AnyError::from); } @@ -550,8 +593,8 @@ impl &package_folder, module.nv_reference.sub_path(), Some(referrer), - self.shared.cjs_tracker.get_referrer_kind(referrer), - NodeResolutionMode::Execution, + ResolutionMode::Import, + NodeResolutionKind::Execution, ) .with_context(|| { format!("Could not resolve '{}'.", module.nv_reference) @@ -560,10 +603,11 @@ impl Some(Module::Node(module)) => module.specifier.clone(), Some(Module::Js(module)) => module.specifier.clone(), Some(Module::Json(module)) => module.specifier.clone(), + Some(Module::Wasm(module)) => module.specifier.clone(), Some(Module::External(module)) => { - node::resolve_specifier_into_node_modules( + node_resolver::resolve_specifier_into_node_modules( + &self.shared.sys, &module.specifier, - self.shared.fs.as_ref(), ) } None => specifier.into_owned(), @@ -663,7 +707,21 @@ impl unreachable!("Deno bug. {} was misconfigured internally.", specifier); } - match graph.get(specifier) { + let maybe_module = match graph.try_get(specifier) { + Ok(module) => module, + Err(err) => { + return Err(custom_error( + get_module_error_class(err), + enhance_graph_error( + &self.shared.sys, + &ModuleGraphError::ModuleError(err.clone()), + EnhanceGraphErrorMode::ShowRange, + ), + )) + } + }; + + match maybe_module { Some(deno_graph::Module::Json(JsonModule { source, media_type, @@ -731,6 +789,13 @@ impl media_type: *media_type, }))) } + Some(deno_graph::Module::Wasm(WasmModule { + source, specifier, .. + })) => Ok(Some(CodeOrDeferredEmit::Code(ModuleCodeStringSource { + code: ModuleSourceCode::Bytes(source.clone().into()), + found_url: specifier.clone(), + media_type: MediaType::Wasm, + }))), Some( deno_graph::Module::External(_) | deno_graph::Module::Node(_) @@ -809,7 +874,7 @@ impl ModuleLoader &self, specifier: &str, referrer: &str, - _kind: ResolutionKind, + _kind: deno_core::ResolutionKind, ) -> Result { fn ensure_not_jsr_non_jsr_remote_import( specifier: &ModuleSpecifier, @@ -873,6 +938,7 @@ impl ModuleLoader _maybe_referrer: Option, is_dynamic: bool, ) -> Pin>>> { + self.0.shared.in_flight_loads_tracker.increase(); if self.0.shared.in_npm_pkg_checker.in_npm_package(specifier) { return Box::pin(deno_core::futures::future::ready(Ok(()))); } @@ -927,6 +993,14 @@ impl ModuleLoader .boxed_local() } + fn finish_load(&self) { + self + .0 + .shared + .in_flight_loads_tracker + .decrease(&self.0.shared.parsed_source_cache); + } + fn code_cache_ready( &self, specifier: ModuleSpecifier, @@ -948,7 +1022,7 @@ impl ModuleLoader std::future::ready(()).boxed_local() } - fn get_source_map(&self, file_name: &str) -> Option> { + fn get_source_map(&self, file_name: &str) -> Option> { let specifier = resolve_url(file_name).ok()?; match specifier.scheme() { // we should only be looking for emits for schemes that denote external @@ -960,7 +1034,7 @@ impl ModuleLoader .0 .load_prepared_module_for_source_map_sync(&specifier) .ok()??; - source_map_from_code(source.code.as_bytes()) + source_map_from_code(source.code.as_bytes()).map(Cow::Owned) } fn get_source_mapped_source_line( @@ -1043,10 +1117,10 @@ impl ModuleGraphUpdatePermit for WorkerModuleGraphUpdatePermit { struct CliNodeRequireLoader { cjs_tracker: Arc, emitter: Arc, - fs: Arc, + sys: CliSys, graph_container: TGraphContainer, in_npm_pkg_checker: Arc, - npm_resolver: Arc, + npm_registry_permission_checker: Arc, } impl NodeRequireLoader @@ -1063,13 +1137,18 @@ impl NodeRequireLoader return Ok(std::borrow::Cow::Borrowed(path)); } } - self.npm_resolver.ensure_read_permission(permissions, path) + self + .npm_registry_permission_checker + .ensure_read_permission(permissions, path) } - fn load_text_file_lossy(&self, path: &Path) -> Result { + fn load_text_file_lossy( + &self, + path: &Path, + ) -> Result, AnyError> { // todo(dsherret): use the preloaded module from the graph if available? let media_type = MediaType::from_path(path); - let text = self.fs.read_text_file_lossy_sync(path, None)?; + let text = self.sys.fs_read_to_string_lossy(path)?; if media_type.is_emittable() { let specifier = deno_path_util::url_from_file_path(path)?; if self.in_npm_pkg_checker.in_npm_package(&specifier) { @@ -1081,15 +1160,18 @@ impl NodeRequireLoader .into(), ); } - self.emitter.emit_parsed_source_sync( - &specifier, - media_type, - // this is probably not super accurate due to require esm, but probably ok. - // If we find this causes a lot of churn in the emit cache then we should - // investigate how we can make this better - ModuleKind::Cjs, - &text.into(), - ) + self + .emitter + .emit_parsed_source_sync( + &specifier, + media_type, + // this is probably not super accurate due to require esm, but probably ok. + // If we find this causes a lot of churn in the emit cache then we should + // investigate how we can make this better + ModuleKind::Cjs, + &text.into(), + ) + .map(Cow::Owned) } else { Ok(text) } @@ -1103,3 +1185,45 @@ impl NodeRequireLoader self.cjs_tracker.is_maybe_cjs(specifier, media_type) } } + +#[cfg(test)] +mod tests { + use deno_graph::ParsedSourceStore; + + use super::*; + + #[tokio::test] + async fn test_inflight_module_loads_tracker() { + let tracker = InFlightModuleLoadsTracker { + loads_number: Default::default(), + cleanup_task_timeout: 10, + cleanup_task_handle: Default::default(), + }; + + let specifier = ModuleSpecifier::parse("file:///a.js").unwrap(); + let source = "const a = 'hello';"; + let parsed_source_cache = Arc::new(ParsedSourceCache::default()); + let parsed_source = parsed_source_cache + .remove_or_parse_module(&specifier, source.into(), MediaType::JavaScript) + .unwrap(); + parsed_source_cache.set_parsed_source(specifier, parsed_source); + + assert_eq!(parsed_source_cache.len(), 1); + assert!(tracker.cleanup_task_handle.lock().is_none()); + tracker.increase(); + tracker.increase(); + assert!(tracker.cleanup_task_handle.lock().is_none()); + tracker.decrease(&parsed_source_cache); + assert!(tracker.cleanup_task_handle.lock().is_none()); + tracker.decrease(&parsed_source_cache); + assert!(tracker.cleanup_task_handle.lock().is_some()); + assert_eq!(parsed_source_cache.len(), 1); + tracker.increase(); + assert!(tracker.cleanup_task_handle.lock().is_none()); + assert_eq!(parsed_source_cache.len(), 1); + tracker.decrease(&parsed_source_cache); + // Rather long timeout, but to make sure CI is not flaking on it. + tokio::time::sleep(std::time::Duration::from_millis(500)).await; + assert_eq!(parsed_source_cache.len(), 0); + } +} diff --git a/cli/node.rs b/cli/node.rs index bc39cdbde9bb53..e0feb557a7a805 100644 --- a/cli/node.rs +++ b/cli/node.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::borrow::Cow; use std::sync::Arc; @@ -8,7 +8,7 @@ use deno_ast::ModuleSpecifier; use deno_core::error::AnyError; use deno_graph::ParsedSourceStore; use deno_runtime::deno_fs; -use deno_runtime::deno_node::DenoFsNodeResolverEnv; +use deno_runtime::deno_node::RealIsBuiltInNodeModuleChecker; use node_resolver::analyze::CjsAnalysis as ExtNodeCjsAnalysis; use node_resolver::analyze::CjsAnalysisExports; use node_resolver::analyze::CjsCodeAnalyzer; @@ -20,24 +20,15 @@ use crate::cache::CacheDBHash; use crate::cache::NodeAnalysisCache; use crate::cache::ParsedSourceCache; use crate::resolver::CjsTracker; +use crate::sys::CliSys; -pub type CliNodeCodeTranslator = - NodeCodeTranslator; - -/// Resolves a specifier that is pointing into a node_modules folder. -/// -/// Note: This should be called whenever getting the specifier from -/// a Module::External(module) reference because that module might -/// not be fully resolved at the time deno_graph is analyzing it -/// because the node_modules folder might not exist at that time. -pub fn resolve_specifier_into_node_modules( - specifier: &ModuleSpecifier, - fs: &dyn deno_fs::FileSystem, -) -> ModuleSpecifier { - node_resolver::resolve_specifier_into_node_modules(specifier, &|path| { - fs.realpath_sync(path).map_err(|err| err.into_io_error()) - }) -} +pub type CliNodeCodeTranslator = NodeCodeTranslator< + CliCjsCodeAnalyzer, + RealIsBuiltInNodeModuleChecker, + CliSys, +>; +pub type CliNodeResolver = deno_runtime::deno_node::NodeResolver; +pub type CliPackageJsonResolver = node_resolver::PackageJsonResolver; #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub enum CliCjsAnalysis { @@ -160,7 +151,7 @@ impl CjsCodeAnalyzer for CliCjsCodeAnalyzer { if let Ok(source_from_file) = self.fs.read_text_file_lossy_async(path, None).await { - Cow::Owned(source_from_file) + source_from_file } else { return Ok(ExtNodeCjsAnalysis::Cjs(CjsAnalysisExports { exports: vec![], diff --git a/cli/npm/byonm.rs b/cli/npm/byonm.rs index eca399251b0e31..2c11a417f3f0fb 100644 --- a/cli/npm/byonm.rs +++ b/cli/npm/byonm.rs @@ -1,30 +1,24 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use std::borrow::Cow; use std::path::Path; use std::sync::Arc; -use deno_core::error::AnyError; use deno_core::serde_json; use deno_resolver::npm::ByonmNpmResolver; use deno_resolver::npm::ByonmNpmResolverCreateOptions; use deno_resolver::npm::CliNpmReqResolver; -use deno_runtime::deno_node::DenoFsNodeResolverEnv; -use deno_runtime::deno_node::NodePermissions; use deno_runtime::ops::process::NpmProcessStateProvider; use node_resolver::NpmPackageFolderResolver; -use crate::args::NpmProcessState; -use crate::args::NpmProcessStateKind; -use crate::resolver::CliDenoResolverFs; - use super::CliNpmResolver; use super::InnerCliNpmResolverRef; +use crate::args::NpmProcessState; +use crate::args::NpmProcessStateKind; +use crate::sys::CliSys; pub type CliByonmNpmResolverCreateOptions = - ByonmNpmResolverCreateOptions; -pub type CliByonmNpmResolver = - ByonmNpmResolver; + ByonmNpmResolverCreateOptions; +pub type CliByonmNpmResolver = ByonmNpmResolver; // todo(dsherret): the services hanging off `CliNpmResolver` doesn't seem ideal. We should probably decouple. #[derive(Debug)] @@ -76,21 +70,6 @@ impl CliNpmResolver for CliByonmNpmResolver { self.root_node_modules_dir() } - fn ensure_read_permission<'a>( - &self, - permissions: &mut dyn NodePermissions, - path: &'a Path, - ) -> Result, AnyError> { - if !path - .components() - .any(|c| c.as_os_str().to_ascii_lowercase() == "node_modules") - { - permissions.check_read_path(path).map_err(Into::into) - } else { - Ok(Cow::Borrowed(path)) - } - } - fn check_state_hash(&self) -> Option { // it is very difficult to determine the check state hash for byonm // so we just return None to signify check caching is not supported diff --git a/cli/npm/common.rs b/cli/npm/common.rs deleted file mode 100644 index 55f1bc086dbb3e..00000000000000 --- a/cli/npm/common.rs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. - -use base64::prelude::BASE64_STANDARD; -use base64::Engine; -use deno_core::anyhow::bail; -use deno_core::anyhow::Context; -use deno_core::error::AnyError; -use deno_npm::npm_rc::RegistryConfig; -use http::header; - -// TODO(bartlomieju): support more auth methods besides token and basic auth -pub fn maybe_auth_header_for_npm_registry( - registry_config: &RegistryConfig, -) -> Result, AnyError> { - if let Some(token) = registry_config.auth_token.as_ref() { - return Ok(Some(( - header::AUTHORIZATION, - header::HeaderValue::from_str(&format!("Bearer {}", token)).unwrap(), - ))); - } - - if let Some(auth) = registry_config.auth.as_ref() { - return Ok(Some(( - header::AUTHORIZATION, - header::HeaderValue::from_str(&format!("Basic {}", auth)).unwrap(), - ))); - } - - let (username, password) = ( - registry_config.username.as_ref(), - registry_config.password.as_ref(), - ); - if (username.is_some() && password.is_none()) - || (username.is_none() && password.is_some()) - { - bail!("Both the username and password must be provided for basic auth") - } - - if username.is_some() && password.is_some() { - // The npm client does some double encoding when generating the - // bearer token value, see - // https://github.com/npm/cli/blob/780afc50e3a345feb1871a28e33fa48235bc3bd5/workspaces/config/lib/index.js#L846-L851 - let pw_base64 = BASE64_STANDARD - .decode(password.unwrap()) - .with_context(|| "The password in npmrc is an invalid base64 string")?; - let bearer = BASE64_STANDARD.encode(format!( - "{}:{}", - username.unwrap(), - String::from_utf8_lossy(&pw_base64) - )); - - return Ok(Some(( - header::AUTHORIZATION, - header::HeaderValue::from_str(&format!("Basic {}", bearer)).unwrap(), - ))); - } - - Ok(None) -} diff --git a/cli/npm/managed/cache/mod.rs b/cli/npm/managed/cache/mod.rs deleted file mode 100644 index 8ae99f41e014b5..00000000000000 --- a/cli/npm/managed/cache/mod.rs +++ /dev/null @@ -1,280 +0,0 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. - -use std::collections::HashSet; -use std::fs; -use std::io::ErrorKind; -use std::path::Path; -use std::path::PathBuf; -use std::sync::Arc; - -use deno_ast::ModuleSpecifier; -use deno_cache_dir::npm::NpmCacheDir; -use deno_core::anyhow::bail; -use deno_core::anyhow::Context; -use deno_core::error::AnyError; -use deno_core::parking_lot::Mutex; -use deno_core::serde_json; -use deno_core::url::Url; -use deno_npm::npm_rc::ResolvedNpmRc; -use deno_npm::registry::NpmPackageInfo; -use deno_npm::NpmPackageCacheFolderId; -use deno_semver::package::PackageNv; -use deno_semver::Version; - -use crate::args::CacheSetting; -use crate::cache::CACHE_PERM; -use crate::util::fs::atomic_write_file_with_retries; -use crate::util::fs::hard_link_dir_recursive; - -pub mod registry_info; -mod tarball; -mod tarball_extract; - -pub use registry_info::RegistryInfoDownloader; -pub use tarball::TarballCache; - -/// Stores a single copy of npm packages in a cache. -#[derive(Debug)] -pub struct NpmCache { - cache_dir: Arc, - cache_setting: CacheSetting, - npmrc: Arc, - /// ensures a package is only downloaded once per run - previously_reloaded_packages: Mutex>, -} - -impl NpmCache { - pub fn new( - cache_dir: Arc, - cache_setting: CacheSetting, - npmrc: Arc, - ) -> Self { - Self { - cache_dir, - cache_setting, - previously_reloaded_packages: Default::default(), - npmrc, - } - } - - pub fn cache_setting(&self) -> &CacheSetting { - &self.cache_setting - } - - pub fn root_dir_path(&self) -> &Path { - self.cache_dir.root_dir() - } - - pub fn root_dir_url(&self) -> &Url { - self.cache_dir.root_dir_url() - } - - /// Checks if the cache should be used for the provided name and version. - /// NOTE: Subsequent calls for the same package will always return `true` - /// to ensure a package is only downloaded once per run of the CLI. This - /// prevents downloads from re-occurring when someone has `--reload` and - /// and imports a dynamic import that imports the same package again for example. - pub fn should_use_cache_for_package(&self, package: &PackageNv) -> bool { - self.cache_setting.should_use_for_npm_package(&package.name) - || !self - .previously_reloaded_packages - .lock() - .insert(package.clone()) - } - - /// Ensures a copy of the package exists in the global cache. - /// - /// This assumes that the original package folder being hard linked - /// from exists before this is called. - pub fn ensure_copy_package( - &self, - folder_id: &NpmPackageCacheFolderId, - ) -> Result<(), AnyError> { - let registry_url = self.npmrc.get_registry_url(&folder_id.nv.name); - assert_ne!(folder_id.copy_index, 0); - let package_folder = self.cache_dir.package_folder_for_id( - &folder_id.nv.name, - &folder_id.nv.version.to_string(), - folder_id.copy_index, - registry_url, - ); - - if package_folder.exists() - // if this file exists, then the package didn't successfully initialize - // the first time, or another process is currently extracting the zip file - && !package_folder.join(NPM_PACKAGE_SYNC_LOCK_FILENAME).exists() - && self.cache_setting.should_use_for_npm_package(&folder_id.nv.name) - { - return Ok(()); - } - - let original_package_folder = self.cache_dir.package_folder_for_id( - &folder_id.nv.name, - &folder_id.nv.version.to_string(), - 0, // original copy index - registry_url, - ); - - // it seems Windows does an "AccessDenied" error when moving a - // directory with hard links, so that's why this solution is done - with_folder_sync_lock(&folder_id.nv, &package_folder, || { - hard_link_dir_recursive(&original_package_folder, &package_folder) - })?; - Ok(()) - } - - pub fn package_folder_for_id(&self, id: &NpmPackageCacheFolderId) -> PathBuf { - let registry_url = self.npmrc.get_registry_url(&id.nv.name); - self.cache_dir.package_folder_for_id( - &id.nv.name, - &id.nv.version.to_string(), - id.copy_index, - registry_url, - ) - } - - pub fn package_folder_for_nv(&self, package: &PackageNv) -> PathBuf { - let registry_url = self.npmrc.get_registry_url(&package.name); - self.package_folder_for_nv_and_url(package, registry_url) - } - - pub fn package_folder_for_nv_and_url( - &self, - package: &PackageNv, - registry_url: &Url, - ) -> PathBuf { - self.cache_dir.package_folder_for_id( - &package.name, - &package.version.to_string(), - 0, // original copy_index - registry_url, - ) - } - - pub fn package_name_folder(&self, name: &str) -> PathBuf { - let registry_url = self.npmrc.get_registry_url(name); - self.cache_dir.package_name_folder(name, registry_url) - } - - pub fn resolve_package_folder_id_from_specifier( - &self, - specifier: &ModuleSpecifier, - ) -> Option { - self - .cache_dir - .resolve_package_folder_id_from_specifier(specifier) - .and_then(|cache_id| { - Some(NpmPackageCacheFolderId { - nv: PackageNv { - name: cache_id.name, - version: Version::parse_from_npm(&cache_id.version).ok()?, - }, - copy_index: cache_id.copy_index, - }) - }) - } - - pub fn load_package_info( - &self, - name: &str, - ) -> Result, AnyError> { - let file_cache_path = self.get_registry_package_info_file_cache_path(name); - - let file_text = match fs::read_to_string(file_cache_path) { - Ok(file_text) => file_text, - Err(err) if err.kind() == ErrorKind::NotFound => return Ok(None), - Err(err) => return Err(err.into()), - }; - Ok(serde_json::from_str(&file_text)?) - } - - pub fn save_package_info( - &self, - name: &str, - package_info: &NpmPackageInfo, - ) -> Result<(), AnyError> { - let file_cache_path = self.get_registry_package_info_file_cache_path(name); - let file_text = serde_json::to_string(&package_info)?; - atomic_write_file_with_retries(&file_cache_path, file_text, CACHE_PERM)?; - Ok(()) - } - - fn get_registry_package_info_file_cache_path(&self, name: &str) -> PathBuf { - let name_folder_path = self.package_name_folder(name); - name_folder_path.join("registry.json") - } -} - -const NPM_PACKAGE_SYNC_LOCK_FILENAME: &str = ".deno_sync_lock"; - -fn with_folder_sync_lock( - package: &PackageNv, - output_folder: &Path, - action: impl FnOnce() -> Result<(), AnyError>, -) -> Result<(), AnyError> { - fn inner( - output_folder: &Path, - action: impl FnOnce() -> Result<(), AnyError>, - ) -> Result<(), AnyError> { - fs::create_dir_all(output_folder).with_context(|| { - format!("Error creating '{}'.", output_folder.display()) - })?; - - // This sync lock file is a way to ensure that partially created - // npm package directories aren't considered valid. This could maybe - // be a bit smarter in the future to not bother extracting here - // if another process has taken the lock in the past X seconds and - // wait for the other process to finish (it could try to create the - // file with `create_new(true)` then if it exists, check the metadata - // then wait until the other process finishes with a timeout), but - // for now this is good enough. - let sync_lock_path = output_folder.join(NPM_PACKAGE_SYNC_LOCK_FILENAME); - match fs::OpenOptions::new() - .write(true) - .create(true) - .truncate(false) - .open(&sync_lock_path) - { - Ok(_) => { - action()?; - // extraction succeeded, so only now delete this file - let _ignore = std::fs::remove_file(&sync_lock_path); - Ok(()) - } - Err(err) => { - bail!( - concat!( - "Error creating package sync lock file at '{}'. ", - "Maybe try manually deleting this folder.\n\n{:#}", - ), - output_folder.display(), - err - ); - } - } - } - - match inner(output_folder, action) { - Ok(()) => Ok(()), - Err(err) => { - if let Err(remove_err) = fs::remove_dir_all(output_folder) { - if remove_err.kind() != std::io::ErrorKind::NotFound { - bail!( - concat!( - "Failed setting up package cache directory for {}, then ", - "failed cleaning it up.\n\nOriginal error:\n\n{}\n\n", - "Remove error:\n\n{}\n\nPlease manually ", - "delete this folder or you will run into issues using this ", - "package in the future:\n\n{}" - ), - package, - err, - remove_err, - output_folder.display(), - ); - } - } - Err(err) - } - } -} diff --git a/cli/npm/managed/cache/registry_info.rs b/cli/npm/managed/cache/registry_info.rs deleted file mode 100644 index 6d39d3c13f88c0..00000000000000 --- a/cli/npm/managed/cache/registry_info.rs +++ /dev/null @@ -1,274 +0,0 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. - -use std::collections::HashMap; -use std::sync::Arc; - -use deno_core::anyhow::anyhow; -use deno_core::anyhow::bail; -use deno_core::anyhow::Context; -use deno_core::error::custom_error; -use deno_core::error::AnyError; -use deno_core::futures::future::LocalBoxFuture; -use deno_core::futures::FutureExt; -use deno_core::parking_lot::Mutex; -use deno_core::serde_json; -use deno_core::url::Url; -use deno_npm::npm_rc::ResolvedNpmRc; -use deno_npm::registry::NpmPackageInfo; - -use crate::args::CacheSetting; -use crate::http_util::HttpClientProvider; -use crate::npm::common::maybe_auth_header_for_npm_registry; -use crate::util::progress_bar::ProgressBar; -use crate::util::sync::MultiRuntimeAsyncValueCreator; - -use super::NpmCache; - -// todo(dsherret): create seams and unit test this - -type LoadResult = Result>; -type LoadFuture = LocalBoxFuture<'static, LoadResult>; - -#[derive(Debug, Clone)] -enum FutureResult { - PackageNotExists, - SavedFsCache(Arc), - ErroredFsCache(Arc), -} - -#[derive(Debug, Clone)] -enum MemoryCacheItem { - /// The cache item hasn't loaded yet. - Pending(Arc>), - /// The item has loaded in the past and was stored in the file system cache. - /// There is no reason to request this package from the npm registry again - /// for the duration of execution. - FsCached, - /// An item is memory cached when it fails saving to the file system cache - /// or the package does not exist. - MemoryCached(Result>, Arc>), -} - -/// Downloads packuments from the npm registry. -/// -/// This is shared amongst all the workers. -#[derive(Debug)] -pub struct RegistryInfoDownloader { - cache: Arc, - http_client_provider: Arc, - npmrc: Arc, - progress_bar: ProgressBar, - memory_cache: Mutex>, -} - -impl RegistryInfoDownloader { - pub fn new( - cache: Arc, - http_client_provider: Arc, - npmrc: Arc, - progress_bar: ProgressBar, - ) -> Self { - Self { - cache, - http_client_provider, - npmrc, - progress_bar, - memory_cache: Default::default(), - } - } - - pub async fn load_package_info( - self: &Arc, - name: &str, - ) -> Result>, AnyError> { - self.load_package_info_inner(name).await.with_context(|| { - format!( - "Error getting response at {} for package \"{}\"", - get_package_url(&self.npmrc, name), - name - ) - }) - } - - async fn load_package_info_inner( - self: &Arc, - name: &str, - ) -> Result>, AnyError> { - if *self.cache.cache_setting() == CacheSetting::Only { - return Err(custom_error( - "NotCached", - format!( - "An npm specifier not found in cache: \"{name}\", --cached-only is specified." - ) - )); - } - - let cache_item = { - let mut mem_cache = self.memory_cache.lock(); - if let Some(cache_item) = mem_cache.get(name) { - cache_item.clone() - } else { - let value_creator = MultiRuntimeAsyncValueCreator::new({ - let downloader = self.clone(); - let name = name.to_string(); - Box::new(move || downloader.create_load_future(&name)) - }); - let cache_item = MemoryCacheItem::Pending(Arc::new(value_creator)); - mem_cache.insert(name.to_string(), cache_item.clone()); - cache_item - } - }; - - match cache_item { - MemoryCacheItem::FsCached => { - // this struct previously loaded from the registry, so we can load it from the file system cache - self - .load_file_cached_package_info(name) - .await - .map(|info| Some(Arc::new(info))) - } - MemoryCacheItem::MemoryCached(maybe_info) => { - maybe_info.clone().map_err(|e| anyhow!("{}", e)) - } - MemoryCacheItem::Pending(value_creator) => { - match value_creator.get().await { - Ok(FutureResult::SavedFsCache(info)) => { - // return back the future and mark this package as having - // been saved in the cache for next time it's requested - *self.memory_cache.lock().get_mut(name).unwrap() = - MemoryCacheItem::FsCached; - Ok(Some(info)) - } - Ok(FutureResult::ErroredFsCache(info)) => { - // since saving to the fs cache failed, keep the package information in memory - *self.memory_cache.lock().get_mut(name).unwrap() = - MemoryCacheItem::MemoryCached(Ok(Some(info.clone()))); - Ok(Some(info)) - } - Ok(FutureResult::PackageNotExists) => { - *self.memory_cache.lock().get_mut(name).unwrap() = - MemoryCacheItem::MemoryCached(Ok(None)); - Ok(None) - } - Err(err) => { - let return_err = anyhow!("{}", err); - *self.memory_cache.lock().get_mut(name).unwrap() = - MemoryCacheItem::MemoryCached(Err(err)); - Err(return_err) - } - } - } - } - } - - async fn load_file_cached_package_info( - &self, - name: &str, - ) -> Result { - // this scenario failing should be exceptionally rare so let's - // deal with improving it only when anyone runs into an issue - let maybe_package_info = deno_core::unsync::spawn_blocking({ - let cache = self.cache.clone(); - let name = name.to_string(); - move || cache.load_package_info(&name) - }) - .await - .unwrap() - .with_context(|| { - format!( - "Previously saved '{}' from the npm cache, but now it fails to load.", - name - ) - })?; - match maybe_package_info { - Some(package_info) => Ok(package_info), - None => { - bail!("The package '{}' previously saved its registry information to the file system cache, but that file no longer exists.", name) - } - } - } - - fn create_load_future(self: &Arc, name: &str) -> LoadFuture { - let downloader = self.clone(); - let package_url = get_package_url(&self.npmrc, name); - let registry_config = self.npmrc.get_registry_config(name); - let maybe_auth_header = - match maybe_auth_header_for_npm_registry(registry_config) { - Ok(maybe_auth_header) => maybe_auth_header, - Err(err) => { - return std::future::ready(Err(Arc::new(err))).boxed_local() - } - }; - let guard = self.progress_bar.update(package_url.as_str()); - let name = name.to_string(); - async move { - let client = downloader.http_client_provider.get_or_create()?; - let maybe_bytes = client - .download_with_progress_and_retries( - package_url, - maybe_auth_header, - &guard, - ) - .await?; - match maybe_bytes { - Some(bytes) => { - let future_result = deno_core::unsync::spawn_blocking( - move || -> Result { - let package_info = serde_json::from_slice(&bytes)?; - match downloader.cache.save_package_info(&name, &package_info) { - Ok(()) => { - Ok(FutureResult::SavedFsCache(Arc::new(package_info))) - } - Err(err) => { - log::debug!( - "Error saving package {} to cache: {:#}", - name, - err - ); - Ok(FutureResult::ErroredFsCache(Arc::new(package_info))) - } - } - }, - ) - .await??; - Ok(future_result) - } - None => Ok(FutureResult::PackageNotExists), - } - } - .map(|r| r.map_err(Arc::new)) - .boxed_local() - } -} - -pub fn get_package_url(npmrc: &ResolvedNpmRc, name: &str) -> Url { - let registry_url = npmrc.get_registry_url(name); - // The '/' character in scoped package names "@scope/name" must be - // encoded for older third party registries. Newer registries and - // npm itself support both ways - // - encoded: https://registry.npmjs.org/@rollup%2fplugin-json - // - non-ecoded: https://registry.npmjs.org/@rollup/plugin-json - // To support as many third party registries as possible we'll - // always encode the '/' character. - - // list of all characters used in npm packages: - // !, ', (, ), *, -, ., /, [0-9], @, [A-Za-z], _, ~ - const ASCII_SET: percent_encoding::AsciiSet = - percent_encoding::NON_ALPHANUMERIC - .remove(b'!') - .remove(b'\'') - .remove(b'(') - .remove(b')') - .remove(b'*') - .remove(b'-') - .remove(b'.') - .remove(b'@') - .remove(b'_') - .remove(b'~'); - let name = percent_encoding::utf8_percent_encode(name, &ASCII_SET); - registry_url - // Ensure that scoped package name percent encoding is lower cased - // to match npm. - .join(&name.to_string().replace("%2F", "%2f")) - .unwrap() -} diff --git a/cli/npm/managed/cache/tarball.rs b/cli/npm/managed/cache/tarball.rs deleted file mode 100644 index 7cf88d6d64d54e..00000000000000 --- a/cli/npm/managed/cache/tarball.rs +++ /dev/null @@ -1,235 +0,0 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. - -use std::collections::HashMap; -use std::sync::Arc; - -use deno_core::anyhow::anyhow; -use deno_core::anyhow::bail; -use deno_core::anyhow::Context; -use deno_core::error::custom_error; -use deno_core::error::AnyError; -use deno_core::futures::future::LocalBoxFuture; -use deno_core::futures::FutureExt; -use deno_core::parking_lot::Mutex; -use deno_core::url::Url; -use deno_npm::npm_rc::ResolvedNpmRc; -use deno_npm::registry::NpmPackageVersionDistInfo; -use deno_runtime::deno_fs::FileSystem; -use deno_semver::package::PackageNv; -use http::StatusCode; - -use crate::args::CacheSetting; -use crate::http_util::DownloadError; -use crate::http_util::HttpClientProvider; -use crate::npm::common::maybe_auth_header_for_npm_registry; -use crate::util::progress_bar::ProgressBar; -use crate::util::sync::MultiRuntimeAsyncValueCreator; - -use super::tarball_extract::verify_and_extract_tarball; -use super::tarball_extract::TarballExtractionMode; -use super::NpmCache; - -// todo(dsherret): create seams and unit test this - -type LoadResult = Result<(), Arc>; -type LoadFuture = LocalBoxFuture<'static, LoadResult>; - -#[derive(Debug, Clone)] -enum MemoryCacheItem { - /// The cache item hasn't finished yet. - Pending(Arc>), - /// The result errored. - Errored(Arc), - /// This package has already been cached. - Cached, -} - -/// Coordinates caching of tarballs being loaded from -/// the npm registry. -/// -/// This is shared amongst all the workers. -#[derive(Debug)] -pub struct TarballCache { - cache: Arc, - fs: Arc, - http_client_provider: Arc, - npmrc: Arc, - progress_bar: ProgressBar, - memory_cache: Mutex>, -} - -impl TarballCache { - pub fn new( - cache: Arc, - fs: Arc, - http_client_provider: Arc, - npmrc: Arc, - progress_bar: ProgressBar, - ) -> Self { - Self { - cache, - fs, - http_client_provider, - npmrc, - progress_bar, - memory_cache: Default::default(), - } - } - - pub async fn ensure_package( - self: &Arc, - package: &PackageNv, - dist: &NpmPackageVersionDistInfo, - ) -> Result<(), AnyError> { - self - .ensure_package_inner(package, dist) - .await - .with_context(|| format!("Failed caching npm package '{}'.", package)) - } - - async fn ensure_package_inner( - self: &Arc, - package_nv: &PackageNv, - dist: &NpmPackageVersionDistInfo, - ) -> Result<(), AnyError> { - let cache_item = { - let mut mem_cache = self.memory_cache.lock(); - if let Some(cache_item) = mem_cache.get(package_nv) { - cache_item.clone() - } else { - let value_creator = MultiRuntimeAsyncValueCreator::new({ - let tarball_cache = self.clone(); - let package_nv = package_nv.clone(); - let dist = dist.clone(); - Box::new(move || { - tarball_cache.create_setup_future(package_nv.clone(), dist.clone()) - }) - }); - let cache_item = MemoryCacheItem::Pending(Arc::new(value_creator)); - mem_cache.insert(package_nv.clone(), cache_item.clone()); - cache_item - } - }; - - match cache_item { - MemoryCacheItem::Cached => Ok(()), - MemoryCacheItem::Errored(err) => Err(anyhow!("{}", err)), - MemoryCacheItem::Pending(creator) => { - let result = creator.get().await; - match result { - Ok(_) => { - *self.memory_cache.lock().get_mut(package_nv).unwrap() = - MemoryCacheItem::Cached; - Ok(()) - } - Err(err) => { - let result_err = anyhow!("{}", err); - *self.memory_cache.lock().get_mut(package_nv).unwrap() = - MemoryCacheItem::Errored(err); - Err(result_err) - } - } - } - } - } - - fn create_setup_future( - self: &Arc, - package_nv: PackageNv, - dist: NpmPackageVersionDistInfo, - ) -> LoadFuture { - let tarball_cache = self.clone(); - async move { - let registry_url = tarball_cache.npmrc.get_registry_url(&package_nv.name); - let package_folder = - tarball_cache.cache.package_folder_for_nv_and_url(&package_nv, registry_url); - let should_use_cache = tarball_cache.cache.should_use_cache_for_package(&package_nv); - let package_folder_exists = tarball_cache.fs.exists_sync(&package_folder); - if should_use_cache && package_folder_exists { - return Ok(()); - } else if tarball_cache.cache.cache_setting() == &CacheSetting::Only { - return Err(custom_error( - "NotCached", - format!( - "An npm specifier not found in cache: \"{}\", --cached-only is specified.", - &package_nv.name - ) - ) - ); - } - - if dist.tarball.is_empty() { - bail!("Tarball URL was empty."); - } - - // IMPORTANT: npm registries may specify tarball URLs at different URLS than the - // registry, so we MUST get the auth for the tarball URL and not the registry URL. - let tarball_uri = Url::parse(&dist.tarball)?; - let maybe_registry_config = - tarball_cache.npmrc.tarball_config(&tarball_uri); - let maybe_auth_header = maybe_registry_config.and_then(|c| maybe_auth_header_for_npm_registry(c).ok()?); - - let guard = tarball_cache.progress_bar.update(&dist.tarball); - let result = tarball_cache.http_client_provider - .get_or_create()? - .download_with_progress_and_retries(tarball_uri, maybe_auth_header, &guard) - .await; - let maybe_bytes = match result { - Ok(maybe_bytes) => maybe_bytes, - Err(DownloadError::BadResponse(err)) => { - if err.status_code == StatusCode::UNAUTHORIZED - && maybe_registry_config.is_none() - && tarball_cache.npmrc.get_registry_config(&package_nv.name).auth_token.is_some() - { - bail!( - concat!( - "No auth for tarball URI, but present for scoped registry.\n\n", - "Tarball URI: {}\n", - "Scope URI: {}\n\n", - "More info here: https://github.com/npm/cli/wiki/%22No-auth-for-URI,-but-auth-present-for-scoped-registry%22" - ), - dist.tarball, - registry_url, - ) - } - return Err(err.into()) - }, - Err(err) => return Err(err.into()), - }; - match maybe_bytes { - Some(bytes) => { - let extraction_mode = if should_use_cache || !package_folder_exists { - TarballExtractionMode::SiblingTempDir - } else { - // The user ran with `--reload`, so overwrite the package instead of - // deleting it since the package might get corrupted if a user kills - // their deno process while it's deleting a package directory - // - // We can't rename this folder and delete it because the folder - // may be in use by another process or may now contain hardlinks, - // which will cause windows to throw an "AccessDenied" error when - // renaming. So we settle for overwriting. - TarballExtractionMode::Overwrite - }; - let dist = dist.clone(); - let package_nv = package_nv.clone(); - deno_core::unsync::spawn_blocking(move || { - verify_and_extract_tarball( - &package_nv, - &bytes, - &dist, - &package_folder, - extraction_mode, - ) - }) - .await? - } - None => { - bail!("Could not find npm package tarball at: {}", dist.tarball); - } - } - } - .map(|r| r.map_err(Arc::new)) - .boxed_local() - } -} diff --git a/cli/npm/managed/mod.rs b/cli/npm/managed/mod.rs index 2e64f5f188c27b..55421f41e8c39e 100644 --- a/cli/npm/managed/mod.rs +++ b/cli/npm/managed/mod.rs @@ -1,12 +1,10 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::borrow::Cow; use std::path::Path; use std::path::PathBuf; use std::sync::Arc; -use cache::RegistryInfoDownloader; -use cache::TarballCache; use deno_ast::ModuleSpecifier; use deno_cache_dir::npm::NpmCacheDir; use deno_core::anyhow::Context; @@ -22,10 +20,10 @@ use deno_npm::resolution::ValidSerializedNpmResolutionSnapshot; use deno_npm::NpmPackageId; use deno_npm::NpmResolutionPackage; use deno_npm::NpmSystemInfo; +use deno_npm_cache::NpmCacheSetting; +use deno_path_util::fs::canonicalize_path_maybe_not_exists; use deno_resolver::npm::CliNpmReqResolver; use deno_runtime::colors; -use deno_runtime::deno_fs::FileSystem; -use deno_runtime::deno_node::NodePermissions; use deno_runtime::ops::process::NpmProcessStateProvider; use deno_semver::package::PackageNv; use deno_semver::package::PackageReq; @@ -35,6 +33,16 @@ use node_resolver::InNpmPackageChecker; use node_resolver::NpmPackageFolderResolver; use resolution::AddPkgReqsResult; +use self::resolution::NpmResolution; +use self::resolvers::create_npm_fs_resolver; +use self::resolvers::NpmPackageFsResolver; +use super::CliNpmCache; +use super::CliNpmCacheHttpClient; +use super::CliNpmRegistryInfoProvider; +use super::CliNpmResolver; +use super::CliNpmTarballCache; +use super::InnerCliNpmResolverRef; +use super::ResolvePkgFolderFromDenoReqError; use crate::args::CliLockfile; use crate::args::LifecycleScriptsConfig; use crate::args::NpmInstallDepsProvider; @@ -42,23 +50,10 @@ use crate::args::NpmProcessState; use crate::args::NpmProcessStateKind; use crate::args::PackageJsonDepValueParseWithLocationError; use crate::cache::FastInsecureHasher; -use crate::http_util::HttpClientProvider; -use crate::util::fs::canonicalize_path_maybe_not_exists_with_fs; +use crate::sys::CliSys; use crate::util::progress_bar::ProgressBar; use crate::util::sync::AtomicFlag; -use self::cache::NpmCache; -use self::registry::CliNpmRegistryApi; -use self::resolution::NpmResolution; -use self::resolvers::create_npm_fs_resolver; -use self::resolvers::NpmPackageFsResolver; - -use super::CliNpmResolver; -use super::InnerCliNpmResolverRef; -use super::ResolvePkgFolderFromDenoReqError; - -pub mod cache; -mod registry; mod resolution; mod resolvers; @@ -70,10 +65,10 @@ pub enum CliNpmResolverManagedSnapshotOption { pub struct CliManagedNpmResolverCreateOptions { pub snapshot: CliNpmResolverManagedSnapshotOption, pub maybe_lockfile: Option>, - pub fs: Arc, pub http_client_provider: Arc, pub npm_cache_dir: Arc, - pub cache_setting: crate::args::CacheSetting, + pub sys: CliSys, + pub cache_setting: deno_cache_dir::file_fetcher::CacheSetting, pub text_only_progress_bar: crate::util::progress_bar::ProgressBar, pub maybe_node_modules_path: Option, pub npm_system_info: NpmSystemInfo, @@ -86,7 +81,11 @@ pub async fn create_managed_npm_resolver_for_lsp( options: CliManagedNpmResolverCreateOptions, ) -> Arc { let npm_cache = create_cache(&options); - let npm_api = create_api(&options, npm_cache.clone()); + let http_client = Arc::new(CliNpmCacheHttpClient::new( + options.http_client_provider.clone(), + options.text_only_progress_bar.clone(), + )); + let npm_api = create_api(npm_cache.clone(), http_client.clone(), &options); // spawn due to the lsp's `Send` requirement deno_core::unsync::spawn(async move { let snapshot = match resolve_snapshot(&npm_api, options.snapshot).await { @@ -97,14 +96,14 @@ pub async fn create_managed_npm_resolver_for_lsp( } }; create_inner( - options.fs, - options.http_client_provider, - options.maybe_lockfile, - npm_api, + http_client, npm_cache, - options.npmrc, options.npm_install_deps_provider, + npm_api, + options.sys, options.text_only_progress_bar, + options.maybe_lockfile, + options.npmrc, options.maybe_node_modules_path, options.npm_system_info, snapshot, @@ -119,17 +118,21 @@ pub async fn create_managed_npm_resolver( options: CliManagedNpmResolverCreateOptions, ) -> Result, AnyError> { let npm_cache = create_cache(&options); - let npm_api = create_api(&options, npm_cache.clone()); - let snapshot = resolve_snapshot(&npm_api, options.snapshot).await?; + let http_client = Arc::new(CliNpmCacheHttpClient::new( + options.http_client_provider.clone(), + options.text_only_progress_bar.clone(), + )); + let api = create_api(npm_cache.clone(), http_client.clone(), &options); + let snapshot = resolve_snapshot(&api, options.snapshot).await?; Ok(create_inner( - options.fs, - options.http_client_provider, - options.maybe_lockfile, - npm_api, + http_client, npm_cache, - options.npmrc, options.npm_install_deps_provider, + api, + options.sys, options.text_only_progress_bar, + options.maybe_lockfile, + options.npmrc, options.maybe_node_modules_path, options.npm_system_info, snapshot, @@ -139,50 +142,50 @@ pub async fn create_managed_npm_resolver( #[allow(clippy::too_many_arguments)] fn create_inner( - fs: Arc, - http_client_provider: Arc, - maybe_lockfile: Option>, - npm_api: Arc, - npm_cache: Arc, - npm_rc: Arc, + http_client: Arc, + npm_cache: Arc, npm_install_deps_provider: Arc, + registry_info_provider: Arc, + sys: CliSys, text_only_progress_bar: crate::util::progress_bar::ProgressBar, + maybe_lockfile: Option>, + npm_rc: Arc, node_modules_dir_path: Option, npm_system_info: NpmSystemInfo, snapshot: Option, lifecycle_scripts: LifecycleScriptsConfig, ) -> Arc { let resolution = Arc::new(NpmResolution::from_serialized( - npm_api.clone(), + registry_info_provider.clone(), snapshot, maybe_lockfile.clone(), )); - let tarball_cache = Arc::new(TarballCache::new( + let tarball_cache = Arc::new(CliNpmTarballCache::new( npm_cache.clone(), - fs.clone(), - http_client_provider.clone(), + http_client, + sys.clone(), npm_rc.clone(), - text_only_progress_bar.clone(), )); + let fs_resolver = create_npm_fs_resolver( - fs.clone(), npm_cache.clone(), &npm_install_deps_provider, &text_only_progress_bar, resolution.clone(), + sys.clone(), tarball_cache.clone(), node_modules_dir_path, npm_system_info.clone(), lifecycle_scripts.clone(), ); Arc::new(ManagedCliNpmResolver::new( - fs, fs_resolver, maybe_lockfile, - npm_api, + registry_info_provider, npm_cache, npm_install_deps_provider, resolution, + sys, tarball_cache, text_only_progress_bar, npm_system_info, @@ -190,41 +193,44 @@ fn create_inner( )) } -fn create_cache(options: &CliManagedNpmResolverCreateOptions) -> Arc { - Arc::new(NpmCache::new( +fn create_cache( + options: &CliManagedNpmResolverCreateOptions, +) -> Arc { + Arc::new(CliNpmCache::new( options.npm_cache_dir.clone(), - options.cache_setting.clone(), + options.sys.clone(), + NpmCacheSetting::from_cache_setting(&options.cache_setting), options.npmrc.clone(), )) } fn create_api( + cache: Arc, + http_client: Arc, options: &CliManagedNpmResolverCreateOptions, - npm_cache: Arc, -) -> Arc { - Arc::new(CliNpmRegistryApi::new( - npm_cache.clone(), - Arc::new(RegistryInfoDownloader::new( - npm_cache, - options.http_client_provider.clone(), - options.npmrc.clone(), - options.text_only_progress_bar.clone(), - )), +) -> Arc { + Arc::new(CliNpmRegistryInfoProvider::new( + cache, + http_client, + options.npmrc.clone(), )) } async fn resolve_snapshot( - api: &CliNpmRegistryApi, + registry_info_provider: &Arc, snapshot: CliNpmResolverManagedSnapshotOption, ) -> Result, AnyError> { match snapshot { CliNpmResolverManagedSnapshotOption::ResolveFromLockfile(lockfile) => { if !lockfile.overwrite() { - let snapshot = snapshot_from_lockfile(lockfile.clone(), api) - .await - .with_context(|| { - format!("failed reading lockfile '{}'", lockfile.filename.display()) - })?; + let snapshot = snapshot_from_lockfile( + lockfile.clone(), + ®istry_info_provider.as_npm_registry_api(), + ) + .await + .with_context(|| { + format!("failed reading lockfile '{}'", lockfile.filename.display()) + })?; Ok(Some(snapshot)) } else { Ok(None) @@ -285,17 +291,23 @@ pub fn create_managed_in_npm_pkg_checker( Arc::new(ManagedInNpmPackageChecker { root_dir }) } +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum PackageCaching<'a> { + Only(Cow<'a, [PackageReq]>), + All, +} + /// An npm resolver where the resolution is managed by Deno rather than /// the user bringing their own node_modules (BYONM) on the file system. pub struct ManagedCliNpmResolver { - fs: Arc, fs_resolver: Arc, maybe_lockfile: Option>, - npm_api: Arc, - npm_cache: Arc, + registry_info_provider: Arc, + npm_cache: Arc, npm_install_deps_provider: Arc, + sys: CliSys, resolution: Arc, - tarball_cache: Arc, + tarball_cache: Arc, text_only_progress_bar: ProgressBar, npm_system_info: NpmSystemInfo, top_level_install_flag: AtomicFlag, @@ -313,27 +325,27 @@ impl std::fmt::Debug for ManagedCliNpmResolver { impl ManagedCliNpmResolver { #[allow(clippy::too_many_arguments)] pub fn new( - fs: Arc, fs_resolver: Arc, maybe_lockfile: Option>, - npm_api: Arc, - npm_cache: Arc, + registry_info_provider: Arc, + npm_cache: Arc, npm_install_deps_provider: Arc, resolution: Arc, - tarball_cache: Arc, + sys: CliSys, + tarball_cache: Arc, text_only_progress_bar: ProgressBar, npm_system_info: NpmSystemInfo, lifecycle_scripts: LifecycleScriptsConfig, ) -> Self { Self { - fs, fs_resolver, maybe_lockfile, - npm_api, + registry_info_provider, npm_cache, npm_install_deps_provider, text_only_progress_bar, resolution, + sys, tarball_cache, npm_system_info, top_level_install_flag: Default::default(), @@ -346,8 +358,7 @@ impl ManagedCliNpmResolver { pkg_id: &NpmPackageId, ) -> Result { let path = self.fs_resolver.package_folder(pkg_id)?; - let path = - canonicalize_path_maybe_not_exists_with_fs(&path, self.fs.as_ref())?; + let path = canonicalize_path_maybe_not_exists(&self.sys, &path)?; log::debug!( "Resolved package folder of {} to {}", pkg_id.as_serialized(), @@ -409,19 +420,44 @@ impl ManagedCliNpmResolver { /// Adds package requirements to the resolver and ensures everything is setup. /// This includes setting up the `node_modules` directory, if applicable. + pub async fn add_and_cache_package_reqs( + &self, + packages: &[PackageReq], + ) -> Result<(), AnyError> { + self + .add_package_reqs_raw( + packages, + Some(PackageCaching::Only(packages.into())), + ) + .await + .dependencies_result + } + + pub async fn add_package_reqs_no_cache( + &self, + packages: &[PackageReq], + ) -> Result<(), AnyError> { + self + .add_package_reqs_raw(packages, None) + .await + .dependencies_result + } + pub async fn add_package_reqs( &self, packages: &[PackageReq], + caching: PackageCaching<'_>, ) -> Result<(), AnyError> { self - .add_package_reqs_raw(packages) + .add_package_reqs_raw(packages, Some(caching)) .await .dependencies_result } - pub async fn add_package_reqs_raw( + pub async fn add_package_reqs_raw<'a>( &self, packages: &[PackageReq], + caching: Option>, ) -> AddPkgReqsResult { if packages.is_empty() { return AddPkgReqsResult { @@ -438,7 +474,9 @@ impl ManagedCliNpmResolver { } } if result.dependencies_result.is_ok() { - result.dependencies_result = self.cache_packages().await; + if let Some(caching) = caching { + result.dependencies_result = self.cache_packages(caching).await; + } } result @@ -480,16 +518,20 @@ impl ManagedCliNpmResolver { pub async fn inject_synthetic_types_node_package( &self, ) -> Result<(), AnyError> { + let reqs = &[PackageReq::from_str("@types/node").unwrap()]; // add and ensure this isn't added to the lockfile self - .add_package_reqs(&[PackageReq::from_str("@types/node").unwrap()]) + .add_package_reqs(reqs, PackageCaching::Only(reqs.into())) .await?; Ok(()) } - pub async fn cache_packages(&self) -> Result<(), AnyError> { - self.fs_resolver.cache_packages().await + pub async fn cache_packages( + &self, + caching: PackageCaching<'_>, + ) -> Result<(), AnyError> { + self.fs_resolver.cache_packages(caching).await } pub fn resolve_pkg_folder_from_deno_module( @@ -500,7 +542,7 @@ impl ManagedCliNpmResolver { self.resolve_pkg_folder_from_pkg_id(&pkg_id) } - fn resolve_pkg_id_from_pkg_req( + pub fn resolve_pkg_id_from_pkg_req( &self, req: &PackageReq, ) -> Result { @@ -511,11 +553,11 @@ impl ManagedCliNpmResolver { &self, ) -> Result<(), Box> { for err in self.npm_install_deps_provider.pkg_json_dep_errors() { - match &err.source { - deno_package_json::PackageJsonDepValueParseError::VersionReq(_) => { + match err.source.as_kind() { + deno_package_json::PackageJsonDepValueParseErrorKind::VersionReq(_) => { return Err(Box::new(err.clone())); } - deno_package_json::PackageJsonDepValueParseError::Unsupported { + deno_package_json::PackageJsonDepValueParseErrorKind::Unsupported { .. } => { // only warn for this one @@ -534,18 +576,18 @@ impl ManagedCliNpmResolver { /// Ensures that the top level `package.json` dependencies are installed. /// This may set up the `node_modules` directory. /// - /// Returns `true` if any changes (such as caching packages) were made. - /// If this returns `false`, `node_modules` has _not_ been set up. + /// Returns `true` if the top level packages are already installed. A + /// return value of `false` means that new packages were added to the NPM resolution. pub async fn ensure_top_level_package_json_install( &self, ) -> Result { if !self.top_level_install_flag.raise() { - return Ok(false); // already did this + return Ok(true); // already did this } let pkg_json_remote_pkgs = self.npm_install_deps_provider.remote_pkgs(); if pkg_json_remote_pkgs.is_empty() { - return Ok(false); + return Ok(true); } // check if something needs resolving before bothering to load all @@ -559,14 +601,16 @@ impl ManagedCliNpmResolver { log::debug!( "All package.json deps resolvable. Skipping top level install." ); - return Ok(false); // everything is already resolvable + return Ok(true); // everything is already resolvable } let pkg_reqs = pkg_json_remote_pkgs .iter() .map(|pkg| pkg.req.clone()) .collect::>(); - self.add_package_reqs(&pkg_reqs).await.map(|_| true) + self.add_package_reqs_no_cache(&pkg_reqs).await?; + + Ok(false) } pub async fn cache_package_info( @@ -575,7 +619,7 @@ impl ManagedCliNpmResolver { ) -> Result, AnyError> { // this will internally cache the package information self - .npm_api + .registry_info_provider .package_info(package_name) .await .map_err(|err| err.into()) @@ -616,12 +660,13 @@ impl NpmPackageFolderResolver for ManagedCliNpmResolver { .fs_resolver .resolve_package_folder_from_package(name, referrer)?; let path = - canonicalize_path_maybe_not_exists_with_fs(&path, self.fs.as_ref()) - .map_err(|err| PackageFolderResolveIoError { + canonicalize_path_maybe_not_exists(&self.sys, &path).map_err(|err| { + PackageFolderResolveIoError { package_name: name.to_string(), referrer: referrer.clone(), source: err, - })?; + } + })?; log::debug!("Resolved {} from {} to {}", name, referrer, path.display()); Ok(path) } @@ -671,29 +716,29 @@ impl CliNpmResolver for ManagedCliNpmResolver { fn clone_snapshotted(&self) -> Arc { // create a new snapshotted npm resolution and resolver let npm_resolution = Arc::new(NpmResolution::new( - self.npm_api.clone(), + self.registry_info_provider.clone(), self.resolution.snapshot(), self.maybe_lockfile.clone(), )); Arc::new(ManagedCliNpmResolver::new( - self.fs.clone(), create_npm_fs_resolver( - self.fs.clone(), self.npm_cache.clone(), &self.npm_install_deps_provider, &self.text_only_progress_bar, npm_resolution.clone(), + self.sys.clone(), self.tarball_cache.clone(), self.root_node_modules_path().map(ToOwned::to_owned), self.npm_system_info.clone(), self.lifecycle_scripts.clone(), ), self.maybe_lockfile.clone(), - self.npm_api.clone(), + self.registry_info_provider.clone(), self.npm_cache.clone(), self.npm_install_deps_provider.clone(), npm_resolution, + self.sys.clone(), self.tarball_cache.clone(), self.text_only_progress_bar.clone(), self.npm_system_info.clone(), @@ -709,14 +754,6 @@ impl CliNpmResolver for ManagedCliNpmResolver { self.fs_resolver.node_modules_path() } - fn ensure_read_permission<'a>( - &self, - permissions: &mut dyn NodePermissions, - path: &'a Path, - ) -> Result, AnyError> { - self.fs_resolver.ensure_read_permission(permissions, path) - } - fn check_state_hash(&self) -> Option { // We could go further and check all the individual // npm packages, but that's probably overkill. diff --git a/cli/npm/managed/registry.rs b/cli/npm/managed/registry.rs deleted file mode 100644 index 8f15d619b93ffb..00000000000000 --- a/cli/npm/managed/registry.rs +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. - -use std::collections::HashMap; -use std::collections::HashSet; -use std::sync::Arc; - -use async_trait::async_trait; -use deno_core::anyhow::anyhow; -use deno_core::error::AnyError; -use deno_core::futures::future::BoxFuture; -use deno_core::futures::future::Shared; -use deno_core::futures::FutureExt; -use deno_core::parking_lot::Mutex; -use deno_npm::registry::NpmPackageInfo; -use deno_npm::registry::NpmRegistryApi; -use deno_npm::registry::NpmRegistryPackageInfoLoadError; - -use crate::args::CacheSetting; -use crate::util::sync::AtomicFlag; - -use super::cache::NpmCache; -use super::cache::RegistryInfoDownloader; - -#[derive(Debug)] -pub struct CliNpmRegistryApi(Option>); - -impl CliNpmRegistryApi { - pub fn new( - cache: Arc, - registry_info_downloader: Arc, - ) -> Self { - Self(Some(Arc::new(CliNpmRegistryApiInner { - cache, - force_reload_flag: Default::default(), - mem_cache: Default::default(), - previously_reloaded_packages: Default::default(), - registry_info_downloader, - }))) - } - - /// Clears the internal memory cache. - pub fn clear_memory_cache(&self) { - self.inner().clear_memory_cache(); - } - - fn inner(&self) -> &Arc { - // this panicking indicates a bug in the code where this - // wasn't initialized - self.0.as_ref().unwrap() - } -} - -#[async_trait(?Send)] -impl NpmRegistryApi for CliNpmRegistryApi { - async fn package_info( - &self, - name: &str, - ) -> Result, NpmRegistryPackageInfoLoadError> { - match self.inner().maybe_package_info(name).await { - Ok(Some(info)) => Ok(info), - Ok(None) => Err(NpmRegistryPackageInfoLoadError::PackageNotExists { - package_name: name.to_string(), - }), - Err(err) => { - Err(NpmRegistryPackageInfoLoadError::LoadError(Arc::new(err))) - } - } - } - - fn mark_force_reload(&self) -> bool { - self.inner().mark_force_reload() - } -} - -type CacheItemPendingResult = - Result>, Arc>; - -#[derive(Debug)] -enum CacheItem { - Pending(Shared>), - Resolved(Option>), -} - -#[derive(Debug)] -struct CliNpmRegistryApiInner { - cache: Arc, - force_reload_flag: AtomicFlag, - mem_cache: Mutex>, - previously_reloaded_packages: Mutex>, - registry_info_downloader: Arc, -} - -impl CliNpmRegistryApiInner { - pub async fn maybe_package_info( - self: &Arc, - name: &str, - ) -> Result>, AnyError> { - let (created, future) = { - let mut mem_cache = self.mem_cache.lock(); - match mem_cache.get(name) { - Some(CacheItem::Resolved(maybe_info)) => { - return Ok(maybe_info.clone()); - } - Some(CacheItem::Pending(future)) => (false, future.clone()), - None => { - let future = { - let api = self.clone(); - let name = name.to_string(); - async move { - if (api.cache.cache_setting().should_use_for_npm_package(&name) && !api.force_reload_flag.is_raised()) - // if this has been previously reloaded, then try loading from the - // file system cache - || !api.previously_reloaded_packages.lock().insert(name.to_string()) - { - // attempt to load from the file cache - if let Some(info) = api.load_file_cached_package_info(&name).await { - let result = Some(Arc::new(info)); - return Ok(result); - } - } - api.registry_info_downloader - .load_package_info(&name) - .await - .map_err(Arc::new) - } - .boxed() - .shared() - }; - mem_cache - .insert(name.to_string(), CacheItem::Pending(future.clone())); - (true, future) - } - } - }; - - if created { - match future.await { - Ok(maybe_info) => { - // replace the cache item to say it's resolved now - self - .mem_cache - .lock() - .insert(name.to_string(), CacheItem::Resolved(maybe_info.clone())); - Ok(maybe_info) - } - Err(err) => { - // purge the item from the cache so it loads next time - self.mem_cache.lock().remove(name); - Err(anyhow!("{:#}", err)) - } - } - } else { - Ok(future.await.map_err(|err| anyhow!("{:#}", err))?) - } - } - - fn mark_force_reload(&self) -> bool { - // never force reload the registry information if reloading - // is disabled or if we're already reloading - if matches!( - self.cache.cache_setting(), - CacheSetting::Only | CacheSetting::ReloadAll - ) { - return false; - } - if self.force_reload_flag.raise() { - self.clear_memory_cache(); - true - } else { - false - } - } - - async fn load_file_cached_package_info( - &self, - name: &str, - ) -> Option { - let result = deno_core::unsync::spawn_blocking({ - let cache = self.cache.clone(); - let name = name.to_string(); - move || cache.load_package_info(&name) - }) - .await - .unwrap(); - match result { - Ok(value) => value, - Err(err) => { - if cfg!(debug_assertions) { - panic!("error loading cached npm package info for {name}: {err:#}"); - } else { - None - } - } - } - } - - fn clear_memory_cache(&self) { - self.mem_cache.lock().clear(); - } -} diff --git a/cli/npm/managed/resolution.rs b/cli/npm/managed/resolution.rs index ecfe5cb25cdcf5..12f7b17565810e 100644 --- a/cli/npm/managed/resolution.rs +++ b/cli/npm/managed/resolution.rs @@ -1,18 +1,18 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::collections::HashMap; use std::collections::HashSet; use std::sync::Arc; +use capacity_builder::StringBuilder; use deno_core::error::AnyError; use deno_lockfile::NpmPackageDependencyLockfileInfo; use deno_lockfile::NpmPackageLockfileInfo; use deno_npm::registry::NpmRegistryApi; +use deno_npm::resolution::AddPkgReqsOptions; use deno_npm::resolution::NpmPackagesPartitioned; use deno_npm::resolution::NpmResolutionError; use deno_npm::resolution::NpmResolutionSnapshot; -use deno_npm::resolution::NpmResolutionSnapshotPendingResolver; -use deno_npm::resolution::NpmResolutionSnapshotPendingResolverOptions; use deno_npm::resolution::PackageCacheFolderIdNotFoundError; use deno_npm::resolution::PackageNotFoundFromReferrerError; use deno_npm::resolution::PackageNvNotFoundError; @@ -25,13 +25,13 @@ use deno_npm::NpmSystemInfo; use deno_semver::jsr::JsrDepPackageReq; use deno_semver::package::PackageNv; use deno_semver::package::PackageReq; +use deno_semver::SmallStackString; use deno_semver::VersionReq; use crate::args::CliLockfile; +use crate::npm::CliNpmRegistryInfoProvider; use crate::util::sync::SyncReadAsyncWriteLock; -use super::CliNpmRegistryApi; - pub struct AddPkgReqsResult { /// Results from adding the individual packages. /// @@ -48,7 +48,7 @@ pub struct AddPkgReqsResult { /// /// This does not interact with the file system. pub struct NpmResolution { - api: Arc, + registry_info_provider: Arc, snapshot: SyncReadAsyncWriteLock, maybe_lockfile: Option>, } @@ -64,22 +64,22 @@ impl std::fmt::Debug for NpmResolution { impl NpmResolution { pub fn from_serialized( - api: Arc, + registry_info_provider: Arc, initial_snapshot: Option, maybe_lockfile: Option>, ) -> Self { let snapshot = NpmResolutionSnapshot::new(initial_snapshot.unwrap_or_default()); - Self::new(api, snapshot, maybe_lockfile) + Self::new(registry_info_provider, snapshot, maybe_lockfile) } pub fn new( - api: Arc, + registry_info_provider: Arc, initial_snapshot: NpmResolutionSnapshot, maybe_lockfile: Option>, ) -> Self { Self { - api, + registry_info_provider, snapshot: SyncReadAsyncWriteLock::new(initial_snapshot), maybe_lockfile, } @@ -92,7 +92,7 @@ impl NpmResolution { // only allow one thread in here at a time let snapshot_lock = self.snapshot.acquire().await; let result = add_package_reqs_to_snapshot( - &self.api, + &self.registry_info_provider, package_reqs, self.maybe_lockfile.clone(), || snapshot_lock.read().clone(), @@ -120,7 +120,7 @@ impl NpmResolution { let reqs_set = package_reqs.iter().collect::>(); let snapshot = add_package_reqs_to_snapshot( - &self.api, + &self.registry_info_provider, package_reqs, self.maybe_lockfile.clone(), || { @@ -257,10 +257,14 @@ impl NpmResolution { .read() .as_valid_serialized_for_system(system_info) } + + pub fn subset(&self, package_reqs: &[PackageReq]) -> NpmResolutionSnapshot { + self.snapshot.read().subset(package_reqs) + } } async fn add_package_reqs_to_snapshot( - api: &CliNpmRegistryApi, + registry_info_provider: &Arc, package_reqs: &[PackageReq], maybe_lockfile: Option>, get_new_snapshot: impl Fn() -> NpmResolutionSnapshot, @@ -283,23 +287,28 @@ async fn add_package_reqs_to_snapshot( /* this string is used in tests */ "Running npm resolution." ); - let pending_resolver = get_npm_pending_resolver(api); - let result = pending_resolver.add_pkg_reqs(snapshot, package_reqs).await; - api.clear_memory_cache(); + let npm_registry_api = registry_info_provider.as_npm_registry_api(); + let result = snapshot + .add_pkg_reqs(&npm_registry_api, get_add_pkg_reqs_options(package_reqs)) + .await; let result = match &result.dep_graph_result { - Err(NpmResolutionError::Resolution(err)) if api.mark_force_reload() => { + Err(NpmResolutionError::Resolution(err)) + if npm_registry_api.mark_force_reload() => + { log::debug!("{err:#}"); log::debug!("npm resolution failed. Trying again..."); - // try again + // try again with forced reloading let snapshot = get_new_snapshot(); - let result = pending_resolver.add_pkg_reqs(snapshot, package_reqs).await; - api.clear_memory_cache(); - result + snapshot + .add_pkg_reqs(&npm_registry_api, get_add_pkg_reqs_options(package_reqs)) + .await } _ => result, }; + registry_info_provider.clear_memory_cache(); + if let Ok(snapshot) = &result.dep_graph_result { if let Some(lockfile) = maybe_lockfile { populate_lockfile_from_snapshot(&lockfile, snapshot); @@ -309,19 +318,15 @@ async fn add_package_reqs_to_snapshot( result } -fn get_npm_pending_resolver( - api: &CliNpmRegistryApi, -) -> NpmResolutionSnapshotPendingResolver { - NpmResolutionSnapshotPendingResolver::new( - NpmResolutionSnapshotPendingResolverOptions { - api, - // WARNING: When bumping this version, check if anything needs to be - // updated in the `setNodeOnlyGlobalNames` call in 99_main_compiler.js - types_node_version_req: Some( - VersionReq::parse_from_npm("22.0.0 - 22.5.4").unwrap(), - ), - }, - ) +fn get_add_pkg_reqs_options(package_reqs: &[PackageReq]) -> AddPkgReqsOptions { + AddPkgReqsOptions { + package_reqs, + // WARNING: When bumping this version, check if anything needs to be + // updated in the `setNodeOnlyGlobalNames` call in 99_main_compiler.js + types_node_version_req: Some( + VersionReq::parse_from_npm("22.0.0 - 22.5.4").unwrap(), + ), + } } fn populate_lockfile_from_snapshot( @@ -333,7 +338,13 @@ fn populate_lockfile_from_snapshot( let id = &snapshot.resolve_package_from_deno_module(nv).unwrap().id; lockfile.insert_package_specifier( JsrDepPackageReq::npm(package_req.clone()), - format!("{}{}", id.nv.version, id.peer_deps_serialized()), + { + StringBuilder::::build(|builder| { + builder.append(&id.nv.version); + builder.append(&id.peer_dependencies); + }) + .unwrap() + }, ); } for package in snapshot.all_packages_for_every_system() { diff --git a/cli/npm/managed/resolvers/common.rs b/cli/npm/managed/resolvers/common.rs index eee11c7604952f..66d991bd496100 100644 --- a/cli/npm/managed/resolvers/common.rs +++ b/cli/npm/managed/resolvers/common.rs @@ -1,30 +1,19 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. pub mod bin_entries; pub mod lifecycle_scripts; -use std::borrow::Cow; -use std::collections::HashMap; -use std::io::ErrorKind; use std::path::Path; use std::path::PathBuf; -use std::sync::Arc; -use std::sync::Mutex; use async_trait::async_trait; use deno_ast::ModuleSpecifier; -use deno_core::anyhow::Context; use deno_core::error::AnyError; -use deno_core::futures; -use deno_core::futures::StreamExt; use deno_npm::NpmPackageCacheFolderId; use deno_npm::NpmPackageId; -use deno_npm::NpmResolutionPackage; -use deno_runtime::deno_fs::FileSystem; -use deno_runtime::deno_node::NodePermissions; use node_resolver::errors::PackageFolderResolveError; -use crate::npm::managed::cache::TarballCache; +use super::super::PackageCaching; /// Part of the resolution that interacts with the file system. #[async_trait(?Send)] @@ -57,102 +46,8 @@ pub trait NpmPackageFsResolver: Send + Sync { specifier: &ModuleSpecifier, ) -> Result, AnyError>; - async fn cache_packages(&self) -> Result<(), AnyError>; - - #[must_use = "the resolved return value to mitigate time-of-check to time-of-use issues"] - fn ensure_read_permission<'a>( - &self, - permissions: &mut dyn NodePermissions, - path: &'a Path, - ) -> Result, AnyError>; -} - -#[derive(Debug)] -pub struct RegistryReadPermissionChecker { - fs: Arc, - cache: Mutex>, - registry_path: PathBuf, -} - -impl RegistryReadPermissionChecker { - pub fn new(fs: Arc, registry_path: PathBuf) -> Self { - Self { - fs, - registry_path, - cache: Default::default(), - } - } - - pub fn ensure_registry_read_permission<'a>( + async fn cache_packages<'a>( &self, - permissions: &mut dyn NodePermissions, - path: &'a Path, - ) -> Result, AnyError> { - if permissions.query_read_all() { - return Ok(Cow::Borrowed(path)); // skip permissions checks below - } - - // allow reading if it's in the node_modules - let is_path_in_node_modules = path.starts_with(&self.registry_path) - && path - .components() - .all(|c| !matches!(c, std::path::Component::ParentDir)); - - if is_path_in_node_modules { - let mut cache = self.cache.lock().unwrap(); - let mut canonicalize = - |path: &Path| -> Result, AnyError> { - match cache.get(path) { - Some(canon) => Ok(Some(canon.clone())), - None => match self.fs.realpath_sync(path) { - Ok(canon) => { - cache.insert(path.to_path_buf(), canon.clone()); - Ok(Some(canon)) - } - Err(e) => { - if e.kind() == ErrorKind::NotFound { - return Ok(None); - } - Err(AnyError::from(e)).with_context(|| { - format!("failed canonicalizing '{}'", path.display()) - }) - } - }, - } - }; - if let Some(registry_path_canon) = canonicalize(&self.registry_path)? { - if let Some(path_canon) = canonicalize(path)? { - if path_canon.starts_with(registry_path_canon) { - return Ok(Cow::Owned(path_canon)); - } - } else if path.starts_with(registry_path_canon) - || path.starts_with(&self.registry_path) - { - return Ok(Cow::Borrowed(path)); - } - } - } - - permissions.check_read_path(path).map_err(Into::into) - } -} - -/// Caches all the packages in parallel. -pub async fn cache_packages( - packages: &[NpmResolutionPackage], - tarball_cache: &Arc, -) -> Result<(), AnyError> { - let mut futures_unordered = futures::stream::FuturesUnordered::new(); - for package in packages { - futures_unordered.push(async move { - tarball_cache - .ensure_package(&package.id.nv, &package.dist) - .await - }); - } - while let Some(result) = futures_unordered.next().await { - // surface the first error - result?; - } - Ok(()) + caching: PackageCaching<'a>, + ) -> Result<(), AnyError>; } diff --git a/cli/npm/managed/resolvers/common/bin_entries.rs b/cli/npm/managed/resolvers/common/bin_entries.rs index e4a1845689c155..32ebd687467e4f 100644 --- a/cli/npm/managed/resolvers/common/bin_entries.rs +++ b/cli/npm/managed/resolvers/common/bin_entries.rs @@ -1,16 +1,18 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::npm::managed::NpmResolutionPackage; -use deno_core::anyhow::Context; -use deno_core::error::AnyError; -use deno_npm::resolution::NpmResolutionSnapshot; -use deno_npm::NpmPackageId; use std::collections::HashMap; use std::collections::HashSet; use std::collections::VecDeque; use std::path::Path; use std::path::PathBuf; +use deno_core::anyhow::Context; +use deno_core::error::AnyError; +use deno_npm::resolution::NpmResolutionSnapshot; +use deno_npm::NpmPackageId; + +use crate::npm::managed::NpmResolutionPackage; + #[derive(Default)] pub struct BinEntries<'a> { /// Packages that have colliding bin names @@ -28,8 +30,10 @@ fn default_bin_name(package: &NpmResolutionPackage) -> &str { .id .nv .name + .as_str() .rsplit_once('/') - .map_or(package.id.nv.name.as_str(), |(_, name)| name) + .map(|(_, name)| name) + .unwrap_or(package.id.nv.name.as_str()) } pub fn warn_missing_entrypoint( diff --git a/cli/npm/managed/resolvers/common/lifecycle_scripts.rs b/cli/npm/managed/resolvers/common/lifecycle_scripts.rs index 5c5755c8197d98..738326ad22dc46 100644 --- a/cli/npm/managed/resolvers/common/lifecycle_scripts.rs +++ b/cli/npm/managed/resolvers/common/lifecycle_scripts.rs @@ -1,23 +1,24 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use super::bin_entries::BinEntries; -use crate::args::LifecycleScriptsConfig; -use crate::task_runner::TaskStdio; -use crate::util::progress_bar::ProgressBar; -use deno_core::anyhow::Context; -use deno_npm::resolution::NpmResolutionSnapshot; -use deno_runtime::deno_io::FromRawIoHandle; -use deno_semver::package::PackageNv; -use deno_semver::Version; use std::borrow::Cow; use std::collections::HashSet; -use std::rc::Rc; - use std::path::Path; use std::path::PathBuf; +use std::rc::Rc; +use deno_core::anyhow::Context; use deno_core::error::AnyError; +use deno_npm::resolution::NpmResolutionSnapshot; use deno_npm::NpmResolutionPackage; +use deno_runtime::deno_io::FromRawIoHandle; +use deno_semver::package::PackageNv; +use deno_semver::Version; +use deno_task_shell::KillSignal; + +use super::bin_entries::BinEntries; +use crate::args::LifecycleScriptsConfig; +use crate::task_runner::TaskStdio; +use crate::util::progress_bar::ProgressBar; pub trait LifecycleScriptsStrategy { fn can_run_scripts(&self) -> bool { @@ -155,6 +156,29 @@ impl<'a> LifecycleScripts<'a> { packages: &[NpmResolutionPackage], root_node_modules_dir_path: &Path, progress_bar: &ProgressBar, + ) -> Result<(), AnyError> { + let kill_signal = KillSignal::default(); + let _drop_signal = kill_signal.clone().drop_guard(); + // we don't run with signals forwarded because once signals + // are setup then they're process wide. + self + .finish_with_cancellation( + snapshot, + packages, + root_node_modules_dir_path, + progress_bar, + kill_signal, + ) + .await + } + + async fn finish_with_cancellation( + self, + snapshot: &NpmResolutionSnapshot, + packages: &[NpmResolutionPackage], + root_node_modules_dir_path: &Path, + progress_bar: &ProgressBar, + kill_signal: KillSignal, ) -> Result<(), AnyError> { self.warn_not_run_scripts()?; let get_package_path = @@ -182,6 +206,12 @@ impl<'a> LifecycleScripts<'a> { ); let mut env_vars = crate::task_runner::real_env_vars(); + // so the subprocess can detect that it is running as part of a lifecycle script, + // and avoid trying to set up node_modules again + env_vars.insert( + LIFECYCLE_SCRIPTS_RUNNING_ENV_VAR.to_string(), + "1".to_string(), + ); // we want to pass the current state of npm resolution down to the deno subprocess // (that may be running as part of the script). we do this with an inherited temp file // @@ -240,6 +270,7 @@ impl<'a> LifecycleScripts<'a> { stderr: TaskStdio::piped(), stdout: TaskStdio::piped(), }), + kill_signal: kill_signal.clone(), }, ) .await?; @@ -303,6 +334,13 @@ impl<'a> LifecycleScripts<'a> { } } +const LIFECYCLE_SCRIPTS_RUNNING_ENV_VAR: &str = + "DENO_INTERNAL_IS_LIFECYCLE_SCRIPT"; + +pub fn is_running_lifecycle_script() -> bool { + std::env::var(LIFECYCLE_SCRIPTS_RUNNING_ENV_VAR).is_ok() +} + // take in all (non copy) packages from snapshot, // and resolve the set of available binaries to create // custom commands available to the task runner diff --git a/cli/npm/managed/resolvers/global.rs b/cli/npm/managed/resolvers/global.rs index f0193e78e95cf2..417345cefebd2e 100644 --- a/cli/npm/managed/resolvers/global.rs +++ b/cli/npm/managed/resolvers/global.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. //! Code for global npm cache resolution. @@ -7,56 +7,48 @@ use std::path::Path; use std::path::PathBuf; use std::sync::Arc; -use crate::colors; use async_trait::async_trait; use deno_ast::ModuleSpecifier; use deno_core::error::AnyError; +use deno_core::futures::stream::FuturesUnordered; +use deno_core::futures::StreamExt; use deno_npm::NpmPackageCacheFolderId; use deno_npm::NpmPackageId; use deno_npm::NpmResolutionPackage; use deno_npm::NpmSystemInfo; -use deno_runtime::deno_fs::FileSystem; -use deno_runtime::deno_node::NodePermissions; use node_resolver::errors::PackageFolderResolveError; use node_resolver::errors::PackageNotFoundError; use node_resolver::errors::ReferrerNotFoundError; -use crate::args::LifecycleScriptsConfig; -use crate::cache::FastInsecureHasher; - -use super::super::cache::NpmCache; -use super::super::cache::TarballCache; use super::super::resolution::NpmResolution; -use super::common::cache_packages; use super::common::lifecycle_scripts::LifecycleScriptsStrategy; use super::common::NpmPackageFsResolver; -use super::common::RegistryReadPermissionChecker; +use crate::args::LifecycleScriptsConfig; +use crate::cache::FastInsecureHasher; +use crate::colors; +use crate::npm::managed::PackageCaching; +use crate::npm::CliNpmCache; +use crate::npm::CliNpmTarballCache; /// Resolves packages from the global npm cache. #[derive(Debug)] pub struct GlobalNpmPackageResolver { - cache: Arc, - tarball_cache: Arc, + cache: Arc, + tarball_cache: Arc, resolution: Arc, system_info: NpmSystemInfo, - registry_read_permission_checker: RegistryReadPermissionChecker, lifecycle_scripts: LifecycleScriptsConfig, } impl GlobalNpmPackageResolver { pub fn new( - cache: Arc, - fs: Arc, - tarball_cache: Arc, + cache: Arc, + tarball_cache: Arc, resolution: Arc, system_info: NpmSystemInfo, lifecycle_scripts: LifecycleScriptsConfig, ) -> Self { Self { - registry_read_permission_checker: RegistryReadPermissionChecker::new( - fs, - cache.root_dir_path().to_path_buf(), - ), cache, tarball_cache, resolution, @@ -150,10 +142,19 @@ impl NpmPackageFsResolver for GlobalNpmPackageResolver { ) } - async fn cache_packages(&self) -> Result<(), AnyError> { - let package_partitions = self - .resolution - .all_system_packages_partitioned(&self.system_info); + async fn cache_packages<'a>( + &self, + caching: PackageCaching<'a>, + ) -> Result<(), AnyError> { + let package_partitions = match caching { + PackageCaching::All => self + .resolution + .all_system_packages_partitioned(&self.system_info), + PackageCaching::Only(reqs) => self + .resolution + .subset(&reqs) + .all_system_packages_partitioned(&self.system_info), + }; cache_packages(&package_partitions.packages, &self.tarball_cache).await?; // create the copy package folders @@ -177,16 +178,25 @@ impl NpmPackageFsResolver for GlobalNpmPackageResolver { Ok(()) } +} - fn ensure_read_permission<'a>( - &self, - permissions: &mut dyn NodePermissions, - path: &'a Path, - ) -> Result, AnyError> { - self - .registry_read_permission_checker - .ensure_registry_read_permission(permissions, path) +async fn cache_packages( + packages: &[NpmResolutionPackage], + tarball_cache: &Arc, +) -> Result<(), AnyError> { + let mut futures_unordered = FuturesUnordered::new(); + for package in packages { + futures_unordered.push(async move { + tarball_cache + .ensure_package(&package.id.nv, &package.dist) + .await + }); + } + while let Some(result) = futures_unordered.next().await { + // surface the first error + result?; } + Ok(()) } struct GlobalLifecycleScripts<'a> { diff --git a/cli/npm/managed/resolvers/local.rs b/cli/npm/managed/resolvers/local.rs index 50c5bd2689ce45..1a4ec57a69e85c 100644 --- a/cli/npm/managed/resolvers/local.rs +++ b/cli/npm/managed/resolvers/local.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. //! Code for local node_modules resolution. @@ -7,6 +7,7 @@ use std::cell::RefCell; use std::cmp::Ordering; use std::collections::hash_map::Entry; use std::collections::BTreeMap; +use std::collections::BTreeSet; use std::collections::HashMap; use std::collections::HashSet; use std::fs; @@ -15,8 +16,6 @@ use std::path::PathBuf; use std::rc::Rc; use std::sync::Arc; -use crate::args::LifecycleScriptsConfig; -use crate::colors; use async_trait::async_trait; use deno_ast::ModuleSpecifier; use deno_cache_dir::npm::mixed_case_package_name_decode; @@ -31,75 +30,72 @@ use deno_npm::NpmPackageCacheFolderId; use deno_npm::NpmPackageId; use deno_npm::NpmResolutionPackage; use deno_npm::NpmSystemInfo; +use deno_path_util::fs::atomic_write_file_with_retries; +use deno_path_util::fs::canonicalize_path_maybe_not_exists; use deno_resolver::npm::normalize_pkg_name_for_node_modules_deno_folder; -use deno_runtime::deno_fs; -use deno_runtime::deno_node::NodePermissions; use deno_semver::package::PackageNv; +use deno_semver::StackString; use node_resolver::errors::PackageFolderResolveError; use node_resolver::errors::PackageFolderResolveIoError; use node_resolver::errors::PackageNotFoundError; use node_resolver::errors::ReferrerNotFoundError; use serde::Deserialize; use serde::Serialize; +use sys_traits::FsMetadata; +use super::super::resolution::NpmResolution; +use super::common::bin_entries; +use super::common::NpmPackageFsResolver; +use crate::args::LifecycleScriptsConfig; use crate::args::NpmInstallDepsProvider; use crate::cache::CACHE_PERM; -use crate::util::fs::atomic_write_file_with_retries; -use crate::util::fs::canonicalize_path_maybe_not_exists_with_fs; +use crate::colors; +use crate::npm::managed::PackageCaching; +use crate::npm::CliNpmCache; +use crate::npm::CliNpmTarballCache; +use crate::sys::CliSys; use crate::util::fs::clone_dir_recursive; use crate::util::fs::symlink_dir; use crate::util::fs::LaxSingleProcessFsFlag; use crate::util::progress_bar::ProgressBar; use crate::util::progress_bar::ProgressMessagePrompt; -use super::super::cache::NpmCache; -use super::super::cache::TarballCache; -use super::super::resolution::NpmResolution; -use super::common::bin_entries; -use super::common::NpmPackageFsResolver; -use super::common::RegistryReadPermissionChecker; - /// Resolver that creates a local node_modules directory /// and resolves packages from it. #[derive(Debug)] pub struct LocalNpmPackageResolver { - cache: Arc, - fs: Arc, + cache: Arc, npm_install_deps_provider: Arc, progress_bar: ProgressBar, resolution: Arc, - tarball_cache: Arc, + sys: CliSys, + tarball_cache: Arc, root_node_modules_path: PathBuf, root_node_modules_url: Url, system_info: NpmSystemInfo, - registry_read_permission_checker: RegistryReadPermissionChecker, lifecycle_scripts: LifecycleScriptsConfig, } impl LocalNpmPackageResolver { #[allow(clippy::too_many_arguments)] pub fn new( - cache: Arc, - fs: Arc, + cache: Arc, npm_install_deps_provider: Arc, progress_bar: ProgressBar, resolution: Arc, - tarball_cache: Arc, + sys: CliSys, + tarball_cache: Arc, node_modules_folder: PathBuf, system_info: NpmSystemInfo, lifecycle_scripts: LifecycleScriptsConfig, ) -> Self { Self { cache, - fs: fs.clone(), npm_install_deps_provider, progress_bar, resolution, tarball_cache, - registry_read_permission_checker: RegistryReadPermissionChecker::new( - fs, - node_modules_folder.clone(), - ), + sys, root_node_modules_url: Url::from_directory_path(&node_modules_folder) .unwrap(), root_node_modules_path: node_modules_folder, @@ -138,8 +134,7 @@ impl LocalNpmPackageResolver { }; // Canonicalize the path so it's not pointing to the symlinked directory // in `node_modules` directory of the referrer. - canonicalize_path_maybe_not_exists_with_fs(&path, self.fs.as_ref()) - .map(Some) + canonicalize_path_maybe_not_exists(&self.sys, &path).map(Some) } fn resolve_package_folder_from_specifier( @@ -208,7 +203,7 @@ impl NpmPackageFsResolver for LocalNpmPackageResolver { }; let sub_dir = join_package_name(&node_modules_folder, name); - if self.fs.is_dir_sync(&sub_dir) { + if self.sys.fs_is_dir_no_err(&sub_dir) { return Ok(sub_dir); } @@ -236,13 +231,33 @@ impl NpmPackageFsResolver for LocalNpmPackageResolver { else { return Ok(None); }; - let folder_name = folder_path.parent().unwrap().to_string_lossy(); - Ok(get_package_folder_id_from_folder_name(&folder_name)) + // ex. project/node_modules/.deno/preact@10.24.3/node_modules/preact/ + let Some(node_modules_ancestor) = folder_path + .ancestors() + .find(|ancestor| ancestor.ends_with("node_modules")) + else { + return Ok(None); + }; + let Some(folder_name) = + node_modules_ancestor.parent().and_then(|p| p.file_name()) + else { + return Ok(None); + }; + Ok(get_package_folder_id_from_folder_name( + &folder_name.to_string_lossy(), + )) } - async fn cache_packages(&self) -> Result<(), AnyError> { + async fn cache_packages<'a>( + &self, + caching: PackageCaching<'a>, + ) -> Result<(), AnyError> { + let snapshot = match caching { + PackageCaching::All => self.resolution.snapshot(), + PackageCaching::Only(reqs) => self.resolution.subset(&reqs), + }; sync_resolution_with_fs( - &self.resolution.snapshot(), + &snapshot, &self.cache, &self.npm_install_deps_provider, &self.progress_bar, @@ -253,16 +268,6 @@ impl NpmPackageFsResolver for LocalNpmPackageResolver { ) .await } - - fn ensure_read_permission<'a>( - &self, - permissions: &mut dyn NodePermissions, - path: &'a Path, - ) -> Result, AnyError> { - self - .registry_read_permission_checker - .ensure_registry_read_permission(permissions, path) - } } /// `node_modules/.deno//node_modules/` @@ -284,10 +289,10 @@ fn local_node_modules_package_contents_path( #[allow(clippy::too_many_arguments)] async fn sync_resolution_with_fs( snapshot: &NpmResolutionSnapshot, - cache: &Arc, + cache: &Arc, npm_install_deps_provider: &NpmInstallDepsProvider, progress_bar: &ProgressBar, - tarball_cache: &Arc, + tarball_cache: &Arc, root_node_modules_dir_path: &Path, system_info: &NpmSystemInfo, lifecycle_scripts: &LifecycleScriptsConfig, @@ -298,6 +303,12 @@ async fn sync_resolution_with_fs( return Ok(()); // don't create the directory } + // don't set up node_modules (and more importantly try to acquire the file lock) + // if we're running as part of a lifecycle script + if super::common::lifecycle_scripts::is_running_lifecycle_script() { + return Ok(()); + } + let deno_local_registry_dir = root_node_modules_dir_path.join(".deno"); let deno_node_modules_dir = deno_local_registry_dir.join("node_modules"); fs::create_dir_all(&deno_node_modules_dir).with_context(|| { @@ -328,8 +339,10 @@ async fn sync_resolution_with_fs( let package_partitions = snapshot.all_system_packages_partitioned(system_info); let mut cache_futures = FuturesUnordered::new(); - let mut newest_packages_by_name: HashMap<&String, &NpmResolutionPackage> = - HashMap::with_capacity(package_partitions.packages.len()); + let mut newest_packages_by_name: HashMap< + &StackString, + &NpmResolutionPackage, + > = HashMap::with_capacity(package_partitions.packages.len()); let bin_entries = Rc::new(RefCell::new(bin_entries::BinEntries::new())); let mut lifecycle_scripts = super::common::lifecycle_scripts::LifecycleScripts::new( @@ -340,10 +353,10 @@ async fn sync_resolution_with_fs( ); let packages_with_deprecation_warnings = Arc::new(Mutex::new(Vec::new())); - let mut package_tags: HashMap<&PackageNv, Vec<&str>> = HashMap::new(); + let mut package_tags: HashMap<&PackageNv, BTreeSet<&str>> = HashMap::new(); for (package_req, package_nv) in snapshot.package_reqs() { if let Some(tag) = package_req.version_req.tag() { - package_tags.entry(package_nv).or_default().push(tag); + package_tags.entry(package_nv).or_default().insert(tag); } } @@ -363,7 +376,17 @@ async fn sync_resolution_with_fs( let folder_path = deno_local_registry_dir.join(&package_folder_name); let tags = package_tags .get(&package.id.nv) - .map(|tags| tags.join(",")) + .map(|tags| { + capacity_builder::StringBuilder::::build(|builder| { + for (i, tag) in tags.iter().enumerate() { + if i > 0 { + builder.append(',') + } + builder.append(*tag); + } + }) + .unwrap() + }) .unwrap_or_default(); enum PackageFolderState { UpToDate, @@ -410,7 +433,11 @@ async fn sync_resolution_with_fs( deno_core::unsync::spawn_blocking({ let package_path = package_path.clone(); move || { - clone_dir_recursive(&cache_folder, &package_path)?; + clone_dir_recursive( + &crate::sys::CliSys::default(), + &cache_folder, + &package_path, + )?; // write out a file that indicates this folder has been initialized fs::write(initialized_file, tags)?; @@ -467,7 +494,11 @@ async fn sync_resolution_with_fs( &package.id.nv.name, ); - clone_dir_recursive(&source_path, &package_path)?; + clone_dir_recursive( + &crate::sys::CliSys::default(), + &source_path, + &package_path, + )?; // write out a file that indicates this folder has been initialized fs::write(initialized_file, "")?; } @@ -509,7 +540,7 @@ async fn sync_resolution_with_fs( } } - let mut found_names: HashMap<&String, &PackageNv> = HashMap::new(); + let mut found_names: HashMap<&StackString, &PackageNv> = HashMap::new(); // set of node_modules in workspace packages that we've already ensured exist let mut existing_child_node_modules_dirs: HashSet = HashSet::new(); @@ -895,7 +926,13 @@ impl SetupCache { } bincode::serialize(&self.current).ok().and_then(|data| { - atomic_write_file_with_retries(&self.file_path, data, CACHE_PERM).ok() + atomic_write_file_with_retries( + &CliSys::default(), + &self.file_path, + &data, + CACHE_PERM, + ) + .ok() }); true } @@ -985,10 +1022,10 @@ fn get_package_folder_id_from_folder_name( ) -> Option { let folder_name = folder_name.replace('+', "/"); let (name, ending) = folder_name.rsplit_once('@')?; - let name = if let Some(encoded_name) = name.strip_prefix('_') { - mixed_case_package_name_decode(encoded_name)? + let name: StackString = if let Some(encoded_name) = name.strip_prefix('_') { + StackString::from_string(mixed_case_package_name_decode(encoded_name)?) } else { - name.to_string() + name.into() }; let (raw_version, copy_index) = match ending.split_once('_') { Some((raw_version, copy_index)) => { @@ -1028,7 +1065,8 @@ fn symlink_package_dir( } #[cfg(not(windows))] { - symlink_dir(&old_path_relative, new_path).map_err(Into::into) + symlink_dir(&crate::sys::CliSys::default(), &old_path_relative, new_path) + .map_err(Into::into) } } @@ -1050,7 +1088,8 @@ fn junction_or_symlink_dir( .context("Failed creating junction in node_modules folder"); } - match symlink_dir(old_path_relative, new_path) { + match symlink_dir(&crate::sys::CliSys::default(), old_path_relative, new_path) + { Ok(()) => Ok(()), Err(symlink_err) if symlink_err.kind() == std::io::ErrorKind::PermissionDenied => diff --git a/cli/npm/managed/resolvers/mod.rs b/cli/npm/managed/resolvers/mod.rs index 36d795ee7e7bc6..cc4c735c7c013e 100644 --- a/cli/npm/managed/resolvers/mod.rs +++ b/cli/npm/managed/resolvers/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. mod common; mod global; @@ -8,29 +8,26 @@ use std::path::PathBuf; use std::sync::Arc; use deno_npm::NpmSystemInfo; -use deno_runtime::deno_fs::FileSystem; - -use crate::args::LifecycleScriptsConfig; -use crate::args::NpmInstallDepsProvider; -use crate::util::progress_bar::ProgressBar; pub use self::common::NpmPackageFsResolver; - use self::global::GlobalNpmPackageResolver; use self::local::LocalNpmPackageResolver; - -use super::cache::NpmCache; -use super::cache::TarballCache; use super::resolution::NpmResolution; +use crate::args::LifecycleScriptsConfig; +use crate::args::NpmInstallDepsProvider; +use crate::npm::CliNpmCache; +use crate::npm::CliNpmTarballCache; +use crate::sys::CliSys; +use crate::util::progress_bar::ProgressBar; #[allow(clippy::too_many_arguments)] pub fn create_npm_fs_resolver( - fs: Arc, - npm_cache: Arc, + npm_cache: Arc, npm_install_deps_provider: &Arc, progress_bar: &ProgressBar, resolution: Arc, - tarball_cache: Arc, + sys: CliSys, + tarball_cache: Arc, maybe_node_modules_path: Option, system_info: NpmSystemInfo, lifecycle_scripts: LifecycleScriptsConfig, @@ -38,10 +35,10 @@ pub fn create_npm_fs_resolver( match maybe_node_modules_path { Some(node_modules_folder) => Arc::new(LocalNpmPackageResolver::new( npm_cache, - fs, npm_install_deps_provider.clone(), progress_bar.clone(), resolution, + sys, tarball_cache, node_modules_folder, system_info, @@ -49,7 +46,6 @@ pub fn create_npm_fs_resolver( )), None => Arc::new(GlobalNpmPackageResolver::new( npm_cache, - fs, tarball_cache, resolution, system_info, diff --git a/cli/npm/mod.rs b/cli/npm/mod.rs index 0e955ac5b43396..710c24f98d61e3 100644 --- a/cli/npm/mod.rs +++ b/cli/npm/mod.rs @@ -1,40 +1,107 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. mod byonm; -mod common; mod managed; +mod permission_checker; -use std::borrow::Cow; use std::path::Path; use std::sync::Arc; -use common::maybe_auth_header_for_npm_registry; use dashmap::DashMap; use deno_core::error::AnyError; use deno_core::serde_json; +use deno_core::url::Url; use deno_npm::npm_rc::ResolvedNpmRc; use deno_npm::registry::NpmPackageInfo; use deno_resolver::npm::ByonmInNpmPackageChecker; use deno_resolver::npm::ByonmNpmResolver; use deno_resolver::npm::CliNpmReqResolver; use deno_resolver::npm::ResolvePkgFolderFromDenoReqError; -use deno_runtime::deno_node::NodePermissions; use deno_runtime::ops::process::NpmProcessStateProvider; use deno_semver::package::PackageNv; use deno_semver::package::PackageReq; -use managed::cache::registry_info::get_package_url; +use http::HeaderName; +use http::HeaderValue; use managed::create_managed_in_npm_pkg_checker; use node_resolver::InNpmPackageChecker; use node_resolver::NpmPackageFolderResolver; -use crate::file_fetcher::FileFetcher; - pub use self::byonm::CliByonmNpmResolver; pub use self::byonm::CliByonmNpmResolverCreateOptions; pub use self::managed::CliManagedInNpmPkgCheckerCreateOptions; pub use self::managed::CliManagedNpmResolverCreateOptions; pub use self::managed::CliNpmResolverManagedSnapshotOption; pub use self::managed::ManagedCliNpmResolver; +pub use self::managed::PackageCaching; +pub use self::permission_checker::NpmRegistryReadPermissionChecker; +pub use self::permission_checker::NpmRegistryReadPermissionCheckerMode; +use crate::file_fetcher::CliFileFetcher; +use crate::http_util::HttpClientProvider; +use crate::sys::CliSys; +use crate::util::progress_bar::ProgressBar; + +pub type CliNpmTarballCache = + deno_npm_cache::TarballCache; +pub type CliNpmCache = deno_npm_cache::NpmCache; +pub type CliNpmRegistryInfoProvider = + deno_npm_cache::RegistryInfoProvider; + +#[derive(Debug)] +pub struct CliNpmCacheHttpClient { + http_client_provider: Arc, + progress_bar: ProgressBar, +} + +impl CliNpmCacheHttpClient { + pub fn new( + http_client_provider: Arc, + progress_bar: ProgressBar, + ) -> Self { + Self { + http_client_provider, + progress_bar, + } + } +} + +#[async_trait::async_trait(?Send)] +impl deno_npm_cache::NpmCacheHttpClient for CliNpmCacheHttpClient { + async fn download_with_retries_on_any_tokio_runtime( + &self, + url: Url, + maybe_auth_header: Option<(HeaderName, HeaderValue)>, + ) -> Result>, deno_npm_cache::DownloadError> { + let guard = self.progress_bar.update(url.as_str()); + let client = self.http_client_provider.get_or_create().map_err(|err| { + deno_npm_cache::DownloadError { + status_code: None, + error: err, + } + })?; + client + .download_with_progress_and_retries(url, maybe_auth_header, &guard) + .await + .map_err(|err| { + use crate::http_util::DownloadErrorKind::*; + let status_code = match err.as_kind() { + Fetch { .. } + | UrlParse { .. } + | HttpParse { .. } + | Json { .. } + | ToStr { .. } + | RedirectHeaderParse { .. } + | TooManyRedirects => None, + BadResponse(bad_response_error) => { + Some(bad_response_error.status_code) + } + }; + deno_npm_cache::DownloadError { + status_code, + error: err.into(), + } + }) + } +} pub enum CliNpmResolverCreateOptions { Managed(CliManagedNpmResolverCreateOptions), @@ -117,12 +184,6 @@ pub trait CliNpmResolver: NpmPackageFolderResolver + CliNpmReqResolver { fn root_node_modules_path(&self) -> Option<&Path>; - fn ensure_read_permission<'a>( - &self, - permissions: &mut dyn NodePermissions, - path: &'a Path, - ) -> Result, AnyError>; - /// Returns a hash returning the state of the npm resolver /// or `None` if the state currently can't be determined. fn check_state_hash(&self) -> Option; @@ -132,13 +193,13 @@ pub trait CliNpmResolver: NpmPackageFolderResolver + CliNpmReqResolver { pub struct NpmFetchResolver { nv_by_req: DashMap>, info_by_name: DashMap>>, - file_fetcher: Arc, + file_fetcher: Arc, npmrc: Arc, } impl NpmFetchResolver { pub fn new( - file_fetcher: Arc, + file_fetcher: Arc, npmrc: Arc, ) -> Self { Self { @@ -179,13 +240,15 @@ impl NpmFetchResolver { if let Some(info) = self.info_by_name.get(name) { return info.value().clone(); } + // todo(#27198): use RegistryInfoProvider instead let fetch_package_info = || async { - let info_url = get_package_url(&self.npmrc, name); + let info_url = deno_npm_cache::get_package_url(&self.npmrc, name); let file_fetcher = self.file_fetcher.clone(); let registry_config = self.npmrc.get_registry_config(name); // TODO(bartlomieju): this should error out, not use `.ok()`. let maybe_auth_header = - maybe_auth_header_for_npm_registry(registry_config).ok()?; + deno_npm_cache::maybe_auth_header_for_npm_registry(registry_config) + .ok()?; // spawn due to the lsp's `Send` requirement let file = deno_core::unsync::spawn(async move { file_fetcher diff --git a/cli/npm/permission_checker.rs b/cli/npm/permission_checker.rs new file mode 100644 index 00000000000000..01fed08954f6ea --- /dev/null +++ b/cli/npm/permission_checker.rs @@ -0,0 +1,105 @@ +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::borrow::Cow; +use std::collections::HashMap; +use std::io::ErrorKind; +use std::path::Path; +use std::path::PathBuf; + +use deno_core::anyhow::Context; +use deno_core::error::AnyError; +use deno_core::parking_lot::Mutex; +use deno_runtime::deno_node::NodePermissions; +use sys_traits::FsCanonicalize; + +use crate::sys::CliSys; + +#[derive(Debug)] +pub enum NpmRegistryReadPermissionCheckerMode { + Byonm, + Global(PathBuf), + Local(PathBuf), +} + +#[derive(Debug)] +pub struct NpmRegistryReadPermissionChecker { + sys: CliSys, + cache: Mutex>, + mode: NpmRegistryReadPermissionCheckerMode, +} + +impl NpmRegistryReadPermissionChecker { + pub fn new(sys: CliSys, mode: NpmRegistryReadPermissionCheckerMode) -> Self { + Self { + sys, + cache: Default::default(), + mode, + } + } + + #[must_use = "the resolved return value to mitigate time-of-check to time-of-use issues"] + pub fn ensure_read_permission<'a>( + &self, + permissions: &mut dyn NodePermissions, + path: &'a Path, + ) -> Result, AnyError> { + if permissions.query_read_all() { + return Ok(Cow::Borrowed(path)); // skip permissions checks below + } + + match &self.mode { + NpmRegistryReadPermissionCheckerMode::Byonm => { + if path.components().any(|c| c.as_os_str() == "node_modules") { + Ok(Cow::Borrowed(path)) + } else { + permissions.check_read_path(path).map_err(Into::into) + } + } + NpmRegistryReadPermissionCheckerMode::Global(registry_path) + | NpmRegistryReadPermissionCheckerMode::Local(registry_path) => { + // allow reading if it's in the node_modules + let is_path_in_node_modules = path.starts_with(registry_path) + && path + .components() + .all(|c| !matches!(c, std::path::Component::ParentDir)); + + if is_path_in_node_modules { + let mut cache = self.cache.lock(); + let mut canonicalize = + |path: &Path| -> Result, AnyError> { + match cache.get(path) { + Some(canon) => Ok(Some(canon.clone())), + None => match self.sys.fs_canonicalize(path) { + Ok(canon) => { + cache.insert(path.to_path_buf(), canon.clone()); + Ok(Some(canon)) + } + Err(e) => { + if e.kind() == ErrorKind::NotFound { + return Ok(None); + } + Err(AnyError::from(e)).with_context(|| { + format!("failed canonicalizing '{}'", path.display()) + }) + } + }, + } + }; + if let Some(registry_path_canon) = canonicalize(registry_path)? { + if let Some(path_canon) = canonicalize(path)? { + if path_canon.starts_with(registry_path_canon) { + return Ok(Cow::Owned(path_canon)); + } + } else if path.starts_with(registry_path_canon) + || path.starts_with(registry_path) + { + return Ok(Cow::Borrowed(path)); + } + } + } + + permissions.check_read_path(path).map_err(Into::into) + } + } + } +} diff --git a/cli/ops/bench.rs b/cli/ops/bench.rs index 1f4a4bd9b5879d..c6eca9216f1171 100644 --- a/cli/ops/bench.rs +++ b/cli/ops/bench.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::sync::atomic::AtomicUsize; use std::sync::atomic::Ordering; @@ -51,7 +51,7 @@ fn op_bench_get_origin(state: &mut OpState) -> String { #[derive(Clone)] struct PermissionsHolder(Uuid, PermissionsContainer); -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_pledge_test_permissions( state: &mut OpState, diff --git a/cli/ops/jupyter.rs b/cli/ops/jupyter.rs index 5bdf97e60f6c20..6a9252c35ac1ff 100644 --- a/cli/ops/jupyter.rs +++ b/cli/ops/jupyter.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // NOTE(bartlomieju): unfortunately it appears that clippy is broken // and can't allow a single line ignore for `await_holding_lock`. @@ -8,17 +8,16 @@ use std::cell::RefCell; use std::rc::Rc; use std::sync::Arc; -use jupyter_runtime::InputRequest; -use jupyter_runtime::JupyterMessage; -use jupyter_runtime::JupyterMessageContent; -use jupyter_runtime::KernelIoPubConnection; -use jupyter_runtime::StreamContent; - use deno_core::error::AnyError; use deno_core::op2; use deno_core::parking_lot::Mutex; use deno_core::serde_json; use deno_core::OpState; +use jupyter_runtime::InputRequest; +use jupyter_runtime::JupyterMessage; +use jupyter_runtime::JupyterMessageContent; +use jupyter_runtime::KernelIoPubConnection; +use jupyter_runtime::StreamContent; use tokio::sync::mpsc; use crate::tools::jupyter::server::StdinConnectionProxy; diff --git a/cli/ops/lint.rs b/cli/ops/lint.rs new file mode 100644 index 00000000000000..0a444e942c0505 --- /dev/null +++ b/cli/ops/lint.rs @@ -0,0 +1,34 @@ +// Copyright 2018-2025 the Deno authors. MIT license. + +use deno_ast::MediaType; +use deno_ast::ModuleSpecifier; +use deno_core::error::generic_error; +use deno_core::error::AnyError; +use deno_core::op2; + +use crate::tools::lint; + +deno_core::extension!(deno_lint, ops = [op_lint_create_serialized_ast,],); + +#[op2] +#[buffer] +fn op_lint_create_serialized_ast( + #[string] file_name: &str, + #[string] source: String, +) -> Result, AnyError> { + let file_text = deno_ast::strip_bom(source); + let path = std::env::current_dir()?.join(file_name); + let specifier = ModuleSpecifier::from_file_path(&path).map_err(|_| { + generic_error(format!("Failed to parse path as URL: {}", path.display())) + })?; + let media_type = MediaType::from_specifier(&specifier); + let parsed_source = deno_ast::parse_program(deno_ast::ParseParams { + specifier, + text: file_text.into(), + media_type, + capture_tokens: false, + scope_analysis: false, + maybe_syntax: None, + })?; + Ok(lint::serialize_ast_to_buffer(&parsed_source)) +} diff --git a/cli/ops/mod.rs b/cli/ops/mod.rs index 230d268ab4dff0..7cee5bcfa10be8 100644 --- a/cli/ops/mod.rs +++ b/cli/ops/mod.rs @@ -1,5 +1,6 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. pub mod bench; pub mod jupyter; +pub mod lint; pub mod testing; diff --git a/cli/ops/testing.rs b/cli/ops/testing.rs index 00aafb8286e3a8..84e9aff83be4d2 100644 --- a/cli/ops/testing.rs +++ b/cli/ops/testing.rs @@ -1,13 +1,7 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::tools::test::TestContainer; -use crate::tools::test::TestDescription; -use crate::tools::test::TestEvent; -use crate::tools::test::TestEventSender; -use crate::tools::test::TestFailure; -use crate::tools::test::TestLocation; -use crate::tools::test::TestStepDescription; -use crate::tools::test::TestStepResult; +use std::sync::atomic::AtomicUsize; +use std::sync::atomic::Ordering; use deno_core::error::generic_error; use deno_core::error::type_error; @@ -18,10 +12,17 @@ use deno_core::ModuleSpecifier; use deno_core::OpState; use deno_runtime::deno_permissions::ChildPermissionsArg; use deno_runtime::deno_permissions::PermissionsContainer; -use std::sync::atomic::AtomicUsize; -use std::sync::atomic::Ordering; use uuid::Uuid; +use crate::tools::test::TestContainer; +use crate::tools::test::TestDescription; +use crate::tools::test::TestEvent; +use crate::tools::test::TestEventSender; +use crate::tools::test::TestFailure; +use crate::tools::test::TestLocation; +use crate::tools::test::TestStepDescription; +use crate::tools::test::TestStepResult; + deno_core::extension!(deno_test, ops = [ op_pledge_test_permissions, @@ -46,7 +47,7 @@ deno_core::extension!(deno_test, #[derive(Clone)] struct PermissionsHolder(Uuid, PermissionsContainer); -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_pledge_test_permissions( state: &mut OpState, diff --git a/cli/resolver.rs b/cli/resolver.rs index a2dd47430f67a6..661685c08166cf 100644 --- a/cli/resolver.rs +++ b/cli/resolver.rs @@ -1,4 +1,9 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::borrow::Cow; +use std::path::Path; +use std::path::PathBuf; +use std::sync::Arc; use async_trait::async_trait; use dashmap::DashMap; @@ -12,7 +17,6 @@ use deno_core::error::AnyError; use deno_core::url::Url; use deno_core::ModuleSourceCode; use deno_core::ModuleSpecifier; -use deno_graph::source::ResolutionMode; use deno_graph::source::ResolveError; use deno_graph::source::UnknownBuiltInNodeModuleError; use deno_graph::NpmLoadError; @@ -21,38 +25,35 @@ use deno_npm::resolution::NpmResolutionError; use deno_resolver::sloppy_imports::SloppyImportsResolver; use deno_runtime::colors; use deno_runtime::deno_fs; -use deno_runtime::deno_fs::FileSystem; use deno_runtime::deno_node::is_builtin_node_module; -use deno_runtime::deno_node::DenoFsNodeResolverEnv; +use deno_runtime::deno_node::RealIsBuiltInNodeModuleChecker; use deno_semver::package::PackageReq; -use node_resolver::NodeModuleKind; -use node_resolver::NodeResolutionMode; -use std::borrow::Cow; -use std::path::Path; -use std::path::PathBuf; -use std::sync::Arc; +use node_resolver::NodeResolutionKind; +use node_resolver::ResolutionMode; +use sys_traits::FsMetadata; +use sys_traits::FsMetadataValue; use thiserror::Error; +use crate::args::NpmCachingStrategy; use crate::args::DENO_DISABLE_PEDANTIC_NODE_WARNINGS; use crate::node::CliNodeCodeTranslator; use crate::npm::CliNpmResolver; use crate::npm::InnerCliNpmResolverRef; +use crate::sys::CliSys; use crate::util::sync::AtomicFlag; -use crate::util::text_encoding::from_utf8_lossy_owned; +use crate::util::text_encoding::from_utf8_lossy_cow; -pub type CjsTracker = deno_resolver::cjs::CjsTracker; -pub type IsCjsResolver = - deno_resolver::cjs::IsCjsResolver; -pub type IsCjsResolverOptions = deno_resolver::cjs::IsCjsResolverOptions; +pub type CjsTracker = deno_resolver::cjs::CjsTracker; +pub type IsCjsResolver = deno_resolver::cjs::IsCjsResolver; pub type CliSloppyImportsResolver = SloppyImportsResolver; pub type CliDenoResolver = deno_resolver::DenoResolver< - CliDenoResolverFs, - DenoFsNodeResolverEnv, + RealIsBuiltInNodeModuleChecker, SloppyImportsCachedFs, + CliSys, >; pub type CliNpmReqResolver = - deno_resolver::npm::NpmReqResolver; + deno_resolver::npm::NpmReqResolver; pub struct ModuleCodeStringSource { pub code: ModuleSourceCode, @@ -60,50 +61,6 @@ pub struct ModuleCodeStringSource { pub media_type: MediaType, } -#[derive(Debug, Clone)] -pub struct CliDenoResolverFs(pub Arc); - -impl deno_resolver::fs::DenoResolverFs for CliDenoResolverFs { - fn read_to_string_lossy(&self, path: &Path) -> std::io::Result { - self - .0 - .read_text_file_lossy_sync(path, None) - .map_err(|e| e.into_io_error()) - } - - fn realpath_sync(&self, path: &Path) -> std::io::Result { - self.0.realpath_sync(path).map_err(|e| e.into_io_error()) - } - - fn exists_sync(&self, path: &Path) -> bool { - self.0.exists_sync(path) - } - - fn is_dir_sync(&self, path: &Path) -> bool { - self.0.is_dir_sync(path) - } - - fn read_dir_sync( - &self, - dir_path: &Path, - ) -> std::io::Result> { - self - .0 - .read_dir_sync(dir_path) - .map(|entries| { - entries - .into_iter() - .map(|e| deno_resolver::fs::DirEntry { - name: e.name, - is_file: e.is_file, - is_directory: e.is_directory, - }) - .collect::>() - }) - .map_err(|err| err.into_io_error()) - } -} - #[derive(Debug, Error)] #[error("{media_type} files are not supported in npm packages: {specifier}")] pub struct NotSupportedKindInNpmError { @@ -184,18 +141,21 @@ impl NpmModuleLoader { let code = if self.cjs_tracker.is_maybe_cjs(specifier, media_type)? { // translate cjs to esm if it's cjs and inject node globals - let code = from_utf8_lossy_owned(code); + let code = from_utf8_lossy_cow(code); ModuleSourceCode::String( self .node_code_translator - .translate_cjs_to_esm(specifier, Some(Cow::Owned(code))) + .translate_cjs_to_esm(specifier, Some(code)) .await? .into_owned() .into(), ) } else { // esm and json code is untouched - ModuleSourceCode::Bytes(code.into_boxed_slice().into()) + ModuleSourceCode::Bytes(match code { + Cow::Owned(bytes) => bytes.into_boxed_slice().into(), + Cow::Borrowed(bytes) => bytes.into(), + }) }; Ok(ModuleCodeStringSource { @@ -236,36 +196,29 @@ impl CliResolver { // todo(dsherret): move this off CliResolver as CliResolver is acting // like a factory by doing this (it's beyond its responsibility) - pub fn create_graph_npm_resolver(&self) -> WorkerCliNpmGraphResolver { + pub fn create_graph_npm_resolver( + &self, + npm_caching: NpmCachingStrategy, + ) -> WorkerCliNpmGraphResolver { WorkerCliNpmGraphResolver { npm_resolver: self.npm_resolver.as_ref(), found_package_json_dep_flag: &self.found_package_json_dep_flag, bare_node_builtins_enabled: self.bare_node_builtins_enabled, + npm_caching, } } pub fn resolve( &self, raw_specifier: &str, - referrer_range: &deno_graph::Range, - referrer_kind: NodeModuleKind, - mode: ResolutionMode, + referrer: &ModuleSpecifier, + referrer_range_start: deno_graph::Position, + resolution_mode: ResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { - fn to_node_mode(mode: ResolutionMode) -> NodeResolutionMode { - match mode { - ResolutionMode::Execution => NodeResolutionMode::Execution, - ResolutionMode::Types => NodeResolutionMode::Types, - } - } - let resolution = self .deno_resolver - .resolve( - raw_specifier, - &referrer_range.specifier, - referrer_kind, - to_node_mode(mode), - ) + .resolve(raw_specifier, referrer, resolution_mode, resolution_kind) .map_err(|err| match err.into_kind() { deno_resolver::DenoResolveErrorKind::MappedResolution( mapped_resolution_error, @@ -291,10 +244,11 @@ impl CliResolver { } => { if self.warned_pkgs.insert(reference.req().clone()) { log::warn!( - "{} {}\n at {}", + "{} {}\n at {}:{}", colors::yellow("Warning"), diagnostic, - referrer_range + referrer, + referrer_range_start, ); } } @@ -310,6 +264,7 @@ pub struct WorkerCliNpmGraphResolver<'a> { npm_resolver: Option<&'a Arc>, found_package_json_dep_flag: &'a AtomicFlag, bare_node_builtins_enabled: bool, + npm_caching: NpmCachingStrategy, } #[async_trait(?Send)] @@ -335,13 +290,10 @@ impl<'a> deno_graph::source::NpmResolver for WorkerCliNpmGraphResolver<'a> { module_name: &str, range: &deno_graph::Range, ) { - let deno_graph::Range { - start, specifier, .. - } = range; - let line = start.line + 1; - let column = start.character + 1; + let start = range.range.start; + let specifier = &range.specifier; if !*DENO_DISABLE_PEDANTIC_NODE_WARNINGS { - log::warn!("{} Resolving \"{module_name}\" as \"node:{module_name}\" at {specifier}:{line}:{column}. If you want to use a built-in Node module, add a \"node:\" prefix.", colors::yellow("Warning")) + log::warn!("{} Resolving \"{module_name}\" as \"node:{module_name}\" at {specifier}:{start}. If you want to use a built-in Node module, add a \"node:\" prefix.", colors::yellow("Warning")) } } @@ -382,7 +334,20 @@ impl<'a> deno_graph::source::NpmResolver for WorkerCliNpmGraphResolver<'a> { Ok(()) }; - let result = npm_resolver.add_package_reqs_raw(package_reqs).await; + let result = npm_resolver + .add_package_reqs_raw( + package_reqs, + match self.npm_caching { + NpmCachingStrategy::Eager => { + Some(crate::npm::PackageCaching::All) + } + NpmCachingStrategy::Lazy => { + Some(crate::npm::PackageCaching::Only(package_reqs.into())) + } + NpmCachingStrategy::Manual => None, + }, + ) + .await; NpmResolvePkgReqsResult { results: result @@ -430,7 +395,7 @@ impl<'a> deno_graph::source::NpmResolver for WorkerCliNpmGraphResolver<'a> { #[derive(Debug)] pub struct SloppyImportsCachedFs { - fs: Arc, + sys: CliSys, cache: Option< DashMap< PathBuf, @@ -440,15 +405,18 @@ pub struct SloppyImportsCachedFs { } impl SloppyImportsCachedFs { - pub fn new(fs: Arc) -> Self { + pub fn new(sys: CliSys) -> Self { Self { - fs, + sys, cache: Some(Default::default()), } } - pub fn new_without_stat_cache(fs: Arc) -> Self { - Self { fs, cache: None } + pub fn new_without_stat_cache(fs: CliSys) -> Self { + Self { + sys: fs, + cache: None, + } } } @@ -465,10 +433,10 @@ impl deno_resolver::sloppy_imports::SloppyImportResolverFs } } - let entry = self.fs.stat_sync(path).ok().and_then(|stat| { - if stat.is_file { + let entry = self.sys.fs_metadata(path).ok().and_then(|stat| { + if stat.file_type().is_file() { Some(deno_resolver::sloppy_imports::SloppyImportsFsEntry::File) - } else if stat.is_directory { + } else if stat.file_type().is_dir() { Some(deno_resolver::sloppy_imports::SloppyImportsFsEntry::Dir) } else { None diff --git a/cli/schemas/config-file.v1.json b/cli/schemas/config-file.v1.json index 56a8090f9bb997..d644072f4cfa5b 100644 --- a/cli/schemas/config-file.v1.json +++ b/cli/schemas/config-file.v1.json @@ -291,7 +291,7 @@ "type": "array", "description": "List of tag names that will be run. Empty list disables all tags and will only use rules from `include`.", "items": { - "$ref": "https://raw.githubusercontent.com/denoland/deno_lint/main/schemas/tags.v1.json" + "$ref": "lint-tags.v1.json" }, "minItems": 0, "uniqueItems": true @@ -300,7 +300,7 @@ "type": "array", "description": "List of rule names that will be excluded from configured tag sets. If the same rule is in `include` it will be run.", "items": { - "$ref": "https://raw.githubusercontent.com/denoland/deno_lint/main/schemas/rules.v1.json" + "$ref": "lint-rules.v1.json" }, "minItems": 0, "uniqueItems": true @@ -309,7 +309,7 @@ "type": "array", "description": "List of rule names that will be run. Even if the same rule is in `exclude` it will be run.", "items": { - "$ref": "https://raw.githubusercontent.com/denoland/deno_lint/main/schemas/rules.v1.json" + "$ref": "lint-rules.v1.json" }, "minItems": 0, "uniqueItems": true @@ -446,8 +446,14 @@ }, "command": { "type": "string", - "required": true, "description": "The task to execute" + }, + "dependencies": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tasks that should be executed before this task" } } } @@ -547,9 +553,11 @@ "bare-node-builtins", "byonm", "cron", + "detect-cjs", "ffi", "fs", "fmt-component", + "fmt-sql", "http", "kv", "net", diff --git a/cli/schemas/lint-rules.v1.json b/cli/schemas/lint-rules.v1.json new file mode 100644 index 00000000000000..71d17849588c8e --- /dev/null +++ b/cli/schemas/lint-rules.v1.json @@ -0,0 +1,112 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "enum": [ + "adjacent-overload-signatures", + "ban-ts-comment", + "ban-types", + "ban-unknown-rule-code", + "ban-untagged-ignore", + "ban-untagged-todo", + "ban-unused-ignore", + "camelcase", + "constructor-super", + "default-param-last", + "eqeqeq", + "explicit-function-return-type", + "explicit-module-boundary-types", + "for-direction", + "fresh-handler-export", + "fresh-server-event-handlers", + "getter-return", + "guard-for-in", + "no-array-constructor", + "no-async-promise-executor", + "no-await-in-loop", + "no-await-in-sync-fn", + "no-boolean-literal-for-arguments", + "no-case-declarations", + "no-class-assign", + "no-compare-neg-zero", + "no-cond-assign", + "no-console", + "no-const-assign", + "no-constant-condition", + "no-control-regex", + "no-debugger", + "no-delete-var", + "no-deprecated-deno-api", + "no-dupe-args", + "no-dupe-class-members", + "no-dupe-else-if", + "no-dupe-keys", + "no-duplicate-case", + "no-empty", + "no-empty-character-class", + "no-empty-enum", + "no-empty-interface", + "no-empty-pattern", + "no-eval", + "no-ex-assign", + "no-explicit-any", + "no-external-import", + "no-extra-boolean-cast", + "no-extra-non-null-assertion", + "no-fallthrough", + "no-func-assign", + "no-global-assign", + "no-implicit-declare-namespace-export", + "no-import-assertions", + "no-import-assign", + "no-inferrable-types", + "no-inner-declarations", + "no-invalid-regexp", + "no-invalid-triple-slash-reference", + "no-irregular-whitespace", + "no-misused-new", + "no-namespace", + "no-new-symbol", + "no-node-globals", + "no-non-null-asserted-optional-chain", + "no-non-null-assertion", + "no-obj-calls", + "no-octal", + "no-process-globals", + "no-prototype-builtins", + "no-redeclare", + "no-regex-spaces", + "no-self-assign", + "no-self-compare", + "no-setter-return", + "no-shadow-restricted-names", + "no-sloppy-imports", + "no-slow-types", + "no-sparse-arrays", + "no-sync-fn-in-async-fn", + "no-this-alias", + "no-this-before-super", + "no-throw-literal", + "no-top-level-await", + "no-undef", + "no-unreachable", + "no-unsafe-finally", + "no-unsafe-negation", + "no-unused-labels", + "no-unused-vars", + "no-var", + "no-window", + "no-window-prefix", + "no-with", + "prefer-as-const", + "prefer-ascii", + "prefer-const", + "prefer-namespace-keyword", + "prefer-primordials", + "require-await", + "require-yield", + "single-var-declarator", + "triple-slash-reference", + "use-isnan", + "valid-typeof", + "verbatim-module-syntax" + ] +} diff --git a/cli/schemas/lint-tags.v1.json b/cli/schemas/lint-tags.v1.json new file mode 100644 index 00000000000000..4b4f0e48db400a --- /dev/null +++ b/cli/schemas/lint-tags.v1.json @@ -0,0 +1,4 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "enum": ["fresh", "jsr", "jsx", "react", "recommended"] +} diff --git a/cli/shared.rs b/cli/shared.rs index 808aff707ba81d..6a28473edd9492 100644 --- a/cli/shared.rs +++ b/cli/shared.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /// This module is shared between build script and the binaries. Use it sparsely. use deno_core::anyhow::bail; diff --git a/cli/standalone/binary.rs b/cli/standalone/binary.rs index 3efd8ee1411b67..f07c645d89e003 100644 --- a/cli/standalone/binary.rs +++ b/cli/standalone/binary.rs @@ -1,9 +1,10 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::borrow::Cow; use std::collections::BTreeMap; use std::collections::HashMap; use std::collections::VecDeque; +use std::env; use std::env::current_exe; use std::ffi::OsString; use std::fs; @@ -15,6 +16,7 @@ use std::io::Seek; use std::io::SeekFrom; use std::io::Write; use std::ops::Range; +use std::path::Component; use std::path::Path; use std::path::PathBuf; use std::process::Command; @@ -35,28 +37,48 @@ use deno_core::futures::AsyncReadExt; use deno_core::futures::AsyncSeekExt; use deno_core::serde_json; use deno_core::url::Url; -use deno_graph::source::RealFileSystem; use deno_graph::ModuleGraph; use deno_npm::resolution::SerializedNpmResolutionSnapshot; use deno_npm::resolution::SerializedNpmResolutionSnapshotPackage; use deno_npm::resolution::ValidSerializedNpmResolutionSnapshot; use deno_npm::NpmPackageId; use deno_npm::NpmSystemInfo; +use deno_path_util::url_from_directory_path; +use deno_path_util::url_from_file_path; +use deno_path_util::url_to_file_path; use deno_runtime::deno_fs; use deno_runtime::deno_fs::FileSystem; use deno_runtime::deno_fs::RealFs; use deno_runtime::deno_io::fs::FsError; use deno_runtime::deno_node::PackageJson; -use deno_runtime::ops::otel::OtelConfig; +use deno_runtime::deno_permissions::PermissionsOptions; use deno_semver::npm::NpmVersionReqParseError; use deno_semver::package::PackageReq; use deno_semver::Version; use deno_semver::VersionReqSpecifierParseError; +use deno_telemetry::OtelConfig; use indexmap::IndexMap; use log::Level; use serde::Deserialize; use serde::Serialize; +use super::file_system::DenoCompileFileSystem; +use super::serialization::deserialize_binary_data_section; +use super::serialization::serialize_binary_data_section; +use super::serialization::DenoCompileModuleData; +use super::serialization::DeserializedDataSection; +use super::serialization::RemoteModulesStore; +use super::serialization::RemoteModulesStoreBuilder; +use super::serialization::SourceMapStore; +use super::virtual_fs::output_vfs; +use super::virtual_fs::BuiltVfs; +use super::virtual_fs::FileBackedVfs; +use super::virtual_fs::VfsBuilder; +use super::virtual_fs::VfsFileSubDataKind; +use super::virtual_fs::VfsRoot; +use super::virtual_fs::VirtualDirectory; +use super::virtual_fs::VirtualDirectoryEntries; +use super::virtual_fs::WindowsSystemRootablePath; use crate::args::CaData; use crate::args::CliOptions; use crate::args::CompileFlags; @@ -64,8 +86,9 @@ use crate::args::NpmInstallDepsProvider; use crate::args::PermissionFlags; use crate::args::UnstableConfig; use crate::cache::DenoDir; +use crate::cache::FastInsecureHasher; use crate::emit::Emitter; -use crate::file_fetcher::FileFetcher; +use crate::file_fetcher::CliFileFetcher; use crate::http_util::HttpClientProvider; use crate::npm::CliNpmResolver; use crate::npm::InnerCliNpmResolverRef; @@ -73,41 +96,25 @@ use crate::resolver::CjsTracker; use crate::shared::ReleaseChannel; use crate::standalone::virtual_fs::VfsEntry; use crate::util::archive; +use crate::util::fs::canonicalize_path; use crate::util::fs::canonicalize_path_maybe_not_exists; use crate::util::progress_bar::ProgressBar; use crate::util::progress_bar::ProgressBarStyle; -use super::file_system::DenoCompileFileSystem; -use super::serialization::deserialize_binary_data_section; -use super::serialization::serialize_binary_data_section; -use super::serialization::DenoCompileModuleData; -use super::serialization::DeserializedDataSection; -use super::serialization::RemoteModulesStore; -use super::serialization::RemoteModulesStoreBuilder; -use super::virtual_fs::FileBackedVfs; -use super::virtual_fs::VfsBuilder; -use super::virtual_fs::VfsRoot; -use super::virtual_fs::VirtualDirectory; +pub static DENO_COMPILE_GLOBAL_NODE_MODULES_DIR_NAME: &str = + ".deno_compile_node_modules"; /// A URL that can be designated as the base for relative URLs. /// /// After creation, this URL may be used to get the key for a /// module in the binary. #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] -pub struct StandaloneRelativeFileBaseUrl<'a>(&'a Url); - -impl<'a> From<&'a Url> for StandaloneRelativeFileBaseUrl<'a> { - fn from(url: &'a Url) -> Self { - Self(url) - } +pub enum StandaloneRelativeFileBaseUrl<'a> { + WindowsSystemRoot, + Path(&'a Url), } impl<'a> StandaloneRelativeFileBaseUrl<'a> { - pub fn new(url: &'a Url) -> Self { - debug_assert_eq!(url.scheme(), "file"); - Self(url) - } - /// Gets the module map key of the provided specifier. /// /// * Descendant file specifiers will be made relative to the base. @@ -117,22 +124,29 @@ impl<'a> StandaloneRelativeFileBaseUrl<'a> { if target.scheme() != "file" { return Cow::Borrowed(target.as_str()); } + let base = match self { + Self::Path(base) => base, + Self::WindowsSystemRoot => return Cow::Borrowed(target.path()), + }; - match self.0.make_relative(target) { + match base.make_relative(target) { Some(relative) => { - if relative.starts_with("../") { - Cow::Borrowed(target.as_str()) - } else { - Cow::Owned(relative) - } + // This is not a great scenario to have because it means that the + // specifier is outside the vfs and could cause the binary to act + // strangely. If you encounter this, the fix is to add more paths + // to the vfs builder by calling `add_possible_min_root_dir`. + debug_assert!( + !relative.starts_with("../"), + "{} -> {} ({})", + base.as_str(), + target.as_str(), + relative, + ); + Cow::Owned(relative) } None => Cow::Borrowed(target.as_str()), } } - - pub fn inner(&self) -> &Url { - self.0 - } } #[derive(Deserialize, Serialize)] @@ -174,7 +188,8 @@ pub struct SerializedWorkspaceResolver { pub struct Metadata { pub argv: Vec, pub seed: Option, - pub permissions: PermissionFlags, + pub code_cache_key: Option, + pub permissions: PermissionsOptions, pub location: Option, pub v8_flags: Vec, pub log_level: Option, @@ -186,20 +201,28 @@ pub struct Metadata { pub entrypoint_key: String, pub node_modules: Option, pub unstable_config: UnstableConfig, - pub otel_config: Option, // None means disabled. + pub otel_config: OtelConfig, } +#[allow(clippy::too_many_arguments)] fn write_binary_bytes( mut file_writer: File, original_bin: Vec, metadata: &Metadata, npm_snapshot: Option, remote_modules: &RemoteModulesStoreBuilder, - vfs: VfsBuilder, + source_map_store: &SourceMapStore, + vfs: &BuiltVfs, compile_flags: &CompileFlags, ) -> Result<(), AnyError> { - let data_section_bytes = - serialize_binary_data_section(metadata, npm_snapshot, remote_modules, vfs)?; + let data_section_bytes = serialize_binary_data_section( + metadata, + npm_snapshot, + remote_modules, + source_map_store, + vfs, + ) + .context("Serializing binary data section.")?; let target = compile_flags.resolve_target(); if target.contains("linux") { @@ -236,11 +259,11 @@ pub fn is_standalone_binary(exe_path: &Path) -> bool { } pub struct StandaloneData { - pub fs: Arc, pub metadata: Metadata, pub modules: StandaloneModules, pub npm_snapshot: Option, pub root_path: PathBuf, + pub source_maps: SourceMapStore, pub vfs: Arc, } @@ -268,20 +291,20 @@ impl StandaloneModules { pub fn read<'a>( &'a self, specifier: &'a ModuleSpecifier, + kind: VfsFileSubDataKind, ) -> Result>, AnyError> { if specifier.scheme() == "file" { let path = deno_path_util::url_to_file_path(specifier)?; let bytes = match self.vfs.file_entry(&path) { - Ok(entry) => self.vfs.read_file_all(entry)?, + Ok(entry) => self.vfs.read_file_all(entry, kind)?, Err(err) if err.kind() == ErrorKind::NotFound => { - let bytes = match RealFs.read_file_sync(&path, None) { + match RealFs.read_file_sync(&path, None) { Ok(bytes) => bytes, Err(FsError::Io(err)) if err.kind() == ErrorKind::NotFound => { return Ok(None) } Err(err) => return Err(err.into()), - }; - Cow::Owned(bytes) + } } Err(err) => return Err(err.into()), }; @@ -291,7 +314,18 @@ impl StandaloneModules { data: bytes, })) } else { - self.remote_modules.read(specifier) + self.remote_modules.read(specifier).map(|maybe_entry| { + maybe_entry.map(|entry| DenoCompileModuleData { + media_type: entry.media_type, + specifier: entry.specifier, + data: match kind { + VfsFileSubDataKind::Raw => entry.data, + VfsFileSubDataKind::ModuleGraph => { + entry.transpiled_data.unwrap_or(entry.data) + } + }, + }) + }) } } } @@ -312,7 +346,8 @@ pub fn extract_standalone( mut metadata, npm_snapshot, remote_modules, - mut vfs_dir, + source_maps, + vfs_root_entries, vfs_files_data, } = match deserialize_binary_data_section(data)? { Some(data_section) => data_section, @@ -335,20 +370,18 @@ pub fn extract_standalone( metadata.argv.push(arg.into_string().unwrap()); } let vfs = { - // align the name of the directory with the root dir - vfs_dir.name = root_path.file_name().unwrap().to_string_lossy().to_string(); - let fs_root = VfsRoot { - dir: vfs_dir, + dir: VirtualDirectory { + // align the name of the directory with the root dir + name: root_path.file_name().unwrap().to_string_lossy().to_string(), + entries: vfs_root_entries, + }, root_path: root_path.clone(), start_file_offset: 0, }; Arc::new(FileBackedVfs::new(Cow::Borrowed(vfs_files_data), fs_root)) }; - let fs: Arc = - Arc::new(DenoCompileFileSystem::new(vfs.clone())); Ok(Some(StandaloneData { - fs, metadata, modules: StandaloneModules { remote_modules, @@ -356,15 +389,26 @@ pub fn extract_standalone( }, npm_snapshot, root_path, + source_maps, vfs, })) } +pub struct WriteBinOptions<'a> { + pub writer: File, + pub display_output_filename: &'a str, + pub graph: &'a ModuleGraph, + pub entrypoint: &'a ModuleSpecifier, + pub include_files: &'a [ModuleSpecifier], + pub compile_flags: &'a CompileFlags, +} + pub struct DenoCompileBinaryWriter<'a> { cjs_tracker: &'a CjsTracker, + cli_options: &'a CliOptions, deno_dir: &'a DenoDir, emitter: &'a Emitter, - file_fetcher: &'a FileFetcher, + file_fetcher: &'a CliFileFetcher, http_client_provider: &'a HttpClientProvider, npm_resolver: &'a dyn CliNpmResolver, workspace_resolver: &'a WorkspaceResolver, @@ -375,9 +419,10 @@ impl<'a> DenoCompileBinaryWriter<'a> { #[allow(clippy::too_many_arguments)] pub fn new( cjs_tracker: &'a CjsTracker, + cli_options: &'a CliOptions, deno_dir: &'a DenoDir, emitter: &'a Emitter, - file_fetcher: &'a FileFetcher, + file_fetcher: &'a CliFileFetcher, http_client_provider: &'a HttpClientProvider, npm_resolver: &'a dyn CliNpmResolver, workspace_resolver: &'a WorkspaceResolver, @@ -385,6 +430,7 @@ impl<'a> DenoCompileBinaryWriter<'a> { ) -> Self { Self { cjs_tracker, + cli_options, deno_dir, emitter, file_fetcher, @@ -397,28 +443,25 @@ impl<'a> DenoCompileBinaryWriter<'a> { pub async fn write_bin( &self, - writer: File, - graph: &ModuleGraph, - root_dir_url: StandaloneRelativeFileBaseUrl<'_>, - entrypoint: &ModuleSpecifier, - compile_flags: &CompileFlags, - cli_options: &CliOptions, + options: WriteBinOptions<'_>, ) -> Result<(), AnyError> { // Select base binary based on target - let mut original_binary = self.get_base_binary(compile_flags).await?; + let mut original_binary = + self.get_base_binary(options.compile_flags).await?; - if compile_flags.no_terminal { - let target = compile_flags.resolve_target(); + if options.compile_flags.no_terminal { + let target = options.compile_flags.resolve_target(); if !target.contains("windows") { bail!( "The `--no-terminal` flag is only available when targeting Windows (current: {})", target, ) } - set_windows_binary_to_gui(&mut original_binary)?; + set_windows_binary_to_gui(&mut original_binary) + .context("Setting windows binary to GUI.")?; } - if compile_flags.icon.is_some() { - let target = compile_flags.resolve_target(); + if options.compile_flags.icon.is_some() { + let target = options.compile_flags.resolve_target(); if !target.contains("windows") { bail!( "The `--icon` flag is only available when targeting Windows (current: {})", @@ -426,17 +469,7 @@ impl<'a> DenoCompileBinaryWriter<'a> { ) } } - self - .write_standalone_binary( - writer, - original_binary, - graph, - root_dir_url, - entrypoint, - cli_options, - compile_flags, - ) - .await + self.write_standalone_binary(options, original_binary) } async fn get_base_binary( @@ -447,7 +480,7 @@ impl<'a> DenoCompileBinaryWriter<'a> { // // Phase 2 of the 'min sized' deno compile RFC talks // about adding this as a flag. - if let Some(path) = std::env::var_os("DENORT_BIN") { + if let Some(path) = get_dev_binary_path() { return std::fs::read(&path).with_context(|| { format!("Could not find denort at '{}'", path.to_string_lossy()) }); @@ -476,10 +509,14 @@ impl<'a> DenoCompileBinaryWriter<'a> { if !binary_path.exists() { self .download_base_binary(&download_directory, &binary_path_suffix) - .await?; + .await + .context("Setting up base binary.")?; } - let archive_data = std::fs::read(binary_path)?; + let read_file = |path: &Path| -> Result, AnyError> { + std::fs::read(path).with_context(|| format!("Reading {}", path.display())) + }; + let archive_data = read_file(&binary_path)?; let temp_dir = tempfile::TempDir::new()?; let base_binary_path = archive::unpack_into_dir(archive::UnpackArgs { exe_name: "denort", @@ -488,7 +525,7 @@ impl<'a> DenoCompileBinaryWriter<'a> { is_windows: target.contains("windows"), dest_path: temp_dir.path(), })?; - let base_binary = std::fs::read(base_binary_path)?; + let base_binary = read_file(&base_binary_path)?; drop(temp_dir); // delete the temp dir Ok(base_binary) } @@ -516,149 +553,227 @@ impl<'a> DenoCompileBinaryWriter<'a> { let bytes = match maybe_bytes { Some(bytes) => bytes, None => { - log::info!("Download could not be found, aborting"); - deno_runtime::exit(1); + bail!("Download could not be found, aborting"); } }; - std::fs::create_dir_all(output_directory)?; + let create_dir_all = |dir: &Path| { + std::fs::create_dir_all(dir) + .with_context(|| format!("Creating {}", dir.display())) + }; + create_dir_all(output_directory)?; let output_path = output_directory.join(binary_path_suffix); - std::fs::create_dir_all(output_path.parent().unwrap())?; - tokio::fs::write(output_path, bytes).await?; + create_dir_all(output_path.parent().unwrap())?; + std::fs::write(&output_path, bytes) + .with_context(|| format!("Writing {}", output_path.display()))?; Ok(()) } /// This functions creates a standalone deno binary by appending a bundle /// and magic trailer to the currently executing binary. #[allow(clippy::too_many_arguments)] - async fn write_standalone_binary( + fn write_standalone_binary( &self, - writer: File, + options: WriteBinOptions<'_>, original_bin: Vec, - graph: &ModuleGraph, - root_dir_url: StandaloneRelativeFileBaseUrl<'_>, - entrypoint: &ModuleSpecifier, - cli_options: &CliOptions, - compile_flags: &CompileFlags, ) -> Result<(), AnyError> { - let ca_data = match cli_options.ca_data() { + let WriteBinOptions { + writer, + display_output_filename, + graph, + entrypoint, + include_files, + compile_flags, + } = options; + let ca_data = match self.cli_options.ca_data() { Some(CaData::File(ca_file)) => Some( - std::fs::read(ca_file) - .with_context(|| format!("Reading: {ca_file}"))?, + std::fs::read(ca_file).with_context(|| format!("Reading {ca_file}"))?, ), Some(CaData::Bytes(bytes)) => Some(bytes.clone()), None => None, }; - let root_path = root_dir_url.inner().to_file_path().unwrap(); - let (maybe_npm_vfs, node_modules, npm_snapshot) = match self - .npm_resolver - .as_inner() - { + let mut vfs = VfsBuilder::new(); + let npm_snapshot = match self.npm_resolver.as_inner() { InnerCliNpmResolverRef::Managed(managed) => { let snapshot = managed.serialized_valid_snapshot_for_system(&self.npm_system_info); if !snapshot.as_serialized().packages.is_empty() { - let npm_vfs_builder = self.build_npm_vfs(&root_path, cli_options)?; - ( - Some(npm_vfs_builder), - Some(NodeModules::Managed { - node_modules_dir: self.npm_resolver.root_node_modules_path().map( - |path| { - root_dir_url - .specifier_key( - &ModuleSpecifier::from_directory_path(path).unwrap(), - ) - .into_owned() - }, - ), - }), - Some(snapshot), - ) + self.fill_npm_vfs(&mut vfs).context("Building npm vfs.")?; + Some(snapshot) } else { - (None, None, None) + None } } - InnerCliNpmResolverRef::Byonm(resolver) => { - let npm_vfs_builder = self.build_npm_vfs(&root_path, cli_options)?; - ( - Some(npm_vfs_builder), - Some(NodeModules::Byonm { - root_node_modules_dir: resolver.root_node_modules_path().map( - |node_modules_dir| { - root_dir_url - .specifier_key( - &ModuleSpecifier::from_directory_path(node_modules_dir) - .unwrap(), - ) - .into_owned() - }, - ), - }), - None, - ) + InnerCliNpmResolverRef::Byonm(_) => { + self.fill_npm_vfs(&mut vfs)?; + None } }; - let mut vfs = if let Some(npm_vfs) = maybe_npm_vfs { - npm_vfs - } else { - VfsBuilder::new(root_path.clone())? - }; + for include_file in include_files { + let path = deno_path_util::url_to_file_path(include_file)?; + vfs + .add_file_at_path(&path) + .with_context(|| format!("Including {}", path.display()))?; + } let mut remote_modules_store = RemoteModulesStoreBuilder::default(); + let mut source_maps = Vec::with_capacity(graph.specifiers_count()); + // todo(dsherret): transpile in parallel for module in graph.modules() { if module.specifier().scheme() == "data" { continue; // don't store data urls as an entry as they're in the code } - let (maybe_source, media_type) = match module { + let (maybe_original_source, maybe_transpiled, media_type) = match module { deno_graph::Module::Js(m) => { - let source = if m.media_type.is_emittable() { + let original_bytes = m.source.as_bytes().to_vec(); + let maybe_transpiled = if m.media_type.is_emittable() { let is_cjs = self.cjs_tracker.is_cjs_with_known_is_script( &m.specifier, m.media_type, m.is_script, )?; let module_kind = ModuleKind::from_is_cjs(is_cjs); - let source = self - .emitter - .emit_parsed_source( + let (source, source_map) = + self.emitter.emit_parsed_source_for_deno_compile( &m.specifier, m.media_type, module_kind, &m.source, - ) - .await?; - source.into_bytes() + )?; + if source != m.source.as_ref() { + source_maps.push((&m.specifier, source_map)); + Some(source.into_bytes()) + } else { + None + } } else { - m.source.as_bytes().to_vec() + None }; - (Some(source), m.media_type) + (Some(original_bytes), maybe_transpiled, m.media_type) } deno_graph::Module::Json(m) => { - (Some(m.source.as_bytes().to_vec()), m.media_type) + (Some(m.source.as_bytes().to_vec()), None, m.media_type) + } + deno_graph::Module::Wasm(m) => { + (Some(m.source.to_vec()), None, MediaType::Wasm) } deno_graph::Module::Npm(_) | deno_graph::Module::Node(_) - | deno_graph::Module::External(_) => (None, MediaType::Unknown), + | deno_graph::Module::External(_) => (None, None, MediaType::Unknown), }; - if module.specifier().scheme() == "file" { - let file_path = deno_path_util::url_to_file_path(module.specifier())?; - vfs - .add_file_with_data( - &file_path, - match maybe_source { - Some(source) => source, - None => RealFs.read_file_sync(&file_path, None)?, - }, - ) - .with_context(|| { - format!("Failed adding '{}'", file_path.display()) - })?; - } else if let Some(source) = maybe_source { - remote_modules_store.add(module.specifier(), media_type, source); + if let Some(original_source) = maybe_original_source { + if module.specifier().scheme() == "file" { + let file_path = deno_path_util::url_to_file_path(module.specifier())?; + vfs + .add_file_with_data( + &file_path, + original_source, + VfsFileSubDataKind::Raw, + ) + .with_context(|| { + format!("Failed adding '{}'", file_path.display()) + })?; + if let Some(transpiled_source) = maybe_transpiled { + vfs + .add_file_with_data( + &file_path, + transpiled_source, + VfsFileSubDataKind::ModuleGraph, + ) + .with_context(|| { + format!("Failed adding '{}'", file_path.display()) + })?; + } + } else { + remote_modules_store.add( + module.specifier(), + media_type, + original_source, + maybe_transpiled, + ); + } } } remote_modules_store.add_redirects(&graph.redirects); - let env_vars_from_env_file = match cli_options.env_file_name() { + if let Some(import_map) = self.workspace_resolver.maybe_import_map() { + if let Ok(file_path) = url_to_file_path(import_map.base_url()) { + if let Some(import_map_parent_dir) = file_path.parent() { + // tell the vfs about the import map's parent directory in case it + // falls outside what the root of where the VFS will be based + vfs.add_possible_min_root_dir(import_map_parent_dir); + } + } + } + if let Some(node_modules_dir) = self.npm_resolver.root_node_modules_path() { + // ensure the vfs doesn't go below the node_modules directory's parent + if let Some(parent) = node_modules_dir.parent() { + vfs.add_possible_min_root_dir(parent); + } + } + + let vfs = self.build_vfs_consolidating_global_npm_cache(vfs); + let root_dir_url = match &vfs.root_path { + WindowsSystemRootablePath::Path(dir) => { + Some(url_from_directory_path(dir)?) + } + WindowsSystemRootablePath::WindowSystemRoot => None, + }; + let root_dir_url = match &root_dir_url { + Some(url) => StandaloneRelativeFileBaseUrl::Path(url), + None => StandaloneRelativeFileBaseUrl::WindowsSystemRoot, + }; + + let code_cache_key = if self.cli_options.code_cache_enabled() { + let mut hasher = FastInsecureHasher::new_deno_versioned(); + for module in graph.modules() { + if let Some(source) = module.source() { + hasher + .write(root_dir_url.specifier_key(module.specifier()).as_bytes()); + hasher.write(source.as_bytes()); + } + } + Some(hasher.finish()) + } else { + None + }; + + let mut source_map_store = SourceMapStore::with_capacity(source_maps.len()); + for (specifier, source_map) in source_maps { + source_map_store.add( + Cow::Owned(root_dir_url.specifier_key(specifier).into_owned()), + Cow::Owned(source_map.into_bytes()), + ); + } + + let node_modules = match self.npm_resolver.as_inner() { + InnerCliNpmResolverRef::Managed(_) => { + npm_snapshot.as_ref().map(|_| NodeModules::Managed { + node_modules_dir: self.npm_resolver.root_node_modules_path().map( + |path| { + root_dir_url + .specifier_key( + &ModuleSpecifier::from_directory_path(path).unwrap(), + ) + .into_owned() + }, + ), + }) + } + InnerCliNpmResolverRef::Byonm(resolver) => Some(NodeModules::Byonm { + root_node_modules_dir: resolver.root_node_modules_path().map( + |node_modules_dir| { + root_dir_url + .specifier_key( + &ModuleSpecifier::from_directory_path(node_modules_dir) + .unwrap(), + ) + .into_owned() + }, + ), + }), + }; + + let env_vars_from_env_file = match self.cli_options.env_file_name() { Some(env_filenames) => { let mut aggregated_env_vars = IndexMap::new(); for env_filename in env_filenames.iter().rev() { @@ -672,17 +787,21 @@ impl<'a> DenoCompileBinaryWriter<'a> { None => Default::default(), }; + output_vfs(&vfs, display_output_filename); + let metadata = Metadata { argv: compile_flags.args.clone(), - seed: cli_options.seed(), - location: cli_options.location_flag().clone(), - permissions: cli_options.permission_flags().clone(), - v8_flags: cli_options.v8_flags().clone(), - unsafely_ignore_certificate_errors: cli_options + seed: self.cli_options.seed(), + code_cache_key, + location: self.cli_options.location_flag().clone(), + permissions: self.cli_options.permissions_options(), + v8_flags: self.cli_options.v8_flags().clone(), + unsafely_ignore_certificate_errors: self + .cli_options .unsafely_ignore_certificate_errors() .clone(), - log_level: cli_options.log_level(), - ca_stores: cli_options.ca_stores().clone(), + log_level: self.cli_options.log_level(), + ca_stores: self.cli_options.ca_stores().clone(), ca_data, env_vars_from_env_file, entrypoint_key: root_dir_url.specifier_key(entrypoint).into_owned(), @@ -725,11 +844,13 @@ impl<'a> DenoCompileBinaryWriter<'a> { node_modules, unstable_config: UnstableConfig { legacy_flag_enabled: false, - bare_node_builtins: cli_options.unstable_bare_node_builtins(), - sloppy_imports: cli_options.unstable_sloppy_imports(), - features: cli_options.unstable_features(), + bare_node_builtins: self.cli_options.unstable_bare_node_builtins(), + detect_cjs: self.cli_options.unstable_detect_cjs(), + sloppy_imports: self.cli_options.unstable_sloppy_imports(), + features: self.cli_options.unstable_features(), + npm_lazy_caching: self.cli_options.unstable_npm_lazy_caching(), }, - otel_config: cli_options.otel_config(), + otel_config: self.cli_options.otel_config(), }; write_binary_bytes( @@ -738,16 +859,14 @@ impl<'a> DenoCompileBinaryWriter<'a> { &metadata, npm_snapshot.map(|s| s.into_serialized()), &remote_modules_store, - vfs, + &source_map_store, + &vfs, compile_flags, ) + .context("Writing binary bytes") } - fn build_npm_vfs( - &self, - root_path: &Path, - cli_options: &CliOptions, - ) -> Result { + fn fill_npm_vfs(&self, builder: &mut VfsBuilder) -> Result<(), AnyError> { fn maybe_warn_different_system(system_info: &NpmSystemInfo) { if system_info != &NpmSystemInfo::default() { log::warn!("{} The node_modules directory may be incompatible with the target system.", crate::colors::yellow("Warning")); @@ -758,15 +877,10 @@ impl<'a> DenoCompileBinaryWriter<'a> { InnerCliNpmResolverRef::Managed(npm_resolver) => { if let Some(node_modules_path) = npm_resolver.root_node_modules_path() { maybe_warn_different_system(&self.npm_system_info); - let mut builder = VfsBuilder::new(root_path.to_path_buf())?; builder.add_dir_recursive(node_modules_path)?; - Ok(builder) + Ok(()) } else { - // DO NOT include the user's registry url as it may contain credentials, - // but also don't make this dependent on the registry url - let global_cache_root_path = npm_resolver.global_cache_root_path(); - let mut builder = - VfsBuilder::new(global_cache_root_path.to_path_buf())?; + // we'll flatten to remove any custom registries later let mut packages = npm_resolver.all_system_packages(&self.npm_system_info); packages.sort_by(|a, b| a.id.cmp(&b.id)); // determinism @@ -775,62 +889,23 @@ impl<'a> DenoCompileBinaryWriter<'a> { npm_resolver.resolve_pkg_folder_from_pkg_id(&package.id)?; builder.add_dir_recursive(&folder)?; } - - // Flatten all the registries folders into a single ".deno_compile_node_modules/localhost" folder - // that will be used by denort when loading the npm cache. This avoids us exposing - // the user's private registry information and means we don't have to bother - // serializing all the different registry config into the binary. - builder.with_root_dir(|root_dir| { - root_dir.name = ".deno_compile_node_modules".to_string(); - let mut new_entries = Vec::with_capacity(root_dir.entries.len()); - let mut localhost_entries = IndexMap::new(); - for entry in std::mem::take(&mut root_dir.entries) { - match entry { - VfsEntry::Dir(dir) => { - for entry in dir.entries { - log::debug!( - "Flattening {} into node_modules", - entry.name() - ); - if let Some(existing) = - localhost_entries.insert(entry.name().to_string(), entry) - { - panic!( - "Unhandled scenario where a duplicate entry was found: {:?}", - existing - ); - } - } - } - VfsEntry::File(_) | VfsEntry::Symlink(_) => { - new_entries.push(entry); - } - } - } - new_entries.push(VfsEntry::Dir(VirtualDirectory { - name: "localhost".to_string(), - entries: localhost_entries.into_iter().map(|(_, v)| v).collect(), - })); - // needs to be sorted by name - new_entries.sort_by(|a, b| a.name().cmp(b.name())); - root_dir.entries = new_entries; - }); - - builder.set_new_root_path(root_path.to_path_buf())?; - - Ok(builder) + Ok(()) } } InnerCliNpmResolverRef::Byonm(_) => { maybe_warn_different_system(&self.npm_system_info); - let mut builder = VfsBuilder::new(root_path.to_path_buf())?; - for pkg_json in cli_options.workspace().package_jsons() { + for pkg_json in self.cli_options.workspace().package_jsons() { builder.add_file_at_path(&pkg_json.path)?; } // traverse and add all the node_modules directories in the workspace let mut pending_dirs = VecDeque::new(); pending_dirs.push_back( - cli_options.workspace().root_dir().to_file_path().unwrap(), + self + .cli_options + .workspace() + .root_dir() + .to_file_path() + .unwrap(), ); while let Some(pending_dir) = pending_dirs.pop_front() { let mut entries = fs::read_dir(&pending_dir) @@ -851,10 +926,120 @@ impl<'a> DenoCompileBinaryWriter<'a> { } } } - Ok(builder) + Ok(()) } } } + + fn build_vfs_consolidating_global_npm_cache( + &self, + mut vfs: VfsBuilder, + ) -> BuiltVfs { + match self.npm_resolver.as_inner() { + InnerCliNpmResolverRef::Managed(npm_resolver) => { + if npm_resolver.root_node_modules_path().is_some() { + return vfs.build(); + } + + let global_cache_root_path = npm_resolver.global_cache_root_path(); + + // Flatten all the registries folders into a single ".deno_compile_node_modules/localhost" folder + // that will be used by denort when loading the npm cache. This avoids us exposing + // the user's private registry information and means we don't have to bother + // serializing all the different registry config into the binary. + let Some(root_dir) = vfs.get_dir_mut(global_cache_root_path) else { + return vfs.build(); + }; + + root_dir.name = DENO_COMPILE_GLOBAL_NODE_MODULES_DIR_NAME.to_string(); + let mut new_entries = Vec::with_capacity(root_dir.entries.len()); + let mut localhost_entries = IndexMap::new(); + for entry in root_dir.entries.take_inner() { + match entry { + VfsEntry::Dir(mut dir) => { + for entry in dir.entries.take_inner() { + log::debug!("Flattening {} into node_modules", entry.name()); + if let Some(existing) = + localhost_entries.insert(entry.name().to_string(), entry) + { + panic!( + "Unhandled scenario where a duplicate entry was found: {:?}", + existing + ); + } + } + } + VfsEntry::File(_) | VfsEntry::Symlink(_) => { + new_entries.push(entry); + } + } + } + new_entries.push(VfsEntry::Dir(VirtualDirectory { + name: "localhost".to_string(), + entries: VirtualDirectoryEntries::new( + localhost_entries.into_iter().map(|(_, v)| v).collect(), + ), + })); + root_dir.entries = VirtualDirectoryEntries::new(new_entries); + + // it's better to not expose the user's cache directory, so take it out + // of there + let parent = global_cache_root_path.parent().unwrap(); + let parent_dir = vfs.get_dir_mut(parent).unwrap(); + let index = parent_dir + .entries + .binary_search(DENO_COMPILE_GLOBAL_NODE_MODULES_DIR_NAME) + .unwrap(); + let npm_global_cache_dir_entry = parent_dir.entries.remove(index); + + // go up from the ancestors removing empty directories... + // this is not as optimized as it could be + let mut last_name = + Cow::Borrowed(DENO_COMPILE_GLOBAL_NODE_MODULES_DIR_NAME); + for ancestor in parent.ancestors() { + let dir = vfs.get_dir_mut(ancestor).unwrap(); + if let Ok(index) = dir.entries.binary_search(&last_name) { + dir.entries.remove(index); + } + last_name = Cow::Owned(dir.name.clone()); + if !dir.entries.is_empty() { + break; + } + } + + // now build the vfs and add the global cache dir entry there + let mut built_vfs = vfs.build(); + built_vfs.entries.insert(npm_global_cache_dir_entry); + built_vfs + } + InnerCliNpmResolverRef::Byonm(_) => vfs.build(), + } + } +} + +fn get_denort_path(deno_exe: PathBuf) -> Option { + let mut denort = deno_exe; + denort.set_file_name(if cfg!(windows) { + "denort.exe" + } else { + "denort" + }); + denort.exists().then(|| denort.into_os_string()) +} + +fn get_dev_binary_path() -> Option { + env::var_os("DENORT_BIN").or_else(|| { + env::current_exe().ok().and_then(|exec_path| { + if exec_path + .components() + .any(|component| component == Component::Normal("target".as_ref())) + { + get_denort_path(exec_path) + } else { + None + } + }) + }) } /// This function returns the environment variables specified diff --git a/cli/standalone/code_cache.rs b/cli/standalone/code_cache.rs new file mode 100644 index 00000000000000..de9ff2a14142f3 --- /dev/null +++ b/cli/standalone/code_cache.rs @@ -0,0 +1,525 @@ +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::collections::BTreeMap; +use std::collections::HashMap; +use std::io::BufReader; +use std::io::BufWriter; +use std::io::Read; +use std::io::Write; +use std::path::Path; +use std::path::PathBuf; +use std::sync::Arc; + +use deno_ast::ModuleSpecifier; +use deno_core::anyhow::bail; +use deno_core::error::AnyError; +use deno_core::parking_lot::Mutex; +use deno_core::unsync::sync::AtomicFlag; +use deno_path_util::get_atomic_path; +use deno_runtime::code_cache::CodeCache; +use deno_runtime::code_cache::CodeCacheType; + +use crate::cache::FastInsecureHasher; +use crate::worker::CliCodeCache; + +enum CodeCacheStrategy { + FirstRun(FirstRunCodeCacheStrategy), + SubsequentRun(SubsequentRunCodeCacheStrategy), +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct DenoCompileCodeCacheEntry { + pub source_hash: u64, + pub data: Vec, +} + +pub struct DenoCompileCodeCache { + strategy: CodeCacheStrategy, +} + +impl DenoCompileCodeCache { + pub fn new(file_path: PathBuf, cache_key: u64) -> Self { + // attempt to deserialize the cache data + match deserialize(&file_path, cache_key) { + Ok(data) => { + log::debug!( + "Loaded {} code cache entries from {}", + data.len(), + file_path.display() + ); + Self { + strategy: CodeCacheStrategy::SubsequentRun( + SubsequentRunCodeCacheStrategy { + is_finished: AtomicFlag::lowered(), + data: Mutex::new(data), + }, + ), + } + } + Err(err) => { + log::debug!( + "Failed to deserialize code cache from {}: {:#}", + file_path.display(), + err + ); + Self { + strategy: CodeCacheStrategy::FirstRun(FirstRunCodeCacheStrategy { + cache_key, + file_path, + is_finished: AtomicFlag::lowered(), + data: Mutex::new(FirstRunCodeCacheData { + cache: HashMap::new(), + add_count: 0, + }), + }), + } + } + } + } +} + +impl CodeCache for DenoCompileCodeCache { + fn get_sync( + &self, + specifier: &ModuleSpecifier, + code_cache_type: CodeCacheType, + source_hash: u64, + ) -> Option> { + match &self.strategy { + CodeCacheStrategy::FirstRun(strategy) => { + if !strategy.is_finished.is_raised() { + // we keep track of how many times the cache is requested + // then serialize the cache when we get that number of + // "set" calls + strategy.data.lock().add_count += 1; + } + None + } + CodeCacheStrategy::SubsequentRun(strategy) => { + if strategy.is_finished.is_raised() { + return None; + } + strategy.take_from_cache(specifier, code_cache_type, source_hash) + } + } + } + + fn set_sync( + &self, + specifier: ModuleSpecifier, + code_cache_type: CodeCacheType, + source_hash: u64, + bytes: &[u8], + ) { + match &self.strategy { + CodeCacheStrategy::FirstRun(strategy) => { + if strategy.is_finished.is_raised() { + return; + } + + let data_to_serialize = { + let mut data = strategy.data.lock(); + data.cache.insert( + (specifier.to_string(), code_cache_type), + DenoCompileCodeCacheEntry { + source_hash, + data: bytes.to_vec(), + }, + ); + if data.add_count != 0 { + data.add_count -= 1; + } + if data.add_count == 0 { + // don't allow using the cache anymore + strategy.is_finished.raise(); + if data.cache.is_empty() { + None + } else { + Some(std::mem::take(&mut data.cache)) + } + } else { + None + } + }; + if let Some(cache_data) = &data_to_serialize { + strategy.write_cache_data(cache_data); + } + } + CodeCacheStrategy::SubsequentRun(_) => { + // do nothing + } + } + } +} + +impl CliCodeCache for DenoCompileCodeCache { + fn enabled(&self) -> bool { + match &self.strategy { + CodeCacheStrategy::FirstRun(strategy) => { + !strategy.is_finished.is_raised() + } + CodeCacheStrategy::SubsequentRun(strategy) => { + !strategy.is_finished.is_raised() + } + } + } + + fn as_code_cache(self: Arc) -> Arc { + self + } +} + +type CodeCacheKey = (String, CodeCacheType); + +struct FirstRunCodeCacheData { + cache: HashMap, + add_count: usize, +} + +struct FirstRunCodeCacheStrategy { + cache_key: u64, + file_path: PathBuf, + is_finished: AtomicFlag, + data: Mutex, +} + +impl FirstRunCodeCacheStrategy { + fn write_cache_data( + &self, + cache_data: &HashMap, + ) { + let count = cache_data.len(); + let temp_file = + get_atomic_path(&sys_traits::impls::RealSys, &self.file_path); + match serialize(&temp_file, self.cache_key, cache_data) { + Ok(()) => { + if let Err(err) = std::fs::rename(&temp_file, &self.file_path) { + log::debug!("Failed to rename code cache: {}", err); + let _ = std::fs::remove_file(&temp_file); + } else { + log::debug!("Serialized {} code cache entries", count); + } + } + Err(err) => { + let _ = std::fs::remove_file(&temp_file); + log::debug!("Failed to serialize code cache: {}", err); + } + } + } +} + +struct SubsequentRunCodeCacheStrategy { + is_finished: AtomicFlag, + data: Mutex>, +} + +impl SubsequentRunCodeCacheStrategy { + fn take_from_cache( + &self, + specifier: &ModuleSpecifier, + code_cache_type: CodeCacheType, + source_hash: u64, + ) -> Option> { + let mut data = self.data.lock(); + // todo(dsherret): how to avoid the clone here? + let entry = data.remove(&(specifier.to_string(), code_cache_type))?; + if entry.source_hash != source_hash { + return None; + } + if data.is_empty() { + self.is_finished.raise(); + } + Some(entry.data) + } +} + +/// File format: +/// -
+/// - +/// - +/// - <[entry length]> - u64 * number of entries +/// - <[entry]> +/// - <[u8]: entry data> +/// - +/// - : code cache type +/// - +/// - +/// - +fn serialize( + file_path: &Path, + cache_key: u64, + cache: &HashMap, +) -> Result<(), AnyError> { + let cache_file = std::fs::OpenOptions::new() + .create(true) + .truncate(true) + .write(true) + .open(file_path)?; + let mut writer = BufWriter::new(cache_file); + serialize_with_writer(&mut writer, cache_key, cache) +} + +fn serialize_with_writer( + writer: &mut BufWriter, + cache_key: u64, + cache: &HashMap, +) -> Result<(), AnyError> { + // header + writer.write_all(&cache_key.to_le_bytes())?; + writer.write_all(&(cache.len() as u32).to_le_bytes())?; + // lengths of each entry + for ((specifier, _), entry) in cache { + let len: u64 = + entry.data.len() as u64 + specifier.len() as u64 + 1 + 4 + 8 + 8; + writer.write_all(&len.to_le_bytes())?; + } + // entries + for ((specifier, code_cache_type), entry) in cache { + writer.write_all(&entry.data)?; + writer.write_all(&[match code_cache_type { + CodeCacheType::EsModule => 0, + CodeCacheType::Script => 1, + }])?; + writer.write_all(specifier.as_bytes())?; + writer.write_all(&(specifier.len() as u32).to_le_bytes())?; + writer.write_all(&entry.source_hash.to_le_bytes())?; + let hash: u64 = FastInsecureHasher::new_without_deno_version() + .write(&entry.data) + .finish(); + writer.write_all(&hash.to_le_bytes())?; + } + + writer.flush()?; + + Ok(()) +} + +fn deserialize( + file_path: &Path, + expected_cache_key: u64, +) -> Result, AnyError> { + let cache_file = std::fs::File::open(file_path)?; + let mut reader = BufReader::new(cache_file); + deserialize_with_reader(&mut reader, expected_cache_key) +} + +fn deserialize_with_reader( + reader: &mut BufReader, + expected_cache_key: u64, +) -> Result, AnyError> { + // it's very important to use this below so that a corrupt cache file + // doesn't cause a memory allocation error + fn new_vec_sized( + capacity: usize, + default_value: T, + ) -> Result, AnyError> { + let mut vec = Vec::new(); + vec.try_reserve(capacity)?; + vec.resize(capacity, default_value); + Ok(vec) + } + + fn try_subtract(a: usize, b: usize) -> Result { + if a < b { + bail!("Integer underflow"); + } + Ok(a - b) + } + + let mut header_bytes = vec![0; 8 + 4]; + reader.read_exact(&mut header_bytes)?; + let actual_cache_key = u64::from_le_bytes(header_bytes[..8].try_into()?); + if actual_cache_key != expected_cache_key { + // cache bust + bail!("Cache key mismatch"); + } + let len = u32::from_le_bytes(header_bytes[8..].try_into()?) as usize; + // read the lengths for each entry found in the file + let entry_len_bytes_capacity = len * 8; + let mut entry_len_bytes = new_vec_sized(entry_len_bytes_capacity, 0)?; + reader.read_exact(&mut entry_len_bytes)?; + let mut lengths = Vec::new(); + lengths.try_reserve(len)?; + for i in 0..len { + let pos = i * 8; + lengths.push( + u64::from_le_bytes(entry_len_bytes[pos..pos + 8].try_into()?) as usize, + ); + } + + let mut map = HashMap::new(); + map.try_reserve(len)?; + for len in lengths { + let mut buffer = new_vec_sized(len, 0)?; + reader.read_exact(&mut buffer)?; + let entry_data_hash_start_pos = try_subtract(buffer.len(), 8)?; + let expected_entry_data_hash = + u64::from_le_bytes(buffer[entry_data_hash_start_pos..].try_into()?); + let source_hash_start_pos = try_subtract(entry_data_hash_start_pos, 8)?; + let source_hash = u64::from_le_bytes( + buffer[source_hash_start_pos..entry_data_hash_start_pos].try_into()?, + ); + let specifier_end_pos = try_subtract(source_hash_start_pos, 4)?; + let specifier_len = u32::from_le_bytes( + buffer[specifier_end_pos..source_hash_start_pos].try_into()?, + ) as usize; + let specifier_start_pos = try_subtract(specifier_end_pos, specifier_len)?; + let specifier = String::from_utf8( + buffer[specifier_start_pos..specifier_end_pos].to_vec(), + )?; + let code_cache_type_pos = try_subtract(specifier_start_pos, 1)?; + let code_cache_type = match buffer[code_cache_type_pos] { + 0 => CodeCacheType::EsModule, + 1 => CodeCacheType::Script, + _ => bail!("Invalid code cache type"), + }; + buffer.truncate(code_cache_type_pos); + let actual_entry_data_hash: u64 = + FastInsecureHasher::new_without_deno_version() + .write(&buffer) + .finish(); + if expected_entry_data_hash != actual_entry_data_hash { + bail!("Hash mismatch.") + } + map.insert( + (specifier, code_cache_type), + DenoCompileCodeCacheEntry { + source_hash, + data: buffer, + }, + ); + } + + Ok(map) +} + +#[cfg(test)] +mod test { + use std::fs::File; + + use test_util::TempDir; + + use super::*; + + #[test] + fn serialize_deserialize() { + let cache_key = 123456; + let cache = { + let mut cache = HashMap::new(); + cache.insert( + ("specifier1".to_string(), CodeCacheType::EsModule), + DenoCompileCodeCacheEntry { + source_hash: 1, + data: vec![1, 2, 3], + }, + ); + cache.insert( + ("specifier2".to_string(), CodeCacheType::EsModule), + DenoCompileCodeCacheEntry { + source_hash: 2, + data: vec![4, 5, 6], + }, + ); + cache.insert( + ("specifier2".to_string(), CodeCacheType::Script), + DenoCompileCodeCacheEntry { + source_hash: 2, + data: vec![6, 5, 1], + }, + ); + cache + }; + let mut buffer = Vec::new(); + serialize_with_writer(&mut BufWriter::new(&mut buffer), cache_key, &cache) + .unwrap(); + let deserialized = + deserialize_with_reader(&mut BufReader::new(&buffer[..]), cache_key) + .unwrap(); + assert_eq!(cache, deserialized); + } + + #[test] + fn serialize_deserialize_empty() { + let cache_key = 1234; + let cache = HashMap::new(); + let mut buffer = Vec::new(); + serialize_with_writer(&mut BufWriter::new(&mut buffer), cache_key, &cache) + .unwrap(); + let deserialized = + deserialize_with_reader(&mut BufReader::new(&buffer[..]), cache_key) + .unwrap(); + assert_eq!(cache, deserialized); + } + + #[test] + fn serialize_deserialize_corrupt() { + let buffer = "corrupttestingtestingtesting".as_bytes().to_vec(); + let err = deserialize_with_reader(&mut BufReader::new(&buffer[..]), 1234) + .unwrap_err(); + assert_eq!(err.to_string(), "Cache key mismatch"); + } + + #[test] + fn code_cache() { + let temp_dir = TempDir::new(); + let file_path = temp_dir.path().join("cache.bin").to_path_buf(); + let url1 = ModuleSpecifier::parse("https://deno.land/example1.js").unwrap(); + let url2 = ModuleSpecifier::parse("https://deno.land/example2.js").unwrap(); + // first run + { + let code_cache = DenoCompileCodeCache::new(file_path.clone(), 1234); + assert!(code_cache + .get_sync(&url1, CodeCacheType::EsModule, 0) + .is_none()); + assert!(code_cache + .get_sync(&url2, CodeCacheType::EsModule, 1) + .is_none()); + assert!(code_cache.enabled()); + code_cache.set_sync(url1.clone(), CodeCacheType::EsModule, 0, &[1, 2, 3]); + assert!(code_cache.enabled()); + assert!(!file_path.exists()); + code_cache.set_sync(url2.clone(), CodeCacheType::EsModule, 1, &[2, 1, 3]); + assert!(file_path.exists()); // now the new code cache exists + assert!(!code_cache.enabled()); // no longer enabled + } + // second run + { + let code_cache = DenoCompileCodeCache::new(file_path.clone(), 1234); + assert!(code_cache.enabled()); + let result1 = code_cache + .get_sync(&url1, CodeCacheType::EsModule, 0) + .unwrap(); + assert!(code_cache.enabled()); + let result2 = code_cache + .get_sync(&url2, CodeCacheType::EsModule, 1) + .unwrap(); + assert!(!code_cache.enabled()); // no longer enabled + assert_eq!(result1, vec![1, 2, 3]); + assert_eq!(result2, vec![2, 1, 3]); + } + + // new cache key first run + { + let code_cache = DenoCompileCodeCache::new(file_path.clone(), 54321); + assert!(code_cache + .get_sync(&url1, CodeCacheType::EsModule, 0) + .is_none()); + assert!(code_cache + .get_sync(&url2, CodeCacheType::EsModule, 1) + .is_none()); + code_cache.set_sync(url1.clone(), CodeCacheType::EsModule, 0, &[2, 2, 3]); + code_cache.set_sync(url2.clone(), CodeCacheType::EsModule, 1, &[3, 2, 3]); + } + // new cache key second run + { + let code_cache = DenoCompileCodeCache::new(file_path.clone(), 54321); + let result1 = code_cache + .get_sync(&url1, CodeCacheType::EsModule, 0) + .unwrap(); + assert_eq!(result1, vec![2, 2, 3]); + assert!(code_cache + .get_sync(&url2, CodeCacheType::EsModule, 5) // different hash will cause none + .is_none()); + } + } +} diff --git a/cli/standalone/file_system.rs b/cli/standalone/file_system.rs index 712c6ee91878e3..b04db88c90284f 100644 --- a/cli/standalone/file_system.rs +++ b/cli/standalone/file_system.rs @@ -1,9 +1,13 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. +use std::borrow::Cow; +use std::io::ErrorKind; use std::path::Path; use std::path::PathBuf; use std::rc::Rc; use std::sync::Arc; +use std::time::Duration; +use std::time::SystemTime; use deno_runtime::deno_fs::AccessCheckCb; use deno_runtime::deno_fs::FileSystem; @@ -15,8 +19,18 @@ use deno_runtime::deno_io::fs::File; use deno_runtime::deno_io::fs::FsError; use deno_runtime::deno_io::fs::FsResult; use deno_runtime::deno_io::fs::FsStat; +use sys_traits::boxed::BoxedFsDirEntry; +use sys_traits::boxed::BoxedFsMetadataValue; +use sys_traits::boxed::FsMetadataBoxed; +use sys_traits::boxed::FsReadDirBoxed; +use sys_traits::FsCopy; +use sys_traits::FsMetadata; use super::virtual_fs::FileBackedVfs; +use super::virtual_fs::FileBackedVfsDirEntry; +use super::virtual_fs::FileBackedVfsFile; +use super::virtual_fs::FileBackedVfsMetadata; +use super::virtual_fs::VfsFileSubDataKind; #[derive(Debug, Clone)] pub struct DenoCompileFileSystem(Arc); @@ -34,23 +48,32 @@ impl DenoCompileFileSystem { } } - fn copy_to_real_path(&self, oldpath: &Path, newpath: &Path) -> FsResult<()> { + fn copy_to_real_path( + &self, + oldpath: &Path, + newpath: &Path, + ) -> std::io::Result { let old_file = self.0.file_entry(oldpath)?; - let old_file_bytes = self.0.read_file_all(old_file)?; - RealFs.write_file_sync( - newpath, - OpenOptions { - read: false, - write: true, - create: true, - truncate: true, - append: false, - create_new: false, - mode: None, - }, - None, - &old_file_bytes, - ) + let old_file_bytes = + self.0.read_file_all(old_file, VfsFileSubDataKind::Raw)?; + let len = old_file_bytes.len() as u64; + RealFs + .write_file_sync( + newpath, + OpenOptions { + read: false, + write: true, + create: true, + truncate: true, + append: false, + create_new: false, + mode: None, + }, + None, + &old_file_bytes, + ) + .map_err(|err| err.into_io_error())?; + Ok(len) } } @@ -80,7 +103,7 @@ impl FileSystem for DenoCompileFileSystem { access_check: Option, ) -> FsResult> { if self.0.is_path_within(path) { - Ok(self.0.open_file(path)?) + Ok(Rc::new(self.0.open_file(path)?)) } else { RealFs.open_sync(path, options, access_check) } @@ -92,7 +115,7 @@ impl FileSystem for DenoCompileFileSystem { access_check: Option>, ) -> FsResult> { if self.0.is_path_within(&path) { - Ok(self.0.open_file(&path)?) + Ok(Rc::new(self.0.open_file(&path)?)) } else { RealFs.open_async(path, options, access_check).await } @@ -177,7 +200,10 @@ impl FileSystem for DenoCompileFileSystem { fn copy_file_sync(&self, oldpath: &Path, newpath: &Path) -> FsResult<()> { self.error_if_in_vfs(newpath)?; if self.0.is_path_within(oldpath) { - self.copy_to_real_path(oldpath, newpath) + self + .copy_to_real_path(oldpath, newpath) + .map(|_| ()) + .map_err(FsError::Io) } else { RealFs.copy_file_sync(oldpath, newpath) } @@ -192,6 +218,8 @@ impl FileSystem for DenoCompileFileSystem { let fs = self.clone(); tokio::task::spawn_blocking(move || { fs.copy_to_real_path(&oldpath, &newpath) + .map(|_| ()) + .map_err(FsError::Io) }) .await? } else { @@ -212,14 +240,14 @@ impl FileSystem for DenoCompileFileSystem { fn stat_sync(&self, path: &Path) -> FsResult { if self.0.is_path_within(path) { - Ok(self.0.stat(path)?) + Ok(self.0.stat(path)?.as_fs_stat()) } else { RealFs.stat_sync(path) } } async fn stat_async(&self, path: PathBuf) -> FsResult { if self.0.is_path_within(&path) { - Ok(self.0.stat(&path)?) + Ok(self.0.stat(&path)?.as_fs_stat()) } else { RealFs.stat_async(path).await } @@ -227,14 +255,14 @@ impl FileSystem for DenoCompileFileSystem { fn lstat_sync(&self, path: &Path) -> FsResult { if self.0.is_path_within(path) { - Ok(self.0.lstat(path)?) + Ok(self.0.lstat(path)?.as_fs_stat()) } else { RealFs.lstat_sync(path) } } async fn lstat_async(&self, path: PathBuf) -> FsResult { if self.0.is_path_within(&path) { - Ok(self.0.lstat(&path)?) + Ok(self.0.lstat(&path)?.as_fs_stat()) } else { RealFs.lstat_async(path).await } @@ -395,3 +423,462 @@ impl FileSystem for DenoCompileFileSystem { .await } } + +impl sys_traits::BaseFsHardLink for DenoCompileFileSystem { + #[inline] + fn base_fs_hard_link(&self, src: &Path, dst: &Path) -> std::io::Result<()> { + self.link_sync(src, dst).map_err(|err| err.into_io_error()) + } +} + +impl sys_traits::BaseFsRead for DenoCompileFileSystem { + #[inline] + fn base_fs_read(&self, path: &Path) -> std::io::Result> { + self + .read_file_sync(path, None) + .map_err(|err| err.into_io_error()) + } +} + +impl sys_traits::FsMetadataValue for FileBackedVfsMetadata { + fn file_type(&self) -> sys_traits::FileType { + self.file_type + } + + fn len(&self) -> u64 { + self.len + } + + fn accessed(&self) -> std::io::Result { + Err(not_supported("accessed time")) + } + + fn created(&self) -> std::io::Result { + Err(not_supported("created time")) + } + + fn changed(&self) -> std::io::Result { + Err(not_supported("changed time")) + } + + fn modified(&self) -> std::io::Result { + Err(not_supported("modified time")) + } + + fn dev(&self) -> std::io::Result { + Ok(0) + } + + fn ino(&self) -> std::io::Result { + Ok(0) + } + + fn mode(&self) -> std::io::Result { + Ok(0) + } + + fn nlink(&self) -> std::io::Result { + Ok(0) + } + + fn uid(&self) -> std::io::Result { + Ok(0) + } + + fn gid(&self) -> std::io::Result { + Ok(0) + } + + fn rdev(&self) -> std::io::Result { + Ok(0) + } + + fn blksize(&self) -> std::io::Result { + Ok(0) + } + + fn blocks(&self) -> std::io::Result { + Ok(0) + } + + fn is_block_device(&self) -> std::io::Result { + Ok(false) + } + + fn is_char_device(&self) -> std::io::Result { + Ok(false) + } + + fn is_fifo(&self) -> std::io::Result { + Ok(false) + } + + fn is_socket(&self) -> std::io::Result { + Ok(false) + } + + fn file_attributes(&self) -> std::io::Result { + Ok(0) + } +} + +fn not_supported(name: &str) -> std::io::Error { + std::io::Error::new( + ErrorKind::Unsupported, + format!( + "{} is not supported for an embedded deno compile file", + name + ), + ) +} + +impl sys_traits::FsDirEntry for FileBackedVfsDirEntry { + type Metadata = BoxedFsMetadataValue; + + fn file_name(&self) -> Cow { + Cow::Borrowed(self.metadata.name.as_ref()) + } + + fn file_type(&self) -> std::io::Result { + Ok(self.metadata.file_type) + } + + fn metadata(&self) -> std::io::Result { + Ok(BoxedFsMetadataValue(Box::new(self.metadata.clone()))) + } + + fn path(&self) -> Cow { + Cow::Owned(self.parent_path.join(&self.metadata.name)) + } +} + +impl sys_traits::BaseFsReadDir for DenoCompileFileSystem { + type ReadDirEntry = BoxedFsDirEntry; + + fn base_fs_read_dir( + &self, + path: &Path, + ) -> std::io::Result< + Box> + '_>, + > { + if self.0.is_path_within(path) { + let entries = self.0.read_dir_with_metadata(path)?; + Ok(Box::new( + entries.map(|entry| Ok(BoxedFsDirEntry::new(entry))), + )) + } else { + #[allow(clippy::disallowed_types)] // ok because we're implementing the fs + sys_traits::impls::RealSys.fs_read_dir_boxed(path) + } + } +} + +impl sys_traits::BaseFsCanonicalize for DenoCompileFileSystem { + #[inline] + fn base_fs_canonicalize(&self, path: &Path) -> std::io::Result { + self.realpath_sync(path).map_err(|err| err.into_io_error()) + } +} + +impl sys_traits::BaseFsMetadata for DenoCompileFileSystem { + type Metadata = BoxedFsMetadataValue; + + #[inline] + fn base_fs_metadata(&self, path: &Path) -> std::io::Result { + if self.0.is_path_within(path) { + Ok(BoxedFsMetadataValue::new(self.0.stat(path)?)) + } else { + #[allow(clippy::disallowed_types)] // ok because we're implementing the fs + sys_traits::impls::RealSys.fs_metadata_boxed(path) + } + } + + #[inline] + fn base_fs_symlink_metadata( + &self, + path: &Path, + ) -> std::io::Result { + if self.0.is_path_within(path) { + Ok(BoxedFsMetadataValue::new(self.0.lstat(path)?)) + } else { + #[allow(clippy::disallowed_types)] // ok because we're implementing the fs + sys_traits::impls::RealSys.fs_symlink_metadata_boxed(path) + } + } +} + +impl sys_traits::BaseFsCopy for DenoCompileFileSystem { + #[inline] + fn base_fs_copy(&self, from: &Path, to: &Path) -> std::io::Result { + self + .error_if_in_vfs(to) + .map_err(|err| err.into_io_error())?; + if self.0.is_path_within(from) { + self.copy_to_real_path(from, to) + } else { + #[allow(clippy::disallowed_types)] // ok because we're implementing the fs + sys_traits::impls::RealSys.fs_copy(from, to) + } + } +} + +impl sys_traits::BaseFsCloneFile for DenoCompileFileSystem { + fn base_fs_clone_file( + &self, + _from: &Path, + _to: &Path, + ) -> std::io::Result<()> { + // will cause a fallback in the code that uses this + Err(not_supported("cloning files")) + } +} + +impl sys_traits::BaseFsCreateDir for DenoCompileFileSystem { + #[inline] + fn base_fs_create_dir( + &self, + path: &Path, + options: &sys_traits::CreateDirOptions, + ) -> std::io::Result<()> { + self + .mkdir_sync(path, options.recursive, options.mode) + .map_err(|err| err.into_io_error()) + } +} + +impl sys_traits::BaseFsRemoveFile for DenoCompileFileSystem { + #[inline] + fn base_fs_remove_file(&self, path: &Path) -> std::io::Result<()> { + self + .remove_sync(path, false) + .map_err(|err| err.into_io_error()) + } +} + +impl sys_traits::BaseFsRename for DenoCompileFileSystem { + #[inline] + fn base_fs_rename(&self, from: &Path, to: &Path) -> std::io::Result<()> { + self + .rename_sync(from, to) + .map_err(|err| err.into_io_error()) + } +} + +pub enum FsFileAdapter { + Real(sys_traits::impls::RealFsFile), + Vfs(FileBackedVfsFile), +} + +impl sys_traits::FsFile for FsFileAdapter {} + +impl sys_traits::FsFileAsRaw for FsFileAdapter { + #[cfg(windows)] + fn fs_file_as_raw_handle(&self) -> Option { + match self { + Self::Real(file) => file.fs_file_as_raw_handle(), + Self::Vfs(_) => None, + } + } + + #[cfg(unix)] + fn fs_file_as_raw_fd(&self) -> Option { + match self { + Self::Real(file) => file.fs_file_as_raw_fd(), + Self::Vfs(_) => None, + } + } +} + +impl sys_traits::FsFileSyncData for FsFileAdapter { + fn fs_file_sync_data(&mut self) -> std::io::Result<()> { + match self { + Self::Real(file) => file.fs_file_sync_data(), + Self::Vfs(_) => Ok(()), + } + } +} + +impl sys_traits::FsFileSyncAll for FsFileAdapter { + fn fs_file_sync_all(&mut self) -> std::io::Result<()> { + match self { + Self::Real(file) => file.fs_file_sync_all(), + Self::Vfs(_) => Ok(()), + } + } +} + +impl sys_traits::FsFileSetPermissions for FsFileAdapter { + #[inline] + fn fs_file_set_permissions(&mut self, mode: u32) -> std::io::Result<()> { + match self { + Self::Real(file) => file.fs_file_set_permissions(mode), + Self::Vfs(_) => Ok(()), + } + } +} + +impl std::io::Read for FsFileAdapter { + #[inline] + fn read(&mut self, buf: &mut [u8]) -> std::io::Result { + match self { + Self::Real(file) => file.read(buf), + Self::Vfs(file) => file.read_to_buf(buf), + } + } +} + +impl std::io::Seek for FsFileAdapter { + fn seek(&mut self, pos: std::io::SeekFrom) -> std::io::Result { + match self { + Self::Real(file) => file.seek(pos), + Self::Vfs(file) => file.seek(pos), + } + } +} + +impl std::io::Write for FsFileAdapter { + #[inline] + fn write(&mut self, buf: &[u8]) -> std::io::Result { + match self { + Self::Real(file) => file.write(buf), + Self::Vfs(_) => Err(not_supported("writing files")), + } + } + + #[inline] + fn flush(&mut self) -> std::io::Result<()> { + match self { + Self::Real(file) => file.flush(), + Self::Vfs(_) => Err(not_supported("writing files")), + } + } +} + +impl sys_traits::FsFileSetLen for FsFileAdapter { + #[inline] + fn fs_file_set_len(&mut self, len: u64) -> std::io::Result<()> { + match self { + Self::Real(file) => file.fs_file_set_len(len), + Self::Vfs(_) => Err(not_supported("setting file length")), + } + } +} + +impl sys_traits::FsFileSetTimes for FsFileAdapter { + fn fs_file_set_times( + &mut self, + times: sys_traits::FsFileTimes, + ) -> std::io::Result<()> { + match self { + Self::Real(file) => file.fs_file_set_times(times), + Self::Vfs(_) => Err(not_supported("setting file times")), + } + } +} + +impl sys_traits::FsFileLock for FsFileAdapter { + fn fs_file_lock( + &mut self, + mode: sys_traits::FsFileLockMode, + ) -> std::io::Result<()> { + match self { + Self::Real(file) => file.fs_file_lock(mode), + Self::Vfs(_) => Err(not_supported("locking files")), + } + } + + fn fs_file_try_lock( + &mut self, + mode: sys_traits::FsFileLockMode, + ) -> std::io::Result<()> { + match self { + Self::Real(file) => file.fs_file_try_lock(mode), + Self::Vfs(_) => Err(not_supported("locking files")), + } + } + + fn fs_file_unlock(&mut self) -> std::io::Result<()> { + match self { + Self::Real(file) => file.fs_file_unlock(), + Self::Vfs(_) => Err(not_supported("unlocking files")), + } + } +} + +impl sys_traits::FsFileIsTerminal for FsFileAdapter { + #[inline] + fn fs_file_is_terminal(&self) -> bool { + match self { + Self::Real(file) => file.fs_file_is_terminal(), + Self::Vfs(_) => false, + } + } +} + +impl sys_traits::BaseFsOpen for DenoCompileFileSystem { + type File = FsFileAdapter; + + fn base_fs_open( + &self, + path: &Path, + options: &sys_traits::OpenOptions, + ) -> std::io::Result { + if self.0.is_path_within(path) { + Ok(FsFileAdapter::Vfs(self.0.open_file(path)?)) + } else { + #[allow(clippy::disallowed_types)] // ok because we're implementing the fs + Ok(FsFileAdapter::Real( + sys_traits::impls::RealSys.base_fs_open(path, options)?, + )) + } + } +} + +impl sys_traits::BaseFsSymlinkDir for DenoCompileFileSystem { + fn base_fs_symlink_dir(&self, src: &Path, dst: &Path) -> std::io::Result<()> { + self + .symlink_sync(src, dst, Some(FsFileType::Directory)) + .map_err(|err| err.into_io_error()) + } +} + +impl sys_traits::SystemRandom for DenoCompileFileSystem { + #[inline] + fn sys_random(&self, buf: &mut [u8]) -> std::io::Result<()> { + #[allow(clippy::disallowed_types)] // ok because we're implementing the fs + sys_traits::impls::RealSys.sys_random(buf) + } +} + +impl sys_traits::SystemTimeNow for DenoCompileFileSystem { + #[inline] + fn sys_time_now(&self) -> SystemTime { + #[allow(clippy::disallowed_types)] // ok because we're implementing the fs + sys_traits::impls::RealSys.sys_time_now() + } +} + +impl sys_traits::ThreadSleep for DenoCompileFileSystem { + #[inline] + fn thread_sleep(&self, dur: Duration) { + #[allow(clippy::disallowed_types)] // ok because we're implementing the fs + sys_traits::impls::RealSys.thread_sleep(dur) + } +} + +impl sys_traits::EnvCurrentDir for DenoCompileFileSystem { + fn env_current_dir(&self) -> std::io::Result { + #[allow(clippy::disallowed_types)] // ok because we're implementing the fs + sys_traits::impls::RealSys.env_current_dir() + } +} + +impl sys_traits::BaseEnvVar for DenoCompileFileSystem { + fn base_env_var_os( + &self, + key: &std::ffi::OsStr, + ) -> Option { + #[allow(clippy::disallowed_types)] // ok because we're implementing the fs + sys_traits::impls::RealSys.base_env_var_os(key) + } +} diff --git a/cli/standalone/mod.rs b/cli/standalone/mod.rs index e3449c152046e9..1e21e69eb9eb85 100644 --- a/cli/standalone/mod.rs +++ b/cli/standalone/mod.rs @@ -1,13 +1,20 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Allow unused code warnings because we share // code between the two bin targets. #![allow(dead_code)] #![allow(unused_imports)] +use std::borrow::Cow; +use std::path::PathBuf; +use std::rc::Rc; +use std::sync::Arc; + use binary::StandaloneData; use binary::StandaloneModules; +use code_cache::DenoCompileCodeCache; use deno_ast::MediaType; +use deno_cache_dir::file_fetcher::CacheSetting; use deno_cache_dir::npm::NpmCacheDir; use deno_config::workspace::MappedResolution; use deno_config::workspace::MappedResolutionError; @@ -17,6 +24,7 @@ use deno_core::anyhow::Context; use deno_core::error::generic_error; use deno_core::error::type_error; use deno_core::error::AnyError; +use deno_core::futures::future::LocalBoxFuture; use deno_core::futures::FutureExt; use deno_core::v8_set_flags; use deno_core::FastString; @@ -27,14 +35,17 @@ use deno_core::ModuleSpecifier; use deno_core::ModuleType; use deno_core::RequestedModuleType; use deno_core::ResolutionKind; +use deno_core::SourceCodeCacheInfo; use deno_npm::npm_rc::ResolvedNpmRc; use deno_package_json::PackageJsonDepValue; +use deno_resolver::cjs::IsCjsResolutionMode; use deno_resolver::npm::NpmReqResolverOptions; use deno_runtime::deno_fs; +use deno_runtime::deno_fs::FileSystem; use deno_runtime::deno_node::create_host_defined_options; use deno_runtime::deno_node::NodeRequireLoader; use deno_runtime::deno_node::NodeResolver; -use deno_runtime::deno_node::PackageJsonResolver; +use deno_runtime::deno_node::RealIsBuiltInNodeModuleChecker; use deno_runtime::deno_permissions::Permissions; use deno_runtime::deno_permissions::PermissionsContainer; use deno_runtime::deno_tls::rustls::RootCertStore; @@ -47,28 +58,28 @@ use deno_semver::npm::NpmPackageReqReference; use import_map::parse_from_json; use node_resolver::analyze::NodeCodeTranslator; use node_resolver::errors::ClosestPkgJsonError; -use node_resolver::NodeModuleKind; -use node_resolver::NodeResolutionMode; +use node_resolver::NodeResolutionKind; +use node_resolver::ResolutionMode; use serialization::DenoCompileModuleSource; -use std::borrow::Cow; -use std::rc::Rc; -use std::sync::Arc; +use serialization::SourceMapStore; +use virtual_fs::FileBackedVfs; +use virtual_fs::VfsFileSubDataKind; use crate::args::create_default_npmrc; use crate::args::get_root_cert_store; use crate::args::npm_pkg_req_ref_to_binary_command; use crate::args::CaData; -use crate::args::CacheSetting; use crate::args::NpmInstallDepsProvider; use crate::args::StorageKeyResolver; use crate::cache::Caches; -use crate::cache::DenoCacheEnvFsAdapter; use crate::cache::DenoDirProvider; +use crate::cache::FastInsecureHasher; use crate::cache::NodeAnalysisCache; -use crate::cache::RealDenoCacheEnv; use crate::http_util::HttpClientProvider; use crate::node::CliCjsCodeAnalyzer; use crate::node::CliNodeCodeTranslator; +use crate::node::CliNodeResolver; +use crate::node::CliPackageJsonResolver; use crate::npm::create_cli_npm_resolver; use crate::npm::create_in_npm_pkg_checker; use crate::npm::CliByonmNpmResolverCreateOptions; @@ -78,20 +89,24 @@ use crate::npm::CliNpmResolver; use crate::npm::CliNpmResolverCreateOptions; use crate::npm::CliNpmResolverManagedSnapshotOption; use crate::npm::CreateInNpmPkgCheckerOptions; +use crate::npm::NpmRegistryReadPermissionChecker; +use crate::npm::NpmRegistryReadPermissionCheckerMode; use crate::resolver::CjsTracker; -use crate::resolver::CliDenoResolverFs; use crate::resolver::CliNpmReqResolver; -use crate::resolver::IsCjsResolverOptions; use crate::resolver::NpmModuleLoader; +use crate::sys::CliSys; use crate::util::progress_bar::ProgressBar; use crate::util::progress_bar::ProgressBarStyle; +use crate::util::text_encoding::from_utf8_lossy_cow; use crate::util::v8::construct_v8_flags; +use crate::worker::CliCodeCache; use crate::worker::CliMainWorkerFactory; use crate::worker::CliMainWorkerOptions; use crate::worker::CreateModuleLoaderResult; use crate::worker::ModuleLoaderFactory; pub mod binary; +mod code_cache; mod file_system; mod serialization; mod virtual_fs; @@ -101,20 +116,52 @@ pub use binary::is_standalone_binary; pub use binary::DenoCompileBinaryWriter; use self::binary::Metadata; -use self::file_system::DenoCompileFileSystem; +pub use self::file_system::DenoCompileFileSystem; struct SharedModuleLoaderState { cjs_tracker: Arc, + code_cache: Option>, fs: Arc, modules: StandaloneModules, node_code_translator: Arc, - node_resolver: Arc, + node_resolver: Arc, npm_module_loader: Arc, + npm_registry_permission_checker: NpmRegistryReadPermissionChecker, npm_req_resolver: Arc, npm_resolver: Arc, + source_maps: SourceMapStore, + vfs: Arc, workspace_resolver: WorkspaceResolver, } +impl SharedModuleLoaderState { + fn get_code_cache( + &self, + specifier: &ModuleSpecifier, + source: &[u8], + ) -> Option { + let Some(code_cache) = &self.code_cache else { + return None; + }; + if !code_cache.enabled() { + return None; + } + // deno version is already included in the root cache key + let hash = FastInsecureHasher::new_without_deno_version() + .write_hashable(source) + .finish(); + let data = code_cache.get_sync( + specifier, + deno_runtime::code_cache::CodeCacheType::EsModule, + hash, + ); + Some(SourceCodeCacheInfo { + hash, + data: data.map(Cow::Owned), + }) + } +} + #[derive(Clone)] struct EmbeddedModuleLoader { shared: Arc, @@ -155,9 +202,9 @@ impl ModuleLoader for EmbeddedModuleLoader { .cjs_tracker .is_maybe_cjs(&referrer, MediaType::from_specifier(&referrer))? { - NodeModuleKind::Cjs + ResolutionMode::Require } else { - NodeModuleKind::Esm + ResolutionMode::Import }; if self.shared.node_resolver.in_npm_package(&referrer) { @@ -169,7 +216,7 @@ impl ModuleLoader for EmbeddedModuleLoader { raw_specifier, &referrer, referrer_kind, - NodeResolutionMode::Execution, + NodeResolutionKind::Execution, )? .into_url(), ); @@ -197,7 +244,7 @@ impl ModuleLoader for EmbeddedModuleLoader { sub_path.as_deref(), Some(&referrer), referrer_kind, - NodeResolutionMode::Execution, + NodeResolutionKind::Execution, )?, ), Ok(MappedResolution::PackageJson { @@ -214,7 +261,7 @@ impl ModuleLoader for EmbeddedModuleLoader { sub_path.as_deref(), &referrer, referrer_kind, - NodeResolutionMode::Execution, + NodeResolutionKind::Execution, ) .map_err(AnyError::from), PackageJsonDepValue::Workspace(version_req) => { @@ -234,7 +281,7 @@ impl ModuleLoader for EmbeddedModuleLoader { sub_path.as_deref(), Some(&referrer), referrer_kind, - NodeResolutionMode::Execution, + NodeResolutionKind::Execution, )?, ) } @@ -248,7 +295,7 @@ impl ModuleLoader for EmbeddedModuleLoader { &reference, &referrer, referrer_kind, - NodeResolutionMode::Execution, + NodeResolutionKind::Execution, )?); } @@ -275,7 +322,7 @@ impl ModuleLoader for EmbeddedModuleLoader { raw_specifier, &referrer, referrer_kind, - NodeResolutionMode::Execution, + NodeResolutionKind::Execution, )?; if let Some(res) = maybe_res { return Ok(res.into_url()); @@ -329,14 +376,19 @@ impl ModuleLoader for EmbeddedModuleLoader { } if self.shared.node_resolver.in_npm_package(original_specifier) { - let npm_module_loader = self.shared.npm_module_loader.clone(); + let shared = self.shared.clone(); let original_specifier = original_specifier.clone(); let maybe_referrer = maybe_referrer.cloned(); return deno_core::ModuleLoadResponse::Async( async move { - let code_source = npm_module_loader + let code_source = shared + .npm_module_loader .load(&original_specifier, maybe_referrer.as_ref()) .await?; + let code_cache_entry = shared.get_code_cache( + &code_source.found_url, + code_source.code.as_bytes(), + ); Ok(deno_core::ModuleSource::new_with_redirect( match code_source.media_type { MediaType::Json => ModuleType::Json, @@ -345,14 +397,18 @@ impl ModuleLoader for EmbeddedModuleLoader { code_source.code, &original_specifier, &code_source.found_url, - None, + code_cache_entry, )) } .boxed_local(), ); } - match self.shared.modules.read(original_specifier) { + match self + .shared + .modules + .read(original_specifier, VfsFileSubDataKind::ModuleGraph) + { Ok(Some(module)) => { let media_type = module.media_type; let (module_specifier, module_type, module_source) = @@ -398,25 +454,30 @@ impl ModuleLoader for EmbeddedModuleLoader { ModuleSourceCode::String(FastString::from_static(source)) } }; + let code_cache_entry = shared + .get_code_cache(&module_specifier, module_source.as_bytes()); Ok(deno_core::ModuleSource::new_with_redirect( module_type, module_source, &original_specifier, &module_specifier, - None, + code_cache_entry, )) } .boxed_local(), ) } else { let module_source = module_source.into_for_v8(); + let code_cache_entry = self + .shared + .get_code_cache(module_specifier, module_source.as_bytes()); deno_core::ModuleLoadResponse::Sync(Ok( deno_core::ModuleSource::new_with_redirect( module_type, module_source, original_specifier, module_specifier, - None, + code_cache_entry, ), )) } @@ -429,6 +490,62 @@ impl ModuleLoader for EmbeddedModuleLoader { ))), } } + + fn code_cache_ready( + &self, + specifier: ModuleSpecifier, + source_hash: u64, + code_cache_data: &[u8], + ) -> LocalBoxFuture<'static, ()> { + if let Some(code_cache) = &self.shared.code_cache { + code_cache.set_sync( + specifier, + deno_runtime::code_cache::CodeCacheType::EsModule, + source_hash, + code_cache_data, + ); + } + std::future::ready(()).boxed_local() + } + + fn get_source_map(&self, file_name: &str) -> Option> { + if file_name.starts_with("file:///") { + let url = + deno_path_util::url_from_directory_path(self.shared.vfs.root()).ok()?; + let file_url = ModuleSpecifier::parse(file_name).ok()?; + let relative_path = url.make_relative(&file_url)?; + self.shared.source_maps.get(&relative_path) + } else { + self.shared.source_maps.get(file_name) + } + .map(Cow::Borrowed) + } + + fn get_source_mapped_source_line( + &self, + file_name: &str, + line_number: usize, + ) -> Option { + let specifier = ModuleSpecifier::parse(file_name).ok()?; + let data = self + .shared + .modules + .read(&specifier, VfsFileSubDataKind::Raw) + .ok()??; + + let source = String::from_utf8_lossy(&data.data); + // Do NOT use .lines(): it skips the terminating empty line. + // (due to internally using_terminator() instead of .split()) + let lines: Vec<&str> = source.split('\n').collect(); + if line_number >= lines.len() { + Some(format!( + "{} Couldn't format source line: Line {} is out of bounds (source may have changed at runtime)", + crate::colors::yellow("Warning"), line_number + 1, + )) + } else { + Some(lines[line_number].to_string()) + } + } } impl NodeRequireLoader for EmbeddedModuleLoader { @@ -444,15 +561,20 @@ impl NodeRequireLoader for EmbeddedModuleLoader { self .shared - .npm_resolver + .npm_registry_permission_checker .ensure_read_permission(permissions, path) } fn load_text_file_lossy( &self, path: &std::path::Path, - ) -> Result { - Ok(self.shared.fs.read_text_file_lossy_sync(path, None)?) + ) -> Result, AnyError> { + let file_entry = self.shared.vfs.file_entry(path)?; + let file_bytes = self + .shared + .vfs + .read_file_all(file_entry, VfsFileSubDataKind::ModuleGraph)?; + Ok(from_utf8_lossy_cow(file_bytes)) } fn is_maybe_cjs( @@ -512,16 +634,20 @@ impl RootCertStoreProvider for StandaloneRootCertStoreProvider { } } -pub async fn run(data: StandaloneData) -> Result { +pub async fn run( + fs: Arc, + sys: CliSys, + data: StandaloneData, +) -> Result { let StandaloneData { - fs, metadata, modules, npm_snapshot, root_path, + source_maps, vfs, } = data; - let deno_dir_provider = Arc::new(DenoDirProvider::new(None)); + let deno_dir_provider = Arc::new(DenoDirProvider::new(sys.clone(), None)); let root_cert_store_provider = Arc::new(StandaloneRootCertStoreProvider { ca_stores: metadata.ca_stores, ca_data: metadata.ca_data.map(CaData::Bytes), @@ -539,9 +665,24 @@ pub async fn run(data: StandaloneData) -> Result { let main_module = root_dir_url.join(&metadata.entrypoint_key).unwrap(); let npm_global_cache_dir = root_path.join(".deno_compile_node_modules"); let cache_setting = CacheSetting::Only; - let pkg_json_resolver = Arc::new(PackageJsonResolver::new( - deno_runtime::deno_node::DenoFsNodeResolverEnv::new(fs.clone()), - )); + let pkg_json_resolver = Arc::new(CliPackageJsonResolver::new(sys.clone())); + let npm_registry_permission_checker = { + let mode = match &metadata.node_modules { + Some(binary::NodeModules::Managed { + node_modules_dir: Some(path), + }) => NpmRegistryReadPermissionCheckerMode::Local(PathBuf::from(path)), + Some(binary::NodeModules::Byonm { .. }) => { + NpmRegistryReadPermissionCheckerMode::Byonm + } + Some(binary::NodeModules::Managed { + node_modules_dir: None, + }) + | None => NpmRegistryReadPermissionCheckerMode::Global( + npm_global_cache_dir.clone(), + ), + }; + NpmRegistryReadPermissionChecker::new(sys.clone(), mode) + }; let (in_npm_pkg_checker, npm_resolver) = match metadata.node_modules { Some(binary::NodeModules::Managed { node_modules_dir }) => { // create an npmrc that uses the fake npm_registry_url to resolve packages @@ -554,7 +695,7 @@ pub async fn run(data: StandaloneData) -> Result { registry_configs: Default::default(), }); let npm_cache_dir = Arc::new(NpmCacheDir::new( - &DenoCacheEnvFsAdapter(fs.as_ref()), + &sys, npm_global_cache_dir, npmrc.get_all_known_registries_urls(), )); @@ -575,17 +716,17 @@ pub async fn run(data: StandaloneData) -> Result { snapshot, )), maybe_lockfile: None, - fs: fs.clone(), http_client_provider: http_client_provider.clone(), npm_cache_dir, - cache_setting, - text_only_progress_bar: progress_bar, - maybe_node_modules_path, - npm_system_info: Default::default(), npm_install_deps_provider: Arc::new( // this is only used for installing packages, which isn't necessary with deno compile NpmInstallDepsProvider::empty(), ), + sys: sys.clone(), + text_only_progress_bar: progress_bar, + cache_setting, + maybe_node_modules_path, + npm_system_info: Default::default(), npmrc, lifecycle_scripts: Default::default(), }, @@ -602,7 +743,7 @@ pub async fn run(data: StandaloneData) -> Result { create_in_npm_pkg_checker(CreateInNpmPkgCheckerOptions::Byonm); let npm_resolver = create_cli_npm_resolver( CliNpmResolverCreateOptions::Byonm(CliByonmNpmResolverCreateOptions { - fs: CliDenoResolverFs(fs.clone()), + sys: sys.clone(), pkg_json_resolver: pkg_json_resolver.clone(), root_node_modules_dir, }), @@ -615,7 +756,7 @@ pub async fn run(data: StandaloneData) -> Result { // so no need to create actual `.npmrc` configuration. let npmrc = create_default_npmrc(); let npm_cache_dir = Arc::new(NpmCacheDir::new( - &DenoCacheEnvFsAdapter(fs.as_ref()), + &sys, npm_global_cache_dir, npmrc.get_all_known_registries_urls(), )); @@ -630,18 +771,18 @@ pub async fn run(data: StandaloneData) -> Result { create_cli_npm_resolver(CliNpmResolverCreateOptions::Managed( CliManagedNpmResolverCreateOptions { snapshot: CliNpmResolverManagedSnapshotOption::Specified(None), - maybe_lockfile: None, - fs: fs.clone(), http_client_provider: http_client_provider.clone(), - npm_cache_dir, - cache_setting, - text_only_progress_bar: progress_bar, - maybe_node_modules_path: None, - npm_system_info: Default::default(), npm_install_deps_provider: Arc::new( // this is only used for installing packages, which isn't necessary with deno compile NpmInstallDepsProvider::empty(), ), + sys: sys.clone(), + cache_setting, + text_only_progress_bar: progress_bar, + npm_cache_dir, + maybe_lockfile: None, + maybe_node_modules_path: None, + npm_system_info: Default::default(), npmrc: create_default_npmrc(), lifecycle_scripts: Default::default(), }, @@ -653,17 +794,21 @@ pub async fn run(data: StandaloneData) -> Result { let has_node_modules_dir = npm_resolver.root_node_modules_path().is_some(); let node_resolver = Arc::new(NodeResolver::new( - deno_runtime::deno_node::DenoFsNodeResolverEnv::new(fs.clone()), in_npm_pkg_checker.clone(), + RealIsBuiltInNodeModuleChecker, npm_resolver.clone().into_npm_pkg_folder_resolver(), pkg_json_resolver.clone(), + sys.clone(), )); let cjs_tracker = Arc::new(CjsTracker::new( in_npm_pkg_checker.clone(), pkg_json_resolver.clone(), - IsCjsResolverOptions { - detect_cjs: !metadata.workspace_resolver.package_jsons.is_empty(), - is_node_main: false, + if metadata.unstable_config.detect_cjs { + IsCjsResolutionMode::ImplicitTypeCommonJs + } else if metadata.workspace_resolver.package_jsons.is_empty() { + IsCjsResolutionMode::Disabled + } else { + IsCjsResolutionMode::ExplicitTypeCommonJs }, )); let cache_db = Caches::new(deno_dir_provider.clone()); @@ -671,7 +816,7 @@ pub async fn run(data: StandaloneData) -> Result { let npm_req_resolver = Arc::new(CliNpmReqResolver::new(NpmReqResolverOptions { byonm_resolver: (npm_resolver.clone()).into_maybe_byonm(), - fs: CliDenoResolverFs(fs.clone()), + sys: sys.clone(), in_npm_pkg_checker: in_npm_pkg_checker.clone(), node_resolver: node_resolver.clone(), npm_req_resolver: npm_resolver.clone().into_npm_req_resolver(), @@ -684,11 +829,11 @@ pub async fn run(data: StandaloneData) -> Result { ); let node_code_translator = Arc::new(NodeCodeTranslator::new( cjs_esm_code_analyzer, - deno_runtime::deno_node::DenoFsNodeResolverEnv::new(fs.clone()), in_npm_pkg_checker, node_resolver.clone(), npm_resolver.clone().into_npm_pkg_folder_resolver(), pkg_json_resolver.clone(), + sys.clone(), )); let workspace_resolver = { let import_map = match metadata.workspace_resolver.import_map { @@ -739,9 +884,23 @@ pub async fn run(data: StandaloneData) -> Result { metadata.workspace_resolver.pkg_json_resolution, ) }; + let code_cache = match metadata.code_cache_key { + Some(code_cache_key) => Some(Arc::new(DenoCompileCodeCache::new( + root_path.with_file_name(format!( + "{}.cache", + root_path.file_name().unwrap().to_string_lossy() + )), + code_cache_key, + )) as Arc), + None => { + log::debug!("Code cache disabled."); + None + } + }; let module_loader_factory = StandaloneModuleLoaderFactory { shared: Arc::new(SharedModuleLoaderState { cjs_tracker: cjs_tracker.clone(), + code_cache: code_cache.clone(), fs: fs.clone(), modules, node_code_translator: node_code_translator.clone(), @@ -751,15 +910,17 @@ pub async fn run(data: StandaloneData) -> Result { fs.clone(), node_code_translator, )), + npm_registry_permission_checker, npm_resolver: npm_resolver.clone(), - workspace_resolver, npm_req_resolver, + source_maps, + vfs, + workspace_resolver, }), }; let permissions = { - let mut permissions = - metadata.permissions.to_options(/* cli_arg_urls */ &[]); + let mut permissions = metadata.permissions; // grant read access to the vfs match &mut permissions.allow_read { Some(vec) if vec.is_empty() => { @@ -775,7 +936,7 @@ pub async fn run(data: StandaloneData) -> Result { } let desc_parser = - Arc::new(RuntimePermissionDescriptorParser::new(fs.clone())); + Arc::new(RuntimePermissionDescriptorParser::new(sys.clone())); let permissions = Permissions::from_options(desc_parser.as_ref(), &permissions)?; PermissionsContainer::new(desc_parser, permissions) @@ -792,8 +953,7 @@ pub async fn run(data: StandaloneData) -> Result { }); let worker_factory = CliMainWorkerFactory::new( Arc::new(BlobStore::default()), - // Code cache is not supported for standalone binary yet. - None, + code_cache, feature_checker, fs, None, @@ -806,6 +966,7 @@ pub async fn run(data: StandaloneData) -> Result { root_cert_store_provider, permissions, StorageKeyResolver::empty(), + sys, crate::args::DenoSubcommand::Run(Default::default()), CliMainWorkerOptions { argv: metadata.argv, @@ -836,6 +997,7 @@ pub async fn run(data: StandaloneData) -> Result { serve_host: None, }, metadata.otel_config, + crate::args::NpmCachingStrategy::Lazy, ); // Initialize v8 once from the main thread. diff --git a/cli/standalone/serialization.rs b/cli/standalone/serialization.rs index a5eb649bfdfec7..238ef44fd039b1 100644 --- a/cli/standalone/serialization.rs +++ b/cli/standalone/serialization.rs @@ -1,10 +1,13 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::borrow::Cow; +use std::cell::Cell; use std::collections::BTreeMap; use std::collections::HashMap; use std::io::Write; +use capacity_builder::BytesAppendable; +use deno_ast::swc::common::source_map; use deno_ast::MediaType; use deno_core::anyhow::bail; use deno_core::anyhow::Context; @@ -19,11 +22,14 @@ use deno_npm::resolution::SerializedNpmResolutionSnapshotPackage; use deno_npm::resolution::ValidSerializedNpmResolutionSnapshot; use deno_npm::NpmPackageId; use deno_semver::package::PackageReq; - -use crate::standalone::virtual_fs::VirtualDirectory; +use deno_semver::StackString; +use indexmap::IndexMap; use super::binary::Metadata; +use super::virtual_fs::BuiltVfs; use super::virtual_fs::VfsBuilder; +use super::virtual_fs::VirtualDirectoryEntries; +use crate::standalone::virtual_fs::VirtualDirectory; const MAGIC_BYTES: &[u8; 8] = b"d3n0l4nd"; @@ -31,61 +37,64 @@ const MAGIC_BYTES: &[u8; 8] = b"d3n0l4nd"; /// * d3n0l4nd /// * /// * -/// * +/// * /// * /// * +/// * /// * d3n0l4nd pub fn serialize_binary_data_section( metadata: &Metadata, npm_snapshot: Option, remote_modules: &RemoteModulesStoreBuilder, - vfs: VfsBuilder, + source_map_store: &SourceMapStore, + vfs: &BuiltVfs, ) -> Result, AnyError> { - fn write_bytes_with_len(bytes: &mut Vec, data: &[u8]) { - bytes.extend_from_slice(&(data.len() as u64).to_le_bytes()); - bytes.extend_from_slice(data); - } - - let mut bytes = Vec::new(); - bytes.extend_from_slice(MAGIC_BYTES); - - // 1. Metadata - { - let metadata = serde_json::to_string(metadata)?; - write_bytes_with_len(&mut bytes, metadata.as_bytes()); - } - // 2. Npm snapshot - { - let npm_snapshot = - npm_snapshot.map(serialize_npm_snapshot).unwrap_or_default(); - write_bytes_with_len(&mut bytes, &npm_snapshot); - } - // 3. Remote modules - { - let update_index = bytes.len(); - bytes.extend_from_slice(&(0_u64).to_le_bytes()); - let start_index = bytes.len(); - remote_modules.write(&mut bytes)?; - let length = bytes.len() - start_index; - let length_bytes = (length as u64).to_le_bytes(); - bytes[update_index..update_index + length_bytes.len()] - .copy_from_slice(&length_bytes); - } - // 4. VFS - { - let (vfs, vfs_files) = vfs.into_dir_and_files(); - let vfs = serde_json::to_string(&vfs)?; - write_bytes_with_len(&mut bytes, vfs.as_bytes()); - let vfs_bytes_len = vfs_files.iter().map(|f| f.len() as u64).sum::(); - bytes.extend_from_slice(&vfs_bytes_len.to_le_bytes()); - for file in &vfs_files { - bytes.extend_from_slice(file); + let metadata = serde_json::to_string(metadata)?; + let npm_snapshot = + npm_snapshot.map(serialize_npm_snapshot).unwrap_or_default(); + let serialized_vfs = serde_json::to_string(&vfs.entries)?; + + let bytes = capacity_builder::BytesBuilder::build(|builder| { + builder.append(MAGIC_BYTES); + // 1. Metadata + { + builder.append_le(metadata.len() as u64); + builder.append(&metadata); + } + // 2. Npm snapshot + { + builder.append_le(npm_snapshot.len() as u64); + builder.append(&npm_snapshot); + } + // 3. Remote modules + { + remote_modules.write(builder); + } + // 4. VFS + { + builder.append_le(serialized_vfs.len() as u64); + builder.append(&serialized_vfs); + let vfs_bytes_len = vfs.files.iter().map(|f| f.len() as u64).sum::(); + builder.append_le(vfs_bytes_len); + for file in &vfs.files { + builder.append(file); + } + } + // 5. Source maps + { + builder.append_le(source_map_store.data.len() as u32); + for (specifier, source_map) in &source_map_store.data { + builder.append_le(specifier.len() as u32); + builder.append(specifier); + builder.append_le(source_map.len() as u32); + builder.append(source_map.as_ref()); + } } - } - // write the magic bytes at the end so we can use it - // to make sure we've deserialized correctly - bytes.extend_from_slice(MAGIC_BYTES); + // write the magic bytes at the end so we can use it + // to make sure we've deserialized correctly + builder.append(MAGIC_BYTES); + })?; Ok(bytes) } @@ -94,19 +103,14 @@ pub struct DeserializedDataSection { pub metadata: Metadata, pub npm_snapshot: Option, pub remote_modules: RemoteModulesStore, - pub vfs_dir: VirtualDirectory, + pub source_maps: SourceMapStore, + pub vfs_root_entries: VirtualDirectoryEntries, pub vfs_files_data: &'static [u8], } pub fn deserialize_binary_data_section( data: &'static [u8], ) -> Result, AnyError> { - fn read_bytes_with_len(input: &[u8]) -> Result<(&[u8], &[u8]), AnyError> { - let (input, len) = read_u64(input)?; - let (input, data) = read_bytes(input, len as usize)?; - Ok((input, data)) - } - fn read_magic_bytes(input: &[u8]) -> Result<(&[u8], bool), AnyError> { if input.len() < MAGIC_BYTES.len() { bail!("Unexpected end of data. Could not find magic bytes."); @@ -118,34 +122,51 @@ pub fn deserialize_binary_data_section( Ok((input, true)) } + #[allow(clippy::type_complexity)] + fn read_source_map_entry( + input: &[u8], + ) -> Result<(&[u8], (Cow, &[u8])), AnyError> { + let (input, specifier) = read_string_lossy(input)?; + let (input, source_map) = read_bytes_with_u32_len(input)?; + Ok((input, (specifier, source_map))) + } + let (input, found) = read_magic_bytes(data)?; if !found { return Ok(None); } // 1. Metadata - let (input, data) = read_bytes_with_len(input).context("reading metadata")?; + let (input, data) = + read_bytes_with_u64_len(input).context("reading metadata")?; let metadata: Metadata = serde_json::from_slice(data).context("deserializing metadata")?; // 2. Npm snapshot let (input, data) = - read_bytes_with_len(input).context("reading npm snapshot")?; + read_bytes_with_u64_len(input).context("reading npm snapshot")?; let npm_snapshot = if data.is_empty() { None } else { Some(deserialize_npm_snapshot(data).context("deserializing npm snapshot")?) }; // 3. Remote modules - let (input, data) = - read_bytes_with_len(input).context("reading remote modules data")?; - let remote_modules = - RemoteModulesStore::build(data).context("deserializing remote modules")?; + let (input, remote_modules) = + RemoteModulesStore::build(input).context("deserializing remote modules")?; // 4. VFS - let (input, data) = read_bytes_with_len(input).context("vfs")?; - let vfs_dir: VirtualDirectory = + let (input, data) = read_bytes_with_u64_len(input).context("vfs")?; + let vfs_root_entries: VirtualDirectoryEntries = serde_json::from_slice(data).context("deserializing vfs data")?; let (input, vfs_files_data) = - read_bytes_with_len(input).context("reading vfs files data")?; + read_bytes_with_u64_len(input).context("reading vfs files data")?; + // 5. Source maps + let (mut input, source_map_data_len) = read_u32_as_usize(input)?; + let mut source_maps = SourceMapStore::with_capacity(source_map_data_len); + for _ in 0..source_map_data_len { + let (current_input, (specifier, source_map)) = + read_source_map_entry(input)?; + input = current_input; + source_maps.add(specifier, Cow::Borrowed(source_map)); + } // finally ensure we read the magic bytes at the end let (_input, found) = read_magic_bytes(input)?; @@ -157,7 +178,8 @@ pub fn deserialize_binary_data_section( metadata, npm_snapshot, remote_modules, - vfs_dir, + source_maps, + vfs_root_entries, vfs_files_data, })) } @@ -165,19 +187,31 @@ pub fn deserialize_binary_data_section( #[derive(Default)] pub struct RemoteModulesStoreBuilder { specifiers: Vec<(String, u64)>, - data: Vec<(MediaType, Vec)>, + data: Vec<(MediaType, Vec, Option>)>, data_byte_len: u64, redirects: Vec<(String, String)>, redirects_len: u64, } impl RemoteModulesStoreBuilder { - pub fn add(&mut self, specifier: &Url, media_type: MediaType, data: Vec) { + pub fn add( + &mut self, + specifier: &Url, + media_type: MediaType, + data: Vec, + maybe_transpiled: Option>, + ) { log::debug!("Adding '{}' ({})", specifier, media_type); let specifier = specifier.to_string(); self.specifiers.push((specifier, self.data_byte_len)); - self.data_byte_len += 1 + 8 + data.len() as u64; // media type (1 byte), data length (8 bytes), data - self.data.push((media_type, data)); + let maybe_transpiled_len = match &maybe_transpiled { + // data length (4 bytes), data + Some(data) => 4 + data.len() as u64, + None => 0, + }; + // media type (1 byte), data length (4 bytes), data, has transpiled (1 byte), transpiled length + self.data_byte_len += 1 + 4 + data.len() as u64 + 1 + maybe_transpiled_len; + self.data.push((media_type, data, maybe_transpiled)); } pub fn add_redirects(&mut self, redirects: &BTreeMap) { @@ -191,26 +225,50 @@ impl RemoteModulesStoreBuilder { } } - fn write(&self, writer: &mut dyn Write) -> Result<(), AnyError> { - writer.write_all(&(self.specifiers.len() as u32).to_le_bytes())?; - writer.write_all(&(self.redirects.len() as u32).to_le_bytes())?; + fn write<'a, TBytes: capacity_builder::BytesType>( + &'a self, + builder: &mut capacity_builder::BytesBuilder<'a, TBytes>, + ) { + builder.append_le(self.specifiers.len() as u32); + builder.append_le(self.redirects.len() as u32); for (specifier, offset) in &self.specifiers { - writer.write_all(&(specifier.len() as u32).to_le_bytes())?; - writer.write_all(specifier.as_bytes())?; - writer.write_all(&offset.to_le_bytes())?; + builder.append_le(specifier.len() as u32); + builder.append(specifier); + builder.append_le(*offset); } for (from, to) in &self.redirects { - writer.write_all(&(from.len() as u32).to_le_bytes())?; - writer.write_all(from.as_bytes())?; - writer.write_all(&(to.len() as u32).to_le_bytes())?; - writer.write_all(to.as_bytes())?; + builder.append_le(from.len() as u32); + builder.append(from); + builder.append_le(to.len() as u32); + builder.append(to); } - for (media_type, data) in &self.data { - writer.write_all(&[serialize_media_type(*media_type)])?; - writer.write_all(&(data.len() as u64).to_le_bytes())?; - writer.write_all(data)?; + builder.append_le( + self + .data + .iter() + .map(|(_, data, maybe_transpiled)| { + 1 + 4 + + (data.len() as u64) + + 1 + + match maybe_transpiled { + Some(transpiled) => 4 + (transpiled.len() as u64), + None => 0, + } + }) + .sum::(), + ); + for (media_type, data, maybe_transpiled) in &self.data { + builder.append(serialize_media_type(*media_type)); + builder.append_le(data.len() as u32); + builder.append(data); + if let Some(transpiled) = maybe_transpiled { + builder.append(1); + builder.append_le(transpiled.len() as u32); + builder.append(transpiled); + } else { + builder.append(0); + } } - Ok(()) } } @@ -238,6 +296,30 @@ impl DenoCompileModuleSource { } } +pub struct SourceMapStore { + data: IndexMap, Cow<'static, [u8]>>, +} + +impl SourceMapStore { + pub fn with_capacity(capacity: usize) -> Self { + Self { + data: IndexMap::with_capacity(capacity), + } + } + + pub fn add( + &mut self, + specifier: Cow<'static, str>, + source_map: Cow<'static, [u8]>, + ) { + self.data.insert(specifier, source_map); + } + + pub fn get(&self, specifier: &str) -> Option<&[u8]> { + self.data.get(specifier).map(|v| v.as_ref()) + } +} + pub struct DenoCompileModuleData<'a> { pub specifier: &'a Url, pub media_type: MediaType, @@ -284,6 +366,13 @@ impl<'a> DenoCompileModuleData<'a> { } } +pub struct RemoteModuleEntry<'a> { + pub specifier: &'a Url, + pub media_type: MediaType, + pub data: Cow<'static, [u8]>, + pub transpiled_data: Option>, +} + enum RemoteModulesStoreSpecifierValue { Data(usize), Redirect(Url), @@ -295,7 +384,7 @@ pub struct RemoteModulesStore { } impl RemoteModulesStore { - fn build(data: &'static [u8]) -> Result { + fn build(input: &'static [u8]) -> Result<(&'static [u8], Self), AnyError> { fn read_specifier(input: &[u8]) -> Result<(&[u8], (Url, u64)), AnyError> { let (input, specifier) = read_string_lossy(input)?; let specifier = Url::parse(&specifier)?; @@ -338,12 +427,16 @@ impl RemoteModulesStore { Ok((input, specifiers)) } - let (files_data, specifiers) = read_headers(data)?; + let (input, specifiers) = read_headers(input)?; + let (input, files_data) = read_bytes_with_u64_len(input)?; - Ok(Self { - specifiers, - files_data, - }) + Ok(( + input, + Self { + specifiers, + files_data, + }, + )) } pub fn resolve_specifier<'a>( @@ -374,7 +467,7 @@ impl RemoteModulesStore { pub fn read<'a>( &'a self, original_specifier: &'a Url, - ) -> Result>, AnyError> { + ) -> Result>, AnyError> { let mut count = 0; let mut specifier = original_specifier; loop { @@ -390,12 +483,25 @@ impl RemoteModulesStore { let input = &self.files_data[*offset..]; let (input, media_type_byte) = read_bytes(input, 1)?; let media_type = deserialize_media_type(media_type_byte[0])?; - let (input, len) = read_u64(input)?; - let (_input, data) = read_bytes(input, len as usize)?; - return Ok(Some(DenoCompileModuleData { + let (input, data) = read_bytes_with_u32_len(input)?; + check_has_len(input, 1)?; + let (input, has_transpiled) = (&input[1..], input[0]); + let (_, transpiled_data) = match has_transpiled { + 0 => (input, None), + 1 => { + let (input, data) = read_bytes_with_u32_len(input)?; + (input, Some(data)) + } + value => bail!( + "Invalid transpiled data flag: {}. Compiled data is corrupt.", + value + ), + }; + return Ok(Some(RemoteModuleEntry { specifier, media_type, data: Cow::Borrowed(data), + transpiled_data: transpiled_data.map(Cow::Borrowed), })); } None => { @@ -479,12 +585,13 @@ fn deserialize_npm_snapshot( #[allow(clippy::needless_lifetimes)] // clippy bug fn parse_package_dep<'a>( id_to_npm_id: &'a impl Fn(usize) -> Result, - ) -> impl Fn(&[u8]) -> Result<(&[u8], (String, NpmPackageId)), AnyError> + 'a + ) -> impl Fn(&[u8]) -> Result<(&[u8], (StackString, NpmPackageId)), AnyError> + 'a { |input| { let (input, req) = read_string_lossy(input)?; let (input, id) = read_u32_as_usize(input)?; - Ok((input, (req.into_owned(), id_to_npm_id(id)?))) + let req = StackString::from_cow(req); + Ok((input, (req, id_to_npm_id(id)?))) } } @@ -634,17 +741,34 @@ fn parse_vec_n_times_with_index( Ok((input, results)) } +fn read_bytes_with_u64_len(input: &[u8]) -> Result<(&[u8], &[u8]), AnyError> { + let (input, len) = read_u64(input)?; + let (input, data) = read_bytes(input, len as usize)?; + Ok((input, data)) +} + +fn read_bytes_with_u32_len(input: &[u8]) -> Result<(&[u8], &[u8]), AnyError> { + let (input, len) = read_u32_as_usize(input)?; + let (input, data) = read_bytes(input, len)?; + Ok((input, data)) +} + fn read_bytes(input: &[u8], len: usize) -> Result<(&[u8], &[u8]), AnyError> { - if input.len() < len { - bail!("Unexpected end of data.",); - } + check_has_len(input, len)?; let (len_bytes, input) = input.split_at(len); Ok((input, len_bytes)) } +#[inline(always)] +fn check_has_len(input: &[u8], len: usize) -> Result<(), AnyError> { + if input.len() < len { + bail!("Unexpected end of data."); + } + Ok(()) +} + fn read_string_lossy(input: &[u8]) -> Result<(&[u8], Cow), AnyError> { - let (input, str_len) = read_u32_as_usize(input)?; - let (input, data_bytes) = read_bytes(input, str_len)?; + let (input, data_bytes) = read_bytes_with_u32_len(input)?; Ok((input, String::from_utf8_lossy(data_bytes))) } diff --git a/cli/standalone/virtual_fs.rs b/cli/standalone/virtual_fs.rs index 26bb0db75f1d8d..e167b153a7820b 100644 --- a/cli/standalone/virtual_fs.rs +++ b/cli/standalone/virtual_fs.rs @@ -1,6 +1,7 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::borrow::Cow; +use std::cell::RefCell; use std::collections::HashMap; use std::collections::HashSet; use std::fs::File; @@ -14,100 +15,156 @@ use std::rc::Rc; use std::sync::Arc; use deno_core::anyhow::anyhow; +use deno_core::anyhow::bail; use deno_core::anyhow::Context; use deno_core::error::AnyError; use deno_core::parking_lot::Mutex; use deno_core::BufMutView; use deno_core::BufView; use deno_core::ResourceHandleFd; +use deno_path_util::normalize_path; +use deno_path_util::strip_unc_prefix; use deno_runtime::deno_fs::FsDirEntry; use deno_runtime::deno_io; use deno_runtime::deno_io::fs::FsError; use deno_runtime::deno_io::fs::FsResult; use deno_runtime::deno_io::fs::FsStat; +use indexmap::IndexSet; use serde::Deserialize; use serde::Serialize; use thiserror::Error; +use super::binary::DENO_COMPILE_GLOBAL_NODE_MODULES_DIR_NAME; use crate::util; +use crate::util::display::human_size; +use crate::util::display::DisplayTreeNode; use crate::util::fs::canonicalize_path; -#[derive(Error, Debug)] -#[error( - "Failed to strip prefix '{}' from '{}'", root_path.display(), target.display() -)] -pub struct StripRootError { - root_path: PathBuf, - target: PathBuf, +#[derive(Debug, PartialEq, Eq)] +pub enum WindowsSystemRootablePath { + /// The root of the system above any drive letters. + WindowSystemRoot, + Path(PathBuf), } +impl WindowsSystemRootablePath { + pub fn join(&self, name_component: &str) -> PathBuf { + // this method doesn't handle multiple components + debug_assert!( + !name_component.contains('\\'), + "Invalid component: {}", + name_component + ); + debug_assert!( + !name_component.contains('/'), + "Invalid component: {}", + name_component + ); + + match self { + WindowsSystemRootablePath::WindowSystemRoot => { + // windows drive letter + PathBuf::from(&format!("{}\\", name_component)) + } + WindowsSystemRootablePath::Path(path) => path.join(name_component), + } + } +} + +#[derive(Debug)] +pub struct BuiltVfs { + pub root_path: WindowsSystemRootablePath, + pub entries: VirtualDirectoryEntries, + pub files: Vec>, +} + +#[derive(Debug, Copy, Clone)] +pub enum VfsFileSubDataKind { + /// Raw bytes of the file. + Raw, + /// Bytes to use for module loading. For example, for TypeScript + /// files this will be the transpiled JavaScript source. + ModuleGraph, +} + +#[derive(Debug)] pub struct VfsBuilder { - root_path: PathBuf, - root_dir: VirtualDirectory, + executable_root: VirtualDirectory, files: Vec>, current_offset: u64, file_offsets: HashMap, + /// The minimum root directory that should be included in the VFS. + min_root_dir: Option, } impl VfsBuilder { - pub fn new(root_path: PathBuf) -> Result { - let root_path = canonicalize_path(&root_path)?; - log::debug!("Building vfs with root '{}'", root_path.display()); - Ok(Self { - root_dir: VirtualDirectory { - name: root_path - .file_stem() - .map(|s| s.to_string_lossy().into_owned()) - .unwrap_or("root".to_string()), - entries: Vec::new(), + pub fn new() -> Self { + Self { + executable_root: VirtualDirectory { + name: "/".to_string(), + entries: Default::default(), }, - root_path, files: Vec::new(), current_offset: 0, file_offsets: Default::default(), - }) - } - - pub fn set_new_root_path( - &mut self, - root_path: PathBuf, - ) -> Result<(), AnyError> { - let root_path = canonicalize_path(&root_path)?; - self.root_path = root_path; - self.root_dir = VirtualDirectory { - name: self - .root_path - .file_stem() - .map(|s| s.to_string_lossy().into_owned()) - .unwrap_or("root".to_string()), - entries: vec![VfsEntry::Dir(VirtualDirectory { - name: std::mem::take(&mut self.root_dir.name), - entries: std::mem::take(&mut self.root_dir.entries), - })], - }; - Ok(()) + min_root_dir: Default::default(), + } } - pub fn with_root_dir( - &mut self, - with_root: impl FnOnce(&mut VirtualDirectory) -> R, - ) -> R { - with_root(&mut self.root_dir) + /// Add a directory that might be the minimum root directory + /// of the VFS. + /// + /// For example, say the user has a deno.json and specifies an + /// import map in a parent directory. The import map won't be + /// included in the VFS, but its base will meaning we need to + /// tell the VFS builder to include the base of the import map + /// by calling this method. + pub fn add_possible_min_root_dir(&mut self, path: &Path) { + self.add_dir_raw(path); + + match &self.min_root_dir { + Some(WindowsSystemRootablePath::WindowSystemRoot) => { + // already the root dir + } + Some(WindowsSystemRootablePath::Path(current_path)) => { + let mut common_components = Vec::new(); + for (a, b) in current_path.components().zip(path.components()) { + if a != b { + break; + } + common_components.push(a); + } + if common_components.is_empty() { + if cfg!(windows) { + self.min_root_dir = + Some(WindowsSystemRootablePath::WindowSystemRoot); + } else { + self.min_root_dir = + Some(WindowsSystemRootablePath::Path(PathBuf::from("/"))); + } + } else { + self.min_root_dir = Some(WindowsSystemRootablePath::Path( + common_components.iter().collect(), + )); + } + } + None => { + self.min_root_dir = + Some(WindowsSystemRootablePath::Path(path.to_path_buf())); + } + } } pub fn add_dir_recursive(&mut self, path: &Path) -> Result<(), AnyError> { - let target_path = canonicalize_path(path)?; - if path != target_path { - self.add_symlink(path, &target_path)?; - } - self.add_dir_recursive_internal(&target_path) + let target_path = self.resolve_target_path(path)?; + self.add_dir_recursive_not_symlink(&target_path) } - fn add_dir_recursive_internal( + fn add_dir_recursive_not_symlink( &mut self, path: &Path, ) -> Result<(), AnyError> { - self.add_dir(path)?; + self.add_dir_raw(path); let read_dir = std::fs::read_dir(path) .with_context(|| format!("Reading {}", path.display()))?; @@ -120,45 +177,26 @@ impl VfsBuilder { let path = entry.path(); if file_type.is_dir() { - self.add_dir_recursive_internal(&path)?; + self.add_dir_recursive_not_symlink(&path)?; } else if file_type.is_file() { self.add_file_at_path_not_symlink(&path)?; } else if file_type.is_symlink() { - match util::fs::canonicalize_path(&path) { - Ok(target) => { - if let Err(StripRootError { .. }) = self.add_symlink(&path, &target) - { - if target.is_file() { - // this may change behavior, so warn the user about it - log::warn!( - "{} Symlink target is outside '{}'. Inlining symlink at '{}' to '{}' as file.", - crate::colors::yellow("Warning"), - self.root_path.display(), - path.display(), - target.display(), - ); - // inline the symlink and make the target file - let file_bytes = std::fs::read(&target) - .with_context(|| format!("Reading {}", path.display()))?; - self.add_file_with_data_inner(&path, file_bytes)?; - } else { - log::warn!( - "{} Symlink target is outside '{}'. Excluding symlink at '{}' with target '{}'.", - crate::colors::yellow("Warning"), - self.root_path.display(), - path.display(), - target.display(), - ); - } + match self.add_symlink(&path) { + Ok(target) => match target { + SymlinkTarget::File(target) => { + self.add_file_at_path_not_symlink(&target)? } - } + SymlinkTarget::Dir(target) => { + self.add_dir_recursive_not_symlink(&target)?; + } + }, Err(err) => { log::warn!( - "{} Failed resolving symlink. Ignoring.\n Path: {}\n Message: {:#}", - crate::colors::yellow("Warning"), - path.display(), - err - ); + "{} Failed resolving symlink. Ignoring.\n Path: {}\n Message: {:#}", + crate::colors::yellow("Warning"), + path.display(), + err + ); } } } @@ -167,33 +205,30 @@ impl VfsBuilder { Ok(()) } - fn add_dir( - &mut self, - path: &Path, - ) -> Result<&mut VirtualDirectory, StripRootError> { + fn add_dir_raw(&mut self, path: &Path) -> &mut VirtualDirectory { log::debug!("Ensuring directory '{}'", path.display()); - let path = self.path_relative_root(path)?; - let mut current_dir = &mut self.root_dir; + debug_assert!(path.is_absolute()); + let mut current_dir = &mut self.executable_root; for component in path.components() { + if matches!(component, std::path::Component::RootDir) { + continue; + } let name = component.as_os_str().to_string_lossy(); - let index = match current_dir - .entries - .binary_search_by(|e| e.name().cmp(&name)) - { + let index = match current_dir.entries.binary_search(&name) { Ok(index) => index, Err(insert_index) => { - current_dir.entries.insert( + current_dir.entries.0.insert( insert_index, VfsEntry::Dir(VirtualDirectory { name: name.to_string(), - entries: Vec::new(), + entries: Default::default(), }), ); insert_index } }; - match &mut current_dir.entries[index] { + match &mut current_dir.entries.0[index] { VfsEntry::Dir(dir) => { current_dir = dir; } @@ -201,15 +236,38 @@ impl VfsBuilder { }; } - Ok(current_dir) + current_dir } - pub fn add_file_at_path(&mut self, path: &Path) -> Result<(), AnyError> { - let target_path = canonicalize_path(path)?; - if target_path != path { - self.add_symlink(path, &target_path)?; + pub fn get_system_root_dir_mut(&mut self) -> &mut VirtualDirectory { + &mut self.executable_root + } + + pub fn get_dir_mut(&mut self, path: &Path) -> Option<&mut VirtualDirectory> { + debug_assert!(path.is_absolute()); + let mut current_dir = &mut self.executable_root; + + for component in path.components() { + if matches!(component, std::path::Component::RootDir) { + continue; + } + let name = component.as_os_str().to_string_lossy(); + let entry = current_dir.entries.get_mut_by_name(&name)?; + match entry { + VfsEntry::Dir(dir) => { + current_dir = dir; + } + _ => unreachable!(), + }; } - self.add_file_at_path_not_symlink(&target_path) + + Some(current_dir) + } + + pub fn add_file_at_path(&mut self, path: &Path) -> Result<(), AnyError> { + let file_bytes = std::fs::read(path) + .with_context(|| format!("Reading {}", path.display()))?; + self.add_file_with_data(path, file_bytes, VfsFileSubDataKind::Raw) } fn add_file_at_path_not_symlink( @@ -218,25 +276,31 @@ impl VfsBuilder { ) -> Result<(), AnyError> { let file_bytes = std::fs::read(path) .with_context(|| format!("Reading {}", path.display()))?; - self.add_file_with_data_inner(path, file_bytes) + self.add_file_with_data_inner(path, file_bytes, VfsFileSubDataKind::Raw) } pub fn add_file_with_data( &mut self, path: &Path, data: Vec, + sub_data_kind: VfsFileSubDataKind, ) -> Result<(), AnyError> { - let target_path = canonicalize_path(path)?; - if target_path != path { - self.add_symlink(path, &target_path)?; + let metadata = std::fs::symlink_metadata(path).with_context(|| { + format!("Resolving target path for '{}'", path.display()) + })?; + if metadata.is_symlink() { + let target = self.add_symlink(path)?.into_path_buf(); + self.add_file_with_data_inner(&target, data, sub_data_kind) + } else { + self.add_file_with_data_inner(path, data, sub_data_kind) } - self.add_file_with_data_inner(&target_path, data) } fn add_file_with_data_inner( &mut self, path: &Path, data: Vec, + sub_data_kind: VfsFileSubDataKind, ) -> Result<(), AnyError> { log::debug!("Adding file '{}'", path.display()); let checksum = util::checksum::gen(&[&data]); @@ -248,20 +312,34 @@ impl VfsBuilder { self.current_offset }; - let dir = self.add_dir(path.parent().unwrap())?; + let dir = self.add_dir_raw(path.parent().unwrap()); let name = path.file_name().unwrap().to_string_lossy(); - let data_len = data.len(); - match dir.entries.binary_search_by(|e| e.name().cmp(&name)) { - Ok(_) => { - // already added, just ignore + let offset_and_len = OffsetWithLength { + offset, + len: data.len() as u64, + }; + match dir.entries.binary_search(&name) { + Ok(index) => { + let entry = &mut dir.entries.0[index]; + match entry { + VfsEntry::File(virtual_file) => match sub_data_kind { + VfsFileSubDataKind::Raw => { + virtual_file.offset = offset_and_len; + } + VfsFileSubDataKind::ModuleGraph => { + virtual_file.module_graph_offset = offset_and_len; + } + }, + VfsEntry::Dir(_) | VfsEntry::Symlink(_) => unreachable!(), + } } Err(insert_index) => { - dir.entries.insert( + dir.entries.0.insert( insert_index, VfsEntry::File(VirtualFile { name: name.to_string(), - offset, - len: data.len() as u64, + offset: offset_and_len, + module_graph_offset: offset_and_len, }), ); } @@ -270,69 +348,505 @@ impl VfsBuilder { // new file, update the list of files if self.current_offset == offset { self.files.push(data); - self.current_offset += data_len as u64; + self.current_offset += offset_and_len.len; } Ok(()) } - fn add_symlink( + fn resolve_target_path(&mut self, path: &Path) -> Result { + let metadata = std::fs::symlink_metadata(path).with_context(|| { + format!("Resolving target path for '{}'", path.display()) + })?; + if metadata.is_symlink() { + Ok(self.add_symlink(path)?.into_path_buf()) + } else { + Ok(path.to_path_buf()) + } + } + + fn add_symlink(&mut self, path: &Path) -> Result { + self.add_symlink_inner(path, &mut IndexSet::new()) + } + + fn add_symlink_inner( &mut self, path: &Path, - target: &Path, - ) -> Result<(), StripRootError> { - log::debug!( - "Adding symlink '{}' to '{}'", - path.display(), - target.display() + visited: &mut IndexSet, + ) -> Result { + log::debug!("Adding symlink '{}'", path.display()); + let target = strip_unc_prefix( + std::fs::read_link(path) + .with_context(|| format!("Reading symlink '{}'", path.display()))?, ); - let relative_target = self.path_relative_root(target)?; - let relative_path = match self.path_relative_root(path) { - Ok(path) => path, - Err(StripRootError { .. }) => { - // ignore if the original path is outside the root directory - return Ok(()); - } - }; - if relative_target == relative_path { - // it's the same, ignore - return Ok(()); - } - let dir = self.add_dir(path.parent().unwrap())?; + let target = normalize_path(path.parent().unwrap().join(&target)); + let dir = self.add_dir_raw(path.parent().unwrap()); let name = path.file_name().unwrap().to_string_lossy(); - match dir.entries.binary_search_by(|e| e.name().cmp(&name)) { - Ok(_) => unreachable!(), + match dir.entries.binary_search(&name) { + Ok(_) => {} // previously inserted Err(insert_index) => { - dir.entries.insert( + dir.entries.0.insert( insert_index, VfsEntry::Symlink(VirtualSymlink { name: name.to_string(), - dest_parts: relative_target - .components() - .map(|c| c.as_os_str().to_string_lossy().to_string()) - .collect::>(), + dest_parts: VirtualSymlinkParts::from_path(&target), }), ); } } - Ok(()) + let target_metadata = + std::fs::symlink_metadata(&target).with_context(|| { + format!("Reading symlink target '{}'", target.display()) + })?; + if target_metadata.is_symlink() { + if !visited.insert(target.clone()) { + // todo: probably don't error in this scenario + bail!( + "Circular symlink detected: {} -> {}", + visited + .iter() + .map(|p| p.display().to_string()) + .collect::>() + .join(" -> "), + target.display() + ); + } + self.add_symlink_inner(&target, visited) + } else if target_metadata.is_dir() { + Ok(SymlinkTarget::Dir(target)) + } else { + Ok(SymlinkTarget::File(target)) + } } - pub fn into_dir_and_files(self) -> (VirtualDirectory, Vec>) { - (self.root_dir, self.files) + pub fn build(self) -> BuiltVfs { + fn strip_prefix_from_symlinks( + dir: &mut VirtualDirectory, + parts: &[String], + ) { + for entry in &mut dir.entries.0 { + match entry { + VfsEntry::Dir(dir) => { + strip_prefix_from_symlinks(dir, parts); + } + VfsEntry::File(_) => {} + VfsEntry::Symlink(symlink) => { + let old_parts = std::mem::take(&mut symlink.dest_parts.0); + symlink.dest_parts.0 = + old_parts.into_iter().skip(parts.len()).collect(); + } + } + } + } + + let mut current_dir = self.executable_root; + let mut current_path = if cfg!(windows) { + WindowsSystemRootablePath::WindowSystemRoot + } else { + WindowsSystemRootablePath::Path(PathBuf::from("/")) + }; + loop { + if current_dir.entries.len() != 1 { + break; + } + if self.min_root_dir.as_ref() == Some(¤t_path) { + break; + } + match ¤t_dir.entries.0[0] { + VfsEntry::Dir(dir) => { + if dir.name == DENO_COMPILE_GLOBAL_NODE_MODULES_DIR_NAME { + // special directory we want to maintain + break; + } + match current_dir.entries.0.remove(0) { + VfsEntry::Dir(dir) => { + current_path = + WindowsSystemRootablePath::Path(current_path.join(&dir.name)); + current_dir = dir; + } + _ => unreachable!(), + }; + } + VfsEntry::File(_) | VfsEntry::Symlink(_) => break, + } + } + if let WindowsSystemRootablePath::Path(path) = ¤t_path { + strip_prefix_from_symlinks( + &mut current_dir, + &VirtualSymlinkParts::from_path(path).0, + ); + } + BuiltVfs { + root_path: current_path, + entries: current_dir.entries, + files: self.files, + } } +} + +#[derive(Debug)] +enum SymlinkTarget { + File(PathBuf), + Dir(PathBuf), +} - fn path_relative_root(&self, path: &Path) -> Result { - match path.strip_prefix(&self.root_path) { - Ok(p) => Ok(p.to_path_buf()), - Err(_) => Err(StripRootError { - root_path: self.root_path.clone(), - target: path.to_path_buf(), - }), +impl SymlinkTarget { + pub fn into_path_buf(self) -> PathBuf { + match self { + Self::File(path) => path, + Self::Dir(path) => path, } } } +pub fn output_vfs(vfs: &BuiltVfs, executable_name: &str) { + if !log::log_enabled!(log::Level::Info) { + return; // no need to compute if won't output + } + + if vfs.entries.is_empty() { + return; // nothing to output + } + + let mut text = String::new(); + let display_tree = vfs_as_display_tree(vfs, executable_name); + display_tree.print(&mut text).unwrap(); // unwrap ok because it's writing to a string + log::info!("\n{}\n", deno_terminal::colors::bold("Embedded Files")); + log::info!("{}\n", text.trim()); + log::info!( + "Size: {}\n", + human_size(vfs.files.iter().map(|f| f.len() as f64).sum()) + ); +} + +fn vfs_as_display_tree( + vfs: &BuiltVfs, + executable_name: &str, +) -> DisplayTreeNode { + /// The VFS only stores duplicate files once, so track that and display + /// it to the user so that it's not confusing. + #[derive(Debug, Default, Copy, Clone)] + struct Size { + unique: u64, + total: u64, + } + + impl std::ops::Add for Size { + type Output = Self; + + fn add(self, other: Self) -> Self { + Self { + unique: self.unique + other.unique, + total: self.total + other.total, + } + } + } + + impl std::iter::Sum for Size { + fn sum>(iter: I) -> Self { + iter.fold(Self::default(), std::ops::Add::add) + } + } + + enum EntryOutput<'a> { + All(Size), + Subset(Vec>), + File(Size), + Symlink(&'a [String]), + } + + impl<'a> EntryOutput<'a> { + pub fn size(&self) -> Size { + match self { + EntryOutput::All(size) => *size, + EntryOutput::Subset(children) => { + children.iter().map(|c| c.output.size()).sum() + } + EntryOutput::File(size) => *size, + EntryOutput::Symlink(_) => Size { + unique: 0, + total: 0, + }, + } + } + } + + impl<'a> EntryOutput<'a> { + pub fn as_display_tree(&self, name: String) -> DisplayTreeNode { + fn format_size(size: Size) -> String { + if size.unique == size.total { + human_size(size.unique as f64) + } else { + format!( + "{}{}", + human_size(size.total as f64), + deno_terminal::colors::gray(format!( + " - {} unique", + human_size(size.unique as f64) + )) + ) + } + } + + DisplayTreeNode { + text: match self { + EntryOutput::All(size) => { + format!("{}/* ({})", name, format_size(*size)) + } + EntryOutput::Subset(children) => { + let size = children.iter().map(|c| c.output.size()).sum::(); + format!("{} ({})", name, format_size(size)) + } + EntryOutput::File(size) => { + format!("{} ({})", name, format_size(*size)) + } + EntryOutput::Symlink(parts) => { + format!("{} --> {}", name, parts.join("/")) + } + }, + children: match self { + EntryOutput::All(_) => Vec::new(), + EntryOutput::Subset(children) => children + .iter() + .map(|entry| entry.output.as_display_tree(entry.name.to_string())) + .collect(), + EntryOutput::File(_) => Vec::new(), + EntryOutput::Symlink(_) => Vec::new(), + }, + } + } + } + + pub struct DirEntryOutput<'a> { + name: Cow<'a, str>, + output: EntryOutput<'a>, + } + + impl<'a> DirEntryOutput<'a> { + /// Collapses leaf nodes so they don't take up so much space when being + /// displayed. + /// + /// We only want to collapse leafs so that nodes of the same depth have + /// the same indentation. + pub fn collapse_leaf_nodes(&mut self) { + let EntryOutput::Subset(vec) = &mut self.output else { + return; + }; + for dir_entry in vec.iter_mut() { + dir_entry.collapse_leaf_nodes(); + } + if vec.len() != 1 { + return; + } + let child = &mut vec[0]; + let child_name = &child.name; + match &mut child.output { + EntryOutput::All(size) => { + self.name = Cow::Owned(format!("{}/{}", self.name, child_name)); + self.output = EntryOutput::All(*size); + } + EntryOutput::Subset(children) => { + if children.is_empty() { + self.name = Cow::Owned(format!("{}/{}", self.name, child_name)); + self.output = EntryOutput::Subset(vec![]); + } + } + EntryOutput::File(size) => { + self.name = Cow::Owned(format!("{}/{}", self.name, child_name)); + self.output = EntryOutput::File(*size); + } + EntryOutput::Symlink(parts) => { + let new_name = format!("{}/{}", self.name, child_name); + self.output = EntryOutput::Symlink(parts); + self.name = Cow::Owned(new_name); + } + } + } + } + + fn file_size(file: &VirtualFile, seen_offsets: &mut HashSet) -> Size { + fn add_offset_to_size( + offset: OffsetWithLength, + size: &mut Size, + seen_offsets: &mut HashSet, + ) { + if offset.len == 0 { + // some empty files have a dummy offset, so don't + // insert them into the seen offsets + return; + } + + if seen_offsets.insert(offset.offset) { + size.total += offset.len; + size.unique += offset.len; + } else { + size.total += offset.len; + } + } + + let mut size = Size::default(); + add_offset_to_size(file.offset, &mut size, seen_offsets); + if file.module_graph_offset.offset != file.offset.offset { + add_offset_to_size(file.module_graph_offset, &mut size, seen_offsets); + } + size + } + + fn dir_size(dir: &VirtualDirectory, seen_offsets: &mut HashSet) -> Size { + let mut size = Size::default(); + for entry in dir.entries.iter() { + match entry { + VfsEntry::Dir(virtual_directory) => { + size = size + dir_size(virtual_directory, seen_offsets); + } + VfsEntry::File(file) => { + size = size + file_size(file, seen_offsets); + } + VfsEntry::Symlink(_) => { + // ignore + } + } + } + size + } + + fn show_global_node_modules_dir<'a>( + vfs_dir: &'a VirtualDirectory, + seen_offsets: &mut HashSet, + ) -> Vec> { + fn show_subset_deep<'a>( + vfs_dir: &'a VirtualDirectory, + depth: usize, + seen_offsets: &mut HashSet, + ) -> EntryOutput<'a> { + if depth == 0 { + EntryOutput::All(dir_size(vfs_dir, seen_offsets)) + } else { + EntryOutput::Subset(show_subset(vfs_dir, depth, seen_offsets)) + } + } + + fn show_subset<'a>( + vfs_dir: &'a VirtualDirectory, + depth: usize, + seen_offsets: &mut HashSet, + ) -> Vec> { + vfs_dir + .entries + .iter() + .map(|entry| DirEntryOutput { + name: Cow::Borrowed(entry.name()), + output: match entry { + VfsEntry::Dir(virtual_directory) => { + show_subset_deep(virtual_directory, depth - 1, seen_offsets) + } + VfsEntry::File(file) => { + EntryOutput::File(file_size(file, seen_offsets)) + } + VfsEntry::Symlink(virtual_symlink) => { + EntryOutput::Symlink(&virtual_symlink.dest_parts.0) + } + }, + }) + .collect() + } + + // in this scenario, we want to show + // .deno_compile_node_modules/localhost///* + show_subset(vfs_dir, 3, seen_offsets) + } + + fn include_all_entries<'a>( + dir_path: &WindowsSystemRootablePath, + entries: &'a VirtualDirectoryEntries, + seen_offsets: &mut HashSet, + ) -> Vec> { + entries + .iter() + .map(|entry| DirEntryOutput { + name: Cow::Borrowed(entry.name()), + output: analyze_entry(dir_path.join(entry.name()), entry, seen_offsets), + }) + .collect() + } + + fn analyze_entry<'a>( + path: PathBuf, + entry: &'a VfsEntry, + seen_offsets: &mut HashSet, + ) -> EntryOutput<'a> { + match entry { + VfsEntry::Dir(virtual_directory) => { + analyze_dir(path, virtual_directory, seen_offsets) + } + VfsEntry::File(file) => EntryOutput::File(file_size(file, seen_offsets)), + VfsEntry::Symlink(virtual_symlink) => { + EntryOutput::Symlink(&virtual_symlink.dest_parts.0) + } + } + } + + fn analyze_dir<'a>( + dir: PathBuf, + vfs_dir: &'a VirtualDirectory, + seen_offsets: &mut HashSet, + ) -> EntryOutput<'a> { + if vfs_dir.name == DENO_COMPILE_GLOBAL_NODE_MODULES_DIR_NAME { + return EntryOutput::Subset(show_global_node_modules_dir( + vfs_dir, + seen_offsets, + )); + } + + let real_entry_count = std::fs::read_dir(&dir) + .ok() + .map(|entries| entries.flat_map(|e| e.ok()).count()) + .unwrap_or(0); + if real_entry_count == vfs_dir.entries.len() { + let children = vfs_dir + .entries + .iter() + .map(|entry| DirEntryOutput { + name: Cow::Borrowed(entry.name()), + output: analyze_entry(dir.join(entry.name()), entry, seen_offsets), + }) + .collect::>(); + if children + .iter() + .all(|c| !matches!(c.output, EntryOutput::Subset { .. })) + { + EntryOutput::All(children.iter().map(|c| c.output.size()).sum()) + } else { + EntryOutput::Subset(children) + } + } else if vfs_dir.name == DENO_COMPILE_GLOBAL_NODE_MODULES_DIR_NAME { + EntryOutput::Subset(show_global_node_modules_dir(vfs_dir, seen_offsets)) + } else { + EntryOutput::Subset(include_all_entries( + &WindowsSystemRootablePath::Path(dir), + &vfs_dir.entries, + seen_offsets, + )) + } + } + + // always include all the entries for the root directory, otherwise the + // user might not have context about what's being shown + let mut seen_offsets = HashSet::with_capacity(vfs.files.len()); + let mut child_entries = + include_all_entries(&vfs.root_path, &vfs.entries, &mut seen_offsets); + for child_entry in &mut child_entries { + child_entry.collapse_leaf_nodes(); + } + DisplayTreeNode { + text: deno_terminal::colors::italic(executable_name).to_string(), + children: child_entries + .iter() + .map(|entry| entry.output.as_display_tree(entry.name.to_string())) + .collect(), + } +} + #[derive(Debug)] enum VfsEntryRef<'a> { Dir(&'a VirtualDirectory), @@ -340,80 +854,30 @@ enum VfsEntryRef<'a> { Symlink(&'a VirtualSymlink), } -impl<'a> VfsEntryRef<'a> { - pub fn as_fs_stat(&self) -> FsStat { - match self { - VfsEntryRef::Dir(_) => FsStat { - is_directory: true, - is_file: false, - is_symlink: false, - atime: None, - birthtime: None, - mtime: None, - ctime: None, - blksize: 0, - size: 0, - dev: 0, - ino: 0, - mode: 0, - nlink: 0, - uid: 0, - gid: 0, - rdev: 0, - blocks: 0, - is_block_device: false, - is_char_device: false, - is_fifo: false, - is_socket: false, - }, - VfsEntryRef::File(file) => FsStat { - is_directory: false, - is_file: true, - is_symlink: false, - atime: None, - birthtime: None, - mtime: None, - ctime: None, - blksize: 0, - size: file.len, - dev: 0, - ino: 0, - mode: 0, - nlink: 0, - uid: 0, - gid: 0, - rdev: 0, - blocks: 0, - is_block_device: false, - is_char_device: false, - is_fifo: false, - is_socket: false, +impl VfsEntryRef<'_> { + pub fn as_metadata(&self) -> FileBackedVfsMetadata { + FileBackedVfsMetadata { + file_type: match self { + Self::Dir(_) => sys_traits::FileType::Dir, + Self::File(_) => sys_traits::FileType::File, + Self::Symlink(_) => sys_traits::FileType::Symlink, }, - VfsEntryRef::Symlink(_) => FsStat { - is_directory: false, - is_file: false, - is_symlink: true, - atime: None, - birthtime: None, - mtime: None, - ctime: None, - blksize: 0, - size: 0, - dev: 0, - ino: 0, - mode: 0, - nlink: 0, - uid: 0, - gid: 0, - rdev: 0, - blocks: 0, - is_block_device: false, - is_char_device: false, - is_fifo: false, - is_socket: false, + name: self.name().to_string(), + len: match self { + Self::Dir(_) => 0, + Self::File(file) => file.offset.len, + Self::Symlink(_) => 0, }, } } + + pub fn name(&self) -> &str { + match self { + Self::Dir(dir) => &dir.name, + Self::File(file) => &file.name, + Self::Symlink(symlink) => &symlink.name, + } + } } // todo(dsherret): we should store this more efficiently in the binary @@ -427,9 +891,9 @@ pub enum VfsEntry { impl VfsEntry { pub fn name(&self) -> &str { match self { - VfsEntry::Dir(dir) => &dir.name, - VfsEntry::File(file) => &file.name, - VfsEntry::Symlink(symlink) => &symlink.name, + Self::Dir(dir) => &dir.name, + Self::File(file) => &file.name, + Self::Symlink(symlink) => &symlink.name, } } @@ -442,30 +906,122 @@ impl VfsEntry { } } +#[derive(Debug, Default, Serialize, Deserialize)] +pub struct VirtualDirectoryEntries(Vec); + +impl VirtualDirectoryEntries { + pub fn new(mut entries: Vec) -> Self { + // needs to be sorted by name + entries.sort_by(|a, b| a.name().cmp(b.name())); + Self(entries) + } + + pub fn take_inner(&mut self) -> Vec { + std::mem::take(&mut self.0) + } + + pub fn is_empty(&self) -> bool { + self.0.is_empty() + } + + pub fn len(&self) -> usize { + self.0.len() + } + + pub fn get_by_name(&self, name: &str) -> Option<&VfsEntry> { + self.binary_search(name).ok().map(|index| &self.0[index]) + } + + pub fn get_mut_by_name(&mut self, name: &str) -> Option<&mut VfsEntry> { + self + .binary_search(name) + .ok() + .map(|index| &mut self.0[index]) + } + + pub fn binary_search(&self, name: &str) -> Result { + self.0.binary_search_by(|e| e.name().cmp(name)) + } + + pub fn insert(&mut self, entry: VfsEntry) { + match self.binary_search(entry.name()) { + Ok(index) => { + self.0[index] = entry; + } + Err(insert_index) => { + self.0.insert(insert_index, entry); + } + } + } + + pub fn remove(&mut self, index: usize) -> VfsEntry { + self.0.remove(index) + } + + pub fn iter(&self) -> std::slice::Iter<'_, VfsEntry> { + self.0.iter() + } +} + #[derive(Debug, Serialize, Deserialize)] pub struct VirtualDirectory { + #[serde(rename = "n")] pub name: String, // should be sorted by name - pub entries: Vec, + #[serde(rename = "e")] + pub entries: VirtualDirectoryEntries, +} + +#[derive(Debug, Clone, Copy, Serialize, Deserialize)] +pub struct OffsetWithLength { + #[serde(rename = "o")] + pub offset: u64, + #[serde(rename = "l")] + pub len: u64, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct VirtualFile { + #[serde(rename = "n")] pub name: String, - pub offset: u64, - pub len: u64, + #[serde(rename = "o")] + pub offset: OffsetWithLength, + /// Offset file to use for module loading when it differs from the + /// raw file. Often this will be the same offset as above for data + /// such as JavaScript files, but for TypeScript files the `offset` + /// will be the original raw bytes when included as an asset and this + /// offset will be to the transpiled JavaScript source. + #[serde(rename = "m")] + pub module_graph_offset: OffsetWithLength, +} + +#[derive(Debug, Serialize, Deserialize)] +pub struct VirtualSymlinkParts(Vec); + +impl VirtualSymlinkParts { + pub fn from_path(path: &Path) -> Self { + Self( + path + .components() + .filter(|c| !matches!(c, std::path::Component::RootDir)) + .map(|c| c.as_os_str().to_string_lossy().to_string()) + .collect(), + ) + } } #[derive(Debug, Serialize, Deserialize)] pub struct VirtualSymlink { + #[serde(rename = "n")] pub name: String, - pub dest_parts: Vec, + #[serde(rename = "p")] + pub dest_parts: VirtualSymlinkParts, } impl VirtualSymlink { pub fn resolve_dest_from_root(&self, root: &Path) -> PathBuf { let mut dest = root.to_path_buf(); - for part in &self.dest_parts { + for part in &self.dest_parts.0 { dest.push(part); } dest @@ -537,10 +1093,10 @@ impl VfsRoot { let mut final_path = self.root_path.clone(); let mut current_entry = VfsEntryRef::Dir(&self.dir); for component in relative_path.components() { - let component = component.as_os_str().to_string_lossy(); + let component = component.as_os_str(); let current_dir = match current_entry { VfsEntryRef::Dir(dir) => { - final_path.push(component.as_ref()); + final_path.push(component); dir } VfsEntryRef::Symlink(symlink) => { @@ -549,7 +1105,7 @@ impl VfsRoot { final_path = resolved_path; // overwrite with the new resolved path match entry { VfsEntryRef::Dir(dir) => { - final_path.push(component.as_ref()); + final_path.push(component); dir } _ => { @@ -567,63 +1123,56 @@ impl VfsRoot { )); } }; - match current_dir + let component = component.to_string_lossy(); + current_entry = current_dir .entries - .binary_search_by(|e| e.name().cmp(&component)) - { - Ok(index) => { - current_entry = current_dir.entries[index].as_ref(); - } - Err(_) => { - return Err(std::io::Error::new( - std::io::ErrorKind::NotFound, - "path not found", - )); - } - } + .get_by_name(&component) + .ok_or_else(|| { + std::io::Error::new(std::io::ErrorKind::NotFound, "path not found") + })? + .as_ref(); } Ok((final_path, current_entry)) } } -#[derive(Clone)] -struct FileBackedVfsFile { +pub struct FileBackedVfsFile { file: VirtualFile, - pos: Arc>, + pos: RefCell, vfs: Arc, } impl FileBackedVfsFile { - fn seek(&self, pos: SeekFrom) -> FsResult { + pub fn seek(&self, pos: SeekFrom) -> std::io::Result { match pos { SeekFrom::Start(pos) => { - *self.pos.lock() = pos; + *self.pos.borrow_mut() = pos; Ok(pos) } SeekFrom::End(offset) => { - if offset < 0 && -offset as u64 > self.file.len { + if offset < 0 && -offset as u64 > self.file.offset.len { let msg = "An attempt was made to move the file pointer before the beginning of the file."; - Err( - std::io::Error::new(std::io::ErrorKind::PermissionDenied, msg) - .into(), - ) + Err(std::io::Error::new( + std::io::ErrorKind::PermissionDenied, + msg, + )) } else { - let mut current_pos = self.pos.lock(); + let mut current_pos = self.pos.borrow_mut(); *current_pos = if offset >= 0 { - self.file.len - (offset as u64) + self.file.offset.len - (offset as u64) } else { - self.file.len + (-offset as u64) + self.file.offset.len + (-offset as u64) }; Ok(*current_pos) } } SeekFrom::Current(offset) => { - let mut current_pos = self.pos.lock(); + let mut current_pos = self.pos.borrow_mut(); if offset >= 0 { *current_pos += offset as u64; } else if -offset as u64 > *current_pos { - return Err(std::io::Error::new(std::io::ErrorKind::PermissionDenied, "An attempt was made to move the file pointer before the beginning of the file.").into()); + return Err(std::io::Error::new(std::io::ErrorKind::PermissionDenied, "An attempt was made to move the file pointer before the beginning of the file.")); } else { *current_pos -= -offset as u64; } @@ -632,56 +1181,58 @@ impl FileBackedVfsFile { } } - fn read_to_buf(&self, buf: &mut [u8]) -> FsResult { - let pos = { - let mut pos = self.pos.lock(); + pub fn read_to_buf(&self, buf: &mut [u8]) -> std::io::Result { + let read_pos = { + let mut pos = self.pos.borrow_mut(); let read_pos = *pos; // advance the position due to the read - *pos = std::cmp::min(self.file.len, *pos + buf.len() as u64); + *pos = std::cmp::min(self.file.offset.len, *pos + buf.len() as u64); read_pos }; - self - .vfs - .read_file(&self.file, pos, buf) - .map_err(|err| err.into()) + self.vfs.read_file(&self.file, read_pos, buf) } - fn read_to_end(&self) -> FsResult> { - let pos = { - let mut pos = self.pos.lock(); + fn read_to_end(&self) -> FsResult> { + let read_pos = { + let mut pos = self.pos.borrow_mut(); let read_pos = *pos; // todo(dsherret): should this always set it to the end of the file? - if *pos < self.file.len { + if *pos < self.file.offset.len { // advance the position due to the read - *pos = self.file.len; + *pos = self.file.offset.len; } read_pos }; - if pos > self.file.len { - return Ok(Vec::new()); + if read_pos > self.file.offset.len { + return Ok(Cow::Borrowed(&[])); + } + if read_pos == 0 { + Ok( + self + .vfs + .read_file_all(&self.file, VfsFileSubDataKind::Raw)?, + ) + } else { + let size = (self.file.offset.len - read_pos) as usize; + let mut buf = vec![0; size]; + self.vfs.read_file(&self.file, read_pos, &mut buf)?; + Ok(Cow::Owned(buf)) } - let size = (self.file.len - pos) as usize; - let mut buf = vec![0; size]; - self.vfs.read_file(&self.file, pos, &mut buf)?; - Ok(buf) } } #[async_trait::async_trait(?Send)] impl deno_io::fs::File for FileBackedVfsFile { fn read_sync(self: Rc, buf: &mut [u8]) -> FsResult { - self.read_to_buf(buf) + self.read_to_buf(buf).map_err(Into::into) } async fn read_byob( self: Rc, mut buf: BufMutView, ) -> FsResult<(usize, BufMutView)> { - let inner = (*self).clone(); - tokio::task::spawn(async move { - let nread = inner.read_to_buf(&mut buf)?; - Ok((nread, buf)) - }) - .await? + // this is fast, no need to spawn a task + let nread = self.read_to_buf(&mut buf)?; + Ok((nread, buf)) } fn write_sync(self: Rc, _buf: &[u8]) -> FsResult { @@ -701,12 +1252,12 @@ impl deno_io::fs::File for FileBackedVfsFile { Err(FsError::NotSupported) } - fn read_all_sync(self: Rc) -> FsResult> { + fn read_all_sync(self: Rc) -> FsResult> { self.read_to_end() } - async fn read_all_async(self: Rc) -> FsResult> { - let inner = (*self).clone(); - tokio::task::spawn_blocking(move || inner.read_to_end()).await? + async fn read_all_async(self: Rc) -> FsResult> { + // this is fast, no need to spawn a task + self.read_to_end() } fn chmod_sync(self: Rc, _pathmode: u32) -> FsResult<()> { @@ -717,10 +1268,10 @@ impl deno_io::fs::File for FileBackedVfsFile { } fn seek_sync(self: Rc, pos: SeekFrom) -> FsResult { - self.seek(pos) + self.seek(pos).map_err(|err| err.into()) } async fn seek_async(self: Rc, pos: SeekFrom) -> FsResult { - self.seek(pos) + self.seek(pos).map_err(|err| err.into()) } fn datasync_sync(self: Rc) -> FsResult<()> { @@ -796,6 +1347,47 @@ impl deno_io::fs::File for FileBackedVfsFile { } } +#[derive(Debug, Clone)] +pub struct FileBackedVfsDirEntry { + pub parent_path: PathBuf, + pub metadata: FileBackedVfsMetadata, +} + +#[derive(Debug, Clone)] +pub struct FileBackedVfsMetadata { + pub name: String, + pub file_type: sys_traits::FileType, + pub len: u64, +} + +impl FileBackedVfsMetadata { + pub fn as_fs_stat(&self) -> FsStat { + FsStat { + is_directory: self.file_type == sys_traits::FileType::Dir, + is_file: self.file_type == sys_traits::FileType::File, + is_symlink: self.file_type == sys_traits::FileType::Symlink, + atime: None, + birthtime: None, + mtime: None, + ctime: None, + blksize: 0, + size: self.len, + dev: 0, + ino: 0, + mode: 0, + nlink: 0, + uid: 0, + gid: 0, + rdev: 0, + blocks: 0, + is_block_device: false, + is_char_device: false, + is_fifo: false, + is_socket: false, + } + } +} + #[derive(Debug)] pub struct FileBackedVfs { vfs_data: Cow<'static, [u8]>, @@ -821,13 +1413,13 @@ impl FileBackedVfs { pub fn open_file( self: &Arc, path: &Path, - ) -> std::io::Result> { + ) -> std::io::Result { let file = self.file_entry(path)?; - Ok(Rc::new(FileBackedVfsFile { + Ok(FileBackedVfsFile { file: file.clone(), vfs: self.clone(), pos: Default::default(), - })) + }) } pub fn read_dir(&self, path: &Path) -> std::io::Result> { @@ -846,6 +1438,18 @@ impl FileBackedVfs { ) } + pub fn read_dir_with_metadata<'a>( + &'a self, + path: &Path, + ) -> std::io::Result + 'a> { + let dir = self.dir_entry(path)?; + let path = path.to_path_buf(); + Ok(dir.entries.iter().map(move |entry| FileBackedVfsDirEntry { + parent_path: path.to_path_buf(), + metadata: entry.as_ref().as_metadata(), + })) + } + pub fn read_link(&self, path: &Path) -> std::io::Result { let (_, entry) = self.fs_root.find_entry_no_follow(path)?; match entry { @@ -859,14 +1463,14 @@ impl FileBackedVfs { } } - pub fn lstat(&self, path: &Path) -> std::io::Result { + pub fn lstat(&self, path: &Path) -> std::io::Result { let (_, entry) = self.fs_root.find_entry_no_follow(path)?; - Ok(entry.as_fs_stat()) + Ok(entry.as_metadata()) } - pub fn stat(&self, path: &Path) -> std::io::Result { + pub fn stat(&self, path: &Path) -> std::io::Result { let (_, entry) = self.fs_root.find_entry(path)?; - Ok(entry.as_fs_stat()) + Ok(entry.as_metadata()) } pub fn canonicalize(&self, path: &Path) -> std::io::Result { @@ -877,8 +1481,13 @@ impl FileBackedVfs { pub fn read_file_all( &self, file: &VirtualFile, + sub_data_kind: VfsFileSubDataKind, ) -> std::io::Result> { - let read_range = self.get_read_range(file, 0, file.len)?; + let read_len = match sub_data_kind { + VfsFileSubDataKind::Raw => file.offset.len, + VfsFileSubDataKind::ModuleGraph => file.module_graph_offset.len, + }; + let read_range = self.get_read_range(file, sub_data_kind, 0, read_len)?; match &self.vfs_data { Cow::Borrowed(data) => Ok(Cow::Borrowed(&data[read_range])), Cow::Owned(data) => Ok(Cow::Owned(data[read_range].to_vec())), @@ -891,26 +1500,38 @@ impl FileBackedVfs { pos: u64, buf: &mut [u8], ) -> std::io::Result { - let read_range = self.get_read_range(file, pos, buf.len() as u64)?; - buf.copy_from_slice(&self.vfs_data[read_range]); - Ok(buf.len()) + let read_range = self.get_read_range( + file, + VfsFileSubDataKind::Raw, + pos, + buf.len() as u64, + )?; + let read_len = read_range.len(); + buf[..read_len].copy_from_slice(&self.vfs_data[read_range]); + Ok(read_len) } fn get_read_range( &self, file: &VirtualFile, + sub_data_kind: VfsFileSubDataKind, pos: u64, len: u64, ) -> std::io::Result> { - let data = &self.vfs_data; - let start = self.fs_root.start_file_offset + file.offset + pos; - let end = start + len; - if end > data.len() as u64 { + let file_offset_and_len = match sub_data_kind { + VfsFileSubDataKind::Raw => file.offset, + VfsFileSubDataKind::ModuleGraph => file.module_graph_offset, + }; + if pos > file_offset_and_len.len { return Err(std::io::Error::new( std::io::ErrorKind::UnexpectedEof, "unexpected EOF", )); } + let file_offset = + self.fs_root.start_file_offset + file_offset_and_len.offset; + let start = file_offset + pos; + let end = file_offset + std::cmp::min(pos + len, file_offset_and_len.len); Ok(start as usize..end as usize) } @@ -942,6 +1563,10 @@ impl FileBackedVfs { #[cfg(test)] mod test { use std::io::Write; + + use console_static_text::ansi::strip_ansi_codes; + use deno_io::fs::File; + use test_util::assert_contains; use test_util::TempDir; use super::*; @@ -949,7 +1574,13 @@ mod test { #[track_caller] fn read_file(vfs: &FileBackedVfs, path: &Path) -> String { let file = vfs.file_entry(path).unwrap(); - String::from_utf8(vfs.read_file_all(file).unwrap().into_owned()).unwrap() + String::from_utf8( + vfs + .read_file_all(file, VfsFileSubDataKind::Raw) + .unwrap() + .into_owned(), + ) + .unwrap() } #[test] @@ -959,32 +1590,43 @@ mod test { // will canonicalize the root path let src_path = temp_dir.path().canonicalize().join("src"); src_path.create_dir_all(); + src_path.join("sub_dir").create_dir_all(); + src_path.join("e.txt").write("e"); + src_path.symlink_file("e.txt", "sub_dir/e.txt"); let src_path = src_path.to_path_buf(); - let mut builder = VfsBuilder::new(src_path.clone()).unwrap(); + let mut builder = VfsBuilder::new(); builder - .add_file_with_data_inner(&src_path.join("a.txt"), "data".into()) + .add_file_with_data_inner( + &src_path.join("a.txt"), + "data".into(), + VfsFileSubDataKind::Raw, + ) .unwrap(); builder - .add_file_with_data_inner(&src_path.join("b.txt"), "data".into()) + .add_file_with_data_inner( + &src_path.join("b.txt"), + "data".into(), + VfsFileSubDataKind::Raw, + ) .unwrap(); assert_eq!(builder.files.len(), 1); // because duplicate data builder - .add_file_with_data_inner(&src_path.join("c.txt"), "c".into()) + .add_file_with_data_inner( + &src_path.join("c.txt"), + "c".into(), + VfsFileSubDataKind::Raw, + ) .unwrap(); builder .add_file_with_data_inner( &src_path.join("sub_dir").join("d.txt"), "d".into(), + VfsFileSubDataKind::Raw, ) .unwrap(); + builder.add_file_at_path(&src_path.join("e.txt")).unwrap(); builder - .add_file_with_data_inner(&src_path.join("e.txt"), "e".into()) - .unwrap(); - builder - .add_symlink( - &src_path.join("sub_dir").join("e.txt"), - &src_path.join("e.txt"), - ) + .add_symlink(&src_path.join("sub_dir").join("e.txt")) .unwrap(); // get the virtual fs @@ -1008,25 +1650,31 @@ mod test { ); // metadata - assert!( + assert_eq!( virtual_fs .lstat(&dest_path.join("sub_dir").join("e.txt")) .unwrap() - .is_symlink + .file_type, + sys_traits::FileType::Symlink, ); - assert!( + assert_eq!( virtual_fs .stat(&dest_path.join("sub_dir").join("e.txt")) .unwrap() - .is_file + .file_type, + sys_traits::FileType::File, ); - assert!( + assert_eq!( virtual_fs .stat(&dest_path.join("sub_dir")) .unwrap() - .is_directory, + .file_type, + sys_traits::FileType::Dir, + ); + assert_eq!( + virtual_fs.stat(&dest_path.join("e.txt")).unwrap().file_type, + sys_traits::FileType::File ); - assert!(virtual_fs.stat(&dest_path.join("e.txt")).unwrap().is_file,); } #[test] @@ -1037,6 +1685,7 @@ mod test { temp_dir.write("src/a.txt", "data"); temp_dir.write("src/b.txt", "data"); util::fs::symlink_dir( + &crate::sys::CliSys::default(), temp_dir_path.join("src/nested/sub_dir").as_path(), temp_dir_path.join("src/sub_dir_link").as_path(), ) @@ -1045,7 +1694,7 @@ mod test { // build and create the virtual fs let src_path = temp_dir_path.join("src").to_path_buf(); - let mut builder = VfsBuilder::new(src_path.clone()).unwrap(); + let mut builder = VfsBuilder::new(); builder.add_dir_recursive(&src_path).unwrap(); let (dest_path, virtual_fs) = into_virtual_fs(builder, &temp_dir); @@ -1063,11 +1712,12 @@ mod test { read_file(&virtual_fs, &dest_path.join("sub_dir_link").join("c.txt")), "c", ); - assert!( + assert_eq!( virtual_fs .lstat(&dest_path.join("sub_dir_link")) .unwrap() - .is_symlink + .file_type, + sys_traits::FileType::Symlink, ); assert_eq!( @@ -1083,10 +1733,10 @@ mod test { temp_dir: &TempDir, ) -> (PathBuf, FileBackedVfs) { let virtual_fs_file = temp_dir.path().join("virtual_fs"); - let (root_dir, files) = builder.into_dir_and_files(); + let vfs = builder.build(); { let mut file = std::fs::File::create(&virtual_fs_file).unwrap(); - for file_data in &files { + for file_data in &vfs.files { file.write_all(file_data).unwrap(); } } @@ -1097,7 +1747,10 @@ mod test { FileBackedVfs::new( Cow::Owned(data), VfsRoot { - dir: root_dir, + dir: VirtualDirectory { + name: "".to_string(), + entries: vfs.entries, + }, root_path: dest_path.to_path_buf(), start_file_offset: 0, }, @@ -1110,81 +1763,61 @@ mod test { let temp_dir = TempDir::new(); let src_path = temp_dir.path().canonicalize().join("src"); src_path.create_dir_all(); + src_path.symlink_file("a.txt", "b.txt"); + src_path.symlink_file("b.txt", "c.txt"); + src_path.symlink_file("c.txt", "a.txt"); let src_path = src_path.to_path_buf(); - let mut builder = VfsBuilder::new(src_path.clone()).unwrap(); - builder - .add_symlink(&src_path.join("a.txt"), &src_path.join("b.txt")) - .unwrap(); - builder - .add_symlink(&src_path.join("b.txt"), &src_path.join("c.txt")) - .unwrap(); - builder - .add_symlink(&src_path.join("c.txt"), &src_path.join("a.txt")) - .unwrap(); - let (dest_path, virtual_fs) = into_virtual_fs(builder, &temp_dir); - assert_eq!( - virtual_fs - .file_entry(&dest_path.join("a.txt")) - .err() - .unwrap() - .to_string(), - "circular symlinks", - ); - assert_eq!( - virtual_fs.read_link(&dest_path.join("a.txt")).unwrap(), - dest_path.join("b.txt") - ); - assert_eq!( - virtual_fs.read_link(&dest_path.join("b.txt")).unwrap(), - dest_path.join("c.txt") - ); + let mut builder = VfsBuilder::new(); + let err = builder + .add_symlink(src_path.join("a.txt").as_path()) + .unwrap_err(); + assert_contains!(err.to_string(), "Circular symlink detected",); } #[tokio::test] async fn test_open_file() { let temp_dir = TempDir::new(); let temp_path = temp_dir.path().canonicalize(); - let mut builder = VfsBuilder::new(temp_path.to_path_buf()).unwrap(); + let mut builder = VfsBuilder::new(); builder .add_file_with_data_inner( temp_path.join("a.txt").as_path(), "0123456789".to_string().into_bytes(), + VfsFileSubDataKind::Raw, ) .unwrap(); let (dest_path, virtual_fs) = into_virtual_fs(builder, &temp_dir); let virtual_fs = Arc::new(virtual_fs); let file = virtual_fs.open_file(&dest_path.join("a.txt")).unwrap(); - file.clone().seek_sync(SeekFrom::Current(2)).unwrap(); + file.seek(SeekFrom::Current(2)).unwrap(); let mut buf = vec![0; 2]; - file.clone().read_sync(&mut buf).unwrap(); + file.read_to_buf(&mut buf).unwrap(); assert_eq!(buf, b"23"); - file.clone().read_sync(&mut buf).unwrap(); + file.read_to_buf(&mut buf).unwrap(); assert_eq!(buf, b"45"); - file.clone().seek_sync(SeekFrom::Current(-4)).unwrap(); - file.clone().read_sync(&mut buf).unwrap(); + file.seek(SeekFrom::Current(-4)).unwrap(); + file.read_to_buf(&mut buf).unwrap(); assert_eq!(buf, b"23"); - file.clone().seek_sync(SeekFrom::Start(2)).unwrap(); - file.clone().read_sync(&mut buf).unwrap(); + file.seek(SeekFrom::Start(2)).unwrap(); + file.read_to_buf(&mut buf).unwrap(); assert_eq!(buf, b"23"); - file.clone().seek_sync(SeekFrom::End(2)).unwrap(); - file.clone().read_sync(&mut buf).unwrap(); + file.seek(SeekFrom::End(2)).unwrap(); + file.read_to_buf(&mut buf).unwrap(); assert_eq!(buf, b"89"); - file.clone().seek_sync(SeekFrom::Current(-8)).unwrap(); - file.clone().read_sync(&mut buf).unwrap(); + file.seek(SeekFrom::Current(-8)).unwrap(); + file.read_to_buf(&mut buf).unwrap(); assert_eq!(buf, b"23"); assert_eq!( file - .clone() - .seek_sync(SeekFrom::Current(-5)) - .err() - .unwrap() - .into_io_error() + .seek(SeekFrom::Current(-5)) + .unwrap_err() .to_string(), "An attempt was made to move the file pointer before the beginning of the file." ); // go beyond the file length, then back - file.clone().seek_sync(SeekFrom::Current(40)).unwrap(); - file.clone().seek_sync(SeekFrom::Current(-38)).unwrap(); + file.seek(SeekFrom::Current(40)).unwrap(); + file.seek(SeekFrom::Current(-38)).unwrap(); + let file = Rc::new(file); let read_buf = file.clone().read(2).await.unwrap(); assert_eq!(read_buf.to_vec(), b"67"); file.clone().seek_sync(SeekFrom::Current(-2)).unwrap(); @@ -1203,4 +1836,47 @@ mod test { .unwrap(); assert_eq!(all_buf.to_vec(), b"123456789"); } + + #[test] + fn test_vfs_as_display_tree() { + let temp_dir = TempDir::new(); + temp_dir.write("root.txt", ""); + temp_dir.create_dir_all("a"); + temp_dir.write("a/a.txt", "data"); + temp_dir.write("a/b.txt", "other data"); + temp_dir.create_dir_all("b"); + temp_dir.write("b/a.txt", ""); + temp_dir.write("b/b.txt", ""); + temp_dir.create_dir_all("c"); + temp_dir.write("c/a.txt", "contents"); + temp_dir.symlink_file("c/a.txt", "c/b.txt"); + assert_eq!(temp_dir.read_to_string("c/b.txt"), "contents"); // ensure the symlink works + let mut vfs_builder = VfsBuilder::new(); + // full dir + vfs_builder + .add_dir_recursive(temp_dir.path().join("a").as_path()) + .unwrap(); + // part of the dir + vfs_builder + .add_file_at_path(temp_dir.path().join("b/a.txt").as_path()) + .unwrap(); + // symlink + vfs_builder + .add_dir_recursive(temp_dir.path().join("c").as_path()) + .unwrap(); + temp_dir.write("c/c.txt", ""); // write an extra file so it shows the whole directory + let node = vfs_as_display_tree(&vfs_builder.build(), "executable"); + let mut text = String::new(); + node.print(&mut text).unwrap(); + assert_eq!( + strip_ansi_codes(&text), + r#"executable +├── a/* (14B) +├── b/a.txt (0B) +└─┬ c (8B) + ├── a.txt (8B) + └── b.txt --> c/a.txt +"# + ); + } } diff --git a/cli/sys.rs b/cli/sys.rs new file mode 100644 index 00000000000000..718e9981e29413 --- /dev/null +++ b/cli/sys.rs @@ -0,0 +1,230 @@ +// Copyright 2018-2025 the Deno authors. MIT license. + +// todo(dsherret): this should instead use conditional compilation and directly +// surface the underlying implementation. +// +// The problem atm is that there's no way to have conditional compilation for +// denort or the deno binary. We should extract out denort to a separate binary. + +use std::borrow::Cow; +use std::path::Path; +use std::path::PathBuf; + +use sys_traits::boxed::BoxedFsDirEntry; +use sys_traits::boxed::BoxedFsFile; +use sys_traits::boxed::BoxedFsMetadataValue; +use sys_traits::boxed::FsMetadataBoxed; +use sys_traits::boxed::FsOpenBoxed; +use sys_traits::boxed::FsReadDirBoxed; +use sys_traits::CreateDirOptions; + +use crate::standalone::DenoCompileFileSystem; + +#[derive(Debug, Clone)] +pub enum CliSys { + #[allow(dead_code)] // will be dead code for denort + #[allow(clippy::disallowed_types)] // ok because sys impl + Real(sys_traits::impls::RealSys), + #[allow(dead_code)] // will be dead code for deno + DenoCompile(DenoCompileFileSystem), +} + +impl Default for CliSys { + fn default() -> Self { + Self::Real(sys_traits::impls::RealSys) + } +} + +impl deno_runtime::deno_node::ExtNodeSys for CliSys {} + +impl sys_traits::BaseFsCloneFile for CliSys { + fn base_fs_clone_file(&self, src: &Path, dst: &Path) -> std::io::Result<()> { + match self { + Self::Real(sys) => sys.base_fs_clone_file(src, dst), + Self::DenoCompile(sys) => sys.base_fs_clone_file(src, dst), + } + } +} + +impl sys_traits::BaseFsSymlinkDir for CliSys { + fn base_fs_symlink_dir(&self, src: &Path, dst: &Path) -> std::io::Result<()> { + match self { + Self::Real(sys) => sys.base_fs_symlink_dir(src, dst), + Self::DenoCompile(sys) => sys.base_fs_symlink_dir(src, dst), + } + } +} + +impl sys_traits::BaseFsCopy for CliSys { + fn base_fs_copy(&self, src: &Path, dst: &Path) -> std::io::Result { + match self { + Self::Real(sys) => sys.base_fs_copy(src, dst), + Self::DenoCompile(sys) => sys.base_fs_copy(src, dst), + } + } +} + +impl sys_traits::BaseFsHardLink for CliSys { + fn base_fs_hard_link(&self, src: &Path, dst: &Path) -> std::io::Result<()> { + match self { + Self::Real(sys) => sys.base_fs_hard_link(src, dst), + Self::DenoCompile(sys) => sys.base_fs_hard_link(src, dst), + } + } +} + +impl sys_traits::BaseFsRead for CliSys { + fn base_fs_read(&self, p: &Path) -> std::io::Result> { + match self { + Self::Real(sys) => sys.base_fs_read(p), + Self::DenoCompile(sys) => sys.base_fs_read(p), + } + } +} + +impl sys_traits::BaseFsReadDir for CliSys { + type ReadDirEntry = BoxedFsDirEntry; + + fn base_fs_read_dir( + &self, + p: &Path, + ) -> std::io::Result< + Box> + '_>, + > { + match self { + Self::Real(sys) => sys.fs_read_dir_boxed(p), + Self::DenoCompile(sys) => sys.fs_read_dir_boxed(p), + } + } +} + +impl sys_traits::BaseFsCanonicalize for CliSys { + fn base_fs_canonicalize(&self, p: &Path) -> std::io::Result { + match self { + Self::Real(sys) => sys.base_fs_canonicalize(p), + Self::DenoCompile(sys) => sys.base_fs_canonicalize(p), + } + } +} + +impl sys_traits::BaseFsMetadata for CliSys { + type Metadata = BoxedFsMetadataValue; + + fn base_fs_metadata(&self, path: &Path) -> std::io::Result { + match self { + Self::Real(sys) => sys.fs_metadata_boxed(path), + Self::DenoCompile(sys) => sys.fs_metadata_boxed(path), + } + } + + fn base_fs_symlink_metadata( + &self, + path: &Path, + ) -> std::io::Result { + match self { + Self::Real(sys) => sys.fs_symlink_metadata_boxed(path), + Self::DenoCompile(sys) => sys.fs_symlink_metadata_boxed(path), + } + } +} + +impl sys_traits::BaseFsCreateDir for CliSys { + fn base_fs_create_dir( + &self, + p: &Path, + options: &CreateDirOptions, + ) -> std::io::Result<()> { + match self { + Self::Real(sys) => sys.base_fs_create_dir(p, options), + Self::DenoCompile(sys) => sys.base_fs_create_dir(p, options), + } + } +} + +impl sys_traits::BaseFsOpen for CliSys { + type File = BoxedFsFile; + + fn base_fs_open( + &self, + path: &Path, + options: &sys_traits::OpenOptions, + ) -> std::io::Result { + match self { + Self::Real(sys) => sys.fs_open_boxed(path, options), + Self::DenoCompile(sys) => sys.fs_open_boxed(path, options), + } + } +} + +impl sys_traits::BaseFsRemoveFile for CliSys { + fn base_fs_remove_file(&self, p: &Path) -> std::io::Result<()> { + match self { + Self::Real(sys) => sys.base_fs_remove_file(p), + Self::DenoCompile(sys) => sys.base_fs_remove_file(p), + } + } +} + +impl sys_traits::BaseFsRename for CliSys { + fn base_fs_rename(&self, old: &Path, new: &Path) -> std::io::Result<()> { + match self { + Self::Real(sys) => sys.base_fs_rename(old, new), + Self::DenoCompile(sys) => sys.base_fs_rename(old, new), + } + } +} + +impl sys_traits::SystemRandom for CliSys { + fn sys_random(&self, buf: &mut [u8]) -> std::io::Result<()> { + match self { + Self::Real(sys) => sys.sys_random(buf), + Self::DenoCompile(sys) => sys.sys_random(buf), + } + } +} + +impl sys_traits::SystemTimeNow for CliSys { + fn sys_time_now(&self) -> std::time::SystemTime { + match self { + Self::Real(sys) => sys.sys_time_now(), + Self::DenoCompile(sys) => sys.sys_time_now(), + } + } +} + +impl sys_traits::ThreadSleep for CliSys { + fn thread_sleep(&self, dur: std::time::Duration) { + match self { + Self::Real(sys) => sys.thread_sleep(dur), + Self::DenoCompile(sys) => sys.thread_sleep(dur), + } + } +} + +impl sys_traits::EnvCurrentDir for CliSys { + fn env_current_dir(&self) -> std::io::Result { + match self { + Self::Real(sys) => sys.env_current_dir(), + Self::DenoCompile(sys) => sys.env_current_dir(), + } + } +} + +impl sys_traits::BaseEnvVar for CliSys { + fn base_env_var_os( + &self, + key: &std::ffi::OsStr, + ) -> Option { + match self { + Self::Real(sys) => sys.base_env_var_os(key), + Self::DenoCompile(sys) => sys.base_env_var_os(key), + } + } +} + +impl sys_traits::EnvHomeDir for CliSys { + fn env_home_dir(&self) -> Option { + #[allow(clippy::disallowed_types)] // ok because sys impl + sys_traits::impls::RealSys.env_home_dir() + } +} diff --git a/cli/task_runner.rs b/cli/task_runner.rs index 43840e868de83e..8510a650e737ef 100644 --- a/cli/task_runner.rs +++ b/cli/task_runner.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::collections::HashMap; use std::path::Path; @@ -10,10 +10,10 @@ use deno_core::anyhow::Context; use deno_core::error::AnyError; use deno_core::futures; use deno_core::futures::future::LocalBoxFuture; -use deno_runtime::deno_node::NodeResolver; use deno_semver::package::PackageNv; use deno_task_shell::ExecutableCommand; use deno_task_shell::ExecuteResult; +use deno_task_shell::KillSignal; use deno_task_shell::ShellCommand; use deno_task_shell::ShellCommandContext; use deno_task_shell::ShellPipeReader; @@ -22,7 +22,9 @@ use lazy_regex::Lazy; use regex::Regex; use tokio::task::JoinHandle; use tokio::task::LocalSet; +use tokio_util::sync::CancellationToken; +use crate::node::CliNodeResolver; use crate::npm::CliNpmResolver; use crate::npm::InnerCliNpmResolverRef; use crate::npm::ManagedCliNpmResolver; @@ -45,9 +47,11 @@ impl TaskStdio { pub fn stdout() -> Self { Self(None, ShellPipeWriter::stdout()) } + pub fn stderr() -> Self { Self(None, ShellPipeWriter::stderr()) } + pub fn piped() -> Self { let (r, w) = deno_task_shell::pipe(); Self(Some(r), w) @@ -62,8 +66,8 @@ pub struct TaskIo { impl Default for TaskIo { fn default() -> Self { Self { - stderr: TaskStdio::stderr(), stdout: TaskStdio::stdout(), + stderr: TaskStdio::stderr(), } } } @@ -78,6 +82,7 @@ pub struct RunTaskOptions<'a> { pub custom_commands: HashMap>, pub root_node_modules_dir: Option<&'a Path>, pub stdio: Option, + pub kill_signal: KillSignal, } pub type TaskCustomCommands = HashMap>; @@ -96,8 +101,12 @@ pub async fn run_task( .with_context(|| format!("Error parsing script '{}'.", opts.task_name))?; let env_vars = prepare_env_vars(opts.env_vars, opts.init_cwd, opts.root_node_modules_dir); - let state = - deno_task_shell::ShellState::new(env_vars, opts.cwd, opts.custom_commands); + let state = deno_task_shell::ShellState::new( + env_vars, + opts.cwd, + opts.custom_commands, + opts.kill_signal, + ); let stdio = opts.stdio.unwrap_or_default(); let ( TaskStdio(stdout_read, stdout_write), @@ -406,7 +415,7 @@ impl ShellCommand for NodeModulesFileRunCommand { pub fn resolve_custom_commands( npm_resolver: &dyn CliNpmResolver, - node_resolver: &NodeResolver, + node_resolver: &CliNodeResolver, ) -> Result>, AnyError> { let mut commands = match npm_resolver.as_inner() { InnerCliNpmResolverRef::Byonm(npm_resolver) => { @@ -483,25 +492,37 @@ fn resolve_execution_path_from_npx_shim( static SCRIPT_PATH_RE: Lazy = lazy_regex::lazy_regex!(r#""\$basedir\/([^"]+)" "\$@""#); - if text.starts_with("#!/usr/bin/env node") { - // launch this file itself because it's a JS file - Some(file_path) - } else { - // Search for... - // > "$basedir/../next/dist/bin/next" "$@" - // ...which is what it will look like on Windows - SCRIPT_PATH_RE - .captures(text) - .and_then(|c| c.get(1)) - .map(|relative_path| { - file_path.parent().unwrap().join(relative_path.as_str()) - }) + let maybe_first_line = { + let index = text.find("\n")?; + Some(&text[0..index]) + }; + + if let Some(first_line) = maybe_first_line { + // NOTE(bartlomieju): this is not perfect, but handle two most common scenarios + // where Node is run without any args. If there are args then we use `NodeCommand` + // struct. + if first_line == "#!/usr/bin/env node" + || first_line == "#!/usr/bin/env -S node" + { + // launch this file itself because it's a JS file + return Some(file_path); + } } + + // Search for... + // > "$basedir/../next/dist/bin/next" "$@" + // ...which is what it will look like on Windows + SCRIPT_PATH_RE + .captures(text) + .and_then(|c| c.get(1)) + .map(|relative_path| { + file_path.parent().unwrap().join(relative_path.as_str()) + }) } fn resolve_managed_npm_commands( npm_resolver: &ManagedCliNpmResolver, - node_resolver: &NodeResolver, + node_resolver: &CliNodeResolver, ) -> Result>, AnyError> { let mut result = HashMap::new(); let snapshot = npm_resolver.snapshot(); @@ -525,6 +546,86 @@ fn resolve_managed_npm_commands( Ok(result) } +/// Runs a deno task future forwarding any signals received +/// to the process. +/// +/// Signal listeners and ctrl+c listening will be setup. +pub async fn run_future_forwarding_signals( + kill_signal: KillSignal, + future: impl std::future::Future, +) -> TOutput { + fn spawn_future_with_cancellation( + future: impl std::future::Future + 'static, + token: CancellationToken, + ) { + deno_core::unsync::spawn(async move { + tokio::select! { + _ = future => {} + _ = token.cancelled() => {} + } + }); + } + + let token = CancellationToken::new(); + let _token_drop_guard = token.clone().drop_guard(); + let _drop_guard = kill_signal.clone().drop_guard(); + + spawn_future_with_cancellation( + listen_ctrl_c(kill_signal.clone()), + token.clone(), + ); + #[cfg(unix)] + spawn_future_with_cancellation( + listen_and_forward_all_signals(kill_signal), + token, + ); + + future.await +} + +async fn listen_ctrl_c(kill_signal: KillSignal) { + while let Ok(()) = tokio::signal::ctrl_c().await { + // On windows, ctrl+c is sent to the process group, so the signal would + // have already been sent to the child process. We still want to listen + // for ctrl+c here to keep the process alive when receiving it, but no + // need to forward the signal because it's already been sent. + if !cfg!(windows) { + kill_signal.send(deno_task_shell::SignalKind::SIGINT) + } + } +} + +#[cfg(unix)] +async fn listen_and_forward_all_signals(kill_signal: KillSignal) { + use deno_core::futures::FutureExt; + use deno_runtime::signal::SIGNAL_NUMS; + + // listen and forward every signal we support + let mut futures = Vec::with_capacity(SIGNAL_NUMS.len()); + for signo in SIGNAL_NUMS.iter().copied() { + if signo == libc::SIGKILL || signo == libc::SIGSTOP { + continue; // skip, can't listen to these + } + + let kill_signal = kill_signal.clone(); + futures.push( + async move { + let Ok(mut stream) = tokio::signal::unix::signal( + tokio::signal::unix::SignalKind::from_raw(signo), + ) else { + return; + }; + let signal_kind: deno_task_shell::SignalKind = signo.into(); + while let Some(()) = stream.recv().await { + kill_signal.send(signal_kind); + } + } + .boxed_local(), + ) + } + futures::future::join_all(futures).await; +} + #[cfg(test)] mod test { @@ -564,6 +665,16 @@ mod test { let unix_shim = r#"#!/usr/bin/env node "use strict"; console.log('Hi!'); +"#; + let path = PathBuf::from("/node_modules/.bin/example"); + assert_eq!( + resolve_execution_path_from_npx_shim(path.clone(), unix_shim).unwrap(), + path + ); + // example shim on unix + let unix_shim = r#"#!/usr/bin/env -S node +"use strict"; +console.log('Hi!'); "#; let path = PathBuf::from("/node_modules/.bin/example"); assert_eq!( diff --git a/cli/tools/bench/mod.rs b/cli/tools/bench/mod.rs index 1d49fa061d2012..42895089ef689a 100644 --- a/cli/tools/bench/mod.rs +++ b/cli/tools/bench/mod.rs @@ -1,19 +1,9 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::args::BenchFlags; -use crate::args::Flags; -use crate::colors; -use crate::display::write_json_to_stdout; -use crate::factory::CliFactory; -use crate::graph_util::has_graph_root_local_dependent_changed; -use crate::ops; -use crate::tools::test::format_test_error; -use crate::tools::test::TestFilter; -use crate::util::file_watcher; -use crate::util::fs::collect_specifiers; -use crate::util::path::is_script_ext; -use crate::util::path::matches_pattern_or_exact_path; -use crate::worker::CliMainWorkerFactory; +use std::collections::HashSet; +use std::path::Path; +use std::sync::Arc; +use std::time::Duration; use deno_config::glob::WalkEntry; use deno_core::error::generic_error; @@ -38,13 +28,25 @@ use indexmap::IndexSet; use log::Level; use serde::Deserialize; use serde::Serialize; -use std::collections::HashSet; -use std::path::Path; -use std::sync::Arc; -use std::time::Duration; use tokio::sync::mpsc::unbounded_channel; use tokio::sync::mpsc::UnboundedSender; +use crate::args::BenchFlags; +use crate::args::Flags; +use crate::colors; +use crate::display::write_json_to_stdout; +use crate::factory::CliFactory; +use crate::graph_util::has_graph_root_local_dependent_changed; +use crate::ops; +use crate::sys::CliSys; +use crate::tools::test::format_test_error; +use crate::tools::test::TestFilter; +use crate::util::file_watcher; +use crate::util::fs::collect_specifiers; +use crate::util::path::is_script_ext; +use crate::util::path::matches_pattern_or_exact_path; +use crate::worker::CliMainWorkerFactory; + mod mitata; mod reporters; @@ -265,7 +267,7 @@ async fn bench_specifier_inner( async fn bench_specifiers( worker_factory: Arc, permissions: &Permissions, - permissions_desc_parser: &Arc, + permissions_desc_parser: &Arc>, specifiers: Vec, options: BenchSpecifierOptions, ) -> Result<(), AnyError> { @@ -538,7 +540,11 @@ pub async fn run_benchmarks_with_watch( )?; let graph = module_graph_creator - .create_graph(graph_kind, collected_bench_modules.clone()) + .create_graph( + graph_kind, + collected_bench_modules.clone(), + crate::graph_util::NpmCachingStrategy::Eager, + ) .await?; module_graph_creator.graph_valid(&graph)?; let bench_modules = &graph.roots; diff --git a/cli/tools/bench/reporters.rs b/cli/tools/bench/reporters.rs index 9aabd760b37310..68a0c56bce04e4 100644 --- a/cli/tools/bench/reporters.rs +++ b/cli/tools/bench/reporters.rs @@ -1,12 +1,11 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use serde::Serialize; +use super::*; use crate::tools::test::TestFailureFormatOptions; use crate::version; -use super::*; - pub trait BenchReporter { fn report_group_summary(&mut self); fn report_plan(&mut self, plan: &BenchPlan); diff --git a/cli/tools/check.rs b/cli/tools/check.rs index d880278884457c..1ee3f1782b4d45 100644 --- a/cli/tools/check.rs +++ b/cli/tools/check.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::collections::HashSet; use std::collections::VecDeque; @@ -8,8 +8,9 @@ use deno_ast::MediaType; use deno_ast::ModuleSpecifier; use deno_core::error::AnyError; use deno_graph::Module; +use deno_graph::ModuleError; use deno_graph::ModuleGraph; -use deno_runtime::deno_node::NodeResolver; +use deno_graph::ModuleLoadError; use deno_terminal::colors; use once_cell::sync::Lazy; use regex::Regex; @@ -27,9 +28,12 @@ use crate::cache::Caches; use crate::cache::FastInsecureHasher; use crate::cache::TypeCheckCache; use crate::factory::CliFactory; +use crate::graph_util::maybe_additional_sloppy_imports_message; use crate::graph_util::BuildFastCheckGraphOptions; use crate::graph_util::ModuleGraphBuilder; +use crate::node::CliNodeResolver; use crate::npm::CliNpmResolver; +use crate::sys::CliSys; use crate::tsc; use crate::tsc::Diagnostics; use crate::tsc::TypeCheckingCjsTracker; @@ -64,7 +68,7 @@ pub async fn check( let file = file_fetcher.fetch(&s, root_permissions).await?; let snippet_files = extract::extract_snippet_files(file)?; for snippet_file in snippet_files { - specifiers_for_typecheck.push(snippet_file.specifier.clone()); + specifiers_for_typecheck.push(snippet_file.url.clone()); file_fetcher.insert_memory_files(snippet_file); } } @@ -103,8 +107,9 @@ pub struct TypeChecker { cjs_tracker: Arc, cli_options: Arc, module_graph_builder: Arc, - node_resolver: Arc, + node_resolver: Arc, npm_resolver: Arc, + sys: CliSys, } impl TypeChecker { @@ -113,8 +118,9 @@ impl TypeChecker { cjs_tracker: Arc, cli_options: Arc, module_graph_builder: Arc, - node_resolver: Arc, + node_resolver: Arc, npm_resolver: Arc, + sys: CliSys, ) -> Self { Self { caches, @@ -123,6 +129,7 @@ impl TypeChecker { module_graph_builder, node_resolver, npm_resolver, + sys, } } @@ -177,26 +184,47 @@ impl TypeChecker { let type_check_mode = options.type_check_mode; let ts_config = ts_config_result.ts_config; - let maybe_check_hash = match self.npm_resolver.check_state_hash() { - Some(npm_check_hash) => { - match get_check_hash( - &graph, - npm_check_hash, - type_check_mode, - &ts_config, - ) { - CheckHashResult::NoFiles => { - return Ok((graph.into(), Default::default())) - } - CheckHashResult::Hash(hash) => Some(hash), - } + let cache = TypeCheckCache::new(self.caches.type_checking_cache_db()); + let check_js = ts_config.get_check_js(); + + // add fast check to the graph before getting the roots + if options.build_fast_check_graph { + self.module_graph_builder.build_fast_check_graph( + &mut graph, + BuildFastCheckGraphOptions { + workspace_fast_check: deno_graph::WorkspaceFastCheckOption::Disabled, + }, + )?; + } + + let filter_remote_diagnostics = |d: &tsc::Diagnostic| { + if self.is_remote_diagnostic(d) { + type_check_mode == TypeCheckMode::All && d.include_when_remote() + } else { + true } - None => None, // we can't determine a check hash }; + let TscRoots { + roots: root_names, + missing_diagnostics, + maybe_check_hash, + } = get_tsc_roots( + &self.sys, + &graph, + check_js, + self.npm_resolver.check_state_hash(), + type_check_mode, + &ts_config, + ); - // do not type check if we know this is type checked - let cache = TypeCheckCache::new(self.caches.type_checking_cache_db()); + let missing_diagnostics = + missing_diagnostics.filter(filter_remote_diagnostics); + + if root_names.is_empty() && missing_diagnostics.is_empty() { + return Ok((graph.into(), Default::default())); + } if !options.reload { + // do not type check if we know this is type checked if let Some(check_hash) = maybe_check_hash { if cache.has_check_hash(check_hash) { log::debug!("Already type checked."); @@ -214,7 +242,6 @@ impl TypeChecker { ); } - let check_js = ts_config.get_check_js(); // while there might be multiple roots, we can't "merge" the build info, so we // try to retrieve the build info for first root, which is the most common use // case. @@ -226,27 +253,15 @@ impl TypeChecker { // to make tsc build info work, we need to consistently hash modules, so that // tsc can better determine if an emit is still valid or not, so we provide // that data here. - let hash_data = FastInsecureHasher::new_deno_versioned() + let tsconfig_hash_data = FastInsecureHasher::new_deno_versioned() .write(&ts_config.as_bytes()) .finish(); - - // add fast check to the graph before getting the roots - if options.build_fast_check_graph { - self.module_graph_builder.build_fast_check_graph( - &mut graph, - BuildFastCheckGraphOptions { - workspace_fast_check: deno_graph::WorkspaceFastCheckOption::Disabled, - }, - )?; - } - - let root_names = get_tsc_roots(&graph, check_js); let graph = Arc::new(graph); let response = tsc::exec(tsc::Request { config: ts_config, debug: self.cli_options.log_level() == Some(log::Level::Debug), graph: graph.clone(), - hash_data, + hash_data: tsconfig_hash_data, maybe_npm: Some(tsc::RequestNpmState { cjs_tracker: self.cjs_tracker.clone(), node_resolver: self.node_resolver.clone(), @@ -257,13 +272,11 @@ impl TypeChecker { check_mode: type_check_mode, })?; - let mut diagnostics = response.diagnostics.filter(|d| { - if self.is_remote_diagnostic(d) { - type_check_mode == TypeCheckMode::All && d.include_when_remote() - } else { - true - } - }); + let response_diagnostics = + response.diagnostics.filter(filter_remote_diagnostics); + + let mut diagnostics = missing_diagnostics; + diagnostics.extend(response_diagnostics); diagnostics.apply_fast_check_source_maps(&graph); @@ -297,157 +310,128 @@ impl TypeChecker { } } -enum CheckHashResult { - Hash(CacheDBHash), - NoFiles, +struct TscRoots { + roots: Vec<(ModuleSpecifier, MediaType)>, + missing_diagnostics: tsc::Diagnostics, + maybe_check_hash: Option, } -/// Gets a hash of the inputs for type checking. This can then -/// be used to tell -fn get_check_hash( +/// Transform the graph into root specifiers that we can feed `tsc`. We have to +/// provide the media type for root modules because `tsc` does not "resolve" the +/// media type like other modules, as well as a root specifier needs any +/// redirects resolved. We need to include all the emittable files in +/// the roots, so they get type checked and optionally emitted, +/// otherwise they would be ignored if only imported into JavaScript. +fn get_tsc_roots( + sys: &CliSys, graph: &ModuleGraph, - package_reqs_hash: u64, + check_js: bool, + npm_cache_state_hash: Option, type_check_mode: TypeCheckMode, ts_config: &TsConfig, -) -> CheckHashResult { - let mut hasher = FastInsecureHasher::new_deno_versioned(); - hasher.write_u8(match type_check_mode { - TypeCheckMode::All => 0, - TypeCheckMode::Local => 1, - TypeCheckMode::None => 2, - }); - hasher.write(&ts_config.as_bytes()); - - let check_js = ts_config.get_check_js(); - let mut has_file = false; - let mut has_file_to_type_check = false; - // this iterator of modules is already deterministic, so no need to sort it - for module in graph.modules() { +) -> TscRoots { + fn maybe_get_check_entry( + module: &deno_graph::Module, + check_js: bool, + hasher: Option<&mut FastInsecureHasher>, + ) -> Option<(ModuleSpecifier, MediaType)> { match module { Module::Js(module) => { - let ts_check = has_ts_check(module.media_type, &module.source); - if ts_check { - has_file_to_type_check = true; - } - - match module.media_type { + let result = match module.media_type { MediaType::TypeScript - | MediaType::Dts - | MediaType::Dmts - | MediaType::Dcts + | MediaType::Tsx | MediaType::Mts | MediaType::Cts - | MediaType::Tsx => { - has_file = true; - has_file_to_type_check = true; + | MediaType::Dts + | MediaType::Dmts + | MediaType::Dcts => { + Some((module.specifier.clone(), module.media_type)) } MediaType::JavaScript | MediaType::Mjs | MediaType::Cjs | MediaType::Jsx => { - has_file = true; - if !check_js && !ts_check { - continue; + if check_js || has_ts_check(module.media_type, &module.source) { + Some((module.specifier.clone(), module.media_type)) + } else { + None } } MediaType::Json + | MediaType::Wasm | MediaType::Css | MediaType::SourceMap - | MediaType::Wasm - | MediaType::Unknown => continue, + | MediaType::Unknown => None, + }; + if result.is_some() { + if let Some(hasher) = hasher { + hasher.write_str(module.specifier.as_str()); + hasher.write_str( + // the fast check module will only be set when publishing + module + .fast_check_module() + .map(|s| s.source.as_ref()) + .unwrap_or(&module.source), + ); + } } - - hasher.write_str(module.specifier.as_str()); - hasher.write_str( - // the fast check module will only be set when publishing - module - .fast_check_module() - .map(|s| s.source.as_ref()) - .unwrap_or(&module.source), - ); + result } Module::Node(_) => { // the @types/node package will be in the resolved - // snapshot below so don't bother including it here + // snapshot so don't bother including it in the hash + None } Module::Npm(_) => { // don't bother adding this specifier to the hash // because what matters is the resolved npm snapshot, // which is hashed below + None } Module::Json(module) => { - has_file_to_type_check = true; - hasher.write_str(module.specifier.as_str()); - hasher.write_str(&module.source); + if let Some(hasher) = hasher { + hasher.write_str(module.specifier.as_str()); + hasher.write_str(&module.source); + } + None + } + Module::Wasm(module) => { + if let Some(hasher) = hasher { + hasher.write_str(module.specifier.as_str()); + hasher.write_str(&module.source_dts); + } + Some((module.specifier.clone(), MediaType::Dmts)) } Module::External(module) => { - hasher.write_str(module.specifier.as_str()); + if let Some(hasher) = hasher { + hasher.write_str(module.specifier.as_str()); + } + None } } } - hasher.write_hashable(package_reqs_hash); - - if !has_file || !check_js && !has_file_to_type_check { - // no files to type check - CheckHashResult::NoFiles - } else { - CheckHashResult::Hash(CacheDBHash::new(hasher.finish())) - } -} - -/// Transform the graph into root specifiers that we can feed `tsc`. We have to -/// provide the media type for root modules because `tsc` does not "resolve" the -/// media type like other modules, as well as a root specifier needs any -/// redirects resolved. We need to include all the emittable files in -/// the roots, so they get type checked and optionally emitted, -/// otherwise they would be ignored if only imported into JavaScript. -fn get_tsc_roots( - graph: &ModuleGraph, - check_js: bool, -) -> Vec<(ModuleSpecifier, MediaType)> { - fn maybe_get_check_entry( - module: &deno_graph::Module, - check_js: bool, - ) -> Option<(ModuleSpecifier, MediaType)> { - match module { - Module::Js(module) => match module.media_type { - MediaType::TypeScript - | MediaType::Tsx - | MediaType::Mts - | MediaType::Cts - | MediaType::Dts - | MediaType::Dmts - | MediaType::Dcts => { - Some((module.specifier.clone(), module.media_type)) - } - MediaType::JavaScript - | MediaType::Mjs - | MediaType::Cjs - | MediaType::Jsx => { - if check_js || has_ts_check(module.media_type, &module.source) { - Some((module.specifier.clone(), module.media_type)) - } else { - None - } - } - MediaType::Json - | MediaType::Wasm - | MediaType::Css - | MediaType::SourceMap - | MediaType::Unknown => None, - }, - Module::External(_) - | Module::Node(_) - | Module::Npm(_) - | Module::Json(_) => None, - } - } + let mut result = TscRoots { + roots: Vec::with_capacity(graph.specifiers_count()), + missing_diagnostics: Default::default(), + maybe_check_hash: None, + }; + let mut maybe_hasher = npm_cache_state_hash.map(|npm_cache_state_hash| { + let mut hasher = FastInsecureHasher::new_deno_versioned(); + hasher.write_hashable(npm_cache_state_hash); + hasher.write_u8(match type_check_mode { + TypeCheckMode::All => 0, + TypeCheckMode::Local => 1, + TypeCheckMode::None => 2, + }); + hasher.write_hashable(graph.has_node_specifier); + hasher.write(&ts_config.as_bytes()); + hasher + }); - let mut result = Vec::with_capacity(graph.specifiers_count()); if graph.has_node_specifier { // inject a specifier that will resolve node types - result.push(( + result.roots.push(( ModuleSpecifier::parse("asset:///node_types.d.ts").unwrap(), MediaType::Dts, )); @@ -458,65 +442,134 @@ fn get_tsc_roots( let mut pending = VecDeque::new(); // put in the global types first so that they're resolved before anything else - for import in graph.imports.values() { - for dep in import.dependencies.values() { - let specifier = dep.get_type().or_else(|| dep.get_code()); - if let Some(specifier) = &specifier { - let specifier = graph.resolve(specifier); - if seen.insert(specifier.clone()) { - pending.push_back(specifier); - } - } + let get_import_specifiers = || { + graph + .imports + .values() + .flat_map(|i| i.dependencies.values()) + .filter_map(|dep| dep.get_type().or_else(|| dep.get_code())) + }; + for specifier in get_import_specifiers() { + let specifier = graph.resolve(specifier); + if seen.insert(specifier) { + pending.push_back((specifier, false)); } } // then the roots for root in &graph.roots { let specifier = graph.resolve(root); - if seen.insert(specifier.clone()) { - pending.push_back(specifier); + if seen.insert(specifier) { + pending.push_back((specifier, false)); } } // now walk the graph that only includes the fast check dependencies - while let Some(specifier) = pending.pop_front() { - let Some(module) = graph.get(specifier) else { - continue; + while let Some((specifier, is_dynamic)) = pending.pop_front() { + let module = match graph.try_get(specifier) { + Ok(Some(module)) => module, + Ok(None) => continue, + Err(ModuleError::Missing(specifier, maybe_range)) => { + if !is_dynamic { + result + .missing_diagnostics + .push(tsc::Diagnostic::from_missing_error( + specifier, + maybe_range.as_ref(), + maybe_additional_sloppy_imports_message(sys, specifier), + )); + } + continue; + } + Err(ModuleError::LoadingErr( + specifier, + maybe_range, + ModuleLoadError::Loader(_), + )) => { + // these will be errors like attempting to load a directory + if !is_dynamic { + result + .missing_diagnostics + .push(tsc::Diagnostic::from_missing_error( + specifier, + maybe_range.as_ref(), + maybe_additional_sloppy_imports_message(sys, specifier), + )); + } + continue; + } + Err(_) => continue, }; - if let Some(entry) = maybe_get_check_entry(module, check_js) { - result.push(entry); + if is_dynamic && !seen.insert(specifier) { + continue; + } + if let Some(entry) = + maybe_get_check_entry(module, check_js, maybe_hasher.as_mut()) + { + result.roots.push(entry); + } + + let mut maybe_module_dependencies = None; + let mut maybe_types_dependency = None; + if let Module::Js(module) = module { + maybe_module_dependencies = Some(module.dependencies_prefer_fast_check()); + maybe_types_dependency = module + .maybe_types_dependency + .as_ref() + .and_then(|d| d.dependency.ok()); + } else if let Module::Wasm(module) = module { + maybe_module_dependencies = Some(&module.dependencies); + } + + fn handle_specifier<'a>( + graph: &'a ModuleGraph, + seen: &mut HashSet<&'a ModuleSpecifier>, + pending: &mut VecDeque<(&'a ModuleSpecifier, bool)>, + specifier: &'a ModuleSpecifier, + is_dynamic: bool, + ) { + let specifier = graph.resolve(specifier); + if is_dynamic { + if !seen.contains(specifier) { + pending.push_back((specifier, true)); + } + } else if seen.insert(specifier) { + pending.push_back((specifier, false)); + } } - if let Some(module) = module.js() { - let deps = module.dependencies_prefer_fast_check(); + + if let Some(deps) = maybe_module_dependencies { for dep in deps.values() { // walk both the code and type dependencies if let Some(specifier) = dep.get_code() { - let specifier = graph.resolve(specifier); - if seen.insert(specifier.clone()) { - pending.push_back(specifier); - } + handle_specifier( + graph, + &mut seen, + &mut pending, + specifier, + dep.is_dynamic, + ); } if let Some(specifier) = dep.get_type() { - let specifier = graph.resolve(specifier); - if seen.insert(specifier.clone()) { - pending.push_back(specifier); - } + handle_specifier( + graph, + &mut seen, + &mut pending, + specifier, + dep.is_dynamic, + ); } } + } - if let Some(dep) = module - .maybe_types_dependency - .as_ref() - .and_then(|d| d.dependency.ok()) - { - let specifier = graph.resolve(&dep.specifier); - if seen.insert(specifier.clone()) { - pending.push_back(specifier); - } - } + if let Some(dep) = maybe_types_dependency { + handle_specifier(graph, &mut seen, &mut pending, &dep.specifier, false); } } + result.maybe_check_hash = + maybe_hasher.map(|hasher| CacheDBHash::new(hasher.finish())); + result } diff --git a/cli/tools/clean.rs b/cli/tools/clean.rs index 2a77434f888e7a..e6f8c1e52b1ab7 100644 --- a/cli/tools/clean.rs +++ b/cli/tools/clean.rs @@ -1,12 +1,14 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::path::Path; use deno_core::anyhow::Context; use deno_core::error::AnyError; -use std::path::Path; use crate::cache::DenoDir; use crate::colors; use crate::display; +use crate::sys::CliSys; use crate::util::progress_bar::ProgressBar; use crate::util::progress_bar::ProgressBarStyle; use crate::util::progress_bar::ProgressMessagePrompt; @@ -28,7 +30,7 @@ impl CleanState { } pub fn clean() -> Result<(), AnyError> { - let deno_dir = DenoDir::new(None)?; + let deno_dir = DenoDir::new(CliSys::default(), None)?; if deno_dir.root.exists() { let no_of_files = walkdir::WalkDir::new(&deno_dir.root).into_iter().count(); let progress_bar = ProgressBar::new(ProgressBarStyle::ProgressBars); diff --git a/cli/tools/compile.rs b/cli/tools/compile.rs index b3e9993379e0e7..b148c9a0b18344 100644 --- a/cli/tools/compile.rs +++ b/cli/tools/compile.rs @@ -1,12 +1,12 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::args::check_warn_tsconfig; -use crate::args::CompileFlags; -use crate::args::Flags; -use crate::factory::CliFactory; -use crate::http_util::HttpClientProvider; -use crate::standalone::binary::StandaloneRelativeFileBaseUrl; -use crate::standalone::is_standalone_binary; +use std::collections::HashSet; +use std::collections::VecDeque; +use std::path::Path; +use std::path::PathBuf; +use std::sync::Arc; + +use deno_ast::MediaType; use deno_ast::ModuleSpecifier; use deno_core::anyhow::bail; use deno_core::anyhow::Context; @@ -14,13 +14,19 @@ use deno_core::error::generic_error; use deno_core::error::AnyError; use deno_core::resolve_url_or_path; use deno_graph::GraphKind; +use deno_path_util::url_from_file_path; +use deno_path_util::url_to_file_path; use deno_terminal::colors; use rand::Rng; -use std::path::Path; -use std::path::PathBuf; -use std::sync::Arc; use super::installer::infer_name_from_url; +use crate::args::check_warn_tsconfig; +use crate::args::CompileFlags; +use crate::args::Flags; +use crate::factory::CliFactory; +use crate::http_util::HttpClientProvider; +use crate::standalone::binary::is_standalone_binary; +use crate::standalone::binary::WriteBinOptions; pub async fn compile( flags: Arc, @@ -31,15 +37,12 @@ pub async fn compile( let module_graph_creator = factory.module_graph_creator().await?; let binary_writer = factory.create_compile_binary_writer().await?; let http_client = factory.http_client_provider(); - let module_specifier = cli_options.resolve_main_module()?; - let module_roots = { - let mut vec = Vec::with_capacity(compile_flags.include.len() + 1); - vec.push(module_specifier.clone()); - for side_module in &compile_flags.include { - vec.push(resolve_url_or_path(side_module, cli_options.initial_cwd())?); - } - vec - }; + let entrypoint = cli_options.resolve_main_module()?; + let (module_roots, include_files) = get_module_roots_and_include_files( + entrypoint, + &compile_flags, + cli_options.initial_cwd(), + )?; // this is not supported, so show a warning about it, but don't error in order // to allow someone to still run `deno compile` when this is in a deno.json @@ -71,7 +74,11 @@ pub async fn compile( // create a module graph with types information in it. We don't want to // store that in the binary so create a code only module graph from scratch. module_graph_creator - .create_graph(GraphKind::CodeOnly, module_roots) + .create_graph( + GraphKind::CodeOnly, + module_roots, + crate::graph_util::NpmCachingStrategy::Eager, + ) .await? } else { graph @@ -80,20 +87,10 @@ pub async fn compile( let ts_config_for_emit = cli_options .resolve_ts_config_for_emit(deno_config::deno_json::TsConfigType::Emit)?; check_warn_tsconfig(&ts_config_for_emit); - let root_dir_url = resolve_root_dir_from_specifiers( - cli_options.workspace().root_dir(), - graph.specifiers().map(|(s, _)| s).chain( - cli_options - .node_modules_dir_path() - .and_then(|p| ModuleSpecifier::from_directory_path(p).ok()) - .iter(), - ), - ); - log::debug!("Binary root dir: {}", root_dir_url); log::info!( "{} {} to {}", colors::green("Compile"), - module_specifier.to_string(), + entrypoint, output_path.display(), ); validate_output_path(&output_path)?; @@ -114,14 +111,17 @@ pub async fn compile( })?; let write_result = binary_writer - .write_bin( - file, - &graph, - StandaloneRelativeFileBaseUrl::from(&root_dir_url), - module_specifier, - &compile_flags, - cli_options, - ) + .write_bin(WriteBinOptions { + writer: file, + display_output_filename: &output_path + .file_name() + .unwrap() + .to_string_lossy(), + graph: &graph, + entrypoint, + include_files: &include_files, + compile_flags: &compile_flags, + }) .await .with_context(|| { format!( @@ -212,6 +212,91 @@ fn validate_output_path(output_path: &Path) -> Result<(), AnyError> { Ok(()) } +fn get_module_roots_and_include_files( + entrypoint: &ModuleSpecifier, + compile_flags: &CompileFlags, + initial_cwd: &Path, +) -> Result<(Vec, Vec), AnyError> { + fn is_module_graph_module(url: &ModuleSpecifier) -> bool { + if url.scheme() != "file" { + return true; + } + let media_type = MediaType::from_specifier(url); + match media_type { + MediaType::JavaScript + | MediaType::Jsx + | MediaType::Mjs + | MediaType::Cjs + | MediaType::TypeScript + | MediaType::Mts + | MediaType::Cts + | MediaType::Dts + | MediaType::Dmts + | MediaType::Dcts + | MediaType::Tsx + | MediaType::Json + | MediaType::Wasm => true, + MediaType::Css | MediaType::SourceMap | MediaType::Unknown => false, + } + } + + fn analyze_path( + url: &ModuleSpecifier, + module_roots: &mut Vec, + include_files: &mut Vec, + searched_paths: &mut HashSet, + ) -> Result<(), AnyError> { + let Ok(path) = url_to_file_path(url) else { + return Ok(()); + }; + let mut pending = VecDeque::from([path]); + while let Some(path) = pending.pop_front() { + if !searched_paths.insert(path.clone()) { + continue; + } + if !path.is_dir() { + let url = url_from_file_path(&path)?; + include_files.push(url.clone()); + if is_module_graph_module(&url) { + module_roots.push(url); + } + continue; + } + for entry in std::fs::read_dir(&path).with_context(|| { + format!("Failed reading directory '{}'", path.display()) + })? { + let entry = entry.with_context(|| { + format!("Failed reading entry in directory '{}'", path.display()) + })?; + pending.push_back(entry.path()); + } + } + Ok(()) + } + + let mut searched_paths = HashSet::new(); + let mut module_roots = Vec::new(); + let mut include_files = Vec::new(); + module_roots.push(entrypoint.clone()); + for side_module in &compile_flags.include { + let url = resolve_url_or_path(side_module, initial_cwd)?; + if is_module_graph_module(&url) { + module_roots.push(url.clone()); + if url.scheme() == "file" { + include_files.push(url); + } + } else { + analyze_path( + &url, + &mut module_roots, + &mut include_files, + &mut searched_paths, + )?; + } + } + Ok((module_roots, include_files)) +} + async fn resolve_compile_executable_output_path( http_client_provider: &HttpClientProvider, compile_flags: &CompileFlags, @@ -272,68 +357,6 @@ fn get_os_specific_filepath( } } -fn resolve_root_dir_from_specifiers<'a>( - starting_dir: &ModuleSpecifier, - specifiers: impl Iterator, -) -> ModuleSpecifier { - fn select_common_root<'a>(a: &'a str, b: &'a str) -> &'a str { - let min_length = a.len().min(b.len()); - - let mut last_slash = 0; - for i in 0..min_length { - if a.as_bytes()[i] == b.as_bytes()[i] && a.as_bytes()[i] == b'/' { - last_slash = i; - } else if a.as_bytes()[i] != b.as_bytes()[i] { - break; - } - } - - // Return the common root path up to the last common slash. - // This returns a slice of the original string 'a', up to and including the last matching '/'. - let common = &a[..=last_slash]; - if cfg!(windows) && common == "file:///" { - a - } else { - common - } - } - - fn is_file_system_root(url: &str) -> bool { - let Some(path) = url.strip_prefix("file:///") else { - return false; - }; - if cfg!(windows) { - let Some((_drive, path)) = path.split_once('/') else { - return true; - }; - path.is_empty() - } else { - path.is_empty() - } - } - - let mut found_dir = starting_dir.as_str(); - if !is_file_system_root(found_dir) { - for specifier in specifiers { - if specifier.scheme() == "file" { - found_dir = select_common_root(found_dir, specifier.as_str()); - } - } - } - let found_dir = if is_file_system_root(found_dir) { - found_dir - } else { - // include the parent dir name because it helps create some context - found_dir - .strip_suffix('/') - .unwrap_or(found_dir) - .rfind('/') - .map(|i| &found_dir[..i + 1]) - .unwrap_or(found_dir) - }; - ModuleSpecifier::parse(found_dir).unwrap() -} - #[cfg(test)] mod test { pub use super::*; @@ -410,38 +433,4 @@ mod test { run_test("C:\\my-exe.0.1.2", Some("windows"), "C:\\my-exe.0.1.2.exe"); run_test("my-exe-0.1.2", Some("linux"), "my-exe-0.1.2"); } - - #[test] - fn test_resolve_root_dir_from_specifiers() { - fn resolve(start: &str, specifiers: &[&str]) -> String { - let specifiers = specifiers - .iter() - .map(|s| ModuleSpecifier::parse(s).unwrap()) - .collect::>(); - resolve_root_dir_from_specifiers( - &ModuleSpecifier::parse(start).unwrap(), - specifiers.iter(), - ) - .to_string() - } - - assert_eq!(resolve("file:///a/b/c", &["file:///a/b/c/d"]), "file:///a/"); - assert_eq!( - resolve("file:///a/b/c/", &["file:///a/b/c/d"]), - "file:///a/b/" - ); - assert_eq!( - resolve("file:///a/b/c/", &["file:///a/b/c/d", "file:///a/b/c/e"]), - "file:///a/b/" - ); - assert_eq!(resolve("file:///", &["file:///a/b/c/d"]), "file:///"); - if cfg!(windows) { - assert_eq!(resolve("file:///c:/", &["file:///c:/test"]), "file:///c:/"); - // this will ignore the other one because it's on a separate drive - assert_eq!( - resolve("file:///c:/a/b/c/", &["file:///v:/a/b/c/d"]), - "file:///c:/a/b/" - ); - } - } } diff --git a/cli/tools/coverage/merge.rs b/cli/tools/coverage/merge.rs index 81317df55942c7..9c898e78d3d991 100644 --- a/cli/tools/coverage/merge.rs +++ b/cli/tools/coverage/merge.rs @@ -1,16 +1,17 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // // Forked from https://github.com/demurgos/v8-coverage/tree/d0ca18da8740198681e0bc68971b0a6cdb11db3e/rust // Copyright 2021 Charles Samborski. All rights reserved. MIT license. -use super::range_tree::RangeTree; -use super::range_tree::RangeTreeArena; -use crate::cdp; use std::collections::BTreeMap; use std::collections::BTreeSet; use std::collections::HashMap; use std::iter::Peekable; +use super::range_tree::RangeTree; +use super::range_tree::RangeTreeArena; +use crate::cdp; + #[derive(Eq, PartialEq, Clone, Debug)] pub struct ProcessCoverage { pub result: Vec, diff --git a/cli/tools/coverage/mod.rs b/cli/tools/coverage/mod.rs index 2a554c13359ad2..522d7d75bee8f5 100644 --- a/cli/tools/coverage/mod.rs +++ b/cli/tools/coverage/mod.rs @@ -1,14 +1,12 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::args::CliOptions; -use crate::args::CoverageFlags; -use crate::args::FileFlags; -use crate::args::Flags; -use crate::cdp; -use crate::factory::CliFactory; -use crate::tools::fmt::format_json; -use crate::tools::test::is_supported_test_path; -use crate::util::text_encoding::source_map_from_code; +use std::fs; +use std::fs::File; +use std::io::BufWriter; +use std::io::Write; +use std::path::Path; +use std::path::PathBuf; +use std::sync::Arc; use deno_ast::MediaType; use deno_ast::ModuleKind; @@ -27,16 +25,21 @@ use deno_core::url::Url; use deno_core::LocalInspectorSession; use node_resolver::InNpmPackageChecker; use regex::Regex; -use std::fs; -use std::fs::File; -use std::io::BufWriter; -use std::io::Write; -use std::path::Path; -use std::path::PathBuf; -use std::sync::Arc; use text_lines::TextLines; use uuid::Uuid; +use crate::args::CliOptions; +use crate::args::CoverageFlags; +use crate::args::FileFlags; +use crate::args::Flags; +use crate::cdp; +use crate::factory::CliFactory; +use crate::file_fetcher::TextDecodedFile; +use crate::sys::CliSys; +use crate::tools::fmt::format_json; +use crate::tools::test::is_supported_test_path; +use crate::util::text_encoding::source_map_from_code; + mod merge; mod range_tree; mod reporter; @@ -197,7 +200,7 @@ pub struct CoverageReport { fn generate_coverage_report( script_coverage: &cdp::ScriptCoverage, script_source: String, - maybe_source_map: &Option>, + maybe_source_map: Option<&[u8]>, output: &Option, ) -> CoverageReport { let maybe_source_map = maybe_source_map @@ -427,7 +430,7 @@ fn collect_coverages( .ignore_git_folder() .ignore_node_modules() .set_vendor_folder(cli_options.vendor_dir_path().map(ToOwned::to_owned)) - .collect_file_patterns(&deno_config::fs::RealDenoConfigFs, file_patterns)?; + .collect_file_patterns(&CliSys::default(), file_patterns)?; let coverage_patterns = FilePatterns { base: initial_cwd.to_path_buf(), @@ -559,6 +562,12 @@ pub fn cover_files( }, None => None, }; + let get_message = |specifier: &ModuleSpecifier| -> String { + format!( + "Failed to fetch \"{}\" from cache. Before generating coverage report, run `deno test --coverage` to ensure consistent state.", + specifier, + ) + }; for script_coverage in script_coverages { let module_specifier = deno_core::resolve_url_or_path( @@ -566,21 +575,14 @@ pub fn cover_files( cli_options.initial_cwd(), )?; - let maybe_file = if module_specifier.scheme() == "file" { - file_fetcher.get_source(&module_specifier) - } else { - file_fetcher - .fetch_cached(&module_specifier, 10) - .with_context(|| { - format!("Failed to fetch \"{module_specifier}\" from cache.") - })? + let maybe_file_result = file_fetcher + .get_cached_source_or_local(&module_specifier) + .map_err(AnyError::from); + let file = match maybe_file_result { + Ok(Some(file)) => TextDecodedFile::decode(file)?, + Ok(None) => return Err(anyhow!("{}", get_message(&module_specifier))), + Err(err) => return Err(err).context(get_message(&module_specifier)), }; - let file = maybe_file.ok_or_else(|| { - anyhow!("Failed to fetch \"{}\" from cache. - Before generating coverage report, run `deno test --coverage` to ensure consistent state.", - module_specifier - ) - })?.into_text_decoded()?; let original_source = file.source.clone(); // Check if file was transpiled @@ -625,7 +627,7 @@ pub fn cover_files( let coverage_report = generate_coverage_report( &script_coverage, runtime_code.as_str().to_owned(), - &source_map, + source_map.as_deref(), &out_mode, ); diff --git a/cli/tools/coverage/range_tree.rs b/cli/tools/coverage/range_tree.rs index bca52844c0c951..08ac914cd2a620 100644 --- a/cli/tools/coverage/range_tree.rs +++ b/cli/tools/coverage/range_tree.rs @@ -1,12 +1,14 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // // Forked from https://github.com/demurgos/v8-coverage/tree/d0ca18da8740198681e0bc68971b0a6cdb11db3e/rust // Copyright 2021 Charles Samborski. All rights reserved. MIT license. -use crate::cdp; use std::iter::Peekable; + use typed_arena::Arena; +use crate::cdp; + pub struct RangeTreeArena<'a>(Arena>); impl<'a> RangeTreeArena<'a> { diff --git a/cli/tools/coverage/reporter.rs b/cli/tools/coverage/reporter.rs index 6b0e5c885e3126..bc6e85b47e2c34 100644 --- a/cli/tools/coverage/reporter.rs +++ b/cli/tools/coverage/reporter.rs @@ -1,11 +1,5 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use super::util; -use super::CoverageReport; -use crate::args::CoverageType; -use crate::colors; -use deno_core::error::AnyError; -use deno_core::url::Url; use std::collections::HashMap; use std::fs; use std::fs::File; @@ -15,6 +9,14 @@ use std::io::{self}; use std::path::Path; use std::path::PathBuf; +use deno_core::error::AnyError; +use deno_core::url::Url; + +use super::util; +use super::CoverageReport; +use crate::args::CoverageType; +use crate::colors; + #[derive(Default)] pub struct CoverageStats<'a> { pub line_hit: usize, diff --git a/cli/tools/coverage/util.rs b/cli/tools/coverage/util.rs index e9518e1f78e727..e61830b7fe3078 100644 --- a/cli/tools/coverage/util.rs +++ b/cli/tools/coverage/util.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_core::url::Url; diff --git a/cli/tools/doc.rs b/cli/tools/doc.rs index e33da4efb294ac..2fa944b362c9ba 100644 --- a/cli/tools/doc.rs +++ b/cli/tools/doc.rs @@ -1,17 +1,9 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::collections::BTreeMap; +use std::rc::Rc; +use std::sync::Arc; -use crate::args::DocFlags; -use crate::args::DocHtmlFlag; -use crate::args::DocSourceFileFlag; -use crate::args::Flags; -use crate::colors; -use crate::display; -use crate::factory::CliFactory; -use crate::graph_util::graph_exit_integrity_errors; -use crate::graph_util::graph_walk_errors; -use crate::graph_util::GraphWalkErrorsOptions; -use crate::tsc::get_types_declaration_file_text; -use crate::util::fs::collect_specifiers; use deno_ast::diagnostics::Diagnostic; use deno_config::glob::FilePatterns; use deno_config::glob::PathOrPatternSet; @@ -21,6 +13,8 @@ use deno_core::error::AnyError; use deno_core::serde_json; use deno_doc as doc; use deno_doc::html::UrlResolveKind; +use deno_doc::html::UsageComposer; +use deno_doc::html::UsageComposerEntry; use deno_graph::source::NullFileSystem; use deno_graph::EsParser; use deno_graph::GraphKind; @@ -29,12 +23,26 @@ use deno_graph::ModuleSpecifier; use doc::html::ShortPath; use doc::DocDiagnostic; use indexmap::IndexMap; -use std::collections::BTreeMap; -use std::rc::Rc; -use std::sync::Arc; + +use crate::args::DocFlags; +use crate::args::DocHtmlFlag; +use crate::args::DocSourceFileFlag; +use crate::args::Flags; +use crate::colors; +use crate::display; +use crate::factory::CliFactory; +use crate::graph_util::graph_exit_integrity_errors; +use crate::graph_util::graph_walk_errors; +use crate::graph_util::GraphWalkErrorsOptions; +use crate::sys::CliSys; +use crate::tsc::get_types_declaration_file_text; +use crate::util::fs::collect_specifiers; const JSON_SCHEMA_VERSION: u8 = 1; +const PRISM_CSS: &str = include_str!("./doc/prism.css"); +const PRISM_JS: &str = include_str!("./doc/prism.js"); + async fn generate_doc_nodes_for_builtin_types( doc_flags: DocFlags, parser: &dyn EsParser, @@ -109,7 +117,7 @@ pub async fn doc( } DocSourceFileFlag::Paths(ref source_files) => { let module_graph_creator = factory.module_graph_creator().await?; - let fs = factory.fs(); + let sys = CliSys::default(); let module_specifiers = collect_specifiers( FilePatterns { @@ -126,13 +134,17 @@ pub async fn doc( |_| true, )?; let graph = module_graph_creator - .create_graph(GraphKind::TypesOnly, module_specifiers.clone()) + .create_graph( + GraphKind::TypesOnly, + module_specifiers.clone(), + crate::graph_util::NpmCachingStrategy::Eager, + ) .await?; graph_exit_integrity_errors(&graph); let errors = graph_walk_errors( &graph, - fs, + &sys, &module_specifiers, GraphWalkErrorsOptions { check_js: false, @@ -204,10 +216,14 @@ pub async fn doc( Default::default() }; + let mut main_entrypoint = None; + let rewrite_map = if let Some(config_file) = cli_options.start_dir.maybe_deno_json() { let config = config_file.to_exports_config()?; + main_entrypoint = config.get_resolved(".").ok().flatten(); + let rewrite_map = config .clone() .into_map() @@ -235,6 +251,7 @@ pub async fn doc( html_options, deno_ns, rewrite_map, + main_entrypoint, ) } else { let modules_len = doc_nodes_by_url.len(); @@ -312,10 +329,6 @@ impl deno_doc::html::HrefResolver for DocResolver { None } - fn resolve_usage(&self, current_resolve: UrlResolveKind) -> Option { - current_resolve.get_file().map(|file| file.path.to_string()) - } - fn resolve_source(&self, location: &deno_doc::Location) -> Option { Some(location.filename.to_string()) } @@ -333,14 +346,14 @@ impl deno_doc::html::HrefResolver for DocResolver { let name = &res.req().name; Some(( format!("https://www.npmjs.com/package/{name}"), - name.to_owned(), + name.to_string(), )) } "jsr" => { let res = deno_semver::jsr::JsrPackageReqReference::from_str(module).ok()?; let name = &res.req().name; - Some((format!("https://jsr.io/{name}"), name.to_owned())) + Some((format!("https://jsr.io/{name}"), name.to_string())) } _ => None, } @@ -350,105 +363,30 @@ impl deno_doc::html::HrefResolver for DocResolver { } } -struct DenoDocResolver(bool); +struct DocComposer; -impl deno_doc::html::HrefResolver for DenoDocResolver { - fn resolve_path( - &self, - current: UrlResolveKind, - target: UrlResolveKind, - ) -> String { - let path = deno_doc::html::href_path_resolve(current, target); - if self.0 { - if let Some(path) = path - .strip_suffix("index.html") - .or_else(|| path.strip_suffix(".html")) - { - return path.to_owned(); - } - } - - path - } - - fn resolve_global_symbol(&self, _symbol: &[String]) -> Option { - None +impl UsageComposer for DocComposer { + fn is_single_mode(&self) -> bool { + true } - fn resolve_import_href( + fn compose( &self, - _symbol: &[String], - _src: &str, - ) -> Option { - None - } - - fn resolve_usage(&self, _current_resolve: UrlResolveKind) -> Option { - None - } - - fn resolve_source(&self, _location: &deno_doc::Location) -> Option { - None - } - - fn resolve_external_jsdoc_module( - &self, - _module: &str, - _symbol: Option<&str>, - ) -> Option<(String, String)> { - None - } -} - -struct NodeDocResolver(bool); - -impl deno_doc::html::HrefResolver for NodeDocResolver { - fn resolve_path( - &self, - current: UrlResolveKind, - target: UrlResolveKind, - ) -> String { - let path = deno_doc::html::href_path_resolve(current, target); - if self.0 { - if let Some(path) = path - .strip_suffix("index.html") - .or_else(|| path.strip_suffix(".html")) - { - return path.to_owned(); - } - } - - path - } - - fn resolve_global_symbol(&self, _symbol: &[String]) -> Option { - None - } - - fn resolve_import_href( - &self, - _symbol: &[String], - _src: &str, - ) -> Option { - None - } - - fn resolve_usage(&self, current_resolve: UrlResolveKind) -> Option { + current_resolve: UrlResolveKind, + usage_to_md: deno_doc::html::UsageToMd, + ) -> IndexMap { current_resolve .get_file() - .map(|file| format!("node:{}", file.path)) - } - - fn resolve_source(&self, _location: &deno_doc::Location) -> Option { - None - } - - fn resolve_external_jsdoc_module( - &self, - _module: &str, - _symbol: Option<&str>, - ) -> Option<(String, String)> { - None + .map(|current_file| { + IndexMap::from([( + UsageComposerEntry { + name: "".to_string(), + icon: None, + }, + usage_to_md(current_file.path.as_str(), None), + )]) + }) + .unwrap_or_default() } } @@ -457,34 +395,15 @@ fn generate_docs_directory( html_options: &DocHtmlFlag, deno_ns: std::collections::HashMap, Option>>, rewrite_map: Option>, + main_entrypoint: Option, ) -> Result<(), AnyError> { let cwd = std::env::current_dir().context("Failed to get CWD")?; let output_dir_resolved = cwd.join(&html_options.output); - let internal_env = std::env::var("DENO_INTERNAL_HTML_DOCS").ok(); - - let href_resolver: Rc = if internal_env - .as_ref() - .is_some_and(|internal_html_docs| internal_html_docs == "node") - { - Rc::new(NodeDocResolver(html_options.strip_trailing_html)) - } else if internal_env - .as_ref() - .is_some_and(|internal_html_docs| internal_html_docs == "deno") - || deno_ns.is_empty() - { - Rc::new(DenoDocResolver(html_options.strip_trailing_html)) - } else { - Rc::new(DocResolver { - deno_ns, - strip_trailing_html: html_options.strip_trailing_html, - }) - }; - let category_docs = if let Some(category_docs_path) = &html_options.category_docs_path { let content = std::fs::read(category_docs_path)?; - Some(deno_core::serde_json::from_slice(&content)?) + Some(serde_json::from_slice(&content)?) } else { None }; @@ -493,7 +412,7 @@ fn generate_docs_directory( &html_options.symbol_redirect_map_path { let content = std::fs::read(symbol_redirect_map_path)?; - Some(deno_core::serde_json::from_slice(&content)?) + Some(serde_json::from_slice(&content)?) } else { None }; @@ -502,26 +421,42 @@ fn generate_docs_directory( &html_options.default_symbol_map_path { let content = std::fs::read(default_symbol_map_path)?; - Some(deno_core::serde_json::from_slice(&content)?) + Some(serde_json::from_slice(&content)?) } else { None }; let options = deno_doc::html::GenerateOptions { package_name: html_options.name.clone(), - main_entrypoint: None, + main_entrypoint, rewrite_map, - href_resolver, - usage_composer: None, + href_resolver: Rc::new(DocResolver { + deno_ns, + strip_trailing_html: html_options.strip_trailing_html, + }), + usage_composer: Rc::new(DocComposer), category_docs, - disable_search: internal_env.is_some(), + disable_search: false, symbol_redirect_map, default_symbol_map, + markdown_renderer: deno_doc::html::comrak::create_renderer( + None, None, None, + ), + markdown_stripper: Rc::new(deno_doc::html::comrak::strip), + head_inject: Some(Rc::new(|root| { + format!( + r#""#, + deno_doc::html::comrak::COMRAK_STYLESHEET_FILENAME + ) + })), }; - let files = deno_doc::html::generate(options, doc_nodes_by_url) + let mut files = deno_doc::html::generate(options, doc_nodes_by_url) .context("Failed to generate HTML documentation")?; + files.insert("prism.js".to_string(), PRISM_JS.to_string()); + files.insert("prism.css".to_string(), PRISM_CSS.to_string()); + let path = &output_dir_resolved; let _ = std::fs::remove_dir_all(path); std::fs::create_dir(path) diff --git a/cli/tools/doc/prism.css b/cli/tools/doc/prism.css new file mode 100644 index 00000000000000..afc2ef6ca98386 --- /dev/null +++ b/cli/tools/doc/prism.css @@ -0,0 +1,3 @@ +/* PrismJS 1.29.0 +https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+bash+json+markdown+regex+rust+typescript */ +code[class*=language-],pre[class*=language-]{color:#000;background:0 0;text-shadow:0 1px #fff;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{text-shadow:none;background:#b3d4fc}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#999}.token.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#905}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#690}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{color:#9a6e3a;background:hsla(0,0%,100%,.5)}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.class-name,.token.function{color:#dd4a68}.token.important,.token.regex,.token.variable{color:#e90}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help} diff --git a/cli/tools/doc/prism.js b/cli/tools/doc/prism.js new file mode 100644 index 00000000000000..23bf91958907f3 --- /dev/null +++ b/cli/tools/doc/prism.js @@ -0,0 +1,15 @@ +// MIT LICENSE +// Copyright (c) 2012 Lea Verou +/* PrismJS 1.29.0 +https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+bash+json+markdown+regex+rust+typescript */ +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(e){var n=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,r={},a={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof i?new i(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=g.reach);A+=w.value.length,w=w.next){var E=w.value;if(n.length>e.length)return;if(!(E instanceof i)){var P,L=1;if(y){if(!(P=l(b,A,e,m))||P.index>=e.length)break;var S=P.index,O=P.index+P[0].length,j=A;for(j+=w.value.length;S>=j;)j+=(w=w.next).value.length;if(A=j-=w.value.length,w.value instanceof i)continue;for(var C=w;C!==n.tail&&(jg.reach&&(g.reach=W);var z=w.prev;if(_&&(z=u(n,z,_),A+=_.length),c(n,z,L),w=u(n,z,new i(f,p?a.tokenize(N,p):N,k,N)),M&&u(n,w,M),L>1){var I={cause:f+","+d,reach:W};o(e,n,t,w.prev,A,I),g&&I.reach>g.reach&&(g.reach=I.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function u(e,n,t){var r=n.next,a={value:t,prev:n,next:r};return n.next=a,r.prev=a,e.length++,a}function c(e,n,t){for(var r=n.next,a=0;a"+i.content+""},!e.document)return e.addEventListener?(a.disableWorkerMessageHandler||e.addEventListener("message",(function(n){var t=JSON.parse(n.data),r=t.language,i=t.code,l=t.immediateClose;e.postMessage(a.highlight(i,a.languages[r],r)),l&&e.close()}),!1),a):a;var g=a.util.currentScript();function f(){a.manual||a.highlightAll()}if(g&&(a.filename=g.src,g.hasAttribute("data-manual")&&(a.manual=!0)),!a.manual){var h=document.readyState;"loading"===h||"interactive"===h&&g&&g.defer?document.addEventListener("DOMContentLoaded",f):window.requestAnimationFrame?window.requestAnimationFrame(f):window.setTimeout(f,16)}return a}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); +Prism.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var t={"included-cdata":{pattern://i,inside:s}};t["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var n={};n[a]={pattern:RegExp("(<__[^>]*>)(?:))*\\]\\]>|(?!)".replace(/__/g,(function(){return a})),"i"),lookbehind:!0,greedy:!0,inside:t},Prism.languages.insertBefore("markup","cdata",n)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(a,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp("(^|[\"'\\s])(?:"+a+")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))","i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml; +!function(s){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:[^;{\\s\"']|\\s+(?!\\s)|"+e.source+")*?(?:;|(?=\\s*\\{))"),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|(?:[^\\\\\r\n()\"']|\\\\[^])*)\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css;var t=s.languages.markup;t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(Prism); +Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}; +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp("(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])"),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp("((?:^|[^$\\w\\xA0-\\uFFFF.\"'\\])\\s]|\\b(?:return|yield))\\s*)/(?:(?:\\[(?:[^\\]\\\\\r\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|/\\*(?:[^*]|\\*(?!/))*\\*/)*(?:$|[\r\n,.;:})\\]]|//))"),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),Prism.languages.js=Prism.languages.javascript; +!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",a={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},n={bash:a,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:a}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:n},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:n.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},a.inside=e.languages.bash;for(var s=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=n.variable[1].inside,i=0;i/g,(function(){return"(?:\\\\.|[^\\\\\n\r]|(?:\n|\r\n?)(?![\r\n]))"})),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}var t="(?:\\\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\\\|\r\n`])+",a="\\|?__(?:\\|__)+\\|?(?:(?:\n|\r\n?)|(?![^]))".replace(/__/g,(function(){return t})),i="\\|?[ \t]*:?-{3,}:?[ \t]*(?:\\|[ \t]*:?-{3,}:?[ \t]*)+\\|?(?:\n|\r\n?)";n.languages.markdown=n.languages.extend("markup",{}),n.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:n.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+i+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+i+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(t),inside:n.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(t),alias:"important",inside:n.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:e("\\b__(?:(?!_)|_(?:(?!_))+_)+__\\b|\\*\\*(?:(?!\\*)|\\*(?:(?!\\*))+\\*)+\\*\\*"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:e("\\b_(?:(?!_)|__(?:(?!_))+__)+_\\b|\\*(?:(?!\\*)|\\*\\*(?:(?!\\*))+\\*\\*)+\\*"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:e("(~~?)(?:(?!~))+\\2"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:e('!?\\[(?:(?!\\]))+\\](?:\\([^\\s)]+(?:[\t ]+"(?:\\\\.|[^"\\\\])*")?\\)|[ \t]?\\[(?:(?!\\]))+\\])'),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(e){["url","bold","italic","strike","code-snippet"].forEach((function(t){e!==t&&(n.languages.markdown[e].inside.content.inside[t]=n.languages.markdown[t])}))})),n.hooks.add("after-tokenize",(function(n){"markdown"!==n.language&&"md"!==n.language||function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t",quot:'"'},l=String.fromCodePoint||String.fromCharCode;n.languages.md=n.languages.markdown}(Prism); +!function(a){var e={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,t="(?:[^\\\\-]|"+n.source+")",s=RegExp(t+"-"+t),i={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};a.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:s,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":e,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"special-escape":e,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":i}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|)*\\*/",t=0;t<2;t++)a=a.replace(//g,(function(){return a}));a=a.replace(//g,(function(){return"[^\\s\\S]"})),e.languages.rust={comment:[{pattern:RegExp("(^|[^\\\\])"+a),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism); +!function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var s=e.languages.extend("typescript",{});delete s["class-name"],e.languages.typescript["class-name"].inside=s,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:s}}}}),e.languages.ts=e.languages.typescript}(Prism); diff --git a/cli/tools/fmt.rs b/cli/tools/fmt.rs index 2221c0da975049..29db06e97f4520 100644 --- a/cli/tools/fmt.rs +++ b/cli/tools/fmt.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. //! This module provides file formatting utilities using //! [`dprint-plugin-typescript`](https://github.com/dprint/dprint-plugin-typescript). @@ -7,20 +7,18 @@ //! the future it can be easily extended to provide //! the same functions as ops available in JS runtime. -use crate::args::CliOptions; -use crate::args::Flags; -use crate::args::FmtFlags; -use crate::args::FmtOptions; -use crate::args::FmtOptionsConfig; -use crate::args::ProseWrap; -use crate::args::UnstableFmtOptions; -use crate::cache::Caches; -use crate::colors; -use crate::factory::CliFactory; -use crate::util::diff::diff; -use crate::util::file_watcher; -use crate::util::fs::canonicalize_path; -use crate::util::path::get_extension; +use std::borrow::Cow; +use std::fs; +use std::io::stdin; +use std::io::stdout; +use std::io::Read; +use std::io::Write; +use std::path::Path; +use std::path::PathBuf; +use std::sync::atomic::AtomicUsize; +use std::sync::atomic::Ordering; +use std::sync::Arc; + use async_trait::async_trait; use deno_ast::ParsedSource; use deno_config::glob::FileCollector; @@ -37,19 +35,23 @@ use deno_core::url::Url; use log::debug; use log::info; use log::warn; -use std::borrow::Cow; -use std::fs; -use std::io::stdin; -use std::io::stdout; -use std::io::Read; -use std::io::Write; -use std::path::Path; -use std::path::PathBuf; -use std::sync::atomic::AtomicUsize; -use std::sync::atomic::Ordering; -use std::sync::Arc; +use crate::args::CliOptions; +use crate::args::Flags; +use crate::args::FmtFlags; +use crate::args::FmtOptions; +use crate::args::FmtOptionsConfig; +use crate::args::ProseWrap; +use crate::args::UnstableFmtOptions; +use crate::cache::Caches; use crate::cache::IncrementalCache; +use crate::colors; +use crate::factory::CliFactory; +use crate::sys::CliSys; +use crate::util::diff::diff; +use crate::util::file_watcher; +use crate::util::fs::canonicalize_path; +use crate::util::path::get_extension; /// Format JavaScript/TypeScript files. pub async fn format( @@ -57,7 +59,7 @@ pub async fn format( fmt_flags: FmtFlags, ) -> Result<(), AnyError> { if fmt_flags.is_stdin() { - let cli_options = CliOptions::from_flags(flags)?; + let cli_options = CliOptions::from_flags(&CliSys::default(), flags)?; let start_dir = &cli_options.start_dir; let fmt_config = start_dir .to_fmt_config(FilePatterns::new_with_base(start_dir.dir_path()))?; @@ -228,8 +230,9 @@ fn collect_fmt_files( }) .ignore_git_folder() .ignore_node_modules() + .use_gitignore() .set_vendor_folder(cli_options.vendor_dir_path().map(ToOwned::to_owned)) - .collect_file_patterns(&deno_config::fs::RealDenoConfigFs, files) + .collect_file_patterns(&CliSys::default(), files) } /// Formats markdown (using ) and its code blocks @@ -271,6 +274,7 @@ fn format_markdown( | "njk" | "yml" | "yaml" + | "sql" ) { // It's important to tell dprint proper file extension, otherwise // it might parse the file twice. @@ -300,6 +304,13 @@ fn format_markdown( } } "yml" | "yaml" => format_yaml(text, fmt_options), + "sql" => { + if unstable_options.sql { + format_sql(text, fmt_options) + } else { + Ok(None) + } + } _ => { let mut codeblock_config = get_resolved_typescript_config(fmt_options); @@ -431,8 +442,10 @@ pub fn format_html( ) } _ => { - let mut typescript_config = - get_resolved_typescript_config(fmt_options); + let mut typescript_config_builder = + get_typescript_config_builder(fmt_options); + typescript_config_builder.file_indent_level(hints.indent_level); + let mut typescript_config = typescript_config_builder.build(); typescript_config.line_width = hints.print_width as u32; dprint_plugin_typescript::format_text( &path, @@ -502,7 +515,52 @@ pub fn format_html( }) } -/// Formats a single TS, TSX, JS, JSX, JSONC, JSON, MD, or IPYNB file. +pub fn format_sql( + file_text: &str, + fmt_options: &FmtOptionsConfig, +) -> Result, AnyError> { + let ignore_file = file_text + .lines() + .take_while(|line| line.starts_with("--")) + .any(|line| { + line + .strip_prefix("--") + .unwrap() + .trim() + .starts_with("deno-fmt-ignore-file") + }); + + if ignore_file { + return Ok(None); + } + + let mut formatted_str = sqlformat::format( + file_text, + &sqlformat::QueryParams::None, + &sqlformat::FormatOptions { + ignore_case_convert: None, + indent: if fmt_options.use_tabs.unwrap_or_default() { + sqlformat::Indent::Tabs + } else { + sqlformat::Indent::Spaces(fmt_options.indent_width.unwrap_or(2)) + }, + // leave one blank line between queries. + lines_between_queries: 2, + uppercase: Some(true), + }, + ); + + // Add single new line to the end of file. + formatted_str.push('\n'); + + Ok(if formatted_str == file_text { + None + } else { + Some(formatted_str) + }) +} + +/// Formats a single TS, TSX, JS, JSX, JSONC, JSON, MD, IPYNB or SQL file. pub fn format_file( file_path: &Path, file_text: &str, @@ -537,6 +595,13 @@ pub fn format_file( format_file(file_path, &file_text, fmt_options, unstable_options, None) }, ), + "sql" => { + if unstable_options.sql { + format_sql(file_text, fmt_options) + } else { + Ok(None) + } + } _ => { let config = get_resolved_typescript_config(fmt_options); dprint_plugin_typescript::format_text( @@ -858,9 +923,9 @@ fn files_str(len: usize) -> &'static str { } } -fn get_resolved_typescript_config( +fn get_typescript_config_builder( options: &FmtOptionsConfig, -) -> dprint_plugin_typescript::configuration::Configuration { +) -> dprint_plugin_typescript::configuration::ConfigurationBuilder { let mut builder = dprint_plugin_typescript::configuration::ConfigurationBuilder::new(); builder.deno(); @@ -892,7 +957,13 @@ fn get_resolved_typescript_config( }); } - builder.build() + builder +} + +fn get_resolved_typescript_config( + options: &FmtOptionsConfig, +) -> dprint_plugin_typescript::configuration::Configuration { + get_typescript_config_builder(options).build() } fn get_resolved_markdown_config( @@ -1014,6 +1085,7 @@ fn get_resolved_markup_fmt_config( }; let language_options = LanguageOptions { + script_formatter: Some(markup_fmt::config::ScriptFormatter::Dprint), quotes: Quotes::Double, format_comments: false, script_indent: true, @@ -1208,6 +1280,7 @@ fn is_supported_ext_fmt(path: &Path) -> bool { | "yml" | "yaml" | "ipynb" + | "sql" ) }) } @@ -1268,6 +1341,11 @@ mod test { assert!(is_supported_ext_fmt(Path::new("foo.yaml"))); assert!(is_supported_ext_fmt(Path::new("foo.YaML"))); assert!(is_supported_ext_fmt(Path::new("foo.ipynb"))); + assert!(is_supported_ext_fmt(Path::new("foo.sql"))); + assert!(is_supported_ext_fmt(Path::new("foo.Sql"))); + assert!(is_supported_ext_fmt(Path::new("foo.sQl"))); + assert!(is_supported_ext_fmt(Path::new("foo.sqL"))); + assert!(is_supported_ext_fmt(Path::new("foo.SQL"))); } #[test] diff --git a/cli/tools/info.rs b/cli/tools/info.rs index c2f5a8cb8d560c..74d65911249861 100644 --- a/cli/tools/info.rs +++ b/cli/tools/info.rs @@ -1,8 +1,7 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::collections::HashMap; use std::collections::HashSet; -use std::fmt; use std::fmt::Write; use std::sync::Arc; @@ -35,6 +34,7 @@ use crate::graph_util::graph_exit_integrity_errors; use crate::npm::CliNpmResolver; use crate::npm::ManagedCliNpmResolver; use crate::util::checksum; +use crate::util::display::DisplayTreeNode; const JSON_SCHEMA_VERSION: u8 = 1; @@ -49,19 +49,67 @@ pub async fn info( let module_graph_creator = factory.module_graph_creator().await?; let npm_resolver = factory.npm_resolver().await?; let maybe_lockfile = cli_options.maybe_lockfile(); + let resolver = factory.workspace_resolver().await?.clone(); let npmrc = cli_options.npmrc(); - let resolver = factory.workspace_resolver().await?; + let node_resolver = factory.node_resolver().await?; let cwd_url = url::Url::from_directory_path(cli_options.initial_cwd()).unwrap(); - let maybe_import_specifier = if let Some(import_map) = - resolver.maybe_import_map() + let maybe_import_specifier = if let Ok(resolved) = + resolver.resolve(&specifier, &cwd_url) { - if let Ok(imports_specifier) = import_map.resolve(&specifier, &cwd_url) { - Some(imports_specifier) - } else { - None + match resolved { + deno_config::workspace::MappedResolution::Normal { + specifier, .. + } + | deno_config::workspace::MappedResolution::ImportMap { + specifier, + .. + } + | deno_config::workspace::MappedResolution::WorkspaceJsrPackage { + specifier, + .. + } => Some(specifier), + deno_config::workspace::MappedResolution::WorkspaceNpmPackage { + target_pkg_json, + sub_path, + .. + } => Some(node_resolver.resolve_package_subpath_from_deno_module( + target_pkg_json.clone().dir_path(), + sub_path.as_deref(), + Some(&cwd_url), + node_resolver::ResolutionMode::Import, + node_resolver::NodeResolutionKind::Execution, + )?), + deno_config::workspace::MappedResolution::PackageJson { + alias, + sub_path, + dep_result, + .. + } => match dep_result.as_ref().map_err(|e| e.clone())? { + deno_package_json::PackageJsonDepValue::Workspace(version_req) => { + let pkg_folder = resolver + .resolve_workspace_pkg_json_folder_for_pkg_json_dep( + alias, + version_req, + )?; + Some(node_resolver.resolve_package_subpath_from_deno_module( + pkg_folder, + sub_path.as_deref(), + Some(&cwd_url), + node_resolver::ResolutionMode::Import, + node_resolver::NodeResolutionKind::Execution, + )?) + } + deno_package_json::PackageJsonDepValue::Req(req) => { + Some(ModuleSpecifier::parse(&format!( + "npm:{}{}", + req, + sub_path.map(|s| format!("/{}", s)).unwrap_or_default() + ))?) + } + }, } } else { None @@ -75,7 +123,12 @@ pub async fn info( let mut loader = module_graph_builder.create_graph_loader(); loader.enable_loading_cache_info(); // for displaying the cache information let graph = module_graph_creator - .create_graph_with_loader(GraphKind::All, vec![specifier], &mut loader) + .create_graph_with_loader( + GraphKind::All, + vec![specifier], + &mut loader, + crate::graph_util::NpmCachingStrategy::Eager, + ) .await?; // write out the lockfile if there is one @@ -126,6 +179,7 @@ fn print_cache_info( let registry_cache = dir.registries_folder_path(); let mut origin_dir = dir.origin_data_folder_path(); let deno_dir = dir.root_path_for_display().to_string(); + let web_cache_dir = crate::worker::get_cache_storage_dir(); if let Some(location) = &location { origin_dir = @@ -143,6 +197,7 @@ fn print_cache_info( "typescriptCache": typescript_cache, "registryCache": registry_cache, "originStorage": origin_dir, + "webCacheStorage": web_cache_dir, }); if location.is_some() { @@ -177,6 +232,11 @@ fn print_cache_info( colors::bold("Origin storage:"), origin_dir.display() ); + println!( + "{} {}", + colors::bold("Web cache storage:"), + web_cache_dir.display() + ); if location.is_some() { println!( "{} {}", @@ -218,8 +278,10 @@ fn add_npm_packages_to_json( }); if let Some(pkg) = maybe_package { if let Some(module) = module.as_object_mut() { - module - .insert("npmPackage".to_string(), pkg.id.as_serialized().into()); + module.insert( + "npmPackage".to_string(), + pkg.id.as_serialized().into_string().into(), + ); } } } @@ -228,22 +290,31 @@ fn add_npm_packages_to_json( .get_mut("dependencies") .and_then(|d| d.as_array_mut()); if let Some(dependencies) = dependencies { - for dep in dependencies.iter_mut() { - if let serde_json::Value::Object(dep) = dep { - let specifier = dep.get("specifier").and_then(|s| s.as_str()); - if let Some(specifier) = specifier { - if let Ok(npm_ref) = NpmPackageReqReference::from_str(specifier) { - if let Ok(pkg) = - snapshot.resolve_pkg_from_pkg_req(npm_ref.req()) - { - dep.insert( - "npmPackage".to_string(), - pkg.id.as_serialized().into(), - ); - } + for dep in dependencies.iter_mut().flat_map(|d| d.as_object_mut()) { + if let Some(specifier) = dep.get("specifier").and_then(|s| s.as_str()) + { + if let Ok(npm_ref) = NpmPackageReqReference::from_str(specifier) { + if let Ok(pkg) = snapshot.resolve_pkg_from_pkg_req(npm_ref.req()) + { + dep.insert( + "npmPackage".to_string(), + pkg.id.as_serialized().into_string().into(), + ); } } } + + // don't show this in the output unless someone needs it + if let Some(code) = + dep.get_mut("code").and_then(|c| c.as_object_mut()) + { + code.remove("resolutionMode"); + } + if let Some(types) = + dep.get_mut("types").and_then(|c| c.as_object_mut()) + { + types.remove("resolutionMode"); + } } } } @@ -255,94 +326,24 @@ fn add_npm_packages_to_json( let mut json_packages = serde_json::Map::with_capacity(sorted_packages.len()); for pkg in sorted_packages { let mut kv = serde_json::Map::new(); - kv.insert("name".to_string(), pkg.id.nv.name.clone().into()); + kv.insert("name".to_string(), pkg.id.nv.name.to_string().into()); kv.insert("version".to_string(), pkg.id.nv.version.to_string().into()); let mut deps = pkg.dependencies.values().collect::>(); deps.sort(); let deps = deps .into_iter() - .map(|id| serde_json::Value::String(id.as_serialized())) + .map(|id| serde_json::Value::String(id.as_serialized().into_string())) .collect::>(); kv.insert("dependencies".to_string(), deps.into()); let registry_url = npmrc.get_registry_url(&pkg.id.nv.name); kv.insert("registryUrl".to_string(), registry_url.to_string().into()); - json_packages.insert(pkg.id.as_serialized(), kv.into()); + json_packages.insert(pkg.id.as_serialized().into_string(), kv.into()); } json.insert("npmPackages".to_string(), json_packages.into()); } -struct TreeNode { - text: String, - children: Vec, -} - -impl TreeNode { - pub fn from_text(text: String) -> Self { - Self { - text, - children: Default::default(), - } - } -} - -fn print_tree_node( - tree_node: &TreeNode, - writer: &mut TWrite, -) -> fmt::Result { - fn print_children( - writer: &mut TWrite, - prefix: &str, - children: &[TreeNode], - ) -> fmt::Result { - const SIBLING_CONNECTOR: char = '├'; - const LAST_SIBLING_CONNECTOR: char = '└'; - const CHILD_DEPS_CONNECTOR: char = '┬'; - const CHILD_NO_DEPS_CONNECTOR: char = '─'; - const VERTICAL_CONNECTOR: char = '│'; - const EMPTY_CONNECTOR: char = ' '; - - let child_len = children.len(); - for (index, child) in children.iter().enumerate() { - let is_last = index + 1 == child_len; - let sibling_connector = if is_last { - LAST_SIBLING_CONNECTOR - } else { - SIBLING_CONNECTOR - }; - let child_connector = if child.children.is_empty() { - CHILD_NO_DEPS_CONNECTOR - } else { - CHILD_DEPS_CONNECTOR - }; - writeln!( - writer, - "{} {}", - colors::gray(format!("{prefix}{sibling_connector}─{child_connector}")), - child.text - )?; - let child_prefix = format!( - "{}{}{}", - prefix, - if is_last { - EMPTY_CONNECTOR - } else { - VERTICAL_CONNECTOR - }, - EMPTY_CONNECTOR - ); - print_children(writer, &child_prefix, &child.children)?; - } - - Ok(()) - } - - writeln!(writer, "{}", tree_node.text)?; - print_children(writer, "", &tree_node.children)?; - Ok(()) -} - /// Precached information about npm packages that are used in deno info. #[derive(Default)] struct NpmInfo { @@ -446,6 +447,7 @@ impl<'a> GraphDisplayContext<'a> { let maybe_cache_info = match root { Module::Js(module) => module.maybe_cache_info.as_ref(), Module::Json(module) => module.maybe_cache_info.as_ref(), + Module::Wasm(module) => module.maybe_cache_info.as_ref(), Module::Node(_) | Module::Npm(_) | Module::External(_) => None, }; if let Some(cache_info) = maybe_cache_info { @@ -468,6 +470,7 @@ impl<'a> GraphDisplayContext<'a> { let size = match m { Module::Js(module) => module.size(), Module::Json(module) => module.size(), + Module::Wasm(module) => module.size(), Module::Node(_) | Module::Npm(_) | Module::External(_) => 0, }; size as f64 @@ -497,7 +500,7 @@ impl<'a> GraphDisplayContext<'a> { )?; writeln!(writer)?; let root_node = self.build_module_info(root, false); - print_tree_node(&root_node, writer)?; + root_node.print(writer)?; Ok(()) } Err(err) => { @@ -513,7 +516,7 @@ impl<'a> GraphDisplayContext<'a> { } } - fn build_dep_info(&mut self, dep: &Dependency) -> Vec { + fn build_dep_info(&mut self, dep: &Dependency) -> Vec { let mut children = Vec::with_capacity(2); if !dep.maybe_code.is_none() { if let Some(child) = self.build_resolved_info(&dep.maybe_code, false) { @@ -528,7 +531,11 @@ impl<'a> GraphDisplayContext<'a> { children } - fn build_module_info(&mut self, module: &Module, type_dep: bool) -> TreeNode { + fn build_module_info( + &mut self, + module: &Module, + type_dep: bool, + ) -> DisplayTreeNode { enum PackageOrSpecifier { Package(Box), Specifier(ModuleSpecifier), @@ -544,7 +551,7 @@ impl<'a> GraphDisplayContext<'a> { None => Specifier(module.specifier().clone()), }; let was_seen = !self.seen.insert(match &package_or_specifier { - Package(package) => package.id.as_serialized(), + Package(package) => package.id.as_serialized().into_string(), Specifier(specifier) => specifier.to_string(), }); let header_text = if was_seen { @@ -567,21 +574,22 @@ impl<'a> GraphDisplayContext<'a> { Specifier(_) => match module { Module::Js(module) => Some(module.size() as u64), Module::Json(module) => Some(module.size() as u64), + Module::Wasm(module) => Some(module.size() as u64), Module::Node(_) | Module::Npm(_) | Module::External(_) => None, }, }; format!("{} {}", header_text, maybe_size_to_text(maybe_size)) }; - let mut tree_node = TreeNode::from_text(header_text); + let mut tree_node = DisplayTreeNode::from_text(header_text); if !was_seen { match &package_or_specifier { Package(package) => { tree_node.children.extend(self.build_npm_deps(package)); } - Specifier(_) => { - if let Some(module) = module.js() { + Specifier(_) => match module { + Module::Js(module) => { if let Some(types_dep) = &module.maybe_types_dependency { if let Some(child) = self.build_resolved_info(&types_dep.dependency, true) @@ -593,7 +601,16 @@ impl<'a> GraphDisplayContext<'a> { tree_node.children.extend(self.build_dep_info(dep)); } } - } + Module::Wasm(module) => { + for dep in module.dependencies.values() { + tree_node.children.extend(self.build_dep_info(dep)); + } + } + Module::Json(_) + | Module::Npm(_) + | Module::Node(_) + | Module::External(_) => {} + }, } } tree_node @@ -602,21 +619,22 @@ impl<'a> GraphDisplayContext<'a> { fn build_npm_deps( &mut self, package: &NpmResolutionPackage, - ) -> Vec { + ) -> Vec { let mut deps = package.dependencies.values().collect::>(); deps.sort(); let mut children = Vec::with_capacity(deps.len()); for dep_id in deps.into_iter() { let maybe_size = self.npm_info.package_sizes.get(dep_id).cloned(); let size_str = maybe_size_to_text(maybe_size); - let mut child = TreeNode::from_text(format!( + let mut child = DisplayTreeNode::from_text(format!( "npm:/{} {}", dep_id.as_serialized(), size_str )); if let Some(package) = self.npm_info.packages.get(dep_id) { if !package.dependencies.is_empty() { - let was_seen = !self.seen.insert(package.id.as_serialized()); + let was_seen = + !self.seen.insert(package.id.as_serialized().into_string()); if was_seen { child.text = format!("{} {}", child.text, colors::gray("*")); } else { @@ -634,7 +652,7 @@ impl<'a> GraphDisplayContext<'a> { &mut self, err: &ModuleError, specifier: &ModuleSpecifier, - ) -> TreeNode { + ) -> DisplayTreeNode { self.seen.insert(specifier.to_string()); match err { ModuleError::InvalidTypeAssertion { .. } => { @@ -658,7 +676,7 @@ impl<'a> GraphDisplayContext<'a> { }; self.build_error_msg(specifier, message.as_ref()) } - ModuleError::ParseErr(_, _) => { + ModuleError::ParseErr(_, _) | ModuleError::WasmParseErr(_, _) => { self.build_error_msg(specifier, "(parsing error)") } ModuleError::UnsupportedImportAttributeType { .. } => { @@ -677,8 +695,8 @@ impl<'a> GraphDisplayContext<'a> { &self, specifier: &ModuleSpecifier, error_msg: &str, - ) -> TreeNode { - TreeNode::from_text(format!( + ) -> DisplayTreeNode { + DisplayTreeNode::from_text(format!( "{} {}", colors::red(specifier), colors::red_bold(error_msg) @@ -689,7 +707,7 @@ impl<'a> GraphDisplayContext<'a> { &mut self, resolution: &Resolution, type_dep: bool, - ) -> Option { + ) -> Option { match resolution { Resolution::Ok(resolved) => { let specifier = &resolved.specifier; @@ -697,14 +715,14 @@ impl<'a> GraphDisplayContext<'a> { Some(match self.graph.try_get(resolved_specifier) { Ok(Some(module)) => self.build_module_info(module, type_dep), Err(err) => self.build_error_info(err, resolved_specifier), - Ok(None) => TreeNode::from_text(format!( + Ok(None) => DisplayTreeNode::from_text(format!( "{} {}", colors::red(specifier), colors::red_bold("(missing)") )), }) } - Resolution::Err(err) => Some(TreeNode::from_text(format!( + Resolution::Err(err) => Some(DisplayTreeNode::from_text(format!( "{} {}", colors::italic(err.to_string()), colors::red_bold("(resolve error)") diff --git a/cli/tools/init/mod.rs b/cli/tools/init/mod.rs index 4e4a686c5f2d7b..d077de44ce14fb 100644 --- a/cli/tools/init/mod.rs +++ b/cli/tools/init/mod.rs @@ -1,15 +1,31 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::args::InitFlags; -use crate::colors; +use std::io::IsTerminal; +use std::io::Write; +use std::path::Path; + +use color_print::cformat; +use color_print::cstr; +use deno_config::deno_json::NodeModulesDirMode; use deno_core::anyhow::Context; use deno_core::error::AnyError; use deno_core::serde_json::json; +use deno_runtime::WorkerExecutionMode; use log::info; -use std::io::Write; -use std::path::Path; -pub fn init_project(init_flags: InitFlags) -> Result<(), AnyError> { +use crate::args::DenoSubcommand; +use crate::args::Flags; +use crate::args::InitFlags; +use crate::args::PackagesAllowedScripts; +use crate::args::PermissionFlags; +use crate::args::RunFlags; +use crate::colors; + +pub async fn init_project(init_flags: InitFlags) -> Result { + if let Some(package) = &init_flags.package { + return init_npm(package, init_flags.package_args).await; + } + let cwd = std::env::current_dir().context("Can't read current working directory.")?; let dir = if let Some(dir) = &init_flags.dir { @@ -235,7 +251,97 @@ Deno.test(function addTest() { info!(" {}", colors::gray("# Run the tests")); info!(" deno test"); } - Ok(()) + Ok(0) +} + +fn npm_name_to_create_package(name: &str) -> String { + let mut s = "npm:".to_string(); + + let mut scoped = false; + let mut create = false; + + for (i, ch) in name.char_indices() { + if i == 0 { + if ch == '@' { + scoped = true; + } else { + create = true; + s.push_str("create-"); + } + } else if scoped { + if ch == '/' { + scoped = false; + create = true; + s.push_str("/create-"); + continue; + } else if ch == '@' && !create { + scoped = false; + create = true; + s.push_str("/create@"); + continue; + } + } + + s.push(ch); + } + + if !create { + s.push_str("/create"); + } + + s +} + +async fn init_npm(name: &str, args: Vec) -> Result { + let script_name = npm_name_to_create_package(name); + + fn print_manual_usage(script_name: &str, args: &[String]) -> i32 { + log::info!("{}", cformat!("You can initialize project manually by running deno run {} {} and applying desired permissions.", script_name, args.join(" "))); + 1 + } + + if std::io::stdin().is_terminal() { + log::info!( + cstr!("⚠️ Do you fully trust {} package? Deno will invoke code from it with all permissions. Do you want to continue? [y/n]"), + script_name + ); + loop { + let _ = std::io::stdout().write(b"> ")?; + std::io::stdout().flush()?; + let mut answer = String::new(); + if std::io::stdin().read_line(&mut answer).is_ok() { + let answer = answer.trim().to_ascii_lowercase(); + if answer != "y" { + return Ok(print_manual_usage(&script_name, &args)); + } else { + break; + } + } + } + } else { + return Ok(print_manual_usage(&script_name, &args)); + } + + let new_flags = Flags { + permissions: PermissionFlags { + allow_all: true, + ..Default::default() + }, + allow_scripts: PackagesAllowedScripts::All, + argv: args, + node_modules_dir: Some(NodeModulesDirMode::Auto), + subcommand: DenoSubcommand::Run(RunFlags { + script: script_name, + ..Default::default() + }), + ..Default::default() + }; + crate::tools::run::run_script( + WorkerExecutionMode::Run, + new_flags.into(), + None, + ) + .await } fn create_json_file( @@ -270,3 +376,37 @@ fn create_file( Ok(()) } } + +#[cfg(test)] +mod test { + use crate::tools::init::npm_name_to_create_package; + + #[test] + fn npm_name_to_create_package_test() { + // See https://docs.npmjs.com/cli/v8/commands/npm-init#description + assert_eq!( + npm_name_to_create_package("foo"), + "npm:create-foo".to_string() + ); + assert_eq!( + npm_name_to_create_package("foo@1.0.0"), + "npm:create-foo@1.0.0".to_string() + ); + assert_eq!( + npm_name_to_create_package("@foo"), + "npm:@foo/create".to_string() + ); + assert_eq!( + npm_name_to_create_package("@foo@1.0.0"), + "npm:@foo/create@1.0.0".to_string() + ); + assert_eq!( + npm_name_to_create_package("@foo/bar"), + "npm:@foo/create-bar".to_string() + ); + assert_eq!( + npm_name_to_create_package("@foo/bar@1.0.0"), + "npm:@foo/create-bar@1.0.0".to_string() + ); + } +} diff --git a/cli/tools/installer.rs b/cli/tools/installer.rs index fe477a8e6cc540..6dc065171a68e0 100644 --- a/cli/tools/installer.rs +++ b/cli/tools/installer.rs @@ -1,49 +1,48 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::env; +use std::fs; +use std::fs::File; +use std::io; +use std::io::Write; +#[cfg(not(windows))] +use std::os::unix::fs::PermissionsExt; +use std::path::Path; +use std::path::PathBuf; +use std::sync::Arc; + +use deno_cache_dir::file_fetcher::CacheSetting; +use deno_core::anyhow::bail; +use deno_core::anyhow::Context; +use deno_core::error::generic_error; +use deno_core::error::AnyError; +use deno_core::resolve_url_or_path; +use deno_core::url::Url; +use deno_semver::npm::NpmPackageReqReference; +use log::Level; +use once_cell::sync::Lazy; +use regex::Regex; +use regex::RegexBuilder; use crate::args::resolve_no_prompt; use crate::args::AddFlags; use crate::args::CaData; -use crate::args::CacheSetting; use crate::args::ConfigFlag; use crate::args::Flags; use crate::args::InstallFlags; use crate::args::InstallFlagsGlobal; use crate::args::InstallFlagsLocal; -use crate::args::InstallKind; use crate::args::TypeCheckMode; use crate::args::UninstallFlags; use crate::args::UninstallKind; use crate::factory::CliFactory; -use crate::file_fetcher::FileFetcher; +use crate::file_fetcher::CliFileFetcher; use crate::graph_container::ModuleGraphContainer; use crate::http_util::HttpClientProvider; use crate::jsr::JsrFetchResolver; use crate::npm::NpmFetchResolver; use crate::util::fs::canonicalize_path_maybe_not_exists; -use deno_core::anyhow::bail; -use deno_core::anyhow::Context; -use deno_core::error::generic_error; -use deno_core::error::AnyError; -use deno_core::resolve_url_or_path; -use deno_core::url::Url; -use deno_semver::npm::NpmPackageReqReference; -use log::Level; -use once_cell::sync::Lazy; -use regex::Regex; -use regex::RegexBuilder; -use std::env; -use std::fs; -use std::fs::File; -use std::io; -use std::io::Write; -use std::path::Path; -use std::path::PathBuf; - -#[cfg(not(windows))] -use std::os::unix::fs::PermissionsExt; -use std::sync::Arc; - static EXEC_NAME_RE: Lazy = Lazy::new(|| { RegexBuilder::new(r"^[a-z0-9][\w-]*$") .case_insensitive(true) @@ -162,11 +161,11 @@ pub async fn infer_name_from_url( let npm_ref = npm_ref.into_inner(); if let Some(sub_path) = npm_ref.sub_path { if !sub_path.contains('/') { - return Some(sub_path); + return Some(sub_path.to_string()); } } if !npm_ref.req.name.contains('/') { - return Some(npm_ref.req.name); + return Some(npm_ref.req.name.into_string()); } return None; } @@ -339,11 +338,11 @@ pub async fn install_command( flags: Arc, install_flags: InstallFlags, ) -> Result<(), AnyError> { - match install_flags.kind { - InstallKind::Global(global_flags) => { + match install_flags { + InstallFlags::Global(global_flags) => { install_global(flags, global_flags).await } - InstallKind::Local(local_flags) => { + InstallFlags::Local(local_flags) => { if let InstallFlagsLocal::Add(add_flags) = &local_flags { check_if_installs_a_single_package_globally(Some(add_flags))?; } @@ -359,20 +358,22 @@ async fn install_global( // ensure the module is cached let factory = CliFactory::from_flags(flags.clone()); + let cli_options = factory.cli_options()?; let http_client = factory.http_client_provider(); let deps_http_cache = factory.global_http_cache()?; - let mut deps_file_fetcher = FileFetcher::new( + let deps_file_fetcher = CliFileFetcher::new( deps_http_cache.clone(), - CacheSetting::ReloadAll, - true, http_client.clone(), + factory.sys(), Default::default(), None, + true, + CacheSetting::ReloadAll, + log::Level::Trace, ); let npmrc = factory.cli_options().unwrap().npmrc(); - deps_file_fetcher.set_download_log_level(log::Level::Trace); let deps_file_fetcher = Arc::new(deps_file_fetcher); let jsr_resolver = Arc::new(JsrFetchResolver::new(deps_file_fetcher.clone())); let npm_resolver = Arc::new(NpmFetchResolver::new( @@ -381,20 +382,22 @@ async fn install_global( )); let entry_text = install_flags_global.module_url.as_str(); - let req = super::registry::AddRmPackageReq::parse(entry_text); - - // found a package requirement but missing the prefix - if let Ok(Err(package_req)) = req { - if jsr_resolver.req_to_nv(&package_req).await.is_some() { - bail!( - "{entry_text} is missing a prefix. Did you mean `{}`?", - crate::colors::yellow(format!("deno install -g jsr:{package_req}")) - ); - } else if npm_resolver.req_to_nv(&package_req).await.is_some() { - bail!( - "{entry_text} is missing a prefix. Did you mean `{}`?", - crate::colors::yellow(format!("deno install -g npm:{package_req}")) - ); + if !cli_options.initial_cwd().join(entry_text).exists() { + // check for package requirement missing prefix + if let Ok(Err(package_req)) = + super::registry::AddRmPackageReq::parse(entry_text) + { + if jsr_resolver.req_to_nv(&package_req).await.is_some() { + bail!( + "{entry_text} is missing a prefix. Did you mean `{}`?", + crate::colors::yellow(format!("deno install -g jsr:{package_req}")) + ); + } else if npm_resolver.req_to_nv(&package_req).await.is_some() { + bail!( + "{entry_text} is missing a prefix. Did you mean `{}`?", + crate::colors::yellow(format!("deno install -g npm:{package_req}")) + ); + } } } @@ -656,16 +659,17 @@ fn is_in_path(dir: &Path) -> bool { #[cfg(test)] mod tests { - use super::*; + use std::process::Command; + + use test_util::testdata_path; + use test_util::TempDir; + use super::*; use crate::args::ConfigFlag; use crate::args::PermissionFlags; use crate::args::UninstallFlagsGlobal; use crate::args::UnstableConfig; use crate::util::fs::canonicalize_path; - use std::process::Command; - use test_util::testdata_path; - use test_util::TempDir; #[tokio::test] async fn install_infer_name_from_url() { diff --git a/cli/tools/jupyter/install.rs b/cli/tools/jupyter/install.rs index aeff89ccf4f04a..d76c59343bb1df 100644 --- a/cli/tools/jupyter/install.rs +++ b/cli/tools/jupyter/install.rs @@ -1,12 +1,12 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use deno_core::error::AnyError; -use deno_core::serde_json; -use deno_core::serde_json::json; use std::env::current_exe; use std::io::Write; use std::path::Path; +use deno_core::error::AnyError; +use deno_core::serde_json; +use deno_core::serde_json::json; use jupyter_runtime::dirs::user_data_dir; const DENO_ICON_32: &[u8] = include_bytes!("./resources/deno-logo-32x32.png"); diff --git a/cli/tools/jupyter/mod.rs b/cli/tools/jupyter/mod.rs index 732f95c49f25f7..bb39528f3e3cf5 100644 --- a/cli/tools/jupyter/mod.rs +++ b/cli/tools/jupyter/mod.rs @@ -1,18 +1,7 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::sync::Arc; -use crate::args::Flags; -use crate::args::JupyterFlags; -use crate::cdp; -use crate::lsp::ReplCompletionItem; -use crate::ops; -use crate::tools::repl; -use crate::tools::test::create_single_test_event_channel; -use crate::tools::test::reporters::PrettyTestReporter; -use crate::tools::test::TestEventWorkerSender; -use crate::tools::test::TestFailureFormatOptions; -use crate::CliFactory; use deno_core::anyhow::bail; use deno_core::anyhow::Context; use deno_core::error::generic_error; @@ -34,6 +23,18 @@ use tokio::sync::mpsc; use tokio::sync::mpsc::UnboundedSender; use tokio::sync::oneshot; +use crate::args::Flags; +use crate::args::JupyterFlags; +use crate::cdp; +use crate::lsp::ReplCompletionItem; +use crate::ops; +use crate::tools::repl; +use crate::tools::test::create_single_test_event_channel; +use crate::tools::test::reporters::PrettyTestReporter; +use crate::tools::test::TestEventWorkerSender; +use crate::tools::test::TestFailureFormatOptions; +use crate::CliFactory; + mod install; pub mod server; diff --git a/cli/tools/jupyter/server.rs b/cli/tools/jupyter/server.rs index 5680ed4c13b878..bc045d9d9b2e54 100644 --- a/cli/tools/jupyter/server.rs +++ b/cli/tools/jupyter/server.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // This file is forked/ported from // Copyright 2020 The Evcxr Authors. MIT license. @@ -11,8 +11,6 @@ use std::collections::HashMap; use std::rc::Rc; use std::sync::Arc; -use crate::cdp; -use crate::tools::repl; use deno_core::anyhow::bail; use deno_core::error::AnyError; use deno_core::futures; @@ -20,12 +18,9 @@ use deno_core::parking_lot::Mutex; use deno_core::serde_json; use deno_core::CancelFuture; use deno_core::CancelHandle; -use jupyter_runtime::ExecutionCount; -use tokio::sync::mpsc; -use tokio::sync::oneshot; - use jupyter_runtime::messaging; use jupyter_runtime::ConnectionInfo; +use jupyter_runtime::ExecutionCount; use jupyter_runtime::JupyterMessage; use jupyter_runtime::JupyterMessageContent; use jupyter_runtime::KernelControlConnection; @@ -34,9 +29,13 @@ use jupyter_runtime::KernelShellConnection; use jupyter_runtime::ReplyError; use jupyter_runtime::ReplyStatus; use jupyter_runtime::StreamContent; +use tokio::sync::mpsc; +use tokio::sync::oneshot; use uuid::Uuid; use super::JupyterReplProxy; +use crate::cdp; +use crate::tools::repl; pub struct JupyterServer { execution_count: ExecutionCount, diff --git a/cli/tools/lint/ast_buffer/buffer.rs b/cli/tools/lint/ast_buffer/buffer.rs new file mode 100644 index 00000000000000..517c3b14dc7f07 --- /dev/null +++ b/cli/tools/lint/ast_buffer/buffer.rs @@ -0,0 +1,536 @@ +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::fmt::Display; + +use deno_ast::swc::common::Span; +use deno_ast::swc::common::DUMMY_SP; +use indexmap::IndexMap; + +/// Each property has this flag to mark what kind of value it holds- +/// Plain objects and arrays are not supported yet, but could be easily +/// added if needed. +#[derive(Debug, PartialEq)] +pub enum PropFlags { + Ref, + RefArr, + String, + Bool, + Null, + Undefined, +} + +impl From for u8 { + fn from(m: PropFlags) -> u8 { + m as u8 + } +} + +impl TryFrom for PropFlags { + type Error = &'static str; + + fn try_from(value: u8) -> Result { + match value { + 0 => Ok(PropFlags::Ref), + 1 => Ok(PropFlags::RefArr), + 2 => Ok(PropFlags::String), + 3 => Ok(PropFlags::Bool), + 4 => Ok(PropFlags::Null), + 5 => Ok(PropFlags::Undefined), + _ => Err("Unknown Prop flag"), + } + } +} + +const MASK_U32_1: u32 = 0b11111111_00000000_00000000_00000000; +const MASK_U32_2: u32 = 0b00000000_11111111_00000000_00000000; +const MASK_U32_3: u32 = 0b00000000_00000000_11111111_00000000; +const MASK_U32_4: u32 = 0b00000000_00000000_00000000_11111111; + +// TODO: There is probably a native Rust function to do this. +pub fn append_u32(result: &mut Vec, value: u32) { + let v1: u8 = ((value & MASK_U32_1) >> 24) as u8; + let v2: u8 = ((value & MASK_U32_2) >> 16) as u8; + let v3: u8 = ((value & MASK_U32_3) >> 8) as u8; + let v4: u8 = (value & MASK_U32_4) as u8; + + result.push(v1); + result.push(v2); + result.push(v3); + result.push(v4); +} + +pub fn append_usize(result: &mut Vec, value: usize) { + let raw = u32::try_from(value).unwrap(); + append_u32(result, raw); +} + +pub fn write_usize(result: &mut [u8], value: usize, idx: usize) { + let raw = u32::try_from(value).unwrap(); + + let v1: u8 = ((raw & MASK_U32_1) >> 24) as u8; + let v2: u8 = ((raw & MASK_U32_2) >> 16) as u8; + let v3: u8 = ((raw & MASK_U32_3) >> 8) as u8; + let v4: u8 = (raw & MASK_U32_4) as u8; + + result[idx] = v1; + result[idx + 1] = v2; + result[idx + 2] = v3; + result[idx + 3] = v4; +} + +#[derive(Debug)] +pub struct StringTable { + id: usize, + table: IndexMap, +} + +impl StringTable { + pub fn new() -> Self { + Self { + id: 0, + table: IndexMap::new(), + } + } + + pub fn insert(&mut self, s: &str) -> usize { + if let Some(id) = self.table.get(s) { + return *id; + } + + let id = self.id; + self.id += 1; + self.table.insert(s.to_string(), id); + id + } + + pub fn serialize(&mut self) -> Vec { + let mut result: Vec = vec![]; + append_u32(&mut result, self.table.len() as u32); + + // Assume that it's sorted by id + for (s, _id) in &self.table { + let bytes = s.as_bytes(); + append_u32(&mut result, bytes.len() as u32); + result.append(&mut bytes.to_vec()); + } + + result + } +} + +#[derive(Debug, Clone, Copy, PartialEq)] +pub struct NodeRef(pub usize); + +/// Represents an offset to a node whose schema hasn't been committed yet +#[derive(Debug, Clone, Copy, PartialEq)] +pub struct PendingNodeRef(pub NodeRef); + +#[derive(Debug)] +pub struct BoolPos(pub usize); +#[derive(Debug)] +pub struct FieldPos(pub usize); +#[derive(Debug)] +pub struct FieldArrPos(pub usize); +#[derive(Debug)] +pub struct StrPos(pub usize); +#[derive(Debug)] +pub struct UndefPos(pub usize); +#[derive(Debug)] +pub struct NullPos(pub usize); + +#[derive(Debug)] +pub enum NodePos { + Bool(BoolPos), + #[allow(dead_code)] + Field(FieldPos), + #[allow(dead_code)] + FieldArr(FieldArrPos), + Str(StrPos), + Undef(UndefPos), + #[allow(dead_code)] + Null(NullPos), +} + +pub trait AstBufSerializer +where + K: Into + Display, + P: Into + Display, +{ + fn header(&mut self, kind: K, parent: NodeRef, span: &Span) + -> PendingNodeRef; + fn ref_field(&mut self, prop: P) -> FieldPos; + fn ref_vec_field(&mut self, prop: P, len: usize) -> FieldArrPos; + fn str_field(&mut self, prop: P) -> StrPos; + fn bool_field(&mut self, prop: P) -> BoolPos; + fn undefined_field(&mut self, prop: P) -> UndefPos; + #[allow(dead_code)] + fn null_field(&mut self, prop: P) -> NullPos; + fn commit_schema(&mut self, offset: PendingNodeRef) -> NodeRef; + + fn write_ref(&mut self, pos: FieldPos, value: NodeRef); + fn write_maybe_ref(&mut self, pos: FieldPos, value: Option); + fn write_refs(&mut self, pos: FieldArrPos, value: Vec); + fn write_str(&mut self, pos: StrPos, value: &str); + fn write_bool(&mut self, pos: BoolPos, value: bool); + + fn serialize(&mut self) -> Vec; +} + +#[derive(Debug)] +pub struct SerializeCtx { + buf: Vec, + start_buf: NodeRef, + str_table: StringTable, + kind_map: Vec, + prop_map: Vec, + field_count: u8, +} + +/// This is the internal context used to allocate and fill the buffer. The point +/// is to be able to write absolute offsets directly in place. +/// +/// The typical workflow is to reserve all necessary space for the currrent +/// node with placeholders for the offsets of the child nodes. Once child +/// nodes have been traversed, we know their offsets and can replace the +/// placeholder values with the actual ones. +impl SerializeCtx { + pub fn new(kind_len: u8, prop_len: u8) -> Self { + let kind_size = kind_len as usize; + let prop_size = prop_len as usize; + let mut ctx = Self { + start_buf: NodeRef(0), + buf: vec![], + str_table: StringTable::new(), + kind_map: vec![0; kind_size], + prop_map: vec![0; prop_size], + field_count: 0, + }; + + let empty_str = ctx.str_table.insert(""); + + // Placeholder node is always 0 + ctx.append_node(0, NodeRef(0), &DUMMY_SP, 0); + ctx.kind_map[0] = empty_str; + ctx.start_buf = NodeRef(ctx.buf.len()); + + // Insert default props that are always present + let type_str = ctx.str_table.insert("type"); + let parent_str = ctx.str_table.insert("parent"); + let range_str = ctx.str_table.insert("range"); + let length_str = ctx.str_table.insert("length"); + + // These values are expected to be in this order on the JS side + ctx.prop_map[0] = empty_str; + ctx.prop_map[1] = type_str; + ctx.prop_map[2] = parent_str; + ctx.prop_map[3] = range_str; + ctx.prop_map[4] = length_str; + + ctx + } + + /// Allocate a node's header + fn field_header

(&mut self, prop: P, prop_flags: PropFlags) -> usize + where + P: Into + Display + Clone, + { + self.field_count += 1; + + let offset = self.buf.len(); + + let n: u8 = prop.clone().into(); + self.buf.push(n); + + if let Some(v) = self.prop_map.get::(n.into()) { + if *v == 0 { + let id = self.str_table.insert(&format!("{prop}")); + self.prop_map[n as usize] = id; + } + } + + let flags: u8 = prop_flags.into(); + self.buf.push(flags); + + offset + } + + /// Allocate a property pointing to another node. + fn field

(&mut self, prop: P, prop_flags: PropFlags) -> usize + where + P: Into + Display + Clone, + { + let offset = self.field_header(prop, prop_flags); + + append_usize(&mut self.buf, 0); + + offset + } + + fn append_node( + &mut self, + kind: u8, + parent: NodeRef, + span: &Span, + prop_count: usize, + ) -> PendingNodeRef { + let offset = self.buf.len(); + + // Node type fits in a u8 + self.buf.push(kind); + + // Offset to the parent node. Will be 0 if none exists + append_usize(&mut self.buf, parent.0); + + // Span, the start and end location of this node + append_u32(&mut self.buf, span.lo.0); + append_u32(&mut self.buf, span.hi.0); + + // No node has more than <10 properties + debug_assert!(prop_count < 10); + self.buf.push(prop_count as u8); + + PendingNodeRef(NodeRef(offset)) + } + + pub fn commit_schema(&mut self, node_ref: PendingNodeRef) -> NodeRef { + let mut offset = node_ref.0 .0; + + // type + parentId + span lo + span hi + offset += 1 + 4 + 4 + 4; + + self.buf[offset] = self.field_count; + self.field_count = 0; + + node_ref.0 + } + + /// Allocate the node header. It's always the same for every node. + /// + /// + /// + /// + /// (There is no node with more than 10 properties) + pub fn header( + &mut self, + kind: N, + parent: NodeRef, + span: &Span, + ) -> PendingNodeRef + where + N: Into + Display + Clone, + { + let n: u8 = kind.clone().into(); + + if let Some(v) = self.kind_map.get::(n.into()) { + if *v == 0 { + let id = self.str_table.insert(&format!("{kind}")); + self.kind_map[n as usize] = id; + } + } + + // Prop count will be filled with the actual value when the + // schema is committed. + self.append_node(n, parent, span, 0) + } + + /// Allocate a reference property that will hold the offset of + /// another node. + pub fn ref_field

(&mut self, prop: P) -> usize + where + P: Into + Display + Clone, + { + self.field(prop, PropFlags::Ref) + } + + /// Allocate a property that is a vec of node offsets pointing to other + /// nodes. + pub fn ref_vec_field

(&mut self, prop: P, len: usize) -> usize + where + P: Into + Display + Clone, + { + let offset = self.field(prop, PropFlags::RefArr); + + for _ in 0..len { + append_u32(&mut self.buf, 0); + } + + offset + } + + // Allocate a property representing a string. Strings are deduplicated + // in the message and the property will only contain the string id. + pub fn str_field

(&mut self, prop: P) -> usize + where + P: Into + Display + Clone, + { + self.field(prop, PropFlags::String) + } + + /// Allocate a bool field + pub fn bool_field

(&mut self, prop: P) -> usize + where + P: Into + Display + Clone, + { + let offset = self.field_header(prop, PropFlags::Bool); + self.buf.push(0); + offset + } + + /// Allocate an undefined field + pub fn undefined_field

(&mut self, prop: P) -> usize + where + P: Into + Display + Clone, + { + self.field_header(prop, PropFlags::Undefined) + } + + /// Allocate an undefined field + #[allow(dead_code)] + pub fn null_field

(&mut self, prop: P) -> usize + where + P: Into + Display + Clone, + { + self.field_header(prop, PropFlags::Null) + } + + /// Replace the placeholder of a reference field with the actual offset + /// to the node we want to point to. + pub fn write_ref(&mut self, field_offset: usize, value: NodeRef) { + #[cfg(debug_assertions)] + { + let value_kind = self.buf[field_offset + 1]; + if PropFlags::try_from(value_kind).unwrap() != PropFlags::Ref { + panic!("Trying to write a ref into a non-ref field") + } + } + + write_usize(&mut self.buf, value.0, field_offset + 2); + } + + /// Helper for writing optional node offsets + pub fn write_maybe_ref( + &mut self, + field_offset: usize, + value: Option, + ) { + #[cfg(debug_assertions)] + { + let value_kind = self.buf[field_offset + 1]; + if PropFlags::try_from(value_kind).unwrap() != PropFlags::Ref { + panic!("Trying to write a ref into a non-ref field") + } + } + + let ref_value = if let Some(v) = value { v } else { NodeRef(0) }; + write_usize(&mut self.buf, ref_value.0, field_offset + 2); + } + + /// Write a vec of node offsets into the property. The necessary space + /// has been reserved earlier. + pub fn write_refs(&mut self, field_offset: usize, value: Vec) { + #[cfg(debug_assertions)] + { + let value_kind = self.buf[field_offset + 1]; + if PropFlags::try_from(value_kind).unwrap() != PropFlags::RefArr { + panic!("Trying to write a ref into a non-ref array field") + } + } + + let mut offset = field_offset + 2; + write_usize(&mut self.buf, value.len(), offset); + offset += 4; + + for item in value { + write_usize(&mut self.buf, item.0, offset); + offset += 4; + } + } + + /// Store the string in our string table and save the id of the string + /// in the current field. + pub fn write_str(&mut self, field_offset: usize, value: &str) { + #[cfg(debug_assertions)] + { + let value_kind = self.buf[field_offset + 1]; + if PropFlags::try_from(value_kind).unwrap() != PropFlags::String { + panic!("Trying to write a ref into a non-string field") + } + } + + let id = self.str_table.insert(value); + write_usize(&mut self.buf, id, field_offset + 2); + } + + /// Write a bool to a field. + pub fn write_bool(&mut self, field_offset: usize, value: bool) { + #[cfg(debug_assertions)] + { + let value_kind = self.buf[field_offset + 1]; + if PropFlags::try_from(value_kind).unwrap() != PropFlags::Bool { + panic!("Trying to write a ref into a non-bool field") + } + } + + self.buf[field_offset + 2] = if value { 1 } else { 0 }; + } + + /// Serialize all information we have into a buffer that can be sent to JS. + /// It has the following structure: + /// + /// <...ast> + /// + /// <- node kind id maps to string id + /// <- node property id maps to string id + /// + /// + /// + pub fn serialize(&mut self) -> Vec { + let mut buf: Vec = vec![]; + + // The buffer starts with the serialized AST first, because that + // contains absolute offsets. By butting this at the start of the + // message we don't have to waste time updating any offsets. + buf.append(&mut self.buf); + + // Next follows the string table. We'll keep track of the offset + // in the message of where the string table begins + let offset_str_table = buf.len(); + + // Serialize string table + buf.append(&mut self.str_table.serialize()); + + // Next, serialize the mappings of kind -> string of encountered + // nodes in the AST. We use this additional lookup table to compress + // the message so that we can save space by using a u8 . All nodes of + // JS, TS and JSX together are <200 + let offset_kind_map = buf.len(); + + // Write the total number of entries in the kind -> str mapping table + // TODO: make this a u8 + append_usize(&mut buf, self.kind_map.len()); + for v in &self.kind_map { + append_usize(&mut buf, *v); + } + + // Store offset to prop -> string map. It's the same as with node kind + // as the total number of properties is <120 which allows us to store it + // as u8. + let offset_prop_map = buf.len(); + // Write the total number of entries in the kind -> str mapping table + append_usize(&mut buf, self.prop_map.len()); + for v in &self.prop_map { + append_usize(&mut buf, *v); + } + + // Putting offsets of relevant parts of the buffer at the end. This + // allows us to hop to the relevant part by merely looking at the last + // for values in the message. Each value represents an offset into the + // buffer. + append_usize(&mut buf, offset_kind_map); + append_usize(&mut buf, offset_prop_map); + append_usize(&mut buf, offset_str_table); + append_usize(&mut buf, self.start_buf.0); + + buf + } +} diff --git a/cli/tools/lint/ast_buffer/mod.rs b/cli/tools/lint/ast_buffer/mod.rs new file mode 100644 index 00000000000000..fc4045fb60cc8a --- /dev/null +++ b/cli/tools/lint/ast_buffer/mod.rs @@ -0,0 +1,13 @@ +// Copyright 2018-2025 the Deno authors. MIT license. + +use deno_ast::ParsedSource; +use swc::serialize_swc_to_buffer; + +mod buffer; +mod swc; +mod ts_estree; + +pub fn serialize_ast_to_buffer(parsed_source: &ParsedSource) -> Vec { + // TODO: We could support multiple languages here + serialize_swc_to_buffer(parsed_source) +} diff --git a/cli/tools/lint/ast_buffer/swc.rs b/cli/tools/lint/ast_buffer/swc.rs new file mode 100644 index 00000000000000..7652756c9b6824 --- /dev/null +++ b/cli/tools/lint/ast_buffer/swc.rs @@ -0,0 +1,3134 @@ +// Copyright 2018-2025 the Deno authors. MIT license. + +use deno_ast::swc::ast::AssignTarget; +use deno_ast::swc::ast::AssignTargetPat; +use deno_ast::swc::ast::BlockStmtOrExpr; +use deno_ast::swc::ast::Callee; +use deno_ast::swc::ast::ClassMember; +use deno_ast::swc::ast::Decl; +use deno_ast::swc::ast::ExportSpecifier; +use deno_ast::swc::ast::Expr; +use deno_ast::swc::ast::ExprOrSpread; +use deno_ast::swc::ast::FnExpr; +use deno_ast::swc::ast::ForHead; +use deno_ast::swc::ast::Function; +use deno_ast::swc::ast::Ident; +use deno_ast::swc::ast::IdentName; +use deno_ast::swc::ast::JSXAttrName; +use deno_ast::swc::ast::JSXAttrOrSpread; +use deno_ast::swc::ast::JSXAttrValue; +use deno_ast::swc::ast::JSXElement; +use deno_ast::swc::ast::JSXElementChild; +use deno_ast::swc::ast::JSXElementName; +use deno_ast::swc::ast::JSXEmptyExpr; +use deno_ast::swc::ast::JSXExpr; +use deno_ast::swc::ast::JSXExprContainer; +use deno_ast::swc::ast::JSXFragment; +use deno_ast::swc::ast::JSXMemberExpr; +use deno_ast::swc::ast::JSXNamespacedName; +use deno_ast::swc::ast::JSXObject; +use deno_ast::swc::ast::JSXOpeningElement; +use deno_ast::swc::ast::Lit; +use deno_ast::swc::ast::MemberExpr; +use deno_ast::swc::ast::MemberProp; +use deno_ast::swc::ast::ModuleDecl; +use deno_ast::swc::ast::ModuleExportName; +use deno_ast::swc::ast::ModuleItem; +use deno_ast::swc::ast::ObjectPatProp; +use deno_ast::swc::ast::OptChainBase; +use deno_ast::swc::ast::Param; +use deno_ast::swc::ast::ParamOrTsParamProp; +use deno_ast::swc::ast::Pat; +use deno_ast::swc::ast::PrivateName; +use deno_ast::swc::ast::Program; +use deno_ast::swc::ast::Prop; +use deno_ast::swc::ast::PropName; +use deno_ast::swc::ast::PropOrSpread; +use deno_ast::swc::ast::SimpleAssignTarget; +use deno_ast::swc::ast::Stmt; +use deno_ast::swc::ast::SuperProp; +use deno_ast::swc::ast::Tpl; +use deno_ast::swc::ast::TsEntityName; +use deno_ast::swc::ast::TsEnumMemberId; +use deno_ast::swc::ast::TsFnOrConstructorType; +use deno_ast::swc::ast::TsFnParam; +use deno_ast::swc::ast::TsIndexSignature; +use deno_ast::swc::ast::TsLit; +use deno_ast::swc::ast::TsLitType; +use deno_ast::swc::ast::TsThisTypeOrIdent; +use deno_ast::swc::ast::TsType; +use deno_ast::swc::ast::TsTypeAnn; +use deno_ast::swc::ast::TsTypeElement; +use deno_ast::swc::ast::TsTypeParam; +use deno_ast::swc::ast::TsTypeParamDecl; +use deno_ast::swc::ast::TsTypeParamInstantiation; +use deno_ast::swc::ast::TsTypeQueryExpr; +use deno_ast::swc::ast::TsUnionOrIntersectionType; +use deno_ast::swc::ast::VarDeclOrExpr; +use deno_ast::swc::common::Span; +use deno_ast::swc::common::Spanned; +use deno_ast::swc::common::SyntaxContext; +use deno_ast::view::Accessibility; +use deno_ast::view::AssignOp; +use deno_ast::view::BinaryOp; +use deno_ast::view::TruePlusMinus; +use deno_ast::view::TsKeywordTypeKind; +use deno_ast::view::TsTypeOperatorOp; +use deno_ast::view::UnaryOp; +use deno_ast::view::UpdateOp; +use deno_ast::view::VarDeclKind; +use deno_ast::ParsedSource; + +use super::buffer::AstBufSerializer; +use super::buffer::BoolPos; +use super::buffer::NodePos; +use super::buffer::NodeRef; +use super::buffer::StrPos; +use super::ts_estree::AstNode; +use super::ts_estree::AstProp; +use super::ts_estree::TsEsTreeBuilder; + +pub fn serialize_swc_to_buffer(parsed_source: &ParsedSource) -> Vec { + let mut ctx = TsEsTreeBuilder::new(); + + let program = &parsed_source.program(); + + let raw = ctx.header(AstNode::Program, NodeRef(0), &program.span()); + let source_type_pos = ctx.str_field(AstProp::SourceType); + + match program.as_ref() { + Program::Module(module) => { + let body_pos = ctx.ref_vec_field(AstProp::Body, module.body.len()); + let pos = ctx.commit_schema(raw); + + let children = module + .body + .iter() + .map(|item| match item { + ModuleItem::ModuleDecl(module_decl) => { + serialize_module_decl(&mut ctx, module_decl, pos) + } + ModuleItem::Stmt(stmt) => serialize_stmt(&mut ctx, stmt, pos), + }) + .collect::>(); + + ctx.write_str(source_type_pos, "module"); + ctx.write_refs(body_pos, children); + } + Program::Script(script) => { + let body_pos = ctx.ref_vec_field(AstProp::Body, script.body.len()); + let pos = ctx.commit_schema(raw); + + let children = script + .body + .iter() + .map(|stmt| serialize_stmt(&mut ctx, stmt, pos)) + .collect::>(); + + ctx.write_str(source_type_pos, "script"); + ctx.write_refs(body_pos, children); + } + } + + ctx.serialize() +} + +fn serialize_module_decl( + ctx: &mut TsEsTreeBuilder, + module_decl: &ModuleDecl, + parent: NodeRef, +) -> NodeRef { + match module_decl { + ModuleDecl::Import(node) => { + let raw = ctx.header(AstNode::ImportExpression, parent, &node.span); + ctx.commit_schema(raw) + } + ModuleDecl::ExportDecl(node) => { + let raw = ctx.header(AstNode::ExportNamedDeclaration, parent, &node.span); + let decl_pos = ctx.ref_field(AstProp::Declarations); + let pos = ctx.commit_schema(raw); + + let decl = serialize_decl(ctx, &node.decl, pos); + + ctx.write_ref(decl_pos, decl); + + pos + } + ModuleDecl::ExportNamed(node) => { + let raw = ctx.header(AstNode::ExportNamedDeclaration, parent, &node.span); + let src_pos = ctx.ref_field(AstProp::Source); + let spec_pos = + ctx.ref_vec_field(AstProp::Specifiers, node.specifiers.len()); + let id = ctx.commit_schema(raw); + + // FIXME: Flags + // let mut flags = FlagValue::new(); + // flags.set(Flag::ExportType); + + let src_id = node + .src + .as_ref() + .map(|src| serialize_lit(ctx, &Lit::Str(*src.clone()), id)); + + let spec_ids = node + .specifiers + .iter() + .map(|spec| { + match spec { + ExportSpecifier::Named(child) => { + let raw = ctx.header(AstNode::ExportSpecifier, id, &child.span); + let local_pos = ctx.ref_field(AstProp::Local); + let exp_pos = ctx.ref_field(AstProp::Exported); + let spec_pos = ctx.commit_schema(raw); + + // let mut flags = FlagValue::new(); + // flags.set(Flag::ExportType); + + let local = + serialize_module_exported_name(ctx, &child.orig, spec_pos); + + let exported = child.exported.as_ref().map(|exported| { + serialize_module_exported_name(ctx, exported, spec_pos) + }); + + // ctx.write_flags(&flags); + ctx.write_ref(local_pos, local); + ctx.write_maybe_ref(exp_pos, exported); + + spec_pos + } + + // These two aren't syntactically valid + ExportSpecifier::Namespace(_) => todo!(), + ExportSpecifier::Default(_) => todo!(), + } + }) + .collect::>(); + + // ctx.write_flags(&flags); + ctx.write_maybe_ref(src_pos, src_id); + ctx.write_refs(spec_pos, spec_ids); + + id + } + ModuleDecl::ExportDefaultDecl(node) => { + let raw = + ctx.header(AstNode::ExportDefaultDeclaration, parent, &node.span); + ctx.commit_schema(raw) + } + ModuleDecl::ExportDefaultExpr(node) => { + let raw = + ctx.header(AstNode::ExportDefaultDeclaration, parent, &node.span); + ctx.commit_schema(raw) + } + ModuleDecl::ExportAll(node) => { + let raw = ctx.header(AstNode::ExportAllDeclaration, parent, &node.span); + ctx.commit_schema(raw) + } + ModuleDecl::TsImportEquals(node) => { + let raw = ctx.header(AstNode::TsImportEquals, parent, &node.span); + ctx.commit_schema(raw) + } + ModuleDecl::TsExportAssignment(node) => { + let raw = ctx.header(AstNode::TsExportAssignment, parent, &node.span); + ctx.commit_schema(raw) + } + ModuleDecl::TsNamespaceExport(node) => { + let raw = ctx.header(AstNode::TsNamespaceExport, parent, &node.span); + ctx.commit_schema(raw) + } + } +} + +fn serialize_stmt( + ctx: &mut TsEsTreeBuilder, + stmt: &Stmt, + parent: NodeRef, +) -> NodeRef { + match stmt { + Stmt::Block(node) => { + let raw = ctx.header(AstNode::BlockStatement, parent, &node.span); + let body_pos = ctx.ref_vec_field(AstProp::Body, node.stmts.len()); + let pos = ctx.commit_schema(raw); + + let children = node + .stmts + .iter() + .map(|stmt| serialize_stmt(ctx, stmt, pos)) + .collect::>(); + + ctx.write_refs(body_pos, children); + + pos + } + Stmt::Empty(_) => NodeRef(0), + Stmt::Debugger(node) => { + let raw = ctx.header(AstNode::DebuggerStatement, parent, &node.span); + ctx.commit_schema(raw) + } + Stmt::With(_) => todo!(), + Stmt::Return(node) => { + let raw = ctx.header(AstNode::ReturnStatement, parent, &node.span); + let arg_pos = ctx.ref_field(AstProp::Argument); + let pos = ctx.commit_schema(raw); + + let arg = node.arg.as_ref().map(|arg| serialize_expr(ctx, arg, pos)); + ctx.write_maybe_ref(arg_pos, arg); + + pos + } + Stmt::Labeled(node) => { + let raw = ctx.header(AstNode::LabeledStatement, parent, &node.span); + let label_pos = ctx.ref_field(AstProp::Label); + let body_pos = ctx.ref_field(AstProp::Body); + let pos = ctx.commit_schema(raw); + + let ident = serialize_ident(ctx, &node.label, pos); + let stmt = serialize_stmt(ctx, &node.body, pos); + + ctx.write_ref(label_pos, ident); + ctx.write_ref(body_pos, stmt); + + pos + } + Stmt::Break(node) => { + let raw = ctx.header(AstNode::BreakStatement, parent, &node.span); + let label_pos = ctx.ref_field(AstProp::Label); + let pos = ctx.commit_schema(raw); + + let arg = node + .label + .as_ref() + .map(|label| serialize_ident(ctx, label, pos)); + + ctx.write_maybe_ref(label_pos, arg); + + pos + } + Stmt::Continue(node) => { + let raw = ctx.header(AstNode::ContinueStatement, parent, &node.span); + let label_pos = ctx.ref_field(AstProp::Label); + let pos = ctx.commit_schema(raw); + + let arg = node + .label + .as_ref() + .map(|label| serialize_ident(ctx, label, pos)); + + ctx.write_maybe_ref(label_pos, arg); + + pos + } + Stmt::If(node) => { + let raw = ctx.header(AstNode::IfStatement, parent, &node.span); + let test_pos = ctx.ref_field(AstProp::Test); + let cons_pos = ctx.ref_field(AstProp::Consequent); + let alt_pos = ctx.ref_field(AstProp::Alternate); + let pos = ctx.commit_schema(raw); + + let test = serialize_expr(ctx, node.test.as_ref(), pos); + let cons = serialize_stmt(ctx, node.cons.as_ref(), pos); + let alt = node.alt.as_ref().map(|alt| serialize_stmt(ctx, alt, pos)); + + ctx.write_ref(test_pos, test); + ctx.write_ref(cons_pos, cons); + ctx.write_maybe_ref(alt_pos, alt); + + pos + } + Stmt::Switch(node) => { + let raw = ctx.header(AstNode::SwitchStatement, parent, &node.span); + let disc_pos = ctx.ref_field(AstProp::Discriminant); + let cases_pos = ctx.ref_vec_field(AstProp::Cases, node.cases.len()); + let pos = ctx.commit_schema(raw); + + let disc = serialize_expr(ctx, &node.discriminant, pos); + + let cases = node + .cases + .iter() + .map(|case| { + let raw = ctx.header(AstNode::SwitchCase, pos, &case.span); + let test_pos = ctx.ref_field(AstProp::Test); + let cons_pos = + ctx.ref_vec_field(AstProp::Consequent, case.cons.len()); + let case_pos = ctx.commit_schema(raw); + + let test = case + .test + .as_ref() + .map(|test| serialize_expr(ctx, test, case_pos)); + + let cons = case + .cons + .iter() + .map(|cons| serialize_stmt(ctx, cons, case_pos)) + .collect::>(); + + ctx.write_maybe_ref(test_pos, test); + ctx.write_refs(cons_pos, cons); + + case_pos + }) + .collect::>(); + + ctx.write_ref(disc_pos, disc); + ctx.write_refs(cases_pos, cases); + + pos + } + Stmt::Throw(node) => { + let raw = ctx.header(AstNode::ThrowStatement, parent, &node.span); + let arg_pos = ctx.ref_field(AstProp::Argument); + let pos = ctx.commit_schema(raw); + + let arg = serialize_expr(ctx, &node.arg, pos); + ctx.write_ref(arg_pos, arg); + + pos + } + Stmt::Try(node) => { + let raw = ctx.header(AstNode::TryStatement, parent, &node.span); + let block_pos = ctx.ref_field(AstProp::Block); + let handler_pos = ctx.ref_field(AstProp::Handler); + let finalizer_pos = ctx.ref_field(AstProp::Finalizer); + let pos = ctx.commit_schema(raw); + + let block = serialize_stmt(ctx, &Stmt::Block(node.block.clone()), pos); + + let handler = node.handler.as_ref().map(|catch| { + let raw = ctx.header(AstNode::CatchClause, pos, &catch.span); + let param_pos = ctx.ref_field(AstProp::Param); + let body_pos = ctx.ref_field(AstProp::Body); + let clause_pos = ctx.commit_schema(raw); + + let param = catch + .param + .as_ref() + .map(|param| serialize_pat(ctx, param, clause_pos)); + + let body = + serialize_stmt(ctx, &Stmt::Block(catch.body.clone()), clause_pos); + + ctx.write_maybe_ref(param_pos, param); + ctx.write_ref(body_pos, body); + + clause_pos + }); + + let finalizer = node.finalizer.as_ref().map(|finalizer| { + serialize_stmt(ctx, &Stmt::Block(finalizer.clone()), pos) + }); + + ctx.write_ref(block_pos, block); + ctx.write_maybe_ref(handler_pos, handler); + ctx.write_maybe_ref(finalizer_pos, finalizer); + + pos + } + Stmt::While(node) => { + let raw = ctx.header(AstNode::WhileStatement, parent, &node.span); + let test_pos = ctx.ref_field(AstProp::Test); + let body_pos = ctx.ref_field(AstProp::Body); + let pos = ctx.commit_schema(raw); + + let test = serialize_expr(ctx, node.test.as_ref(), pos); + let stmt = serialize_stmt(ctx, node.body.as_ref(), pos); + + ctx.write_ref(test_pos, test); + ctx.write_ref(body_pos, stmt); + + pos + } + Stmt::DoWhile(node) => { + let raw = ctx.header(AstNode::DoWhileStatement, parent, &node.span); + let test_pos = ctx.ref_field(AstProp::Test); + let body_pos = ctx.ref_field(AstProp::Body); + let pos = ctx.commit_schema(raw); + + let expr = serialize_expr(ctx, node.test.as_ref(), pos); + let stmt = serialize_stmt(ctx, node.body.as_ref(), pos); + + ctx.write_ref(test_pos, expr); + ctx.write_ref(body_pos, stmt); + + pos + } + Stmt::For(node) => { + let raw = ctx.header(AstNode::ForStatement, parent, &node.span); + let init_pos = ctx.ref_field(AstProp::Init); + let test_pos = ctx.ref_field(AstProp::Test); + let update_pos = ctx.ref_field(AstProp::Update); + let body_pos = ctx.ref_field(AstProp::Body); + let pos = ctx.commit_schema(raw); + + let init = node.init.as_ref().map(|init| match init { + VarDeclOrExpr::VarDecl(var_decl) => { + serialize_stmt(ctx, &Stmt::Decl(Decl::Var(var_decl.clone())), pos) + } + VarDeclOrExpr::Expr(expr) => serialize_expr(ctx, expr, pos), + }); + + let test = node + .test + .as_ref() + .map(|expr| serialize_expr(ctx, expr, pos)); + let update = node + .update + .as_ref() + .map(|expr| serialize_expr(ctx, expr, pos)); + let body = serialize_stmt(ctx, node.body.as_ref(), pos); + + ctx.write_maybe_ref(init_pos, init); + ctx.write_maybe_ref(test_pos, test); + ctx.write_maybe_ref(update_pos, update); + ctx.write_ref(body_pos, body); + + pos + } + Stmt::ForIn(node) => { + let raw = ctx.header(AstNode::ForInStatement, parent, &node.span); + let left_pos = ctx.ref_field(AstProp::Left); + let right_pos = ctx.ref_field(AstProp::Right); + let body_pos = ctx.ref_field(AstProp::Body); + let pos = ctx.commit_schema(raw); + + let left = serialize_for_head(ctx, &node.left, pos); + let right = serialize_expr(ctx, node.right.as_ref(), pos); + let body = serialize_stmt(ctx, node.body.as_ref(), pos); + + ctx.write_ref(left_pos, left); + ctx.write_ref(right_pos, right); + ctx.write_ref(body_pos, body); + + pos + } + Stmt::ForOf(node) => { + let raw = ctx.header(AstNode::ForOfStatement, parent, &node.span); + let await_pos = ctx.bool_field(AstProp::Await); + let left_pos = ctx.ref_field(AstProp::Left); + let right_pos = ctx.ref_field(AstProp::Right); + let body_pos = ctx.ref_field(AstProp::Body); + let pos = ctx.commit_schema(raw); + + let left = serialize_for_head(ctx, &node.left, pos); + let right = serialize_expr(ctx, node.right.as_ref(), pos); + let body = serialize_stmt(ctx, node.body.as_ref(), pos); + + ctx.write_bool(await_pos, node.is_await); + ctx.write_ref(left_pos, left); + ctx.write_ref(right_pos, right); + ctx.write_ref(body_pos, body); + + pos + } + Stmt::Decl(node) => serialize_decl(ctx, node, parent), + Stmt::Expr(node) => { + let raw = ctx.header(AstNode::ExpressionStatement, parent, &node.span); + let expr_pos = ctx.ref_field(AstProp::Expression); + let pos = ctx.commit_schema(raw); + + let expr = serialize_expr(ctx, node.expr.as_ref(), pos); + ctx.write_ref(expr_pos, expr); + + pos + } + } +} + +fn serialize_expr( + ctx: &mut TsEsTreeBuilder, + expr: &Expr, + parent: NodeRef, +) -> NodeRef { + match expr { + Expr::This(node) => { + let raw = ctx.header(AstNode::ThisExpression, parent, &node.span); + ctx.commit_schema(raw) + } + Expr::Array(node) => { + let raw = ctx.header(AstNode::ArrayExpression, parent, &node.span); + let elems_pos = ctx.ref_vec_field(AstProp::Elements, node.elems.len()); + let pos = ctx.commit_schema(raw); + + let elems = node + .elems + .iter() + .map(|item| { + item + .as_ref() + .map_or(NodeRef(0), |item| serialize_expr_or_spread(ctx, item, pos)) + }) + .collect::>(); + + ctx.write_refs(elems_pos, elems); + + pos + } + Expr::Object(node) => { + let raw = ctx.header(AstNode::ObjectExpression, parent, &node.span); + let props_pos = ctx.ref_vec_field(AstProp::Properties, node.props.len()); + let pos = ctx.commit_schema(raw); + + let prop_ids = node + .props + .iter() + .map(|prop| serialize_prop_or_spread(ctx, prop, pos)) + .collect::>(); + + ctx.write_refs(props_pos, prop_ids); + + pos + } + Expr::Fn(node) => { + let fn_obj = node.function.as_ref(); + + let raw = ctx.header(AstNode::FunctionExpression, parent, &fn_obj.span); + + let async_pos = ctx.bool_field(AstProp::Async); + let gen_pos = ctx.bool_field(AstProp::Generator); + let id_pos = ctx.ref_field(AstProp::Id); + let tparams_pos = ctx.ref_field(AstProp::TypeParameters); + let params_pos = ctx.ref_vec_field(AstProp::Params, fn_obj.params.len()); + let return_pos = ctx.ref_field(AstProp::ReturnType); + let body_pos = ctx.ref_field(AstProp::Body); + let pos = ctx.commit_schema(raw); + + let ident = node + .ident + .as_ref() + .map(|ident| serialize_ident(ctx, ident, pos)); + + let type_params = + maybe_serialize_ts_type_param(ctx, &fn_obj.type_params, pos); + + let params = fn_obj + .params + .iter() + .map(|param| serialize_pat(ctx, ¶m.pat, pos)) + .collect::>(); + + let return_id = + maybe_serialize_ts_type_ann(ctx, &fn_obj.return_type, pos); + let body = fn_obj + .body + .as_ref() + .map(|block| serialize_stmt(ctx, &Stmt::Block(block.clone()), pos)); + + ctx.write_bool(async_pos, fn_obj.is_async); + ctx.write_bool(gen_pos, fn_obj.is_generator); + ctx.write_maybe_ref(id_pos, ident); + ctx.write_maybe_ref(tparams_pos, type_params); + ctx.write_refs(params_pos, params); + ctx.write_maybe_ref(return_pos, return_id); + ctx.write_maybe_ref(body_pos, body); + + pos + } + Expr::Unary(node) => { + let raw = ctx.header(AstNode::UnaryExpression, parent, &node.span); + let flag_pos = ctx.str_field(AstProp::Operator); + let arg_pos = ctx.ref_field(AstProp::Argument); + let pos = ctx.commit_schema(raw); + + let arg = serialize_expr(ctx, &node.arg, pos); + + ctx.write_str( + flag_pos, + match node.op { + UnaryOp::Minus => "-", + UnaryOp::Plus => "+", + UnaryOp::Bang => "!", + UnaryOp::Tilde => "~", + UnaryOp::TypeOf => "typeof", + UnaryOp::Void => "void", + UnaryOp::Delete => "delete", + }, + ); + ctx.write_ref(arg_pos, arg); + + pos + } + Expr::Update(node) => { + let raw = ctx.header(AstNode::UpdateExpression, parent, &node.span); + let prefix_pos = ctx.bool_field(AstProp::Prefix); + let arg_pos = ctx.ref_field(AstProp::Argument); + let op_ops = ctx.str_field(AstProp::Operator); + let pos = ctx.commit_schema(raw); + + let arg = serialize_expr(ctx, node.arg.as_ref(), pos); + + ctx.write_bool(prefix_pos, node.prefix); + ctx.write_ref(arg_pos, arg); + ctx.write_str( + op_ops, + match node.op { + UpdateOp::PlusPlus => "++", + UpdateOp::MinusMinus => "--", + }, + ); + + pos + } + Expr::Bin(node) => { + let (node_type, flag_str) = match node.op { + BinaryOp::LogicalAnd => (AstNode::LogicalExpression, "&&"), + BinaryOp::LogicalOr => (AstNode::LogicalExpression, "||"), + BinaryOp::NullishCoalescing => (AstNode::LogicalExpression, "??"), + BinaryOp::EqEq => (AstNode::BinaryExpression, "=="), + BinaryOp::NotEq => (AstNode::BinaryExpression, "!="), + BinaryOp::EqEqEq => (AstNode::BinaryExpression, "==="), + BinaryOp::NotEqEq => (AstNode::BinaryExpression, "!="), + BinaryOp::Lt => (AstNode::BinaryExpression, "<"), + BinaryOp::LtEq => (AstNode::BinaryExpression, "<="), + BinaryOp::Gt => (AstNode::BinaryExpression, ">"), + BinaryOp::GtEq => (AstNode::BinaryExpression, ">="), + BinaryOp::LShift => (AstNode::BinaryExpression, "<<"), + BinaryOp::RShift => (AstNode::BinaryExpression, ">>"), + BinaryOp::ZeroFillRShift => (AstNode::BinaryExpression, ">>>"), + BinaryOp::Add => (AstNode::BinaryExpression, "+"), + BinaryOp::Sub => (AstNode::BinaryExpression, "-"), + BinaryOp::Mul => (AstNode::BinaryExpression, "*"), + BinaryOp::Div => (AstNode::BinaryExpression, "/"), + BinaryOp::Mod => (AstNode::BinaryExpression, "%"), + BinaryOp::BitOr => (AstNode::BinaryExpression, "|"), + BinaryOp::BitXor => (AstNode::BinaryExpression, "^"), + BinaryOp::BitAnd => (AstNode::BinaryExpression, "&"), + BinaryOp::In => (AstNode::BinaryExpression, "in"), + BinaryOp::InstanceOf => (AstNode::BinaryExpression, "instanceof"), + BinaryOp::Exp => (AstNode::BinaryExpression, "**"), + }; + + let raw = ctx.header(node_type, parent, &node.span); + let op_pos = ctx.str_field(AstProp::Operator); + let left_pos = ctx.ref_field(AstProp::Left); + let right_pos = ctx.ref_field(AstProp::Right); + let pos = ctx.commit_schema(raw); + + let left_id = serialize_expr(ctx, node.left.as_ref(), pos); + let right_id = serialize_expr(ctx, node.right.as_ref(), pos); + + ctx.write_str(op_pos, flag_str); + ctx.write_ref(left_pos, left_id); + ctx.write_ref(right_pos, right_id); + + pos + } + Expr::Assign(node) => { + let raw = ctx.header(AstNode::AssignmentExpression, parent, &node.span); + let op_pos = ctx.str_field(AstProp::Operator); + let left_pos = ctx.ref_field(AstProp::Left); + let right_pos = ctx.ref_field(AstProp::Right); + let pos = ctx.commit_schema(raw); + + let left = match &node.left { + AssignTarget::Simple(simple_assign_target) => { + match simple_assign_target { + SimpleAssignTarget::Ident(target) => { + serialize_ident(ctx, &target.id, pos) + } + SimpleAssignTarget::Member(target) => { + serialize_expr(ctx, &Expr::Member(target.clone()), pos) + } + SimpleAssignTarget::SuperProp(target) => { + serialize_expr(ctx, &Expr::SuperProp(target.clone()), pos) + } + SimpleAssignTarget::Paren(target) => { + serialize_expr(ctx, &target.expr, pos) + } + SimpleAssignTarget::OptChain(target) => { + serialize_expr(ctx, &Expr::OptChain(target.clone()), pos) + } + SimpleAssignTarget::TsAs(target) => { + serialize_expr(ctx, &Expr::TsAs(target.clone()), pos) + } + SimpleAssignTarget::TsSatisfies(target) => { + serialize_expr(ctx, &Expr::TsSatisfies(target.clone()), pos) + } + SimpleAssignTarget::TsNonNull(target) => { + serialize_expr(ctx, &Expr::TsNonNull(target.clone()), pos) + } + SimpleAssignTarget::TsTypeAssertion(target) => { + serialize_expr(ctx, &Expr::TsTypeAssertion(target.clone()), pos) + } + SimpleAssignTarget::TsInstantiation(target) => { + serialize_expr(ctx, &Expr::TsInstantiation(target.clone()), pos) + } + SimpleAssignTarget::Invalid(_) => unreachable!(), + } + } + AssignTarget::Pat(target) => match target { + AssignTargetPat::Array(array_pat) => { + serialize_pat(ctx, &Pat::Array(array_pat.clone()), pos) + } + AssignTargetPat::Object(object_pat) => { + serialize_pat(ctx, &Pat::Object(object_pat.clone()), pos) + } + AssignTargetPat::Invalid(_) => unreachable!(), + }, + }; + + let right = serialize_expr(ctx, node.right.as_ref(), pos); + + ctx.write_str( + op_pos, + match node.op { + AssignOp::Assign => "=", + AssignOp::AddAssign => "+=", + AssignOp::SubAssign => "-=", + AssignOp::MulAssign => "*=", + AssignOp::DivAssign => "/=", + AssignOp::ModAssign => "%=", + AssignOp::LShiftAssign => "<<=", + AssignOp::RShiftAssign => ">>=", + AssignOp::ZeroFillRShiftAssign => ">>>=", + AssignOp::BitOrAssign => "|=", + AssignOp::BitXorAssign => "^=", + AssignOp::BitAndAssign => "&=", + AssignOp::ExpAssign => "**=", + AssignOp::AndAssign => "&&=", + AssignOp::OrAssign => "||=", + AssignOp::NullishAssign => "??=", + }, + ); + ctx.write_ref(left_pos, left); + ctx.write_ref(right_pos, right); + + pos + } + Expr::Member(node) => serialize_member_expr(ctx, node, parent, false), + Expr::SuperProp(node) => { + let raw = ctx.header(AstNode::MemberExpression, parent, &node.span); + let computed_pos = ctx.bool_field(AstProp::Computed); + let obj_pos = ctx.ref_field(AstProp::Object); + let prop_pos = ctx.ref_field(AstProp::Property); + let pos = ctx.commit_schema(raw); + + let raw = ctx.header(AstNode::Super, pos, &node.obj.span); + let obj = ctx.commit_schema(raw); + + let mut computed = false; + let prop = match &node.prop { + SuperProp::Ident(ident_name) => { + serialize_ident_name(ctx, ident_name, pos) + } + SuperProp::Computed(prop) => { + computed = true; + serialize_expr(ctx, &prop.expr, pos) + } + }; + + ctx.write_bool(computed_pos, computed); + ctx.write_ref(obj_pos, obj); + ctx.write_ref(prop_pos, prop); + + pos + } + Expr::Cond(node) => { + let raw = ctx.header(AstNode::ConditionalExpression, parent, &node.span); + let test_pos = ctx.ref_field(AstProp::Test); + let cons_pos = ctx.ref_field(AstProp::Consequent); + let alt_pos = ctx.ref_field(AstProp::Alternate); + let pos = ctx.commit_schema(raw); + + let test = serialize_expr(ctx, node.test.as_ref(), pos); + let cons = serialize_expr(ctx, node.cons.as_ref(), pos); + let alt = serialize_expr(ctx, node.alt.as_ref(), pos); + + ctx.write_ref(test_pos, test); + ctx.write_ref(cons_pos, cons); + ctx.write_ref(alt_pos, alt); + + pos + } + Expr::Call(node) => { + let raw = ctx.header(AstNode::CallExpression, parent, &node.span); + let opt_pos = ctx.bool_field(AstProp::Optional); + let callee_pos = ctx.ref_field(AstProp::Callee); + let type_args_pos = ctx.ref_field(AstProp::TypeArguments); + let args_pos = ctx.ref_vec_field(AstProp::Arguments, node.args.len()); + let pos = ctx.commit_schema(raw); + + let callee = match &node.callee { + Callee::Super(super_node) => { + let raw = ctx.header(AstNode::Super, pos, &super_node.span); + ctx.commit_schema(raw) + } + Callee::Import(_) => todo!(), + Callee::Expr(expr) => serialize_expr(ctx, expr, pos), + }; + + let type_arg = node.type_args.clone().map(|param_node| { + serialize_ts_param_inst(ctx, param_node.as_ref(), pos) + }); + + let args = node + .args + .iter() + .map(|arg| serialize_expr_or_spread(ctx, arg, pos)) + .collect::>(); + + ctx.write_bool(opt_pos, false); + ctx.write_ref(callee_pos, callee); + ctx.write_maybe_ref(type_args_pos, type_arg); + ctx.write_refs(args_pos, args); + + pos + } + Expr::New(node) => { + let raw = ctx.header(AstNode::NewExpression, parent, &node.span); + let callee_pos = ctx.ref_field(AstProp::Callee); + let type_args_pos = ctx.ref_field(AstProp::TypeArguments); + let args_pos = ctx.ref_vec_field( + AstProp::Arguments, + node.args.as_ref().map_or(0, |v| v.len()), + ); + let pos = ctx.commit_schema(raw); + + let callee = serialize_expr(ctx, node.callee.as_ref(), pos); + + let args: Vec = node.args.as_ref().map_or(vec![], |args| { + args + .iter() + .map(|arg| serialize_expr_or_spread(ctx, arg, pos)) + .collect::>() + }); + + let type_args = node.type_args.clone().map(|param_node| { + serialize_ts_param_inst(ctx, param_node.as_ref(), pos) + }); + + ctx.write_ref(callee_pos, callee); + ctx.write_maybe_ref(type_args_pos, type_args); + ctx.write_refs(args_pos, args); + + pos + } + Expr::Seq(node) => { + let raw = ctx.header(AstNode::SequenceExpression, parent, &node.span); + let exprs_pos = ctx.ref_vec_field(AstProp::Expressions, node.exprs.len()); + let pos = ctx.commit_schema(raw); + + let children = node + .exprs + .iter() + .map(|expr| serialize_expr(ctx, expr, pos)) + .collect::>(); + + ctx.write_refs(exprs_pos, children); + + pos + } + Expr::Ident(node) => serialize_ident(ctx, node, parent), + Expr::Lit(node) => serialize_lit(ctx, node, parent), + Expr::Tpl(node) => { + let raw = ctx.header(AstNode::TemplateLiteral, parent, &node.span); + let quasis_pos = ctx.ref_vec_field(AstProp::Quasis, node.quasis.len()); + let exprs_pos = ctx.ref_vec_field(AstProp::Expressions, node.exprs.len()); + let pos = ctx.commit_schema(raw); + + let quasis = node + .quasis + .iter() + .map(|quasi| { + let raw = ctx.header(AstNode::TemplateElement, pos, &quasi.span); + let tail_pos = ctx.bool_field(AstProp::Tail); + let raw_pos = ctx.str_field(AstProp::Raw); + let cooked_pos = ctx.str_field(AstProp::Cooked); + let tpl_pos = ctx.commit_schema(raw); + + ctx.write_bool(tail_pos, quasi.tail); + ctx.write_str(raw_pos, &quasi.raw); + ctx.write_str( + cooked_pos, + &quasi + .cooked + .as_ref() + .map_or("".to_string(), |v| v.to_string()), + ); + + tpl_pos + }) + .collect::>(); + + let exprs = node + .exprs + .iter() + .map(|expr| serialize_expr(ctx, expr, pos)) + .collect::>(); + + ctx.write_refs(quasis_pos, quasis); + ctx.write_refs(exprs_pos, exprs); + + pos + } + Expr::TaggedTpl(node) => { + let raw = + ctx.header(AstNode::TaggedTemplateExpression, parent, &node.span); + let tag_pos = ctx.ref_field(AstProp::Tag); + let type_arg_pos = ctx.ref_field(AstProp::TypeArguments); + let quasi_pos = ctx.ref_field(AstProp::Quasi); + let pos = ctx.commit_schema(raw); + + let tag = serialize_expr(ctx, &node.tag, pos); + + let type_param_id = node + .type_params + .clone() + .map(|params| serialize_ts_param_inst(ctx, params.as_ref(), pos)); + let quasi = serialize_expr(ctx, &Expr::Tpl(*node.tpl.clone()), pos); + + ctx.write_ref(tag_pos, tag); + ctx.write_maybe_ref(type_arg_pos, type_param_id); + ctx.write_ref(quasi_pos, quasi); + + pos + } + Expr::Arrow(node) => { + let raw = + ctx.header(AstNode::ArrowFunctionExpression, parent, &node.span); + let async_pos = ctx.bool_field(AstProp::Async); + let gen_pos = ctx.bool_field(AstProp::Generator); + let type_param_pos = ctx.ref_field(AstProp::TypeParameters); + let params_pos = ctx.ref_vec_field(AstProp::Params, node.params.len()); + let body_pos = ctx.ref_field(AstProp::Body); + let return_type_pos = ctx.ref_field(AstProp::ReturnType); + let pos = ctx.commit_schema(raw); + + let type_param = + maybe_serialize_ts_type_param(ctx, &node.type_params, pos); + + let params = node + .params + .iter() + .map(|param| serialize_pat(ctx, param, pos)) + .collect::>(); + + let body = match node.body.as_ref() { + BlockStmtOrExpr::BlockStmt(block_stmt) => { + serialize_stmt(ctx, &Stmt::Block(block_stmt.clone()), pos) + } + BlockStmtOrExpr::Expr(expr) => serialize_expr(ctx, expr.as_ref(), pos), + }; + + let return_type = + maybe_serialize_ts_type_ann(ctx, &node.return_type, pos); + + ctx.write_bool(async_pos, node.is_async); + ctx.write_bool(gen_pos, node.is_generator); + ctx.write_maybe_ref(type_param_pos, type_param); + ctx.write_refs(params_pos, params); + ctx.write_ref(body_pos, body); + ctx.write_maybe_ref(return_type_pos, return_type); + + pos + } + Expr::Class(node) => { + // FIXME + let raw = ctx.header(AstNode::ClassExpression, parent, &node.class.span); + ctx.commit_schema(raw) + } + Expr::Yield(node) => { + let raw = ctx.header(AstNode::YieldExpression, parent, &node.span); + let delegate_pos = ctx.bool_field(AstProp::Delegate); + let arg_pos = ctx.ref_field(AstProp::Argument); + let pos = ctx.commit_schema(raw); + + let arg = node + .arg + .as_ref() + .map(|arg| serialize_expr(ctx, arg.as_ref(), pos)); + + ctx.write_bool(delegate_pos, node.delegate); + ctx.write_maybe_ref(arg_pos, arg); + + pos + } + Expr::MetaProp(node) => { + let raw = ctx.header(AstNode::MetaProp, parent, &node.span); + ctx.commit_schema(raw) + } + Expr::Await(node) => { + let raw = ctx.header(AstNode::AwaitExpression, parent, &node.span); + let arg_pos = ctx.ref_field(AstProp::Argument); + let pos = ctx.commit_schema(raw); + + let arg = serialize_expr(ctx, node.arg.as_ref(), pos); + + ctx.write_ref(arg_pos, arg); + + pos + } + Expr::Paren(node) => { + // Paren nodes are treated as a syntax only thing in TSEStree + // and are never materialized to actual AST nodes. + serialize_expr(ctx, &node.expr, parent) + } + Expr::JSXMember(node) => serialize_jsx_member_expr(ctx, node, parent), + Expr::JSXNamespacedName(node) => { + serialize_jsx_namespaced_name(ctx, node, parent) + } + Expr::JSXEmpty(node) => serialize_jsx_empty_expr(ctx, node, parent), + Expr::JSXElement(node) => serialize_jsx_element(ctx, node, parent), + Expr::JSXFragment(node) => serialize_jsx_fragment(ctx, node, parent), + Expr::TsTypeAssertion(node) => { + let raw = ctx.header(AstNode::TSTypeAssertion, parent, &node.span); + let expr_pos = ctx.ref_field(AstProp::Expression); + let type_ann_pos = ctx.ref_field(AstProp::TypeAnnotation); + let pos = ctx.commit_schema(raw); + + let expr = serialize_expr(ctx, &node.expr, parent); + let type_ann = serialize_ts_type(ctx, &node.type_ann, pos); + + ctx.write_ref(expr_pos, expr); + ctx.write_ref(type_ann_pos, type_ann); + + pos + } + Expr::TsConstAssertion(node) => { + let raw = ctx.header(AstNode::TsConstAssertion, parent, &node.span); + let arg_pos = ctx.ref_field(AstProp::Argument); + let pos = ctx.commit_schema(raw); + + let arg = serialize_expr(ctx, node.expr.as_ref(), pos); + + // FIXME + ctx.write_ref(arg_pos, arg); + + pos + } + Expr::TsNonNull(node) => { + let raw = ctx.header(AstNode::TSNonNullExpression, parent, &node.span); + let expr_pos = ctx.ref_field(AstProp::Expression); + let pos = ctx.commit_schema(raw); + + let expr_id = serialize_expr(ctx, node.expr.as_ref(), pos); + + ctx.write_ref(expr_pos, expr_id); + + pos + } + Expr::TsAs(node) => { + let raw = ctx.header(AstNode::TSAsExpression, parent, &node.span); + let expr_pos = ctx.ref_field(AstProp::Expression); + let type_ann_pos = ctx.ref_field(AstProp::TypeAnnotation); + let pos = ctx.commit_schema(raw); + + let expr = serialize_expr(ctx, node.expr.as_ref(), pos); + let type_ann = serialize_ts_type(ctx, node.type_ann.as_ref(), pos); + + ctx.write_ref(expr_pos, expr); + ctx.write_ref(type_ann_pos, type_ann); + + pos + } + Expr::TsInstantiation(node) => { + let raw = ctx.header(AstNode::TsInstantiation, parent, &node.span); + let expr_pos = ctx.ref_field(AstProp::Expression); + let type_args_pos = ctx.ref_field(AstProp::TypeArguments); + let pos = ctx.commit_schema(raw); + + let expr = serialize_expr(ctx, node.expr.as_ref(), pos); + + let type_arg = serialize_ts_param_inst(ctx, node.type_args.as_ref(), pos); + + ctx.write_ref(expr_pos, expr); + ctx.write_ref(type_args_pos, type_arg); + + pos + } + Expr::TsSatisfies(node) => { + let raw = ctx.header(AstNode::TSSatisfiesExpression, parent, &node.span); + let expr_pos = ctx.ref_field(AstProp::Expression); + let type_ann_pos = ctx.ref_field(AstProp::TypeAnnotation); + let pos = ctx.commit_schema(raw); + + let epxr = serialize_expr(ctx, node.expr.as_ref(), pos); + let type_ann = serialize_ts_type(ctx, node.type_ann.as_ref(), pos); + + ctx.write_ref(expr_pos, epxr); + ctx.write_ref(type_ann_pos, type_ann); + + pos + } + Expr::PrivateName(node) => serialize_private_name(ctx, node, parent), + Expr::OptChain(node) => { + let raw = ctx.header(AstNode::ChainExpression, parent, &node.span); + let arg_pos = ctx.ref_field(AstProp::Argument); + let pos = ctx.commit_schema(raw); + + let arg = match node.base.as_ref() { + OptChainBase::Member(member_expr) => { + serialize_member_expr(ctx, member_expr, pos, true) + } + OptChainBase::Call(opt_call) => { + let raw = ctx.header(AstNode::CallExpression, pos, &opt_call.span); + let opt_pos = ctx.bool_field(AstProp::Optional); + let callee_pos = ctx.ref_field(AstProp::Callee); + let type_args_pos = ctx.ref_field(AstProp::TypeArguments); + let args_pos = + ctx.ref_vec_field(AstProp::Arguments, opt_call.args.len()); + let call_pos = ctx.commit_schema(raw); + + let callee = serialize_expr(ctx, &opt_call.callee, pos); + + let type_param_id = opt_call.type_args.clone().map(|params| { + serialize_ts_param_inst(ctx, params.as_ref(), call_pos) + }); + + let args = opt_call + .args + .iter() + .map(|arg| serialize_expr_or_spread(ctx, arg, pos)) + .collect::>(); + + ctx.write_bool(opt_pos, true); + ctx.write_ref(callee_pos, callee); + ctx.write_maybe_ref(type_args_pos, type_param_id); + ctx.write_refs(args_pos, args); + + call_pos + } + }; + + ctx.write_ref(arg_pos, arg); + + pos + } + Expr::Invalid(_) => { + unreachable!() + } + } +} + +fn serialize_prop_or_spread( + ctx: &mut TsEsTreeBuilder, + prop: &PropOrSpread, + parent: NodeRef, +) -> NodeRef { + match prop { + PropOrSpread::Spread(spread_element) => serialize_spread( + ctx, + spread_element.expr.as_ref(), + &spread_element.dot3_token, + parent, + ), + PropOrSpread::Prop(prop) => { + let raw = ctx.header(AstNode::Property, parent, &prop.span()); + + let shorthand_pos = ctx.bool_field(AstProp::Shorthand); + let computed_pos = ctx.bool_field(AstProp::Computed); + let method_pos = ctx.bool_field(AstProp::Method); + let kind_pos = ctx.str_field(AstProp::Kind); + let key_pos = ctx.ref_field(AstProp::Key); + let value_pos = ctx.ref_field(AstProp::Value); + let pos = ctx.commit_schema(raw); + + let mut shorthand = false; + let mut computed = false; + let mut method = false; + let mut kind = "init"; + + // FIXME: optional + let (key_id, value_id) = match prop.as_ref() { + Prop::Shorthand(ident) => { + shorthand = true; + + let value = serialize_ident(ctx, ident, pos); + (value, value) + } + Prop::KeyValue(key_value_prop) => { + if let PropName::Computed(_) = key_value_prop.key { + computed = true; + } + + let key = serialize_prop_name(ctx, &key_value_prop.key, pos); + let value = serialize_expr(ctx, key_value_prop.value.as_ref(), pos); + + (key, value) + } + Prop::Assign(assign_prop) => { + let raw = + ctx.header(AstNode::AssignmentPattern, pos, &assign_prop.span); + let left_pos = ctx.ref_field(AstProp::Left); + let right_pos = ctx.ref_field(AstProp::Right); + let child_pos = ctx.commit_schema(raw); + + let left = serialize_ident(ctx, &assign_prop.key, child_pos); + let right = + serialize_expr(ctx, assign_prop.value.as_ref(), child_pos); + + ctx.write_ref(left_pos, left); + ctx.write_ref(right_pos, right); + + (left, child_pos) + } + Prop::Getter(getter_prop) => { + kind = "get"; + + let key = serialize_prop_name(ctx, &getter_prop.key, pos); + + let value = serialize_expr( + ctx, + &Expr::Fn(FnExpr { + ident: None, + function: Box::new(Function { + params: vec![], + decorators: vec![], + span: getter_prop.span, + ctxt: SyntaxContext::empty(), + body: getter_prop.body.clone(), + is_generator: false, + is_async: false, + type_params: None, // FIXME + return_type: None, + }), + }), + pos, + ); + + (key, value) + } + Prop::Setter(setter_prop) => { + kind = "set"; + + let key_id = serialize_prop_name(ctx, &setter_prop.key, pos); + + let param = Param::from(*setter_prop.param.clone()); + + let value_id = serialize_expr( + ctx, + &Expr::Fn(FnExpr { + ident: None, + function: Box::new(Function { + params: vec![param], + decorators: vec![], + span: setter_prop.span, + ctxt: SyntaxContext::empty(), + body: setter_prop.body.clone(), + is_generator: false, + is_async: false, + type_params: None, + return_type: None, + }), + }), + pos, + ); + + (key_id, value_id) + } + Prop::Method(method_prop) => { + method = true; + + let key_id = serialize_prop_name(ctx, &method_prop.key, pos); + + let value_id = serialize_expr( + ctx, + &Expr::Fn(FnExpr { + ident: None, + function: method_prop.function.clone(), + }), + pos, + ); + + (key_id, value_id) + } + }; + + ctx.write_bool(shorthand_pos, shorthand); + ctx.write_bool(computed_pos, computed); + ctx.write_bool(method_pos, method); + ctx.write_str(kind_pos, kind); + ctx.write_ref(key_pos, key_id); + ctx.write_ref(value_pos, value_id); + + pos + } + } +} + +fn serialize_member_expr( + ctx: &mut TsEsTreeBuilder, + node: &MemberExpr, + parent: NodeRef, + optional: bool, +) -> NodeRef { + let raw = ctx.header(AstNode::MemberExpression, parent, &node.span); + let opt_pos = ctx.bool_field(AstProp::Optional); + let computed_pos = ctx.bool_field(AstProp::Computed); + let obj_pos = ctx.ref_field(AstProp::Object); + let prop_pos = ctx.ref_field(AstProp::Property); + let pos = ctx.commit_schema(raw); + + let obj = serialize_expr(ctx, node.obj.as_ref(), pos); + + let mut computed = false; + + let prop = match &node.prop { + MemberProp::Ident(ident_name) => serialize_ident_name(ctx, ident_name, pos), + MemberProp::PrivateName(private_name) => { + serialize_private_name(ctx, private_name, pos) + } + MemberProp::Computed(computed_prop_name) => { + computed = true; + serialize_expr(ctx, computed_prop_name.expr.as_ref(), pos) + } + }; + + ctx.write_bool(opt_pos, optional); + ctx.write_bool(computed_pos, computed); + ctx.write_ref(obj_pos, obj); + ctx.write_ref(prop_pos, prop); + + pos +} + +fn serialize_class_member( + ctx: &mut TsEsTreeBuilder, + member: &ClassMember, + parent: NodeRef, +) -> NodeRef { + match member { + ClassMember::Constructor(constructor) => { + let raw = + ctx.header(AstNode::MethodDefinition, parent, &constructor.span); + let key_pos = ctx.ref_field(AstProp::Key); + let body_pos = ctx.ref_field(AstProp::Body); + let args_pos = + ctx.ref_vec_field(AstProp::Arguments, constructor.params.len()); + let acc_pos = if constructor.accessibility.is_some() { + NodePos::Str(ctx.str_field(AstProp::Accessibility)) + } else { + NodePos::Undef(ctx.undefined_field(AstProp::Accessibility)) + }; + let member_id = ctx.commit_schema(raw); + + // FIXME flags + + let key = serialize_prop_name(ctx, &constructor.key, member_id); + let body = constructor + .body + .as_ref() + .map(|body| serialize_stmt(ctx, &Stmt::Block(body.clone()), member_id)); + + let params = constructor + .params + .iter() + .map(|param| match param { + ParamOrTsParamProp::TsParamProp(_) => { + todo!() + } + ParamOrTsParamProp::Param(param) => { + serialize_pat(ctx, ¶m.pat, member_id) + } + }) + .collect::>(); + + if let Some(acc) = constructor.accessibility { + if let NodePos::Str(str_pos) = acc_pos { + ctx.write_str(str_pos, &accessibility_to_str(acc)); + } + } + + ctx.write_ref(key_pos, key); + ctx.write_maybe_ref(body_pos, body); + // FIXME + ctx.write_refs(args_pos, params); + + member_id + } + ClassMember::Method(method) => { + let raw = ctx.header(AstNode::MethodDefinition, parent, &method.span); + + let member_id = ctx.commit_schema(raw); + + // let mut flags = FlagValue::new(); + // flags.set(Flag::ClassMethod); + if method.function.is_async { + // FIXME + } + + // accessibility_to_flag(&mut flags, method.accessibility); + + let _key_id = serialize_prop_name(ctx, &method.key, member_id); + + let _body_id = + method.function.body.as_ref().map(|body| { + serialize_stmt(ctx, &Stmt::Block(body.clone()), member_id) + }); + + let _params = method + .function + .params + .iter() + .map(|param| serialize_pat(ctx, ¶m.pat, member_id)) + .collect::>(); + + // ctx.write_node(member_id, ); + // ctx.write_flags(&flags); + // ctx.write_id(key_id); + // ctx.write_id(body_id); + // ctx.write_ids(AstProp::Params, params); + + member_id + } + ClassMember::PrivateMethod(_) => todo!(), + ClassMember::ClassProp(_) => todo!(), + ClassMember::PrivateProp(_) => todo!(), + ClassMember::TsIndexSignature(member) => { + serialize_ts_index_sig(ctx, member, parent) + } + ClassMember::Empty(_) => unreachable!(), + ClassMember::StaticBlock(_) => todo!(), + ClassMember::AutoAccessor(_) => todo!(), + } +} + +fn serialize_expr_or_spread( + ctx: &mut TsEsTreeBuilder, + arg: &ExprOrSpread, + parent: NodeRef, +) -> NodeRef { + if let Some(spread) = &arg.spread { + serialize_spread(ctx, &arg.expr, spread, parent) + } else { + serialize_expr(ctx, arg.expr.as_ref(), parent) + } +} + +fn serialize_ident( + ctx: &mut TsEsTreeBuilder, + ident: &Ident, + parent: NodeRef, +) -> NodeRef { + let raw = ctx.header(AstNode::Identifier, parent, &ident.span); + let name_pos = ctx.str_field(AstProp::Name); + let pos = ctx.commit_schema(raw); + + ctx.write_str(name_pos, ident.sym.as_str()); + + pos +} + +fn serialize_module_exported_name( + ctx: &mut TsEsTreeBuilder, + name: &ModuleExportName, + parent: NodeRef, +) -> NodeRef { + match &name { + ModuleExportName::Ident(ident) => serialize_ident(ctx, ident, parent), + ModuleExportName::Str(lit) => { + serialize_lit(ctx, &Lit::Str(lit.clone()), parent) + } + } +} + +fn serialize_decl( + ctx: &mut TsEsTreeBuilder, + decl: &Decl, + parent: NodeRef, +) -> NodeRef { + match decl { + Decl::Class(node) => { + let raw = ctx.header(AstNode::ClassDeclaration, parent, &node.class.span); + let declare_pos = ctx.bool_field(AstProp::Declare); + let abstract_pos = ctx.bool_field(AstProp::Abstract); + let id_pos = ctx.ref_field(AstProp::Id); + let body_pos = ctx.ref_field(AstProp::Body); + let type_params_pos = ctx.ref_field(AstProp::TypeParameters); + let super_pos = ctx.ref_field(AstProp::SuperClass); + let super_type_pos = ctx.ref_field(AstProp::SuperTypeArguments); + let impl_pos = + ctx.ref_vec_field(AstProp::Implements, node.class.implements.len()); + let id = ctx.commit_schema(raw); + + let body_raw = ctx.header(AstNode::ClassBody, id, &node.class.span); + let body_body_pos = + ctx.ref_vec_field(AstProp::Body, node.class.body.len()); + let body_id = ctx.commit_schema(body_raw); + + let ident = serialize_ident(ctx, &node.ident, id); + let type_params = + maybe_serialize_ts_type_param(ctx, &node.class.type_params, id); + + let super_class = node + .class + .super_class + .as_ref() + .map(|super_class| serialize_expr(ctx, super_class, id)); + + let super_type_params = node + .class + .super_type_params + .as_ref() + .map(|super_params| serialize_ts_param_inst(ctx, super_params, id)); + + let implement_ids = node + .class + .implements + .iter() + .map(|implements| { + let raw = + ctx.header(AstNode::TSClassImplements, id, &implements.span); + + let expr_pos = ctx.ref_field(AstProp::Expression); + let type_args_pos = ctx.ref_field(AstProp::TypeArguments); + let child_pos = ctx.commit_schema(raw); + + let type_args = implements + .type_args + .clone() + .map(|args| serialize_ts_param_inst(ctx, &args, child_pos)); + + let expr = serialize_expr(ctx, &implements.expr, child_pos); + + ctx.write_ref(expr_pos, expr); + ctx.write_maybe_ref(type_args_pos, type_args); + + child_pos + }) + .collect::>(); + + let member_ids = node + .class + .body + .iter() + .map(|member| serialize_class_member(ctx, member, parent)) + .collect::>(); + + ctx.write_ref(body_pos, body_id); + + ctx.write_bool(declare_pos, node.declare); + ctx.write_bool(abstract_pos, node.class.is_abstract); + ctx.write_ref(id_pos, ident); + ctx.write_maybe_ref(type_params_pos, type_params); + ctx.write_maybe_ref(super_pos, super_class); + ctx.write_maybe_ref(super_type_pos, super_type_params); + ctx.write_refs(impl_pos, implement_ids); + + // body + ctx.write_refs(body_body_pos, member_ids); + + id + } + Decl::Fn(node) => { + let raw = + ctx.header(AstNode::FunctionDeclaration, parent, &node.function.span); + let declare_pos = ctx.bool_field(AstProp::Declare); + let async_pos = ctx.bool_field(AstProp::Async); + let gen_pos = ctx.bool_field(AstProp::Generator); + let id_pos = ctx.ref_field(AstProp::Id); + let type_params_pos = ctx.ref_field(AstProp::TypeParameters); + let return_pos = ctx.ref_field(AstProp::ReturnType); + let body_pos = ctx.ref_field(AstProp::Body); + let params_pos = + ctx.ref_vec_field(AstProp::Params, node.function.params.len()); + let pos = ctx.commit_schema(raw); + + let ident_id = serialize_ident(ctx, &node.ident, parent); + let type_param_id = + maybe_serialize_ts_type_param(ctx, &node.function.type_params, pos); + let return_type = + maybe_serialize_ts_type_ann(ctx, &node.function.return_type, pos); + + let body = node + .function + .body + .as_ref() + .map(|body| serialize_stmt(ctx, &Stmt::Block(body.clone()), pos)); + + let params = node + .function + .params + .iter() + .map(|param| serialize_pat(ctx, ¶m.pat, pos)) + .collect::>(); + + ctx.write_bool(declare_pos, node.declare); + ctx.write_bool(async_pos, node.function.is_async); + ctx.write_bool(gen_pos, node.function.is_generator); + ctx.write_ref(id_pos, ident_id); + ctx.write_maybe_ref(type_params_pos, type_param_id); + ctx.write_maybe_ref(return_pos, return_type); + ctx.write_maybe_ref(body_pos, body); + ctx.write_refs(params_pos, params); + + pos + } + Decl::Var(node) => { + let raw = ctx.header(AstNode::VariableDeclaration, parent, &node.span); + let declare_pos = ctx.bool_field(AstProp::Declare); + let kind_pos = ctx.str_field(AstProp::Kind); + let decls_pos = + ctx.ref_vec_field(AstProp::Declarations, node.decls.len()); + let id = ctx.commit_schema(raw); + + let children = node + .decls + .iter() + .map(|decl| { + let raw = ctx.header(AstNode::VariableDeclarator, id, &decl.span); + let id_pos = ctx.ref_field(AstProp::Id); + let init_pos = ctx.ref_field(AstProp::Init); + let child_id = ctx.commit_schema(raw); + + // FIXME: Definite? + + let ident = serialize_pat(ctx, &decl.name, child_id); + + let init = decl + .init + .as_ref() + .map(|init| serialize_expr(ctx, init.as_ref(), child_id)); + + ctx.write_ref(id_pos, ident); + ctx.write_maybe_ref(init_pos, init); + + child_id + }) + .collect::>(); + + ctx.write_bool(declare_pos, node.declare); + ctx.write_str( + kind_pos, + match node.kind { + VarDeclKind::Var => "var", + VarDeclKind::Let => "let", + VarDeclKind::Const => "const", + }, + ); + ctx.write_refs(decls_pos, children); + + id + } + Decl::Using(_) => { + todo!(); + } + Decl::TsInterface(node) => { + let raw = ctx.header(AstNode::TSInterface, parent, &node.span); + let declare_pos = ctx.bool_field(AstProp::Declare); + let id_pos = ctx.ref_field(AstProp::Id); + let extends_pos = ctx.ref_vec_field(AstProp::Extends, node.extends.len()); + let type_param_pos = ctx.ref_field(AstProp::TypeParameters); + let body_pos = ctx.ref_field(AstProp::Body); + let pos = ctx.commit_schema(raw); + + let body_raw = ctx.header(AstNode::TSInterfaceBody, pos, &node.body.span); + let body_body_pos = + ctx.ref_vec_field(AstProp::Body, node.body.body.len()); + let body_id = ctx.commit_schema(body_raw); + + let ident_id = serialize_ident(ctx, &node.id, pos); + let type_param = + maybe_serialize_ts_type_param(ctx, &node.type_params, pos); + + let extend_ids = node + .extends + .iter() + .map(|item| { + let raw = ctx.header(AstNode::TSInterfaceHeritage, pos, &item.span); + let type_args_pos = ctx.ref_field(AstProp::TypeArguments); + let expr_pos = ctx.ref_field(AstProp::Expression); + let child_pos = ctx.commit_schema(raw); + + let expr = serialize_expr(ctx, &item.expr, child_pos); + let type_args = item.type_args.clone().map(|params| { + serialize_ts_param_inst(ctx, params.as_ref(), child_pos) + }); + + ctx.write_ref(expr_pos, expr); + ctx.write_maybe_ref(type_args_pos, type_args); + + child_pos + }) + .collect::>(); + + let body_elem_ids = node + .body + .body + .iter() + .map(|item| match item { + TsTypeElement::TsCallSignatureDecl(ts_call) => { + let raw = ctx.header( + AstNode::TsCallSignatureDeclaration, + pos, + &ts_call.span, + ); + let type_ann_pos = ctx.ref_field(AstProp::TypeAnnotation); + let params_pos = + ctx.ref_vec_field(AstProp::Params, ts_call.params.len()); + let return_pos = ctx.ref_field(AstProp::ReturnType); + let item_id = ctx.commit_schema(raw); + + let type_param = + maybe_serialize_ts_type_param(ctx, &ts_call.type_params, pos); + let return_type = + maybe_serialize_ts_type_ann(ctx, &ts_call.type_ann, pos); + let params = ts_call + .params + .iter() + .map(|param| serialize_ts_fn_param(ctx, param, pos)) + .collect::>(); + + ctx.write_maybe_ref(type_ann_pos, type_param); + ctx.write_refs(params_pos, params); + ctx.write_maybe_ref(return_pos, return_type); + + item_id + } + TsTypeElement::TsConstructSignatureDecl(_) => todo!(), + TsTypeElement::TsPropertySignature(sig) => { + let raw = ctx.header(AstNode::TSPropertySignature, pos, &sig.span); + + let computed_pos = ctx.bool_field(AstProp::Computed); + let optional_pos = ctx.bool_field(AstProp::Optional); + let readonly_pos = ctx.bool_field(AstProp::Readonly); + // TODO: where is this coming from? + let _static_bos = ctx.bool_field(AstProp::Static); + let key_pos = ctx.ref_field(AstProp::Key); + let type_ann_pos = ctx.ref_field(AstProp::TypeAnnotation); + let item_pos = ctx.commit_schema(raw); + + let key = serialize_expr(ctx, &sig.key, item_pos); + let type_ann = + maybe_serialize_ts_type_ann(ctx, &sig.type_ann, item_pos); + + ctx.write_bool(computed_pos, sig.computed); + ctx.write_bool(optional_pos, sig.optional); + ctx.write_bool(readonly_pos, sig.readonly); + ctx.write_ref(key_pos, key); + ctx.write_maybe_ref(type_ann_pos, type_ann); + + item_pos + } + TsTypeElement::TsGetterSignature(sig) => { + let raw = ctx.header(AstNode::TSMethodSignature, pos, &sig.span); + let computed_pos = ctx.bool_field(AstProp::Computed); + let optional_pos = ctx.bool_field(AstProp::Optional); + let readonly_pos = ctx.bool_field(AstProp::Readonly); + // TODO: where is this coming from? + let _static_bos = ctx.bool_field(AstProp::Static); + let kind_pos = ctx.str_field(AstProp::Kind); + let key_pos = ctx.ref_field(AstProp::Key); + let return_type_pos = ctx.ref_field(AstProp::ReturnType); + let item_pos = ctx.commit_schema(raw); + + let key = serialize_expr(ctx, sig.key.as_ref(), item_pos); + let return_type = + maybe_serialize_ts_type_ann(ctx, &sig.type_ann, item_pos); + + ctx.write_bool(computed_pos, false); + ctx.write_bool(optional_pos, false); + ctx.write_bool(readonly_pos, false); + ctx.write_str(kind_pos, "getter"); + ctx.write_maybe_ref(return_type_pos, return_type); + ctx.write_ref(key_pos, key); + + item_pos + } + TsTypeElement::TsSetterSignature(sig) => { + let raw = ctx.header(AstNode::TSMethodSignature, pos, &sig.span); + let computed_pos = ctx.bool_field(AstProp::Computed); + let optional_pos = ctx.bool_field(AstProp::Optional); + let readonly_pos = ctx.bool_field(AstProp::Readonly); + // TODO: where is this coming from? + let _static_bos = ctx.bool_field(AstProp::Static); + let kind_pos = ctx.str_field(AstProp::Kind); + let key_pos = ctx.ref_field(AstProp::Key); + let params_pos = ctx.ref_vec_field(AstProp::Params, 1); + let item_pos = ctx.commit_schema(raw); + + let key = serialize_expr(ctx, sig.key.as_ref(), item_pos); + let params = serialize_ts_fn_param(ctx, &sig.param, item_pos); + + ctx.write_bool(computed_pos, false); + ctx.write_bool(optional_pos, false); + ctx.write_bool(readonly_pos, false); + ctx.write_str(kind_pos, "setter"); + ctx.write_ref(key_pos, key); + ctx.write_refs(params_pos, vec![params]); + + item_pos + } + TsTypeElement::TsMethodSignature(sig) => { + let raw = ctx.header(AstNode::TSMethodSignature, pos, &sig.span); + let computed_pos = ctx.bool_field(AstProp::Computed); + let optional_pos = ctx.bool_field(AstProp::Optional); + let readonly_pos = ctx.bool_field(AstProp::Readonly); + // TODO: where is this coming from? + let _static_bos = ctx.bool_field(AstProp::Static); + let kind_pos = ctx.str_field(AstProp::Kind); + let key_pos = ctx.ref_field(AstProp::Key); + let params_pos = + ctx.ref_vec_field(AstProp::Params, sig.params.len()); + let return_type_pos = ctx.ref_field(AstProp::ReturnType); + let item_pos = ctx.commit_schema(raw); + + let key = serialize_expr(ctx, sig.key.as_ref(), item_pos); + let params = sig + .params + .iter() + .map(|param| serialize_ts_fn_param(ctx, param, item_pos)) + .collect::>(); + let return_type = + maybe_serialize_ts_type_ann(ctx, &sig.type_ann, item_pos); + + ctx.write_bool(computed_pos, false); + ctx.write_bool(optional_pos, false); + ctx.write_bool(readonly_pos, false); + ctx.write_str(kind_pos, "method"); + ctx.write_ref(key_pos, key); + ctx.write_refs(params_pos, params); + ctx.write_maybe_ref(return_type_pos, return_type); + + item_pos + } + TsTypeElement::TsIndexSignature(sig) => { + serialize_ts_index_sig(ctx, sig, pos) + } + }) + .collect::>(); + + ctx.write_bool(declare_pos, node.declare); + ctx.write_ref(id_pos, ident_id); + ctx.write_maybe_ref(type_param_pos, type_param); + ctx.write_refs(extends_pos, extend_ids); + ctx.write_ref(body_pos, body_id); + + // Body + ctx.write_refs(body_body_pos, body_elem_ids); + + pos + } + Decl::TsTypeAlias(node) => { + let raw = ctx.header(AstNode::TsTypeAlias, parent, &node.span); + let declare_pos = ctx.bool_field(AstProp::Declare); + let id_pos = ctx.ref_field(AstProp::Id); + let type_params_pos = ctx.ref_field(AstProp::TypeParameters); + let type_ann_pos = ctx.ref_field(AstProp::TypeAnnotation); + let pos = ctx.commit_schema(raw); + + let ident = serialize_ident(ctx, &node.id, pos); + let type_ann = serialize_ts_type(ctx, &node.type_ann, pos); + let type_param = + maybe_serialize_ts_type_param(ctx, &node.type_params, pos); + + ctx.write_bool(declare_pos, node.declare); + ctx.write_ref(id_pos, ident); + ctx.write_maybe_ref(type_params_pos, type_param); + ctx.write_ref(type_ann_pos, type_ann); + + pos + } + Decl::TsEnum(node) => { + let raw = ctx.header(AstNode::TSEnumDeclaration, parent, &node.span); + let declare_pos = ctx.bool_field(AstProp::Declare); + let const_pos = ctx.bool_field(AstProp::Const); + let id_pos = ctx.ref_field(AstProp::Id); + let body_pos = ctx.ref_field(AstProp::Body); + let pos = ctx.commit_schema(raw); + + let body_raw = ctx.header(AstNode::TSEnumBody, pos, &node.span); + let members_pos = ctx.ref_vec_field(AstProp::Members, node.members.len()); + let body = ctx.commit_schema(body_raw); + + let ident_id = serialize_ident(ctx, &node.id, parent); + + let members = node + .members + .iter() + .map(|member| { + let raw = ctx.header(AstNode::TSEnumMember, body, &member.span); + let id_pos = ctx.ref_field(AstProp::Id); + let init_pos = ctx.ref_field(AstProp::Initializer); + let member_id = ctx.commit_schema(raw); + + let ident = match &member.id { + TsEnumMemberId::Ident(ident) => { + serialize_ident(ctx, ident, member_id) + } + TsEnumMemberId::Str(lit_str) => { + serialize_lit(ctx, &Lit::Str(lit_str.clone()), member_id) + } + }; + + let init = member + .init + .as_ref() + .map(|init| serialize_expr(ctx, init, member_id)); + + ctx.write_ref(id_pos, ident); + ctx.write_maybe_ref(init_pos, init); + + member_id + }) + .collect::>(); + + ctx.write_refs(members_pos, members); + + ctx.write_bool(declare_pos, node.declare); + ctx.write_bool(const_pos, node.is_const); + ctx.write_ref(id_pos, ident_id); + ctx.write_ref(body_pos, body); + + pos + } + Decl::TsModule(ts_module_decl) => { + let raw = ctx.header(AstNode::TsModule, parent, &ts_module_decl.span); + ctx.commit_schema(raw) + } + } +} + +fn serialize_ts_index_sig( + ctx: &mut TsEsTreeBuilder, + node: &TsIndexSignature, + parent: NodeRef, +) -> NodeRef { + let raw = ctx.header(AstNode::TSMethodSignature, parent, &node.span); + let readonly_pos = ctx.bool_field(AstProp::Readonly); + // TODO: where is this coming from? + let static_pos = ctx.bool_field(AstProp::Static); + let params_pos = ctx.ref_vec_field(AstProp::Params, node.params.len()); + let type_ann_pos = ctx.ref_field(AstProp::TypeAnnotation); + let pos = ctx.commit_schema(raw); + + let type_ann = maybe_serialize_ts_type_ann(ctx, &node.type_ann, pos); + + let params = node + .params + .iter() + .map(|param| serialize_ts_fn_param(ctx, param, pos)) + .collect::>(); + + ctx.write_bool(readonly_pos, false); + ctx.write_bool(static_pos, node.is_static); + ctx.write_refs(params_pos, params); + ctx.write_maybe_ref(type_ann_pos, type_ann); + + pos +} + +fn accessibility_to_str(accessibility: Accessibility) -> String { + match accessibility { + Accessibility::Public => "public".to_string(), + Accessibility::Protected => "protected".to_string(), + Accessibility::Private => "private".to_string(), + } +} + +fn serialize_private_name( + ctx: &mut TsEsTreeBuilder, + node: &PrivateName, + parent: NodeRef, +) -> NodeRef { + let raw = ctx.header(AstNode::PrivateIdentifier, parent, &node.span); + let name_pos = ctx.str_field(AstProp::Name); + let pos = ctx.commit_schema(raw); + + ctx.write_str(name_pos, node.name.as_str()); + + pos +} + +fn serialize_jsx_element( + ctx: &mut TsEsTreeBuilder, + node: &JSXElement, + parent: NodeRef, +) -> NodeRef { + let raw = ctx.header(AstNode::JSXElement, parent, &node.span); + let open_pos = ctx.ref_field(AstProp::OpeningElement); + let close_pos = ctx.ref_field(AstProp::ClosingElement); + let children_pos = ctx.ref_vec_field(AstProp::Children, node.children.len()); + let pos = ctx.commit_schema(raw); + + let open = serialize_jsx_opening_element(ctx, &node.opening, pos); + + let close = node.closing.as_ref().map(|closing| { + let raw = ctx.header(AstNode::JSXClosingElement, pos, &closing.span); + let name_pos = ctx.ref_field(AstProp::Name); + let closing_pos = ctx.commit_schema(raw); + + let name = serialize_jsx_element_name(ctx, &closing.name, closing_pos); + ctx.write_ref(name_pos, name); + + closing_pos + }); + + let children = serialize_jsx_children(ctx, &node.children, pos); + + ctx.write_ref(open_pos, open); + ctx.write_maybe_ref(close_pos, close); + ctx.write_refs(children_pos, children); + + pos +} + +fn serialize_jsx_fragment( + ctx: &mut TsEsTreeBuilder, + node: &JSXFragment, + parent: NodeRef, +) -> NodeRef { + let raw = ctx.header(AstNode::JSXFragment, parent, &node.span); + + let opening_pos = ctx.ref_field(AstProp::OpeningFragment); + let closing_pos = ctx.ref_field(AstProp::ClosingFragment); + let children_pos = ctx.ref_vec_field(AstProp::Children, node.children.len()); + let pos = ctx.commit_schema(raw); + + let raw = ctx.header(AstNode::JSXOpeningFragment, pos, &node.opening.span); + let opening_id = ctx.commit_schema(raw); + + let raw = ctx.header(AstNode::JSXClosingFragment, pos, &node.closing.span); + let closing_id = ctx.commit_schema(raw); + + let children = serialize_jsx_children(ctx, &node.children, pos); + + ctx.write_ref(opening_pos, opening_id); + ctx.write_ref(closing_pos, closing_id); + ctx.write_refs(children_pos, children); + + pos +} + +fn serialize_jsx_children( + ctx: &mut TsEsTreeBuilder, + children: &[JSXElementChild], + parent: NodeRef, +) -> Vec { + children + .iter() + .map(|child| { + match child { + JSXElementChild::JSXText(text) => { + let raw = ctx.header(AstNode::JSXText, parent, &text.span); + let raw_pos = ctx.str_field(AstProp::Raw); + let value_pos = ctx.str_field(AstProp::Value); + let pos = ctx.commit_schema(raw); + + ctx.write_str(raw_pos, &text.raw); + ctx.write_str(value_pos, &text.value); + + pos + } + JSXElementChild::JSXExprContainer(container) => { + serialize_jsx_container_expr(ctx, container, parent) + } + JSXElementChild::JSXElement(el) => { + serialize_jsx_element(ctx, el, parent) + } + JSXElementChild::JSXFragment(frag) => { + serialize_jsx_fragment(ctx, frag, parent) + } + // No parser supports this + JSXElementChild::JSXSpreadChild(_) => unreachable!(), + } + }) + .collect::>() +} + +fn serialize_jsx_member_expr( + ctx: &mut TsEsTreeBuilder, + node: &JSXMemberExpr, + parent: NodeRef, +) -> NodeRef { + let raw = ctx.header(AstNode::JSXMemberExpression, parent, &node.span); + let obj_ref = ctx.ref_field(AstProp::Object); + let prop_ref = ctx.ref_field(AstProp::Property); + let pos = ctx.commit_schema(raw); + + let obj = match &node.obj { + JSXObject::JSXMemberExpr(member) => { + serialize_jsx_member_expr(ctx, member, pos) + } + JSXObject::Ident(ident) => serialize_jsx_identifier(ctx, ident, parent), + }; + + let prop = serialize_ident_name_as_jsx_identifier(ctx, &node.prop, pos); + + ctx.write_ref(obj_ref, obj); + ctx.write_ref(prop_ref, prop); + + pos +} + +fn serialize_jsx_element_name( + ctx: &mut TsEsTreeBuilder, + node: &JSXElementName, + parent: NodeRef, +) -> NodeRef { + match &node { + JSXElementName::Ident(ident) => { + serialize_jsx_identifier(ctx, ident, parent) + } + JSXElementName::JSXMemberExpr(member) => { + serialize_jsx_member_expr(ctx, member, parent) + } + JSXElementName::JSXNamespacedName(ns) => { + serialize_jsx_namespaced_name(ctx, ns, parent) + } + } +} + +fn serialize_jsx_opening_element( + ctx: &mut TsEsTreeBuilder, + node: &JSXOpeningElement, + parent: NodeRef, +) -> NodeRef { + let raw = ctx.header(AstNode::JSXOpeningElement, parent, &node.span); + let sclose_pos = ctx.bool_field(AstProp::SelfClosing); + let name_pos = ctx.ref_field(AstProp::Name); + let attrs_pos = ctx.ref_vec_field(AstProp::Attributes, node.attrs.len()); + let pos = ctx.commit_schema(raw); + + let name = serialize_jsx_element_name(ctx, &node.name, pos); + + // FIXME: type args + + let attrs = node + .attrs + .iter() + .map(|attr| match attr { + JSXAttrOrSpread::JSXAttr(attr) => { + let raw = ctx.header(AstNode::JSXAttribute, pos, &attr.span); + let name_pos = ctx.ref_field(AstProp::Name); + let value_pos = ctx.ref_field(AstProp::Value); + let attr_pos = ctx.commit_schema(raw); + + let name = match &attr.name { + JSXAttrName::Ident(name) => { + serialize_ident_name_as_jsx_identifier(ctx, name, attr_pos) + } + JSXAttrName::JSXNamespacedName(node) => { + serialize_jsx_namespaced_name(ctx, node, attr_pos) + } + }; + + let value = attr.value.as_ref().map(|value| match value { + JSXAttrValue::Lit(lit) => serialize_lit(ctx, lit, attr_pos), + JSXAttrValue::JSXExprContainer(container) => { + serialize_jsx_container_expr(ctx, container, attr_pos) + } + JSXAttrValue::JSXElement(el) => { + serialize_jsx_element(ctx, el, attr_pos) + } + JSXAttrValue::JSXFragment(frag) => { + serialize_jsx_fragment(ctx, frag, attr_pos) + } + }); + + ctx.write_ref(name_pos, name); + ctx.write_maybe_ref(value_pos, value); + + attr_pos + } + JSXAttrOrSpread::SpreadElement(spread) => { + let raw = ctx.header(AstNode::JSXAttribute, pos, &spread.dot3_token); + let arg_pos = ctx.ref_field(AstProp::Argument); + let attr_pos = ctx.commit_schema(raw); + + let arg = serialize_expr(ctx, &spread.expr, attr_pos); + + ctx.write_ref(arg_pos, arg); + + attr_pos + } + }) + .collect::>(); + + ctx.write_bool(sclose_pos, node.self_closing); + ctx.write_ref(name_pos, name); + ctx.write_refs(attrs_pos, attrs); + + pos +} + +fn serialize_jsx_container_expr( + ctx: &mut TsEsTreeBuilder, + node: &JSXExprContainer, + parent: NodeRef, +) -> NodeRef { + let raw = ctx.header(AstNode::JSXExpressionContainer, parent, &node.span); + let expr_pos = ctx.ref_field(AstProp::Expression); + let pos = ctx.commit_schema(raw); + + let expr = match &node.expr { + JSXExpr::JSXEmptyExpr(expr) => serialize_jsx_empty_expr(ctx, expr, pos), + JSXExpr::Expr(expr) => serialize_expr(ctx, expr, pos), + }; + + ctx.write_ref(expr_pos, expr); + + pos +} + +fn serialize_jsx_empty_expr( + ctx: &mut TsEsTreeBuilder, + node: &JSXEmptyExpr, + parent: NodeRef, +) -> NodeRef { + let raw = ctx.header(AstNode::JSXEmptyExpression, parent, &node.span); + ctx.commit_schema(raw) +} + +fn serialize_jsx_namespaced_name( + ctx: &mut TsEsTreeBuilder, + node: &JSXNamespacedName, + parent: NodeRef, +) -> NodeRef { + let raw = ctx.header(AstNode::JSXNamespacedName, parent, &node.span); + let ns_pos = ctx.ref_field(AstProp::Namespace); + let name_pos = ctx.ref_field(AstProp::Name); + let pos = ctx.commit_schema(raw); + + let ns_id = serialize_ident_name_as_jsx_identifier(ctx, &node.ns, pos); + let name_id = serialize_ident_name_as_jsx_identifier(ctx, &node.name, pos); + + ctx.write_ref(ns_pos, ns_id); + ctx.write_ref(name_pos, name_id); + + pos +} + +fn serialize_ident_name_as_jsx_identifier( + ctx: &mut TsEsTreeBuilder, + node: &IdentName, + parent: NodeRef, +) -> NodeRef { + let raw = ctx.header(AstNode::JSXIdentifier, parent, &node.span); + let name_pos = ctx.str_field(AstProp::Name); + let pos = ctx.commit_schema(raw); + + ctx.write_str(name_pos, &node.sym); + + pos +} + +fn serialize_jsx_identifier( + ctx: &mut TsEsTreeBuilder, + node: &Ident, + parent: NodeRef, +) -> NodeRef { + let raw = ctx.header(AstNode::JSXIdentifier, parent, &node.span); + let name_pos = ctx.str_field(AstProp::Name); + let pos = ctx.commit_schema(raw); + + ctx.write_str(name_pos, &node.sym); + + pos +} + +fn serialize_pat( + ctx: &mut TsEsTreeBuilder, + pat: &Pat, + parent: NodeRef, +) -> NodeRef { + match pat { + Pat::Ident(node) => serialize_ident(ctx, &node.id, parent), + Pat::Array(node) => { + let raw = ctx.header(AstNode::ArrayPattern, parent, &node.span); + let opt_pos = ctx.bool_field(AstProp::Optional); + let type_pos = ctx.ref_field(AstProp::TypeAnnotation); + let elems_pos = ctx.ref_vec_field(AstProp::Elements, node.elems.len()); + let pos = ctx.commit_schema(raw); + + let type_ann = maybe_serialize_ts_type_ann(ctx, &node.type_ann, pos); + + let children = node + .elems + .iter() + .map(|pat| { + pat + .as_ref() + .map_or(NodeRef(0), |v| serialize_pat(ctx, v, pos)) + }) + .collect::>(); + + ctx.write_bool(opt_pos, node.optional); + ctx.write_maybe_ref(type_pos, type_ann); + ctx.write_refs(elems_pos, children); + + pos + } + Pat::Rest(node) => { + let raw = ctx.header(AstNode::RestElement, parent, &node.span); + let type_ann_pos = ctx.ref_field(AstProp::TypeAnnotation); + let arg_pos = ctx.ref_field(AstProp::Argument); + let pos = ctx.commit_schema(raw); + + let type_ann = maybe_serialize_ts_type_ann(ctx, &node.type_ann, pos); + let arg = serialize_pat(ctx, &node.arg, parent); + + ctx.write_maybe_ref(type_ann_pos, type_ann); + ctx.write_ref(arg_pos, arg); + + pos + } + Pat::Object(node) => { + let raw = ctx.header(AstNode::ObjectPattern, parent, &node.span); + let opt_pos = ctx.bool_field(AstProp::Optional); + let props_pos = ctx.ref_vec_field(AstProp::Properties, node.props.len()); + let type_ann_pos = ctx.ref_field(AstProp::TypeAnnotation); + let pos = ctx.commit_schema(raw); + + let type_ann = maybe_serialize_ts_type_ann(ctx, &node.type_ann, pos); + + let children = node + .props + .iter() + .map(|prop| match prop { + ObjectPatProp::KeyValue(key_value_prop) => { + let raw = + ctx.header(AstNode::Property, pos, &key_value_prop.span()); + let computed_pos = ctx.bool_field(AstProp::Computed); + let key_pos = ctx.ref_field(AstProp::Key); + let value_pos = ctx.ref_field(AstProp::Value); + let child_pos = ctx.commit_schema(raw); + + let computed = matches!(key_value_prop.key, PropName::Computed(_)); + + let key = serialize_prop_name(ctx, &key_value_prop.key, child_pos); + let value = + serialize_pat(ctx, key_value_prop.value.as_ref(), child_pos); + + ctx.write_bool(computed_pos, computed); + ctx.write_ref(key_pos, key); + ctx.write_ref(value_pos, value); + + child_pos + } + ObjectPatProp::Assign(assign_pat_prop) => { + let raw = ctx.header(AstNode::Property, pos, &assign_pat_prop.span); + // TOOD: Doesn't seem to be present in SWC ast + let _computed_pos = ctx.bool_field(AstProp::Computed); + let key_pos = ctx.ref_field(AstProp::Key); + let value_pos = ctx.ref_field(AstProp::Value); + let child_pos = ctx.commit_schema(raw); + + let ident = serialize_ident(ctx, &assign_pat_prop.key.id, parent); + + let value = assign_pat_prop + .value + .as_ref() + .map(|value| serialize_expr(ctx, value, child_pos)); + + ctx.write_ref(key_pos, ident); + ctx.write_maybe_ref(value_pos, value); + + child_pos + } + ObjectPatProp::Rest(rest_pat) => { + serialize_pat(ctx, &Pat::Rest(rest_pat.clone()), parent) + } + }) + .collect::>(); + + ctx.write_bool(opt_pos, node.optional); + ctx.write_maybe_ref(type_ann_pos, type_ann); + ctx.write_refs(props_pos, children); + + pos + } + Pat::Assign(node) => { + let raw = ctx.header(AstNode::AssignmentPattern, parent, &node.span); + let left_pos = ctx.ref_field(AstProp::Left); + let right_pos = ctx.ref_field(AstProp::Right); + let pos = ctx.commit_schema(raw); + + let left = serialize_pat(ctx, &node.left, pos); + let right = serialize_expr(ctx, &node.right, pos); + + ctx.write_ref(left_pos, left); + ctx.write_ref(right_pos, right); + + pos + } + Pat::Invalid(_) => unreachable!(), + Pat::Expr(node) => serialize_expr(ctx, node, parent), + } +} + +fn serialize_for_head( + ctx: &mut TsEsTreeBuilder, + for_head: &ForHead, + parent: NodeRef, +) -> NodeRef { + match for_head { + ForHead::VarDecl(var_decl) => { + serialize_decl(ctx, &Decl::Var(var_decl.clone()), parent) + } + ForHead::UsingDecl(using_decl) => { + serialize_decl(ctx, &Decl::Using(using_decl.clone()), parent) + } + ForHead::Pat(pat) => serialize_pat(ctx, pat, parent), + } +} + +fn serialize_spread( + ctx: &mut TsEsTreeBuilder, + expr: &Expr, + span: &Span, + parent: NodeRef, +) -> NodeRef { + let raw = ctx.header(AstNode::SpreadElement, parent, span); + let arg_pos = ctx.ref_field(AstProp::Argument); + let pos = ctx.commit_schema(raw); + + let expr_pos = serialize_expr(ctx, expr, parent); + ctx.write_ref(arg_pos, expr_pos); + + pos +} + +fn serialize_ident_name( + ctx: &mut TsEsTreeBuilder, + ident_name: &IdentName, + parent: NodeRef, +) -> NodeRef { + let raw = ctx.header(AstNode::Identifier, parent, &ident_name.span); + let name_pos = ctx.str_field(AstProp::Name); + let pos = ctx.commit_schema(raw); + + ctx.write_str(name_pos, ident_name.sym.as_str()); + + pos +} + +fn serialize_prop_name( + ctx: &mut TsEsTreeBuilder, + prop_name: &PropName, + parent: NodeRef, +) -> NodeRef { + match prop_name { + PropName::Ident(ident_name) => { + serialize_ident_name(ctx, ident_name, parent) + } + PropName::Str(str_prop) => { + let raw = ctx.header(AstNode::StringLiteral, parent, &str_prop.span); + let value_pos = ctx.str_field(AstProp::Value); + ctx.write_str(value_pos, &str_prop.value); + ctx.commit_schema(raw) + } + PropName::Num(number) => { + serialize_lit(ctx, &Lit::Num(number.clone()), parent) + } + PropName::Computed(node) => serialize_expr(ctx, &node.expr, parent), + PropName::BigInt(big_int) => { + serialize_lit(ctx, &Lit::BigInt(big_int.clone()), parent) + } + } +} + +fn serialize_lit( + ctx: &mut TsEsTreeBuilder, + lit: &Lit, + parent: NodeRef, +) -> NodeRef { + match lit { + Lit::Str(node) => { + let raw = ctx.header(AstNode::StringLiteral, parent, &node.span); + let value_pos = ctx.str_field(AstProp::Value); + let pos = ctx.commit_schema(raw); + + ctx.write_str(value_pos, &node.value); + + pos + } + Lit::Bool(lit_bool) => { + let raw = ctx.header(AstNode::Bool, parent, &lit_bool.span); + let value_pos = ctx.bool_field(AstProp::Value); + let pos = ctx.commit_schema(raw); + + ctx.write_bool(value_pos, lit_bool.value); + + pos + } + Lit::Null(node) => { + let raw = ctx.header(AstNode::Null, parent, &node.span); + ctx.commit_schema(raw) + } + Lit::Num(node) => { + let raw = ctx.header(AstNode::NumericLiteral, parent, &node.span); + let value_pos = ctx.str_field(AstProp::Value); + let pos = ctx.commit_schema(raw); + + let value = node.raw.as_ref().unwrap(); + ctx.write_str(value_pos, value); + + pos + } + Lit::BigInt(node) => { + let raw = ctx.header(AstNode::BigIntLiteral, parent, &node.span); + let value_pos = ctx.str_field(AstProp::Value); + let pos = ctx.commit_schema(raw); + + ctx.write_str(value_pos, &node.value.to_string()); + + pos + } + Lit::Regex(node) => { + let raw = ctx.header(AstNode::RegExpLiteral, parent, &node.span); + let pattern_pos = ctx.str_field(AstProp::Pattern); + let flags_pos = ctx.str_field(AstProp::Flags); + let pos = ctx.commit_schema(raw); + + ctx.write_str(pattern_pos, node.exp.as_str()); + ctx.write_str(flags_pos, node.flags.as_str()); + + pos + } + Lit::JSXText(jsxtext) => { + let raw = ctx.header(AstNode::JSXText, parent, &jsxtext.span); + ctx.commit_schema(raw) + } + } +} + +fn serialize_ts_param_inst( + ctx: &mut TsEsTreeBuilder, + node: &TsTypeParamInstantiation, + parent: NodeRef, +) -> NodeRef { + let raw = + ctx.header(AstNode::TSTypeParameterInstantiation, parent, &node.span); + let params_pos = ctx.ref_vec_field(AstProp::Params, node.params.len()); + let pos = ctx.commit_schema(raw); + + let params = node + .params + .iter() + .map(|param| serialize_ts_type(ctx, param, pos)) + .collect::>(); + + ctx.write_refs(params_pos, params); + + pos +} + +fn serialize_ts_type( + ctx: &mut TsEsTreeBuilder, + node: &TsType, + parent: NodeRef, +) -> NodeRef { + match node { + TsType::TsKeywordType(node) => { + let kind = match node.kind { + TsKeywordTypeKind::TsAnyKeyword => AstNode::TSAnyKeyword, + TsKeywordTypeKind::TsUnknownKeyword => AstNode::TSUnknownKeyword, + TsKeywordTypeKind::TsNumberKeyword => AstNode::TSNumberKeyword, + TsKeywordTypeKind::TsObjectKeyword => AstNode::TSObjectKeyword, + TsKeywordTypeKind::TsBooleanKeyword => AstNode::TSBooleanKeyword, + TsKeywordTypeKind::TsBigIntKeyword => AstNode::TSBigIntKeyword, + TsKeywordTypeKind::TsStringKeyword => AstNode::TSStringKeyword, + TsKeywordTypeKind::TsSymbolKeyword => AstNode::TSSymbolKeyword, + TsKeywordTypeKind::TsVoidKeyword => AstNode::TSVoidKeyword, + TsKeywordTypeKind::TsUndefinedKeyword => AstNode::TSUndefinedKeyword, + TsKeywordTypeKind::TsNullKeyword => AstNode::TSNullKeyword, + TsKeywordTypeKind::TsNeverKeyword => AstNode::TSNeverKeyword, + TsKeywordTypeKind::TsIntrinsicKeyword => AstNode::TSIntrinsicKeyword, + }; + + let raw = ctx.header(kind, parent, &node.span); + ctx.commit_schema(raw) + } + TsType::TsThisType(node) => { + let raw = ctx.header(AstNode::TSThisType, parent, &node.span); + ctx.commit_schema(raw) + } + TsType::TsFnOrConstructorType(node) => match node { + TsFnOrConstructorType::TsFnType(node) => { + let raw = ctx.header(AstNode::TSFunctionType, parent, &node.span); + let params_pos = ctx.ref_vec_field(AstProp::Params, node.params.len()); + let pos = ctx.commit_schema(raw); + + let param_ids = node + .params + .iter() + .map(|param| serialize_ts_fn_param(ctx, param, pos)) + .collect::>(); + + ctx.write_refs(params_pos, param_ids); + + pos + } + TsFnOrConstructorType::TsConstructorType(_) => { + todo!() + } + }, + TsType::TsTypeRef(node) => { + let raw = ctx.header(AstNode::TSTypeReference, parent, &node.span); + let name_pos = ctx.ref_field(AstProp::TypeName); + let type_args_pos = ctx.ref_field(AstProp::TypeArguments); + let pos = ctx.commit_schema(raw); + + let name = serialize_ts_entity_name(ctx, &node.type_name, pos); + + let type_args = node + .type_params + .clone() + .map(|param| serialize_ts_param_inst(ctx, ¶m, pos)); + + ctx.write_ref(name_pos, name); + ctx.write_maybe_ref(type_args_pos, type_args); + + pos + } + TsType::TsTypeQuery(node) => { + let raw = ctx.header(AstNode::TSTypeQuery, parent, &node.span); + let name_pos = ctx.ref_field(AstProp::ExprName); + let type_args_pos = ctx.ref_field(AstProp::TypeArguments); + let pos = ctx.commit_schema(raw); + + let expr_name = match &node.expr_name { + TsTypeQueryExpr::TsEntityName(entity) => { + serialize_ts_entity_name(ctx, entity, pos) + } + TsTypeQueryExpr::Import(child) => { + serialize_ts_type(ctx, &TsType::TsImportType(child.clone()), pos) + } + }; + + let type_args = node + .type_args + .clone() + .map(|param| serialize_ts_param_inst(ctx, ¶m, pos)); + + ctx.write_ref(name_pos, expr_name); + ctx.write_maybe_ref(type_args_pos, type_args); + + pos + } + TsType::TsTypeLit(_) => { + // TODO: Not sure what this is + todo!() + } + TsType::TsArrayType(node) => { + let raw = ctx.header(AstNode::TSArrayType, parent, &node.span); + let elem_pos = ctx.ref_field(AstProp::ElementType); + let pos = ctx.commit_schema(raw); + + let elem = serialize_ts_type(ctx, &node.elem_type, pos); + + ctx.write_ref(elem_pos, elem); + + pos + } + TsType::TsTupleType(node) => { + let raw = ctx.header(AstNode::TSTupleType, parent, &node.span); + let children_pos = + ctx.ref_vec_field(AstProp::ElementTypes, node.elem_types.len()); + let pos = ctx.commit_schema(raw); + + let children = node + .elem_types + .iter() + .map(|elem| { + if let Some(label) = &elem.label { + let raw = ctx.header(AstNode::TSNamedTupleMember, pos, &elem.span); + let label_pos = ctx.ref_field(AstProp::Label); + let type_pos = ctx.ref_field(AstProp::ElementType); + let child_pos = ctx.commit_schema(raw); + + let label_id = serialize_pat(ctx, label, child_pos); + let type_id = serialize_ts_type(ctx, elem.ty.as_ref(), child_pos); + + ctx.write_ref(label_pos, label_id); + ctx.write_ref(type_pos, type_id); + + child_pos + } else { + serialize_ts_type(ctx, elem.ty.as_ref(), pos) + } + }) + .collect::>(); + + ctx.write_refs(children_pos, children); + + pos + } + TsType::TsOptionalType(_) => todo!(), + TsType::TsRestType(node) => { + let raw = ctx.header(AstNode::TSRestType, parent, &node.span); + let type_ann_pos = ctx.ref_field(AstProp::TypeAnnotation); + let pos = ctx.commit_schema(raw); + + let type_ann = serialize_ts_type(ctx, &node.type_ann, pos); + + ctx.write_ref(type_ann_pos, type_ann); + + pos + } + TsType::TsUnionOrIntersectionType(node) => match node { + TsUnionOrIntersectionType::TsUnionType(node) => { + let raw = ctx.header(AstNode::TSUnionType, parent, &node.span); + let types_pos = ctx.ref_vec_field(AstProp::Types, node.types.len()); + let pos = ctx.commit_schema(raw); + + let children = node + .types + .iter() + .map(|item| serialize_ts_type(ctx, item, pos)) + .collect::>(); + + ctx.write_refs(types_pos, children); + + pos + } + TsUnionOrIntersectionType::TsIntersectionType(node) => { + let raw = ctx.header(AstNode::TSIntersectionType, parent, &node.span); + let types_pos = ctx.ref_vec_field(AstProp::Types, node.types.len()); + let pos = ctx.commit_schema(raw); + + let children = node + .types + .iter() + .map(|item| serialize_ts_type(ctx, item, pos)) + .collect::>(); + + ctx.write_refs(types_pos, children); + + pos + } + }, + TsType::TsConditionalType(node) => { + let raw = ctx.header(AstNode::TSConditionalType, parent, &node.span); + let check_pos = ctx.ref_field(AstProp::CheckType); + let extends_pos = ctx.ref_field(AstProp::ExtendsType); + let true_pos = ctx.ref_field(AstProp::TrueType); + let false_pos = ctx.ref_field(AstProp::FalseType); + let pos = ctx.commit_schema(raw); + + let check = serialize_ts_type(ctx, &node.check_type, pos); + let extends = serialize_ts_type(ctx, &node.extends_type, pos); + let v_true = serialize_ts_type(ctx, &node.true_type, pos); + let v_false = serialize_ts_type(ctx, &node.false_type, pos); + + ctx.write_ref(check_pos, check); + ctx.write_ref(extends_pos, extends); + ctx.write_ref(true_pos, v_true); + ctx.write_ref(false_pos, v_false); + + pos + } + TsType::TsInferType(node) => { + let raw = ctx.header(AstNode::TSInferType, parent, &node.span); + let param_pos = ctx.ref_field(AstProp::TypeParameter); + let pos = ctx.commit_schema(raw); + + let param = serialize_ts_type_param(ctx, &node.type_param, parent); + + ctx.write_ref(param_pos, param); + + pos + } + TsType::TsParenthesizedType(_) => todo!(), + TsType::TsTypeOperator(node) => { + let raw = ctx.header(AstNode::TSTypeOperator, parent, &node.span); + let operator_pos = ctx.str_field(AstProp::Operator); + let type_ann_pos = ctx.ref_field(AstProp::TypeAnnotation); + let pos = ctx.commit_schema(raw); + + let type_ann = serialize_ts_type(ctx, &node.type_ann, pos); + + ctx.write_str( + operator_pos, + match node.op { + TsTypeOperatorOp::KeyOf => "keyof", + TsTypeOperatorOp::Unique => "unique", + TsTypeOperatorOp::ReadOnly => "readonly", + }, + ); + ctx.write_ref(type_ann_pos, type_ann); + + pos + } + TsType::TsIndexedAccessType(node) => { + let raw = ctx.header(AstNode::TSIndexedAccessType, parent, &node.span); + let index_type_pos = ctx.ref_field(AstProp::IndexType); + let obj_type_pos = ctx.ref_field(AstProp::ObjectType); + let pos = ctx.commit_schema(raw); + + let index = serialize_ts_type(ctx, &node.index_type, pos); + let obj = serialize_ts_type(ctx, &node.obj_type, pos); + + ctx.write_ref(index_type_pos, index); + ctx.write_ref(obj_type_pos, obj); + + pos + } + TsType::TsMappedType(node) => { + let raw = ctx.header(AstNode::TSMappedType, parent, &node.span); + let name_pos = ctx.ref_field(AstProp::NameType); + let type_ann_pos = ctx.ref_field(AstProp::TypeAnnotation); + let type_param_pos = ctx.ref_field(AstProp::TypeParameter); + let pos = ctx.commit_schema(raw); + + let opt_pos = + create_true_plus_minus_field(ctx, AstProp::Optional, node.optional); + let readonly_pos = + create_true_plus_minus_field(ctx, AstProp::Readonly, node.readonly); + + let name_id = maybe_serialize_ts_type(ctx, &node.name_type, pos); + let type_ann = maybe_serialize_ts_type(ctx, &node.type_ann, pos); + let type_param = serialize_ts_type_param(ctx, &node.type_param, pos); + + write_true_plus_minus(ctx, opt_pos, node.optional); + write_true_plus_minus(ctx, readonly_pos, node.readonly); + ctx.write_maybe_ref(name_pos, name_id); + ctx.write_maybe_ref(type_ann_pos, type_ann); + ctx.write_ref(type_param_pos, type_param); + + pos + } + TsType::TsLitType(node) => serialize_ts_lit_type(ctx, node, parent), + TsType::TsTypePredicate(node) => { + let raw = ctx.header(AstNode::TSTypePredicate, parent, &node.span); + let asserts_pos = ctx.bool_field(AstProp::Asserts); + let param_name_pos = ctx.ref_field(AstProp::ParameterName); + let type_ann_pos = ctx.ref_field(AstProp::TypeAnnotation); + let pos = ctx.commit_schema(raw); + + let param_name = match &node.param_name { + TsThisTypeOrIdent::TsThisType(ts_this_type) => { + let raw = ctx.header(AstNode::TSThisType, pos, &ts_this_type.span); + ctx.commit_schema(raw) + } + TsThisTypeOrIdent::Ident(ident) => serialize_ident(ctx, ident, pos), + }; + + let type_ann = maybe_serialize_ts_type_ann(ctx, &node.type_ann, pos); + + ctx.write_bool(asserts_pos, node.asserts); + ctx.write_ref(param_name_pos, param_name); + ctx.write_maybe_ref(type_ann_pos, type_ann); + + pos + } + TsType::TsImportType(node) => { + let raw = ctx.header(AstNode::TSTypePredicate, parent, &node.span); + let arg_pos = ctx.ref_field(AstProp::Argument); + let type_args_pos = ctx.ref_field(AstProp::TypeArguments); + let qualifier_pos = ctx.ref_field(AstProp::Qualifier); + let pos = ctx.commit_schema(raw); + + let arg = serialize_ts_lit_type( + ctx, + &TsLitType { + lit: TsLit::Str(node.arg.clone()), + span: node.arg.span, + }, + pos, + ); + + let type_arg = node.type_args.clone().map(|param_node| { + serialize_ts_param_inst(ctx, param_node.as_ref(), pos) + }); + + let qualifier = node.qualifier.clone().map_or(NodeRef(0), |quali| { + serialize_ts_entity_name(ctx, &quali, pos) + }); + + ctx.write_ref(arg_pos, arg); + ctx.write_ref(qualifier_pos, qualifier); + ctx.write_maybe_ref(type_args_pos, type_arg); + + pos + } + } +} + +fn serialize_ts_lit_type( + ctx: &mut TsEsTreeBuilder, + node: &TsLitType, + parent: NodeRef, +) -> NodeRef { + let raw = ctx.header(AstNode::TSLiteralType, parent, &node.span); + let lit_pos = ctx.ref_field(AstProp::Literal); + let pos = ctx.commit_schema(raw); + + let lit = match &node.lit { + TsLit::Number(lit) => serialize_lit(ctx, &Lit::Num(lit.clone()), pos), + TsLit::Str(lit) => serialize_lit(ctx, &Lit::Str(lit.clone()), pos), + TsLit::Bool(lit) => serialize_lit(ctx, &Lit::Bool(*lit), pos), + TsLit::BigInt(lit) => serialize_lit(ctx, &Lit::BigInt(lit.clone()), pos), + TsLit::Tpl(lit) => serialize_expr( + ctx, + &Expr::Tpl(Tpl { + span: lit.span, + exprs: vec![], + quasis: lit.quasis.clone(), + }), + pos, + ), + }; + + ctx.write_ref(lit_pos, lit); + + pos +} + +fn create_true_plus_minus_field( + ctx: &mut TsEsTreeBuilder, + prop: AstProp, + value: Option, +) -> NodePos { + if let Some(v) = value { + match v { + TruePlusMinus::True => NodePos::Bool(ctx.bool_field(prop)), + TruePlusMinus::Plus | TruePlusMinus::Minus => { + NodePos::Str(ctx.str_field(prop)) + } + } + } else { + NodePos::Undef(ctx.undefined_field(prop)) + } +} + +fn extract_pos(pos: NodePos) -> usize { + match pos { + NodePos::Bool(bool_pos) => bool_pos.0, + NodePos::Field(field_pos) => field_pos.0, + NodePos::FieldArr(field_arr_pos) => field_arr_pos.0, + NodePos::Str(str_pos) => str_pos.0, + NodePos::Undef(undef_pos) => undef_pos.0, + NodePos::Null(null_pos) => null_pos.0, + } +} + +fn write_true_plus_minus( + ctx: &mut TsEsTreeBuilder, + pos: NodePos, + value: Option, +) { + if let Some(v) = value { + match v { + TruePlusMinus::True => { + let bool_pos = BoolPos(extract_pos(pos)); + ctx.write_bool(bool_pos, true); + } + TruePlusMinus::Plus => { + let str_pos = StrPos(extract_pos(pos)); + ctx.write_str(str_pos, "+") + } + TruePlusMinus::Minus => { + let str_pos = StrPos(extract_pos(pos)); + ctx.write_str(str_pos, "-") + } + } + } +} + +fn serialize_ts_entity_name( + ctx: &mut TsEsTreeBuilder, + node: &TsEntityName, + parent: NodeRef, +) -> NodeRef { + match &node { + TsEntityName::TsQualifiedName(_) => todo!(), + TsEntityName::Ident(ident) => serialize_ident(ctx, ident, parent), + } +} + +fn maybe_serialize_ts_type_ann( + ctx: &mut TsEsTreeBuilder, + node: &Option>, + parent: NodeRef, +) -> Option { + node + .as_ref() + .map(|type_ann| serialize_ts_type_ann(ctx, type_ann, parent)) +} + +fn serialize_ts_type_ann( + ctx: &mut TsEsTreeBuilder, + node: &TsTypeAnn, + parent: NodeRef, +) -> NodeRef { + let raw = ctx.header(AstNode::TSTypeAnnotation, parent, &node.span); + let type_pos = ctx.ref_field(AstProp::TypeAnnotation); + let pos = ctx.commit_schema(raw); + + let v_type = serialize_ts_type(ctx, &node.type_ann, pos); + + ctx.write_ref(type_pos, v_type); + + pos +} + +fn maybe_serialize_ts_type( + ctx: &mut TsEsTreeBuilder, + node: &Option>, + parent: NodeRef, +) -> Option { + node + .as_ref() + .map(|item| serialize_ts_type(ctx, item, parent)) +} + +fn serialize_ts_type_param( + ctx: &mut TsEsTreeBuilder, + node: &TsTypeParam, + parent: NodeRef, +) -> NodeRef { + let raw = ctx.header(AstNode::TSTypeParameter, parent, &node.span); + let name_pos = ctx.ref_field(AstProp::Name); + let constraint_pos = ctx.ref_field(AstProp::Constraint); + let default_pos = ctx.ref_field(AstProp::Default); + let const_pos = ctx.bool_field(AstProp::Const); + let in_pos = ctx.bool_field(AstProp::In); + let out_pos = ctx.bool_field(AstProp::Out); + let pos = ctx.commit_schema(raw); + + let name = serialize_ident(ctx, &node.name, pos); + let constraint = maybe_serialize_ts_type(ctx, &node.constraint, pos); + let default = maybe_serialize_ts_type(ctx, &node.default, pos); + + ctx.write_bool(const_pos, node.is_const); + ctx.write_bool(in_pos, node.is_in); + ctx.write_bool(out_pos, node.is_out); + ctx.write_ref(name_pos, name); + ctx.write_maybe_ref(constraint_pos, constraint); + ctx.write_maybe_ref(default_pos, default); + + pos +} + +fn maybe_serialize_ts_type_param( + ctx: &mut TsEsTreeBuilder, + node: &Option>, + parent: NodeRef, +) -> Option { + node.as_ref().map(|node| { + let raw = + ctx.header(AstNode::TSTypeParameterDeclaration, parent, &node.span); + let params_pos = ctx.ref_vec_field(AstProp::Params, node.params.len()); + let pos = ctx.commit_schema(raw); + + let params = node + .params + .iter() + .map(|param| serialize_ts_type_param(ctx, param, pos)) + .collect::>(); + + ctx.write_refs(params_pos, params); + + pos + }) +} + +fn serialize_ts_fn_param( + ctx: &mut TsEsTreeBuilder, + node: &TsFnParam, + parent: NodeRef, +) -> NodeRef { + match node { + TsFnParam::Ident(ident) => serialize_ident(ctx, ident, parent), + TsFnParam::Array(pat) => { + serialize_pat(ctx, &Pat::Array(pat.clone()), parent) + } + TsFnParam::Rest(pat) => serialize_pat(ctx, &Pat::Rest(pat.clone()), parent), + TsFnParam::Object(pat) => { + serialize_pat(ctx, &Pat::Object(pat.clone()), parent) + } + } +} diff --git a/cli/tools/lint/ast_buffer/ts_estree.rs b/cli/tools/lint/ast_buffer/ts_estree.rs new file mode 100644 index 00000000000000..967bbef32a9c4f --- /dev/null +++ b/cli/tools/lint/ast_buffer/ts_estree.rs @@ -0,0 +1,520 @@ +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::fmt; +use std::fmt::Debug; +use std::fmt::Display; + +use deno_ast::swc::common::Span; + +use super::buffer::AstBufSerializer; +use super::buffer::BoolPos; +use super::buffer::FieldArrPos; +use super::buffer::FieldPos; +use super::buffer::NodeRef; +use super::buffer::NullPos; +use super::buffer::PendingNodeRef; +use super::buffer::SerializeCtx; +use super::buffer::StrPos; +use super::buffer::UndefPos; + +#[derive(Debug, Clone, PartialEq)] +pub enum AstNode { + // First node must always be the empty/invalid node + Invalid, + // Typically the + Program, + + // Module declarations + ExportAllDeclaration, + ExportDefaultDeclaration, + ExportNamedDeclaration, + ImportDeclaration, + TsExportAssignment, + TsImportEquals, + TsNamespaceExport, + + // Decls + ClassDeclaration, + FunctionDeclaration, + TSEnumDeclaration, + TSInterface, + TsModule, + TsTypeAlias, + Using, + VariableDeclaration, + + // Statements + BlockStatement, + BreakStatement, + ContinueStatement, + DebuggerStatement, + DoWhileStatement, + EmptyStatement, + ExpressionStatement, + ForInStatement, + ForOfStatement, + ForStatement, + IfStatement, + LabeledStatement, + ReturnStatement, + SwitchCase, + SwitchStatement, + ThrowStatement, + TryStatement, + WhileStatement, + WithStatement, + + // Expressions + ArrayExpression, + ArrowFunctionExpression, + AssignmentExpression, + AwaitExpression, + BinaryExpression, + CallExpression, + ChainExpression, + ClassExpression, + ConditionalExpression, + FunctionExpression, + Identifier, + ImportExpression, + LogicalExpression, + MemberExpression, + MetaProp, + NewExpression, + ObjectExpression, + PrivateIdentifier, + SequenceExpression, + Super, + TaggedTemplateExpression, + TemplateLiteral, + ThisExpression, + TSAsExpression, + TsConstAssertion, + TsInstantiation, + TSNonNullExpression, + TSSatisfiesExpression, + TSTypeAssertion, + UnaryExpression, + UpdateExpression, + YieldExpression, + + // TODO: TSEsTree uses a single literal node + // Literals + StringLiteral, + Bool, + Null, + NumericLiteral, + BigIntLiteral, + RegExpLiteral, + + EmptyExpr, + SpreadElement, + Property, + VariableDeclarator, + CatchClause, + RestElement, + ExportSpecifier, + TemplateElement, + MethodDefinition, + ClassBody, + + // Patterns + ArrayPattern, + AssignmentPattern, + ObjectPattern, + + // JSX + JSXAttribute, + JSXClosingElement, + JSXClosingFragment, + JSXElement, + JSXEmptyExpression, + JSXExpressionContainer, + JSXFragment, + JSXIdentifier, + JSXMemberExpression, + JSXNamespacedName, + JSXOpeningElement, + JSXOpeningFragment, + JSXSpreadAttribute, + JSXSpreadChild, + JSXText, + + TSTypeAnnotation, + TSTypeParameterDeclaration, + TSTypeParameter, + TSTypeParameterInstantiation, + TSEnumMember, + TSInterfaceBody, + TSInterfaceHeritage, + TSTypeReference, + TSThisType, + TSLiteralType, + TSInferType, + TSConditionalType, + TSUnionType, + TSIntersectionType, + TSMappedType, + TSTypeQuery, + TSTupleType, + TSNamedTupleMember, + TSFunctionType, + TsCallSignatureDeclaration, + TSPropertySignature, + TSMethodSignature, + TSIndexSignature, + TSIndexedAccessType, + TSTypeOperator, + TSTypePredicate, + TSImportType, + TSRestType, + TSArrayType, + TSClassImplements, + + TSAnyKeyword, + TSBigIntKeyword, + TSBooleanKeyword, + TSIntrinsicKeyword, + TSNeverKeyword, + TSNullKeyword, + TSNumberKeyword, + TSObjectKeyword, + TSStringKeyword, + TSSymbolKeyword, + TSUndefinedKeyword, + TSUnknownKeyword, + TSVoidKeyword, + TSEnumBody, // Last value is used for max value +} + +impl Display for AstNode { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + Debug::fmt(self, f) + } +} + +impl From for u8 { + fn from(m: AstNode) -> u8 { + m as u8 + } +} + +#[derive(Debug, Clone)] +pub enum AstProp { + // Base, these must be in sync with JS in the same order. + Invalid, + Type, + Parent, + Range, + Length, // Not used in AST, but can be used in attr selectors + + // Starting from here the order doesn't matter. + // Following are all possible AST node properties. + Abstract, + Accessibility, + Alternate, + Argument, + Arguments, + Asserts, + Async, + Attributes, + Await, + Block, + Body, + Callee, + Cases, + Children, + CheckType, + ClosingElement, + ClosingFragment, + Computed, + Consequent, + Const, + Constraint, + Cooked, + Declaration, + Declarations, + Declare, + Default, + Definite, + Delegate, + Discriminant, + Elements, + ElementType, + ElementTypes, + ExprName, + Expression, + Expressions, + Exported, + Extends, + ExtendsType, + FalseType, + Finalizer, + Flags, + Generator, + Handler, + Id, + In, + IndexType, + Init, + Initializer, + Implements, + Key, + Kind, + Label, + Left, + Literal, + Local, + Members, + Meta, + Method, + Name, + Namespace, + NameType, + Object, + ObjectType, + OpeningElement, + OpeningFragment, + Operator, + Optional, + Out, + Param, + ParameterName, + Params, + Pattern, + Prefix, + Properties, + Property, + Qualifier, + Quasi, + Quasis, + Raw, + Readonly, + ReturnType, + Right, + SelfClosing, + Shorthand, + Source, + SourceType, + Specifiers, + Static, + SuperClass, + SuperTypeArguments, + Tag, + Tail, + Test, + TrueType, + TypeAnnotation, + TypeArguments, + TypeName, + TypeParameter, + TypeParameters, + Types, + Update, + Value, // Last value is used for max value +} + +// TODO: Feels like there should be an easier way to iterater over an +// enum in Rust and lowercase the first letter. +impl Display for AstProp { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let s = match self { + AstProp::Invalid => "__invalid__", // unused + AstProp::Parent => "parent", + AstProp::Range => "range", + AstProp::Type => "type", + AstProp::Length => "length", + AstProp::Abstract => "abstract", + AstProp::Accessibility => "accessibility", + AstProp::Alternate => "alternate", + AstProp::Argument => "argument", + AstProp::Arguments => "arguments", + AstProp::Asserts => "asserts", + AstProp::Async => "async", + AstProp::Attributes => "attributes", + AstProp::Await => "await", + AstProp::Block => "block", + AstProp::Body => "body", + AstProp::Callee => "callee", + AstProp::Cases => "cases", + AstProp::Children => "children", + AstProp::CheckType => "checkType", + AstProp::ClosingElement => "closingElement", + AstProp::ClosingFragment => "closingFragment", + AstProp::Computed => "computed", + AstProp::Consequent => "consequent", + AstProp::Const => "const", + AstProp::Constraint => "constraint", + AstProp::Cooked => "cooked", + AstProp::Declaration => "declaration", + AstProp::Declarations => "declarations", + AstProp::Declare => "declare", + AstProp::Default => "default", + AstProp::Definite => "definite", + AstProp::Delegate => "delegate", + AstProp::Discriminant => "discriminant", + AstProp::Elements => "elements", + AstProp::ElementType => "elementType", + AstProp::ElementTypes => "elementTypes", + AstProp::ExprName => "exprName", + AstProp::Expression => "expression", + AstProp::Expressions => "expressions", + AstProp::Exported => "exported", + AstProp::Extends => "extends", + AstProp::ExtendsType => "extendsType", + AstProp::FalseType => "falseType", + AstProp::Finalizer => "finalizer", + AstProp::Flags => "flags", + AstProp::Generator => "generator", + AstProp::Handler => "handler", + AstProp::Id => "id", + AstProp::In => "in", + AstProp::IndexType => "indexType", + AstProp::Init => "init", + AstProp::Initializer => "initializer", + AstProp::Implements => "implements", + AstProp::Key => "key", + AstProp::Kind => "kind", + AstProp::Label => "label", + AstProp::Left => "left", + AstProp::Literal => "literal", + AstProp::Local => "local", + AstProp::Members => "members", + AstProp::Meta => "meta", + AstProp::Method => "method", + AstProp::Name => "name", + AstProp::Namespace => "namespace", + AstProp::NameType => "nameType", + AstProp::Object => "object", + AstProp::ObjectType => "objectType", + AstProp::OpeningElement => "openingElement", + AstProp::OpeningFragment => "openingFragment", + AstProp::Operator => "operator", + AstProp::Optional => "optional", + AstProp::Out => "out", + AstProp::Param => "param", + AstProp::ParameterName => "parameterName", + AstProp::Params => "params", + AstProp::Pattern => "pattern", + AstProp::Prefix => "prefix", + AstProp::Properties => "properties", + AstProp::Property => "property", + AstProp::Qualifier => "qualifier", + AstProp::Quasi => "quasi", + AstProp::Quasis => "quasis", + AstProp::Raw => "raw", + AstProp::Readonly => "readonly", + AstProp::ReturnType => "returnType", + AstProp::Right => "right", + AstProp::SelfClosing => "selfClosing", + AstProp::Shorthand => "shorthand", + AstProp::Source => "source", + AstProp::SourceType => "sourceType", + AstProp::Specifiers => "specifiers", + AstProp::Static => "static", + AstProp::SuperClass => "superClass", + AstProp::SuperTypeArguments => "superTypeArguments", + AstProp::Tag => "tag", + AstProp::Tail => "tail", + AstProp::Test => "test", + AstProp::TrueType => "trueType", + AstProp::TypeAnnotation => "typeAnnotation", + AstProp::TypeArguments => "typeArguments", + AstProp::TypeName => "typeName", + AstProp::TypeParameter => "typeParameter", + AstProp::TypeParameters => "typeParameters", + AstProp::Types => "types", + AstProp::Update => "update", + AstProp::Value => "value", + }; + + write!(f, "{}", s) + } +} + +impl From for u8 { + fn from(m: AstProp) -> u8 { + m as u8 + } +} + +pub struct TsEsTreeBuilder { + ctx: SerializeCtx, +} + +// TODO: Add a builder API to make it easier to convert from different source +// ast formats. +impl TsEsTreeBuilder { + pub fn new() -> Self { + // Max values + // TODO: Maybe there is a rust macro to grab the last enum value? + let kind_max_count: u8 = u8::from(AstNode::TSEnumBody) + 1; + let prop_max_count: u8 = u8::from(AstProp::Value) + 1; + Self { + ctx: SerializeCtx::new(kind_max_count, prop_max_count), + } + } +} + +impl AstBufSerializer for TsEsTreeBuilder { + fn header( + &mut self, + kind: AstNode, + parent: NodeRef, + span: &Span, + ) -> PendingNodeRef { + self.ctx.header(kind, parent, span) + } + + fn commit_schema(&mut self, offset: PendingNodeRef) -> NodeRef { + self.ctx.commit_schema(offset) + } + + fn ref_field(&mut self, prop: AstProp) -> FieldPos { + FieldPos(self.ctx.ref_field(prop)) + } + + fn ref_vec_field(&mut self, prop: AstProp, len: usize) -> FieldArrPos { + FieldArrPos(self.ctx.ref_vec_field(prop, len)) + } + + fn str_field(&mut self, prop: AstProp) -> StrPos { + StrPos(self.ctx.str_field(prop)) + } + + fn bool_field(&mut self, prop: AstProp) -> BoolPos { + BoolPos(self.ctx.bool_field(prop)) + } + + fn undefined_field(&mut self, prop: AstProp) -> UndefPos { + UndefPos(self.ctx.undefined_field(prop)) + } + + fn null_field(&mut self, prop: AstProp) -> NullPos { + NullPos(self.ctx.null_field(prop)) + } + + fn write_ref(&mut self, pos: FieldPos, value: NodeRef) { + self.ctx.write_ref(pos.0, value); + } + + fn write_maybe_ref(&mut self, pos: FieldPos, value: Option) { + self.ctx.write_maybe_ref(pos.0, value); + } + + fn write_refs(&mut self, pos: FieldArrPos, value: Vec) { + self.ctx.write_refs(pos.0, value); + } + + fn write_str(&mut self, pos: StrPos, value: &str) { + self.ctx.write_str(pos.0, value); + } + + fn write_bool(&mut self, pos: BoolPos, value: bool) { + self.ctx.write_bool(pos.0, value); + } + + fn serialize(&mut self) -> Vec { + self.ctx.serialize() + } +} diff --git a/cli/tools/lint/linter.rs b/cli/tools/lint/linter.rs index 2c2bc43acb2caa..5d6f8452744847 100644 --- a/cli/tools/lint/linter.rs +++ b/cli/tools/lint/linter.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::collections::HashSet; use std::path::Path; @@ -15,13 +15,13 @@ use deno_lint::linter::LintConfig as DenoLintConfig; use deno_lint::linter::LintFileOptions; use deno_lint::linter::Linter as DenoLintLinter; use deno_lint::linter::LinterOptions; - -use crate::util::fs::atomic_write_file_with_retries; -use crate::util::fs::specifier_from_file_path; +use deno_path_util::fs::atomic_write_file_with_retries; use super::rules::FileOrPackageLintRule; use super::rules::PackageLintRule; use super::ConfiguredRules; +use crate::sys::CliSys; +use crate::util::fs::specifier_from_file_path; pub struct CliLinterOptions { pub configured_rules: ConfiguredRules, @@ -176,8 +176,9 @@ impl CliLinter { if fix_iterations > 0 { // everything looks good and the file still parses, so write it out atomic_write_file_with_retries( + &CliSys::default(), file_path, - source.text().as_ref(), + source.text().as_bytes(), crate::cache::CACHE_PERM, ) .context("Failed writing fix to file.")?; diff --git a/cli/tools/lint/mod.rs b/cli/tools/lint/mod.rs index a9c2d01528832e..8b8702c0f8bc3e 100644 --- a/cli/tools/lint/mod.rs +++ b/cli/tools/lint/mod.rs @@ -1,8 +1,16 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. //! This module provides file linting utilities using //! [`deno_lint`](https://github.com/denoland/deno_lint). +use std::collections::HashSet; +use std::fs; +use std::io::stdin; +use std::io::Read; +use std::path::PathBuf; +use std::rc::Rc; +use std::sync::Arc; + use deno_ast::ModuleSpecifier; use deno_ast::ParsedSource; use deno_config::deno_json::LintRulesConfig; @@ -20,19 +28,11 @@ use deno_core::unsync::future::LocalFutureExt; use deno_core::unsync::future::SharedLocal; use deno_graph::ModuleGraph; use deno_lint::diagnostic::LintDiagnostic; -use deno_lint::linter::LintConfig; +use deno_lint::linter::LintConfig as DenoLintConfig; use log::debug; use reporters::create_reporter; use reporters::LintReporter; use serde::Serialize; -use std::collections::HashSet; -use std::fs; -use std::io::stdin; -use std::io::Read; -use std::path::Path; -use std::path::PathBuf; -use std::rc::Rc; -use std::sync::Arc; use crate::args::CliOptions; use crate::args::Flags; @@ -44,17 +44,22 @@ use crate::cache::IncrementalCache; use crate::colors; use crate::factory::CliFactory; use crate::graph_util::ModuleGraphCreator; +use crate::sys::CliSys; use crate::tools::fmt::run_parallelized; use crate::util::display; use crate::util::file_watcher; +use crate::util::file_watcher::WatcherCommunicator; use crate::util::fs::canonicalize_path; use crate::util::path::is_script_ext; use crate::util::sync::AtomicFlag; +mod ast_buffer; mod linter; mod reporters; mod rules; +// TODO(bartlomieju): remove once we wire plugins through the CLI linter +pub use ast_buffer::serialize_ast_to_buffer; pub use linter::CliLinter; pub use linter::CliLinterOptions; pub use rules::collect_no_slow_type_diagnostics; @@ -69,136 +74,139 @@ pub async fn lint( flags: Arc, lint_flags: LintFlags, ) -> Result<(), AnyError> { - if let Some(watch_flags) = &lint_flags.watch { + if lint_flags.watch.is_some() { if lint_flags.is_stdin() { return Err(generic_error( "Lint watch on standard input is not supported.", )); } - file_watcher::watch_func( - flags, - file_watcher::PrintConfig::new("Lint", !watch_flags.no_clear_screen), - move |flags, watcher_communicator, changed_paths| { - let lint_flags = lint_flags.clone(); - watcher_communicator.show_path_changed(changed_paths.clone()); - Ok(async move { - let factory = CliFactory::from_flags(flags); - let cli_options = factory.cli_options()?; - let lint_config = cli_options.resolve_deno_lint_config()?; - let mut paths_with_options_batches = - resolve_paths_with_options_batches(cli_options, &lint_flags)?; - for paths_with_options in &mut paths_with_options_batches { - _ = watcher_communicator - .watch_paths(paths_with_options.paths.clone()); - - let files = std::mem::take(&mut paths_with_options.paths); - paths_with_options.paths = if let Some(paths) = &changed_paths { - // lint all files on any changed (https://github.com/denoland/deno/issues/12446) - files - .iter() - .any(|path| { - canonicalize_path(path) - .map(|p| paths.contains(&p)) - .unwrap_or(false) - }) - .then_some(files) - .unwrap_or_else(|| [].to_vec()) - } else { - files - }; - } - let mut linter = WorkspaceLinter::new( - factory.caches()?.clone(), - factory.lint_rule_provider().await?, - factory.module_graph_creator().await?.clone(), - cli_options.start_dir.clone(), - &cli_options.resolve_workspace_lint_options(&lint_flags)?, - ); - for paths_with_options in paths_with_options_batches { - linter - .lint_files( - cli_options, - paths_with_options.options, - lint_config.clone(), - paths_with_options.dir, - paths_with_options.paths, - ) - .await?; - } + return lint_with_watch(flags, lint_flags).await; + } - linter.finish(); + let factory = CliFactory::from_flags(flags); + let cli_options = factory.cli_options()?; + let lint_rule_provider = factory.lint_rule_provider().await?; + let is_stdin = lint_flags.is_stdin(); + let deno_lint_config = cli_options.resolve_deno_lint_config()?; + let workspace_lint_options = + cli_options.resolve_workspace_lint_options(&lint_flags)?; + let success = if is_stdin { + lint_stdin( + cli_options, + lint_rule_provider, + workspace_lint_options, + lint_flags, + deno_lint_config, + )? + } else { + let mut linter = WorkspaceLinter::new( + factory.caches()?.clone(), + lint_rule_provider, + factory.module_graph_creator().await?.clone(), + cli_options.start_dir.clone(), + &workspace_lint_options, + ); + let paths_with_options_batches = + resolve_paths_with_options_batches(cli_options, &lint_flags)?; + for paths_with_options in paths_with_options_batches { + linter + .lint_files( + cli_options, + paths_with_options.options, + deno_lint_config.clone(), + paths_with_options.dir, + paths_with_options.paths, + ) + .await?; + } + linter.finish() + }; + if !success { + deno_runtime::exit(1); + } + + Ok(()) +} - Ok(()) +async fn lint_with_watch_inner( + flags: Arc, + lint_flags: LintFlags, + watcher_communicator: Arc, + changed_paths: Option>, +) -> Result<(), AnyError> { + let factory = CliFactory::from_flags(flags); + let cli_options = factory.cli_options()?; + let lint_config = cli_options.resolve_deno_lint_config()?; + let mut paths_with_options_batches = + resolve_paths_with_options_batches(cli_options, &lint_flags)?; + for paths_with_options in &mut paths_with_options_batches { + _ = watcher_communicator.watch_paths(paths_with_options.paths.clone()); + + let files = std::mem::take(&mut paths_with_options.paths); + paths_with_options.paths = if let Some(paths) = &changed_paths { + // lint all files on any changed (https://github.com/denoland/deno/issues/12446) + files + .iter() + .any(|path| { + canonicalize_path(path) + .map(|p| paths.contains(&p)) + .unwrap_or(false) }) - }, - ) - .await?; - } else { - let factory = CliFactory::from_flags(flags); - let cli_options = factory.cli_options()?; - let is_stdin = lint_flags.is_stdin(); - let deno_lint_config = cli_options.resolve_deno_lint_config()?; - let workspace_lint_options = - cli_options.resolve_workspace_lint_options(&lint_flags)?; - let success = if is_stdin { - let start_dir = &cli_options.start_dir; - let reporter_lock = Arc::new(Mutex::new(create_reporter( - workspace_lint_options.reporter_kind, - ))); - let lint_config = start_dir - .to_lint_config(FilePatterns::new_with_base(start_dir.dir_path()))?; - let lint_options = LintOptions::resolve(lint_config, &lint_flags); - let lint_rules = factory - .lint_rule_provider() - .await? - .resolve_lint_rules_err_empty( - lint_options.rules, - start_dir.maybe_deno_json().map(|c| c.as_ref()), - )?; - let mut file_path = cli_options.initial_cwd().join(STDIN_FILE_NAME); - if let Some(ext) = cli_options.ext_flag() { - file_path.set_extension(ext); - } - let r = lint_stdin(&file_path, lint_rules, deno_lint_config); - let success = handle_lint_result( - &file_path.to_string_lossy(), - r, - reporter_lock.clone(), - ); - reporter_lock.lock().close(1); - success + .then_some(files) + .unwrap_or_else(|| [].to_vec()) } else { - let mut linter = WorkspaceLinter::new( - factory.caches()?.clone(), - factory.lint_rule_provider().await?, - factory.module_graph_creator().await?.clone(), - cli_options.start_dir.clone(), - &workspace_lint_options, - ); - let paths_with_options_batches = - resolve_paths_with_options_batches(cli_options, &lint_flags)?; - for paths_with_options in paths_with_options_batches { - linter - .lint_files( - cli_options, - paths_with_options.options, - deno_lint_config.clone(), - paths_with_options.dir, - paths_with_options.paths, - ) - .await?; - } - linter.finish() + files }; - if !success { - deno_runtime::exit(1); - } } + let mut linter = WorkspaceLinter::new( + factory.caches()?.clone(), + factory.lint_rule_provider().await?, + factory.module_graph_creator().await?.clone(), + cli_options.start_dir.clone(), + &cli_options.resolve_workspace_lint_options(&lint_flags)?, + ); + for paths_with_options in paths_with_options_batches { + linter + .lint_files( + cli_options, + paths_with_options.options, + lint_config.clone(), + paths_with_options.dir, + paths_with_options.paths, + ) + .await?; + } + + linter.finish(); + Ok(()) } +async fn lint_with_watch( + flags: Arc, + lint_flags: LintFlags, +) -> Result<(), AnyError> { + let watch_flags = lint_flags.watch.as_ref().unwrap(); + + file_watcher::watch_func( + flags, + file_watcher::PrintConfig::new("Lint", !watch_flags.no_clear_screen), + move |flags, watcher_communicator, changed_paths| { + let lint_flags = lint_flags.clone(); + watcher_communicator.show_path_changed(changed_paths.clone()); + Ok(lint_with_watch_inner( + flags, + lint_flags, + watcher_communicator, + changed_paths, + )) + }, + ) + .await +} + struct PathsWithOptions { dir: WorkspaceDirectory, paths: Vec, @@ -269,7 +277,7 @@ impl WorkspaceLinter { &mut self, cli_options: &Arc, lint_options: LintOptions, - lint_config: LintConfig, + lint_config: DenoLintConfig, member_dir: WorkspaceDirectory, paths: Vec, ) -> Result<(), AnyError> { @@ -294,112 +302,63 @@ impl WorkspaceLinter { deno_lint_config: lint_config, })); + let has_error = self.has_error.clone(); + let reporter_lock = self.reporter_lock.clone(); + let mut futures = Vec::with_capacity(2); if linter.has_package_rules() { - if self.workspace_module_graph.is_none() { - let module_graph_creator = self.module_graph_creator.clone(); - let packages = self.workspace_dir.jsr_packages_for_publish(); - self.workspace_module_graph = Some( - async move { - module_graph_creator - .create_and_validate_publish_graph(&packages, true) - .await - .map(Rc::new) - .map_err(Rc::new) - } - .boxed_local() - .shared_local(), - ); - } - let workspace_module_graph_future = - self.workspace_module_graph.as_ref().unwrap().clone(); - let publish_config = member_dir.maybe_package_config(); - if let Some(publish_config) = publish_config { - let has_error = self.has_error.clone(); - let reporter_lock = self.reporter_lock.clone(); - let linter = linter.clone(); - let path_urls = paths - .iter() - .filter_map(|p| ModuleSpecifier::from_file_path(p).ok()) - .collect::>(); - futures.push( - async move { - let graph = workspace_module_graph_future - .await - .map_err(|err| anyhow!("{:#}", err))?; - let export_urls = - publish_config.config_file.resolve_export_value_urls()?; - if !export_urls.iter().any(|url| path_urls.contains(url)) { - return Ok(()); // entrypoint is not specified, so skip - } - let diagnostics = linter.lint_package(&graph, &export_urls); - if !diagnostics.is_empty() { - has_error.raise(); - let mut reporter = reporter_lock.lock(); - for diagnostic in &diagnostics { - reporter.visit_diagnostic(diagnostic); - } - } - Ok(()) - } - .boxed_local(), - ); + if let Some(fut) = self.run_package_rules(&linter, &member_dir, &paths) { + futures.push(fut); } } - futures.push({ - let has_error = self.has_error.clone(); - let reporter_lock = self.reporter_lock.clone(); - let maybe_incremental_cache = maybe_incremental_cache.clone(); - let linter = linter.clone(); - let cli_options = cli_options.clone(); - async move { - run_parallelized(paths, { - move |file_path| { - let file_text = - deno_ast::strip_bom(fs::read_to_string(&file_path)?); - - // don't bother rechecking this file if it didn't have any diagnostics before - if let Some(incremental_cache) = &maybe_incremental_cache { - if incremental_cache.is_file_same(&file_path, &file_text) { - return Ok(()); - } - } + let maybe_incremental_cache_ = maybe_incremental_cache.clone(); + let linter = linter.clone(); + let cli_options = cli_options.clone(); + let fut = async move { + let operation = move |file_path: PathBuf| { + let file_text = deno_ast::strip_bom(fs::read_to_string(&file_path)?); + + // don't bother rechecking this file if it didn't have any diagnostics before + if let Some(incremental_cache) = &maybe_incremental_cache_ { + if incremental_cache.is_file_same(&file_path, &file_text) { + return Ok(()); + } + } - let r = linter.lint_file( - &file_path, - file_text, - cli_options.ext_flag().as_deref(), - ); - if let Ok((file_source, file_diagnostics)) = &r { - if let Some(incremental_cache) = &maybe_incremental_cache { - if file_diagnostics.is_empty() { - // update the incremental cache if there were no diagnostics - incremental_cache.update_file( - &file_path, - // ensure the returned text is used here as it may have been modified via --fix - file_source.text(), - ) - } - } + let r = linter.lint_file( + &file_path, + file_text, + cli_options.ext_flag().as_deref(), + ); + if let Ok((file_source, file_diagnostics)) = &r { + if let Some(incremental_cache) = &maybe_incremental_cache_ { + if file_diagnostics.is_empty() { + // update the incremental cache if there were no diagnostics + incremental_cache.update_file( + &file_path, + // ensure the returned text is used here as it may have been modified via --fix + file_source.text(), + ) } + } + } - let success = handle_lint_result( - &file_path.to_string_lossy(), - r, - reporter_lock.clone(), - ); - if !success { - has_error.raise(); - } + let success = handle_lint_result( + &file_path.to_string_lossy(), + r, + reporter_lock.clone(), + ); + if !success { + has_error.raise(); + } - Ok(()) - } - }) - .await - } - .boxed_local() - }); + Ok(()) + }; + run_parallelized(paths, operation).await + } + .boxed_local(); + futures.push(fut); if lint_options.fix { // run sequentially when using `--fix` to lower the chances of weird @@ -419,6 +378,63 @@ impl WorkspaceLinter { Ok(()) } + fn run_package_rules( + &mut self, + linter: &Arc, + member_dir: &WorkspaceDirectory, + paths: &[PathBuf], + ) -> Option>> { + if self.workspace_module_graph.is_none() { + let module_graph_creator = self.module_graph_creator.clone(); + let packages = self.workspace_dir.jsr_packages_for_publish(); + self.workspace_module_graph = Some( + async move { + module_graph_creator + .create_and_validate_publish_graph(&packages, true) + .await + .map(Rc::new) + .map_err(Rc::new) + } + .boxed_local() + .shared_local(), + ); + } + + let workspace_module_graph_future = + self.workspace_module_graph.as_ref().unwrap().clone(); + let maybe_publish_config = member_dir.maybe_package_config(); + let publish_config = maybe_publish_config?; + + let has_error = self.has_error.clone(); + let reporter_lock = self.reporter_lock.clone(); + let linter = linter.clone(); + let path_urls = paths + .iter() + .filter_map(|p| ModuleSpecifier::from_file_path(p).ok()) + .collect::>(); + let fut = async move { + let graph = workspace_module_graph_future + .await + .map_err(|err| anyhow!("{:#}", err))?; + let export_urls = + publish_config.config_file.resolve_export_value_urls()?; + if !export_urls.iter().any(|url| path_urls.contains(url)) { + return Ok(()); // entrypoint is not specified, so skip + } + let diagnostics = linter.lint_package(&graph, &export_urls); + if !diagnostics.is_empty() { + has_error.raise(); + let mut reporter = reporter_lock.lock(); + for diagnostic in &diagnostics { + reporter.visit_diagnostic(diagnostic); + } + } + Ok(()) + } + .boxed_local(); + Some(fut) + } + pub fn finish(self) -> bool { debug!("Found {} files", self.file_count); self.reporter_lock.lock().close(self.file_count); @@ -436,8 +452,9 @@ fn collect_lint_files( }) .ignore_git_folder() .ignore_node_modules() + .use_gitignore() .set_vendor_folder(cli_options.vendor_dir_path().map(ToOwned::to_owned)) - .collect_file_patterns(&deno_config::fs::RealDenoConfigFs, files) + .collect_file_patterns(&CliSys::default(), files) } #[allow(clippy::print_stdout)] @@ -493,10 +510,27 @@ pub fn print_rules_list(json: bool, maybe_rules_tags: Option>) { /// Treats input as TypeScript. /// Compatible with `--json` flag. fn lint_stdin( - file_path: &Path, - configured_rules: ConfiguredRules, - deno_lint_config: LintConfig, -) -> Result<(ParsedSource, Vec), AnyError> { + cli_options: &Arc, + lint_rule_provider: LintRuleProvider, + workspace_lint_options: WorkspaceLintOptions, + lint_flags: LintFlags, + deno_lint_config: DenoLintConfig, +) -> Result { + let start_dir = &cli_options.start_dir; + let reporter_lock = Arc::new(Mutex::new(create_reporter( + workspace_lint_options.reporter_kind, + ))); + let lint_config = start_dir + .to_lint_config(FilePatterns::new_with_base(start_dir.dir_path()))?; + let lint_options = LintOptions::resolve(lint_config, &lint_flags); + let configured_rules = lint_rule_provider.resolve_lint_rules_err_empty( + lint_options.rules, + start_dir.maybe_deno_json().map(|c| c.as_ref()), + )?; + let mut file_path = cli_options.initial_cwd().join(STDIN_FILE_NAME); + if let Some(ext) = cli_options.ext_flag() { + file_path.set_extension(ext); + } let mut source_code = String::new(); if stdin().read_to_string(&mut source_code).is_err() { return Err(generic_error("Failed to read from stdin")); @@ -508,9 +542,14 @@ fn lint_stdin( deno_lint_config, }); - linter - .lint_file(file_path, deno_ast::strip_bom(source_code), None) - .map_err(AnyError::from) + let r = linter + .lint_file(&file_path, deno_ast::strip_bom(source_code), None) + .map_err(AnyError::from); + + let success = + handle_lint_result(&file_path.to_string_lossy(), r, reporter_lock.clone()); + reporter_lock.lock().close(1); + Ok(success) } fn handle_lint_result( @@ -555,3 +594,69 @@ struct LintError { file_path: String, message: String, } + +#[cfg(test)] +mod tests { + use pretty_assertions::assert_eq; + use serde::Deserialize; + use test_util as util; + + use super::*; + + #[derive(Serialize, Deserialize)] + struct RulesSchema { + #[serde(rename = "$schema")] + schema: String, + + #[serde(rename = "enum")] + rules: Vec, + } + + fn get_all_rules() -> Vec { + let rule_provider = LintRuleProvider::new(None, None); + let configured_rules = + rule_provider.resolve_lint_rules(Default::default(), None); + let mut all_rules = configured_rules + .all_rule_codes + .into_iter() + .map(|s| s.to_string()) + .collect::>(); + all_rules.sort(); + + all_rules + } + + // TODO(bartlomieju): do the same for tags, once https://github.com/denoland/deno/pull/27162 lands + #[test] + fn all_lint_rules_are_listed_in_schema_file() { + let all_rules = get_all_rules(); + + let rules_schema_path = + util::root_path().join("cli/schemas/lint-rules.v1.json"); + let rules_schema_file = + std::fs::read_to_string(&rules_schema_path).unwrap(); + + let schema: RulesSchema = serde_json::from_str(&rules_schema_file).unwrap(); + + const UPDATE_ENV_VAR_NAME: &str = "UPDATE_EXPECTED"; + + if std::env::var(UPDATE_ENV_VAR_NAME).ok().is_none() { + assert_eq!( + schema.rules, all_rules, + "Lint rules schema file not up to date. Run again with {}=1 to update the expected output", + UPDATE_ENV_VAR_NAME + ); + return; + } + + std::fs::write( + &rules_schema_path, + serde_json::to_string_pretty(&RulesSchema { + schema: schema.schema, + rules: all_rules, + }) + .unwrap(), + ) + .unwrap(); + } +} diff --git a/cli/tools/lint/reporters.rs b/cli/tools/lint/reporters.rs index bf80be9f20ed58..24e04e840f7dcc 100644 --- a/cli/tools/lint/reporters.rs +++ b/cli/tools/lint/reporters.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_ast::diagnostics::Diagnostic; use deno_core::error::AnyError; @@ -8,9 +8,8 @@ use deno_runtime::colors; use log::info; use serde::Serialize; -use crate::args::LintReporterKind; - use super::LintError; +use crate::args::LintReporterKind; const JSON_SCHEMA_VERSION: u8 = 1; @@ -175,6 +174,7 @@ struct JsonLintReporter { version: u8, diagnostics: Vec, errors: Vec, + checked_files: Vec, } impl JsonLintReporter { @@ -183,6 +183,7 @@ impl JsonLintReporter { version: JSON_SCHEMA_VERSION, diagnostics: Vec::new(), errors: Vec::new(), + checked_files: Vec::new(), } } } @@ -209,6 +210,17 @@ impl LintReporter for JsonLintReporter { code: d.code().to_string(), hint: d.hint().map(|h| h.to_string()), }); + + let file_path = d + .specifier + .to_file_path() + .unwrap() + .to_string_lossy() + .to_string(); + + if !self.checked_files.contains(&file_path) { + self.checked_files.push(file_path); + } } fn visit_error(&mut self, file_path: &str, err: &AnyError) { @@ -216,10 +228,15 @@ impl LintReporter for JsonLintReporter { file_path: file_path.to_string(), message: err.to_string(), }); + + if !self.checked_files.contains(&file_path.to_string()) { + self.checked_files.push(file_path.to_string()); + } } fn close(&mut self, _check_count: usize) { sort_diagnostics(&mut self.diagnostics); + self.checked_files.sort(); let json = serde_json::to_string_pretty(&self); #[allow(clippy::print_stdout)] { diff --git a/cli/tools/lint/rules/mod.rs b/cli/tools/lint/rules/mod.rs index dd723ad1598642..e7be12d56de504 100644 --- a/cli/tools/lint/rules/mod.rs +++ b/cli/tools/lint/rules/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::borrow::Cow; use std::collections::HashSet; diff --git a/cli/tools/lint/rules/no_sloppy_imports.rs b/cli/tools/lint/rules/no_sloppy_imports.rs index 94bf9a7c676685..33d3090fe32192 100644 --- a/cli/tools/lint/rules/no_sloppy_imports.rs +++ b/cli/tools/lint/rules/no_sloppy_imports.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::borrow::Cow; use std::cell::RefCell; @@ -8,7 +8,7 @@ use std::sync::Arc; use deno_ast::SourceRange; use deno_config::workspace::WorkspaceResolver; use deno_core::anyhow::anyhow; -use deno_graph::source::ResolutionMode; +use deno_graph::source::ResolutionKind; use deno_graph::source::ResolveError; use deno_graph::Range; use deno_lint::diagnostic::LintDiagnosticDetails; @@ -17,14 +17,13 @@ use deno_lint::diagnostic::LintFix; use deno_lint::diagnostic::LintFixChange; use deno_lint::rules::LintRule; use deno_resolver::sloppy_imports::SloppyImportsResolution; -use deno_resolver::sloppy_imports::SloppyImportsResolutionMode; +use deno_resolver::sloppy_imports::SloppyImportsResolutionKind; use text_lines::LineAndColumnIndex; +use super::ExtendedLintRule; use crate::graph_util::CliJsrUrlProvider; use crate::resolver::CliSloppyImportsResolver; -use super::ExtendedLintRule; - #[derive(Debug)] pub struct NoSloppyImportsRule { sloppy_imports_resolver: Option>, @@ -101,16 +100,16 @@ impl LintRule for NoSloppyImportsRule { maybe_npm_resolver: None, }); - for (range, sloppy_import) in resolver.captures.borrow_mut().drain() { + for (referrer, sloppy_import) in resolver.captures.borrow_mut().drain() { let start_range = context.text_info().loc_to_source_pos(LineAndColumnIndex { - line_index: range.start.line, - column_index: range.start.character, + line_index: referrer.range.start.line, + column_index: referrer.range.start.character, }); let end_range = context.text_info().loc_to_source_pos(LineAndColumnIndex { - line_index: range.end.line, - column_index: range.end.character, + line_index: referrer.range.end.line, + column_index: referrer.range.end.character, }); let source_range = SourceRange::new(start_range, end_range); context.add_diagnostic_details( @@ -183,7 +182,7 @@ impl<'a> deno_graph::source::Resolver for SloppyImportCaptureResolver<'a> { &self, specifier_text: &str, referrer_range: &Range, - mode: ResolutionMode, + resolution_kind: ResolutionKind, ) -> Result { let resolution = self .workspace_resolver @@ -198,9 +197,9 @@ impl<'a> deno_graph::source::Resolver for SloppyImportCaptureResolver<'a> { specifier, .. } => match self.sloppy_imports_resolver.resolve( &specifier, - match mode { - ResolutionMode::Execution => SloppyImportsResolutionMode::Execution, - ResolutionMode::Types => SloppyImportsResolutionMode::Types, + match resolution_kind { + ResolutionKind::Execution => SloppyImportsResolutionKind::Execution, + ResolutionKind::Types => SloppyImportsResolutionKind::Types, }, ) { Some(res) => { diff --git a/cli/tools/lint/rules/no_slow_types.rs b/cli/tools/lint/rules/no_slow_types.rs index bc3f835b179be7..a792c386122955 100644 --- a/cli/tools/lint/rules/no_slow_types.rs +++ b/cli/tools/lint/rules/no_slow_types.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::borrow::Cow; diff --git a/cli/tools/mod.rs b/cli/tools/mod.rs index a458da9f1b7333..35de8ab9faafe6 100644 --- a/cli/tools/mod.rs +++ b/cli/tools/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. pub mod bench; pub mod check; diff --git a/cli/tools/registry/api.rs b/cli/tools/registry/api.rs index 2f27cb2fea6244..c2d34442a1708a 100644 --- a/cli/tools/registry/api.rs +++ b/cli/tools/registry/api.rs @@ -1,12 +1,12 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::http_util; use deno_core::error::AnyError; use deno_core::serde_json; use deno_core::url::Url; use deno_runtime::deno_fetch; use serde::de::DeserializeOwned; +use crate::http_util; use crate::http_util::HttpClient; #[derive(serde::Deserialize)] diff --git a/cli/tools/registry/auth.rs b/cli/tools/registry/auth.rs index 820d3b6b60373d..3665990905495e 100644 --- a/cli/tools/registry/auth.rs +++ b/cli/tools/registry/auth.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::io::IsTerminal; diff --git a/cli/tools/registry/diagnostics.rs b/cli/tools/registry/diagnostics.rs index 733a78ddacae2f..27753167f3131e 100644 --- a/cli/tools/registry/diagnostics.rs +++ b/cli/tools/registry/diagnostics.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::borrow::Cow; use std::path::PathBuf; @@ -169,7 +169,7 @@ impl Diagnostic for PublishDiagnostic { .. }) => DiagnosticLevel::Warning, FastCheck(_) => DiagnosticLevel::Error, - SpecifierUnfurl(_) => DiagnosticLevel::Warning, + SpecifierUnfurl(d) => d.level(), InvalidPath { .. } => DiagnosticLevel::Error, DuplicatePath { .. } => DiagnosticLevel::Error, UnsupportedFileType { .. } => DiagnosticLevel::Warning, @@ -187,7 +187,7 @@ impl Diagnostic for PublishDiagnostic { use PublishDiagnostic::*; match &self { FastCheck(diagnostic) => diagnostic.code(), - SpecifierUnfurl(diagnostic) => Cow::Borrowed(diagnostic.code()), + SpecifierUnfurl(diagnostic) => diagnostic.code(), InvalidPath { .. } => Cow::Borrowed("invalid-path"), DuplicatePath { .. } => Cow::Borrowed("case-insensitive-duplicate-path"), UnsupportedFileType { .. } => Cow::Borrowed("unsupported-file-type"), @@ -207,7 +207,7 @@ impl Diagnostic for PublishDiagnostic { use PublishDiagnostic::*; match &self { FastCheck(diagnostic) => diagnostic.message(), - SpecifierUnfurl(diagnostic) => Cow::Borrowed(diagnostic.message()), + SpecifierUnfurl(diagnostic) => diagnostic.message(), InvalidPath { message, .. } => Cow::Borrowed(message.as_str()), DuplicatePath { .. } => { Cow::Borrowed("package path is a case insensitive duplicate of another path in the package") @@ -234,8 +234,8 @@ impl Diagnostic for PublishDiagnostic { specifier: Cow::Borrowed(&referrer.specifier), text_info: Cow::Borrowed(text_info), source_pos: DiagnosticSourcePos::LineAndCol { - line: referrer.start.line, - column: referrer.start.character, + line: referrer.range.start.line, + column: referrer.range.start.character, }, } } @@ -243,17 +243,7 @@ impl Diagnostic for PublishDiagnostic { use PublishDiagnostic::*; match &self { FastCheck(diagnostic) => diagnostic.location(), - SpecifierUnfurl(diagnostic) => match diagnostic { - SpecifierUnfurlerDiagnostic::UnanalyzableDynamicImport { - specifier, - text_info, - range, - } => DiagnosticLocation::ModulePosition { - specifier: Cow::Borrowed(specifier), - text_info: Cow::Borrowed(text_info), - source_pos: DiagnosticSourcePos::SourcePos(range.start), - }, - }, + SpecifierUnfurl(diagnostic) => diagnostic.location(), InvalidPath { path, .. } => { DiagnosticLocation::Path { path: path.clone() } } @@ -300,7 +290,7 @@ impl Diagnostic for PublishDiagnostic { text_info: &'a SourceTextInfo, referrer: &'a deno_graph::Range, ) -> Option> { - if referrer.start.line == 0 && referrer.start.character == 0 { + if referrer.range.start.line == 0 && referrer.range.start.character == 0 { return None; // no range, probably a jsxImportSource import } @@ -310,12 +300,12 @@ impl Diagnostic for PublishDiagnostic { style: DiagnosticSnippetHighlightStyle::Error, range: DiagnosticSourceRange { start: DiagnosticSourcePos::LineAndCol { - line: referrer.start.line, - column: referrer.start.character, + line: referrer.range.start.line, + column: referrer.range.start.character, }, end: DiagnosticSourcePos::LineAndCol { - line: referrer.end.line, - column: referrer.end.character, + line: referrer.range.end.line, + column: referrer.range.end.character, }, }, description: Some("the specifier".into()), @@ -325,24 +315,8 @@ impl Diagnostic for PublishDiagnostic { use PublishDiagnostic::*; match &self { - FastCheck(diagnostic) => diagnostic.snippet(), - SpecifierUnfurl(diagnostic) => match diagnostic { - SpecifierUnfurlerDiagnostic::UnanalyzableDynamicImport { - text_info, - range, - .. - } => Some(DiagnosticSnippet { - source: Cow::Borrowed(text_info), - highlights: vec![DiagnosticSnippetHighlight { - style: DiagnosticSnippetHighlightStyle::Warning, - range: DiagnosticSourceRange { - start: DiagnosticSourcePos::SourcePos(range.start), - end: DiagnosticSourcePos::SourcePos(range.end), - }, - description: Some("the unanalyzable dynamic import".into()), - }], - }), - }, + FastCheck(d) => d.snippet(), + SpecifierUnfurl(d) => d.snippet(), InvalidPath { .. } => None, DuplicatePath { .. } => None, UnsupportedFileType { .. } => None, @@ -380,7 +354,7 @@ impl Diagnostic for PublishDiagnostic { use PublishDiagnostic::*; match &self { FastCheck(diagnostic) => diagnostic.hint(), - SpecifierUnfurl(_) => None, + SpecifierUnfurl(d) => d.hint(), InvalidPath { .. } => Some( Cow::Borrowed("rename or remove the file, or add it to 'publish.exclude' in the config file"), ), @@ -436,9 +410,9 @@ impl Diagnostic for PublishDiagnostic { None => None, } } - SyntaxError(diagnostic) => diagnostic.snippet_fixed(), + SyntaxError(d) => d.snippet_fixed(), + SpecifierUnfurl(d) => d.snippet_fixed(), FastCheck(_) - | SpecifierUnfurl(_) | InvalidPath { .. } | DuplicatePath { .. } | UnsupportedFileType { .. } @@ -453,16 +427,8 @@ impl Diagnostic for PublishDiagnostic { fn info(&self) -> Cow<'_, [Cow<'_, str>]> { use PublishDiagnostic::*; match &self { - FastCheck(diagnostic) => { - diagnostic.info() - } - SpecifierUnfurl(diagnostic) => match diagnostic { - SpecifierUnfurlerDiagnostic::UnanalyzableDynamicImport { .. } => Cow::Borrowed(&[ - Cow::Borrowed("after publishing this package, imports from the local import map / package.json do not work"), - Cow::Borrowed("dynamic imports that can not be analyzed at publish time will not be rewritten automatically"), - Cow::Borrowed("make sure the dynamic import is resolvable at runtime without an import map / package.json") - ]), - }, + FastCheck(d) => d.info(), + SpecifierUnfurl(d) => d.info(), InvalidPath { .. } => Cow::Borrowed(&[ Cow::Borrowed("to portably support all platforms, including windows, the allowed characters in package paths are limited"), ]), @@ -476,7 +442,7 @@ impl Diagnostic for PublishDiagnostic { InvalidExternalImport { imported, .. } => Cow::Owned(vec![ Cow::Owned(format!("the import was resolved to '{}'", imported)), Cow::Borrowed("this specifier is not allowed to be imported on jsr"), - Cow::Borrowed("jsr only supports importing `jsr:`, `npm:`, and `data:` specifiers"), + Cow::Borrowed("jsr only supports importing `jsr:`, `npm:`, `data:`, `bun:`, and `node:` specifiers"), ]), UnsupportedJsxTsx { .. } => Cow::Owned(vec![ Cow::Borrowed("follow https://github.com/jsr-io/jsr/issues/24 for updates"), @@ -503,10 +469,8 @@ impl Diagnostic for PublishDiagnostic { fn docs_url(&self) -> Option> { use PublishDiagnostic::*; match &self { - FastCheck(diagnostic) => diagnostic.docs_url(), - SpecifierUnfurl(diagnostic) => match diagnostic { - SpecifierUnfurlerDiagnostic::UnanalyzableDynamicImport { .. } => None, - }, + FastCheck(d) => d.docs_url(), + SpecifierUnfurl(d) => d.docs_url(), InvalidPath { .. } => { Some(Cow::Borrowed("https://jsr.io/go/invalid-path")) } diff --git a/cli/tools/registry/graph.rs b/cli/tools/registry/graph.rs index 184557e5df7797..7152675ff87721 100644 --- a/cli/tools/registry/graph.rs +++ b/cli/tools/registry/graph.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::collections::HashSet; use std::sync::Arc; @@ -16,10 +16,9 @@ use deno_graph::WalkOptions; use deno_semver::jsr::JsrPackageReqReference; use deno_semver::npm::NpmPackageReqReference; -use crate::cache::ParsedSourceCache; - use super::diagnostics::PublishDiagnostic; use super::diagnostics::PublishDiagnosticsCollector; +use crate::cache::ParsedSourceCache; pub struct GraphDiagnosticsCollector { parsed_source_cache: Arc, @@ -47,7 +46,7 @@ impl GraphDiagnosticsCollector { resolution: &ResolutionResolved| { if visited.insert(resolution.specifier.clone()) { match resolution.specifier.scheme() { - "file" | "data" | "node" => {} + "file" | "data" | "node" | "bun" => {} "jsr" => { skip_specifiers.insert(resolution.specifier.clone()); diff --git a/cli/tools/registry/mod.rs b/cli/tools/registry/mod.rs index 12289c581b1372..ea457f8a71e429 100644 --- a/cli/tools/registry/mod.rs +++ b/cli/tools/registry/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::collections::HashMap; use std::collections::HashSet; @@ -12,8 +12,8 @@ use std::sync::Arc; use base64::prelude::BASE64_STANDARD; use base64::Engine; use deno_ast::ModuleSpecifier; +use deno_config::deno_json::ConfigFile; use deno_config::workspace::JsrPackageConfig; -use deno_config::workspace::PackageJsonDepResolution; use deno_config::workspace::Workspace; use deno_core::anyhow::bail; use deno_core::anyhow::Context; @@ -26,6 +26,7 @@ use deno_core::serde_json; use deno_core::serde_json::json; use deno_core::serde_json::Value; use deno_core::url::Url; +use deno_runtime::deno_fetch; use deno_terminal::colors; use http_body_util::BodyExt; use serde::Deserialize; @@ -43,8 +44,6 @@ use crate::cache::ParsedSourceCache; use crate::factory::CliFactory; use crate::graph_util::ModuleGraphCreator; use crate::http_util::HttpClient; -use crate::resolver::CliSloppyImportsResolver; -use crate::resolver::SloppyImportsCachedFs; use crate::tools::check::CheckOptions; use crate::tools::lint::collect_no_slow_type_diagnostics; use crate::tools::registry::diagnostics::PublishDiagnostic; @@ -67,17 +66,17 @@ use auth::get_auth_method; use auth::AuthMethod; pub use pm::add; pub use pm::cache_top_level_deps; +pub use pm::outdated; pub use pm::remove; pub use pm::AddCommandName; pub use pm::AddRmPackageReq; use publish_order::PublishOrderGraph; use unfurl::SpecifierUnfurler; -use super::check::TypeChecker; - use self::graph::GraphDiagnosticsCollector; use self::paths::CollectedPublishPath; use self::tar::PublishableTarball; +use super::check::TypeChecker; pub async fn publish( flags: Arc, @@ -90,15 +89,15 @@ pub async fn publish( let cli_options = cli_factory.cli_options()?; let directory_path = cli_options.initial_cwd(); - let publish_configs = cli_options.start_dir.jsr_packages_for_publish(); + let mut publish_configs = cli_options.start_dir.jsr_packages_for_publish(); if publish_configs.is_empty() { match cli_options.start_dir.maybe_deno_json() { Some(deno_json) => { debug_assert!(!deno_json.is_package()); - bail!( - "Missing 'name', 'version' and 'exports' field in '{}'.", - deno_json.specifier - ); + if deno_json.json.name.is_none() { + bail!("Missing 'name' field in '{}'.", deno_json.specifier); + } + error_missing_exports_field(deno_json)?; } None => { bail!( @@ -108,20 +107,21 @@ pub async fn publish( } } } + + if let Some(version) = &publish_flags.set_version { + if publish_configs.len() > 1 { + bail!("Cannot use --set-version when publishing a workspace. Change your cwd to an individual package instead."); + } + if let Some(publish_config) = publish_configs.get_mut(0) { + let mut config_file = publish_config.config_file.as_ref().clone(); + config_file.json.version = Some(version.clone()); + publish_config.config_file = Arc::new(config_file); + } + } + let specifier_unfurler = Arc::new(SpecifierUnfurler::new( - if cli_options.unstable_sloppy_imports() { - Some(CliSloppyImportsResolver::new(SloppyImportsCachedFs::new( - cli_factory.fs().clone(), - ))) - } else { - None - }, - cli_options - .create_workspace_resolver( - cli_factory.file_fetcher()?, - PackageJsonDepResolution::Enabled, - ) - .await?, + cli_factory.sloppy_imports_resolver()?.cloned(), + cli_factory.workspace_resolver().await?.clone(), cli_options.unstable_bare_node_builtins(), )); @@ -404,43 +404,15 @@ impl PublishPreparer { graph: Arc, diagnostics_collector: &PublishDiagnosticsCollector, ) -> Result, AnyError> { - static SUGGESTED_ENTRYPOINTS: [&str; 4] = - ["mod.ts", "mod.js", "index.ts", "index.js"]; - let deno_json = &package.config_file; let config_path = deno_json.specifier.to_file_path().unwrap(); let root_dir = config_path.parent().unwrap().to_path_buf(); - let Some(version) = deno_json.json.version.clone() else { - bail!("{} is missing 'version' field", deno_json.specifier); - }; - if deno_json.json.exports.is_none() { - let mut suggested_entrypoint = None; - - for entrypoint in SUGGESTED_ENTRYPOINTS { - if root_dir.join(entrypoint).exists() { - suggested_entrypoint = Some(entrypoint); - break; - } - } - - let exports_content = format!( - r#"{{ - "name": "{}", - "version": "{}", - "exports": "{}" -}}"#, - package.name, - version, - suggested_entrypoint.unwrap_or("") - ); - - bail!( - "You did not specify an entrypoint to \"{}\" package in {}. Add `exports` mapping in the configuration file, eg:\n{}", - package.name, - deno_json.specifier, - exports_content - ); - } + let version = deno_json.json.version.clone().ok_or_else(|| { + deno_core::anyhow::anyhow!( + "{} is missing 'version' field", + deno_json.specifier + ) + })?; let Some(name_no_at) = package.name.strip_prefix('@') else { bail!("Invalid package name, use '@/ format"); }; @@ -939,9 +911,7 @@ async fn publish_package( package.config ); - let body = http_body_util::Full::new(package.tarball.bytes.clone()) - .map_err(|never| match never {}) - .boxed(); + let body = deno_fetch::ReqBody::full(package.tarball.bytes.clone()); let response = http_client .post(url.parse()?, body)? .header( @@ -1107,9 +1077,9 @@ fn collect_excluded_module_diagnostics( let graph_specifiers = graph .modules() .filter_map(|m| match m { - deno_graph::Module::Js(_) | deno_graph::Module::Json(_) => { - Some(m.specifier()) - } + deno_graph::Module::Js(_) + | deno_graph::Module::Json(_) + | deno_graph::Module::Wasm(_) => Some(m.specifier()), deno_graph::Module::Npm(_) | deno_graph::Module::Node(_) | deno_graph::Module::External(_) => None, @@ -1272,6 +1242,36 @@ fn has_license_file<'a>( }) } +fn error_missing_exports_field(deno_json: &ConfigFile) -> Result<(), AnyError> { + static SUGGESTED_ENTRYPOINTS: [&str; 4] = + ["mod.ts", "mod.js", "index.ts", "index.js"]; + let mut suggested_entrypoint = None; + + for entrypoint in SUGGESTED_ENTRYPOINTS { + if deno_json.dir_path().join(entrypoint).exists() { + suggested_entrypoint = Some(entrypoint); + break; + } + } + + let exports_content = format!( + r#"{{ + "name": "{}", + "version": "{}", + "exports": "{}" +}}"#, + deno_json.json.name.as_deref().unwrap_or("@scope/name"), + deno_json.json.name.as_deref().unwrap_or("0.0.0"), + suggested_entrypoint.unwrap_or("") + ); + + bail!( + "You did not specify an entrypoint in {}. Add `exports` mapping in the configuration file, eg:\n{}", + deno_json.specifier, + exports_content + ); +} + #[allow(clippy::print_stderr)] fn ring_bell() { // ASCII code for the bell character. @@ -1280,14 +1280,14 @@ fn ring_bell() { #[cfg(test)] mod tests { - use deno_ast::ModuleSpecifier; + use std::collections::HashMap; - use crate::tools::registry::has_license_file; + use deno_ast::ModuleSpecifier; use super::tar::PublishableTarball; use super::tar::PublishableTarballFile; use super::verify_version_manifest; - use std::collections::HashMap; + use crate::tools::registry::has_license_file; #[test] fn test_verify_version_manifest() { diff --git a/cli/tools/registry/paths.rs b/cli/tools/registry/paths.rs index 8b6c05fc01e561..ef988389132237 100644 --- a/cli/tools/registry/paths.rs +++ b/cli/tools/registry/paths.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Validation logic in this file is shared with registry/api/src/ids.rs @@ -13,10 +13,10 @@ use deno_config::glob::FilePatterns; use deno_core::error::AnyError; use thiserror::Error; -use crate::args::CliOptions; - use super::diagnostics::PublishDiagnostic; use super::diagnostics::PublishDiagnosticsCollector; +use crate::args::CliOptions; +use crate::sys::CliSys; /// A package path, like '/foo' or '/foo/bar'. The path is prefixed with a slash /// and does not end with a slash. @@ -323,11 +323,11 @@ fn collect_paths( file_patterns: FilePatterns, ) -> Result, AnyError> { FileCollector::new(|e| { - if !e.metadata.is_file { + if !e.metadata.file_type().is_file() { if let Ok(specifier) = ModuleSpecifier::from_file_path(e.path) { diagnostics_collector.push(PublishDiagnostic::UnsupportedFileType { specifier, - kind: if e.metadata.is_symlink { + kind: if e.metadata.file_type().is_symlink() { "symlink".to_string() } else { "Unknown".to_string() @@ -345,5 +345,5 @@ fn collect_paths( .ignore_node_modules() .set_vendor_folder(cli_options.vendor_dir_path().map(ToOwned::to_owned)) .use_gitignore() - .collect_file_patterns(&deno_config::fs::RealDenoConfigFs, file_patterns) + .collect_file_patterns(&CliSys::default(), file_patterns) } diff --git a/cli/tools/registry/pm.rs b/cli/tools/registry/pm.rs index c1ea2c75ea52b7..2b1266bafb1956 100644 --- a/cli/tools/registry/pm.rs +++ b/cli/tools/registry/pm.rs @@ -1,9 +1,10 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::path::Path; use std::path::PathBuf; use std::sync::Arc; +use deno_cache_dir::file_fetcher::CacheSetting; use deno_core::anyhow::bail; use deno_core::anyhow::Context; use deno_core::error::AnyError; @@ -14,28 +15,32 @@ use deno_semver::jsr::JsrPackageReqReference; use deno_semver::npm::NpmPackageReqReference; use deno_semver::package::PackageNv; use deno_semver::package::PackageReq; +use deno_semver::StackString; use deno_semver::Version; use deno_semver::VersionReq; +use deps::KeyPath; use jsonc_parser::cst::CstObject; use jsonc_parser::cst::CstObjectProp; use jsonc_parser::cst::CstRootNode; use jsonc_parser::json; use crate::args::AddFlags; -use crate::args::CacheSetting; use crate::args::CliOptions; use crate::args::Flags; use crate::args::RemoveFlags; use crate::factory::CliFactory; -use crate::file_fetcher::FileFetcher; +use crate::file_fetcher::CliFileFetcher; use crate::jsr::JsrFetchResolver; use crate::npm::NpmFetchResolver; mod cache_deps; +pub(crate) mod deps; +mod outdated; pub use cache_deps::cache_top_level_deps; +pub use outdated::outdated; -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash)] enum ConfigKind { DenoJson, PackageJson, @@ -86,6 +91,28 @@ impl ConfigUpdater { self.cst.to_string() } + fn get_property_for_mutation( + &mut self, + key_path: &KeyPath, + ) -> Option { + let mut current_node = self.root_object.clone(); + + self.modified = true; + + for (i, part) in key_path.parts.iter().enumerate() { + let s = part.as_str(); + if i < key_path.parts.len().saturating_sub(1) { + let object = current_node.object_value(s)?; + current_node = object; + } else { + // last part + return current_node.get(s); + } + } + + None + } + fn add(&mut self, selected: SelectedPackage, dev: bool) { fn insert_index(object: &CstObject, searching_name: &str) -> usize { object @@ -257,7 +284,7 @@ fn package_json_dependency_entry( (npm_package.into(), selected.version_req) } else { ( - selected.import_name, + selected.import_name.into_string(), format!("npm:{}@{}", npm_package, selected.version_req), ) } @@ -266,7 +293,7 @@ fn package_json_dependency_entry( let scope_replaced = jsr_package.replace('/', "__"); let version_req = format!("npm:@jsr/{scope_replaced}@{}", selected.version_req); - (selected.import_name, version_req) + (selected.import_name.into_string(), version_req) } else { (selected.package_name, selected.version_req) } @@ -385,18 +412,19 @@ pub async fn add( let http_client = cli_factory.http_client_provider(); let deps_http_cache = cli_factory.global_http_cache()?; - let mut deps_file_fetcher = FileFetcher::new( + let deps_file_fetcher = CliFileFetcher::new( deps_http_cache.clone(), - CacheSetting::ReloadAll, - true, http_client.clone(), + cli_factory.sys(), Default::default(), None, + true, + CacheSetting::ReloadAll, + log::Level::Trace, ); let npmrc = cli_factory.cli_options().unwrap().npmrc(); - deps_file_fetcher.set_download_log_level(log::Level::Trace); let deps_file_fetcher = Arc::new(deps_file_fetcher); let jsr_resolver = Arc::new(JsrFetchResolver::new(deps_file_fetcher.clone())); let npm_resolver = @@ -406,9 +434,8 @@ pub async fn add( let mut package_reqs = Vec::with_capacity(add_flags.packages.len()); for entry_text in add_flags.packages.iter() { - let req = AddRmPackageReq::parse(entry_text).with_context(|| { - format!("Failed to parse package required: {}", entry_text) - })?; + let req = AddRmPackageReq::parse(entry_text) + .with_context(|| format!("Failed to parse package: {}", entry_text))?; match req { Ok(add_req) => package_reqs.push(add_req), @@ -524,10 +551,10 @@ pub async fn add( } struct SelectedPackage { - import_name: String, + import_name: StackString, package_name: String, version_req: String, - selected_version: String, + selected_version: StackString, } enum NotFoundHelp { @@ -658,7 +685,7 @@ async fn find_package_and_select_version_for_req( import_name: add_package_req.alias, package_name: prefixed_name, version_req: format!("{}{}", range_symbol, &nv.version), - selected_version: nv.version.to_string(), + selected_version: nv.version.to_custom_string::(), })) } @@ -680,7 +707,7 @@ enum AddRmPackageReqValue { #[derive(Debug, PartialEq, Eq)] pub struct AddRmPackageReq { - alias: String, + alias: StackString, value: AddRmPackageReqValue, } @@ -728,7 +755,11 @@ impl AddRmPackageReq { return Ok(Err(PackageReq::from_str(entry_text)?)); } - (maybe_prefix.unwrap(), Some(alias.to_string()), entry_text) + ( + maybe_prefix.unwrap(), + Some(StackString::from(alias)), + entry_text, + ) } None => return Ok(Err(PackageReq::from_str(entry_text)?)), }, @@ -740,7 +771,7 @@ impl AddRmPackageReq { JsrPackageReqReference::from_str(&format!("jsr:{}", entry_text))?; let package_req = req_ref.into_inner().req; Ok(Ok(AddRmPackageReq { - alias: maybe_alias.unwrap_or_else(|| package_req.name.to_string()), + alias: maybe_alias.unwrap_or_else(|| package_req.name.clone()), value: AddRmPackageReqValue::Jsr(package_req), })) } @@ -760,7 +791,7 @@ impl AddRmPackageReq { ); } Ok(Ok(AddRmPackageReq { - alias: maybe_alias.unwrap_or_else(|| package_req.name.to_string()), + alias: maybe_alias.unwrap_or_else(|| package_req.name.clone()), value: AddRmPackageReqValue::Npm(package_req), })) } @@ -779,9 +810,8 @@ pub async fn remove( let mut removed_packages = vec![]; for package in &remove_flags.packages { - let req = AddRmPackageReq::parse(package).with_context(|| { - format!("Failed to parse package required: {}", package) - })?; + let req = AddRmPackageReq::parse(package) + .with_context(|| format!("Failed to parse package: {}", package))?; let mut parsed_pkg_name = None; for config in configs.iter_mut().flatten() { match &req { @@ -824,7 +854,7 @@ async fn npm_install_after_modification( flags: Arc, // explicitly provided to prevent redownloading jsr_resolver: Option>, -) -> Result<(), AnyError> { +) -> Result { // clear the previously cached package.json from memory before reloading it node_resolver::PackageJsonThreadLocalCache::clear(); @@ -842,7 +872,7 @@ async fn npm_install_after_modification( lockfile.write_if_changed()?; } - Ok(()) + Ok(cli_factory) } #[cfg(test)] @@ -854,14 +884,14 @@ mod test { assert_eq!( AddRmPackageReq::parse("jsr:foo").unwrap().unwrap(), AddRmPackageReq { - alias: "foo".to_string(), + alias: "foo".into(), value: AddRmPackageReqValue::Jsr(PackageReq::from_str("foo").unwrap()) } ); assert_eq!( AddRmPackageReq::parse("alias@jsr:foo").unwrap().unwrap(), AddRmPackageReq { - alias: "alias".to_string(), + alias: "alias".into(), value: AddRmPackageReqValue::Jsr(PackageReq::from_str("foo").unwrap()) } ); @@ -870,7 +900,7 @@ mod test { .unwrap() .unwrap(), AddRmPackageReq { - alias: "@alias/pkg".to_string(), + alias: "@alias/pkg".into(), value: AddRmPackageReqValue::Npm( PackageReq::from_str("foo@latest").unwrap() ) @@ -881,7 +911,7 @@ mod test { .unwrap() .unwrap(), AddRmPackageReq { - alias: "@alias/pkg".to_string(), + alias: "@alias/pkg".into(), value: AddRmPackageReqValue::Jsr(PackageReq::from_str("foo").unwrap()) } ); @@ -890,7 +920,7 @@ mod test { .unwrap() .unwrap(), AddRmPackageReq { - alias: "alias".to_string(), + alias: "alias".into(), value: AddRmPackageReqValue::Jsr( PackageReq::from_str("foo@^1.5.0").unwrap() ) diff --git a/cli/tools/registry/pm/cache_deps.rs b/cli/tools/registry/pm/cache_deps.rs index d3c8da868c32f9..3137939cea05fb 100644 --- a/cli/tools/registry/pm/cache_deps.rs +++ b/cli/tools/registry/pm/cache_deps.rs @@ -1,14 +1,17 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. +use std::borrow::Cow; use std::sync::Arc; -use crate::factory::CliFactory; -use crate::graph_container::ModuleGraphContainer; -use crate::graph_container::ModuleGraphUpdatePermit; use deno_core::error::AnyError; use deno_core::futures::stream::FuturesUnordered; use deno_core::futures::StreamExt; -use deno_semver::package::PackageReq; +use deno_semver::jsr::JsrPackageReqReference; + +use crate::factory::CliFactory; +use crate::graph_container::ModuleGraphContainer; +use crate::graph_container::ModuleGraphUpdatePermit; +use crate::graph_util::CreateGraphOptions; pub async fn cache_top_level_deps( // todo(dsherret): don't pass the factory into this function. Instead use ctor deps @@ -17,18 +20,16 @@ pub async fn cache_top_level_deps( ) -> Result<(), AnyError> { let npm_resolver = factory.npm_resolver().await?; let cli_options = factory.cli_options()?; - let root_permissions = factory.root_permissions_container()?; if let Some(npm_resolver) = npm_resolver.as_managed() { - if !npm_resolver.ensure_top_level_package_json_install().await? { - if let Some(lockfile) = cli_options.maybe_lockfile() { - lockfile.error_if_changed()?; - } - - npm_resolver.cache_packages().await?; + npm_resolver.ensure_top_level_package_json_install().await?; + if let Some(lockfile) = cli_options.maybe_lockfile() { + lockfile.error_if_changed()?; } } // cache as many entries in the import map as we can let resolver = factory.workspace_resolver().await?; + + let mut maybe_graph_error = Ok(()); if let Some(import_map) = resolver.maybe_import_map() { let jsr_resolver = if let Some(resolver) = jsr_resolver { resolver @@ -37,6 +38,16 @@ pub async fn cache_top_level_deps( factory.file_fetcher()?.clone(), )) }; + let mut graph_permit = factory + .main_module_graph_container() + .await? + .acquire_update_permit() + .await; + let graph = graph_permit.graph_mut(); + if let Some(lockfile) = cli_options.maybe_lockfile() { + let lockfile = lockfile.lock(); + crate::graph_util::fill_graph_from_lockfile(graph, &lockfile); + } let mut roots = Vec::new(); @@ -56,19 +67,27 @@ pub async fn cache_top_level_deps( match specifier.scheme() { "jsr" => { let specifier_str = specifier.as_str(); - let specifier_str = - specifier_str.strip_prefix("jsr:").unwrap_or(specifier_str); - if let Ok(req) = PackageReq::from_str(specifier_str) { - if !seen_reqs.insert(req.clone()) { + if let Ok(req) = JsrPackageReqReference::from_str(specifier_str) { + if let Some(sub_path) = req.sub_path() { + if sub_path.ends_with('/') { + continue; + } + roots.push(specifier.clone()); continue; } + if !seen_reqs.insert(req.req().clone()) { + continue; + } + let resolved_req = graph.packages.mappings().get(req.req()); let jsr_resolver = jsr_resolver.clone(); info_futures.push(async move { - if let Some(nv) = jsr_resolver.req_to_nv(&req).await { - if let Some(info) = jsr_resolver.package_version_info(&nv).await - { - return Some((specifier.clone(), info)); - } + let nv = if let Some(req) = resolved_req { + Cow::Borrowed(req) + } else { + Cow::Owned(jsr_resolver.req_to_nv(req.req()).await?) + }; + if let Some(info) = jsr_resolver.package_version_info(&nv).await { + return Some((specifier.clone(), info)); } None }); @@ -101,25 +120,31 @@ pub async fn cache_top_level_deps( } } } - let mut graph_permit = factory - .main_module_graph_container() - .await? - .acquire_update_permit() - .await; - let graph = graph_permit.graph_mut(); - factory - .module_load_preparer() - .await? - .prepare_module_load( + drop(info_futures); + + let graph_builder = factory.module_graph_builder().await?; + graph_builder + .build_graph_with_npm_resolution( graph, - &roots, - false, - deno_config::deno_json::TsTypeLib::DenoWorker, - root_permissions.clone(), - None, + CreateGraphOptions { + loader: None, + graph_kind: graph.graph_kind(), + is_dynamic: false, + roots: roots.clone(), + npm_caching: crate::graph_util::NpmCachingStrategy::Manual, + }, ) .await?; + maybe_graph_error = graph_builder.graph_roots_valid(graph, &roots); + } + + if let Some(npm_resolver) = npm_resolver.as_managed() { + npm_resolver + .cache_packages(crate::npm::PackageCaching::All) + .await?; } + maybe_graph_error?; + Ok(()) } diff --git a/cli/tools/registry/pm/deps.rs b/cli/tools/registry/pm/deps.rs new file mode 100644 index 00000000000000..708f95f9870fa3 --- /dev/null +++ b/cli/tools/registry/pm/deps.rs @@ -0,0 +1,926 @@ +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::borrow::Cow; +use std::collections::HashMap; +use std::path::PathBuf; +use std::sync::Arc; + +use deno_ast::ModuleSpecifier; +use deno_config::deno_json::ConfigFile; +use deno_config::deno_json::ConfigFileRc; +use deno_config::workspace::Workspace; +use deno_config::workspace::WorkspaceDirectory; +use deno_core::anyhow::bail; +use deno_core::anyhow::Context; +use deno_core::error::AnyError; +use deno_core::futures::future::try_join; +use deno_core::futures::stream::FuturesOrdered; +use deno_core::futures::stream::FuturesUnordered; +use deno_core::futures::FutureExt; +use deno_core::futures::StreamExt; +use deno_core::serde_json; +use deno_package_json::PackageJsonDepsMap; +use deno_package_json::PackageJsonRc; +use deno_runtime::deno_permissions::PermissionsContainer; +use deno_semver::jsr::JsrPackageReqReference; +use deno_semver::npm::NpmPackageReqReference; +use deno_semver::package::PackageNv; +use deno_semver::package::PackageReq; +use deno_semver::package::PackageReqReference; +use deno_semver::StackString; +use deno_semver::Version; +use deno_semver::VersionReq; +use import_map::ImportMap; +use import_map::ImportMapWithDiagnostics; +use import_map::SpecifierMapEntry; +use tokio::sync::Semaphore; + +use super::ConfigUpdater; +use crate::args::CliLockfile; +use crate::graph_container::MainModuleGraphContainer; +use crate::graph_container::ModuleGraphContainer; +use crate::graph_container::ModuleGraphUpdatePermit; +use crate::jsr::JsrFetchResolver; +use crate::module_loader::ModuleLoadPreparer; +use crate::npm::CliNpmResolver; +use crate::npm::NpmFetchResolver; +use crate::util::sync::AtomicFlag; + +#[derive(Clone, Debug, PartialEq, Eq)] +pub enum ImportMapKind { + Inline, + Outline(PathBuf), +} + +#[derive(Clone)] +pub enum DepLocation { + DenoJson(ConfigFileRc, KeyPath, ImportMapKind), + PackageJson(PackageJsonRc, KeyPath), +} + +impl DepLocation { + pub fn is_deno_json(&self) -> bool { + matches!(self, DepLocation::DenoJson(..)) + } + + pub fn file_path(&self) -> Cow { + match self { + DepLocation::DenoJson(arc, _, kind) => match kind { + ImportMapKind::Inline => { + Cow::Owned(arc.specifier.to_file_path().unwrap()) + } + ImportMapKind::Outline(path) => Cow::Borrowed(path.as_path()), + }, + DepLocation::PackageJson(arc, _) => Cow::Borrowed(arc.path.as_ref()), + } + } + fn config_kind(&self) -> super::ConfigKind { + match self { + DepLocation::DenoJson(_, _, _) => super::ConfigKind::DenoJson, + DepLocation::PackageJson(_, _) => super::ConfigKind::PackageJson, + } + } +} + +struct DebugAdapter(T); + +impl<'a> std::fmt::Debug for DebugAdapter<&'a ConfigFileRc> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("ConfigFile") + .field("specifier", &self.0.specifier) + .finish() + } +} +impl<'a> std::fmt::Debug for DebugAdapter<&'a PackageJsonRc> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("PackageJson") + .field("path", &self.0.path) + .finish() + } +} + +impl std::fmt::Debug for DepLocation { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + DepLocation::DenoJson(arc, key_path, kind) => { + let mut debug = f.debug_tuple("DenoJson"); + debug + .field(&DebugAdapter(arc)) + .field(key_path) + .field(kind) + .finish() + } + DepLocation::PackageJson(arc, key_path) => { + let mut debug = f.debug_tuple("PackageJson"); + debug.field(&DebugAdapter(arc)).field(key_path).finish() + } + } + } +} + +#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] +pub enum DepKind { + Jsr, + Npm, +} + +impl DepKind { + pub fn scheme(&self) -> &'static str { + match self { + DepKind::Npm => "npm", + DepKind::Jsr => "jsr", + } + } +} + +#[derive(Clone, Debug)] +pub enum KeyPart { + Imports, + Scopes, + Dependencies, + DevDependencies, + String(StackString), +} + +impl From for KeyPart { + fn from(value: PackageJsonDepKind) -> Self { + match value { + PackageJsonDepKind::Normal => Self::Dependencies, + PackageJsonDepKind::Dev => Self::DevDependencies, + } + } +} + +impl KeyPart { + pub fn as_str(&self) -> &str { + match self { + KeyPart::Imports => "imports", + KeyPart::Scopes => "scopes", + KeyPart::Dependencies => "dependencies", + KeyPart::DevDependencies => "devDependencies", + KeyPart::String(s) => s.as_str(), + } + } +} + +#[derive(Clone, Debug)] +pub struct KeyPath { + pub parts: Vec, +} + +impl KeyPath { + fn from_parts(parts: impl IntoIterator) -> Self { + Self { + parts: parts.into_iter().collect(), + } + } + fn last(&self) -> Option<&KeyPart> { + self.parts.last() + } + fn push(&mut self, part: KeyPart) { + self.parts.push(part) + } +} + +#[derive(Clone, Debug)] +pub struct Dep { + pub req: PackageReq, + pub kind: DepKind, + pub location: DepLocation, + #[allow(dead_code)] + pub id: DepId, + #[allow(dead_code)] + pub alias: Option, +} + +fn import_map_entries( + import_map: &ImportMap, +) -> impl Iterator)> { + import_map + .imports() + .entries() + .map(|entry| { + ( + KeyPath::from_parts([ + KeyPart::Imports, + KeyPart::String(entry.raw_key.into()), + ]), + entry, + ) + }) + .chain(import_map.scopes().flat_map(|scope| { + let path = KeyPath::from_parts([ + KeyPart::Scopes, + KeyPart::String(scope.raw_key.into()), + ]); + + scope.imports.entries().map(move |entry| { + let mut full_path = path.clone(); + full_path.push(KeyPart::String(entry.raw_key.into())); + (full_path, entry) + }) + })) +} + +fn to_import_map_value_from_imports( + deno_json: &ConfigFile, +) -> serde_json::Value { + let mut value = serde_json::Map::with_capacity(2); + if let Some(imports) = &deno_json.json.imports { + value.insert("imports".to_string(), imports.clone()); + } + if let Some(scopes) = &deno_json.json.scopes { + value.insert("scopes".to_string(), scopes.clone()); + } + serde_json::Value::Object(value) +} + +fn deno_json_import_map( + deno_json: &ConfigFile, +) -> Result, AnyError> { + let (value, kind) = if deno_json.json.imports.is_some() + || deno_json.json.scopes.is_some() + { + ( + to_import_map_value_from_imports(deno_json), + ImportMapKind::Inline, + ) + } else { + match deno_json.to_import_map_path()? { + Some(path) => { + let err_context = || { + format!( + "loading import map at '{}' (from \"importMap\" field in '{}')", + path.display(), + deno_json.specifier + ) + }; + let text = std::fs::read_to_string(&path).with_context(err_context)?; + let value = serde_json::from_str(&text).with_context(err_context)?; + (value, ImportMapKind::Outline(path)) + } + None => return Ok(None), + } + }; + + import_map::parse_from_value(deno_json.specifier.clone(), value) + .map_err(Into::into) + .map(|import_map| Some((import_map, kind))) +} + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +enum PackageJsonDepKind { + Normal, + Dev, +} + +fn add_deps_from_deno_json( + deno_json: &Arc, + mut filter: impl DepFilter, + deps: &mut Vec, +) { + let (import_map, import_map_kind) = match deno_json_import_map(deno_json) { + Ok(Some((import_map, import_map_kind))) => (import_map, import_map_kind), + Ok(None) => return, + Err(e) => { + log::warn!("failed to parse imports from {}: {e}", &deno_json.specifier); + return; + } + }; + for (key_path, entry) in import_map_entries(&import_map.import_map) { + let Some(value) = entry.value else { continue }; + let kind = match value.scheme() { + "npm" => DepKind::Npm, + "jsr" => DepKind::Jsr, + _ => continue, + }; + let req = match parse_req_reference(value.as_str(), kind) { + Ok(req) => req.req.clone(), + Err(err) => { + log::warn!("failed to parse package req \"{}\": {err}", value.as_str()); + continue; + } + }; + let alias: &str = key_path.last().unwrap().as_str().trim_end_matches('/'); + let alias = (alias != req.name).then(|| alias.to_string()); + if !filter.should_include(alias.as_deref(), &req, kind) { + continue; + } + let id = DepId(deps.len()); + deps.push(Dep { + location: DepLocation::DenoJson( + deno_json.clone(), + key_path, + import_map_kind.clone(), + ), + kind, + req, + id, + alias, + }); + } +} + +fn add_deps_from_package_json( + package_json: &PackageJsonRc, + filter: impl DepFilter, + deps: &mut Vec, +) { + let package_json_deps = package_json.resolve_local_package_json_deps(); + + fn iterate( + package_json: &PackageJsonRc, + mut filter: impl DepFilter, + package_dep_kind: PackageJsonDepKind, + package_json_deps: &PackageJsonDepsMap, + deps: &mut Vec, + ) { + for (k, v) in package_json_deps { + let v = match v { + Ok(v) => v, + Err(e) => { + log::warn!("bad package json dep value: {e}"); + continue; + } + }; + match v { + deno_package_json::PackageJsonDepValue::Req(req) => { + let alias = k.as_str(); + let alias = (alias != req.name).then(|| alias.to_string()); + if !filter.should_include(alias.as_deref(), req, DepKind::Npm) { + continue; + } + let id = DepId(deps.len()); + deps.push(Dep { + id, + kind: DepKind::Npm, + location: DepLocation::PackageJson( + package_json.clone(), + KeyPath::from_parts([ + package_dep_kind.into(), + KeyPart::String(k.clone()), + ]), + ), + req: req.clone(), + alias, + }) + } + deno_package_json::PackageJsonDepValue::Workspace(_) => continue, + } + } + } + + iterate( + package_json, + filter, + PackageJsonDepKind::Normal, + &package_json_deps.dependencies, + deps, + ); + iterate( + package_json, + filter, + PackageJsonDepKind::Dev, + &package_json_deps.dev_dependencies, + deps, + ); +} + +fn deps_from_workspace( + workspace: &Arc, + dep_filter: impl DepFilter, +) -> Result, AnyError> { + let mut deps = Vec::with_capacity(256); + for deno_json in workspace.deno_jsons() { + add_deps_from_deno_json(deno_json, dep_filter, &mut deps); + } + for package_json in workspace.package_jsons() { + add_deps_from_package_json(package_json, dep_filter, &mut deps); + } + + Ok(deps) +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] +pub struct DepId(usize); + +#[derive(Debug, Clone)] +pub enum Change { + Update(DepId, VersionReq), +} + +pub trait DepFilter: Copy { + fn should_include( + &mut self, + alias: Option<&str>, + package_req: &PackageReq, + dep_kind: DepKind, + ) -> bool; +} + +impl DepFilter for T +where + T: FnMut(Option<&str>, &PackageReq, DepKind) -> bool + Copy, +{ + fn should_include<'a>( + &mut self, + alias: Option<&'a str>, + package_req: &'a PackageReq, + dep_kind: DepKind, + ) -> bool { + (*self)(alias, package_req, dep_kind) + } +} + +#[derive(Clone, Debug)] +pub struct PackageLatestVersion { + pub semver_compatible: Option, + pub latest: Option, +} + +pub struct DepManager { + deps: Vec, + resolved_versions: Vec>, + latest_versions: Vec, + + pending_changes: Vec, + + dependencies_resolved: AtomicFlag, + module_load_preparer: Arc, + // TODO(nathanwhit): probably shouldn't be pub + pub(crate) jsr_fetch_resolver: Arc, + pub(crate) npm_fetch_resolver: Arc, + npm_resolver: Arc, + permissions_container: PermissionsContainer, + main_module_graph_container: Arc, + lockfile: Option>, +} + +pub struct DepManagerArgs { + pub module_load_preparer: Arc, + pub jsr_fetch_resolver: Arc, + pub npm_fetch_resolver: Arc, + pub npm_resolver: Arc, + pub permissions_container: PermissionsContainer, + pub main_module_graph_container: Arc, + pub lockfile: Option>, +} + +impl DepManager { + pub fn reloaded_after_modification(self, args: DepManagerArgs) -> Self { + let mut new = Self::with_deps_args(self.deps, args); + new.latest_versions = self.latest_versions; + new + } + fn with_deps_args(deps: Vec, args: DepManagerArgs) -> Self { + let DepManagerArgs { + module_load_preparer, + jsr_fetch_resolver, + npm_fetch_resolver, + npm_resolver, + permissions_container, + main_module_graph_container, + lockfile, + } = args; + Self { + deps, + resolved_versions: Vec::new(), + latest_versions: Vec::new(), + jsr_fetch_resolver, + dependencies_resolved: AtomicFlag::lowered(), + module_load_preparer, + npm_fetch_resolver, + npm_resolver, + permissions_container, + main_module_graph_container, + lockfile, + pending_changes: Vec::new(), + } + } + pub fn from_workspace_dir( + workspace_dir: &Arc, + dep_filter: impl DepFilter, + args: DepManagerArgs, + ) -> Result { + let mut deps = Vec::with_capacity(256); + if let Some(deno_json) = workspace_dir.maybe_deno_json() { + if deno_json.specifier.scheme() != "file" { + bail!("remote deno.json files are not supported"); + } + let path = deno_json.specifier.to_file_path().unwrap(); + if path.parent().unwrap() == workspace_dir.dir_path() { + add_deps_from_deno_json(deno_json, dep_filter, &mut deps); + } + } + if let Some(package_json) = workspace_dir.maybe_pkg_json() { + add_deps_from_package_json(package_json, dep_filter, &mut deps); + } + + Ok(Self::with_deps_args(deps, args)) + } + pub fn from_workspace( + workspace: &Arc, + dep_filter: impl DepFilter, + args: DepManagerArgs, + ) -> Result { + let deps = deps_from_workspace(workspace, dep_filter)?; + Ok(Self::with_deps_args(deps, args)) + } + + async fn run_dependency_resolution(&self) -> Result<(), AnyError> { + if self.dependencies_resolved.is_raised() { + return Ok(()); + } + + let mut graph_permit = self + .main_module_graph_container + .acquire_update_permit() + .await; + let graph = graph_permit.graph_mut(); + // populate the information from the lockfile + if let Some(lockfile) = &self.lockfile { + let lockfile = lockfile.lock(); + + crate::graph_util::fill_graph_from_lockfile(graph, &lockfile); + } + + let npm_resolver = self.npm_resolver.as_managed().unwrap(); + if self.deps.iter().all(|dep| match dep.kind { + DepKind::Npm => { + npm_resolver.resolve_pkg_id_from_pkg_req(&dep.req).is_ok() + } + DepKind::Jsr => graph.packages.mappings().contains_key(&dep.req), + }) { + self.dependencies_resolved.raise(); + graph_permit.commit(); + return Ok(()); + } + + npm_resolver.ensure_top_level_package_json_install().await?; + let mut roots = Vec::new(); + let mut info_futures = FuturesUnordered::new(); + for dep in &self.deps { + if dep.location.is_deno_json() { + match dep.kind { + DepKind::Npm => roots.push( + ModuleSpecifier::parse(&format!("npm:/{}/", dep.req)).unwrap(), + ), + DepKind::Jsr => info_futures.push(async { + if let Some(nv) = self.jsr_fetch_resolver.req_to_nv(&dep.req).await + { + if let Some(info) = + self.jsr_fetch_resolver.package_version_info(&nv).await + { + let specifier = + ModuleSpecifier::parse(&format!("jsr:/{}/", dep.req)) + .unwrap(); + return Some((specifier, info)); + } + } + None + }), + } + } + } + + while let Some(info_future) = info_futures.next().await { + if let Some((specifier, info)) = info_future { + let exports = info.exports(); + for (k, _) in exports { + if let Ok(spec) = specifier.join(k) { + roots.push(spec); + } + } + } + } + + self + .module_load_preparer + .prepare_module_load( + graph, + &roots, + false, + deno_config::deno_json::TsTypeLib::DenoWindow, + self.permissions_container.clone(), + None, + ) + .await?; + + self.dependencies_resolved.raise(); + graph_permit.commit(); + + Ok(()) + } + + pub fn resolved_version(&self, id: DepId) -> Option<&PackageNv> { + self.resolved_versions[id.0].as_ref() + } + + pub async fn resolve_current_versions(&mut self) -> Result<(), AnyError> { + self.run_dependency_resolution().await?; + + let graph = self.main_module_graph_container.graph(); + + let mut resolved = Vec::with_capacity(self.deps.len()); + let snapshot = self.npm_resolver.as_managed().unwrap().snapshot(); + let resolved_npm = snapshot.package_reqs(); + let resolved_jsr = graph.packages.mappings(); + for dep in &self.deps { + match dep.kind { + DepKind::Npm => { + let resolved_version = resolved_npm.get(&dep.req).cloned(); + resolved.push(resolved_version); + } + DepKind::Jsr => { + let resolved_version = resolved_jsr.get(&dep.req).cloned(); + resolved.push(resolved_version) + } + } + } + + self.resolved_versions = resolved; + + Ok(()) + } + + async fn load_latest_versions( + &self, + ) -> Result, AnyError> { + if self.latest_versions.len() == self.deps.len() { + return Ok(self.latest_versions.clone()); + } + let mut latest_versions = Vec::with_capacity(self.deps.len()); + + let npm_sema = Semaphore::new(32); + let jsr_sema = Semaphore::new(32); + let mut futs = FuturesOrdered::new(); + + for dep in &self.deps { + match dep.kind { + DepKind::Npm => futs.push_back( + async { + let semver_req = &dep.req; + let _permit = npm_sema.acquire().await; + let semver_compatible = + self.npm_fetch_resolver.req_to_nv(semver_req).await; + let info = + self.npm_fetch_resolver.package_info(&semver_req.name).await; + let latest = info + .and_then(|info| { + let latest_tag = info.dist_tags.get("latest")?; + let lower_bound = &semver_compatible.as_ref()?.version; + if latest_tag > lower_bound { + Some(latest_tag.clone()) + } else { + latest_version(Some(latest_tag), info.versions.keys()) + } + }) + .map(|version| PackageNv { + name: semver_req.name.clone(), + version, + }); + PackageLatestVersion { + latest, + semver_compatible, + } + } + .boxed_local(), + ), + DepKind::Jsr => futs.push_back( + async { + let semver_req = &dep.req; + let _permit = jsr_sema.acquire().await; + let semver_compatible = + self.jsr_fetch_resolver.req_to_nv(semver_req).await; + let info = + self.jsr_fetch_resolver.package_info(&semver_req.name).await; + let latest = info + .and_then(|info| { + let lower_bound = &semver_compatible.as_ref()?.version; + latest_version( + Some(lower_bound), + info.versions.iter().filter_map(|(version, version_info)| { + if !version_info.yanked { + Some(version) + } else { + None + } + }), + ) + }) + .map(|version| PackageNv { + name: semver_req.name.clone(), + version, + }); + PackageLatestVersion { + latest, + semver_compatible, + } + } + .boxed_local(), + ), + } + } + while let Some(nv) = futs.next().await { + latest_versions.push(nv); + } + + Ok(latest_versions) + } + + pub async fn resolve_versions(&mut self) -> Result<(), AnyError> { + let (_, latest_versions) = try_join( + self.run_dependency_resolution(), + self.load_latest_versions(), + ) + .await?; + + self.latest_versions = latest_versions; + + self.resolve_current_versions().await?; + + Ok(()) + } + + pub fn deps_with_resolved_latest_versions( + &self, + ) -> impl IntoIterator, PackageLatestVersion)> + '_ + { + self + .resolved_versions + .iter() + .zip(self.latest_versions.iter()) + .enumerate() + .map(|(i, (resolved, latest))| { + (DepId(i), resolved.clone(), latest.clone()) + }) + } + + pub fn get_dep(&self, id: DepId) -> &Dep { + &self.deps[id.0] + } + + pub fn update_dep(&mut self, dep_id: DepId, new_version_req: VersionReq) { + self + .pending_changes + .push(Change::Update(dep_id, new_version_req)); + } + + pub fn commit_changes(&mut self) -> Result<(), AnyError> { + let changes = std::mem::take(&mut self.pending_changes); + let mut config_updaters = HashMap::new(); + for change in changes { + match change { + Change::Update(dep_id, version_req) => { + // TODO: move most of this to ConfigUpdater + let dep = &mut self.deps[dep_id.0]; + dep.req.version_req = version_req.clone(); + match &dep.location { + DepLocation::DenoJson(arc, key_path, _) => { + let updater = + get_or_create_updater(&mut config_updaters, &dep.location)?; + + let Some(property) = updater.get_property_for_mutation(key_path) + else { + log::warn!( + "failed to find property at path {key_path:?} for file {}", + arc.specifier + ); + continue; + }; + let Some(string_value) = cst_string_literal(&property) else { + continue; + }; + let mut req_reference = match dep.kind { + DepKind::Npm => NpmPackageReqReference::from_str(&string_value) + .unwrap() + .into_inner(), + DepKind::Jsr => JsrPackageReqReference::from_str(&string_value) + .unwrap() + .into_inner(), + }; + req_reference.req.version_req = version_req; + let mut new_value = + format!("{}:{}", dep.kind.scheme(), req_reference); + if string_value.ends_with('/') && !new_value.ends_with('/') { + // the display impl for PackageReqReference maps `/` to the root + // subpath, but for the import map the trailing `/` is significant + new_value.push('/'); + } + if string_value + .trim_start_matches(format!("{}:", dep.kind.scheme()).as_str()) + .starts_with('/') + { + // this is gross + new_value = new_value.replace(':', ":/"); + } + property + .set_value(jsonc_parser::cst::CstInputValue::String(new_value)); + } + DepLocation::PackageJson(arc, key_path) => { + let updater = + get_or_create_updater(&mut config_updaters, &dep.location)?; + let Some(property) = updater.get_property_for_mutation(key_path) + else { + log::warn!( + "failed to find property at path {key_path:?} for file {}", + arc.path.display() + ); + continue; + }; + let Some(string_value) = cst_string_literal(&property) else { + continue; + }; + let new_value = if string_value.starts_with("npm:") { + // aliased + let rest = string_value.trim_start_matches("npm:"); + let mut parts = rest.split('@'); + let first = parts.next().unwrap(); + if first.is_empty() { + let scope_and_name = parts.next().unwrap(); + format!("npm:@{scope_and_name}@{version_req}") + } else { + format!("npm:{first}@{version_req}") + } + } else if string_value.contains(":") { + bail!("Unexpected package json dependency string: \"{string_value}\" in {}", arc.path.display()); + } else { + version_req.to_string() + }; + property + .set_value(jsonc_parser::cst::CstInputValue::String(new_value)); + } + } + } + } + } + + for (_, updater) in config_updaters { + updater.commit()?; + } + + Ok(()) + } +} + +fn get_or_create_updater<'a>( + config_updaters: &'a mut HashMap, + location: &DepLocation, +) -> Result<&'a mut ConfigUpdater, AnyError> { + match config_updaters.entry(location.file_path().into_owned()) { + std::collections::hash_map::Entry::Occupied(occupied_entry) => { + Ok(occupied_entry.into_mut()) + } + std::collections::hash_map::Entry::Vacant(vacant_entry) => { + let updater = ConfigUpdater::new( + location.config_kind(), + location.file_path().into_owned(), + )?; + Ok(vacant_entry.insert(updater)) + } + } +} + +fn cst_string_literal( + property: &jsonc_parser::cst::CstObjectProp, +) -> Option { + // TODO(nathanwhit): ensure this unwrap is safe + let value = property.value().unwrap(); + let Some(string) = value.as_string_lit() else { + log::warn!("malformed entry"); + return None; + }; + let Ok(string_value) = string.decoded_value() else { + log::warn!("malformed string: {string:?}"); + return None; + }; + Some(string_value) +} + +fn parse_req_reference( + input: &str, + kind: DepKind, +) -> Result< + PackageReqReference, + deno_semver::package::PackageReqReferenceParseError, +> { + Ok(match kind { + DepKind::Npm => NpmPackageReqReference::from_str(input)?.into_inner(), + DepKind::Jsr => JsrPackageReqReference::from_str(input)?.into_inner(), + }) +} + +fn latest_version<'a>( + start: Option<&Version>, + versions: impl IntoIterator, +) -> Option { + let mut best = start; + for version in versions { + match best { + Some(best_version) if version > best_version => best = Some(version), + None => best = Some(version), + _ => {} + } + } + best.cloned() +} diff --git a/cli/tools/registry/pm/outdated.rs b/cli/tools/registry/pm/outdated.rs new file mode 100644 index 00000000000000..e7fc88c31fe7fa --- /dev/null +++ b/cli/tools/registry/pm/outdated.rs @@ -0,0 +1,690 @@ +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::collections::HashSet; +use std::sync::Arc; + +use deno_cache_dir::file_fetcher::CacheSetting; +use deno_core::anyhow::bail; +use deno_core::error::AnyError; +use deno_semver::package::PackageNv; +use deno_semver::package::PackageReq; +use deno_semver::StackString; +use deno_semver::VersionReq; +use deno_terminal::colors; + +use super::deps::Dep; +use super::deps::DepManager; +use super::deps::DepManagerArgs; +use super::deps::PackageLatestVersion; +use crate::args::CliOptions; +use crate::args::Flags; +use crate::args::OutdatedFlags; +use crate::factory::CliFactory; +use crate::file_fetcher::CliFileFetcher; +use crate::jsr::JsrFetchResolver; +use crate::npm::NpmFetchResolver; +use crate::tools::registry::pm::deps::DepKind; + +#[derive(Debug, PartialEq, Eq, PartialOrd, Ord)] +struct OutdatedPackage { + kind: DepKind, + latest: String, + semver_compatible: String, + current: String, + name: StackString, +} + +#[allow(clippy::print_stdout)] +fn print_outdated_table(packages: &[OutdatedPackage]) { + const HEADINGS: &[&str] = &["Package", "Current", "Update", "Latest"]; + + let mut longest_package = 0; + let mut longest_current = 0; + let mut longest_update = 0; + let mut longest_latest = 0; + + for package in packages { + let name_len = package.kind.scheme().len() + 1 + package.name.len(); + longest_package = longest_package.max(name_len); + longest_current = longest_current.max(package.current.len()); + longest_update = longest_update.max(package.semver_compatible.len()); + longest_latest = longest_latest.max(package.latest.len()); + } + + let package_column_width = longest_package.max(HEADINGS[0].len()) + 2; + let current_column_width = longest_current.max(HEADINGS[1].len()) + 2; + let update_column_width = longest_update.max(HEADINGS[2].len()) + 2; + let latest_column_width = longest_latest.max(HEADINGS[3].len()) + 2; + + let package_fill = "─".repeat(package_column_width); + let current_fill = "─".repeat(current_column_width); + let update_fill = "─".repeat(update_column_width); + let latest_fill = "─".repeat(latest_column_width); + + println!("┌{package_fill}┬{current_fill}┬{update_fill}┬{latest_fill}┐"); + println!( + "│ {}{} │ {}{} │ {}{} │ {}{} │", + colors::intense_blue(HEADINGS[0]), + " ".repeat(package_column_width - 2 - HEADINGS[0].len()), + colors::intense_blue(HEADINGS[1]), + " ".repeat(current_column_width - 2 - HEADINGS[1].len()), + colors::intense_blue(HEADINGS[2]), + " ".repeat(update_column_width - 2 - HEADINGS[2].len()), + colors::intense_blue(HEADINGS[3]), + " ".repeat(latest_column_width - 2 - HEADINGS[3].len()) + ); + for package in packages { + println!("├{package_fill}┼{current_fill}┼{update_fill}┼{latest_fill}┤",); + + print!( + "│ {:Run deno outdated --update{} to update to the latest {} versions,\nor deno outdated --help for more information.", + cmd, + txt, + ) + ); +} + +fn print_outdated( + deps: &mut DepManager, + compatible: bool, +) -> Result<(), AnyError> { + let mut outdated = Vec::new(); + let mut seen = std::collections::BTreeSet::new(); + for (dep_id, resolved, latest_versions) in + deps.deps_with_resolved_latest_versions() + { + let dep = deps.get_dep(dep_id); + + let Some(resolved) = resolved else { continue }; + + let latest = { + let preferred = if compatible { + &latest_versions.semver_compatible + } else { + &latest_versions.latest + }; + if let Some(v) = preferred { + v + } else { + continue; + } + }; + + if latest > &resolved + && seen.insert((dep.kind, dep.req.name.clone(), resolved.version.clone())) + { + outdated.push(OutdatedPackage { + kind: dep.kind, + name: dep.req.name.clone(), + current: resolved.version.to_string(), + latest: latest_versions + .latest + .map(|l| l.version.to_string()) + .unwrap_or_default(), + semver_compatible: latest_versions + .semver_compatible + .map(|l| l.version.to_string()) + .unwrap_or_default(), + }) + } + } + + if !outdated.is_empty() { + outdated.sort(); + print_outdated_table(&outdated); + print_suggestion(compatible); + } + + Ok(()) +} + +pub async fn outdated( + flags: Arc, + update_flags: OutdatedFlags, +) -> Result<(), AnyError> { + let factory = CliFactory::from_flags(flags.clone()); + let cli_options = factory.cli_options()?; + let workspace = cli_options.workspace(); + let http_client = factory.http_client_provider(); + let deps_http_cache = factory.global_http_cache()?; + let file_fetcher = CliFileFetcher::new( + deps_http_cache.clone(), + http_client.clone(), + factory.sys(), + Default::default(), + None, + true, + CacheSetting::RespectHeaders, + log::Level::Trace, + ); + let file_fetcher = Arc::new(file_fetcher); + let npm_fetch_resolver = Arc::new(NpmFetchResolver::new( + file_fetcher.clone(), + cli_options.npmrc().clone(), + )); + let jsr_fetch_resolver = + Arc::new(JsrFetchResolver::new(file_fetcher.clone())); + + if !cli_options.start_dir.has_deno_json() + && !cli_options.start_dir.has_pkg_json() + { + bail!( + "No deno.json or package.json in \"{}\".", + cli_options.initial_cwd().display(), + ); + } + + let args = dep_manager_args( + &factory, + cli_options, + npm_fetch_resolver.clone(), + jsr_fetch_resolver.clone(), + ) + .await?; + + let filter_set = filter::FilterSet::from_filter_strings( + update_flags.filters.iter().map(|s| s.as_str()), + )?; + + let filter_fn = |alias: Option<&str>, req: &PackageReq, _: DepKind| { + if filter_set.is_empty() { + return true; + } + let name = alias.unwrap_or(&req.name); + filter_set.matches(name) + }; + let mut deps = if update_flags.recursive { + super::deps::DepManager::from_workspace(workspace, filter_fn, args)? + } else { + super::deps::DepManager::from_workspace_dir( + &cli_options.start_dir, + filter_fn, + args, + )? + }; + + deps.resolve_versions().await?; + + match update_flags.kind { + crate::args::OutdatedKind::Update { latest } => { + update(deps, latest, &filter_set, flags).await?; + } + crate::args::OutdatedKind::PrintOutdated { compatible } => { + print_outdated(&mut deps, compatible)?; + } + } + + Ok(()) +} + +fn choose_new_version_req( + dep: &Dep, + resolved: Option<&PackageNv>, + latest_versions: &PackageLatestVersion, + update_to_latest: bool, + filter_set: &filter::FilterSet, +) -> Option { + let explicit_version_req = filter_set + .matching_filter(dep.alias.as_deref().unwrap_or(&dep.req.name)) + .version_spec() + .cloned(); + + if let Some(version_req) = explicit_version_req { + if let Some(resolved) = resolved { + // todo(nathanwhit): handle tag + if version_req.tag().is_none() && version_req.matches(&resolved.version) { + return None; + } + } + Some(version_req) + } else { + let preferred = if update_to_latest { + latest_versions.latest.as_ref()? + } else { + latest_versions.semver_compatible.as_ref()? + }; + if preferred.version <= resolved?.version { + return None; + } + Some( + VersionReq::parse_from_specifier( + format!("^{}", preferred.version).as_str(), + ) + .unwrap(), + ) + } +} + +async fn update( + mut deps: DepManager, + update_to_latest: bool, + filter_set: &filter::FilterSet, + flags: Arc, +) -> Result<(), AnyError> { + let mut updated = Vec::new(); + + for (dep_id, resolved, latest_versions) in deps + .deps_with_resolved_latest_versions() + .into_iter() + .collect::>() + { + let dep = deps.get_dep(dep_id); + let new_version_req = choose_new_version_req( + dep, + resolved.as_ref(), + &latest_versions, + update_to_latest, + filter_set, + ); + let Some(new_version_req) = new_version_req else { + continue; + }; + + updated.push(( + dep_id, + format!("{}:{}", dep.kind.scheme(), dep.req.name), + deps.resolved_version(dep.id).cloned(), + new_version_req.clone(), + )); + + deps.update_dep(dep_id, new_version_req); + } + + deps.commit_changes()?; + + if !updated.is_empty() { + let factory = super::npm_install_after_modification( + flags.clone(), + Some(deps.jsr_fetch_resolver.clone()), + ) + .await?; + + let mut updated_to_versions = HashSet::new(); + let cli_options = factory.cli_options()?; + let args = dep_manager_args( + &factory, + cli_options, + deps.npm_fetch_resolver.clone(), + deps.jsr_fetch_resolver.clone(), + ) + .await?; + + let mut deps = deps.reloaded_after_modification(args); + deps.resolve_current_versions().await?; + for (dep_id, package_name, maybe_current_version, new_version_req) in + updated + { + if let Some(nv) = deps.resolved_version(dep_id) { + updated_to_versions.insert(( + package_name, + maybe_current_version, + nv.version.clone(), + )); + } else { + log::warn!( + "Failed to resolve version for new version requirement: {} -> {}", + package_name, + new_version_req + ); + } + } + + log::info!( + "Updated {} dependenc{}:", + updated_to_versions.len(), + if updated_to_versions.len() == 1 { + "y" + } else { + "ies" + } + ); + let mut updated_to_versions = + updated_to_versions.into_iter().collect::>(); + updated_to_versions.sort_by(|(k, _, _), (k2, _, _)| k.cmp(k2)); + let max_name = updated_to_versions + .iter() + .map(|(name, _, _)| name.len()) + .max() + .unwrap_or(0); + let max_old = updated_to_versions + .iter() + .map(|(_, maybe_current, _)| { + maybe_current + .as_ref() + .map(|v| v.version.to_string().len()) + .unwrap_or(0) + }) + .max() + .unwrap_or(0); + let max_new = updated_to_versions + .iter() + .map(|(_, _, new_version)| new_version.to_string().len()) + .max() + .unwrap_or(0); + + for (package_name, maybe_current_version, new_version) in + updated_to_versions + { + let current_version = if let Some(current_version) = maybe_current_version + { + current_version.version.to_string() + } else { + "".to_string() + }; + + log::info!( + " - {}{} {}{} -> {}{}", + format!( + "{}{}", + colors::gray(package_name[0..4].to_string()), + package_name[4..].to_string() + ), + " ".repeat(max_name - package_name.len()), + " ".repeat(max_old - current_version.len()), + colors::gray(¤t_version), + " ".repeat(max_new - new_version.to_string().len()), + colors::green(&new_version), + ); + } + } else { + log::info!( + "All {}dependencies are up to date.", + if filter_set.is_empty() { + "" + } else { + "matching " + } + ); + } + + Ok(()) +} + +async fn dep_manager_args( + factory: &CliFactory, + cli_options: &CliOptions, + npm_fetch_resolver: Arc, + jsr_fetch_resolver: Arc, +) -> Result { + Ok(DepManagerArgs { + module_load_preparer: factory.module_load_preparer().await?.clone(), + jsr_fetch_resolver, + npm_fetch_resolver, + npm_resolver: factory.npm_resolver().await?.clone(), + permissions_container: factory.root_permissions_container()?.clone(), + main_module_graph_container: factory + .main_module_graph_container() + .await? + .clone(), + lockfile: cli_options.maybe_lockfile().cloned(), + }) +} + +mod filter { + use deno_core::anyhow::anyhow; + use deno_core::anyhow::Context; + use deno_core::error::AnyError; + use deno_semver::VersionReq; + + enum FilterKind { + Exclude, + Include, + } + pub struct Filter { + kind: FilterKind, + regex: regex::Regex, + version_spec: Option, + } + + fn pattern_to_regex(pattern: &str) -> Result { + let escaped = regex::escape(pattern); + let unescaped_star = escaped.replace(r"\*", ".*"); + Ok(regex::Regex::new(&format!("^{}$", unescaped_star))?) + } + + impl Filter { + pub fn version_spec(&self) -> Option<&VersionReq> { + self.version_spec.as_ref() + } + pub fn from_str(input: &str) -> Result { + let (kind, first_idx) = if input.starts_with('!') { + (FilterKind::Exclude, 1) + } else { + (FilterKind::Include, 0) + }; + let s = &input[first_idx..]; + let (pattern, version_spec) = + if let Some(scope_name) = s.strip_prefix('@') { + if let Some(idx) = scope_name.find('@') { + let (pattern, version_spec) = s.split_at(idx + 1); + ( + pattern, + Some( + VersionReq::parse_from_specifier( + version_spec.trim_start_matches('@'), + ) + .with_context(|| format!("Invalid filter \"{input}\""))?, + ), + ) + } else { + (s, None) + } + } else { + let mut parts = s.split('@'); + let Some(pattern) = parts.next() else { + return Err(anyhow!("Invalid filter \"{input}\"")); + }; + ( + pattern, + parts + .next() + .map(VersionReq::parse_from_specifier) + .transpose() + .with_context(|| format!("Invalid filter \"{input}\""))?, + ) + }; + + Ok(Filter { + kind, + regex: pattern_to_regex(pattern) + .with_context(|| format!("Invalid filter \"{input}\""))?, + version_spec, + }) + } + + pub fn matches(&self, name: &str) -> bool { + self.regex.is_match(name) + } + } + + pub struct FilterSet { + filters: Vec, + has_exclude: bool, + has_include: bool, + } + impl FilterSet { + pub fn from_filter_strings<'a>( + filter_strings: impl IntoIterator, + ) -> Result { + let filters = filter_strings + .into_iter() + .map(Filter::from_str) + .collect::, _>>()?; + let has_exclude = filters + .iter() + .any(|f| matches!(f.kind, FilterKind::Exclude)); + let has_include = filters + .iter() + .any(|f| matches!(f.kind, FilterKind::Include)); + Ok(FilterSet { + filters, + has_exclude, + has_include, + }) + } + + pub fn is_empty(&self) -> bool { + self.filters.is_empty() + } + + pub fn matches(&self, name: &str) -> bool { + self.matching_filter(name).is_included() + } + + pub fn matching_filter(&self, name: &str) -> MatchResult<'_> { + if self.filters.is_empty() { + return MatchResult::Included; + } + let mut matched = None; + for filter in &self.filters { + match filter.kind { + FilterKind::Include => { + if matched.is_none() && filter.matches(name) { + matched = Some(filter); + } + } + FilterKind::Exclude => { + if filter.matches(name) { + return MatchResult::Excluded; + } + } + } + } + if let Some(filter) = matched { + MatchResult::Matches(filter) + } else if self.has_exclude && !self.has_include { + MatchResult::Included + } else { + MatchResult::Excluded + } + } + } + + pub enum MatchResult<'a> { + Matches(&'a Filter), + Included, + Excluded, + } + + impl MatchResult<'_> { + pub fn version_spec(&self) -> Option<&VersionReq> { + match self { + MatchResult::Matches(filter) => filter.version_spec(), + _ => None, + } + } + pub fn is_included(&self) -> bool { + matches!(self, MatchResult::Included | MatchResult::Matches(_)) + } + } + + #[cfg(test)] + mod test { + fn matches_filters<'a, 'b>( + filters: impl IntoIterator, + name: &str, + ) -> bool { + let filters = super::FilterSet::from_filter_strings(filters).unwrap(); + filters.matches(name) + } + + fn version_spec(s: &str) -> deno_semver::VersionReq { + deno_semver::VersionReq::parse_from_specifier(s).unwrap() + } + + #[test] + fn basic_glob() { + assert!(matches_filters(["foo*"], "foo")); + assert!(matches_filters(["foo*"], "foobar")); + assert!(!matches_filters(["foo*"], "barfoo")); + + assert!(matches_filters(["*foo"], "foo")); + assert!(matches_filters(["*foo"], "barfoo")); + assert!(!matches_filters(["*foo"], "foobar")); + + assert!(matches_filters(["@scope/foo*"], "@scope/foobar")); + } + + #[test] + fn basic_glob_with_version() { + assert!(matches_filters(["foo*@1"], "foo",)); + assert!(matches_filters(["foo*@1"], "foobar",)); + assert!(matches_filters(["foo*@1"], "foo-bar",)); + assert!(!matches_filters(["foo*@1"], "barfoo",)); + assert!(matches_filters(["@scope/*@1"], "@scope/foo")); + } + + #[test] + fn glob_exclude() { + assert!(!matches_filters(["!foo*"], "foo")); + assert!(!matches_filters(["!foo*"], "foobar")); + assert!(matches_filters(["!foo*"], "barfoo")); + + assert!(!matches_filters(["!*foo"], "foo")); + assert!(!matches_filters(["!*foo"], "barfoo")); + assert!(matches_filters(["!*foo"], "foobar")); + + assert!(!matches_filters(["!@scope/foo*"], "@scope/foobar")); + } + + #[test] + fn multiple_globs() { + assert!(matches_filters(["foo*", "bar*"], "foo")); + assert!(matches_filters(["foo*", "bar*"], "bar")); + assert!(!matches_filters(["foo*", "bar*"], "baz")); + + assert!(matches_filters(["foo*", "!bar*"], "foo")); + assert!(!matches_filters(["foo*", "!bar*"], "bar")); + assert!(matches_filters(["foo*", "!bar*"], "foobar")); + assert!(!matches_filters(["foo*", "!*bar"], "foobar")); + assert!(!matches_filters(["foo*", "!*bar"], "baz")); + + let filters = + super::FilterSet::from_filter_strings(["foo*@1", "bar*@2"]).unwrap(); + + assert_eq!( + filters.matching_filter("foo").version_spec().cloned(), + Some(version_spec("1")) + ); + + assert_eq!( + filters.matching_filter("bar").version_spec().cloned(), + Some(version_spec("2")) + ); + } + } +} diff --git a/cli/tools/registry/provenance.rs b/cli/tools/registry/provenance.rs index 47169f2132aef7..bd5249b5cd6aae 100644 --- a/cli/tools/registry/provenance.rs +++ b/cli/tools/registry/provenance.rs @@ -1,11 +1,8 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::http_util; -use crate::http_util::HttpClient; +use std::collections::HashMap; +use std::env; -use super::api::OidcTokenResponse; -use super::auth::gha_oidc_token; -use super::auth::is_gha; use base64::engine::general_purpose::STANDARD_NO_PAD; use base64::prelude::BASE64_STANDARD; use base64::Engine as _; @@ -27,8 +24,12 @@ use sha2::Digest; use spki::der::asn1; use spki::der::pem::LineEnding; use spki::der::EncodePem; -use std::collections::HashMap; -use std::env; + +use super::api::OidcTokenResponse; +use super::auth::gha_oidc_token; +use super::auth::is_gha; +use crate::http_util; +use crate::http_util::HttpClient; const PAE_PREFIX: &str = "DSSEv1"; @@ -706,10 +707,11 @@ async fn testify( #[cfg(test)] mod tests { + use std::env; + use super::ProvenanceAttestation; use super::Subject; use super::SubjectDigest; - use std::env; #[test] fn slsa_github_actions() { diff --git a/cli/tools/registry/publish_order.rs b/cli/tools/registry/publish_order.rs index ad77a56bb187bf..577627f3480b5e 100644 --- a/cli/tools/registry/publish_order.rs +++ b/cli/tools/registry/publish_order.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::collections::HashMap; use std::collections::HashSet; diff --git a/cli/tools/registry/tar.rs b/cli/tools/registry/tar.rs index 6d1801ce6976fc..2d6f53b5af535e 100644 --- a/cli/tools/registry/tar.rs +++ b/cli/tools/registry/tar.rs @@ -1,4 +1,8 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::fmt::Write as FmtWrite; +use std::io::Write; +use std::path::Path; use bytes::Bytes; use deno_ast::MediaType; @@ -6,17 +10,13 @@ use deno_core::anyhow::Context; use deno_core::error::AnyError; use deno_core::url::Url; use sha2::Digest; -use std::fmt::Write as FmtWrite; -use std::io::Write; -use std::path::Path; use tar::Header; -use crate::cache::LazyGraphSourceParser; - use super::diagnostics::PublishDiagnostic; use super::diagnostics::PublishDiagnosticsCollector; use super::paths::CollectedPublishPath; use super::unfurl::SpecifierUnfurler; +use crate::cache::LazyGraphSourceParser; #[derive(Debug, Clone, PartialEq)] pub struct PublishableTarballFile { diff --git a/cli/tools/registry/unfurl.rs b/cli/tools/registry/unfurl.rs index 5ec726a6401590..e3501c348bd5bb 100644 --- a/cli/tools/registry/unfurl.rs +++ b/cli/tools/registry/unfurl.rs @@ -1,19 +1,35 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. +use std::borrow::Cow; +use std::sync::Arc; + +use deno_ast::diagnostics::Diagnostic; +use deno_ast::diagnostics::DiagnosticLevel; +use deno_ast::diagnostics::DiagnosticLocation; +use deno_ast::diagnostics::DiagnosticSnippet; +use deno_ast::diagnostics::DiagnosticSnippetHighlight; +use deno_ast::diagnostics::DiagnosticSnippetHighlightStyle; +use deno_ast::diagnostics::DiagnosticSourcePos; +use deno_ast::diagnostics::DiagnosticSourceRange; use deno_ast::ParsedSource; use deno_ast::SourceRange; use deno_ast::SourceTextInfo; +use deno_ast::SourceTextProvider; use deno_config::workspace::MappedResolution; use deno_config::workspace::PackageJsonDepResolution; use deno_config::workspace::WorkspaceResolver; +use deno_core::anyhow; use deno_core::ModuleSpecifier; use deno_graph::DependencyDescriptor; use deno_graph::DynamicTemplatePart; use deno_graph::ParserModuleAnalyzer; use deno_graph::TypeScriptReference; use deno_package_json::PackageJsonDepValue; -use deno_resolver::sloppy_imports::SloppyImportsResolutionMode; +use deno_package_json::PackageJsonDepWorkspaceReq; +use deno_resolver::sloppy_imports::SloppyImportsResolutionKind; use deno_runtime::deno_node::is_builtin_node_module; +use deno_semver::Version; +use deno_semver::VersionReq; use crate::resolver::CliSloppyImportsResolver; @@ -24,34 +40,163 @@ pub enum SpecifierUnfurlerDiagnostic { text_info: SourceTextInfo, range: SourceRange, }, + ResolvingNpmWorkspacePackage { + specifier: ModuleSpecifier, + package_name: String, + text_info: SourceTextInfo, + range: SourceRange, + reason: String, + }, } -impl SpecifierUnfurlerDiagnostic { - pub fn code(&self) -> &'static str { +impl Diagnostic for SpecifierUnfurlerDiagnostic { + fn level(&self) -> DiagnosticLevel { + match self { + SpecifierUnfurlerDiagnostic::UnanalyzableDynamicImport { .. } => { + DiagnosticLevel::Warning + } + SpecifierUnfurlerDiagnostic::ResolvingNpmWorkspacePackage { .. } => { + DiagnosticLevel::Error + } + } + } + + fn code(&self) -> Cow<'_, str> { match self { Self::UnanalyzableDynamicImport { .. } => "unanalyzable-dynamic-import", + Self::ResolvingNpmWorkspacePackage { .. } => "npm-workspace-package", } + .into() } - pub fn message(&self) -> &'static str { + fn message(&self) -> Cow<'_, str> { match self { Self::UnanalyzableDynamicImport { .. } => { - "unable to analyze dynamic import" + "unable to analyze dynamic import".into() } + Self::ResolvingNpmWorkspacePackage { + package_name, + reason, + .. + } => format!( + "failed resolving npm workspace package '{}': {}", + package_name, reason + ) + .into(), + } + } + + fn location(&self) -> deno_ast::diagnostics::DiagnosticLocation { + match self { + SpecifierUnfurlerDiagnostic::UnanalyzableDynamicImport { + specifier, + text_info, + range, + } => DiagnosticLocation::ModulePosition { + specifier: Cow::Borrowed(specifier), + text_info: Cow::Borrowed(text_info), + source_pos: DiagnosticSourcePos::SourcePos(range.start), + }, + SpecifierUnfurlerDiagnostic::ResolvingNpmWorkspacePackage { + specifier, + text_info, + range, + .. + } => DiagnosticLocation::ModulePosition { + specifier: Cow::Borrowed(specifier), + text_info: Cow::Borrowed(text_info), + source_pos: DiagnosticSourcePos::SourcePos(range.start), + }, + } + } + + fn snippet(&self) -> Option> { + match self { + SpecifierUnfurlerDiagnostic::UnanalyzableDynamicImport { + text_info, + range, + .. + } => Some(DiagnosticSnippet { + source: Cow::Borrowed(text_info), + highlights: vec![DiagnosticSnippetHighlight { + style: DiagnosticSnippetHighlightStyle::Warning, + range: DiagnosticSourceRange { + start: DiagnosticSourcePos::SourcePos(range.start), + end: DiagnosticSourcePos::SourcePos(range.end), + }, + description: Some("the unanalyzable dynamic import".into()), + }], + }), + SpecifierUnfurlerDiagnostic::ResolvingNpmWorkspacePackage { + text_info, + range, + .. + } => Some(DiagnosticSnippet { + source: Cow::Borrowed(text_info), + highlights: vec![DiagnosticSnippetHighlight { + style: DiagnosticSnippetHighlightStyle::Warning, + range: DiagnosticSourceRange { + start: DiagnosticSourcePos::SourcePos(range.start), + end: DiagnosticSourcePos::SourcePos(range.end), + }, + description: Some("the unresolved import".into()), + }], + }), + } + } + + fn hint(&self) -> Option> { + match self { + SpecifierUnfurlerDiagnostic::UnanalyzableDynamicImport { .. } => { + None + } + SpecifierUnfurlerDiagnostic::ResolvingNpmWorkspacePackage { .. } => Some( + "make sure the npm workspace package is resolvable and has a version field in its package.json".into() + ), + } + } + + fn snippet_fixed( + &self, + ) -> Option> { + None + } + + fn info(&self) -> Cow<'_, [Cow<'_, str>]> { + match self { + SpecifierUnfurlerDiagnostic::UnanalyzableDynamicImport { .. } => Cow::Borrowed(&[ + Cow::Borrowed("after publishing this package, imports from the local import map / package.json do not work"), + Cow::Borrowed("dynamic imports that can not be analyzed at publish time will not be rewritten automatically"), + Cow::Borrowed("make sure the dynamic import is resolvable at runtime without an import map / package.json") + ]), + SpecifierUnfurlerDiagnostic::ResolvingNpmWorkspacePackage { .. } => { + Cow::Borrowed(&[]) + }, } } + + fn docs_url(&self) -> Option> { + None + } +} + +enum UnfurlSpecifierError { + Workspace { + package_name: String, + reason: String, + }, } pub struct SpecifierUnfurler { - sloppy_imports_resolver: Option, - workspace_resolver: WorkspaceResolver, + sloppy_imports_resolver: Option>, + workspace_resolver: Arc, bare_node_builtins: bool, } impl SpecifierUnfurler { pub fn new( - sloppy_imports_resolver: Option, - workspace_resolver: WorkspaceResolver, + sloppy_imports_resolver: Option>, + workspace_resolver: Arc, bare_node_builtins: bool, ) -> Self { debug_assert_eq!( @@ -65,11 +210,45 @@ impl SpecifierUnfurler { } } - fn unfurl_specifier( + fn unfurl_specifier_reporting_diagnostic( &self, referrer: &ModuleSpecifier, specifier: &str, + text_info: &SourceTextInfo, + range: &deno_graph::PositionRange, + diagnostic_reporter: &mut dyn FnMut(SpecifierUnfurlerDiagnostic), ) -> Option { + match self.unfurl_specifier(referrer, specifier) { + Ok(maybe_unfurled) => maybe_unfurled, + Err(diagnostic) => match diagnostic { + UnfurlSpecifierError::Workspace { + package_name, + reason, + } => { + let range = to_range(text_info, range); + diagnostic_reporter( + SpecifierUnfurlerDiagnostic::ResolvingNpmWorkspacePackage { + specifier: referrer.clone(), + package_name, + text_info: text_info.clone(), + range: SourceRange::new( + text_info.start_pos() + range.start, + text_info.start_pos() + range.end, + ), + reason, + }, + ); + None + } + }, + } + } + + fn unfurl_specifier( + &self, + referrer: &ModuleSpecifier, + specifier: &str, + ) -> Result, UnfurlSpecifierError> { let resolved = if let Ok(resolved) = self.workspace_resolver.resolve(specifier, referrer) { @@ -120,8 +299,40 @@ impl SpecifierUnfurler { )) .ok() } - PackageJsonDepValue::Workspace(version_req) => { - // todo(#24612): consider warning or error when this is also a jsr package? + PackageJsonDepValue::Workspace(workspace_version_req) => { + let version_req = match workspace_version_req { + PackageJsonDepWorkspaceReq::VersionReq(version_req) => { + Cow::Borrowed(version_req) + } + PackageJsonDepWorkspaceReq::Caret => { + let version = self + .find_workspace_npm_dep_version(alias) + .map_err(|err| UnfurlSpecifierError::Workspace { + package_name: alias.to_string(), + reason: err.to_string(), + })?; + // version was validated, so ok to unwrap + Cow::Owned( + VersionReq::parse_from_npm(&format!("^{}", version)) + .unwrap(), + ) + } + PackageJsonDepWorkspaceReq::Tilde => { + let version = self + .find_workspace_npm_dep_version(alias) + .map_err(|err| UnfurlSpecifierError::Workspace { + package_name: alias.to_string(), + reason: err.to_string(), + })?; + // version was validated, so ok to unwrap + Cow::Owned( + VersionReq::parse_from_npm(&format!("~{}", version)) + .unwrap(), + ) + } + }; + // todo(#24612): warn when this is also a jsr package telling + // people to map the specifiers in the import map ModuleSpecifier::parse(&format!( "npm:{}@{}{}", alias, @@ -151,10 +362,14 @@ impl SpecifierUnfurler { None if self.bare_node_builtins && is_builtin_node_module(specifier) => { format!("node:{specifier}").parse().unwrap() } - None => ModuleSpecifier::options() + None => match ModuleSpecifier::options() .base_url(Some(referrer)) .parse(specifier) - .ok()?, + .ok() + { + Some(value) => value, + None => return Ok(None), + }, }; // TODO(lucacasonato): this requires integration in deno_graph first // let resolved = if let Ok(specifier) = @@ -180,7 +395,7 @@ impl SpecifierUnfurler { let resolved = if let Some(sloppy_imports_resolver) = &self.sloppy_imports_resolver { sloppy_imports_resolver - .resolve(&resolved, SloppyImportsResolutionMode::Execution) + .resolve(&resolved, SloppyImportsResolutionKind::Execution) .map(|res| res.into_specifier()) .unwrap_or(resolved) } else { @@ -188,7 +403,7 @@ impl SpecifierUnfurler { }; let relative_resolved = relative_url(&resolved, referrer); if relative_resolved == specifier { - None // nothing to unfurl + Ok(None) // nothing to unfurl } else { log::debug!( "Unfurled specifier: {} from {} -> {}", @@ -196,7 +411,29 @@ impl SpecifierUnfurler { referrer, relative_resolved ); - Some(relative_resolved) + Ok(Some(relative_resolved)) + } + } + + fn find_workspace_npm_dep_version( + &self, + pkg_name: &str, + ) -> Result { + // todo(#24612): warn when this is also a jsr package telling + // people to map the specifiers in the import map + let pkg_json = self + .workspace_resolver + .package_jsons() + .find(|pkg| pkg.name.as_deref() == Some(pkg_name)) + .ok_or_else(|| { + anyhow::anyhow!("unable to find npm package in workspace") + })?; + if let Some(version) = &pkg_json.version { + Ok(Version::parse_from_npm(version)?) + } else { + Err(anyhow::anyhow!( + "missing version in package.json of npm package", + )) } } @@ -208,6 +445,7 @@ impl SpecifierUnfurler { text_info: &SourceTextInfo, dep: &deno_graph::DynamicDependencyDescriptor, text_changes: &mut Vec, + diagnostic_reporter: &mut dyn FnMut(SpecifierUnfurlerDiagnostic), ) -> bool { match &dep.argument { deno_graph::DynamicArgument::String(specifier) => { @@ -217,8 +455,14 @@ impl SpecifierUnfurler { let Some(relative_index) = maybe_relative_index else { return true; // always say it's analyzable for a string }; - let unfurled = self.unfurl_specifier(module_url, specifier); - if let Some(unfurled) = unfurled { + let maybe_unfurled = self.unfurl_specifier_reporting_diagnostic( + module_url, + specifier, + text_info, + &dep.argument_range, + diagnostic_reporter, + ); + if let Some(unfurled) = maybe_unfurled { let start = range.start + relative_index; text_changes.push(deno_ast::TextChange { range: start..start + specifier.len(), @@ -238,7 +482,13 @@ impl SpecifierUnfurler { if !specifier.ends_with('/') { return false; } - let unfurled = self.unfurl_specifier(module_url, specifier); + let unfurled = self.unfurl_specifier_reporting_diagnostic( + module_url, + specifier, + text_info, + &dep.argument_range, + diagnostic_reporter, + ); let Some(unfurled) = unfurled else { return true; // nothing to unfurl }; @@ -280,8 +530,15 @@ impl SpecifierUnfurler { let analyze_specifier = |specifier: &str, range: &deno_graph::PositionRange, - text_changes: &mut Vec| { - if let Some(unfurled) = self.unfurl_specifier(url, specifier) { + text_changes: &mut Vec, + diagnostic_reporter: &mut dyn FnMut(SpecifierUnfurlerDiagnostic)| { + if let Some(unfurled) = self.unfurl_specifier_reporting_diagnostic( + url, + specifier, + text_info, + range, + diagnostic_reporter, + ) { text_changes.push(deno_ast::TextChange { range: to_range(text_info, range), new_text: unfurled, @@ -295,11 +552,17 @@ impl SpecifierUnfurler { &dep.specifier, &dep.specifier_range, &mut text_changes, + diagnostic_reporter, ); } DependencyDescriptor::Dynamic(dep) => { - let success = - self.try_unfurl_dynamic_dep(url, text_info, dep, &mut text_changes); + let success = self.try_unfurl_dynamic_dep( + url, + text_info, + dep, + &mut text_changes, + diagnostic_reporter, + ); if !success { let start_pos = text_info.line_start(dep.argument_range.start.line) @@ -319,20 +582,22 @@ impl SpecifierUnfurler { } for ts_ref in &module_info.ts_references { let specifier_with_range = match ts_ref { - TypeScriptReference::Path(range) => range, - TypeScriptReference::Types(range) => range, + TypeScriptReference::Path(s) => s, + TypeScriptReference::Types { specifier, .. } => specifier, }; analyze_specifier( &specifier_with_range.text, &specifier_with_range.range, &mut text_changes, + diagnostic_reporter, ); } - for specifier_with_range in &module_info.jsdoc_imports { + for jsdoc in &module_info.jsdoc_imports { analyze_specifier( - &specifier_with_range.text, - &specifier_with_range.range, + &jsdoc.specifier.text, + &jsdoc.specifier.range, &mut text_changes, + diagnostic_reporter, ); } if let Some(specifier_with_range) = &module_info.jsx_import_source { @@ -340,6 +605,7 @@ impl SpecifierUnfurler { &specifier_with_range.text, &specifier_with_range.range, &mut text_changes, + diagnostic_reporter, ); } @@ -389,15 +655,11 @@ fn to_range( mod tests { use std::sync::Arc; - use crate::resolver::SloppyImportsCachedFs; - - use super::*; use deno_ast::MediaType; use deno_ast::ModuleSpecifier; use deno_config::workspace::ResolverWorkspaceJsrPackage; use deno_core::serde_json::json; use deno_core::url::Url; - use deno_runtime::deno_fs::RealFs; use deno_runtime::deno_node::PackageJson; use deno_semver::Version; use import_map::ImportMapWithDiagnostics; @@ -405,6 +667,10 @@ mod tests { use pretty_assertions::assert_eq; use test_util::testdata_path; + use super::*; + use crate::resolver::SloppyImportsCachedFs; + use crate::sys::CliSys; + fn parse_ast(specifier: &Url, source_code: &str) -> ParsedSource { let media_type = MediaType::from_specifier(specifier); deno_ast::parse_module(deno_ast::ParseParams { @@ -456,12 +722,11 @@ mod tests { vec![Arc::new(package_json)], deno_config::workspace::PackageJsonDepResolution::Enabled, ); - let fs = Arc::new(RealFs); let unfurler = SpecifierUnfurler::new( - Some(CliSloppyImportsResolver::new(SloppyImportsCachedFs::new( - fs, + Some(Arc::new(CliSloppyImportsResolver::new( + SloppyImportsCachedFs::new(CliSys::default()), ))), - workspace_resolver, + Arc::new(workspace_resolver), true, ); @@ -547,4 +812,114 @@ const warn2 = await import(`${expr}`); assert_eq!(unfurled_source, expected_source); } } + + #[test] + fn test_unfurling_npm_dep_workspace_specifier() { + let cwd = testdata_path().join("unfurl").to_path_buf(); + + let pkg_json_add = PackageJson::load_from_value( + cwd.join("add/package.json"), + json!({ "name": "add", "version": "0.1.0", }), + ); + let pkg_json_subtract = PackageJson::load_from_value( + cwd.join("subtract/package.json"), + json!({ "name": "subtract", "version": "0.2.0", }), + ); + let pkg_json_publishing = PackageJson::load_from_value( + cwd.join("publish/package.json"), + json!({ + "name": "@denotest/main", + "version": "1.0.0", + "dependencies": { + "add": "workspace:~", + "subtract": "workspace:^", + "non-existent": "workspace:~", + } + }), + ); + let root_pkg_json = PackageJson::load_from_value( + cwd.join("package.json"), + json!({ "workspaces": ["./publish", "./subtract", "./add"] }), + ); + let workspace_resolver = WorkspaceResolver::new_raw( + Arc::new(ModuleSpecifier::from_directory_path(&cwd).unwrap()), + None, + vec![ResolverWorkspaceJsrPackage { + is_patch: false, + base: ModuleSpecifier::from_directory_path( + cwd.join("publish/jsr.json"), + ) + .unwrap(), + name: "@denotest/main".to_string(), + version: Some(Version::parse_standard("1.0.0").unwrap()), + exports: IndexMap::from([(".".to_string(), "mod.ts".to_string())]), + }], + vec![ + Arc::new(root_pkg_json), + Arc::new(pkg_json_add), + Arc::new(pkg_json_subtract), + Arc::new(pkg_json_publishing), + ], + deno_config::workspace::PackageJsonDepResolution::Enabled, + ); + let sys = CliSys::default(); + let unfurler = SpecifierUnfurler::new( + Some(Arc::new(CliSloppyImportsResolver::new( + SloppyImportsCachedFs::new(sys), + ))), + Arc::new(workspace_resolver), + true, + ); + + { + let source_code = r#"import add from "add"; +import subtract from "subtract"; + +console.log(add, subtract); +"#; + let specifier = + ModuleSpecifier::from_file_path(cwd.join("publish").join("mod.ts")) + .unwrap(); + let source = parse_ast(&specifier, source_code); + let mut d = Vec::new(); + let mut reporter = |diagnostic| d.push(diagnostic); + let unfurled_source = unfurler.unfurl(&specifier, &source, &mut reporter); + assert_eq!(d.len(), 0); + // it will inline the version + let expected_source = r#"import add from "npm:add@~0.1.0"; +import subtract from "npm:subtract@^0.2.0"; + +console.log(add, subtract); +"#; + assert_eq!(unfurled_source, expected_source); + } + + { + let source_code = r#"import nonExistent from "non-existent"; +console.log(nonExistent); +"#; + let specifier = + ModuleSpecifier::from_file_path(cwd.join("publish").join("other.ts")) + .unwrap(); + let source = parse_ast(&specifier, source_code); + let mut d = Vec::new(); + let mut reporter = |diagnostic| d.push(diagnostic); + let unfurled_source = unfurler.unfurl(&specifier, &source, &mut reporter); + assert_eq!(d.len(), 1); + match &d[0] { + SpecifierUnfurlerDiagnostic::ResolvingNpmWorkspacePackage { + package_name, + reason, + .. + } => { + assert_eq!(package_name, "non-existent"); + assert_eq!(reason, "unable to find npm package in workspace"); + } + _ => unreachable!(), + } + // won't make any changes, but the above will be a fatal error + assert!(matches!(d[0].level(), DiagnosticLevel::Error)); + assert_eq!(unfurled_source, source_code); + } + } } diff --git a/cli/tools/repl/channel.rs b/cli/tools/repl/channel.rs index 823a13d2884ce5..4ac28b9d521c80 100644 --- a/cli/tools/repl/channel.rs +++ b/cli/tools/repl/channel.rs @@ -1,10 +1,11 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::cell::RefCell; use deno_core::anyhow::anyhow; use deno_core::error::AnyError; use deno_core::serde_json; use deno_core::serde_json::Value; -use std::cell::RefCell; use tokio::sync::mpsc::channel; use tokio::sync::mpsc::unbounded_channel; use tokio::sync::mpsc::Receiver; diff --git a/cli/tools/repl/editor.rs b/cli/tools/repl/editor.rs index dbc9bce7038449..27d726255ca494 100644 --- a/cli/tools/repl/editor.rs +++ b/cli/tools/repl/editor.rs @@ -1,7 +1,11 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::borrow::Cow; +use std::path::PathBuf; +use std::sync::atomic::AtomicBool; +use std::sync::atomic::Ordering::Relaxed; +use std::sync::Arc; -use crate::cdp; -use crate::colors; use deno_ast::swc::parser::error::SyntaxError; use deno_ast::swc::parser::token::BinOpToken; use deno_ast::swc::parser::token::Token; @@ -32,14 +36,11 @@ use rustyline::Modifiers; use rustyline::RepeatCount; use rustyline_derive::Helper; use rustyline_derive::Hinter; -use std::borrow::Cow; -use std::path::PathBuf; -use std::sync::atomic::AtomicBool; -use std::sync::atomic::Ordering::Relaxed; -use std::sync::Arc; use super::channel::RustylineSyncMessageSender; use super::session::REPL_INTERNALS_NAME; +use crate::cdp; +use crate::colors; // Provides helpers to the editor like validation for multi-line edits, completion candidates for // tab completion. diff --git a/cli/tools/repl/mod.rs b/cli/tools/repl/mod.rs index a30304687983d8..1bc6a2f9ea663b 100644 --- a/cli/tools/repl/mod.rs +++ b/cli/tools/repl/mod.rs @@ -1,17 +1,9 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::io; use std::io::Write; - use std::sync::Arc; -use crate::args::CliOptions; -use crate::args::Flags; -use crate::args::ReplFlags; -use crate::cdp; -use crate::colors; -use crate::factory::CliFactory; -use crate::file_fetcher::FileFetcher; use deno_core::error::AnyError; use deno_core::futures::StreamExt; use deno_core::serde_json; @@ -19,6 +11,15 @@ use deno_core::unsync::spawn_blocking; use deno_runtime::WorkerExecutionMode; use rustyline::error::ReadlineError; +use crate::args::CliOptions; +use crate::args::Flags; +use crate::args::ReplFlags; +use crate::cdp; +use crate::colors; +use crate::factory::CliFactory; +use crate::file_fetcher::CliFileFetcher; +use crate::file_fetcher::TextDecodedFile; + mod channel; mod editor; mod session; @@ -143,7 +144,7 @@ async fn read_line_and_poll( async fn read_eval_file( cli_options: &CliOptions, - file_fetcher: &FileFetcher, + file_fetcher: &CliFileFetcher, eval_file: &str, ) -> Result, AnyError> { let specifier = @@ -151,7 +152,7 @@ async fn read_eval_file( let file = file_fetcher.fetch_bypass_permissions(&specifier).await?; - Ok(file.into_text_decoded()?.source) + Ok(TextDecodedFile::decode(file)?.source) } #[allow(clippy::print_stdout)] diff --git a/cli/tools/repl/session.rs b/cli/tools/repl/session.rs index 8e05c4abbcff89..7b20717649d57c 100644 --- a/cli/tools/repl/session.rs +++ b/cli/tools/repl/session.rs @@ -1,23 +1,7 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::sync::Arc; -use crate::args::CliOptions; -use crate::cdp; -use crate::colors; -use crate::lsp::ReplLanguageServer; -use crate::npm::CliNpmResolver; -use crate::resolver::CliResolver; -use crate::tools::test::report_tests; -use crate::tools::test::reporters::PrettyTestReporter; -use crate::tools::test::reporters::TestReporter; -use crate::tools::test::run_tests_for_worker; -use crate::tools::test::send_test_event; -use crate::tools::test::worker_has_tests; -use crate::tools::test::TestEvent; -use crate::tools::test::TestEventReceiver; -use crate::tools::test::TestFailureFormatOptions; - use deno_ast::diagnostics::Diagnostic; use deno_ast::swc::ast as swc_ast; use deno_ast::swc::common::comments::CommentKind; @@ -43,18 +27,34 @@ use deno_core::unsync::spawn; use deno_core::url::Url; use deno_core::LocalInspectorSession; use deno_core::PollEventLoopOptions; -use deno_graph::source::ResolutionMode; use deno_graph::Position; use deno_graph::PositionRange; use deno_graph::SpecifierWithRange; use deno_runtime::worker::MainWorker; use deno_semver::npm::NpmPackageReqReference; -use node_resolver::NodeModuleKind; +use node_resolver::NodeResolutionKind; +use node_resolver::ResolutionMode; use once_cell::sync::Lazy; use regex::Match; use regex::Regex; use tokio::sync::Mutex; +use crate::args::CliOptions; +use crate::cdp; +use crate::colors; +use crate::lsp::ReplLanguageServer; +use crate::npm::CliNpmResolver; +use crate::resolver::CliResolver; +use crate::tools::test::report_tests; +use crate::tools::test::reporters::PrettyTestReporter; +use crate::tools::test::reporters::TestReporter; +use crate::tools::test::run_tests_for_worker; +use crate::tools::test::send_test_event; +use crate::tools::test::worker_has_tests; +use crate::tools::test::TestEvent; +use crate::tools::test::TestEventReceiver; +use crate::tools::test::TestFailureFormatOptions; + fn comment_source_to_position_range( comment_start: SourcePos, m: &Match, @@ -701,11 +701,6 @@ impl ReplSession { let mut collector = ImportCollector::new(); program.visit_with(&mut collector); - let referrer_range = deno_graph::Range { - specifier: self.referrer.clone(), - start: deno_graph::Position::zeroed(), - end: deno_graph::Position::zeroed(), - }; let resolved_imports = collector .imports .iter() @@ -714,9 +709,10 @@ impl ReplSession { .resolver .resolve( i, - &referrer_range, - NodeModuleKind::Esm, - ResolutionMode::Execution, + &self.referrer, + deno_graph::Position::zeroed(), + ResolutionMode::Import, + NodeResolutionKind::Execution, ) .ok() .or_else(|| ModuleSpecifier::parse(i).ok()) @@ -731,7 +727,9 @@ impl ReplSession { let has_node_specifier = resolved_imports.iter().any(|url| url.scheme() == "node"); if !npm_imports.is_empty() || has_node_specifier { - npm_resolver.add_package_reqs(&npm_imports).await?; + npm_resolver + .add_and_cache_package_reqs(&npm_imports) + .await?; // prevent messages in the repl about @types/node not being cached if has_node_specifier { diff --git a/cli/tools/run/hmr.rs b/cli/tools/run/hmr.rs index 373c207d6991ee..9f19aea0158306 100644 --- a/cli/tools/run/hmr.rs +++ b/cli/tools/run/hmr.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::collections::HashMap; use std::path::PathBuf; diff --git a/cli/tools/run/mod.rs b/cli/tools/run/mod.rs index 8fab544ecacae2..a10ce32947fe3a 100644 --- a/cli/tools/run/mod.rs +++ b/cli/tools/run/mod.rs @@ -1,8 +1,9 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::io::Read; use std::sync::Arc; +use deno_cache_dir::file_fetcher::File; use deno_config::deno_json::NodeModulesDirMode; use deno_core::error::AnyError; use deno_runtime::WorkerExecutionMode; @@ -11,7 +12,6 @@ use crate::args::EvalFlags; use crate::args::Flags; use crate::args::WatchFlagsWithPaths; use crate::factory::CliFactory; -use crate::file_fetcher::File; use crate::util; use crate::util::file_watcher::WatcherRestartMode; @@ -97,7 +97,7 @@ pub async fn run_from_stdin(flags: Arc) -> Result { // Save a fake file into file fetcher cache // to allow module access by TS compiler file_fetcher.insert_memory_files(File { - specifier: main_module.clone(), + url: main_module.clone(), maybe_headers: None, source: source.into(), }); @@ -184,7 +184,7 @@ pub async fn eval_command( // Save a fake file into file fetcher cache // to allow module access by TS compiler. file_fetcher.insert_memory_files(File { - specifier: main_module.clone(), + url: main_module.clone(), maybe_headers: None, source: source_code.into_bytes().into(), }); @@ -198,13 +198,23 @@ pub async fn eval_command( } pub async fn maybe_npm_install(factory: &CliFactory) -> Result<(), AnyError> { + let cli_options = factory.cli_options()?; // ensure an "npm install" is done if the user has explicitly // opted into using a managed node_modules directory - if factory.cli_options()?.node_modules_dir()? - == Some(NodeModulesDirMode::Auto) - { + if cli_options.node_modules_dir()? == Some(NodeModulesDirMode::Auto) { if let Some(npm_resolver) = factory.npm_resolver().await?.as_managed() { - npm_resolver.ensure_top_level_package_json_install().await?; + let already_done = + npm_resolver.ensure_top_level_package_json_install().await?; + if !already_done + && matches!( + cli_options.default_npm_caching_strategy(), + crate::graph_util::NpmCachingStrategy::Eager + ) + { + npm_resolver + .cache_packages(crate::npm::PackageCaching::All) + .await?; + } } } Ok(()) diff --git a/cli/tools/serve.rs b/cli/tools/serve.rs index d7989140aeb20f..18eac1b3e119ac 100644 --- a/cli/tools/serve.rs +++ b/cli/tools/serve.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::sync::Arc; diff --git a/cli/tools/task.rs b/cli/tools/task.rs index a13efbaf455964..85834a0bfcfa24 100644 --- a/cli/tools/task.rs +++ b/cli/tools/task.rs @@ -1,35 +1,52 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::collections::HashMap; use std::collections::HashSet; +use std::num::NonZeroUsize; use std::path::Path; use std::path::PathBuf; use std::rc::Rc; use std::sync::Arc; +use console_static_text::ansi::strip_ansi_codes; +use deno_config::workspace::FolderConfigs; use deno_config::workspace::TaskDefinition; use deno_config::workspace::TaskOrScript; use deno_config::workspace::WorkspaceDirectory; +use deno_config::workspace::WorkspaceMemberTasksConfig; use deno_config::workspace::WorkspaceTasksConfig; use deno_core::anyhow::anyhow; use deno_core::anyhow::bail; use deno_core::anyhow::Context; use deno_core::error::AnyError; +use deno_core::futures::future::LocalBoxFuture; +use deno_core::futures::stream::futures_unordered; +use deno_core::futures::FutureExt; +use deno_core::futures::StreamExt; use deno_core::url::Url; use deno_path_util::normalize_path; -use deno_runtime::deno_node::NodeResolver; +use deno_task_shell::KillSignal; use deno_task_shell::ShellCommand; use indexmap::IndexMap; +use regex::Regex; use crate::args::CliOptions; use crate::args::Flags; use crate::args::TaskFlags; use crate::colors; use crate::factory::CliFactory; +use crate::node::CliNodeResolver; use crate::npm::CliNpmResolver; use crate::task_runner; +use crate::task_runner::run_future_forwarding_signals; use crate::util::fs::canonicalize_path; +#[derive(Debug)] +struct PackageTaskInfo { + matched_tasks: Vec, + tasks_config: WorkspaceTasksConfig, +} + pub async fn execute_script( flags: Arc, task_flags: TaskFlags, @@ -37,7 +54,7 @@ pub async fn execute_script( let factory = CliFactory::from_flags(flags); let cli_options = factory.cli_options()?; let start_dir = &cli_options.start_dir; - if !start_dir.has_deno_or_pkg_json() { + if !start_dir.has_deno_or_pkg_json() && !task_flags.eval { bail!("deno task couldn't find deno.json(c). See https://docs.deno.com/go/config") } let force_use_pkg_json = @@ -50,33 +67,192 @@ pub async fn execute_script( v == "1" }) .unwrap_or(false); - let mut tasks_config = start_dir.to_tasks_config()?; - if force_use_pkg_json { - tasks_config = tasks_config.with_only_pkg_json() + + fn arg_to_regex(input: &str) -> Result { + let mut regex_str = regex::escape(input); + regex_str = regex_str.replace("\\*", ".*"); + + Regex::new(®ex_str) } - let Some(task_name) = &task_flags.task else { - print_available_tasks( - &mut std::io::stdout(), - &cli_options.start_dir, - &tasks_config, - )?; - return Ok(0); + let packages_task_configs: Vec = if let Some(filter) = + &task_flags.filter + { + // Filter based on package name + let package_regex = arg_to_regex(filter)?; + let workspace = cli_options.workspace(); + + let Some(task_name) = &task_flags.task else { + print_available_tasks_workspace( + cli_options, + &package_regex, + filter, + force_use_pkg_json, + task_flags.recursive, + )?; + + return Ok(0); + }; + + let task_name_filter = arg_to_task_name_filter(task_name)?; + let mut packages_task_info: Vec = vec![]; + + for folder in workspace.config_folders() { + if !task_flags.recursive + && !matches_package(folder.1, force_use_pkg_json, &package_regex) + { + continue; + } + + let member_dir = workspace.resolve_member_dir(folder.0); + let mut tasks_config = member_dir.to_tasks_config()?; + if force_use_pkg_json { + tasks_config = tasks_config.with_only_pkg_json(); + } + + // Any of the matched tasks could be a child task of another matched + // one. Therefore we need to filter these out to ensure that every + // task is only run once. + let mut matched: HashSet = HashSet::new(); + let mut visited: HashSet = HashSet::new(); + + fn visit_task( + tasks_config: &WorkspaceTasksConfig, + visited: &mut HashSet, + name: &str, + ) { + if visited.contains(name) { + return; + } + + visited.insert(name.to_string()); + + if let Some((_, TaskOrScript::Task(_, task))) = &tasks_config.task(name) + { + for dep in &task.dependencies { + visit_task(tasks_config, visited, dep); + } + } + } + + // Match tasks in deno.json + for name in tasks_config.task_names() { + let matches_filter = match &task_name_filter { + TaskNameFilter::Exact(n) => *n == name, + TaskNameFilter::Regex(re) => re.is_match(name), + }; + if matches_filter && !visited.contains(name) { + matched.insert(name.to_string()); + visit_task(&tasks_config, &mut visited, name); + } + } + + if matched.is_empty() { + continue; + } + + packages_task_info.push(PackageTaskInfo { + matched_tasks: matched + .iter() + .map(|s| s.to_string()) + .collect::>(), + tasks_config, + }); + } + + // Logging every task definition would be too spammy. Pnpm only + // logs a simple message too. + if packages_task_info + .iter() + .all(|config| config.matched_tasks.is_empty()) + { + log::warn!( + "{}", + colors::red(format!( + "No matching task or script '{}' found in selected packages.", + task_name + )) + ); + return Ok(0); + } + + // FIXME: Sort packages topologically + // + + packages_task_info + } else { + let mut tasks_config = start_dir.to_tasks_config()?; + + if force_use_pkg_json { + tasks_config = tasks_config.with_only_pkg_json() + } + + let Some(task_name) = &task_flags.task else { + print_available_tasks( + &mut std::io::stdout(), + &cli_options.start_dir, + &tasks_config, + None, + )?; + return Ok(0); + }; + + vec![PackageTaskInfo { + tasks_config, + matched_tasks: vec![task_name.to_string()], + }] }; let npm_resolver = factory.npm_resolver().await?; let node_resolver = factory.node_resolver().await?; let env_vars = task_runner::real_env_vars(); + let no_of_concurrent_tasks = if let Ok(value) = std::env::var("DENO_JOBS") { + value.parse::().ok() + } else { + std::thread::available_parallelism().ok() + } + .unwrap_or_else(|| NonZeroUsize::new(2).unwrap()); + let task_runner = TaskRunner { - tasks_config, task_flags: &task_flags, npm_resolver: npm_resolver.as_ref(), node_resolver: node_resolver.as_ref(), env_vars, cli_options, + concurrency: no_of_concurrent_tasks.into(), }; - task_runner.run_task(task_name).await + + let kill_signal = KillSignal::default(); + run_future_forwarding_signals(kill_signal.clone(), async { + if task_flags.eval { + return task_runner + .run_deno_task( + &Url::from_directory_path(cli_options.initial_cwd()).unwrap(), + "", + &TaskDefinition { + command: Some(task_flags.task.as_ref().unwrap().to_string()), + dependencies: vec![], + description: None, + }, + kill_signal, + cli_options.argv(), + ) + .await; + } + + for task_config in &packages_task_configs { + let exit_code = task_runner + .run_tasks(task_config, &kill_signal, cli_options.argv()) + .await?; + if exit_code > 0 { + return Ok(exit_code); + } + } + + Ok(0) + }) + .await } struct RunSingleOptions<'a> { @@ -84,55 +260,211 @@ struct RunSingleOptions<'a> { script: &'a str, cwd: &'a Path, custom_commands: HashMap>, + kill_signal: KillSignal, + argv: &'a [String], } struct TaskRunner<'a> { - tasks_config: WorkspaceTasksConfig, task_flags: &'a TaskFlags, npm_resolver: &'a dyn CliNpmResolver, - node_resolver: &'a NodeResolver, + node_resolver: &'a CliNodeResolver, env_vars: HashMap, cli_options: &'a CliOptions, + concurrency: usize, } impl<'a> TaskRunner<'a> { - async fn run_task( + pub async fn run_tasks( &self, - task_name: &String, + pkg_tasks_config: &PackageTaskInfo, + kill_signal: &KillSignal, + argv: &[String], ) -> Result { - let Some((dir_url, task_or_script)) = self.tasks_config.task(task_name) - else { - if self.task_flags.is_run { - return Err(anyhow!("Task not found: {}", task_name)); + match sort_tasks_topo(pkg_tasks_config) { + Ok(sorted) => self.run_tasks_in_parallel(sorted, kill_signal, argv).await, + Err(err) => match err { + TaskError::NotFound(name) => { + if self.task_flags.is_run { + return Err(anyhow!("Task not found: {}", name)); + } + + log::error!("Task not found: {}", name); + if log::log_enabled!(log::Level::Error) { + self.print_available_tasks(&pkg_tasks_config.tasks_config)?; + } + Ok(1) + } + TaskError::TaskDepCycle { path } => { + log::error!("Task cycle detected: {}", path.join(" -> ")); + Ok(1) + } + }, + } + } + + pub fn print_available_tasks( + &self, + tasks_config: &WorkspaceTasksConfig, + ) -> Result<(), std::io::Error> { + print_available_tasks( + &mut std::io::stderr(), + &self.cli_options.start_dir, + tasks_config, + None, + ) + } + + async fn run_tasks_in_parallel( + &self, + tasks: Vec>, + kill_signal: &KillSignal, + args: &[String], + ) -> Result { + struct PendingTasksContext<'a> { + completed: HashSet, + running: HashSet, + tasks: &'a [ResolvedTask<'a>], + } + + impl<'a> PendingTasksContext<'a> { + fn has_remaining_tasks(&self) -> bool { + self.completed.len() < self.tasks.len() } - log::error!("Task not found: {}", task_name); - if log::log_enabled!(log::Level::Error) { - print_available_tasks( - &mut std::io::stderr(), - &self.cli_options.start_dir, - &self.tasks_config, - )?; + fn mark_complete(&mut self, task: &ResolvedTask) { + self.running.remove(&task.id); + self.completed.insert(task.id); + } + + fn get_next_task<'b>( + &mut self, + runner: &'b TaskRunner<'b>, + kill_signal: &KillSignal, + argv: &'a [String], + ) -> Option< + LocalBoxFuture<'b, Result<(i32, &'a ResolvedTask<'a>), AnyError>>, + > + where + 'a: 'b, + { + let mut tasks_iter = self.tasks.iter().peekable(); + while let Some(task) = tasks_iter.next() { + let args = if tasks_iter.peek().is_none() { + argv + } else { + &[] + }; + + if self.completed.contains(&task.id) + || self.running.contains(&task.id) + { + continue; + } + + let should_run = task + .dependencies + .iter() + .all(|dep_id| self.completed.contains(dep_id)); + if !should_run { + continue; + } + + self.running.insert(task.id); + let kill_signal = kill_signal.clone(); + return Some( + async move { + match task.task_or_script { + TaskOrScript::Task(_, def) => { + runner + .run_deno_task( + task.folder_url, + task.name, + def, + kill_signal, + args, + ) + .await + } + TaskOrScript::Script(scripts, _) => { + runner + .run_npm_script( + task.folder_url, + task.name, + scripts, + kill_signal, + args, + ) + .await + } + } + .map(|exit_code| (exit_code, task)) + } + .boxed_local(), + ); + } + None } - return Ok(1); + } + + let mut context = PendingTasksContext { + completed: HashSet::with_capacity(tasks.len()), + running: HashSet::with_capacity(self.concurrency), + tasks: &tasks, }; - match task_or_script { - TaskOrScript::Task(_tasks, definition) => { - self.run_deno_task(dir_url, task_name, definition).await + let mut queue = futures_unordered::FuturesUnordered::new(); + + while context.has_remaining_tasks() { + while queue.len() < self.concurrency { + if let Some(task) = context.get_next_task(self, kill_signal, args) { + queue.push(task); + } else { + break; + } } - TaskOrScript::Script(scripts, _script) => { - self.run_npm_script(dir_url, task_name, scripts).await + + // If queue is empty at this point, then there are no more tasks in the queue. + let Some(result) = queue.next().await else { + debug_assert_eq!(context.tasks.len(), 0); + break; + }; + + let (exit_code, name) = result?; + if exit_code > 0 { + return Ok(exit_code); } + + context.mark_complete(name); } + + Ok(0) } - async fn run_deno_task( + pub async fn run_deno_task( &self, dir_url: &Url, - task_name: &String, + task_name: &str, definition: &TaskDefinition, + kill_signal: KillSignal, + argv: &'a [String], ) -> Result { + let Some(command) = &definition.command else { + log::info!( + "{} {} {}", + colors::green("Task"), + colors::cyan(task_name), + colors::gray("(no command)") + ); + return Ok(0); + }; + + if let Some(npm_resolver) = self.npm_resolver.as_managed() { + npm_resolver.ensure_top_level_package_json_install().await?; + npm_resolver + .cache_packages(crate::npm::PackageCaching::All) + .await?; + } + let cwd = match &self.task_flags.cwd { Some(path) => canonicalize_path(&PathBuf::from(path)) .context("failed canonicalizing --cwd")?, @@ -143,25 +475,33 @@ impl<'a> TaskRunner<'a> { self.npm_resolver, self.node_resolver, )?; + self .run_single(RunSingleOptions { task_name, - script: &definition.command, + script: command, cwd: &cwd, custom_commands, + kill_signal, + argv, }) .await } - async fn run_npm_script( + pub async fn run_npm_script( &self, dir_url: &Url, - task_name: &String, + task_name: &str, scripts: &IndexMap, + kill_signal: KillSignal, + argv: &[String], ) -> Result { // ensure the npm packages are installed if using a managed resolver if let Some(npm_resolver) = self.npm_resolver.as_managed() { npm_resolver.ensure_top_level_package_json_install().await?; + npm_resolver + .cache_packages(crate::npm::PackageCaching::All) + .await?; } let cwd = match &self.task_flags.cwd { @@ -174,13 +514,14 @@ impl<'a> TaskRunner<'a> { // dealing with package.json here and not deno.json let task_names = vec![ format!("pre{}", task_name), - task_name.clone(), + task_name.to_string(), format!("post{}", task_name), ]; let custom_commands = task_runner::resolve_custom_commands( self.npm_resolver, self.node_resolver, )?; + for task_name in &task_names { if let Some(script) = scripts.get(task_name) { let exit_code = self @@ -189,6 +530,8 @@ impl<'a> TaskRunner<'a> { script, cwd: &cwd, custom_commands: custom_commands.clone(), + kill_signal: kill_signal.clone(), + argv, }) .await?; if exit_code > 0 { @@ -209,11 +552,13 @@ impl<'a> TaskRunner<'a> { script, cwd, custom_commands, + kill_signal, + argv, } = opts; output_task( opts.task_name, - &task_runner::get_script_with_args(script, self.cli_options.argv()), + &task_runner::get_script_with_args(script, argv), ); Ok( @@ -224,9 +569,10 @@ impl<'a> TaskRunner<'a> { env_vars: self.env_vars.clone(), custom_commands, init_cwd: self.cli_options.initial_cwd(), - argv: self.cli_options.argv(), + argv, root_node_modules_dir: self.npm_resolver.root_node_modules_path(), stdio: None, + kill_signal, }) .await? .exit_code, @@ -234,6 +580,145 @@ impl<'a> TaskRunner<'a> { } } +#[derive(Debug)] +enum TaskError { + NotFound(String), + TaskDepCycle { path: Vec }, +} + +struct ResolvedTask<'a> { + id: usize, + name: &'a str, + folder_url: &'a Url, + task_or_script: TaskOrScript<'a>, + dependencies: Vec, +} + +fn sort_tasks_topo<'a>( + pkg_task_config: &'a PackageTaskInfo, +) -> Result>, TaskError> { + trait TasksConfig { + fn task( + &self, + name: &str, + ) -> Option<(&Url, TaskOrScript, &dyn TasksConfig)>; + } + + impl TasksConfig for WorkspaceTasksConfig { + fn task( + &self, + name: &str, + ) -> Option<(&Url, TaskOrScript, &dyn TasksConfig)> { + if let Some(member) = &self.member { + if let Some((dir_url, task_or_script)) = member.task(name) { + return Some((dir_url, task_or_script, self as &dyn TasksConfig)); + } + } + if let Some(root) = &self.root { + if let Some((dir_url, task_or_script)) = root.task(name) { + // switch to only using the root tasks for the dependencies + return Some((dir_url, task_or_script, root as &dyn TasksConfig)); + } + } + None + } + } + + impl TasksConfig for WorkspaceMemberTasksConfig { + fn task( + &self, + name: &str, + ) -> Option<(&Url, TaskOrScript, &dyn TasksConfig)> { + self.task(name).map(|(dir_url, task_or_script)| { + (dir_url, task_or_script, self as &dyn TasksConfig) + }) + } + } + + fn sort_visit<'a>( + name: &'a str, + sorted: &mut Vec>, + mut path: Vec<(&'a Url, &'a str)>, + tasks_config: &'a dyn TasksConfig, + ) -> Result { + let Some((folder_url, task_or_script, tasks_config)) = + tasks_config.task(name) + else { + return Err(TaskError::NotFound(name.to_string())); + }; + + if let Some(existing_task) = sorted + .iter() + .find(|task| task.name == name && task.folder_url == folder_url) + { + // already exists + return Ok(existing_task.id); + } + + if path.contains(&(folder_url, name)) { + path.push((folder_url, name)); + return Err(TaskError::TaskDepCycle { + path: path.iter().map(|(_, s)| s.to_string()).collect(), + }); + } + + let mut dependencies: Vec = Vec::new(); + if let TaskOrScript::Task(_, task) = task_or_script { + dependencies.reserve(task.dependencies.len()); + for dep in &task.dependencies { + let mut path = path.clone(); + path.push((folder_url, name)); + dependencies.push(sort_visit(dep, sorted, path, tasks_config)?); + } + } + + let id = sorted.len(); + sorted.push(ResolvedTask { + id, + name, + folder_url, + task_or_script, + dependencies, + }); + + Ok(id) + } + + let mut sorted: Vec> = vec![]; + + for name in &pkg_task_config.matched_tasks { + sort_visit(name, &mut sorted, Vec::new(), &pkg_task_config.tasks_config)?; + } + + Ok(sorted) +} + +fn matches_package( + config: &FolderConfigs, + force_use_pkg_json: bool, + regex: &Regex, +) -> bool { + if !force_use_pkg_json { + if let Some(deno_json) = &config.deno_json { + if let Some(name) = &deno_json.json.name { + if regex.is_match(name) { + return true; + } + } + } + } + + if let Some(package_json) = &config.pkg_json { + if let Some(name) = &package_json.name { + if regex.is_match(name) { + return true; + } + } + } + + false +} + fn output_task(task_name: &str, script: &str) { log::info!( "{} {} {}", @@ -243,12 +728,70 @@ fn output_task(task_name: &str, script: &str) { ); } +fn print_available_tasks_workspace( + cli_options: &Arc, + package_regex: &Regex, + filter: &str, + force_use_pkg_json: bool, + recursive: bool, +) -> Result<(), AnyError> { + let workspace = cli_options.workspace(); + + let mut matched = false; + for folder in workspace.config_folders() { + if !recursive + && !matches_package(folder.1, force_use_pkg_json, package_regex) + { + continue; + } + matched = true; + + let member_dir = workspace.resolve_member_dir(folder.0); + let mut tasks_config = member_dir.to_tasks_config()?; + + let mut pkg_name = folder + .1 + .deno_json + .as_ref() + .and_then(|deno| deno.json.name.clone()) + .or(folder.1.pkg_json.as_ref().and_then(|pkg| pkg.name.clone())); + + if force_use_pkg_json { + tasks_config = tasks_config.with_only_pkg_json(); + pkg_name = folder.1.pkg_json.as_ref().and_then(|pkg| pkg.name.clone()); + } + + print_available_tasks( + &mut std::io::stdout(), + &cli_options.start_dir, + &tasks_config, + pkg_name, + )?; + } + + if !matched { + log::warn!( + "{}", + colors::red(format!("No package name matched the filter '{}' in available 'deno.json' or 'package.json' files.", filter)) + ); + } + + Ok(()) +} + fn print_available_tasks( writer: &mut dyn std::io::Write, workspace_dir: &Arc, tasks_config: &WorkspaceTasksConfig, + pkg_name: Option, ) -> Result<(), std::io::Error> { - writeln!(writer, "{}", colors::green("Available tasks:"))?; + let heading = if let Some(s) = pkg_name { + format!("Available tasks ({}):", colors::cyan(s)) + } else { + "Available tasks:".to_string() + }; + + writeln!(writer, "{}", colors::green(heading))?; let is_cwd_root_dir = tasks_config.root.is_none(); if tasks_config.is_empty() { @@ -304,7 +847,7 @@ fn print_available_tasks( is_deno: false, name: name.to_string(), task: deno_config::deno_json::TaskDefinition { - command: script.to_string(), + command: Some(script.to_string()), dependencies: vec![], description: None, }, @@ -332,14 +875,88 @@ fn print_available_tasks( )?; if let Some(description) = &desc.task.description { let slash_slash = colors::italic_gray("//"); + for line in description.lines() { + writeln!( + writer, + " {slash_slash} {}", + colors::italic_gray(strip_ansi_codes_and_escape_control_chars(line)) + )?; + } + } + if let Some(command) = &desc.task.command { + writeln!( + writer, + " {}", + strip_ansi_codes_and_escape_control_chars(command) + )?; + }; + if !desc.task.dependencies.is_empty() { + let dependencies = desc + .task + .dependencies + .into_iter() + .map(|d| strip_ansi_codes_and_escape_control_chars(&d)) + .collect::>() + .join(", "); writeln!( writer, - " {slash_slash} {}", - colors::italic_gray(description) + " {} {}", + colors::gray("depends on:"), + colors::cyan(dependencies) )?; } - writeln!(writer, " {}", desc.task.command)?; } Ok(()) } + +fn strip_ansi_codes_and_escape_control_chars(s: &str) -> String { + strip_ansi_codes(s) + .chars() + .map(|c| match c { + '\n' => "\\n".to_string(), + '\r' => "\\r".to_string(), + '\t' => "\\t".to_string(), + c if c.is_control() => format!("\\x{:02x}", c as u8), + c => c.to_string(), + }) + .collect() +} + +fn arg_to_task_name_filter(input: &str) -> Result { + if !input.contains("*") { + return Ok(TaskNameFilter::Exact(input)); + } + + let mut regex_str = regex::escape(input); + regex_str = regex_str.replace("\\*", ".*"); + let re = Regex::new(®ex_str)?; + Ok(TaskNameFilter::Regex(re)) +} + +#[derive(Debug)] +enum TaskNameFilter<'s> { + Exact(&'s str), + Regex(regex::Regex), +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_arg_to_task_name_filter() { + assert!(matches!( + arg_to_task_name_filter("test").unwrap(), + TaskNameFilter::Exact("test") + )); + assert!(matches!( + arg_to_task_name_filter("test-").unwrap(), + TaskNameFilter::Exact("test-") + )); + assert!(matches!( + arg_to_task_name_filter("test*").unwrap(), + TaskNameFilter::Regex(_) + )); + } +} diff --git a/cli/tools/test/channel.rs b/cli/tools/test/channel.rs index 9a003f2d5da6e6..29f24d65f144f9 100644 --- a/cli/tools/test/channel.rs +++ b/cli/tools/test/channel.rs @@ -1,15 +1,5 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use super::TestEvent; -use deno_core::futures::future::poll_fn; -use deno_core::parking_lot; -use deno_core::parking_lot::lock_api::RawMutex; -use deno_core::parking_lot::lock_api::RawMutexTimed; -use deno_runtime::deno_io::pipe; -use deno_runtime::deno_io::AsyncPipeRead; -use deno_runtime::deno_io::PipeRead; -use deno_runtime::deno_io::PipeWrite; -use memmem::Searcher; use std::fmt::Display; use std::future::Future; use std::io::Write; @@ -19,6 +9,16 @@ use std::sync::atomic::Ordering; use std::task::ready; use std::task::Poll; use std::time::Duration; + +use deno_core::futures::future::poll_fn; +use deno_core::parking_lot; +use deno_core::parking_lot::lock_api::RawMutex; +use deno_core::parking_lot::lock_api::RawMutexTimed; +use deno_runtime::deno_io::pipe; +use deno_runtime::deno_io::AsyncPipeRead; +use deno_runtime::deno_io::PipeRead; +use deno_runtime::deno_io::PipeWrite; +use memmem::Searcher; use tokio::io::AsyncRead; use tokio::io::AsyncReadExt; use tokio::io::ReadBuf; @@ -27,6 +27,8 @@ use tokio::sync::mpsc::UnboundedReceiver; use tokio::sync::mpsc::UnboundedSender; use tokio::sync::mpsc::WeakUnboundedSender; +use super::TestEvent; + /// 8-byte sync marker that is unlikely to appear in normal output. Equivalent /// to the string `"\u{200B}\0\u{200B}\0"`. const SYNC_MARKER: &[u8; 8] = &[226, 128, 139, 0, 226, 128, 139, 0]; @@ -437,11 +439,12 @@ impl TestEventSender { #[allow(clippy::print_stderr)] #[cfg(test)] mod tests { - use super::*; - use crate::tools::test::TestResult; use deno_core::unsync::spawn; use deno_core::unsync::spawn_blocking; + use super::*; + use crate::tools::test::TestResult; + /// Test that output is correctly interleaved with messages. #[tokio::test] async fn spawn_worker() { diff --git a/cli/tools/test/fmt.rs b/cli/tools/test/fmt.rs index 0f6a9ed2b4ea5c..e5b40b874b0ecb 100644 --- a/cli/tools/test/fmt.rs +++ b/cli/tools/test/fmt.rs @@ -1,16 +1,16 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::borrow::Cow; +use std::ops::AddAssign; use deno_core::stats::RuntimeActivity; use deno_core::stats::RuntimeActivityDiff; use deno_core::stats::RuntimeActivityTrace; use deno_core::stats::RuntimeActivityType; use phf::phf_map; -use std::borrow::Cow; -use std::ops::AddAssign; - -use crate::util::path::to_percent_decoded_str; use super::*; +use crate::util::path::to_percent_decoded_str; pub fn to_relative_path_or_remote_url(cwd: &Url, path_or_url: &str) -> String { let Ok(url) = Url::parse(path_or_url) else { diff --git a/cli/tools/test/mod.rs b/cli/tools/test/mod.rs index 6357ebcae24a14..2bd9cd3d7cbc38 100644 --- a/cli/tools/test/mod.rs +++ b/cli/tools/test/mod.rs @@ -1,26 +1,27 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::args::CliOptions; -use crate::args::Flags; -use crate::args::TestFlags; -use crate::args::TestReporterConfig; -use crate::colors; -use crate::display; -use crate::factory::CliFactory; -use crate::file_fetcher::File; -use crate::file_fetcher::FileFetcher; -use crate::graph_util::has_graph_root_local_dependent_changed; -use crate::ops; -use crate::util::extract::extract_doc_tests; -use crate::util::file_watcher; -use crate::util::fs::collect_specifiers; -use crate::util::path::get_extension; -use crate::util::path::is_script_ext; -use crate::util::path::matches_pattern_or_exact_path; -use crate::worker::CliMainWorkerFactory; -use crate::worker::CoverageCollector; +use std::borrow::Cow; +use std::cell::RefCell; +use std::collections::BTreeMap; +use std::collections::BTreeSet; +use std::collections::HashMap; +use std::collections::HashSet; +use std::env; +use std::fmt::Write as _; +use std::future::poll_fn; +use std::io::Write; +use std::num::NonZeroUsize; +use std::path::Path; +use std::sync::atomic::AtomicBool; +use std::sync::atomic::AtomicUsize; +use std::sync::atomic::Ordering; +use std::sync::Arc; +use std::task::Poll; +use std::time::Duration; +use std::time::Instant; use deno_ast::MediaType; +use deno_cache_dir::file_fetcher::File; use deno_config::glob::FilePatterns; use deno_config::glob::WalkEntry; use deno_core::anyhow; @@ -65,27 +66,28 @@ use rand::seq::SliceRandom; use rand::SeedableRng; use regex::Regex; use serde::Deserialize; -use std::borrow::Cow; -use std::cell::RefCell; -use std::collections::BTreeMap; -use std::collections::BTreeSet; -use std::collections::HashMap; -use std::collections::HashSet; -use std::env; -use std::fmt::Write as _; -use std::future::poll_fn; -use std::io::Write; -use std::num::NonZeroUsize; -use std::path::Path; -use std::sync::atomic::AtomicBool; -use std::sync::atomic::AtomicUsize; -use std::sync::atomic::Ordering; -use std::sync::Arc; -use std::task::Poll; -use std::time::Duration; -use std::time::Instant; use tokio::signal; +use crate::args::CliOptions; +use crate::args::Flags; +use crate::args::TestFlags; +use crate::args::TestReporterConfig; +use crate::colors; +use crate::display; +use crate::factory::CliFactory; +use crate::file_fetcher::CliFileFetcher; +use crate::graph_util::has_graph_root_local_dependent_changed; +use crate::ops; +use crate::sys::CliSys; +use crate::util::extract::extract_doc_tests; +use crate::util::file_watcher; +use crate::util::fs::collect_specifiers; +use crate::util::path::get_extension; +use crate::util::path::is_script_ext; +use crate::util::path::matches_pattern_or_exact_path; +use crate::worker::CliMainWorkerFactory; +use crate::worker::CoverageCollector; + mod channel; pub mod fmt; pub mod reporters; @@ -616,7 +618,10 @@ async fn configure_main_worker( WorkerExecutionMode::Test, specifier.clone(), permissions_container, - vec![ops::testing::deno_test::init_ops(worker_sender.sender)], + vec![ + ops::testing::deno_test::init_ops(worker_sender.sender), + ops::lint::deno_lint::init_ops(), + ], Stdio { stdin: StdioPipe::inherit(), stdout: StdioPipe::file(worker_sender.stdout), @@ -1191,7 +1196,7 @@ static HAS_TEST_RUN_SIGINT_HANDLER: AtomicBool = AtomicBool::new(false); async fn test_specifiers( worker_factory: Arc, permissions: &Permissions, - permission_desc_parser: &Arc, + permission_desc_parser: &Arc>, specifiers: Vec, options: TestSpecifiersOptions, ) -> Result<(), AnyError> { @@ -1514,7 +1519,7 @@ fn collect_specifiers_with_test_mode( /// as well. async fn fetch_specifiers_with_test_mode( cli_options: &CliOptions, - file_fetcher: &FileFetcher, + file_fetcher: &CliFileFetcher, member_patterns: impl Iterator, doc: &bool, ) -> Result, AnyError> { @@ -1716,7 +1721,11 @@ pub async fn run_tests_with_watch( &cli_options.permissions_options(), )?; let graph = module_graph_creator - .create_graph(graph_kind, test_modules) + .create_graph( + graph_kind, + test_modules, + crate::graph_util::NpmCachingStrategy::Eager, + ) .await?; module_graph_creator.graph_valid(&graph)?; let test_modules = &graph.roots; @@ -1818,7 +1827,7 @@ pub async fn run_tests_with_watch( /// Extracts doc tests from files specified by the given specifiers. async fn get_doc_tests( specifiers_with_mode: &[(Url, TestMode)], - file_fetcher: &FileFetcher, + file_fetcher: &CliFileFetcher, ) -> Result, AnyError> { let specifiers_needing_extraction = specifiers_with_mode .iter() @@ -1843,7 +1852,7 @@ fn get_target_specifiers( specifiers_with_mode .into_iter() .filter_map(|(s, mode)| mode.needs_test_run().then_some(s)) - .chain(doc_tests.iter().map(|d| d.specifier.clone())) + .chain(doc_tests.iter().map(|d| d.url.clone())) .collect() } diff --git a/cli/tools/test/reporters/common.rs b/cli/tools/test/reporters/common.rs index 7ca83db80971c4..2db6a36464771b 100644 --- a/cli/tools/test/reporters/common.rs +++ b/cli/tools/test/reporters/common.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use super::fmt::format_test_error; use super::fmt::to_relative_path_or_remote_url; diff --git a/cli/tools/test/reporters/compound.rs b/cli/tools/test/reporters/compound.rs index 3ab7297db59b60..e381dd09778748 100644 --- a/cli/tools/test/reporters/compound.rs +++ b/cli/tools/test/reporters/compound.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use super::*; diff --git a/cli/tools/test/reporters/dot.rs b/cli/tools/test/reporters/dot.rs index 169c4b0e720dda..091285843126e8 100644 --- a/cli/tools/test/reporters/dot.rs +++ b/cli/tools/test/reporters/dot.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use super::common; use super::fmt::to_relative_path_or_remote_url; diff --git a/cli/tools/test/reporters/junit.rs b/cli/tools/test/reporters/junit.rs index 3998bee40de39b..42ced0760060ad 100644 --- a/cli/tools/test/reporters/junit.rs +++ b/cli/tools/test/reporters/junit.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::collections::VecDeque; use std::path::PathBuf; diff --git a/cli/tools/test/reporters/mod.rs b/cli/tools/test/reporters/mod.rs index 07351e9c3bef45..ef2b00b776034b 100644 --- a/cli/tools/test/reporters/mod.rs +++ b/cli/tools/test/reporters/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use super::*; diff --git a/cli/tools/test/reporters/pretty.rs b/cli/tools/test/reporters/pretty.rs index 4120bbfb543fe4..3419fdea5941e3 100644 --- a/cli/tools/test/reporters/pretty.rs +++ b/cli/tools/test/reporters/pretty.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use super::common; use super::fmt::to_relative_path_or_remote_url; diff --git a/cli/tools/test/reporters/tap.rs b/cli/tools/test/reporters/tap.rs index ea68ddd43a7e80..c36df25756a452 100644 --- a/cli/tools/test/reporters/tap.rs +++ b/cli/tools/test/reporters/tap.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_core::serde_json::json; use deno_core::serde_json::{self}; diff --git a/cli/tools/upgrade.rs b/cli/tools/upgrade.rs index cb85859f7ab2bd..521c3217fe7eed 100644 --- a/cli/tools/upgrade.rs +++ b/cli/tools/upgrade.rs @@ -1,7 +1,28 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. //! This module provides feature to upgrade deno executable +use std::borrow::Cow; +use std::env; +use std::fs; +use std::io::IsTerminal; +use std::ops::Sub; +use std::path::Path; +use std::path::PathBuf; +use std::process::Command; +use std::sync::Arc; +use std::time::Duration; + +use async_trait::async_trait; +use deno_core::anyhow::bail; +use deno_core::anyhow::Context; +use deno_core::error::AnyError; +use deno_core::unsync::spawn; +use deno_core::url::Url; +use deno_semver::SmallStackString; +use deno_semver::Version; +use once_cell::sync::Lazy; + use crate::args::Flags; use crate::args::UpgradeFlags; use crate::args::UPGRADE_USAGE; @@ -15,25 +36,6 @@ use crate::util::progress_bar::ProgressBar; use crate::util::progress_bar::ProgressBarStyle; use crate::version; -use async_trait::async_trait; -use deno_core::anyhow::bail; -use deno_core::anyhow::Context; -use deno_core::error::AnyError; -use deno_core::unsync::spawn; -use deno_core::url::Url; -use deno_semver::Version; -use once_cell::sync::Lazy; -use std::borrow::Cow; -use std::env; -use std::fs; -use std::io::IsTerminal; -use std::ops::Sub; -use std::path::Path; -use std::path::PathBuf; -use std::process::Command; -use std::sync::Arc; -use std::time::Duration; - const RELEASE_URL: &str = "https://github.com/denoland/deno/releases"; const CANARY_URL: &str = "https://dl.deno.land/canary"; const DL_RELEASE_URL: &str = "https://dl.deno.land/release"; @@ -255,7 +257,7 @@ async fn print_release_notes( let is_deno_2_rc = new_semver.major == 2 && new_semver.minor == 0 && new_semver.patch == 0 - && new_semver.pre.first() == Some(&"rc".to_string()); + && new_semver.pre.first().map(|s| s.as_str()) == Some("rc"); if is_deno_2_rc || is_switching_from_deno1_to_deno2 { log::info!( @@ -674,7 +676,7 @@ impl RequestedVersion { ); }; - if semver.pre.contains(&"rc".to_string()) { + if semver.pre.contains(&SmallStackString::from_static("rc")) { (ReleaseChannel::Rc, passed_version) } else { (ReleaseChannel::Stable, passed_version) diff --git a/cli/tsc/00_typescript.js b/cli/tsc/00_typescript.js index 7d20f923670578..b7626fe08269bb 100644 --- a/cli/tsc/00_typescript.js +++ b/cli/tsc/00_typescript.js @@ -136063,6 +136063,7 @@ var unprefixedNodeCoreModuleList = [ "https", "http2", "inspector", + "inspector/promises", "module", "net", "os", diff --git a/cli/tsc/99_main_compiler.js b/cli/tsc/99_main_compiler.js index 68d099253a5f4e..25813c3f9dac0b 100644 --- a/cli/tsc/99_main_compiler.js +++ b/cli/tsc/99_main_compiler.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // @ts-check /// @@ -41,6 +41,13 @@ delete Object.prototype.__proto__; "listen", "listenDatagram", "openKv", + "connectQuic", + "listenQuic", + "QuicBidirectionalStream", + "QuicConn", + "QuicListener", + "QuicReceiveStream", + "QuicSendStream", ]); const unstableMsgSuggestion = "If not, try changing the 'lib' compiler option to include 'deno.unstable' " + @@ -402,9 +409,20 @@ delete Object.prototype.__proto__; messageText = formatMessage(msgText, ri.code); } if (start !== undefined && length !== undefined && file) { - const startPos = file.getLineAndCharacterOfPosition(start); - const sourceLine = file.getFullText().split("\n")[startPos.line]; - const fileName = file.fileName; + let startPos = file.getLineAndCharacterOfPosition(start); + let sourceLine = file.getFullText().split("\n")[startPos.line]; + const originalFileName = file.fileName; + const fileName = ops.op_remap_specifier + ? (ops.op_remap_specifier(file.fileName) ?? file.fileName) + : file.fileName; + // Bit of a hack to detect when we have a .wasm file and want to hide + // the .d.ts text. This is not perfect, but will work in most scenarios + if ( + fileName.endsWith(".wasm") && originalFileName.endsWith(".wasm.d.mts") + ) { + startPos = { line: 0, character: 0 }; + sourceLine = undefined; + } return { start: startPos, end: file.getLineAndCharacterOfPosition(start + length), @@ -450,6 +468,12 @@ delete Object.prototype.__proto__; // We specify the resolution mode to be CommonJS for some npm files and this // diagnostic gets generated even though we're using custom module resolution. 1452, + // Module '...' cannot be imported using this construct. The specifier only resolves to an + // ES module, which cannot be imported with 'require'. + 1471, + // TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; + // however, the referenced file is an ECMAScript module and cannot be imported with 'require'. + 1479, // TS2306: File '.../index.d.ts' is not a module. // We get this for `x-typescript-types` declaration files which don't export // anything. We prefer to treat these as modules with no exports. @@ -462,6 +486,9 @@ delete Object.prototype.__proto__; 2792, // TS2307: Cannot find module '{0}' or its corresponding type declarations. 2307, + // Relative import errors to add an extension + 2834, + 2835, // TS5009: Cannot find the common subdirectory path for the input files. 5009, // TS5055: Cannot write file @@ -675,14 +702,18 @@ delete Object.prototype.__proto__; getNewLine() { return "\n"; }, - resolveTypeReferenceDirectives( - typeDirectiveNames, + resolveTypeReferenceDirectiveReferences( + typeDirectiveReferences, containingFilePath, redirectedReference, options, - containingFileMode, + containingSourceFile, + _reusedNames, ) { - return typeDirectiveNames.map((arg) => { + const isCjs = + containingSourceFile?.impliedNodeFormat === ts.ModuleKind.CommonJS; + /** @type {Array} */ + const result = typeDirectiveReferences.map((arg) => { /** @type {ts.FileReference} */ const fileReference = typeof arg === "string" ? { @@ -695,16 +726,28 @@ delete Object.prototype.__proto__; /** @type {[string, ts.Extension] | undefined} */ const resolved = ops.op_resolve( containingFilePath, - containingFileMode === ts.ModuleKind.CommonJS, - [fileReference.fileName], + [ + [ + fileReference.resolutionMode == null + ? isCjs + : fileReference.resolutionMode === ts.ModuleKind.CommonJS, + fileReference.fileName, + ], + ], )?.[0]; if (resolved) { return { - primary: true, - resolvedFileName: resolved[0], + resolvedTypeReferenceDirective: { + primary: true, + resolvedFileName: resolved[0], + // todo(dsherret): we should probably be setting this + isExternalLibraryImport: undefined, + }, }; } else { - return undefined; + return { + resolvedTypeReferenceDirective: undefined, + }; } } else { return ts.resolveTypeReferenceDirective( @@ -714,41 +757,56 @@ delete Object.prototype.__proto__; host, redirectedReference, undefined, - containingFileMode ?? fileReference.resolutionMode, - ).resolvedTypeReferenceDirective; + containingSourceFile?.impliedNodeFormat ?? + fileReference.resolutionMode, + ); } }); + return result; }, - resolveModuleNames( - specifiers, + resolveModuleNameLiterals( + moduleLiterals, base, - _reusedNames, _redirectedReference, - _options, + compilerOptions, containingSourceFile, + _reusedNames, ) { + const specifiers = moduleLiterals.map((literal) => [ + ts.getModeForUsageLocation( + containingSourceFile, + literal, + compilerOptions, + ) === ts.ModuleKind.CommonJS, + literal.text, + ]); if (logDebug) { debug(`host.resolveModuleNames()`); debug(` base: ${base}`); - debug(` specifiers: ${specifiers.join(", ")}`); + debug(` specifiers: ${specifiers.map((s) => s[1]).join(", ")}`); } /** @type {Array<[string, ts.Extension] | undefined>} */ const resolved = ops.op_resolve( base, - containingSourceFile?.impliedNodeFormat === ts.ModuleKind.CommonJS, specifiers, ); if (resolved) { + /** @type {Array} */ const result = resolved.map((item) => { if (item) { const [resolvedFileName, extension] = item; return { - resolvedFileName, - extension, - isExternalLibraryImport: false, + resolvedModule: { + resolvedFileName, + extension, + // todo(dsherret): we should probably be setting this + isExternalLibraryImport: false, + }, }; } - return undefined; + return { + resolvedModule: undefined, + }; }); result.length = specifiers.length; return result; @@ -993,24 +1051,27 @@ delete Object.prototype.__proto__; configFileParsingDiagnostics, }); - const checkFiles = localOnly - ? rootNames - .filter((n) => !n.startsWith("http")) - .map((checkName) => { - const sourceFile = program.getSourceFile(checkName); - if (sourceFile == null) { - throw new Error("Could not find source file for: " + checkName); - } - return sourceFile; - }) - : undefined; + let checkFiles = undefined; + + if (localOnly) { + const checkFileNames = new Set(); + checkFiles = []; + + for (const checkName of rootNames) { + if (checkName.startsWith("http")) { + continue; + } + const sourceFile = program.getSourceFile(checkName); + if (sourceFile != null) { + checkFiles.push(sourceFile); + } + checkFileNames.add(checkName); + } - if (checkFiles != null) { // When calling program.getSemanticDiagnostics(...) with a source file, we // need to call this code first in order to get it to invalidate cached // diagnostics correctly. This is what program.getSemanticDiagnostics() // does internally when calling without any arguments. - const checkFileNames = new Set(checkFiles.map((f) => f.fileName)); while ( program.getSemanticDiagnosticsOfNextAffectedFile( undefined, diff --git a/cli/tsc/_analyze_types_node.ts b/cli/tsc/_analyze_types_node.ts index 10af00ee832824..1a77b6c547147f 100755 --- a/cli/tsc/_analyze_types_node.ts +++ b/cli/tsc/_analyze_types_node.ts @@ -1,5 +1,5 @@ #!/usr/bin/env -S deno run --allow-env --allow-read --allow-write=. -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { ModuleDeclarationKind, Node, diff --git a/cli/tsc/compiler.d.ts b/cli/tsc/compiler.d.ts index 428e4d1ed8c327..0389527f5b3482 100644 --- a/cli/tsc/compiler.d.ts +++ b/cli/tsc/compiler.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Contains types that can be used to validate and check `99_main_compiler.js` diff --git a/cli/tsc/diagnostics.rs b/cli/tsc/diagnostics.rs index d3795706eb7619..ac93c8575d784b 100644 --- a/cli/tsc/diagnostics.rs +++ b/cli/tsc/diagnostics.rs @@ -1,16 +1,16 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use deno_ast::ModuleSpecifier; -use deno_graph::ModuleGraph; -use deno_terminal::colors; +use std::error::Error; +use std::fmt; +use deno_ast::ModuleSpecifier; use deno_core::serde::Deserialize; use deno_core::serde::Deserializer; use deno_core::serde::Serialize; use deno_core::serde::Serializer; use deno_core::sourcemap::SourceMap; -use std::error::Error; -use std::fmt; +use deno_graph::ModuleGraph; +use deno_terminal::colors; const MAX_SOURCE_LINE_LENGTH: usize = 150; @@ -90,9 +90,9 @@ impl DiagnosticMessageChain { s.push_str(&" ".repeat(level * 2)); s.push_str(&self.message_text); if let Some(next) = &self.next { - s.push('\n'); let arr = next.clone(); for dm in arr { + s.push('\n'); s.push_str(&dm.format_message(level + 1)); } } @@ -110,6 +110,15 @@ pub struct Position { pub character: u64, } +impl Position { + pub fn from_deno_graph(deno_graph_position: deno_graph::Position) -> Self { + Self { + line: deno_graph_position.line as u64, + character: deno_graph_position.character as u64, + } + } +} + #[derive(Debug, Deserialize, Serialize, Clone, Eq, PartialEq)] #[serde(rename_all = "camelCase")] pub struct Diagnostic { @@ -133,9 +142,47 @@ pub struct Diagnostic { pub file_name: Option, #[serde(skip_serializing_if = "Option::is_none")] pub related_information: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + pub reports_deprecated: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub reports_unnecessary: Option, + #[serde(flatten)] + pub other: deno_core::serde_json::Map, } impl Diagnostic { + pub fn from_missing_error( + specifier: &ModuleSpecifier, + maybe_range: Option<&deno_graph::Range>, + additional_message: Option, + ) -> Self { + Self { + category: DiagnosticCategory::Error, + code: 2307, + start: maybe_range.map(|r| Position::from_deno_graph(r.range.start)), + end: maybe_range.map(|r| Position::from_deno_graph(r.range.end)), + original_source_start: None, // will be applied later + message_text: Some(format!( + "Cannot find module '{}'.{}{}", + specifier, + if additional_message.is_none() { + "" + } else { + " " + }, + additional_message.unwrap_or_default() + )), + message_chain: None, + source: None, + source_line: None, + file_name: maybe_range.map(|r| r.specifier.to_string()), + related_information: None, + reports_deprecated: None, + reports_unnecessary: None, + other: Default::default(), + } + } + /// If this diagnostic should be included when it comes from a remote module. pub fn include_when_remote(&self) -> bool { /// TS6133: value is declared but its value is never read (noUnusedParameters and noUnusedLocals) @@ -293,6 +340,14 @@ impl Diagnostics { }); } + pub fn push(&mut self, diagnostic: Diagnostic) { + self.0.push(diagnostic); + } + + pub fn extend(&mut self, diagnostic: Diagnostics) { + self.0.extend(diagnostic.0); + } + /// Return a set of diagnostics where only the values where the predicate /// returns `true` are included. pub fn filter

(self, predicate: P) -> Self @@ -395,11 +450,12 @@ impl Error for Diagnostics {} #[cfg(test)] mod tests { - use super::*; use deno_core::serde_json; use deno_core::serde_json::json; use test_util::strip_ansi_codes; + use super::*; + #[test] fn test_de_diagnostics() { let value = json!([ diff --git a/cli/tsc/dts/lib.deno.ns.d.ts b/cli/tsc/dts/lib.deno.ns.d.ts index 8179e4223c264e..e98f68ea38624d 100644 --- a/cli/tsc/dts/lib.deno.ns.d.ts +++ b/cli/tsc/dts/lib.deno.ns.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /// /// @@ -4535,7 +4535,7 @@ declare namespace Deno { /** The object that is returned from a {@linkcode Deno.upgradeWebSocket} * request. * - * @category Web Sockets */ + * @category WebSockets */ export interface WebSocketUpgrade { /** The response object that represents the HTTP response to the client, * which should be used to the {@linkcode RequestEvent} `.respondWith()` for @@ -4549,7 +4549,7 @@ declare namespace Deno { /** Options which can be set when performing a * {@linkcode Deno.upgradeWebSocket} upgrade of a {@linkcode Request} * - * @category Web Sockets */ + * @category WebSockets */ export interface UpgradeWebSocketOptions { /** Sets the `.protocol` property on the client side web socket to the * value provided here, which should be one of the strings specified in the @@ -4597,7 +4597,7 @@ declare namespace Deno { * This operation does not yet consume the request or open the websocket. This * only happens once the returned response has been passed to `respondWith()`. * - * @category Web Sockets + * @category WebSockets */ export function upgradeWebSocket( request: Request, diff --git a/cli/tsc/dts/lib.deno.shared_globals.d.ts b/cli/tsc/dts/lib.deno.shared_globals.d.ts index ba872ef46e7761..a469525270b588 100644 --- a/cli/tsc/dts/lib.deno.shared_globals.d.ts +++ b/cli/tsc/dts/lib.deno.shared_globals.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Documentation partially adapted from [MDN](https://developer.mozilla.org/), // by Mozilla Contributors, which is licensed under CC-BY-SA 2.5. @@ -15,14 +15,14 @@ /// /// -/** @category WASM */ +/** @category Wasm */ declare namespace WebAssembly { /** * The `WebAssembly.CompileError` object indicates an error during WebAssembly decoding or validation. * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/CompileError) * - * @category WASM + * @category Wasm */ export class CompileError extends Error { /** Creates a new `WebAssembly.CompileError` object. */ @@ -36,7 +36,7 @@ declare namespace WebAssembly { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Global) * - * @category WASM + * @category Wasm */ export class Global { /** Creates a new `Global` object. */ @@ -59,7 +59,7 @@ declare namespace WebAssembly { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Instance) * - * @category WASM + * @category Wasm */ export class Instance { /** Creates a new Instance object. */ @@ -79,7 +79,7 @@ declare namespace WebAssembly { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/LinkError) * - * @category WASM + * @category Wasm */ export class LinkError extends Error { /** Creates a new WebAssembly.LinkError object. */ @@ -95,7 +95,7 @@ declare namespace WebAssembly { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory) * - * @category WASM + * @category Wasm */ export class Memory { /** Creates a new `Memory` object. */ @@ -117,7 +117,7 @@ declare namespace WebAssembly { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Module) * - * @category WASM + * @category Wasm */ export class Module { /** Creates a new `Module` object. */ @@ -145,7 +145,7 @@ declare namespace WebAssembly { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/RuntimeError) * - * @category WASM + * @category Wasm */ export class RuntimeError extends Error { /** Creates a new `WebAssembly.RuntimeError` object. */ @@ -160,7 +160,7 @@ declare namespace WebAssembly { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Table) * - * @category WASM + * @category Wasm */ export class Table { /** Creates a new `Table` object. */ @@ -182,7 +182,7 @@ declare namespace WebAssembly { /** The `GlobalDescriptor` describes the options you can pass to * `new WebAssembly.Global()`. * - * @category WASM + * @category Wasm */ export interface GlobalDescriptor { mutable?: boolean; @@ -192,7 +192,7 @@ declare namespace WebAssembly { /** The `MemoryDescriptor` describes the options you can pass to * `new WebAssembly.Memory()`. * - * @category WASM + * @category Wasm */ export interface MemoryDescriptor { initial: number; @@ -203,7 +203,7 @@ declare namespace WebAssembly { /** A `ModuleExportDescriptor` is the description of a declared export in a * `WebAssembly.Module`. * - * @category WASM + * @category Wasm */ export interface ModuleExportDescriptor { kind: ImportExportKind; @@ -213,7 +213,7 @@ declare namespace WebAssembly { /** A `ModuleImportDescriptor` is the description of a declared import in a * `WebAssembly.Module`. * - * @category WASM + * @category Wasm */ export interface ModuleImportDescriptor { kind: ImportExportKind; @@ -224,7 +224,7 @@ declare namespace WebAssembly { /** The `TableDescriptor` describes the options you can pass to * `new WebAssembly.Table()`. * - * @category WASM + * @category Wasm */ export interface TableDescriptor { element: TableKind; @@ -234,7 +234,7 @@ declare namespace WebAssembly { /** The value returned from `WebAssembly.instantiate`. * - * @category WASM + * @category Wasm */ export interface WebAssemblyInstantiatedSource { /* A `WebAssembly.Instance` object that contains all the exported WebAssembly functions. */ @@ -247,21 +247,21 @@ declare namespace WebAssembly { module: Module; } - /** @category WASM */ + /** @category Wasm */ export type ImportExportKind = "function" | "global" | "memory" | "table"; - /** @category WASM */ + /** @category Wasm */ export type TableKind = "anyfunc"; - /** @category WASM */ + /** @category Wasm */ export type ValueType = "f32" | "f64" | "i32" | "i64"; - /** @category WASM */ + /** @category Wasm */ export type ExportValue = Function | Global | Memory | Table; - /** @category WASM */ + /** @category Wasm */ export type Exports = Record; - /** @category WASM */ + /** @category Wasm */ export type ImportValue = ExportValue | number; - /** @category WASM */ + /** @category Wasm */ export type ModuleImports = Record; - /** @category WASM */ + /** @category Wasm */ export type Imports = Record; /** @@ -272,7 +272,7 @@ declare namespace WebAssembly { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/compile) * - * @category WASM + * @category Wasm */ export function compile(bytes: BufferSource): Promise; @@ -284,7 +284,7 @@ declare namespace WebAssembly { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/compileStreaming) * - * @category WASM + * @category Wasm */ export function compileStreaming( source: Response | Promise, @@ -301,7 +301,7 @@ declare namespace WebAssembly { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/instantiate) * - * @category WASM + * @category Wasm */ export function instantiate( bytes: BufferSource, @@ -318,7 +318,7 @@ declare namespace WebAssembly { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/instantiate) * - * @category WASM + * @category Wasm */ export function instantiate( moduleObject: Module, @@ -332,7 +332,7 @@ declare namespace WebAssembly { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/instantiateStreaming) * - * @category WASM + * @category Wasm */ export function instantiateStreaming( response: Response | PromiseLike, @@ -346,7 +346,7 @@ declare namespace WebAssembly { * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/validate) * - * @category WASM + * @category Wasm */ export function validate(bytes: BufferSource): boolean; } diff --git a/cli/tsc/dts/lib.deno.unstable.d.ts b/cli/tsc/dts/lib.deno.unstable.d.ts index f8043f9325b1f9..dbe4bace0c34ab 100644 --- a/cli/tsc/dts/lib.deno.unstable.d.ts +++ b/cli/tsc/dts/lib.deno.unstable.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /// /// @@ -293,7 +293,8 @@ declare namespace Deno { * executions. Each element in the array represents the number of milliseconds * to wait before retrying the execution. For example, `[1000, 5000, 10000]` * means that a failed execution will be retried at most 3 times, with 1 - * second, 5 seconds, and 10 seconds delay between each retry. + * second, 5 seconds, and 10 seconds delay between each retry. There is a + * limit of 5 retries and a maximum interval of 1 hour (3600000 milliseconds). * * @category Cloud * @experimental @@ -1252,80 +1253,53 @@ declare namespace Deno { } /** + * **UNSTABLE**: New API, yet to be vetted. + * + * APIs for working with the OpenTelemetry observability framework. Deno can + * export traces, metrics, and logs to OpenTelemetry compatible backends via + * the OTLP protocol. + * + * Deno automatically instruments the runtime with OpenTelemetry traces and + * metrics. This data is exported via OTLP to OpenTelemetry compatible + * backends. User logs from the `console` API are exported as OpenTelemetry + * logs via OTLP. + * + * User code can also create custom traces, metrics, and logs using the + * OpenTelemetry API. This is done using the official OpenTelemetry package + * for JavaScript: + * [`npm:@opentelemetry/api`](https://opentelemetry.io/docs/languages/js/). + * Deno integrates with this package to provide trace context propagation + * between native Deno APIs (like `Deno.serve` or `fetch`) and custom user + * code. Deno also provides APIs that allow exporting custom telemetry data + * via the same OTLP channel used by the Deno runtime. This is done using the + * [`jsr:@deno/otel`](https://jsr.io/@deno/otel) package. + * + * @example Using OpenTelemetry API to create custom traces + * ```ts,ignore + * import { trace } from "npm:@opentelemetry/api@1"; + * import "jsr:@deno/otel@0.0.2/register"; + * + * const tracer = trace.getTracer("example-tracer"); + * + * async function doWork() { + * return tracer.startActiveSpan("doWork", async (span) => { + * span.setAttribute("key", "value"); + * await new Promise((resolve) => setTimeout(resolve, 1000)); + * span.end(); + * }); + * } + * + * Deno.serve(async (req) => { + * await doWork(); + * const resp = await fetch("https://example.com"); + * return resp; + * }); + * ``` + * * @category Telemetry * @experimental */ - export namespace tracing { - /** - * Whether tracing is enabled. - * @category Telemetry - * @experimental - */ - export const enabled: boolean; - - /** - * Allowed attribute type. - * @category Telemetry - * @experimental - */ - export type AttributeValue = string | number | boolean | bigint; - - /** - * A tracing span. - * @category Telemetry - * @experimental - */ - export class Span implements Disposable { - readonly traceId: string; - readonly spanId: string; - readonly parentSpanId: string; - readonly kind: string; - readonly name: string; - readonly startTime: number; - readonly endTime: number; - readonly status: null | { code: 1 } | { code: 2; message: string }; - readonly attributes: Record; - readonly traceFlags: number; - - /** - * Construct a new Span and enter it as the "current" span. - */ - constructor( - name: string, - kind?: "internal" | "server" | "client" | "producer" | "consumer", - ); - - /** - * Set an attribute on this span. - */ - setAttribute( - name: string, - value: AttributeValue, - ): void; - - /** - * Enter this span as the "current" span. - */ - enter(): void; - - /** - * Exit this span as the "current" span and restore the previous one. - */ - exit(): void; - - /** - * End this span, and exit it as the "current" span. - */ - end(): void; - - [Symbol.dispose](): void; - - /** - * Get the "current" span, if one exists. - */ - static current(): Span | undefined | null; - } - + export namespace telemetry { /** * A SpanExporter compatible with OpenTelemetry.js * https://open-telemetry.github.io/opentelemetry-js/interfaces/_opentelemetry_sdk_trace_base.SpanExporter.html @@ -1345,14 +1319,6 @@ declare namespace Deno { export {}; // only export exports } - /** - * @category Telemetry - * @experimental - */ - export namespace metrics { - export {}; // only export exports - } - export {}; // only export exports } diff --git a/cli/tsc/dts/lib.deno.window.d.ts b/cli/tsc/dts/lib.deno.window.d.ts index 636e2b0fd0be45..8a516beaf6b61d 100644 --- a/cli/tsc/dts/lib.deno.window.d.ts +++ b/cli/tsc/dts/lib.deno.window.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /// /// diff --git a/cli/tsc/dts/lib.deno.worker.d.ts b/cli/tsc/dts/lib.deno.worker.d.ts index fa69cc57d63aa1..c3094170314e4f 100644 --- a/cli/tsc/dts/lib.deno.worker.d.ts +++ b/cli/tsc/dts/lib.deno.worker.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /// /// diff --git a/cli/tsc/dts/lib.deno_webgpu.d.ts b/cli/tsc/dts/lib.deno_webgpu.d.ts index 2deb63abc75f1a..6dbfc577685467 100644 --- a/cli/tsc/dts/lib.deno_webgpu.d.ts +++ b/cli/tsc/dts/lib.deno_webgpu.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-explicit-any no-empty-interface diff --git a/cli/tsc/dts/lib.dom.d.ts b/cli/tsc/dts/lib.dom.d.ts index 0a2f9b9edaa6e0..2684735597a37a 100644 --- a/cli/tsc/dts/lib.dom.d.ts +++ b/cli/tsc/dts/lib.dom.d.ts @@ -18277,7 +18277,7 @@ declare var ReadableStream: { new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number }): ReadableStream; new(underlyingSource: UnderlyingDefaultSource, strategy?: QueuingStrategy): ReadableStream; new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; - from(asyncIterable: AsyncIterable | Iterable>): ReadableStream; + from(asyncIterable: AsyncIterable | Iterable> & object): ReadableStream; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader) */ diff --git a/cli/tsc/dts/lib.dom.extras.d.ts b/cli/tsc/dts/lib.dom.extras.d.ts index a6de789f56d636..3a1667a99c8a7c 100644 --- a/cli/tsc/dts/lib.dom.extras.d.ts +++ b/cli/tsc/dts/lib.dom.extras.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /* * This library contains DOM standards that are not currently included in the diff --git a/cli/tsc/mod.rs b/cli/tsc/mod.rs index 8f8bed20a4cb2c..3176c50d5c7e70 100644 --- a/cli/tsc/mod.rs +++ b/cli/tsc/mod.rs @@ -1,15 +1,11 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::args::TsConfig; -use crate::args::TypeCheckMode; -use crate::cache::FastInsecureHasher; -use crate::cache::ModuleInfoCache; -use crate::node; -use crate::npm::CliNpmResolver; -use crate::resolver::CjsTracker; -use crate::util::checksum; -use crate::util::path::mapped_specifier_for_tsc; -use crate::worker::create_isolate_create_params; +use std::borrow::Cow; +use std::collections::HashMap; +use std::fmt; +use std::path::Path; +use std::path::PathBuf; +use std::sync::Arc; use deno_ast::MediaType; use deno_core::anyhow::anyhow; @@ -35,23 +31,28 @@ use deno_graph::Module; use deno_graph::ModuleGraph; use deno_graph::ResolutionResolved; use deno_resolver::npm::ResolvePkgFolderFromDenoReqError; -use deno_runtime::deno_fs; -use deno_runtime::deno_node::NodeResolver; use deno_semver::npm::NpmPackageReqReference; use node_resolver::errors::NodeJsErrorCode; use node_resolver::errors::NodeJsErrorCoded; use node_resolver::errors::PackageSubpathResolveError; -use node_resolver::NodeModuleKind; -use node_resolver::NodeResolutionMode; +use node_resolver::resolve_specifier_into_node_modules; +use node_resolver::NodeResolutionKind; +use node_resolver::ResolutionMode; use once_cell::sync::Lazy; -use std::borrow::Cow; -use std::collections::HashMap; -use std::fmt; -use std::path::Path; -use std::path::PathBuf; -use std::sync::Arc; use thiserror::Error; +use crate::args::TsConfig; +use crate::args::TypeCheckMode; +use crate::cache::FastInsecureHasher; +use crate::cache::ModuleInfoCache; +use crate::node::CliNodeResolver; +use crate::npm::CliNpmResolver; +use crate::resolver::CjsTracker; +use crate::sys::CliSys; +use crate::util::checksum; +use crate::util::path::mapped_specifier_for_tsc; +use crate::worker::create_isolate_create_params; + mod diagnostics; pub use self::diagnostics::Diagnostic; @@ -128,6 +129,7 @@ fn get_asset_texts_from_new_runtime() -> Result, AnyError> { op_emit, op_is_node_file, op_load, + op_remap_specifier, op_resolve, op_respond, ] @@ -274,30 +276,6 @@ fn hash_url(specifier: &ModuleSpecifier, media_type: MediaType) -> String { ) } -/// If the provided URLs derivable tsc media type doesn't match the media type, -/// we will add an extension to the output. This is to avoid issues with -/// specifiers that don't have extensions, that tsc refuses to emit because they -/// think a `.js` version exists, when it doesn't. -fn maybe_remap_specifier( - specifier: &ModuleSpecifier, - media_type: MediaType, -) -> Option { - let path = if specifier.scheme() == "file" { - if let Ok(path) = specifier.to_file_path() { - path - } else { - PathBuf::from(specifier.path()) - } - } else { - PathBuf::from(specifier.path()) - }; - if path.extension().is_none() { - Some(format!("{}{}", specifier, media_type.as_ts_extension())) - } else { - None - } -} - #[derive(Debug, Clone, Default, Eq, PartialEq)] pub struct EmittedFile { pub data: String, @@ -315,7 +293,7 @@ pub fn into_specifier_and_media_type( (specifier, media_type) } None => ( - Url::parse("internal:///missing_dependency.d.ts").unwrap(), + Url::parse(MISSING_DEPENDENCY_SPECIFIER).unwrap(), MediaType::Dts, ), } @@ -380,7 +358,7 @@ impl TypeCheckingCjsTracker { #[derive(Debug)] pub struct RequestNpmState { pub cjs_tracker: Arc, - pub node_resolver: Arc, + pub node_resolver: Arc, pub npm_resolver: Arc, } @@ -421,6 +399,8 @@ struct State { maybe_tsbuildinfo: Option, maybe_response: Option, maybe_npm: Option, + // todo(dsherret): it looks like the remapped_specifiers and + // root_map could be combined... what is the point of the separation? remapped_specifiers: HashMap, root_map: HashMap, current_dir: PathBuf, @@ -462,6 +442,16 @@ impl State { current_dir, } } + + pub fn maybe_remapped_specifier( + &self, + specifier: &str, + ) -> Option<&ModuleSpecifier> { + self + .remapped_specifiers + .get(specifier) + .or_else(|| self.root_map.get(specifier)) + } } fn normalize_specifier( @@ -606,10 +596,7 @@ fn op_load_inner( maybe_source.map(Cow::Borrowed) } else { let specifier = if let Some(remapped_specifier) = - state.remapped_specifiers.get(load_specifier) - { - remapped_specifier - } else if let Some(remapped_specifier) = state.root_map.get(load_specifier) + state.maybe_remapped_specifier(load_specifier) { remapped_specifier } else { @@ -650,19 +637,27 @@ fn op_load_inner( media_type = MediaType::Json; Some(Cow::Borrowed(&*module.source)) } + Module::Wasm(module) => { + media_type = MediaType::Dts; + Some(Cow::Borrowed(&*module.source_dts)) + } Module::Npm(_) | Module::Node(_) => None, Module::External(module) => { - // means it's Deno code importing an npm module - let specifier = node::resolve_specifier_into_node_modules( - &module.specifier, - &deno_fs::RealFs, - ); - Some(Cow::Owned(load_from_node_modules( - &specifier, - state.maybe_npm.as_ref(), - &mut media_type, - &mut is_cjs, - )?)) + if module.specifier.scheme() != "file" { + None + } else { + // means it's Deno code importing an npm module + let specifier = resolve_specifier_into_node_modules( + &CliSys::default(), + &module.specifier, + ); + Some(Cow::Owned(load_from_node_modules( + &specifier, + state.maybe_npm.as_ref(), + &mut media_type, + &mut is_cjs, + )?)) + } } } } else if let Some(npm) = state @@ -699,10 +694,21 @@ pub struct ResolveArgs { /// The base specifier that the supplied specifier strings should be resolved /// relative to. pub base: String, - /// If the base is cjs. - pub is_base_cjs: bool, /// A list of specifiers that should be resolved. - pub specifiers: Vec, + /// (is_cjs: bool, raw_specifier: String) + pub specifiers: Vec<(bool, String)>, +} + +#[op2] +#[string] +fn op_remap_specifier( + state: &mut OpState, + #[string] specifier: &str, +) -> Option { + let state = state.borrow::(); + state + .maybe_remapped_specifier(specifier) + .map(|url| url.to_string()) } #[op2] @@ -710,17 +716,9 @@ pub struct ResolveArgs { fn op_resolve( state: &mut OpState, #[string] base: String, - is_base_cjs: bool, - #[serde] specifiers: Vec, + #[serde] specifiers: Vec<(bool, String)>, ) -> Result, AnyError> { - op_resolve_inner( - state, - ResolveArgs { - base, - is_base_cjs, - specifiers, - }, - ) + op_resolve_inner(state, ResolveArgs { base, specifiers }) } #[inline] @@ -731,24 +729,17 @@ fn op_resolve_inner( let state = state.borrow_mut::(); let mut resolved: Vec<(String, &'static str)> = Vec::with_capacity(args.specifiers.len()); - let referrer_kind = if args.is_base_cjs { - NodeModuleKind::Cjs - } else { - NodeModuleKind::Esm - }; let referrer = if let Some(remapped_specifier) = - state.remapped_specifiers.get(&args.base) + state.maybe_remapped_specifier(&args.base) { remapped_specifier.clone() - } else if let Some(remapped_base) = state.root_map.get(&args.base) { - remapped_base.clone() } else { normalize_specifier(&args.base, &state.current_dir).context( "Error converting a string module specifier for \"op_resolve\".", )? }; let referrer_module = state.graph.get(&referrer); - for specifier in args.specifiers { + for (is_cjs, specifier) in args.specifiers { if specifier.starts_with("node:") { resolved.push(( MISSING_DEPENDENCY_SPECIFIER.to_string(), @@ -764,16 +755,27 @@ fn op_resolve_inner( } let resolved_dep = referrer_module - .and_then(|m| m.js()) - .and_then(|m| m.dependencies_prefer_fast_check().get(&specifier)) + .and_then(|m| match m { + Module::Js(m) => m.dependencies_prefer_fast_check().get(&specifier), + Module::Json(_) => None, + Module::Wasm(m) => m.dependencies.get(&specifier), + Module::Npm(_) | Module::Node(_) | Module::External(_) => None, + }) .and_then(|d| d.maybe_type.ok().or_else(|| d.maybe_code.ok())); + let resolution_mode = if is_cjs { + ResolutionMode::Require + } else { + ResolutionMode::Import + }; let maybe_result = match resolved_dep { Some(ResolutionResolved { specifier, .. }) => { resolve_graph_specifier_types( specifier, &referrer, - referrer_kind, + // we could get this from the resolved dep, but for now assume + // the value resolved in TypeScript is better + resolution_mode, state, )? } @@ -781,7 +783,7 @@ fn op_resolve_inner( match resolve_non_graph_specifier_types( &specifier, &referrer, - referrer_kind, + resolution_mode, state, ) { Ok(maybe_result) => maybe_result, @@ -814,7 +816,7 @@ fn op_resolve_inner( } _ => { if let Some(specifier_str) = - maybe_remap_specifier(&specifier, media_type) + mapped_specifier_for_tsc(&specifier, media_type) { state .remapped_specifiers @@ -838,7 +840,7 @@ fn op_resolve_inner( MediaType::Dts.as_ts_extension(), ), }; - log::debug!("Resolved {} to {:?}", specifier, result); + log::debug!("Resolved {} from {} to {:?}", specifier, referrer, result); resolved.push(result); } @@ -848,7 +850,7 @@ fn op_resolve_inner( fn resolve_graph_specifier_types( specifier: &ModuleSpecifier, referrer: &ModuleSpecifier, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, state: &State, ) -> Result, AnyError> { let graph = &state.graph; @@ -889,6 +891,9 @@ fn resolve_graph_specifier_types( Some(Module::Json(module)) => { Ok(Some((module.specifier.clone(), module.media_type))) } + Some(Module::Wasm(module)) => { + Ok(Some((module.specifier.clone(), MediaType::Dmts))) + } Some(Module::Npm(module)) => { if let Some(npm) = &state.maybe_npm.as_ref() { let package_folder = npm @@ -901,8 +906,8 @@ fn resolve_graph_specifier_types( &package_folder, module.nv_reference.sub_path(), Some(referrer), - referrer_kind, - NodeResolutionMode::Types, + resolution_mode, + NodeResolutionKind::Types, ); let maybe_url = match res_result { Ok(url) => Some(url), @@ -920,9 +925,9 @@ fn resolve_graph_specifier_types( Some(Module::External(module)) => { // we currently only use "External" for when the module is in an npm package Ok(state.maybe_npm.as_ref().map(|_| { - let specifier = node::resolve_specifier_into_node_modules( + let specifier = resolve_specifier_into_node_modules( + &CliSys::default(), &module.specifier, - &deno_fs::RealFs, ); into_specifier_and_media_type(Some(specifier)) })) @@ -942,7 +947,7 @@ enum ResolveNonGraphSpecifierTypesError { fn resolve_non_graph_specifier_types( raw_specifier: &str, referrer: &ModuleSpecifier, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, state: &State, ) -> Result< Option<(ModuleSpecifier, MediaType)>, @@ -960,8 +965,8 @@ fn resolve_non_graph_specifier_types( .resolve( raw_specifier, referrer, - referrer_kind, - NodeResolutionMode::Types, + resolution_mode, + NodeResolutionKind::Types, ) .ok() .map(|res| res.into_url()), @@ -969,7 +974,7 @@ fn resolve_non_graph_specifier_types( } else if let Ok(npm_req_ref) = NpmPackageReqReference::from_str(raw_specifier) { - debug_assert_eq!(referrer_kind, NodeModuleKind::Esm); + debug_assert_eq!(resolution_mode, ResolutionMode::Import); // todo(dsherret): add support for injecting this in the graph so // we don't need this special code here. // This could occur when resolving npm:@types/node when it is @@ -981,8 +986,8 @@ fn resolve_non_graph_specifier_types( &package_folder, npm_req_ref.sub_path(), Some(referrer), - referrer_kind, - NodeResolutionMode::Types, + resolution_mode, + NodeResolutionKind::Types, ); let maybe_url = match res_result { Ok(url) => Some(url), @@ -1067,6 +1072,7 @@ pub fn exec(request: Request) -> Result { op_emit, op_is_node_file, op_load, + op_remap_specifier, op_resolve, op_respond, ], @@ -1132,10 +1138,6 @@ pub fn exec(request: Request) -> Result { #[cfg(test)] mod tests { - use super::Diagnostic; - use super::DiagnosticCategory; - use super::*; - use crate::args::TsConfig; use deno_core::futures::future; use deno_core::serde_json; use deno_core::OpState; @@ -1143,6 +1145,11 @@ mod tests { use deno_graph::ModuleGraph; use test_util::PathRef; + use super::Diagnostic; + use super::DiagnosticCategory; + use super::*; + use crate::args::TsConfig; + #[derive(Debug, Default)] pub struct MockLoader { pub fixtures: PathRef, @@ -1196,7 +1203,7 @@ mod tests { .context("Unable to get CWD") .unwrap(), ); - let mut op_state = OpState::new(None); + let mut op_state = OpState::new(None, None); op_state.put(state); op_state } @@ -1381,8 +1388,7 @@ mod tests { &mut state, ResolveArgs { base: "https://deno.land/x/a.ts".to_string(), - is_base_cjs: false, - specifiers: vec!["./b.ts".to_string()], + specifiers: vec![(false, "./b.ts".to_string())], }, ) .expect("should have invoked op"); @@ -1401,8 +1407,7 @@ mod tests { &mut state, ResolveArgs { base: "https://deno.land/x/a.ts".to_string(), - is_base_cjs: false, - specifiers: vec!["./bad.ts".to_string()], + specifiers: vec![(false, "./bad.ts".to_string())], }, ) .expect("should have not errored"); @@ -1442,6 +1447,9 @@ mod tests { source_line: None, file_name: None, related_information: None, + reports_deprecated: None, + reports_unnecessary: None, + other: Default::default(), }]), stats: Stats(vec![("a".to_string(), 12)]) }) diff --git a/cli/util/archive.rs b/cli/util/archive.rs index e2183d57ab0438..e3efd69adb2c1c 100644 --- a/cli/util/archive.rs +++ b/cli/util/archive.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::fs; use std::path::Path; diff --git a/cli/util/checksum.rs b/cli/util/checksum.rs index c9c55ec2b428f8..b15380abd7aaab 100644 --- a/cli/util/checksum.rs +++ b/cli/util/checksum.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use ring::digest::Context; use ring::digest::SHA256; diff --git a/cli/util/console.rs b/cli/util/console.rs index 74e6928a28a6ac..d22d41f5eaef37 100644 --- a/cli/util/console.rs +++ b/cli/util/console.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_runtime::ops::tty::ConsoleSize; diff --git a/cli/util/diff.rs b/cli/util/diff.rs index 14ece0c44cf2ad..a42da3a89aac97 100644 --- a/cli/util/diff.rs +++ b/cli/util/diff.rs @@ -1,9 +1,11 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::fmt::Write as _; -use crate::colors; use dissimilar::diff as difference; use dissimilar::Chunk; -use std::fmt::Write as _; + +use crate::colors; /// Print diff of the same file_path, before and after formatting. /// diff --git a/cli/util/display.rs b/cli/util/display.rs index d18b045d8d4960..dff08f31fa985f 100644 --- a/cli/util/display.rs +++ b/cli/util/display.rs @@ -1,8 +1,10 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::io::Write; use deno_core::error::AnyError; use deno_core::serde_json; -use std::io::Write; +use deno_runtime::colors; /// A function that converts a float to a string the represents a human /// readable version of that number. @@ -85,6 +87,78 @@ where Ok(()) } +pub struct DisplayTreeNode { + pub text: String, + pub children: Vec, +} + +impl DisplayTreeNode { + pub fn from_text(text: String) -> Self { + Self { + text, + children: Default::default(), + } + } + + pub fn print( + &self, + writer: &mut TWrite, + ) -> std::fmt::Result { + fn print_children( + writer: &mut TWrite, + prefix: &str, + children: &[DisplayTreeNode], + ) -> std::fmt::Result { + const SIBLING_CONNECTOR: char = '├'; + const LAST_SIBLING_CONNECTOR: char = '└'; + const CHILD_DEPS_CONNECTOR: char = '┬'; + const CHILD_NO_DEPS_CONNECTOR: char = '─'; + const VERTICAL_CONNECTOR: char = '│'; + const EMPTY_CONNECTOR: char = ' '; + + let child_len = children.len(); + for (index, child) in children.iter().enumerate() { + let is_last = index + 1 == child_len; + let sibling_connector = if is_last { + LAST_SIBLING_CONNECTOR + } else { + SIBLING_CONNECTOR + }; + let child_connector = if child.children.is_empty() { + CHILD_NO_DEPS_CONNECTOR + } else { + CHILD_DEPS_CONNECTOR + }; + writeln!( + writer, + "{} {}", + colors::gray(format!( + "{prefix}{sibling_connector}─{child_connector}" + )), + child.text + )?; + let child_prefix = format!( + "{}{}{}", + prefix, + if is_last { + EMPTY_CONNECTOR + } else { + VERTICAL_CONNECTOR + }, + EMPTY_CONNECTOR + ); + print_children(writer, &child_prefix, &child.children)?; + } + + Ok(()) + } + + writeln!(writer, "{}", self.text)?; + print_children(writer, "", &self.children)?; + Ok(()) + } +} + #[cfg(test)] mod tests { use super::*; diff --git a/cli/util/draw_thread.rs b/cli/util/draw_thread.rs index 164a8fc713e71c..a2d7681425c36a 100644 --- a/cli/util/draw_thread.rs +++ b/cli/util/draw_thread.rs @@ -1,13 +1,14 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::io::IsTerminal; +use std::sync::Arc; +use std::time::Duration; use console_static_text::ConsoleStaticText; use deno_core::parking_lot::Mutex; use deno_core::unsync::spawn_blocking; use deno_runtime::ops::tty::ConsoleSize; use once_cell::sync::Lazy; -use std::io::IsTerminal; -use std::sync::Arc; -use std::time::Duration; use crate::util::console::console_size; diff --git a/cli/util/extract.rs b/cli/util/extract.rs index be68202aa1eecf..825e81bb4bb16c 100644 --- a/cli/util/extract.rs +++ b/cli/util/extract.rs @@ -1,4 +1,8 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::collections::BTreeSet; +use std::fmt::Write as _; +use std::sync::Arc; use deno_ast::swc::ast; use deno_ast::swc::atoms::Atom; @@ -13,14 +17,12 @@ use deno_ast::swc::visit::VisitMut; use deno_ast::swc::visit::VisitWith as _; use deno_ast::MediaType; use deno_ast::SourceRangedForSpanned as _; +use deno_cache_dir::file_fetcher::File; use deno_core::error::AnyError; use deno_core::ModuleSpecifier; use regex::Regex; -use std::collections::BTreeSet; -use std::fmt::Write as _; -use std::sync::Arc; -use crate::file_fetcher::File; +use crate::file_fetcher::TextDecodedFile; use crate::util::path::mapped_specifier_for_tsc; /// Extracts doc tests from a given file, transforms them into pseudo test @@ -52,7 +54,7 @@ fn extract_inner( file: File, wrap_kind: WrapKind, ) -> Result, AnyError> { - let file = file.into_text_decoded()?; + let file = TextDecodedFile::decode(file)?; let exports = match deno_ast::parse_program(deno_ast::ParseParams { specifier: file.specifier.clone(), @@ -230,7 +232,7 @@ fn extract_files_from_regex_blocks( .unwrap_or(file_specifier); Some(File { - specifier: file_specifier, + url: file_specifier, maybe_headers: None, source: file_source.into_bytes().into(), }) @@ -558,7 +560,7 @@ fn generate_pseudo_file( exports: &ExportCollector, wrap_kind: WrapKind, ) -> Result { - let file = file.into_text_decoded()?; + let file = TextDecodedFile::decode(file)?; let parsed = deno_ast::parse_program(deno_ast::ParseParams { specifier: file.specifier.clone(), @@ -594,7 +596,7 @@ fn generate_pseudo_file( log::debug!("{}:\n{}", file.specifier, source); Ok(File { - specifier: file.specifier, + url: file.specifier, maybe_headers: None, source: source.into_bytes().into(), }) @@ -807,11 +809,12 @@ fn wrap_in_deno_test(stmts: Vec, test_name: Atom) -> ast::Stmt { #[cfg(test)] mod tests { - use super::*; - use crate::file_fetcher::TextDecodedFile; use deno_ast::swc::atoms::Atom; use pretty_assertions::assert_eq; + use super::*; + use crate::file_fetcher::TextDecodedFile; + #[test] fn test_extract_doc_tests() { struct Input { @@ -1199,14 +1202,14 @@ Deno.test("file:///main.ts$3-7.ts", async ()=>{ for test in tests { let file = File { - specifier: ModuleSpecifier::parse(test.input.specifier).unwrap(), + url: ModuleSpecifier::parse(test.input.specifier).unwrap(), maybe_headers: None, source: test.input.source.as_bytes().into(), }; let got_decoded = extract_doc_tests(file) .unwrap() .into_iter() - .map(|f| f.into_text_decoded().unwrap()) + .map(|f| TextDecodedFile::decode(f).unwrap()) .collect::>(); let expected = test .expected @@ -1435,14 +1438,14 @@ add('1', '2'); for test in tests { let file = File { - specifier: ModuleSpecifier::parse(test.input.specifier).unwrap(), + url: ModuleSpecifier::parse(test.input.specifier).unwrap(), maybe_headers: None, source: test.input.source.as_bytes().into(), }; let got_decoded = extract_snippet_files(file) .unwrap() .into_iter() - .map(|f| f.into_text_decoded().unwrap()) + .map(|f| TextDecodedFile::decode(f).unwrap()) .collect::>(); let expected = test .expected diff --git a/cli/util/file_watcher.rs b/cli/util/file_watcher.rs index eb3fb8c6029c21..ca769b70fe5349 100644 --- a/cli/util/file_watcher.rs +++ b/cli/util/file_watcher.rs @@ -1,8 +1,12 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::args::Flags; -use crate::colors; -use crate::util::fs::canonicalize_path; +use std::cell::RefCell; +use std::collections::HashSet; +use std::io::IsTerminal; +use std::path::PathBuf; +use std::rc::Rc; +use std::sync::Arc; +use std::time::Duration; use deno_config::glob::PathOrPatternSet; use deno_core::error::AnyError; @@ -18,18 +22,15 @@ use notify::Error as NotifyError; use notify::RecommendedWatcher; use notify::RecursiveMode; use notify::Watcher; -use std::cell::RefCell; -use std::collections::HashSet; -use std::io::IsTerminal; -use std::path::PathBuf; -use std::rc::Rc; -use std::sync::Arc; -use std::time::Duration; use tokio::select; use tokio::sync::mpsc; use tokio::sync::mpsc::UnboundedReceiver; use tokio::time::sleep; +use crate::args::Flags; +use crate::colors; +use crate::util::fs::canonicalize_path; + const CLEAR_SCREEN: &str = "\x1B[H\x1B[2J\x1B[3J"; const DEBOUNCE_INTERVAL: Duration = Duration::from_millis(200); @@ -185,9 +186,11 @@ impl WatcherCommunicator { pub fn show_path_changed(&self, changed_paths: Option>) { if let Some(paths) = changed_paths { - self.print( - format!("Restarting! File change detected: {:?}", paths[0]).to_string(), - ) + if !paths.is_empty() { + self.print(format!("Restarting! File change detected: {:?}", paths[0])) + } else { + self.print("Restarting! File change detected.".to_string()) + } } } } diff --git a/cli/util/fs.rs b/cli/util/fs.rs index d36c02242cec47..61f1786ee98e70 100644 --- a/cli/util/fs.rs +++ b/cli/util/fs.rs @@ -1,9 +1,7 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use std::fs::OpenOptions; use std::io::Error; use std::io::ErrorKind; -use std::io::Write; use std::path::Path; use std::path::PathBuf; use std::sync::Arc; @@ -19,185 +17,15 @@ use deno_core::anyhow::Context; use deno_core::error::AnyError; use deno_core::unsync::spawn_blocking; use deno_core::ModuleSpecifier; -use deno_runtime::deno_fs::FileSystem; +use sys_traits::FsCreateDirAll; +use sys_traits::FsDirEntry; +use sys_traits::FsSymlinkDir; -use crate::util::path::get_atomic_file_path; +use crate::sys::CliSys; use crate::util::progress_bar::ProgressBar; use crate::util::progress_bar::ProgressBarStyle; use crate::util::progress_bar::ProgressMessagePrompt; -/// Writes the file to the file system at a temporary path, then -/// renames it to the destination in a single sys call in order -/// to never leave the file system in a corrupted state. -/// -/// This also handles creating the directory if a NotFound error -/// occurs. -pub fn atomic_write_file_with_retries>( - file_path: &Path, - data: T, - mode: u32, -) -> std::io::Result<()> { - struct RealAtomicWriteFileFs { - mode: u32, - } - - impl AtomicWriteFileFs for RealAtomicWriteFileFs { - fn write_file(&self, path: &Path, bytes: &[u8]) -> std::io::Result<()> { - write_file(path, bytes, self.mode) - } - fn rename_file(&self, from: &Path, to: &Path) -> std::io::Result<()> { - std::fs::rename(from, to) - } - fn remove_file(&self, path: &Path) -> std::io::Result<()> { - std::fs::remove_file(path) - } - fn create_dir_all(&self, dir_path: &Path) -> std::io::Result<()> { - std::fs::create_dir_all(dir_path) - } - fn path_exists(&self, path: &Path) -> bool { - path.exists() - } - } - - atomic_write_file_with_retries_and_fs( - &RealAtomicWriteFileFs { mode }, - file_path, - data.as_ref(), - ) -} - -pub trait AtomicWriteFileFs { - fn write_file(&self, path: &Path, bytes: &[u8]) -> std::io::Result<()>; - fn rename_file(&self, from: &Path, to: &Path) -> std::io::Result<()>; - fn remove_file(&self, path: &Path) -> std::io::Result<()>; - fn create_dir_all(&self, dir_path: &Path) -> std::io::Result<()>; - fn path_exists(&self, path: &Path) -> bool; -} - -pub struct AtomicWriteFileFsAdapter<'a> { - pub fs: &'a dyn FileSystem, - pub write_mode: u32, -} - -impl<'a> AtomicWriteFileFs for AtomicWriteFileFsAdapter<'a> { - fn write_file(&self, path: &Path, bytes: &[u8]) -> std::io::Result<()> { - self - .fs - .write_file_sync( - path, - deno_runtime::deno_fs::OpenOptions::write( - true, - false, - false, - Some(self.write_mode), - ), - None, - bytes, - ) - .map_err(|e| e.into_io_error()) - } - - fn rename_file(&self, from: &Path, to: &Path) -> std::io::Result<()> { - self.fs.rename_sync(from, to).map_err(|e| e.into_io_error()) - } - - fn remove_file(&self, path: &Path) -> std::io::Result<()> { - self - .fs - .remove_sync(path, false) - .map_err(|e| e.into_io_error()) - } - - fn create_dir_all(&self, dir_path: &Path) -> std::io::Result<()> { - self - .fs - .mkdir_sync(dir_path, /* recursive */ true, None) - .map_err(|e| e.into_io_error()) - } - - fn path_exists(&self, path: &Path) -> bool { - self.fs.exists_sync(path) - } -} - -pub fn atomic_write_file_with_retries_and_fs>( - fs: &impl AtomicWriteFileFs, - file_path: &Path, - data: T, -) -> std::io::Result<()> { - let mut count = 0; - loop { - match atomic_write_file(fs, file_path, data.as_ref()) { - Ok(()) => return Ok(()), - Err(err) => { - if count >= 5 { - // too many retries, return the error - return Err(err); - } - count += 1; - let sleep_ms = std::cmp::min(50, 10 * count); - std::thread::sleep(std::time::Duration::from_millis(sleep_ms)); - } - } - } -} - -/// Writes the file to the file system at a temporary path, then -/// renames it to the destination in a single sys call in order -/// to never leave the file system in a corrupted state. -/// -/// This also handles creating the directory if a NotFound error -/// occurs. -fn atomic_write_file( - fs: &impl AtomicWriteFileFs, - file_path: &Path, - data: &[u8], -) -> std::io::Result<()> { - fn atomic_write_file_raw( - fs: &impl AtomicWriteFileFs, - temp_file_path: &Path, - file_path: &Path, - data: &[u8], - ) -> std::io::Result<()> { - fs.write_file(temp_file_path, data)?; - fs.rename_file(temp_file_path, file_path) - .inspect_err(|_err| { - // clean up the created temp file on error - let _ = fs.remove_file(temp_file_path); - }) - } - - let temp_file_path = get_atomic_file_path(file_path); - - if let Err(write_err) = - atomic_write_file_raw(fs, &temp_file_path, file_path, data) - { - if write_err.kind() == ErrorKind::NotFound { - let parent_dir_path = file_path.parent().unwrap(); - match fs.create_dir_all(parent_dir_path) { - Ok(()) => { - return atomic_write_file_raw(fs, &temp_file_path, file_path, data) - .map_err(|err| add_file_context_to_err(file_path, err)); - } - Err(create_err) => { - if !fs.path_exists(parent_dir_path) { - return Err(Error::new( - create_err.kind(), - format!( - "{:#} (for '{}')\nCheck the permission of the directory.", - create_err, - parent_dir_path.display() - ), - )); - } - } - } - } - return Err(add_file_context_to_err(file_path, write_err)); - } - Ok(()) -} - /// Creates a std::fs::File handling if the parent does not exist. pub fn create_file(file_path: &Path) -> std::io::Result { match std::fs::File::create(file_path) { @@ -236,45 +64,6 @@ fn add_file_context_to_err(file_path: &Path, err: Error) -> Error { ) } -pub fn write_file>( - filename: &Path, - data: T, - mode: u32, -) -> std::io::Result<()> { - write_file_2(filename, data, true, mode, true, false) -} - -pub fn write_file_2>( - filename: &Path, - data: T, - update_mode: bool, - mode: u32, - is_create: bool, - is_append: bool, -) -> std::io::Result<()> { - let mut file = OpenOptions::new() - .read(false) - .write(true) - .append(is_append) - .truncate(!is_append) - .create(is_create) - .open(filename)?; - - if update_mode { - #[cfg(unix)] - { - use std::os::unix::fs::PermissionsExt; - let mode = mode & 0o777; - let permissions = PermissionsExt::from_mode(mode); - file.set_permissions(permissions)?; - } - #[cfg(not(unix))] - let _ = mode; - } - - file.write_all(data.as_ref()) -} - /// Similar to `std::fs::canonicalize()` but strips UNC prefixes on Windows. pub fn canonicalize_path(path: &Path) -> Result { Ok(deno_path_util::strip_unc_prefix(path.canonicalize()?)) @@ -289,16 +78,10 @@ pub fn canonicalize_path(path: &Path) -> Result { pub fn canonicalize_path_maybe_not_exists( path: &Path, ) -> Result { - deno_path_util::canonicalize_path_maybe_not_exists(path, &canonicalize_path) -} - -pub fn canonicalize_path_maybe_not_exists_with_fs( - path: &Path, - fs: &dyn FileSystem, -) -> Result { - deno_path_util::canonicalize_path_maybe_not_exists(path, &|path| { - fs.realpath_sync(path).map_err(|err| err.into_io_error()) - }) + deno_path_util::fs::canonicalize_path_maybe_not_exists( + &CliSys::default(), + path, + ) } /// Collects module specifiers that satisfy the given predicate as a file path, by recursively walking `include`. @@ -346,7 +129,7 @@ pub fn collect_specifiers( .ignore_git_folder() .ignore_node_modules() .set_vendor_folder(vendor_folder) - .collect_file_patterns(&deno_config::fs::RealDenoConfigFs, files)?; + .collect_file_patterns(&CliSys::default(), files)?; let mut collected_files_as_urls = collected_files .iter() .map(|f| specifier_from_file_path(f).unwrap()) @@ -368,110 +151,74 @@ pub async fn remove_dir_all_if_exists(path: &Path) -> std::io::Result<()> { } } -mod clone_dir_imp { - - #[cfg(target_vendor = "apple")] - mod apple { - use super::super::copy_dir_recursive; - use deno_core::error::AnyError; - use std::os::unix::ffi::OsStrExt; - use std::path::Path; - fn clonefile(from: &Path, to: &Path) -> std::io::Result<()> { - let from = std::ffi::CString::new(from.as_os_str().as_bytes())?; - let to = std::ffi::CString::new(to.as_os_str().as_bytes())?; - // SAFETY: `from` and `to` are valid C strings. - let ret = unsafe { libc::clonefile(from.as_ptr(), to.as_ptr(), 0) }; - if ret != 0 { - return Err(std::io::Error::last_os_error()); - } - Ok(()) - } - - pub fn clone_dir_recursive(from: &Path, to: &Path) -> Result<(), AnyError> { - if let Some(parent) = to.parent() { - std::fs::create_dir_all(parent)?; - } - // Try to clone the whole directory - if let Err(err) = clonefile(from, to) { - if err.kind() != std::io::ErrorKind::AlreadyExists { - log::warn!( - "Failed to clone dir {:?} to {:?} via clonefile: {}", - from, - to, - err - ); - } - // clonefile won't overwrite existing files, so if the dir exists - // we need to handle it recursively. - copy_dir_recursive(from, to)?; - } - - Ok(()) - } - } - - #[cfg(target_vendor = "apple")] - pub(super) use apple::clone_dir_recursive; - - #[cfg(not(target_vendor = "apple"))] - pub(super) fn clone_dir_recursive( - from: &std::path::Path, - to: &std::path::Path, - ) -> Result<(), deno_core::error::AnyError> { - if let Err(e) = super::hard_link_dir_recursive(from, to) { - log::debug!("Failed to hard link dir {:?} to {:?}: {}", from, to, e); - super::copy_dir_recursive(from, to)?; - } - - Ok(()) - } -} - /// Clones a directory to another directory. The exact method /// is not guaranteed - it may be a hardlink, copy, or other platform-specific /// operation. /// /// Note: Does not handle symlinks. -pub fn clone_dir_recursive(from: &Path, to: &Path) -> Result<(), AnyError> { - clone_dir_imp::clone_dir_recursive(from, to) -} - -/// Copies a directory to another directory. -/// -/// Note: Does not handle symlinks. -pub fn copy_dir_recursive(from: &Path, to: &Path) -> Result<(), AnyError> { - std::fs::create_dir_all(to) - .with_context(|| format!("Creating {}", to.display()))?; - let read_dir = std::fs::read_dir(from) - .with_context(|| format!("Reading {}", from.display()))?; - - for entry in read_dir { - let entry = entry?; - let file_type = entry.file_type()?; - let new_from = from.join(entry.file_name()); - let new_to = to.join(entry.file_name()); - - if file_type.is_dir() { - copy_dir_recursive(&new_from, &new_to).with_context(|| { - format!("Dir {} to {}", new_from.display(), new_to.display()) - })?; - } else if file_type.is_file() { - std::fs::copy(&new_from, &new_to).with_context(|| { - format!("Copying {} to {}", new_from.display(), new_to.display()) - })?; +pub fn clone_dir_recursive< + TSys: sys_traits::FsCopy + + sys_traits::FsCloneFile + + sys_traits::FsCloneFile + + sys_traits::FsCreateDir + + sys_traits::FsHardLink + + sys_traits::FsReadDir + + sys_traits::FsRemoveFile + + sys_traits::ThreadSleep, +>( + sys: &TSys, + from: &Path, + to: &Path, +) -> Result<(), AnyError> { + if cfg!(target_vendor = "apple") { + if let Some(parent) = to.parent() { + sys.fs_create_dir_all(parent)?; + } + // Try to clone the whole directory + if let Err(err) = sys.fs_clone_file(from, to) { + if !matches!( + err.kind(), + std::io::ErrorKind::AlreadyExists | std::io::ErrorKind::Unsupported + ) { + log::warn!( + "Failed to clone dir {:?} to {:?} via clonefile: {}", + from, + to, + err + ); + } + // clonefile won't overwrite existing files, so if the dir exists + // we need to handle it recursively. + copy_dir_recursive(sys, from, to)?; } + } else if let Err(e) = deno_npm_cache::hard_link_dir_recursive(sys, from, to) + { + log::debug!("Failed to hard link dir {:?} to {:?}: {}", from, to, e); + copy_dir_recursive(sys, from, to)?; } Ok(()) } -/// Hardlinks the files in one directory to another directory. +/// Copies a directory to another directory. /// /// Note: Does not handle symlinks. -pub fn hard_link_dir_recursive(from: &Path, to: &Path) -> Result<(), AnyError> { - std::fs::create_dir_all(to) +pub fn copy_dir_recursive< + TSys: sys_traits::FsCopy + + sys_traits::FsCloneFile + + sys_traits::FsCreateDir + + sys_traits::FsHardLink + + sys_traits::FsReadDir, +>( + sys: &TSys, + from: &Path, + to: &Path, +) -> Result<(), AnyError> { + sys + .fs_create_dir_all(to) .with_context(|| format!("Creating {}", to.display()))?; - let read_dir = std::fs::read_dir(from) + let read_dir = sys + .fs_read_dir(from) .with_context(|| format!("Reading {}", from.display()))?; for entry in read_dir { @@ -481,69 +228,24 @@ pub fn hard_link_dir_recursive(from: &Path, to: &Path) -> Result<(), AnyError> { let new_to = to.join(entry.file_name()); if file_type.is_dir() { - hard_link_dir_recursive(&new_from, &new_to).with_context(|| { + copy_dir_recursive(sys, &new_from, &new_to).with_context(|| { format!("Dir {} to {}", new_from.display(), new_to.display()) })?; } else if file_type.is_file() { - // note: chance for race conditions here between attempting to create, - // then removing, then attempting to create. There doesn't seem to be - // a way to hard link with overwriting in Rust, but maybe there is some - // way with platform specific code. The workaround here is to handle - // scenarios where something else might create or remove files. - if let Err(err) = std::fs::hard_link(&new_from, &new_to) { - if err.kind() == ErrorKind::AlreadyExists { - if let Err(err) = std::fs::remove_file(&new_to) { - if err.kind() == ErrorKind::NotFound { - // Assume another process/thread created this hard link to the file we are wanting - // to remove then sleep a little bit to let the other process/thread move ahead - // faster to reduce contention. - std::thread::sleep(Duration::from_millis(10)); - } else { - return Err(err).with_context(|| { - format!( - "Removing file to hard link {} to {}", - new_from.display(), - new_to.display() - ) - }); - } - } - - // Always attempt to recreate the hardlink. In contention scenarios, the other process - // might have been killed or exited after removing the file, but before creating the hardlink - if let Err(err) = std::fs::hard_link(&new_from, &new_to) { - // Assume another process/thread created this hard link to the file we are wanting - // to now create then sleep a little bit to let the other process/thread move ahead - // faster to reduce contention. - if err.kind() == ErrorKind::AlreadyExists { - std::thread::sleep(Duration::from_millis(10)); - } else { - return Err(err).with_context(|| { - format!( - "Hard linking {} to {}", - new_from.display(), - new_to.display() - ) - }); - } - } - } else { - return Err(err).with_context(|| { - format!( - "Hard linking {} to {}", - new_from.display(), - new_to.display() - ) - }); - } - } + sys.fs_copy(&new_from, &new_to).with_context(|| { + format!("Copying {} to {}", new_from.display(), new_to.display()) + })?; } } Ok(()) } -pub fn symlink_dir(oldpath: &Path, newpath: &Path) -> Result<(), Error> { +pub fn symlink_dir( + sys: &TSys, + oldpath: &Path, + newpath: &Path, +) -> Result<(), Error> { let err_mapper = |err: Error, kind: Option| { Error::new( kind.unwrap_or_else(|| err.kind()), @@ -555,26 +257,18 @@ pub fn symlink_dir(oldpath: &Path, newpath: &Path) -> Result<(), Error> { ), ) }; - #[cfg(unix)] - { - use std::os::unix::fs::symlink; - symlink(oldpath, newpath).map_err(|e| err_mapper(e, None))?; - } - #[cfg(not(unix))] - { - use std::os::windows::fs::symlink_dir; - symlink_dir(oldpath, newpath).map_err(|err| { - if let Some(code) = err.raw_os_error() { - if code as u32 == winapi::shared::winerror::ERROR_PRIVILEGE_NOT_HELD - || code as u32 == winapi::shared::winerror::ERROR_INVALID_FUNCTION - { - return err_mapper(err, Some(ErrorKind::PermissionDenied)); - } + + sys.fs_symlink_dir(oldpath, newpath).map_err(|err| { + #[cfg(windows)] + if let Some(code) = err.raw_os_error() { + if code as u32 == winapi::shared::winerror::ERROR_PRIVILEGE_NOT_HELD + || code as u32 == winapi::shared::winerror::ERROR_INVALID_FUNCTION + { + return err_mapper(err, Some(ErrorKind::PermissionDenied)); } - err_mapper(err, None) - })?; - } - Ok(()) + } + err_mapper(err, None) + }) } /// Gets the total size (in bytes) of a directory. @@ -659,7 +353,7 @@ impl LaxSingleProcessFsFlag { // // This uses a blocking task because we use a single threaded // runtime and this is time sensitive so we don't want it to update - // at the whims of of whatever is occurring on the runtime thread. + // at the whims of whatever is occurring on the runtime thread. spawn_blocking({ let token = token.clone(); let last_updated_path = last_updated_path.clone(); @@ -756,7 +450,6 @@ pub fn specifier_from_file_path( #[cfg(test)] mod tests { - use super::*; use deno_core::futures; use deno_core::parking_lot::Mutex; use deno_path_util::normalize_path; @@ -765,6 +458,8 @@ mod tests { use test_util::TempDir; use tokio::sync::Notify; + use super::*; + #[test] fn test_normalize_path() { assert_eq!(normalize_path(Path::new("a/../b")), PathBuf::from("b")); diff --git a/cli/util/logger.rs b/cli/util/logger.rs index f76663df2ce606..2bd4760ebdf924 100644 --- a/cli/util/logger.rs +++ b/cli/util/logger.rs @@ -1,24 +1,36 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::io::Write; +use deno_telemetry::OtelConfig; +use deno_telemetry::OtelConsoleConfig; + use super::draw_thread::DrawThread; -struct CliLogger(env_logger::Logger); +struct CliLogger { + otel_console_config: OtelConsoleConfig, + logger: env_logger::Logger, +} impl CliLogger { - pub fn new(logger: env_logger::Logger) -> Self { - Self(logger) + pub fn new( + logger: env_logger::Logger, + otel_console_config: OtelConsoleConfig, + ) -> Self { + Self { + logger, + otel_console_config, + } } pub fn filter(&self) -> log::LevelFilter { - self.0.filter() + self.logger.filter() } } impl log::Log for CliLogger { fn enabled(&self, metadata: &log::Metadata) -> bool { - self.0.enabled(metadata) + self.logger.enabled(metadata) } fn log(&self, record: &log::Record) { @@ -28,18 +40,30 @@ impl log::Log for CliLogger { // could potentially block other threads that access the draw // thread's state DrawThread::hide(); - self.0.log(record); - deno_runtime::ops::otel::handle_log(record); + + match self.otel_console_config { + OtelConsoleConfig::Ignore => { + self.logger.log(record); + } + OtelConsoleConfig::Capture => { + self.logger.log(record); + deno_telemetry::handle_log(record); + } + OtelConsoleConfig::Replace => { + deno_telemetry::handle_log(record); + } + } + DrawThread::show(); } } fn flush(&self) { - self.0.flush(); + self.logger.flush(); } } -pub fn init(maybe_level: Option) { +pub fn init(maybe_level: Option, otel_config: Option) { let log_level = maybe_level.unwrap_or(log::Level::Info); let logger = env_logger::Builder::from_env( env_logger::Env::new() @@ -93,7 +117,12 @@ pub fn init(maybe_level: Option) { }) .build(); - let cli_logger = CliLogger::new(logger); + let cli_logger = CliLogger::new( + logger, + otel_config + .map(|c| c.console) + .unwrap_or(OtelConsoleConfig::Ignore), + ); let max_level = cli_logger.filter(); let r = log::set_boxed_logger(Box::new(cli_logger)); if r.is_ok() { diff --git a/cli/util/mod.rs b/cli/util/mod.rs index f81a74c449d026..0578ecb42314bd 100644 --- a/cli/util/mod.rs +++ b/cli/util/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Note: Only add code in this folder that has no application specific logic pub mod archive; diff --git a/cli/util/path.rs b/cli/util/path.rs index 58bed664f9ba98..90b2df6a3c103b 100644 --- a/cli/util/path.rs +++ b/cli/util/path.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::borrow::Cow; use std::path::Path; @@ -27,7 +27,16 @@ pub fn is_importable_ext(path: &Path) -> bool { if let Some(ext) = get_extension(path) { matches!( ext.as_str(), - "ts" | "tsx" | "js" | "jsx" | "mjs" | "mts" | "cjs" | "cts" | "json" + "ts" + | "tsx" + | "js" + | "jsx" + | "mjs" + | "mts" + | "cjs" + | "cts" + | "json" + | "wasm" ) } else { false @@ -42,32 +51,6 @@ pub fn get_extension(file_path: &Path) -> Option { .map(|e| e.to_lowercase()); } -pub fn get_atomic_dir_path(file_path: &Path) -> PathBuf { - let rand = gen_rand_path_component(); - let new_file_name = format!( - ".{}_{}", - file_path - .file_name() - .map(|f| f.to_string_lossy()) - .unwrap_or(Cow::Borrowed("")), - rand - ); - file_path.with_file_name(new_file_name) -} - -pub fn get_atomic_file_path(file_path: &Path) -> PathBuf { - let rand = gen_rand_path_component(); - let extension = format!("{rand}.tmp"); - file_path.with_extension(extension) -} - -fn gen_rand_path_component() -> String { - (0..4).fold(String::new(), |mut output, _| { - output.push_str(&format!("{:02x}", rand::random::())); - output - }) -} - /// TypeScript figures out the type of file based on the extension, but we take /// other factors into account like the file headers. The hack here is to map the /// specifier passed to TypeScript to a new specifier with the file extension. @@ -222,6 +205,7 @@ mod test { assert!(is_script_ext(Path::new("foo.cjs"))); assert!(is_script_ext(Path::new("foo.cts"))); assert!(!is_script_ext(Path::new("foo.json"))); + assert!(!is_script_ext(Path::new("foo.wasm"))); assert!(!is_script_ext(Path::new("foo.mjsx"))); } @@ -243,6 +227,7 @@ mod test { assert!(is_importable_ext(Path::new("foo.cjs"))); assert!(is_importable_ext(Path::new("foo.cts"))); assert!(is_importable_ext(Path::new("foo.json"))); + assert!(is_importable_ext(Path::new("foo.wasm"))); assert!(!is_importable_ext(Path::new("foo.mjsx"))); } diff --git a/cli/util/progress_bar/mod.rs b/cli/util/progress_bar/mod.rs index 85be056d847a08..3b5bb20e550872 100644 --- a/cli/util/progress_bar/mod.rs +++ b/cli/util/progress_bar/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::sync::atomic::AtomicU64; use std::sync::atomic::Ordering; @@ -8,15 +8,13 @@ use std::time::Instant; use deno_core::parking_lot::Mutex; use deno_runtime::ops::tty::ConsoleSize; -use crate::colors; - use self::renderer::ProgressBarRenderer; use self::renderer::ProgressData; use self::renderer::ProgressDataDisplayEntry; - use super::draw_thread::DrawThread; use super::draw_thread::DrawThreadGuard; use super::draw_thread::DrawThreadRenderer; +use crate::colors; mod renderer; diff --git a/cli/util/progress_bar/renderer.rs b/cli/util/progress_bar/renderer.rs index 6b08dada12949c..3498c7ae0f6662 100644 --- a/cli/util/progress_bar/renderer.rs +++ b/cli/util/progress_bar/renderer.rs @@ -1,14 +1,14 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. +use std::fmt::Write; use std::sync::atomic::AtomicUsize; use std::sync::atomic::Ordering; use std::time::Duration; use deno_terminal::colors; -use crate::util::display::human_download_size; - use super::ProgressMessagePrompt; +use crate::util::display::human_download_size; #[derive(Clone)] pub struct ProgressDataDisplayEntry { @@ -81,12 +81,14 @@ impl ProgressBarRenderer for BarProgressBarRenderer { let elapsed_text = get_elapsed_text(data.duration); let mut text = String::new(); if !display_entry.message.is_empty() { - text.push_str(&format!( - "{} {}{}\n", + writeln!( + &mut text, + "{} {}{}", colors::green("Download"), display_entry.message, bytes_text, - )); + ) + .unwrap(); } text.push_str(&elapsed_text); let max_width = (data.terminal_width as i32 - 5).clamp(10, 75) as usize; @@ -221,11 +223,13 @@ fn get_elapsed_text(elapsed: Duration) -> String { #[cfg(test)] mod test { - use super::*; - use pretty_assertions::assert_eq; use std::time::Duration; + + use pretty_assertions::assert_eq; use test_util::assert_contains; + use super::*; + #[test] fn should_get_elapsed_text() { assert_eq!(get_elapsed_text(Duration::from_secs(1)), "[00:01]"); diff --git a/cli/util/result.rs b/cli/util/result.rs index 3203d04eb7d298..6a67416f269338 100644 --- a/cli/util/result.rs +++ b/cli/util/result.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::convert::Infallible; diff --git a/cli/util/retry.rs b/cli/util/retry.rs index a8febe60dedf33..ac36a380ed239a 100644 --- a/cli/util/retry.rs +++ b/cli/util/retry.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::future::Future; use std::time::Duration; diff --git a/cli/util/sync/async_flag.rs b/cli/util/sync/async_flag.rs index 2bdff63c040949..a9ca46002d27ec 100644 --- a/cli/util/sync/async_flag.rs +++ b/cli/util/sync/async_flag.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use tokio_util::sync::CancellationToken; diff --git a/cli/util/sync/mod.rs b/cli/util/sync/mod.rs index 3c2ffbd7dd5c87..74ec469533f2b0 100644 --- a/cli/util/sync/mod.rs +++ b/cli/util/sync/mod.rs @@ -1,13 +1,11 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. mod async_flag; mod sync_read_async_write_lock; mod task_queue; -mod value_creator; pub use async_flag::AsyncFlag; pub use deno_core::unsync::sync::AtomicFlag; pub use sync_read_async_write_lock::SyncReadAsyncWriteLock; pub use task_queue::TaskQueue; pub use task_queue::TaskQueuePermit; -pub use value_creator::MultiRuntimeAsyncValueCreator; diff --git a/cli/util/sync/sync_read_async_write_lock.rs b/cli/util/sync/sync_read_async_write_lock.rs index 8bd211aa720c5a..48ad6bb863991c 100644 --- a/cli/util/sync/sync_read_async_write_lock.rs +++ b/cli/util/sync/sync_read_async_write_lock.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_core::parking_lot::RwLock; use deno_core::parking_lot::RwLockReadGuard; diff --git a/cli/util/sync/task_queue.rs b/cli/util/sync/task_queue.rs index 6ef747e1ae1fb1..4c5abfab3b83b7 100644 --- a/cli/util/sync/task_queue.rs +++ b/cli/util/sync/task_queue.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::collections::LinkedList; use std::sync::Arc; @@ -146,9 +146,10 @@ impl<'a> Future for TaskQueuePermitAcquireFuture<'a> { #[cfg(test)] mod test { + use std::sync::Arc; + use deno_core::futures; use deno_core::parking_lot::Mutex; - use std::sync::Arc; use super::*; diff --git a/cli/util/sync/value_creator.rs b/cli/util/sync/value_creator.rs deleted file mode 100644 index 57aabe801a528c..00000000000000 --- a/cli/util/sync/value_creator.rs +++ /dev/null @@ -1,213 +0,0 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. - -use std::sync::Arc; - -use deno_core::futures::future::BoxFuture; -use deno_core::futures::future::LocalBoxFuture; -use deno_core::futures::future::Shared; -use deno_core::futures::FutureExt; -use deno_core::parking_lot::Mutex; -use tokio::task::JoinError; - -type JoinResult = Result>; -type CreateFutureFn = - Box LocalBoxFuture<'static, TResult> + Send + Sync>; - -#[derive(Debug)] -struct State { - retry_index: usize, - future: Option>>>, -} - -/// Attempts to create a shared value asynchronously on one tokio runtime while -/// many runtimes are requesting the value. -/// -/// This is only useful when the value needs to get created once across -/// many runtimes. -/// -/// This handles the case where the tokio runtime creating the value goes down -/// while another one is waiting on the value. -pub struct MultiRuntimeAsyncValueCreator { - create_future: CreateFutureFn, - state: Mutex>, -} - -impl std::fmt::Debug - for MultiRuntimeAsyncValueCreator -{ - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - f.debug_struct("MultiRuntimeAsyncValueCreator").finish() - } -} - -impl MultiRuntimeAsyncValueCreator { - pub fn new(create_future: CreateFutureFn) -> Self { - Self { - state: Mutex::new(State { - retry_index: 0, - future: None, - }), - create_future, - } - } - - pub async fn get(&self) -> TResult { - let (mut future, mut retry_index) = { - let mut state = self.state.lock(); - let future = match &state.future { - Some(future) => future.clone(), - None => { - let future = self.create_shared_future(); - state.future = Some(future.clone()); - future - } - }; - (future, state.retry_index) - }; - - loop { - let result = future.await; - - match result { - Ok(result) => return result, - Err(join_error) => { - if join_error.is_cancelled() { - let mut state = self.state.lock(); - - if state.retry_index == retry_index { - // we were the first one to retry, so create a new future - // that we'll run from the current runtime - state.retry_index += 1; - state.future = Some(self.create_shared_future()); - } - - retry_index = state.retry_index; - future = state.future.as_ref().unwrap().clone(); - - // just in case we're stuck in a loop - if retry_index > 1000 { - panic!("Something went wrong.") // should never happen - } - } else { - panic!("{}", join_error); - } - } - } - } - } - - fn create_shared_future( - &self, - ) -> Shared>> { - let future = (self.create_future)(); - deno_core::unsync::spawn(future) - .map(|result| result.map_err(Arc::new)) - .boxed() - .shared() - } -} - -#[cfg(test)] -mod test { - use deno_core::unsync::spawn; - - use super::*; - - #[tokio::test] - async fn single_runtime() { - let value_creator = MultiRuntimeAsyncValueCreator::new(Box::new(|| { - async { 1 }.boxed_local() - })); - let value = value_creator.get().await; - assert_eq!(value, 1); - } - - #[test] - fn multi_runtimes() { - let value_creator = - Arc::new(MultiRuntimeAsyncValueCreator::new(Box::new(|| { - async { - tokio::task::yield_now().await; - 1 - } - .boxed_local() - }))); - let handles = (0..3) - .map(|_| { - let value_creator = value_creator.clone(); - std::thread::spawn(|| { - create_runtime().block_on(async move { value_creator.get().await }) - }) - }) - .collect::>(); - for handle in handles { - assert_eq!(handle.join().unwrap(), 1); - } - } - - #[test] - fn multi_runtimes_first_never_finishes() { - let is_first_run = Arc::new(Mutex::new(true)); - let (tx, rx) = std::sync::mpsc::channel::<()>(); - let value_creator = Arc::new(MultiRuntimeAsyncValueCreator::new({ - let is_first_run = is_first_run.clone(); - Box::new(move || { - let is_first_run = is_first_run.clone(); - let tx = tx.clone(); - async move { - let is_first_run = { - let mut is_first_run = is_first_run.lock(); - let initial_value = *is_first_run; - *is_first_run = false; - tx.send(()).unwrap(); - initial_value - }; - if is_first_run { - tokio::time::sleep(std::time::Duration::from_millis(30_000)).await; - panic!("TIMED OUT"); // should not happen - } else { - tokio::task::yield_now().await; - } - 1 - } - .boxed_local() - }) - })); - std::thread::spawn({ - let value_creator = value_creator.clone(); - let is_first_run = is_first_run.clone(); - move || { - create_runtime().block_on(async { - let value_creator = value_creator.clone(); - // spawn a task that will never complete - spawn(async move { value_creator.get().await }); - // wait for the task to set is_first_run to false - while *is_first_run.lock() { - tokio::time::sleep(std::time::Duration::from_millis(20)).await; - } - // now exit the runtime while the value_creator is still pending - }) - } - }); - let handle = { - let value_creator = value_creator.clone(); - std::thread::spawn(|| { - create_runtime().block_on(async move { - let value_creator = value_creator.clone(); - rx.recv().unwrap(); - // even though the other runtime shutdown, this get() should - // recover and still get the value - value_creator.get().await - }) - }) - }; - assert_eq!(handle.join().unwrap(), 1); - } - - fn create_runtime() -> tokio::runtime::Runtime { - tokio::runtime::Builder::new_current_thread() - .enable_all() - .build() - .unwrap() - } -} diff --git a/cli/util/text_encoding.rs b/cli/util/text_encoding.rs index 8524e63ebb32c2..b5a288be7b7ec3 100644 --- a/cli/util/text_encoding.rs +++ b/cli/util/text_encoding.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::borrow::Cow; use std::ops::Range; @@ -11,6 +11,15 @@ use deno_core::ModuleSourceCode; static SOURCE_MAP_PREFIX: &[u8] = b"//# sourceMappingURL=data:application/json;base64,"; +#[inline(always)] +pub fn from_utf8_lossy_cow(bytes: Cow<[u8]>) -> Cow { + match bytes { + Cow::Borrowed(bytes) => String::from_utf8_lossy(bytes), + Cow::Owned(bytes) => Cow::Owned(from_utf8_lossy_owned(bytes)), + } +} + +#[inline(always)] pub fn from_utf8_lossy_owned(bytes: Vec) -> String { match String::from_utf8_lossy(&bytes) { Cow::Owned(code) => code, @@ -131,23 +140,23 @@ mod tests { #[test] fn test_source_map_from_code() { let to_string = - |bytes: Vec| -> String { String::from_utf8(bytes).unwrap() }; + |bytes: Vec| -> String { String::from_utf8(bytes.to_vec()).unwrap() }; assert_eq!( source_map_from_code( - b"test\n//# sourceMappingURL=data:application/json;base64,dGVzdGluZ3Rlc3Rpbmc=", + b"test\n//# sourceMappingURL=data:application/json;base64,dGVzdGluZ3Rlc3Rpbmc=" ).map(to_string), Some("testingtesting".to_string()) ); assert_eq!( source_map_from_code( - b"test\n//# sourceMappingURL=data:application/json;base64,dGVzdGluZ3Rlc3Rpbmc=\n \n", + b"test\n//# sourceMappingURL=data:application/json;base64,dGVzdGluZ3Rlc3Rpbmc=\n \n" ).map(to_string), Some("testingtesting".to_string()) ); assert_eq!( source_map_from_code( - b"test\n//# sourceMappingURL=data:application/json;base64,dGVzdGluZ3Rlc3Rpbmc=\n test\n", - ), + b"test\n//# sourceMappingURL=data:application/json;base64,dGVzdGluZ3Rlc3Rpbmc=\n test\n" + ).map(to_string), None ); assert_eq!( @@ -155,7 +164,7 @@ mod tests { b"\"use strict\"; throw new Error(\"Hello world!\"); -//# sourceMappingURL=data:application/json;base64,{", +//# sourceMappingURL=data:application/json;base64,{" ), None ); diff --git a/cli/util/unix.rs b/cli/util/unix.rs index 2c76a54c388bc1..4b6ac1f32046be 100644 --- a/cli/util/unix.rs +++ b/cli/util/unix.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /// Raise soft file descriptor limit to hard file descriptor limit. /// This is the difference between `ulimit -n` and `ulimit -n -H`. diff --git a/cli/util/v8.rs b/cli/util/v8.rs index 6e690e6f30d9a3..403d1955a593c0 100644 --- a/cli/util/v8.rs +++ b/cli/util/v8.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. pub mod convert; diff --git a/cli/util/v8/convert.rs b/cli/util/v8/convert.rs index 28107d90100b70..4d0cb732a892a5 100644 --- a/cli/util/v8/convert.rs +++ b/cli/util/v8/convert.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_core::v8; use deno_core::FromV8; diff --git a/cli/util/windows.rs b/cli/util/windows.rs index 37e78a5d088f47..7f516efbebab9d 100644 --- a/cli/util/windows.rs +++ b/cli/util/windows.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /// Ensures that stdin, stdout, and stderr are open and have valid HANDLEs /// associated with them. There are many places where a `std::fs::File` is @@ -8,6 +8,7 @@ pub fn ensure_stdio_open() { // SAFETY: winapi calls unsafe { use std::mem::size_of; + use winapi::shared::minwindef::DWORD; use winapi::shared::minwindef::FALSE; use winapi::shared::minwindef::TRUE; diff --git a/cli/version.rs b/cli/version.rs index 0cdb32102a8f8a..fb0fe98b29dfb6 100644 --- a/cli/version.rs +++ b/cli/version.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use once_cell::sync::Lazy; diff --git a/cli/worker.rs b/cli/worker.rs index 24397b6bf0831e..6289d00cf80323 100644 --- a/cli/worker.rs +++ b/cli/worker.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::path::Path; use std::path::PathBuf; @@ -23,14 +23,11 @@ use deno_runtime::deno_fs; use deno_runtime::deno_node::NodeExtInitServices; use deno_runtime::deno_node::NodeRequireLoader; use deno_runtime::deno_node::NodeRequireLoaderRc; -use deno_runtime::deno_node::NodeResolver; -use deno_runtime::deno_node::PackageJsonResolver; use deno_runtime::deno_permissions::PermissionsContainer; use deno_runtime::deno_tls::RootCertStoreProvider; use deno_runtime::deno_web::BlobStore; use deno_runtime::fmt_errors::format_js_error; use deno_runtime::inspector_server::InspectorServer; -use deno_runtime::ops::otel::OtelConfig; use deno_runtime::ops::process::NpmProcessStateProviderRc; use deno_runtime::ops::worker_host::CreateWebWorkerCb; use deno_runtime::web_worker::WebWorker; @@ -43,16 +40,21 @@ use deno_runtime::BootstrapOptions; use deno_runtime::WorkerExecutionMode; use deno_runtime::WorkerLogLevel; use deno_semver::npm::NpmPackageReqReference; +use deno_telemetry::OtelConfig; use deno_terminal::colors; -use node_resolver::NodeModuleKind; -use node_resolver::NodeResolutionMode; +use node_resolver::NodeResolutionKind; +use node_resolver::ResolutionMode; use tokio::select; use crate::args::CliLockfile; use crate::args::DenoSubcommand; +use crate::args::NpmCachingStrategy; use crate::args::StorageKeyResolver; use crate::errors; +use crate::node::CliNodeResolver; +use crate::node::CliPackageJsonResolver; use crate::npm::CliNpmResolver; +use crate::sys::CliSys; use crate::util::checksum; use crate::util::file_watcher::WatcherCommunicator; use crate::util::file_watcher::WatcherRestartMode; @@ -83,6 +85,15 @@ pub trait HmrRunner: Send + Sync { async fn run(&mut self) -> Result<(), AnyError>; } +pub trait CliCodeCache: code_cache::CodeCache { + /// Gets if the code cache is still enabled. + fn enabled(&self) -> bool { + true + } + + fn as_code_cache(self: Arc) -> Arc; +} + #[async_trait::async_trait(?Send)] pub trait CoverageCollector: Send + Sync { async fn start_collecting(&mut self) -> Result<(), AnyError>; @@ -127,7 +138,7 @@ pub struct CliMainWorkerOptions { struct SharedWorkerState { blob_store: Arc, broadcast_channel: InMemoryBroadcastChannel, - code_cache: Option>, + code_cache: Option>, compiled_wasm_module_store: CompiledWasmModuleStore, feature_checker: Arc, fs: Arc, @@ -135,28 +146,31 @@ struct SharedWorkerState { maybe_inspector_server: Option>, maybe_lockfile: Option>, module_loader_factory: Box, - node_resolver: Arc, + node_resolver: Arc, npm_resolver: Arc, - pkg_json_resolver: Arc, + pkg_json_resolver: Arc, root_cert_store_provider: Arc, root_permissions: PermissionsContainer, shared_array_buffer_store: SharedArrayBufferStore, storage_key_resolver: StorageKeyResolver, + sys: CliSys, options: CliMainWorkerOptions, subcommand: DenoSubcommand, - otel_config: Option, // `None` means OpenTelemetry is disabled. + otel_config: OtelConfig, + default_npm_caching_strategy: NpmCachingStrategy, } impl SharedWorkerState { pub fn create_node_init_services( &self, node_require_loader: NodeRequireLoaderRc, - ) -> NodeExtInitServices { + ) -> NodeExtInitServices { NodeExtInitServices { node_require_loader, node_resolver: self.node_resolver.clone(), npm_resolver: self.npm_resolver.clone().into_npm_pkg_folder_resolver(), pkg_json_resolver: self.pkg_json_resolver.clone(), + sys: self.sys.clone(), } } @@ -384,6 +398,13 @@ impl CliMainWorker { } } +// TODO(bartlomieju): this should be moved to some other place, added to avoid string +// duplication between worker setups and `deno info` output. +pub fn get_cache_storage_dir() -> PathBuf { + // Note: we currently use temp_dir() to avoid managing storage size. + std::env::temp_dir().join("deno_cache") +} + #[derive(Clone)] pub struct CliMainWorkerFactory { shared: Arc, @@ -393,22 +414,24 @@ impl CliMainWorkerFactory { #[allow(clippy::too_many_arguments)] pub fn new( blob_store: Arc, - code_cache: Option>, + code_cache: Option>, feature_checker: Arc, fs: Arc, maybe_file_watcher_communicator: Option>, maybe_inspector_server: Option>, maybe_lockfile: Option>, module_loader_factory: Box, - node_resolver: Arc, + node_resolver: Arc, npm_resolver: Arc, - pkg_json_resolver: Arc, + pkg_json_resolver: Arc, root_cert_store_provider: Arc, root_permissions: PermissionsContainer, storage_key_resolver: StorageKeyResolver, + sys: CliSys, subcommand: DenoSubcommand, options: CliMainWorkerOptions, - otel_config: Option, + otel_config: OtelConfig, + default_npm_caching_strategy: NpmCachingStrategy, ) -> Self { Self { shared: Arc::new(SharedWorkerState { @@ -429,9 +452,11 @@ impl CliMainWorkerFactory { root_permissions, shared_array_buffer_store: Default::default(), storage_key_resolver, + sys, options, subcommand, otel_config, + default_npm_caching_strategy, }), } } @@ -471,8 +496,19 @@ impl CliMainWorkerFactory { NpmPackageReqReference::from_specifier(&main_module) { if let Some(npm_resolver) = shared.npm_resolver.as_managed() { + let reqs = &[package_ref.req().clone()]; npm_resolver - .add_package_reqs(&[package_ref.req().clone()]) + .add_package_reqs( + reqs, + if matches!( + shared.default_npm_caching_strategy, + NpmCachingStrategy::Lazy + ) { + crate::npm::PackageCaching::Only(reqs.into()) + } else { + crate::npm::PackageCaching::All + }, + ) .await?; } @@ -520,10 +556,7 @@ impl CliMainWorkerFactory { }); let cache_storage_dir = maybe_storage_key.map(|key| { // TODO(@satyarohith): storage quota management - // Note: we currently use temp_dir() to avoid managing storage size. - std::env::temp_dir() - .join("deno_cache") - .join(checksum::gen(&[key.as_bytes()])) + get_cache_storage_dir().join(checksum::gen(&[key.as_bytes()])) }); // TODO(bartlomieju): this is cruft, update FeatureChecker to spit out @@ -554,7 +587,7 @@ impl CliMainWorkerFactory { ), feature_checker, permissions, - v8_code_cache: shared.code_cache.clone(), + v8_code_cache: shared.code_cache.clone().map(|c| c.as_code_cache()), }; let options = WorkerOptions { @@ -584,6 +617,7 @@ impl CliMainWorkerFactory { serve_port: shared.options.serve_port, serve_host: shared.options.serve_host.clone(), otel_config: shared.otel_config.clone(), + close_on_idle: true, }, extensions: custom_extensions, startup_snapshot: crate::js::deno_isolate_init(), @@ -604,6 +638,8 @@ impl CliMainWorkerFactory { origin_storage_dir, stdio, skip_op_registration: shared.options.skip_op_registration, + enable_stack_trace_arg_in_ops: crate::args::has_trace_permissions_enabled( + ), }; let mut worker = MainWorker::bootstrap_from_options( @@ -625,7 +661,10 @@ impl CliMainWorkerFactory { "40_test_common.js", "40_test.js", "40_bench.js", - "40_jupyter.js" + "40_jupyter.js", + // TODO(bartlomieju): probably shouldn't include these files here? + "40_lint_selector.js", + "40_lint.js" ); } @@ -683,8 +722,8 @@ impl CliMainWorkerFactory { package_folder, sub_path, /* referrer */ None, - NodeModuleKind::Esm, - NodeResolutionMode::Execution, + ResolutionMode::Import, + NodeResolutionKind::Execution, )?; if specifier .to_file_path() @@ -720,10 +759,7 @@ fn create_web_worker_callback( .resolve_storage_key(&args.main_module); let cache_storage_dir = maybe_storage_key.map(|key| { // TODO(@satyarohith): storage quota management - // Note: we currently use temp_dir() to avoid managing storage size. - std::env::temp_dir() - .join("deno_cache") - .join(checksum::gen(&[key.as_bytes()])) + get_cache_storage_dir().join(checksum::gen(&[key.as_bytes()])) }); // TODO(bartlomieju): this is cruft, update FeatureChecker to spit out @@ -785,6 +821,7 @@ fn create_web_worker_callback( serve_port: shared.options.serve_port, serve_host: shared.options.serve_host.clone(), otel_config: shared.otel_config.clone(), + close_on_idle: args.close_on_idle, }, extensions: vec![], startup_snapshot: crate::js::deno_isolate_init(), @@ -803,6 +840,8 @@ fn create_web_worker_callback( strace_ops: shared.options.strace_ops.clone(), close_on_idle: args.close_on_idle, maybe_worker_metadata: args.maybe_worker_metadata, + enable_stack_trace_arg_in_ops: crate::args::has_trace_permissions_enabled( + ), }; WebWorker::bootstrap_from_options(services, options) @@ -824,25 +863,27 @@ pub fn create_isolate_create_params() -> Option { #[allow(clippy::print_stderr)] #[cfg(test)] mod tests { - use super::*; use deno_core::resolve_path; use deno_core::FsModuleLoader; use deno_fs::RealFs; use deno_runtime::deno_permissions::Permissions; use deno_runtime::permissions::RuntimePermissionDescriptorParser; + use super::*; + fn create_test_worker() -> MainWorker { let main_module = resolve_path("./hello.js", &std::env::current_dir().unwrap()).unwrap(); let fs = Arc::new(RealFs); - let permission_desc_parser = - Arc::new(RuntimePermissionDescriptorParser::new(fs.clone())); + let permission_desc_parser = Arc::new( + RuntimePermissionDescriptorParser::new(crate::sys::CliSys::default()), + ); let options = WorkerOptions { startup_snapshot: crate::js::deno_isolate_init(), ..Default::default() }; - MainWorker::bootstrap_from_options( + MainWorker::bootstrap_from_options::( main_module, WorkerServiceOptions { module_loader: Rc::new(FsModuleLoader), diff --git a/ext/broadcast_channel/01_broadcast_channel.js b/ext/broadcast_channel/01_broadcast_channel.js index 1a4bb36474b52d..a71ae465cf02f3 100644 --- a/ext/broadcast_channel/01_broadcast_channel.js +++ b/ext/broadcast_channel/01_broadcast_channel.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /// diff --git a/ext/broadcast_channel/Cargo.toml b/ext/broadcast_channel/Cargo.toml index 90ac0383579759..48b4127b0e658d 100644 --- a/ext/broadcast_channel/Cargo.toml +++ b/ext/broadcast_channel/Cargo.toml @@ -1,8 +1,8 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "deno_broadcast_channel" -version = "0.171.0" +version = "0.178.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/broadcast_channel/in_memory_broadcast_channel.rs b/ext/broadcast_channel/in_memory_broadcast_channel.rs index 61dc68e17de88a..33803c74f4209f 100644 --- a/ext/broadcast_channel/in_memory_broadcast_channel.rs +++ b/ext/broadcast_channel/in_memory_broadcast_channel.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::sync::Arc; diff --git a/ext/broadcast_channel/lib.deno_broadcast_channel.d.ts b/ext/broadcast_channel/lib.deno_broadcast_channel.d.ts index 339765ec9cfa81..a43f8609b9b9f5 100644 --- a/ext/broadcast_channel/lib.deno_broadcast_channel.d.ts +++ b/ext/broadcast_channel/lib.deno_broadcast_channel.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-explicit-any no-var diff --git a/ext/broadcast_channel/lib.rs b/ext/broadcast_channel/lib.rs index c1de118a364fad..4929153bfeac9e 100644 --- a/ext/broadcast_channel/lib.rs +++ b/ext/broadcast_channel/lib.rs @@ -1,10 +1,7 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. mod in_memory_broadcast_channel; -pub use in_memory_broadcast_channel::InMemoryBroadcastChannel; -pub use in_memory_broadcast_channel::InMemoryBroadcastChannelResource; - use std::cell::RefCell; use std::path::PathBuf; use std::rc::Rc; @@ -15,6 +12,8 @@ use deno_core::JsBuffer; use deno_core::OpState; use deno_core::Resource; use deno_core::ResourceId; +pub use in_memory_broadcast_channel::InMemoryBroadcastChannel; +pub use in_memory_broadcast_channel::InMemoryBroadcastChannelResource; use tokio::sync::broadcast::error::SendError as BroadcastSendError; use tokio::sync::mpsc::error::SendError as MpscSendError; diff --git a/ext/cache/01_cache.js b/ext/cache/01_cache.js index 269261f401cdb1..55aac3a4d8b1a9 100644 --- a/ext/cache/01_cache.js +++ b/ext/cache/01_cache.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { primordials } from "ext:core/mod.js"; import { op_cache_delete, diff --git a/ext/cache/Cargo.toml b/ext/cache/Cargo.toml index 56fa0a527f3eab..cb4eef87dfd3b8 100644 --- a/ext/cache/Cargo.toml +++ b/ext/cache/Cargo.toml @@ -1,8 +1,8 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "deno_cache" -version = "0.109.0" +version = "0.116.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/cache/lib.deno_cache.d.ts b/ext/cache/lib.deno_cache.d.ts index f9e18184821e45..9995af7f66bfae 100644 --- a/ext/cache/lib.deno_cache.d.ts +++ b/ext/cache/lib.deno_cache.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-var diff --git a/ext/cache/lib.rs b/ext/cache/lib.rs index 524d4cea0574ab..6ee7380cf0d783 100644 --- a/ext/cache/lib.rs +++ b/ext/cache/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::cell::RefCell; use std::path::PathBuf; diff --git a/ext/cache/sqlite.rs b/ext/cache/sqlite.rs index 469e3e51d6f313..8bd73b4799ae04 100644 --- a/ext/cache/sqlite.rs +++ b/ext/cache/sqlite.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::borrow::Cow; use std::path::PathBuf; use std::pin::Pin; diff --git a/ext/canvas/01_image.js b/ext/canvas/01_image.js index 3ea72db6acc1aa..4b39c041b45cc3 100644 --- a/ext/canvas/01_image.js +++ b/ext/canvas/01_image.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { internals, primordials } from "ext:core/mod.js"; import { op_image_decode_png, op_image_process } from "ext:core/ops"; diff --git a/ext/canvas/Cargo.toml b/ext/canvas/Cargo.toml index 4231d7c84d4802..0bc3dcb8fb6e58 100644 --- a/ext/canvas/Cargo.toml +++ b/ext/canvas/Cargo.toml @@ -1,8 +1,8 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "deno_canvas" -version = "0.46.0" +version = "0.53.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/canvas/lib.deno_canvas.d.ts b/ext/canvas/lib.deno_canvas.d.ts index c695ba5cd8a973..84d3cbdd42a449 100644 --- a/ext/canvas/lib.deno_canvas.d.ts +++ b/ext/canvas/lib.deno_canvas.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-var diff --git a/ext/canvas/lib.rs b/ext/canvas/lib.rs index defb288ac9d2dd..533b8c3fb34d7b 100644 --- a/ext/canvas/lib.rs +++ b/ext/canvas/lib.rs @@ -1,4 +1,6 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::path::PathBuf; use deno_core::op2; use deno_core::ToJsBuffer; @@ -9,7 +11,6 @@ use image::Pixel; use image::RgbaImage; use serde::Deserialize; use serde::Serialize; -use std::path::PathBuf; #[derive(Debug, thiserror::Error)] pub enum CanvasError { diff --git a/ext/console/01_console.js b/ext/console/01_console.js index 3803492b90d490..a85faaccf1d9ab 100644 --- a/ext/console/01_console.js +++ b/ext/console/01_console.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /// diff --git a/ext/console/Cargo.toml b/ext/console/Cargo.toml index 80f1cca84d8cb6..b4811265ba8cb0 100644 --- a/ext/console/Cargo.toml +++ b/ext/console/Cargo.toml @@ -1,8 +1,8 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "deno_console" -version = "0.177.0" +version = "0.184.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/console/internal.d.ts b/ext/console/internal.d.ts index 45af616d673b45..e90c9b6f11450c 100644 --- a/ext/console/internal.d.ts +++ b/ext/console/internal.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /// /// @@ -9,4 +9,7 @@ declare module "ext:deno_console/01_console.js" { keys: (keyof TObject)[]; evaluate: boolean; }): Record; + + class Console { + } } diff --git a/ext/console/lib.deno_console.d.ts b/ext/console/lib.deno_console.d.ts index 0c73972d36a032..54bbcab8920c46 100644 --- a/ext/console/lib.deno_console.d.ts +++ b/ext/console/lib.deno_console.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-explicit-any diff --git a/ext/console/lib.rs b/ext/console/lib.rs index 87fc8327daf0ff..48a75329afce04 100644 --- a/ext/console/lib.rs +++ b/ext/console/lib.rs @@ -1,7 +1,8 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. +use std::path::PathBuf; + use deno_core::op2; use deno_core::v8; -use std::path::PathBuf; deno_core::extension!( deno_console, diff --git a/ext/cron/01_cron.ts b/ext/cron/01_cron.ts index b5c556a677675c..db193053d880f7 100644 --- a/ext/cron/01_cron.ts +++ b/ext/cron/01_cron.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { core, internals, primordials } from "ext:core/mod.js"; const { diff --git a/ext/cron/Cargo.toml b/ext/cron/Cargo.toml index 966ccdc958316c..821a2aa884f5b3 100644 --- a/ext/cron/Cargo.toml +++ b/ext/cron/Cargo.toml @@ -1,8 +1,8 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "deno_cron" -version = "0.57.0" +version = "0.64.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/cron/interface.rs b/ext/cron/interface.rs index a19525cc4e2539..f92d6017960c67 100644 --- a/ext/cron/interface.rs +++ b/ext/cron/interface.rs @@ -1,8 +1,9 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::CronError; use async_trait::async_trait; +use crate::CronError; + pub trait CronHandler { type EH: CronHandle + 'static; diff --git a/ext/cron/lib.rs b/ext/cron/lib.rs index feffb5e5112114..2c8d534d54006c 100644 --- a/ext/cron/lib.rs +++ b/ext/cron/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. mod interface; pub mod local; @@ -7,13 +7,14 @@ use std::borrow::Cow; use std::cell::RefCell; use std::rc::Rc; -pub use crate::interface::*; use deno_core::error::get_custom_error_class; use deno_core::op2; use deno_core::OpState; use deno_core::Resource; use deno_core::ResourceId; +pub use crate::interface::*; + pub const UNSTABLE_FEATURE_NAME: &str = "cron"; deno_core::extension!(deno_cron, diff --git a/ext/cron/local.rs b/ext/cron/local.rs index 1110baadb84d0e..d6213a7e36e05f 100644 --- a/ext/cron/local.rs +++ b/ext/cron/local.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::cell::OnceCell; use std::cell::RefCell; diff --git a/ext/crypto/00_crypto.js b/ext/crypto/00_crypto.js index 63b1905145fa0a..5a9f32cb001aeb 100644 --- a/ext/crypto/00_crypto.js +++ b/ext/crypto/00_crypto.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // @ts-check /// diff --git a/ext/crypto/Cargo.toml b/ext/crypto/Cargo.toml index a5794dc68b447b..8f7fea28d7ac12 100644 --- a/ext/crypto/Cargo.toml +++ b/ext/crypto/Cargo.toml @@ -1,8 +1,8 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "deno_crypto" -version = "0.191.0" +version = "0.198.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/crypto/decrypt.rs b/ext/crypto/decrypt.rs index 1140475183e1cd..8a00ffd8cd912f 100644 --- a/ext/crypto/decrypt.rs +++ b/ext/crypto/decrypt.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use aes::cipher::block_padding::Pkcs7; use aes::cipher::BlockDecryptMut; diff --git a/ext/crypto/ed25519.rs b/ext/crypto/ed25519.rs index da34b7d25dbf05..d64b6904dd6cf8 100644 --- a/ext/crypto/ed25519.rs +++ b/ext/crypto/ed25519.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use base64::prelude::BASE64_URL_SAFE_NO_PAD; use base64::Engine; diff --git a/ext/crypto/encrypt.rs b/ext/crypto/encrypt.rs index 66b27657f8f055..f3464b503294fa 100644 --- a/ext/crypto/encrypt.rs +++ b/ext/crypto/encrypt.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use aes::cipher::block_padding::Pkcs7; use aes::cipher::BlockEncryptMut; diff --git a/ext/crypto/export_key.rs b/ext/crypto/export_key.rs index edf0d7239c70bb..c4e41ef2da5265 100644 --- a/ext/crypto/export_key.rs +++ b/ext/crypto/export_key.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use base64::prelude::BASE64_URL_SAFE_NO_PAD; use base64::Engine; diff --git a/ext/crypto/generate_key.rs b/ext/crypto/generate_key.rs index 3c0bd77c22641c..953e2f1df11b7c 100644 --- a/ext/crypto/generate_key.rs +++ b/ext/crypto/generate_key.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_core::op2; use deno_core::unsync::spawn_blocking; diff --git a/ext/crypto/import_key.rs b/ext/crypto/import_key.rs index 3463ca2beb34e9..4011f2536ba023 100644 --- a/ext/crypto/import_key.rs +++ b/ext/crypto/import_key.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use base64::Engine; use deno_core::op2; diff --git a/ext/crypto/key.rs b/ext/crypto/key.rs index 6b3bf26f43a40c..52a035ef0138f7 100644 --- a/ext/crypto/key.rs +++ b/ext/crypto/key.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use ring::agreement::Algorithm as RingAlgorithm; use ring::digest; diff --git a/ext/crypto/lib.deno_crypto.d.ts b/ext/crypto/lib.deno_crypto.d.ts index 827c0224ce11e7..3f4edb9245f8aa 100644 --- a/ext/crypto/lib.deno_crypto.d.ts +++ b/ext/crypto/lib.deno_crypto.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-var diff --git a/ext/crypto/lib.rs b/ext/crypto/lib.rs index 69dcd1413a0641..f468af5b07dac8 100644 --- a/ext/crypto/lib.rs +++ b/ext/crypto/lib.rs @@ -1,22 +1,22 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::num::NonZeroU32; +use std::path::PathBuf; use aes_kw::KekAes128; use aes_kw::KekAes192; use aes_kw::KekAes256; - use base64::prelude::BASE64_URL_SAFE_NO_PAD; use base64::Engine; use deno_core::error::not_supported; use deno_core::op2; -use deno_core::ToJsBuffer; - use deno_core::unsync::spawn_blocking; use deno_core::JsBuffer; use deno_core::OpState; -use serde::Deserialize; - +use deno_core::ToJsBuffer; use p256::elliptic_curve::sec1::FromEncodedPoint; use p256::pkcs8::DecodePrivateKey; +pub use rand; use rand::rngs::OsRng; use rand::rngs::StdRng; use rand::thread_rng; @@ -41,15 +41,12 @@ use rsa::traits::SignatureScheme; use rsa::Pss; use rsa::RsaPrivateKey; use rsa::RsaPublicKey; +use serde::Deserialize; use sha1::Sha1; use sha2::Digest; use sha2::Sha256; use sha2::Sha384; -use sha2::Sha512; -use std::num::NonZeroU32; -use std::path::PathBuf; - -pub use rand; // Re-export rand +use sha2::Sha512; // Re-export rand mod decrypt; mod ed25519; diff --git a/ext/crypto/shared.rs b/ext/crypto/shared.rs index f70d32856ccb40..60ba560c98a408 100644 --- a/ext/crypto/shared.rs +++ b/ext/crypto/shared.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::borrow::Cow; diff --git a/ext/crypto/x25519.rs b/ext/crypto/x25519.rs index d2c4d986b98dec..80537d435f1794 100644 --- a/ext/crypto/x25519.rs +++ b/ext/crypto/x25519.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use curve25519_dalek::montgomery::MontgomeryPoint; use deno_core::op2; diff --git a/ext/crypto/x448.rs b/ext/crypto/x448.rs index 89bf48e28bd1c0..c582aa96613a93 100644 --- a/ext/crypto/x448.rs +++ b/ext/crypto/x448.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_core::op2; use deno_core::ToJsBuffer; diff --git a/ext/fetch/20_headers.js b/ext/fetch/20_headers.js index e56a74c4231221..fb97adb13b4b30 100644 --- a/ext/fetch/20_headers.js +++ b/ext/fetch/20_headers.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // @ts-check /// diff --git a/ext/fetch/21_formdata.js b/ext/fetch/21_formdata.js index 7d466b8e255354..8b91a0fa470b35 100644 --- a/ext/fetch/21_formdata.js +++ b/ext/fetch/21_formdata.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // @ts-check /// diff --git a/ext/fetch/22_body.js b/ext/fetch/22_body.js index c7e977c0b434c6..f180bda18d3460 100644 --- a/ext/fetch/22_body.js +++ b/ext/fetch/22_body.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // @ts-check /// @@ -13,6 +13,7 @@ import { core, primordials } from "ext:core/mod.js"; const { + BadResourcePrototype, isAnyArrayBuffer, isArrayBuffer, isStringObject, @@ -26,6 +27,7 @@ const { JSONParse, ObjectDefineProperties, ObjectPrototypeIsPrototypeOf, + PromisePrototypeCatch, TypedArrayPrototypeGetBuffer, TypedArrayPrototypeGetByteLength, TypedArrayPrototypeGetByteOffset, @@ -160,7 +162,18 @@ class InnerBody { ) ) { readableStreamThrowIfErrored(this.stream); - return readableStreamCollectIntoUint8Array(this.stream); + return PromisePrototypeCatch( + readableStreamCollectIntoUint8Array(this.stream), + (e) => { + if (ObjectPrototypeIsPrototypeOf(BadResourcePrototype, e)) { + // TODO(kt3k): We probably like to pass e as `cause` if BadResource supports it. + throw new e.constructor( + "Cannot read body as underlying resource unavailable", + ); + } + throw e; + }, + ); } else { this.streamOrStatic.consumed = true; return this.streamOrStatic.body; @@ -286,8 +299,13 @@ function mixinBody(prototype, bodySymbol, mimeTypeSymbol) { */ get() { webidl.assertBranded(this, prototype); - if (this[bodySymbol] !== null) { - return this[bodySymbol].consumed(); + try { + if (this[bodySymbol] !== null) { + return this[bodySymbol].consumed(); + } + } catch (_) { + // Request is closed. + return true; } return false; }, diff --git a/ext/fetch/22_http_client.js b/ext/fetch/22_http_client.js index 6a1243ee0b0d1b..b74979c4c6b806 100644 --- a/ext/fetch/22_http_client.js +++ b/ext/fetch/22_http_client.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // @ts-check /// diff --git a/ext/fetch/23_request.js b/ext/fetch/23_request.js index 61cac22d2e2aaa..9aa2f0fe5c7d04 100644 --- a/ext/fetch/23_request.js +++ b/ext/fetch/23_request.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // @ts-check /// diff --git a/ext/fetch/23_response.js b/ext/fetch/23_response.js index 278dcb7dec6300..0a86e043109f12 100644 --- a/ext/fetch/23_response.js +++ b/ext/fetch/23_response.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // @ts-check /// diff --git a/ext/fetch/26_fetch.js b/ext/fetch/26_fetch.js index 8ac364a931c90f..f26e2e3fb975ec 100644 --- a/ext/fetch/26_fetch.js +++ b/ext/fetch/26_fetch.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // @ts-check /// @@ -13,6 +13,7 @@ import { core, primordials } from "ext:core/mod.js"; import { op_fetch, + op_fetch_promise_is_settled, op_fetch_send, op_wasm_streaming_feed, op_wasm_streaming_set_url, @@ -28,7 +29,9 @@ const { PromisePrototypeThen, PromisePrototypeCatch, SafeArrayIterator, + SafePromisePrototypeFinally, String, + StringPrototypeEndsWith, StringPrototypeStartsWith, StringPrototypeToLowerCase, TypeError, @@ -55,6 +58,17 @@ import { toInnerResponse, } from "ext:deno_fetch/23_response.js"; import * as abortSignal from "ext:deno_web/03_abort_signal.js"; +import { + endSpan, + enterSpan, + exitSpan, + Span, + TRACING_ENABLED, +} from "ext:deno_telemetry/telemetry.ts"; +import { + updateSpanFromRequest, + updateSpanFromResponse, +} from "ext:deno_telemetry/util.ts"; const REQUEST_BODY_HEADER_NAMES = [ "content-encoding", @@ -63,6 +77,12 @@ const REQUEST_BODY_HEADER_NAMES = [ "content-type", ]; +const REDIRECT_SENSITIVE_HEADER_NAMES = [ + "authorization", + "proxy-authorization", + "cookie", +]; + /** * @param {number} rid * @returns {Promise<{ status: number, statusText: string, headers: [string, string][], url: string, responseRid: number, error: [string, string]? }>} @@ -250,12 +270,14 @@ function httpRedirectFetch(request, response, terminator) { if (locationHeaders.length === 0) { return response; } + + const currentURL = new URL(request.currentUrl()); const locationURL = new URL( locationHeaders[0][1], response.url() ?? undefined, ); if (locationURL.hash === "") { - locationURL.hash = request.currentUrl().hash; + locationURL.hash = currentURL.hash; } if (locationURL.protocol !== "https:" && locationURL.protocol !== "http:") { return networkError("Can not redirect to a non HTTP(s) url"); @@ -294,6 +316,28 @@ function httpRedirectFetch(request, response, terminator) { } } } + + // Drop confidential headers when redirecting to a less secure protocol + // or to a different domain that is not a superdomain + if ( + locationURL.protocol !== currentURL.protocol && + locationURL.protocol !== "https:" || + locationURL.host !== currentURL.host && + !isSubdomain(locationURL.host, currentURL.host) + ) { + for (let i = 0; i < request.headerList.length; i++) { + if ( + ArrayPrototypeIncludes( + REDIRECT_SENSITIVE_HEADER_NAMES, + byteLowerCase(request.headerList[i][0]), + ) + ) { + ArrayPrototypeSplice(request.headerList, i, 1); + i--; + } + } + } + if (request.body !== null) { const res = extractBody(request.body.source); request.body = res.body; @@ -307,93 +351,138 @@ function httpRedirectFetch(request, response, terminator) { * @param {RequestInit} init */ function fetch(input, init = { __proto__: null }) { - // There is an async dispatch later that causes a stack trace disconnect. - // We reconnect it by assigning the result of that dispatch to `opPromise`, - // awaiting `opPromise` in an inner function also named `fetch()` and - // returning the result from that. - let opPromise = undefined; - // 1. - const result = new Promise((resolve, reject) => { - const prefix = "Failed to execute 'fetch'"; - webidl.requiredArguments(arguments.length, 1, prefix); - // 2. - const requestObject = new Request(input, init); - // 3. - const request = toInnerRequest(requestObject); - // 4. - if (requestObject.signal.aborted) { - reject(abortFetch(request, null, requestObject.signal.reason)); - return; + let span; + try { + if (TRACING_ENABLED) { + span = new Span("fetch", { kind: 2 }); + enterSpan(span); } - // 7. - let responseObject = null; - // 9. - let locallyAborted = false; - // 10. - function onabort() { - locallyAborted = true; - reject( - abortFetch(request, responseObject, requestObject.signal.reason), - ); - } - requestObject.signal[abortSignal.add](onabort); + // There is an async dispatch later that causes a stack trace disconnect. + // We reconnect it by assigning the result of that dispatch to `opPromise`, + // awaiting `opPromise` in an inner function also named `fetch()` and + // returning the result from that. + let opPromise = undefined; + // 1. + const result = new Promise((resolve, reject) => { + const prefix = "Failed to execute 'fetch'"; + webidl.requiredArguments(arguments.length, 1, prefix); + // 2. + const requestObject = new Request(input, init); + + if (span) { + updateSpanFromRequest(span, requestObject); + } - if (!requestObject.headers.has("Accept")) { - ArrayPrototypePush(request.headerList, ["Accept", "*/*"]); - } + // 3. + const request = toInnerRequest(requestObject); + // 4. + if (requestObject.signal.aborted) { + reject(abortFetch(request, null, requestObject.signal.reason)); + return; + } + // 7. + let responseObject = null; + // 9. + let locallyAborted = false; + // 10. + function onabort() { + locallyAborted = true; + reject( + abortFetch(request, responseObject, requestObject.signal.reason), + ); + } + requestObject.signal[abortSignal.add](onabort); - if (!requestObject.headers.has("Accept-Language")) { - ArrayPrototypePush(request.headerList, ["Accept-Language", "*"]); - } + if (!requestObject.headers.has("Accept")) { + ArrayPrototypePush(request.headerList, ["Accept", "*/*"]); + } - // 12. - opPromise = PromisePrototypeCatch( - PromisePrototypeThen( - mainFetch(request, false, requestObject.signal), - (response) => { - // 12.1. - if (locallyAborted) return; - // 12.2. - if (response.aborted) { - reject( - abortFetch( - request, - responseObject, - requestObject.signal.reason, - ), - ); - requestObject.signal[abortSignal.remove](onabort); - return; - } - // 12.3. - if (response.type === "error") { - const err = new TypeError( - "Fetch failed: " + (response.error ?? "unknown error"), - ); - reject(err); + if (!requestObject.headers.has("Accept-Language")) { + ArrayPrototypePush(request.headerList, ["Accept-Language", "*"]); + } + + // 12. + opPromise = PromisePrototypeCatch( + PromisePrototypeThen( + mainFetch(request, false, requestObject.signal), + (response) => { + // 12.1. + if (locallyAborted) return; + // 12.2. + if (response.aborted) { + reject( + abortFetch( + request, + responseObject, + requestObject.signal.reason, + ), + ); + requestObject.signal[abortSignal.remove](onabort); + return; + } + // 12.3. + if (response.type === "error") { + const err = new TypeError( + "Fetch failed: " + (response.error ?? "unknown error"), + ); + reject(err); + requestObject.signal[abortSignal.remove](onabort); + return; + } + responseObject = fromInnerResponse(response, "immutable"); + + if (span) { + updateSpanFromResponse(span, responseObject); + } + + resolve(responseObject); requestObject.signal[abortSignal.remove](onabort); - return; - } - responseObject = fromInnerResponse(response, "immutable"); - resolve(responseObject); + }, + ), + (err) => { + reject(err); requestObject.signal[abortSignal.remove](onabort); }, - ), - (err) => { - reject(err); - requestObject.signal[abortSignal.remove](onabort); - }, - ); - }); - if (opPromise) { - PromisePrototypeCatch(result, () => {}); - return (async function fetch() { - await opPromise; - return result; - })(); + ); + }); + + if (opPromise) { + PromisePrototypeCatch(result, () => {}); + return (async function fetch() { + try { + await opPromise; + return result; + } finally { + if (span) { + endSpan(span); + } + } + })(); + } + // We need to end the span when the promise settles. + // WPT has a test that aborted fetch is settled in the same tick. + // This means we cannot wrap the promise if it is already settled. + // But this is OK, because we can just immediately end the span + // in that case. + if (span) { + // XXX: This should always be true, otherwise `opPromise` would be present. + if (op_fetch_promise_is_settled(result)) { + // It's already settled. + endSpan(span); + } else { + // Not settled yet, we can return a new wrapper promise. + return SafePromisePrototypeFinally(result, () => { + endSpan(span); + }); + } + } + return result; + } finally { + if (span) { + exitSpan(span); + } } - return result; } function abortFetch(request, responseObject, error) { @@ -410,6 +499,19 @@ function abortFetch(request, responseObject, error) { return error; } +/** + * Checks if the given string is a subdomain of the given domain. + * + * @param {String} subdomain + * @param {String} domain + * @returns {Boolean} + */ +function isSubdomain(subdomain, domain) { + const dot = subdomain.length - domain.length - 1; + return dot > 0 && subdomain[dot] === "." && + StringPrototypeEndsWith(subdomain, domain); +} + /** * Handle the Response argument to the WebAssembly streaming APIs, after * resolving if it was passed as a promise. This function should be registered diff --git a/ext/fetch/27_eventsource.js b/ext/fetch/27_eventsource.js index aadbb5fe717bae..99ea4073a5b0a5 100644 --- a/ext/fetch/27_eventsource.js +++ b/ext/fetch/27_eventsource.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /// diff --git a/ext/fetch/Cargo.toml b/ext/fetch/Cargo.toml index 00c85f2aa163a0..ec82281bf4b868 100644 --- a/ext/fetch/Cargo.toml +++ b/ext/fetch/Cargo.toml @@ -1,8 +1,8 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "deno_fetch" -version = "0.201.0" +version = "0.208.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -18,10 +18,12 @@ base64.workspace = true bytes.workspace = true data-url.workspace = true deno_core.workspace = true +deno_path_util.workspace = true deno_permissions.workspace = true deno_tls.workspace = true dyn-clone = "1" error_reporter = "1" +h2.workspace = true hickory-resolver.workspace = true http.workspace = true http-body-util.workspace = true diff --git a/ext/fetch/dns.rs b/ext/fetch/dns.rs index 9e21a4c3422927..e2330214009094 100644 --- a/ext/fetch/dns.rs +++ b/ext/fetch/dns.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::future::Future; use std::io; use std::net::SocketAddr; @@ -7,10 +7,7 @@ use std::task::Poll; use std::task::{self}; use std::vec; -use hickory_resolver::error::ResolveError; -use hickory_resolver::name_server::GenericConnector; -use hickory_resolver::name_server::TokioRuntimeProvider; -use hickory_resolver::AsyncResolver; +use hickory_resolver::name_server::TokioConnectionProvider; use hyper_util::client::legacy::connect::dns::GaiResolver; use hyper_util::client::legacy::connect::dns::Name; use tokio::task::JoinHandle; @@ -21,7 +18,7 @@ pub enum Resolver { /// A resolver using blocking `getaddrinfo` calls in a threadpool. Gai(GaiResolver), /// hickory-resolver's userspace resolver. - Hickory(AsyncResolver>), + Hickory(hickory_resolver::Resolver), } impl Default for Resolver { @@ -36,14 +33,14 @@ impl Resolver { } /// Create a [`AsyncResolver`] from system conf. - pub fn hickory() -> Result { + pub fn hickory() -> Result { Ok(Self::Hickory( - hickory_resolver::AsyncResolver::tokio_from_system_conf()?, + hickory_resolver::Resolver::tokio_from_system_conf()?, )) } - pub fn hickory_from_async_resolver( - resolver: AsyncResolver>, + pub fn hickory_from_resolver( + resolver: hickory_resolver::Resolver, ) -> Self { Self::Hickory(resolver) } diff --git a/ext/fetch/fs_fetch_handler.rs b/ext/fetch/fs_fetch_handler.rs index c236dd9c67127d..33293d0a27b9e0 100644 --- a/ext/fetch/fs_fetch_handler.rs +++ b/ext/fetch/fs_fetch_handler.rs @@ -1,8 +1,6 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::CancelHandle; -use crate::CancelableResponseFuture; -use crate::FetchHandler; +use std::rc::Rc; use deno_core::futures::FutureExt; use deno_core::futures::TryFutureExt; @@ -12,9 +10,12 @@ use deno_core::CancelFuture; use deno_core::OpState; use http::StatusCode; use http_body_util::BodyExt; -use std::rc::Rc; use tokio_util::io::ReaderStream; +use crate::CancelHandle; +use crate::CancelableResponseFuture; +use crate::FetchHandler; + /// An implementation which tries to read file URLs from the file system via /// tokio::fs. #[derive(Clone)] diff --git a/ext/fetch/internal.d.ts b/ext/fetch/internal.d.ts index 17565992f4949d..8ab38f9b6228fa 100644 --- a/ext/fetch/internal.d.ts +++ b/ext/fetch/internal.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-explicit-any no-var diff --git a/ext/fetch/lib.deno_fetch.d.ts b/ext/fetch/lib.deno_fetch.d.ts index 8614dec899da6b..2be844f0f8f92d 100644 --- a/ext/fetch/lib.deno_fetch.d.ts +++ b/ext/fetch/lib.deno_fetch.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-explicit-any no-var diff --git a/ext/fetch/lib.rs b/ext/fetch/lib.rs index 5949f9f75f5311..d1f3963743fe7d 100644 --- a/ext/fetch/lib.rs +++ b/ext/fetch/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. pub mod dns; mod fs_fetch_handler; @@ -10,6 +10,7 @@ use std::borrow::Cow; use std::cell::RefCell; use std::cmp::min; use std::convert::From; +use std::future; use std::path::Path; use std::path::PathBuf; use std::pin::Pin; @@ -18,6 +19,10 @@ use std::sync::Arc; use std::task::Context; use std::task::Poll; +use bytes::Bytes; +// Re-export data_url +pub use data_url; +use data_url::DataUrl; use deno_core::futures::stream::Peekable; use deno_core::futures::Future; use deno_core::futures::FutureExt; @@ -27,6 +32,7 @@ use deno_core::futures::TryFutureExt; use deno_core::op2; use deno_core::url; use deno_core::url::Url; +use deno_core::v8; use deno_core::AsyncRefCell; use deno_core::AsyncResult; use deno_core::BufView; @@ -40,6 +46,8 @@ use deno_core::OpState; use deno_core::RcRef; use deno_core::Resource; use deno_core::ResourceId; +use deno_path_util::url_from_file_path; +use deno_path_util::PathToUrlError; use deno_permissions::PermissionCheckError; use deno_tls::rustls::RootCertStore; use deno_tls::Proxy; @@ -47,9 +55,7 @@ use deno_tls::RootCertStoreProvider; use deno_tls::TlsKey; use deno_tls::TlsKeys; use deno_tls::TlsKeysHolder; - -use bytes::Bytes; -use data_url::DataUrl; +pub use fs_fetch_handler::FsFetchHandler; use http::header::HeaderName; use http::header::HeaderValue; use http::header::ACCEPT; @@ -63,28 +69,36 @@ use http::header::USER_AGENT; use http::Extensions; use http::Method; use http::Uri; +use http_body_util::combinators::BoxBody; use http_body_util::BodyExt; use hyper::body::Frame; use hyper_util::client::legacy::connect::HttpConnector; use hyper_util::client::legacy::connect::HttpInfo; +use hyper_util::client::legacy::Builder as HyperClientBuilder; use hyper_util::rt::TokioExecutor; use hyper_util::rt::TokioTimer; +pub use proxy::basic_auth; use serde::Deserialize; use serde::Serialize; +use tower::retry; use tower::ServiceExt; use tower_http::decompression::Decompression; -// Re-export data_url -pub use data_url; -pub use proxy::basic_auth; - -pub use fs_fetch_handler::FsFetchHandler; - #[derive(Clone)] pub struct Options { pub user_agent: String, pub root_cert_store_provider: Option>, pub proxy: Option, + /// A callback to customize HTTP client configuration. + /// + /// The settings applied with this hook may be overridden by the options + /// provided through `Deno.createHttpClient()` API. For instance, if the hook + /// calls [`hyper_util::client::legacy::Builder::pool_max_idle_per_host`] with + /// a value of 99, and a user calls `Deno.createHttpClient({ poolMaxIdlePerHost: 42 })`, + /// the value that will take effect is 42. + /// + /// For more info on what can be configured, see [`hyper_util::client::legacy::Builder`]. + pub client_builder_hook: Option HyperClientBuilder>, #[allow(clippy::type_complexity)] pub request_builder_hook: Option< fn(&mut http::Request) -> Result<(), deno_core::error::AnyError>, @@ -112,6 +126,7 @@ impl Default for Options { user_agent: "".to_string(), root_cert_store_provider: None, proxy: None, + client_builder_hook: None, request_builder_hook: None, unsafely_ignore_certificate_errors: None, client_cert_chain_and_key: TlsKeys::Null, @@ -129,6 +144,7 @@ deno_core::extension!(deno_fetch, op_fetch_send, op_utf8_to_byte_string, op_fetch_custom_client, + op_fetch_promise_is_settled, ], esm = [ "20_headers.js", @@ -158,6 +174,8 @@ pub enum FetchError { NetworkError, #[error("Fetching files only supports the GET method: received {0}")] FsNotGet(Method), + #[error(transparent)] + PathToUrl(#[from] PathToUrlError), #[error("Invalid URL {0}")] InvalidUrl(Url), #[error(transparent)] @@ -188,9 +206,6 @@ pub enum FetchError { RequestBuilderHook(deno_core::error::AnyError), #[error(transparent)] Io(#[from] std::io::Error), - // Only used for node upgrade - #[error(transparent)] - Hyper(#[from] hyper::Error), } pub type CancelableResponseFuture = @@ -271,6 +286,7 @@ pub fn create_client_from_options( pool_idle_timeout: None, http1: true, http2: true, + client_builder_hook: options.client_builder_hook, }, ) } @@ -384,7 +400,7 @@ impl FetchPermissions for deno_permissions::PermissionsContainer { } } -#[op2] +#[op2(stack_trace)] #[serde] #[allow(clippy::too_many_arguments)] pub fn op_fetch( @@ -421,7 +437,7 @@ where let permissions = state.borrow_mut::(); let path = permissions.check_read(&path, "fetch()")?; let url = match path { - Cow::Owned(path) => Url::from_file_path(path).unwrap(), + Cow::Owned(path) => url_from_file_path(&path)?, Cow::Borrowed(_) => url, }; @@ -460,9 +476,7 @@ where // If a body is passed, we use it, and don't return a body for streaming. con_len = Some(data.len() as u64); - http_body_util::Full::new(data.to_vec().into()) - .map_err(|never| match never {}) - .boxed() + ReqBody::full(data.to_vec().into()) } (_, Some(resource)) => { let resource = state @@ -475,7 +489,7 @@ where } _ => {} } - ReqBody::new(ResourceToBodyAdapter::new(resource)) + ReqBody::streaming(ResourceToBodyAdapter::new(resource)) } (None, None) => unreachable!(), } @@ -485,9 +499,7 @@ where if matches!(method, Method::POST | Method::PUT) { con_len = Some(0); } - http_body_util::Empty::new() - .map_err(|never| match never {}) - .boxed() + ReqBody::empty() }; let mut request = http::Request::new(body); @@ -853,7 +865,7 @@ fn default_true() -> bool { true } -#[op2] +#[op2(stack_trace)] #[smi] pub fn op_fetch_custom_client( state: &mut OpState, @@ -908,6 +920,7 @@ where ), http1: args.http1, http2: args.http2, + client_builder_hook: options.client_builder_hook, }, )?; @@ -929,6 +942,7 @@ pub struct CreateHttpClientOptions { pub pool_idle_timeout: Option>, pub http1: bool, pub http2: bool, + pub client_builder_hook: Option HyperClientBuilder>, } impl Default for CreateHttpClientOptions { @@ -944,6 +958,7 @@ impl Default for CreateHttpClientOptions { pool_idle_timeout: None, http1: true, http2: true, + client_builder_hook: None, } } } @@ -999,11 +1014,14 @@ pub fn create_http_client( HttpClientCreateError::InvalidUserAgent(user_agent.to_string()) })?; - let mut builder = - hyper_util::client::legacy::Builder::new(TokioExecutor::new()); + let mut builder = HyperClientBuilder::new(TokioExecutor::new()); builder.timer(TokioTimer::new()); builder.pool_timer(TokioTimer::new()); + if let Some(client_builder_hook) = options.client_builder_hook { + builder = client_builder_hook(builder); + } + let mut proxies = proxy::from_env(); if let Some(proxy) = options.proxy { let mut intercept = proxy::Intercept::all(&proxy.url) @@ -1044,7 +1062,8 @@ pub fn create_http_client( } let pooled_client = builder.build(connector); - let decompress = Decompression::new(pooled_client).gzip(true).br(true); + let retry_client = retry::Retry::new(FetchRetry, pooled_client); + let decompress = Decompression::new(retry_client).gzip(true).br(true); Ok(Client { inner: decompress, @@ -1061,7 +1080,12 @@ pub fn op_utf8_to_byte_string(#[string] input: String) -> ByteString { #[derive(Clone, Debug)] pub struct Client { - inner: Decompression>, + inner: Decompression< + retry::Retry< + FetchRetry, + hyper_util::client::legacy::Client, + >, + >, // Used to check whether to include a proxy-authorization header proxies: Arc, user_agent: HeaderValue, @@ -1152,10 +1176,70 @@ impl Client { } } -pub type ReqBody = - http_body_util::combinators::BoxBody; -pub type ResBody = - http_body_util::combinators::BoxBody; +// This is a custom enum to allow the retry policy to clone the variants that could be retried. +pub enum ReqBody { + Full(http_body_util::Full), + Empty(http_body_util::Empty), + Streaming(BoxBody), +} + +pub type ResBody = BoxBody; + +impl ReqBody { + pub fn full(bytes: Bytes) -> Self { + ReqBody::Full(http_body_util::Full::new(bytes)) + } + + pub fn empty() -> Self { + ReqBody::Empty(http_body_util::Empty::new()) + } + + pub fn streaming(body: B) -> Self + where + B: hyper::body::Body + + Send + + Sync + + 'static, + { + ReqBody::Streaming(BoxBody::new(body)) + } +} + +impl hyper::body::Body for ReqBody { + type Data = Bytes; + type Error = deno_core::error::AnyError; + + fn poll_frame( + mut self: Pin<&mut Self>, + cx: &mut Context<'_>, + ) -> Poll, Self::Error>>> { + match &mut *self { + ReqBody::Full(ref mut b) => { + Pin::new(b).poll_frame(cx).map_err(|never| match never {}) + } + ReqBody::Empty(ref mut b) => { + Pin::new(b).poll_frame(cx).map_err(|never| match never {}) + } + ReqBody::Streaming(ref mut b) => Pin::new(b).poll_frame(cx), + } + } + + fn is_end_stream(&self) -> bool { + match self { + ReqBody::Full(ref b) => b.is_end_stream(), + ReqBody::Empty(ref b) => b.is_end_stream(), + ReqBody::Streaming(ref b) => b.is_end_stream(), + } + } + + fn size_hint(&self) -> hyper::body::SizeHint { + match self { + ReqBody::Full(ref b) => b.size_hint(), + ReqBody::Empty(ref b) => b.size_hint(), + ReqBody::Streaming(ref b) => b.size_hint(), + } + } +} /// Copied from https://github.com/seanmonstar/reqwest/blob/b9d62a0323d96f11672a61a17bf8849baec00275/src/async_impl/request.rs#L572 /// Check the request URL for a "username:password" type authority, and if @@ -1187,3 +1271,107 @@ pub fn extract_authority(url: &mut Url) -> Option<(String, Option)> { None } + +#[op2(fast)] +fn op_fetch_promise_is_settled(promise: v8::Local) -> bool { + promise.state() != v8::PromiseState::Pending +} + +/// Deno.fetch's retry policy. +#[derive(Clone, Debug)] +struct FetchRetry; + +/// Marker extension that a request has been retried once. +#[derive(Clone, Debug)] +struct Retried; + +impl + retry::Policy, http::Response, E> + for FetchRetry +where + E: std::error::Error + 'static, +{ + /// Don't delay retries. + type Future = future::Ready<()>; + + fn retry( + &mut self, + req: &mut http::Request, + result: &mut Result, E>, + ) -> Option { + if req.extensions().get::().is_some() { + // only retry once + return None; + } + + match result { + Ok(..) => { + // never retry a Response + None + } + Err(err) => { + if is_error_retryable(&*err) { + req.extensions_mut().insert(Retried); + Some(future::ready(())) + } else { + None + } + } + } + } + + fn clone_request( + &mut self, + req: &http::Request, + ) -> Option> { + let body = match req.body() { + ReqBody::Full(b) => ReqBody::Full(b.clone()), + ReqBody::Empty(b) => ReqBody::Empty(*b), + ReqBody::Streaming(..) => return None, + }; + + let mut clone = http::Request::new(body); + *clone.method_mut() = req.method().clone(); + *clone.uri_mut() = req.uri().clone(); + *clone.headers_mut() = req.headers().clone(); + *clone.extensions_mut() = req.extensions().clone(); + Some(clone) + } +} + +fn is_error_retryable(err: &(dyn std::error::Error + 'static)) -> bool { + // Note: hyper doesn't promise it will always be this h2 version. Keep up to date. + if let Some(err) = find_source::(err) { + // They sent us a graceful shutdown, try with a new connection! + if err.is_go_away() + && err.is_remote() + && err.reason() == Some(h2::Reason::NO_ERROR) + { + return true; + } + + // REFUSED_STREAM was sent from the server, which is safe to retry. + // https://www.rfc-editor.org/rfc/rfc9113.html#section-8.7-3.2 + if err.is_reset() + && err.is_remote() + && err.reason() == Some(h2::Reason::REFUSED_STREAM) + { + return true; + } + } + + false +} + +fn find_source<'a, E: std::error::Error + 'static>( + err: &'a (dyn std::error::Error + 'static), +) -> Option<&'a E> { + let mut err = Some(err); + while let Some(src) = err { + if let Some(found) = src.downcast_ref::() { + return Some(found); + } + err = src.source(); + } + None +} diff --git a/ext/fetch/proxy.rs b/ext/fetch/proxy.rs index 88fc211ecc80e7..3b371a07b1c390 100644 --- a/ext/fetch/proxy.rs +++ b/ext/fetch/proxy.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. //! Parts of this module should be able to be replaced with other crates //! eventually, once generic versions appear in hyper-util, et al. @@ -13,7 +13,6 @@ use std::task::Poll; use deno_core::futures::TryFutureExt; use deno_tls::rustls::ClientConfig as TlsConfig; - use http::header::HeaderValue; use http::uri::Scheme; use http::Uri; @@ -108,9 +107,10 @@ pub(crate) fn from_env() -> Proxies { } pub fn basic_auth(user: &str, pass: Option<&str>) -> HeaderValue { + use std::io::Write; + use base64::prelude::BASE64_STANDARD; use base64::write::EncoderWriter; - use std::io::Write; let mut buf = b"Basic ".to_vec(); { diff --git a/ext/fetch/tests.rs b/ext/fetch/tests.rs index 5cd1a35a5e0b28..4e023be4fa45c8 100644 --- a/ext/fetch/tests.rs +++ b/ext/fetch/tests.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::net::SocketAddr; use std::sync::atomic::AtomicUsize; @@ -12,10 +12,9 @@ use http_body_util::BodyExt; use tokio::io::AsyncReadExt; use tokio::io::AsyncWriteExt; -use crate::dns; - use super::create_http_client; use super::CreateHttpClientOptions; +use crate::dns; static EXAMPLE_CRT: &[u8] = include_bytes!("../tls/testdata/example1_cert.der"); static EXAMPLE_KEY: &[u8] = @@ -41,7 +40,7 @@ fn test_userspace_resolver() { // use `localhost` to ensure dns step happens. let addr = format!("localhost:{}", src_addr.port()); - let hickory = hickory_resolver::AsyncResolver::tokio( + let hickory = hickory_resolver::Resolver::tokio( Default::default(), Default::default(), ); @@ -52,7 +51,7 @@ fn test_userspace_resolver() { addr.clone(), "https", http::Version::HTTP_2, - dns::Resolver::hickory_from_async_resolver(hickory), + dns::Resolver::hickory_from_resolver(hickory), ) .await; assert_eq!(thread_counter.load(SeqCst), 0, "userspace resolver shouldn't spawn new threads."); @@ -126,17 +125,14 @@ async fn rust_test_client_with_resolver( dns_resolver: resolver, http1: true, http2: true, + client_builder_hook: None, }, ) .unwrap(); let req = http::Request::builder() .uri(format!("https://{}/foo", src_addr)) - .body( - http_body_util::Empty::new() - .map_err(|err| match err {}) - .boxed(), - ) + .body(crate::ReqBody::empty()) .unwrap(); let resp = client.send(req).await.unwrap(); assert_eq!(resp.status(), http::StatusCode::OK); diff --git a/ext/ffi/00_ffi.js b/ext/ffi/00_ffi.js index d3b07dc373c53a..b8c12180c97ffe 100644 --- a/ext/ffi/00_ffi.js +++ b/ext/ffi/00_ffi.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { core, primordials } from "ext:core/mod.js"; const { diff --git a/ext/ffi/Cargo.toml b/ext/ffi/Cargo.toml index 295e8be8460dc5..0af0f4a131859c 100644 --- a/ext/ffi/Cargo.toml +++ b/ext/ffi/Cargo.toml @@ -1,8 +1,8 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "deno_ffi" -version = "0.164.0" +version = "0.171.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/ffi/call.rs b/ext/ffi/call.rs index bbff0ee48f462d..001b925af520fc 100644 --- a/ext/ffi/call.rs +++ b/ext/ffi/call.rs @@ -1,12 +1,10 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::cell::RefCell; +use std::ffi::c_void; +use std::future::Future; +use std::rc::Rc; -use crate::callback::PtrSymbol; -use crate::dlfcn::DynamicLibraryResource; -use crate::ir::*; -use crate::symbol::NativeType; -use crate::symbol::Symbol; -use crate::FfiPermissions; -use crate::ForeignFunction; use deno_core::op2; use deno_core::serde_json::Value; use deno_core::serde_v8::BigInt as V8BigInt; @@ -18,10 +16,14 @@ use deno_core::ResourceId; use libffi::middle::Arg; use num_bigint::BigInt; use serde::Serialize; -use std::cell::RefCell; -use std::ffi::c_void; -use std::future::Future; -use std::rc::Rc; + +use crate::callback::PtrSymbol; +use crate::dlfcn::DynamicLibraryResource; +use crate::ir::*; +use crate::symbol::NativeType; +use crate::symbol::Symbol; +use crate::FfiPermissions; +use crate::ForeignFunction; #[derive(Debug, thiserror::Error)] pub enum CallError { @@ -287,7 +289,7 @@ fn ffi_call( } } -#[op2(async)] +#[op2(async, stack_trace)] #[serde] pub fn op_ffi_call_ptr_nonblocking( scope: &mut v8::HandleScope, @@ -385,7 +387,7 @@ pub fn op_ffi_call_nonblocking( }) } -#[op2(reentrant)] +#[op2(reentrant, stack_trace)] #[serde] pub fn op_ffi_call_ptr( scope: &mut v8::HandleScope, diff --git a/ext/ffi/callback.rs b/ext/ffi/callback.rs index 29583c800cd36d..c4b5e14842fab4 100644 --- a/ext/ffi/callback.rs +++ b/ext/ffi/callback.rs @@ -1,19 +1,5 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::symbol::NativeType; -use crate::FfiPermissions; -use crate::ForeignFunction; -use deno_core::op2; -use deno_core::v8; -use deno_core::v8::TryCatch; -use deno_core::CancelFuture; -use deno_core::CancelHandle; -use deno_core::OpState; -use deno_core::Resource; -use deno_core::ResourceId; -use deno_core::V8CrossThreadTaskSpawner; -use libffi::middle::Cif; -use serde::Deserialize; use std::borrow::Cow; use std::cell::RefCell; use std::ffi::c_void; @@ -27,6 +13,22 @@ use std::sync::atomic; use std::sync::atomic::AtomicU32; use std::task::Poll; +use deno_core::op2; +use deno_core::v8; +use deno_core::v8::TryCatch; +use deno_core::CancelFuture; +use deno_core::CancelHandle; +use deno_core::OpState; +use deno_core::Resource; +use deno_core::ResourceId; +use deno_core::V8CrossThreadTaskSpawner; +use libffi::middle::Cif; +use serde::Deserialize; + +use crate::symbol::NativeType; +use crate::FfiPermissions; +use crate::ForeignFunction; + static THREAD_ID_COUNTER: AtomicU32 = AtomicU32::new(1); thread_local! { @@ -561,7 +563,7 @@ pub struct RegisterCallbackArgs { result: NativeType, } -#[op2] +#[op2(stack_trace)] pub fn op_ffi_unsafe_callback_create( state: &mut OpState, scope: &mut v8::HandleScope<'scope>, diff --git a/ext/ffi/dlfcn.rs b/ext/ffi/dlfcn.rs index 55909468f81044..4eea2402a04707 100644 --- a/ext/ffi/dlfcn.rs +++ b/ext/ffi/dlfcn.rs @@ -1,11 +1,11 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::borrow::Cow; +use std::cell::RefCell; +use std::collections::HashMap; +use std::ffi::c_void; +use std::rc::Rc; -use crate::ir::out_buffer_as_ptr; -use crate::symbol::NativeType; -use crate::symbol::Symbol; -use crate::turbocall; -use crate::turbocall::Turbocall; -use crate::FfiPermissions; use deno_core::op2; use deno_core::v8; use deno_core::GarbageCollected; @@ -14,10 +14,13 @@ use deno_core::Resource; use dlopen2::raw::Library; use serde::Deserialize; use serde_value::ValueDeserializer; -use std::borrow::Cow; -use std::collections::HashMap; -use std::ffi::c_void; -use std::rc::Rc; + +use crate::ir::out_buffer_as_ptr; +use crate::symbol::NativeType; +use crate::symbol::Symbol; +use crate::turbocall; +use crate::turbocall::Turbocall; +use crate::FfiPermissions; #[derive(Debug, thiserror::Error)] pub enum DlfcnError { @@ -123,17 +126,20 @@ pub struct FfiLoadArgs { symbols: HashMap, } -#[op2] +#[op2(stack_trace)] pub fn op_ffi_load<'scope, FP>( scope: &mut v8::HandleScope<'scope>, - state: &mut OpState, + state: Rc>, #[serde] args: FfiLoadArgs, ) -> Result, DlfcnError> where FP: FfiPermissions + 'static, { - let permissions = state.borrow_mut::(); - let path = permissions.check_partial_with_path(&args.path)?; + let path = { + let mut state = state.borrow_mut(); + let permissions = state.borrow_mut::(); + permissions.check_partial_with_path(&args.path)? + }; let lib = Library::open(&path).map_err(|e| { dlopen2::Error::OpeningLibraryError(std::io::Error::new( @@ -215,6 +221,7 @@ where } } + let mut state = state.borrow_mut(); let out = v8::Array::new(scope, 2); let rid = state.resource_table.add(resource); let rid_v8 = v8::Integer::new_from_unsigned(scope, rid); @@ -319,6 +326,7 @@ pub(crate) fn format_error( // https://github.com/denoland/deno/issues/11632 dlopen2::Error::OpeningLibraryError(e) => { use std::os::windows::ffi::OsStrExt; + use winapi::shared::minwindef::DWORD; use winapi::shared::winerror::ERROR_INSUFFICIENT_BUFFER; use winapi::um::errhandlingapi::GetLastError; @@ -387,10 +395,11 @@ pub(crate) fn format_error( #[cfg(test)] mod tests { + use serde_json::json; + use super::ForeignFunction; use super::ForeignSymbol; use crate::symbol::NativeType; - use serde_json::json; #[cfg(target_os = "windows")] #[test] diff --git a/ext/ffi/ir.rs b/ext/ffi/ir.rs index 2e80842166fa7e..7b2f167ce75d91 100644 --- a/ext/ffi/ir.rs +++ b/ext/ffi/ir.rs @@ -1,11 +1,13 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::symbol::NativeType; -use deno_core::v8; -use libffi::middle::Arg; use std::ffi::c_void; use std::ptr; +use deno_core::v8; +use libffi::middle::Arg; + +use crate::symbol::NativeType; + #[derive(Debug, thiserror::Error)] pub enum IRError { #[error("Invalid FFI u8 type, expected boolean")] diff --git a/ext/ffi/lib.rs b/ext/ffi/lib.rs index 73ec7757abc4e9..7fed3c32aa9f33 100644 --- a/ext/ffi/lib.rs +++ b/ext/ffi/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::mem::size_of; use std::os::raw::c_char; @@ -17,23 +17,22 @@ mod turbocall; use call::op_ffi_call_nonblocking; use call::op_ffi_call_ptr; use call::op_ffi_call_ptr_nonblocking; +pub use call::CallError; use callback::op_ffi_unsafe_callback_close; use callback::op_ffi_unsafe_callback_create; use callback::op_ffi_unsafe_callback_ref; -use dlfcn::op_ffi_load; -use dlfcn::ForeignFunction; -use r#static::op_ffi_get_static; -use repr::*; -use symbol::NativeType; -use symbol::Symbol; - -pub use call::CallError; pub use callback::CallbackError; use deno_permissions::PermissionCheckError; +use dlfcn::op_ffi_load; pub use dlfcn::DlfcnError; +use dlfcn::ForeignFunction; pub use ir::IRError; +use r#static::op_ffi_get_static; pub use r#static::StaticError; pub use repr::ReprError; +use repr::*; +use symbol::NativeType; +use symbol::Symbol; #[cfg(not(target_pointer_width = "64"))] compile_error!("platform not supported"); diff --git a/ext/ffi/repr.rs b/ext/ffi/repr.rs index fd8a2c8e707336..05bef40a8969b2 100644 --- a/ext/ffi/repr.rs +++ b/ext/ffi/repr.rs @@ -1,14 +1,16 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::FfiPermissions; -use deno_core::op2; -use deno_core::v8; -use deno_core::OpState; use std::ffi::c_char; use std::ffi::c_void; use std::ffi::CStr; use std::ptr; +use deno_core::op2; +use deno_core::v8; +use deno_core::OpState; + +use crate::FfiPermissions; + #[derive(Debug, thiserror::Error)] pub enum ReprError { #[error("Invalid pointer to offset, pointer is null")] @@ -49,7 +51,7 @@ pub enum ReprError { Permission(#[from] deno_permissions::PermissionCheckError), } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_ffi_ptr_create( state: &mut OpState, #[bigint] ptr_number: usize, @@ -63,7 +65,7 @@ where Ok(ptr_number as *mut c_void) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_ffi_ptr_equals( state: &mut OpState, a: *const c_void, @@ -78,7 +80,7 @@ where Ok(a == b) } -#[op2] +#[op2(stack_trace)] pub fn op_ffi_ptr_of( state: &mut OpState, #[anybuffer] buf: *const u8, @@ -92,7 +94,7 @@ where Ok(buf as *mut c_void) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_ffi_ptr_of_exact( state: &mut OpState, buf: v8::Local, @@ -112,7 +114,7 @@ where Ok(buf.as_ptr() as _) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_ffi_ptr_offset( state: &mut OpState, ptr: *mut c_void, @@ -142,7 +144,7 @@ unsafe extern "C" fn noop_deleter_callback( ) { } -#[op2(fast)] +#[op2(fast, stack_trace)] #[bigint] pub fn op_ffi_ptr_value( state: &mut OpState, @@ -157,7 +159,7 @@ where Ok(ptr as usize) } -#[op2] +#[op2(stack_trace)] pub fn op_ffi_get_buf( scope: &mut v8::HandleScope<'scope>, state: &mut OpState, @@ -189,7 +191,7 @@ where Ok(array_buffer) } -#[op2] +#[op2(stack_trace)] pub fn op_ffi_buf_copy_into( state: &mut OpState, src: *mut c_void, @@ -219,7 +221,7 @@ where } } -#[op2] +#[op2(stack_trace)] pub fn op_ffi_cstr_read( scope: &mut v8::HandleScope<'scope>, state: &mut OpState, @@ -244,7 +246,7 @@ where Ok(value) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_ffi_read_bool( state: &mut OpState, ptr: *mut c_void, @@ -264,7 +266,7 @@ where Ok(unsafe { ptr::read_unaligned::(ptr.offset(offset) as *const bool) }) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_ffi_read_u8( state: &mut OpState, ptr: *mut c_void, @@ -286,7 +288,7 @@ where }) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_ffi_read_i8( state: &mut OpState, ptr: *mut c_void, @@ -308,7 +310,7 @@ where }) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_ffi_read_u16( state: &mut OpState, ptr: *mut c_void, @@ -330,7 +332,7 @@ where }) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_ffi_read_i16( state: &mut OpState, ptr: *mut c_void, @@ -352,7 +354,7 @@ where }) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_ffi_read_u32( state: &mut OpState, ptr: *mut c_void, @@ -372,7 +374,7 @@ where Ok(unsafe { ptr::read_unaligned::(ptr.offset(offset) as *const u32) }) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_ffi_read_i32( state: &mut OpState, ptr: *mut c_void, @@ -392,7 +394,7 @@ where Ok(unsafe { ptr::read_unaligned::(ptr.offset(offset) as *const i32) }) } -#[op2(fast)] +#[op2(fast, stack_trace)] #[bigint] pub fn op_ffi_read_u64( state: &mut OpState, @@ -418,7 +420,7 @@ where Ok(value) } -#[op2(fast)] +#[op2(fast, stack_trace)] #[bigint] pub fn op_ffi_read_i64( state: &mut OpState, @@ -444,7 +446,7 @@ where Ok(value) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_ffi_read_f32( state: &mut OpState, ptr: *mut c_void, @@ -464,7 +466,7 @@ where Ok(unsafe { ptr::read_unaligned::(ptr.offset(offset) as *const f32) }) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_ffi_read_f64( state: &mut OpState, ptr: *mut c_void, @@ -484,7 +486,7 @@ where Ok(unsafe { ptr::read_unaligned::(ptr.offset(offset) as *const f64) }) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_ffi_read_ptr( state: &mut OpState, ptr: *mut c_void, diff --git a/ext/ffi/static.rs b/ext/ffi/static.rs index 61b40593367f31..6ad7fe6d37e020 100644 --- a/ext/ffi/static.rs +++ b/ext/ffi/static.rs @@ -1,12 +1,14 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::ptr; -use crate::dlfcn::DynamicLibraryResource; -use crate::symbol::NativeType; use deno_core::op2; use deno_core::v8; use deno_core::OpState; use deno_core::ResourceId; -use std::ptr; + +use crate::dlfcn::DynamicLibraryResource; +use crate::symbol::NativeType; #[derive(Debug, thiserror::Error)] pub enum StaticError { diff --git a/ext/ffi/symbol.rs b/ext/ffi/symbol.rs index cee1c7d33e94c6..c4a68cf753c688 100644 --- a/ext/ffi/symbol.rs +++ b/ext/ffi/symbol.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_core::error::type_error; use deno_core::error::AnyError; diff --git a/ext/ffi/turbocall.rs b/ext/ffi/turbocall.rs index 38b4062ab7b1e4..499168dcebb75f 100644 --- a/ext/ffi/turbocall.rs +++ b/ext/ffi/turbocall.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::cmp::max; use std::ffi::c_void; diff --git a/ext/fs/30_fs.js b/ext/fs/30_fs.js index 40513e7e0239cb..74e3c87c17f57c 100644 --- a/ext/fs/30_fs.js +++ b/ext/fs/30_fs.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { core, primordials } from "ext:core/mod.js"; const { @@ -77,6 +77,7 @@ const { Error, Function, MathTrunc, + Number, ObjectEntries, ObjectDefineProperty, ObjectPrototypeIsPrototypeOf, @@ -373,12 +374,12 @@ function parseFileInfo(response) { isDirectory: response.isDirectory, isSymlink: response.isSymlink, size: response.size, - mtime: response.mtimeSet === true ? new Date(response.mtime) : null, - atime: response.atimeSet === true ? new Date(response.atime) : null, + mtime: response.mtimeSet === true ? new Date(Number(response.mtime)) : null, + atime: response.atimeSet === true ? new Date(Number(response.atime)) : null, birthtime: response.birthtimeSet === true ? new Date(response.birthtime) : null, - ctime: response.ctimeSet === true ? new Date(response.ctime) : null, + ctime: response.ctimeSet === true ? new Date(Number(response.ctime)) : null, dev: response.dev, mode: response.mode, ino: unix ? response.ino : null, @@ -578,7 +579,7 @@ class FsFile { this.#rid = rid; if (!symbol || symbol !== SymbolFor("Deno.internal.FsFile")) { throw new TypeError( - "`Deno.FsFile` cannot be constructed, use `Deno.open()` or `Deno.openSync()` instead.", + "'Deno.FsFile' cannot be constructed, use 'Deno.open()' or 'Deno.openSync()' instead", ); } } @@ -713,11 +714,15 @@ function checkOpenOptions(options) { (val) => val === true, ).length === 0 ) { - throw new Error("OpenOptions requires at least one option to be true"); + throw new Error( + "'options' requires at least one option to be true", + ); } if (options.truncate && !options.write) { - throw new Error("'truncate' option requires 'write' option"); + throw new Error( + "'truncate' option requires 'write' to be true", + ); } const createOrCreateNewWithoutWriteOrAppend = @@ -726,7 +731,7 @@ function checkOpenOptions(options) { if (createOrCreateNewWithoutWriteOrAppend) { throw new Error( - "'create' or 'createNew' options require 'write' or 'append' option", + "'create' or 'createNew' options require 'write' or 'append' to be true", ); } } diff --git a/ext/fs/Cargo.toml b/ext/fs/Cargo.toml index ace1b89f3a03dc..b7d22b7f938268 100644 --- a/ext/fs/Cargo.toml +++ b/ext/fs/Cargo.toml @@ -1,8 +1,8 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "deno_fs" -version = "0.87.0" +version = "0.94.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/fs/in_memory_fs.rs b/ext/fs/in_memory_fs.rs deleted file mode 100644 index 34b77836d93952..00000000000000 --- a/ext/fs/in_memory_fs.rs +++ /dev/null @@ -1,480 +0,0 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. - -// Allow using Arc for this module. -#![allow(clippy::disallowed_types)] - -use std::collections::hash_map::Entry; -use std::collections::HashMap; -use std::io::Error; -use std::io::ErrorKind; -use std::path::Path; -use std::path::PathBuf; -use std::rc::Rc; -use std::sync::Arc; - -use deno_core::parking_lot::Mutex; -use deno_io::fs::File; -use deno_io::fs::FsError; -use deno_io::fs::FsResult; -use deno_io::fs::FsStat; -use deno_path_util::normalize_path; - -use crate::interface::AccessCheckCb; -use crate::interface::FsDirEntry; -use crate::interface::FsFileType; -use crate::FileSystem; -use crate::OpenOptions; - -#[derive(Debug)] -enum PathEntry { - Dir, - File(Vec), -} - -/// A very basic in-memory file system useful for swapping out in -/// the place of a RealFs for testing purposes. -/// -/// Please develop this out as you need functionality. -#[derive(Debug, Default)] -pub struct InMemoryFs { - entries: Mutex>>, -} - -impl InMemoryFs { - pub fn setup_text_files(&self, files: Vec<(String, String)>) { - for (path, text) in files { - let path = PathBuf::from(path); - self.mkdir_sync(path.parent().unwrap(), true, None).unwrap(); - self - .write_file_sync( - &path, - OpenOptions::write(true, false, false, None), - None, - &text.into_bytes(), - ) - .unwrap(); - } - } - - fn get_entry(&self, path: &Path) -> Option> { - let path = normalize_path(path); - self.entries.lock().get(&path).cloned() - } -} - -#[async_trait::async_trait(?Send)] -impl FileSystem for InMemoryFs { - fn cwd(&self) -> FsResult { - Err(FsError::NotSupported) - } - - fn tmp_dir(&self) -> FsResult { - Err(FsError::NotSupported) - } - - fn chdir(&self, _path: &Path) -> FsResult<()> { - Err(FsError::NotSupported) - } - - fn umask(&self, _mask: Option) -> FsResult { - Err(FsError::NotSupported) - } - - fn open_sync( - &self, - _path: &Path, - _options: OpenOptions, - _access_check: Option, - ) -> FsResult> { - Err(FsError::NotSupported) - } - async fn open_async<'a>( - &'a self, - path: PathBuf, - options: OpenOptions, - access_check: Option>, - ) -> FsResult> { - self.open_sync(&path, options, access_check) - } - - fn mkdir_sync( - &self, - path: &Path, - recursive: bool, - _mode: Option, - ) -> FsResult<()> { - let path = normalize_path(path); - - if let Some(parent) = path.parent() { - let entry = self.entries.lock().get(parent).cloned(); - match entry { - Some(entry) => match &*entry { - PathEntry::File(_) => { - return Err(FsError::Io(Error::new( - ErrorKind::InvalidInput, - "Parent is a file", - ))) - } - PathEntry::Dir => {} - }, - None => { - if recursive { - self.mkdir_sync(parent, true, None)?; - } else { - return Err(FsError::Io(Error::new( - ErrorKind::NotFound, - "Not found", - ))); - } - } - } - } - - let entry = self.entries.lock().get(&path).cloned(); - match entry { - Some(entry) => match &*entry { - PathEntry::File(_) => Err(FsError::Io(Error::new( - ErrorKind::InvalidInput, - "Is a file", - ))), - PathEntry::Dir => Ok(()), - }, - None => { - self.entries.lock().insert(path, Arc::new(PathEntry::Dir)); - Ok(()) - } - } - } - async fn mkdir_async( - &self, - path: PathBuf, - recursive: bool, - mode: Option, - ) -> FsResult<()> { - self.mkdir_sync(&path, recursive, mode) - } - - fn chmod_sync(&self, _path: &Path, _mode: u32) -> FsResult<()> { - Err(FsError::NotSupported) - } - async fn chmod_async(&self, path: PathBuf, mode: u32) -> FsResult<()> { - self.chmod_sync(&path, mode) - } - - fn chown_sync( - &self, - _path: &Path, - _uid: Option, - _gid: Option, - ) -> FsResult<()> { - Err(FsError::NotSupported) - } - async fn chown_async( - &self, - path: PathBuf, - uid: Option, - gid: Option, - ) -> FsResult<()> { - self.chown_sync(&path, uid, gid) - } - - fn lchown_sync( - &self, - _path: &Path, - _uid: Option, - _gid: Option, - ) -> FsResult<()> { - Err(FsError::NotSupported) - } - - async fn lchown_async( - &self, - path: PathBuf, - uid: Option, - gid: Option, - ) -> FsResult<()> { - self.lchown_sync(&path, uid, gid) - } - - fn remove_sync(&self, _path: &Path, _recursive: bool) -> FsResult<()> { - Err(FsError::NotSupported) - } - async fn remove_async(&self, path: PathBuf, recursive: bool) -> FsResult<()> { - self.remove_sync(&path, recursive) - } - - fn copy_file_sync(&self, _from: &Path, _to: &Path) -> FsResult<()> { - Err(FsError::NotSupported) - } - async fn copy_file_async(&self, from: PathBuf, to: PathBuf) -> FsResult<()> { - self.copy_file_sync(&from, &to) - } - - fn cp_sync(&self, _from: &Path, _to: &Path) -> FsResult<()> { - Err(FsError::NotSupported) - } - async fn cp_async(&self, from: PathBuf, to: PathBuf) -> FsResult<()> { - self.cp_sync(&from, &to) - } - - fn stat_sync(&self, path: &Path) -> FsResult { - let entry = self.get_entry(path); - match entry { - Some(entry) => match &*entry { - PathEntry::Dir => Ok(FsStat { - is_file: false, - is_directory: true, - is_symlink: false, - size: 0, - mtime: None, - atime: None, - birthtime: None, - ctime: None, - dev: 0, - ino: 0, - mode: 0, - nlink: 0, - uid: 0, - gid: 0, - rdev: 0, - blksize: 0, - blocks: 0, - is_block_device: false, - is_char_device: false, - is_fifo: false, - is_socket: false, - }), - PathEntry::File(data) => Ok(FsStat { - is_file: true, - is_directory: false, - is_symlink: false, - size: data.len() as u64, - mtime: None, - atime: None, - birthtime: None, - ctime: None, - dev: 0, - ino: 0, - mode: 0, - nlink: 0, - uid: 0, - gid: 0, - rdev: 0, - blksize: 0, - blocks: 0, - is_block_device: false, - is_char_device: false, - is_fifo: false, - is_socket: false, - }), - }, - None => Err(FsError::Io(Error::new(ErrorKind::NotFound, "Not found"))), - } - } - async fn stat_async(&self, path: PathBuf) -> FsResult { - self.stat_sync(&path) - } - - fn lstat_sync(&self, _path: &Path) -> FsResult { - Err(FsError::NotSupported) - } - async fn lstat_async(&self, path: PathBuf) -> FsResult { - self.lstat_sync(&path) - } - - fn realpath_sync(&self, _path: &Path) -> FsResult { - Err(FsError::NotSupported) - } - async fn realpath_async(&self, path: PathBuf) -> FsResult { - self.realpath_sync(&path) - } - - fn read_dir_sync(&self, _path: &Path) -> FsResult> { - Err(FsError::NotSupported) - } - async fn read_dir_async(&self, path: PathBuf) -> FsResult> { - self.read_dir_sync(&path) - } - - fn rename_sync(&self, _oldpath: &Path, _newpath: &Path) -> FsResult<()> { - Err(FsError::NotSupported) - } - async fn rename_async( - &self, - oldpath: PathBuf, - newpath: PathBuf, - ) -> FsResult<()> { - self.rename_sync(&oldpath, &newpath) - } - - fn link_sync(&self, _oldpath: &Path, _newpath: &Path) -> FsResult<()> { - Err(FsError::NotSupported) - } - async fn link_async( - &self, - oldpath: PathBuf, - newpath: PathBuf, - ) -> FsResult<()> { - self.link_sync(&oldpath, &newpath) - } - - fn symlink_sync( - &self, - _oldpath: &Path, - _newpath: &Path, - _file_type: Option, - ) -> FsResult<()> { - Err(FsError::NotSupported) - } - async fn symlink_async( - &self, - oldpath: PathBuf, - newpath: PathBuf, - file_type: Option, - ) -> FsResult<()> { - self.symlink_sync(&oldpath, &newpath, file_type) - } - - fn read_link_sync(&self, _path: &Path) -> FsResult { - Err(FsError::NotSupported) - } - async fn read_link_async(&self, path: PathBuf) -> FsResult { - self.read_link_sync(&path) - } - - fn truncate_sync(&self, _path: &Path, _len: u64) -> FsResult<()> { - Err(FsError::NotSupported) - } - async fn truncate_async(&self, path: PathBuf, len: u64) -> FsResult<()> { - self.truncate_sync(&path, len) - } - - fn utime_sync( - &self, - _path: &Path, - _atime_secs: i64, - _atime_nanos: u32, - _mtime_secs: i64, - _mtime_nanos: u32, - ) -> FsResult<()> { - Err(FsError::NotSupported) - } - async fn utime_async( - &self, - path: PathBuf, - atime_secs: i64, - atime_nanos: u32, - mtime_secs: i64, - mtime_nanos: u32, - ) -> FsResult<()> { - self.utime_sync(&path, atime_secs, atime_nanos, mtime_secs, mtime_nanos) - } - - fn lutime_sync( - &self, - _path: &Path, - _atime_secs: i64, - _atime_nanos: u32, - _mtime_secs: i64, - _mtime_nanos: u32, - ) -> FsResult<()> { - Err(FsError::NotSupported) - } - async fn lutime_async( - &self, - path: PathBuf, - atime_secs: i64, - atime_nanos: u32, - mtime_secs: i64, - mtime_nanos: u32, - ) -> FsResult<()> { - self.lutime_sync(&path, atime_secs, atime_nanos, mtime_secs, mtime_nanos) - } - - fn write_file_sync( - &self, - path: &Path, - options: OpenOptions, - _access_check: Option, - data: &[u8], - ) -> FsResult<()> { - let path = normalize_path(path); - let has_parent_dir = path - .parent() - .and_then(|parent| self.get_entry(parent)) - .map(|e| matches!(*e, PathEntry::Dir)) - .unwrap_or(false); - if !has_parent_dir { - return Err(FsError::Io(Error::new( - ErrorKind::NotFound, - "Parent directory does not exist", - ))); - } - let mut entries = self.entries.lock(); - let entry = entries.entry(path.clone()); - match entry { - Entry::Occupied(mut entry) => { - if let PathEntry::File(existing_data) = &**entry.get() { - if options.create_new { - return Err(FsError::Io(Error::new( - ErrorKind::AlreadyExists, - "File already exists", - ))); - } - if options.append { - let mut new_data = existing_data.clone(); - new_data.extend_from_slice(data); - entry.insert(Arc::new(PathEntry::File(new_data))); - } else { - entry.insert(Arc::new(PathEntry::File(data.to_vec()))); - } - Ok(()) - } else { - Err(FsError::Io(Error::new( - ErrorKind::InvalidInput, - "Not a file", - ))) - } - } - Entry::Vacant(entry) => { - entry.insert(Arc::new(PathEntry::File(data.to_vec()))); - Ok(()) - } - } - } - - async fn write_file_async<'a>( - &'a self, - path: PathBuf, - options: OpenOptions, - access_check: Option>, - data: Vec, - ) -> FsResult<()> { - self.write_file_sync(&path, options, access_check, &data) - } - - fn read_file_sync( - &self, - path: &Path, - _access_check: Option, - ) -> FsResult> { - let entry = self.get_entry(path); - match entry { - Some(entry) => match &*entry { - PathEntry::File(data) => Ok(data.clone()), - PathEntry::Dir => Err(FsError::Io(Error::new( - ErrorKind::InvalidInput, - "Is a directory", - ))), - }, - None => Err(FsError::Io(Error::new(ErrorKind::NotFound, "Not found"))), - } - } - async fn read_file_async<'a>( - &'a self, - path: PathBuf, - access_check: Option>, - ) -> FsResult> { - self.read_file_sync(&path, access_check) - } -} diff --git a/ext/fs/interface.rs b/ext/fs/interface.rs index 73333b0fd19df9..0aae2b998fb111 100644 --- a/ext/fs/interface.rs +++ b/ext/fs/interface.rs @@ -1,16 +1,16 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. +use core::str; use std::borrow::Cow; use std::path::Path; use std::path::PathBuf; use std::rc::Rc; -use serde::Deserialize; -use serde::Serialize; - use deno_io::fs::File; use deno_io::fs::FsResult; use deno_io::fs::FsStat; +use serde::Deserialize; +use serde::Serialize; use crate::sync::MaybeSend; use crate::sync::MaybeSync; @@ -70,7 +70,7 @@ pub enum FsFileType { } /// WARNING: This is part of the public JS Deno API. -#[derive(Serialize)] +#[derive(Debug, Clone, Serialize)] #[serde(rename_all = "camelCase")] pub struct FsDirEntry { pub name: String, @@ -288,7 +288,7 @@ pub trait FileSystem: std::fmt::Debug + MaybeSend + MaybeSync { &self, path: &Path, access_check: Option, - ) -> FsResult> { + ) -> FsResult> { let options = OpenOptions::read(); let file = self.open_sync(path, options, access_check)?; let buf = file.read_all_sync()?; @@ -298,7 +298,7 @@ pub trait FileSystem: std::fmt::Debug + MaybeSend + MaybeSync { &'a self, path: PathBuf, access_check: Option>, - ) -> FsResult> { + ) -> FsResult> { let options = OpenOptions::read(); let file = self.open_async(path, options, access_check).await?; let buf = file.read_all_async().await?; @@ -327,17 +327,25 @@ pub trait FileSystem: std::fmt::Debug + MaybeSend + MaybeSync { &self, path: &Path, access_check: Option, - ) -> FsResult { + ) -> FsResult> { let buf = self.read_file_sync(path, access_check)?; - Ok(string_from_utf8_lossy(buf)) + Ok(string_from_cow_utf8_lossy(buf)) } async fn read_text_file_lossy_async<'a>( &'a self, path: PathBuf, access_check: Option>, - ) -> FsResult { + ) -> FsResult> { let buf = self.read_file_async(path, access_check).await?; - Ok(string_from_utf8_lossy(buf)) + Ok(string_from_cow_utf8_lossy(buf)) + } +} + +#[inline(always)] +fn string_from_cow_utf8_lossy(buf: Cow<'static, [u8]>) -> Cow<'static, str> { + match buf { + Cow::Owned(buf) => Cow::Owned(string_from_utf8_lossy(buf)), + Cow::Borrowed(buf) => String::from_utf8_lossy(buf), } } diff --git a/ext/fs/lib.rs b/ext/fs/lib.rs index aed9a7085fc995..89bd5bc09a4cdc 100644 --- a/ext/fs/lib.rs +++ b/ext/fs/lib.rs @@ -1,12 +1,17 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -mod in_memory_fs; mod interface; mod ops; mod std_fs; pub mod sync; -pub use crate::in_memory_fs::InMemoryFs; +use std::borrow::Cow; +use std::path::Path; +use std::path::PathBuf; + +use deno_io::fs::FsError; +use deno_permissions::PermissionCheckError; + pub use crate::interface::AccessCheckCb; pub use crate::interface::AccessCheckFn; pub use crate::interface::FileSystem; @@ -17,18 +22,11 @@ pub use crate::interface::OpenOptions; pub use crate::ops::FsOpsError; pub use crate::ops::FsOpsErrorKind; pub use crate::ops::OperationError; +use crate::ops::*; pub use crate::std_fs::RealFs; pub use crate::sync::MaybeSend; pub use crate::sync::MaybeSync; -use crate::ops::*; - -use deno_io::fs::FsError; -use deno_permissions::PermissionCheckError; -use std::borrow::Cow; -use std::path::Path; -use std::path::PathBuf; - pub trait FsPermissions { fn check_open<'a>( &mut self, diff --git a/ext/fs/ops.rs b/ext/fs/ops.rs index e3a511f8e7ff80..64be03ea61100c 100644 --- a/ext/fs/ops.rs +++ b/ext/fs/ops.rs @@ -1,5 +1,6 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. +use std::borrow::Cow; use std::cell::RefCell; use std::error::Error; use std::fmt::Formatter; @@ -10,16 +11,11 @@ use std::path::PathBuf; use std::path::StripPrefixError; use std::rc::Rc; -use crate::interface::AccessCheckFn; -use crate::interface::FileSystemRc; -use crate::interface::FsDirEntry; -use crate::interface::FsFileType; -use crate::FsPermissions; -use crate::OpenOptions; use boxed_error::Boxed; use deno_core::op2; use deno_core::CancelFuture; use deno_core::CancelHandle; +use deno_core::FastString; use deno_core::JsBuffer; use deno_core::OpState; use deno_core::ResourceId; @@ -33,6 +29,13 @@ use rand::thread_rng; use rand::Rng; use serde::Serialize; +use crate::interface::AccessCheckFn; +use crate::interface::FileSystemRc; +use crate::interface::FsDirEntry; +use crate::interface::FsFileType; +use crate::FsPermissions; +use crate::OpenOptions; + #[derive(Debug, Boxed)] pub struct FsOpsError(pub Box); @@ -146,7 +149,7 @@ fn map_permission_error( } } -#[op2] +#[op2(stack_trace)] #[string] pub fn op_fs_cwd

(state: &mut OpState) -> Result where @@ -161,7 +164,7 @@ where Ok(path_str) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_fs_chdir

( state: &mut OpState, #[string] directory: &str, @@ -188,7 +191,7 @@ where state.borrow::().umask(mask).context("umask") } -#[op2] +#[op2(stack_trace)] #[smi] pub fn op_fs_open_sync

( state: &mut OpState, @@ -215,7 +218,7 @@ where Ok(rid) } -#[op2(async)] +#[op2(async, stack_trace)] #[smi] pub async fn op_fs_open_async

( state: Rc>, @@ -243,7 +246,7 @@ where Ok(rid) } -#[op2] +#[op2(stack_trace)] pub fn op_fs_mkdir_sync

( state: &mut OpState, #[string] path: String, @@ -266,7 +269,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_fs_mkdir_async

( state: Rc>, #[string] path: String, @@ -291,7 +294,7 @@ where Ok(()) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_fs_chmod_sync

( state: &mut OpState, #[string] path: String, @@ -308,7 +311,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_fs_chmod_async

( state: Rc>, #[string] path: String, @@ -328,7 +331,7 @@ where Ok(()) } -#[op2] +#[op2(stack_trace)] pub fn op_fs_chown_sync

( state: &mut OpState, #[string] path: String, @@ -347,7 +350,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_fs_chown_async

( state: Rc>, #[string] path: String, @@ -368,7 +371,7 @@ where Ok(()) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_fs_remove_sync

( state: &mut OpState, #[string] path: &str, @@ -388,7 +391,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_fs_remove_async

( state: Rc>, #[string] path: String, @@ -419,7 +422,7 @@ where Ok(()) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_fs_copy_file_sync

( state: &mut OpState, #[string] from: &str, @@ -439,7 +442,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_fs_copy_file_async

( state: Rc>, #[string] from: String, @@ -463,7 +466,7 @@ where Ok(()) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_fs_stat_sync

( state: &mut OpState, #[string] path: String, @@ -482,7 +485,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] #[serde] pub async fn op_fs_stat_async

( state: Rc>, @@ -504,7 +507,7 @@ where Ok(SerializableStat::from(stat)) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_fs_lstat_sync

( state: &mut OpState, #[string] path: String, @@ -523,7 +526,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] #[serde] pub async fn op_fs_lstat_async

( state: Rc>, @@ -545,7 +548,7 @@ where Ok(SerializableStat::from(stat)) } -#[op2] +#[op2(stack_trace)] #[string] pub fn op_fs_realpath_sync

( state: &mut OpState, @@ -568,7 +571,7 @@ where Ok(path_string) } -#[op2(async)] +#[op2(async, stack_trace)] #[string] pub async fn op_fs_realpath_async

( state: Rc>, @@ -596,7 +599,7 @@ where Ok(path_string) } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_fs_read_dir_sync

( state: &mut OpState, @@ -615,7 +618,7 @@ where Ok(entries) } -#[op2(async)] +#[op2(async, stack_trace)] #[serde] pub async fn op_fs_read_dir_async

( state: Rc>, @@ -640,7 +643,7 @@ where Ok(entries) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_fs_rename_sync

( state: &mut OpState, #[string] oldpath: String, @@ -661,7 +664,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_fs_rename_async

( state: Rc>, #[string] oldpath: String, @@ -686,7 +689,7 @@ where Ok(()) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_fs_link_sync

( state: &mut OpState, #[string] oldpath: &str, @@ -708,7 +711,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_fs_link_async

( state: Rc>, #[string] oldpath: String, @@ -734,7 +737,7 @@ where Ok(()) } -#[op2] +#[op2(stack_trace)] pub fn op_fs_symlink_sync

( state: &mut OpState, #[string] oldpath: &str, @@ -758,7 +761,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_fs_symlink_async

( state: Rc>, #[string] oldpath: String, @@ -786,7 +789,7 @@ where Ok(()) } -#[op2] +#[op2(stack_trace)] #[string] pub fn op_fs_read_link_sync

( state: &mut OpState, @@ -806,7 +809,7 @@ where Ok(target_string) } -#[op2(async)] +#[op2(async, stack_trace)] #[string] pub async fn op_fs_read_link_async

( state: Rc>, @@ -831,7 +834,7 @@ where Ok(target_string) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_fs_truncate_sync

( state: &mut OpState, #[string] path: &str, @@ -851,7 +854,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_fs_truncate_async

( state: Rc>, #[string] path: String, @@ -875,7 +878,7 @@ where Ok(()) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_fs_utime_sync

( state: &mut OpState, #[string] path: &str, @@ -896,7 +899,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_fs_utime_async

( state: Rc>, #[string] path: String, @@ -927,7 +930,7 @@ where Ok(()) } -#[op2] +#[op2(stack_trace)] #[string] pub fn op_fs_make_temp_dir_sync

( state: &mut OpState, @@ -969,7 +972,7 @@ where .context("tmpdir") } -#[op2(async)] +#[op2(async, stack_trace)] #[string] pub async fn op_fs_make_temp_dir_async

( state: Rc>, @@ -1015,7 +1018,7 @@ where .context("tmpdir") } -#[op2] +#[op2(stack_trace)] #[string] pub fn op_fs_make_temp_file_sync

( state: &mut OpState, @@ -1063,7 +1066,7 @@ where .context("tmpfile") } -#[op2(async)] +#[op2(async, stack_trace)] #[string] pub async fn op_fs_make_temp_file_async

( state: Rc>, @@ -1235,7 +1238,7 @@ fn tmp_name( Ok(path) } -#[op2] +#[op2(stack_trace)] pub fn op_fs_write_file_sync

( state: &mut OpState, #[string] path: String, @@ -1261,7 +1264,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] #[allow(clippy::too_many_arguments)] pub async fn op_fs_write_file_async

( state: Rc>, @@ -1315,7 +1318,7 @@ where Ok(()) } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_fs_read_file_sync

( state: &mut OpState, @@ -1333,10 +1336,11 @@ where .read_file_sync(&path, Some(&mut access_check)) .map_err(|error| map_permission_error("readfile", error, &path))?; - Ok(buf.into()) + // todo(https://github.com/denoland/deno/issues/27107): do not clone here + Ok(buf.into_owned().into_boxed_slice().into()) } -#[op2(async)] +#[op2(async, stack_trace)] #[serde] pub async fn op_fs_read_file_async

( state: Rc>, @@ -1375,15 +1379,16 @@ where .map_err(|error| map_permission_error("readfile", error, &path))? }; - Ok(buf.into()) + // todo(https://github.com/denoland/deno/issues/27107): do not clone here + Ok(buf.into_owned().into_boxed_slice().into()) } -#[op2] -#[string] +#[op2(stack_trace)] +#[to_v8] pub fn op_fs_read_file_text_sync

( state: &mut OpState, #[string] path: String, -) -> Result +) -> Result where P: FsPermissions + 'static, { @@ -1395,17 +1400,19 @@ where let str = fs .read_text_file_lossy_sync(&path, Some(&mut access_check)) .map_err(|error| map_permission_error("readfile", error, &path))?; - - Ok(str) + Ok(match str { + Cow::Borrowed(text) => FastString::from_static(text), + Cow::Owned(value) => value.into(), + }) } -#[op2(async)] -#[string] +#[op2(async, stack_trace)] +#[to_v8] pub async fn op_fs_read_file_text_async

( state: Rc>, #[string] path: String, #[smi] cancel_rid: Option, -) -> Result +) -> Result where P: FsPermissions + 'static, { @@ -1439,7 +1446,10 @@ where .map_err(|error| map_permission_error("readfile", error, &path))? }; - Ok(str) + Ok(match str { + Cow::Borrowed(text) => FastString::from_static(text), + Cow::Owned(value) => value.into(), + }) } fn to_seek_from(offset: i64, whence: i32) -> Result { diff --git a/ext/fs/std_fs.rs b/ext/fs/std_fs.rs index 73439d9bab7897..4845e9c7bca098 100644 --- a/ext/fs/std_fs.rs +++ b/ext/fs/std_fs.rs @@ -1,7 +1,8 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. #![allow(clippy::disallowed_methods)] +use std::borrow::Cow; use std::env::current_dir; use std::fs; use std::io; @@ -25,7 +26,7 @@ use crate::interface::FsFileType; use crate::FileSystem; use crate::OpenOptions; -#[derive(Debug, Clone)] +#[derive(Debug, Default, Clone)] pub struct RealFs; #[async_trait::async_trait(?Send)] @@ -60,7 +61,7 @@ impl FileSystem for RealFs { umask(Mode::from_bits_truncate(mask as mode_t)) } else { // If no mask provided, we query the current. Requires two syscalls. - let prev = umask(Mode::from_bits_truncate(0o777)); + let prev = umask(Mode::from_bits_truncate(0)); let _ = umask(prev); prev }; @@ -371,7 +372,7 @@ impl FileSystem for RealFs { &self, path: &Path, access_check: Option, - ) -> FsResult> { + ) -> FsResult> { let mut file = open_with_access_check( OpenOptions { read: true, @@ -382,13 +383,13 @@ impl FileSystem for RealFs { )?; let mut buf = Vec::new(); file.read_to_end(&mut buf)?; - Ok(buf) + Ok(Cow::Owned(buf)) } async fn read_file_async<'a>( &'a self, path: PathBuf, access_check: Option>, - ) -> FsResult> { + ) -> FsResult> { let mut file = open_with_access_check( OpenOptions { read: true, @@ -400,7 +401,7 @@ impl FileSystem for RealFs { spawn_blocking(move || { let mut buf = Vec::new(); file.read_to_end(&mut buf)?; - Ok::<_, FsError>(buf) + Ok::<_, FsError>(Cow::Owned(buf)) }) .await? .map_err(Into::into) @@ -502,6 +503,7 @@ fn remove(path: &Path, recursive: bool) -> FsResult<()> { #[cfg(not(unix))] { use std::os::windows::prelude::MetadataExt; + use winapi::um::winnt::FILE_ATTRIBUTE_DIRECTORY; if metadata.file_attributes() & FILE_ATTRIBUTE_DIRECTORY != 0 { fs::remove_dir(path) @@ -519,13 +521,14 @@ fn remove(path: &Path, recursive: bool) -> FsResult<()> { fn copy_file(from: &Path, to: &Path) -> FsResult<()> { #[cfg(target_os = "macos")] { - use libc::clonefile; - use libc::stat; - use libc::unlink; use std::ffi::CString; use std::os::unix::fs::OpenOptionsExt; use std::os::unix::fs::PermissionsExt; + use libc::clonefile; + use libc::stat; + use libc::unlink; + let from_str = CString::new(from.as_os_str().as_encoded_bytes()) .map_err(|err| io::Error::new(io::ErrorKind::InvalidInput, err))?; let to_str = CString::new(to.as_os_str().as_encoded_bytes()) @@ -669,11 +672,12 @@ fn cp(from: &Path, to: &Path) -> FsResult<()> { #[cfg(target_os = "macos")] { // Just clonefile() - use libc::clonefile; - use libc::unlink; use std::ffi::CString; use std::os::unix::ffi::OsStrExt; + use libc::clonefile; + use libc::unlink; + let from_str = CString::new(from.as_os_str().as_bytes()) .map_err(|err| io::Error::new(io::ErrorKind::InvalidInput, err))?; let to_str = CString::new(to.as_os_str().as_bytes()) @@ -722,30 +726,34 @@ fn cp(from: &Path, to: &Path) -> FsResult<()> { } } - match (fs::metadata(to), fs::symlink_metadata(to)) { - (Ok(m), _) if m.is_dir() => cp_( - source_meta, - from, - &to.join(from.file_name().ok_or_else(|| { - io::Error::new( - io::ErrorKind::InvalidInput, - "the source path is not a valid file", - ) - })?), - )?, - (_, Ok(m)) if is_identical(&source_meta, &m) => { + if let Ok(m) = fs::metadata(to) { + if m.is_dir() { + return cp_( + source_meta, + from, + &to.join(from.file_name().ok_or_else(|| { + io::Error::new( + io::ErrorKind::InvalidInput, + "the source path is not a valid file", + ) + })?), + ); + } + } + + if let Ok(m) = fs::symlink_metadata(to) { + if is_identical(&source_meta, &m) { return Err( io::Error::new( io::ErrorKind::InvalidInput, "the source and destination are the same file", ) .into(), - ) + ); } - _ => cp_(source_meta, from, to)?, } - Ok(()) + cp_(source_meta, from, to) } #[cfg(not(windows))] @@ -756,11 +764,17 @@ fn stat(path: &Path) -> FsResult { #[cfg(windows)] fn stat(path: &Path) -> FsResult { - let metadata = fs::metadata(path)?; - let mut fsstat = FsStat::from_std(metadata); + use std::os::windows::fs::OpenOptionsExt; + use winapi::um::winbase::FILE_FLAG_BACKUP_SEMANTICS; - let path = path.canonicalize()?; - stat_extra(&mut fsstat, &path, FILE_FLAG_BACKUP_SEMANTICS)?; + + let mut opts = fs::OpenOptions::new(); + opts.access_mode(0); // no read or write + opts.custom_flags(FILE_FLAG_BACKUP_SEMANTICS); + let file = opts.open(path)?; + let metadata = file.metadata()?; + let mut fsstat = FsStat::from_std(metadata); + stat_extra(&file, &mut fsstat)?; Ok(fsstat) } @@ -772,34 +786,24 @@ fn lstat(path: &Path) -> FsResult { #[cfg(windows)] fn lstat(path: &Path) -> FsResult { + use std::os::windows::fs::OpenOptionsExt; + use winapi::um::winbase::FILE_FLAG_BACKUP_SEMANTICS; use winapi::um::winbase::FILE_FLAG_OPEN_REPARSE_POINT; - let metadata = fs::symlink_metadata(path)?; + let mut opts = fs::OpenOptions::new(); + opts.access_mode(0); // no read or write + opts.custom_flags(FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT); + let file = opts.open(path)?; + let metadata = file.metadata()?; let mut fsstat = FsStat::from_std(metadata); - stat_extra( - &mut fsstat, - path, - FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, - )?; + stat_extra(&file, &mut fsstat)?; Ok(fsstat) } #[cfg(windows)] -fn stat_extra( - fsstat: &mut FsStat, - path: &Path, - file_flags: winapi::shared::minwindef::DWORD, -) -> FsResult<()> { - use std::os::windows::prelude::OsStrExt; - - use winapi::um::fileapi::CreateFileW; - use winapi::um::fileapi::OPEN_EXISTING; - use winapi::um::handleapi::CloseHandle; - use winapi::um::handleapi::INVALID_HANDLE_VALUE; - use winapi::um::winnt::FILE_SHARE_DELETE; - use winapi::um::winnt::FILE_SHARE_READ; - use winapi::um::winnt::FILE_SHARE_WRITE; +fn stat_extra(file: &std::fs::File, fsstat: &mut FsStat) -> FsResult<()> { + use std::os::windows::io::AsRawHandle; unsafe fn get_dev( handle: winapi::shared::ntdef::HANDLE, @@ -868,23 +872,9 @@ fn stat_extra( // SAFETY: winapi calls unsafe { - let mut path: Vec<_> = path.as_os_str().encode_wide().collect(); - path.push(0); - let file_handle = CreateFileW( - path.as_ptr(), - 0, - FILE_SHARE_READ | FILE_SHARE_DELETE | FILE_SHARE_WRITE, - std::ptr::null_mut(), - OPEN_EXISTING, - file_flags, - std::ptr::null_mut(), - ); - if file_handle == INVALID_HANDLE_VALUE { - return Err(std::io::Error::last_os_error().into()); - } + let file_handle = file.as_raw_handle(); - let result = get_dev(file_handle); - fsstat.dev = result?; + fsstat.dev = get_dev(file_handle)?; if let Ok(file_info) = query_file_information(file_handle) { fsstat.ctime = Some(windows_time_to_unix_time_msec( @@ -923,7 +913,6 @@ fn stat_extra( } } - CloseHandle(file_handle); Ok(()) } } @@ -939,6 +928,7 @@ fn exists(path: &Path) -> bool { #[cfg(windows)] { use std::os::windows::ffi::OsStrExt; + use winapi::um::fileapi::GetFileAttributesW; use winapi::um::fileapi::INVALID_FILE_ATTRIBUTES; diff --git a/ext/fs/sync.rs b/ext/fs/sync.rs index 6a913f658a7923..2c07ba42dfcfaa 100644 --- a/ext/fs/sync.rs +++ b/ext/fs/sync.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. pub use inner::*; @@ -6,10 +6,9 @@ pub use inner::*; mod inner { #![allow(clippy::disallowed_types)] - pub use std::sync::Arc as MaybeArc; - pub use core::marker::Send as MaybeSend; pub use core::marker::Sync as MaybeSync; + pub use std::sync::Arc as MaybeArc; } #[cfg(not(feature = "sync_fs"))] @@ -21,3 +20,9 @@ mod inner { pub trait MaybeSend {} impl MaybeSend for T where T: ?Sized {} } + +#[allow(clippy::disallowed_types)] +#[inline] +pub fn new_rc(value: T) -> MaybeArc { + MaybeArc::new(value) +} diff --git a/ext/http/00_serve.ts b/ext/http/00_serve.ts index fcdb87d092c7a0..6e5f25b4738b8b 100644 --- a/ext/http/00_serve.ts +++ b/ext/http/00_serve.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { core, internals, primordials } from "ext:core/mod.js"; const { @@ -34,6 +34,7 @@ const { ObjectHasOwn, ObjectPrototypeIsPrototypeOf, PromisePrototypeCatch, + SafePromisePrototypeFinally, PromisePrototypeThen, StringPrototypeIncludes, Symbol, @@ -88,6 +89,16 @@ import { } from "ext:deno_net/01_net.js"; import { hasTlsKeyPairOptions, listenTls } from "ext:deno_net/02_tls.js"; import { SymbolAsyncDispose } from "ext:deno_web/00_infra.js"; +import { + endSpan, + enterSpan, + Span, + TRACING_ENABLED, +} from "ext:deno_telemetry/telemetry.ts"; +import { + updateSpanFromRequest, + updateSpanFromResponse, +} from "ext:deno_telemetry/util.ts"; const _upgraded = Symbol("_upgraded"); @@ -513,91 +524,126 @@ function fastSyncResponseOrStream( * This function returns a promise that will only reject in the case of abnormal exit. */ function mapToCallback(context, callback, onError) { - return async function (req) { - const asyncContext = getAsyncContext(); - setAsyncContext(context.asyncContext); - + let mapped = async function (req, span) { + // Get the response from the user-provided callback. If that fails, use onError. If that fails, return a fallback + // 500 error. + let innerRequest; + let response; try { - // Get the response from the user-provided callback. If that fails, use onError. If that fails, return a fallback - // 500 error. - let innerRequest; - let response; - try { - innerRequest = new InnerRequest(req, context); - const request = fromInnerRequest(innerRequest, "immutable"); - innerRequest.request = request; - response = await callback( - request, - new ServeHandlerInfo(innerRequest), - ); + innerRequest = new InnerRequest(req, context); + const request = fromInnerRequest(innerRequest, "immutable"); + innerRequest.request = request; - // Throwing Error if the handler return value is not a Response class - if (!ObjectPrototypeIsPrototypeOf(ResponsePrototype, response)) { - throw new TypeError( - "Return value from serve handler must be a response or a promise resolving to a response", - ); - } + if (span) { + updateSpanFromRequest(span, request); + } - if (response.type === "error") { - throw new TypeError( - "Return value from serve handler must not be an error response (like Response.error())", - ); - } + response = await callback( + request, + new ServeHandlerInfo(innerRequest), + ); + + // Throwing Error if the handler return value is not a Response class + if (!ObjectPrototypeIsPrototypeOf(ResponsePrototype, response)) { + throw new TypeError( + "Return value from serve handler must be a response or a promise resolving to a response", + ); + } + + if (response.type === "error") { + throw new TypeError( + "Return value from serve handler must not be an error response (like Response.error())", + ); + } - if (response.bodyUsed) { + if (response.bodyUsed) { + throw new TypeError( + "The body of the Response returned from the serve handler has already been consumed", + ); + } + } catch (error) { + try { + response = await onError(error); + if (!ObjectPrototypeIsPrototypeOf(ResponsePrototype, response)) { throw new TypeError( - "The body of the Response returned from the serve handler has already been consumed", + "Return value from onError handler must be a response or a promise resolving to a response", ); } } catch (error) { - try { - response = await onError(error); - if (!ObjectPrototypeIsPrototypeOf(ResponsePrototype, response)) { - throw new TypeError( - "Return value from onError handler must be a response or a promise resolving to a response", - ); - } - } catch (error) { - // deno-lint-ignore no-console - console.error("Exception in onError while handling exception", error); - response = internalServerError(); - } - } - const inner = toInnerResponse(response); - if (innerRequest?.[_upgraded]) { - // We're done here as the connection has been upgraded during the callback and no longer requires servicing. - if (response !== UPGRADE_RESPONSE_SENTINEL) { - // deno-lint-ignore no-console - console.error("Upgrade response was not returned from callback"); - context.close(); - } - innerRequest?.[_upgraded](); - return; + // deno-lint-ignore no-console + console.error("Exception in onError while handling exception", error); + response = internalServerError(); } + } - // Did everything shut down while we were waiting? - if (context.closed) { - // We're shutting down, so this status shouldn't make it back to the client but "Service Unavailable" seems appropriate - innerRequest?.close(); - op_http_set_promise_complete(req, 503); - return; - } + if (span) { + updateSpanFromResponse(span, response); + } - const status = inner.status; - const headers = inner.headerList; - if (headers && headers.length > 0) { - if (headers.length == 1) { - op_http_set_response_header(req, headers[0][0], headers[0][1]); - } else { - op_http_set_response_headers(req, headers); - } + const inner = toInnerResponse(response); + if (innerRequest?.[_upgraded]) { + // We're done here as the connection has been upgraded during the callback and no longer requires servicing. + if (response !== UPGRADE_RESPONSE_SENTINEL) { + // deno-lint-ignore no-console + console.error("Upgrade response was not returned from callback"); + context.close(); } + innerRequest?.[_upgraded](); + return; + } - fastSyncResponseOrStream(req, inner.body, status, innerRequest); - } finally { - setAsyncContext(asyncContext); + // Did everything shut down while we were waiting? + if (context.closed) { + // We're shutting down, so this status shouldn't make it back to the client but "Service Unavailable" seems appropriate + innerRequest?.close(); + op_http_set_promise_complete(req, 503); + return; } + + const status = inner.status; + const headers = inner.headerList; + if (headers && headers.length > 0) { + if (headers.length == 1) { + op_http_set_response_header(req, headers[0][0], headers[0][1]); + } else { + op_http_set_response_headers(req, headers); + } + } + + fastSyncResponseOrStream(req, inner.body, status, innerRequest); }; + + if (TRACING_ENABLED) { + const origMapped = mapped; + mapped = function (req, _span) { + const oldCtx = getAsyncContext(); + setAsyncContext(context.asyncContext); + const span = new Span("deno.serve", { kind: 1 }); + try { + enterSpan(span); + return SafePromisePrototypeFinally( + origMapped(req, span), + () => endSpan(span), + ); + } finally { + // equiv to exitSpan. + setAsyncContext(oldCtx); + } + }; + } else { + const origMapped = mapped; + mapped = function (req, span) { + const oldCtx = getAsyncContext(); + setAsyncContext(context.asyncContext); + try { + return origMapped(req, span); + } finally { + setAsyncContext(oldCtx); + } + }; + } + + return mapped; } type RawHandler = ( @@ -795,7 +841,7 @@ function serveHttpOn(context, addr, callback) { // Attempt to pull as many requests out of the queue as possible before awaiting. This API is // a synchronous, non-blocking API that returns u32::MAX if anything goes wrong. while ((req = op_http_try_wait(rid)) !== null) { - PromisePrototypeCatch(callback(req), promiseErrorHandler); + PromisePrototypeCatch(callback(req, undefined), promiseErrorHandler); } currentPromise = op_http_wait(rid); if (!ref) { @@ -815,7 +861,7 @@ function serveHttpOn(context, addr, callback) { if (req === null) { break; } - PromisePrototypeCatch(callback(req), promiseErrorHandler); + PromisePrototypeCatch(callback(req, undefined), promiseErrorHandler); } try { diff --git a/ext/http/01_http.js b/ext/http/01_http.js index 9302bd8a0f9162..83983fa0cacc05 100644 --- a/ext/http/01_http.js +++ b/ext/http/01_http.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { core, primordials } from "ext:core/mod.js"; const { diff --git a/ext/http/02_websocket.ts b/ext/http/02_websocket.ts index 96af4d48220b83..4d37b04a1d0efe 100644 --- a/ext/http/02_websocket.ts +++ b/ext/http/02_websocket.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { internals, primordials } from "ext:core/mod.js"; import { op_http_websocket_accept_header } from "ext:core/ops"; const { diff --git a/ext/http/Cargo.toml b/ext/http/Cargo.toml index ed98fe349c1872..8f131b84e60e08 100644 --- a/ext/http/Cargo.toml +++ b/ext/http/Cargo.toml @@ -1,8 +1,8 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "deno_http" -version = "0.175.0" +version = "0.182.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/http/benches/compressible.rs b/ext/http/benches/compressible.rs index 5ac09cb8bbadc5..96b21512bac79b 100644 --- a/ext/http/benches/compressible.rs +++ b/ext/http/benches/compressible.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use bencher::benchmark_group; use bencher::benchmark_main; use bencher::Bencher; diff --git a/ext/http/compressible.rs b/ext/http/compressible.rs index 6e96582e7e75bb..5c499f957dd2cf 100644 --- a/ext/http/compressible.rs +++ b/ext/http/compressible.rs @@ -1,8 +1,9 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use phf::phf_set; use std::str::FromStr; +use phf::phf_set; + // Data obtained from https://github.com/jshttp/mime-db/blob/fa5e4ef3cc8907ec3c5ec5b85af0c63d7059a5cd/db.json // Important! Keep this list sorted alphabetically. static CONTENT_TYPES: phf::Set<&'static [u8]> = phf_set! { diff --git a/ext/http/fly_accept_encoding.rs b/ext/http/fly_accept_encoding.rs index 4d6fd2231efb1a..1be864fd3b49e1 100644 --- a/ext/http/fly_accept_encoding.rs +++ b/ext/http/fly_accept_encoding.rs @@ -1,5 +1,5 @@ // Copyright 2018 Yoshua Wuyts. All rights reserved. MIT license. -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Forked from https://github.com/superfly/accept-encoding/blob/1cded757ec7ff3916e5bfe7441db76cdc48170dc/ // Forked to support both http 0.3 and http 1.0 crates. @@ -124,11 +124,12 @@ fn encodings_iter_inner<'s>( #[cfg(test)] mod tests { - use super::*; use http_v02::header::ACCEPT_ENCODING; use http_v02::HeaderMap; use http_v02::HeaderValue; + use super::*; + fn encodings( headers: &HeaderMap, ) -> Result, f32)>, EncodingError> { diff --git a/ext/http/http_next.rs b/ext/http/http_next.rs index 1251f00cc065ae..d9861a0a6b69b1 100644 --- a/ext/http/http_next.rs +++ b/ext/http/http_next.rs @@ -1,23 +1,13 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -use crate::compressible::is_content_compressible; -use crate::extract_network_stream; -use crate::network_buffered_stream::NetworkStreamPrefixCheck; -use crate::request_body::HttpRequestBody; -use crate::request_properties::HttpConnectionProperties; -use crate::request_properties::HttpListenProperties; -use crate::request_properties::HttpPropertyExtractor; -use crate::response_body::Compression; -use crate::response_body::ResponseBytesInner; -use crate::service::handle_request; -use crate::service::http_general_trace; -use crate::service::http_trace; -use crate::service::HttpRecord; -use crate::service::HttpRecordResponse; -use crate::service::HttpRequestBodyAutocloser; -use crate::service::HttpServerState; -use crate::service::SignallingRc; -use crate::websocket_upgrade::WebSocketUpgrade; -use crate::LocalExecutor; +// Copyright 2018-2025 the Deno authors. MIT license. +use std::borrow::Cow; +use std::cell::RefCell; +use std::ffi::c_void; +use std::future::Future; +use std::io; +use std::pin::Pin; +use std::ptr::null; +use std::rc::Rc; + use cache_control::CacheControl; use deno_core::external; use deno_core::futures::future::poll_fn; @@ -43,6 +33,7 @@ use deno_core::ResourceId; use deno_net::ops_tls::TlsStream; use deno_net::raw::NetworkStream; use deno_websocket::ws_create_server_stream; +use fly_accept_encoding::Encoding; use hyper::body::Incoming; use hyper::header::HeaderMap; use hyper::header::ACCEPT_ENCODING; @@ -62,21 +53,31 @@ use hyper::StatusCode; use hyper_util::rt::TokioIo; use once_cell::sync::Lazy; use smallvec::SmallVec; -use std::borrow::Cow; -use std::cell::RefCell; -use std::ffi::c_void; -use std::future::Future; -use std::io; -use std::pin::Pin; -use std::ptr::null; -use std::rc::Rc; - -use super::fly_accept_encoding; -use fly_accept_encoding::Encoding; - use tokio::io::AsyncReadExt; use tokio::io::AsyncWriteExt; +use super::fly_accept_encoding; +use crate::compressible::is_content_compressible; +use crate::extract_network_stream; +use crate::network_buffered_stream::NetworkStreamPrefixCheck; +use crate::request_body::HttpRequestBody; +use crate::request_properties::HttpConnectionProperties; +use crate::request_properties::HttpListenProperties; +use crate::request_properties::HttpPropertyExtractor; +use crate::response_body::Compression; +use crate::response_body::ResponseBytesInner; +use crate::service::handle_request; +use crate::service::http_general_trace; +use crate::service::http_trace; +use crate::service::HttpRecord; +use crate::service::HttpRecordResponse; +use crate::service::HttpRequestBodyAutocloser; +use crate::service::HttpServerState; +use crate::service::SignallingRc; +use crate::websocket_upgrade::WebSocketUpgrade; +use crate::LocalExecutor; +use crate::Options; + type Request = hyper::Request; static USE_WRITEV: Lazy = Lazy::new(|| { @@ -821,10 +822,16 @@ fn serve_http11_unconditional( io: impl HttpServeStream, svc: impl HttpService + 'static, cancel: Rc, + http1_builder_hook: Option http1::Builder>, ) -> impl Future> + 'static { - let conn = http1::Builder::new() - .keep_alive(true) - .writev(*USE_WRITEV) + let mut builder = http1::Builder::new(); + builder.keep_alive(true).writev(*USE_WRITEV); + + if let Some(http1_builder_hook) = http1_builder_hook { + builder = http1_builder_hook(builder); + } + + let conn = builder .serve_connection(TokioIo::new(io), svc) .with_upgrades(); @@ -843,9 +850,17 @@ fn serve_http2_unconditional( io: impl HttpServeStream, svc: impl HttpService + 'static, cancel: Rc, + http2_builder_hook: Option< + fn(http2::Builder) -> http2::Builder, + >, ) -> impl Future> + 'static { - let conn = - http2::Builder::new(LocalExecutor).serve_connection(TokioIo::new(io), svc); + let mut builder = http2::Builder::new(LocalExecutor); + + if let Some(http2_builder_hook) = http2_builder_hook { + builder = http2_builder_hook(builder); + } + + let conn = builder.serve_connection(TokioIo::new(io), svc); async { match conn.or_abort(cancel).await { Err(mut conn) => { @@ -861,15 +876,16 @@ async fn serve_http2_autodetect( io: impl HttpServeStream, svc: impl HttpService + 'static, cancel: Rc, + options: Options, ) -> Result<(), HttpNextError> { let prefix = NetworkStreamPrefixCheck::new(io, HTTP2_PREFIX); let (matches, io) = prefix.match_prefix().await?; if matches { - serve_http2_unconditional(io, svc, cancel) + serve_http2_unconditional(io, svc, cancel, options.http2_builder_hook) .await .map_err(HttpNextError::Hyper) } else { - serve_http11_unconditional(io, svc, cancel) + serve_http11_unconditional(io, svc, cancel, options.http1_builder_hook) .await .map_err(HttpNextError::Hyper) } @@ -880,6 +896,7 @@ fn serve_https( request_info: HttpConnectionProperties, lifetime: HttpLifetime, tx: tokio::sync::mpsc::Sender>, + options: Options, ) -> JoinHandle> { let HttpLifetime { server_state, @@ -891,21 +908,31 @@ fn serve_https( handle_request(req, request_info.clone(), server_state.clone(), tx.clone()) }); spawn( - async { + async move { let handshake = io.handshake().await?; // If the client specifically negotiates a protocol, we will use it. If not, we'll auto-detect // based on the prefix bytes let handshake = handshake.alpn; if Some(TLS_ALPN_HTTP_2) == handshake.as_deref() { - serve_http2_unconditional(io, svc, listen_cancel_handle) - .await - .map_err(HttpNextError::Hyper) + serve_http2_unconditional( + io, + svc, + listen_cancel_handle, + options.http2_builder_hook, + ) + .await + .map_err(HttpNextError::Hyper) } else if Some(TLS_ALPN_HTTP_11) == handshake.as_deref() { - serve_http11_unconditional(io, svc, listen_cancel_handle) - .await - .map_err(HttpNextError::Hyper) + serve_http11_unconditional( + io, + svc, + listen_cancel_handle, + options.http1_builder_hook, + ) + .await + .map_err(HttpNextError::Hyper) } else { - serve_http2_autodetect(io, svc, listen_cancel_handle).await + serve_http2_autodetect(io, svc, listen_cancel_handle, options).await } } .try_or_cancel(connection_cancel_handle), @@ -917,6 +944,7 @@ fn serve_http( request_info: HttpConnectionProperties, lifetime: HttpLifetime, tx: tokio::sync::mpsc::Sender>, + options: Options, ) -> JoinHandle> { let HttpLifetime { server_state, @@ -928,7 +956,7 @@ fn serve_http( handle_request(req, request_info.clone(), server_state.clone(), tx.clone()) }); spawn( - serve_http2_autodetect(io, svc, listen_cancel_handle) + serve_http2_autodetect(io, svc, listen_cancel_handle, options) .try_or_cancel(connection_cancel_handle), ) } @@ -938,6 +966,7 @@ fn serve_http_on( listen_properties: &HttpListenProperties, lifetime: HttpLifetime, tx: tokio::sync::mpsc::Sender>, + options: Options, ) -> JoinHandle> where HTTP: HttpPropertyExtractor, @@ -949,14 +978,14 @@ where match network_stream { NetworkStream::Tcp(conn) => { - serve_http(conn, connection_properties, lifetime, tx) + serve_http(conn, connection_properties, lifetime, tx, options) } NetworkStream::Tls(conn) => { - serve_https(conn, connection_properties, lifetime, tx) + serve_https(conn, connection_properties, lifetime, tx, options) } #[cfg(unix)] NetworkStream::Unix(conn) => { - serve_http(conn, connection_properties, lifetime, tx) + serve_http(conn, connection_properties, lifetime, tx, options) } } } @@ -1045,6 +1074,11 @@ where let lifetime = resource.lifetime(); + let options = { + let state = state.borrow(); + *state.borrow::() + }; + let listen_properties_clone: HttpListenProperties = listen_properties.clone(); let handle = spawn(async move { loop { @@ -1057,6 +1091,7 @@ where &listen_properties_clone, lifetime.clone(), tx.clone(), + options, ); } #[allow(unreachable_code)] @@ -1093,11 +1128,17 @@ where let (tx, rx) = tokio::sync::mpsc::channel(10); let resource: Rc = Rc::new(HttpJoinHandle::new(rx)); + let options = { + let state = state.borrow(); + *state.borrow::() + }; + let handle = serve_http_on::( connection, &listen_properties, resource.lifetime(), tx, + options, ); // Set the handle after we start the future diff --git a/ext/http/lib.rs b/ext/http/lib.rs index 49893b1b921f21..e68bf3787dcc0c 100644 --- a/ext/http/lib.rs +++ b/ext/http/lib.rs @@ -1,4 +1,20 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::borrow::Cow; +use std::cell::RefCell; +use std::cmp::min; +use std::error::Error; +use std::future::Future; +use std::io; +use std::io::Write; +use std::mem::replace; +use std::mem::take; +use std::pin::pin; +use std::pin::Pin; +use std::rc::Rc; +use std::sync::Arc; +use std::task::Context; +use std::task::Poll; use async_compression::tokio::write::BrotliEncoder; use async_compression::tokio::write::GzipEncoder; @@ -39,6 +55,8 @@ use deno_net::raw::NetworkStream; use deno_websocket::ws_create_server_stream; use flate2::write::GzEncoder; use flate2::Compression; +use hyper::server::conn::http1; +use hyper::server::conn::http2; use hyper_util::rt::TokioIo; use hyper_v014::body::Bytes; use hyper_v014::body::HttpBody; @@ -52,21 +70,6 @@ use hyper_v014::HeaderMap; use hyper_v014::Request; use hyper_v014::Response; use serde::Serialize; -use std::borrow::Cow; -use std::cell::RefCell; -use std::cmp::min; -use std::error::Error; -use std::future::Future; -use std::io; -use std::io::Write; -use std::mem::replace; -use std::mem::take; -use std::pin::pin; -use std::pin::Pin; -use std::rc::Rc; -use std::sync::Arc; -use std::task::Context; -use std::task::Poll; use tokio::io::AsyncRead; use tokio::io::AsyncWrite; use tokio::io::AsyncWriteExt; @@ -96,6 +99,25 @@ pub use request_properties::HttpRequestProperties; pub use service::UpgradeUnavailableError; pub use websocket_upgrade::WebSocketUpgradeError; +#[derive(Debug, Default, Clone, Copy)] +pub struct Options { + /// By passing a hook function, the caller can customize various configuration + /// options for the HTTP/2 server. + /// See [`http2::Builder`] for what parameters can be customized. + /// + /// If `None`, the default configuration provided by hyper will be used. Note + /// that the default configuration is subject to change in future versions. + pub http2_builder_hook: + Option) -> http2::Builder>, + /// By passing a hook function, the caller can customize various configuration + /// options for the HTTP/1 server. + /// See [`http1::Builder`] for what parameters can be customized. + /// + /// If `None`, the default configuration provided by hyper will be used. Note + /// that the default configuration is subject to change in future versions. + pub http1_builder_hook: Option http1::Builder>, +} + deno_core::extension!( deno_http, deps = [deno_web, deno_net, deno_fetch, deno_websocket], @@ -135,6 +157,12 @@ deno_core::extension!( http_next::op_http_cancel, ], esm = ["00_serve.ts", "01_http.js", "02_websocket.ts"], + options = { + options: Options, + }, + state = |state, options| { + state.put::(options.options); + } ); #[derive(Debug, thiserror::Error)] @@ -1117,7 +1145,7 @@ async fn op_http_upgrade_websocket( // Needed so hyper can use non Send futures #[derive(Clone)] -struct LocalExecutor; +pub struct LocalExecutor; impl hyper_v014::rt::Executor for LocalExecutor where diff --git a/ext/http/network_buffered_stream.rs b/ext/http/network_buffered_stream.rs index 73df2dbd9f0ea2..5882dd14e325ba 100644 --- a/ext/http/network_buffered_stream.rs +++ b/ext/http/network_buffered_stream.rs @@ -1,12 +1,13 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use bytes::Bytes; -use deno_core::futures::future::poll_fn; -use deno_core::futures::ready; use std::io; use std::mem::MaybeUninit; use std::pin::Pin; use std::task::Poll; + +use bytes::Bytes; +use deno_core::futures::future::poll_fn; +use deno_core::futures::ready; use tokio::io::AsyncRead; use tokio::io::AsyncWrite; use tokio::io::ReadBuf; @@ -227,9 +228,10 @@ impl AsyncWrite #[cfg(test)] mod tests { - use super::*; use tokio::io::AsyncReadExt; + use super::*; + struct YieldsOneByteAtATime(&'static [u8]); impl AsyncRead for YieldsOneByteAtATime { diff --git a/ext/http/reader_stream.rs b/ext/http/reader_stream.rs index be6d571b1a7b99..b6985927f48a8c 100644 --- a/ext/http/reader_stream.rs +++ b/ext/http/reader_stream.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::pin::Pin; use std::sync::atomic::AtomicBool; @@ -66,11 +66,12 @@ impl Stream for ExternallyAbortableReaderStream { #[cfg(test)] mod tests { - use super::*; use bytes::Bytes; use deno_core::futures::StreamExt; use tokio::io::AsyncWriteExt; + use super::*; + #[tokio::test] async fn success() { let (a, b) = tokio::io::duplex(64 * 1024); diff --git a/ext/http/request_body.rs b/ext/http/request_body.rs index f1c3f358ea977b..e7c9a06e2c4323 100644 --- a/ext/http/request_body.rs +++ b/ext/http/request_body.rs @@ -1,4 +1,10 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. +use std::borrow::Cow; +use std::pin::Pin; +use std::rc::Rc; +use std::task::ready; +use std::task::Poll; + use bytes::Bytes; use deno_core::futures::stream::Peekable; use deno_core::futures::Stream; @@ -12,11 +18,6 @@ use deno_core::Resource; use hyper::body::Body; use hyper::body::Incoming; use hyper::body::SizeHint; -use std::borrow::Cow; -use std::pin::Pin; -use std::rc::Rc; -use std::task::ready; -use std::task::Poll; /// Converts a hyper incoming body stream into a stream of [`Bytes`] that we can use to read in V8. struct ReadFuture(Incoming); diff --git a/ext/http/request_properties.rs b/ext/http/request_properties.rs index 39d35a79f14b82..9e60a22baf278f 100644 --- a/ext/http/request_properties.rs +++ b/ext/http/request_properties.rs @@ -1,4 +1,10 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. +use std::borrow::Cow; +use std::net::Ipv4Addr; +use std::net::SocketAddr; +use std::net::SocketAddrV4; +use std::rc::Rc; + use deno_core::error::AnyError; use deno_core::OpState; use deno_core::ResourceId; @@ -11,11 +17,6 @@ use deno_net::raw::NetworkStreamType; use hyper::header::HOST; use hyper::HeaderMap; use hyper::Uri; -use std::borrow::Cow; -use std::net::Ipv4Addr; -use std::net::SocketAddr; -use std::net::SocketAddrV4; -use std::rc::Rc; // TODO(mmastrac): I don't like that we have to clone this, but it's one-time setup #[derive(Clone)] diff --git a/ext/http/response_body.rs b/ext/http/response_body.rs index bac43bf3c8be39..ff264a83055d8f 100644 --- a/ext/http/response_body.rs +++ b/ext/http/response_body.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::io::Write; use std::pin::Pin; use std::rc::Rc; @@ -573,12 +573,14 @@ impl PollFrame for BrotliResponseStream { #[allow(clippy::print_stderr)] #[cfg(test)] mod tests { - use super::*; - use deno_core::futures::future::poll_fn; use std::hash::Hasher; use std::io::Read; use std::io::Write; + use deno_core::futures::future::poll_fn; + + use super::*; + fn zeros() -> Vec { vec![0; 1024 * 1024] } diff --git a/ext/http/service.rs b/ext/http/service.rs index ce24dea43f372c..3b7db49fc4ab5c 100644 --- a/ext/http/service.rs +++ b/ext/http/service.rs @@ -1,7 +1,16 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -use crate::request_properties::HttpConnectionProperties; -use crate::response_body::ResponseBytesInner; -use crate::response_body::ResponseStreamResult; +// Copyright 2018-2025 the Deno authors. MIT license. +use std::cell::Cell; +use std::cell::Ref; +use std::cell::RefCell; +use std::cell::RefMut; +use std::future::Future; +use std::mem::ManuallyDrop; +use std::pin::Pin; +use std::rc::Rc; +use std::task::Context; +use std::task::Poll; +use std::task::Waker; + use deno_core::futures::ready; use deno_core::BufView; use deno_core::OpState; @@ -13,22 +22,14 @@ use hyper::body::Incoming; use hyper::body::SizeHint; use hyper::header::HeaderMap; use hyper::upgrade::OnUpgrade; - use scopeguard::guard; use scopeguard::ScopeGuard; -use std::cell::Cell; -use std::cell::Ref; -use std::cell::RefCell; -use std::cell::RefMut; -use std::future::Future; -use std::mem::ManuallyDrop; -use std::pin::Pin; -use std::rc::Rc; -use std::task::Context; -use std::task::Poll; -use std::task::Waker; use tokio::sync::oneshot; +use crate::request_properties::HttpConnectionProperties; +use crate::response_body::ResponseBytesInner; +use crate::response_body::ResponseStreamResult; + pub type Request = hyper::Request; pub type Response = hyper::Response; @@ -606,16 +607,18 @@ impl Drop for HttpRecordResponse { #[cfg(test)] mod tests { - use super::*; - use crate::response_body::Compression; - use crate::response_body::ResponseBytesInner; + use std::error::Error as StdError; + use bytes::Buf; use deno_net::raw::NetworkStreamType; use hyper::body::Body; use hyper::service::service_fn; use hyper::service::HttpService; use hyper_util::rt::TokioIo; - use std::error::Error as StdError; + + use super::*; + use crate::response_body::Compression; + use crate::response_body::ResponseBytesInner; /// Execute client request on service and concurrently map the response. async fn serve_request( diff --git a/ext/http/websocket_upgrade.rs b/ext/http/websocket_upgrade.rs index af9504717e3948..aae4a13883ee93 100644 --- a/ext/http/websocket_upgrade.rs +++ b/ext/http/websocket_upgrade.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::marker::PhantomData; @@ -169,9 +169,10 @@ impl WebSocketUpgrade { #[cfg(test)] mod tests { - use super::*; use hyper_v014::Body; + use super::*; + type ExpectedResponseAndHead = Option<(Response, &'static [u8])>; fn assert_response( diff --git a/ext/io/12_io.js b/ext/io/12_io.js index 3cdcb113ba750c..b2556649ee2828 100644 --- a/ext/io/12_io.js +++ b/ext/io/12_io.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Interfaces 100% copied from Go. // Documentation liberally lifted from them too. diff --git a/ext/io/Cargo.toml b/ext/io/Cargo.toml index 6ef049ff9b087e..782bd64444e51c 100644 --- a/ext/io/Cargo.toml +++ b/ext/io/Cargo.toml @@ -1,8 +1,8 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "deno_io" -version = "0.87.0" +version = "0.94.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/io/bi_pipe.rs b/ext/io/bi_pipe.rs index 3492e2f441e823..33c3267075a7f2 100644 --- a/ext/io/bi_pipe.rs +++ b/ext/io/bi_pipe.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::rc::Rc; @@ -338,6 +338,11 @@ pub fn bi_pipe_pair_raw( // TODO(nathanwhit): more granular unsafe blocks // SAFETY: win32 calls unsafe { + use std::io; + use std::os::windows::ffi::OsStrExt; + use std::path::Path; + use std::ptr; + use windows_sys::Win32::Foundation::CloseHandle; use windows_sys::Win32::Foundation::ERROR_ACCESS_DENIED; use windows_sys::Win32::Foundation::ERROR_PIPE_CONNECTED; @@ -355,11 +360,6 @@ pub fn bi_pipe_pair_raw( use windows_sys::Win32::System::Pipes::PIPE_READMODE_BYTE; use windows_sys::Win32::System::Pipes::PIPE_TYPE_BYTE; - use std::io; - use std::os::windows::ffi::OsStrExt; - use std::path::Path; - use std::ptr; - let (path, hd1) = loop { let name = format!("\\\\.\\pipe\\{}", uuid::Uuid::new_v4()); let mut path = Path::new(&name) @@ -407,7 +407,7 @@ pub fn bi_pipe_pair_raw( &s, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, - 0, + std::ptr::null_mut(), ); if hd2 == INVALID_HANDLE_VALUE { return Err(io::Error::last_os_error()); diff --git a/ext/io/fs.rs b/ext/io/fs.rs index 7ef02315baa49c..ee0c7da5daf04a 100644 --- a/ext/io/fs.rs +++ b/ext/io/fs.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::borrow::Cow; use std::fmt::Formatter; @@ -215,8 +215,8 @@ pub trait File { fn write_all_sync(self: Rc, buf: &[u8]) -> FsResult<()>; async fn write_all(self: Rc, buf: BufView) -> FsResult<()>; - fn read_all_sync(self: Rc) -> FsResult>; - async fn read_all_async(self: Rc) -> FsResult>; + fn read_all_sync(self: Rc) -> FsResult>; + async fn read_all_async(self: Rc) -> FsResult>; fn chmod_sync(self: Rc, pathmode: u32) -> FsResult<()>; async fn chmod_async(self: Rc, mode: u32) -> FsResult<()>; diff --git a/ext/io/lib.rs b/ext/io/lib.rs index 5d183aa464d885..f78e5a58fcb665 100644 --- a/ext/io/lib.rs +++ b/ext/io/lib.rs @@ -1,5 +1,23 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. +use std::borrow::Cow; +use std::cell::RefCell; +use std::fs::File as StdFile; +use std::future::Future; +use std::io; +use std::io::ErrorKind; +use std::io::Read; +use std::io::Seek; +use std::io::Write; +#[cfg(unix)] +use std::os::unix::io::FromRawFd; +#[cfg(windows)] +use std::os::windows::io::FromRawHandle; +use std::rc::Rc; +#[cfg(windows)] +use std::sync::Arc; + +use deno_core::futures::TryFutureExt; use deno_core::op2; use deno_core::unsync::spawn_blocking; use deno_core::unsync::TaskQueue; @@ -21,40 +39,20 @@ use fs::FsResult; use fs::FsStat; use fs3::FileExt; use once_cell::sync::Lazy; -use std::borrow::Cow; -use std::cell::RefCell; -use std::fs::File as StdFile; -use std::future::Future; -use std::io; -use std::io::ErrorKind; -use std::io::Read; -use std::io::Seek; -use std::io::Write; -use std::rc::Rc; +#[cfg(windows)] +use parking_lot::Condvar; +#[cfg(windows)] +use parking_lot::Mutex; use tokio::io::AsyncRead; use tokio::io::AsyncReadExt; use tokio::io::AsyncWrite; use tokio::io::AsyncWriteExt; use tokio::process; - -#[cfg(unix)] -use std::os::unix::io::FromRawFd; - -#[cfg(windows)] -use std::os::windows::io::FromRawHandle; #[cfg(windows)] use winapi::um::processenv::GetStdHandle; #[cfg(windows)] use winapi::um::winbase; -use deno_core::futures::TryFutureExt; -#[cfg(windows)] -use parking_lot::Condvar; -#[cfg(windows)] -use parking_lot::Mutex; -#[cfg(windows)] -use std::sync::Arc; - pub mod fs; mod pipe; #[cfg(windows)] @@ -62,19 +60,18 @@ mod winpipe; mod bi_pipe; -pub use pipe::pipe; -pub use pipe::AsyncPipeRead; -pub use pipe::AsyncPipeWrite; -pub use pipe::PipeRead; -pub use pipe::PipeWrite; -pub use pipe::RawPipeHandle; - pub use bi_pipe::bi_pipe_pair_raw; pub use bi_pipe::BiPipe; pub use bi_pipe::BiPipeRead; pub use bi_pipe::BiPipeResource; pub use bi_pipe::BiPipeWrite; pub use bi_pipe::RawBiPipeHandle; +pub use pipe::pipe; +pub use pipe::AsyncPipeRead; +pub use pipe::AsyncPipeWrite; +pub use pipe::PipeRead; +pub use pipe::PipeWrite; +pub use pipe::RawPipeHandle; /// Abstraction over `AsRawFd` (unix) and `AsRawHandle` (windows) pub trait AsRawIoHandle { @@ -789,26 +786,26 @@ impl crate::fs::File for StdFileResourceInner { } } - fn read_all_sync(self: Rc) -> FsResult> { + fn read_all_sync(self: Rc) -> FsResult> { match self.kind { StdFileResourceKind::File | StdFileResourceKind::Stdin(_) => { let mut buf = Vec::new(); self.with_sync(|file| Ok(file.read_to_end(&mut buf)?))?; - Ok(buf) + Ok(Cow::Owned(buf)) } StdFileResourceKind::Stdout | StdFileResourceKind::Stderr => { Err(FsError::NotSupported) } } } - async fn read_all_async(self: Rc) -> FsResult> { + async fn read_all_async(self: Rc) -> FsResult> { match self.kind { StdFileResourceKind::File | StdFileResourceKind::Stdin(_) => { self .with_inner_blocking_task(|file| { let mut buf = Vec::new(); file.read_to_end(&mut buf)?; - Ok(buf) + Ok(Cow::Owned(buf)) }) .await } diff --git a/ext/io/pipe.rs b/ext/io/pipe.rs index e0e019e277dcb6..5172bea10e7a94 100644 --- a/ext/io/pipe.rs +++ b/ext/io/pipe.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::io; use std::pin::Pin; use std::process::Stdio; @@ -299,13 +299,14 @@ pub fn pipe_impl() -> io::Result<(PipeRead, PipeWrite)> { #[cfg(test)] mod tests { - use super::*; - use std::io::Read; use std::io::Write; + use tokio::io::AsyncReadExt; use tokio::io::AsyncWriteExt; + use super::*; + #[test] fn test_pipe() { let (mut read, mut write) = pipe().unwrap(); diff --git a/ext/io/winpipe.rs b/ext/io/winpipe.rs index 01d018008d797f..600eda4091d79b 100644 --- a/ext/io/winpipe.rs +++ b/ext/io/winpipe.rs @@ -1,10 +1,11 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -use rand::thread_rng; -use rand::RngCore; +// Copyright 2018-2025 the Deno authors. MIT license. use std::io; use std::os::windows::io::RawHandle; use std::sync::atomic::AtomicU32; use std::sync::atomic::Ordering; + +use rand::thread_rng; +use rand::RngCore; use winapi::shared::minwindef::DWORD; use winapi::um::errhandlingapi::GetLastError; use winapi::um::fileapi::CreateFileA; @@ -116,7 +117,6 @@ fn create_named_pipe_inner() -> io::Result<(RawHandle, RawHandle)> { #[cfg(test)] mod tests { - use super::*; use std::fs::File; use std::io::Read; use std::io::Write; @@ -124,6 +124,8 @@ mod tests { use std::sync::Arc; use std::sync::Barrier; + use super::*; + #[test] fn make_named_pipe() { let (server, client) = create_named_pipe().unwrap(); diff --git a/ext/kv/01_db.ts b/ext/kv/01_db.ts index c644ff7121d51c..37d4c58c11ae19 100644 --- a/ext/kv/01_db.ts +++ b/ext/kv/01_db.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { core, primordials } from "ext:core/mod.js"; const { @@ -77,7 +77,9 @@ const maxQueueBackoffInterval = 60 * 60 * 1000; function validateBackoffSchedule(backoffSchedule: number[]) { if (backoffSchedule.length > maxQueueBackoffIntervals) { - throw new TypeError("Invalid backoffSchedule"); + throw new TypeError( + `Invalid backoffSchedule, max ${maxQueueBackoffIntervals} intervals allowed`, + ); } for (let i = 0; i < backoffSchedule.length; ++i) { const interval = backoffSchedule[i]; @@ -85,7 +87,9 @@ function validateBackoffSchedule(backoffSchedule: number[]) { interval < 0 || interval > maxQueueBackoffInterval || NumberIsNaN(interval) ) { - throw new TypeError("Invalid backoffSchedule"); + throw new TypeError( + `Invalid backoffSchedule, interval at index ${i} is invalid`, + ); } } } diff --git a/ext/kv/Cargo.toml b/ext/kv/Cargo.toml index aa7381766740ac..451fa50cf99392 100644 --- a/ext/kv/Cargo.toml +++ b/ext/kv/Cargo.toml @@ -1,8 +1,8 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "deno_kv" -version = "0.85.0" +version = "0.92.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/kv/config.rs b/ext/kv/config.rs index 7166bcbcc282a6..f762a745789c09 100644 --- a/ext/kv/config.rs +++ b/ext/kv/config.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. #[derive(Clone, Copy, Debug)] pub struct KvConfig { diff --git a/ext/kv/dynamic.rs b/ext/kv/dynamic.rs index 6d545d79f6407f..33e3d4842f548f 100644 --- a/ext/kv/dynamic.rs +++ b/ext/kv/dynamic.rs @@ -1,8 +1,16 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::cell::RefCell; use std::rc::Rc; +use async_trait::async_trait; +use deno_core::error::type_error; +use deno_core::error::AnyError; +use deno_core::OpState; +use denokv_proto::CommitResult; +use denokv_proto::ReadRangeOutput; +use denokv_proto::WatchStream; + use crate::remote::RemoteDbHandlerPermissions; use crate::sqlite::SqliteDbHandler; use crate::sqlite::SqliteDbHandlerPermissions; @@ -12,13 +20,6 @@ use crate::DatabaseHandler; use crate::QueueMessageHandle; use crate::ReadRange; use crate::SnapshotReadOptions; -use async_trait::async_trait; -use deno_core::error::type_error; -use deno_core::error::AnyError; -use deno_core::OpState; -use denokv_proto::CommitResult; -use denokv_proto::ReadRangeOutput; -use denokv_proto::WatchStream; pub struct MultiBackendDbHandler { backends: Vec<(&'static [&'static str], Box)>, diff --git a/ext/kv/interface.rs b/ext/kv/interface.rs index 9737a9366d3d1f..fec0ef1afdd070 100644 --- a/ext/kv/interface.rs +++ b/ext/kv/interface.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::cell::RefCell; use std::rc::Rc; diff --git a/ext/kv/lib.rs b/ext/kv/lib.rs index 5392b97210d92d..82dda6d7595da3 100644 --- a/ext/kv/lib.rs +++ b/ext/kv/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. pub mod config; pub mod dynamic; @@ -178,7 +178,7 @@ pub enum KvErrorKind { InvalidRange, } -#[op2(async)] +#[op2(async, stack_trace)] #[smi] async fn op_kv_database_open( state: Rc>, diff --git a/ext/kv/remote.rs b/ext/kv/remote.rs index 63146daf71e420..cb408ef644d541 100644 --- a/ext/kv/remote.rs +++ b/ext/kv/remote.rs @@ -1,11 +1,10 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::cell::RefCell; use std::marker::PhantomData; use std::rc::Rc; use std::sync::Arc; -use crate::DatabaseHandler; use anyhow::Context; use async_trait::async_trait; use bytes::Bytes; @@ -27,6 +26,8 @@ use denokv_remote::RemoteTransport; use http_body_util::BodyExt; use url::Url; +use crate::DatabaseHandler; + #[derive(Clone)] pub struct HttpOptions { pub user_agent: String, @@ -122,9 +123,7 @@ impl RemoteTransport for FetchClient { headers: http::HeaderMap, body: Bytes, ) -> Result<(Url, http::StatusCode, Self::Response), anyhow::Error> { - let body = http_body_util::Full::new(body) - .map_err(|never| match never {}) - .boxed(); + let body = deno_fetch::ReqBody::full(body); let mut req = http::Request::new(body); *req.method_mut() = http::Method::POST; *req.uri_mut() = url.as_str().parse()?; @@ -210,6 +209,7 @@ impl DatabaseHandler pool_idle_timeout: None, http1: false, http2: true, + client_builder_hook: None, }, )?; let fetch_client = FetchClient(client); diff --git a/ext/kv/sqlite.rs b/ext/kv/sqlite.rs index 9de5209275c28c..a88c61d7237a89 100644 --- a/ext/kv/sqlite.rs +++ b/ext/kv/sqlite.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::borrow::Cow; use std::cell::RefCell; @@ -13,7 +13,6 @@ use std::sync::Arc; use std::sync::Mutex; use std::sync::OnceLock; -use crate::DatabaseHandler; use async_trait::async_trait; use deno_core::error::type_error; use deno_core::error::AnyError; @@ -27,6 +26,8 @@ use denokv_sqlite::SqliteNotifier; use rand::SeedableRng; use rusqlite::OpenFlags; +use crate::DatabaseHandler; + static SQLITE_NOTIFIERS_MAP: OnceLock>> = OnceLock::new(); diff --git a/ext/napi/Cargo.toml b/ext/napi/Cargo.toml index df3ec0287b936c..a17fd9e0f65cd1 100644 --- a/ext/napi/Cargo.toml +++ b/ext/napi/Cargo.toml @@ -1,8 +1,8 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "deno_napi" -version = "0.108.0" +version = "0.115.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/napi/build.rs b/ext/napi/build.rs index 8705830a95c4da..71686d645128e8 100644 --- a/ext/napi/build.rs +++ b/ext/napi/build.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. fn main() { let symbols_file_name = match std::env::consts::OS { diff --git a/ext/napi/function.rs b/ext/napi/function.rs index a128ad79000440..681f0144210af2 100644 --- a/ext/napi/function.rs +++ b/ext/napi/function.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use crate::*; #[repr(C)] diff --git a/ext/napi/js_native_api.rs b/ext/napi/js_native_api.rs index 53a12d6eba64ef..80579081f3364f 100644 --- a/ext/napi/js_native_api.rs +++ b/ext/napi/js_native_api.rs @@ -1,12 +1,14 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. #![allow(non_upper_case_globals)] #![deny(unsafe_op_in_unsafe_fn)] const NAPI_VERSION: u32 = 9; -use crate::*; +use std::ptr::NonNull; + use libc::INT_MAX; +use napi_sym::napi_sym; use super::util::check_new_from_utf8; use super::util::check_new_from_utf8_len; @@ -20,8 +22,7 @@ use crate::check_env; use crate::function::create_function; use crate::function::create_function_template; use crate::function::CallbackInfo; -use napi_sym::napi_sym; -use std::ptr::NonNull; +use crate::*; #[derive(Debug, Clone, Copy, PartialEq)] enum ReferenceOwnership { diff --git a/ext/napi/lib.rs b/ext/napi/lib.rs index 88b8c238dffa1f..3f495e05e6e5b3 100644 --- a/ext/napi/lib.rs +++ b/ext/napi/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. #![allow(non_camel_case_types)] #![allow(non_upper_case_globals)] @@ -22,17 +22,18 @@ pub mod util; pub mod uv; use core::ptr::NonNull; +use std::cell::RefCell; +use std::collections::HashMap; +use std::path::PathBuf; +use std::rc::Rc; +use std::thread_local; + use deno_core::op2; use deno_core::parking_lot::RwLock; use deno_core::url::Url; use deno_core::ExternalOpsTracker; use deno_core::OpState; use deno_core::V8CrossThreadTaskSpawner; -use std::cell::RefCell; -use std::collections::HashMap; -use std::path::PathBuf; -use std::rc::Rc; -use std::thread_local; #[derive(Debug, thiserror::Error)] pub enum NApiError { @@ -46,20 +47,19 @@ pub enum NApiError { Permission(#[from] PermissionCheckError), } -#[cfg(unix)] -use libloading::os::unix::*; - -#[cfg(windows)] -use libloading::os::windows::*; +pub use std::ffi::CStr; +pub use std::os::raw::c_char; +pub use std::os::raw::c_void; +pub use std::ptr; // Expose common stuff for ease of use. // `use deno_napi::*` pub use deno_core::v8; use deno_permissions::PermissionCheckError; -pub use std::ffi::CStr; -pub use std::os::raw::c_char; -pub use std::os::raw::c_void; -pub use std::ptr; +#[cfg(unix)] +use libloading::os::unix::*; +#[cfg(windows)] +use libloading::os::windows::*; pub use value::napi_value; pub mod function; @@ -530,7 +530,7 @@ static NAPI_LOADED_MODULES: std::sync::LazyLock< RwLock>, > = std::sync::LazyLock::new(|| RwLock::new(HashMap::new())); -#[op2(reentrant)] +#[op2(reentrant, stack_trace)] fn op_napi_open( scope: &mut v8::HandleScope<'scope>, isolate: *mut v8::Isolate, diff --git a/ext/napi/node_api.rs b/ext/napi/node_api.rs index 2ca5c8d0b4fac6..13ea0b3e625ebe 100644 --- a/ext/napi/node_api.rs +++ b/ext/napi/node_api.rs @@ -1,7 +1,18 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. #![deny(unsafe_op_in_unsafe_fn)] +use std::sync::atomic::AtomicBool; +use std::sync::atomic::AtomicU8; +use std::sync::atomic::AtomicUsize; +use std::sync::atomic::Ordering; +use std::sync::Arc; + +use deno_core::parking_lot::Condvar; +use deno_core::parking_lot::Mutex; +use deno_core::V8CrossThreadTaskSpawner; +use napi_sym::napi_sym; + use super::util::get_array_buffer_ptr; use super::util::make_external_backing_store; use super::util::napi_clear_last_error; @@ -10,15 +21,6 @@ use super::util::SendPtr; use crate::check_arg; use crate::check_env; use crate::*; -use deno_core::parking_lot::Condvar; -use deno_core::parking_lot::Mutex; -use deno_core::V8CrossThreadTaskSpawner; -use napi_sym::napi_sym; -use std::sync::atomic::AtomicBool; -use std::sync::atomic::AtomicU8; -use std::sync::atomic::AtomicUsize; -use std::sync::atomic::Ordering; -use std::sync::Arc; #[napi_sym] fn napi_module_register(module: *const NapiModule) -> napi_status { diff --git a/ext/napi/sym/Cargo.toml b/ext/napi/sym/Cargo.toml index 7c13a9165c8205..c832a1fa30fbc7 100644 --- a/ext/napi/sym/Cargo.toml +++ b/ext/napi/sym/Cargo.toml @@ -1,8 +1,8 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "napi_sym" -version = "0.107.0" +version = "0.114.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/napi/sym/lib.rs b/ext/napi/sym/lib.rs index e2826306b91ca6..94444d8541c048 100644 --- a/ext/napi/sym/lib.rs +++ b/ext/napi/sym/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use proc_macro::TokenStream; use quote::quote; diff --git a/ext/napi/util.rs b/ext/napi/util.rs index 21e9d433aad6c7..a913eade1660e4 100644 --- a/ext/napi/util.rs +++ b/ext/napi/util.rs @@ -1,7 +1,8 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -use crate::*; +// Copyright 2018-2025 the Deno authors. MIT license. use libc::INT_MAX; +use crate::*; + #[repr(transparent)] pub(crate) struct SendPtr(pub *const T); diff --git a/ext/napi/uv.rs b/ext/napi/uv.rs index ea6b5396659a59..ef4ac495c3f2f6 100644 --- a/ext/napi/uv.rs +++ b/ext/napi/uv.rs @@ -1,10 +1,12 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::*; -use deno_core::parking_lot::Mutex; use std::mem::MaybeUninit; use std::ptr::addr_of_mut; +use deno_core::parking_lot::Mutex; + +use crate::*; + fn assert_ok(res: c_int) -> c_int { if res != 0 { log::error!("bad result in uv polyfill: {res}"); @@ -15,11 +17,12 @@ fn assert_ok(res: c_int) -> c_int { res } +use std::ffi::c_int; + use js_native_api::napi_create_string_utf8; use node_api::napi_create_async_work; use node_api::napi_delete_async_work; use node_api::napi_queue_async_work; -use std::ffi::c_int; const UV_MUTEX_SIZE: usize = { #[cfg(unix)] diff --git a/ext/napi/value.rs b/ext/napi/value.rs index 71beac07e26808..851a56e9639746 100644 --- a/ext/napi/value.rs +++ b/ext/napi/value.rs @@ -1,11 +1,12 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use deno_core::v8; use std::mem::transmute; use std::ops::Deref; use std::os::raw::c_void; use std::ptr::NonNull; +use deno_core::v8; + /// An FFI-opaque, nullable wrapper around v8::Local. /// rusty_v8 Local handle cannot be empty but napi_value can be. #[repr(transparent)] diff --git a/ext/net/01_net.js b/ext/net/01_net.js index c3e5f9e5ca8f42..3afbd031e6eede 100644 --- a/ext/net/01_net.js +++ b/ext/net/01_net.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { core, primordials } from "ext:core/mod.js"; const { diff --git a/ext/net/02_tls.js b/ext/net/02_tls.js index 6dad965590eb08..21d5512ebd71b8 100644 --- a/ext/net/02_tls.js +++ b/ext/net/02_tls.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { core, internals, primordials } from "ext:core/mod.js"; const { internalRidSymbol } = core; diff --git a/ext/net/03_quic.js b/ext/net/03_quic.js new file mode 100644 index 00000000000000..48b35866d27b74 --- /dev/null +++ b/ext/net/03_quic.js @@ -0,0 +1,367 @@ +// Copyright 2018-2025 the Deno authors. MIT license. +import { core, primordials } from "ext:core/mod.js"; +import { + op_quic_accept, + op_quic_accept_bi, + op_quic_accept_incoming, + op_quic_accept_uni, + op_quic_close_connection, + op_quic_close_endpoint, + op_quic_connect, + op_quic_connection_closed, + op_quic_connection_get_protocol, + op_quic_connection_get_remote_addr, + op_quic_endpoint_get_addr, + op_quic_get_send_stream_priority, + op_quic_incoming_accept, + op_quic_incoming_ignore, + op_quic_incoming_local_ip, + op_quic_incoming_refuse, + op_quic_incoming_remote_addr, + op_quic_incoming_remote_addr_validated, + op_quic_listen, + op_quic_max_datagram_size, + op_quic_open_bi, + op_quic_open_uni, + op_quic_read_datagram, + op_quic_send_datagram, + op_quic_set_send_stream_priority, +} from "ext:core/ops"; +import { + getWritableStreamResourceBacking, + ReadableStream, + readableStreamForRid, + WritableStream, + writableStreamForRid, +} from "ext:deno_web/06_streams.js"; +import { loadTlsKeyPair } from "ext:deno_net/02_tls.js"; +const { + BadResourcePrototype, +} = core; +const { + Uint8Array, + TypedArrayPrototypeSubarray, + SymbolAsyncIterator, + SafePromisePrototypeFinally, + ObjectPrototypeIsPrototypeOf, +} = primordials; + +class QuicSendStream extends WritableStream { + get sendOrder() { + return op_quic_get_send_stream_priority( + getWritableStreamResourceBacking(this).rid, + ); + } + + set sendOrder(p) { + op_quic_set_send_stream_priority( + getWritableStreamResourceBacking(this).rid, + p, + ); + } +} + +class QuicReceiveStream extends ReadableStream {} + +function readableStream(rid, closed) { + // stream can be indirectly closed by closing connection. + SafePromisePrototypeFinally(closed, () => { + core.tryClose(rid); + }); + return readableStreamForRid(rid, true, QuicReceiveStream); +} + +function writableStream(rid, closed) { + // stream can be indirectly closed by closing connection. + SafePromisePrototypeFinally(closed, () => { + core.tryClose(rid); + }); + return writableStreamForRid(rid, true, QuicSendStream); +} + +class QuicBidirectionalStream { + #readable; + #writable; + + constructor(txRid, rxRid, closed) { + this.#readable = readableStream(rxRid, closed); + this.#writable = writableStream(txRid, closed); + } + + get readable() { + return this.#readable; + } + + get writable() { + return this.#writable; + } +} + +async function* bidiStream(conn, closed) { + try { + while (true) { + const r = await op_quic_accept_bi(conn); + yield new QuicBidirectionalStream(r[0], r[1], closed); + } + } catch (error) { + if (ObjectPrototypeIsPrototypeOf(BadResourcePrototype, error)) { + return; + } + throw error; + } +} + +async function* uniStream(conn, closed) { + try { + while (true) { + const uniRid = await op_quic_accept_uni(conn); + yield readableStream(uniRid, closed); + } + } catch (error) { + if (ObjectPrototypeIsPrototypeOf(BadResourcePrototype, error)) { + return; + } + throw error; + } +} + +class QuicConn { + #resource; + #bidiStream = null; + #uniStream = null; + #closed; + + constructor(resource) { + this.#resource = resource; + + this.#closed = op_quic_connection_closed(this.#resource); + core.unrefOpPromise(this.#closed); + } + + get protocol() { + return op_quic_connection_get_protocol(this.#resource); + } + + get remoteAddr() { + return op_quic_connection_get_remote_addr(this.#resource); + } + + async createBidirectionalStream( + { sendOrder, waitUntilAvailable } = { __proto__: null }, + ) { + const { 0: txRid, 1: rxRid } = await op_quic_open_bi( + this.#resource, + waitUntilAvailable ?? false, + ); + if (sendOrder !== null && sendOrder !== undefined) { + op_quic_set_send_stream_priority(txRid, sendOrder); + } + return new QuicBidirectionalStream(txRid, rxRid, this.#closed); + } + + async createUnidirectionalStream( + { sendOrder, waitUntilAvailable } = { __proto__: null }, + ) { + const rid = await op_quic_open_uni( + this.#resource, + waitUntilAvailable ?? false, + ); + if (sendOrder !== null && sendOrder !== undefined) { + op_quic_set_send_stream_priority(rid, sendOrder); + } + return writableStream(rid, this.#closed); + } + + get incomingBidirectionalStreams() { + if (this.#bidiStream === null) { + this.#bidiStream = ReadableStream.from( + bidiStream(this.#resource, this.#closed), + ); + } + return this.#bidiStream; + } + + get incomingUnidirectionalStreams() { + if (this.#uniStream === null) { + this.#uniStream = ReadableStream.from( + uniStream(this.#resource, this.#closed), + ); + } + return this.#uniStream; + } + + get maxDatagramSize() { + return op_quic_max_datagram_size(this.#resource); + } + + async readDatagram(p) { + const view = p || new Uint8Array(this.maxDatagramSize); + const nread = await op_quic_read_datagram(this.#resource, view); + return TypedArrayPrototypeSubarray(view, 0, nread); + } + + async sendDatagram(data) { + await op_quic_send_datagram(this.#resource, data); + } + + get closed() { + core.refOpPromise(this.#closed); + return this.#closed; + } + + close({ closeCode, reason }) { + op_quic_close_connection(this.#resource, closeCode, reason); + } +} + +class QuicIncoming { + #incoming; + + constructor(incoming) { + this.#incoming = incoming; + } + + get localIp() { + return op_quic_incoming_local_ip(this.#incoming); + } + + get remoteAddr() { + return op_quic_incoming_remote_addr(this.#incoming); + } + + get remoteAddressValidated() { + return op_quic_incoming_remote_addr_validated(this.#incoming); + } + + async accept() { + const conn = await op_quic_incoming_accept(this.#incoming); + return new QuicConn(conn); + } + + refuse() { + op_quic_incoming_refuse(this.#incoming); + } + + ignore() { + op_quic_incoming_ignore(this.#incoming); + } +} + +class QuicListener { + #endpoint; + + constructor(endpoint) { + this.#endpoint = endpoint; + } + + get addr() { + return op_quic_endpoint_get_addr(this.#endpoint); + } + + async accept() { + const conn = await op_quic_accept(this.#endpoint); + return new QuicConn(conn); + } + + async incoming() { + const incoming = await op_quic_accept_incoming(this.#endpoint); + return new QuicIncoming(incoming); + } + + async next() { + let conn; + try { + conn = await this.accept(); + } catch (error) { + if (ObjectPrototypeIsPrototypeOf(BadResourcePrototype, error)) { + return { value: undefined, done: true }; + } + throw error; + } + return { value: conn, done: false }; + } + + [SymbolAsyncIterator]() { + return this; + } + + close({ closeCode, reason }) { + op_quic_close_endpoint(this.#endpoint, closeCode, reason); + } +} + +async function listenQuic( + { + hostname, + port, + cert, + key, + alpnProtocols, + keepAliveInterval, + maxIdleTimeout, + maxConcurrentBidirectionalStreams, + maxConcurrentUnidirectionalStreams, + }, +) { + hostname = hostname || "0.0.0.0"; + const keyPair = loadTlsKeyPair("Deno.listenQuic", { cert, key }); + const endpoint = await op_quic_listen( + { hostname, port }, + { alpnProtocols }, + { + keepAliveInterval, + maxIdleTimeout, + maxConcurrentBidirectionalStreams, + maxConcurrentUnidirectionalStreams, + }, + keyPair, + ); + return new QuicListener(endpoint); +} + +async function connectQuic( + { + hostname, + port, + serverName, + caCerts, + cert, + key, + alpnProtocols, + keepAliveInterval, + maxIdleTimeout, + maxConcurrentBidirectionalStreams, + maxConcurrentUnidirectionalStreams, + congestionControl, + }, +) { + const keyPair = loadTlsKeyPair("Deno.connectQuic", { cert, key }); + const conn = await op_quic_connect( + { hostname, port }, + { + caCerts, + alpnProtocols, + serverName, + }, + { + keepAliveInterval, + maxIdleTimeout, + maxConcurrentBidirectionalStreams, + maxConcurrentUnidirectionalStreams, + congestionControl, + }, + keyPair, + ); + return new QuicConn(conn); +} + +export { + connectQuic, + listenQuic, + QuicBidirectionalStream, + QuicConn, + QuicIncoming, + QuicListener, + QuicReceiveStream, + QuicSendStream, +}; diff --git a/ext/net/Cargo.toml b/ext/net/Cargo.toml index 1febbd5338be93..a834d8c8f36036 100644 --- a/ext/net/Cargo.toml +++ b/ext/net/Cargo.toml @@ -1,8 +1,8 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "deno_net" -version = "0.169.0" +version = "0.176.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -17,9 +17,10 @@ path = "lib.rs" deno_core.workspace = true deno_permissions.workspace = true deno_tls.workspace = true -hickory-proto = "0.24" +hickory-proto = "0.25.0-alpha.4" hickory-resolver.workspace = true pin-project.workspace = true +quinn = { version = "0.11.6", default-features = false, features = ["runtime-tokio", "rustls", "ring"] } rustls-tokio-stream.workspace = true serde.workspace = true socket2.workspace = true diff --git a/ext/net/io.rs b/ext/net/io.rs index 2907fa398b480a..3f12b92a9a7903 100644 --- a/ext/net/io.rs +++ b/ext/net/io.rs @@ -1,4 +1,7 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::borrow::Cow; +use std::rc::Rc; use deno_core::futures::TryFutureExt; use deno_core::AsyncMutFuture; @@ -9,14 +12,11 @@ use deno_core::CancelTryFuture; use deno_core::RcRef; use deno_core::Resource; use socket2::SockRef; -use std::borrow::Cow; -use std::rc::Rc; use tokio::io::AsyncRead; use tokio::io::AsyncReadExt; use tokio::io::AsyncWrite; use tokio::io::AsyncWriteExt; use tokio::net::tcp; - #[cfg(unix)] use tokio::net::unix; diff --git a/ext/net/lib.deno_net.d.ts b/ext/net/lib.deno_net.d.ts index 827081f2a4e80f..8e0c3841682a47 100644 --- a/ext/net/lib.deno_net.d.ts +++ b/ext/net/lib.deno_net.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /// /// @@ -450,5 +450,293 @@ declare namespace Deno { options?: StartTlsOptions, ): Promise; + /** + * **UNSTABLE**: New API, yet to be vetted. + * @experimental + * @category Network + */ + export interface QuicTransportOptions { + /** Period of inactivity before sending a keep-alive packet. Keep-alive + * packets prevent an inactive but otherwise healthy connection from timing + * out. Only one side of any given connection needs keep-alive enabled for + * the connection to be preserved. + * @default {undefined} + */ + keepAliveInterval?: number; + /** Maximum duration of inactivity to accept before timing out the + * connection. The true idle timeout is the minimum of this and the peer’s + * own max idle timeout. + * @default {undefined} + */ + maxIdleTimeout?: number; + /** Maximum number of incoming bidirectional streams that may be open + * concurrently. + * @default {100} + */ + maxConcurrentBidirectionalStreams?: number; + /** Maximum number of incoming unidirectional streams that may be open + * concurrently. + * @default {100} + */ + maxConcurrentUnidirectionalStreams?: number; + } + + /** + * **UNSTABLE**: New API, yet to be vetted. + * @experimental + * @category Network + */ + export interface ListenQuicOptions extends QuicTransportOptions { + /** The port to connect to. */ + port: number; + /** + * A literal IP address or host name that can be resolved to an IP address. + * @default {"0.0.0.0"} + */ + hostname?: string; + /** Server private key in PEM format */ + key: string; + /** Cert chain in PEM format */ + cert: string; + /** Application-Layer Protocol Negotiation (ALPN) protocols to announce to + * the client. QUIC requires the use of ALPN. + */ + alpnProtocols: string[]; + } + + /** + * **UNSTABLE**: New API, yet to be vetted. + * Listen announces on the local transport address over QUIC. + * + * ```ts + * const lstnr = await Deno.listenQuic({ port: 443, cert: "...", key: "...", alpnProtocols: ["h3"] }); + * ``` + * + * Requires `allow-net` permission. + * + * @experimental + * @tags allow-net + * @category Network + */ + export function listenQuic(options: ListenQuicOptions): Promise; + + /** + * **UNSTABLE**: New API, yet to be vetted. + * @experimental + * @category Network + */ + export interface ConnectQuicOptions extends QuicTransportOptions { + /** The port to connect to. */ + port: number; + /** A literal IP address or host name that can be resolved to an IP address. */ + hostname: string; + /** The name used for validating the certificate provided by the server. If + * not provided, defaults to `hostname`. */ + serverName?: string | undefined; + /** Application-Layer Protocol Negotiation (ALPN) protocols supported by + * the client. QUIC requires the use of ALPN. + */ + alpnProtocols: string[]; + /** A list of root certificates that will be used in addition to the + * default root certificates to verify the peer's certificate. + * + * Must be in PEM format. */ + caCerts?: string[]; + /** + * The congestion control algorithm used when sending data over this connection. + */ + congestionControl?: "throughput" | "low-latency"; + } + + /** + * **UNSTABLE**: New API, yet to be vetted. + * Establishes a secure connection over QUIC using a hostname and port. The + * cert file is optional and if not included Mozilla's root certificates will + * be used. See also https://github.com/ctz/webpki-roots for specifics. + * + * ```ts + * const caCert = await Deno.readTextFile("./certs/my_custom_root_CA.pem"); + * const conn1 = await Deno.connectQuic({ hostname: "example.com", port: 443, alpnProtocols: ["h3"] }); + * const conn2 = await Deno.connectQuic({ caCerts: [caCert], hostname: "example.com", port: 443, alpnProtocols: ["h3"] }); + * ``` + * + * Requires `allow-net` permission. + * + * @experimental + * @tags allow-net + * @category Network + */ + export function connectQuic(options: ConnectQuicOptions): Promise; + + /** + * **UNSTABLE**: New API, yet to be vetted. + * @experimental + * @category Network + */ + export interface QuicCloseInfo { + /** A number representing the error code for the error. */ + closeCode: number; + /** A string representing the reason for closing the connection. */ + reason: string; + } + + /** + * **UNSTABLE**: New API, yet to be vetted. + * An incoming connection for which the server has not yet begun its part of the handshake. + * + * @experimental + * @category Network + */ + export interface QuicIncoming { + /** + * The local IP address which was used when the peer established the connection. + */ + readonly localIp: string; + + /** + * The peer’s UDP address. + */ + readonly remoteAddr: NetAddr; + + /** + * Whether the socket address that is initiating this connection has proven that they can receive traffic. + */ + readonly remoteAddressValidated: boolean; + + /** + * Accept this incoming connection. + */ + accept(): Promise; + + /** + * Refuse this incoming connection. + */ + refuse(): void; + + /** + * Ignore this incoming connection attempt, not sending any packet in response. + */ + ignore(): void; + } + + /** + * **UNSTABLE**: New API, yet to be vetted. + * Specialized listener that accepts QUIC connections. + * + * @experimental + * @category Network + */ + export interface QuicListener extends AsyncIterable { + /** Return the address of the `QuicListener`. */ + readonly addr: NetAddr; + + /** Waits for and resolves to the next connection to the `QuicListener`. */ + accept(): Promise; + + /** Waits for and resolves to the next incoming request to the `QuicListener`. */ + incoming(): Promise; + + /** Close closes the listener. Any pending accept promises will be rejected + * with errors. */ + close(info: QuicCloseInfo): void; + + [Symbol.asyncIterator](): AsyncIterableIterator; + } + + /** + * **UNSTABLE**: New API, yet to be vetted. + * + * @experimental + * @category Network + */ + export interface QuicSendStreamOptions { + /** Indicates the send priority of this stream relative to other streams for + * which the value has been set. + * @default {undefined} + */ + sendOrder?: number; + /** Wait until there is sufficient flow credit to create the stream. + * @default {false} + */ + waitUntilAvailable?: boolean; + } + + /** + * **UNSTABLE**: New API, yet to be vetted. + * + * @experimental + * @category Network + */ + export interface QuicConn { + /** Close closes the listener. Any pending accept promises will be rejected + * with errors. */ + close(info: QuicCloseInfo): void; + /** Opens and returns a bidirectional stream. */ + createBidirectionalStream( + options?: QuicSendStreamOptions, + ): Promise; + /** Opens and returns a unidirectional stream. */ + createUnidirectionalStream( + options?: QuicSendStreamOptions, + ): Promise; + /** Send a datagram. The provided data cannot be larger than + * `maxDatagramSize`. */ + sendDatagram(data: Uint8Array): Promise; + /** Receive a datagram. If no buffer is provider, one will be allocated. + * The size of the provided buffer should be at least `maxDatagramSize`. */ + readDatagram(buffer?: Uint8Array): Promise; + + /** Return the remote address for the connection. Clients may change + * addresses at will, for example when switching to a cellular internet + * connection. + */ + readonly remoteAddr: NetAddr; + /** The negotiated ALPN protocol, if provided. */ + readonly protocol: string | undefined; + /** Returns a promise that resolves when the connection is closed. */ + readonly closed: Promise; + /** A stream of bidirectional streams opened by the peer. */ + readonly incomingBidirectionalStreams: ReadableStream< + QuicBidirectionalStream + >; + /** A stream of unidirectional streams opened by the peer. */ + readonly incomingUnidirectionalStreams: ReadableStream; + /** Returns the datagram stream for sending and receiving datagrams. */ + readonly maxDatagramSize: number; + } + + /** + * **UNSTABLE**: New API, yet to be vetted. + * + * @experimental + * @category Network + */ + export interface QuicBidirectionalStream { + /** Returns a QuicReceiveStream instance that can be used to read incoming data. */ + readonly readable: QuicReceiveStream; + /** Returns a QuicSendStream instance that can be used to write outgoing data. */ + readonly writable: QuicSendStream; + } + + /** + * **UNSTABLE**: New API, yet to be vetted. + * + * @experimental + * @category Network + */ + export interface QuicSendStream extends WritableStream { + /** Indicates the send priority of this stream relative to other streams for + * which the value has been set. */ + sendOrder: number; + } + + /** + * **UNSTABLE**: New API, yet to be vetted. + * + * @experimental + * @category Network + */ + export interface QuicReceiveStream extends ReadableStream {} + export {}; // only export exports } diff --git a/ext/net/lib.rs b/ext/net/lib.rs index f482750b38f7cf..b2b87fc6ade75c 100644 --- a/ext/net/lib.rs +++ b/ext/net/lib.rs @@ -1,23 +1,25 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. pub mod io; pub mod ops; pub mod ops_tls; #[cfg(unix)] pub mod ops_unix; +mod quic; pub mod raw; pub mod resolve_addr; pub mod tcp; +use std::borrow::Cow; +use std::path::Path; +use std::path::PathBuf; +use std::sync::Arc; + use deno_core::error::AnyError; use deno_core::OpState; use deno_permissions::PermissionCheckError; use deno_tls::rustls::RootCertStore; use deno_tls::RootCertStoreProvider; -use std::borrow::Cow; -use std::path::Path; -use std::path::PathBuf; -use std::sync::Arc; pub const UNSTABLE_FEATURE_NAME: &str = "net"; @@ -158,8 +160,34 @@ deno_core::extension!(deno_net, ops_unix::op_node_unstable_net_listen_unixpacket

, ops_unix::op_net_recv_unixpacket, ops_unix::op_net_send_unixpacket

, + + quic::op_quic_accept, + quic::op_quic_accept_bi, + quic::op_quic_accept_incoming, + quic::op_quic_accept_uni, + quic::op_quic_close_connection, + quic::op_quic_close_endpoint, + quic::op_quic_connection_closed, + quic::op_quic_connection_get_protocol, + quic::op_quic_connection_get_remote_addr, + quic::op_quic_connect

, + quic::op_quic_endpoint_get_addr, + quic::op_quic_get_send_stream_priority, + quic::op_quic_incoming_accept, + quic::op_quic_incoming_refuse, + quic::op_quic_incoming_ignore, + quic::op_quic_incoming_local_ip, + quic::op_quic_incoming_remote_addr, + quic::op_quic_incoming_remote_addr_validated, + quic::op_quic_listen

, + quic::op_quic_max_datagram_size, + quic::op_quic_open_bi, + quic::op_quic_open_uni, + quic::op_quic_read_datagram, + quic::op_quic_send_datagram, + quic::op_quic_set_send_stream_priority, ], - esm = [ "01_net.js", "02_tls.js" ], + esm = [ "01_net.js", "02_tls.js", "03_quic.js" ], options = { root_cert_store_provider: Option>, unsafely_ignore_certificate_errors: Option>, @@ -177,9 +205,10 @@ deno_core::extension!(deno_net, /// Stub ops for non-unix platforms. #[cfg(not(unix))] mod ops_unix { - use crate::NetPermissions; use deno_core::op2; + use crate::NetPermissions; + macro_rules! stub_op { ($name:ident) => { #[op2(fast)] diff --git a/ext/net/ops.rs b/ext/net/ops.rs index 9a8b70f0f6d965..1fb0f39280382b 100644 --- a/ext/net/ops.rs +++ b/ext/net/ops.rs @@ -1,16 +1,17 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::io::TcpStreamResource; -use crate::raw::NetworkListenerResource; -use crate::resolve_addr::resolve_addr; -use crate::resolve_addr::resolve_addr_sync; -use crate::tcp::TcpListener; -use crate::NetPermissions; -use deno_core::op2; -use deno_core::CancelFuture; +use std::borrow::Cow; +use std::cell::RefCell; +use std::net::Ipv4Addr; +use std::net::Ipv6Addr; +use std::net::SocketAddr; +use std::rc::Rc; +use std::str::FromStr; +use deno_core::op2; use deno_core::AsyncRefCell; use deno_core::ByteString; +use deno_core::CancelFuture; use deno_core::CancelHandle; use deno_core::CancelTryFuture; use deno_core::JsBuffer; @@ -21,29 +22,30 @@ use deno_core::ResourceId; use hickory_proto::rr::rdata::caa::Value; use hickory_proto::rr::record_data::RData; use hickory_proto::rr::record_type::RecordType; +use hickory_proto::ProtoError; +use hickory_proto::ProtoErrorKind; use hickory_resolver::config::NameServerConfigGroup; use hickory_resolver::config::ResolverConfig; use hickory_resolver::config::ResolverOpts; -use hickory_resolver::error::ResolveError; -use hickory_resolver::error::ResolveErrorKind; use hickory_resolver::system_conf; -use hickory_resolver::AsyncResolver; +use hickory_resolver::ResolveError; +use hickory_resolver::ResolveErrorKind; use serde::Deserialize; use serde::Serialize; use socket2::Domain; use socket2::Protocol; use socket2::Socket; use socket2::Type; -use std::borrow::Cow; -use std::cell::RefCell; -use std::net::Ipv4Addr; -use std::net::Ipv6Addr; -use std::net::SocketAddr; -use std::rc::Rc; -use std::str::FromStr; use tokio::net::TcpStream; use tokio::net::UdpSocket; +use crate::io::TcpStreamResource; +use crate::raw::NetworkListenerResource; +use crate::resolve_addr::resolve_addr; +use crate::resolve_addr::resolve_addr_sync; +use crate::tcp::TcpListener; +use crate::NetPermissions; + #[derive(Serialize, Clone, Debug)] #[serde(rename_all = "camelCase")] pub struct TlsHandshakeInfo { @@ -182,7 +184,7 @@ pub async fn op_net_recv_udp( Ok((nread, IpAddr::from(remote_addr))) } -#[op2(async)] +#[op2(async, stack_trace)] #[number] pub async fn op_net_send_udp( state: Rc>, @@ -343,7 +345,7 @@ pub async fn op_net_set_multi_ttl_udp( Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] #[serde] pub async fn op_net_connect_tcp( state: Rc>, @@ -401,7 +403,7 @@ impl Resource for UdpSocketResource { } } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_net_listen_tcp( state: &mut OpState, @@ -501,7 +503,7 @@ where Ok((rid, IpAddr::from(local_addr))) } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_net_listen_udp( state: &mut OpState, @@ -516,7 +518,7 @@ where net_listen_udp::(state, addr, reuse_address, loopback) } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_node_unstable_net_listen_udp( state: &mut OpState, @@ -601,7 +603,7 @@ pub struct NameServer { port: u16, } -#[op2(async)] +#[op2(async, stack_trace)] #[serde] pub async fn op_dns_resolve( state: Rc>, @@ -646,7 +648,7 @@ where } } - let resolver = AsyncResolver::tokio(config, opts); + let resolver = hickory_resolver::Resolver::tokio(config, opts); let lookup_fut = resolver.lookup(query, record_type); @@ -674,11 +676,21 @@ where lookup .map_err(|e| match e.kind() { - ResolveErrorKind::NoRecordsFound { .. } => NetError::DnsNotFound(e), - ResolveErrorKind::Message("No connections available") => { + ResolveErrorKind::Proto(ProtoError { kind, .. }) + if matches!(**kind, ProtoErrorKind::NoRecordsFound { .. }) => + { + NetError::DnsNotFound(e) + } + ResolveErrorKind::Proto(ProtoError { kind, .. }) + if matches!(**kind, ProtoErrorKind::NoConnections { .. }) => + { NetError::DnsNotConnected(e) } - ResolveErrorKind::Timeout => NetError::DnsTimedOut(e), + ResolveErrorKind::Proto(ProtoError { kind, .. }) + if matches!(**kind, ProtoErrorKind::Timeout { .. }) => + { + NetError::DnsTimedOut(e) + } _ => NetError::Dns(e), })? .iter() @@ -823,7 +835,14 @@ fn rdata_to_return_record( #[cfg(test)] mod tests { - use super::*; + use std::net::Ipv4Addr; + use std::net::Ipv6Addr; + use std::net::ToSocketAddrs; + use std::path::Path; + use std::path::PathBuf; + use std::sync::Arc; + use std::sync::Mutex; + use deno_core::futures::FutureExt; use deno_core::JsRuntime; use deno_core::RuntimeOptions; @@ -844,13 +863,8 @@ mod tests { use hickory_proto::rr::record_data::RData; use hickory_proto::rr::Name; use socket2::SockRef; - use std::net::Ipv4Addr; - use std::net::Ipv6Addr; - use std::net::ToSocketAddrs; - use std::path::Path; - use std::path::PathBuf; - use std::sync::Arc; - use std::sync::Mutex; + + use super::*; #[test] fn rdata_to_return_record_a() { diff --git a/ext/net/ops_tls.rs b/ext/net/ops_tls.rs index c7d65dd85ef7b8..5b8cd47751b77c 100644 --- a/ext/net/ops_tls.rs +++ b/ext/net/ops_tls.rs @@ -1,16 +1,17 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::borrow::Cow; +use std::cell::RefCell; +use std::convert::From; +use std::fs::File; +use std::io::BufReader; +use std::io::ErrorKind; +use std::io::Read; +use std::net::SocketAddr; +use std::num::NonZeroUsize; +use std::rc::Rc; +use std::sync::Arc; -use crate::io::TcpStreamResource; -use crate::ops::IpAddr; -use crate::ops::NetError; -use crate::ops::TlsHandshakeInfo; -use crate::raw::NetworkListenerResource; -use crate::resolve_addr::resolve_addr; -use crate::resolve_addr::resolve_addr_sync; -use crate::tcp::TcpListener; -use crate::DefaultTlsOptions; -use crate::NetPermissions; -use crate::UnsafelyIgnoreCertificateErrors; use deno_core::futures::TryFutureExt; use deno_core::op2; use deno_core::v8; @@ -35,25 +36,25 @@ use deno_tls::TlsKey; use deno_tls::TlsKeyLookup; use deno_tls::TlsKeys; use deno_tls::TlsKeysHolder; +pub use rustls_tokio_stream::TlsStream; use rustls_tokio_stream::TlsStreamRead; use rustls_tokio_stream::TlsStreamWrite; use serde::Deserialize; -use std::borrow::Cow; -use std::cell::RefCell; -use std::convert::From; -use std::fs::File; -use std::io::BufReader; -use std::io::ErrorKind; -use std::io::Read; -use std::net::SocketAddr; -use std::num::NonZeroUsize; -use std::rc::Rc; -use std::sync::Arc; use tokio::io::AsyncReadExt; use tokio::io::AsyncWriteExt; use tokio::net::TcpStream; -pub use rustls_tokio_stream::TlsStream; +use crate::io::TcpStreamResource; +use crate::ops::IpAddr; +use crate::ops::NetError; +use crate::ops::TlsHandshakeInfo; +use crate::raw::NetworkListenerResource; +use crate::resolve_addr::resolve_addr; +use crate::resolve_addr::resolve_addr_sync; +use crate::tcp::TcpListener; +use crate::DefaultTlsOptions; +use crate::NetPermissions; +use crate::UnsafelyIgnoreCertificateErrors; pub(crate) const TLS_BUFFER_SIZE: Option = NonZeroUsize::new(65536); @@ -251,7 +252,7 @@ pub fn op_tls_cert_resolver_resolve_error( lookup.resolve(sni, Err(error)) } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_tls_start( state: Rc>, @@ -340,7 +341,7 @@ where Ok((rid, IpAddr::from(local_addr), IpAddr::from(remote_addr))) } -#[op2(async)] +#[op2(async, stack_trace)] #[serde] pub async fn op_net_connect_tls( state: Rc>, @@ -445,7 +446,7 @@ pub struct ListenTlsArgs { load_balanced: bool, } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_net_listen_tls( state: &mut OpState, diff --git a/ext/net/ops_unix.rs b/ext/net/ops_unix.rs index 04ae84906fba3f..b347b81dc7efb9 100644 --- a/ext/net/ops_unix.rs +++ b/ext/net/ops_unix.rs @@ -1,9 +1,10 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::borrow::Cow; +use std::cell::RefCell; +use std::path::Path; +use std::rc::Rc; -use crate::io::UnixStreamResource; -use crate::ops::NetError; -use crate::raw::NetworkListenerResource; -use crate::NetPermissions; use deno_core::op2; use deno_core::AsyncRefCell; use deno_core::CancelHandle; @@ -15,14 +16,15 @@ use deno_core::Resource; use deno_core::ResourceId; use serde::Deserialize; use serde::Serialize; -use std::borrow::Cow; -use std::cell::RefCell; -use std::path::Path; -use std::rc::Rc; use tokio::net::UnixDatagram; use tokio::net::UnixListener; pub use tokio::net::UnixStream; +use crate::io::UnixStreamResource; +use crate::ops::NetError; +use crate::raw::NetworkListenerResource; +use crate::NetPermissions; + /// A utility function to map OsStrings to Strings pub fn into_string(s: std::ffi::OsString) -> Result { s.into_string().map_err(NetError::InvalidUtf8) @@ -85,7 +87,7 @@ pub async fn op_net_accept_unix( Ok((rid, local_addr_path, remote_addr_path)) } -#[op2(async)] +#[op2(async, stack_trace)] #[serde] pub async fn op_net_connect_unix( state: Rc>, @@ -118,7 +120,7 @@ where Ok((rid, local_addr_path, remote_addr_path)) } -#[op2(async)] +#[op2(async, stack_trace)] #[serde] pub async fn op_net_recv_unixpacket( state: Rc>, @@ -140,7 +142,7 @@ pub async fn op_net_recv_unixpacket( Ok((nread, path)) } -#[op2(async)] +#[op2(async, stack_trace)] #[number] pub async fn op_net_send_unixpacket( state: Rc>, @@ -171,7 +173,7 @@ where Ok(nwritten) } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_net_listen_unix( state: &mut OpState, @@ -222,7 +224,7 @@ where Ok((rid, pathname)) } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_net_listen_unixpacket( state: &mut OpState, @@ -235,7 +237,7 @@ where net_listen_unixpacket::(state, path) } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_node_unstable_net_listen_unixpacket( state: &mut OpState, diff --git a/ext/net/quic.rs b/ext/net/quic.rs new file mode 100644 index 00000000000000..676b2f06a12c13 --- /dev/null +++ b/ext/net/quic.rs @@ -0,0 +1,662 @@ +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::borrow::Cow; +use std::cell::RefCell; +use std::future::Future; +use std::net::IpAddr; +use std::net::Ipv4Addr; +use std::net::Ipv6Addr; +use std::net::SocketAddrV4; +use std::net::SocketAddrV6; +use std::pin::pin; +use std::rc::Rc; +use std::sync::Arc; +use std::task::Context; +use std::task::Poll; +use std::time::Duration; + +use deno_core::error::bad_resource; +use deno_core::error::generic_error; +use deno_core::error::AnyError; +use deno_core::futures::task::noop_waker_ref; +use deno_core::op2; +use deno_core::AsyncRefCell; +use deno_core::AsyncResult; +use deno_core::BufView; +use deno_core::GarbageCollected; +use deno_core::JsBuffer; +use deno_core::OpState; +use deno_core::RcRef; +use deno_core::Resource; +use deno_core::ResourceId; +use deno_core::WriteOutcome; +use deno_tls::create_client_config; +use deno_tls::SocketUse; +use deno_tls::TlsKeys; +use deno_tls::TlsKeysHolder; +use quinn::crypto::rustls::QuicClientConfig; +use quinn::crypto::rustls::QuicServerConfig; +use serde::Deserialize; +use serde::Serialize; + +use crate::resolve_addr::resolve_addr; +use crate::DefaultTlsOptions; +use crate::NetPermissions; +use crate::UnsafelyIgnoreCertificateErrors; + +#[derive(Debug, Deserialize, Serialize)] +struct Addr { + hostname: String, + port: u16, +} + +#[derive(Deserialize)] +#[serde(rename_all = "camelCase")] +struct ListenArgs { + alpn_protocols: Option>, +} + +#[derive(Deserialize)] +#[serde(rename_all = "camelCase")] +struct TransportConfig { + keep_alive_interval: Option, + max_idle_timeout: Option, + max_concurrent_bidirectional_streams: Option, + max_concurrent_unidirectional_streams: Option, + preferred_address_v4: Option, + preferred_address_v6: Option, + congestion_control: Option, +} + +impl TryInto for TransportConfig { + type Error = AnyError; + + fn try_into(self) -> Result { + let mut cfg = quinn::TransportConfig::default(); + + if let Some(interval) = self.keep_alive_interval { + cfg.keep_alive_interval(Some(Duration::from_millis(interval))); + } + + if let Some(timeout) = self.max_idle_timeout { + cfg.max_idle_timeout(Some(Duration::from_millis(timeout).try_into()?)); + } + + if let Some(max) = self.max_concurrent_bidirectional_streams { + cfg.max_concurrent_bidi_streams(max.into()); + } + + if let Some(max) = self.max_concurrent_unidirectional_streams { + cfg.max_concurrent_uni_streams(max.into()); + } + + if let Some(v) = self.congestion_control { + let controller: Option< + Arc, + > = match v.as_str() { + "low-latency" => { + Some(Arc::new(quinn::congestion::BbrConfig::default())) + } + "throughput" => { + Some(Arc::new(quinn::congestion::CubicConfig::default())) + } + _ => None, + }; + if let Some(controller) = controller { + cfg.congestion_controller_factory(controller); + } + } + + Ok(cfg) + } +} + +struct EndpointResource(quinn::Endpoint, Arc); + +impl GarbageCollected for EndpointResource {} + +#[op2(async)] +#[cppgc] +pub(crate) async fn op_quic_listen( + state: Rc>, + #[serde] addr: Addr, + #[serde] args: ListenArgs, + #[serde] transport_config: TransportConfig, + #[cppgc] keys: &TlsKeysHolder, +) -> Result +where + NP: NetPermissions + 'static, +{ + state + .borrow_mut() + .borrow_mut::() + .check_net(&(&addr.hostname, Some(addr.port)), "Deno.listenQuic()")?; + + let addr = resolve_addr(&addr.hostname, addr.port) + .await? + .next() + .ok_or_else(|| generic_error("No resolved address found"))?; + + let TlsKeys::Static(deno_tls::TlsKey(cert, key)) = keys.take() else { + unreachable!() + }; + + let mut crypto = + quinn::rustls::ServerConfig::builder_with_protocol_versions(&[ + &quinn::rustls::version::TLS13, + ]) + .with_no_client_auth() + .with_single_cert(cert.clone(), key.clone_key())?; + + if let Some(alpn_protocols) = args.alpn_protocols { + crypto.alpn_protocols = alpn_protocols + .into_iter() + .map(|alpn| alpn.into_bytes()) + .collect(); + } + + let server_config = Arc::new(QuicServerConfig::try_from(crypto)?); + let mut config = quinn::ServerConfig::with_crypto(server_config.clone()); + config.preferred_address_v4(transport_config.preferred_address_v4); + config.preferred_address_v6(transport_config.preferred_address_v6); + config.transport_config(Arc::new(transport_config.try_into()?)); + let endpoint = quinn::Endpoint::server(config, addr)?; + + Ok(EndpointResource(endpoint, server_config)) +} + +#[op2] +#[serde] +pub(crate) fn op_quic_endpoint_get_addr( + #[cppgc] endpoint: &EndpointResource, +) -> Result { + let addr = endpoint.0.local_addr()?; + let addr = Addr { + hostname: format!("{}", addr.ip()), + port: addr.port(), + }; + Ok(addr) +} + +#[derive(Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +struct CloseInfo { + close_code: u64, + reason: String, +} + +#[op2(fast)] +pub(crate) fn op_quic_close_endpoint( + #[cppgc] endpoint: &EndpointResource, + #[bigint] close_code: u64, + #[string] reason: String, +) -> Result<(), AnyError> { + endpoint + .0 + .close(quinn::VarInt::from_u64(close_code)?, reason.as_bytes()); + Ok(()) +} + +struct ConnectionResource(quinn::Connection); + +impl GarbageCollected for ConnectionResource {} + +#[op2(async)] +#[cppgc] +pub(crate) async fn op_quic_accept( + #[cppgc] endpoint: &EndpointResource, +) -> Result { + match endpoint.0.accept().await { + Some(incoming) => { + let conn = incoming.accept()?.await?; + Ok(ConnectionResource(conn)) + } + None => Err(bad_resource("QuicListener is closed")), + } +} + +struct IncomingResource( + RefCell>, + Arc, +); + +impl GarbageCollected for IncomingResource {} + +#[op2(async)] +#[cppgc] +pub(crate) async fn op_quic_accept_incoming( + #[cppgc] endpoint: &EndpointResource, +) -> Result { + match endpoint.0.accept().await { + Some(incoming) => Ok(IncomingResource( + RefCell::new(Some(incoming)), + endpoint.1.clone(), + )), + None => Err(bad_resource("QuicListener is closed")), + } +} + +#[op2] +#[string] +pub(crate) fn op_quic_incoming_local_ip( + #[cppgc] incoming_resource: &IncomingResource, +) -> Result, AnyError> { + let Some(incoming) = incoming_resource.0.borrow_mut().take() else { + return Err(bad_resource("QuicIncoming already used")); + }; + Ok(incoming.local_ip().map(|ip| ip.to_string())) +} + +#[op2] +#[serde] +pub(crate) fn op_quic_incoming_remote_addr( + #[cppgc] incoming_resource: &IncomingResource, +) -> Result { + let Some(incoming) = incoming_resource.0.borrow_mut().take() else { + return Err(bad_resource("QuicIncoming already used")); + }; + let addr = incoming.remote_address(); + Ok(Addr { + hostname: format!("{}", addr.ip()), + port: addr.port(), + }) +} + +#[op2(fast)] +pub(crate) fn op_quic_incoming_remote_addr_validated( + #[cppgc] incoming_resource: &IncomingResource, +) -> Result { + let Some(incoming) = incoming_resource.0.borrow_mut().take() else { + return Err(bad_resource("QuicIncoming already used")); + }; + Ok(incoming.remote_address_validated()) +} + +#[op2(async)] +#[cppgc] +pub(crate) async fn op_quic_incoming_accept( + #[cppgc] incoming_resource: &IncomingResource, + #[serde] transport_config: Option, +) -> Result { + let Some(incoming) = incoming_resource.0.borrow_mut().take() else { + return Err(bad_resource("QuicIncoming already used")); + }; + let conn = match transport_config { + Some(transport_config) => { + let mut config = + quinn::ServerConfig::with_crypto(incoming_resource.1.clone()); + config.preferred_address_v4(transport_config.preferred_address_v4); + config.preferred_address_v6(transport_config.preferred_address_v6); + config.transport_config(Arc::new(transport_config.try_into()?)); + incoming.accept_with(Arc::new(config))?.await? + } + None => incoming.accept()?.await?, + }; + Ok(ConnectionResource(conn)) +} + +#[op2] +#[serde] +pub(crate) fn op_quic_incoming_refuse( + #[cppgc] incoming: &IncomingResource, +) -> Result<(), AnyError> { + let Some(incoming) = incoming.0.borrow_mut().take() else { + return Err(bad_resource("QuicIncoming already used")); + }; + incoming.refuse(); + Ok(()) +} + +#[op2] +#[serde] +pub(crate) fn op_quic_incoming_ignore( + #[cppgc] incoming: &IncomingResource, +) -> Result<(), AnyError> { + let Some(incoming) = incoming.0.borrow_mut().take() else { + return Err(bad_resource("QuicIncoming already used")); + }; + incoming.ignore(); + Ok(()) +} + +#[derive(Deserialize)] +#[serde(rename_all = "camelCase")] +struct ConnectArgs { + ca_certs: Option>, + alpn_protocols: Option>, + server_name: Option, +} + +#[op2(async)] +#[cppgc] +pub(crate) async fn op_quic_connect( + state: Rc>, + #[serde] addr: Addr, + #[serde] args: ConnectArgs, + #[serde] transport_config: TransportConfig, + #[cppgc] key_pair: &TlsKeysHolder, +) -> Result +where + NP: NetPermissions + 'static, +{ + state + .borrow_mut() + .borrow_mut::() + .check_net(&(&addr.hostname, Some(addr.port)), "Deno.connectQuic()")?; + + let sock_addr = resolve_addr(&addr.hostname, addr.port) + .await? + .next() + .ok_or_else(|| generic_error("No resolved address found"))?; + + let root_cert_store = state + .borrow() + .borrow::() + .root_cert_store()?; + + let unsafely_ignore_certificate_errors = state + .borrow() + .try_borrow::() + .and_then(|it| it.0.clone()); + + let ca_certs = args + .ca_certs + .unwrap_or_default() + .into_iter() + .map(|s| s.into_bytes()) + .collect::>(); + + let mut tls_config = create_client_config( + root_cert_store, + ca_certs, + unsafely_ignore_certificate_errors, + key_pair.take(), + SocketUse::GeneralSsl, + )?; + + if let Some(alpn_protocols) = args.alpn_protocols { + tls_config.alpn_protocols = + alpn_protocols.into_iter().map(|s| s.into_bytes()).collect(); + } + + let client_config = QuicClientConfig::try_from(tls_config)?; + let mut client_config = quinn::ClientConfig::new(Arc::new(client_config)); + client_config.transport_config(Arc::new(transport_config.try_into()?)); + + let local_addr = match sock_addr.ip() { + IpAddr::V4(_) => IpAddr::from(Ipv4Addr::new(0, 0, 0, 0)), + IpAddr::V6(_) => IpAddr::from(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 0)), + }; + + let conn = quinn::Endpoint::client((local_addr, 0).into())? + .connect_with( + client_config, + sock_addr, + &args.server_name.unwrap_or(addr.hostname), + )? + .await?; + + Ok(ConnectionResource(conn)) +} + +#[op2] +#[string] +pub(crate) fn op_quic_connection_get_protocol( + #[cppgc] connection: &ConnectionResource, +) -> Option { + connection + .0 + .handshake_data() + .and_then(|h| h.downcast::().ok()) + .and_then(|h| h.protocol) + .map(|p| String::from_utf8_lossy(&p).into_owned()) +} + +#[op2] +#[serde] +pub(crate) fn op_quic_connection_get_remote_addr( + #[cppgc] connection: &ConnectionResource, +) -> Result { + let addr = connection.0.remote_address(); + Ok(Addr { + hostname: format!("{}", addr.ip()), + port: addr.port(), + }) +} + +#[op2(fast)] +pub(crate) fn op_quic_close_connection( + #[cppgc] connection: &ConnectionResource, + #[bigint] close_code: u64, + #[string] reason: String, +) -> Result<(), AnyError> { + connection + .0 + .close(quinn::VarInt::from_u64(close_code)?, reason.as_bytes()); + Ok(()) +} + +#[op2(async)] +#[serde] +pub(crate) async fn op_quic_connection_closed( + #[cppgc] connection: &ConnectionResource, +) -> Result { + let e = connection.0.closed().await; + match e { + quinn::ConnectionError::LocallyClosed => Ok(CloseInfo { + close_code: 0, + reason: "".into(), + }), + quinn::ConnectionError::ApplicationClosed(i) => Ok(CloseInfo { + close_code: i.error_code.into(), + reason: String::from_utf8_lossy(&i.reason).into_owned(), + }), + e => Err(e.into()), + } +} + +struct SendStreamResource(AsyncRefCell); + +impl SendStreamResource { + fn new(stream: quinn::SendStream) -> Self { + Self(AsyncRefCell::new(stream)) + } +} + +impl Resource for SendStreamResource { + fn name(&self) -> Cow { + "quicSendStream".into() + } + + fn write(self: Rc, view: BufView) -> AsyncResult { + Box::pin(async move { + let mut r = RcRef::map(self, |r| &r.0).borrow_mut().await; + let nwritten = r.write(&view).await?; + Ok(WriteOutcome::Partial { nwritten, view }) + }) + } +} + +struct RecvStreamResource(AsyncRefCell); + +impl RecvStreamResource { + fn new(stream: quinn::RecvStream) -> Self { + Self(AsyncRefCell::new(stream)) + } +} + +impl Resource for RecvStreamResource { + fn name(&self) -> Cow { + "quicReceiveStream".into() + } + + fn read(self: Rc, limit: usize) -> AsyncResult { + Box::pin(async move { + let mut r = RcRef::map(self, |r| &r.0).borrow_mut().await; + let mut data = vec![0; limit]; + let nread = r.read(&mut data).await?.unwrap_or(0); + data.truncate(nread); + Ok(BufView::from(data)) + }) + } +} + +#[op2(async)] +#[serde] +pub(crate) async fn op_quic_accept_bi( + #[cppgc] connection: &ConnectionResource, + state: Rc>, +) -> Result<(ResourceId, ResourceId), AnyError> { + match connection.0.accept_bi().await { + Ok((tx, rx)) => { + let mut state = state.borrow_mut(); + let tx_rid = state.resource_table.add(SendStreamResource::new(tx)); + let rx_rid = state.resource_table.add(RecvStreamResource::new(rx)); + Ok((tx_rid, rx_rid)) + } + Err(e) => match e { + quinn::ConnectionError::LocallyClosed + | quinn::ConnectionError::ApplicationClosed(..) => { + Err(bad_resource("QuicConn is closed")) + } + _ => Err(e.into()), + }, + } +} + +#[op2(async)] +#[serde] +pub(crate) async fn op_quic_open_bi( + #[cppgc] connection: &ConnectionResource, + state: Rc>, + wait_for_available: bool, +) -> Result<(ResourceId, ResourceId), AnyError> { + let (tx, rx) = if wait_for_available { + connection.0.open_bi().await? + } else { + let waker = noop_waker_ref(); + let mut cx = Context::from_waker(waker); + match pin!(connection.0.open_bi()).poll(&mut cx) { + Poll::Ready(r) => r?, + Poll::Pending => { + return Err(generic_error("Connection has reached the maximum number of outgoing concurrent bidirectional streams")); + } + } + }; + let mut state = state.borrow_mut(); + let tx_rid = state.resource_table.add(SendStreamResource::new(tx)); + let rx_rid = state.resource_table.add(RecvStreamResource::new(rx)); + Ok((tx_rid, rx_rid)) +} + +#[op2(async)] +#[serde] +pub(crate) async fn op_quic_accept_uni( + #[cppgc] connection: &ConnectionResource, + state: Rc>, +) -> Result { + match connection.0.accept_uni().await { + Ok(rx) => { + let rid = state + .borrow_mut() + .resource_table + .add(RecvStreamResource::new(rx)); + Ok(rid) + } + Err(e) => match e { + quinn::ConnectionError::LocallyClosed + | quinn::ConnectionError::ApplicationClosed(..) => { + Err(bad_resource("QuicConn is closed")) + } + _ => Err(e.into()), + }, + } +} + +#[op2(async)] +#[serde] +pub(crate) async fn op_quic_open_uni( + #[cppgc] connection: &ConnectionResource, + state: Rc>, + wait_for_available: bool, +) -> Result { + let tx = if wait_for_available { + connection.0.open_uni().await? + } else { + let waker = noop_waker_ref(); + let mut cx = Context::from_waker(waker); + match pin!(connection.0.open_uni()).poll(&mut cx) { + Poll::Ready(r) => r?, + Poll::Pending => { + return Err(generic_error("Connection has reached the maximum number of outgoing concurrent unidirectional streams")); + } + } + }; + let rid = state + .borrow_mut() + .resource_table + .add(SendStreamResource::new(tx)); + Ok(rid) +} + +#[op2(async)] +pub(crate) async fn op_quic_send_datagram( + #[cppgc] connection: &ConnectionResource, + #[buffer] buf: JsBuffer, +) -> Result<(), AnyError> { + connection.0.send_datagram_wait(buf.to_vec().into()).await?; + Ok(()) +} + +#[op2(async)] +pub(crate) async fn op_quic_read_datagram( + #[cppgc] connection: &ConnectionResource, + #[buffer] mut buf: JsBuffer, +) -> Result { + let data = connection.0.read_datagram().await?; + buf[0..data.len()].copy_from_slice(&data); + Ok(data.len() as _) +} + +#[op2(fast)] +pub(crate) fn op_quic_max_datagram_size( + #[cppgc] connection: &ConnectionResource, +) -> Result { + Ok(connection.0.max_datagram_size().unwrap_or(0) as _) +} + +#[op2(fast)] +pub(crate) fn op_quic_get_send_stream_priority( + state: Rc>, + #[smi] rid: ResourceId, +) -> Result { + let resource = state + .borrow() + .resource_table + .get::(rid)?; + let r = RcRef::map(resource, |r| &r.0).try_borrow(); + match r { + Some(s) => Ok(s.priority()?), + None => Err(generic_error("Unable to get priority")), + } +} + +#[op2(fast)] +pub(crate) fn op_quic_set_send_stream_priority( + state: Rc>, + #[smi] rid: ResourceId, + priority: i32, +) -> Result<(), AnyError> { + let resource = state + .borrow() + .resource_table + .get::(rid)?; + let r = RcRef::map(resource, |r| &r.0).try_borrow(); + match r { + Some(s) => { + s.set_priority(priority)?; + Ok(()) + } + None => Err(generic_error("Unable to set priority")), + } +} diff --git a/ext/net/raw.rs b/ext/net/raw.rs index a2ebfb5acb5712..0312d661a57485 100644 --- a/ext/net/raw.rs +++ b/ext/net/raw.rs @@ -1,6 +1,7 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -use crate::io::TcpStreamResource; -use crate::ops_tls::TlsStreamResource; +// Copyright 2018-2025 the Deno authors. MIT license. +use std::borrow::Cow; +use std::rc::Rc; + use deno_core::error::bad_resource_id; use deno_core::error::custom_error; use deno_core::error::AnyError; @@ -9,8 +10,9 @@ use deno_core::CancelHandle; use deno_core::Resource; use deno_core::ResourceId; use deno_core::ResourceTable; -use std::borrow::Cow; -use std::rc::Rc; + +use crate::io::TcpStreamResource; +use crate::ops_tls::TlsStreamResource; pub trait NetworkStreamTrait: Into { type Resource; diff --git a/ext/net/resolve_addr.rs b/ext/net/resolve_addr.rs index 3a97081eac2ea6..9a757391ea0019 100644 --- a/ext/net/resolve_addr.rs +++ b/ext/net/resolve_addr.rs @@ -1,7 +1,8 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::net::SocketAddr; use std::net::ToSocketAddrs; + use tokio::net::lookup_host; /// Resolve network address *asynchronously*. @@ -38,12 +39,13 @@ fn make_addr_port_pair(hostname: &str, port: u16) -> (&str, u16) { #[cfg(test)] mod tests { - use super::*; use std::net::Ipv4Addr; use std::net::Ipv6Addr; use std::net::SocketAddrV4; use std::net::SocketAddrV6; + use super::*; + #[tokio::test] async fn resolve_addr1() { let expected = vec![SocketAddr::V4(SocketAddrV4::new( diff --git a/ext/net/tcp.rs b/ext/net/tcp.rs index 63baa8e4befdc6..f2cd5f57051826 100644 --- a/ext/net/tcp.rs +++ b/ext/net/tcp.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::collections::HashMap; use std::net::SocketAddr; use std::sync::Arc; diff --git a/ext/node/Cargo.toml b/ext/node/Cargo.toml index c4ee86a9574234..0f6ae1d7ab8a68 100644 --- a/ext/node/Cargo.toml +++ b/ext/node/Cargo.toml @@ -1,8 +1,8 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "deno_node" -version = "0.114.0" +version = "0.122.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -14,10 +14,10 @@ description = "Node compatibility for Deno" path = "lib.rs" [features] -sync_fs = ["deno_package_json/sync", "node_resolver/sync"] +sync_fs = ["deno_fs/sync_fs", "deno_package_json/sync", "node_resolver/sync"] [dependencies] -aead-gcm-stream = "0.3" +aead-gcm-stream = "0.4" aes.workspace = true async-trait.workspace = true base64.workspace = true @@ -49,12 +49,11 @@ errno = "0.2.8" faster-hex.workspace = true h2.workspace = true hkdf.workspace = true -home = "0.5.9" http.workspace = true http-body-util.workspace = true hyper.workspace = true hyper-util.workspace = true -idna = "0.3.0" +idna = "1.0.3" indexmap.workspace = true ipnetwork = "0.20.0" k256 = "0.13.1" @@ -93,8 +92,10 @@ simd-json = "0.14.0" sm3 = "0.4.2" spki.workspace = true stable_deref_trait = "1.2.0" +sys_traits = { workspace = true, features = ["real", "winapi", "libc"] } thiserror.workspace = true tokio.workspace = true +tokio-eld = "0.2" url.workspace = true webpki-root-certs.workspace = true winapi.workspace = true diff --git a/ext/node/benchmarks/child_process_ipc.mjs b/ext/node/benchmarks/child_process_ipc.mjs index fa671d76f77c0a..aa4e2699d78c25 100644 --- a/ext/node/benchmarks/child_process_ipc.mjs +++ b/ext/node/benchmarks/child_process_ipc.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { fork } from "node:child_process"; import process from "node:process"; diff --git a/ext/node/build.rs b/ext/node/build.rs index 041110f257e68d..0d42f2cd765655 100644 --- a/ext/node/build.rs +++ b/ext/node/build.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::env; diff --git a/ext/node/global.rs b/ext/node/global.rs index 4d6695431d1614..a89a3f98304fca 100644 --- a/ext/node/global.rs +++ b/ext/node/global.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_core::v8; use deno_core::v8::GetPropertyNamesArgs; diff --git a/ext/node/lib.rs b/ext/node/lib.rs index 84f39552c15205..d7aa82430da02a 100644 --- a/ext/node/lib.rs +++ b/ext/node/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. #![deny(clippy::print_stderr)] #![deny(clippy::print_stdout)] @@ -15,7 +15,9 @@ use deno_core::url::Url; use deno_core::v8; use deno_core::v8::ExternalReference; use node_resolver::errors::ClosestPkgJsonError; +use node_resolver::IsBuiltInNodeModuleChecker; use node_resolver::NpmPackageFolderResolverRc; +use node_resolver::PackageJsonResolverRc; use once_cell::sync::Lazy; extern crate libz_sys as zlib; @@ -157,7 +159,10 @@ pub trait NodeRequireLoader { path: &'a Path, ) -> Result, AnyError>; - fn load_text_file_lossy(&self, path: &Path) -> Result; + fn load_text_file_lossy( + &self, + path: &Path, + ) -> Result, AnyError>; /// Get if the module kind is maybe CJS and loading should determine /// if its CJS or ESM. @@ -180,16 +185,17 @@ fn op_node_build_os() -> String { } #[derive(Clone)] -pub struct NodeExtInitServices { +pub struct NodeExtInitServices { pub node_require_loader: NodeRequireLoaderRc, - pub node_resolver: NodeResolverRc, + pub node_resolver: NodeResolverRc, pub npm_resolver: NpmPackageFolderResolverRc, - pub pkg_json_resolver: PackageJsonResolverRc, + pub pkg_json_resolver: PackageJsonResolverRc, + pub sys: TSys, } deno_core::extension!(deno_node, deps = [ deno_io, deno_fs ], - parameters = [P: NodePermissions], + parameters = [P: NodePermissions, TSys: ExtNodeSys], ops = [ ops::blocklist::op_socket_address_parse, ops::blocklist::op_socket_address_get_serialization, @@ -257,6 +263,7 @@ deno_core::extension!(deno_node, ops::crypto::keys::op_node_derive_public_key_from_private_key, ops::crypto::keys::op_node_dh_keys_generate_and_export, ops::crypto::keys::op_node_export_private_key_der, + ops::crypto::keys::op_node_export_private_key_jwk, ops::crypto::keys::op_node_export_private_key_pem, ops::crypto::keys::op_node_export_public_key_der, ops::crypto::keys::op_node_export_public_key_pem, @@ -361,9 +368,9 @@ deno_core::extension!(deno_node, ops::zlib::brotli::op_create_brotli_decompress, ops::zlib::brotli::op_brotli_decompress_stream, ops::zlib::brotli::op_brotli_decompress_stream_end, - ops::http::op_node_http_request

, ops::http::op_node_http_fetch_response_upgrade, - ops::http::op_node_http_fetch_send, + ops::http::op_node_http_request_with_conn

, + ops::http::op_node_http_await_response, ops::http2::op_http2_connect, ops::http2::op_http2_poll_client_connection, ops::http2::op_http2_client_request, @@ -386,29 +393,29 @@ deno_core::extension!(deno_node, op_node_build_os, ops::require::op_require_can_parse_as_esm, ops::require::op_require_init_paths, - ops::require::op_require_node_module_paths

, + ops::require::op_require_node_module_paths, ops::require::op_require_proxy_path, - ops::require::op_require_is_deno_dir_package, + ops::require::op_require_is_deno_dir_package, ops::require::op_require_resolve_deno_dir, ops::require::op_require_is_maybe_cjs, ops::require::op_require_is_request_relative, ops::require::op_require_resolve_lookup_paths, - ops::require::op_require_try_self_parent_path

, - ops::require::op_require_try_self

, - ops::require::op_require_real_path

, + ops::require::op_require_try_self_parent_path, + ops::require::op_require_try_self, + ops::require::op_require_real_path, ops::require::op_require_path_is_absolute, ops::require::op_require_path_dirname, - ops::require::op_require_stat

, + ops::require::op_require_stat, ops::require::op_require_path_resolve, ops::require::op_require_path_basename, ops::require::op_require_read_file

, ops::require::op_require_as_file_path, - ops::require::op_require_resolve_exports

, - ops::require::op_require_read_package_scope

, - ops::require::op_require_package_imports_resolve

, + ops::require::op_require_resolve_exports, + ops::require::op_require_read_package_scope, + ops::require::op_require_package_imports_resolve, ops::require::op_require_break_on_next_statement, ops::util::op_node_guess_handle_type, - ops::worker_threads::op_worker_threads_filename

, + ops::worker_threads::op_worker_threads_filename, ops::ipc::op_node_child_ipc_pipe, ops::ipc::op_node_ipc_write, ops::ipc::op_node_ipc_read, @@ -427,6 +434,9 @@ deno_core::extension!(deno_node, ops::inspector::op_inspector_emit_protocol_event, ops::inspector::op_inspector_enabled, ], + objects = [ + ops::perf_hooks::EldHistogram + ], esm_entry_point = "ext:deno_node/02_init.js", esm = [ dir "polyfills", @@ -671,13 +681,14 @@ deno_core::extension!(deno_node, "node:zlib" = "zlib.ts", ], options = { - maybe_init: Option, + maybe_init: Option>, fs: deno_fs::FileSystemRc, }, state = |state, options| { state.put(options.fs.clone()); if let Some(init) = &options.maybe_init { + state.put(init.sys.clone()); state.put(init.node_require_loader.clone()); state.put(init.node_resolver.clone()); state.put(init.npm_resolver.clone()); @@ -801,92 +812,32 @@ deno_core::extension!(deno_node, }, ); -pub type NodeResolver = node_resolver::NodeResolver; -#[allow(clippy::disallowed_types)] -pub type NodeResolverRc = - deno_fs::sync::MaybeArc>; -pub type PackageJsonResolver = - node_resolver::PackageJsonResolver; -#[allow(clippy::disallowed_types)] -pub type PackageJsonResolverRc = deno_fs::sync::MaybeArc< - node_resolver::PackageJsonResolver, ->; - #[derive(Debug)] -pub struct DenoFsNodeResolverEnv { - fs: deno_fs::FileSystemRc, -} +pub struct RealIsBuiltInNodeModuleChecker; -impl DenoFsNodeResolverEnv { - pub fn new(fs: deno_fs::FileSystemRc) -> Self { - Self { fs } - } -} - -impl node_resolver::env::NodeResolverEnv for DenoFsNodeResolverEnv { +impl IsBuiltInNodeModuleChecker for RealIsBuiltInNodeModuleChecker { + #[inline] fn is_builtin_node_module(&self, specifier: &str) -> bool { is_builtin_node_module(specifier) } - - fn realpath_sync( - &self, - path: &std::path::Path, - ) -> std::io::Result { - self - .fs - .realpath_sync(path) - .map_err(|err| err.into_io_error()) - } - - fn stat_sync( - &self, - path: &std::path::Path, - ) -> std::io::Result { - self - .fs - .stat_sync(path) - .map(|stat| node_resolver::env::NodeResolverFsStat { - is_file: stat.is_file, - is_dir: stat.is_directory, - is_symlink: stat.is_symlink, - }) - .map_err(|err| err.into_io_error()) - } - - fn exists_sync(&self, path: &std::path::Path) -> bool { - self.fs.exists_sync(path) - } - - fn pkg_json_fs(&self) -> &dyn deno_package_json::fs::DenoPkgJsonFs { - self - } } -impl deno_package_json::fs::DenoPkgJsonFs for DenoFsNodeResolverEnv { - fn read_to_string_lossy( - &self, - path: &std::path::Path, - ) -> Result { - self - .fs - .read_text_file_lossy_sync(path, None) - .map_err(|err| err.into_io_error()) - } +pub trait ExtNodeSys: + sys_traits::BaseFsCanonicalize + + sys_traits::BaseFsMetadata + + sys_traits::BaseFsRead + + sys_traits::EnvCurrentDir + + Clone +{ } -pub struct DenoPkgJsonFsAdapter<'a>(pub &'a dyn deno_fs::FileSystem); +impl ExtNodeSys for sys_traits::impls::RealSys {} -impl<'a> deno_package_json::fs::DenoPkgJsonFs for DenoPkgJsonFsAdapter<'a> { - fn read_to_string_lossy( - &self, - path: &Path, - ) -> Result { - self - .0 - .read_text_file_lossy_sync(path, None) - .map_err(|err| err.into_io_error()) - } -} +pub type NodeResolver = + node_resolver::NodeResolver; +#[allow(clippy::disallowed_types)] +pub type NodeResolverRc = deno_fs::sync::MaybeArc>; +#[allow(clippy::disallowed_types)] pub fn create_host_defined_options<'s>( scope: &mut v8::HandleScope<'s>, diff --git a/ext/node/ops/blocklist.rs b/ext/node/ops/blocklist.rs index 6c64d68ecae653..bcb36fc97b4c5b 100644 --- a/ext/node/ops/blocklist.rs +++ b/ext/node/ops/blocklist.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::cell::RefCell; use std::collections::HashSet; @@ -9,7 +9,6 @@ use std::net::SocketAddr; use deno_core::op2; use deno_core::OpState; - use ipnetwork::IpNetwork; use ipnetwork::Ipv4Network; use ipnetwork::Ipv6Network; diff --git a/ext/node/ops/buffer.rs b/ext/node/ops/buffer.rs index 01f878ec15bdd2..e3ae2b2391fa69 100644 --- a/ext/node/ops/buffer.rs +++ b/ext/node/ops/buffer.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_core::anyhow::anyhow; use deno_core::anyhow::Result; diff --git a/ext/node/ops/crypto/cipher.rs b/ext/node/ops/crypto/cipher.rs index ec45146b49aeaa..500d8d1b4b95e2 100644 --- a/ext/node/ops/crypto/cipher.rs +++ b/ext/node/ops/crypto/cipher.rs @@ -1,4 +1,8 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::borrow::Cow; +use std::cell::RefCell; +use std::rc::Rc; use aes::cipher::block_padding::Pkcs7; use aes::cipher::BlockDecryptMut; @@ -8,10 +12,6 @@ use deno_core::Resource; use digest::generic_array::GenericArray; use digest::KeyInit; -use std::borrow::Cow; -use std::cell::RefCell; -use std::rc::Rc; - type Tag = Option>; type Aes128Gcm = aead_gcm_stream::AesGcm; @@ -172,27 +172,19 @@ impl Cipher { ) -> Result { use Cipher::*; Ok(match algorithm_name { - "aes-128-cbc" => { + "aes128" | "aes-128-cbc" => { Aes128Cbc(Box::new(cbc::Encryptor::new(key.into(), iv.into()))) } "aes-128-ecb" => Aes128Ecb(Box::new(ecb::Encryptor::new(key.into()))), "aes-192-ecb" => Aes192Ecb(Box::new(ecb::Encryptor::new(key.into()))), "aes-256-ecb" => Aes256Ecb(Box::new(ecb::Encryptor::new(key.into()))), "aes-128-gcm" => { - if iv.len() != 12 { - return Err(CipherError::InvalidIvLength); - } - let cipher = aead_gcm_stream::AesGcm::::new(key.into(), iv); Aes128Gcm(Box::new(cipher)) } "aes-256-gcm" => { - if iv.len() != 12 { - return Err(CipherError::InvalidIvLength); - } - let cipher = aead_gcm_stream::AesGcm::::new(key.into(), iv); @@ -395,20 +387,12 @@ impl Decipher { "aes-192-ecb" => Aes192Ecb(Box::new(ecb::Decryptor::new(key.into()))), "aes-256-ecb" => Aes256Ecb(Box::new(ecb::Decryptor::new(key.into()))), "aes-128-gcm" => { - if iv.len() != 12 { - return Err(DecipherError::InvalidIvLength); - } - let decipher = aead_gcm_stream::AesGcm::::new(key.into(), iv); Aes128Gcm(Box::new(decipher)) } "aes-256-gcm" => { - if iv.len() != 12 { - return Err(DecipherError::InvalidIvLength); - } - let decipher = aead_gcm_stream::AesGcm::::new(key.into(), iv); diff --git a/ext/node/ops/crypto/dh.rs b/ext/node/ops/crypto/dh.rs index ff2bd030ebecc8..88452c3660759a 100644 --- a/ext/node/ops/crypto/dh.rs +++ b/ext/node/ops/crypto/dh.rs @@ -1,10 +1,11 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use super::primes::Prime; use num_bigint_dig::BigUint; use num_bigint_dig::RandBigInt; use num_traits::FromPrimitive; +use super::primes::Prime; + #[derive(Clone)] pub struct PublicKey(BigUint); diff --git a/ext/node/ops/crypto/digest.rs b/ext/node/ops/crypto/digest.rs index a7d8fb51f1b26c..f9810e8c673bee 100644 --- a/ext/node/ops/crypto/digest.rs +++ b/ext/node/ops/crypto/digest.rs @@ -1,11 +1,12 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. +use std::cell::RefCell; +use std::rc::Rc; + use deno_core::GarbageCollected; use digest::Digest; use digest::DynDigest; use digest::ExtendableOutput; use digest::Update; -use std::cell::RefCell; -use std::rc::Rc; pub struct Hasher { pub hash: Rc>>, diff --git a/ext/node/ops/crypto/keys.rs b/ext/node/ops/crypto/keys.rs index f164972d48afc6..d982d96a8c18ad 100644 --- a/ext/node/ops/crypto/keys.rs +++ b/ext/node/ops/crypto/keys.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::borrow::Cow; use std::cell::RefCell; @@ -26,6 +26,7 @@ use rsa::pkcs1::DecodeRsaPrivateKey as _; use rsa::pkcs1::DecodeRsaPublicKey; use rsa::pkcs1::EncodeRsaPrivateKey as _; use rsa::pkcs1::EncodeRsaPublicKey; +use rsa::traits::PrivateKeyParts; use rsa::traits::PublicKeyParts; use rsa::RsaPrivateKey; use rsa::RsaPublicKey; @@ -255,6 +256,16 @@ impl EcPrivateKey { EcPrivateKey::P384(key) => EcPublicKey::P384(key.public_key()), } } + + pub fn to_jwk(&self) -> Result { + match self { + EcPrivateKey::P224(_) => { + Err(AsymmetricPrivateKeyJwkError::UnsupportedJwkEcCurveP224) + } + EcPrivateKey::P256(key) => Ok(key.to_jwk()), + EcPrivateKey::P384(key) => Ok(key.to_jwk()), + } + } } // https://oidref.com/ @@ -1107,6 +1118,16 @@ fn bytes_to_b64(bytes: &[u8]) -> String { BASE64_URL_SAFE_NO_PAD.encode(bytes) } +#[derive(Debug, thiserror::Error)] +pub enum AsymmetricPrivateKeyJwkError { + #[error("key is not an asymmetric private key")] + KeyIsNotAsymmetricPrivateKey, + #[error("Unsupported JWK EC curve: P224")] + UnsupportedJwkEcCurveP224, + #[error("jwk export not implemented for this key type")] + JwkExportNotImplementedForKeyType, +} + #[derive(Debug, thiserror::Error)] pub enum AsymmetricPublicKeyJwkError { #[error("key is not an asymmetric public key")] @@ -1328,7 +1349,73 @@ pub enum AsymmetricPrivateKeyDerError { UnsupportedKeyType(String), } +// https://datatracker.ietf.org/doc/html/rfc7518#section-6.3.2 +fn rsa_private_to_jwk(key: &RsaPrivateKey) -> deno_core::serde_json::Value { + let n = key.n(); + let e = key.e(); + let d = key.d(); + let p = &key.primes()[0]; + let q = &key.primes()[1]; + let dp = key.dp(); + let dq = key.dq(); + let qi = key.crt_coefficient(); + let oth = &key.primes()[2..]; + + let mut obj = deno_core::serde_json::json!({ + "kty": "RSA", + "n": bytes_to_b64(&n.to_bytes_be()), + "e": bytes_to_b64(&e.to_bytes_be()), + "d": bytes_to_b64(&d.to_bytes_be()), + "p": bytes_to_b64(&p.to_bytes_be()), + "q": bytes_to_b64(&q.to_bytes_be()), + "dp": dp.map(|dp| bytes_to_b64(&dp.to_bytes_be())), + "dq": dq.map(|dq| bytes_to_b64(&dq.to_bytes_be())), + "qi": qi.map(|qi| bytes_to_b64(&qi.to_bytes_be())), + }); + + if !oth.is_empty() { + obj["oth"] = deno_core::serde_json::json!(oth + .iter() + .map(|o| o.to_bytes_be()) + .collect::>()); + } + + obj +} + impl AsymmetricPrivateKey { + fn export_jwk( + &self, + ) -> Result { + match self { + AsymmetricPrivateKey::Rsa(key) => Ok(rsa_private_to_jwk(key)), + AsymmetricPrivateKey::RsaPss(key) => Ok(rsa_private_to_jwk(&key.key)), + AsymmetricPrivateKey::Ec(key) => { + let jwk = key.to_jwk()?; + Ok(deno_core::serde_json::json!(jwk)) + } + AsymmetricPrivateKey::X25519(static_secret) => { + let bytes = static_secret.to_bytes(); + + Ok(deno_core::serde_json::json!({ + "kty": "OKP", + "crv": "X25519", + "d": bytes_to_b64(&bytes), + })) + } + AsymmetricPrivateKey::Ed25519(key) => { + let bytes = key.to_bytes(); + + Ok(deno_core::serde_json::json!({ + "kty": "OKP", + "crv": "Ed25519", + "d": bytes_to_b64(&bytes), + })) + } + _ => Err(AsymmetricPrivateKeyJwkError::JwkExportNotImplementedForKeyType), + } + } + fn export_der( &self, typ: &str, @@ -2329,6 +2416,28 @@ pub fn op_node_export_private_key_pem( Ok(String::from_utf8(out).expect("invalid pem is not possible")) } +#[derive(Debug, thiserror::Error)] +pub enum ExportPrivateKeyJwkError { + #[error(transparent)] + AsymmetricPublicKeyJwk(#[from] AsymmetricPrivateKeyJwkError), + #[error("very large data")] + VeryLargeData, + #[error(transparent)] + Der(#[from] der::Error), +} + +#[op2] +#[serde] +pub fn op_node_export_private_key_jwk( + #[cppgc] handle: &KeyObjectHandle, +) -> Result { + let private_key = handle + .as_private_key() + .ok_or(AsymmetricPrivateKeyJwkError::KeyIsNotAsymmetricPrivateKey)?; + + Ok(private_key.export_jwk()?) +} + #[op2] #[buffer] pub fn op_node_export_private_key_der( diff --git a/ext/node/ops/crypto/md5_sha1.rs b/ext/node/ops/crypto/md5_sha1.rs index 9164b0a1cbb894..c6c6eb1c83ce31 100644 --- a/ext/node/ops/crypto/md5_sha1.rs +++ b/ext/node/ops/crypto/md5_sha1.rs @@ -1,5 +1,6 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use core::fmt; + use digest::core_api::AlgorithmName; use digest::core_api::BlockSizeUser; use digest::core_api::Buffer; diff --git a/ext/node/ops/crypto/mod.rs b/ext/node/ops/crypto/mod.rs index e90e820909cdad..19a0bbfc401e4e 100644 --- a/ext/node/ops/crypto/mod.rs +++ b/ext/node/ops/crypto/mod.rs @@ -1,4 +1,7 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. +use std::future::Future; +use std::rc::Rc; + use deno_core::error::generic_error; use deno_core::error::type_error; use deno_core::op2; @@ -16,16 +19,13 @@ use keys::EcPublicKey; use keys::KeyObjectHandle; use num_bigint::BigInt; use num_bigint_dig::BigUint; +use p224::NistP224; +use p256::NistP256; +use p384::NistP384; use rand::distributions::Distribution; use rand::distributions::Uniform; use rand::Rng; use ring::signature::Ed25519KeyPair; -use std::future::Future; -use std::rc::Rc; - -use p224::NistP224; -use p256::NistP256; -use p384::NistP384; use rsa::pkcs8::DecodePrivateKey; use rsa::pkcs8::DecodePublicKey; use rsa::Oaep; diff --git a/ext/node/ops/crypto/pkcs3.rs b/ext/node/ops/crypto/pkcs3.rs index 577251460849de..6668148d23b493 100644 --- a/ext/node/ops/crypto/pkcs3.rs +++ b/ext/node/ops/crypto/pkcs3.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // // PKCS #3: Diffie-Hellman Key Agreement Standard diff --git a/ext/node/ops/crypto/primes.rs b/ext/node/ops/crypto/primes.rs index 2e5d1ff63cd811..65ffa7a7a0062f 100644 --- a/ext/node/ops/crypto/primes.rs +++ b/ext/node/ops/crypto/primes.rs @@ -1,4 +1,6 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::ops::Deref; use num_bigint::BigInt; use num_bigint_dig::RandPrime; @@ -6,7 +8,6 @@ use num_integer::Integer; use num_traits::One; use num_traits::Zero; use rand::Rng; -use std::ops::Deref; #[derive(Clone)] pub struct Prime(pub num_bigint_dig::BigUint); @@ -283,9 +284,10 @@ static SMALL_PRIMES: [u32; 2047] = [ #[cfg(test)] mod tests { - use super::*; use num_bigint::BigInt; + use super::*; + #[test] fn test_prime() { for &p in SMALL_PRIMES.iter() { diff --git a/ext/node/ops/crypto/sign.rs b/ext/node/ops/crypto/sign.rs index 30094c07654197..e7c15d16b755d9 100644 --- a/ext/node/ops/crypto/sign.rs +++ b/ext/node/ops/crypto/sign.rs @@ -1,24 +1,24 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. +use core::ops::Add; + +use ecdsa::der::MaxOverhead; +use ecdsa::der::MaxSize; +use elliptic_curve::generic_array::ArrayLength; +use elliptic_curve::FieldBytesSize; use rand::rngs::OsRng; use rsa::signature::hazmat::PrehashSigner as _; use rsa::signature::hazmat::PrehashVerifier as _; use rsa::traits::SignatureScheme as _; use spki::der::Decode; -use crate::ops::crypto::digest::match_fixed_digest; -use crate::ops::crypto::digest::match_fixed_digest_with_oid; - use super::keys::AsymmetricPrivateKey; use super::keys::AsymmetricPublicKey; use super::keys::EcPrivateKey; use super::keys::EcPublicKey; use super::keys::KeyObjectHandle; use super::keys::RsaPssHashAlgorithm; -use core::ops::Add; -use ecdsa::der::MaxOverhead; -use ecdsa::der::MaxSize; -use elliptic_curve::generic_array::ArrayLength; -use elliptic_curve::FieldBytesSize; +use crate::ops::crypto::digest::match_fixed_digest; +use crate::ops::crypto::digest::match_fixed_digest_with_oid; fn dsa_signature( encoding: u32, diff --git a/ext/node/ops/crypto/x509.rs b/ext/node/ops/crypto/x509.rs index ab8e52f703dc18..23b19720e33fed 100644 --- a/ext/node/ops/crypto/x509.rs +++ b/ext/node/ops/crypto/x509.rs @@ -1,7 +1,9 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use deno_core::op2; +use std::ops::Deref; +use deno_core::op2; +use digest::Digest; use x509_parser::der_parser::asn1_rs::Any; use x509_parser::der_parser::asn1_rs::Tag; use x509_parser::der_parser::oid::Oid; @@ -9,14 +11,10 @@ pub use x509_parser::error::X509Error; use x509_parser::extensions; use x509_parser::pem; use x509_parser::prelude::*; - -use super::KeyObjectHandle; - -use std::ops::Deref; use yoke::Yoke; use yoke::Yokeable; -use digest::Digest; +use super::KeyObjectHandle; enum CertificateSources { Der(Box<[u8]>), diff --git a/ext/node/ops/fs.rs b/ext/node/ops/fs.rs index 9c0e4e1ccff212..73db3ea2e562fa 100644 --- a/ext/node/ops/fs.rs +++ b/ext/node/ops/fs.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::cell::RefCell; use std::rc::Rc; @@ -26,7 +26,7 @@ pub enum FsError { Fs(#[from] deno_io::fs::FsError), } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_node_fs_exists_sync

( state: &mut OpState, #[string] path: String, @@ -41,7 +41,7 @@ where Ok(fs.exists_sync(&path)) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_node_fs_exists

( state: Rc>, #[string] path: String, @@ -60,7 +60,7 @@ where Ok(fs.exists_async(path).await?) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_node_cp_sync

( state: &mut OpState, #[string] path: &str, @@ -81,7 +81,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_node_cp

( state: Rc>, #[string] path: String, @@ -117,7 +117,7 @@ pub struct StatFs { pub ffree: u64, } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_node_statfs

( state: Rc>, @@ -207,6 +207,7 @@ where { use std::ffi::OsStr; use std::os::windows::ffi::OsStrExt; + use windows_sys::Win32::Storage::FileSystem::GetDiskFreeSpaceW; let _ = bigint; @@ -258,7 +259,7 @@ where } } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_node_lutimes_sync

( state: &mut OpState, #[string] path: &str, @@ -279,7 +280,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_node_lutimes

( state: Rc>, #[string] path: String, @@ -305,7 +306,7 @@ where Ok(()) } -#[op2] +#[op2(stack_trace)] pub fn op_node_lchown_sync

( state: &mut OpState, #[string] path: String, @@ -323,7 +324,7 @@ where Ok(()) } -#[op2(async)] +#[op2(async, stack_trace)] pub async fn op_node_lchown

( state: Rc>, #[string] path: String, diff --git a/ext/node/ops/http.rs b/ext/node/ops/http.rs index 69571078fe26e1..ad6217b6a68132 100644 --- a/ext/node/ops/http.rs +++ b/ext/node/ops/http.rs @@ -1,19 +1,22 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::borrow::Cow; use std::cell::RefCell; +use std::cmp::min; +use std::fmt::Debug; use std::pin::Pin; use std::rc::Rc; use std::task::Context; use std::task::Poll; use bytes::Bytes; +use deno_core::error::bad_resource; +use deno_core::error::type_error; use deno_core::futures::stream::Peekable; use deno_core::futures::Future; use deno_core::futures::FutureExt; use deno_core::futures::Stream; use deno_core::futures::StreamExt; -use deno_core::futures::TryFutureExt; use deno_core::op2; use deno_core::serde::Serialize; use deno_core::unsync::spawn; @@ -25,17 +28,17 @@ use deno_core::ByteString; use deno_core::CancelFuture; use deno_core::CancelHandle; use deno_core::CancelTryFuture; +use deno_core::Canceled; use deno_core::OpState; use deno_core::RcRef; use deno_core::Resource; use deno_core::ResourceId; -use deno_fetch::get_or_create_client_from_state; use deno_fetch::FetchCancelHandle; -use deno_fetch::FetchError; -use deno_fetch::FetchRequestResource; use deno_fetch::FetchReturn; -use deno_fetch::HttpClientResource; use deno_fetch::ResBody; +use deno_net::io::TcpStreamResource; +use deno_net::ops_tls::TlsStreamResource; +use deno_permissions::PermissionCheckError; use http::header::HeaderMap; use http::header::HeaderName; use http::header::HeaderValue; @@ -44,41 +47,139 @@ use http::header::CONTENT_LENGTH; use http::Method; use http_body_util::BodyExt; use hyper::body::Frame; +use hyper::body::Incoming; use hyper_util::rt::TokioIo; -use std::cmp::min; use tokio::io::AsyncReadExt; use tokio::io::AsyncWriteExt; -#[op2] +#[derive(Default, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct NodeHttpResponse { + pub status: u16, + pub status_text: String, + pub headers: Vec<(ByteString, ByteString)>, + pub url: String, + pub response_rid: ResourceId, + pub content_length: Option, + pub remote_addr_ip: Option, + pub remote_addr_port: Option, + pub error: Option, +} + +type CancelableResponseResult = + Result, hyper::Error>, Canceled>; + +pub struct NodeHttpClientResponse { + response: Pin>>, + url: String, +} + +impl Debug for NodeHttpClientResponse { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("NodeHttpClientResponse") + .field("url", &self.url) + .finish() + } +} + +impl deno_core::Resource for NodeHttpClientResponse { + fn name(&self) -> Cow { + "nodeHttpClientResponse".into() + } +} + +#[derive(Debug, thiserror::Error)] +pub enum ConnError { + #[error(transparent)] + Resource(deno_core::error::AnyError), + #[error(transparent)] + Permission(#[from] PermissionCheckError), + #[error("Invalid URL {0}")] + InvalidUrl(Url), + #[error(transparent)] + InvalidHeaderName(#[from] http::header::InvalidHeaderName), + #[error(transparent)] + InvalidHeaderValue(#[from] http::header::InvalidHeaderValue), + #[error(transparent)] + Url(#[from] url::ParseError), + #[error(transparent)] + Method(#[from] http::method::InvalidMethod), + #[error(transparent)] + Io(#[from] std::io::Error), + #[error("TLS stream is currently in use")] + TlsStreamBusy, + #[error("TCP stream is currently in use")] + TcpStreamBusy, + #[error(transparent)] + ReuniteTcp(#[from] tokio::net::tcp::ReuniteError), + #[error(transparent)] + Canceled(#[from] deno_core::Canceled), + #[error(transparent)] + Hyper(#[from] hyper::Error), +} + +#[op2(async, stack_trace)] #[serde] -pub fn op_node_http_request

( - state: &mut OpState, +pub async fn op_node_http_request_with_conn

( + state: Rc>, #[serde] method: ByteString, #[string] url: String, #[serde] headers: Vec<(ByteString, ByteString)>, - #[smi] client_rid: Option, #[smi] body: Option, -) -> Result + #[smi] conn_rid: ResourceId, + encrypted: bool, +) -> Result where P: crate::NodePermissions + 'static, { - let client = if let Some(rid) = client_rid { - let r = state + let (_handle, mut sender) = if encrypted { + let resource_rc = state + .borrow_mut() .resource_table - .get::(rid) - .map_err(FetchError::Resource)?; - r.client.clone() + .take::(conn_rid) + .map_err(ConnError::Resource)?; + let resource = + Rc::try_unwrap(resource_rc).map_err(|_e| ConnError::TlsStreamBusy)?; + let (read_half, write_half) = resource.into_inner(); + let tcp_stream = read_half.unsplit(write_half); + let io = TokioIo::new(tcp_stream); + let (sender, conn) = hyper::client::conn::http1::handshake(io).await?; + ( + tokio::task::spawn(async move { conn.with_upgrades().await }), + sender, + ) } else { - get_or_create_client_from_state(state)? + let resource_rc = state + .borrow_mut() + .resource_table + .take::(conn_rid) + .map_err(ConnError::Resource)?; + let resource = + Rc::try_unwrap(resource_rc).map_err(|_| ConnError::TcpStreamBusy)?; + let (read_half, write_half) = resource.into_inner(); + let tcp_stream = read_half.reunite(write_half)?; + let io = TokioIo::new(tcp_stream); + let (sender, conn) = hyper::client::conn::http1::handshake(io).await?; + + // Spawn a task to poll the connection, driving the HTTP state + ( + tokio::task::spawn(async move { + conn.with_upgrades().await?; + Ok::<_, _>(()) + }), + sender, + ) }; + // Create the request. let method = Method::from_bytes(&method)?; - let mut url = Url::parse(&url)?; - let maybe_authority = deno_fetch::extract_authority(&mut url); + let mut url_parsed = Url::parse(&url)?; + let maybe_authority = deno_fetch::extract_authority(&mut url_parsed); { - let permissions = state.borrow_mut::

(); - permissions.check_net_url(&url, "ClientRequest")?; + let mut state_ = state.borrow_mut(); + let permissions = state_.borrow_mut::

(); + permissions.check_net_url(&url_parsed, "ClientRequest")?; } let mut header_map = HeaderMap::new(); @@ -93,9 +194,10 @@ where ( BodyExt::boxed(NodeHttpResourceToBodyAdapter::new( state + .borrow_mut() .resource_table .take_any(body) - .map_err(FetchError::Resource)?, + .map_err(ConnError::Resource)?, )), None, ) @@ -117,10 +219,13 @@ where let mut request = http::Request::new(body); *request.method_mut() = method.clone(); - *request.uri_mut() = url - .as_str() + let path = url_parsed.path(); + let query = url_parsed.query(); + *request.uri_mut() = query + .map(|q| format!("{}?{}", path, q)) + .unwrap_or_else(|| path.to_string()) .parse() - .map_err(|_| FetchError::InvalidUrl(url.clone()))?; + .map_err(|_| ConnError::InvalidUrl(url_parsed.clone()))?; *request.headers_mut() = header_map; if let Some((username, password)) = maybe_authority { @@ -136,86 +241,44 @@ where let cancel_handle = CancelHandle::new_rc(); let cancel_handle_ = cancel_handle.clone(); - let fut = async move { - client - .send(request) - .map_err(Into::into) - .or_cancel(cancel_handle_) - .await - }; + let fut = + async move { sender.send_request(request).or_cancel(cancel_handle_).await }; - let request_rid = state.resource_table.add(FetchRequestResource { - future: Box::pin(fut), - url, - }); + let rid = state + .borrow_mut() + .resource_table + .add(NodeHttpClientResponse { + response: Box::pin(fut), + url: url.clone(), + }); - let cancel_handle_rid = - state.resource_table.add(FetchCancelHandle(cancel_handle)); + let cancel_handle_rid = state + .borrow_mut() + .resource_table + .add(FetchCancelHandle(cancel_handle)); Ok(FetchReturn { - request_rid, + request_rid: rid, cancel_handle_rid: Some(cancel_handle_rid), }) } -#[derive(Default, Serialize)] -#[serde(rename_all = "camelCase")] -pub struct NodeHttpFetchResponse { - pub status: u16, - pub status_text: String, - pub headers: Vec<(ByteString, ByteString)>, - pub url: String, - pub response_rid: ResourceId, - pub content_length: Option, - pub remote_addr_ip: Option, - pub remote_addr_port: Option, - pub error: Option, -} - #[op2(async)] #[serde] -pub async fn op_node_http_fetch_send( +pub async fn op_node_http_await_response( state: Rc>, #[smi] rid: ResourceId, -) -> Result { - let request = state +) -> Result { + let resource = state .borrow_mut() .resource_table - .take::(rid) - .map_err(FetchError::Resource)?; - - let request = Rc::try_unwrap(request) - .ok() - .expect("multiple op_node_http_fetch_send ongoing"); - - let res = match request.future.await { - Ok(Ok(res)) => res, - Ok(Err(err)) => { - // We're going to try and rescue the error cause from a stream and return it from this fetch. - // If any error in the chain is a hyper body error, return that as a special result we can use to - // reconstruct an error chain (eg: `new TypeError(..., { cause: new Error(...) })`). - // TODO(mmastrac): it would be a lot easier if we just passed a v8::Global through here instead - - if let FetchError::ClientSend(err_src) = &err { - if let Some(client_err) = std::error::Error::source(&err_src.source) { - if let Some(err_src) = client_err.downcast_ref::() { - if let Some(err_src) = std::error::Error::source(err_src) { - return Ok(NodeHttpFetchResponse { - error: Some(err_src.to_string()), - ..Default::default() - }); - } - } - } - } - - return Err(err); - } - Err(_) => return Err(FetchError::RequestCanceled), - }; + .take::(rid) + .map_err(ConnError::Resource)?; + let resource = Rc::try_unwrap(resource) + .map_err(|_| ConnError::Resource(bad_resource("NodeHttpClientResponse")))?; + let res = resource.response.await??; let status = res.status(); - let url = request.url.into(); let mut res_headers = Vec::new(); for (key, val) in res.headers().iter() { res_headers.push((key.as_str().into(), val.as_bytes().into())); @@ -232,16 +295,22 @@ pub async fn op_node_http_fetch_send( (None, None) }; + let (parts, body) = res.into_parts(); + let body = body.map_err(deno_core::anyhow::Error::from); + let body = body.boxed(); + + let res = http::Response::from_parts(parts, body); + let response_rid = state .borrow_mut() .resource_table - .add(NodeHttpFetchResponseResource::new(res, content_length)); + .add(NodeHttpResponseResource::new(res, content_length)); - Ok(NodeHttpFetchResponse { + Ok(NodeHttpResponse { status: status.as_u16(), status_text: status.canonical_reason().unwrap_or("").to_string(), headers: res_headers, - url, + url: resource.url, response_rid, content_length, remote_addr_ip, @@ -255,12 +324,12 @@ pub async fn op_node_http_fetch_send( pub async fn op_node_http_fetch_response_upgrade( state: Rc>, #[smi] rid: ResourceId, -) -> Result { +) -> Result { let raw_response = state .borrow_mut() .resource_table - .take::(rid) - .map_err(FetchError::Resource)?; + .take::(rid) + .map_err(ConnError::Resource)?; let raw_response = Rc::try_unwrap(raw_response) .expect("Someone is holding onto NodeHttpFetchResponseResource"); @@ -283,7 +352,7 @@ pub async fn op_node_http_fetch_response_upgrade( } read_tx.write_all(&buf[..read]).await?; } - Ok::<_, FetchError>(()) + Ok::<_, ConnError>(()) }); spawn(async move { let mut buf = [0; 1024]; @@ -294,7 +363,7 @@ pub async fn op_node_http_fetch_response_upgrade( } upgraded_tx.write_all(&buf[..read]).await?; } - Ok::<_, FetchError>(()) + Ok::<_, ConnError>(()) }); } @@ -379,13 +448,13 @@ impl Default for NodeHttpFetchResponseReader { } #[derive(Debug)] -pub struct NodeHttpFetchResponseResource { +pub struct NodeHttpResponseResource { pub response_reader: AsyncRefCell, pub cancel: CancelHandle, pub size: Option, } -impl NodeHttpFetchResponseResource { +impl NodeHttpResponseResource { pub fn new(response: http::Response, size: Option) -> Self { Self { response_reader: AsyncRefCell::new(NodeHttpFetchResponseReader::Start( @@ -400,14 +469,14 @@ impl NodeHttpFetchResponseResource { let reader = self.response_reader.into_inner(); match reader { NodeHttpFetchResponseReader::Start(resp) => { - Ok(hyper::upgrade::on(resp).await?) + hyper::upgrade::on(resp).await } _ => unreachable!(), } } } -impl Resource for NodeHttpFetchResponseResource { +impl Resource for NodeHttpResponseResource { fn name(&self) -> Cow { "fetchResponse".into() } @@ -454,9 +523,7 @@ impl Resource for NodeHttpFetchResponseResource { // safely call `await` on it without creating a race condition. Some(_) => match reader.as_mut().next().await.unwrap() { Ok(chunk) => assert!(chunk.is_empty()), - Err(err) => { - break Err(deno_core::error::type_error(err.to_string())) - } + Err(err) => break Err(type_error(err.to_string())), }, None => break Ok(BufView::empty()), } @@ -464,7 +531,7 @@ impl Resource for NodeHttpFetchResponseResource { }; let cancel_handle = RcRef::map(self, |r| &r.cancel); - fut.try_or_cancel(cancel_handle).await.map_err(Into::into) + fut.try_or_cancel(cancel_handle).await }) } @@ -514,8 +581,9 @@ impl Stream for NodeHttpResourceToBodyAdapter { Poll::Ready(res) => match res { Ok(buf) if buf.is_empty() => Poll::Ready(None), Ok(buf) => { + let bytes: Bytes = buf.to_vec().into(); this.1 = Some(this.0.clone().read(64 * 1024)); - Poll::Ready(Some(Ok(buf.to_vec().into()))) + Poll::Ready(Some(Ok(bytes))) } Err(err) => Poll::Ready(Some(Err(err))), }, diff --git a/ext/node/ops/http2.rs b/ext/node/ops/http2.rs index 53dada9f4119c9..c6c6484477ff00 100644 --- a/ext/node/ops/http2.rs +++ b/ext/node/ops/http2.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::borrow::Cow; use std::cell::RefCell; diff --git a/ext/node/ops/idna.rs b/ext/node/ops/idna.rs index a3d85e77c2b6b5..4ae1ce3954adae 100644 --- a/ext/node/ops/idna.rs +++ b/ext/node/ops/idna.rs @@ -1,9 +1,9 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. - -use deno_core::op2; +// Copyright 2018-2025 the Deno authors. MIT license. use std::borrow::Cow; +use deno_core::op2; + // map_domain, to_ascii and to_unicode are based on the punycode implementation in node.js // https://github.com/nodejs/node/blob/73025c4dec042e344eeea7912ed39f7b7c4a3991/lib/punycode.js diff --git a/ext/node/ops/inspector.rs b/ext/node/ops/inspector.rs index 34a7e004c1d946..03cfed4592333f 100644 --- a/ext/node/ops/inspector.rs +++ b/ext/node/ops/inspector.rs @@ -1,6 +1,8 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::cell::RefCell; +use std::rc::Rc; -use crate::NodePermissions; use deno_core::anyhow::Error; use deno_core::error::generic_error; use deno_core::futures::channel::mpsc; @@ -11,8 +13,8 @@ use deno_core::InspectorSessionKind; use deno_core::InspectorSessionOptions; use deno_core::JsRuntimeInspector; use deno_core::OpState; -use std::cell::RefCell; -use std::rc::Rc; + +use crate::NodePermissions; #[op2(fast)] pub fn op_inspector_enabled() -> bool { @@ -20,7 +22,7 @@ pub fn op_inspector_enabled() -> bool { false } -#[op2] +#[op2(stack_trace)] pub fn op_inspector_open

( _state: &mut OpState, _port: Option, @@ -85,7 +87,7 @@ struct JSInspectorSession { impl GarbageCollected for JSInspectorSession {} -#[op2] +#[op2(stack_trace)] #[cppgc] pub fn op_inspector_connect<'s, P>( isolate: *mut v8::Isolate, diff --git a/ext/node/ops/ipc.rs b/ext/node/ops/ipc.rs index 672cf0d70709ef..0eb3ae6aae162a 100644 --- a/ext/node/ops/ipc.rs +++ b/ext/node/ops/ipc.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. pub use impl_::*; @@ -30,6 +30,9 @@ mod impl_ { use deno_core::RcRef; use deno_core::ResourceId; use deno_core::ToV8; + use deno_io::BiPipe; + use deno_io::BiPipeRead; + use deno_io::BiPipeWrite; use memchr::memchr; use pin_project_lite::pin_project; use serde::Serialize; @@ -37,10 +40,6 @@ mod impl_ { use tokio::io::AsyncWriteExt; use tokio::io::ReadBuf; - use deno_io::BiPipe; - use deno_io::BiPipeRead; - use deno_io::BiPipeWrite; - /// Wrapper around v8 value that implements Serialize. struct SerializeWrapper<'a, 'b>( RefCell<&'b mut v8::HandleScope<'a>>, @@ -624,13 +623,15 @@ mod impl_ { #[cfg(test)] mod tests { - use super::IpcJsonStreamResource; + use std::rc::Rc; + use deno_core::serde_json::json; use deno_core::v8; use deno_core::JsRuntime; use deno_core::RcRef; use deno_core::RuntimeOptions; - use std::rc::Rc; + + use super::IpcJsonStreamResource; #[allow(clippy::unused_async)] #[cfg(unix)] diff --git a/ext/node/ops/mod.rs b/ext/node/ops/mod.rs index b53f19dc23c548..0b7be91860dbd7 100644 --- a/ext/node/ops/mod.rs +++ b/ext/node/ops/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. pub mod blocklist; pub mod buffer; @@ -10,6 +10,7 @@ pub mod idna; pub mod inspector; pub mod ipc; pub mod os; +pub mod perf_hooks; pub mod process; pub mod require; pub mod tls; diff --git a/ext/node/ops/os/cpus.rs b/ext/node/ops/os/cpus.rs index 3f5f430f65f792..d9b28ce88ca5f1 100644 --- a/ext/node/ops/os/cpus.rs +++ b/ext/node/ops/os/cpus.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_core::serde::Serialize; @@ -73,12 +73,17 @@ pub fn cpu_info() -> Option> { cpu_speed = 2_400_000_000; } + extern "C" { + fn mach_host_self() -> std::ffi::c_uint; + static mut mach_task_self_: std::ffi::c_uint; + } + let mut num_cpus: libc::natural_t = 0; let mut info: *mut libc::processor_cpu_load_info_data_t = std::ptr::null_mut(); let mut msg_type: libc::mach_msg_type_number_t = 0; if libc::host_processor_info( - libc::mach_host_self(), + mach_host_self(), libc::PROCESSOR_CPU_LOAD_INFO, &mut num_cpus, &mut info as *mut _ as *mut libc::processor_info_array_t, @@ -111,7 +116,7 @@ pub fn cpu_info() -> Option> { } libc::vm_deallocate( - libc::mach_task_self(), + mach_task_self_, info.as_ptr() as libc::vm_address_t, msg_type as _, ); @@ -122,13 +127,13 @@ pub fn cpu_info() -> Option> { #[cfg(target_os = "windows")] pub fn cpu_info() -> Option> { + use std::os::windows::ffi::OsStrExt; + use std::os::windows::ffi::OsStringExt; + use windows_sys::Wdk::System::SystemInformation::NtQuerySystemInformation; use windows_sys::Wdk::System::SystemInformation::SystemProcessorPerformanceInformation; use windows_sys::Win32::System::WindowsProgramming::SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION; - use std::os::windows::ffi::OsStrExt; - use std::os::windows::ffi::OsStringExt; - fn encode_wide(s: &str) -> Vec { std::ffi::OsString::from(s) .encode_wide() diff --git a/ext/node/ops/os/mod.rs b/ext/node/ops/os/mod.rs index d291277ad4d896..944f9506079b3c 100644 --- a/ext/node/ops/os/mod.rs +++ b/ext/node/ops/os/mod.rs @@ -1,10 +1,12 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::mem::MaybeUninit; -use crate::NodePermissions; use deno_core::op2; use deno_core::OpState; +use sys_traits::EnvHomeDir; + +use crate::NodePermissions; mod cpus; pub mod priority; @@ -21,7 +23,7 @@ pub enum OsError { FailedToGetUserInfo(#[source] std::io::Error), } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_node_os_get_priority

( state: &mut OpState, pid: u32, @@ -37,7 +39,7 @@ where priority::get_priority(pid).map_err(OsError::Priority) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_node_os_set_priority

( state: &mut OpState, pid: u32, @@ -193,7 +195,7 @@ fn get_user_info(_uid: u32) -> Result { }) } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_node_os_user_info

( state: &mut OpState, @@ -212,7 +214,7 @@ where get_user_info(uid) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_geteuid

( state: &mut OpState, ) -> Result @@ -233,7 +235,7 @@ where Ok(euid) } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_getegid

( state: &mut OpState, ) -> Result @@ -254,7 +256,7 @@ where Ok(egid) } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_cpus

(state: &mut OpState) -> Result, OsError> where @@ -268,7 +270,7 @@ where cpus::cpu_info().ok_or(OsError::FailedToGetCpuInfo) } -#[op2] +#[op2(stack_trace)] #[string] pub fn op_homedir

( state: &mut OpState, @@ -281,5 +283,9 @@ where permissions.check_sys("homedir", "node:os.homedir()")?; } - Ok(home::home_dir().map(|path| path.to_string_lossy().to_string())) + Ok( + sys_traits::impls::RealSys + .env_home_dir() + .map(|path| path.to_string_lossy().to_string()), + ) } diff --git a/ext/node/ops/os/priority.rs b/ext/node/ops/os/priority.rs index 9a1ebcca705c6a..f9e686ceba3fab 100644 --- a/ext/node/ops/os/priority.rs +++ b/ext/node/ops/os/priority.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. pub use impl_::*; diff --git a/ext/node/ops/perf_hooks.rs b/ext/node/ops/perf_hooks.rs new file mode 100644 index 00000000000000..eca5fe2fa8531b --- /dev/null +++ b/ext/node/ops/perf_hooks.rs @@ -0,0 +1,135 @@ +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::cell::Cell; + +use deno_core::op2; +use deno_core::GarbageCollected; + +#[derive(Debug, thiserror::Error)] +pub enum PerfHooksError { + #[error(transparent)] + TokioEld(#[from] tokio_eld::Error), +} + +pub struct EldHistogram { + eld: tokio_eld::EldHistogram, + started: Cell, +} + +impl GarbageCollected for EldHistogram {} + +#[op2] +impl EldHistogram { + // Creates an interval EldHistogram object that samples and reports the event + // loop delay over time. + // + // The delays will be reported in nanoseconds. + #[constructor] + #[cppgc] + pub fn new(#[smi] resolution: u32) -> Result { + Ok(EldHistogram { + eld: tokio_eld::EldHistogram::new(resolution as usize)?, + started: Cell::new(false), + }) + } + + // Disables the update interval timer. + // + // Returns true if the timer was stopped, false if it was already stopped. + #[fast] + fn enable(&self) -> bool { + if self.started.get() { + return false; + } + + self.eld.start(); + self.started.set(true); + + true + } + + // Enables the update interval timer. + // + // Returns true if the timer was started, false if it was already started. + #[fast] + fn disable(&self) -> bool { + if !self.started.get() { + return false; + } + + self.eld.stop(); + self.started.set(false); + + true + } + + // Returns the value at the given percentile. + // + // `percentile` ∈ (0, 100] + #[fast] + #[number] + fn percentile(&self, percentile: f64) -> u64 { + self.eld.value_at_percentile(percentile) + } + + // Returns the value at the given percentile as a bigint. + #[fast] + #[bigint] + fn percentile_big_int(&self, percentile: f64) -> u64 { + self.eld.value_at_percentile(percentile) + } + + // The number of samples recorded by the histogram. + #[getter] + #[number] + fn count(&self) -> u64 { + self.eld.len() + } + + // The number of samples recorded by the histogram as a bigint. + #[getter] + #[bigint] + fn count_big_int(&self) -> u64 { + self.eld.len() + } + + // The maximum recorded event loop delay. + #[getter] + #[number] + fn max(&self) -> u64 { + self.eld.max() + } + + // The maximum recorded event loop delay as a bigint. + #[getter] + #[bigint] + fn max_big_int(&self) -> u64 { + self.eld.max() + } + + // The mean of the recorded event loop delays. + #[getter] + fn mean(&self) -> f64 { + self.eld.mean() + } + + // The minimum recorded event loop delay. + #[getter] + #[number] + fn min(&self) -> u64 { + self.eld.min() + } + + // The minimum recorded event loop delay as a bigint. + #[getter] + #[bigint] + fn min_big_int(&self) -> u64 { + self.eld.min() + } + + // The standard deviation of the recorded event loop delays. + #[getter] + fn stddev(&self) -> f64 { + self.eld.stdev() + } +} diff --git a/ext/node/ops/process.rs b/ext/node/ops/process.rs index 282567226ea6cc..0ef360af8c9660 100644 --- a/ext/node/ops/process.rs +++ b/ext/node/ops/process.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_core::op2; use deno_core::OpState; @@ -45,7 +45,7 @@ fn kill(pid: i32, _sig: i32) -> i32 { } } -#[op2(fast)] +#[op2(fast, stack_trace)] pub fn op_node_process_kill( state: &mut OpState, #[smi] pid: i32, diff --git a/ext/node/ops/require.rs b/ext/node/ops/require.rs index 06c034fd507104..218079d4e1a0fa 100644 --- a/ext/node/ops/require.rs +++ b/ext/node/ops/require.rs @@ -1,27 +1,32 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::borrow::Cow; +use std::cell::RefCell; +use std::path::Path; +use std::path::PathBuf; +use std::rc::Rc; use boxed_error::Boxed; use deno_core::error::AnyError; use deno_core::op2; use deno_core::url::Url; use deno_core::v8; +use deno_core::FastString; use deno_core::JsRuntimeInspector; use deno_core::OpState; -use deno_fs::FileSystemRc; -use deno_package_json::NodeModuleKind; use deno_package_json::PackageJsonRc; use deno_path_util::normalize_path; use deno_path_util::url_from_file_path; use deno_path_util::url_to_file_path; use node_resolver::errors::ClosestPkgJsonError; -use node_resolver::NodeResolutionMode; +use node_resolver::NodeResolutionKind; +use node_resolver::ResolutionMode; use node_resolver::REQUIRE_CONDITIONS; -use std::borrow::Cow; -use std::cell::RefCell; -use std::path::Path; -use std::path::PathBuf; -use std::rc::Rc; +use sys_traits::FsCanonicalize; +use sys_traits::FsMetadata; +use sys_traits::FsMetadataValue; +use crate::ExtNodeSys; use crate::NodePermissions; use crate::NodeRequireLoaderRc; use crate::NodeResolverRc; @@ -67,11 +72,11 @@ pub enum RequireErrorKind { #[error(transparent)] UrlConversion(#[from] deno_path_util::PathToUrlError), #[error(transparent)] - Fs(#[from] deno_io::fs::FsError), + Fs(#[from] std::io::Error), #[error(transparent)] ReadModule(deno_core::error::AnyError), #[error("Unable to get CWD: {0}")] - UnableToGetCwd(deno_io::fs::FsError), + UnableToGetCwd(std::io::Error), } #[op2] @@ -125,21 +130,23 @@ pub fn op_require_init_paths() -> Vec { vec![] } -#[op2] +#[op2(stack_trace)] #[serde] -pub fn op_require_node_module_paths

( +pub fn op_require_node_module_paths< + P: NodePermissions + 'static, + TSys: ExtNodeSys + 'static, +>( state: &mut OpState, #[string] from: String, -) -> Result, RequireError> -where - P: NodePermissions + 'static, -{ - let fs = state.borrow::(); +) -> Result, RequireError> { + let sys = state.borrow::(); // Guarantee that "from" is absolute. let from = if from.starts_with("file:///") { url_to_file_path(&Url::parse(&from)?)? } else { - let current_dir = &fs.cwd().map_err(RequireErrorKind::UnableToGetCwd)?; + let current_dir = &sys + .env_current_dir() + .map_err(RequireErrorKind::UnableToGetCwd)?; normalize_path(current_dir.join(from)) }; @@ -237,11 +244,11 @@ pub fn op_require_resolve_deno_dir( } #[op2(fast)] -pub fn op_require_is_deno_dir_package( +pub fn op_require_is_deno_dir_package( state: &mut OpState, #[string] path: String, ) -> bool { - let resolver = state.borrow::(); + let resolver = state.borrow::>(); match deno_path_util::url_from_file_path(&PathBuf::from(path)) { Ok(specifier) => resolver.in_npm_package(&specifier), Err(_) => false, @@ -295,19 +302,19 @@ pub fn op_require_path_is_absolute(#[string] p: String) -> bool { PathBuf::from(p).is_absolute() } -#[op2(fast)] -pub fn op_require_stat

( +#[op2(fast, stack_trace)] +pub fn op_require_stat< + P: NodePermissions + 'static, + TSys: ExtNodeSys + 'static, +>( state: &mut OpState, #[string] path: String, -) -> Result -where - P: NodePermissions + 'static, -{ +) -> Result { let path = PathBuf::from(path); let path = ensure_read_permission::

(state, &path)?; - let fs = state.borrow::(); - if let Ok(metadata) = fs.stat_sync(&path) { - if metadata.is_file { + let sys = state.borrow::(); + if let Ok(metadata) = sys.fs_metadata(&path) { + if metadata.file_type().is_file() { return Ok(0); } else { return Ok(1); @@ -317,21 +324,21 @@ where Ok(-1) } -#[op2] +#[op2(stack_trace)] #[string] -pub fn op_require_real_path

( +pub fn op_require_real_path< + P: NodePermissions + 'static, + TSys: ExtNodeSys + 'static, +>( state: &mut OpState, #[string] request: String, -) -> Result -where - P: NodePermissions + 'static, -{ +) -> Result { let path = PathBuf::from(request); let path = ensure_read_permission::

(state, &path) .map_err(RequireErrorKind::Permission)?; - let fs = state.borrow::(); + let sys = state.borrow::(); let canonicalized_path = - deno_path_util::strip_unc_prefix(fs.realpath_sync(&path)?); + deno_path_util::strip_unc_prefix(sys.fs_canonicalize(&path)?); Ok(canonicalized_path.to_string_lossy().into_owned()) } @@ -381,17 +388,17 @@ pub fn op_require_path_basename( } } -#[op2] +#[op2(stack_trace)] #[string] -pub fn op_require_try_self_parent_path

( +pub fn op_require_try_self_parent_path< + P: NodePermissions + 'static, + TSys: ExtNodeSys + 'static, +>( state: &mut OpState, has_parent: bool, #[string] maybe_parent_filename: Option, #[string] maybe_parent_id: Option, -) -> Result, deno_core::error::AnyError> -where - P: NodePermissions + 'static, -{ +) -> Result, deno_core::error::AnyError> { if !has_parent { return Ok(None); } @@ -402,8 +409,8 @@ where if let Some(parent_id) = maybe_parent_id { if parent_id == "" || parent_id == "internal/preload" { - let fs = state.borrow::(); - if let Ok(cwd) = fs.cwd() { + let sys = state.borrow::(); + if let Ok(cwd) = sys.env_current_dir() { let cwd = ensure_read_permission::

(state, &cwd)?; return Ok(Some(cwd.to_string_lossy().into_owned())); } @@ -412,23 +419,25 @@ where Ok(None) } -#[op2] +#[op2(stack_trace)] #[string] -pub fn op_require_try_self

( +pub fn op_require_try_self< + P: NodePermissions + 'static, + TSys: ExtNodeSys + 'static, +>( state: &mut OpState, #[string] parent_path: Option, #[string] request: String, -) -> Result, RequireError> -where - P: NodePermissions + 'static, -{ +) -> Result, RequireError> { if parent_path.is_none() { return Ok(None); } - let pkg_json_resolver = state.borrow::(); + let pkg_json_resolver = state.borrow::>(); let pkg = pkg_json_resolver - .get_closest_package_json_from_path(&PathBuf::from(parent_path.unwrap())) + .get_closest_package_json_from_file_path(&PathBuf::from( + parent_path.unwrap(), + )) .ok() .flatten(); if pkg.is_none() { @@ -456,15 +465,15 @@ where let referrer = deno_core::url::Url::from_file_path(&pkg.path).unwrap(); if let Some(exports) = &pkg.exports { - let node_resolver = state.borrow::(); + let node_resolver = state.borrow::>(); let r = node_resolver.package_exports_resolve( &pkg.path, &expansion, exports, Some(&referrer), - NodeModuleKind::Cjs, + ResolutionMode::Require, REQUIRE_CONDITIONS, - NodeResolutionMode::Execution, + NodeResolutionKind::Execution, )?; Ok(Some(if r.scheme() == "file" { url_to_file_path_string(&r)? @@ -476,12 +485,12 @@ where } } -#[op2] -#[string] +#[op2(stack_trace)] +#[to_v8] pub fn op_require_read_file

( state: &mut OpState, #[string] file_path: String, -) -> Result +) -> Result where P: NodePermissions + 'static, { @@ -492,6 +501,10 @@ where let loader = state.borrow::(); loader .load_text_file_lossy(&file_path) + .map(|s| match s { + Cow::Borrowed(s) => FastString::from_static(s), + Cow::Owned(s) => s.into(), + }) .map_err(|e| RequireErrorKind::ReadModule(e).into_box()) } @@ -507,9 +520,12 @@ pub fn op_require_as_file_path(#[string] file_or_url: String) -> String { file_or_url } -#[op2] +#[op2(stack_trace)] #[string] -pub fn op_require_resolve_exports

( +pub fn op_require_resolve_exports< + P: NodePermissions + 'static, + TSys: ExtNodeSys + 'static, +>( state: &mut OpState, uses_local_node_modules_dir: bool, #[string] modules_path_str: String, @@ -517,13 +533,10 @@ pub fn op_require_resolve_exports

( #[string] name: String, #[string] expansion: String, #[string] parent_path: String, -) -> Result, RequireError> -where - P: NodePermissions + 'static, -{ - let fs = state.borrow::(); - let node_resolver = state.borrow::(); - let pkg_json_resolver = state.borrow::(); +) -> Result, RequireError> { + let sys = state.borrow::(); + let node_resolver = state.borrow::>(); + let pkg_json_resolver = state.borrow::>(); let modules_path = PathBuf::from(&modules_path_str); let modules_specifier = deno_path_util::url_from_file_path(&modules_path)?; @@ -534,7 +547,7 @@ where } else { let mod_dir = path_resolve([modules_path_str.as_str(), name.as_str()].into_iter()); - if fs.is_dir_sync(&mod_dir) { + if sys.fs_is_dir_no_err(&mod_dir) { mod_dir } else { modules_path @@ -559,9 +572,9 @@ where &format!(".{expansion}"), exports, referrer.as_ref(), - NodeModuleKind::Cjs, + ResolutionMode::Require, REQUIRE_CONDITIONS, - NodeResolutionMode::Execution, + NodeResolutionKind::Execution, )?; Ok(Some(if r.scheme() == "file" { url_to_file_path_string(&r)? @@ -583,16 +596,16 @@ pub fn op_require_is_maybe_cjs( loader.is_maybe_cjs(&url) } -#[op2] +#[op2(stack_trace)] #[serde] -pub fn op_require_read_package_scope

( +pub fn op_require_read_package_scope< + P: NodePermissions + 'static, + TSys: ExtNodeSys + 'static, +>( state: &mut OpState, #[string] package_json_path: String, -) -> Option -where - P: NodePermissions + 'static, -{ - let pkg_json_resolver = state.borrow::(); +) -> Option { + let pkg_json_resolver = state.borrow::>(); let package_json_path = PathBuf::from(package_json_path); if package_json_path.file_name() != Some("package.json".as_ref()) { // permissions: do not allow reading a non-package.json file @@ -604,36 +617,36 @@ where .flatten() } -#[op2] +#[op2(stack_trace)] #[string] -pub fn op_require_package_imports_resolve

( +pub fn op_require_package_imports_resolve< + P: NodePermissions + 'static, + TSys: ExtNodeSys + 'static, +>( state: &mut OpState, #[string] referrer_filename: String, #[string] request: String, -) -> Result, RequireError> -where - P: NodePermissions + 'static, -{ +) -> Result, RequireError> { let referrer_path = PathBuf::from(&referrer_filename); let referrer_path = ensure_read_permission::

(state, &referrer_path) .map_err(RequireErrorKind::Permission)?; - let pkg_json_resolver = state.borrow::(); - let Some(pkg) = - pkg_json_resolver.get_closest_package_json_from_path(&referrer_path)? + let pkg_json_resolver = state.borrow::>(); + let Some(pkg) = pkg_json_resolver + .get_closest_package_json_from_file_path(&referrer_path)? else { return Ok(None); }; if pkg.imports.is_some() { - let node_resolver = state.borrow::(); + let node_resolver = state.borrow::>(); let referrer_url = Url::from_file_path(&referrer_filename).unwrap(); let url = node_resolver.package_imports_resolve( &request, Some(&referrer_url), - NodeModuleKind::Cjs, + ResolutionMode::Require, Some(&pkg), REQUIRE_CONDITIONS, - NodeResolutionMode::Execution, + NodeResolutionKind::Execution, )?; Ok(Some(url_to_file_path_string(&url)?)) } else { diff --git a/ext/node/ops/tls.rs b/ext/node/ops/tls.rs index 86b1779601549b..8b2845e0233b19 100644 --- a/ext/node/ops/tls.rs +++ b/ext/node/ops/tls.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use base64::Engine; use deno_core::op2; use webpki_root_certs; diff --git a/ext/node/ops/util.rs b/ext/node/ops/util.rs index 1c177ac0431d55..bc1d2c0588e12d 100644 --- a/ext/node/ops/util.rs +++ b/ext/node/ops/util.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_core::op2; use deno_core::OpState; diff --git a/ext/node/ops/v8.rs b/ext/node/ops/v8.rs index 61f67f11f73a27..8f4a70dccf405c 100644 --- a/ext/node/ops/v8.rs +++ b/ext/node/ops/v8.rs @@ -1,11 +1,12 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::ptr::NonNull; use deno_core::op2; use deno_core::v8; use deno_core::FastString; use deno_core::GarbageCollected; use deno_core::ToJsBuffer; -use std::ptr::NonNull; use v8::ValueDeserializerHelper; use v8::ValueSerializerHelper; @@ -68,6 +69,7 @@ impl v8::ValueSerializerImpl for SerializerDelegate { let obj = self.obj(scope); let key = FastString::from_static("_getSharedArrayBufferId") .v8_string(scope) + .unwrap() .into(); if let Some(v) = obj.get(scope, key) { if let Ok(fun) = v.try_cast::() { @@ -89,6 +91,7 @@ impl v8::ValueSerializerImpl for SerializerDelegate { let obj = self.obj(scope); let key = FastString::from_static("_getDataCloneError") .v8_string(scope) + .unwrap() .into(); if let Some(v) = obj.get(scope, key) { let fun = v @@ -112,6 +115,7 @@ impl v8::ValueSerializerImpl for SerializerDelegate { let obj = self.obj(scope); let key = FastString::from_static("_writeHostObject") .v8_string(scope) + .unwrap() .into(); if let Some(v) = obj.get(scope, key) { if let Ok(v) = v.try_cast::() { @@ -240,6 +244,7 @@ impl v8::ValueDeserializerImpl for DeserializerDelegate { let obj = v8::Local::new(scope, &self.obj); let key = FastString::from_static("_readHostObject") .v8_string(scope) + .unwrap() .into(); let scope = &mut v8::AllowJavascriptExecutionScope::new(scope); if let Some(v) = obj.get(scope, key) { @@ -250,7 +255,8 @@ impl v8::ValueDeserializerImpl for DeserializerDelegate { Err(_) => { let msg = FastString::from_static("readHostObject must return an object") - .v8_string(scope); + .v8_string(scope) + .unwrap(); let error = v8::Exception::type_error(scope, msg); scope.throw_exception(error); return None; diff --git a/ext/node/ops/vm.rs b/ext/node/ops/vm.rs index 25881cbaed5d05..34eff8865c47a9 100644 --- a/ext/node/ops/vm.rs +++ b/ext/node/ops/vm.rs @@ -1,14 +1,16 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::sync::atomic::AtomicBool; +use std::sync::atomic::Ordering; +use std::time::Duration; -use crate::create_host_defined_options; use deno_core::op2; use deno_core::serde_v8; use deno_core::v8; use deno_core::v8::MapFnTo; use deno_core::JsBuffer; -use std::sync::atomic::AtomicBool; -use std::sync::atomic::Ordering; -use std::time::Duration; + +use crate::create_host_defined_options; pub const PRIVATE_SYMBOL_NAME: v8::OneByteConst = v8::String::create_external_onebyte_const(b"node:contextify:context"); diff --git a/ext/node/ops/vm_internal.rs b/ext/node/ops/vm_internal.rs index 815f570eada65e..e8c1cc02f02ba9 100644 --- a/ext/node/ops/vm_internal.rs +++ b/ext/node/ops/vm_internal.rs @@ -1,11 +1,12 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::create_host_defined_options; use deno_core::error::type_error; use deno_core::error::AnyError; use deno_core::v8; use deno_core::v8::MapFnTo; +use crate::create_host_defined_options; + pub const PRIVATE_SYMBOL_NAME: v8::OneByteConst = v8::String::create_external_onebyte_const(b"node:contextify:context"); diff --git a/ext/node/ops/winerror.rs b/ext/node/ops/winerror.rs index cb053774ef6288..5cbeddc5ae478f 100644 --- a/ext/node/ops/winerror.rs +++ b/ext/node/ops/winerror.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /* Copyright Joyent, Inc. and other Node contributors. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/ext/node/ops/worker_threads.rs b/ext/node/ops/worker_threads.rs index d2e57588265360..f7aa8c71cbea9e 100644 --- a/ext/node/ops/worker_threads.rs +++ b/ext/node/ops/worker_threads.rs @@ -1,13 +1,16 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use deno_core::op2; -use deno_core::url::Url; -use deno_core::OpState; -use deno_fs::FileSystemRc; use std::borrow::Cow; use std::path::Path; use std::path::PathBuf; +use deno_core::op2; +use deno_core::url::Url; +use deno_core::OpState; +use sys_traits::FsCanonicalize; +use sys_traits::FsMetadata; + +use crate::ExtNodeSys; use crate::NodePermissions; use crate::NodeRequireLoaderRc; @@ -41,19 +44,19 @@ pub enum WorkerThreadsFilenameError { #[error("File not found [{0:?}]")] FileNotFound(PathBuf), #[error(transparent)] - Fs(#[from] deno_io::fs::FsError), + Fs(#[from] std::io::Error), } // todo(dsherret): we should remove this and do all this work inside op_create_worker -#[op2] +#[op2(stack_trace)] #[string] -pub fn op_worker_threads_filename

( +pub fn op_worker_threads_filename< + P: NodePermissions + 'static, + TSys: ExtNodeSys + 'static, +>( state: &mut OpState, #[string] specifier: String, -) -> Result -where - P: NodePermissions + 'static, -{ +) -> Result { if specifier.starts_with("data:") { return Ok(specifier); } @@ -66,9 +69,9 @@ where } let path = ensure_read_permission::

(state, &path) .map_err(WorkerThreadsFilenameError::Permission)?; - let fs = state.borrow::(); + let sys = state.borrow::(); let canonicalized_path = - deno_path_util::strip_unc_prefix(fs.realpath_sync(&path)?); + deno_path_util::strip_unc_prefix(sys.fs_canonicalize(&path)?); Url::from_file_path(canonicalized_path) .map_err(|_| WorkerThreadsFilenameError::UrlFromPathString)? }; @@ -77,8 +80,8 @@ where .map_err(|_| WorkerThreadsFilenameError::UrlToPathString)?; let url_path = ensure_read_permission::

(state, &url_path) .map_err(WorkerThreadsFilenameError::Permission)?; - let fs = state.borrow::(); - if !fs.exists_sync(&url_path) { + let sys = state.borrow::(); + if !sys.fs_exists_no_err(&url_path) { return Err(WorkerThreadsFilenameError::FileNotFound( url_path.to_path_buf(), )); diff --git a/ext/node/ops/zlib/alloc.rs b/ext/node/ops/zlib/alloc.rs index d425a18d5e9824..6066ab6a8e0b52 100644 --- a/ext/node/ops/zlib/alloc.rs +++ b/ext/node/ops/zlib/alloc.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Workaround for https://github.com/rust-lang/libz-sys/issues/55 // See https://github.com/rust-lang/flate2-rs/blob/31fb07820345691352aaa64f367c1e482ad9cfdc/src/ffi/c.rs#L60 diff --git a/ext/node/ops/zlib/brotli.rs b/ext/node/ops/zlib/brotli.rs index 1a681ff7f719a6..5d15df559f7ce3 100644 --- a/ext/node/ops/zlib/brotli.rs +++ b/ext/node/ops/zlib/brotli.rs @@ -1,4 +1,7 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. +use std::cell::RefCell; +use std::io::Read; + use brotli::enc::backward_references::BrotliEncoderMode; use brotli::enc::encode::BrotliEncoderCompress; use brotli::enc::encode::BrotliEncoderOperation; @@ -14,8 +17,6 @@ use deno_core::JsBuffer; use deno_core::OpState; use deno_core::Resource; use deno_core::ToJsBuffer; -use std::cell::RefCell; -use std::io::Read; #[derive(Debug, thiserror::Error)] pub enum BrotliError { diff --git a/ext/node/ops/zlib/mod.rs b/ext/node/ops/zlib/mod.rs index 991c0925d2538f..b5277e7a342c30 100644 --- a/ext/node/ops/zlib/mod.rs +++ b/ext/node/ops/zlib/mod.rs @@ -1,9 +1,10 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use deno_core::op2; -use libc::c_ulong; use std::borrow::Cow; use std::cell::RefCell; + +use deno_core::op2; +use libc::c_ulong; use zlib::*; mod alloc; diff --git a/ext/node/ops/zlib/mode.rs b/ext/node/ops/zlib/mode.rs index 41565f9b1142df..c0660a7c7a406f 100644 --- a/ext/node/ops/zlib/mode.rs +++ b/ext/node/ops/zlib/mode.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. #[derive(Debug, thiserror::Error)] #[error("bad argument")] diff --git a/ext/node/ops/zlib/stream.rs b/ext/node/ops/zlib/stream.rs index afcdcc4d704029..de7abcacbddc60 100644 --- a/ext/node/ops/zlib/stream.rs +++ b/ext/node/ops/zlib/stream.rs @@ -1,11 +1,12 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use super::mode::Flush; -use super::mode::Mode; use std::ffi::c_int; use std::ops::Deref; use std::ops::DerefMut; +use super::mode::Flush; +use super::mode::Mode; + pub struct StreamWrapper { pub strm: zlib::z_stream, } diff --git a/ext/node/polyfill.rs b/ext/node/polyfill.rs index a14b75bac00e2c..6e6e9d09c2481c 100644 --- a/ext/node/polyfill.rs +++ b/ext/node/polyfill.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /// e.g. `is_builtin_node_module("assert")` pub fn is_builtin_node_module(module_name: &str) -> bool { @@ -25,6 +25,17 @@ macro_rules! generate_builtin_node_module_lists { // NOTE(bartlomieju): keep this list in sync with `ext/node/polyfills/01_require.js` generate_builtin_node_module_lists! { + "_http_agent", + "_http_common", + "_http_outgoing", + "_http_server", + "_stream_duplex", + "_stream_passthrough", + "_stream_readable", + "_stream_transform", + "_stream_writable", + "_tls_common", + "_tls_wrap", "assert", "assert/strict", "async_hooks", @@ -46,6 +57,7 @@ generate_builtin_node_module_lists! { "http2", "https", "inspector", + "inspector/promises", "module", "net", "os", @@ -56,9 +68,9 @@ generate_builtin_node_module_lists! { "process", "punycode", "querystring", - "repl", "readline", "readline/promises", + "repl", "stream", "stream/consumers", "stream/promises", @@ -79,3 +91,10 @@ generate_builtin_node_module_lists! { "worker_threads", "zlib", } + +#[test] +fn test_builtins_are_sorted() { + let mut builtins_list = SUPPORTED_BUILTIN_NODE_MODULES.to_vec(); + builtins_list.sort(); + assert_eq!(SUPPORTED_BUILTIN_NODE_MODULES, builtins_list); +} diff --git a/ext/node/polyfills/00_globals.js b/ext/node/polyfills/00_globals.js index efe491acc153f7..8a896412bc3a07 100644 --- a/ext/node/polyfills/00_globals.js +++ b/ext/node/polyfills/00_globals.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file diff --git a/ext/node/polyfills/01_require.js b/ext/node/polyfills/01_require.js index 083d4e49bef08c..8f3201755fd04c 100644 --- a/ext/node/polyfills/01_require.js +++ b/ext/node/polyfills/01_require.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file @@ -1060,22 +1060,39 @@ Module.prototype._compile = function (content, filename, format) { return result; }; -Module._extensions[".js"] = - Module._extensions[".ts"] = - Module._extensions[".jsx"] = - Module._extensions[".tsx"] = - function (module, filename) { - const content = op_require_read_file(filename); - const format = op_require_is_maybe_cjs(filename) ? undefined : "module"; - module._compile(content, filename, format); - }; - -Module._extensions[".cjs"] = - Module._extensions[".cts"] = - function (module, filename) { - const content = op_require_read_file(filename); - module._compile(content, filename, "commonjs"); - }; +Module._extensions[".js"] = function (module, filename) { + // We don't define everything on Module.extensions in + // order to prevent probing for these files + if ( + StringPrototypeEndsWith(filename, ".js") || + StringPrototypeEndsWith(filename, ".ts") || + StringPrototypeEndsWith(filename, ".jsx") || + StringPrototypeEndsWith(filename, ".tsx") + ) { + return loadMaybeCjs(module, filename); + } else if (StringPrototypeEndsWith(filename, ".mts")) { + return loadESMFromCJS(module, filename); + } else if (StringPrototypeEndsWith(filename, ".cts")) { + return loadCjs(module, filename); + } else { + return loadMaybeCjs(module, filename); + } +}; + +Module._extensions[".cjs"] = loadCjs; +Module._extensions[".mjs"] = loadESMFromCJS; +Module._extensions[".wasm"] = loadESMFromCJS; + +function loadMaybeCjs(module, filename) { + const content = op_require_read_file(filename); + const format = op_require_is_maybe_cjs(filename) ? undefined : "module"; + module._compile(content, filename, format); +} + +function loadCjs(module, filename) { + const content = op_require_read_file(filename); + module._compile(content, filename, "commonjs"); +} function loadESMFromCJS(module, filename, code) { const namespace = op_import_sync( @@ -1086,13 +1103,6 @@ function loadESMFromCJS(module, filename, code) { module.exports = namespace; } -Module._extensions[".mjs"] = Module._extensions[".mts"] = function ( - module, - filename, -) { - loadESMFromCJS(module, filename); -}; - function stripBOM(content) { if (StringPrototypeCharCodeAt(content, 0) === 0xfeff) { content = StringPrototypeSlice(content, 1); diff --git a/ext/node/polyfills/02_init.js b/ext/node/polyfills/02_init.js index b25f7ad5744855..a069bd828cb620 100644 --- a/ext/node/polyfills/02_init.js +++ b/ext/node/polyfills/02_init.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file diff --git a/ext/node/polyfills/_brotli.js b/ext/node/polyfills/_brotli.js index ebd03515615ec0..308cad42ad55f8 100644 --- a/ext/node/polyfills/_brotli.js +++ b/ext/node/polyfills/_brotli.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { core, primordials } from "ext:core/mod.js"; const { @@ -10,9 +10,12 @@ const { ArrayPrototypeMap, TypedArrayPrototypeSlice, TypedArrayPrototypeSubarray, + TypedArrayPrototypeGetBuffer, TypedArrayPrototypeGetByteLength, + TypedArrayPrototypeGetByteOffset, DataViewPrototypeGetBuffer, - TypedArrayPrototypeGetBuffer, + DataViewPrototypeGetByteLength, + DataViewPrototypeGetByteOffset, } = primordials; const { isTypedArray, isDataView, close } = core; import { @@ -40,9 +43,17 @@ const toU8 = (input) => { } if (isTypedArray(input)) { - return new Uint8Array(TypedArrayPrototypeGetBuffer(input)); + return new Uint8Array( + TypedArrayPrototypeGetBuffer(input), + TypedArrayPrototypeGetByteOffset(input), + TypedArrayPrototypeGetByteLength(input), + ); } else if (isDataView(input)) { - return new Uint8Array(DataViewPrototypeGetBuffer(input)); + return new Uint8Array( + DataViewPrototypeGetBuffer(input), + DataViewPrototypeGetByteOffset(input), + DataViewPrototypeGetByteLength(input), + ); } return input; diff --git a/ext/node/polyfills/_events.d.ts b/ext/node/polyfills/_events.d.ts index 1b765041e59454..98a6b9d2f478e9 100644 --- a/ext/node/polyfills/_events.d.ts +++ b/ext/node/polyfills/_events.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-explicit-any // Forked from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/9b9cd671114a2a5178809798d8e7f4d8ca6c2671/types/node/events.d.ts diff --git a/ext/node/polyfills/_events.mjs b/ext/node/polyfills/_events.mjs index ce7a8ebf24e454..feecad2743ca26 100644 --- a/ext/node/polyfills/_events.mjs +++ b/ext/node/polyfills/_events.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/_fs/_fs_access.ts b/ext/node/polyfills/_fs/_fs_access.ts index b501bcbcaef304..561e023cd83135 100644 --- a/ext/node/polyfills/_fs/_fs_access.ts +++ b/ext/node/polyfills/_fs/_fs_access.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials @@ -30,50 +30,58 @@ export function access( mode = getValidMode(mode, "access"); const cb = makeCallback(callback); - Deno.lstat(path).then((info) => { - if (info.mode === null) { - // If the file mode is unavailable, we pretend it has - // the permission - cb(null); - return; - } - const m = +mode || 0; - let fileMode = +info.mode || 0; - if (Deno.build.os !== "windows" && info.uid === Deno.uid()) { - // If the user is the owner of the file, then use the owner bits of - // the file permission - fileMode >>= 6; - } - // TODO(kt3k): Also check the case when the user belong to the group - // of the file - if ((m & fileMode) === m) { - // all required flags exist - cb(null); - } else { - // some required flags don't - // deno-lint-ignore no-explicit-any - const e: any = new Error(`EACCES: permission denied, access '${path}'`); - e.path = path; - e.syscall = "access"; - e.errno = codeMap.get("EACCES"); - e.code = "EACCES"; - cb(e); - } - }, (err) => { - if (err instanceof Deno.errors.NotFound) { - // deno-lint-ignore no-explicit-any - const e: any = new Error( - `ENOENT: no such file or directory, access '${path}'`, - ); - e.path = path; - e.syscall = "access"; - e.errno = codeMap.get("ENOENT"); - e.code = "ENOENT"; - cb(e); - } else { - cb(err); - } - }); + Deno.lstat(path).then( + (info) => { + if (info.mode === null) { + // If the file mode is unavailable, we pretend it has + // the permission + cb(null); + return; + } + let m = +mode || 0; + let fileMode = +info.mode || 0; + + if (Deno.build.os === "windows") { + m &= ~fs.X_OK; // Ignore the X_OK bit on Windows + } else if (info.uid === Deno.uid()) { + // If the user is the owner of the file, then use the owner bits of + // the file permission + fileMode >>= 6; + } + + // TODO(kt3k): Also check the case when the user belong to the group + // of the file + + if ((m & fileMode) === m) { + // all required flags exist + cb(null); + } else { + // some required flags don't + // deno-lint-ignore no-explicit-any + const e: any = new Error(`EACCES: permission denied, access '${path}'`); + e.path = path; + e.syscall = "access"; + e.errno = codeMap.get("EACCES"); + e.code = "EACCES"; + cb(e); + } + }, + (err) => { + if (err instanceof Deno.errors.NotFound) { + // deno-lint-ignore no-explicit-any + const e: any = new Error( + `ENOENT: no such file or directory, access '${path}'`, + ); + e.path = path; + e.syscall = "access"; + e.errno = codeMap.get("ENOENT"); + e.code = "ENOENT"; + cb(e); + } else { + cb(err); + } + }, + ); } export const accessPromise = promisify(access) as ( @@ -91,9 +99,11 @@ export function accessSync(path: string | Buffer | URL, mode?: number) { // the permission return; } - const m = +mode! || 0; + let m = +mode! || 0; let fileMode = +info.mode! || 0; - if (Deno.build.os !== "windows" && info.uid === Deno.uid()) { + if (Deno.build.os === "windows") { + m &= ~fs.X_OK; // Ignore the X_OK bit on Windows + } else if (info.uid === Deno.uid()) { // If the user is the owner of the file, then use the owner bits of // the file permission fileMode >>= 6; diff --git a/ext/node/polyfills/_fs/_fs_appendFile.ts b/ext/node/polyfills/_fs/_fs_appendFile.ts index 7077898623dbb2..ed47ea5a837c56 100644 --- a/ext/node/polyfills/_fs/_fs_appendFile.ts +++ b/ext/node/polyfills/_fs/_fs_appendFile.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { CallbackWithError, diff --git a/ext/node/polyfills/_fs/_fs_chmod.ts b/ext/node/polyfills/_fs/_fs_chmod.ts index eec8c7a8a995ea..195b4f810a7c60 100644 --- a/ext/node/polyfills/_fs/_fs_chmod.ts +++ b/ext/node/polyfills/_fs/_fs_chmod.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/_fs/_fs_chown.ts b/ext/node/polyfills/_fs/_fs_chown.ts index 56364109d5d485..0056502f2012bc 100644 --- a/ext/node/polyfills/_fs/_fs_chown.ts +++ b/ext/node/polyfills/_fs/_fs_chown.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/_fs/_fs_close.ts b/ext/node/polyfills/_fs/_fs_close.ts index fd01a0336a842b..476b3912be75d4 100644 --- a/ext/node/polyfills/_fs/_fs_close.ts +++ b/ext/node/polyfills/_fs/_fs_close.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/_fs/_fs_common.ts b/ext/node/polyfills/_fs/_fs_common.ts index a29548bb364cc4..9ec474afa98df5 100644 --- a/ext/node/polyfills/_fs/_fs_common.ts +++ b/ext/node/polyfills/_fs/_fs_common.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/_fs/_fs_constants.ts b/ext/node/polyfills/_fs/_fs_constants.ts index 0af75f072cf5f6..3d5d0b5898aea9 100644 --- a/ext/node/polyfills/_fs/_fs_constants.ts +++ b/ext/node/polyfills/_fs/_fs_constants.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { fs } from "ext:deno_node/internal_binding/constants.ts"; diff --git a/ext/node/polyfills/_fs/_fs_copy.ts b/ext/node/polyfills/_fs/_fs_copy.ts index 0434bff4d10619..87204e348c4b5f 100644 --- a/ext/node/polyfills/_fs/_fs_copy.ts +++ b/ext/node/polyfills/_fs/_fs_copy.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/_fs/_fs_cp.js b/ext/node/polyfills/_fs/_fs_cp.js index 52dd8f5056efbf..29bc633224ebb8 100644 --- a/ext/node/polyfills/_fs/_fs_cp.js +++ b/ext/node/polyfills/_fs/_fs_cp.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { primordials } from "ext:core/mod.js"; import { op_node_cp, op_node_cp_sync } from "ext:core/ops"; import { diff --git a/ext/node/polyfills/_fs/_fs_dir.ts b/ext/node/polyfills/_fs/_fs_dir.ts index ed051fb0bf887c..2a496562d66c0b 100644 --- a/ext/node/polyfills/_fs/_fs_dir.ts +++ b/ext/node/polyfills/_fs/_fs_dir.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { primordials } from "ext:core/mod.js"; import Dirent from "ext:deno_node/_fs/_fs_dirent.ts"; diff --git a/ext/node/polyfills/_fs/_fs_dirent.ts b/ext/node/polyfills/_fs/_fs_dirent.ts index d4ad6bb4303635..fce7a6e72d1ca8 100644 --- a/ext/node/polyfills/_fs/_fs_dirent.ts +++ b/ext/node/polyfills/_fs/_fs_dirent.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { notImplemented } from "ext:deno_node/_utils.ts"; export default class Dirent { diff --git a/ext/node/polyfills/_fs/_fs_exists.ts b/ext/node/polyfills/_fs/_fs_exists.ts index b5bbe235a44b7b..6a285f5e600bcd 100644 --- a/ext/node/polyfills/_fs/_fs_exists.ts +++ b/ext/node/polyfills/_fs/_fs_exists.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/_fs/_fs_fdatasync.ts b/ext/node/polyfills/_fs/_fs_fdatasync.ts index 0c3f50f1c6b665..02226e1c962356 100644 --- a/ext/node/polyfills/_fs/_fs_fdatasync.ts +++ b/ext/node/polyfills/_fs/_fs_fdatasync.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/_fs/_fs_fstat.ts b/ext/node/polyfills/_fs/_fs_fstat.ts index c1722487eb3160..37c057c3789e53 100644 --- a/ext/node/polyfills/_fs/_fs_fstat.ts +++ b/ext/node/polyfills/_fs/_fs_fstat.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials @@ -63,3 +63,24 @@ export function fstatSync( const origin = new FsFile(fd, Symbol.for("Deno.internal.FsFile")).statSync(); return CFISBIS(origin, options?.bigint || false); } + +export function fstatPromise(fd: number): Promise; +export function fstatPromise( + fd: number, + options: { bigint: false }, +): Promise; +export function fstatPromise( + fd: number, + options: { bigint: true }, +): Promise; +export function fstatPromise( + fd: number, + options?: statOptions, +): Stats | BigIntStats { + return new Promise((resolve, reject) => { + fstat(fd, options, (err, stats) => { + if (err) reject(err); + else resolve(stats); + }); + }); +} diff --git a/ext/node/polyfills/_fs/_fs_fsync.ts b/ext/node/polyfills/_fs/_fs_fsync.ts index 75d4b37569bc0a..a07f4407789eb5 100644 --- a/ext/node/polyfills/_fs/_fs_fsync.ts +++ b/ext/node/polyfills/_fs/_fs_fsync.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/_fs/_fs_ftruncate.ts b/ext/node/polyfills/_fs/_fs_ftruncate.ts index 92af46f52172a7..6a8614b734b39e 100644 --- a/ext/node/polyfills/_fs/_fs_ftruncate.ts +++ b/ext/node/polyfills/_fs/_fs_ftruncate.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials @@ -16,16 +16,24 @@ export function ftruncate( : undefined; const callback: CallbackWithError = typeof lenOrCallback === "function" ? lenOrCallback - : maybeCallback as CallbackWithError; + : (maybeCallback as CallbackWithError); if (!callback) throw new Error("No callback function supplied"); - new FsFile(fd, Symbol.for("Deno.internal.FsFile")).truncate(len).then( - () => callback(null), - callback, - ); + new FsFile(fd, Symbol.for("Deno.internal.FsFile")) + .truncate(len) + .then(() => callback(null), callback); } export function ftruncateSync(fd: number, len?: number) { new FsFile(fd, Symbol.for("Deno.internal.FsFile")).truncateSync(len); } + +export function ftruncatePromise(fd: number, len?: number): Promise { + return new Promise((resolve, reject) => { + ftruncate(fd, len, (err) => { + if (err) reject(err); + else resolve(); + }); + }); +} diff --git a/ext/node/polyfills/_fs/_fs_futimes.ts b/ext/node/polyfills/_fs/_fs_futimes.ts index 98cd1066c32aa4..be274f4d11372b 100644 --- a/ext/node/polyfills/_fs/_fs_futimes.ts +++ b/ext/node/polyfills/_fs/_fs_futimes.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/_fs/_fs_lchown.ts b/ext/node/polyfills/_fs/_fs_lchown.ts index 8611c8021d9a69..293155f9d0ccf8 100644 --- a/ext/node/polyfills/_fs/_fs_lchown.ts +++ b/ext/node/polyfills/_fs/_fs_lchown.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/_fs/_fs_link.ts b/ext/node/polyfills/_fs/_fs_link.ts index a10860c12f72ba..73ed890d36524b 100644 --- a/ext/node/polyfills/_fs/_fs_link.ts +++ b/ext/node/polyfills/_fs/_fs_link.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/_fs/_fs_lstat.ts b/ext/node/polyfills/_fs/_fs_lstat.ts index 6ce401444f341c..b9f80bfc5199cf 100644 --- a/ext/node/polyfills/_fs/_fs_lstat.ts +++ b/ext/node/polyfills/_fs/_fs_lstat.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/_fs/_fs_lutimes.ts b/ext/node/polyfills/_fs/_fs_lutimes.ts index 2475c57149732d..3f8dd167c04344 100644 --- a/ext/node/polyfills/_fs/_fs_lutimes.ts +++ b/ext/node/polyfills/_fs/_fs_lutimes.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/_fs/_fs_mkdir.ts b/ext/node/polyfills/_fs/_fs_mkdir.ts index 06a8b35221560c..03d36629e572a2 100644 --- a/ext/node/polyfills/_fs/_fs_mkdir.ts +++ b/ext/node/polyfills/_fs/_fs_mkdir.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/_fs/_fs_mkdtemp.ts b/ext/node/polyfills/_fs/_fs_mkdtemp.ts index 5498828b5b11a9..46060971a8d268 100644 --- a/ext/node/polyfills/_fs/_fs_mkdtemp.ts +++ b/ext/node/polyfills/_fs/_fs_mkdtemp.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Node.js contributors. All rights reserved. MIT License. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/_fs/_fs_open.ts b/ext/node/polyfills/_fs/_fs_open.ts index 31ca4bb6195857..85628ddceffc29 100644 --- a/ext/node/polyfills/_fs/_fs_open.ts +++ b/ext/node/polyfills/_fs/_fs_open.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/_fs/_fs_opendir.ts b/ext/node/polyfills/_fs/_fs_opendir.ts index 3280f0fd5c44f7..51379fd451bcec 100644 --- a/ext/node/polyfills/_fs/_fs_opendir.ts +++ b/ext/node/polyfills/_fs/_fs_opendir.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/_fs/_fs_read.ts b/ext/node/polyfills/_fs/_fs_read.ts index df4f5e375dd00f..c7f3acf4d82e3e 100644 --- a/ext/node/polyfills/_fs/_fs_read.ts +++ b/ext/node/polyfills/_fs/_fs_read.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/_fs/_fs_readFile.ts b/ext/node/polyfills/_fs/_fs_readFile.ts index cf7e0305d82100..752a683ca7bcbf 100644 --- a/ext/node/polyfills/_fs/_fs_readFile.ts +++ b/ext/node/polyfills/_fs/_fs_readFile.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials @@ -10,7 +10,7 @@ import { TextOptionsArgument, } from "ext:deno_node/_fs/_fs_common.ts"; import { Buffer } from "node:buffer"; -import { readAll } from "ext:deno_io/12_io.js"; +import { readAll, readAllSync } from "ext:deno_io/12_io.js"; import { FileHandle } from "ext:deno_node/internal/fs/handle.ts"; import { pathFromURL } from "ext:deno_web/00_infra.js"; import { @@ -39,7 +39,7 @@ type TextCallback = (err: Error | null, data?: string) => void; type BinaryCallback = (err: Error | null, data?: Buffer) => void; type GenericCallback = (err: Error | null, data?: string | Buffer) => void; type Callback = TextCallback | BinaryCallback | GenericCallback; -type Path = string | URL | FileHandle; +type Path = string | URL | FileHandle | number; export function readFile( path: Path, @@ -76,6 +76,9 @@ export function readFile( if (path instanceof FileHandle) { const fsFile = new FsFile(path.fd, Symbol.for("Deno.internal.FsFile")); p = readAll(fsFile); + } else if (typeof path === "number") { + const fsFile = new FsFile(path, Symbol.for("Deno.internal.FsFile")); + p = readAll(fsFile); } else { p = Deno.readFile(path); } @@ -88,7 +91,7 @@ export function readFile( } const buffer = maybeDecode(data, encoding); (cb as BinaryCallback)(null, buffer); - }, (err) => cb && cb(denoErrorToNodeError(err))); + }, (err) => cb && cb(denoErrorToNodeError(err, { path, syscall: "open" }))); } } @@ -106,23 +109,28 @@ export function readFilePromise( } export function readFileSync( - path: string | URL, + path: string | URL | number, opt: TextOptionsArgument, ): string; export function readFileSync( - path: string | URL, + path: string | URL | number, opt?: BinaryOptionsArgument, ): Buffer; export function readFileSync( - path: string | URL, + path: string | URL | number, opt?: FileOptionsArgument, ): string | Buffer { path = path instanceof URL ? pathFromURL(path) : path; let data; - try { - data = Deno.readFileSync(path); - } catch (err) { - throw denoErrorToNodeError(err); + if (typeof path === "number") { + const fsFile = new FsFile(path, Symbol.for("Deno.internal.FsFile")); + data = readAllSync(fsFile); + } else { + try { + data = Deno.readFileSync(path); + } catch (err) { + throw denoErrorToNodeError(err, { path, syscall: "open" }); + } } const encoding = getEncoding(opt); if (encoding && encoding !== "binary") { diff --git a/ext/node/polyfills/_fs/_fs_readdir.ts b/ext/node/polyfills/_fs/_fs_readdir.ts index 3b314227dc15a2..4b34451a3848c5 100644 --- a/ext/node/polyfills/_fs/_fs_readdir.ts +++ b/ext/node/polyfills/_fs/_fs_readdir.ts @@ -1,15 +1,16 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { TextDecoder, TextEncoder } from "ext:deno_web/08_text_encoding.js"; -import { asyncIterableToCallback } from "ext:deno_node/_fs/_fs_watch.ts"; import Dirent from "ext:deno_node/_fs/_fs_dirent.ts"; import { denoErrorToNodeError } from "ext:deno_node/internal/errors.ts"; import { getValidatedPath } from "ext:deno_node/internal/fs/utils.mjs"; import { Buffer } from "node:buffer"; import { promisify } from "ext:deno_node/internal/util.mjs"; +import { op_fs_read_dir_async, op_fs_read_dir_sync } from "ext:core/ops"; +import { join, relative } from "node:path"; function toDirent(val: Deno.DirEntry & { parentPath: string }): Dirent { return new Dirent(val); @@ -18,6 +19,7 @@ function toDirent(val: Deno.DirEntry & { parentPath: string }): Dirent { type readDirOptions = { encoding?: string; withFileTypes?: boolean; + recursive?: boolean; }; type readDirCallback = (err: Error | null, files: string[]) => void; @@ -30,12 +32,12 @@ type readDirBoth = ( export function readdir( path: string | Buffer | URL, - options: { withFileTypes?: false; encoding?: string }, + options: readDirOptions, callback: readDirCallback, ): void; export function readdir( path: string | Buffer | URL, - options: { withFileTypes: true; encoding?: string }, + options: readDirOptions, callback: readDirCallbackDirent, ): void; export function readdir(path: string | URL, callback: readDirCallback): void; @@ -51,8 +53,7 @@ export function readdir( const options = typeof optionsOrCallback === "object" ? optionsOrCallback : null; - const result: Array = []; - path = getValidatedPath(path); + path = getValidatedPath(path).toString(); if (!callback) throw new Error("No callback function supplied"); @@ -66,24 +67,44 @@ export function readdir( } } - try { - path = path.toString(); - asyncIterableToCallback(Deno.readDir(path), (val, done) => { - if (typeof path !== "string") return; - if (done) { - callback(null, result); + const result: Array = []; + const dirs = [path]; + let current: string | undefined; + (async () => { + while ((current = dirs.shift()) !== undefined) { + try { + const entries = await op_fs_read_dir_async(current); + + for (let i = 0; i < entries.length; i++) { + const entry = entries[i]; + if (options?.recursive && entry.isDirectory) { + dirs.push(join(current, entry.name)); + } + + if (options?.withFileTypes) { + entry.parentPath = current; + result.push(toDirent(entry)); + } else { + let name = decode(entry.name, options?.encoding); + if (options?.recursive) { + name = relative(path, join(current, name)); + } + result.push(name); + } + } + } catch (err) { + callback( + denoErrorToNodeError(err as Error, { + syscall: "readdir", + path: current, + }), + ); return; } - if (options?.withFileTypes) { - val.parentPath = path; - result.push(toDirent(val)); - } else result.push(decode(val.name)); - }, (e) => { - callback(denoErrorToNodeError(e as Error, { syscall: "readdir" })); - }); - } catch (e) { - callback(denoErrorToNodeError(e as Error, { syscall: "readdir" })); - } + } + + callback(null, result); + })(); } function decode(str: string, encoding?: string): string { @@ -118,8 +139,7 @@ export function readdirSync( path: string | Buffer | URL, options?: readDirOptions, ): Array { - const result = []; - path = getValidatedPath(path); + path = getValidatedPath(path).toString(); if (options?.encoding) { try { @@ -131,16 +151,37 @@ export function readdirSync( } } - try { - path = path.toString(); - for (const file of Deno.readDirSync(path)) { - if (options?.withFileTypes) { - file.parentPath = path; - result.push(toDirent(file)); - } else result.push(decode(file.name)); + const result: Array = []; + const dirs = [path]; + let current: string | undefined; + while ((current = dirs.shift()) !== undefined) { + try { + const entries = op_fs_read_dir_sync(current); + + for (let i = 0; i < entries.length; i++) { + const entry = entries[i]; + if (options?.recursive && entry.isDirectory) { + dirs.push(join(current, entry.name)); + } + + if (options?.withFileTypes) { + entry.parentPath = current; + result.push(toDirent(entry)); + } else { + let name = decode(entry.name, options?.encoding); + if (options?.recursive) { + name = relative(path, join(current, name)); + } + result.push(name); + } + } + } catch (e) { + throw denoErrorToNodeError(e as Error, { + syscall: "readdir", + path: current, + }); } - } catch (e) { - throw denoErrorToNodeError(e as Error, { syscall: "readdir" }); } + return result; } diff --git a/ext/node/polyfills/_fs/_fs_readlink.ts b/ext/node/polyfills/_fs/_fs_readlink.ts index 08bea843faf585..084dbc2d09a25a 100644 --- a/ext/node/polyfills/_fs/_fs_readlink.ts +++ b/ext/node/polyfills/_fs/_fs_readlink.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/_fs/_fs_readv.ts b/ext/node/polyfills/_fs/_fs_readv.ts index 2259f029aebd7f..4486959b764ec1 100644 --- a/ext/node/polyfills/_fs/_fs_readv.ts +++ b/ext/node/polyfills/_fs/_fs_readv.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/_fs/_fs_realpath.ts b/ext/node/polyfills/_fs/_fs_realpath.ts index 4568748ba765e2..12f5f10a432b4e 100644 --- a/ext/node/polyfills/_fs/_fs_realpath.ts +++ b/ext/node/polyfills/_fs/_fs_realpath.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/_fs/_fs_rename.ts b/ext/node/polyfills/_fs/_fs_rename.ts index 41569c80f31c82..7a84cf8d986241 100644 --- a/ext/node/polyfills/_fs/_fs_rename.ts +++ b/ext/node/polyfills/_fs/_fs_rename.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/_fs/_fs_rm.ts b/ext/node/polyfills/_fs/_fs_rm.ts index 5730f8c413268e..cce2ab95c0e34d 100644 --- a/ext/node/polyfills/_fs/_fs_rm.ts +++ b/ext/node/polyfills/_fs/_fs_rm.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/_fs/_fs_rmdir.ts b/ext/node/polyfills/_fs/_fs_rmdir.ts index 00c085ebd54abd..6a78e9e467ee2b 100644 --- a/ext/node/polyfills/_fs/_fs_rmdir.ts +++ b/ext/node/polyfills/_fs/_fs_rmdir.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/_fs/_fs_stat.ts b/ext/node/polyfills/_fs/_fs_stat.ts index 507cb05eaf52f3..031c8dbb5094d7 100644 --- a/ext/node/polyfills/_fs/_fs_stat.ts +++ b/ext/node/polyfills/_fs/_fs_stat.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials @@ -6,6 +6,7 @@ import { denoErrorToNodeError } from "ext:deno_node/internal/errors.ts"; import { promisify } from "ext:deno_node/internal/util.mjs"; import { primordials } from "ext:core/mod.js"; +import { getValidatedPath } from "ext:deno_node/internal/fs/utils.mjs"; const { ObjectCreate, ObjectAssign } = primordials; @@ -379,6 +380,7 @@ export function stat( ? optionsOrCallback : { bigint: false }; + path = getValidatedPath(path).toString(); if (!callback) throw new Error("No callback function supplied"); Deno.stat(path).then( @@ -409,6 +411,8 @@ export function statSync( path: string | URL, options: statOptions = { bigint: false, throwIfNoEntry: true }, ): Stats | BigIntStats | undefined { + path = getValidatedPath(path).toString(); + try { const origin = Deno.statSync(path); return CFISBIS(origin, options.bigint); diff --git a/ext/node/polyfills/_fs/_fs_statfs.js b/ext/node/polyfills/_fs/_fs_statfs.js index 51da1ed684fd49..90953c12b531de 100644 --- a/ext/node/polyfills/_fs/_fs_statfs.js +++ b/ext/node/polyfills/_fs/_fs_statfs.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { BigInt } from "ext:deno_node/internal/primordials.mjs"; import { op_node_statfs } from "ext:core/ops"; diff --git a/ext/node/polyfills/_fs/_fs_symlink.ts b/ext/node/polyfills/_fs/_fs_symlink.ts index 350263423a200d..953697e44c924e 100644 --- a/ext/node/polyfills/_fs/_fs_symlink.ts +++ b/ext/node/polyfills/_fs/_fs_symlink.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/_fs/_fs_truncate.ts b/ext/node/polyfills/_fs/_fs_truncate.ts index a7e79b9c30945c..47b87eecdcd5a6 100644 --- a/ext/node/polyfills/_fs/_fs_truncate.ts +++ b/ext/node/polyfills/_fs/_fs_truncate.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/_fs/_fs_unlink.ts b/ext/node/polyfills/_fs/_fs_unlink.ts index 1d9aefa46ff9dd..d046c40f35d79e 100644 --- a/ext/node/polyfills/_fs/_fs_unlink.ts +++ b/ext/node/polyfills/_fs/_fs_unlink.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/_fs/_fs_utimes.ts b/ext/node/polyfills/_fs/_fs_utimes.ts index 3fff4a46235aa3..ff25fffed87d95 100644 --- a/ext/node/polyfills/_fs/_fs_utimes.ts +++ b/ext/node/polyfills/_fs/_fs_utimes.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/_fs/_fs_watch.ts b/ext/node/polyfills/_fs/_fs_watch.ts index eb2cd8bfa271e7..8b92e9aa44d4b8 100644 --- a/ext/node/polyfills/_fs/_fs_watch.ts +++ b/ext/node/polyfills/_fs/_fs_watch.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/_fs/_fs_write.d.ts b/ext/node/polyfills/_fs/_fs_write.d.ts index 7171ec6dbde9e8..cd8257ec35df40 100644 --- a/ext/node/polyfills/_fs/_fs_write.d.ts +++ b/ext/node/polyfills/_fs/_fs_write.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Forked from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/d9df51e34526f48bef4e2546a006157b391ad96c/types/node/fs.d.ts import { BufferEncoding, ErrnoException } from "ext:deno_node/_global.d.ts"; diff --git a/ext/node/polyfills/_fs/_fs_write.mjs b/ext/node/polyfills/_fs/_fs_write.mjs index 254094c9ad3301..a0d0af601786f8 100644 --- a/ext/node/polyfills/_fs/_fs_write.mjs +++ b/ext/node/polyfills/_fs/_fs_write.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/_fs/_fs_writeFile.ts b/ext/node/polyfills/_fs/_fs_writeFile.ts index dd324815b96dfc..c76be8a6b818e1 100644 --- a/ext/node/polyfills/_fs/_fs_writeFile.ts +++ b/ext/node/polyfills/_fs/_fs_writeFile.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/_fs/_fs_writev.d.ts b/ext/node/polyfills/_fs/_fs_writev.d.ts index daa4dbbcf4578d..1ba5511ff1fb27 100644 --- a/ext/node/polyfills/_fs/_fs_writev.d.ts +++ b/ext/node/polyfills/_fs/_fs_writev.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Forked from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/d9df51e34526f48bef4e2546a006157b391ad96c/types/node/fs.d.ts import { ErrnoException } from "ext:deno_node/_global.d.ts"; diff --git a/ext/node/polyfills/_fs/_fs_writev.mjs b/ext/node/polyfills/_fs/_fs_writev.mjs index 055bce0b24a403..61807c7f687bb3 100644 --- a/ext/node/polyfills/_fs/_fs_writev.mjs +++ b/ext/node/polyfills/_fs/_fs_writev.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/_global.d.ts b/ext/node/polyfills/_global.d.ts index 8587acbbb2f70e..1e610de08de21b 100644 --- a/ext/node/polyfills/_global.d.ts +++ b/ext/node/polyfills/_global.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { EventEmitter } from "ext:deno_node/_events.d.ts"; import { Buffer } from "node:buffer"; diff --git a/ext/node/polyfills/_http_agent.mjs b/ext/node/polyfills/_http_agent.mjs index 53bb64ed536c82..4de58cb4069ebe 100644 --- a/ext/node/polyfills/_http_agent.mjs +++ b/ext/node/polyfills/_http_agent.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/_http_common.ts b/ext/node/polyfills/_http_common.ts index 8fb7758a5525b5..f2ca75ec1c387a 100644 --- a/ext/node/polyfills/_http_common.ts +++ b/ext/node/polyfills/_http_common.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. import { primordials } from "ext:core/mod.js"; @@ -7,6 +7,7 @@ const { SafeRegExp, Symbol, } = primordials; +import { HTTPParser } from "ext:deno_node/internal_binding/http_parser.ts"; export const CRLF = "\r\n"; export const kIncomingMessage = Symbol("IncomingMessage"); @@ -79,6 +80,8 @@ export { checkIsHttpToken as _checkIsHttpToken, }; +export { HTTPParser }; + export default { _checkInvalidHeaderChar: checkInvalidHeaderChar, _checkIsHttpToken: checkIsHttpToken, @@ -87,4 +90,5 @@ export default { continueExpression, kIncomingMessage, methods, + HTTPParser, }; diff --git a/ext/node/polyfills/_http_outgoing.ts b/ext/node/polyfills/_http_outgoing.ts index 4da6b73e87a7e2..fcc6394eb8f757 100644 --- a/ext/node/polyfills/_http_outgoing.ts +++ b/ext/node/polyfills/_http_outgoing.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills @@ -491,19 +491,53 @@ Object.defineProperties( return ret; }, + /** Right after socket is ready, we need to writeHeader() to setup the request and + * client. This is invoked by onSocket(). */ + _flushHeaders() { + if (!this._headerSent) { + this._headerSent = true; + this._writeHeader(); + } + }, + // deno-lint-ignore no-explicit-any _send(data: any, encoding?: string | null, callback?: () => void) { - if (!this._headerSent && this._header !== null) { - this._writeHeader(); - this._headerSent = true; + // if socket is ready, write the data after headers are written. + // if socket is not ready, buffer data in outputbuffer. + if ( + this.socket && !this.socket.connecting && this.outputData.length === 0 + ) { + if (!this._headerSent) { + this._writeHeader(); + this._headerSent = true; + } + + return this._writeRaw(data, encoding, callback); + } else { + this.outputData.push({ data, encoding, callback }); } - return this._writeRaw(data, encoding, callback); + return false; }, _writeHeader() { throw new ERR_METHOD_NOT_IMPLEMENTED("_writeHeader()"); }, + _flushBuffer() { + const outputLength = this.outputData.length; + if (outputLength <= 0 || !this.socket || !this._bodyWriter) { + return undefined; + } + + const { data, encoding, callback } = this.outputData.shift(); + const ret = this._writeRaw(data, encoding, callback); + if (this.outputData.length > 0) { + this.once("drain", this._flushBuffer); + } + + return ret; + }, + _writeRaw( // deno-lint-ignore no-explicit-any data: any, @@ -517,11 +551,15 @@ Object.defineProperties( data = new Uint8Array(data.buffer, data.byteOffset, data.byteLength); } if (data.buffer.byteLength > 0) { - this._bodyWriter.write(data).then(() => { - callback?.(); - this.emit("drain"); - }).catch((e) => { - this._requestSendError = e; + this._bodyWriter.ready.then(() => { + if (this._bodyWriter.desiredSize > 0) { + this._bodyWriter.write(data).then(() => { + callback?.(); + this.emit("drain"); + }).catch((e) => { + this._requestSendError = e; + }); + } }); } return false; @@ -658,7 +696,6 @@ Object.defineProperties( const { header } = state; this._header = header + "\r\n"; - this._headerSent = false; // Wait until the first body chunk, or close(), is sent to flush, // UNLESS we're sending Expect: 100-continue. diff --git a/ext/node/polyfills/_http_server.ts b/ext/node/polyfills/_http_server.ts index c2867de0c6bcef..cf80f1e6e05b7d 100644 --- a/ext/node/polyfills/_http_server.ts +++ b/ext/node/polyfills/_http_server.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. export enum STATUS_CODES { /** RFC 7231, 6.2.1 */ diff --git a/ext/node/polyfills/_next_tick.ts b/ext/node/polyfills/_next_tick.ts index af306a29c83c0c..355b6ca6ba508e 100644 --- a/ext/node/polyfills/_next_tick.ts +++ b/ext/node/polyfills/_next_tick.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/_process/exiting.ts b/ext/node/polyfills/_process/exiting.ts index 01991e9c963903..c1a032b643b2ef 100644 --- a/ext/node/polyfills/_process/exiting.ts +++ b/ext/node/polyfills/_process/exiting.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore prefer-const export let _exiting = false; diff --git a/ext/node/polyfills/_process/process.ts b/ext/node/polyfills/_process/process.ts index 6f69139c9847bf..06e48160ded92e 100644 --- a/ext/node/polyfills/_process/process.ts +++ b/ext/node/polyfills/_process/process.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // The following are all the process APIs that don't depend on the stream module diff --git a/ext/node/polyfills/_process/streams.mjs b/ext/node/polyfills/_process/streams.mjs index 3573956c9daf21..9a838e7d38cb53 100644 --- a/ext/node/polyfills/_process/streams.mjs +++ b/ext/node/polyfills/_process/streams.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. import { primordials } from "ext:core/mod.js"; diff --git a/ext/node/polyfills/_readline.d.ts b/ext/node/polyfills/_readline.d.ts index fcaa327a05fe23..256cb878879f29 100644 --- a/ext/node/polyfills/_readline.d.ts +++ b/ext/node/polyfills/_readline.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-explicit-any // Forked from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/cd61f5b4d3d143108569ec3f88adc0eb34b961c4/types/node/readline.d.ts diff --git a/ext/node/polyfills/_readline.mjs b/ext/node/polyfills/_readline.mjs index 2af717152baf40..3943736ea961ac 100644 --- a/ext/node/polyfills/_readline.mjs +++ b/ext/node/polyfills/_readline.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/_readline_shared_types.d.ts b/ext/node/polyfills/_readline_shared_types.d.ts index b58ad035e71d42..f88de9091c0b76 100644 --- a/ext/node/polyfills/_readline_shared_types.d.ts +++ b/ext/node/polyfills/_readline_shared_types.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Part of https://github.com/DefinitelyTyped/DefinitelyTyped/blob/cd61f5b4d3d143108569ec3f88adc0eb34b961c4/types/node/readline.d.ts diff --git a/ext/node/polyfills/_stream.d.ts b/ext/node/polyfills/_stream.d.ts index d251d9bee297bf..6ae3494118460d 100644 --- a/ext/node/polyfills/_stream.d.ts +++ b/ext/node/polyfills/_stream.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-explicit-any // Forked from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/4f538975138678878fed5b2555c0672aa578ab7d/types/node/stream.d.ts diff --git a/ext/node/polyfills/_stream.mjs b/ext/node/polyfills/_stream.mjs index 02640abcd94d08..3fc79b69dfa004 100644 --- a/ext/node/polyfills/_stream.mjs +++ b/ext/node/polyfills/_stream.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-fmt-ignore-file // deno-lint-ignore-file diff --git a/ext/node/polyfills/_tls_common.ts b/ext/node/polyfills/_tls_common.ts index d00c3629e1b602..4e5904b97182e5 100644 --- a/ext/node/polyfills/_tls_common.ts +++ b/ext/node/polyfills/_tls_common.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file no-explicit-any diff --git a/ext/node/polyfills/_tls_wrap.ts b/ext/node/polyfills/_tls_wrap.ts index e36fc637e762e4..0edea1c053269b 100644 --- a/ext/node/polyfills/_tls_wrap.ts +++ b/ext/node/polyfills/_tls_wrap.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills @@ -148,9 +148,20 @@ export class TLSSocket extends net.Socket { : new TCP(TCPConstants.SOCKET); } + const { promise, resolve } = Promise.withResolvers(); + // Patches `afterConnect` hook to replace TCP conn with TLS conn const afterConnect = handle.afterConnect; handle.afterConnect = async (req: any, status: number) => { + options.hostname ??= undefined; // coerce to undefined if null, startTls expects hostname to be undefined + if (tlssock._isNpmAgent) { + // skips the TLS handshake for @npmcli/agent as it's handled by + // onSocket handler of ClientRequest object. + tlssock.emit("secure"); + tlssock.removeListener("end", onConnectEnd); + return afterConnect.call(handle, req, status); + } + try { const conn = await Deno.startTls(handle[kStreamBaseField], options); try { @@ -164,15 +175,25 @@ export class TLSSocket extends net.Socket { // Don't interrupt "secure" event to let the first read/write // operation emit the error. } + + // Assign the TLS connection to the handle and resume reading. handle[kStreamBaseField] = conn; + handle.upgrading = false; + if (!handle.pauseOnCreate) { + handle.readStart(); + } + + resolve(); + tlssock.emit("secure"); tlssock.removeListener("end", onConnectEnd); - } catch (_) { + } catch { // TODO(kt3k): Handle this } return afterConnect.call(handle, req, status); }; + handle.upgrading = promise; (handle as any).verifyError = function () { return null; // Never fails, rejectUnauthorized is always true in Deno. }; diff --git a/ext/node/polyfills/_util/_util_callbackify.js b/ext/node/polyfills/_util/_util_callbackify.js index cb30f791502504..ae83850bc090dc 100644 --- a/ext/node/polyfills/_util/_util_callbackify.js +++ b/ext/node/polyfills/_util/_util_callbackify.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // // Adapted from Node.js. Copyright Joyent, Inc. and other Node contributors. // diff --git a/ext/node/polyfills/_util/asserts.ts b/ext/node/polyfills/_util/asserts.ts index 8f90cf168aa62c..71c3cc863de2a2 100644 --- a/ext/node/polyfills/_util/asserts.ts +++ b/ext/node/polyfills/_util/asserts.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { primordials } from "ext:core/mod.js"; const { diff --git a/ext/node/polyfills/_util/async.ts b/ext/node/polyfills/_util/async.ts index 0cacccacc70e8e..445febcaaf9152 100644 --- a/ext/node/polyfills/_util/async.ts +++ b/ext/node/polyfills/_util/async.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // This module is vendored from std/async/delay.ts // (with some modifications) diff --git a/ext/node/polyfills/_util/os.ts b/ext/node/polyfills/_util/os.ts index 421d5d9da0837f..f72dc662d94187 100644 --- a/ext/node/polyfills/_util/os.ts +++ b/ext/node/polyfills/_util/os.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { op_node_build_os } from "ext:core/ops"; diff --git a/ext/node/polyfills/_util/std_asserts.ts b/ext/node/polyfills/_util/std_asserts.ts index 78b749f549342d..76237413794770 100644 --- a/ext/node/polyfills/_util/std_asserts.ts +++ b/ext/node/polyfills/_util/std_asserts.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // vendored from std/assert/mod.ts import { primordials } from "ext:core/mod.js"; diff --git a/ext/node/polyfills/_util/std_fmt_colors.ts b/ext/node/polyfills/_util/std_fmt_colors.ts index 5072b298ee40a5..f1dc97f6ca38a3 100644 --- a/ext/node/polyfills/_util/std_fmt_colors.ts +++ b/ext/node/polyfills/_util/std_fmt_colors.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // This file is vendored from std/fmt/colors.ts import { primordials } from "ext:core/mod.js"; diff --git a/ext/node/polyfills/_util/std_testing_diff.ts b/ext/node/polyfills/_util/std_testing_diff.ts index 5155fd242cc739..1b680c6ccadc77 100644 --- a/ext/node/polyfills/_util/std_testing_diff.ts +++ b/ext/node/polyfills/_util/std_testing_diff.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // This file was vendored from std/testing/_diff.ts import { primordials } from "ext:core/mod.js"; diff --git a/ext/node/polyfills/_utils.ts b/ext/node/polyfills/_utils.ts index 79d84e00f0c874..7f20782e2b11b4 100644 --- a/ext/node/polyfills/_utils.ts +++ b/ext/node/polyfills/_utils.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { primordials } from "ext:core/mod.js"; const { diff --git a/ext/node/polyfills/_zlib.mjs b/ext/node/polyfills/_zlib.mjs index 07fc440ef545e5..bb6bac1bd0bebd 100644 --- a/ext/node/polyfills/_zlib.mjs +++ b/ext/node/polyfills/_zlib.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright (c) 2014-2015 Devon Govett // Forked from https://github.com/browserify/browserify-zlib diff --git a/ext/node/polyfills/_zlib_binding.mjs b/ext/node/polyfills/_zlib_binding.mjs index 069b7f8351b31f..37125b88ac1f83 100644 --- a/ext/node/polyfills/_zlib_binding.mjs +++ b/ext/node/polyfills/_zlib_binding.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file diff --git a/ext/node/polyfills/assert.ts b/ext/node/polyfills/assert.ts index 188c7a0c2fa019..48b4627044f9d1 100644 --- a/ext/node/polyfills/assert.ts +++ b/ext/node/polyfills/assert.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file ban-types prefer-primordials diff --git a/ext/node/polyfills/assert/strict.ts b/ext/node/polyfills/assert/strict.ts index 98371676276eb5..883deaf0872883 100644 --- a/ext/node/polyfills/assert/strict.ts +++ b/ext/node/polyfills/assert/strict.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { strict } from "node:assert"; export { diff --git a/ext/node/polyfills/assertion_error.ts b/ext/node/polyfills/assertion_error.ts index ff1168dc30cf14..b56cec2c1d9f27 100644 --- a/ext/node/polyfills/assertion_error.ts +++ b/ext/node/polyfills/assertion_error.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Adapted from Node.js. Copyright Joyent, Inc. and other Node contributors. diff --git a/ext/node/polyfills/async_hooks.ts b/ext/node/polyfills/async_hooks.ts index 7a2f153dac13bf..e01110bd3bc951 100644 --- a/ext/node/polyfills/async_hooks.ts +++ b/ext/node/polyfills/async_hooks.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/buffer.ts b/ext/node/polyfills/buffer.ts index efe3b07a97a451..38000c6edb3a65 100644 --- a/ext/node/polyfills/buffer.ts +++ b/ext/node/polyfills/buffer.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // @deno-types="./internal/buffer.d.ts" export { atob, diff --git a/ext/node/polyfills/child_process.ts b/ext/node/polyfills/child_process.ts index eda718ff3480c3..184b29bd2b8fb5 100644 --- a/ext/node/polyfills/child_process.ts +++ b/ext/node/polyfills/child_process.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // This module implements 'child_process' module of Node.JS API. // ref: https://nodejs.org/api/child_process.html diff --git a/ext/node/polyfills/cluster.ts b/ext/node/polyfills/cluster.ts index 8abc2fedcdacf6..67534676b4d962 100644 --- a/ext/node/polyfills/cluster.ts +++ b/ext/node/polyfills/cluster.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. import { notImplemented } from "ext:deno_node/_utils.ts"; diff --git a/ext/node/polyfills/console.ts b/ext/node/polyfills/console.ts index f74c9af1651156..1189d95064d9b1 100644 --- a/ext/node/polyfills/console.ts +++ b/ext/node/polyfills/console.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { primordials } from "ext:core/mod.js"; import { Console } from "ext:deno_node/internal/console/constructor.mjs"; diff --git a/ext/node/polyfills/constants.ts b/ext/node/polyfills/constants.ts index e5004039b1e60f..421c8b641a961c 100644 --- a/ext/node/polyfills/constants.ts +++ b/ext/node/polyfills/constants.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Based on: https://github.com/nodejs/node/blob/0646eda/lib/constants.js diff --git a/ext/node/polyfills/crypto.ts b/ext/node/polyfills/crypto.ts index 908d21b006ab1c..ff3bdc7752da6b 100644 --- a/ext/node/polyfills/crypto.ts +++ b/ext/node/polyfills/crypto.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/dgram.ts b/ext/node/polyfills/dgram.ts index 99f4940ec261cb..56fb8d8f32b67e 100644 --- a/ext/node/polyfills/dgram.ts +++ b/ext/node/polyfills/dgram.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/diagnostics_channel.js b/ext/node/polyfills/diagnostics_channel.js index 807c33e475bd40..65533e0803d5d4 100644 --- a/ext/node/polyfills/diagnostics_channel.js +++ b/ext/node/polyfills/diagnostics_channel.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/dns.ts b/ext/node/polyfills/dns.ts index 78b934e602cd9f..b8e4af6eecb050 100644 --- a/ext/node/polyfills/dns.ts +++ b/ext/node/polyfills/dns.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/dns/promises.ts b/ext/node/polyfills/dns/promises.ts index 6bc539cba9155f..422ae05c64082a 100644 --- a/ext/node/polyfills/dns/promises.ts +++ b/ext/node/polyfills/dns/promises.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/domain.ts b/ext/node/polyfills/domain.ts index 70937799668bf2..daa613ede06e35 100644 --- a/ext/node/polyfills/domain.ts +++ b/ext/node/polyfills/domain.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // This code has been inspired by https://github.com/bevry/domain-browser/commit/8bce7f4a093966ca850da75b024239ad5d0b33c6 diff --git a/ext/node/polyfills/events.ts b/ext/node/polyfills/events.ts index 78f3d8768c80a6..891f3d3b8d80ee 100644 --- a/ext/node/polyfills/events.ts +++ b/ext/node/polyfills/events.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // @deno-types="./_events.d.ts" export { addAbortListener, diff --git a/ext/node/polyfills/fs.ts b/ext/node/polyfills/fs.ts index 7a3cf4e67f2d52..76ff9ebd1294d8 100644 --- a/ext/node/polyfills/fs.ts +++ b/ext/node/polyfills/fs.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { access, accessPromise, @@ -23,7 +23,7 @@ import Dir from "ext:deno_node/_fs/_fs_dir.ts"; import Dirent from "ext:deno_node/_fs/_fs_dirent.ts"; import { exists, existsSync } from "ext:deno_node/_fs/_fs_exists.ts"; import { fdatasync, fdatasyncSync } from "ext:deno_node/_fs/_fs_fdatasync.ts"; -import { fstat, fstatSync } from "ext:deno_node/_fs/_fs_fstat.ts"; +import { fstat, fstatPromise, fstatSync } from "ext:deno_node/_fs/_fs_fstat.ts"; import { fsync, fsyncSync } from "ext:deno_node/_fs/_fs_fsync.ts"; import { ftruncate, ftruncateSync } from "ext:deno_node/_fs/_fs_ftruncate.ts"; import { futimes, futimesSync } from "ext:deno_node/_fs/_fs_futimes.ts"; @@ -174,6 +174,7 @@ const promises = { lstat: lstatPromise, stat: statPromise, statfs: statfsPromise, + fstat: fstatPromise, link: linkPromise, unlink: unlinkPromise, chmod: chmodPromise, diff --git a/ext/node/polyfills/fs/promises.ts b/ext/node/polyfills/fs/promises.ts index 3e5329dbbe932f..f8d63e94e0b9b6 100644 --- a/ext/node/polyfills/fs/promises.ts +++ b/ext/node/polyfills/fs/promises.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { promises as fsPromises } from "node:fs"; export const access = fsPromises.access; @@ -16,6 +16,7 @@ export const readlink = fsPromises.readlink; export const symlink = fsPromises.symlink; export const lstat = fsPromises.lstat; export const stat = fsPromises.stat; +export const fstat = fsPromises.fstat; export const link = fsPromises.link; export const unlink = fsPromises.unlink; export const chmod = fsPromises.chmod; diff --git a/ext/node/polyfills/http.ts b/ext/node/polyfills/http.ts index 9a920adeee72a0..f698ca01b3e2da 100644 --- a/ext/node/polyfills/http.ts +++ b/ext/node/polyfills/http.ts @@ -1,20 +1,21 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { core, primordials } from "ext:core/mod.js"; import { + op_node_http_await_response, op_node_http_fetch_response_upgrade, - op_node_http_fetch_send, - op_node_http_request, + op_node_http_request_with_conn, + op_tls_start, } from "ext:core/ops"; import { TextEncoder } from "ext:deno_web/08_text_encoding.js"; import { setTimeout } from "ext:deno_web/02_timers.js"; import { _normalizeArgs, - // createConnection, + createConnection, ListenOptions, Socket, } from "node:net"; @@ -48,9 +49,10 @@ import { kOutHeaders } from "ext:deno_node/internal/http.ts"; import { _checkIsHttpToken as checkIsHttpToken } from "node:_http_common"; import { Agent, globalAgent } from "node:_http_agent"; import { urlToHttpOptions } from "ext:deno_node/internal/url.ts"; -import { kEmptyObject } from "ext:deno_node/internal/util.mjs"; +import { kEmptyObject, once } from "ext:deno_node/internal/util.mjs"; import { constants, TCP } from "ext:deno_node/internal_binding/tcp_wrap.ts"; -import { notImplemented, warnNotImplemented } from "ext:deno_node/_utils.ts"; +import { kStreamBaseField } from "ext:deno_node/internal_binding/stream_wrap.ts"; +import { notImplemented } from "ext:deno_node/_utils.ts"; import { connResetException, ERR_HTTP_HEADERS_SENT, @@ -62,7 +64,6 @@ import { } from "ext:deno_node/internal/errors.ts"; import { getTimerDuration } from "ext:deno_node/internal/timers.mjs"; import { serve, upgradeHttpRaw } from "ext:deno_http/00_serve.ts"; -import { createHttpClient } from "ext:deno_fetch/22_http_client.js"; import { headersEntries } from "ext:deno_fetch/20_headers.js"; import { timerId } from "ext:deno_web/03_abort_signal.js"; import { clearTimeout as webClearTimeout } from "ext:deno_web/02_timers.js"; @@ -148,6 +149,10 @@ class FakeSocket extends EventEmitter { } } +function emitErrorEvent(request, error) { + request.emit("error", error); +} + /** ClientRequest represents the http(s) request from the client */ class ClientRequest extends OutgoingMessage { defaultProtocol = "http:"; @@ -160,6 +165,8 @@ class ClientRequest extends OutgoingMessage { useChunkedEncodingByDefault: boolean; path: string; _req: { requestRid: number; cancelHandleRid: number | null } | undefined; + _encrypted = false; + socket: Socket; constructor( input: string | URL, @@ -382,17 +389,11 @@ class ClientRequest extends OutgoingMessage { delete optsWithoutSignal.signal; } - if (options!.createConnection) { - warnNotImplemented("ClientRequest.options.createConnection"); - } - if (options!.lookup) { notImplemented("ClientRequest.options.lookup"); } - // initiate connection - // TODO(crowlKats): finish this - /*if (this.agent) { + if (this.agent) { this.agent.addRequest(this, optsWithoutSignal); } else { // No agent, default to Connection:close. @@ -422,8 +423,7 @@ class ClientRequest extends OutgoingMessage { debug("CLIENT use net.createConnection", optsWithoutSignal); this.onSocket(createConnection(optsWithoutSignal)); } - }*/ - this.onSocket(new FakeSocket({ encrypted: this._encrypted })); + } } _writeHeader() { @@ -437,9 +437,6 @@ class ClientRequest extends OutgoingMessage { } } - const client = this._getClient() ?? createHttpClient({ http2: false }); - this._client = client; - if ( this.method === "POST" || this.method === "PATCH" || this.method === "PUT" ) { @@ -455,17 +452,29 @@ class ClientRequest extends OutgoingMessage { this._bodyWriteRid = resourceForReadableStream(readable); } - this._req = op_node_http_request( - this.method, - url, - headers, - client[internalRidSymbol], - this._bodyWriteRid, - ); - (async () => { try { - const res = await op_node_http_fetch_send(this._req.requestRid); + const parsedUrl = new URL(url); + let baseConnRid = + this.socket._handle[kStreamBaseField][internalRidSymbol]; + if (this._encrypted) { + [baseConnRid] = op_tls_start({ + rid: baseConnRid, + hostname: parsedUrl.hostname, + caCerts: [], + alpnProtocols: ["http/1.0", "http/1.1"], + }); + } + this._req = await op_node_http_request_with_conn( + this.method, + url, + headers, + this._bodyWriteRid, + baseConnRid, + this._encrypted, + ); + this._flushBuffer(); + const res = await op_node_http_await_response(this._req!.requestRid); if (this._req.cancelHandleRid !== null) { core.tryClose(this._req.cancelHandleRid); } @@ -473,7 +482,6 @@ class ClientRequest extends OutgoingMessage { this._timeout.removeEventListener("abort", this._timeoutCb); webClearTimeout(this._timeout[timerId]); } - this._client.close(); const incoming = new IncomingMessageForClient(this.socket); incoming.req = this; this.res = incoming; @@ -512,12 +520,9 @@ class ClientRequest extends OutgoingMessage { if (this.method === "CONNECT") { throw new Error("not implemented CONNECT"); } - const upgradeRid = await op_node_http_fetch_response_upgrade( res.responseRid, ); - assert(typeof res.remoteAddrIp !== "undefined"); - assert(typeof res.remoteAddrIp !== "undefined"); const conn = new UpgradedConn( upgradeRid, { @@ -543,13 +548,11 @@ class ClientRequest extends OutgoingMessage { this._closed = true; this.emit("close"); } else { - { - incoming._bodyRid = res.responseRid; - } + incoming._bodyRid = res.responseRid; this.emit("response", incoming); } } catch (err) { - if (this._req.cancelHandleRid !== null) { + if (this._req && this._req.cancelHandleRid !== null) { core.tryClose(this._req.cancelHandleRid); } @@ -592,11 +595,54 @@ class ClientRequest extends OutgoingMessage { return undefined; } - // TODO(bartlomieju): handle error - onSocket(socket, _err) { + onSocket(socket, err) { nextTick(() => { - this.socket = socket; - this.emit("socket", socket); + // deno-lint-ignore no-this-alias + const req = this; + if (req.destroyed || err) { + req.destroyed = true; + + // deno-lint-ignore no-inner-declarations + function _destroy(req, err) { + if (!req.aborted && !err) { + err = new connResetException("socket hang up"); + } + if (err) { + emitErrorEvent(req, err); + } + req._closed = true; + req.emit("close"); + } + + if (socket) { + if (!err && req.agent && !socket.destroyed) { + socket.emit("free"); + } else { + finished(socket.destroy(err || req[kError]), (er) => { + if (er?.code === "ERR_STREAM_PREMATURE_CLOSE") { + er = null; + } + _destroy(req, er || err); + }); + return; + } + } + + _destroy(req, err || req[kError]); + } else { + // Note: this code is specific to deno to initiate a request. + const onConnect = () => { + // Flush the internal buffers once socket is ready. + this._flushHeaders(); + }; + this.socket = socket; + this.emit("socket", socket); + if (socket.readyState === "opening") { + socket.on("connect", onConnect); + } else { + onConnect(); + } + } }); } @@ -618,14 +664,20 @@ class ClientRequest extends OutgoingMessage { if (chunk) { this.write_(chunk, encoding, null, true); } else if (!this._headerSent) { - this._contentLength = 0; - this._implicitHeader(); - this._send("", "latin1"); + if ( + (this.socket && !this.socket.connecting) || // socket is not connecting, or + (!this.socket && this.outputData.length === 0) // no data to send + ) { + this._contentLength = 0; + this._implicitHeader(); + this._send("", "latin1"); + } } - (async () => { + const finish = async () => { try { + await this._bodyWriter.ready; await this._bodyWriter?.close(); - } catch (_) { + } catch { // The readable stream resource is dropped right after // read is complete closing the writable stream resource. // If we try to close the writer again, it will result in an @@ -633,10 +685,20 @@ class ClientRequest extends OutgoingMessage { } try { cb?.(); - } catch (_) { + } catch { // } - })(); + }; + + if (this.socket && this._bodyWriter) { + finish(); + } else { + this.on("drain", () => { + if (this.outputData.length === 0) { + finish(); + } + }); + } return this; } @@ -658,11 +720,6 @@ class ClientRequest extends OutgoingMessage { } this.destroyed = true; - const rid = this._client?.[internalRidSymbol]; - if (rid) { - core.tryClose(rid); - } - // Request might be closed before we actually made it if (this._req !== undefined && this._req.cancelHandleRid !== null) { core.tryClose(this._req.cancelHandleRid); @@ -1409,7 +1466,7 @@ ServerResponse.prototype.hasHeader = function ( this: ServerResponse, name: string, ) { - return Object.hasOwn(this._headers, name); + return Object.hasOwn(this._headers, StringPrototypeToLowerCase(name)); }; ServerResponse.prototype.writeHead = function ( diff --git a/ext/node/polyfills/http2.ts b/ext/node/polyfills/http2.ts index dc2379aebba694..ab2faa2d08cf37 100644 --- a/ext/node/polyfills/http2.ts +++ b/ext/node/polyfills/http2.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills @@ -479,13 +479,13 @@ export class ClientHttp2Session extends Http2Session { socket.on("error", socketOnError); socket.on("close", socketOnClose); + + socket[kHandle].pauseOnCreate = true; const connPromise = new Promise((resolve) => { const eventName = url.startsWith("https") ? "secureConnect" : "connect"; socket.once(eventName, () => { const rid = socket[kHandle][kStreamBaseField][internalRidSymbol]; - nextTick(() => { - resolve(rid); - }); + nextTick(() => resolve(rid)); }); }); socket[kSession] = this; diff --git a/ext/node/polyfills/https.ts b/ext/node/polyfills/https.ts index f60c5e471ab1e5..d958d8e7466be3 100644 --- a/ext/node/polyfills/https.ts +++ b/ext/node/polyfills/https.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills @@ -112,7 +112,7 @@ export const globalAgent = new Agent({ /** HttpsClientRequest class loosely follows http.ClientRequest class API. */ class HttpsClientRequest extends ClientRequest { - override _encrypted: true; + override _encrypted = true; override defaultProtocol = "https:"; override _getClient(): Deno.HttpClient | undefined { if (caCerts === null) { diff --git a/ext/node/polyfills/inspector.js b/ext/node/polyfills/inspector.js index 7eb15ce9177ce7..bb2661b9cd8078 100644 --- a/ext/node/polyfills/inspector.js +++ b/ext/node/polyfills/inspector.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. import process from "node:process"; diff --git a/ext/node/polyfills/inspector/promises.js b/ext/node/polyfills/inspector/promises.js index 3483e53f5e36f0..a075eba0011375 100644 --- a/ext/node/polyfills/inspector/promises.js +++ b/ext/node/polyfills/inspector/promises.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. import inspector from "node:inspector"; diff --git a/ext/node/polyfills/internal/assert.mjs b/ext/node/polyfills/internal/assert.mjs index 20ed511e024afc..01b5fad460bac9 100644 --- a/ext/node/polyfills/internal/assert.mjs +++ b/ext/node/polyfills/internal/assert.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { ERR_INTERNAL_ASSERTION } from "ext:deno_node/internal/errors.ts"; function assert(value, message) { diff --git a/ext/node/polyfills/internal/async_hooks.ts b/ext/node/polyfills/internal/async_hooks.ts index a5d6728e33ec7a..a2f52e69796ee4 100644 --- a/ext/node/polyfills/internal/async_hooks.ts +++ b/ext/node/polyfills/internal/async_hooks.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/internal/blocklist.mjs b/ext/node/polyfills/internal/blocklist.mjs index 8a7c9c376ad052..d45592a8ffdee3 100644 --- a/ext/node/polyfills/internal/blocklist.mjs +++ b/ext/node/polyfills/internal/blocklist.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. import { primordials } from "ext:core/mod.js"; diff --git a/ext/node/polyfills/internal/buffer.d.ts b/ext/node/polyfills/internal/buffer.d.ts index 2008dc2432cd4c..125deb0ef2749c 100644 --- a/ext/node/polyfills/internal/buffer.d.ts +++ b/ext/node/polyfills/internal/buffer.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright DefinitelyTyped contributors. All rights reserved. MIT license. /** diff --git a/ext/node/polyfills/internal/buffer.mjs b/ext/node/polyfills/internal/buffer.mjs index dd549221fab4ad..033d8a1e1ec948 100644 --- a/ext/node/polyfills/internal/buffer.mjs +++ b/ext/node/polyfills/internal/buffer.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // Copyright Feross Aboukhadijeh, and other contributors. All rights reserved. MIT license. diff --git a/ext/node/polyfills/internal/child_process.ts b/ext/node/polyfills/internal/child_process.ts index cfff1079ff5986..17809cc5599cba 100644 --- a/ext/node/polyfills/internal/child_process.ts +++ b/ext/node/polyfills/internal/child_process.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // This module implements 'child_process' module of Node.JS API. // ref: https://nodejs.org/api/child_process.html diff --git a/ext/node/polyfills/internal/cli_table.ts b/ext/node/polyfills/internal/cli_table.ts index 9826e524f6c56a..c6991ed06d8509 100644 --- a/ext/node/polyfills/internal/cli_table.ts +++ b/ext/node/polyfills/internal/cli_table.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/internal/console/constructor.mjs b/ext/node/polyfills/internal/console/constructor.mjs index ebf5cbec4f8055..0736fd4c47a1bd 100644 --- a/ext/node/polyfills/internal/console/constructor.mjs +++ b/ext/node/polyfills/internal/console/constructor.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/internal/constants.ts b/ext/node/polyfills/internal/constants.ts index 521cea987c8602..3c83c0f0effe59 100644 --- a/ext/node/polyfills/internal/constants.ts +++ b/ext/node/polyfills/internal/constants.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. import { isWindows } from "ext:deno_node/_util/os.ts"; diff --git a/ext/node/polyfills/internal/crypto/_keys.ts b/ext/node/polyfills/internal/crypto/_keys.ts index e7998624582156..9a097f82e3fa28 100644 --- a/ext/node/polyfills/internal/crypto/_keys.ts +++ b/ext/node/polyfills/internal/crypto/_keys.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // This file is here because to break a circular dependency between streams and // crypto. diff --git a/ext/node/polyfills/internal/crypto/_randomBytes.ts b/ext/node/polyfills/internal/crypto/_randomBytes.ts index e1dc5c5ac8fc5d..c8608a7c53b751 100644 --- a/ext/node/polyfills/internal/crypto/_randomBytes.ts +++ b/ext/node/polyfills/internal/crypto/_randomBytes.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/internal/crypto/_randomFill.mjs b/ext/node/polyfills/internal/crypto/_randomFill.mjs index 8ef864562fd652..20a6e1c02260df 100644 --- a/ext/node/polyfills/internal/crypto/_randomFill.mjs +++ b/ext/node/polyfills/internal/crypto/_randomFill.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/internal/crypto/_randomInt.ts b/ext/node/polyfills/internal/crypto/_randomInt.ts index e08b3e96399070..65a8bacf13663b 100644 --- a/ext/node/polyfills/internal/crypto/_randomInt.ts +++ b/ext/node/polyfills/internal/crypto/_randomInt.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { op_node_random_int } from "ext:core/ops"; import { primordials } from "ext:core/mod.js"; diff --git a/ext/node/polyfills/internal/crypto/certificate.ts b/ext/node/polyfills/internal/crypto/certificate.ts index c15236c5cb6627..cd64ba36d9e69c 100644 --- a/ext/node/polyfills/internal/crypto/certificate.ts +++ b/ext/node/polyfills/internal/crypto/certificate.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. import { notImplemented } from "ext:deno_node/_utils.ts"; diff --git a/ext/node/polyfills/internal/crypto/cipher.ts b/ext/node/polyfills/internal/crypto/cipher.ts index c1c5ce8901bef4..dd1698f46ecfb9 100644 --- a/ext/node/polyfills/internal/crypto/cipher.ts +++ b/ext/node/polyfills/internal/crypto/cipher.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/internal/crypto/constants.ts b/ext/node/polyfills/internal/crypto/constants.ts index d9c0b2d63b701c..77fe9bbf43fbfc 100644 --- a/ext/node/polyfills/internal/crypto/constants.ts +++ b/ext/node/polyfills/internal/crypto/constants.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/internal/crypto/diffiehellman.ts b/ext/node/polyfills/internal/crypto/diffiehellman.ts index a439306a9718b3..fb0da4e60b1e9c 100644 --- a/ext/node/polyfills/internal/crypto/diffiehellman.ts +++ b/ext/node/polyfills/internal/crypto/diffiehellman.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/internal/crypto/hash.ts b/ext/node/polyfills/internal/crypto/hash.ts index c42ca3989206e6..3b3ec928fb03be 100644 --- a/ext/node/polyfills/internal/crypto/hash.ts +++ b/ext/node/polyfills/internal/crypto/hash.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/internal/crypto/hkdf.ts b/ext/node/polyfills/internal/crypto/hkdf.ts index cb1dbee46badea..282633ba262cbe 100644 --- a/ext/node/polyfills/internal/crypto/hkdf.ts +++ b/ext/node/polyfills/internal/crypto/hkdf.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/internal/crypto/keygen.ts b/ext/node/polyfills/internal/crypto/keygen.ts index 44bfd832776ef2..8d9a98e3247ada 100644 --- a/ext/node/polyfills/internal/crypto/keygen.ts +++ b/ext/node/polyfills/internal/crypto/keygen.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills @@ -30,6 +30,7 @@ import { import { Buffer } from "node:buffer"; import { KeyFormat, KeyType } from "ext:deno_node/internal/crypto/types.ts"; import process from "node:process"; +import { promisify } from "node:util"; import { op_node_generate_dh_group_key, @@ -570,7 +571,15 @@ export function generateKeyPair( privateKey: any, ) => void, ) { - createJob(kAsync, type, options).then((pair) => { + _generateKeyPair(type, options) + .then( + (res) => callback(null, res.publicKey, res.privateKey), + (err) => callback(err, null, null), + ); +} + +function _generateKeyPair(type: string, options: unknown) { + return createJob(kAsync, type, options).then((pair) => { const privateKeyHandle = op_node_get_private_key_from_pair(pair); const publicKeyHandle = op_node_get_public_key_from_pair(pair); @@ -589,12 +598,15 @@ export function generateKeyPair( } } - callback(null, publicKey, privateKey); - }).catch((err) => { - callback(err, null, null); + return { publicKey, privateKey }; }); } +Object.defineProperty(generateKeyPair, promisify.custom, { + enumerable: false, + value: _generateKeyPair, +}); + export interface KeyPairKeyObjectResult { publicKey: KeyObject; privateKey: KeyObject; diff --git a/ext/node/polyfills/internal/crypto/keys.ts b/ext/node/polyfills/internal/crypto/keys.ts index c91c23cc3dd931..a6ef6b156d16e0 100644 --- a/ext/node/polyfills/internal/crypto/keys.ts +++ b/ext/node/polyfills/internal/crypto/keys.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills @@ -20,6 +20,7 @@ import { op_node_create_secret_key, op_node_derive_public_key_from_private_key, op_node_export_private_key_der, + op_node_export_private_key_jwk, op_node_export_private_key_pem, op_node_export_public_key_der, op_node_export_public_key_jwk, @@ -791,7 +792,7 @@ export class PrivateKeyObject extends AsymmetricKeyObject { export(options: JwkKeyExportOptions | KeyExportOptions) { if (options && options.format === "jwk") { - notImplemented("jwk private key export not implemented"); + return op_node_export_private_key_jwk(this[kHandle]); } const { format, diff --git a/ext/node/polyfills/internal/crypto/pbkdf2.ts b/ext/node/polyfills/internal/crypto/pbkdf2.ts index 4e58cb68b34ee7..84a3032c75d5a1 100644 --- a/ext/node/polyfills/internal/crypto/pbkdf2.ts +++ b/ext/node/polyfills/internal/crypto/pbkdf2.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/internal/crypto/random.ts b/ext/node/polyfills/internal/crypto/random.ts index a41b8681905f03..9d8864aabcdcdb 100644 --- a/ext/node/polyfills/internal/crypto/random.ts +++ b/ext/node/polyfills/internal/crypto/random.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/internal/crypto/scrypt.ts b/ext/node/polyfills/internal/crypto/scrypt.ts index ce8649bbe2674f..e20ad330110951 100644 --- a/ext/node/polyfills/internal/crypto/scrypt.ts +++ b/ext/node/polyfills/internal/crypto/scrypt.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /* MIT License diff --git a/ext/node/polyfills/internal/crypto/sig.ts b/ext/node/polyfills/internal/crypto/sig.ts index a05f16478d93f1..d75f522f37885c 100644 --- a/ext/node/polyfills/internal/crypto/sig.ts +++ b/ext/node/polyfills/internal/crypto/sig.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/internal/crypto/types.ts b/ext/node/polyfills/internal/crypto/types.ts index 17b15127efca88..60f913ca2daacb 100644 --- a/ext/node/polyfills/internal/crypto/types.ts +++ b/ext/node/polyfills/internal/crypto/types.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. import { BufferEncoding } from "ext:deno_node/_global.d.ts"; diff --git a/ext/node/polyfills/internal/crypto/util.ts b/ext/node/polyfills/internal/crypto/util.ts index a39b031ee3aa49..7e6f4a9b401830 100644 --- a/ext/node/polyfills/internal/crypto/util.ts +++ b/ext/node/polyfills/internal/crypto/util.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills @@ -67,22 +67,16 @@ export const ellipticCurves: Array = [ }, // NIST P-224 EC ]; -// deno-fmt-ignore const supportedCiphers = [ - "aes-128-ecb", "aes-192-ecb", - "aes-256-ecb", "aes-128-cbc", - "aes-192-cbc", "aes-256-cbc", - "aes128", "aes192", - "aes256", "aes-128-cfb", - "aes-192-cfb", "aes-256-cfb", - "aes-128-cfb8", "aes-192-cfb8", - "aes-256-cfb8", "aes-128-cfb1", - "aes-192-cfb1", "aes-256-cfb1", - "aes-128-ofb", "aes-192-ofb", - "aes-256-ofb", "aes-128-ctr", - "aes-192-ctr", "aes-256-ctr", - "aes-128-gcm", "aes-192-gcm", - "aes-256-gcm" + "aes-128-ecb", + "aes-192-ecb", + "aes-256-ecb", + "aes-128-cbc", + "aes-256-cbc", + "aes128", + "aes256", + "aes-128-gcm", + "aes-256-gcm", ]; export function getCiphers(): string[] { diff --git a/ext/node/polyfills/internal/crypto/x509.ts b/ext/node/polyfills/internal/crypto/x509.ts index 699e45a51b3d53..a37db7365e095e 100644 --- a/ext/node/polyfills/internal/crypto/x509.ts +++ b/ext/node/polyfills/internal/crypto/x509.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/internal/dgram.ts b/ext/node/polyfills/internal/dgram.ts index e34f92f1ead48f..d69baa7ef24687 100644 --- a/ext/node/polyfills/internal/dgram.ts +++ b/ext/node/polyfills/internal/dgram.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/internal/dns/promises.ts b/ext/node/polyfills/internal/dns/promises.ts index ee4248163dc2b2..b431c4502f38da 100644 --- a/ext/node/polyfills/internal/dns/promises.ts +++ b/ext/node/polyfills/internal/dns/promises.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/internal/dns/utils.ts b/ext/node/polyfills/internal/dns/utils.ts index 226fce93ddc47c..a405d3f50933bb 100644 --- a/ext/node/polyfills/internal/dns/utils.ts +++ b/ext/node/polyfills/internal/dns/utils.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/internal/dtrace.ts b/ext/node/polyfills/internal/dtrace.ts index 3443aec7ff627a..716c48c7cc8c84 100644 --- a/ext/node/polyfills/internal/dtrace.ts +++ b/ext/node/polyfills/internal/dtrace.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/internal/error_codes.ts b/ext/node/polyfills/internal/error_codes.ts index 0603e9e114eec5..638c0584c2696a 100644 --- a/ext/node/polyfills/internal/error_codes.ts +++ b/ext/node/polyfills/internal/error_codes.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Lazily initializes the error classes in this object. // This trick is necessary for avoiding circular dendencies between diff --git a/ext/node/polyfills/internal/errors.ts b/ext/node/polyfills/internal/errors.ts index 61b53fa968f1fc..5d35f07dd841f4 100644 --- a/ext/node/polyfills/internal/errors.ts +++ b/ext/node/polyfills/internal/errors.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Node.js contributors. All rights reserved. MIT License. // TODO(petamoriken): enable prefer-primordials for node polyfills @@ -624,6 +624,15 @@ function createInvalidArgType( return msg; } +export class ERR_CRYPTO_TIMING_SAFE_EQUAL_LENGTH extends NodeRangeError { + constructor() { + super( + "ERR_CRYPTO_TIMING_SAFE_EQUAL_LENGTH", + "Input buffers must have the same length", + ); + } +} + export class ERR_INVALID_ARG_TYPE_RANGE extends NodeRangeError { constructor(name: string, expected: string | string[], actual: unknown) { const msg = createInvalidArgType(name, expected); @@ -2842,6 +2851,7 @@ export default { ERR_INVALID_ADDRESS_FAMILY, ERR_INVALID_ARG_TYPE, ERR_INVALID_ARG_TYPE_RANGE, + ERR_CRYPTO_TIMING_SAFE_EQUAL_LENGTH, ERR_INVALID_ARG_VALUE, ERR_INVALID_ARG_VALUE_RANGE, ERR_INVALID_ASYNC_ID, diff --git a/ext/node/polyfills/internal/event_target.mjs b/ext/node/polyfills/internal/event_target.mjs index 4409b00ed4c691..80c6041c57f04a 100644 --- a/ext/node/polyfills/internal/event_target.mjs +++ b/ext/node/polyfills/internal/event_target.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Node.js contributors. All rights reserved. MIT License. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/internal/events/abort_listener.mjs b/ext/node/polyfills/internal/events/abort_listener.mjs index f1430489fa5c2b..0407b935952ddb 100644 --- a/ext/node/polyfills/internal/events/abort_listener.mjs +++ b/ext/node/polyfills/internal/events/abort_listener.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. import { primordials } from "ext:deno_node/internal/test/binding.ts"; diff --git a/ext/node/polyfills/internal/fixed_queue.ts b/ext/node/polyfills/internal/fixed_queue.ts index 0a2209c8d539b1..d9355e73c51e8c 100644 --- a/ext/node/polyfills/internal/fixed_queue.ts +++ b/ext/node/polyfills/internal/fixed_queue.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. import { primordials } from "ext:core/mod.js"; diff --git a/ext/node/polyfills/internal/fs/handle.ts b/ext/node/polyfills/internal/fs/handle.ts index fc3a7ae20599a0..ace9a7635c81a8 100644 --- a/ext/node/polyfills/internal/fs/handle.ts +++ b/ext/node/polyfills/internal/fs/handle.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials @@ -6,12 +6,14 @@ import { EventEmitter } from "node:events"; import { Buffer } from "node:buffer"; import { promises, read, write } from "node:fs"; +export type { BigIntStats, Stats } from "ext:deno_node/_fs/_fs_stat.ts"; import { BinaryOptionsArgument, FileOptionsArgument, ReadOptions, TextOptionsArgument, } from "ext:deno_node/_fs/_fs_common.ts"; +import { ftruncatePromise } from "ext:deno_node/_fs/_fs_ftruncate.ts"; import { core } from "ext:core/mod.js"; interface WriteResult { @@ -72,6 +74,10 @@ export class FileHandle extends EventEmitter { } } + truncate(len?: number): Promise { + return fsCall(ftruncatePromise, this, len); + } + readFile( opt?: TextOptionsArgument | BinaryOptionsArgument | FileOptionsArgument, ): Promise { @@ -84,11 +90,7 @@ export class FileHandle extends EventEmitter { length: number, position: number, ): Promise; - write( - str: string, - position: number, - encoding: string, - ): Promise; + write(str: string, position: number, encoding: string): Promise; write( bufferOrStr: Uint8Array | string, offsetOrPosition: number, @@ -119,16 +121,10 @@ export class FileHandle extends EventEmitter { const encoding = lengthOrEncoding; return new Promise((resolve, reject) => { - write( - this.fd, - str, - position, - encoding, - (err, bytesWritten, buffer) => { - if (err) reject(err); - else resolve({ buffer, bytesWritten }); - }, - ); + write(this.fd, str, position, encoding, (err, bytesWritten, buffer) => { + if (err) reject(err); + else resolve({ buffer, bytesWritten }); + }); }); } } @@ -141,6 +137,13 @@ export class FileHandle extends EventEmitter { // Note that Deno.close is not async return Promise.resolve(core.close(this.fd)); } + + stat(): Promise; + stat(options: { bigint: false }): Promise; + stat(options: { bigint: true }): Promise; + stat(options?: { bigint: boolean }): Promise { + return fsCall(promises.fstat, this, options); + } } function fsCall(fn, handle, ...args) { @@ -152,7 +155,7 @@ function fsCall(fn, handle, ...args) { }); } - return fn(handle, ...args); + return fn(handle.fd, ...args); } export default { diff --git a/ext/node/polyfills/internal/fs/streams.d.ts b/ext/node/polyfills/internal/fs/streams.d.ts index b4c235f9b5e0d2..8459120573bbf4 100644 --- a/ext/node/polyfills/internal/fs/streams.d.ts +++ b/ext/node/polyfills/internal/fs/streams.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright DefinitelyTyped contributors. All rights reserved. MIT license. // deno-lint-ignore-file no-explicit-any diff --git a/ext/node/polyfills/internal/fs/streams.mjs b/ext/node/polyfills/internal/fs/streams.mjs index 3b4409c4cf98fc..5adb8da225de11 100644 --- a/ext/node/polyfills/internal/fs/streams.mjs +++ b/ext/node/polyfills/internal/fs/streams.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/internal/fs/utils.mjs b/ext/node/polyfills/internal/fs/utils.mjs index b0ef34873e08a1..9e8558dea23155 100644 --- a/ext/node/polyfills/internal/fs/utils.mjs +++ b/ext/node/polyfills/internal/fs/utils.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/internal/hide_stack_frames.ts b/ext/node/polyfills/internal/hide_stack_frames.ts index 4145189fff92f1..93d7aca09519d3 100644 --- a/ext/node/polyfills/internal/hide_stack_frames.ts +++ b/ext/node/polyfills/internal/hide_stack_frames.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/internal/http.ts b/ext/node/polyfills/internal/http.ts index ddf082f4510ade..d559442bbc84b8 100644 --- a/ext/node/polyfills/internal/http.ts +++ b/ext/node/polyfills/internal/http.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/internal/idna.ts b/ext/node/polyfills/internal/idna.ts index 93ed065cceeeb7..8a53b7e7218f82 100644 --- a/ext/node/polyfills/internal/idna.ts +++ b/ext/node/polyfills/internal/idna.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/internal/net.ts b/ext/node/polyfills/internal/net.ts index a3dcb3ed2159b1..a14dcae9b890cd 100644 --- a/ext/node/polyfills/internal/net.ts +++ b/ext/node/polyfills/internal/net.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/internal/normalize_encoding.mjs b/ext/node/polyfills/internal/normalize_encoding.mjs index a367337880396e..6ae322f11887d9 100644 --- a/ext/node/polyfills/internal/normalize_encoding.mjs +++ b/ext/node/polyfills/internal/normalize_encoding.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/internal/options.ts b/ext/node/polyfills/internal/options.ts index 4b62a11285ebba..16ac62a69ffffb 100644 --- a/ext/node/polyfills/internal/options.ts +++ b/ext/node/polyfills/internal/options.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/internal/primordials.mjs b/ext/node/polyfills/internal/primordials.mjs index cddd1aa66db100..027994a3d2aa8c 100644 --- a/ext/node/polyfills/internal/primordials.mjs +++ b/ext/node/polyfills/internal/primordials.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/internal/process/per_thread.mjs b/ext/node/polyfills/internal/process/per_thread.mjs index b4db3f36917793..9d784be153d660 100644 --- a/ext/node/polyfills/internal/process/per_thread.mjs +++ b/ext/node/polyfills/internal/process/per_thread.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/internal/process/report.ts b/ext/node/polyfills/internal/process/report.ts index c4a1ff56168bec..5374c449fc2dce 100644 --- a/ext/node/polyfills/internal/process/report.ts +++ b/ext/node/polyfills/internal/process/report.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { primordials } from "ext:core/mod.js"; const { diff --git a/ext/node/polyfills/internal/querystring.ts b/ext/node/polyfills/internal/querystring.ts index a34e4e4b768f5f..1824203c6065a9 100644 --- a/ext/node/polyfills/internal/querystring.ts +++ b/ext/node/polyfills/internal/querystring.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/internal/readline/callbacks.mjs b/ext/node/polyfills/internal/readline/callbacks.mjs index 5e3d7382fc4fc8..4f860776e09924 100644 --- a/ext/node/polyfills/internal/readline/callbacks.mjs +++ b/ext/node/polyfills/internal/readline/callbacks.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/internal/readline/emitKeypressEvents.mjs b/ext/node/polyfills/internal/readline/emitKeypressEvents.mjs index e016fd15338eb7..27a010b4203c7a 100644 --- a/ext/node/polyfills/internal/readline/emitKeypressEvents.mjs +++ b/ext/node/polyfills/internal/readline/emitKeypressEvents.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/internal/readline/interface.mjs b/ext/node/polyfills/internal/readline/interface.mjs index bdb832f881f2f5..9988f6c46b3824 100644 --- a/ext/node/polyfills/internal/readline/interface.mjs +++ b/ext/node/polyfills/internal/readline/interface.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/internal/readline/promises.mjs b/ext/node/polyfills/internal/readline/promises.mjs index f1de6a2d3105cc..21ab8b6d939efe 100644 --- a/ext/node/polyfills/internal/readline/promises.mjs +++ b/ext/node/polyfills/internal/readline/promises.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/internal/readline/symbols.mjs b/ext/node/polyfills/internal/readline/symbols.mjs index 299cc8c9a7eff9..7b935d1243ad1d 100644 --- a/ext/node/polyfills/internal/readline/symbols.mjs +++ b/ext/node/polyfills/internal/readline/symbols.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/internal/readline/utils.mjs b/ext/node/polyfills/internal/readline/utils.mjs index b9372ab0ead073..495c373638b2f3 100644 --- a/ext/node/polyfills/internal/readline/utils.mjs +++ b/ext/node/polyfills/internal/readline/utils.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/internal/stream_base_commons.ts b/ext/node/polyfills/internal/stream_base_commons.ts index 1fabb73f47c5e7..050658d4f53fe1 100644 --- a/ext/node/polyfills/internal/stream_base_commons.ts +++ b/ext/node/polyfills/internal/stream_base_commons.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/internal/streams/add-abort-signal.mjs b/ext/node/polyfills/internal/streams/add-abort-signal.mjs index 2e66c86643e93b..d6a3ca099ec1f3 100644 --- a/ext/node/polyfills/internal/streams/add-abort-signal.mjs +++ b/ext/node/polyfills/internal/streams/add-abort-signal.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file diff --git a/ext/node/polyfills/internal/streams/buffer_list.mjs b/ext/node/polyfills/internal/streams/buffer_list.mjs index db3a703388441d..cb9dba563b2b5c 100644 --- a/ext/node/polyfills/internal/streams/buffer_list.mjs +++ b/ext/node/polyfills/internal/streams/buffer_list.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file diff --git a/ext/node/polyfills/internal/streams/destroy.mjs b/ext/node/polyfills/internal/streams/destroy.mjs index 27420e78bfc319..6e60e20ace7a93 100644 --- a/ext/node/polyfills/internal/streams/destroy.mjs +++ b/ext/node/polyfills/internal/streams/destroy.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file diff --git a/ext/node/polyfills/internal/streams/duplex.mjs b/ext/node/polyfills/internal/streams/duplex.mjs index b7c0b077ffe8c7..0424c3d17b326b 100644 --- a/ext/node/polyfills/internal/streams/duplex.mjs +++ b/ext/node/polyfills/internal/streams/duplex.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file diff --git a/ext/node/polyfills/internal/streams/end-of-stream.mjs b/ext/node/polyfills/internal/streams/end-of-stream.mjs index aebdb90bf30a33..be9bf0a50c7121 100644 --- a/ext/node/polyfills/internal/streams/end-of-stream.mjs +++ b/ext/node/polyfills/internal/streams/end-of-stream.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file diff --git a/ext/node/polyfills/internal/streams/lazy_transform.mjs b/ext/node/polyfills/internal/streams/lazy_transform.mjs index 3033ee6d4c3eff..f5cf8ac48a7e41 100644 --- a/ext/node/polyfills/internal/streams/lazy_transform.mjs +++ b/ext/node/polyfills/internal/streams/lazy_transform.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file diff --git a/ext/node/polyfills/internal/streams/passthrough.mjs b/ext/node/polyfills/internal/streams/passthrough.mjs index 8c7d4f3560ad6c..aa3f26a52c80ea 100644 --- a/ext/node/polyfills/internal/streams/passthrough.mjs +++ b/ext/node/polyfills/internal/streams/passthrough.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file diff --git a/ext/node/polyfills/internal/streams/readable.mjs b/ext/node/polyfills/internal/streams/readable.mjs index c5411d64513527..7c291f3932c781 100644 --- a/ext/node/polyfills/internal/streams/readable.mjs +++ b/ext/node/polyfills/internal/streams/readable.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file diff --git a/ext/node/polyfills/internal/streams/state.mjs b/ext/node/polyfills/internal/streams/state.mjs index 428492306b1c7a..599620ce7a7392 100644 --- a/ext/node/polyfills/internal/streams/state.mjs +++ b/ext/node/polyfills/internal/streams/state.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file diff --git a/ext/node/polyfills/internal/streams/transform.mjs b/ext/node/polyfills/internal/streams/transform.mjs index af368365cb068d..ac2bf6acc9c679 100644 --- a/ext/node/polyfills/internal/streams/transform.mjs +++ b/ext/node/polyfills/internal/streams/transform.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file diff --git a/ext/node/polyfills/internal/streams/utils.mjs b/ext/node/polyfills/internal/streams/utils.mjs index a2506bd5de208a..65551b129d6319 100644 --- a/ext/node/polyfills/internal/streams/utils.mjs +++ b/ext/node/polyfills/internal/streams/utils.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file diff --git a/ext/node/polyfills/internal/streams/writable.mjs b/ext/node/polyfills/internal/streams/writable.mjs index c02e4e0e1db4f7..7f1679e3722388 100644 --- a/ext/node/polyfills/internal/streams/writable.mjs +++ b/ext/node/polyfills/internal/streams/writable.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file diff --git a/ext/node/polyfills/internal/test/binding.ts b/ext/node/polyfills/internal/test/binding.ts index cce56b922c0a5d..bbd78ec4719a56 100644 --- a/ext/node/polyfills/internal/test/binding.ts +++ b/ext/node/polyfills/internal/test/binding.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. import { getBinding } from "ext:deno_node/internal_binding/mod.ts"; import type { BindingName } from "ext:deno_node/internal_binding/mod.ts"; diff --git a/ext/node/polyfills/internal/timers.mjs b/ext/node/polyfills/internal/timers.mjs index 363f55f693c641..84dd165e263c00 100644 --- a/ext/node/polyfills/internal/timers.mjs +++ b/ext/node/polyfills/internal/timers.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/internal/url.ts b/ext/node/polyfills/internal/url.ts index 4b9da49ec0cdd7..82d7a8b4bf1ab3 100644 --- a/ext/node/polyfills/internal/url.ts +++ b/ext/node/polyfills/internal/url.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/internal/util.mjs b/ext/node/polyfills/internal/util.mjs index a603a975ad02e7..91de8689204065 100644 --- a/ext/node/polyfills/internal/util.mjs +++ b/ext/node/polyfills/internal/util.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/internal/util/comparisons.ts b/ext/node/polyfills/internal/util/comparisons.ts index 39e30c69aa5fa1..44f0bef0079d92 100644 --- a/ext/node/polyfills/internal/util/comparisons.ts +++ b/ext/node/polyfills/internal/util/comparisons.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // deno-lint-ignore-file diff --git a/ext/node/polyfills/internal/util/debuglog.ts b/ext/node/polyfills/internal/util/debuglog.ts index bbaba7b6fced4a..dc05aff8257259 100644 --- a/ext/node/polyfills/internal/util/debuglog.ts +++ b/ext/node/polyfills/internal/util/debuglog.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/internal/util/inspect.mjs b/ext/node/polyfills/internal/util/inspect.mjs index ae797449bfce98..05870591222267 100644 --- a/ext/node/polyfills/internal/util/inspect.mjs +++ b/ext/node/polyfills/internal/util/inspect.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/internal/util/parse_args/parse_args.js b/ext/node/polyfills/internal/util/parse_args/parse_args.js index 742f2a1f0dd743..c4a60bcd359aaa 100644 --- a/ext/node/polyfills/internal/util/parse_args/parse_args.js +++ b/ext/node/polyfills/internal/util/parse_args/parse_args.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. import { primordials } from "ext:core/mod.js"; diff --git a/ext/node/polyfills/internal/util/parse_args/utils.js b/ext/node/polyfills/internal/util/parse_args/utils.js index 1ceed0b9e83dc7..dd76fa15121417 100644 --- a/ext/node/polyfills/internal/util/parse_args/utils.js +++ b/ext/node/polyfills/internal/util/parse_args/utils.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. import { primordials } from "ext:core/mod.js"; diff --git a/ext/node/polyfills/internal/util/types.ts b/ext/node/polyfills/internal/util/types.ts index b8aca59680b447..9415c9db5f09e3 100644 --- a/ext/node/polyfills/internal/util/types.ts +++ b/ext/node/polyfills/internal/util/types.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // // Adapted from Node.js. Copyright Joyent, Inc. and other Node contributors. // diff --git a/ext/node/polyfills/internal/validators.mjs b/ext/node/polyfills/internal/validators.mjs index 12962b8432a629..0529dca546eaba 100644 --- a/ext/node/polyfills/internal/validators.mjs +++ b/ext/node/polyfills/internal/validators.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/internal_binding/_libuv_winerror.ts b/ext/node/polyfills/internal_binding/_libuv_winerror.ts index 3ba7d9cdaed727..b84c60226c39f3 100644 --- a/ext/node/polyfills/internal_binding/_libuv_winerror.ts +++ b/ext/node/polyfills/internal_binding/_libuv_winerror.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { op_node_sys_to_uv_error } from "ext:core/ops"; diff --git a/ext/node/polyfills/internal_binding/_listen.ts b/ext/node/polyfills/internal_binding/_listen.ts index 613fdd999d4817..06e13af79fbbe3 100644 --- a/ext/node/polyfills/internal_binding/_listen.ts +++ b/ext/node/polyfills/internal_binding/_listen.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/internal_binding/_node.ts b/ext/node/polyfills/internal_binding/_node.ts index bf6b7761301d0d..1e4f1d257e5450 100644 --- a/ext/node/polyfills/internal_binding/_node.ts +++ b/ext/node/polyfills/internal_binding/_node.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // This file contains C++ node globals accessed in internal binding calls /** diff --git a/ext/node/polyfills/internal_binding/_timingSafeEqual.ts b/ext/node/polyfills/internal_binding/_timingSafeEqual.ts index 559b7685b8bcc3..f24e70b72331ee 100644 --- a/ext/node/polyfills/internal_binding/_timingSafeEqual.ts +++ b/ext/node/polyfills/internal_binding/_timingSafeEqual.ts @@ -1,9 +1,10 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials import { Buffer } from "node:buffer"; +import { ERR_CRYPTO_TIMING_SAFE_EQUAL_LENGTH } from "ext:deno_node/internal/errors.ts"; function toDataView(ab: ArrayBufferLike | ArrayBufferView): DataView { if (ArrayBuffer.isView(ab)) { @@ -19,7 +20,7 @@ function stdTimingSafeEqual( b: ArrayBufferView | ArrayBufferLike | DataView, ): boolean { if (a.byteLength !== b.byteLength) { - return false; + throw new ERR_CRYPTO_TIMING_SAFE_EQUAL_LENGTH(); } if (!(a instanceof DataView)) { a = toDataView(a); diff --git a/ext/node/polyfills/internal_binding/_utils.ts b/ext/node/polyfills/internal_binding/_utils.ts index 74dc3cbcd634e3..c3e5ca7adb4835 100644 --- a/ext/node/polyfills/internal_binding/_utils.ts +++ b/ext/node/polyfills/internal_binding/_utils.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/internal_binding/ares.ts b/ext/node/polyfills/internal_binding/ares.ts index 46afdfb1954e16..807617aa943820 100644 --- a/ext/node/polyfills/internal_binding/ares.ts +++ b/ext/node/polyfills/internal_binding/ares.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /* Copyright 1998 by the Massachusetts Institute of Technology. * * Permission to use, copy, modify, and distribute this diff --git a/ext/node/polyfills/internal_binding/async_wrap.ts b/ext/node/polyfills/internal_binding/async_wrap.ts index affee03fab80f6..4480e1a0a7b5dc 100644 --- a/ext/node/polyfills/internal_binding/async_wrap.ts +++ b/ext/node/polyfills/internal_binding/async_wrap.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/internal_binding/buffer.ts b/ext/node/polyfills/internal_binding/buffer.ts index 4b8e5388b29d0b..7a543e6f03917d 100644 --- a/ext/node/polyfills/internal_binding/buffer.ts +++ b/ext/node/polyfills/internal_binding/buffer.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/internal_binding/cares_wrap.ts b/ext/node/polyfills/internal_binding/cares_wrap.ts index 6feb7faf0d7274..6a864e5855c48c 100644 --- a/ext/node/polyfills/internal_binding/cares_wrap.ts +++ b/ext/node/polyfills/internal_binding/cares_wrap.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -36,7 +36,6 @@ import { } from "ext:deno_node/internal_binding/async_wrap.ts"; import { ares_strerror } from "ext:deno_node/internal_binding/ares.ts"; import { notImplemented } from "ext:deno_node/_utils.ts"; -import { isWindows } from "ext:deno_node/_util/os.ts"; interface LookupAddress { address: string; @@ -68,7 +67,7 @@ export function getaddrinfo( _hints: number, verbatim: boolean, ): number { - let addresses: string[] = []; + const addresses: string[] = []; // TODO(cmorten): use hints // REF: https://nodejs.org/api/dns.html#dns_supported_getaddrinfo_flags @@ -107,13 +106,6 @@ export function getaddrinfo( }); } - // TODO(@bartlomieju): Forces IPv4 as a workaround for Deno not - // aligning with Node on implicit binding on Windows - // REF: https://github.com/denoland/deno/issues/10762 - if (isWindows && hostname === "localhost") { - addresses = addresses.filter((address) => isIPv4(address)); - } - req.oncomplete(error, addresses); })(); diff --git a/ext/node/polyfills/internal_binding/connection_wrap.ts b/ext/node/polyfills/internal_binding/connection_wrap.ts index ef07025e29a95a..036d7a3e5b18dd 100644 --- a/ext/node/polyfills/internal_binding/connection_wrap.ts +++ b/ext/node/polyfills/internal_binding/connection_wrap.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/internal_binding/constants.ts b/ext/node/polyfills/internal_binding/constants.ts index ccb0ba570246e0..5e1afb72229e92 100644 --- a/ext/node/polyfills/internal_binding/constants.ts +++ b/ext/node/polyfills/internal_binding/constants.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { op_node_build_os } from "ext:core/ops"; diff --git a/ext/node/polyfills/internal_binding/crypto.ts b/ext/node/polyfills/internal_binding/crypto.ts index 3aabbbf3445e34..e3d03a4b1a1d67 100644 --- a/ext/node/polyfills/internal_binding/crypto.ts +++ b/ext/node/polyfills/internal_binding/crypto.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. import { notImplemented } from "ext:deno_node/_utils.ts"; diff --git a/ext/node/polyfills/internal_binding/handle_wrap.ts b/ext/node/polyfills/internal_binding/handle_wrap.ts index 1b3036a7ef9556..61a34fbc06f5f2 100644 --- a/ext/node/polyfills/internal_binding/handle_wrap.ts +++ b/ext/node/polyfills/internal_binding/handle_wrap.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/internal_binding/http_parser.ts b/ext/node/polyfills/internal_binding/http_parser.ts index bad10d98519edf..ac087e24de6157 100644 --- a/ext/node/polyfills/internal_binding/http_parser.ts +++ b/ext/node/polyfills/internal_binding/http_parser.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/internal_binding/mod.ts b/ext/node/polyfills/internal_binding/mod.ts index ebbfc629f1c9ec..25a5a2c7c285eb 100644 --- a/ext/node/polyfills/internal_binding/mod.ts +++ b/ext/node/polyfills/internal_binding/mod.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/internal_binding/node_file.ts b/ext/node/polyfills/internal_binding/node_file.ts index 6c134ec4bc35e0..1e97ee5cf7a53f 100644 --- a/ext/node/polyfills/internal_binding/node_file.ts +++ b/ext/node/polyfills/internal_binding/node_file.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/internal_binding/node_options.ts b/ext/node/polyfills/internal_binding/node_options.ts index ddacb28b6dc12c..927fd39b94d13b 100644 --- a/ext/node/polyfills/internal_binding/node_options.ts +++ b/ext/node/polyfills/internal_binding/node_options.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/internal_binding/pipe_wrap.ts b/ext/node/polyfills/internal_binding/pipe_wrap.ts index 3e366b3c76d04f..3917be36eeab6d 100644 --- a/ext/node/polyfills/internal_binding/pipe_wrap.ts +++ b/ext/node/polyfills/internal_binding/pipe_wrap.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/internal_binding/stream_wrap.ts b/ext/node/polyfills/internal_binding/stream_wrap.ts index 7aea83d6f5899c..e66c737be0a0f4 100644 --- a/ext/node/polyfills/internal_binding/stream_wrap.ts +++ b/ext/node/polyfills/internal_binding/stream_wrap.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -320,8 +320,16 @@ export class LibuvStreamWrap extends HandleWrap { /** Internal method for reading from the attached stream. */ async #read() { let buf = this.#buf; + let nread: number | null; const ridBefore = this[kStreamBaseField]![internalRidSymbol]; + + if (this.upgrading) { + // Starting an upgrade, stop reading. Upgrading will resume reading. + this.readStop(); + return; + } + try { nread = await this[kStreamBaseField]!.read(buf); } catch (e) { @@ -382,6 +390,11 @@ export class LibuvStreamWrap extends HandleWrap { const ridBefore = this[kStreamBaseField]![internalRidSymbol]; + if (this.upgrading) { + // There is an upgrade in progress, queue the write request. + await this.upgrading; + } + let nwritten = 0; try { // TODO(crowlKats): duplicate from runtime/js/13_buffer.js @@ -400,7 +413,6 @@ export class LibuvStreamWrap extends HandleWrap { } let status: number; - // TODO(cmorten): map err to status codes if ( e instanceof Deno.errors.BadResource || diff --git a/ext/node/polyfills/internal_binding/string_decoder.ts b/ext/node/polyfills/internal_binding/string_decoder.ts index 7f8c954a357232..4825ea0aa939ca 100644 --- a/ext/node/polyfills/internal_binding/string_decoder.ts +++ b/ext/node/polyfills/internal_binding/string_decoder.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { Encodings } from "ext:deno_node/internal_binding/_node.ts"; const encodings = []; diff --git a/ext/node/polyfills/internal_binding/symbols.ts b/ext/node/polyfills/internal_binding/symbols.ts index 2b0656b0ea7734..affc63eb84f795 100644 --- a/ext/node/polyfills/internal_binding/symbols.ts +++ b/ext/node/polyfills/internal_binding/symbols.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/internal_binding/tcp_wrap.ts b/ext/node/polyfills/internal_binding/tcp_wrap.ts index d9f1c5356a0fda..6c19e2dd29837e 100644 --- a/ext/node/polyfills/internal_binding/tcp_wrap.ts +++ b/ext/node/polyfills/internal_binding/tcp_wrap.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/internal_binding/types.ts b/ext/node/polyfills/internal_binding/types.ts index 2d301ba1b20d17..a0fd338600c081 100644 --- a/ext/node/polyfills/internal_binding/types.ts +++ b/ext/node/polyfills/internal_binding/types.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // // Adapted from Node.js. Copyright Joyent, Inc. and other Node contributors. // diff --git a/ext/node/polyfills/internal_binding/udp_wrap.ts b/ext/node/polyfills/internal_binding/udp_wrap.ts index db6961ddb73c1f..337dfe75c22159 100644 --- a/ext/node/polyfills/internal_binding/udp_wrap.ts +++ b/ext/node/polyfills/internal_binding/udp_wrap.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/internal_binding/util.ts b/ext/node/polyfills/internal_binding/util.ts index c8fb32d8caa036..9297e1b20c81a2 100644 --- a/ext/node/polyfills/internal_binding/util.ts +++ b/ext/node/polyfills/internal_binding/util.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/internal_binding/uv.ts b/ext/node/polyfills/internal_binding/uv.ts index 6cd70a7e85288e..cd868cb3956c31 100644 --- a/ext/node/polyfills/internal_binding/uv.ts +++ b/ext/node/polyfills/internal_binding/uv.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/net.ts b/ext/node/polyfills/net.ts index 2b011251905212..3f7603079eeaab 100644 --- a/ext/node/polyfills/net.ts +++ b/ext/node/polyfills/net.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -986,16 +986,20 @@ function _lookupAndConnect( } else { self._unrefTimer(); - defaultTriggerAsyncIdScope( - self[asyncIdSymbol], - _internalConnect, - self, - ip, - port, - addressType, - localAddress, - localPort, - ); + defaultTriggerAsyncIdScope(self[asyncIdSymbol], nextTick, () => { + if (self.connecting) { + defaultTriggerAsyncIdScope( + self[asyncIdSymbol], + _internalConnect, + self, + ip, + port, + addressType, + localAddress, + localPort, + ); + } + }); } }, ); @@ -1197,6 +1201,9 @@ export class Socket extends Duplex { _host: string | null = null; // deno-lint-ignore no-explicit-any _parent: any = null; + // The flag for detecting if it's called in @npmcli/agent + // See discussions in https://github.com/denoland/deno/pull/25470 for more details. + _isNpmAgent = false; autoSelectFamilyAttemptedAddresses: AddressInfo[] | undefined = undefined; constructor(options: SocketOptions | number) { @@ -1217,6 +1224,19 @@ export class Socket extends Duplex { super(options); + // Note: If the socket is created from @npmcli/agent, the 'socket' event + // on ClientRequest object happens after 'connect' event on Socket object. + // That swaps the sequence of op_node_http_request_with_conn() call and + // initial socket read. That causes op_node_http_request_with_conn() not + // working. + // To avoid the above situation, we detect the socket created from + // @npmcli/agent and pause the socket (and also skips the startTls call + // if it's TLSSocket) + this._isNpmAgent = new Error().stack?.includes("@npmcli/agent") || false; + if (this._isNpmAgent) { + this.pause(); + } + if (options.handle) { this._handle = options.handle; this[asyncIdSymbol] = _getNewAsyncId(this._handle); diff --git a/ext/node/polyfills/os.ts b/ext/node/polyfills/os.ts index edc89ed2c3f113..bd4b285ba312d6 100644 --- a/ext/node/polyfills/os.ts +++ b/ext/node/polyfills/os.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/path.ts b/ext/node/polyfills/path.ts index 19ba2e26d362d1..255f9592a0d58a 100644 --- a/ext/node/polyfills/path.ts +++ b/ext/node/polyfills/path.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. export * from "ext:deno_node/path/mod.ts"; import m from "ext:deno_node/path/mod.ts"; export default m; diff --git a/ext/node/polyfills/path/_constants.ts b/ext/node/polyfills/path/_constants.ts index 3407515169a965..b18f90601f4f9c 100644 --- a/ext/node/polyfills/path/_constants.ts +++ b/ext/node/polyfills/path/_constants.ts @@ -1,6 +1,6 @@ // Copyright the Browserify authors. MIT License. // Ported from https://github.com/browserify/path-browserify/ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Alphabet chars. export const CHAR_UPPERCASE_A = 65; /* A */ diff --git a/ext/node/polyfills/path/_interface.ts b/ext/node/polyfills/path/_interface.ts index cb40bae12e9065..e37933962b777c 100644 --- a/ext/node/polyfills/path/_interface.ts +++ b/ext/node/polyfills/path/_interface.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /** * A parsed path object generated by path.parse() or consumed by path.format(). diff --git a/ext/node/polyfills/path/_posix.ts b/ext/node/polyfills/path/_posix.ts index bf0b91d488bd8a..6a4aa2117af0d0 100644 --- a/ext/node/polyfills/path/_posix.ts +++ b/ext/node/polyfills/path/_posix.ts @@ -1,6 +1,6 @@ // Copyright the Browserify authors. MIT License. // Ported from https://github.com/browserify/path-browserify/ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/path/_util.ts b/ext/node/polyfills/path/_util.ts index 9248c68ae5660c..1e95faea414f26 100644 --- a/ext/node/polyfills/path/_util.ts +++ b/ext/node/polyfills/path/_util.ts @@ -1,6 +1,6 @@ // Copyright the Browserify authors. MIT License. // Ported from https://github.com/browserify/path-browserify/ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/path/_win32.ts b/ext/node/polyfills/path/_win32.ts index 11c82e0eeee855..70a0d8a00689df 100644 --- a/ext/node/polyfills/path/_win32.ts +++ b/ext/node/polyfills/path/_win32.ts @@ -1,6 +1,6 @@ // Copyright the Browserify authors. MIT License. // Ported from https://github.com/browserify/path-browserify/ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/path/common.ts b/ext/node/polyfills/path/common.ts index ee2987307ecab1..9c1c91a650ca3e 100644 --- a/ext/node/polyfills/path/common.ts +++ b/ext/node/polyfills/path/common.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // This module is browser compatible. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/path/mod.ts b/ext/node/polyfills/path/mod.ts index e74c1da4dbb408..5fd5e34e578f6f 100644 --- a/ext/node/polyfills/path/mod.ts +++ b/ext/node/polyfills/path/mod.ts @@ -1,6 +1,6 @@ // Copyright the Browserify authors. MIT License. // Ported mostly from https://github.com/browserify/path-browserify/ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { isWindows } from "ext:deno_node/_util/os.ts"; import _win32 from "ext:deno_node/path/_win32.ts"; diff --git a/ext/node/polyfills/path/posix.ts b/ext/node/polyfills/path/posix.ts index 2b6582ff6d5fbf..474d74afaf7fd1 100644 --- a/ext/node/polyfills/path/posix.ts +++ b/ext/node/polyfills/path/posix.ts @@ -1,6 +1,6 @@ // Copyright the Browserify authors. MIT License. // Ported from https://github.com/browserify/path-browserify/ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import path from "ext:deno_node/path/mod.ts"; diff --git a/ext/node/polyfills/path/separator.ts b/ext/node/polyfills/path/separator.ts index 36dce7df99b170..bb9eaf7bb47161 100644 --- a/ext/node/polyfills/path/separator.ts +++ b/ext/node/polyfills/path/separator.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/path/win32.ts b/ext/node/polyfills/path/win32.ts index 02e6f97c5aa63b..740a3465088727 100644 --- a/ext/node/polyfills/path/win32.ts +++ b/ext/node/polyfills/path/win32.ts @@ -1,6 +1,6 @@ // Copyright the Browserify authors. MIT License. // Ported from https://github.com/browserify/path-browserify/ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import path from "ext:deno_node/path/mod.ts"; diff --git a/ext/node/polyfills/perf_hooks.ts b/ext/node/polyfills/perf_hooks.ts index d92b925b5feefc..af4e7b261f8b76 100644 --- a/ext/node/polyfills/perf_hooks.ts +++ b/ext/node/polyfills/perf_hooks.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials @@ -8,6 +8,7 @@ import { performance as shimPerformance, PerformanceEntry, } from "ext:deno_web/15_performance.js"; +import { EldHistogram } from "ext:core/ops"; class PerformanceObserver { static supportedEntryTypes: string[] = []; @@ -89,10 +90,11 @@ const performance: ) => shimPerformance.dispatchEvent(...args), }; -const monitorEventLoopDelay = () => - notImplemented( - "monitorEventLoopDelay from performance", - ); +function monitorEventLoopDelay(options = {}) { + const { resolution = 10 } = options; + + return new EldHistogram(resolution); +} export default { performance, diff --git a/ext/node/polyfills/process.ts b/ext/node/polyfills/process.ts index 647376d5cf0147..e91a2ee005b10f 100644 --- a/ext/node/polyfills/process.ts +++ b/ext/node/polyfills/process.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/punycode.ts b/ext/node/polyfills/punycode.ts index adecdf4f9a897e..6e29dd81f927ed 100644 --- a/ext/node/polyfills/punycode.ts +++ b/ext/node/polyfills/punycode.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { op_node_idna_punycode_decode, diff --git a/ext/node/polyfills/querystring.js b/ext/node/polyfills/querystring.js index 5eb6a077aa9867..206c3f5f825f37 100644 --- a/ext/node/polyfills/querystring.js +++ b/ext/node/polyfills/querystring.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials diff --git a/ext/node/polyfills/readline.ts b/ext/node/polyfills/readline.ts index 5813dd3d9be958..6b7e51fe9d473e 100644 --- a/ext/node/polyfills/readline.ts +++ b/ext/node/polyfills/readline.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // @deno-types="./_readline.d.ts" import { diff --git a/ext/node/polyfills/readline/promises.ts b/ext/node/polyfills/readline/promises.ts index 76c8b350d4e2ed..0e5ae6b8bbb30d 100644 --- a/ext/node/polyfills/readline/promises.ts +++ b/ext/node/polyfills/readline/promises.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/repl.ts b/ext/node/polyfills/repl.ts index a7acc5b19abe1f..c0e69d93eb5f0c 100644 --- a/ext/node/polyfills/repl.ts +++ b/ext/node/polyfills/repl.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. import { primordials } from "ext:core/mod.js"; diff --git a/ext/node/polyfills/stream.ts b/ext/node/polyfills/stream.ts index 96262428f0e125..2c9821dee61078 100644 --- a/ext/node/polyfills/stream.ts +++ b/ext/node/polyfills/stream.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // compose, destroy and isDisturbed are experimental APIs without // typings. They can be exposed once they are released as stable in Node diff --git a/ext/node/polyfills/stream/consumers.mjs b/ext/node/polyfills/stream/consumers.mjs index dc5d29f6114de3..5f436c3e171103 100644 --- a/ext/node/polyfills/stream/consumers.mjs +++ b/ext/node/polyfills/stream/consumers.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/stream/promises.mjs b/ext/node/polyfills/stream/promises.mjs index 1282ca8963647a..007000d883ded9 100644 --- a/ext/node/polyfills/stream/promises.mjs +++ b/ext/node/polyfills/stream/promises.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. import { Stream } from "ext:deno_node/_stream.mjs"; diff --git a/ext/node/polyfills/stream/web.ts b/ext/node/polyfills/stream/web.ts index 9cb361f862dddf..c0594c0cb76591 100644 --- a/ext/node/polyfills/stream/web.ts +++ b/ext/node/polyfills/stream/web.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { ByteLengthQueuingStrategy, diff --git a/ext/node/polyfills/string_decoder.ts b/ext/node/polyfills/string_decoder.ts index b4a422e4b65d2a..f8dfe8d9a8b0de 100644 --- a/ext/node/polyfills/string_decoder.ts +++ b/ext/node/polyfills/string_decoder.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/sys.ts b/ext/node/polyfills/sys.ts index 4ee112caea405d..e10f174b6dab03 100644 --- a/ext/node/polyfills/sys.ts +++ b/ext/node/polyfills/sys.ts @@ -1,3 +1,3 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. export * from "node:util"; export { default } from "node:util"; diff --git a/ext/node/polyfills/testing.ts b/ext/node/polyfills/testing.ts index 901c38ed366b31..39014533a54677 100644 --- a/ext/node/polyfills/testing.ts +++ b/ext/node/polyfills/testing.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { primordials } from "ext:core/mod.js"; const { PromisePrototypeThen } = primordials; diff --git a/ext/node/polyfills/timers.ts b/ext/node/polyfills/timers.ts index e826416ed83d5e..9ef704a0b305aa 100644 --- a/ext/node/polyfills/timers.ts +++ b/ext/node/polyfills/timers.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { primordials } from "ext:core/mod.js"; const { @@ -54,7 +54,7 @@ export function clearTimeout(timeout?: Timeout | number) { const id = +timeout; const timer = MapPrototypeGet(activeTimers, id); if (timer) { - timeout._destroyed = true; + timer._destroyed = true; MapPrototypeDelete(activeTimers, id); } clearTimeout_(id); @@ -74,7 +74,7 @@ export function clearInterval(timeout?: Timeout | number | string) { const id = +timeout; const timer = MapPrototypeGet(activeTimers, id); if (timer) { - timeout._destroyed = true; + timer._destroyed = true; MapPrototypeDelete(activeTimers, id); } clearInterval_(id); diff --git a/ext/node/polyfills/timers/promises.ts b/ext/node/polyfills/timers/promises.ts index b2896fe8096642..2ec23273301678 100644 --- a/ext/node/polyfills/timers/promises.ts +++ b/ext/node/polyfills/timers/promises.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import timers from "node:timers"; export const setTimeout = timers.promises.setTimeout; diff --git a/ext/node/polyfills/tls.ts b/ext/node/polyfills/tls.ts index 4cfe9ebd63c67b..345994236ef891 100644 --- a/ext/node/polyfills/tls.ts +++ b/ext/node/polyfills/tls.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills diff --git a/ext/node/polyfills/trace_events.ts b/ext/node/polyfills/trace_events.ts index bb3ea97459ee01..4df631a4c552ba 100644 --- a/ext/node/polyfills/trace_events.ts +++ b/ext/node/polyfills/trace_events.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { ERR_INVALID_ARG_TYPE } from "ext:deno_node/internal/errors.ts"; diff --git a/ext/node/polyfills/tty.js b/ext/node/polyfills/tty.js index e906c5f677bf75..1545ab12ecefbd 100644 --- a/ext/node/polyfills/tty.js +++ b/ext/node/polyfills/tty.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { op_bootstrap_color_depth } from "ext:core/ops"; import { core, primordials } from "ext:core/mod.js"; diff --git a/ext/node/polyfills/url.ts b/ext/node/polyfills/url.ts index 4eeb0381f6ec50..b2744ff6cc1e98 100644 --- a/ext/node/polyfills/url.ts +++ b/ext/node/polyfills/url.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/ext/node/polyfills/util.ts b/ext/node/polyfills/util.ts index d82b288b037871..06c75ef79a2d8a 100644 --- a/ext/node/polyfills/util.ts +++ b/ext/node/polyfills/util.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { primordials } from "ext:core/mod.js"; const { diff --git a/ext/node/polyfills/util/types.ts b/ext/node/polyfills/util/types.ts index 5f2ead19bbafc2..fbf9092d9d77e9 100644 --- a/ext/node/polyfills/util/types.ts +++ b/ext/node/polyfills/util/types.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import * as types from "ext:deno_node/internal/util/types.ts"; export * from "ext:deno_node/internal/util/types.ts"; export default { ...types }; diff --git a/ext/node/polyfills/v8.ts b/ext/node/polyfills/v8.ts index 9df199865e43e9..6d7892a724a6ed 100644 --- a/ext/node/polyfills/v8.ts +++ b/ext/node/polyfills/v8.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. /// @@ -227,6 +227,7 @@ function arrayBufferViewTypeToIndex(abView: ArrayBufferView) { // Index 10 is FastBuffer. if (type === "[object BigInt64Array]") return 11; if (type === "[object BigUint64Array]") return 12; + if (type === "[object Float16Array]") return 13; return -1; } export class DefaultSerializer extends Serializer { @@ -276,6 +277,7 @@ function arrayBufferViewIndexToType(index: number): any { if (index === 10) return Buffer; if (index === 11) return BigInt64Array; if (index === 12) return BigUint64Array; + if (index === 13) return Float16Array; return undefined; } diff --git a/ext/node/polyfills/vm.js b/ext/node/polyfills/vm.js index b64c847c586af6..72279abcf8aab0 100644 --- a/ext/node/polyfills/vm.js +++ b/ext/node/polyfills/vm.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. import { Buffer } from "node:buffer"; diff --git a/ext/node/polyfills/wasi.ts b/ext/node/polyfills/wasi.ts index 4bdc776a4cafa3..b948b0e35ca035 100644 --- a/ext/node/polyfills/wasi.ts +++ b/ext/node/polyfills/wasi.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { primordials } from "ext:core/mod.js"; diff --git a/ext/node/polyfills/worker_threads.ts b/ext/node/polyfills/worker_threads.ts index d4b75fb30c2c3b..87de9a5a5ced6d 100644 --- a/ext/node/polyfills/worker_threads.ts +++ b/ext/node/polyfills/worker_threads.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. import { core, internals, primordials } from "ext:core/mod.js"; @@ -21,7 +21,7 @@ import { nodeWorkerThreadCloseCb, refMessagePort, serializeJsMessageData, - unrefPollForMessages, + unrefParentPort, } from "ext:deno_web/13_message_port.js"; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { notImplemented } from "ext:deno_node/_utils.ts"; @@ -42,6 +42,7 @@ const { SafeWeakMap, SafeMap, TypeError, + encodeURIComponent, } = primordials; const debugWorkerThreads = false; @@ -123,7 +124,11 @@ class NodeWorker extends EventEmitter { ); } if (options?.eval) { - specifier = `data:text/javascript,${specifier}`; + const code = typeof specifier === "string" + ? encodeURIComponent(specifier) + // deno-lint-ignore prefer-primordials + : specifier.toString(); + specifier = `data:text/javascript,${code}`; } else if ( !(typeof specifier === "object" && specifier.protocol === "data:") ) { @@ -446,10 +451,10 @@ internals.__initWorkerThreads = ( parentPort.emit("close"); }); parentPort.unref = () => { - parentPort[unrefPollForMessages] = true; + parentPort[unrefParentPort] = true; }; parentPort.ref = () => { - parentPort[unrefPollForMessages] = false; + parentPort[unrefParentPort] = false; }; if (isWorkerThread) { diff --git a/ext/node/polyfills/zlib.ts b/ext/node/polyfills/zlib.ts index 6e5d02b5be9bfb..08a9238bd5a6cf 100644 --- a/ext/node/polyfills/zlib.ts +++ b/ext/node/polyfills/zlib.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { notImplemented } from "ext:deno_node/_utils.ts"; import { zlib as constants } from "ext:deno_node/internal_binding/constants.ts"; import { diff --git a/ext/telemetry/Cargo.toml b/ext/telemetry/Cargo.toml new file mode 100644 index 00000000000000..4328b707d328e9 --- /dev/null +++ b/ext/telemetry/Cargo.toml @@ -0,0 +1,31 @@ +# Copyright 2018-2025 the Deno authors. MIT license. + +[package] +name = "deno_telemetry" +version = "0.6.0" +authors.workspace = true +edition.workspace = true +license.workspace = true +readme = "README.md" +repository.workspace = true +description = "Telemetry for Deno" + +[lib] +path = "lib.rs" + +[dependencies] +async-trait.workspace = true +deno_core.workspace = true +http-body-util.workspace = true +hyper.workspace = true +hyper-util.workspace = true +log.workspace = true +once_cell.workspace = true +opentelemetry.workspace = true +opentelemetry-http.workspace = true +opentelemetry-otlp.workspace = true +opentelemetry-semantic-conventions.workspace = true +opentelemetry_sdk.workspace = true +pin-project.workspace = true +serde.workspace = true +tokio.workspace = true diff --git a/ext/telemetry/README.md b/ext/telemetry/README.md new file mode 100644 index 00000000000000..6931a3b8964dc3 --- /dev/null +++ b/ext/telemetry/README.md @@ -0,0 +1,3 @@ +# `deno_telemetry` + +This crate implements telemetry for Deno using OpenTelemetry. diff --git a/ext/telemetry/lib.rs b/ext/telemetry/lib.rs new file mode 100644 index 00000000000000..eeff09ed88ee9e --- /dev/null +++ b/ext/telemetry/lib.rs @@ -0,0 +1,1793 @@ +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::borrow::Cow; +use std::cell::RefCell; +use std::collections::HashMap; +use std::env; +use std::fmt::Debug; +use std::pin::Pin; +use std::rc::Rc; +use std::sync::Arc; +use std::sync::Mutex; +use std::task::Context; +use std::task::Poll; +use std::thread; +use std::time::Duration; +use std::time::SystemTime; + +use deno_core::anyhow; +use deno_core::anyhow::anyhow; +use deno_core::futures::channel::mpsc; +use deno_core::futures::channel::mpsc::UnboundedSender; +use deno_core::futures::future::BoxFuture; +use deno_core::futures::stream; +use deno_core::futures::FutureExt; +use deno_core::futures::Stream; +use deno_core::futures::StreamExt; +use deno_core::op2; +use deno_core::v8; +use deno_core::GarbageCollected; +use deno_core::OpState; +use once_cell::sync::Lazy; +use once_cell::sync::OnceCell; +use opentelemetry::logs::AnyValue; +use opentelemetry::logs::LogRecord as LogRecordTrait; +use opentelemetry::logs::Severity; +use opentelemetry::metrics::AsyncInstrumentBuilder; +use opentelemetry::metrics::InstrumentBuilder; +use opentelemetry::metrics::MeterProvider; +use opentelemetry::otel_debug; +use opentelemetry::otel_error; +use opentelemetry::trace::SpanContext; +use opentelemetry::trace::SpanId; +use opentelemetry::trace::SpanKind; +use opentelemetry::trace::Status as SpanStatus; +use opentelemetry::trace::TraceFlags; +use opentelemetry::trace::TraceId; +use opentelemetry::Key; +use opentelemetry::KeyValue; +use opentelemetry::StringValue; +use opentelemetry::Value; +use opentelemetry_otlp::HttpExporterBuilder; +use opentelemetry_otlp::Protocol; +use opentelemetry_otlp::WithExportConfig; +use opentelemetry_otlp::WithHttpConfig; +use opentelemetry_sdk::export::trace::SpanData; +use opentelemetry_sdk::logs::BatchLogProcessor; +use opentelemetry_sdk::logs::LogProcessor; +use opentelemetry_sdk::logs::LogRecord; +use opentelemetry_sdk::metrics::exporter::PushMetricExporter; +use opentelemetry_sdk::metrics::reader::MetricReader; +use opentelemetry_sdk::metrics::ManualReader; +use opentelemetry_sdk::metrics::MetricResult; +use opentelemetry_sdk::metrics::SdkMeterProvider; +use opentelemetry_sdk::metrics::Temporality; +use opentelemetry_sdk::trace::BatchSpanProcessor; +use opentelemetry_sdk::trace::SpanProcessor; +use opentelemetry_sdk::Resource; +use opentelemetry_semantic_conventions::resource::PROCESS_RUNTIME_NAME; +use opentelemetry_semantic_conventions::resource::PROCESS_RUNTIME_VERSION; +use opentelemetry_semantic_conventions::resource::TELEMETRY_SDK_LANGUAGE; +use opentelemetry_semantic_conventions::resource::TELEMETRY_SDK_NAME; +use opentelemetry_semantic_conventions::resource::TELEMETRY_SDK_VERSION; +use serde::Deserialize; +use serde::Serialize; +use tokio::sync::oneshot; +use tokio::task::JoinSet; + +deno_core::extension!( + deno_telemetry, + ops = [ + op_otel_log, + op_otel_instrumentation_scope_create_and_enter, + op_otel_instrumentation_scope_enter, + op_otel_instrumentation_scope_enter_builtin, + op_otel_span_start, + op_otel_span_continue, + op_otel_span_attribute, + op_otel_span_attribute2, + op_otel_span_attribute3, + op_otel_span_set_dropped, + op_otel_span_flush, + op_otel_metric_create_counter, + op_otel_metric_create_up_down_counter, + op_otel_metric_create_gauge, + op_otel_metric_create_histogram, + op_otel_metric_create_observable_counter, + op_otel_metric_create_observable_gauge, + op_otel_metric_create_observable_up_down_counter, + op_otel_metric_attribute3, + op_otel_metric_record0, + op_otel_metric_record1, + op_otel_metric_record2, + op_otel_metric_record3, + op_otel_metric_observable_record0, + op_otel_metric_observable_record1, + op_otel_metric_observable_record2, + op_otel_metric_observable_record3, + op_otel_metric_wait_to_observe, + op_otel_metric_observation_done, + ], + esm = ["telemetry.ts", "util.ts"], +); + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct OtelRuntimeConfig { + pub runtime_name: Cow<'static, str>, + pub runtime_version: Cow<'static, str>, +} + +#[derive(Default, Debug, Clone, Serialize, Deserialize)] +pub struct OtelConfig { + pub tracing_enabled: bool, + pub metrics_enabled: bool, + pub console: OtelConsoleConfig, + pub deterministic: bool, +} + +impl OtelConfig { + pub fn as_v8(&self) -> Box<[u8]> { + Box::new([ + self.tracing_enabled as u8, + self.metrics_enabled as u8, + self.console as u8, + self.deterministic as u8, + ]) + } +} + +#[derive(Debug, Clone, Copy, Serialize, Deserialize)] +#[repr(u8)] +pub enum OtelConsoleConfig { + Ignore = 0, + Capture = 1, + Replace = 2, +} + +impl Default for OtelConsoleConfig { + fn default() -> Self { + Self::Ignore + } +} + +static OTEL_SHARED_RUNTIME_SPAWN_TASK_TX: Lazy< + UnboundedSender>, +> = Lazy::new(otel_create_shared_runtime); + +static OTEL_PRE_COLLECT_CALLBACKS: Lazy< + Mutex>>>, +> = Lazy::new(Default::default); + +fn otel_create_shared_runtime() -> UnboundedSender> { + let (spawn_task_tx, mut spawn_task_rx) = + mpsc::unbounded::>(); + + thread::spawn(move || { + let rt = tokio::runtime::Builder::new_current_thread() + .enable_io() + .enable_time() + // This limits the number of threads for blocking operations (like for + // synchronous fs ops) or CPU bound tasks like when we run dprint in + // parallel for deno fmt. + // The default value is 512, which is an unhelpfully large thread pool. We + // don't ever want to have more than a couple dozen threads. + .max_blocking_threads(if cfg!(windows) { + // on windows, tokio uses blocking tasks for child process IO, make sure + // we have enough available threads for other tasks to run + 4 * std::thread::available_parallelism() + .map(|n| n.get()) + .unwrap_or(8) + } else { + 32 + }) + .build() + .unwrap(); + + rt.block_on(async move { + while let Some(task) = spawn_task_rx.next().await { + tokio::spawn(task); + } + }); + }); + + spawn_task_tx +} + +#[derive(Clone, Copy)] +struct OtelSharedRuntime; + +impl hyper::rt::Executor> for OtelSharedRuntime { + fn execute(&self, fut: BoxFuture<'static, ()>) { + (*OTEL_SHARED_RUNTIME_SPAWN_TASK_TX) + .unbounded_send(fut) + .expect("failed to send task to shared OpenTelemetry runtime"); + } +} + +impl opentelemetry_sdk::runtime::Runtime for OtelSharedRuntime { + type Interval = Pin + Send + 'static>>; + type Delay = Pin>; + + fn interval(&self, period: Duration) -> Self::Interval { + stream::repeat(()) + .then(move |_| tokio::time::sleep(period)) + .boxed() + } + + fn spawn(&self, future: BoxFuture<'static, ()>) { + (*OTEL_SHARED_RUNTIME_SPAWN_TASK_TX) + .unbounded_send(future) + .expect("failed to send task to shared OpenTelemetry runtime"); + } + + fn delay(&self, duration: Duration) -> Self::Delay { + Box::pin(tokio::time::sleep(duration)) + } +} + +impl opentelemetry_sdk::runtime::RuntimeChannel for OtelSharedRuntime { + type Receiver = BatchMessageChannelReceiver; + type Sender = BatchMessageChannelSender; + + fn batch_message_channel( + &self, + capacity: usize, + ) -> (Self::Sender, Self::Receiver) { + let (batch_tx, batch_rx) = tokio::sync::mpsc::channel::(capacity); + (batch_tx.into(), batch_rx.into()) + } +} + +#[derive(Debug)] +pub struct BatchMessageChannelSender { + sender: tokio::sync::mpsc::Sender, +} + +impl From> + for BatchMessageChannelSender +{ + fn from(sender: tokio::sync::mpsc::Sender) -> Self { + Self { sender } + } +} + +impl opentelemetry_sdk::runtime::TrySend + for BatchMessageChannelSender +{ + type Message = T; + + fn try_send( + &self, + item: Self::Message, + ) -> Result<(), opentelemetry_sdk::runtime::TrySendError> { + self.sender.try_send(item).map_err(|err| match err { + tokio::sync::mpsc::error::TrySendError::Full(_) => { + opentelemetry_sdk::runtime::TrySendError::ChannelFull + } + tokio::sync::mpsc::error::TrySendError::Closed(_) => { + opentelemetry_sdk::runtime::TrySendError::ChannelClosed + } + }) + } +} + +pub struct BatchMessageChannelReceiver { + receiver: tokio::sync::mpsc::Receiver, +} + +impl From> + for BatchMessageChannelReceiver +{ + fn from(receiver: tokio::sync::mpsc::Receiver) -> Self { + Self { receiver } + } +} + +impl Stream for BatchMessageChannelReceiver { + type Item = T; + + fn poll_next( + mut self: Pin<&mut Self>, + cx: &mut Context<'_>, + ) -> Poll> { + self.receiver.poll_recv(cx) + } +} + +enum DenoPeriodicReaderMessage { + Register(std::sync::Weak), + Export, + ForceFlush(oneshot::Sender>), + Shutdown(oneshot::Sender>), +} + +#[derive(Debug)] +struct DenoPeriodicReader { + tx: tokio::sync::mpsc::Sender, + temporality: Temporality, +} + +impl MetricReader for DenoPeriodicReader { + fn register_pipeline( + &self, + pipeline: std::sync::Weak, + ) { + let _ = self + .tx + .try_send(DenoPeriodicReaderMessage::Register(pipeline)); + } + + fn collect( + &self, + _rm: &mut opentelemetry_sdk::metrics::data::ResourceMetrics, + ) -> opentelemetry_sdk::metrics::MetricResult<()> { + unreachable!("collect should not be called on DenoPeriodicReader"); + } + + fn force_flush(&self) -> opentelemetry_sdk::metrics::MetricResult<()> { + let (tx, rx) = oneshot::channel(); + let _ = self.tx.try_send(DenoPeriodicReaderMessage::ForceFlush(tx)); + deno_core::futures::executor::block_on(rx).unwrap()?; + Ok(()) + } + + fn shutdown(&self) -> opentelemetry_sdk::metrics::MetricResult<()> { + let (tx, rx) = oneshot::channel(); + let _ = self.tx.try_send(DenoPeriodicReaderMessage::Shutdown(tx)); + deno_core::futures::executor::block_on(rx).unwrap()?; + Ok(()) + } + + fn temporality( + &self, + _kind: opentelemetry_sdk::metrics::InstrumentKind, + ) -> Temporality { + self.temporality + } +} + +const METRIC_EXPORT_INTERVAL_NAME: &str = "OTEL_METRIC_EXPORT_INTERVAL"; +const DEFAULT_INTERVAL: Duration = Duration::from_secs(60); + +impl DenoPeriodicReader { + fn new(exporter: opentelemetry_otlp::MetricExporter) -> Self { + let interval = env::var(METRIC_EXPORT_INTERVAL_NAME) + .ok() + .and_then(|v| v.parse().map(Duration::from_millis).ok()) + .unwrap_or(DEFAULT_INTERVAL); + + let (tx, mut rx) = tokio::sync::mpsc::channel(256); + + let temporality = PushMetricExporter::temporality(&exporter); + + let worker = async move { + let inner = ManualReader::builder() + .with_temporality(PushMetricExporter::temporality(&exporter)) + .build(); + + let collect_and_export = |collect_observed: bool| { + let inner = &inner; + let exporter = &exporter; + async move { + let mut resource_metrics = + opentelemetry_sdk::metrics::data::ResourceMetrics { + resource: Default::default(), + scope_metrics: Default::default(), + }; + if collect_observed { + let callbacks = { + let mut callbacks = OTEL_PRE_COLLECT_CALLBACKS.lock().unwrap(); + std::mem::take(&mut *callbacks) + }; + let mut futures = JoinSet::new(); + for callback in callbacks { + let (tx, rx) = oneshot::channel(); + if let Ok(()) = callback.send(tx) { + futures.spawn(rx); + } + } + while futures.join_next().await.is_some() {} + } + inner.collect(&mut resource_metrics)?; + if resource_metrics.scope_metrics.is_empty() { + return Ok(()); + } + exporter.export(&mut resource_metrics).await?; + Ok(()) + } + }; + + let mut ticker = tokio::time::interval(interval); + ticker.set_missed_tick_behavior(tokio::time::MissedTickBehavior::Delay); + ticker.tick().await; + + loop { + let message = tokio::select! { + _ = ticker.tick() => DenoPeriodicReaderMessage::Export, + message = rx.recv() => if let Some(message) = message { + message + } else { + break; + }, + }; + + match message { + DenoPeriodicReaderMessage::Register(new_pipeline) => { + inner.register_pipeline(new_pipeline); + } + DenoPeriodicReaderMessage::Export => { + otel_debug!( + name: "DenoPeriodicReader.ExportTriggered", + message = "Export message received.", + ); + if let Err(err) = collect_and_export(true).await { + otel_error!( + name: "DenoPeriodicReader.ExportFailed", + message = "Failed to export metrics", + reason = format!("{}", err)); + } + } + DenoPeriodicReaderMessage::ForceFlush(sender) => { + otel_debug!( + name: "DenoPeriodicReader.ForceFlushCalled", + message = "Flush message received.", + ); + let res = collect_and_export(false).await; + if let Err(send_error) = sender.send(res) { + otel_debug!( + name: "DenoPeriodicReader.Flush.SendResultError", + message = "Failed to send flush result.", + reason = format!("{:?}", send_error), + ); + } + } + DenoPeriodicReaderMessage::Shutdown(sender) => { + otel_debug!( + name: "DenoPeriodicReader.ShutdownCalled", + message = "Shutdown message received", + ); + let res = collect_and_export(false).await; + let _ = exporter.shutdown(); + if let Err(send_error) = sender.send(res) { + otel_debug!( + name: "DenoPeriodicReader.Shutdown.SendResultError", + message = "Failed to send shutdown result", + reason = format!("{:?}", send_error), + ); + } + break; + } + } + } + }; + + (*OTEL_SHARED_RUNTIME_SPAWN_TASK_TX) + .unbounded_send(worker.boxed()) + .expect("failed to send task to shared OpenTelemetry runtime"); + + DenoPeriodicReader { tx, temporality } + } +} + +mod hyper_client { + use std::fmt::Debug; + use std::pin::Pin; + use std::task::Poll; + use std::task::{self}; + + use http_body_util::BodyExt; + use http_body_util::Full; + use hyper::body::Body as HttpBody; + use hyper::body::Frame; + use hyper_util::client::legacy::connect::HttpConnector; + use hyper_util::client::legacy::Client; + use opentelemetry_http::Bytes; + use opentelemetry_http::HttpError; + use opentelemetry_http::Request; + use opentelemetry_http::Response; + use opentelemetry_http::ResponseExt; + + use super::OtelSharedRuntime; + + // same as opentelemetry_http::HyperClient except it uses OtelSharedRuntime + #[derive(Debug, Clone)] + pub struct HyperClient { + inner: Client, + } + + impl HyperClient { + pub fn new() -> Self { + Self { + inner: Client::builder(OtelSharedRuntime).build(HttpConnector::new()), + } + } + } + + #[async_trait::async_trait] + impl opentelemetry_http::HttpClient for HyperClient { + async fn send( + &self, + request: Request>, + ) -> Result, HttpError> { + let (parts, body) = request.into_parts(); + let request = Request::from_parts(parts, Body(Full::from(body))); + let mut response = self.inner.request(request).await?; + let headers = std::mem::take(response.headers_mut()); + + let mut http_response = Response::builder() + .status(response.status()) + .body(response.into_body().collect().await?.to_bytes())?; + *http_response.headers_mut() = headers; + + Ok(http_response.error_for_status()?) + } + } + + #[pin_project::pin_project] + pub struct Body(#[pin] Full); + + impl HttpBody for Body { + type Data = Bytes; + type Error = Box; + + #[inline] + fn poll_frame( + self: Pin<&mut Self>, + cx: &mut task::Context<'_>, + ) -> Poll, Self::Error>>> { + self.project().0.poll_frame(cx).map_err(Into::into) + } + + #[inline] + fn is_end_stream(&self) -> bool { + self.0.is_end_stream() + } + + #[inline] + fn size_hint(&self) -> hyper::body::SizeHint { + self.0.size_hint() + } + } +} + +struct Processors { + spans: BatchSpanProcessor, + logs: BatchLogProcessor, + meter_provider: SdkMeterProvider, +} + +static OTEL_PROCESSORS: OnceCell = OnceCell::new(); + +static BUILT_IN_INSTRUMENTATION_SCOPE: OnceCell< + opentelemetry::InstrumentationScope, +> = OnceCell::new(); + +pub fn init(rt_config: OtelRuntimeConfig) -> anyhow::Result<()> { + // Parse the `OTEL_EXPORTER_OTLP_PROTOCOL` variable. The opentelemetry_* + // crates don't do this automatically. + // TODO(piscisaureus): enable GRPC support. + let protocol = match env::var("OTEL_EXPORTER_OTLP_PROTOCOL").as_deref() { + Ok("http/protobuf") => Protocol::HttpBinary, + Ok("http/json") => Protocol::HttpJson, + Ok("") | Err(env::VarError::NotPresent) => Protocol::HttpBinary, + Ok(protocol) => { + return Err(anyhow!( + "Env var OTEL_EXPORTER_OTLP_PROTOCOL specifies an unsupported protocol: {}", + protocol + )); + } + Err(err) => { + return Err(anyhow!( + "Failed to read env var OTEL_EXPORTER_OTLP_PROTOCOL: {}", + err + )); + } + }; + + // Define the resource attributes that will be attached to all log records. + // These attributes are sourced as follows (in order of precedence): + // * The `service.name` attribute from the `OTEL_SERVICE_NAME` env var. + // * Additional attributes from the `OTEL_RESOURCE_ATTRIBUTES` env var. + // * Default attribute values defined here. + // TODO(piscisaureus): add more default attributes (e.g. script path). + let mut resource = Resource::default(); + + // Add the runtime name and version to the resource attributes. Also override + // the `telemetry.sdk` attributes to include the Deno runtime. + resource = resource.merge(&Resource::new(vec![ + KeyValue::new(PROCESS_RUNTIME_NAME, rt_config.runtime_name), + KeyValue::new(PROCESS_RUNTIME_VERSION, rt_config.runtime_version.clone()), + KeyValue::new( + TELEMETRY_SDK_LANGUAGE, + format!( + "deno-{}", + resource.get(Key::new(TELEMETRY_SDK_LANGUAGE)).unwrap() + ), + ), + KeyValue::new( + TELEMETRY_SDK_NAME, + format!( + "deno-{}", + resource.get(Key::new(TELEMETRY_SDK_NAME)).unwrap() + ), + ), + KeyValue::new( + TELEMETRY_SDK_VERSION, + format!( + "{}-{}", + rt_config.runtime_version, + resource.get(Key::new(TELEMETRY_SDK_VERSION)).unwrap() + ), + ), + ])); + + // The OTLP endpoint is automatically picked up from the + // `OTEL_EXPORTER_OTLP_ENDPOINT` environment variable. Additional headers can + // be specified using `OTEL_EXPORTER_OTLP_HEADERS`. + + let client = hyper_client::HyperClient::new(); + + let span_exporter = HttpExporterBuilder::default() + .with_http_client(client.clone()) + .with_protocol(protocol) + .build_span_exporter()?; + let mut span_processor = + BatchSpanProcessor::builder(span_exporter, OtelSharedRuntime).build(); + span_processor.set_resource(&resource); + + let temporality_preference = + env::var("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE") + .ok() + .map(|s| s.to_lowercase()); + let temporality = match temporality_preference.as_deref() { + None | Some("cumulative") => Temporality::Cumulative, + Some("delta") => Temporality::Delta, + Some("lowmemory") => Temporality::LowMemory, + Some(other) => { + return Err(anyhow!( + "Invalid value for OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE: {}", + other + )); + } + }; + let metric_exporter = HttpExporterBuilder::default() + .with_http_client(client.clone()) + .with_protocol(protocol) + .build_metrics_exporter(temporality)?; + let metric_reader = DenoPeriodicReader::new(metric_exporter); + let meter_provider = SdkMeterProvider::builder() + .with_reader(metric_reader) + .with_resource(resource.clone()) + .build(); + + let log_exporter = HttpExporterBuilder::default() + .with_http_client(client) + .with_protocol(protocol) + .build_log_exporter()?; + let log_processor = + BatchLogProcessor::builder(log_exporter, OtelSharedRuntime).build(); + log_processor.set_resource(&resource); + + OTEL_PROCESSORS + .set(Processors { + spans: span_processor, + logs: log_processor, + meter_provider, + }) + .map_err(|_| anyhow!("failed to init otel"))?; + + let builtin_instrumentation_scope = + opentelemetry::InstrumentationScope::builder("deno") + .with_version(rt_config.runtime_version.clone()) + .build(); + BUILT_IN_INSTRUMENTATION_SCOPE + .set(builtin_instrumentation_scope) + .map_err(|_| anyhow!("failed to init otel"))?; + + Ok(()) +} + +/// This function is called by the runtime whenever it is about to call +/// `process::exit()`, to ensure that all OpenTelemetry logs are properly +/// flushed before the process terminates. +pub fn flush() { + if let Some(Processors { + spans, + logs, + meter_provider, + }) = OTEL_PROCESSORS.get() + { + let _ = spans.force_flush(); + let _ = logs.force_flush(); + let _ = meter_provider.force_flush(); + } +} + +pub fn handle_log(record: &log::Record) { + use log::Level; + + let Some(Processors { logs, .. }) = OTEL_PROCESSORS.get() else { + return; + }; + + let mut log_record = LogRecord::default(); + + log_record.set_observed_timestamp(SystemTime::now()); + log_record.set_severity_number(match record.level() { + Level::Error => Severity::Error, + Level::Warn => Severity::Warn, + Level::Info => Severity::Info, + Level::Debug => Severity::Debug, + Level::Trace => Severity::Trace, + }); + log_record.set_severity_text(record.level().as_str()); + log_record.set_body(record.args().to_string().into()); + log_record.set_target(record.metadata().target().to_string()); + + struct Visitor<'s>(&'s mut LogRecord); + + impl<'s, 'kvs> log::kv::VisitSource<'kvs> for Visitor<'s> { + fn visit_pair( + &mut self, + key: log::kv::Key<'kvs>, + value: log::kv::Value<'kvs>, + ) -> Result<(), log::kv::Error> { + #[allow(clippy::manual_map)] + let value = if let Some(v) = value.to_bool() { + Some(AnyValue::Boolean(v)) + } else if let Some(v) = value.to_borrowed_str() { + Some(AnyValue::String(v.to_owned().into())) + } else if let Some(v) = value.to_f64() { + Some(AnyValue::Double(v)) + } else if let Some(v) = value.to_i64() { + Some(AnyValue::Int(v)) + } else { + None + }; + + if let Some(value) = value { + let key = Key::from(key.as_str().to_owned()); + self.0.add_attribute(key, value); + } + + Ok(()) + } + } + + let _ = record.key_values().visit(&mut Visitor(&mut log_record)); + + logs.emit( + &mut log_record, + BUILT_IN_INSTRUMENTATION_SCOPE.get().unwrap(), + ); +} + +fn parse_trace_id( + scope: &mut v8::HandleScope<'_>, + trace_id: v8::Local<'_, v8::Value>, +) -> TraceId { + if let Ok(string) = trace_id.try_cast() { + let value_view = v8::ValueView::new(scope, string); + match value_view.data() { + v8::ValueViewData::OneByte(bytes) => { + TraceId::from_hex(&String::from_utf8_lossy(bytes)) + .unwrap_or(TraceId::INVALID) + } + + _ => TraceId::INVALID, + } + } else if let Ok(uint8array) = trace_id.try_cast::() { + let data = uint8array.data(); + let byte_length = uint8array.byte_length(); + if byte_length != 16 { + return TraceId::INVALID; + } + // SAFETY: We have ensured that the byte length is 16, so it is safe to + // cast the data to an array of 16 bytes. + let bytes = unsafe { &*(data as *const u8 as *const [u8; 16]) }; + TraceId::from_bytes(*bytes) + } else { + TraceId::INVALID + } +} + +fn parse_span_id( + scope: &mut v8::HandleScope<'_>, + span_id: v8::Local<'_, v8::Value>, +) -> SpanId { + if let Ok(string) = span_id.try_cast() { + let value_view = v8::ValueView::new(scope, string); + match value_view.data() { + v8::ValueViewData::OneByte(bytes) => { + SpanId::from_hex(&String::from_utf8_lossy(bytes)) + .unwrap_or(SpanId::INVALID) + } + _ => SpanId::INVALID, + } + } else if let Ok(uint8array) = span_id.try_cast::() { + let data = uint8array.data(); + let byte_length = uint8array.byte_length(); + if byte_length != 8 { + return SpanId::INVALID; + } + // SAFETY: We have ensured that the byte length is 8, so it is safe to + // cast the data to an array of 8 bytes. + let bytes = unsafe { &*(data as *const u8 as *const [u8; 8]) }; + SpanId::from_bytes(*bytes) + } else { + SpanId::INVALID + } +} + +macro_rules! attr_raw { + ($scope:ident, $name:expr, $value:expr) => {{ + let name = if let Ok(name) = $name.try_cast() { + let view = v8::ValueView::new($scope, name); + match view.data() { + v8::ValueViewData::OneByte(bytes) => { + Some(String::from_utf8_lossy(bytes).into_owned()) + } + v8::ValueViewData::TwoByte(bytes) => { + Some(String::from_utf16_lossy(bytes)) + } + } + } else { + None + }; + let value = if let Ok(string) = $value.try_cast::() { + Some(Value::String(StringValue::from({ + let x = v8::ValueView::new($scope, string); + match x.data() { + v8::ValueViewData::OneByte(bytes) => { + String::from_utf8_lossy(bytes).into_owned() + } + v8::ValueViewData::TwoByte(bytes) => String::from_utf16_lossy(bytes), + } + }))) + } else if let Ok(number) = $value.try_cast::() { + Some(Value::F64(number.value())) + } else if let Ok(boolean) = $value.try_cast::() { + Some(Value::Bool(boolean.is_true())) + } else if let Ok(bigint) = $value.try_cast::() { + let (i64_value, _lossless) = bigint.i64_value(); + Some(Value::I64(i64_value)) + } else { + None + }; + if let (Some(name), Some(value)) = (name, value) { + Some(KeyValue::new(name, value)) + } else { + None + } + }}; +} + +macro_rules! attr { + ($scope:ident, $attributes:expr $(=> $dropped_attributes_count:expr)?, $name:expr, $value:expr) => { + let attr = attr_raw!($scope, $name, $value); + if let Some(kv) = attr { + $attributes.push(kv); + } + $( + else { + $dropped_attributes_count += 1; + } + )? + }; +} + +#[derive(Debug, Clone)] +struct InstrumentationScope(opentelemetry::InstrumentationScope); + +impl deno_core::GarbageCollected for InstrumentationScope {} + +#[op2] +#[cppgc] +fn op_otel_instrumentation_scope_create_and_enter( + state: &mut OpState, + #[string] name: String, + #[string] version: Option, + #[string] schema_url: Option, +) -> InstrumentationScope { + let mut builder = opentelemetry::InstrumentationScope::builder(name); + if let Some(version) = version { + builder = builder.with_version(version); + } + if let Some(schema_url) = schema_url { + builder = builder.with_schema_url(schema_url); + } + let scope = InstrumentationScope(builder.build()); + state.put(scope.clone()); + scope +} + +#[op2(fast)] +fn op_otel_instrumentation_scope_enter( + state: &mut OpState, + #[cppgc] scope: &InstrumentationScope, +) { + state.put(scope.clone()); +} + +#[op2(fast)] +fn op_otel_instrumentation_scope_enter_builtin(state: &mut OpState) { + if let Some(scope) = BUILT_IN_INSTRUMENTATION_SCOPE.get() { + state.put(InstrumentationScope(scope.clone())); + } +} + +#[op2(fast)] +fn op_otel_log( + scope: &mut v8::HandleScope<'_>, + #[string] message: String, + #[smi] level: i32, + trace_id: v8::Local<'_, v8::Value>, + span_id: v8::Local<'_, v8::Value>, + #[smi] trace_flags: u8, +) { + let Some(Processors { logs, .. }) = OTEL_PROCESSORS.get() else { + return; + }; + let Some(instrumentation_scope) = BUILT_IN_INSTRUMENTATION_SCOPE.get() else { + return; + }; + + // Convert the integer log level that ext/console uses to the corresponding + // OpenTelemetry log severity. + let severity = match level { + ..=0 => Severity::Debug, + 1 => Severity::Info, + 2 => Severity::Warn, + 3.. => Severity::Error, + }; + + let trace_id = parse_trace_id(scope, trace_id); + let span_id = parse_span_id(scope, span_id); + + let mut log_record = LogRecord::default(); + + log_record.set_observed_timestamp(SystemTime::now()); + log_record.set_body(message.into()); + log_record.set_severity_number(severity); + log_record.set_severity_text(severity.name()); + if trace_id != TraceId::INVALID && span_id != SpanId::INVALID { + log_record.set_trace_context( + trace_id, + span_id, + Some(TraceFlags::new(trace_flags)), + ); + } + + logs.emit(&mut log_record, instrumentation_scope); +} + +fn owned_string<'s>( + scope: &mut v8::HandleScope<'s>, + string: v8::Local<'s, v8::String>, +) -> String { + let x = v8::ValueView::new(scope, string); + match x.data() { + v8::ValueViewData::OneByte(bytes) => { + String::from_utf8_lossy(bytes).into_owned() + } + v8::ValueViewData::TwoByte(bytes) => String::from_utf16_lossy(bytes), + } +} + +struct TemporarySpan(SpanData); + +#[allow(clippy::too_many_arguments)] +#[op2(fast)] +fn op_otel_span_start<'s>( + scope: &mut v8::HandleScope<'s>, + state: &mut OpState, + trace_id: v8::Local<'s, v8::Value>, + span_id: v8::Local<'s, v8::Value>, + parent_span_id: v8::Local<'s, v8::Value>, + #[smi] span_kind: u8, + name: v8::Local<'s, v8::Value>, + start_time: f64, + end_time: f64, +) -> Result<(), anyhow::Error> { + if let Some(temporary_span) = state.try_take::() { + let Some(Processors { spans, .. }) = OTEL_PROCESSORS.get() else { + return Ok(()); + }; + spans.on_end(temporary_span.0); + }; + + let Some(InstrumentationScope(instrumentation_scope)) = + state.try_borrow::() + else { + return Err(anyhow!("instrumentation scope not available")); + }; + + let trace_id = parse_trace_id(scope, trace_id); + if trace_id == TraceId::INVALID { + return Err(anyhow!("invalid trace_id")); + } + + let span_id = parse_span_id(scope, span_id); + if span_id == SpanId::INVALID { + return Err(anyhow!("invalid span_id")); + } + + let parent_span_id = parse_span_id(scope, parent_span_id); + + let name = owned_string(scope, name.try_cast()?); + + let temporary_span = TemporarySpan(SpanData { + span_context: SpanContext::new( + trace_id, + span_id, + TraceFlags::SAMPLED, + false, + Default::default(), + ), + parent_span_id, + span_kind: match span_kind { + 0 => SpanKind::Internal, + 1 => SpanKind::Server, + 2 => SpanKind::Client, + 3 => SpanKind::Producer, + 4 => SpanKind::Consumer, + _ => return Err(anyhow!("invalid span kind")), + }, + name: Cow::Owned(name), + start_time: SystemTime::UNIX_EPOCH + .checked_add(std::time::Duration::from_secs_f64(start_time)) + .ok_or_else(|| anyhow!("invalid start time"))?, + end_time: SystemTime::UNIX_EPOCH + .checked_add(std::time::Duration::from_secs_f64(end_time)) + .ok_or_else(|| anyhow!("invalid start time"))?, + attributes: Vec::new(), + dropped_attributes_count: 0, + events: Default::default(), + links: Default::default(), + status: SpanStatus::Unset, + instrumentation_scope: instrumentation_scope.clone(), + }); + state.put(temporary_span); + + Ok(()) +} + +#[op2(fast)] +fn op_otel_span_continue( + state: &mut OpState, + #[smi] status: u8, + #[string] error_description: Cow<'_, str>, +) { + if let Some(temporary_span) = state.try_borrow_mut::() { + temporary_span.0.status = match status { + 0 => SpanStatus::Unset, + 1 => SpanStatus::Ok, + 2 => SpanStatus::Error { + description: Cow::Owned(error_description.into_owned()), + }, + _ => return, + }; + } +} + +#[op2(fast)] +fn op_otel_span_attribute<'s>( + scope: &mut v8::HandleScope<'s>, + state: &mut OpState, + #[smi] capacity: u32, + key: v8::Local<'s, v8::Value>, + value: v8::Local<'s, v8::Value>, +) { + if let Some(temporary_span) = state.try_borrow_mut::() { + temporary_span.0.attributes.reserve_exact( + (capacity as usize) + .saturating_sub(temporary_span.0.attributes.capacity()), + ); + attr!(scope, temporary_span.0.attributes => temporary_span.0.dropped_attributes_count, key, value); + } +} + +#[op2(fast)] +fn op_otel_span_attribute2<'s>( + scope: &mut v8::HandleScope<'s>, + state: &mut OpState, + #[smi] capacity: u32, + key1: v8::Local<'s, v8::Value>, + value1: v8::Local<'s, v8::Value>, + key2: v8::Local<'s, v8::Value>, + value2: v8::Local<'s, v8::Value>, +) { + if let Some(temporary_span) = state.try_borrow_mut::() { + temporary_span.0.attributes.reserve_exact( + (capacity as usize) + .saturating_sub(temporary_span.0.attributes.capacity()), + ); + attr!(scope, temporary_span.0.attributes => temporary_span.0.dropped_attributes_count, key1, value1); + attr!(scope, temporary_span.0.attributes => temporary_span.0.dropped_attributes_count, key2, value2); + } +} + +#[allow(clippy::too_many_arguments)] +#[op2(fast)] +fn op_otel_span_attribute3<'s>( + scope: &mut v8::HandleScope<'s>, + state: &mut OpState, + #[smi] capacity: u32, + key1: v8::Local<'s, v8::Value>, + value1: v8::Local<'s, v8::Value>, + key2: v8::Local<'s, v8::Value>, + value2: v8::Local<'s, v8::Value>, + key3: v8::Local<'s, v8::Value>, + value3: v8::Local<'s, v8::Value>, +) { + if let Some(temporary_span) = state.try_borrow_mut::() { + temporary_span.0.attributes.reserve_exact( + (capacity as usize) + .saturating_sub(temporary_span.0.attributes.capacity()), + ); + attr!(scope, temporary_span.0.attributes => temporary_span.0.dropped_attributes_count, key1, value1); + attr!(scope, temporary_span.0.attributes => temporary_span.0.dropped_attributes_count, key2, value2); + attr!(scope, temporary_span.0.attributes => temporary_span.0.dropped_attributes_count, key3, value3); + } +} + +#[op2(fast)] +fn op_otel_span_set_dropped( + state: &mut OpState, + #[smi] dropped_attributes_count: u32, + #[smi] dropped_links_count: u32, + #[smi] dropped_events_count: u32, +) { + if let Some(temporary_span) = state.try_borrow_mut::() { + temporary_span.0.dropped_attributes_count += dropped_attributes_count; + temporary_span.0.links.dropped_count += dropped_links_count; + temporary_span.0.events.dropped_count += dropped_events_count; + } +} + +#[op2(fast)] +fn op_otel_span_flush(state: &mut OpState) { + let Some(temporary_span) = state.try_take::() else { + return; + }; + + let Some(Processors { spans, .. }) = OTEL_PROCESSORS.get() else { + return; + }; + + spans.on_end(temporary_span.0); +} + +enum Instrument { + Counter(opentelemetry::metrics::Counter), + UpDownCounter(opentelemetry::metrics::UpDownCounter), + Gauge(opentelemetry::metrics::Gauge), + Histogram(opentelemetry::metrics::Histogram), + Observable(Arc, f64>>>), +} + +impl GarbageCollected for Instrument {} + +fn create_instrument<'a, T>( + cb: impl FnOnce( + &'_ opentelemetry::metrics::Meter, + String, + ) -> InstrumentBuilder<'_, T>, + cb2: impl FnOnce(InstrumentBuilder<'_, T>) -> Instrument, + state: &mut OpState, + scope: &mut v8::HandleScope<'a>, + name: v8::Local<'a, v8::Value>, + description: v8::Local<'a, v8::Value>, + unit: v8::Local<'a, v8::Value>, +) -> Result { + let Some(InstrumentationScope(instrumentation_scope)) = + state.try_borrow::() + else { + return Err(anyhow!("instrumentation scope not available")); + }; + + let meter = OTEL_PROCESSORS + .get() + .unwrap() + .meter_provider + .meter_with_scope(instrumentation_scope.clone()); + + let name = owned_string(scope, name.try_cast()?); + let mut builder = cb(&meter, name); + if !description.is_null_or_undefined() { + let description = owned_string(scope, description.try_cast()?); + builder = builder.with_description(description); + }; + if !unit.is_null_or_undefined() { + let unit = owned_string(scope, unit.try_cast()?); + builder = builder.with_unit(unit); + }; + + Ok(cb2(builder)) +} + +#[op2] +#[cppgc] +fn op_otel_metric_create_counter<'s>( + state: &mut OpState, + scope: &mut v8::HandleScope<'s>, + name: v8::Local<'s, v8::Value>, + description: v8::Local<'s, v8::Value>, + unit: v8::Local<'s, v8::Value>, +) -> Result { + create_instrument( + |meter, name| meter.f64_counter(name), + |i| Instrument::Counter(i.build()), + state, + scope, + name, + description, + unit, + ) +} + +#[op2] +#[cppgc] +fn op_otel_metric_create_up_down_counter<'s>( + state: &mut OpState, + scope: &mut v8::HandleScope<'s>, + name: v8::Local<'s, v8::Value>, + description: v8::Local<'s, v8::Value>, + unit: v8::Local<'s, v8::Value>, +) -> Result { + create_instrument( + |meter, name| meter.f64_up_down_counter(name), + |i| Instrument::UpDownCounter(i.build()), + state, + scope, + name, + description, + unit, + ) +} + +#[op2] +#[cppgc] +fn op_otel_metric_create_gauge<'s>( + state: &mut OpState, + scope: &mut v8::HandleScope<'s>, + name: v8::Local<'s, v8::Value>, + description: v8::Local<'s, v8::Value>, + unit: v8::Local<'s, v8::Value>, +) -> Result { + create_instrument( + |meter, name| meter.f64_gauge(name), + |i| Instrument::Gauge(i.build()), + state, + scope, + name, + description, + unit, + ) +} + +#[op2] +#[cppgc] +fn op_otel_metric_create_histogram<'s>( + state: &mut OpState, + scope: &mut v8::HandleScope<'s>, + name: v8::Local<'s, v8::Value>, + description: v8::Local<'s, v8::Value>, + unit: v8::Local<'s, v8::Value>, + #[serde] boundaries: Option>, +) -> Result { + let Some(InstrumentationScope(instrumentation_scope)) = + state.try_borrow::() + else { + return Err(anyhow!("instrumentation scope not available")); + }; + + let meter = OTEL_PROCESSORS + .get() + .unwrap() + .meter_provider + .meter_with_scope(instrumentation_scope.clone()); + + let name = owned_string(scope, name.try_cast()?); + let mut builder = meter.f64_histogram(name); + if !description.is_null_or_undefined() { + let description = owned_string(scope, description.try_cast()?); + builder = builder.with_description(description); + }; + if !unit.is_null_or_undefined() { + let unit = owned_string(scope, unit.try_cast()?); + builder = builder.with_unit(unit); + }; + if let Some(boundaries) = boundaries { + builder = builder.with_boundaries(boundaries); + } + + Ok(Instrument::Histogram(builder.build())) +} + +fn create_async_instrument<'a, T>( + cb: impl FnOnce( + &'_ opentelemetry::metrics::Meter, + String, + ) -> AsyncInstrumentBuilder<'_, T, f64>, + cb2: impl FnOnce(AsyncInstrumentBuilder<'_, T, f64>), + state: &mut OpState, + scope: &mut v8::HandleScope<'a>, + name: v8::Local<'a, v8::Value>, + description: v8::Local<'a, v8::Value>, + unit: v8::Local<'a, v8::Value>, +) -> Result { + let Some(InstrumentationScope(instrumentation_scope)) = + state.try_borrow::() + else { + return Err(anyhow!("instrumentation scope not available")); + }; + + let meter = OTEL_PROCESSORS + .get() + .unwrap() + .meter_provider + .meter_with_scope(instrumentation_scope.clone()); + + let name = owned_string(scope, name.try_cast()?); + let mut builder = cb(&meter, name); + if !description.is_null_or_undefined() { + let description = owned_string(scope, description.try_cast()?); + builder = builder.with_description(description); + }; + if !unit.is_null_or_undefined() { + let unit = owned_string(scope, unit.try_cast()?); + builder = builder.with_unit(unit); + }; + + let data_share = Arc::new(Mutex::new(HashMap::new())); + let data_share_: Arc, f64>>> = data_share.clone(); + builder = builder.with_callback(move |i| { + let data = { + let mut data = data_share_.lock().unwrap(); + std::mem::take(&mut *data) + }; + for (attributes, value) in data { + i.observe(value, &attributes); + } + }); + cb2(builder); + + Ok(Instrument::Observable(data_share)) +} + +#[op2] +#[cppgc] +fn op_otel_metric_create_observable_counter<'s>( + state: &mut OpState, + scope: &mut v8::HandleScope<'s>, + name: v8::Local<'s, v8::Value>, + description: v8::Local<'s, v8::Value>, + unit: v8::Local<'s, v8::Value>, +) -> Result { + create_async_instrument( + |meter, name| meter.f64_observable_counter(name), + |i| { + i.build(); + }, + state, + scope, + name, + description, + unit, + ) +} + +#[op2] +#[cppgc] +fn op_otel_metric_create_observable_up_down_counter<'s>( + state: &mut OpState, + scope: &mut v8::HandleScope<'s>, + name: v8::Local<'s, v8::Value>, + description: v8::Local<'s, v8::Value>, + unit: v8::Local<'s, v8::Value>, +) -> Result { + create_async_instrument( + |meter, name| meter.f64_observable_up_down_counter(name), + |i| { + i.build(); + }, + state, + scope, + name, + description, + unit, + ) +} + +#[op2] +#[cppgc] +fn op_otel_metric_create_observable_gauge<'s>( + state: &mut OpState, + scope: &mut v8::HandleScope<'s>, + name: v8::Local<'s, v8::Value>, + description: v8::Local<'s, v8::Value>, + unit: v8::Local<'s, v8::Value>, +) -> Result { + create_async_instrument( + |meter, name| meter.f64_observable_gauge(name), + |i| { + i.build(); + }, + state, + scope, + name, + description, + unit, + ) +} + +struct MetricAttributes { + attributes: Vec, +} + +#[op2(fast)] +fn op_otel_metric_record0( + state: &mut OpState, + #[cppgc] instrument: &Instrument, + value: f64, +) { + let values = state.try_take::(); + let attributes = match &values { + Some(values) => &*values.attributes, + None => &[], + }; + match instrument { + Instrument::Counter(counter) => counter.add(value, attributes), + Instrument::UpDownCounter(counter) => counter.add(value, attributes), + Instrument::Gauge(gauge) => gauge.record(value, attributes), + Instrument::Histogram(histogram) => histogram.record(value, attributes), + _ => {} + } +} + +#[op2(fast)] +fn op_otel_metric_record1( + state: &mut OpState, + scope: &mut v8::HandleScope<'_>, + instrument: v8::Local<'_, v8::Value>, + value: f64, + key1: v8::Local<'_, v8::Value>, + value1: v8::Local<'_, v8::Value>, +) { + let Some(instrument) = deno_core::_ops::try_unwrap_cppgc_object::( + &mut *scope, + instrument, + ) else { + return; + }; + let mut values = state.try_take::(); + let attr1 = attr_raw!(scope, key1, value1); + let attributes = match &mut values { + Some(values) => { + if let Some(kv) = attr1 { + values.attributes.reserve_exact(1); + values.attributes.push(kv); + } + &*values.attributes + } + None => match attr1 { + Some(kv1) => &[kv1] as &[KeyValue], + None => &[], + }, + }; + match &*instrument { + Instrument::Counter(counter) => counter.add(value, attributes), + Instrument::UpDownCounter(counter) => counter.add(value, attributes), + Instrument::Gauge(gauge) => gauge.record(value, attributes), + Instrument::Histogram(histogram) => histogram.record(value, attributes), + _ => {} + } +} + +#[allow(clippy::too_many_arguments)] +#[op2(fast)] +fn op_otel_metric_record2( + state: &mut OpState, + scope: &mut v8::HandleScope<'_>, + instrument: v8::Local<'_, v8::Value>, + value: f64, + key1: v8::Local<'_, v8::Value>, + value1: v8::Local<'_, v8::Value>, + key2: v8::Local<'_, v8::Value>, + value2: v8::Local<'_, v8::Value>, +) { + let Some(instrument) = deno_core::_ops::try_unwrap_cppgc_object::( + &mut *scope, + instrument, + ) else { + return; + }; + let mut values = state.try_take::(); + let attr1 = attr_raw!(scope, key1, value1); + let attr2 = attr_raw!(scope, key2, value2); + let attributes = match &mut values { + Some(values) => { + values.attributes.reserve_exact(2); + if let Some(kv1) = attr1 { + values.attributes.push(kv1); + } + if let Some(kv2) = attr2 { + values.attributes.push(kv2); + } + &*values.attributes + } + None => match (attr1, attr2) { + (Some(kv1), Some(kv2)) => &[kv1, kv2] as &[KeyValue], + (Some(kv1), None) => &[kv1], + (None, Some(kv2)) => &[kv2], + (None, None) => &[], + }, + }; + match &*instrument { + Instrument::Counter(counter) => counter.add(value, attributes), + Instrument::UpDownCounter(counter) => counter.add(value, attributes), + Instrument::Gauge(gauge) => gauge.record(value, attributes), + Instrument::Histogram(histogram) => histogram.record(value, attributes), + _ => {} + } +} + +#[allow(clippy::too_many_arguments)] +#[op2(fast)] +fn op_otel_metric_record3( + state: &mut OpState, + scope: &mut v8::HandleScope<'_>, + instrument: v8::Local<'_, v8::Value>, + value: f64, + key1: v8::Local<'_, v8::Value>, + value1: v8::Local<'_, v8::Value>, + key2: v8::Local<'_, v8::Value>, + value2: v8::Local<'_, v8::Value>, + key3: v8::Local<'_, v8::Value>, + value3: v8::Local<'_, v8::Value>, +) { + let Some(instrument) = deno_core::_ops::try_unwrap_cppgc_object::( + &mut *scope, + instrument, + ) else { + return; + }; + let mut values = state.try_take::(); + let attr1 = attr_raw!(scope, key1, value1); + let attr2 = attr_raw!(scope, key2, value2); + let attr3 = attr_raw!(scope, key3, value3); + let attributes = match &mut values { + Some(values) => { + values.attributes.reserve_exact(3); + if let Some(kv1) = attr1 { + values.attributes.push(kv1); + } + if let Some(kv2) = attr2 { + values.attributes.push(kv2); + } + if let Some(kv3) = attr3 { + values.attributes.push(kv3); + } + &*values.attributes + } + None => match (attr1, attr2, attr3) { + (Some(kv1), Some(kv2), Some(kv3)) => &[kv1, kv2, kv3] as &[KeyValue], + (Some(kv1), Some(kv2), None) => &[kv1, kv2], + (Some(kv1), None, Some(kv3)) => &[kv1, kv3], + (None, Some(kv2), Some(kv3)) => &[kv2, kv3], + (Some(kv1), None, None) => &[kv1], + (None, Some(kv2), None) => &[kv2], + (None, None, Some(kv3)) => &[kv3], + (None, None, None) => &[], + }, + }; + match &*instrument { + Instrument::Counter(counter) => counter.add(value, attributes), + Instrument::UpDownCounter(counter) => counter.add(value, attributes), + Instrument::Gauge(gauge) => gauge.record(value, attributes), + Instrument::Histogram(histogram) => histogram.record(value, attributes), + _ => {} + } +} + +#[op2(fast)] +fn op_otel_metric_observable_record0( + state: &mut OpState, + #[cppgc] instrument: &Instrument, + value: f64, +) { + let values = state.try_take::(); + let attributes = values.map(|attr| attr.attributes).unwrap_or_default(); + if let Instrument::Observable(data_share) = instrument { + let mut data = data_share.lock().unwrap(); + data.insert(attributes, value); + } +} + +#[op2(fast)] +fn op_otel_metric_observable_record1( + state: &mut OpState, + scope: &mut v8::HandleScope<'_>, + instrument: v8::Local<'_, v8::Value>, + value: f64, + key1: v8::Local<'_, v8::Value>, + value1: v8::Local<'_, v8::Value>, +) { + let Some(instrument) = deno_core::_ops::try_unwrap_cppgc_object::( + &mut *scope, + instrument, + ) else { + return; + }; + let values = state.try_take::(); + let attr1 = attr_raw!(scope, key1, value1); + let mut attributes = values + .map(|mut attr| { + attr.attributes.reserve_exact(1); + attr.attributes + }) + .unwrap_or_else(|| Vec::with_capacity(1)); + if let Some(kv1) = attr1 { + attributes.push(kv1); + } + if let Instrument::Observable(data_share) = &*instrument { + let mut data = data_share.lock().unwrap(); + data.insert(attributes, value); + } +} + +#[allow(clippy::too_many_arguments)] +#[op2(fast)] +fn op_otel_metric_observable_record2( + state: &mut OpState, + scope: &mut v8::HandleScope<'_>, + instrument: v8::Local<'_, v8::Value>, + value: f64, + key1: v8::Local<'_, v8::Value>, + value1: v8::Local<'_, v8::Value>, + key2: v8::Local<'_, v8::Value>, + value2: v8::Local<'_, v8::Value>, +) { + let Some(instrument) = deno_core::_ops::try_unwrap_cppgc_object::( + &mut *scope, + instrument, + ) else { + return; + }; + let values = state.try_take::(); + let mut attributes = values + .map(|mut attr| { + attr.attributes.reserve_exact(2); + attr.attributes + }) + .unwrap_or_else(|| Vec::with_capacity(2)); + let attr1 = attr_raw!(scope, key1, value1); + let attr2 = attr_raw!(scope, key2, value2); + if let Some(kv1) = attr1 { + attributes.push(kv1); + } + if let Some(kv2) = attr2 { + attributes.push(kv2); + } + if let Instrument::Observable(data_share) = &*instrument { + let mut data = data_share.lock().unwrap(); + data.insert(attributes, value); + } +} + +#[allow(clippy::too_many_arguments)] +#[op2(fast)] +fn op_otel_metric_observable_record3( + state: &mut OpState, + scope: &mut v8::HandleScope<'_>, + instrument: v8::Local<'_, v8::Value>, + value: f64, + key1: v8::Local<'_, v8::Value>, + value1: v8::Local<'_, v8::Value>, + key2: v8::Local<'_, v8::Value>, + value2: v8::Local<'_, v8::Value>, + key3: v8::Local<'_, v8::Value>, + value3: v8::Local<'_, v8::Value>, +) { + let Some(instrument) = deno_core::_ops::try_unwrap_cppgc_object::( + &mut *scope, + instrument, + ) else { + return; + }; + let values = state.try_take::(); + let mut attributes = values + .map(|mut attr| { + attr.attributes.reserve_exact(3); + attr.attributes + }) + .unwrap_or_else(|| Vec::with_capacity(3)); + let attr1 = attr_raw!(scope, key1, value1); + let attr2 = attr_raw!(scope, key2, value2); + let attr3 = attr_raw!(scope, key3, value3); + if let Some(kv1) = attr1 { + attributes.push(kv1); + } + if let Some(kv2) = attr2 { + attributes.push(kv2); + } + if let Some(kv3) = attr3 { + attributes.push(kv3); + } + if let Instrument::Observable(data_share) = &*instrument { + let mut data = data_share.lock().unwrap(); + data.insert(attributes, value); + } +} + +#[allow(clippy::too_many_arguments)] +#[op2(fast)] +fn op_otel_metric_attribute3<'s>( + scope: &mut v8::HandleScope<'s>, + state: &mut OpState, + #[smi] capacity: u32, + key1: v8::Local<'s, v8::Value>, + value1: v8::Local<'s, v8::Value>, + key2: v8::Local<'s, v8::Value>, + value2: v8::Local<'s, v8::Value>, + key3: v8::Local<'s, v8::Value>, + value3: v8::Local<'s, v8::Value>, +) { + let mut values = state.try_borrow_mut::(); + let attr1 = attr_raw!(scope, key1, value1); + let attr2 = attr_raw!(scope, key2, value2); + let attr3 = attr_raw!(scope, key3, value3); + if let Some(values) = &mut values { + values.attributes.reserve_exact( + (capacity as usize).saturating_sub(values.attributes.capacity()), + ); + if let Some(kv1) = attr1 { + values.attributes.push(kv1); + } + if let Some(kv2) = attr2 { + values.attributes.push(kv2); + } + if let Some(kv3) = attr3 { + values.attributes.push(kv3); + } + } else { + let mut attributes = Vec::with_capacity(capacity as usize); + if let Some(kv1) = attr1 { + attributes.push(kv1); + } + if let Some(kv2) = attr2 { + attributes.push(kv2); + } + if let Some(kv3) = attr3 { + attributes.push(kv3); + } + state.put(MetricAttributes { attributes }); + } +} + +struct ObservationDone(oneshot::Sender<()>); + +#[op2(async)] +async fn op_otel_metric_wait_to_observe(state: Rc>) -> bool { + let (tx, rx) = oneshot::channel(); + { + OTEL_PRE_COLLECT_CALLBACKS + .lock() + .expect("mutex poisoned") + .push(tx); + } + if let Ok(done) = rx.await { + state.borrow_mut().put(ObservationDone(done)); + true + } else { + false + } +} + +#[op2(fast)] +fn op_otel_metric_observation_done(state: &mut OpState) { + if let Some(ObservationDone(done)) = state.try_take::() { + let _ = done.send(()); + } +} diff --git a/ext/telemetry/telemetry.ts b/ext/telemetry/telemetry.ts new file mode 100644 index 00000000000000..31e052c28b8429 --- /dev/null +++ b/ext/telemetry/telemetry.ts @@ -0,0 +1,1254 @@ +// Copyright 2018-2025 the Deno authors. MIT license. + +import { core, primordials } from "ext:core/mod.js"; +import { + op_crypto_get_random_values, + op_otel_instrumentation_scope_create_and_enter, + op_otel_instrumentation_scope_enter, + op_otel_instrumentation_scope_enter_builtin, + op_otel_log, + op_otel_metric_attribute3, + op_otel_metric_create_counter, + op_otel_metric_create_gauge, + op_otel_metric_create_histogram, + op_otel_metric_create_observable_counter, + op_otel_metric_create_observable_gauge, + op_otel_metric_create_observable_up_down_counter, + op_otel_metric_create_up_down_counter, + op_otel_metric_observable_record0, + op_otel_metric_observable_record1, + op_otel_metric_observable_record2, + op_otel_metric_observable_record3, + op_otel_metric_observation_done, + op_otel_metric_record0, + op_otel_metric_record1, + op_otel_metric_record2, + op_otel_metric_record3, + op_otel_metric_wait_to_observe, + op_otel_span_attribute, + op_otel_span_attribute2, + op_otel_span_attribute3, + op_otel_span_continue, + op_otel_span_flush, + op_otel_span_set_dropped, + op_otel_span_start, +} from "ext:core/ops"; +import { Console } from "ext:deno_console/01_console.js"; +import { performance } from "ext:deno_web/15_performance.js"; + +const { + Array, + ArrayPrototypePush, + Error, + ObjectAssign, + ObjectDefineProperty, + ObjectEntries, + ObjectPrototypeIsPrototypeOf, + ReflectApply, + SafeIterator, + SafeMap, + SafePromiseAll, + SafeSet, + SafeWeakMap, + SafeWeakRef, + SafeWeakSet, + String, + StringPrototypePadStart, + SymbolFor, + TypedArrayPrototypeSubarray, + Uint8Array, + WeakRefPrototypeDeref, +} = primordials; +const { AsyncVariable, setAsyncContext } = core; + +export let TRACING_ENABLED = false; +export let METRICS_ENABLED = false; +let DETERMINISTIC = false; + +// Note: These start at 0 in the JS library, +// but start at 1 when serialized with JSON. +enum SpanKind { + INTERNAL = 0, + SERVER = 1, + CLIENT = 2, + PRODUCER = 3, + CONSUMER = 4, +} + +interface TraceState { + set(key: string, value: string): TraceState; + unset(key: string): TraceState; + get(key: string): string | undefined; + serialize(): string; +} + +interface SpanContext { + traceId: string; + spanId: string; + isRemote?: boolean; + traceFlags: number; + traceState?: TraceState; +} + +type HrTime = [number, number]; + +enum SpanStatusCode { + UNSET = 0, + OK = 1, + ERROR = 2, +} + +interface SpanStatus { + code: SpanStatusCode; + message?: string; +} + +export type AttributeValue = + | string + | number + | boolean + | Array + | Array + | Array; + +interface Attributes { + [attributeKey: string]: AttributeValue | undefined; +} + +type SpanAttributes = Attributes; + +interface SpanOptions { + attributes?: Attributes; + kind?: SpanKind; +} + +interface Link { + context: SpanContext; + attributes?: SpanAttributes; + droppedAttributesCount?: number; +} + +interface TimedEvent { + time: HrTime; + name: string; + attributes?: SpanAttributes; + droppedAttributesCount?: number; +} + +interface IArrayValue { + values: IAnyValue[]; +} + +interface IAnyValue { + stringValue?: string | null; + boolValue?: boolean | null; + intValue?: number | null; + doubleValue?: number | null; + arrayValue?: IArrayValue; + kvlistValue?: IKeyValueList; + bytesValue?: Uint8Array; +} + +interface IKeyValueList { + values: IKeyValue[]; +} + +interface IKeyValue { + key: string; + value: IAnyValue; +} +interface IResource { + attributes: IKeyValue[]; + droppedAttributesCount: number; +} + +interface InstrumentationLibrary { + readonly name: string; + readonly version?: string; + readonly schemaUrl?: string; +} + +interface ReadableSpan { + readonly name: string; + readonly kind: SpanKind; + readonly spanContext: () => SpanContext; + readonly parentSpanId?: string; + readonly startTime: HrTime; + readonly endTime: HrTime; + readonly status: SpanStatus; + readonly attributes: SpanAttributes; + readonly links: Link[]; + readonly events: TimedEvent[]; + readonly duration: HrTime; + readonly ended: boolean; + readonly resource: IResource; + readonly instrumentationLibrary: InstrumentationLibrary; + readonly droppedAttributesCount: number; + readonly droppedEventsCount: number; + readonly droppedLinksCount: number; +} + +enum ExportResultCode { + SUCCESS = 0, + FAILED = 1, +} + +interface ExportResult { + code: ExportResultCode; + error?: Error; +} + +function hrToSecs(hr: [number, number]): number { + return ((hr[0] * 1e3 + hr[1] / 1e6) / 1000); +} + +const TRACE_FLAG_SAMPLED = 1 << 0; + +const instrumentationScopes = new SafeWeakMap< + InstrumentationLibrary, + { __key: "instrumentation-library" } +>(); +let activeInstrumentationLibrary: WeakRef | null = null; + +function activateInstrumentationLibrary( + instrumentationLibrary: InstrumentationLibrary, +) { + if ( + !activeInstrumentationLibrary || + WeakRefPrototypeDeref(activeInstrumentationLibrary) !== + instrumentationLibrary + ) { + activeInstrumentationLibrary = new SafeWeakRef(instrumentationLibrary); + if (instrumentationLibrary === BUILTIN_INSTRUMENTATION_LIBRARY) { + op_otel_instrumentation_scope_enter_builtin(); + } else { + let instrumentationScope = instrumentationScopes + .get(instrumentationLibrary); + + if (instrumentationScope === undefined) { + instrumentationScope = op_otel_instrumentation_scope_create_and_enter( + instrumentationLibrary.name, + instrumentationLibrary.version, + instrumentationLibrary.schemaUrl, + ) as { __key: "instrumentation-library" }; + instrumentationScopes.set( + instrumentationLibrary, + instrumentationScope, + ); + } else { + op_otel_instrumentation_scope_enter( + instrumentationScope, + ); + } + } + } +} + +function submitSpan( + spanId: string | Uint8Array, + traceId: string | Uint8Array, + traceFlags: number, + parentSpanId: string | Uint8Array | null, + span: Omit< + ReadableSpan, + | "spanContext" + | "startTime" + | "endTime" + | "parentSpanId" + | "duration" + | "ended" + | "resource" + >, + startTime: number, + endTime: number, +) { + if (!TRACING_ENABLED) return; + if (!(traceFlags & TRACE_FLAG_SAMPLED)) return; + + // TODO(@lucacasonato): `resource` is ignored for now, should we implement it? + + activateInstrumentationLibrary(span.instrumentationLibrary); + + op_otel_span_start( + traceId, + spanId, + parentSpanId, + span.kind, + span.name, + startTime, + endTime, + ); + + const status = span.status; + if (status !== null && status.code !== 0) { + op_otel_span_continue(status.code, status.message ?? ""); + } + + const attributeKvs = ObjectEntries(span.attributes); + let i = 0; + while (i < attributeKvs.length) { + if (i + 2 < attributeKvs.length) { + op_otel_span_attribute3( + attributeKvs.length, + attributeKvs[i][0], + attributeKvs[i][1], + attributeKvs[i + 1][0], + attributeKvs[i + 1][1], + attributeKvs[i + 2][0], + attributeKvs[i + 2][1], + ); + i += 3; + } else if (i + 1 < attributeKvs.length) { + op_otel_span_attribute2( + attributeKvs.length, + attributeKvs[i][0], + attributeKvs[i][1], + attributeKvs[i + 1][0], + attributeKvs[i + 1][1], + ); + i += 2; + } else { + op_otel_span_attribute( + attributeKvs.length, + attributeKvs[i][0], + attributeKvs[i][1], + ); + i += 1; + } + } + + // TODO(@lucacasonato): implement links + // TODO(@lucacasonato): implement events + + const droppedAttributesCount = span.droppedAttributesCount; + const droppedLinksCount = span.droppedLinksCount + span.links.length; + const droppedEventsCount = span.droppedEventsCount + span.events.length; + if ( + droppedAttributesCount > 0 || droppedLinksCount > 0 || + droppedEventsCount > 0 + ) { + op_otel_span_set_dropped( + droppedAttributesCount, + droppedLinksCount, + droppedEventsCount, + ); + } + + op_otel_span_flush(); +} + +const now = () => (performance.timeOrigin + performance.now()) / 1000; + +const SPAN_ID_BYTES = 8; +const TRACE_ID_BYTES = 16; + +const INVALID_TRACE_ID = new Uint8Array(TRACE_ID_BYTES); +const INVALID_SPAN_ID = new Uint8Array(SPAN_ID_BYTES); + +const NO_ASYNC_CONTEXT = {}; + +let otelLog: (message: string, level: number) => void; + +const hexSliceLookupTable = (function () { + const alphabet = "0123456789abcdef"; + const table = new Array(256); + for (let i = 0; i < 16; ++i) { + const i16 = i * 16; + for (let j = 0; j < 16; ++j) { + table[i16 + j] = alphabet[i] + alphabet[j]; + } + } + return table; +})(); + +function bytesToHex(bytes: Uint8Array): string { + let out = ""; + for (let i = 0; i < bytes.length; i += 1) { + out += hexSliceLookupTable[bytes[i]]; + } + return out; +} + +const SPAN_KEY = SymbolFor("OpenTelemetry Context Key SPAN"); + +const BUILTIN_INSTRUMENTATION_LIBRARY: InstrumentationLibrary = {} as never; + +let COUNTER = 1; + +export let enterSpan: (span: Span) => void; +export let exitSpan: (span: Span) => void; +export let endSpan: (span: Span) => void; + +export class Span { + #traceId: string | Uint8Array; + #spanId: string | Uint8Array; + #traceFlags = TRACE_FLAG_SAMPLED; + + #spanContext: SpanContext | null = null; + + #parentSpanId: string | Uint8Array | null = null; + #parentSpanIdString: string | null = null; + + #recording = TRACING_ENABLED; + + #kind: number = SpanKind.INTERNAL; + #name: string; + #startTime: number; + #status: { code: number; message?: string } | null = null; + #attributes: Attributes = { __proto__: null } as never; + + #droppedEventsCount = 0; + #droppedLinksCount = 0; + + #asyncContext = NO_ASYNC_CONTEXT; + + static { + otelLog = function otelLog(message, level) { + let traceId = null; + let spanId = null; + let traceFlags = 0; + const span = CURRENT.get()?.getValue(SPAN_KEY); + if (span) { + // The lint is wrong, we can not use anything but `in` here because this + // is a private field. + // deno-lint-ignore prefer-primordials + if (#traceId in span) { + traceId = span.#traceId; + spanId = span.#spanId; + traceFlags = span.#traceFlags; + } else { + const context = span.spanContext(); + traceId = context.traceId; + spanId = context.spanId; + traceFlags = context.traceFlags; + } + } + return op_otel_log(message, level, traceId, spanId, traceFlags); + }; + + enterSpan = (span: Span) => { + if (!span.#recording) return; + const context = (CURRENT.get() || ROOT_CONTEXT).setValue(SPAN_KEY, span); + span.#asyncContext = CURRENT.enter(context); + }; + + exitSpan = (span: Span) => { + if (!span.#recording) return; + if (span.#asyncContext === NO_ASYNC_CONTEXT) return; + setAsyncContext(span.#asyncContext); + span.#asyncContext = NO_ASYNC_CONTEXT; + }; + + endSpan = (span: Span) => { + const endTime = now(); + submitSpan( + span.#spanId, + span.#traceId, + span.#traceFlags, + span.#parentSpanId, + { + name: span.#name, + kind: span.#kind, + status: span.#status ?? { code: 0 }, + attributes: span.#attributes, + events: [], + links: [], + droppedAttributesCount: 0, + droppedEventsCount: span.#droppedEventsCount, + droppedLinksCount: span.#droppedLinksCount, + instrumentationLibrary: BUILTIN_INSTRUMENTATION_LIBRARY, + }, + span.#startTime, + endTime, + ); + }; + } + + constructor( + name: string, + options?: SpanOptions, + ) { + if (!this.isRecording) { + this.#name = ""; + this.#startTime = 0; + this.#traceId = INVALID_TRACE_ID; + this.#spanId = INVALID_SPAN_ID; + this.#traceFlags = 0; + return; + } + + this.#name = name; + this.#startTime = now(); + this.#attributes = options?.attributes ?? { __proto__: null } as never; + this.#kind = options?.kind ?? SpanKind.INTERNAL; + + const currentSpan: Span | { + spanContext(): { traceId: string; spanId: string }; + } = CURRENT.get()?.getValue(SPAN_KEY); + if (currentSpan) { + if (DETERMINISTIC) { + this.#spanId = StringPrototypePadStart(String(COUNTER++), 16, "0"); + } else { + this.#spanId = new Uint8Array(SPAN_ID_BYTES); + op_crypto_get_random_values(this.#spanId); + } + // deno-lint-ignore prefer-primordials + if (#traceId in currentSpan) { + this.#traceId = currentSpan.#traceId; + this.#parentSpanId = currentSpan.#spanId; + } else { + const context = currentSpan.spanContext(); + this.#traceId = context.traceId; + this.#parentSpanId = context.spanId; + } + } else { + if (DETERMINISTIC) { + this.#traceId = StringPrototypePadStart(String(COUNTER++), 32, "0"); + this.#spanId = StringPrototypePadStart(String(COUNTER++), 16, "0"); + } else { + const buffer = new Uint8Array(TRACE_ID_BYTES + SPAN_ID_BYTES); + op_crypto_get_random_values(buffer); + this.#traceId = TypedArrayPrototypeSubarray(buffer, 0, TRACE_ID_BYTES); + this.#spanId = TypedArrayPrototypeSubarray(buffer, TRACE_ID_BYTES); + } + } + } + + spanContext() { + if (!this.#spanContext) { + this.#spanContext = { + traceId: typeof this.#traceId === "string" + ? this.#traceId + : bytesToHex(this.#traceId), + spanId: typeof this.#spanId === "string" + ? this.#spanId + : bytesToHex(this.#spanId), + traceFlags: this.#traceFlags, + }; + } + return this.#spanContext; + } + + get parentSpanId() { + if (!this.#parentSpanIdString && this.#parentSpanId) { + if (typeof this.#parentSpanId === "string") { + this.#parentSpanIdString = this.#parentSpanId; + } else { + this.#parentSpanIdString = bytesToHex(this.#parentSpanId); + } + } + return this.#parentSpanIdString; + } + + setAttribute(name: string, value: AttributeValue) { + if (this.#recording) this.#attributes[name] = value; + return this; + } + + setAttributes(attributes: Attributes) { + if (this.#recording) ObjectAssign(this.#attributes, attributes); + return this; + } + + setStatus(status: { code: number; message?: string }) { + if (this.#recording) { + if (status.code === 0) { + this.#status = null; + } else if (status.code > 2) { + throw new Error("Invalid status code"); + } else { + this.#status = status; + } + } + return this; + } + + updateName(name: string) { + if (this.#recording) this.#name = name; + return this; + } + + addEvent(_name: never) { + // TODO(@lucacasonato): implement events + if (this.#recording) this.#droppedEventsCount += 1; + return this; + } + + addLink(_link: never) { + // TODO(@lucacasonato): implement links + if (this.#recording) this.#droppedLinksCount += 1; + return this; + } + + addLinks(links: never[]) { + // TODO(@lucacasonato): implement links + if (this.#recording) this.#droppedLinksCount += links.length; + return this; + } + + isRecording() { + return this.#recording; + } +} + +// Exporter compatible with opentelemetry js library +class SpanExporter { + export( + spans: ReadableSpan[], + resultCallback: (result: ExportResult) => void, + ) { + try { + for (let i = 0; i < spans.length; i += 1) { + const span = spans[i]; + const context = span.spanContext(); + submitSpan( + context.spanId, + context.traceId, + context.traceFlags, + span.parentSpanId ?? null, + span, + hrToSecs(span.startTime), + hrToSecs(span.endTime), + ); + } + resultCallback({ code: 0 }); + } catch (error) { + resultCallback({ + code: 1, + error: ObjectPrototypeIsPrototypeOf(error, Error) + ? error as Error + : new Error(String(error)), + }); + } + } + + async shutdown() {} + + async forceFlush() {} +} + +const CURRENT = new AsyncVariable(); + +class Context { + #data: Record = { __proto__: null }; + + constructor(data?: Record | null | undefined) { + this.#data = { __proto__: null, ...data }; + } + + getValue(key: symbol): unknown { + return this.#data[key]; + } + + setValue(key: symbol, value: unknown): Context { + const c = new Context(this.#data); + c.#data[key] = value; + return c; + } + + deleteValue(key: symbol): Context { + const c = new Context(this.#data); + delete c.#data[key]; + return c; + } +} + +// TODO(lucacasonato): @opentelemetry/api defines it's own ROOT_CONTEXT +const ROOT_CONTEXT = new Context(); + +// Context manager for opentelemetry js library +class ContextManager { + active(): Context { + return CURRENT.get() ?? ROOT_CONTEXT; + } + + with ReturnType>( + context: Context, + fn: F, + thisArg?: ThisParameterType, + ...args: A + ): ReturnType { + const ctx = CURRENT.enter(context); + try { + return ReflectApply(fn, thisArg, args); + } finally { + setAsyncContext(ctx); + } + } + + // deno-lint-ignore no-explicit-any + bind any>( + context: Context, + target: T, + ): T { + return ((...args) => { + const ctx = CURRENT.enter(context); + try { + return ReflectApply(target, this, args); + } finally { + setAsyncContext(ctx); + } + }) as T; + } + + enable() { + return this; + } + + disable() { + return this; + } +} + +// metrics + +interface MeterOptions { + schemaUrl?: string; +} + +interface MetricOptions { + description?: string; + + unit?: string; + + valueType?: ValueType; + + advice?: MetricAdvice; +} + +enum ValueType { + INT = 0, + DOUBLE = 1, +} + +interface MetricAdvice { + /** + * Hint the explicit bucket boundaries for SDK if the metric is been + * aggregated with a HistogramAggregator. + */ + explicitBucketBoundaries?: number[]; +} + +export class MeterProvider { + getMeter(name: string, version?: string, options?: MeterOptions): Meter { + return new Meter({ name, version, schemaUrl: options?.schemaUrl }); + } +} + +type MetricAttributes = Attributes; + +type Instrument = { __key: "instrument" }; + +let batchResultHasObservables: ( + res: BatchObservableResult, + observables: Observable[], +) => boolean; + +class BatchObservableResult { + #observables: WeakSet; + + constructor(observables: WeakSet) { + this.#observables = observables; + } + + static { + batchResultHasObservables = (cb, observables) => { + for (const observable of new SafeIterator(observables)) { + if (!cb.#observables.has(observable)) return false; + } + return true; + }; + } + + observe( + metric: Observable, + value: number, + attributes?: MetricAttributes, + ): void { + if (!this.#observables.has(metric)) return; + getObservableResult(metric).observe(value, attributes); + } +} + +const BATCH_CALLBACKS = new SafeMap< + BatchObservableCallback, + BatchObservableResult +>(); +const INDIVIDUAL_CALLBACKS = new SafeMap>(); + +class Meter { + #instrumentationLibrary: InstrumentationLibrary; + + constructor(instrumentationLibrary: InstrumentationLibrary) { + this.#instrumentationLibrary = instrumentationLibrary; + } + + createCounter( + name: string, + options?: MetricOptions, + ): Counter { + if (options?.valueType !== undefined && options?.valueType !== 1) { + throw new Error("Only valueType: DOUBLE is supported"); + } + if (!METRICS_ENABLED) return new Counter(null, false); + activateInstrumentationLibrary(this.#instrumentationLibrary); + const instrument = op_otel_metric_create_counter( + name, + // deno-lint-ignore prefer-primordials + options?.description, + options?.unit, + ) as Instrument; + return new Counter(instrument, false); + } + + createUpDownCounter( + name: string, + options?: MetricOptions, + ): Counter { + if (options?.valueType !== undefined && options?.valueType !== 1) { + throw new Error("Only valueType: DOUBLE is supported"); + } + if (!METRICS_ENABLED) return new Counter(null, true); + activateInstrumentationLibrary(this.#instrumentationLibrary); + const instrument = op_otel_metric_create_up_down_counter( + name, + // deno-lint-ignore prefer-primordials + options?.description, + options?.unit, + ) as Instrument; + return new Counter(instrument, true); + } + + createGauge( + name: string, + options?: MetricOptions, + ): Gauge { + if (options?.valueType !== undefined && options?.valueType !== 1) { + throw new Error("Only valueType: DOUBLE is supported"); + } + if (!METRICS_ENABLED) return new Gauge(null); + activateInstrumentationLibrary(this.#instrumentationLibrary); + const instrument = op_otel_metric_create_gauge( + name, + // deno-lint-ignore prefer-primordials + options?.description, + options?.unit, + ) as Instrument; + return new Gauge(instrument); + } + + createHistogram( + name: string, + options?: MetricOptions, + ): Histogram { + if (options?.valueType !== undefined && options?.valueType !== 1) { + throw new Error("Only valueType: DOUBLE is supported"); + } + if (!METRICS_ENABLED) return new Histogram(null); + activateInstrumentationLibrary(this.#instrumentationLibrary); + const instrument = op_otel_metric_create_histogram( + name, + // deno-lint-ignore prefer-primordials + options?.description, + options?.unit, + options?.advice?.explicitBucketBoundaries, + ) as Instrument; + return new Histogram(instrument); + } + + createObservableCounter( + name: string, + options?: MetricOptions, + ): Observable { + if (options?.valueType !== undefined && options?.valueType !== 1) { + throw new Error("Only valueType: DOUBLE is supported"); + } + if (!METRICS_ENABLED) new Observable(new ObservableResult(null, true)); + activateInstrumentationLibrary(this.#instrumentationLibrary); + const instrument = op_otel_metric_create_observable_counter( + name, + // deno-lint-ignore prefer-primordials + options?.description, + options?.unit, + ) as Instrument; + return new Observable(new ObservableResult(instrument, true)); + } + + createObservableGauge( + name: string, + options?: MetricOptions, + ): Observable { + if (options?.valueType !== undefined && options?.valueType !== 1) { + throw new Error("Only valueType: DOUBLE is supported"); + } + if (!METRICS_ENABLED) new Observable(new ObservableResult(null, false)); + activateInstrumentationLibrary(this.#instrumentationLibrary); + const instrument = op_otel_metric_create_observable_gauge( + name, + // deno-lint-ignore prefer-primordials + options?.description, + options?.unit, + ) as Instrument; + return new Observable(new ObservableResult(instrument, false)); + } + + createObservableUpDownCounter( + name: string, + options?: MetricOptions, + ): Observable { + if (options?.valueType !== undefined && options?.valueType !== 1) { + throw new Error("Only valueType: DOUBLE is supported"); + } + if (!METRICS_ENABLED) new Observable(new ObservableResult(null, false)); + activateInstrumentationLibrary(this.#instrumentationLibrary); + const instrument = op_otel_metric_create_observable_up_down_counter( + name, + // deno-lint-ignore prefer-primordials + options?.description, + options?.unit, + ) as Instrument; + return new Observable(new ObservableResult(instrument, false)); + } + + addBatchObservableCallback( + callback: BatchObservableCallback, + observables: Observable[], + ): void { + if (!METRICS_ENABLED) return; + const result = new BatchObservableResult(new SafeWeakSet(observables)); + startObserving(); + BATCH_CALLBACKS.set(callback, result); + } + + removeBatchObservableCallback( + callback: BatchObservableCallback, + observables: Observable[], + ): void { + if (!METRICS_ENABLED) return; + const result = BATCH_CALLBACKS.get(callback); + if (result && batchResultHasObservables(result, observables)) { + BATCH_CALLBACKS.delete(callback); + } + } +} + +type BatchObservableCallback = ( + observableResult: BatchObservableResult, +) => void | Promise; + +function record( + instrument: Instrument | null, + value: number, + attributes?: MetricAttributes, +) { + if (instrument === null) return; + if (attributes === undefined) { + op_otel_metric_record0(instrument, value); + } else { + const attrs = ObjectEntries(attributes); + if (attrs.length === 0) { + op_otel_metric_record0(instrument, value); + } + let i = 0; + while (i < attrs.length) { + const remaining = attrs.length - i; + if (remaining > 3) { + op_otel_metric_attribute3( + instrument, + value, + attrs[i][0], + attrs[i][1], + attrs[i + 1][0], + attrs[i + 1][1], + attrs[i + 2][0], + attrs[i + 2][1], + ); + i += 3; + } else if (remaining === 3) { + op_otel_metric_record3( + instrument, + value, + attrs[i][0], + attrs[i][1], + attrs[i + 1][0], + attrs[i + 1][1], + attrs[i + 2][0], + attrs[i + 2][1], + ); + i += 3; + } else if (remaining === 2) { + op_otel_metric_record2( + instrument, + value, + attrs[i][0], + attrs[i][1], + attrs[i + 1][0], + attrs[i + 1][1], + ); + i += 2; + } else if (remaining === 1) { + op_otel_metric_record1( + instrument, + value, + attrs[i][0], + attrs[i][1], + ); + i += 1; + } + } + } +} + +function recordObservable( + instrument: Instrument | null, + value: number, + attributes?: MetricAttributes, +) { + if (instrument === null) return; + if (attributes === undefined) { + op_otel_metric_observable_record0(instrument, value); + } else { + const attrs = ObjectEntries(attributes); + if (attrs.length === 0) { + op_otel_metric_observable_record0(instrument, value); + } + let i = 0; + while (i < attrs.length) { + const remaining = attrs.length - i; + if (remaining > 3) { + op_otel_metric_attribute3( + instrument, + value, + attrs[i][0], + attrs[i][1], + attrs[i + 1][0], + attrs[i + 1][1], + attrs[i + 2][0], + attrs[i + 2][1], + ); + i += 3; + } else if (remaining === 3) { + op_otel_metric_observable_record3( + instrument, + value, + attrs[i][0], + attrs[i][1], + attrs[i + 1][0], + attrs[i + 1][1], + attrs[i + 2][0], + attrs[i + 2][1], + ); + i += 3; + } else if (remaining === 2) { + op_otel_metric_observable_record2( + instrument, + value, + attrs[i][0], + attrs[i][1], + attrs[i + 1][0], + attrs[i + 1][1], + ); + i += 2; + } else if (remaining === 1) { + op_otel_metric_observable_record1( + instrument, + value, + attrs[i][0], + attrs[i][1], + ); + i += 1; + } + } + } +} + +class Counter { + #instrument: Instrument | null; + #upDown: boolean; + + constructor(instrument: Instrument | null, upDown: boolean) { + this.#instrument = instrument; + this.#upDown = upDown; + } + + add(value: number, attributes?: MetricAttributes, _context?: Context): void { + if (value < 0 && !this.#upDown) { + throw new Error("Counter can only be incremented"); + } + record(this.#instrument, value, attributes); + } +} + +class Gauge { + #instrument: Instrument | null; + + constructor(instrument: Instrument | null) { + this.#instrument = instrument; + } + + record( + value: number, + attributes?: MetricAttributes, + _context?: Context, + ): void { + record(this.#instrument, value, attributes); + } +} + +class Histogram { + #instrument: Instrument | null; + + constructor(instrument: Instrument | null) { + this.#instrument = instrument; + } + + record( + value: number, + attributes?: MetricAttributes, + _context?: Context, + ): void { + record(this.#instrument, value, attributes); + } +} + +type ObservableCallback = ( + observableResult: ObservableResult, +) => void | Promise; + +let getObservableResult: (observable: Observable) => ObservableResult; + +class Observable { + #result: ObservableResult; + + constructor(result: ObservableResult) { + this.#result = result; + } + + static { + getObservableResult = (observable) => observable.#result; + } + + addCallback(callback: ObservableCallback): void { + const res = INDIVIDUAL_CALLBACKS.get(this); + if (res) res.add(callback); + else INDIVIDUAL_CALLBACKS.set(this, new SafeSet([callback])); + startObserving(); + } + + removeCallback(callback: ObservableCallback): void { + const res = INDIVIDUAL_CALLBACKS.get(this); + if (res) res.delete(callback); + if (res?.size === 0) INDIVIDUAL_CALLBACKS.delete(this); + } +} + +class ObservableResult { + #instrument: Instrument | null; + #isRegularCounter: boolean; + + constructor(instrument: Instrument | null, isRegularCounter: boolean) { + this.#instrument = instrument; + this.#isRegularCounter = isRegularCounter; + } + + observe( + this: ObservableResult, + value: number, + attributes?: MetricAttributes, + ): void { + if (this.#isRegularCounter) { + if (value < 0) { + throw new Error("Observable counters can only be incremented"); + } + } + recordObservable(this.#instrument, value, attributes); + } +} + +async function observe(): Promise { + const promises: Promise[] = []; + // Primordials are not needed, because this is a SafeMap. + // deno-lint-ignore prefer-primordials + for (const { 0: observable, 1: callbacks } of INDIVIDUAL_CALLBACKS) { + const result = getObservableResult(observable); + // Primordials are not needed, because this is a SafeSet. + // deno-lint-ignore prefer-primordials + for (const callback of callbacks) { + // PromiseTry is not in primordials? + // deno-lint-ignore prefer-primordials + ArrayPrototypePush(promises, Promise.try(callback, result)); + } + } + // Primordials are not needed, because this is a SafeMap. + // deno-lint-ignore prefer-primordials + for (const { 0: callback, 1: result } of BATCH_CALLBACKS) { + // PromiseTry is not in primordials? + // deno-lint-ignore prefer-primordials + ArrayPrototypePush(promises, Promise.try(callback, result)); + } + await SafePromiseAll(promises); +} + +let isObserving = false; +function startObserving() { + if (!isObserving) { + isObserving = true; + (async () => { + while (true) { + const promise = op_otel_metric_wait_to_observe(); + core.unrefOpPromise(promise); + const ok = await promise; + if (!ok) break; + await observe(); + op_otel_metric_observation_done(); + } + })(); + } +} + +const otelConsoleConfig = { + ignore: 0, + capture: 1, + replace: 2, +}; + +export function bootstrap( + config: [ + 0 | 1, + 0 | 1, + typeof otelConsoleConfig[keyof typeof otelConsoleConfig], + 0 | 1, + ], +): void { + const { + 0: tracingEnabled, + 1: metricsEnabled, + 2: consoleConfig, + 3: deterministic, + } = config; + + TRACING_ENABLED = tracingEnabled === 1; + METRICS_ENABLED = metricsEnabled === 1; + DETERMINISTIC = deterministic === 1; + + switch (consoleConfig) { + case otelConsoleConfig.capture: + core.wrapConsole(globalThis.console, new Console(otelLog)); + break; + case otelConsoleConfig.replace: + ObjectDefineProperty( + globalThis, + "console", + core.propNonEnumerable(new Console(otelLog)), + ); + break; + default: + break; + } +} + +export const telemetry = { + SpanExporter, + ContextManager, + MeterProvider, +}; diff --git a/ext/telemetry/util.ts b/ext/telemetry/util.ts new file mode 100644 index 00000000000000..ac233f7a9fd733 --- /dev/null +++ b/ext/telemetry/util.ts @@ -0,0 +1,27 @@ +// Copyright 2018-2025 the Deno authors. MIT license. + +import { primordials } from "ext:core/mod.js"; +import type { Span } from "ext:deno_telemetry/telemetry.ts"; + +const { String, StringPrototypeSlice } = primordials; + +export function updateSpanFromRequest(span: Span, request: Request) { + span.updateName(request.method); + + span.setAttribute("http.request.method", request.method); + const url = new URL(request.url); + span.setAttribute("url.full", request.url); + span.setAttribute( + "url.scheme", + StringPrototypeSlice(url.protocol, 0, -1), + ); + span.setAttribute("url.path", url.pathname); + span.setAttribute("url.query", StringPrototypeSlice(url.search, 1)); +} + +export function updateSpanFromResponse(span: Span, response: Response) { + span.setAttribute( + "http.response.status_code", + String(response.status), + ); +} diff --git a/ext/tls/Cargo.toml b/ext/tls/Cargo.toml index 943fc8413e8842..53d85ba83cf266 100644 --- a/ext/tls/Cargo.toml +++ b/ext/tls/Cargo.toml @@ -1,8 +1,8 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "deno_tls" -version = "0.164.0" +version = "0.171.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/tls/lib.rs b/ext/tls/lib.rs index 883d2995e4b913..63e78e3f834241 100644 --- a/ext/tls/lib.rs +++ b/ext/tls/lib.rs @@ -1,31 +1,31 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. +use std::io::BufRead; +use std::io::BufReader; +use std::io::Cursor; +use std::net::IpAddr; +use std::sync::Arc; + pub use deno_native_certs; pub use rustls; -use rustls::pki_types::CertificateDer; -use rustls::pki_types::PrivateKeyDer; -use rustls::pki_types::ServerName; -pub use rustls_pemfile; -pub use rustls_tokio_stream::*; -pub use webpki; -pub use webpki_roots; - use rustls::client::danger::HandshakeSignatureValid; use rustls::client::danger::ServerCertVerified; use rustls::client::danger::ServerCertVerifier; use rustls::client::WebPkiServerVerifier; +use rustls::pki_types::CertificateDer; +use rustls::pki_types::PrivateKeyDer; +use rustls::pki_types::ServerName; use rustls::ClientConfig; use rustls::DigitallySignedStruct; use rustls::RootCertStore; +pub use rustls_pemfile; use rustls_pemfile::certs; use rustls_pemfile::ec_private_keys; use rustls_pemfile::pkcs8_private_keys; use rustls_pemfile::rsa_private_keys; +pub use rustls_tokio_stream::*; use serde::Deserialize; -use std::io::BufRead; -use std::io::BufReader; -use std::io::Cursor; -use std::net::IpAddr; -use std::sync::Arc; +pub use webpki; +pub use webpki_roots; mod tls_key; pub use tls_key::*; diff --git a/ext/tls/tls_key.rs b/ext/tls/tls_key.rs index b7baa604b9add6..dfd2863e5edbc6 100644 --- a/ext/tls/tls_key.rs +++ b/ext/tls/tls_key.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. //! These represent the various types of TLS keys we support for both client and server //! connections. @@ -11,12 +11,6 @@ //! key lookup can handle closing one end of the pair, in which case they will just //! attempt to clean up the associated resources. -use deno_core::futures::future::poll_fn; -use deno_core::futures::future::Either; -use deno_core::futures::FutureExt; -use deno_core::unsync::spawn; -use rustls::ServerConfig; -use rustls_tokio_stream::ServerConfigProvider; use std::cell::RefCell; use std::collections::HashMap; use std::fmt::Debug; @@ -25,6 +19,13 @@ use std::future::Future; use std::io::ErrorKind; use std::rc::Rc; use std::sync::Arc; + +use deno_core::futures::future::poll_fn; +use deno_core::futures::future::Either; +use deno_core::futures::FutureExt; +use deno_core::unsync::spawn; +use rustls::ServerConfig; +use rustls_tokio_stream::ServerConfigProvider; use tokio::sync::broadcast; use tokio::sync::mpsc; use tokio::sync::oneshot; @@ -269,9 +270,10 @@ impl TlsKeyLookup { #[cfg(test)] pub mod tests { - use super::*; use deno_core::unsync::spawn; + use super::*; + fn tls_key_for_test(sni: &str) -> TlsKey { let manifest_dir = std::path::PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").unwrap()); diff --git a/ext/url/00_url.js b/ext/url/00_url.js index ec875da768d6f9..c853430d1a909a 100644 --- a/ext/url/00_url.js +++ b/ext/url/00_url.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // @ts-check /// diff --git a/ext/url/01_urlpattern.js b/ext/url/01_urlpattern.js index 6e27563089c56e..5febef3332058b 100644 --- a/ext/url/01_urlpattern.js +++ b/ext/url/01_urlpattern.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // @ts-check /// diff --git a/ext/url/Cargo.toml b/ext/url/Cargo.toml index 557a4669e6aa59..4dcb6f42ca2ca1 100644 --- a/ext/url/Cargo.toml +++ b/ext/url/Cargo.toml @@ -1,8 +1,8 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "deno_url" -version = "0.177.0" +version = "0.184.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/url/benches/url_ops.rs b/ext/url/benches/url_ops.rs index 70afb96db2d96b..9295a08d514bd6 100644 --- a/ext/url/benches/url_ops.rs +++ b/ext/url/benches/url_ops.rs @@ -1,10 +1,9 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_bench_util::bench_js_sync; use deno_bench_util::bench_or_profile; use deno_bench_util::bencher::benchmark_group; use deno_bench_util::bencher::Bencher; - use deno_core::Extension; fn setup() -> Vec { diff --git a/ext/url/internal.d.ts b/ext/url/internal.d.ts index 11bacb0e1b06e6..69e0472e8eaf14 100644 --- a/ext/url/internal.d.ts +++ b/ext/url/internal.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /// /// diff --git a/ext/url/lib.deno_url.d.ts b/ext/url/lib.deno_url.d.ts index 946c70607fc0f9..08fe74cd6666c1 100644 --- a/ext/url/lib.deno_url.d.ts +++ b/ext/url/lib.deno_url.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-explicit-any no-var diff --git a/ext/url/lib.rs b/ext/url/lib.rs index f8946532ae613e..0e9ca5839a7218 100644 --- a/ext/url/lib.rs +++ b/ext/url/lib.rs @@ -1,7 +1,9 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. mod urlpattern; +use std::path::PathBuf; + use deno_core::error::type_error; use deno_core::error::AnyError; use deno_core::op2; @@ -10,13 +12,11 @@ use deno_core::url::quirks; use deno_core::url::Url; use deno_core::JsBuffer; use deno_core::OpState; -use std::path::PathBuf; +pub use urlpattern::UrlPatternError; use crate::urlpattern::op_urlpattern_parse; use crate::urlpattern::op_urlpattern_process_match_input; -pub use urlpattern::UrlPatternError; - deno_core::extension!( deno_url, deps = [deno_webidl], diff --git a/ext/url/urlpattern.rs b/ext/url/urlpattern.rs index 7d4e8ee71b06de..88564625dab970 100644 --- a/ext/url/urlpattern.rs +++ b/ext/url/urlpattern.rs @@ -1,7 +1,6 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_core::op2; - use urlpattern::quirks; use urlpattern::quirks::MatchInput; use urlpattern::quirks::StringOrInit; diff --git a/ext/web/00_infra.js b/ext/web/00_infra.js index 4b241ab5d73eb0..8ca42e86c22a64 100644 --- a/ext/web/00_infra.js +++ b/ext/web/00_infra.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // @ts-check /// @@ -271,7 +271,7 @@ function addPaddingToBase64url(base64url) { if (base64url.length % 4 === 2) return base64url + "=="; if (base64url.length % 4 === 3) return base64url + "="; if (base64url.length % 4 === 1) { - throw new TypeError("Illegal base64url string!"); + throw new TypeError("Illegal base64url string"); } return base64url; } @@ -382,7 +382,7 @@ function assert(cond, msg = "Assertion failed.") { function serializeJSValueToJSONString(value) { const result = JSONStringify(value); if (result === undefined) { - throw new TypeError("Value is not JSON serializable."); + throw new TypeError("Value is not JSON serializable"); } return result; } @@ -429,7 +429,7 @@ function pathFromURLWin32(url) { */ function pathFromURLPosix(url) { if (url.hostname !== "") { - throw new TypeError(`Host must be empty.`); + throw new TypeError("Host must be empty"); } return decodeURIComponent( @@ -444,7 +444,7 @@ function pathFromURLPosix(url) { function pathFromURL(pathOrUrl) { if (ObjectPrototypeIsPrototypeOf(URLPrototype, pathOrUrl)) { if (pathOrUrl.protocol != "file:") { - throw new TypeError("Must be a file URL."); + throw new TypeError("Must be a file URL"); } return core.build.os == "windows" diff --git a/ext/web/01_dom_exception.js b/ext/web/01_dom_exception.js index 38e4d088e50dfc..730fda860fcd62 100644 --- a/ext/web/01_dom_exception.js +++ b/ext/web/01_dom_exception.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // @ts-check /// @@ -9,14 +9,15 @@ import { primordials } from "ext:core/mod.js"; const { + Error, ErrorPrototype, - ErrorCaptureStackTrace, ObjectDefineProperty, ObjectCreate, ObjectEntries, ObjectHasOwn, ObjectPrototypeIsPrototypeOf, ObjectSetPrototypeOf, + ReflectConstruct, Symbol, SymbolFor, } = primordials; @@ -107,12 +108,14 @@ class DOMException { ); const code = nameToCodeMapping[name] ?? 0; - this[_message] = message; - this[_name] = name; - this[_code] = code; - this[webidl.brand] = webidl.brand; + // execute Error constructor to have stack property and [[ErrorData]] internal slot + const error = ReflectConstruct(Error, [], new.target); + error[_message] = message; + error[_name] = name; + error[_code] = code; + error[webidl.brand] = webidl.brand; - ErrorCaptureStackTrace(this, DOMException); + return error; } get message() { diff --git a/ext/web/01_mimesniff.js b/ext/web/01_mimesniff.js index e60783bbe171ac..9a687a830562ee 100644 --- a/ext/web/01_mimesniff.js +++ b/ext/web/01_mimesniff.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // @ts-check /// diff --git a/ext/web/02_event.js b/ext/web/02_event.js index a3e40ab9966a34..810e48537d168e 100644 --- a/ext/web/02_event.js +++ b/ext/web/02_event.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // This module follows most of the WHATWG Living Standard for the DOM logic. // Many parts of the DOM are not implemented in Deno, but the logic for those @@ -1031,11 +1031,11 @@ class EventTarget { } if (getDispatched(event)) { - throw new DOMException("Invalid event state.", "InvalidStateError"); + throw new DOMException("Invalid event state", "InvalidStateError"); } if (event.eventPhase !== Event.NONE) { - throw new DOMException("Invalid event state.", "InvalidStateError"); + throw new DOMException("Invalid event state", "InvalidStateError"); } return dispatch(self, event); diff --git a/ext/web/02_structured_clone.js b/ext/web/02_structured_clone.js index 776a8ee96e79a4..453700fc418f3d 100644 --- a/ext/web/02_structured_clone.js +++ b/ext/web/02_structured_clone.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // @ts-check /// diff --git a/ext/web/02_timers.js b/ext/web/02_timers.js index 6058febd597537..c74f9baff96633 100644 --- a/ext/web/02_timers.js +++ b/ext/web/02_timers.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { core, primordials } from "ext:core/mod.js"; import { op_defer } from "ext:core/ops"; diff --git a/ext/web/03_abort_signal.js b/ext/web/03_abort_signal.js index ae0701451b5413..1f9ce42e1e894d 100644 --- a/ext/web/03_abort_signal.js +++ b/ext/web/03_abort_signal.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // @ts-check /// @@ -196,7 +196,7 @@ class AbortSignal extends EventTarget { constructor(key = null) { if (key !== illegalConstructorKey) { - throw new TypeError("Illegal constructor."); + throw new TypeError("Illegal constructor"); } super(); } diff --git a/ext/web/04_global_interfaces.js b/ext/web/04_global_interfaces.js index 8483a7b238f1c7..bda695b5304305 100644 --- a/ext/web/04_global_interfaces.js +++ b/ext/web/04_global_interfaces.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // @ts-check /// @@ -16,7 +16,7 @@ const illegalConstructorKey = Symbol("illegalConstructorKey"); class Window extends EventTarget { constructor(key = null) { if (key !== illegalConstructorKey) { - throw new TypeError("Illegal constructor."); + throw new TypeError("Illegal constructor"); } super(); } @@ -29,7 +29,7 @@ class Window extends EventTarget { class WorkerGlobalScope extends EventTarget { constructor(key = null) { if (key != illegalConstructorKey) { - throw new TypeError("Illegal constructor."); + throw new TypeError("Illegal constructor"); } super(); } @@ -42,7 +42,7 @@ class WorkerGlobalScope extends EventTarget { class DedicatedWorkerGlobalScope extends WorkerGlobalScope { constructor(key = null) { if (key != illegalConstructorKey) { - throw new TypeError("Illegal constructor."); + throw new TypeError("Illegal constructor"); } super(); } diff --git a/ext/web/05_base64.js b/ext/web/05_base64.js index b97846b9048ebb..155201f85367e8 100644 --- a/ext/web/05_base64.js +++ b/ext/web/05_base64.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // @ts-check /// @@ -50,7 +50,7 @@ function btoa(data) { } catch (e) { if (ObjectPrototypeIsPrototypeOf(TypeErrorPrototype, e)) { throw new DOMException( - "The string to be encoded contains characters outside of the Latin1 range.", + "Cannot encode string: string contains characters outside of the Latin1 range", "InvalidCharacterError", ); } diff --git a/ext/web/06_streams.js b/ext/web/06_streams.js index f29e5f204009be..0b9ae538e26682 100644 --- a/ext/web/06_streams.js +++ b/ext/web/06_streams.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // @ts-check /// @@ -523,10 +523,14 @@ function dequeueValue(container) { function enqueueValueWithSize(container, value, size) { assert(container[_queue] && typeof container[_queueTotalSize] === "number"); if (isNonNegativeNumber(size) === false) { - throw new RangeError("chunk size isn't a positive number"); + throw new RangeError( + "Cannot enqueue value with size: chunk size must be a positive number", + ); } if (size === Infinity) { - throw new RangeError("chunk size is invalid"); + throw new RangeError( + "Cannot enqueue value with size: chunk size is invalid", + ); } container[_queue].enqueue({ value, size }); container[_queueTotalSize] += size; @@ -904,8 +908,8 @@ const _original = Symbol("[[original]]"); * @param {boolean=} autoClose If the resource should be auto-closed when the stream closes. Defaults to true. * @returns {ReadableStream} */ -function readableStreamForRid(rid, autoClose = true) { - const stream = new ReadableStream(_brand); +function readableStreamForRid(rid, autoClose = true, Super) { + const stream = new (Super ?? ReadableStream)(_brand); stream[_resourceBacking] = { rid, autoClose }; const tryClose = () => { @@ -1097,7 +1101,7 @@ async function readableStreamCollectIntoUint8Array(stream) { if (TypedArrayPrototypeGetSymbolToStringTag(chunk) !== "Uint8Array") { throw new TypeError( - "Can't convert value to Uint8Array while consuming the stream", + "Cannot convert value to Uint8Array while consuming the stream", ); } @@ -1126,8 +1130,8 @@ async function readableStreamCollectIntoUint8Array(stream) { * @param {boolean=} autoClose If the resource should be auto-closed when the stream closes. Defaults to true. * @returns {ReadableStream} */ -function writableStreamForRid(rid, autoClose = true) { - const stream = new WritableStream(_brand); +function writableStreamForRid(rid, autoClose = true, Super) { + const stream = new (Super ?? WritableStream)(_brand); stream[_resourceBacking] = { rid, autoClose }; const tryClose = () => { @@ -1347,7 +1351,7 @@ function readableByteStreamControllerEnqueue(controller, chunk) { if (isDetachedBuffer(buffer)) { throw new TypeError( - "chunk's buffer is detached and so cannot be enqueued", + "Chunk's buffer is detached and so cannot be enqueued", ); } const transferredBuffer = ArrayBufferPrototypeTransferToFixedLength(buffer); @@ -2095,14 +2099,14 @@ function readableByteStreamControllerRespond(controller, bytesWritten) { if (state === "closed") { if (bytesWritten !== 0) { throw new TypeError( - "bytesWritten must be 0 when calling respond() on a closed stream", + `"bytesWritten" must be 0 when calling respond() on a closed stream: received ${bytesWritten}`, ); } } else { assert(state === "readable"); if (bytesWritten === 0) { throw new TypeError( - "bytesWritten must be greater than 0 when calling respond() on a readable stream", + '"bytesWritten" must be greater than 0 when calling respond() on a readable stream', ); } if ( @@ -2110,7 +2114,7 @@ function readableByteStreamControllerRespond(controller, bytesWritten) { // deno-lint-ignore prefer-primordials firstDescriptor.byteLength ) { - throw new RangeError("bytesWritten out of range"); + throw new RangeError('"bytesWritten" out of range'); } } firstDescriptor.buffer = ArrayBufferPrototypeTransferToFixedLength( @@ -2305,7 +2309,7 @@ function readableByteStreamControllerRespondWithNewView(controller, view) { if (state === "closed") { if (byteLength !== 0) { throw new TypeError( - "The view's length must be 0 when calling respondWithNewView() on a closed stream", + `The view's length must be 0 when calling respondWithNewView() on a closed stream: received ${byteLength}`, ); } } else { @@ -2922,7 +2926,7 @@ function readableStreamPipeTo( } /** - * @param {ReadableStreamGenericReader | ReadableStreamBYOBReader} reader + * @param {ReadableStreamGenericReader | ReadableStreamBYOBReader} reader * @param {any} reason * @returns {Promise} */ @@ -2955,7 +2959,7 @@ function readableStreamReaderGenericInitialize(reader, stream) { /** * @template R - * @param {ReadableStreamGenericReader | ReadableStreamBYOBReader} reader + * @param {ReadableStreamGenericReader | ReadableStreamBYOBReader} reader */ function readableStreamReaderGenericRelease(reader) { const stream = reader[_stream]; @@ -3577,7 +3581,7 @@ function setUpReadableByteStreamControllerFromUnderlyingSource( } const autoAllocateChunkSize = underlyingSourceDict["autoAllocateChunkSize"]; if (autoAllocateChunkSize === 0) { - throw new TypeError("autoAllocateChunkSize must be greater than 0"); + throw new TypeError('"autoAllocateChunkSize" must be greater than 0'); } setUpReadableByteStreamController( stream, @@ -3706,7 +3710,7 @@ function setUpReadableStreamDefaultControllerFromUnderlyingSource( */ function setUpReadableStreamBYOBReader(reader, stream) { if (isReadableStreamLocked(stream)) { - throw new TypeError("ReadableStream is locked."); + throw new TypeError("ReadableStream is locked"); } if ( !(ObjectPrototypeIsPrototypeOf( @@ -3727,7 +3731,7 @@ function setUpReadableStreamBYOBReader(reader, stream) { */ function setUpReadableStreamDefaultReader(reader, stream) { if (isReadableStreamLocked(stream)) { - throw new TypeError("ReadableStream is locked."); + throw new TypeError("ReadableStream is locked"); } readableStreamReaderGenericInitialize(reader, stream); reader[_readRequests] = new Queue(); @@ -3961,7 +3965,7 @@ function setUpWritableStreamDefaultControllerFromUnderlyingSink( */ function setUpWritableStreamDefaultWriter(writer, stream) { if (isWritableStreamLocked(stream) === true) { - throw new TypeError("The stream is already locked."); + throw new TypeError("The stream is already locked"); } writer[_stream] = stream; stream[_writer] = writer; @@ -4019,7 +4023,7 @@ function transformStreamDefaultControllerEnqueue(controller, chunk) { /** @type {ReadableStreamDefaultController} */ readableController, ) === false ) { - throw new TypeError("Readable stream is unavailable."); + throw new TypeError("Readable stream is unavailable"); } try { readableStreamDefaultControllerEnqueue( @@ -5143,7 +5147,7 @@ class ReadableStream { if (underlyingSourceDict.type === "bytes") { if (strategy.size !== undefined) { throw new RangeError( - `${prefix}: When underlying source is "bytes", strategy.size must be undefined.`, + `${prefix}: When underlying source is "bytes", strategy.size must be 'undefined'`, ); } const highWaterMark = extractHighWaterMark(strategy, 0); @@ -5273,10 +5277,10 @@ class ReadableStream { const { readable, writable } = transform; const { preventClose, preventAbort, preventCancel, signal } = options; if (isReadableStreamLocked(this)) { - throw new TypeError("ReadableStream is already locked."); + throw new TypeError("ReadableStream is already locked"); } if (isWritableStreamLocked(writable)) { - throw new TypeError("Target WritableStream is already locked."); + throw new TypeError("Target WritableStream is already locked"); } const promise = readableStreamPipeTo( this, @@ -5814,7 +5818,7 @@ class ReadableByteStreamController { } if (this[_stream][_state] !== "readable") { throw new TypeError( - "ReadableByteStreamController's stream is not in a readable state.", + "ReadableByteStreamController's stream is not in a readable state", ); } readableByteStreamControllerClose(this); @@ -5846,7 +5850,7 @@ class ReadableByteStreamController { if (byteLength === 0) { throw webidl.makeException( TypeError, - "length must be non-zero", + "Length must be non-zero", prefix, arg1, ); @@ -5854,19 +5858,19 @@ class ReadableByteStreamController { if (getArrayBufferByteLength(buffer) === 0) { throw webidl.makeException( TypeError, - "buffer length must be non-zero", + "Buffer length must be non-zero", prefix, arg1, ); } if (this[_closeRequested] === true) { throw new TypeError( - "Cannot enqueue chunk after a close has been requested.", + "Cannot enqueue chunk after a close has been requested", ); } if (this[_stream][_state] !== "readable") { throw new TypeError( - "Cannot enqueue chunk when underlying stream is not readable.", + "Cannot enqueue chunk when underlying stream is not readable", ); } return readableByteStreamControllerEnqueue(this, chunk); @@ -6006,7 +6010,7 @@ class ReadableStreamDefaultController { close() { webidl.assertBranded(this, ReadableStreamDefaultControllerPrototype); if (readableStreamDefaultControllerCanCloseOrEnqueue(this) === false) { - throw new TypeError("The stream controller cannot close or enqueue."); + throw new TypeError("The stream controller cannot close or enqueue"); } readableStreamDefaultControllerClose(this); } @@ -6021,7 +6025,7 @@ class ReadableStreamDefaultController { chunk = webidl.converters.any(chunk); } if (readableStreamDefaultControllerCanCloseOrEnqueue(this) === false) { - throw new TypeError("The stream controller cannot close or enqueue."); + throw new TypeError("The stream controller cannot close or enqueue"); } readableStreamDefaultControllerEnqueue(this, chunk); } @@ -6146,12 +6150,12 @@ class TransformStream { ); if (transformerDict.readableType !== undefined) { throw new RangeError( - `${prefix}: readableType transformers not supported.`, + `${prefix}: readableType transformers not supported`, ); } if (transformerDict.writableType !== undefined) { throw new RangeError( - `${prefix}: writableType transformers not supported.`, + `${prefix}: writableType transformers not supported`, ); } const readableHighWaterMark = extractHighWaterMark(readableStrategy, 0); @@ -6356,7 +6360,7 @@ class WritableStream { ); if (underlyingSinkDict.type != null) { throw new RangeError( - `${prefix}: WritableStream does not support 'type' in the underlying sink.`, + `${prefix}: WritableStream does not support 'type' in the underlying sink`, ); } initializeWritableStream(this); @@ -6483,7 +6487,7 @@ class WritableStreamDefaultWriter { webidl.assertBranded(this, WritableStreamDefaultWriterPrototype); if (this[_stream] === undefined) { throw new TypeError( - "A writable stream is not associated with the writer.", + "A writable stream is not associated with the writer", ); } return writableStreamDefaultWriterGetDesiredSize(this); diff --git a/ext/web/06_streams_types.d.ts b/ext/web/06_streams_types.d.ts index e04f568d26644a..0a6cb6503a24c0 100644 --- a/ext/web/06_streams_types.d.ts +++ b/ext/web/06_streams_types.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // ** Internal Interfaces ** @@ -60,8 +60,8 @@ interface VoidFunction { (): void; } -interface ReadableStreamGenericReader { - readonly closed: Promise; +interface ReadableStreamGenericReader { + readonly closed: Promise; // deno-lint-ignore no-explicit-any cancel(reason?: any): Promise; } diff --git a/ext/web/08_text_encoding.js b/ext/web/08_text_encoding.js index 3163c96282d704..8988c06c361b9a 100644 --- a/ext/web/08_text_encoding.js +++ b/ext/web/08_text_encoding.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // @ts-check /// diff --git a/ext/web/09_file.js b/ext/web/09_file.js index 7c1d79ce315b24..cdad0b73966919 100644 --- a/ext/web/09_file.js +++ b/ext/web/09_file.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // @ts-check /// diff --git a/ext/web/10_filereader.js b/ext/web/10_filereader.js index 05b45202d658f8..cecc6484a600b8 100644 --- a/ext/web/10_filereader.js +++ b/ext/web/10_filereader.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // @ts-check /// @@ -65,7 +65,7 @@ class FileReader extends EventTarget { // 1. If fr's state is "loading", throw an InvalidStateError DOMException. if (this[state] === "loading") { throw new DOMException( - "Invalid FileReader state.", + "Invalid FileReader state", "InvalidStateError", ); } diff --git a/ext/web/12_location.js b/ext/web/12_location.js index 2cda9f719c5a71..cc1afb3d0557d8 100644 --- a/ext/web/12_location.js +++ b/ext/web/12_location.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /// @@ -28,7 +28,7 @@ const locationConstructorKey = Symbol("locationConstructorKey"); class Location { constructor(href = null, key = null) { if (key != locationConstructorKey) { - throw new TypeError("Illegal constructor."); + throw new TypeError("Illegal constructor"); } const url = new URL(href); url.username = ""; @@ -41,7 +41,7 @@ class Location { }, set() { throw new DOMException( - `Cannot set "location.hash".`, + `Cannot set "location.hash"`, "NotSupportedError", ); }, @@ -54,7 +54,7 @@ class Location { }, set() { throw new DOMException( - `Cannot set "location.host".`, + `Cannot set "location.host"`, "NotSupportedError", ); }, @@ -67,7 +67,7 @@ class Location { }, set() { throw new DOMException( - `Cannot set "location.hostname".`, + `Cannot set "location.hostname"`, "NotSupportedError", ); }, @@ -80,7 +80,7 @@ class Location { }, set() { throw new DOMException( - `Cannot set "location.href".`, + `Cannot set "location.href"`, "NotSupportedError", ); }, @@ -100,7 +100,7 @@ class Location { }, set() { throw new DOMException( - `Cannot set "location.pathname".`, + `Cannot set "location.pathname"`, "NotSupportedError", ); }, @@ -113,7 +113,7 @@ class Location { }, set() { throw new DOMException( - `Cannot set "location.port".`, + `Cannot set "location.port"`, "NotSupportedError", ); }, @@ -126,7 +126,7 @@ class Location { }, set() { throw new DOMException( - `Cannot set "location.protocol".`, + `Cannot set "location.protocol"`, "NotSupportedError", ); }, @@ -139,7 +139,7 @@ class Location { }, set() { throw new DOMException( - `Cannot set "location.search".`, + `Cannot set "location.search"`, "NotSupportedError", ); }, @@ -161,7 +161,7 @@ class Location { __proto__: null, value: function assign() { throw new DOMException( - `Cannot call "location.assign()".`, + `Cannot call "location.assign()"`, "NotSupportedError", ); }, @@ -171,7 +171,7 @@ class Location { __proto__: null, value: function reload() { throw new DOMException( - `Cannot call "location.reload()".`, + `Cannot call "location.reload()"`, "NotSupportedError", ); }, @@ -181,7 +181,7 @@ class Location { __proto__: null, value: function replace() { throw new DOMException( - `Cannot call "location.replace()".`, + `Cannot call "location.replace()"`, "NotSupportedError", ); }, @@ -229,7 +229,7 @@ const workerLocationUrls = new SafeWeakMap(); class WorkerLocation { constructor(href = null, key = null) { if (key != locationConstructorKey) { - throw new TypeError("Illegal constructor."); + throw new TypeError("Illegal constructor"); } const url = new URL(href); url.username = ""; @@ -244,7 +244,7 @@ ObjectDefineProperties(WorkerLocation.prototype, { get() { const url = WeakMapPrototypeGet(workerLocationUrls, this); if (url == null) { - throw new TypeError("Illegal invocation."); + throw new TypeError("Illegal invocation"); } return url.hash; }, @@ -256,7 +256,7 @@ ObjectDefineProperties(WorkerLocation.prototype, { get() { const url = WeakMapPrototypeGet(workerLocationUrls, this); if (url == null) { - throw new TypeError("Illegal invocation."); + throw new TypeError("Illegal invocation"); } return url.host; }, @@ -268,7 +268,7 @@ ObjectDefineProperties(WorkerLocation.prototype, { get() { const url = WeakMapPrototypeGet(workerLocationUrls, this); if (url == null) { - throw new TypeError("Illegal invocation."); + throw new TypeError("Illegal invocation"); } return url.hostname; }, @@ -280,7 +280,7 @@ ObjectDefineProperties(WorkerLocation.prototype, { get() { const url = WeakMapPrototypeGet(workerLocationUrls, this); if (url == null) { - throw new TypeError("Illegal invocation."); + throw new TypeError("Illegal invocation"); } return url.href; }, @@ -292,7 +292,7 @@ ObjectDefineProperties(WorkerLocation.prototype, { get() { const url = WeakMapPrototypeGet(workerLocationUrls, this); if (url == null) { - throw new TypeError("Illegal invocation."); + throw new TypeError("Illegal invocation"); } return url.origin; }, @@ -304,7 +304,7 @@ ObjectDefineProperties(WorkerLocation.prototype, { get() { const url = WeakMapPrototypeGet(workerLocationUrls, this); if (url == null) { - throw new TypeError("Illegal invocation."); + throw new TypeError("Illegal invocation"); } return url.pathname; }, @@ -316,7 +316,7 @@ ObjectDefineProperties(WorkerLocation.prototype, { get() { const url = WeakMapPrototypeGet(workerLocationUrls, this); if (url == null) { - throw new TypeError("Illegal invocation."); + throw new TypeError("Illegal invocation"); } return url.port; }, @@ -328,7 +328,7 @@ ObjectDefineProperties(WorkerLocation.prototype, { get() { const url = WeakMapPrototypeGet(workerLocationUrls, this); if (url == null) { - throw new TypeError("Illegal invocation."); + throw new TypeError("Illegal invocation"); } return url.protocol; }, @@ -340,7 +340,7 @@ ObjectDefineProperties(WorkerLocation.prototype, { get() { const url = WeakMapPrototypeGet(workerLocationUrls, this); if (url == null) { - throw new TypeError("Illegal invocation."); + throw new TypeError("Illegal invocation"); } return url.search; }, @@ -352,7 +352,7 @@ ObjectDefineProperties(WorkerLocation.prototype, { value: function toString() { const url = WeakMapPrototypeGet(workerLocationUrls, this); if (url == null) { - throw new TypeError("Illegal invocation."); + throw new TypeError("Illegal invocation"); } return url.href; }, @@ -414,7 +414,7 @@ const locationDescriptor = { return location; }, set() { - throw new DOMException(`Cannot set "location".`, "NotSupportedError"); + throw new DOMException(`Cannot set "location"`, "NotSupportedError"); }, enumerable: true, }; @@ -422,7 +422,7 @@ const workerLocationDescriptor = { get() { if (workerLocation == null) { throw new Error( - `Assertion: "globalThis.location" must be defined in a worker.`, + `Assertion: "globalThis.location" must be defined in a worker`, ); } return workerLocation; diff --git a/ext/web/13_message_port.js b/ext/web/13_message_port.js index cf72c43e6ff291..f96cd193f4790e 100644 --- a/ext/web/13_message_port.js +++ b/ext/web/13_message_port.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // @ts-check /// @@ -102,8 +102,8 @@ const nodeWorkerThreadCloseCb = Symbol("nodeWorkerThreadCloseCb"); const nodeWorkerThreadCloseCbInvoked = Symbol("nodeWorkerThreadCloseCbInvoked"); export const refMessagePort = Symbol("refMessagePort"); /** It is used by 99_main.js and worker_threads to - * unref/ref on the global pollForMessages promise. */ -export const unrefPollForMessages = Symbol("unrefPollForMessages"); + * unref/ref on the global message event handler count. */ +export const unrefParentPort = Symbol("unrefParentPort"); /** * @param {number} id diff --git a/ext/web/14_compression.js b/ext/web/14_compression.js index 1adb205b223e2c..de49d7ad3deed3 100644 --- a/ext/web/14_compression.js +++ b/ext/web/14_compression.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // @ts-check /// diff --git a/ext/web/15_performance.js b/ext/web/15_performance.js index 9e0e310a57e4b9..967cdda4705af6 100644 --- a/ext/web/15_performance.js +++ b/ext/web/15_performance.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { primordials } from "ext:core/mod.js"; import { op_now, op_time_origin } from "ext:core/ops"; @@ -123,14 +123,14 @@ function convertMarkToTimestamp(mark) { const entry = findMostRecent(mark, "mark"); if (!entry) { throw new DOMException( - `Cannot find mark: "${mark}".`, + `Cannot find mark: "${mark}"`, "SyntaxError", ); } return entry.startTime; } if (mark < 0) { - throw new TypeError("Mark cannot be negative."); + throw new TypeError(`Mark cannot be negative: received ${mark}`); } return mark; } @@ -261,7 +261,9 @@ class PerformanceMark extends PerformanceEntry { super(name, "mark", startTime, 0, illegalConstructorKey); this[webidl.brand] = webidl.brand; if (startTime < 0) { - throw new TypeError("startTime cannot be negative"); + throw new TypeError( + `Cannot construct PerformanceMark: startTime cannot be negative, received ${startTime}`, + ); } this[_detail] = structuredClone(detail); } @@ -504,14 +506,14 @@ class Performance extends EventTarget { ObjectKeys(startOrMeasureOptions).length > 0 ) { if (endMark) { - throw new TypeError("Options cannot be passed with endMark."); + throw new TypeError('Options cannot be passed with "endMark"'); } if ( !ReflectHas(startOrMeasureOptions, "start") && !ReflectHas(startOrMeasureOptions, "end") ) { throw new TypeError( - "A start or end mark must be supplied in options.", + 'A "start" or "end" mark must be supplied in options', ); } if ( @@ -520,7 +522,7 @@ class Performance extends EventTarget { ReflectHas(startOrMeasureOptions, "end") ) { throw new TypeError( - "Cannot specify start, end, and duration together in options.", + 'Cannot specify "start", "end", and "duration" together in options', ); } } diff --git a/ext/web/16_image_data.js b/ext/web/16_image_data.js index 2048f002d5923e..bd69da7903279e 100644 --- a/ext/web/16_image_data.js +++ b/ext/web/16_image_data.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { primordials } from "ext:core/mod.js"; import * as webidl from "ext:deno_webidl/00_webidl.js"; @@ -84,35 +84,35 @@ class ImageData { if (dataLength === 0) { throw new DOMException( - "Failed to construct 'ImageData': The input data has zero elements.", + "Failed to construct 'ImageData': the input data has zero elements", "InvalidStateError", ); } if (dataLength % 4 !== 0) { throw new DOMException( - "Failed to construct 'ImageData': The input data length is not a multiple of 4.", + `Failed to construct 'ImageData': the input data length is not a multiple of 4, received ${dataLength}`, "InvalidStateError", ); } if (sourceWidth < 1) { throw new DOMException( - "Failed to construct 'ImageData': The source width is zero or not a number.", + "Failed to construct 'ImageData': the source width is zero or not a number", "IndexSizeError", ); } if (webidl.type(sourceHeight) !== "Undefined" && sourceHeight < 1) { throw new DOMException( - "Failed to construct 'ImageData': The source height is zero or not a number.", + "Failed to construct 'ImageData': the source height is zero or not a number", "IndexSizeError", ); } if (dataLength / 4 % sourceWidth !== 0) { throw new DOMException( - "Failed to construct 'ImageData': The input data length is not a multiple of (4 * width).", + "Failed to construct 'ImageData': the input data length is not a multiple of (4 * width)", "IndexSizeError", ); } @@ -122,7 +122,7 @@ class ImageData { (sourceWidth * sourceHeight * 4 !== dataLength) ) { throw new DOMException( - "Failed to construct 'ImageData': The input data length is not equal to (4 * width * height).", + "Failed to construct 'ImageData': the input data length is not equal to (4 * width * height)", "IndexSizeError", ); } @@ -159,14 +159,14 @@ class ImageData { if (sourceWidth < 1) { throw new DOMException( - "Failed to construct 'ImageData': The source width is zero or not a number.", + "Failed to construct 'ImageData': the source width is zero or not a number", "IndexSizeError", ); } if (sourceHeight < 1) { throw new DOMException( - "Failed to construct 'ImageData': The source height is zero or not a number.", + "Failed to construct 'ImageData': the source height is zero or not a number", "IndexSizeError", ); } diff --git a/ext/web/Cargo.toml b/ext/web/Cargo.toml index db28d0e5786493..dd521ad03768f4 100644 --- a/ext/web/Cargo.toml +++ b/ext/web/Cargo.toml @@ -1,8 +1,8 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "deno_web" -version = "0.208.0" +version = "0.215.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/web/benches/encoding.rs b/ext/web/benches/encoding.rs index d0738c6452bc0d..42497ef3ceb56e 100644 --- a/ext/web/benches/encoding.rs +++ b/ext/web/benches/encoding.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_bench_util::bench_js_sync; use deno_bench_util::bench_or_profile; diff --git a/ext/web/benches/timers_ops.rs b/ext/web/benches/timers_ops.rs index d39ee4eeae81da..a8a52ad91696a0 100644 --- a/ext/web/benches/timers_ops.rs +++ b/ext/web/benches/timers_ops.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_bench_util::bench_js_async; use deno_bench_util::bench_or_profile; diff --git a/ext/web/blob.rs b/ext/web/blob.rs index bc64a0f27eba17..872333709383e4 100644 --- a/ext/web/blob.rs +++ b/ext/web/blob.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::cell::RefCell; use std::collections::HashMap; diff --git a/ext/web/compression.rs b/ext/web/compression.rs index 6967009915d419..650cc84085b9a4 100644 --- a/ext/web/compression.rs +++ b/ext/web/compression.rs @@ -1,4 +1,7 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::cell::RefCell; +use std::io::Write; use deno_core::op2; use flate2::write::DeflateDecoder; @@ -8,8 +11,6 @@ use flate2::write::GzEncoder; use flate2::write::ZlibDecoder; use flate2::write::ZlibEncoder; use flate2::Compression; -use std::cell::RefCell; -use std::io::Write; #[derive(Debug, thiserror::Error)] pub enum CompressionError { diff --git a/ext/web/internal.d.ts b/ext/web/internal.d.ts index b2aea80d9fb75a..64a863385455d7 100644 --- a/ext/web/internal.d.ts +++ b/ext/web/internal.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /// /// diff --git a/ext/web/lib.deno_web.d.ts b/ext/web/lib.deno_web.d.ts index 2ad97ac7d1eef2..1fb003b66f1552 100644 --- a/ext/web/lib.deno_web.d.ts +++ b/ext/web/lib.deno_web.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-explicit-any no-var @@ -882,7 +882,7 @@ declare var ReadableStream: { strategy?: QueuingStrategy, ): ReadableStream; from( - asyncIterable: AsyncIterable | Iterable>, + asyncIterable: AsyncIterable | Iterable> & object, ): ReadableStream; }; diff --git a/ext/web/lib.rs b/ext/web/lib.rs index af0fc2c276563e..07b00f0049be3f 100644 --- a/ext/web/lib.rs +++ b/ext/web/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. mod blob; mod compression; @@ -6,24 +6,23 @@ mod message_port; mod stream_resource; mod timers; +use std::borrow::Cow; +use std::cell::RefCell; +use std::path::PathBuf; +use std::sync::Arc; + +pub use blob::BlobError; +pub use compression::CompressionError; use deno_core::op2; use deno_core::url::Url; use deno_core::v8; use deno_core::ByteString; use deno_core::ToJsBuffer; use deno_core::U16String; - use encoding_rs::CoderResult; use encoding_rs::Decoder; use encoding_rs::DecoderResult; use encoding_rs::Encoding; -use std::borrow::Cow; -use std::cell::RefCell; -use std::path::PathBuf; -use std::sync::Arc; - -pub use blob::BlobError; -pub use compression::CompressionError; pub use message_port::MessagePortError; pub use stream_resource::StreamResourceError; @@ -38,7 +37,6 @@ pub use crate::blob::Blob; pub use crate::blob::BlobPart; pub use crate::blob::BlobStore; pub use crate::blob::InMemoryBlobPart; - pub use crate::message_port::create_entangled_message_port; pub use crate::message_port::deserialize_js_transferables; use crate::message_port::op_message_port_create_entangled; @@ -49,7 +47,6 @@ pub use crate::message_port::serialize_transferables; pub use crate::message_port::JsMessageData; pub use crate::message_port::MessagePort; pub use crate::message_port::Transferable; - use crate::timers::op_defer; use crate::timers::op_now; use crate::timers::op_time_origin; diff --git a/ext/web/message_port.rs b/ext/web/message_port.rs index 1a4a09073d176d..b2aad6776f9389 100644 --- a/ext/web/message_port.rs +++ b/ext/web/message_port.rs @@ -1,11 +1,10 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::borrow::Cow; use std::cell::RefCell; use std::rc::Rc; use deno_core::op2; - use deno_core::CancelFuture; use deno_core::CancelHandle; use deno_core::DetachedBuffer; diff --git a/ext/web/stream_resource.rs b/ext/web/stream_resource.rs index c44a385ea9d59d..5613f57384ffb5 100644 --- a/ext/web/stream_resource.rs +++ b/ext/web/stream_resource.rs @@ -1,4 +1,17 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. +use std::borrow::Cow; +use std::cell::RefCell; +use std::cell::RefMut; +use std::ffi::c_void; +use std::future::Future; +use std::marker::PhantomData; +use std::mem::MaybeUninit; +use std::pin::Pin; +use std::rc::Rc; +use std::task::Context; +use std::task::Poll; +use std::task::Waker; + use bytes::BytesMut; use deno_core::external; use deno_core::op2; @@ -17,18 +30,6 @@ use deno_core::Resource; use deno_core::ResourceId; use futures::future::poll_fn; use futures::TryFutureExt; -use std::borrow::Cow; -use std::cell::RefCell; -use std::cell::RefMut; -use std::ffi::c_void; -use std::future::Future; -use std::marker::PhantomData; -use std::mem::MaybeUninit; -use std::pin::Pin; -use std::rc::Rc; -use std::task::Context; -use std::task::Poll; -use std::task::Waker; #[derive(Debug, thiserror::Error)] pub enum StreamResourceError { @@ -607,13 +608,15 @@ impl Drop for ReadableStreamResourceData { #[cfg(test)] mod tests { - use super::*; - use deno_core::v8; use std::cell::OnceCell; use std::sync::atomic::AtomicUsize; use std::sync::OnceLock; use std::time::Duration; + use deno_core::v8; + + use super::*; + static V8_GLOBAL: OnceLock<()> = OnceLock::new(); thread_local! { diff --git a/ext/web/timers.rs b/ext/web/timers.rs index 06444ed34ffba3..7929b6050ecb61 100644 --- a/ext/web/timers.rs +++ b/ext/web/timers.rs @@ -1,14 +1,15 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. //! This module helps deno implement timers and performance APIs. -use deno_core::op2; -use deno_core::OpState; use std::time::Duration; use std::time::Instant; use std::time::SystemTime; use std::time::UNIX_EPOCH; +use deno_core::op2; +use deno_core::OpState; + pub trait TimersPermission { fn allow_hrtime(&mut self) -> bool; } diff --git a/ext/webgpu/00_init.js b/ext/webgpu/00_init.js index 0f10847cef7f4b..81bb27286d357a 100644 --- a/ext/webgpu/00_init.js +++ b/ext/webgpu/00_init.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { core } from "ext:core/mod.js"; diff --git a/ext/webgpu/01_webgpu.js b/ext/webgpu/01_webgpu.js index cab5cbbdbc9c5c..5ce34a5e7b56bc 100644 --- a/ext/webgpu/01_webgpu.js +++ b/ext/webgpu/01_webgpu.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // @ts-check /// @@ -98,6 +98,11 @@ const { ArrayPrototypePush, DataViewPrototypeGetBuffer, Error, + Number, + NumberPOSITIVE_INFINITY, + NumberMAX_SAFE_INTEGER, + NumberNEGATIVE_INFINITY, + NumberMIN_SAFE_INTEGER, MathMax, ObjectDefineProperty, ObjectHasOwn, @@ -614,6 +619,19 @@ function createGPUSupportedLimits(limits) { return adapterFeatures; } +function normalizeLimit(limit) { + if (typeof limit === "bigint") { + limit = Number(limit); + if (limit === NumberPOSITIVE_INFINITY) { + limit = NumberMAX_SAFE_INTEGER; + } else if (limit === NumberNEGATIVE_INFINITY) { + limit = NumberMIN_SAFE_INTEGER; + } + } + + return limit; +} + /** * @typedef InnerAdapterLimits * @property {number} maxTextureDimension1D @@ -653,123 +671,127 @@ class GPUSupportedLimits { get maxTextureDimension1D() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxTextureDimension1D; + return normalizeLimit(this[_limits].maxTextureDimension1D); } get maxTextureDimension2D() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxTextureDimension2D; + return normalizeLimit(this[_limits].maxTextureDimension2D); } get maxTextureDimension3D() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxTextureDimension3D; + return normalizeLimit(this[_limits].maxTextureDimension3D); } get maxTextureArrayLayers() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxTextureArrayLayers; + return normalizeLimit(this[_limits].maxTextureArrayLayers); } get maxBindGroups() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxBindGroups; + return normalizeLimit(this[_limits].maxBindGroups); } get maxBindingsPerBindGroup() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxBindingsPerBindGroup; + return normalizeLimit(this[_limits].maxBindingsPerBindGroup); } get maxBufferSize() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxBufferSize; + return normalizeLimit(this[_limits].maxBufferSize); } get maxDynamicUniformBuffersPerPipelineLayout() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxDynamicUniformBuffersPerPipelineLayout; + return normalizeLimit( + this[_limits].maxDynamicUniformBuffersPerPipelineLayout, + ); } get maxDynamicStorageBuffersPerPipelineLayout() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxDynamicStorageBuffersPerPipelineLayout; + return normalizeLimit( + this[_limits].maxDynamicStorageBuffersPerPipelineLayout, + ); } get maxSampledTexturesPerShaderStage() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxSampledTexturesPerShaderStage; + return normalizeLimit(this[_limits].maxSampledTexturesPerShaderStage); } get maxSamplersPerShaderStage() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxSamplersPerShaderStage; + return normalizeLimit(this[_limits].maxSamplersPerShaderStage); } get maxStorageBuffersPerShaderStage() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxStorageBuffersPerShaderStage; + return normalizeLimit(this[_limits].maxStorageBuffersPerShaderStage); } get maxStorageTexturesPerShaderStage() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxStorageTexturesPerShaderStage; + return normalizeLimit(this[_limits].maxStorageTexturesPerShaderStage); } get maxUniformBuffersPerShaderStage() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxUniformBuffersPerShaderStage; + return normalizeLimit(this[_limits].maxUniformBuffersPerShaderStage); } get maxUniformBufferBindingSize() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxUniformBufferBindingSize; + return normalizeLimit(this[_limits].maxUniformBufferBindingSize); } get maxStorageBufferBindingSize() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxStorageBufferBindingSize; + return normalizeLimit(this[_limits].maxStorageBufferBindingSize); } get minUniformBufferOffsetAlignment() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].minUniformBufferOffsetAlignment; + return normalizeLimit(this[_limits].minUniformBufferOffsetAlignment); } get minStorageBufferOffsetAlignment() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].minStorageBufferOffsetAlignment; + return normalizeLimit(this[_limits].minStorageBufferOffsetAlignment); } get maxVertexBuffers() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxVertexBuffers; + return normalizeLimit(this[_limits].maxVertexBuffers); } get maxVertexAttributes() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxVertexAttributes; + return normalizeLimit(this[_limits].maxVertexAttributes); } get maxVertexBufferArrayStride() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxVertexBufferArrayStride; + return normalizeLimit(this[_limits].maxVertexBufferArrayStride); } get maxInterStageShaderComponents() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxInterStageShaderComponents; + return normalizeLimit(this[_limits].maxInterStageShaderComponents); } get maxColorAttachments() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxColorAttachments; + return normalizeLimit(this[_limits].maxColorAttachments); } get maxColorAttachmentBytesPerSample() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxColorAttachmentBytesPerSample; + return normalizeLimit(this[_limits].maxColorAttachmentBytesPerSample); } get maxComputeWorkgroupStorageSize() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxComputeWorkgroupStorageSize; + return normalizeLimit(this[_limits].maxComputeWorkgroupStorageSize); } get maxComputeInvocationsPerWorkgroup() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxComputeInvocationsPerWorkgroup; + return normalizeLimit(this[_limits].maxComputeInvocationsPerWorkgroup); } get maxComputeWorkgroupSizeX() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxComputeWorkgroupSizeX; + return normalizeLimit(this[_limits].maxComputeWorkgroupSizeX); } get maxComputeWorkgroupSizeY() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxComputeWorkgroupSizeY; + return normalizeLimit(this[_limits].maxComputeWorkgroupSizeY); } get maxComputeWorkgroupSizeZ() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxComputeWorkgroupSizeZ; + return normalizeLimit(this[_limits].maxComputeWorkgroupSizeZ); } get maxComputeWorkgroupsPerDimension() { webidl.assertBranded(this, GPUSupportedLimitsPrototype); - return this[_limits].maxComputeWorkgroupsPerDimension; + return normalizeLimit(this[_limits].maxComputeWorkgroupsPerDimension); } [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { diff --git a/ext/webgpu/02_surface.js b/ext/webgpu/02_surface.js index ce723b891f9087..b0561469a9c02e 100644 --- a/ext/webgpu/02_surface.js +++ b/ext/webgpu/02_surface.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // @ts-check /// diff --git a/ext/webgpu/Cargo.toml b/ext/webgpu/Cargo.toml index f23bb8371e9c18..9aa1b2370ce3d2 100644 --- a/ext/webgpu/Cargo.toml +++ b/ext/webgpu/Cargo.toml @@ -1,8 +1,8 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "deno_webgpu" -version = "0.144.0" +version = "0.151.0" authors = ["the Deno authors"] edition.workspace = true license = "MIT" diff --git a/ext/webgpu/binding.rs b/ext/webgpu/binding.rs index 41708acc7f1a43..2849cf9bfea12f 100644 --- a/ext/webgpu/binding.rs +++ b/ext/webgpu/binding.rs @@ -1,4 +1,7 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::borrow::Cow; +use std::rc::Rc; use deno_core::error::AnyError; use deno_core::op2; @@ -6,8 +9,6 @@ use deno_core::OpState; use deno_core::Resource; use deno_core::ResourceId; use serde::Deserialize; -use std::borrow::Cow; -use std::rc::Rc; use super::error::WebGpuResult; diff --git a/ext/webgpu/buffer.rs b/ext/webgpu/buffer.rs index c2b53890e0ccef..e8e33244c96df7 100644 --- a/ext/webgpu/buffer.rs +++ b/ext/webgpu/buffer.rs @@ -1,9 +1,5 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use deno_core::op2; -use deno_core::OpState; -use deno_core::Resource; -use deno_core::ResourceId; use std::borrow::Cow; use std::cell::RefCell; use std::rc::Rc; @@ -11,6 +7,11 @@ use std::sync::Arc; use std::sync::Mutex; use std::time::Duration; +use deno_core::op2; +use deno_core::OpState; +use deno_core::Resource; +use deno_core::ResourceId; + use super::error::WebGpuResult; #[derive(Debug, thiserror::Error)] diff --git a/ext/webgpu/bundle.rs b/ext/webgpu/bundle.rs index d9a5b29539aa93..5fc147a44a2c44 100644 --- a/ext/webgpu/bundle.rs +++ b/ext/webgpu/bundle.rs @@ -1,13 +1,14 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::borrow::Cow; +use std::cell::RefCell; +use std::rc::Rc; use deno_core::op2; use deno_core::OpState; use deno_core::Resource; use deno_core::ResourceId; use serde::Deserialize; -use std::borrow::Cow; -use std::cell::RefCell; -use std::rc::Rc; use super::error::WebGpuResult; diff --git a/ext/webgpu/byow.rs b/ext/webgpu/byow.rs index c9e1177b1efe53..7c16c8a0d2be02 100644 --- a/ext/webgpu/byow.rs +++ b/ext/webgpu/byow.rs @@ -1,8 +1,5 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use deno_core::op2; -use deno_core::OpState; -use deno_core::ResourceId; use std::ffi::c_void; #[cfg(any( target_os = "linux", @@ -12,6 +9,10 @@ use std::ffi::c_void; ))] use std::ptr::NonNull; +use deno_core::op2; +use deno_core::OpState; +use deno_core::ResourceId; + use crate::surface::WebGpuSurface; #[derive(Debug, thiserror::Error)] diff --git a/ext/webgpu/command_encoder.rs b/ext/webgpu/command_encoder.rs index 4bee7aac301795..4b14345a2c44d2 100644 --- a/ext/webgpu/command_encoder.rs +++ b/ext/webgpu/command_encoder.rs @@ -1,17 +1,18 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::borrow::Cow; +use std::cell::RefCell; +use std::rc::Rc; -use crate::WebGpuQuerySet; use deno_core::error::AnyError; use deno_core::op2; use deno_core::OpState; use deno_core::Resource; use deno_core::ResourceId; use serde::Deserialize; -use std::borrow::Cow; -use std::cell::RefCell; -use std::rc::Rc; use super::error::WebGpuResult; +use crate::WebGpuQuerySet; pub(crate) struct WebGpuCommandEncoder( pub(crate) super::Instance, diff --git a/ext/webgpu/compute_pass.rs b/ext/webgpu/compute_pass.rs index 17043c76713973..22cd522d8a120f 100644 --- a/ext/webgpu/compute_pass.rs +++ b/ext/webgpu/compute_pass.rs @@ -1,12 +1,13 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::borrow::Cow; +use std::cell::RefCell; use deno_core::error::AnyError; use deno_core::op2; use deno_core::OpState; use deno_core::Resource; use deno_core::ResourceId; -use std::borrow::Cow; -use std::cell::RefCell; use super::error::WebGpuResult; diff --git a/ext/webgpu/error.rs b/ext/webgpu/error.rs index f08f765386ead3..f022a56916943e 100644 --- a/ext/webgpu/error.rs +++ b/ext/webgpu/error.rs @@ -1,9 +1,10 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use deno_core::ResourceId; -use serde::Serialize; use std::convert::From; use std::error::Error; + +use deno_core::ResourceId; +use serde::Serialize; use wgpu_core::binding_model::CreateBindGroupError; use wgpu_core::binding_model::CreateBindGroupLayoutError; use wgpu_core::binding_model::CreatePipelineLayoutError; diff --git a/ext/webgpu/lib.rs b/ext/webgpu/lib.rs index 5dc8278e410b54..bdf0f39b63c6cb 100644 --- a/ext/webgpu/lib.rs +++ b/ext/webgpu/lib.rs @@ -1,22 +1,22 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. #![cfg(not(target_arch = "wasm32"))] #![warn(unsafe_op_in_unsafe_fn)] +use std::borrow::Cow; +use std::cell::RefCell; +use std::collections::HashSet; +use std::rc::Rc; + use deno_core::op2; use deno_core::OpState; use deno_core::Resource; use deno_core::ResourceId; +use error::WebGpuResult; use serde::Deserialize; use serde::Serialize; -use std::borrow::Cow; -use std::cell::RefCell; -use std::collections::HashSet; -use std::rc::Rc; pub use wgpu_core; pub use wgpu_types; -use error::WebGpuResult; - pub const UNSTABLE_FEATURE_NAME: &str = "webgpu"; #[macro_use] diff --git a/ext/webgpu/pipeline.rs b/ext/webgpu/pipeline.rs index a6b0cb8cec8e11..87b1610ad7b69c 100644 --- a/ext/webgpu/pipeline.rs +++ b/ext/webgpu/pipeline.rs @@ -1,4 +1,8 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::borrow::Cow; +use std::collections::HashMap; +use std::rc::Rc; use deno_core::error::AnyError; use deno_core::op2; @@ -7,9 +11,6 @@ use deno_core::Resource; use deno_core::ResourceId; use serde::Deserialize; use serde::Serialize; -use std::borrow::Cow; -use std::collections::HashMap; -use std::rc::Rc; use super::error::WebGpuError; use super::error::WebGpuResult; diff --git a/ext/webgpu/queue.rs b/ext/webgpu/queue.rs index 8c8bbec95efb93..4f367f54692551 100644 --- a/ext/webgpu/queue.rs +++ b/ext/webgpu/queue.rs @@ -1,17 +1,18 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::borrow::Cow; +use std::rc::Rc; -use crate::command_encoder::WebGpuCommandBuffer; -use crate::Instance; use deno_core::error::AnyError; use deno_core::op2; use deno_core::OpState; use deno_core::Resource; use deno_core::ResourceId; use serde::Deserialize; -use std::borrow::Cow; -use std::rc::Rc; use super::error::WebGpuResult; +use crate::command_encoder::WebGpuCommandBuffer; +use crate::Instance; pub struct WebGpuQueue(pub Instance, pub wgpu_core::id::QueueId); impl Resource for WebGpuQueue { diff --git a/ext/webgpu/render_pass.rs b/ext/webgpu/render_pass.rs index 9b9d87d9fc05a6..41d610c0f9e34b 100644 --- a/ext/webgpu/render_pass.rs +++ b/ext/webgpu/render_pass.rs @@ -1,12 +1,13 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::borrow::Cow; +use std::cell::RefCell; use deno_core::op2; use deno_core::OpState; use deno_core::Resource; use deno_core::ResourceId; use serde::Deserialize; -use std::borrow::Cow; -use std::cell::RefCell; use super::error::WebGpuResult; diff --git a/ext/webgpu/sampler.rs b/ext/webgpu/sampler.rs index 9fc1269ea7b758..e4f73e93ac437a 100644 --- a/ext/webgpu/sampler.rs +++ b/ext/webgpu/sampler.rs @@ -1,12 +1,13 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::borrow::Cow; +use std::rc::Rc; use deno_core::op2; use deno_core::OpState; use deno_core::Resource; use deno_core::ResourceId; use serde::Deserialize; -use std::borrow::Cow; -use std::rc::Rc; use super::error::WebGpuResult; diff --git a/ext/webgpu/shader.rs b/ext/webgpu/shader.rs index 4653bd85bf05c6..f57e24fa26c5c3 100644 --- a/ext/webgpu/shader.rs +++ b/ext/webgpu/shader.rs @@ -1,11 +1,12 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::borrow::Cow; +use std::rc::Rc; use deno_core::op2; use deno_core::OpState; use deno_core::Resource; use deno_core::ResourceId; -use std::borrow::Cow; -use std::rc::Rc; use super::error::WebGpuResult; diff --git a/ext/webgpu/surface.rs b/ext/webgpu/surface.rs index 297eaeb00874ae..e23c5f182b4561 100644 --- a/ext/webgpu/surface.rs +++ b/ext/webgpu/surface.rs @@ -1,15 +1,17 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::borrow::Cow; +use std::rc::Rc; -use super::WebGpuResult; use deno_core::op2; use deno_core::OpState; use deno_core::Resource; use deno_core::ResourceId; use serde::Deserialize; -use std::borrow::Cow; -use std::rc::Rc; use wgpu_types::SurfaceStatus; +use super::WebGpuResult; + #[derive(Debug, thiserror::Error)] pub enum SurfaceError { #[error(transparent)] diff --git a/ext/webgpu/texture.rs b/ext/webgpu/texture.rs index f8a5e05a3e2b15..a354567de84f78 100644 --- a/ext/webgpu/texture.rs +++ b/ext/webgpu/texture.rs @@ -1,12 +1,13 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::borrow::Cow; +use std::rc::Rc; use deno_core::op2; use deno_core::OpState; use deno_core::Resource; use deno_core::ResourceId; use serde::Deserialize; -use std::borrow::Cow; -use std::rc::Rc; use super::error::WebGpuResult; pub(crate) struct WebGpuTexture { diff --git a/ext/webidl/00_webidl.js b/ext/webidl/00_webidl.js index eb18cbcc3e4152..b3c3b299f03cbd 100644 --- a/ext/webidl/00_webidl.js +++ b/ext/webidl/00_webidl.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Adapted from https://github.com/jsdom/webidl-conversions. // Copyright Domenic Denicola. Licensed under BSD-2-Clause License. diff --git a/ext/webidl/Cargo.toml b/ext/webidl/Cargo.toml index 8c3f6f6128839e..ab285c72044da5 100644 --- a/ext/webidl/Cargo.toml +++ b/ext/webidl/Cargo.toml @@ -1,8 +1,8 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "deno_webidl" -version = "0.177.0" +version = "0.184.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/webidl/benches/dict.js b/ext/webidl/benches/dict.js index 9e7367d62c2e22..8aedc512354556 100644 --- a/ext/webidl/benches/dict.js +++ b/ext/webidl/benches/dict.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file diff --git a/ext/webidl/benches/dict.rs b/ext/webidl/benches/dict.rs index cfb658fa84bee8..aea491cf1210b6 100644 --- a/ext/webidl/benches/dict.rs +++ b/ext/webidl/benches/dict.rs @@ -1,10 +1,9 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_bench_util::bench_js_sync; use deno_bench_util::bench_or_profile; use deno_bench_util::bencher::benchmark_group; use deno_bench_util::bencher::Bencher; - use deno_core::Extension; fn setup() -> Vec { diff --git a/ext/webidl/internal.d.ts b/ext/webidl/internal.d.ts index 375d548d3220ae..a884d982aabb2f 100644 --- a/ext/webidl/internal.d.ts +++ b/ext/webidl/internal.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-explicit-any /// diff --git a/ext/webidl/lib.rs b/ext/webidl/lib.rs index 51dbed33a589ac..7a3608def4f960 100644 --- a/ext/webidl/lib.rs +++ b/ext/webidl/lib.rs @@ -1,3 +1,3 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. deno_core::extension!(deno_webidl, esm = ["00_webidl.js"],); diff --git a/ext/websocket/01_websocket.js b/ext/websocket/01_websocket.js index 468999b95dda62..e0db51f4be92d8 100644 --- a/ext/websocket/01_websocket.js +++ b/ext/websocket/01_websocket.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /// @@ -330,10 +330,14 @@ class WebSocket extends EventTarget { webidl.requiredArguments(arguments.length, 1, prefix); data = webidl.converters.WebSocketSend(data, prefix, "Argument 1"); - if (this[_readyState] !== OPEN) { + if (this[_readyState] === CONNECTING) { throw new DOMException("'readyState' not OPEN", "InvalidStateError"); } + if (this[_readyState] !== OPEN) { + return; + } + if (this[_sendQueue].length === 0) { // Fast path if the send queue is empty, for example when only synchronous // data is being sent. diff --git a/ext/websocket/02_websocketstream.js b/ext/websocket/02_websocketstream.js index 838ae3d4ced44a..a1b76fb6c084d1 100644 --- a/ext/websocket/02_websocketstream.js +++ b/ext/websocket/02_websocketstream.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /// diff --git a/ext/websocket/Cargo.toml b/ext/websocket/Cargo.toml index 61f1f5959c4ae8..a1f1c98ba18613 100644 --- a/ext/websocket/Cargo.toml +++ b/ext/websocket/Cargo.toml @@ -1,8 +1,8 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "deno_websocket" -version = "0.182.0" +version = "0.189.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/websocket/autobahn/autobahn_server.js b/ext/websocket/autobahn/autobahn_server.js index 7400c8d54758ef..1c0d4bbaf69f1a 100644 --- a/ext/websocket/autobahn/autobahn_server.js +++ b/ext/websocket/autobahn/autobahn_server.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { parseArgs } from "@std/cli/parse-args"; const { port } = parseArgs(Deno.args, { diff --git a/ext/websocket/autobahn/fuzzingclient.js b/ext/websocket/autobahn/fuzzingclient.js index fed0fd6aa931e2..86023196508963 100644 --- a/ext/websocket/autobahn/fuzzingclient.js +++ b/ext/websocket/autobahn/fuzzingclient.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file diff --git a/ext/websocket/lib.deno_websocket.d.ts b/ext/websocket/lib.deno_websocket.d.ts index fb7ea6070c9f35..28cf8b8ab38dd8 100644 --- a/ext/websocket/lib.deno_websocket.d.ts +++ b/ext/websocket/lib.deno_websocket.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-explicit-any no-var diff --git a/ext/websocket/lib.rs b/ext/websocket/lib.rs index a5734271cf17be..5819906da69e40 100644 --- a/ext/websocket/lib.rs +++ b/ext/websocket/lib.rs @@ -1,5 +1,13 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -use crate::stream::WebSocketStream; +// Copyright 2018-2025 the Deno authors. MIT license. +use std::borrow::Cow; +use std::cell::Cell; +use std::cell::RefCell; +use std::future::Future; +use std::num::NonZeroUsize; +use std::path::PathBuf; +use std::rc::Rc; +use std::sync::Arc; + use bytes::Bytes; use deno_core::futures::TryFutureExt; use deno_core::op2; @@ -17,12 +25,20 @@ use deno_core::Resource; use deno_core::ResourceId; use deno_core::ToJsBuffer; use deno_net::raw::NetworkStream; +use deno_permissions::PermissionCheckError; use deno_tls::create_client_config; use deno_tls::rustls::ClientConfig; use deno_tls::rustls::ClientConnection; use deno_tls::RootCertStoreProvider; use deno_tls::SocketUse; use deno_tls::TlsKeys; +use fastwebsockets::CloseCode; +use fastwebsockets::FragmentCollectorRead; +use fastwebsockets::Frame; +use fastwebsockets::OpCode; +use fastwebsockets::Role; +use fastwebsockets::WebSocket; +use fastwebsockets::WebSocketWrite; use http::header::CONNECTION; use http::header::UPGRADE; use http::HeaderName; @@ -36,28 +52,13 @@ use rustls_tokio_stream::rustls::pki_types::ServerName; use rustls_tokio_stream::rustls::RootCertStore; use rustls_tokio_stream::TlsStream; use serde::Serialize; -use std::borrow::Cow; -use std::cell::Cell; -use std::cell::RefCell; -use std::future::Future; -use std::num::NonZeroUsize; -use std::path::PathBuf; -use std::rc::Rc; -use std::sync::Arc; use tokio::io::AsyncRead; use tokio::io::AsyncWrite; use tokio::io::ReadHalf; use tokio::io::WriteHalf; use tokio::net::TcpStream; -use deno_permissions::PermissionCheckError; -use fastwebsockets::CloseCode; -use fastwebsockets::FragmentCollectorRead; -use fastwebsockets::Frame; -use fastwebsockets::OpCode; -use fastwebsockets::Role; -use fastwebsockets::WebSocket; -use fastwebsockets::WebSocketWrite; +use crate::stream::WebSocketStream; mod stream; @@ -148,7 +149,7 @@ impl Resource for WsCancelResource { // This op is needed because creating a WS instance in JavaScript is a sync // operation and should throw error when permissions are not fulfilled, // but actual op that connects WS is async. -#[op2] +#[op2(stack_trace)] #[smi] pub fn op_ws_check_permission_and_cancel_handle( state: &mut OpState, @@ -443,7 +444,7 @@ fn populate_common_request_headers( Ok(request) } -#[op2(async)] +#[op2(async, stack_trace)] #[serde] pub async fn op_ws_create( state: Rc>, diff --git a/ext/websocket/stream.rs b/ext/websocket/stream.rs index 2cd2622175bb29..c2ac4ee5d8a85c 100644 --- a/ext/websocket/stream.rs +++ b/ext/websocket/stream.rs @@ -1,4 +1,9 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. +use std::io::ErrorKind; +use std::pin::Pin; +use std::task::ready; +use std::task::Poll; + use bytes::Buf; use bytes::Bytes; use deno_net::raw::NetworkStream; @@ -6,10 +11,6 @@ use h2::RecvStream; use h2::SendStream; use hyper::upgrade::Upgraded; use hyper_util::rt::TokioIo; -use std::io::ErrorKind; -use std::pin::Pin; -use std::task::ready; -use std::task::Poll; use tokio::io::AsyncRead; use tokio::io::AsyncWrite; use tokio::io::ReadBuf; diff --git a/ext/webstorage/01_webstorage.js b/ext/webstorage/01_webstorage.js index 9e86366563a6a2..7adf190782f171 100644 --- a/ext/webstorage/01_webstorage.js +++ b/ext/webstorage/01_webstorage.js @@ -1,93 +1,22 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /// import { primordials } from "ext:core/mod.js"; -import { - op_webstorage_clear, - op_webstorage_get, - op_webstorage_iterate_keys, - op_webstorage_key, - op_webstorage_length, - op_webstorage_remove, - op_webstorage_set, -} from "ext:core/ops"; +import { op_webstorage_iterate_keys, Storage } from "ext:core/ops"; const { - Symbol, SymbolFor, ObjectFromEntries, ObjectEntries, ReflectDefineProperty, ReflectDeleteProperty, - ReflectGet, + FunctionPrototypeBind, ReflectHas, Proxy, } = primordials; -import * as webidl from "ext:deno_webidl/00_webidl.js"; - -const _persistent = Symbol("[[persistent]]"); - -class Storage { - [_persistent]; - - constructor() { - webidl.illegalConstructor(); - } - - get length() { - webidl.assertBranded(this, StoragePrototype); - return op_webstorage_length(this[_persistent]); - } - - key(index) { - webidl.assertBranded(this, StoragePrototype); - const prefix = "Failed to execute 'key' on 'Storage'"; - webidl.requiredArguments(arguments.length, 1, prefix); - index = webidl.converters["unsigned long"](index, prefix, "Argument 1"); - - return op_webstorage_key(index, this[_persistent]); - } - - setItem(key, value) { - webidl.assertBranded(this, StoragePrototype); - const prefix = "Failed to execute 'setItem' on 'Storage'"; - webidl.requiredArguments(arguments.length, 2, prefix); - key = webidl.converters.DOMString(key, prefix, "Argument 1"); - value = webidl.converters.DOMString(value, prefix, "Argument 2"); - - op_webstorage_set(key, value, this[_persistent]); - } - - getItem(key) { - webidl.assertBranded(this, StoragePrototype); - const prefix = "Failed to execute 'getItem' on 'Storage'"; - webidl.requiredArguments(arguments.length, 1, prefix); - key = webidl.converters.DOMString(key, prefix, "Argument 1"); - - return op_webstorage_get(key, this[_persistent]); - } - - removeItem(key) { - webidl.assertBranded(this, StoragePrototype); - const prefix = "Failed to execute 'removeItem' on 'Storage'"; - webidl.requiredArguments(arguments.length, 1, prefix); - key = webidl.converters.DOMString(key, prefix, "Argument 1"); - - op_webstorage_remove(key, this[_persistent]); - } - - clear() { - webidl.assertBranded(this, StoragePrototype); - op_webstorage_clear(this[_persistent]); - } -} - -const StoragePrototype = Storage.prototype; - function createStorage(persistent) { - const storage = webidl.createBranded(Storage); - storage[_persistent] = persistent; + const storage = new Storage(persistent); const proxy = new Proxy(storage, { deleteProperty(target, key) { @@ -106,12 +35,16 @@ function createStorage(persistent) { return true; }, - get(target, key, receiver) { + get(target, key) { if (typeof key === "symbol") { return target[key]; } if (ReflectHas(target, key)) { - return ReflectGet(target, key, receiver); + const value = target[key]; + if (typeof value === "function") { + return FunctionPrototypeBind(value, target); + } + return value; } return target.getItem(key) ?? undefined; }, @@ -136,7 +69,7 @@ function createStorage(persistent) { }, ownKeys() { - return op_webstorage_iterate_keys(persistent); + return op_webstorage_iterate_keys(storage); }, getOwnPropertyDescriptor(target, key) { @@ -163,7 +96,7 @@ function createStorage(persistent) { inspect, inspectOptions, ) { - return `${this.constructor.name} ${ + return `Storage ${ inspect({ ...ObjectFromEntries(ObjectEntries(proxy)), length: this.length, diff --git a/ext/webstorage/Cargo.toml b/ext/webstorage/Cargo.toml index 01e23ab839a643..2cae0d8e011ce1 100644 --- a/ext/webstorage/Cargo.toml +++ b/ext/webstorage/Cargo.toml @@ -1,8 +1,8 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "deno_webstorage" -version = "0.172.0" +version = "0.179.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/webstorage/lib.deno_webstorage.d.ts b/ext/webstorage/lib.deno_webstorage.d.ts index fa6d403deaac7b..5f5aafa1b87544 100644 --- a/ext/webstorage/lib.deno_webstorage.d.ts +++ b/ext/webstorage/lib.deno_webstorage.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-explicit-any no-var diff --git a/ext/webstorage/lib.rs b/ext/webstorage/lib.rs index 40946f05a7ec81..ca6b43a8279f8a 100644 --- a/ext/webstorage/lib.rs +++ b/ext/webstorage/lib.rs @@ -1,17 +1,17 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // NOTE to all: use **cached** prepared statements when interfacing with SQLite. use std::path::PathBuf; use deno_core::op2; +use deno_core::GarbageCollected; use deno_core::OpState; +pub use rusqlite; use rusqlite::params; use rusqlite::Connection; use rusqlite::OptionalExtension; -pub use rusqlite; - #[derive(Debug, thiserror::Error)] pub enum WebStorageError { #[error("LocalStorage is not supported in this context.")] @@ -32,17 +32,14 @@ const MAX_STORAGE_BYTES: usize = 10 * 1024 * 1024; deno_core::extension!(deno_webstorage, deps = [ deno_webidl ], ops = [ - op_webstorage_length, - op_webstorage_key, - op_webstorage_set, - op_webstorage_get, - op_webstorage_remove, - op_webstorage_clear, op_webstorage_iterate_keys, ], + objects = [ + Storage + ], esm = [ "01_webstorage.js" ], options = { - origin_storage_dir: Option + origin_storage_dir: Option }, state = |state, options| { if let Some(origin_storage_dir) = options.origin_storage_dir { @@ -110,122 +107,134 @@ fn get_webstorage( Ok(conn) } -#[op2(fast)] -pub fn op_webstorage_length( - state: &mut OpState, - persistent: bool, -) -> Result { - let conn = get_webstorage(state, persistent)?; - - let mut stmt = conn.prepare_cached("SELECT COUNT(*) FROM data")?; - let length: u32 = stmt.query_row(params![], |row| row.get(0))?; +#[inline] +fn size_check(input: usize) -> Result<(), WebStorageError> { + if input >= MAX_STORAGE_BYTES { + return Err(WebStorageError::StorageExceeded); + } - Ok(length) + Ok(()) } -#[op2] -#[string] -pub fn op_webstorage_key( - state: &mut OpState, - #[smi] index: u32, +struct Storage { persistent: bool, -) -> Result, WebStorageError> { - let conn = get_webstorage(state, persistent)?; +} - let mut stmt = - conn.prepare_cached("SELECT key FROM data LIMIT 1 OFFSET ?")?; +impl GarbageCollected for Storage {} - let key: Option = stmt - .query_row(params![index], |row| row.get(0)) - .optional()?; +#[op2] +impl Storage { + #[constructor] + #[cppgc] + fn new(persistent: bool) -> Storage { + Storage { persistent } + } - Ok(key) -} + #[getter] + #[smi] + fn length(&self, state: &mut OpState) -> Result { + let conn = get_webstorage(state, self.persistent)?; -#[inline] -fn size_check(input: usize) -> Result<(), WebStorageError> { - if input >= MAX_STORAGE_BYTES { - return Err(WebStorageError::StorageExceeded); + let mut stmt = conn.prepare_cached("SELECT COUNT(*) FROM data")?; + let length: u32 = stmt.query_row(params![], |row| row.get(0))?; + + Ok(length) } - Ok(()) -} + #[required(1)] + #[string] + fn key( + &self, + state: &mut OpState, + #[smi] index: u32, + ) -> Result, WebStorageError> { + let conn = get_webstorage(state, self.persistent)?; -#[op2(fast)] -pub fn op_webstorage_set( - state: &mut OpState, - #[string] key: &str, - #[string] value: &str, - persistent: bool, -) -> Result<(), WebStorageError> { - let conn = get_webstorage(state, persistent)?; + let mut stmt = + conn.prepare_cached("SELECT key FROM data LIMIT 1 OFFSET ?")?; - size_check(key.len() + value.len())?; + let key: Option = stmt + .query_row(params![index], |row| row.get(0)) + .optional()?; - let mut stmt = conn - .prepare_cached("SELECT SUM(pgsize) FROM dbstat WHERE name = 'data'")?; - let size: u32 = stmt.query_row(params![], |row| row.get(0))?; + Ok(key) + } - size_check(size as usize)?; + #[fast] + #[required(2)] + fn set_item( + &self, + state: &mut OpState, + #[string] key: &str, + #[string] value: &str, + ) -> Result<(), WebStorageError> { + let conn = get_webstorage(state, self.persistent)?; - let mut stmt = conn - .prepare_cached("INSERT OR REPLACE INTO data (key, value) VALUES (?, ?)")?; - stmt.execute(params![key, value])?; + size_check(key.len() + value.len())?; - Ok(()) -} + let mut stmt = conn + .prepare_cached("SELECT SUM(pgsize) FROM dbstat WHERE name = 'data'")?; + let size: u32 = stmt.query_row(params![], |row| row.get(0))?; -#[op2] -#[string] -pub fn op_webstorage_get( - state: &mut OpState, - #[string] key_name: String, - persistent: bool, -) -> Result, WebStorageError> { - let conn = get_webstorage(state, persistent)?; + size_check(size as usize)?; - let mut stmt = conn.prepare_cached("SELECT value FROM data WHERE key = ?")?; - let val = stmt - .query_row(params![key_name], |row| row.get(0)) - .optional()?; + let mut stmt = conn.prepare_cached( + "INSERT OR REPLACE INTO data (key, value) VALUES (?, ?)", + )?; + stmt.execute(params![key, value])?; - Ok(val) -} + Ok(()) + } -#[op2(fast)] -pub fn op_webstorage_remove( - state: &mut OpState, - #[string] key_name: &str, - persistent: bool, -) -> Result<(), WebStorageError> { - let conn = get_webstorage(state, persistent)?; + #[required(1)] + #[string] + fn get_item( + &self, + state: &mut OpState, + #[string] key: &str, + ) -> Result, WebStorageError> { + let conn = get_webstorage(state, self.persistent)?; - let mut stmt = conn.prepare_cached("DELETE FROM data WHERE key = ?")?; - stmt.execute(params![key_name])?; + let mut stmt = + conn.prepare_cached("SELECT value FROM data WHERE key = ?")?; + let val = stmt.query_row(params![key], |row| row.get(0)).optional()?; - Ok(()) -} + Ok(val) + } -#[op2(fast)] -pub fn op_webstorage_clear( - state: &mut OpState, - persistent: bool, -) -> Result<(), WebStorageError> { - let conn = get_webstorage(state, persistent)?; + #[fast] + #[required(1)] + fn remove_item( + &self, + state: &mut OpState, + #[string] key: &str, + ) -> Result<(), WebStorageError> { + let conn = get_webstorage(state, self.persistent)?; - let mut stmt = conn.prepare_cached("DELETE FROM data")?; - stmt.execute(params![])?; + let mut stmt = conn.prepare_cached("DELETE FROM data WHERE key = ?")?; + stmt.execute(params![key])?; - Ok(()) + Ok(()) + } + + #[fast] + fn clear(&self, state: &mut OpState) -> Result<(), WebStorageError> { + let conn = get_webstorage(state, self.persistent)?; + + let mut stmt = conn.prepare_cached("DELETE FROM data")?; + stmt.execute(params![])?; + + Ok(()) + } } #[op2] #[serde] -pub fn op_webstorage_iterate_keys( +fn op_webstorage_iterate_keys( + #[cppgc] storage: &Storage, state: &mut OpState, - persistent: bool, ) -> Result, WebStorageError> { - let conn = get_webstorage(state, persistent)?; + let conn = get_webstorage(state, storage.persistent)?; let mut stmt = conn.prepare_cached("SELECT key FROM data")?; let keys = stmt diff --git a/resolvers/deno/Cargo.toml b/resolvers/deno/Cargo.toml index c2d4a3bc29af51..71e75d5a1d257a 100644 --- a/resolvers/deno/Cargo.toml +++ b/resolvers/deno/Cargo.toml @@ -1,8 +1,8 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "deno_resolver" -version = "0.9.0" +version = "0.15.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -13,11 +13,14 @@ description = "Deno resolution algorithm" [lib] path = "lib.rs" +[features] +sync = ["dashmap"] + [dependencies] anyhow.workspace = true base32.workspace = true boxed_error.workspace = true -dashmap.workspace = true +dashmap = { workspace = true, optional = true } deno_config.workspace = true deno_media_type.workspace = true deno_package_json.workspace = true @@ -25,6 +28,8 @@ deno_package_json.features = ["sync"] deno_path_util.workspace = true deno_semver.workspace = true node_resolver.workspace = true +node_resolver.features = ["sync"] +sys_traits.workspace = true thiserror.workspace = true url.workspace = true diff --git a/resolvers/deno/cjs.rs b/resolvers/deno/cjs.rs index dbcbd8b6bf64ee..bae645b4818b8c 100644 --- a/resolvers/deno/cjs.rs +++ b/resolvers/deno/cjs.rs @@ -1,38 +1,37 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use std::sync::Arc; - -use dashmap::DashMap; use deno_media_type::MediaType; -use node_resolver::env::NodeResolverEnv; use node_resolver::errors::ClosestPkgJsonError; -use node_resolver::InNpmPackageChecker; -use node_resolver::NodeModuleKind; -use node_resolver::PackageJsonResolver; +use node_resolver::InNpmPackageCheckerRc; +use node_resolver::PackageJsonResolverRc; +use node_resolver::ResolutionMode; +use sys_traits::FsRead; use url::Url; +use crate::sync::MaybeDashMap; + /// Keeps track of what module specifiers were resolved as CJS. /// /// Modules that are `.js`, `.ts`, `.jsx`, and `tsx` are only known to /// be CJS or ESM after they're loaded based on their contents. So these /// files will be "maybe CJS" until they're loaded. #[derive(Debug)] -pub struct CjsTracker { - is_cjs_resolver: IsCjsResolver, - known: DashMap, +pub struct CjsTracker { + is_cjs_resolver: IsCjsResolver, + known: MaybeDashMap, } -impl CjsTracker { +impl CjsTracker { pub fn new( - in_npm_pkg_checker: Arc, - pkg_json_resolver: Arc>, - options: IsCjsResolverOptions, + in_npm_pkg_checker: InNpmPackageCheckerRc, + pkg_json_resolver: PackageJsonResolverRc, + mode: IsCjsResolutionMode, ) -> Self { Self { is_cjs_resolver: IsCjsResolver::new( in_npm_pkg_checker, pkg_json_resolver, - options, + mode, ), known: Default::default(), } @@ -70,42 +69,42 @@ impl CjsTracker { is_script: Option, ) -> Result { let kind = match self - .get_known_kind_with_is_script(specifier, media_type, is_script) + .get_known_mode_with_is_script(specifier, media_type, is_script) { Some(kind) => kind, None => self.is_cjs_resolver.check_based_on_pkg_json(specifier)?, }; - Ok(kind == NodeModuleKind::Cjs) + Ok(kind == ResolutionMode::Require) } /// Gets the referrer for the specified module specifier. /// /// Generally the referrer should already be tracked by calling /// `is_cjs_with_known_is_script` before calling this method. - pub fn get_referrer_kind(&self, specifier: &Url) -> NodeModuleKind { + pub fn get_referrer_kind(&self, specifier: &Url) -> ResolutionMode { if specifier.scheme() != "file" { - return NodeModuleKind::Esm; + return ResolutionMode::Import; } self - .get_known_kind(specifier, MediaType::from_specifier(specifier)) - .unwrap_or(NodeModuleKind::Esm) + .get_known_mode(specifier, MediaType::from_specifier(specifier)) + .unwrap_or(ResolutionMode::Import) } - fn get_known_kind( + fn get_known_mode( &self, specifier: &Url, media_type: MediaType, - ) -> Option { - self.get_known_kind_with_is_script(specifier, media_type, None) + ) -> Option { + self.get_known_mode_with_is_script(specifier, media_type, None) } - fn get_known_kind_with_is_script( + fn get_known_mode_with_is_script( &self, specifier: &Url, media_type: MediaType, is_script: Option, - ) -> Option { - self.is_cjs_resolver.get_known_kind_with_is_script( + ) -> Option { + self.is_cjs_resolver.get_known_mode_with_is_script( specifier, media_type, is_script, @@ -114,52 +113,56 @@ impl CjsTracker { } } -#[derive(Debug)] -pub struct IsCjsResolverOptions { - pub detect_cjs: bool, - pub is_node_main: bool, +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum IsCjsResolutionMode { + /// Requires an explicit `"type": "commonjs"` in the package.json. + ExplicitTypeCommonJs, + /// Implicitly uses `"type": "commonjs"` if no `"type"` is specified. + ImplicitTypeCommonJs, + /// Does not respect `"type": "commonjs"` and always treats ambiguous files as ESM. + Disabled, } /// Resolves whether a module is CJS or ESM. #[derive(Debug)] -pub struct IsCjsResolver { - in_npm_pkg_checker: Arc, - pkg_json_resolver: Arc>, - options: IsCjsResolverOptions, +pub struct IsCjsResolver { + in_npm_pkg_checker: InNpmPackageCheckerRc, + pkg_json_resolver: PackageJsonResolverRc, + mode: IsCjsResolutionMode, } -impl IsCjsResolver { +impl IsCjsResolver { pub fn new( - in_npm_pkg_checker: Arc, - pkg_json_resolver: Arc>, - options: IsCjsResolverOptions, + in_npm_pkg_checker: InNpmPackageCheckerRc, + pkg_json_resolver: PackageJsonResolverRc, + mode: IsCjsResolutionMode, ) -> Self { Self { in_npm_pkg_checker, pkg_json_resolver, - options, + mode, } } - /// Gets the referrer kind for a script in the LSP. - pub fn get_lsp_referrer_kind( + /// Gets the resolution mode for a module in the LSP. + pub fn get_lsp_resolution_mode( &self, specifier: &Url, is_script: Option, - ) -> NodeModuleKind { + ) -> ResolutionMode { if specifier.scheme() != "file" { - return NodeModuleKind::Esm; + return ResolutionMode::Import; } match MediaType::from_specifier(specifier) { - MediaType::Mts | MediaType::Mjs | MediaType::Dmts => NodeModuleKind::Esm, - MediaType::Cjs | MediaType::Cts | MediaType::Dcts => NodeModuleKind::Cjs, + MediaType::Mts | MediaType::Mjs | MediaType::Dmts => ResolutionMode::Import, + MediaType::Cjs | MediaType::Cts | MediaType::Dcts => ResolutionMode::Require, MediaType::Dts => { // dts files are always determined based on the package.json because // they contain imports/exports even when considered CJS - self.check_based_on_pkg_json(specifier).unwrap_or(NodeModuleKind::Esm) + self.check_based_on_pkg_json(specifier).unwrap_or(ResolutionMode::Import) } MediaType::Wasm | - MediaType::Json => NodeModuleKind::Esm, + MediaType::Json => ResolutionMode::Import, MediaType::JavaScript | MediaType::Jsx | MediaType::TypeScript @@ -169,27 +172,27 @@ impl IsCjsResolver { | MediaType::SourceMap | MediaType::Unknown => { match is_script { - Some(true) => self.check_based_on_pkg_json(specifier).unwrap_or(NodeModuleKind::Esm), - Some(false) | None => NodeModuleKind::Esm, + Some(true) => self.check_based_on_pkg_json(specifier).unwrap_or(ResolutionMode::Import), + Some(false) | None => ResolutionMode::Import, } } } } - fn get_known_kind_with_is_script( + fn get_known_mode_with_is_script( &self, specifier: &Url, media_type: MediaType, is_script: Option, - known_cache: &DashMap, - ) -> Option { + known_cache: &MaybeDashMap, + ) -> Option { if specifier.scheme() != "file" { - return Some(NodeModuleKind::Esm); + return Some(ResolutionMode::Import); } match media_type { - MediaType::Mts | MediaType::Mjs | MediaType::Dmts => Some(NodeModuleKind::Esm), - MediaType::Cjs | MediaType::Cts | MediaType::Dcts => Some(NodeModuleKind::Cjs), + MediaType::Mts | MediaType::Mjs | MediaType::Dmts => Some(ResolutionMode::Import), + MediaType::Cjs | MediaType::Cts | MediaType::Dcts => Some(ResolutionMode::Require), MediaType::Dts => { // dts files are always determined based on the package.json because // they contain imports/exports even when considered CJS @@ -200,11 +203,11 @@ impl IsCjsResolver { if let Some(value) = value { known_cache.insert(specifier.clone(), value); } - Some(value.unwrap_or(NodeModuleKind::Esm)) + Some(value.unwrap_or(ResolutionMode::Import)) } } MediaType::Wasm | - MediaType::Json => Some(NodeModuleKind::Esm), + MediaType::Json => Some(ResolutionMode::Import), MediaType::JavaScript | MediaType::Jsx | MediaType::TypeScript @@ -214,17 +217,17 @@ impl IsCjsResolver { | MediaType::SourceMap | MediaType::Unknown => { if let Some(value) = known_cache.get(specifier).map(|v| *v) { - if value == NodeModuleKind::Cjs && is_script == Some(false) { + if value == ResolutionMode::Require && is_script == Some(false) { // we now know this is actually esm - known_cache.insert(specifier.clone(), NodeModuleKind::Esm); - Some(NodeModuleKind::Esm) + known_cache.insert(specifier.clone(), ResolutionMode::Import); + Some(ResolutionMode::Import) } else { Some(value) } } else if is_script == Some(false) { // we know this is esm - known_cache.insert(specifier.clone(), NodeModuleKind::Esm); - Some(NodeModuleKind::Esm) + known_cache.insert(specifier.clone(), ResolutionMode::Import); + Some(ResolutionMode::Import) } else { None } @@ -235,38 +238,39 @@ impl IsCjsResolver { fn check_based_on_pkg_json( &self, specifier: &Url, - ) -> Result { + ) -> Result { if self.in_npm_pkg_checker.in_npm_package(specifier) { if let Some(pkg_json) = self.pkg_json_resolver.get_closest_package_json(specifier)? { let is_file_location_cjs = pkg_json.typ != "module"; Ok(if is_file_location_cjs { - NodeModuleKind::Cjs + ResolutionMode::Require } else { - NodeModuleKind::Esm + ResolutionMode::Import }) } else { - Ok(NodeModuleKind::Cjs) + Ok(ResolutionMode::Require) } - } else if self.options.detect_cjs || self.options.is_node_main { + } else if self.mode != IsCjsResolutionMode::Disabled { if let Some(pkg_json) = self.pkg_json_resolver.get_closest_package_json(specifier)? { let is_cjs_type = pkg_json.typ == "commonjs" - || self.options.is_node_main && pkg_json.typ == "none"; + || self.mode == IsCjsResolutionMode::ImplicitTypeCommonJs + && pkg_json.typ == "none"; Ok(if is_cjs_type { - NodeModuleKind::Cjs + ResolutionMode::Require } else { - NodeModuleKind::Esm + ResolutionMode::Import }) - } else if self.options.is_node_main { - Ok(NodeModuleKind::Cjs) + } else if self.mode == IsCjsResolutionMode::ImplicitTypeCommonJs { + Ok(ResolutionMode::Require) } else { - Ok(NodeModuleKind::Esm) + Ok(ResolutionMode::Import) } } else { - Ok(NodeModuleKind::Esm) + Ok(ResolutionMode::Import) } } } diff --git a/resolvers/deno/clippy.toml b/resolvers/deno/clippy.toml index 733ac83da1821e..886ba3fd1ac034 100644 --- a/resolvers/deno/clippy.toml +++ b/resolvers/deno/clippy.toml @@ -47,6 +47,5 @@ disallowed-methods = [ { path = "url::Url::from_directory_path", reason = "Use deno_path_util instead so it works in Wasm" }, ] disallowed-types = [ - # todo(dsherret): consider for the future - # { path = "std::sync::Arc", reason = "use crate::sync::MaybeArc instead" }, + { path = "std::sync::Arc", reason = "use crate::sync::MaybeArc instead" }, ] diff --git a/resolvers/deno/fs.rs b/resolvers/deno/fs.rs deleted file mode 100644 index 4929f4508e9773..00000000000000 --- a/resolvers/deno/fs.rs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. - -use std::path::Path; -use std::path::PathBuf; - -pub struct DirEntry { - pub name: String, - pub is_file: bool, - pub is_directory: bool, -} - -pub trait DenoResolverFs { - fn read_to_string_lossy(&self, path: &Path) -> std::io::Result; - fn realpath_sync(&self, path: &Path) -> std::io::Result; - fn exists_sync(&self, path: &Path) -> bool; - fn is_dir_sync(&self, path: &Path) -> bool; - fn read_dir_sync(&self, dir_path: &Path) -> std::io::Result>; -} diff --git a/resolvers/deno/lib.rs b/resolvers/deno/lib.rs index 303a8271026816..ab01f397fb7bda 100644 --- a/resolvers/deno/lib.rs +++ b/resolvers/deno/lib.rs @@ -1,10 +1,9 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. #![deny(clippy::print_stderr)] #![deny(clippy::print_stdout)] use std::path::PathBuf; -use std::sync::Arc; use boxed_error::Boxed; use deno_config::workspace::MappedResolution; @@ -15,31 +14,37 @@ use deno_config::workspace::WorkspaceResolver; use deno_package_json::PackageJsonDepValue; use deno_package_json::PackageJsonDepValueParseError; use deno_semver::npm::NpmPackageReqReference; -use fs::DenoResolverFs; -use node_resolver::env::NodeResolverEnv; use node_resolver::errors::NodeResolveError; use node_resolver::errors::PackageSubpathResolveError; -use node_resolver::InNpmPackageChecker; -use node_resolver::NodeModuleKind; +use node_resolver::InNpmPackageCheckerRc; +use node_resolver::IsBuiltInNodeModuleChecker; use node_resolver::NodeResolution; -use node_resolver::NodeResolutionMode; -use node_resolver::NodeResolver; +use node_resolver::NodeResolutionKind; +use node_resolver::NodeResolverRc; +use node_resolver::ResolutionMode; use npm::MissingPackageNodeModulesFolderError; use npm::NodeModulesOutOfDateError; -use npm::NpmReqResolver; +use npm::NpmReqResolverRc; use npm::ResolveIfForNpmPackageErrorKind; use npm::ResolvePkgFolderFromDenoReqError; use npm::ResolveReqWithSubPathErrorKind; use sloppy_imports::SloppyImportResolverFs; -use sloppy_imports::SloppyImportsResolutionMode; -use sloppy_imports::SloppyImportsResolver; +use sloppy_imports::SloppyImportsResolutionKind; +use sloppy_imports::SloppyImportsResolverRc; +use sys_traits::FsCanonicalize; +use sys_traits::FsMetadata; +use sys_traits::FsRead; +use sys_traits::FsReadDir; use thiserror::Error; use url::Url; pub mod cjs; -pub mod fs; pub mod npm; pub mod sloppy_imports; +mod sync; + +#[allow(clippy::disallowed_types)] +pub type WorkspaceResolverRc = crate::sync::MaybeArc; #[derive(Debug, Clone)] pub struct DenoResolution { @@ -77,25 +82,25 @@ pub enum DenoResolveErrorKind { #[derive(Debug)] pub struct NodeAndNpmReqResolver< - Fs: DenoResolverFs, - TNodeResolverEnv: NodeResolverEnv, + TIsBuiltInNodeModuleChecker: IsBuiltInNodeModuleChecker, + TSys: FsCanonicalize + FsMetadata + FsRead + FsReadDir, > { - pub node_resolver: Arc>, - pub npm_req_resolver: Arc>, + pub node_resolver: NodeResolverRc, + pub npm_req_resolver: NpmReqResolverRc, } pub struct DenoResolverOptions< 'a, - Fs: DenoResolverFs, - TNodeResolverEnv: NodeResolverEnv, + TIsBuiltInNodeModuleChecker: IsBuiltInNodeModuleChecker, TSloppyImportResolverFs: SloppyImportResolverFs, + TSys: FsCanonicalize + FsMetadata + FsRead + FsReadDir, > { - pub in_npm_pkg_checker: Arc, + pub in_npm_pkg_checker: InNpmPackageCheckerRc, pub node_and_req_resolver: - Option>, + Option>, pub sloppy_imports_resolver: - Option>>, - pub workspace_resolver: Arc, + Option>, + pub workspace_resolver: WorkspaceResolverRc, /// Whether "bring your own node_modules" is enabled where Deno does not /// setup the node_modules directories automatically, but instead uses /// what already exists on the file system. @@ -107,27 +112,32 @@ pub struct DenoResolverOptions< /// import map, JSX settings. #[derive(Debug)] pub struct DenoResolver< - Fs: DenoResolverFs, - TNodeResolverEnv: NodeResolverEnv, + TIsBuiltInNodeModuleChecker: IsBuiltInNodeModuleChecker, TSloppyImportResolverFs: SloppyImportResolverFs, + TSys: FsCanonicalize + FsMetadata + FsRead + FsReadDir, > { - in_npm_pkg_checker: Arc, - node_and_npm_resolver: Option>, + in_npm_pkg_checker: InNpmPackageCheckerRc, + node_and_npm_resolver: + Option>, sloppy_imports_resolver: - Option>>, - workspace_resolver: Arc, + Option>, + workspace_resolver: WorkspaceResolverRc, is_byonm: bool, maybe_vendor_specifier: Option, } impl< - Fs: DenoResolverFs, - TNodeResolverEnv: NodeResolverEnv, + TIsBuiltInNodeModuleChecker: IsBuiltInNodeModuleChecker, TSloppyImportResolverFs: SloppyImportResolverFs, - > DenoResolver + TSys: FsCanonicalize + FsMetadata + FsRead + FsReadDir, + > DenoResolver { pub fn new( - options: DenoResolverOptions, + options: DenoResolverOptions< + TIsBuiltInNodeModuleChecker, + TSloppyImportResolverFs, + TSys, + >, ) -> Self { Self { in_npm_pkg_checker: options.in_npm_pkg_checker, @@ -145,8 +155,8 @@ impl< &self, raw_specifier: &str, referrer: &Url, - referrer_kind: NodeModuleKind, - mode: NodeResolutionMode, + resolution_mode: ResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { let mut found_package_json_dep = false; let mut maybe_diagnostic = None; @@ -157,7 +167,7 @@ impl< && self.in_npm_pkg_checker.in_npm_package(referrer) { return node_resolver - .resolve(raw_specifier, referrer, referrer_kind, mode) + .resolve(raw_specifier, referrer, resolution_mode, resolution_kind) .map(|res| DenoResolution { url: res.into_url(), found_package_json_dep, @@ -189,12 +199,12 @@ impl< sloppy_imports_resolver .resolve( &specifier, - match mode { - NodeResolutionMode::Execution => { - SloppyImportsResolutionMode::Execution + match resolution_kind { + NodeResolutionKind::Execution => { + SloppyImportsResolutionKind::Execution } - NodeResolutionMode::Types => { - SloppyImportsResolutionMode::Types + NodeResolutionKind::Types => { + SloppyImportsResolutionKind::Types } }, ) @@ -221,8 +231,8 @@ impl< pkg_json.dir_path(), sub_path.as_deref(), Some(referrer), - referrer_kind, - mode, + resolution_mode, + resolution_kind, ) .map_err(|e| e.into()), MappedResolution::PackageJson { @@ -272,8 +282,8 @@ impl< pkg_folder, sub_path.as_deref(), Some(referrer), - referrer_kind, - mode, + resolution_mode, + resolution_kind, ) .map_err(|e| { DenoResolveErrorKind::PackageSubpathResolve(e).into_box() @@ -328,8 +338,8 @@ impl< pkg_folder, npm_req_ref.sub_path(), Some(referrer), - referrer_kind, - mode, + resolution_mode, + resolution_kind, ) .map(|url| DenoResolution { url, @@ -345,8 +355,8 @@ impl< .resolve_req_reference( &npm_req_ref, referrer, - referrer_kind, - mode, + resolution_mode, + resolution_kind, ) .map(|url| DenoResolution { url, @@ -355,16 +365,16 @@ impl< }) .map_err(|err| { match err.into_kind() { - ResolveReqWithSubPathErrorKind::MissingPackageNodeModulesFolder( - err, - ) => err.into(), - ResolveReqWithSubPathErrorKind::ResolvePkgFolderFromDenoReq( - err, - ) => err.into(), - ResolveReqWithSubPathErrorKind::PackageSubpathResolve(err) => { - err.into() + ResolveReqWithSubPathErrorKind::MissingPackageNodeModulesFolder( + err, + ) => err.into(), + ResolveReqWithSubPathErrorKind::ResolvePkgFolderFromDenoReq( + err, + ) => err.into(), + ResolveReqWithSubPathErrorKind::PackageSubpathResolve(err) => { + err.into() + } } - } }); } } @@ -384,8 +394,8 @@ impl< .resolve_if_for_npm_pkg( raw_specifier, referrer, - referrer_kind, - mode, + resolution_mode, + resolution_kind, ) .map_err(|e| match e.into_kind() { ResolveIfForNpmPackageErrorKind::NodeResolve(e) => { diff --git a/resolvers/deno/npm/byonm.rs b/resolvers/deno/npm/byonm.rs index e9182d47a1fdb4..3ceec368add81f 100644 --- a/resolvers/deno/npm/byonm.rs +++ b/resolvers/deno/npm/byonm.rs @@ -1,16 +1,16 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::borrow::Cow; use std::path::Path; use std::path::PathBuf; -use std::sync::Arc; use deno_package_json::PackageJson; use deno_package_json::PackageJsonDepValue; +use deno_package_json::PackageJsonRc; use deno_path_util::url_to_file_path; use deno_semver::package::PackageReq; +use deno_semver::StackString; use deno_semver::Version; -use node_resolver::env::NodeResolverEnv; use node_resolver::errors::PackageFolderResolveError; use node_resolver::errors::PackageFolderResolveIoError; use node_resolver::errors::PackageJsonLoadError; @@ -18,11 +18,14 @@ use node_resolver::errors::PackageNotFoundError; use node_resolver::InNpmPackageChecker; use node_resolver::NpmPackageFolderResolver; use node_resolver::PackageJsonResolverRc; +use sys_traits::FsCanonicalize; +use sys_traits::FsDirEntry; +use sys_traits::FsMetadata; +use sys_traits::FsRead; +use sys_traits::FsReadDir; use thiserror::Error; use url::Url; -use crate::fs::DenoResolverFs; - use super::local::normalize_pkg_name_for_node_modules_deno_folder; use super::CliNpmReqResolver; use super::ResolvePkgFolderFromDenoReqError; @@ -30,7 +33,7 @@ use super::ResolvePkgFolderFromDenoReqError; #[derive(Debug, Error)] pub enum ByonmResolvePkgFolderFromDenoReqError { #[error("Could not find \"{}\" in a node_modules folder. Deno expects the node_modules/ directory to be up to date. Did you forget to run `deno install`?", .0)] - MissingAlias(String), + MissingAlias(StackString), #[error(transparent)] PackageJson(#[from] PackageJsonLoadError), #[error("Could not find a matching package for 'npm:{}' in the node_modules directory. Ensure you have all your JSR and npm dependencies listed in your deno.json or package.json, then run `deno install`. Alternatively, turn on auto-install by specifying `\"nodeModulesDir\": \"auto\"` in your deno.json file.", .0)] @@ -39,40 +42,45 @@ pub enum ByonmResolvePkgFolderFromDenoReqError { Io(#[from] std::io::Error), } -pub struct ByonmNpmResolverCreateOptions< - Fs: DenoResolverFs, - TEnv: NodeResolverEnv, -> { +pub struct ByonmNpmResolverCreateOptions { // todo(dsherret): investigate removing this pub root_node_modules_dir: Option, - pub fs: Fs, - pub pkg_json_resolver: PackageJsonResolverRc, + pub sys: TSys, + pub pkg_json_resolver: PackageJsonResolverRc, } +#[allow(clippy::disallowed_types)] +pub type ByonmNpmResolverRc = + crate::sync::MaybeArc>; + #[derive(Debug)] -pub struct ByonmNpmResolver { - fs: Fs, - pkg_json_resolver: PackageJsonResolverRc, +pub struct ByonmNpmResolver< + TSys: FsCanonicalize + FsRead + FsMetadata + FsReadDir, +> { + sys: TSys, + pkg_json_resolver: PackageJsonResolverRc, root_node_modules_dir: Option, } -impl Clone - for ByonmNpmResolver +impl Clone + for ByonmNpmResolver { fn clone(&self) -> Self { Self { - fs: self.fs.clone(), + sys: self.sys.clone(), pkg_json_resolver: self.pkg_json_resolver.clone(), root_node_modules_dir: self.root_node_modules_dir.clone(), } } } -impl ByonmNpmResolver { - pub fn new(options: ByonmNpmResolverCreateOptions) -> Self { +impl + ByonmNpmResolver +{ + pub fn new(options: ByonmNpmResolverCreateOptions) -> Self { Self { root_node_modules_dir: options.root_node_modules_dir, - fs: options.fs, + sys: options.sys, pkg_json_resolver: options.pkg_json_resolver, } } @@ -84,7 +92,7 @@ impl ByonmNpmResolver { fn load_pkg_json( &self, path: &Path, - ) -> Result>, PackageJsonLoadError> { + ) -> Result, PackageJsonLoadError> { self.pkg_json_resolver.load_package_json(path) } @@ -93,7 +101,7 @@ impl ByonmNpmResolver { &self, dep_name: &str, referrer: &Url, - ) -> Option> { + ) -> Option { let referrer_path = url_to_file_path(referrer).ok()?; let mut current_folder = referrer_path.parent()?; loop { @@ -124,19 +132,20 @@ impl ByonmNpmResolver { req: &PackageReq, referrer: &Url, ) -> Result { - fn node_resolve_dir( - fs: &Fs, + fn node_resolve_dir( + sys: &TSys, alias: &str, start_dir: &Path, ) -> std::io::Result> { for ancestor in start_dir.ancestors() { let node_modules_folder = ancestor.join("node_modules"); let sub_dir = join_package_name(&node_modules_folder, alias); - if fs.is_dir_sync(&sub_dir) { - return Ok(Some(deno_path_util::canonicalize_path_maybe_not_exists( - &sub_dir, - &|path| fs.realpath_sync(path), - )?)); + if sys.fs_is_dir_no_err(&sub_dir) { + return Ok(Some( + deno_path_util::fs::canonicalize_path_maybe_not_exists( + sys, &sub_dir, + )?, + )); } } Ok(None) @@ -149,7 +158,7 @@ impl ByonmNpmResolver { Some((pkg_json, alias)) => { // now try node resolution if let Some(resolved) = - node_resolve_dir(&self.fs, &alias, pkg_json.dir_path())? + node_resolve_dir(&self.sys, &alias, pkg_json.dir_path())? { return Ok(resolved); } @@ -173,25 +182,29 @@ impl ByonmNpmResolver { &self, req: &PackageReq, referrer: &Url, - ) -> Result, String)>, PackageJsonLoadError> { + ) -> Result, PackageJsonLoadError> { fn resolve_alias_from_pkg_json( req: &PackageReq, pkg_json: &PackageJson, - ) -> Option { + ) -> Option { let deps = pkg_json.resolve_local_package_json_deps(); - for (key, value) in deps { + for (key, value) in + deps.dependencies.iter().chain(deps.dev_dependencies.iter()) + { if let Ok(value) = value { match value { PackageJsonDepValue::Req(dep_req) => { if dep_req.name == req.name && dep_req.version_req.intersects(&req.version_req) { - return Some(key); + return Some(key.clone()); } } PackageJsonDepValue::Workspace(_workspace) => { - if key == req.name && req.version_req.tag() == Some("workspace") { - return Some(key); + if key.as_str() == req.name + && req.version_req.tag() == Some("workspace") + { + return Some(key.clone()); } } } @@ -201,9 +214,9 @@ impl ByonmNpmResolver { } // attempt to resolve the npm specifier from the referrer's package.json, - if let Ok(file_path) = url_to_file_path(referrer) { - let mut current_path = file_path.as_path(); - while let Some(dir_path) = current_path.parent() { + let maybe_referrer_path = url_to_file_path(referrer).ok(); + if let Some(file_path) = maybe_referrer_path { + for dir_path in file_path.as_path().ancestors().skip(1) { let package_json_path = dir_path.join("package.json"); if let Some(pkg_json) = self.load_pkg_json(&package_json_path)? { if let Some(alias) = @@ -212,11 +225,10 @@ impl ByonmNpmResolver { return Ok(Some((pkg_json, alias))); } } - current_path = dir_path; } } - // otherwise, fall fallback to the project's package.json + // fall fallback to the project's package.json if let Some(root_node_modules_dir) = &self.root_node_modules_dir { let root_pkg_json_path = root_node_modules_dir.parent().unwrap().join("package.json"); @@ -228,6 +240,58 @@ impl ByonmNpmResolver { } } + // now try to resolve based on the closest node_modules directory + let maybe_referrer_path = url_to_file_path(referrer).ok(); + let search_node_modules = |node_modules: &Path| { + if req.version_req.tag().is_some() { + return None; + } + + let pkg_folder = node_modules.join(&req.name); + if let Ok(Some(dep_pkg_json)) = + self.load_pkg_json(&pkg_folder.join("package.json")) + { + if dep_pkg_json.name.as_deref() == Some(req.name.as_str()) { + let matches_req = dep_pkg_json + .version + .as_ref() + .and_then(|v| Version::parse_from_npm(v).ok()) + .map(|version| req.version_req.matches(&version)) + .unwrap_or(true); + if matches_req { + return Some((dep_pkg_json, req.name.clone())); + } + } + } + None + }; + if let Some(file_path) = &maybe_referrer_path { + for dir_path in file_path.as_path().ancestors().skip(1) { + if let Some(result) = + search_node_modules(&dir_path.join("node_modules")) + { + return Ok(Some(result)); + } + } + } + + // and finally check the root node_modules directory + if let Some(root_node_modules_dir) = &self.root_node_modules_dir { + let already_searched = maybe_referrer_path + .as_ref() + .and_then(|referrer_path| { + root_node_modules_dir + .parent() + .map(|root_dir| referrer_path.starts_with(root_dir)) + }) + .unwrap_or(false); + if !already_searched { + if let Some(result) = search_node_modules(root_node_modules_dir) { + return Ok(Some(result)); + } + } + } + Ok(None) } @@ -238,7 +302,7 @@ impl ByonmNpmResolver { // now check if node_modules/.deno/ matches this constraint let root_node_modules_dir = self.root_node_modules_dir.as_ref()?; let node_modules_deno_dir = root_node_modules_dir.join(".deno"); - let Ok(entries) = self.fs.read_dir_sync(&node_modules_deno_dir) else { + let Ok(entries) = self.sys.fs_read_dir(&node_modules_deno_dir) else { return None; }; let search_prefix = format!( @@ -251,10 +315,17 @@ impl ByonmNpmResolver { // - @denotest+add@1.0.0 // - @denotest+add@1.0.0_1 for entry in entries { - if !entry.is_directory { + let Ok(entry) = entry else { + continue; + }; + let Ok(file_type) = entry.file_type() else { + continue; + }; + if !file_type.is_dir() { continue; } - let Some(version_and_copy_idx) = entry.name.strip_prefix(&search_prefix) + let entry_name = entry.file_name().to_string_lossy().into_owned(); + let Some(version_and_copy_idx) = entry_name.strip_prefix(&search_prefix) else { continue; }; @@ -267,8 +338,8 @@ impl ByonmNpmResolver { }; if let Some(tag) = req.version_req.tag() { let initialized_file = - node_modules_deno_dir.join(&entry.name).join(".initialized"); - let Ok(contents) = self.fs.read_to_string_lossy(&initialized_file) + node_modules_deno_dir.join(&entry_name).join(".initialized"); + let Ok(contents) = self.sys.fs_read_to_string_lossy(&initialized_file) else { continue; }; @@ -276,19 +347,19 @@ impl ByonmNpmResolver { if tags.any(|t| t == tag) { if let Some((best_version_version, _)) = &best_version { if version > *best_version_version { - best_version = Some((version, entry.name)); + best_version = Some((version, entry_name)); } } else { - best_version = Some((version, entry.name)); + best_version = Some((version, entry_name)); } } } else if req.version_req.matches(&version) { if let Some((best_version_version, _)) = &best_version { if version > *best_version_version { - best_version = Some((version, entry.name)); + best_version = Some((version, entry_name)); } } else { - best_version = Some((version, entry.name)); + best_version = Some((version, entry_name)); } } } @@ -303,9 +374,14 @@ impl ByonmNpmResolver { } impl< - Fs: DenoResolverFs + Send + Sync + std::fmt::Debug, - TEnv: NodeResolverEnv, - > CliNpmReqResolver for ByonmNpmResolver + Sys: FsCanonicalize + + FsMetadata + + FsRead + + FsReadDir + + Send + + Sync + + std::fmt::Debug, + > CliNpmReqResolver for ByonmNpmResolver { fn resolve_pkg_folder_from_deno_module_req( &self, @@ -320,17 +396,22 @@ impl< } impl< - Fs: DenoResolverFs + Send + Sync + std::fmt::Debug, - TEnv: NodeResolverEnv, - > NpmPackageFolderResolver for ByonmNpmResolver + Sys: FsCanonicalize + + FsMetadata + + FsRead + + FsReadDir + + Send + + Sync + + std::fmt::Debug, + > NpmPackageFolderResolver for ByonmNpmResolver { fn resolve_package_folder_from_package( &self, name: &str, referrer: &Url, ) -> Result { - fn inner( - fs: &Fs, + fn inner( + sys: &TSys, name: &str, referrer: &Url, ) -> Result { @@ -347,7 +428,7 @@ impl< }; let sub_dir = join_package_name(&node_modules_folder, name); - if fs.is_dir_sync(&sub_dir) { + if sys.fs_is_dir_no_err(&sub_dir) { return Ok(sub_dir); } } @@ -363,8 +444,8 @@ impl< ) } - let path = inner(&self.fs, name, referrer)?; - self.fs.realpath_sync(&path).map_err(|err| { + let path = inner(&self.sys, name, referrer)?; + self.sys.fs_canonicalize(&path).map_err(|err| { PackageFolderResolveIoError { package_name: name.to_string(), referrer: referrer.clone(), diff --git a/resolvers/deno/npm/local.rs b/resolvers/deno/npm/local.rs index aef476ad945bb0..6322a4b3f7938b 100644 --- a/resolvers/deno/npm/local.rs +++ b/resolvers/deno/npm/local.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::borrow::Cow; diff --git a/resolvers/deno/npm/mod.rs b/resolvers/deno/npm/mod.rs index 09e35b15c352cc..1501c059416a39 100644 --- a/resolvers/deno/npm/mod.rs +++ b/resolvers/deno/npm/mod.rs @@ -1,13 +1,17 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::fmt::Debug; use std::path::PathBuf; -use std::sync::Arc; use boxed_error::Boxed; +pub use byonm::ByonmInNpmPackageChecker; +pub use byonm::ByonmNpmResolver; +pub use byonm::ByonmNpmResolverCreateOptions; +pub use byonm::ByonmNpmResolverRc; +pub use byonm::ByonmResolvePkgFolderFromDenoReqError; use deno_semver::npm::NpmPackageReqReference; use deno_semver::package::PackageReq; -use node_resolver::env::NodeResolverEnv; +pub use local::normalize_pkg_name_for_node_modules_deno_folder; use node_resolver::errors::NodeResolveError; use node_resolver::errors::NodeResolveErrorKind; use node_resolver::errors::PackageFolderResolveErrorKind; @@ -15,22 +19,19 @@ use node_resolver::errors::PackageFolderResolveIoError; use node_resolver::errors::PackageNotFoundError; use node_resolver::errors::PackageResolveErrorKind; use node_resolver::errors::PackageSubpathResolveError; -use node_resolver::InNpmPackageChecker; -use node_resolver::NodeModuleKind; +use node_resolver::InNpmPackageCheckerRc; +use node_resolver::IsBuiltInNodeModuleChecker; use node_resolver::NodeResolution; -use node_resolver::NodeResolutionMode; -use node_resolver::NodeResolver; +use node_resolver::NodeResolutionKind; +use node_resolver::NodeResolverRc; +use node_resolver::ResolutionMode; +use sys_traits::FsCanonicalize; +use sys_traits::FsMetadata; +use sys_traits::FsRead; +use sys_traits::FsReadDir; use thiserror::Error; use url::Url; -use crate::fs::DenoResolverFs; - -pub use byonm::ByonmInNpmPackageChecker; -pub use byonm::ByonmNpmResolver; -pub use byonm::ByonmNpmResolverCreateOptions; -pub use byonm::ByonmResolvePkgFolderFromDenoReqError; -pub use local::normalize_pkg_name_for_node_modules_deno_folder; - mod byonm; mod local; @@ -81,6 +82,9 @@ pub enum ResolvePkgFolderFromDenoReqError { Byonm(#[from] ByonmResolvePkgFolderFromDenoReqError), } +#[allow(clippy::disallowed_types)] +pub type CliNpmReqResolverRc = crate::sync::MaybeArc; + // todo(dsherret): a temporary trait until we extract // out the CLI npm resolver into here pub trait CliNpmReqResolver: Debug + Send + Sync { @@ -92,36 +96,46 @@ pub trait CliNpmReqResolver: Debug + Send + Sync { } pub struct NpmReqResolverOptions< - Fs: DenoResolverFs, - TNodeResolverEnv: NodeResolverEnv, + TIsBuiltInNodeModuleChecker: IsBuiltInNodeModuleChecker, + TSys: FsCanonicalize + FsMetadata + FsRead + FsReadDir, > { /// The resolver when "bring your own node_modules" is enabled where Deno /// does not setup the node_modules directories automatically, but instead /// uses what already exists on the file system. - pub byonm_resolver: Option>>, - pub fs: Fs, - pub in_npm_pkg_checker: Arc, - pub node_resolver: Arc>, - pub npm_req_resolver: Arc, + pub byonm_resolver: Option>, + pub in_npm_pkg_checker: InNpmPackageCheckerRc, + pub node_resolver: NodeResolverRc, + pub npm_req_resolver: CliNpmReqResolverRc, + pub sys: TSys, } +#[allow(clippy::disallowed_types)] +pub type NpmReqResolverRc = + crate::sync::MaybeArc>; + #[derive(Debug)] -pub struct NpmReqResolver -{ - byonm_resolver: Option>>, - fs: Fs, - in_npm_pkg_checker: Arc, - node_resolver: Arc>, - npm_resolver: Arc, +pub struct NpmReqResolver< + TIsBuiltInNodeModuleChecker: IsBuiltInNodeModuleChecker, + TSys: FsCanonicalize + FsMetadata + FsRead + FsReadDir, +> { + byonm_resolver: Option>, + sys: TSys, + in_npm_pkg_checker: InNpmPackageCheckerRc, + node_resolver: NodeResolverRc, + npm_resolver: CliNpmReqResolverRc, } -impl - NpmReqResolver +impl< + TIsBuiltInNodeModuleChecker: IsBuiltInNodeModuleChecker, + TSys: FsCanonicalize + FsMetadata + FsRead + FsReadDir, + > NpmReqResolver { - pub fn new(options: NpmReqResolverOptions) -> Self { + pub fn new( + options: NpmReqResolverOptions, + ) -> Self { Self { byonm_resolver: options.byonm_resolver, - fs: options.fs, + sys: options.sys, in_npm_pkg_checker: options.in_npm_pkg_checker, node_resolver: options.node_resolver, npm_resolver: options.npm_req_resolver, @@ -132,15 +146,15 @@ impl &self, req_ref: &NpmPackageReqReference, referrer: &Url, - referrer_kind: NodeModuleKind, - mode: NodeResolutionMode, + resolution_mode: ResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { self.resolve_req_with_sub_path( req_ref.req(), req_ref.sub_path(), referrer, - referrer_kind, - mode, + resolution_mode, + resolution_kind, ) } @@ -149,8 +163,8 @@ impl req: &PackageReq, sub_path: Option<&str>, referrer: &Url, - referrer_kind: NodeModuleKind, - mode: NodeResolutionMode, + resolution_mode: ResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { let package_folder = self .npm_resolver @@ -160,15 +174,15 @@ impl &package_folder, sub_path, Some(referrer), - referrer_kind, - mode, + resolution_mode, + resolution_kind, ); match resolution_result { Ok(url) => Ok(url), Err(err) => { if self.byonm_resolver.is_some() { let package_json_path = package_folder.join("package.json"); - if !self.fs.exists_sync(&package_json_path) { + if !self.sys.fs_exists_no_err(&package_json_path) { return Err( MissingPackageNodeModulesFolderError { package_json_path }.into(), ); @@ -183,13 +197,15 @@ impl &self, specifier: &str, referrer: &Url, - referrer_kind: NodeModuleKind, - mode: NodeResolutionMode, + resolution_mode: ResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result, ResolveIfForNpmPackageError> { - let resolution_result = - self - .node_resolver - .resolve(specifier, referrer, referrer_kind, mode); + let resolution_result = self.node_resolver.resolve( + specifier, + referrer, + resolution_mode, + resolution_kind, + ); match resolution_result { Ok(res) => Ok(Some(res)), Err(err) => { diff --git a/resolvers/deno/sloppy_imports.rs b/resolvers/deno/sloppy_imports.rs index 7aba5b771a5ef9..b6fbf487dd1764 100644 --- a/resolvers/deno/sloppy_imports.rs +++ b/resolvers/deno/sloppy_imports.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::borrow::Cow; use std::path::Path; @@ -80,16 +80,16 @@ impl SloppyImportsResolution { /// The kind of resolution currently being done. #[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub enum SloppyImportsResolutionMode { +pub enum SloppyImportsResolutionKind { /// Resolving for code that will be executed. Execution, /// Resolving for code that will be used for type information. Types, } -impl SloppyImportsResolutionMode { +impl SloppyImportsResolutionKind { pub fn is_types(&self) -> bool { - *self == SloppyImportsResolutionMode::Types + *self == SloppyImportsResolutionKind::Types } } @@ -101,6 +101,10 @@ pub trait SloppyImportResolverFs { } } +#[allow(clippy::disallowed_types)] +pub type SloppyImportsResolverRc = + crate::sync::MaybeArc>; + #[derive(Debug)] pub struct SloppyImportsResolver { fs: Fs, @@ -114,7 +118,7 @@ impl SloppyImportsResolver { pub fn resolve( &self, specifier: &Url, - mode: SloppyImportsResolutionMode, + resolution_kind: SloppyImportsResolutionKind, ) -> Option { fn path_without_ext( path: &Path, @@ -167,7 +171,7 @@ impl SloppyImportsResolver { let probe_paths: Vec<(PathBuf, SloppyImportsResolutionReason)> = match self.fs.stat_sync(&path) { Some(SloppyImportsFsEntry::File) => { - if mode.is_types() { + if resolution_kind.is_types() { let media_type = MediaType::from_specifier(specifier); // attempt to resolve the .d.ts file before the .js file let probe_media_type_types = match media_type { @@ -197,7 +201,7 @@ impl SloppyImportsResolver { let media_type = MediaType::from_specifier(specifier); let probe_media_type_types = match media_type { MediaType::JavaScript => ( - if mode.is_types() { + if resolution_kind.is_types() { vec![MediaType::TypeScript, MediaType::Tsx, MediaType::Dts] } else { vec![MediaType::TypeScript, MediaType::Tsx] @@ -208,7 +212,7 @@ impl SloppyImportsResolver { (vec![MediaType::Tsx], SloppyImportsResolutionReason::JsToTs) } MediaType::Mjs => ( - if mode.is_types() { + if resolution_kind.is_types() { vec![MediaType::Mts, MediaType::Dmts, MediaType::Dts] } else { vec![MediaType::Mts] @@ -216,7 +220,7 @@ impl SloppyImportsResolver { SloppyImportsResolutionReason::JsToTs, ), MediaType::Cjs => ( - if mode.is_types() { + if resolution_kind.is_types() { vec![MediaType::Cts, MediaType::Dcts, MediaType::Dts] } else { vec![MediaType::Cts] @@ -237,7 +241,7 @@ impl SloppyImportsResolver { return None; } MediaType::Unknown => ( - if mode.is_types() { + if resolution_kind.is_types() { vec![ MediaType::TypeScript, MediaType::Tsx, @@ -274,7 +278,7 @@ impl SloppyImportsResolver { if matches!(entry, Some(SloppyImportsFsEntry::Dir)) { // try to resolve at the index file - if mode.is_types() { + if resolution_kind.is_types() { probe_paths.push(( path.join("index.ts"), SloppyImportsResolutionReason::Directory, @@ -373,16 +377,22 @@ mod test { #[test] fn test_unstable_sloppy_imports() { fn resolve(specifier: &Url) -> Option { - resolve_with_mode(specifier, SloppyImportsResolutionMode::Execution) + resolve_with_resolution_kind( + specifier, + SloppyImportsResolutionKind::Execution, + ) } fn resolve_types(specifier: &Url) -> Option { - resolve_with_mode(specifier, SloppyImportsResolutionMode::Types) + resolve_with_resolution_kind( + specifier, + SloppyImportsResolutionKind::Types, + ) } - fn resolve_with_mode( + fn resolve_with_resolution_kind( specifier: &Url, - mode: SloppyImportsResolutionMode, + resolution_kind: SloppyImportsResolutionKind, ) -> Option { struct RealSloppyImportsResolverFs; impl SloppyImportResolverFs for RealSloppyImportsResolverFs { @@ -400,7 +410,7 @@ mod test { } SloppyImportsResolver::new(RealSloppyImportsResolverFs) - .resolve(specifier, mode) + .resolve(specifier, resolution_kind) } let context = TestContext::default(); diff --git a/resolvers/deno/sync.rs b/resolvers/deno/sync.rs new file mode 100644 index 00000000000000..43635e62b79e83 --- /dev/null +++ b/resolvers/deno/sync.rs @@ -0,0 +1,48 @@ +// Copyright 2018-2025 the Deno authors. MIT license. + +pub use inner::*; + +#[cfg(feature = "sync")] +mod inner { + #![allow(clippy::disallowed_types)] + + pub use std::sync::Arc as MaybeArc; + + pub use dashmap::DashMap as MaybeDashMap; +} + +#[cfg(not(feature = "sync"))] +mod inner { + use std::cell::Ref; + use std::cell::RefCell; + use std::collections::HashMap; + use std::hash::BuildHasher; + use std::hash::Hash; + use std::hash::RandomState; + pub use std::rc::Rc as MaybeArc; + + // Wrapper struct that exposes a subset of `DashMap` API. + #[derive(Debug)] + pub struct MaybeDashMap(RefCell>); + + impl Default for MaybeDashMap + where + K: Eq + Hash, + S: Default + BuildHasher + Clone, + { + fn default() -> Self { + Self(RefCell::new(Default::default())) + } + } + + impl MaybeDashMap { + pub fn get<'a>(&'a self, key: &K) -> Option> { + Ref::filter_map(self.0.borrow(), |map| map.get(key)).ok() + } + + pub fn insert(&self, key: K, value: V) -> Option { + let mut inner = self.0.borrow_mut(); + inner.insert(key, value) + } + } +} diff --git a/resolvers/node/Cargo.toml b/resolvers/node/Cargo.toml index eeac79c2566b9c..bdb0ba2ab1b920 100644 --- a/resolvers/node/Cargo.toml +++ b/resolvers/node/Cargo.toml @@ -1,8 +1,8 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "node_resolver" -version = "0.16.0" +version = "0.22.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -29,6 +29,7 @@ once_cell.workspace = true path-clean = "=0.1.0" regex.workspace = true serde_json.workspace = true +sys_traits.workspace = true thiserror.workspace = true tokio.workspace = true url.workspace = true diff --git a/resolvers/node/analyze.rs b/resolvers/node/analyze.rs index 9126890805d41c..a6ba3927aa2d18 100644 --- a/resolvers/node/analyze.rs +++ b/resolvers/node/analyze.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::borrow::Cow; use std::collections::BTreeSet; @@ -6,6 +6,8 @@ use std::collections::HashSet; use std::path::Path; use std::path::PathBuf; +use anyhow::Context; +use anyhow::Error as AnyError; use deno_path_util::url_from_file_path; use deno_path_util::url_to_file_path; use futures::future::LocalBoxFuture; @@ -13,19 +15,19 @@ use futures::stream::FuturesUnordered; use futures::FutureExt; use futures::StreamExt; use once_cell::sync::Lazy; - -use anyhow::Context; -use anyhow::Error as AnyError; +use sys_traits::FsCanonicalize; +use sys_traits::FsMetadata; +use sys_traits::FsRead; use url::Url; -use crate::env::NodeResolverEnv; use crate::npm::InNpmPackageCheckerRc; use crate::resolution::NodeResolverRc; -use crate::NodeModuleKind; -use crate::NodeResolutionMode; +use crate::IsBuiltInNodeModuleChecker; +use crate::NodeResolutionKind; use crate::NpmPackageFolderResolverRc; use crate::PackageJsonResolverRc; use crate::PathClean; +use crate::ResolutionMode; #[derive(Debug, Clone)] pub enum CjsAnalysis<'a> { @@ -60,34 +62,38 @@ pub trait CjsCodeAnalyzer { pub struct NodeCodeTranslator< TCjsCodeAnalyzer: CjsCodeAnalyzer, - TNodeResolverEnv: NodeResolverEnv, + TIsBuiltInNodeModuleChecker: IsBuiltInNodeModuleChecker, + TSys: FsCanonicalize + FsMetadata + FsRead, > { cjs_code_analyzer: TCjsCodeAnalyzer, - env: TNodeResolverEnv, in_npm_pkg_checker: InNpmPackageCheckerRc, - node_resolver: NodeResolverRc, + node_resolver: NodeResolverRc, npm_resolver: NpmPackageFolderResolverRc, - pkg_json_resolver: PackageJsonResolverRc, + pkg_json_resolver: PackageJsonResolverRc, + sys: TSys, } -impl - NodeCodeTranslator +impl< + TCjsCodeAnalyzer: CjsCodeAnalyzer, + TIsBuiltInNodeModuleChecker: IsBuiltInNodeModuleChecker, + TSys: FsCanonicalize + FsMetadata + FsRead, + > NodeCodeTranslator { pub fn new( cjs_code_analyzer: TCjsCodeAnalyzer, - env: TNodeResolverEnv, in_npm_pkg_checker: InNpmPackageCheckerRc, - node_resolver: NodeResolverRc, + node_resolver: NodeResolverRc, npm_resolver: NpmPackageFolderResolverRc, - pkg_json_resolver: PackageJsonResolverRc, + pkg_json_resolver: PackageJsonResolverRc, + sys: TSys, ) -> Self { Self { cjs_code_analyzer, - env, in_npm_pkg_checker, node_resolver, npm_resolver, pkg_json_resolver, + sys, } } @@ -162,7 +168,7 @@ impl add_export( &mut source, export, - &format!("mod[\"{}\"]", escape_for_double_quote_string(export)), + &format!("mod[{}]", to_double_quote_string(export)), &mut temp_var_count, ); } @@ -209,7 +215,7 @@ impl // FIXME(bartlomieju): check if these conditions are okay, probably // should be `deno-require`, because `deno` is already used in `esm_resolver.rs` &["deno", "node", "require", "default"], - NodeResolutionMode::Execution, + NodeResolutionKind::Execution, ); let reexport_specifier = match result { Ok(Some(specifier)) => specifier, @@ -303,7 +309,7 @@ impl specifier: &str, referrer: &Url, conditions: &[&str], - mode: NodeResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result, AnyError> { if specifier.starts_with('/') { todo!(); @@ -354,9 +360,9 @@ impl &package_subpath, exports, Some(referrer), - NodeModuleKind::Esm, + ResolutionMode::Import, conditions, - mode, + resolution_kind, ) .map_err(AnyError::from), ) @@ -366,14 +372,16 @@ impl // old school if package_subpath != "." { let d = module_dir.join(package_subpath); - if self.env.is_dir_sync(&d) { + if self.sys.fs_is_dir_no_err(&d) { // subdir might have a package.json that specifies the entrypoint let package_json_path = d.join("package.json"); let maybe_package_json = self .pkg_json_resolver .load_package_json(&package_json_path)?; if let Some(package_json) = maybe_package_json { - if let Some(main) = package_json.main(NodeModuleKind::Cjs) { + if let Some(main) = + package_json.main(deno_package_json::NodeModuleKind::Cjs) + { return Ok(Some(url_from_file_path(&d.join(main).clean())?)); } } @@ -384,7 +392,9 @@ impl .file_extension_probe(d, &referrer_path) .and_then(|p| url_from_file_path(&p).map_err(AnyError::from)) .map(Some); - } else if let Some(main) = package_json.main(NodeModuleKind::Cjs) { + } else if let Some(main) = + package_json.main(deno_package_json::NodeModuleKind::Cjs) + { return Ok(Some(url_from_file_path(&module_dir.join(main).clean())?)); } else { return Ok(Some(url_from_file_path( @@ -419,13 +429,13 @@ impl referrer: &Path, ) -> Result { let p = p.clean(); - if self.env.exists_sync(&p) { + if self.sys.fs_exists_no_err(&p) { let file_name = p.file_name().unwrap(); let p_js = p.with_file_name(format!("{}.js", file_name.to_str().unwrap())); - if self.env.is_file_sync(&p_js) { + if self.sys.fs_is_file_no_err(&p_js) { return Ok(p_js); - } else if self.env.is_dir_sync(&p) { + } else if self.sys.fs_is_dir_no_err(&p) { return Ok(p.join("index.js")); } else { return Ok(p); @@ -434,14 +444,14 @@ impl { let p_js = p.with_file_name(format!("{}.js", file_name.to_str().unwrap())); - if self.env.is_file_sync(&p_js) { + if self.sys.fs_is_file_no_err(&p_js) { return Ok(p_js); } } { let p_json = p.with_file_name(format!("{}.json", file_name.to_str().unwrap())); - if self.env.is_file_sync(&p_json) { + if self.sys.fs_is_file_no_err(&p_json) { return Ok(p_json); } } @@ -557,8 +567,8 @@ fn add_export( "const __deno_export_{temp_var_count}__ = {initializer};" )); source.push(format!( - "export {{ __deno_export_{temp_var_count}__ as \"{}\" }};", - escape_for_double_quote_string(name) + "export {{ __deno_export_{temp_var_count}__ as {} }};", + to_double_quote_string(name) )); } else { source.push(format!("export const {name} = {initializer};")); @@ -616,14 +626,9 @@ fn not_found(path: &str, referrer: &Path) -> AnyError { std::io::Error::new(std::io::ErrorKind::NotFound, msg).into() } -fn escape_for_double_quote_string(text: &str) -> Cow { - // this should be rare, so doing a scan first before allocating is ok - if text.chars().any(|c| matches!(c, '"' | '\\')) { - // don't bother making this more complex for perf because it's rare - Cow::Owned(text.replace('\\', "\\\\").replace('"', "\\\"")) - } else { - Cow::Borrowed(text) - } +fn to_double_quote_string(text: &str) -> String { + // serde can handle this for us + serde_json::to_string(text).unwrap() } #[cfg(test)] @@ -661,4 +666,13 @@ mod tests { Some(("@some-package/core".to_string(), "./actions".to_string())) ); } + + #[test] + fn test_to_double_quote_string() { + assert_eq!(to_double_quote_string("test"), "\"test\""); + assert_eq!( + to_double_quote_string("\r\n\t\"test"), + "\"\\r\\n\\t\\\"test\"" + ); + } } diff --git a/resolvers/node/env.rs b/resolvers/node/env.rs deleted file mode 100644 index b520ece0f8d8dc..00000000000000 --- a/resolvers/node/env.rs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. - -use std::path::Path; -use std::path::PathBuf; - -use crate::sync::MaybeSend; -use crate::sync::MaybeSync; - -pub struct NodeResolverFsStat { - pub is_file: bool, - pub is_dir: bool, - pub is_symlink: bool, -} - -pub trait NodeResolverEnv: std::fmt::Debug + MaybeSend + MaybeSync { - fn is_builtin_node_module(&self, specifier: &str) -> bool; - - fn realpath_sync(&self, path: &Path) -> std::io::Result; - - fn stat_sync(&self, path: &Path) -> std::io::Result; - - fn exists_sync(&self, path: &Path) -> bool; - - fn is_file_sync(&self, path: &Path) -> bool { - self - .stat_sync(path) - .map(|stat| stat.is_file) - .unwrap_or(false) - } - - fn is_dir_sync(&self, path: &Path) -> bool { - self - .stat_sync(path) - .map(|stat| stat.is_dir) - .unwrap_or(false) - } - - fn pkg_json_fs(&self) -> &dyn deno_package_json::fs::DenoPkgJsonFs; -} diff --git a/resolvers/node/errors.rs b/resolvers/node/errors.rs index 0f332d2c931685..4157bd4c85ae07 100644 --- a/resolvers/node/errors.rs +++ b/resolvers/node/errors.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::borrow::Cow; use std::fmt::Write; @@ -8,8 +8,8 @@ use boxed_error::Boxed; use thiserror::Error; use url::Url; -use crate::NodeModuleKind; -use crate::NodeResolutionMode; +use crate::NodeResolutionKind; +use crate::ResolutionMode; #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] #[allow(non_camel_case_types)] @@ -203,24 +203,24 @@ pub enum PackageSubpathResolveErrorKind { maybe_referrer.as_ref().map(|r| format!( " from{} referrer {}", - match referrer_kind { - NodeModuleKind::Esm => "", - NodeModuleKind::Cjs => " cjs", + match resolution_mode { + ResolutionMode::Import => "", + ResolutionMode::Require => " cjs", }, r ) ).unwrap_or_default(), - match mode { - NodeResolutionMode::Execution => "", - NodeResolutionMode::Types => " for types", + match resolution_kind { + NodeResolutionKind::Execution => "", + NodeResolutionKind::Types => " for types", } )] pub struct PackageTargetNotFoundError { pub pkg_json_path: PathBuf, pub target: String, pub maybe_referrer: Option, - pub referrer_kind: NodeModuleKind, - pub mode: NodeResolutionMode, + pub resolution_mode: ResolutionMode, + pub resolution_kind: NodeResolutionKind, } impl NodeJsErrorCoded for PackageTargetNotFoundError { @@ -320,7 +320,6 @@ impl NodeJsErrorCoded for PackageJsonLoadError { impl NodeJsErrorCoded for ClosestPkgJsonError { fn code(&self) -> NodeJsErrorCode { match self.as_kind() { - ClosestPkgJsonErrorKind::CanonicalizingDir(e) => e.code(), ClosestPkgJsonErrorKind::Load(e) => e.code(), } } @@ -331,26 +330,10 @@ pub struct ClosestPkgJsonError(pub Box); #[derive(Debug, Error)] pub enum ClosestPkgJsonErrorKind { - #[error(transparent)] - CanonicalizingDir(#[from] CanonicalizingPkgJsonDirError), #[error(transparent)] Load(#[from] PackageJsonLoadError), } -#[derive(Debug, Error)] -#[error("[{}] Failed canonicalizing package.json directory '{}'.", self.code(), dir_path.display())] -pub struct CanonicalizingPkgJsonDirError { - pub dir_path: PathBuf, - #[source] - pub source: std::io::Error, -} - -impl NodeJsErrorCoded for CanonicalizingPkgJsonDirError { - fn code(&self) -> NodeJsErrorCode { - NodeJsErrorCode::ERR_MODULE_NOT_FOUND - } -} - // todo(https://github.com/denoland/deno_core/issues/810): make this a TypeError #[derive(Debug, Error)] #[error( @@ -586,7 +569,7 @@ pub struct PackagePathNotExportedError { pub pkg_json_path: PathBuf, pub subpath: String, pub maybe_referrer: Option, - pub mode: NodeResolutionMode, + pub resolution_kind: NodeResolutionKind, } impl NodeJsErrorCoded for PackagePathNotExportedError { @@ -603,9 +586,9 @@ impl std::fmt::Display for PackagePathNotExportedError { f.write_str(self.code().as_str())?; f.write_char(']')?; - let types_msg = match self.mode { - NodeResolutionMode::Execution => String::new(), - NodeResolutionMode::Types => " for types".to_string(), + let types_msg = match self.resolution_kind { + NodeResolutionKind::Execution => String::new(), + NodeResolutionKind::Types => " for types".to_string(), }; if self.subpath == "." { write!( @@ -678,7 +661,7 @@ mod test { pkg_json_path: PathBuf::from("test_path").join("package.json"), subpath: "./jsx-runtime".to_string(), maybe_referrer: None, - mode: NodeResolutionMode::Types + resolution_kind: NodeResolutionKind::Types }.to_string(), format!("[ERR_PACKAGE_PATH_NOT_EXPORTED] Package subpath './jsx-runtime' is not defined for types by \"exports\" in 'test_path{separator_char}package.json'") ); @@ -687,7 +670,7 @@ mod test { pkg_json_path: PathBuf::from("test_path").join("package.json"), subpath: ".".to_string(), maybe_referrer: None, - mode: NodeResolutionMode::Types + resolution_kind: NodeResolutionKind::Types }.to_string(), format!("[ERR_PACKAGE_PATH_NOT_EXPORTED] No \"exports\" main defined for types in 'test_path{separator_char}package.json'") ); diff --git a/resolvers/node/lib.rs b/resolvers/node/lib.rs index 87bd6299466b84..7d8c98eafcb00b 100644 --- a/resolvers/node/lib.rs +++ b/resolvers/node/lib.rs @@ -1,10 +1,9 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. #![deny(clippy::print_stderr)] #![deny(clippy::print_stdout)] pub mod analyze; -pub mod env; pub mod errors; mod npm; mod package_json; @@ -23,9 +22,11 @@ pub use package_json::PackageJsonThreadLocalCache; pub use path::PathClean; pub use resolution::parse_npm_pkg_name; pub use resolution::resolve_specifier_into_node_modules; -pub use resolution::NodeModuleKind; +pub use resolution::IsBuiltInNodeModuleChecker; pub use resolution::NodeResolution; -pub use resolution::NodeResolutionMode; +pub use resolution::NodeResolutionKind; pub use resolution::NodeResolver; +pub use resolution::NodeResolverRc; +pub use resolution::ResolutionMode; pub use resolution::DEFAULT_CONDITIONS; pub use resolution::REQUIRE_CONDITIONS; diff --git a/resolvers/node/npm.rs b/resolvers/node/npm.rs index ab3a1794262304..f799d6ddee9faa 100644 --- a/resolvers/node/npm.rs +++ b/resolvers/node/npm.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::path::Path; use std::path::PathBuf; diff --git a/resolvers/node/package_json.rs b/resolvers/node/package_json.rs index ae016ebe3ec3c8..2e1d5110bd9f3e 100644 --- a/resolvers/node/package_json.rs +++ b/resolvers/node/package_json.rs @@ -1,17 +1,16 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use deno_package_json::PackageJson; -use deno_package_json::PackageJsonRc; -use deno_path_util::strip_unc_prefix; use std::cell::RefCell; use std::collections::HashMap; use std::io::ErrorKind; use std::path::Path; use std::path::PathBuf; + +use deno_package_json::PackageJson; +use deno_package_json::PackageJsonRc; +use sys_traits::FsRead; use url::Url; -use crate::env::NodeResolverEnv; -use crate::errors::CanonicalizingPkgJsonDirError; use crate::errors::ClosestPkgJsonError; use crate::errors::PackageJsonLoadError; @@ -40,17 +39,17 @@ impl deno_package_json::PackageJsonCache for PackageJsonThreadLocalCache { } #[allow(clippy::disallowed_types)] -pub type PackageJsonResolverRc = - crate::sync::MaybeArc>; +pub type PackageJsonResolverRc = + crate::sync::MaybeArc>; #[derive(Debug)] -pub struct PackageJsonResolver { - env: TEnv, +pub struct PackageJsonResolver { + sys: TSys, } -impl PackageJsonResolver { - pub fn new(env: TEnv) -> Self { - Self { env } +impl PackageJsonResolver { + pub fn new(sys: TSys) -> Self { + Self { sys } } pub fn get_closest_package_json( @@ -60,44 +59,15 @@ impl PackageJsonResolver { let Ok(file_path) = deno_path_util::url_to_file_path(url) else { return Ok(None); }; - self.get_closest_package_json_from_path(&file_path) + self.get_closest_package_json_from_file_path(&file_path) } - pub fn get_closest_package_json_from_path( + pub fn get_closest_package_json_from_file_path( &self, file_path: &Path, ) -> Result, ClosestPkgJsonError> { - // we use this for deno compile using byonm because the script paths - // won't be in virtual file system, but the package.json paths will be - fn canonicalize_first_ancestor_exists( - dir_path: &Path, - env: &TEnv, - ) -> Result, std::io::Error> { - for ancestor in dir_path.ancestors() { - match env.realpath_sync(ancestor) { - Ok(dir_path) => return Ok(Some(dir_path)), - Err(err) if err.kind() == std::io::ErrorKind::NotFound => { - // keep searching - } - Err(err) => return Err(err), - } - } - Ok(None) - } - let parent_dir = file_path.parent().unwrap(); - let Some(start_dir) = canonicalize_first_ancestor_exists( - parent_dir, &self.env, - ) - .map_err(|source| CanonicalizingPkgJsonDirError { - dir_path: parent_dir.to_path_buf(), - source, - })? - else { - return Ok(None); - }; - let start_dir = strip_unc_prefix(start_dir); - for current_dir in start_dir.ancestors() { + for current_dir in parent_dir.ancestors() { let package_json_path = current_dir.join("package.json"); if let Some(pkg_json) = self.load_package_json(&package_json_path)? { return Ok(Some(pkg_json)); @@ -112,9 +82,9 @@ impl PackageJsonResolver { path: &Path, ) -> Result, PackageJsonLoadError> { let result = PackageJson::load_from_path( - path, - self.env.pkg_json_fs(), + &self.sys, Some(&PackageJsonThreadLocalCache), + path, ); match result { Ok(pkg_json) => Ok(Some(pkg_json)), diff --git a/resolvers/node/path.rs b/resolvers/node/path.rs index 8c2d35fadf3fad..525aeb36efbf19 100644 --- a/resolvers/node/path.rs +++ b/resolvers/node/path.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::path::Component; use std::path::Path; diff --git a/resolvers/node/resolution.rs b/resolvers/node/resolution.rs index 673a61abe6517a..d0b52213f336ad 100644 --- a/resolvers/node/resolution.rs +++ b/resolvers/node/resolution.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::borrow::Cow; use std::path::Path; @@ -6,12 +6,17 @@ use std::path::PathBuf; use anyhow::bail; use anyhow::Error as AnyError; +use deno_package_json::PackageJson; use deno_path_util::url_from_file_path; use serde_json::Map; use serde_json::Value; +use sys_traits::FileType; +use sys_traits::FsCanonicalize; +use sys_traits::FsMetadata; +use sys_traits::FsMetadataValue; +use sys_traits::FsRead; use url::Url; -use crate::env::NodeResolverEnv; use crate::errors; use crate::errors::DataUrlReferrerError; use crate::errors::FinalizeResolutionError; @@ -44,32 +49,35 @@ use crate::npm::InNpmPackageCheckerRc; use crate::NpmPackageFolderResolverRc; use crate::PackageJsonResolverRc; use crate::PathClean; -use deno_package_json::PackageJson; pub static DEFAULT_CONDITIONS: &[&str] = &["deno", "node", "import"]; pub static REQUIRE_CONDITIONS: &[&str] = &["require", "node"]; static TYPES_ONLY_CONDITIONS: &[&str] = &["types"]; -fn conditions_from_module_kind( - kind: NodeModuleKind, +fn conditions_from_resolution_mode( + resolution_mode: ResolutionMode, ) -> &'static [&'static str] { - match kind { - NodeModuleKind::Esm => DEFAULT_CONDITIONS, - NodeModuleKind::Cjs => REQUIRE_CONDITIONS, + match resolution_mode { + ResolutionMode::Import => DEFAULT_CONDITIONS, + ResolutionMode::Require => REQUIRE_CONDITIONS, } } -pub type NodeModuleKind = deno_package_json::NodeModuleKind; +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] +pub enum ResolutionMode { + Import, + Require, +} -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub enum NodeResolutionMode { +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +pub enum NodeResolutionKind { Execution, Types, } -impl NodeResolutionMode { +impl NodeResolutionKind { pub fn is_types(&self) -> bool { - matches!(self, NodeResolutionMode::Types) + matches!(self, NodeResolutionKind::Types) } } @@ -94,29 +102,44 @@ impl NodeResolution { } } +pub trait IsBuiltInNodeModuleChecker: std::fmt::Debug { + fn is_builtin_node_module(&self, specifier: &str) -> bool; +} + #[allow(clippy::disallowed_types)] -pub type NodeResolverRc = crate::sync::MaybeArc>; +pub type NodeResolverRc = + crate::sync::MaybeArc>; #[derive(Debug)] -pub struct NodeResolver { - env: TEnv, +pub struct NodeResolver< + TIsBuiltInNodeModuleChecker: IsBuiltInNodeModuleChecker, + TSys: FsCanonicalize + FsMetadata + FsRead, +> { in_npm_pkg_checker: InNpmPackageCheckerRc, + is_built_in_node_module_checker: TIsBuiltInNodeModuleChecker, npm_pkg_folder_resolver: NpmPackageFolderResolverRc, - pkg_json_resolver: PackageJsonResolverRc, + pkg_json_resolver: PackageJsonResolverRc, + sys: TSys, } -impl NodeResolver { +impl< + TIsBuiltInNodeModuleChecker: IsBuiltInNodeModuleChecker, + TSys: FsCanonicalize + FsMetadata + FsRead, + > NodeResolver +{ pub fn new( - env: TEnv, in_npm_pkg_checker: InNpmPackageCheckerRc, + is_built_in_node_module_checker: TIsBuiltInNodeModuleChecker, npm_pkg_folder_resolver: NpmPackageFolderResolverRc, - pkg_json_resolver: PackageJsonResolverRc, + pkg_json_resolver: PackageJsonResolverRc, + sys: TSys, ) -> Self { Self { - env, in_npm_pkg_checker, + is_built_in_node_module_checker, npm_pkg_folder_resolver, pkg_json_resolver, + sys, } } @@ -130,13 +153,16 @@ impl NodeResolver { &self, specifier: &str, referrer: &Url, - referrer_kind: NodeModuleKind, - mode: NodeResolutionMode, + resolution_mode: ResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { // Note: if we are here, then the referrer is an esm module // TODO(bartlomieju): skipped "policy" part as we don't plan to support it - if self.env.is_builtin_node_module(specifier) { + if self + .is_built_in_node_module_checker + .is_builtin_node_module(specifier) + { return Ok(NodeResolution::BuiltIn(specifier.to_string())); } @@ -174,14 +200,18 @@ impl NodeResolver { let url = self.module_resolve( specifier, referrer, - referrer_kind, - conditions_from_module_kind(referrer_kind), - mode, + resolution_mode, + conditions_from_resolution_mode(resolution_mode), + resolution_kind, )?; - let url = if mode.is_types() { + let url = if resolution_kind.is_types() { let file_path = to_file_path(&url); - self.path_to_declaration_url(&file_path, Some(referrer), referrer_kind)? + self.path_to_declaration_url( + &file_path, + Some(referrer), + resolution_mode, + )? } else { url }; @@ -197,12 +227,12 @@ impl NodeResolver { &self, specifier: &str, referrer: &Url, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, conditions: &[&str], - mode: NodeResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { if should_be_treated_as_relative_or_absolute_path(specifier) { - Ok(referrer.join(specifier).map_err(|err| { + Ok(node_join_url(referrer, specifier).map_err(|err| { NodeResolveRelativeJoinError { path: specifier.to_string(), base: referrer.clone(), @@ -218,10 +248,10 @@ impl NodeResolver { Ok(self.package_imports_resolve( specifier, Some(referrer), - referrer_kind, + resolution_mode, pkg_config.as_deref(), conditions, - mode, + resolution_kind, )?) } else if let Ok(resolved) = Url::parse(specifier) { Ok(resolved) @@ -229,9 +259,9 @@ impl NodeResolver { Ok(self.package_resolve( specifier, referrer, - referrer_kind, + resolution_mode, conditions, - mode, + resolution_kind, )?) } } @@ -274,32 +304,25 @@ impl NodeResolver { p_str.to_string() }; - let (is_dir, is_file) = if let Ok(stats) = self.env.stat_sync(Path::new(&p)) - { - (stats.is_dir, stats.is_file) - } else { - (false, false) - }; - if is_dir { - return Err( + let maybe_file_type = self.sys.fs_metadata(p).map(|m| m.file_type()); + match maybe_file_type { + Ok(FileType::Dir) => Err( UnsupportedDirImportError { dir_url: resolved.clone(), maybe_referrer: maybe_referrer.map(ToOwned::to_owned), } .into(), - ); - } else if !is_file { - return Err( + ), + Ok(FileType::File) => Ok(resolved), + _ => Err( ModuleNotFoundError { specifier: resolved, maybe_referrer: maybe_referrer.map(ToOwned::to_owned), typ: "module", } .into(), - ); + ), } - - Ok(resolved) } pub fn resolve_package_subpath_from_deno_module( @@ -307,9 +330,11 @@ impl NodeResolver { package_dir: &Path, package_subpath: Option<&str>, maybe_referrer: Option<&Url>, - referrer_kind: NodeModuleKind, - mode: NodeResolutionMode, + resolution_mode: ResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { + // todo(dsherret): don't allocate a string here (maybe use an + // enum that says the subpath is not prefixed with a ./) let package_subpath = package_subpath .map(|s| format!("./{s}")) .unwrap_or_else(|| ".".to_string()); @@ -317,9 +342,9 @@ impl NodeResolver { package_dir, &package_subpath, maybe_referrer, - referrer_kind, - conditions_from_module_kind(referrer_kind), - mode, + resolution_mode, + conditions_from_resolution_mode(resolution_mode), + resolution_kind, )?; // TODO(bartlomieju): skipped checking errors for commonJS resolution and // "preserveSymlinksMain"/"preserveSymlinks" options. @@ -385,46 +410,46 @@ impl NodeResolver { &self, path: &Path, maybe_referrer: Option<&Url>, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, ) -> Result { - fn probe_extensions( - fs: &TEnv, + fn probe_extensions( + sys: &TSys, path: &Path, lowercase_path: &str, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, ) -> Option { let mut searched_for_d_mts = false; let mut searched_for_d_cts = false; if lowercase_path.ends_with(".mjs") { let d_mts_path = with_known_extension(path, "d.mts"); - if fs.exists_sync(&d_mts_path) { + if sys.fs_exists_no_err(&d_mts_path) { return Some(d_mts_path); } searched_for_d_mts = true; } else if lowercase_path.ends_with(".cjs") { let d_cts_path = with_known_extension(path, "d.cts"); - if fs.exists_sync(&d_cts_path) { + if sys.fs_exists_no_err(&d_cts_path) { return Some(d_cts_path); } searched_for_d_cts = true; } let dts_path = with_known_extension(path, "d.ts"); - if fs.exists_sync(&dts_path) { + if sys.fs_exists_no_err(&dts_path) { return Some(dts_path); } - let specific_dts_path = match referrer_kind { - NodeModuleKind::Cjs if !searched_for_d_cts => { + let specific_dts_path = match resolution_mode { + ResolutionMode::Require if !searched_for_d_cts => { Some(with_known_extension(path, "d.cts")) } - NodeModuleKind::Esm if !searched_for_d_mts => { + ResolutionMode::Import if !searched_for_d_mts => { Some(with_known_extension(path, "d.mts")) } _ => None, // already searched above }; if let Some(specific_dts_path) = specific_dts_path { - if fs.exists_sync(&specific_dts_path) { + if sys.fs_exists_no_err(&specific_dts_path) { return Some(specific_dts_path); } } @@ -439,28 +464,28 @@ impl NodeResolver { return Ok(url_from_file_path(path).unwrap()); } if let Some(path) = - probe_extensions(&self.env, path, &lowercase_path, referrer_kind) + probe_extensions(&self.sys, path, &lowercase_path, resolution_mode) { return Ok(url_from_file_path(&path).unwrap()); } - if self.env.is_dir_sync(path) { + if self.sys.fs_is_dir_no_err(path) { let resolution_result = self.resolve_package_dir_subpath( path, /* sub path */ ".", maybe_referrer, - referrer_kind, - conditions_from_module_kind(referrer_kind), - NodeResolutionMode::Types, + resolution_mode, + conditions_from_resolution_mode(resolution_mode), + NodeResolutionKind::Types, ); if let Ok(resolution) = resolution_result { return Ok(resolution); } let index_path = path.join("index.js"); if let Some(path) = probe_extensions( - &self.env, + &self.sys, &index_path, &index_path.to_string_lossy().to_lowercase(), - referrer_kind, + resolution_mode, ) { return Ok(url_from_file_path(&path).unwrap()); } @@ -480,10 +505,10 @@ impl NodeResolver { &self, name: &str, maybe_referrer: Option<&Url>, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, referrer_pkg_json: Option<&PackageJson>, conditions: &[&str], - mode: NodeResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { if name == "#" || name.starts_with("#/") || name.ends_with('/') { let reason = "is not a valid internal imports specifier name"; @@ -509,11 +534,11 @@ impl NodeResolver { "", name, maybe_referrer, - referrer_kind, + resolution_mode, false, true, conditions, - mode, + resolution_kind, )?; if let Some(resolved) = maybe_resolved { return Ok(resolved); @@ -549,11 +574,11 @@ impl NodeResolver { best_match_subpath.unwrap(), best_match, maybe_referrer, - referrer_kind, + resolution_mode, true, true, conditions, - mode, + resolution_kind, )?; if let Some(resolved) = maybe_resolved { return Ok(resolved); @@ -581,11 +606,11 @@ impl NodeResolver { match_: &str, package_json_path: &Path, maybe_referrer: Option<&Url>, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, pattern: bool, internal: bool, conditions: &[&str], - mode: NodeResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { if !subpath.is_empty() && !pattern && !target.ends_with('/') { return Err( @@ -626,9 +651,9 @@ impl NodeResolver { let result = match self.package_resolve( &export_target, &package_json_url, - referrer_kind, + resolution_mode, conditions, - mode, + resolution_kind, ) { Ok(url) => Ok(url), Err(err) => match err.code() { @@ -649,8 +674,8 @@ impl NodeResolver { pkg_json_path: package_json_path.to_path_buf(), target: export_target.to_string(), maybe_referrer: maybe_referrer.map(ToOwned::to_owned), - referrer_kind, - mode, + resolution_mode, + resolution_kind, }, ) .into(), @@ -661,7 +686,10 @@ impl NodeResolver { return match result { Ok(url) => Ok(url), Err(err) => { - if self.env.is_builtin_node_module(target) { + if self + .is_built_in_node_module_checker + .is_builtin_node_module(target) + { Ok(Url::parse(&format!("node:{}", target)).unwrap()) } else { Err(err) @@ -746,11 +774,11 @@ impl NodeResolver { subpath: &str, package_subpath: &str, maybe_referrer: Option<&Url>, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, pattern: bool, internal: bool, conditions: &[&str], - mode: NodeResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result, PackageTargetResolveError> { let result = self.resolve_package_target_inner( package_json_path, @@ -758,16 +786,16 @@ impl NodeResolver { subpath, package_subpath, maybe_referrer, - referrer_kind, + resolution_mode, pattern, internal, conditions, - mode, + resolution_kind, ); match result { Ok(maybe_resolved) => Ok(maybe_resolved), Err(err) => { - if mode.is_types() + if resolution_kind.is_types() && err.code() == NodeJsErrorCode::ERR_TYPES_NOT_FOUND && conditions != TYPES_ONLY_CONDITIONS { @@ -779,11 +807,11 @@ impl NodeResolver { subpath, package_subpath, maybe_referrer, - referrer_kind, + resolution_mode, pattern, internal, TYPES_ONLY_CONDITIONS, - mode, + resolution_kind, ) { return Ok(Some(resolved)); } @@ -802,11 +830,11 @@ impl NodeResolver { subpath: &str, package_subpath: &str, maybe_referrer: Option<&Url>, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, pattern: bool, internal: bool, conditions: &[&str], - mode: NodeResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result, PackageTargetResolveError> { if let Some(target) = target.as_str() { let url = self.resolve_package_target_string( @@ -815,18 +843,18 @@ impl NodeResolver { package_subpath, package_json_path, maybe_referrer, - referrer_kind, + resolution_mode, pattern, internal, conditions, - mode, + resolution_kind, )?; - if mode.is_types() && url.scheme() == "file" { + if resolution_kind.is_types() && url.scheme() == "file" { let path = deno_path_util::url_to_file_path(&url).unwrap(); return Ok(Some(self.path_to_declaration_url( &path, maybe_referrer, - referrer_kind, + resolution_mode, )?)); } else { return Ok(Some(url)); @@ -844,11 +872,11 @@ impl NodeResolver { subpath, package_subpath, maybe_referrer, - referrer_kind, + resolution_mode, pattern, internal, conditions, - mode, + resolution_kind, ); match resolved_result { @@ -882,7 +910,7 @@ impl NodeResolver { if key == "default" || conditions.contains(&key.as_str()) - || mode.is_types() && key.as_str() == "types" + || resolution_kind.is_types() && key.as_str() == "types" { let condition_target = target_obj.get(key).unwrap(); @@ -892,11 +920,11 @@ impl NodeResolver { subpath, package_subpath, maybe_referrer, - referrer_kind, + resolution_mode, pattern, internal, conditions, - mode, + resolution_kind, )?; match resolved { Some(resolved) => return Ok(Some(resolved)), @@ -929,9 +957,9 @@ impl NodeResolver { package_subpath: &str, package_exports: &Map, maybe_referrer: Option<&Url>, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, conditions: &[&str], - mode: NodeResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { if package_exports.contains_key(package_subpath) && package_subpath.find('*').is_none() @@ -944,11 +972,11 @@ impl NodeResolver { "", package_subpath, maybe_referrer, - referrer_kind, + resolution_mode, false, false, conditions, - mode, + resolution_kind, )?; return match resolved { Some(resolved) => Ok(resolved), @@ -957,7 +985,7 @@ impl NodeResolver { pkg_json_path: package_json_path.to_path_buf(), subpath: package_subpath.to_string(), maybe_referrer: maybe_referrer.map(ToOwned::to_owned), - mode, + resolution_kind, } .into(), ), @@ -1006,11 +1034,11 @@ impl NodeResolver { &best_match_subpath.unwrap(), best_match, maybe_referrer, - referrer_kind, + resolution_mode, true, false, conditions, - mode, + resolution_kind, )?; if let Some(resolved) = maybe_resolved { return Ok(resolved); @@ -1020,7 +1048,7 @@ impl NodeResolver { pkg_json_path: package_json_path.to_path_buf(), subpath: package_subpath.to_string(), maybe_referrer: maybe_referrer.map(ToOwned::to_owned), - mode, + resolution_kind, } .into(), ); @@ -1032,7 +1060,7 @@ impl NodeResolver { pkg_json_path: package_json_path.to_path_buf(), subpath: package_subpath.to_string(), maybe_referrer: maybe_referrer.map(ToOwned::to_owned), - mode, + resolution_kind, } .into(), ) @@ -1042,9 +1070,9 @@ impl NodeResolver { &self, specifier: &str, referrer: &Url, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, conditions: &[&str], - mode: NodeResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { let (package_name, package_subpath, _is_scoped) = parse_npm_pkg_name(specifier, referrer)?; @@ -1061,9 +1089,9 @@ impl NodeResolver { &package_subpath, exports, Some(referrer), - referrer_kind, + resolution_mode, conditions, - mode, + resolution_kind, ) .map_err(|err| err.into()); } @@ -1074,9 +1102,9 @@ impl NodeResolver { &package_name, &package_subpath, referrer, - referrer_kind, + resolution_mode, conditions, - mode, + resolution_kind, ) } @@ -1086,28 +1114,28 @@ impl NodeResolver { package_name: &str, package_subpath: &str, referrer: &Url, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, conditions: &[&str], - mode: NodeResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { let result = self.resolve_package_subpath_for_package_inner( package_name, package_subpath, referrer, - referrer_kind, + resolution_mode, conditions, - mode, + resolution_kind, ); - if mode.is_types() && !matches!(result, Ok(Url { .. })) { + if resolution_kind.is_types() && !matches!(result, Ok(Url { .. })) { // try to resolve with the @types package let package_name = types_package_name(package_name); if let Ok(result) = self.resolve_package_subpath_for_package_inner( &package_name, package_subpath, referrer, - referrer_kind, + resolution_mode, conditions, - mode, + resolution_kind, ) { return Ok(result); } @@ -1121,9 +1149,9 @@ impl NodeResolver { package_name: &str, package_subpath: &str, referrer: &Url, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, conditions: &[&str], - mode: NodeResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { let package_dir_path = self .npm_pkg_folder_resolver @@ -1148,9 +1176,9 @@ impl NodeResolver { &package_dir_path, package_subpath, Some(referrer), - referrer_kind, + resolution_mode, conditions, - mode, + resolution_kind, ) .map_err(|err| err.into()) } @@ -1161,9 +1189,9 @@ impl NodeResolver { package_dir_path: &Path, package_subpath: &str, maybe_referrer: Option<&Url>, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, conditions: &[&str], - mode: NodeResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { let package_json_path = package_dir_path.join("package.json"); match self @@ -1174,17 +1202,17 @@ impl NodeResolver { &pkg_json, package_subpath, maybe_referrer, - referrer_kind, + resolution_mode, conditions, - mode, + resolution_kind, ), None => self .resolve_package_subpath_no_pkg_json( package_dir_path, package_subpath, maybe_referrer, - referrer_kind, - mode, + resolution_mode, + resolution_kind, ) .map_err(|err| { PackageSubpathResolveErrorKind::LegacyResolve(err).into() @@ -1198,9 +1226,9 @@ impl NodeResolver { package_json: &PackageJson, package_subpath: &str, referrer: Option<&Url>, - referrer_kind: NodeModuleKind, + resolution_mode: ResolutionMode, conditions: &[&str], - mode: NodeResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { if let Some(exports) = &package_json.exports { let result = self.package_exports_resolve( @@ -1208,16 +1236,21 @@ impl NodeResolver { package_subpath, exports, referrer, - referrer_kind, + resolution_mode, conditions, - mode, + resolution_kind, ); match result { Ok(found) => return Ok(found), Err(exports_err) => { - if mode.is_types() && package_subpath == "." { + if resolution_kind.is_types() && package_subpath == "." { return self - .legacy_main_resolve(package_json, referrer, referrer_kind, mode) + .legacy_main_resolve( + package_json, + referrer, + resolution_mode, + resolution_kind, + ) .map_err(|err| { PackageSubpathResolveErrorKind::LegacyResolve(err).into() }); @@ -1231,7 +1264,12 @@ impl NodeResolver { if package_subpath == "." { return self - .legacy_main_resolve(package_json, referrer, referrer_kind, mode) + .legacy_main_resolve( + package_json, + referrer, + resolution_mode, + resolution_kind, + ) .map_err(|err| { PackageSubpathResolveErrorKind::LegacyResolve(err).into() }); @@ -1242,8 +1280,8 @@ impl NodeResolver { package_json.path.parent().unwrap(), package_subpath, referrer, - referrer_kind, - mode, + resolution_mode, + resolution_kind, ) .map_err(|err| { PackageSubpathResolveErrorKind::LegacyResolve(err.into()).into() @@ -1255,13 +1293,13 @@ impl NodeResolver { directory: &Path, package_subpath: &str, referrer: Option<&Url>, - referrer_kind: NodeModuleKind, - mode: NodeResolutionMode, + resolution_mode: ResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { assert_ne!(package_subpath, "."); let file_path = directory.join(package_subpath); - if mode.is_types() { - Ok(self.path_to_declaration_url(&file_path, referrer, referrer_kind)?) + if resolution_kind.is_types() { + Ok(self.path_to_declaration_url(&file_path, referrer, resolution_mode)?) } else { Ok(url_from_file_path(&file_path).unwrap()) } @@ -1272,19 +1310,24 @@ impl NodeResolver { directory: &Path, package_subpath: &str, maybe_referrer: Option<&Url>, - referrer_kind: NodeModuleKind, - mode: NodeResolutionMode, + resolution_mode: ResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { if package_subpath == "." { - self.legacy_index_resolve(directory, maybe_referrer, referrer_kind, mode) + self.legacy_index_resolve( + directory, + maybe_referrer, + resolution_mode, + resolution_kind, + ) } else { self .resolve_subpath_exact( directory, package_subpath, maybe_referrer, - referrer_kind, - mode, + resolution_mode, + resolution_kind, ) .map_err(|err| err.into()) } @@ -1294,21 +1337,25 @@ impl NodeResolver { &self, package_json: &PackageJson, maybe_referrer: Option<&Url>, - referrer_kind: NodeModuleKind, - mode: NodeResolutionMode, + resolution_mode: ResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { - let maybe_main = if mode.is_types() { + let pkg_json_kind = match resolution_mode { + ResolutionMode::Require => deno_package_json::NodeModuleKind::Cjs, + ResolutionMode::Import => deno_package_json::NodeModuleKind::Esm, + }; + let maybe_main = if resolution_kind.is_types() { match package_json.types.as_ref() { Some(types) => Some(types.as_str()), None => { // fallback to checking the main entrypoint for // a corresponding declaration file - if let Some(main) = package_json.main(referrer_kind) { + if let Some(main) = package_json.main(pkg_json_kind) { let main = package_json.path.parent().unwrap().join(main).clean(); let decl_url_result = self.path_to_declaration_url( &main, maybe_referrer, - referrer_kind, + resolution_mode, ); // don't surface errors, fallback to checking the index now if let Ok(url) = decl_url_result { @@ -1319,22 +1366,22 @@ impl NodeResolver { } } } else { - package_json.main(referrer_kind) + package_json.main(pkg_json_kind) }; if let Some(main) = maybe_main { let guess = package_json.path.parent().unwrap().join(main).clean(); - if self.env.is_file_sync(&guess) { + if self.sys.fs_is_file_no_err(&guess) { return Ok(url_from_file_path(&guess).unwrap()); } // todo(dsherret): investigate exactly how node and typescript handles this - let endings = if mode.is_types() { - match referrer_kind { - NodeModuleKind::Cjs => { + let endings = if resolution_kind.is_types() { + match resolution_mode { + ResolutionMode::Require => { vec![".d.ts", ".d.cts", "/index.d.ts", "/index.d.cts"] } - NodeModuleKind::Esm => vec![ + ResolutionMode::Import => vec![ ".d.ts", ".d.mts", "/index.d.ts", @@ -1353,7 +1400,7 @@ impl NodeResolver { .unwrap() .join(format!("{main}{ending}")) .clean(); - if self.env.is_file_sync(&guess) { + if self.sys.fs_is_file_no_err(&guess) { // TODO(bartlomieju): emitLegacyIndexDeprecation() return Ok(url_from_file_path(&guess).unwrap()); } @@ -1363,8 +1410,8 @@ impl NodeResolver { self.legacy_index_resolve( package_json.path.parent().unwrap(), maybe_referrer, - referrer_kind, - mode, + resolution_mode, + resolution_kind, ) } @@ -1372,27 +1419,29 @@ impl NodeResolver { &self, directory: &Path, maybe_referrer: Option<&Url>, - referrer_kind: NodeModuleKind, - mode: NodeResolutionMode, + resolution_mode: ResolutionMode, + resolution_kind: NodeResolutionKind, ) -> Result { - let index_file_names = if mode.is_types() { + let index_file_names = if resolution_kind.is_types() { // todo(dsherret): investigate exactly how typescript does this - match referrer_kind { - NodeModuleKind::Cjs => vec!["index.d.ts", "index.d.cts"], - NodeModuleKind::Esm => vec!["index.d.ts", "index.d.mts", "index.d.cts"], + match resolution_mode { + ResolutionMode::Require => vec!["index.d.ts", "index.d.cts"], + ResolutionMode::Import => { + vec!["index.d.ts", "index.d.mts", "index.d.cts"] + } } } else { vec!["index.js"] }; for index_file_name in index_file_names { let guess = directory.join(index_file_name).clean(); - if self.env.is_file_sync(&guess) { + if self.sys.fs_is_file_no_err(&guess) { // TODO(bartlomieju): emitLegacyIndexDeprecation() return Ok(url_from_file_path(&guess).unwrap()); } } - if mode.is_types() { + if resolution_kind.is_types() { Err( TypesNotFoundError(Box::new(TypesNotFoundErrorData { code_specifier: url_from_file_path(&directory.join("index.js")) @@ -1423,9 +1472,7 @@ impl NodeResolver { { // Specifiers in the node_modules directory are canonicalized // so canoncalize then check if it's in the node_modules directory. - let specifier = resolve_specifier_into_node_modules(specifier, &|path| { - self.env.realpath_sync(path) - }); + let specifier = resolve_specifier_into_node_modules(&self.sys, specifier); return Some(specifier); } @@ -1686,16 +1733,15 @@ pub fn parse_npm_pkg_name( /// not be fully resolved at the time deno_graph is analyzing it /// because the node_modules folder might not exist at that time. pub fn resolve_specifier_into_node_modules( + sys: &impl FsCanonicalize, specifier: &Url, - canonicalize: &impl Fn(&Path) -> std::io::Result, ) -> Url { deno_path_util::url_to_file_path(specifier) .ok() // this path might not exist at the time the graph is being created // because the node_modules folder might not yet exist .and_then(|path| { - deno_path_util::canonicalize_path_maybe_not_exists(&path, canonicalize) - .ok() + deno_path_util::fs::canonicalize_path_maybe_not_exists(sys, &path).ok() }) .and_then(|path| deno_path_util::url_from_file_path(&path).ok()) .unwrap_or_else(|| specifier.clone()) @@ -1763,6 +1809,17 @@ fn get_module_name_from_builtin_node_module_specifier( Some(specifier) } +/// Node is more lenient joining paths than the url crate is, +/// so this function handles that. +fn node_join_url(url: &Url, path: &str) -> Result { + if let Some(suffix) = path.strip_prefix(".//") { + // specifier had two leading slashes + url.join(&format!("./{}", suffix)) + } else { + url.join(path) + } +} + #[cfg(test)] mod tests { use serde_json::json; diff --git a/resolvers/node/sync.rs b/resolvers/node/sync.rs index 3c4729aa2c9c08..8cf06932ac351b 100644 --- a/resolvers/node/sync.rs +++ b/resolvers/node/sync.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. pub use inner::*; @@ -6,10 +6,9 @@ pub use inner::*; mod inner { #![allow(clippy::disallowed_types)] - pub use std::sync::Arc as MaybeArc; - pub use core::marker::Send as MaybeSend; pub use core::marker::Sync as MaybeSync; + pub use std::sync::Arc as MaybeArc; } #[cfg(not(feature = "sync"))] diff --git a/resolvers/npm_cache/Cargo.toml b/resolvers/npm_cache/Cargo.toml new file mode 100644 index 00000000000000..328355d340aa0c --- /dev/null +++ b/resolvers/npm_cache/Cargo.toml @@ -0,0 +1,45 @@ +# Copyright 2018-2025 the Deno authors. MIT license. + +[package] +name = "deno_npm_cache" +version = "0.3.0" +authors.workspace = true +edition.workspace = true +license.workspace = true +readme = "README.md" +repository.workspace = true +description = "Helpers for downloading and caching npm dependencies for Deno" + +[lib] +path = "lib.rs" + +[dependencies] +# todo(dsherret): remove this dependency +anyhow.workspace = true +# todo(dsherret): remove this dependency +deno_core.workspace = true + +async-trait.workspace = true +base64.workspace = true +boxed_error.workspace = true +deno_cache_dir.workspace = true +deno_error.workspace = true +deno_npm.workspace = true +deno_path_util.workspace = true +deno_semver.workspace = true +deno_unsync = { workspace = true, features = ["tokio"] } +faster-hex.workspace = true +flate2 = { workspace = true, features = ["zlib-ng-compat"] } +futures.workspace = true +http.workspace = true +log.workspace = true +parking_lot.workspace = true +percent-encoding.workspace = true +rand.workspace = true +ring.workspace = true +serde_json.workspace = true +sys_traits.workspace = true +tar.workspace = true +tempfile = "3.4.0" +thiserror.workspace = true +url.workspace = true diff --git a/resolvers/npm_cache/README.md b/resolvers/npm_cache/README.md new file mode 100644 index 00000000000000..a7edbb415948e1 --- /dev/null +++ b/resolvers/npm_cache/README.md @@ -0,0 +1,6 @@ +# deno_npm_cache + +[![crates](https://img.shields.io/crates/v/deno_npm_cache.svg)](https://crates.io/crates/deno_npm_cache) +[![docs](https://docs.rs/deno_npm_cache/badge.svg)](https://docs.rs/deno_npm_cache) + +Helpers for downloading and caching npm dependencies for Deno. diff --git a/resolvers/npm_cache/fs_util.rs b/resolvers/npm_cache/fs_util.rs new file mode 100644 index 00000000000000..625d83e24d01dc --- /dev/null +++ b/resolvers/npm_cache/fs_util.rs @@ -0,0 +1,100 @@ +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::io::ErrorKind; +use std::path::Path; +use std::time::Duration; + +use anyhow::Context; +use anyhow::Error as AnyError; +use sys_traits::FsCreateDirAll; +use sys_traits::FsDirEntry; +use sys_traits::FsHardLink; +use sys_traits::FsReadDir; +use sys_traits::FsRemoveFile; +use sys_traits::ThreadSleep; + +/// Hardlinks the files in one directory to another directory. +/// +/// Note: Does not handle symlinks. +pub fn hard_link_dir_recursive< + TSys: FsCreateDirAll + FsHardLink + FsReadDir + FsRemoveFile + ThreadSleep, +>( + sys: &TSys, + from: &Path, + to: &Path, +) -> Result<(), AnyError> { + sys + .fs_create_dir_all(to) + .with_context(|| format!("Creating {}", to.display()))?; + let read_dir = sys + .fs_read_dir(from) + .with_context(|| format!("Reading {}", from.display()))?; + + for entry in read_dir { + let entry = entry?; + let file_type = entry.file_type()?; + let new_from = from.join(entry.file_name()); + let new_to = to.join(entry.file_name()); + + if file_type.is_dir() { + hard_link_dir_recursive(sys, &new_from, &new_to).with_context(|| { + format!("Dir {} to {}", new_from.display(), new_to.display()) + })?; + } else if file_type.is_file() { + // note: chance for race conditions here between attempting to create, + // then removing, then attempting to create. There doesn't seem to be + // a way to hard link with overwriting in Rust, but maybe there is some + // way with platform specific code. The workaround here is to handle + // scenarios where something else might create or remove files. + if let Err(err) = sys.fs_hard_link(&new_from, &new_to) { + if err.kind() == ErrorKind::AlreadyExists { + if let Err(err) = sys.fs_remove_file(&new_to) { + if err.kind() == ErrorKind::NotFound { + // Assume another process/thread created this hard link to the file we are wanting + // to remove then sleep a little bit to let the other process/thread move ahead + // faster to reduce contention. + sys.thread_sleep(Duration::from_millis(10)); + } else { + return Err(err).with_context(|| { + format!( + "Removing file to hard link {} to {}", + new_from.display(), + new_to.display() + ) + }); + } + } + + // Always attempt to recreate the hardlink. In contention scenarios, the other process + // might have been killed or exited after removing the file, but before creating the hardlink + if let Err(err) = sys.fs_hard_link(&new_from, &new_to) { + // Assume another process/thread created this hard link to the file we are wanting + // to now create then sleep a little bit to let the other process/thread move ahead + // faster to reduce contention. + if err.kind() == ErrorKind::AlreadyExists { + sys.thread_sleep(Duration::from_millis(10)); + } else { + return Err(err).with_context(|| { + format!( + "Hard linking {} to {}", + new_from.display(), + new_to.display() + ) + }); + } + } + } else { + return Err(err).with_context(|| { + format!( + "Hard linking {} to {}", + new_from.display(), + new_to.display() + ) + }); + } + } + } + } + + Ok(()) +} diff --git a/resolvers/npm_cache/lib.rs b/resolvers/npm_cache/lib.rs new file mode 100644 index 00000000000000..012c277e226526 --- /dev/null +++ b/resolvers/npm_cache/lib.rs @@ -0,0 +1,404 @@ +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::collections::HashSet; +use std::io::ErrorKind; +use std::path::Path; +use std::path::PathBuf; +use std::sync::Arc; + +use anyhow::bail; +use anyhow::Context; +use anyhow::Error as AnyError; +use deno_cache_dir::file_fetcher::CacheSetting; +use deno_cache_dir::npm::NpmCacheDir; +use deno_npm::npm_rc::ResolvedNpmRc; +use deno_npm::registry::NpmPackageInfo; +use deno_npm::NpmPackageCacheFolderId; +use deno_path_util::fs::atomic_write_file_with_retries; +use deno_semver::package::PackageNv; +use deno_semver::StackString; +use deno_semver::Version; +use http::HeaderName; +use http::HeaderValue; +use http::StatusCode; +use parking_lot::Mutex; +use sys_traits::FsCreateDirAll; +use sys_traits::FsHardLink; +use sys_traits::FsMetadata; +use sys_traits::FsOpen; +use sys_traits::FsReadDir; +use sys_traits::FsRemoveFile; +use sys_traits::FsRename; +use sys_traits::SystemRandom; +use sys_traits::ThreadSleep; +use url::Url; + +mod fs_util; +mod registry_info; +mod remote; +mod tarball; +mod tarball_extract; + +pub use fs_util::hard_link_dir_recursive; +// todo(#27198): make both of these private and get the rest of the code +// using RegistryInfoProvider. +pub use registry_info::get_package_url; +pub use registry_info::RegistryInfoProvider; +pub use remote::maybe_auth_header_for_npm_registry; +pub use tarball::TarballCache; + +#[derive(Debug)] +pub struct DownloadError { + pub status_code: Option, + pub error: AnyError, +} + +impl std::error::Error for DownloadError { + fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { + self.error.source() + } +} + +impl std::fmt::Display for DownloadError { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.error.fmt(f) + } +} + +#[async_trait::async_trait(?Send)] +pub trait NpmCacheHttpClient: Send + Sync + 'static { + async fn download_with_retries_on_any_tokio_runtime( + &self, + url: Url, + maybe_auth_header: Option<(HeaderName, HeaderValue)>, + ) -> Result>, DownloadError>; +} + +/// Indicates how cached source files should be handled. +#[derive(Debug, Clone, Eq, PartialEq)] +pub enum NpmCacheSetting { + /// Only the cached files should be used. Any files not in the cache will + /// error. This is the equivalent of `--cached-only` in the CLI. + Only, + /// No cached source files should be used, and all files should be reloaded. + /// This is the equivalent of `--reload` in the CLI. + ReloadAll, + /// Only some cached resources should be used. This is the equivalent of + /// `--reload=npm:chalk` + ReloadSome { npm_package_names: Vec }, + /// The cached source files should be used for local modules. This is the + /// default behavior of the CLI. + Use, +} + +impl NpmCacheSetting { + pub fn from_cache_setting(cache_setting: &CacheSetting) -> NpmCacheSetting { + match cache_setting { + CacheSetting::Only => NpmCacheSetting::Only, + CacheSetting::ReloadAll => NpmCacheSetting::ReloadAll, + CacheSetting::ReloadSome(values) => { + if values.iter().any(|v| v == "npm:") { + NpmCacheSetting::ReloadAll + } else { + NpmCacheSetting::ReloadSome { + npm_package_names: values + .iter() + .filter_map(|v| v.strip_prefix("npm:")) + .map(|n| n.to_string()) + .collect(), + } + } + } + CacheSetting::RespectHeaders => panic!("not supported"), + CacheSetting::Use => NpmCacheSetting::Use, + } + } + pub fn should_use_for_npm_package(&self, package_name: &str) -> bool { + match self { + NpmCacheSetting::ReloadAll => false, + NpmCacheSetting::ReloadSome { npm_package_names } => { + !npm_package_names.iter().any(|n| n == package_name) + } + _ => true, + } + } +} + +/// Stores a single copy of npm packages in a cache. +#[derive(Debug)] +pub struct NpmCache< + TSys: FsCreateDirAll + + FsHardLink + + FsMetadata + + FsOpen + + FsReadDir + + FsRemoveFile + + FsRename + + ThreadSleep + + SystemRandom, +> { + cache_dir: Arc, + sys: TSys, + cache_setting: NpmCacheSetting, + npmrc: Arc, + previously_reloaded_packages: Mutex>, +} + +impl< + TSys: FsCreateDirAll + + FsHardLink + + FsMetadata + + FsOpen + + FsReadDir + + FsRemoveFile + + FsRename + + ThreadSleep + + SystemRandom, + > NpmCache +{ + pub fn new( + cache_dir: Arc, + sys: TSys, + cache_setting: NpmCacheSetting, + npmrc: Arc, + ) -> Self { + Self { + cache_dir, + sys, + cache_setting, + npmrc, + previously_reloaded_packages: Default::default(), + } + } + + pub fn cache_setting(&self) -> &NpmCacheSetting { + &self.cache_setting + } + + pub fn root_dir_path(&self) -> &Path { + self.cache_dir.root_dir() + } + + pub fn root_dir_url(&self) -> &Url { + self.cache_dir.root_dir_url() + } + + /// Checks if the cache should be used for the provided name and version. + /// NOTE: Subsequent calls for the same package will always return `true` + /// to ensure a package is only downloaded once per run of the CLI. This + /// prevents downloads from re-occurring when someone has `--reload` and + /// and imports a dynamic import that imports the same package again for example. + pub fn should_use_cache_for_package(&self, package: &PackageNv) -> bool { + self.cache_setting.should_use_for_npm_package(&package.name) + || !self + .previously_reloaded_packages + .lock() + .insert(package.clone()) + } + + /// Ensures a copy of the package exists in the global cache. + /// + /// This assumes that the original package folder being hard linked + /// from exists before this is called. + pub fn ensure_copy_package( + &self, + folder_id: &NpmPackageCacheFolderId, + ) -> Result<(), AnyError> { + let registry_url = self.npmrc.get_registry_url(&folder_id.nv.name); + assert_ne!(folder_id.copy_index, 0); + let package_folder = self.cache_dir.package_folder_for_id( + &folder_id.nv.name, + &folder_id.nv.version.to_string(), + folder_id.copy_index, + registry_url, + ); + + if package_folder.exists() + // if this file exists, then the package didn't successfully initialize + // the first time, or another process is currently extracting the zip file + && !package_folder.join(NPM_PACKAGE_SYNC_LOCK_FILENAME).exists() + && self.cache_setting.should_use_for_npm_package(&folder_id.nv.name) + { + return Ok(()); + } + + let original_package_folder = self.cache_dir.package_folder_for_id( + &folder_id.nv.name, + &folder_id.nv.version.to_string(), + 0, // original copy index + registry_url, + ); + + // it seems Windows does an "AccessDenied" error when moving a + // directory with hard links, so that's why this solution is done + with_folder_sync_lock(&folder_id.nv, &package_folder, || { + hard_link_dir_recursive( + &self.sys, + &original_package_folder, + &package_folder, + ) + })?; + Ok(()) + } + + pub fn package_folder_for_id(&self, id: &NpmPackageCacheFolderId) -> PathBuf { + let registry_url = self.npmrc.get_registry_url(&id.nv.name); + self.cache_dir.package_folder_for_id( + &id.nv.name, + &id.nv.version.to_string(), + id.copy_index, + registry_url, + ) + } + + pub fn package_folder_for_nv(&self, package: &PackageNv) -> PathBuf { + let registry_url = self.npmrc.get_registry_url(&package.name); + self.package_folder_for_nv_and_url(package, registry_url) + } + + pub fn package_folder_for_nv_and_url( + &self, + package: &PackageNv, + registry_url: &Url, + ) -> PathBuf { + self.cache_dir.package_folder_for_id( + &package.name, + &package.version.to_string(), + 0, // original copy_index + registry_url, + ) + } + + pub fn package_name_folder(&self, name: &str) -> PathBuf { + let registry_url = self.npmrc.get_registry_url(name); + self.cache_dir.package_name_folder(name, registry_url) + } + + pub fn resolve_package_folder_id_from_specifier( + &self, + specifier: &Url, + ) -> Option { + self + .cache_dir + .resolve_package_folder_id_from_specifier(specifier) + .and_then(|cache_id| { + Some(NpmPackageCacheFolderId { + nv: PackageNv { + name: StackString::from_string(cache_id.name), + version: Version::parse_from_npm(&cache_id.version).ok()?, + }, + copy_index: cache_id.copy_index, + }) + }) + } + + pub fn load_package_info( + &self, + name: &str, + ) -> Result, AnyError> { + let file_cache_path = self.get_registry_package_info_file_cache_path(name); + + let file_text = match std::fs::read_to_string(file_cache_path) { + Ok(file_text) => file_text, + Err(err) if err.kind() == ErrorKind::NotFound => return Ok(None), + Err(err) => return Err(err.into()), + }; + Ok(serde_json::from_str(&file_text)?) + } + + pub fn save_package_info( + &self, + name: &str, + package_info: &NpmPackageInfo, + ) -> Result<(), AnyError> { + let file_cache_path = self.get_registry_package_info_file_cache_path(name); + let file_text = serde_json::to_string(&package_info)?; + atomic_write_file_with_retries( + &self.sys, + &file_cache_path, + file_text.as_bytes(), + 0o644, + )?; + Ok(()) + } + + fn get_registry_package_info_file_cache_path(&self, name: &str) -> PathBuf { + let name_folder_path = self.package_name_folder(name); + name_folder_path.join("registry.json") + } +} + +const NPM_PACKAGE_SYNC_LOCK_FILENAME: &str = ".deno_sync_lock"; + +// todo(dsherret): use `sys` here instead of `std::fs`. +fn with_folder_sync_lock( + package: &PackageNv, + output_folder: &Path, + action: impl FnOnce() -> Result<(), AnyError>, +) -> Result<(), AnyError> { + fn inner( + output_folder: &Path, + action: impl FnOnce() -> Result<(), AnyError>, + ) -> Result<(), AnyError> { + std::fs::create_dir_all(output_folder).with_context(|| { + format!("Error creating '{}'.", output_folder.display()) + })?; + + // This sync lock file is a way to ensure that partially created + // npm package directories aren't considered valid. This could maybe + // be a bit smarter in the future to not bother extracting here + // if another process has taken the lock in the past X seconds and + // wait for the other process to finish (it could try to create the + // file with `create_new(true)` then if it exists, check the metadata + // then wait until the other process finishes with a timeout), but + // for now this is good enough. + let sync_lock_path = output_folder.join(NPM_PACKAGE_SYNC_LOCK_FILENAME); + match std::fs::OpenOptions::new() + .write(true) + .create(true) + .truncate(false) + .open(&sync_lock_path) + { + Ok(_) => { + action()?; + // extraction succeeded, so only now delete this file + let _ignore = std::fs::remove_file(&sync_lock_path); + Ok(()) + } + Err(err) => { + bail!( + concat!( + "Error creating package sync lock file at '{}'. ", + "Maybe try manually deleting this folder.\n\n{:#}", + ), + output_folder.display(), + err + ); + } + } + } + + match inner(output_folder, action) { + Ok(()) => Ok(()), + Err(err) => { + if let Err(remove_err) = std::fs::remove_dir_all(output_folder) { + if remove_err.kind() != std::io::ErrorKind::NotFound { + bail!( + concat!( + "Failed setting up package cache directory for {}, then ", + "failed cleaning it up.\n\nOriginal error:\n\n{}\n\n", + "Remove error:\n\n{}\n\nPlease manually ", + "delete this folder or you will run into issues using this ", + "package in the future:\n\n{}" + ), + package, + err, + remove_err, + output_folder.display(), + ); + } + } + Err(err) + } + } +} diff --git a/resolvers/npm_cache/registry_info.rs b/resolvers/npm_cache/registry_info.rs new file mode 100644 index 00000000000000..0637d75c198e05 --- /dev/null +++ b/resolvers/npm_cache/registry_info.rs @@ -0,0 +1,498 @@ +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::collections::HashMap; +use std::collections::HashSet; +use std::sync::Arc; + +use anyhow::anyhow; +use anyhow::bail; +use anyhow::Context; +use anyhow::Error as AnyError; +use async_trait::async_trait; +use deno_npm::npm_rc::ResolvedNpmRc; +use deno_npm::registry::NpmPackageInfo; +use deno_npm::registry::NpmRegistryApi; +use deno_npm::registry::NpmRegistryPackageInfoLoadError; +use deno_unsync::sync::AtomicFlag; +use deno_unsync::sync::MultiRuntimeAsyncValueCreator; +use futures::future::LocalBoxFuture; +use futures::FutureExt; +use parking_lot::Mutex; +use sys_traits::FsCreateDirAll; +use sys_traits::FsHardLink; +use sys_traits::FsMetadata; +use sys_traits::FsOpen; +use sys_traits::FsReadDir; +use sys_traits::FsRemoveFile; +use sys_traits::FsRename; +use sys_traits::SystemRandom; +use sys_traits::ThreadSleep; +use thiserror::Error; +use url::Url; + +use crate::remote::maybe_auth_header_for_npm_registry; +use crate::NpmCache; +use crate::NpmCacheHttpClient; +use crate::NpmCacheSetting; + +type LoadResult = Result>; +type LoadFuture = LocalBoxFuture<'static, LoadResult>; + +#[derive(Debug, Error)] +#[error(transparent)] +pub struct AnyhowJsError(pub AnyError); + +impl deno_error::JsErrorClass for AnyhowJsError { + fn get_class(&self) -> &'static str { + "generic" + } + + fn get_message(&self) -> std::borrow::Cow<'static, str> { + self.0.to_string().into() + } + + fn get_additional_properties( + &self, + ) -> Option< + Vec<( + std::borrow::Cow<'static, str>, + std::borrow::Cow<'static, str>, + )>, + > { + None + } +} + +#[derive(Debug, Clone)] +enum FutureResult { + PackageNotExists, + SavedFsCache(Arc), + ErroredFsCache(Arc), +} + +#[derive(Debug, Clone)] +enum MemoryCacheItem { + /// The cache item hasn't loaded yet. + Pending(Arc>), + /// The item has loaded in the past and was stored in the file system cache. + /// There is no reason to request this package from the npm registry again + /// for the duration of execution. + FsCached, + /// An item is memory cached when it fails saving to the file system cache + /// or the package does not exist. + MemoryCached(Result>, Arc>), +} + +#[derive(Debug, Default)] +struct MemoryCache { + clear_id: usize, + items: HashMap, +} + +impl MemoryCache { + #[inline(always)] + pub fn clear(&mut self) { + self.clear_id += 1; + self.items.clear(); + } + + #[inline(always)] + pub fn get(&self, key: &str) -> Option<&MemoryCacheItem> { + self.items.get(key) + } + + #[inline(always)] + pub fn insert(&mut self, key: String, value: MemoryCacheItem) { + self.items.insert(key, value); + } + + #[inline(always)] + pub fn try_insert( + &mut self, + clear_id: usize, + key: &str, + value: MemoryCacheItem, + ) -> bool { + if clear_id != self.clear_id { + return false; + } + // if the clear_id is the same then the item should exist + debug_assert!(self.items.contains_key(key)); + if let Some(item) = self.items.get_mut(key) { + *item = value; + } + true + } +} + +// todo(#27198): refactor to store this only in the http cache + +/// Downloads packuments from the npm registry. +/// +/// This is shared amongst all the workers. +#[derive(Debug)] +pub struct RegistryInfoProvider< + THttpClient: NpmCacheHttpClient, + TSys: FsCreateDirAll + + FsHardLink + + FsMetadata + + FsOpen + + FsReadDir + + FsRemoveFile + + FsRename + + ThreadSleep + + SystemRandom + + Send + + Sync + + 'static, +> { + // todo(#27198): remove this + cache: Arc>, + http_client: Arc, + npmrc: Arc, + force_reload_flag: AtomicFlag, + memory_cache: Mutex, + previously_loaded_packages: Mutex>, +} + +impl< + THttpClient: NpmCacheHttpClient, + TSys: FsCreateDirAll + + FsHardLink + + FsMetadata + + FsOpen + + FsReadDir + + FsRemoveFile + + FsRename + + ThreadSleep + + SystemRandom + + Send + + Sync + + 'static, + > RegistryInfoProvider +{ + pub fn new( + cache: Arc>, + http_client: Arc, + npmrc: Arc, + ) -> Self { + Self { + cache, + http_client, + npmrc, + force_reload_flag: AtomicFlag::lowered(), + memory_cache: Default::default(), + previously_loaded_packages: Default::default(), + } + } + + /// Clears the internal memory cache. + pub fn clear_memory_cache(&self) { + self.memory_cache.lock().clear(); + } + + fn mark_force_reload(&self) -> bool { + // never force reload the registry information if reloading + // is disabled or if we're already reloading + if matches!( + self.cache.cache_setting(), + NpmCacheSetting::Only | NpmCacheSetting::ReloadAll + ) { + return false; + } + if self.force_reload_flag.raise() { + self.clear_memory_cache(); + true + } else { + false + } + } + + pub fn as_npm_registry_api( + self: &Arc, + ) -> NpmRegistryApiAdapter { + NpmRegistryApiAdapter(self.clone()) + } + + pub async fn package_info( + self: &Arc, + name: &str, + ) -> Result, NpmRegistryPackageInfoLoadError> { + match self.maybe_package_info(name).await { + Ok(Some(info)) => Ok(info), + Ok(None) => Err(NpmRegistryPackageInfoLoadError::PackageNotExists { + package_name: name.to_string(), + }), + Err(err) => Err(NpmRegistryPackageInfoLoadError::LoadError(Arc::new( + AnyhowJsError(err), + ))), + } + } + + pub async fn maybe_package_info( + self: &Arc, + name: &str, + ) -> Result>, AnyError> { + self.load_package_info_inner(name).await.with_context(|| { + format!( + "Failed loading {} for package \"{}\"", + get_package_url(&self.npmrc, name), + name + ) + }) + } + + async fn load_package_info_inner( + self: &Arc, + name: &str, + ) -> Result>, AnyError> { + let (cache_item, clear_id) = { + let mut mem_cache = self.memory_cache.lock(); + let cache_item = if let Some(cache_item) = mem_cache.get(name) { + cache_item.clone() + } else { + let value_creator = MultiRuntimeAsyncValueCreator::new({ + let downloader = self.clone(); + let name = name.to_string(); + Box::new(move || downloader.create_load_future(&name)) + }); + let cache_item = MemoryCacheItem::Pending(Arc::new(value_creator)); + mem_cache.insert(name.to_string(), cache_item.clone()); + cache_item + }; + (cache_item, mem_cache.clear_id) + }; + + match cache_item { + MemoryCacheItem::FsCached => { + // this struct previously loaded from the registry, so we can load it from the file system cache + self + .load_file_cached_package_info(name) + .await + .map(|info| Some(Arc::new(info))) + } + MemoryCacheItem::MemoryCached(maybe_info) => { + maybe_info.clone().map_err(|e| anyhow!("{}", e)) + } + MemoryCacheItem::Pending(value_creator) => { + match value_creator.get().await { + Ok(FutureResult::SavedFsCache(info)) => { + // return back the future and mark this package as having + // been saved in the cache for next time it's requested + self.memory_cache.lock().try_insert( + clear_id, + name, + MemoryCacheItem::FsCached, + ); + Ok(Some(info)) + } + Ok(FutureResult::ErroredFsCache(info)) => { + // since saving to the fs cache failed, keep the package information in memory + self.memory_cache.lock().try_insert( + clear_id, + name, + MemoryCacheItem::MemoryCached(Ok(Some(info.clone()))), + ); + Ok(Some(info)) + } + Ok(FutureResult::PackageNotExists) => { + self.memory_cache.lock().try_insert( + clear_id, + name, + MemoryCacheItem::MemoryCached(Ok(None)), + ); + Ok(None) + } + Err(err) => { + let return_err = anyhow!("{:#}", err); + self.memory_cache.lock().try_insert( + clear_id, + name, + MemoryCacheItem::MemoryCached(Err(err)), + ); + Err(return_err) + } + } + } + } + } + + async fn load_file_cached_package_info( + &self, + name: &str, + ) -> Result { + // this scenario failing should be exceptionally rare so let's + // deal with improving it only when anyone runs into an issue + let maybe_package_info = deno_unsync::spawn_blocking({ + let cache = self.cache.clone(); + let name = name.to_string(); + move || cache.load_package_info(&name) + }) + .await + .unwrap() + .with_context(|| { + format!( + "Previously saved '{}' from the npm cache, but now it fails to load.", + name + ) + })?; + match maybe_package_info { + Some(package_info) => Ok(package_info), + None => { + bail!("The package '{}' previously saved its registry information to the file system cache, but that file no longer exists.", name) + } + } + } + + fn create_load_future(self: &Arc, name: &str) -> LoadFuture { + let downloader = self.clone(); + let package_url = get_package_url(&self.npmrc, name); + let registry_config = self.npmrc.get_registry_config(name); + let maybe_auth_header = + match maybe_auth_header_for_npm_registry(registry_config) { + Ok(maybe_auth_header) => maybe_auth_header, + Err(err) => { + return std::future::ready(Err(Arc::new(err))).boxed_local() + } + }; + let name = name.to_string(); + async move { + if (downloader.cache.cache_setting().should_use_for_npm_package(&name) && !downloader.force_reload_flag.is_raised()) + // if this has been previously reloaded, then try loading from the + // file system cache + || downloader.previously_loaded_packages.lock().contains(&name) + { + // attempt to load from the file cache + if let Some(info) = downloader.cache.load_package_info(&name)? { + let result = Arc::new(info); + return Ok(FutureResult::SavedFsCache(result)); + } + } + + if *downloader.cache.cache_setting() == NpmCacheSetting::Only { + return Err(deno_core::error::custom_error( + "NotCached", + format!( + "npm package not found in cache: \"{name}\", --cached-only is specified." + ) + )); + } + + downloader.previously_loaded_packages.lock().insert(name.to_string()); + + let maybe_bytes = downloader + .http_client + .download_with_retries_on_any_tokio_runtime( + package_url, + maybe_auth_header, + ) + .await?; + match maybe_bytes { + Some(bytes) => { + let future_result = deno_unsync::spawn_blocking( + move || -> Result { + let package_info = serde_json::from_slice(&bytes)?; + match downloader.cache.save_package_info(&name, &package_info) { + Ok(()) => { + Ok(FutureResult::SavedFsCache(Arc::new(package_info))) + } + Err(err) => { + log::debug!( + "Error saving package {} to cache: {:#}", + name, + err + ); + Ok(FutureResult::ErroredFsCache(Arc::new(package_info))) + } + } + }, + ) + .await??; + Ok(future_result) + } + None => Ok(FutureResult::PackageNotExists), + } + } + .map(|r| r.map_err(Arc::new)) + .boxed_local() + } +} + +pub struct NpmRegistryApiAdapter< + THttpClient: NpmCacheHttpClient, + TSys: FsCreateDirAll + + FsHardLink + + FsMetadata + + FsOpen + + FsReadDir + + FsRemoveFile + + FsRename + + ThreadSleep + + SystemRandom + + Send + + Sync + + 'static, +>(Arc>); + +#[async_trait(?Send)] +impl< + THttpClient: NpmCacheHttpClient, + TSys: FsCreateDirAll + + FsHardLink + + FsMetadata + + FsOpen + + FsReadDir + + FsRemoveFile + + FsRename + + ThreadSleep + + SystemRandom + + Send + + Sync + + 'static, + > NpmRegistryApi for NpmRegistryApiAdapter +{ + async fn package_info( + &self, + name: &str, + ) -> Result, NpmRegistryPackageInfoLoadError> { + self.0.package_info(name).await + } + + fn mark_force_reload(&self) -> bool { + self.0.mark_force_reload() + } +} + +// todo(#27198): make this private and only use RegistryInfoProvider in the rest of +// the code +pub fn get_package_url(npmrc: &ResolvedNpmRc, name: &str) -> Url { + let registry_url = npmrc.get_registry_url(name); + // The '/' character in scoped package names "@scope/name" must be + // encoded for older third party registries. Newer registries and + // npm itself support both ways + // - encoded: https://registry.npmjs.org/@rollup%2fplugin-json + // - non-ecoded: https://registry.npmjs.org/@rollup/plugin-json + // To support as many third party registries as possible we'll + // always encode the '/' character. + + // list of all characters used in npm packages: + // !, ', (, ), *, -, ., /, [0-9], @, [A-Za-z], _, ~ + const ASCII_SET: percent_encoding::AsciiSet = + percent_encoding::NON_ALPHANUMERIC + .remove(b'!') + .remove(b'\'') + .remove(b'(') + .remove(b')') + .remove(b'*') + .remove(b'-') + .remove(b'.') + .remove(b'@') + .remove(b'_') + .remove(b'~'); + let name = percent_encoding::utf8_percent_encode(name, &ASCII_SET); + registry_url + // Ensure that scoped package name percent encoding is lower cased + // to match npm. + .join(&name.to_string().replace("%2F", "%2f")) + .unwrap() +} diff --git a/resolvers/npm_cache/remote.rs b/resolvers/npm_cache/remote.rs new file mode 100644 index 00000000000000..16eb0f6cd9683b --- /dev/null +++ b/resolvers/npm_cache/remote.rs @@ -0,0 +1,59 @@ +// Copyright 2018-2025 the Deno authors. MIT license. + +use anyhow::bail; +use anyhow::Context; +use anyhow::Error as AnyError; +use base64::prelude::BASE64_STANDARD; +use base64::Engine; +use deno_npm::npm_rc::RegistryConfig; +use http::header; + +// TODO(bartlomieju): support more auth methods besides token and basic auth +pub fn maybe_auth_header_for_npm_registry( + registry_config: &RegistryConfig, +) -> Result, AnyError> { + if let Some(token) = registry_config.auth_token.as_ref() { + return Ok(Some(( + header::AUTHORIZATION, + header::HeaderValue::from_str(&format!("Bearer {}", token)).unwrap(), + ))); + } + + if let Some(auth) = registry_config.auth.as_ref() { + return Ok(Some(( + header::AUTHORIZATION, + header::HeaderValue::from_str(&format!("Basic {}", auth)).unwrap(), + ))); + } + + let (username, password) = ( + registry_config.username.as_ref(), + registry_config.password.as_ref(), + ); + if (username.is_some() && password.is_none()) + || (username.is_none() && password.is_some()) + { + bail!("Both the username and password must be provided for basic auth") + } + + if username.is_some() && password.is_some() { + // The npm client does some double encoding when generating the + // bearer token value, see + // https://github.com/npm/cli/blob/780afc50e3a345feb1871a28e33fa48235bc3bd5/workspaces/config/lib/index.js#L846-L851 + let pw_base64 = BASE64_STANDARD + .decode(password.unwrap()) + .with_context(|| "The password in npmrc is an invalid base64 string")?; + let bearer = BASE64_STANDARD.encode(format!( + "{}:{}", + username.unwrap(), + String::from_utf8_lossy(&pw_base64) + )); + + return Ok(Some(( + header::AUTHORIZATION, + header::HeaderValue::from_str(&format!("Basic {}", bearer)).unwrap(), + ))); + } + + Ok(None) +} diff --git a/resolvers/npm_cache/tarball.rs b/resolvers/npm_cache/tarball.rs new file mode 100644 index 00000000000000..49ca3bc7fddf88 --- /dev/null +++ b/resolvers/npm_cache/tarball.rs @@ -0,0 +1,260 @@ +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::collections::HashMap; +use std::sync::Arc; + +use anyhow::anyhow; +use anyhow::bail; +use anyhow::Context; +use anyhow::Error as AnyError; +use deno_npm::npm_rc::ResolvedNpmRc; +use deno_npm::registry::NpmPackageVersionDistInfo; +use deno_semver::package::PackageNv; +use deno_unsync::sync::MultiRuntimeAsyncValueCreator; +use futures::future::LocalBoxFuture; +use futures::FutureExt; +use http::StatusCode; +use parking_lot::Mutex; +use sys_traits::FsCreateDirAll; +use sys_traits::FsHardLink; +use sys_traits::FsMetadata; +use sys_traits::FsOpen; +use sys_traits::FsReadDir; +use sys_traits::FsRemoveFile; +use sys_traits::FsRename; +use sys_traits::SystemRandom; +use sys_traits::ThreadSleep; +use url::Url; + +use crate::remote::maybe_auth_header_for_npm_registry; +use crate::tarball_extract::verify_and_extract_tarball; +use crate::tarball_extract::TarballExtractionMode; +use crate::NpmCache; +use crate::NpmCacheHttpClient; +use crate::NpmCacheSetting; + +type LoadResult = Result<(), Arc>; +type LoadFuture = LocalBoxFuture<'static, LoadResult>; + +#[derive(Debug, Clone)] +enum MemoryCacheItem { + /// The cache item hasn't finished yet. + Pending(Arc>), + /// The result errored. + Errored(Arc), + /// This package has already been cached. + Cached, +} + +/// Coordinates caching of tarballs being loaded from +/// the npm registry. +/// +/// This is shared amongst all the workers. +#[derive(Debug)] +pub struct TarballCache< + THttpClient: NpmCacheHttpClient, + TSys: FsCreateDirAll + + FsHardLink + + FsMetadata + + FsOpen + + FsRemoveFile + + FsReadDir + + FsRename + + ThreadSleep + + SystemRandom + + Send + + Sync + + 'static, +> { + cache: Arc>, + http_client: Arc, + sys: TSys, + npmrc: Arc, + memory_cache: Mutex>, +} + +impl< + THttpClient: NpmCacheHttpClient, + TSys: FsCreateDirAll + + FsHardLink + + FsMetadata + + FsOpen + + FsRemoveFile + + FsReadDir + + FsRename + + ThreadSleep + + SystemRandom + + Send + + Sync + + 'static, + > TarballCache +{ + pub fn new( + cache: Arc>, + http_client: Arc, + sys: TSys, + npmrc: Arc, + ) -> Self { + Self { + cache, + http_client, + sys, + npmrc, + memory_cache: Default::default(), + } + } + + pub async fn ensure_package( + self: &Arc, + package_nv: &PackageNv, + dist: &NpmPackageVersionDistInfo, + ) -> Result<(), AnyError> { + self + .ensure_package_inner(package_nv, dist) + .await + .with_context(|| format!("Failed caching npm package '{}'.", package_nv)) + } + + async fn ensure_package_inner( + self: &Arc, + package_nv: &PackageNv, + dist: &NpmPackageVersionDistInfo, + ) -> Result<(), AnyError> { + let cache_item = { + let mut mem_cache = self.memory_cache.lock(); + if let Some(cache_item) = mem_cache.get(package_nv) { + cache_item.clone() + } else { + let value_creator = MultiRuntimeAsyncValueCreator::new({ + let tarball_cache = self.clone(); + let package_nv = package_nv.clone(); + let dist = dist.clone(); + Box::new(move || { + tarball_cache.create_setup_future(package_nv.clone(), dist.clone()) + }) + }); + let cache_item = MemoryCacheItem::Pending(Arc::new(value_creator)); + mem_cache.insert(package_nv.clone(), cache_item.clone()); + cache_item + } + }; + + match cache_item { + MemoryCacheItem::Cached => Ok(()), + MemoryCacheItem::Errored(err) => Err(anyhow!("{:#}", err)), + MemoryCacheItem::Pending(creator) => { + let result = creator.get().await; + match result { + Ok(_) => { + *self.memory_cache.lock().get_mut(package_nv).unwrap() = + MemoryCacheItem::Cached; + Ok(()) + } + Err(err) => { + let result_err = anyhow!("{:#}", err); + *self.memory_cache.lock().get_mut(package_nv).unwrap() = + MemoryCacheItem::Errored(err); + Err(result_err) + } + } + } + } + } + + fn create_setup_future( + self: &Arc, + package_nv: PackageNv, + dist: NpmPackageVersionDistInfo, + ) -> LoadFuture { + let tarball_cache = self.clone(); + async move { + let registry_url = tarball_cache.npmrc.get_registry_url(&package_nv.name); + let package_folder = + tarball_cache.cache.package_folder_for_nv_and_url(&package_nv, registry_url); + let should_use_cache = tarball_cache.cache.should_use_cache_for_package(&package_nv); + let package_folder_exists = tarball_cache.sys.fs_exists_no_err(&package_folder); + if should_use_cache && package_folder_exists { + return Ok(()); + } else if tarball_cache.cache.cache_setting() == &NpmCacheSetting::Only { + return Err(deno_core::error::custom_error( + "NotCached", + format!( + "npm package not found in cache: \"{}\", --cached-only is specified.", + &package_nv.name + ) + ) + ); + } + + if dist.tarball.is_empty() { + bail!("Tarball URL was empty."); + } + + // IMPORTANT: npm registries may specify tarball URLs at different URLS than the + // registry, so we MUST get the auth for the tarball URL and not the registry URL. + let tarball_uri = Url::parse(&dist.tarball)?; + let maybe_registry_config = + tarball_cache.npmrc.tarball_config(&tarball_uri); + let maybe_auth_header = maybe_registry_config.and_then(|c| maybe_auth_header_for_npm_registry(c).ok()?); + + let result = tarball_cache.http_client + .download_with_retries_on_any_tokio_runtime(tarball_uri, maybe_auth_header) + .await; + let maybe_bytes = match result { + Ok(maybe_bytes) => maybe_bytes, + Err(err) => { + if err.status_code == Some(StatusCode::UNAUTHORIZED) + && maybe_registry_config.is_none() + && tarball_cache.npmrc.get_registry_config(&package_nv.name).auth_token.is_some() + { + bail!( + concat!( + "No auth for tarball URI, but present for scoped registry.\n\n", + "Tarball URI: {}\n", + "Scope URI: {}\n\n", + "More info here: https://github.com/npm/cli/wiki/%22No-auth-for-URI,-but-auth-present-for-scoped-registry%22" + ), + dist.tarball, + registry_url, + ) + } + return Err(err.into()) + }, + }; + match maybe_bytes { + Some(bytes) => { + let extraction_mode = if should_use_cache || !package_folder_exists { + TarballExtractionMode::SiblingTempDir + } else { + // The user ran with `--reload`, so overwrite the package instead of + // deleting it since the package might get corrupted if a user kills + // their deno process while it's deleting a package directory + // + // We can't rename this folder and delete it because the folder + // may be in use by another process or may now contain hardlinks, + // which will cause windows to throw an "AccessDenied" error when + // renaming. So we settle for overwriting. + TarballExtractionMode::Overwrite + }; + let dist = dist.clone(); + let package_nv = package_nv.clone(); + deno_unsync::spawn_blocking(move || { + verify_and_extract_tarball( + &package_nv, + &bytes, + &dist, + &package_folder, + extraction_mode, + ) + }) + .await? + } + None => { + bail!("Could not find npm package tarball at: {}", dist.tarball); + } + } + } + .map(|r| r.map_err(Arc::new)) + .boxed_local() + } +} diff --git a/cli/npm/managed/cache/tarball_extract.rs b/resolvers/npm_cache/tarball_extract.rs similarity index 89% rename from cli/npm/managed/cache/tarball_extract.rs rename to resolvers/npm_cache/tarball_extract.rs index e2d242e6623e0a..cf408ac632f87c 100644 --- a/cli/npm/managed/cache/tarball_extract.rs +++ b/resolvers/npm_cache/tarball_extract.rs @@ -1,16 +1,17 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. +use std::borrow::Cow; use std::collections::HashSet; use std::fs; use std::io::ErrorKind; use std::path::Path; use std::path::PathBuf; +use anyhow::bail; +use anyhow::Context; +use anyhow::Error as AnyError; use base64::prelude::BASE64_STANDARD; use base64::Engine; -use deno_core::anyhow::bail; -use deno_core::anyhow::Context; -use deno_core::error::AnyError; use deno_npm::registry::NpmPackageVersionDistInfo; use deno_npm::registry::NpmPackageVersionDistInfoIntegrity; use deno_semver::package::PackageNv; @@ -18,8 +19,6 @@ use flate2::read::GzDecoder; use tar::Archive; use tar::EntryType; -use crate::util::path::get_atomic_dir_path; - #[derive(Debug, Copy, Clone)] pub enum TarballExtractionMode { /// Overwrites the destination directory without deleting any files. @@ -206,17 +205,38 @@ fn extract_tarball(data: &[u8], output_folder: &Path) -> Result<(), AnyError> { Ok(()) } +fn get_atomic_dir_path(file_path: &Path) -> PathBuf { + let rand = gen_rand_path_component(); + let new_file_name = format!( + ".{}_{}", + file_path + .file_name() + .map(|f| f.to_string_lossy()) + .unwrap_or(Cow::Borrowed("")), + rand + ); + file_path.with_file_name(new_file_name) +} + +fn gen_rand_path_component() -> String { + use std::fmt::Write; + (0..4).fold(String::with_capacity(8), |mut output, _| { + write!(&mut output, "{:02x}", rand::random::()).unwrap(); + output + }) +} + #[cfg(test)] mod test { use deno_semver::Version; - use test_util::TempDir; + use tempfile::TempDir; use super::*; #[test] pub fn test_verify_tarball() { let package = PackageNv { - name: "package".to_string(), + name: "package".into(), version: Version::parse_from_npm("1.0.0").unwrap(), }; let actual_checksum = @@ -303,21 +323,21 @@ mod test { #[test] fn rename_with_retries_succeeds_exists() { - let temp_dir = TempDir::new(); + let temp_dir = TempDir::new().unwrap(); let folder_1 = temp_dir.path().join("folder_1"); let folder_2 = temp_dir.path().join("folder_2"); - folder_1.create_dir_all(); - folder_1.join("a.txt").write("test"); - folder_2.create_dir_all(); + std::fs::create_dir_all(&folder_1).unwrap(); + std::fs::write(folder_1.join("a.txt"), "test").unwrap(); + std::fs::create_dir_all(&folder_2).unwrap(); // this will not end up in the output as rename_with_retries assumes // the folders ending up at the destination are the same - folder_2.join("b.txt").write("test2"); + std::fs::write(folder_2.join("b.txt"), "test2").unwrap(); let dest_folder = temp_dir.path().join("dest_folder"); - rename_with_retries(folder_1.as_path(), dest_folder.as_path()).unwrap(); - rename_with_retries(folder_2.as_path(), dest_folder.as_path()).unwrap(); + rename_with_retries(folder_1.as_path(), &dest_folder).unwrap(); + rename_with_retries(folder_2.as_path(), &dest_folder).unwrap(); assert!(dest_folder.join("a.txt").exists()); assert!(!dest_folder.join("b.txt").exists()); } diff --git a/resolvers/npm_cache/todo.md b/resolvers/npm_cache/todo.md new file mode 100644 index 00000000000000..e10b1cfd89470e --- /dev/null +++ b/resolvers/npm_cache/todo.md @@ -0,0 +1,9 @@ +This crate is a work in progress: + +1. Remove `deno_core` dependency. +1. Remove `anyhow` dependency. +1. Add a clippy.toml file that bans accessing the file system directory and + instead does it through a trait. +1. Make this crate work in Wasm. +1. Refactor to store npm packument in a single place: + https://github.com/denoland/deno/issues/27198 diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index b59cd14fa95694..9826a7459db2a4 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -1,8 +1,8 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "deno_runtime" -version = "0.186.0" +version = "0.192.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -90,6 +90,7 @@ deno_net.workspace = true deno_node.workspace = true deno_path_util.workspace = true deno_permissions.workspace = true +deno_telemetry.workspace = true deno_terminal.workspace = true deno_tls.workspace = true deno_url.workspace = true @@ -100,7 +101,6 @@ deno_websocket.workspace = true deno_webstorage.workspace = true node_resolver = { workspace = true, features = ["sync"] } -async-trait.workspace = true color-print.workspace = true dlopen2.workspace = true encoding_rs.workspace = true @@ -115,19 +115,14 @@ log.workspace = true netif = "0.1.6" notify.workspace = true once_cell.workspace = true -opentelemetry.workspace = true -opentelemetry-http.workspace = true -opentelemetry-otlp.workspace = true -opentelemetry-semantic-conventions.workspace = true -opentelemetry_sdk.workspace = true percent-encoding.workspace = true -pin-project.workspace = true regex.workspace = true rustyline = { workspace = true, features = ["custom-bindings"] } same-file = "1.0.6" serde.workspace = true signal-hook = "0.3.17" signal-hook-registry = "1.4.0" +sys_traits.workspace = true tempfile.workspace = true thiserror.workspace = true tokio.workspace = true diff --git a/runtime/code_cache.rs b/runtime/code_cache.rs index 2a56543a4127f8..b7ee8a9ed6aa2d 100644 --- a/runtime/code_cache.rs +++ b/runtime/code_cache.rs @@ -1,21 +1,13 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_core::ModuleSpecifier; +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub enum CodeCacheType { EsModule, Script, } -impl CodeCacheType { - pub fn as_str(&self) -> &str { - match self { - Self::EsModule => "esmodule", - Self::Script => "script", - } - } -} - pub trait CodeCache: Send + Sync { fn get_sync( &self, @@ -23,6 +15,7 @@ pub trait CodeCache: Send + Sync { code_cache_type: CodeCacheType, source_hash: u64, ) -> Option>; + fn set_sync( &self, specifier: ModuleSpecifier, diff --git a/runtime/errors.rs b/runtime/errors.rs index 4268fbd502df13..7b61395866b1ce 100644 --- a/runtime/errors.rs +++ b/runtime/errors.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. //! There are many types of errors in Deno: //! - AnyError: a generic wrapper that can encapsulate any type of error. @@ -9,16 +9,11 @@ //! Diagnostics are compile-time type errors, whereas JsErrors are runtime //! exceptions. -use crate::ops::fs_events::FsEventsError; -use crate::ops::http::HttpStartError; -use crate::ops::os::OsError; -use crate::ops::permissions::PermissionError; -use crate::ops::process::CheckRunPermissionError; -use crate::ops::process::ProcessError; -use crate::ops::signal::SignalError; -use crate::ops::tty::TtyError; -use crate::ops::web_worker::SyncFetchError; -use crate::ops::worker_host::CreateWorkerError; +use std::env; +use std::error::Error; +use std::io; +use std::sync::Arc; + use deno_broadcast_channel::BroadcastChannelError; use deno_cache::CacheError; use deno_canvas::CanvasError; @@ -68,10 +63,17 @@ use deno_websocket::HandshakeError; use deno_websocket::WebsocketError; use deno_webstorage::WebStorageError; use rustyline::error::ReadlineError; -use std::env; -use std::error::Error; -use std::io; -use std::sync::Arc; + +use crate::ops::fs_events::FsEventsError; +use crate::ops::http::HttpStartError; +use crate::ops::os::OsError; +use crate::ops::permissions::PermissionError; +use crate::ops::process::CheckRunPermissionError; +use crate::ops::process::ProcessError; +use crate::ops::signal::SignalError; +use crate::ops::tty::TtyError; +use crate::ops::web_worker::SyncFetchError; +use crate::ops::worker_host::CreateWorkerError; fn get_run_descriptor_parse_error(e: &RunDescriptorParseError) -> &'static str { match e { @@ -696,6 +698,7 @@ fn get_fetch_error(error: &FetchError) -> &'static str { FetchError::Permission(e) => get_permission_check_error_class(e), FetchError::NetworkError => "TypeError", FetchError::FsNotGet(_) => "TypeError", + FetchError::PathToUrl(_) => "TypeError", FetchError::InvalidUrl(_) => "TypeError", FetchError::InvalidHeaderName(_) => "TypeError", FetchError::InvalidHeaderValue(_) => "TypeError", @@ -711,7 +714,6 @@ fn get_fetch_error(error: &FetchError) -> &'static str { FetchError::ClientSend(_) => "TypeError", FetchError::RequestBuilderHook(_) => "TypeError", FetchError::Io(e) => get_io_error_class(e), - FetchError::Hyper(e) => get_hyper_error_class(e), } } @@ -1047,11 +1049,6 @@ fn get_fs_error(e: &FsError) -> &'static str { } mod node { - use super::get_error_class_name; - use super::get_io_error_class; - use super::get_permission_check_error_class; - use super::get_serde_json_error_class; - use super::get_url_parse_error_class; pub use deno_node::ops::blocklist::BlocklistError; pub use deno_node::ops::crypto::cipher::CipherContextError; pub use deno_node::ops::crypto::cipher::CipherError; @@ -1082,6 +1079,7 @@ mod node { pub use deno_node::ops::crypto::SignEd25519Error; pub use deno_node::ops::crypto::VerifyEd25519Error; pub use deno_node::ops::fs::FsError; + pub use deno_node::ops::http::ConnError; pub use deno_node::ops::http2::Http2Error; pub use deno_node::ops::idna::IdnaError; pub use deno_node::ops::ipc::IpcError; @@ -1095,6 +1093,12 @@ mod node { pub use deno_node::ops::zlib::mode::ModeError; pub use deno_node::ops::zlib::ZlibError; + use super::get_error_class_name; + use super::get_io_error_class; + use super::get_permission_check_error_class; + use super::get_serde_json_error_class; + use super::get_url_parse_error_class; + pub fn get_blocklist_error(error: &BlocklistError) -> &'static str { match error { BlocklistError::AddrParse(_) => "Error", @@ -1156,7 +1160,7 @@ mod node { WorkerThreadsFilenameError::UrlToPathString => "Error", WorkerThreadsFilenameError::UrlToPath => "Error", WorkerThreadsFilenameError::FileNotFound(_) => "Error", - WorkerThreadsFilenameError::Fs(e) => super::get_fs_error(e), + WorkerThreadsFilenameError::Fs(e) => super::get_io_error_class(e), } } @@ -1172,7 +1176,7 @@ mod node { | UrlConversion(_) | ReadModule(_) | PackageImportsResolve(_) => "Error", - Fs(e) | UnableToGetCwd(e) => super::get_fs_error(e), + Fs(e) | UnableToGetCwd(e) => super::get_io_error_class(e), } } @@ -1537,6 +1541,24 @@ mod node { pub fn get_verify_ed25519_error(_: &VerifyEd25519Error) -> &'static str { "TypeError" } + + pub fn get_conn_error(e: &ConnError) -> &'static str { + match e { + ConnError::Resource(e) => get_error_class_name(e).unwrap_or("Error"), + ConnError::Permission(e) => get_permission_check_error_class(e), + ConnError::InvalidUrl(_) => "TypeError", + ConnError::InvalidHeaderName(_) => "TypeError", + ConnError::InvalidHeaderValue(_) => "TypeError", + ConnError::Url(e) => get_url_parse_error_class(e), + ConnError::Method(_) => "TypeError", + ConnError::Io(e) => get_io_error_class(e), + ConnError::Hyper(e) => super::get_hyper_error_class(e), + ConnError::TlsStreamBusy => "Busy", + ConnError::TcpStreamBusy => "Busy", + ConnError::ReuniteTcp(_) => "Error", + ConnError::Canceled(_) => "Error", + } + } } fn get_os_error(error: &OsError) -> &'static str { @@ -1729,6 +1751,10 @@ pub fn get_error_class_name(e: &AnyError) -> Option<&'static str> { e.downcast_ref::() .map(node::get_verify_ed25519_error) }) + .or_else(|| { + e.downcast_ref::() + .map(node::get_conn_error) + }) .or_else(|| e.downcast_ref::().map(get_napi_error_class)) .or_else(|| e.downcast_ref::().map(get_web_error_class)) .or_else(|| { diff --git a/runtime/examples/extension/bootstrap.js b/runtime/examples/extension/bootstrap.js index 9461acb84a2a94..78e0cb999ff091 100644 --- a/runtime/examples/extension/bootstrap.js +++ b/runtime/examples/extension/bootstrap.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { op_hello } from "ext:core/ops"; function hello() { op_hello("world"); diff --git a/runtime/examples/extension/main.js b/runtime/examples/extension/main.js index 4d6e4e3b7d1f31..4a66aecf583172 100644 --- a/runtime/examples/extension/main.js +++ b/runtime/examples/extension/main.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. console.log("Hello world from JS!"); console.log(Deno.build); Extension.hello(); diff --git a/runtime/examples/extension/main.rs b/runtime/examples/extension/main.rs index 1ff16ec83f69b1..9f0eb63b0188ed 100644 --- a/runtime/examples/extension/main.rs +++ b/runtime/examples/extension/main.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. #![allow(clippy::print_stdout)] #![allow(clippy::print_stderr)] @@ -37,11 +37,12 @@ async fn main() -> Result<(), AnyError> { let main_module = ModuleSpecifier::from_file_path(js_path).unwrap(); eprintln!("Running {main_module}..."); let fs = Arc::new(RealFs); - let permission_desc_parser = - Arc::new(RuntimePermissionDescriptorParser::new(fs.clone())); + let permission_desc_parser = Arc::new( + RuntimePermissionDescriptorParser::new(sys_traits::impls::RealSys), + ); let mut worker = MainWorker::bootstrap_from_options( main_module.clone(), - WorkerServiceOptions { + WorkerServiceOptions:: { module_loader: Rc::new(FsModuleLoader), permissions: PermissionsContainer::allow_all(permission_desc_parser), blob_store: Default::default(), diff --git a/runtime/fmt_errors.rs b/runtime/fmt_errors.rs index 6c05fbc6334fd2..1a2bc5dfd3162d 100644 --- a/runtime/fmt_errors.rs +++ b/runtime/fmt_errors.rs @@ -1,11 +1,12 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. //! This mod provides DenoError to unify errors across Deno. +use std::fmt::Write as _; + use color_print::cformat; use color_print::cstr; use deno_core::error::format_frame; use deno_core::error::JsError; use deno_terminal::colors; -use std::fmt::Write as _; #[derive(Debug, Clone)] struct ErrorReference<'a> { @@ -316,7 +317,8 @@ fn get_suggestions_for_terminal_errors(e: &JsError) -> Vec { FixSuggestion::hint_multiline(&[ "Rewrite this module to ESM,", cstr!("or change the file extension to .cjs,"), - cstr!("or add package.json next to the file with \"type\": \"commonjs\" option."), + cstr!("or add package.json next to the file with \"type\": \"commonjs\" option,"), + cstr!("or pass --unstable-detect-cjs flag to detect CommonJS when loading."), ]), FixSuggestion::docs("https://docs.deno.com/go/commonjs"), ]; @@ -421,6 +423,20 @@ fn get_suggestions_for_terminal_errors(e: &JsError) -> Vec { "Run again with `--unstable-webgpu` flag to enable this API.", ), ]; + } else if msg.contains("listenQuic is not a function") { + return vec![ + FixSuggestion::info("listenQuic is an unstable API."), + FixSuggestion::hint( + "Run again with `--unstable-net` flag to enable this API.", + ), + ]; + } else if msg.contains("connectQuic is not a function") { + return vec![ + FixSuggestion::info("connectQuic is an unstable API."), + FixSuggestion::hint( + "Run again with `--unstable-net` flag to enable this API.", + ), + ]; // Try to capture errors like: // ``` // Uncaught Error: Cannot find module '../build/Release/canvas.node' @@ -475,9 +491,10 @@ pub fn format_js_error(js_error: &JsError) -> String { #[cfg(test)] mod tests { - use super::*; use test_util::strip_ansi_codes; + use super::*; + #[test] fn test_format_none_source_line() { let actual = format_maybe_source_line(None, None, false, 0); diff --git a/runtime/fs_util.rs b/runtime/fs_util.rs index a858e9770d5ec4..7788a97170b3bd 100644 --- a/runtime/fs_util.rs +++ b/runtime/fs_util.rs @@ -1,10 +1,11 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::path::Path; +use std::path::PathBuf; use deno_core::anyhow::Context; use deno_core::error::AnyError; use deno_path_util::normalize_path; -use std::path::Path; -use std::path::PathBuf; #[inline] pub fn resolve_from_cwd(path: &Path) -> Result { diff --git a/runtime/inspector_server.rs b/runtime/inspector_server.rs index a789dd3dcab10d..75e9668db45e69 100644 --- a/runtime/inspector_server.rs +++ b/runtime/inspector_server.rs @@ -1,7 +1,15 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Alias for the future `!` type. use core::convert::Infallible as Never; +use std::cell::RefCell; +use std::collections::HashMap; +use std::net::SocketAddr; +use std::pin::pin; +use std::process; +use std::rc::Rc; +use std::thread; + use deno_core::anyhow::Context; use deno_core::error::AnyError; use deno_core::futures::channel::mpsc; @@ -28,13 +36,6 @@ use fastwebsockets::OpCode; use fastwebsockets::WebSocket; use hyper::body::Bytes; use hyper_util::rt::TokioIo; -use std::cell::RefCell; -use std::collections::HashMap; -use std::net::SocketAddr; -use std::pin::pin; -use std::process; -use std::rc::Rc; -use std::thread; use tokio::net::TcpListener; use tokio::sync::broadcast; use uuid::Uuid; diff --git a/runtime/js.rs b/runtime/js.rs index a8384ceacf68e2..55ab75b66bf8e0 100644 --- a/runtime/js.rs +++ b/runtime/js.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. #[cfg(not(feature = "include_js_files_for_snapshotting"))] pub static SOURCE_CODE_FOR_99_MAIN_JS: &str = include_str!("js/99_main.js"); diff --git a/runtime/js/01_errors.js b/runtime/js/01_errors.js index ea567a5d08de0d..09fd82e867f6a9 100644 --- a/runtime/js/01_errors.js +++ b/runtime/js/01_errors.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { core, primordials } from "ext:core/mod.js"; const { BadResource, Interrupted, NotCapable } = core; diff --git a/runtime/js/01_version.ts b/runtime/js/01_version.ts index 33a8f50cdd6741..779a88689769d0 100644 --- a/runtime/js/01_version.ts +++ b/runtime/js/01_version.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { primordials } from "ext:core/mod.js"; const { diff --git a/runtime/js/06_util.js b/runtime/js/06_util.js index bf71c371b96816..658cfa69aa77ed 100644 --- a/runtime/js/06_util.js +++ b/runtime/js/06_util.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { primordials } from "ext:core/mod.js"; import { op_bootstrap_log_level } from "ext:core/ops"; diff --git a/runtime/js/10_permissions.js b/runtime/js/10_permissions.js index 831b6bf2ae75bd..c835cc1c5a8c92 100644 --- a/runtime/js/10_permissions.js +++ b/runtime/js/10_permissions.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { primordials } from "ext:core/mod.js"; import { diff --git a/runtime/js/11_workers.js b/runtime/js/11_workers.js index 3853761920f38e..fd368669362c0e 100644 --- a/runtime/js/11_workers.js +++ b/runtime/js/11_workers.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { core, primordials } from "ext:core/mod.js"; import { diff --git a/runtime/js/30_os.js b/runtime/js/30_os.js index f3dfda886d60b0..166b983f45f9b5 100644 --- a/runtime/js/30_os.js +++ b/runtime/js/30_os.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { primordials } from "ext:core/mod.js"; import { diff --git a/runtime/js/40_fs_events.js b/runtime/js/40_fs_events.js index 322ee6b3ca8bbe..25f397b84078be 100644 --- a/runtime/js/40_fs_events.js +++ b/runtime/js/40_fs_events.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { core, primordials } from "ext:core/mod.js"; import { op_fs_events_open, op_fs_events_poll } from "ext:core/ops"; diff --git a/runtime/js/40_process.js b/runtime/js/40_process.js index e2cb1d95b270fa..fde97fac64fb72 100644 --- a/runtime/js/40_process.js +++ b/runtime/js/40_process.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { core, internals, primordials } from "ext:core/mod.js"; import { diff --git a/runtime/js/40_signals.js b/runtime/js/40_signals.js index 41f25af677ea21..161adfabbcb324 100644 --- a/runtime/js/40_signals.js +++ b/runtime/js/40_signals.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { core, primordials } from "ext:core/mod.js"; import { op_signal_bind, op_signal_poll, op_signal_unbind } from "ext:core/ops"; diff --git a/runtime/js/40_tty.js b/runtime/js/40_tty.js index 72e7b688461e45..56f8721eaf2b7e 100644 --- a/runtime/js/40_tty.js +++ b/runtime/js/40_tty.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { core, primordials } from "ext:core/mod.js"; import { op_console_size } from "ext:core/ops"; const { diff --git a/runtime/js/41_prompt.js b/runtime/js/41_prompt.js index 8460862d2edf12..e300f69a3c0e3b 100644 --- a/runtime/js/41_prompt.js +++ b/runtime/js/41_prompt.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { core, primordials } from "ext:core/mod.js"; import { op_read_line_prompt } from "ext:core/ops"; const { diff --git a/runtime/js/90_deno_ns.js b/runtime/js/90_deno_ns.js index 079338510b802f..e13a8d1307aa7b 100644 --- a/runtime/js/90_deno_ns.js +++ b/runtime/js/90_deno_ns.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { core } from "ext:core/mod.js"; import { @@ -13,6 +13,7 @@ import * as console from "ext:deno_console/01_console.js"; import * as ffi from "ext:deno_ffi/00_ffi.js"; import * as net from "ext:deno_net/01_net.js"; import * as tls from "ext:deno_net/02_tls.js"; +import * as quic from "ext:deno_net/03_quic.js"; import * as serve from "ext:deno_http/00_serve.ts"; import * as http from "ext:deno_http/01_http.js"; import * as websocket from "ext:deno_http/02_websocket.ts"; @@ -29,7 +30,7 @@ import * as tty from "ext:runtime/40_tty.js"; import * as kv from "ext:deno_kv/01_db.ts"; import * as cron from "ext:deno_cron/01_cron.ts"; import * as webgpuSurface from "ext:deno_webgpu/02_surface.js"; -import * as telemetry from "ext:runtime/telemetry.js"; +import * as telemetry from "ext:deno_telemetry/telemetry.ts"; const denoNs = { Process: process.Process, @@ -174,6 +175,15 @@ denoNsUnstableById[unstableIds.net] = { op_net_listen_udp, op_net_listen_unixpacket, ), + + connectQuic: quic.connectQuic, + listenQuic: quic.listenQuic, + QuicBidirectionalStream: quic.QuicBidirectionalStream, + QuicConn: quic.QuicConn, + QuicListener: quic.QuicListener, + QuicReceiveStream: quic.QuicReceiveStream, + QuicSendStream: quic.QuicSendStream, + QuicIncoming: quic.QuicIncoming, }; // denoNsUnstableById[unstableIds.unsafeProto] = { __proto__: null } @@ -185,8 +195,7 @@ denoNsUnstableById[unstableIds.webgpu] = { // denoNsUnstableById[unstableIds.workerOptions] = { __proto__: null } denoNsUnstableById[unstableIds.otel] = { - tracing: telemetry.tracing, - metrics: telemetry.metrics, + telemetry: telemetry.telemetry, }; export { denoNs, denoNsUnstableById, unstableIds }; diff --git a/runtime/js/98_global_scope_shared.js b/runtime/js/98_global_scope_shared.js index f8e76b7ce7e981..99bace76478ee3 100644 --- a/runtime/js/98_global_scope_shared.js +++ b/runtime/js/98_global_scope_shared.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { core } from "ext:core/mod.js"; @@ -32,7 +32,7 @@ import { DOMException } from "ext:deno_web/01_dom_exception.js"; import * as abortSignal from "ext:deno_web/03_abort_signal.js"; import * as imageData from "ext:deno_web/16_image_data.js"; import process from "node:process"; -import Buffer from "node:buffer"; +import { Buffer } from "node:buffer"; import { clearImmediate, setImmediate } from "node:timers"; import { loadWebGPU } from "ext:deno_webgpu/00_init.js"; import * as webgpuSurface from "ext:deno_webgpu/02_surface.js"; diff --git a/runtime/js/98_global_scope_window.js b/runtime/js/98_global_scope_window.js index 098422f56f8b1b..c42a940a829796 100644 --- a/runtime/js/98_global_scope_window.js +++ b/runtime/js/98_global_scope_window.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { core, primordials } from "ext:core/mod.js"; import { diff --git a/runtime/js/98_global_scope_worker.js b/runtime/js/98_global_scope_worker.js index 4dc6157867ecb5..f10bb2830dbbb6 100644 --- a/runtime/js/98_global_scope_worker.js +++ b/runtime/js/98_global_scope_worker.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { core, primordials } from "ext:core/mod.js"; import { diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index b21575b8fbb579..03c662bcab8308 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Remove Intl.v8BreakIterator because it is a non-standard API. delete Intl.v8BreakIterator; @@ -37,6 +37,7 @@ const { ObjectHasOwn, ObjectKeys, ObjectGetOwnPropertyDescriptor, + ObjectGetOwnPropertyDescriptors, ObjectPrototypeIsPrototypeOf, ObjectSetPrototypeOf, PromisePrototypeThen, @@ -45,6 +46,7 @@ const { Symbol, SymbolIterator, TypeError, + uncurryThis, } = primordials; const { isNativeError, @@ -86,7 +88,7 @@ import { workerRuntimeGlobalProperties, } from "ext:runtime/98_global_scope_worker.js"; import { SymbolDispose, SymbolMetadata } from "ext:deno_web/00_infra.js"; -import { bootstrap as bootstrapOtel } from "ext:runtime/telemetry.js"; +import { bootstrap as bootstrapOtel } from "ext:deno_telemetry/telemetry.ts"; // deno-lint-ignore prefer-primordials if (Symbol.metadata) { @@ -168,12 +170,14 @@ function postMessage(message, transferOrOptions = { __proto__: null }) { let isClosing = false; let globalDispatchEvent; +let closeOnIdle; function hasMessageEventListener() { // the function name is kind of a misnomer, but we want to behave // as if we have message event listeners if a node message port is explicitly // refed (and the inverse as well) - return event.listenerCount(globalThis, "message") > 0 || + return (event.listenerCount(globalThis, "message") > 0 && + !globalThis[messagePort.unrefParentPort]) || messagePort.refedMessagePortsCount > 0; } @@ -186,7 +190,10 @@ async function pollForMessages() { } while (!isClosing) { const recvMessage = op_worker_recv_message(); - if (globalThis[messagePort.unrefPollForMessages] === true) { + // In a Node.js worker, unref() the op promise to prevent it from + // keeping the event loop alive. This avoids the need to explicitly + // call self.close() or worker.terminate(). + if (closeOnIdle) { core.unrefOpPromise(recvMessage); } const data = await recvMessage; @@ -459,6 +466,51 @@ function exposeUnstableFeaturesForWindowOrWorkerGlobalScope(unstableFeatures) { } } +function shimTemporalDurationToLocaleString() { + const DurationFormat = Intl.DurationFormat; + if (!DurationFormat) { + // Intl.DurationFormat can be disabled with --v8-flags=--no-harmony-intl-duration-format + return; + } + const DurationFormatPrototype = DurationFormat.prototype; + const formatDuration = uncurryThis(DurationFormatPrototype.format); + + const Duration = Temporal.Duration; + const DurationPrototype = Duration.prototype; + const desc = ObjectGetOwnPropertyDescriptors(DurationPrototype); + const assertDuration = uncurryThis(desc.toLocaleString.value); + const getYears = uncurryThis(desc.years.get); + const getMonths = uncurryThis(desc.months.get); + const getWeeks = uncurryThis(desc.weeks.get); + const getDays = uncurryThis(desc.days.get); + const getHours = uncurryThis(desc.hours.get); + const getMinutes = uncurryThis(desc.minutes.get); + const getSeconds = uncurryThis(desc.seconds.get); + const getMilliseconds = uncurryThis(desc.milliseconds.get); + const getMicroseconds = uncurryThis(desc.microseconds.get); + const getNanoseconds = uncurryThis(desc.nanoseconds.get); + + ObjectAssign(DurationPrototype, { + toLocaleString(locales = undefined, options) { + assertDuration(this); + const durationFormat = new DurationFormat(locales, options); + const duration = { + years: getYears(this), + months: getMonths(this), + weeks: getWeeks(this), + days: getDays(this), + hours: getHours(this), + minutes: getMinutes(this), + seconds: getSeconds(this), + milliseconds: getMilliseconds(this), + microseconds: getMicroseconds(this), + nanoseconds: getNanoseconds(this), + }; + return formatDuration(durationFormat, duration); + }, + }); +} + // NOTE(bartlomieju): remove all the ops that have already been imported using // "virtual op module" (`ext:core/ops`). const NOT_IMPORTED_OPS = [ @@ -474,6 +526,9 @@ const NOT_IMPORTED_OPS = [ // Used in jupyter API "op_base64_encode", + // Used in the lint API + "op_lint_create_serialized_ast", + // Related to `Deno.test()` API "op_test_event_step_result_failed", "op_test_event_step_result_ignored", @@ -821,6 +876,12 @@ function bootstrapMainRuntime(runtimeOptions, warmup = false) { }); delete globalThis.Temporal.Now.timeZone; } + + // deno-lint-ignore prefer-primordials + if (new Temporal.Duration().toLocaleString("en-US") !== "PT0S") { + throw "V8 supports Temporal.Duration.prototype.toLocaleString now, no need to shim it"; + } + shimTemporalDurationToLocaleString(); } // Setup `Deno` global - we're actually overriding already existing global @@ -862,6 +923,7 @@ function bootstrapWorkerRuntime( 6: argv0, 7: nodeDebug, 13: otelConfig, + 14: closeOnIdle_, } = runtimeOptions; performance.setTimeOrigin(); @@ -914,6 +976,7 @@ function bootstrapWorkerRuntime( globalThis.pollForMessages = pollForMessages; globalThis.hasMessageEventListener = hasMessageEventListener; + closeOnIdle = closeOnIdle_; for (let i = 0; i <= unstableFeatures.length; i++) { const id = unstableFeatures[i]; @@ -1024,6 +1087,8 @@ function bootstrapWorkerRuntime( }); delete globalThis.Temporal.Now.timeZone; } + + shimTemporalDurationToLocaleString(); } // Setup `Deno` global - we're actually overriding already existing global diff --git a/runtime/js/telemetry.js b/runtime/js/telemetry.js deleted file mode 100644 index 195839fb158d77..00000000000000 --- a/runtime/js/telemetry.js +++ /dev/null @@ -1,409 +0,0 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. - -import { core, primordials } from "ext:core/mod.js"; -import { - op_otel_log, - op_otel_span_attribute, - op_otel_span_attribute2, - op_otel_span_attribute3, - op_otel_span_continue, - op_otel_span_flush, - op_otel_span_start, -} from "ext:core/ops"; -import { Console } from "ext:deno_console/01_console.js"; -import { performance } from "ext:deno_web/15_performance.js"; - -const { - SymbolDispose, - MathRandom, - Array, - ObjectEntries, - SafeMap, - ReflectApply, - SymbolFor, - Error, - NumberPrototypeToString, - StringPrototypePadStart, -} = primordials; -const { AsyncVariable, setAsyncContext } = core; - -const CURRENT = new AsyncVariable(); -let TRACING_ENABLED = false; -let DETERMINISTIC = false; - -const SPAN_ID_BYTES = 8; -const TRACE_ID_BYTES = 16; - -const TRACE_FLAG_SAMPLED = 1 << 0; - -const hexSliceLookupTable = (function () { - const alphabet = "0123456789abcdef"; - const table = new Array(256); - for (let i = 0; i < 16; ++i) { - const i16 = i * 16; - for (let j = 0; j < 16; ++j) { - table[i16 + j] = alphabet[i] + alphabet[j]; - } - } - return table; -})(); - -let counter = 1; - -const INVALID_SPAN_ID = "0000000000000000"; -const INVALID_TRACE_ID = "00000000000000000000000000000000"; - -function generateId(bytes) { - if (DETERMINISTIC) { - return StringPrototypePadStart( - NumberPrototypeToString(counter++, 16), - bytes * 2, - "0", - ); - } - let out = ""; - for (let i = 0; i < bytes / 4; i += 1) { - const r32 = (MathRandom() * 2 ** 32) >>> 0; - out += hexSliceLookupTable[(r32 >> 24) & 0xff]; - out += hexSliceLookupTable[(r32 >> 16) & 0xff]; - out += hexSliceLookupTable[(r32 >> 8) & 0xff]; - out += hexSliceLookupTable[r32 & 0xff]; - } - return out; -} - -function submit(span) { - if (!(span.traceFlags & TRACE_FLAG_SAMPLED)) return; - - op_otel_span_start( - span.traceId, - span.spanId, - span.parentSpanId ?? "", - span.kind, - span.name, - span.startTime, - span.endTime, - ); - - if (span.status !== null && span.status.code !== 0) { - op_otel_span_continue(span.code, span.message ?? ""); - } - - const attributes = ObjectEntries(span.attributes); - let i = 0; - while (i < attributes.length) { - if (i + 2 < attributes.length) { - op_otel_span_attribute3( - attributes.length, - attributes[i][0], - attributes[i][1], - attributes[i + 1][0], - attributes[i + 1][1], - attributes[i + 2][0], - attributes[i + 2][1], - ); - i += 3; - } else if (i + 1 < attributes.length) { - op_otel_span_attribute2( - attributes.length, - attributes[i][0], - attributes[i][1], - attributes[i + 1][0], - attributes[i + 1][1], - ); - i += 2; - } else { - op_otel_span_attribute( - attributes.length, - attributes[i][0], - attributes[i][1], - ); - i += 1; - } - } - - op_otel_span_flush(); -} - -const now = () => (performance.timeOrigin + performance.now()) / 1000; - -const NO_ASYNC_CONTEXT = {}; - -class Span { - traceId; - spanId; - parentSpanId; - kind; - name; - startTime; - endTime; - status = null; - attributes = { __proto__: null }; - traceFlags = TRACE_FLAG_SAMPLED; - - enabled = TRACING_ENABLED; - #asyncContext = NO_ASYNC_CONTEXT; - - constructor(name, kind = "internal") { - if (!this.enabled) { - this.traceId = INVALID_TRACE_ID; - this.spanId = INVALID_SPAN_ID; - this.parentSpanId = INVALID_SPAN_ID; - return; - } - - this.startTime = now(); - - this.spanId = generateId(SPAN_ID_BYTES); - - let traceId; - let parentSpanId; - const parent = Span.current(); - if (parent) { - if (parent.spanId !== undefined) { - parentSpanId = parent.spanId; - traceId = parent.traceId; - } else { - const context = parent.spanContext(); - parentSpanId = context.spanId; - traceId = context.traceId; - } - } - if ( - traceId && traceId !== INVALID_TRACE_ID && parentSpanId && - parentSpanId !== INVALID_SPAN_ID - ) { - this.traceId = traceId; - this.parentSpanId = parentSpanId; - } else { - this.traceId = generateId(TRACE_ID_BYTES); - this.parentSpanId = INVALID_SPAN_ID; - } - - this.name = name; - - switch (kind) { - case "internal": - this.kind = 0; - break; - case "server": - this.kind = 1; - break; - case "client": - this.kind = 2; - break; - case "producer": - this.kind = 3; - break; - case "consumer": - this.kind = 4; - break; - default: - throw new Error(`Invalid span kind: ${kind}`); - } - - this.enter(); - } - - // helper function to match otel js api - spanContext() { - return { - traceId: this.traceId, - spanId: this.spanId, - traceFlags: this.traceFlags, - }; - } - - setAttribute(name, value) { - if (!this.enabled) return; - this.attributes[name] = value; - } - - enter() { - if (!this.enabled) return; - const context = (CURRENT.get() || ROOT_CONTEXT).setValue(SPAN_KEY, this); - this.#asyncContext = CURRENT.enter(context); - } - - exit() { - if (!this.enabled || this.#asyncContext === NO_ASYNC_CONTEXT) return; - setAsyncContext(this.#asyncContext); - this.#asyncContext = NO_ASYNC_CONTEXT; - } - - end() { - if (!this.enabled || this.endTime !== undefined) return; - this.exit(); - this.endTime = now(); - submit(this); - } - - [SymbolDispose]() { - this.end(); - } - - static current() { - return CURRENT.get()?.getValue(SPAN_KEY); - } -} - -function hrToSecs(hr) { - return ((hr[0] * 1e3 + hr[1] / 1e6) / 1000); -} - -// Exporter compatible with opentelemetry js library -class SpanExporter { - export(spans, resultCallback) { - try { - for (let i = 0; i < spans.length; i += 1) { - const span = spans[i]; - const context = span.spanContext(); - submit({ - spanId: context.spanId, - traceId: context.traceId, - traceFlags: context.traceFlags, - name: span.name, - kind: span.kind, - parentSpanId: span.parentSpanId, - startTime: hrToSecs(span.startTime), - endTime: hrToSecs(span.endTime), - status: span.status, - attributes: span.attributes, - }); - } - resultCallback({ code: 0 }); - } catch (error) { - resultCallback({ code: 1, error }); - } - } - - async shutdown() {} - - async forceFlush() {} -} - -// SPAN_KEY matches symbol in otel-js library -const SPAN_KEY = SymbolFor("OpenTelemetry Context Key SPAN"); - -// Context tracker compatible with otel-js api -class Context { - #data = new SafeMap(); - - constructor(data) { - this.#data = data ? new SafeMap(data) : new SafeMap(); - } - - getValue(key) { - return this.#data.get(key); - } - - setValue(key, value) { - const c = new Context(this.#data); - c.#data.set(key, value); - return c; - } - - deleteValue(key) { - const c = new Context(this.#data); - c.#data.delete(key); - return c; - } -} - -const ROOT_CONTEXT = new Context(); - -// Context manager for opentelemetry js library -class ContextManager { - active() { - return CURRENT.get() ?? ROOT_CONTEXT; - } - - with(context, fn, thisArg, ...args) { - const ctx = CURRENT.enter(context); - try { - return ReflectApply(fn, thisArg, args); - } finally { - setAsyncContext(ctx); - } - } - - bind(context, f) { - return (...args) => { - const ctx = CURRENT.enter(context); - try { - return ReflectApply(f, thisArg, args); - } finally { - setAsyncContext(ctx); - } - }; - } - - enable() { - return this; - } - - disable() { - return this; - } -} - -function otelLog(message, level) { - let traceId = ""; - let spanId = ""; - let traceFlags = 0; - const span = Span.current(); - if (span) { - if (span.spanId !== undefined) { - spanId = span.spanId; - traceId = span.traceId; - traceFlags = span.traceFlags; - } else { - const context = span.spanContext(); - spanId = context.spanId; - traceId = context.traceId; - traceFlags = context.traceFlags; - } - } - return op_otel_log(message, level, traceId, spanId, traceFlags); -} - -const otelConsoleConfig = { - ignore: 0, - capture: 1, - replace: 2, -}; - -export function bootstrap(config) { - if (config.length === 0) return; - const { 0: consoleConfig, 1: deterministic } = config; - - TRACING_ENABLED = true; - DETERMINISTIC = deterministic === 1; - - switch (consoleConfig) { - case otelConsoleConfig.capture: - core.wrapConsole(globalThis.console, new Console(otelLog)); - break; - case otelConsoleConfig.replace: - ObjectDefineProperty( - globalThis, - "console", - core.propNonEnumerable(new Console(otelLog)), - ); - break; - default: - break; - } -} - -export const tracing = { - get enabled() { - return TRACING_ENABLED; - }, - Span, - SpanExporter, - ContextManager, -}; - -// TODO(devsnek): implement metrics -export const metrics = {}; diff --git a/runtime/lib.rs b/runtime/lib.rs index a6e60ced186cf4..3e48ec89c0a59a 100644 --- a/runtime/lib.rs +++ b/runtime/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. pub use deno_broadcast_channel; pub use deno_cache; @@ -34,6 +34,7 @@ pub mod inspector_server; pub mod js; pub mod ops; pub mod permissions; +pub mod signal; pub mod snapshot; pub mod sys_info; pub mod tokio_util; @@ -45,7 +46,7 @@ pub use worker_bootstrap::BootstrapOptions; pub use worker_bootstrap::WorkerExecutionMode; pub use worker_bootstrap::WorkerLogLevel; -mod shared; +pub mod shared; pub use shared::runtime; pub struct UnstableGranularFlag { @@ -148,7 +149,7 @@ pub static UNSTABLE_GRANULAR_FLAGS: &[UnstableGranularFlag] = &[ ]; pub fn exit(code: i32) -> ! { - crate::ops::otel::flush(); + deno_telemetry::flush(); #[allow(clippy::disallowed_methods)] std::process::exit(code); } diff --git a/runtime/ops/bootstrap.rs b/runtime/ops/bootstrap.rs index bbbddc61baa763..b362217d2ce8e5 100644 --- a/runtime/ops/bootstrap.rs +++ b/runtime/ops/bootstrap.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_core::op2; use deno_core::OpState; diff --git a/runtime/ops/fs_events.rs b/runtime/ops/fs_events.rs index c8e0228bc04199..e8fb9f2ceffaa4 100644 --- a/runtime/ops/fs_events.rs +++ b/runtime/ops/fs_events.rs @@ -1,5 +1,14 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. +use std::borrow::Cow; +use std::cell::RefCell; +use std::convert::From; +use std::path::Path; +use std::path::PathBuf; +use std::rc::Rc; +use std::sync::Arc; + +use deno_core::op2; use deno_core::parking_lot::Mutex; use deno_core::AsyncRefCell; use deno_core::CancelFuture; @@ -8,9 +17,6 @@ use deno_core::OpState; use deno_core::RcRef; use deno_core::Resource; use deno_core::ResourceId; - -use deno_core::op2; - use deno_permissions::PermissionsContainer; use notify::event::Event as NotifyEvent; use notify::event::ModifyKind; @@ -20,13 +26,6 @@ use notify::RecommendedWatcher; use notify::RecursiveMode; use notify::Watcher; use serde::Serialize; -use std::borrow::Cow; -use std::cell::RefCell; -use std::convert::From; -use std::path::Path; -use std::path::PathBuf; -use std::rc::Rc; -use std::sync::Arc; use tokio::sync::mpsc; deno_core::extension!( @@ -109,6 +108,14 @@ fn starts_with_canonicalized(path: &Path, prefix: &str) -> bool { } } +fn is_file_removed(event_path: &PathBuf) -> bool { + let exists_path = std::fs::exists(event_path); + match exists_path { + Ok(res) => !res, + Err(_) => false, + } +} + #[derive(Debug, thiserror::Error)] pub enum FsEventsError { #[error(transparent)] @@ -150,6 +157,13 @@ fn start_watcher( }) }) { let _ = sender.try_send(Ok(event.clone())); + } else if event.paths.iter().any(is_file_removed) { + let remove_event = FsEvent { + kind: "remove", + paths: event.paths.clone(), + flag: None, + }; + let _ = sender.try_send(Ok(remove_event)); } } } @@ -162,7 +176,7 @@ fn start_watcher( Ok(()) } -#[op2] +#[op2(stack_trace)] #[smi] fn op_fs_events_open( state: &mut OpState, diff --git a/runtime/ops/http.rs b/runtime/ops/http.rs index 6e315766866f04..c9dc16cafe56c3 100644 --- a/runtime/ops/http.rs +++ b/runtime/ops/http.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::rc::Rc; diff --git a/runtime/ops/mod.rs b/runtime/ops/mod.rs index c2e402f33c967f..438c3896e6f9ae 100644 --- a/runtime/ops/mod.rs +++ b/runtime/ops/mod.rs @@ -1,10 +1,9 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. pub mod bootstrap; pub mod fs_events; pub mod http; pub mod os; -pub mod otel; pub mod permissions; pub mod process; pub mod runtime; diff --git a/runtime/ops/os/mod.rs b/runtime/ops/os/mod.rs index 74c708c53295b2..a17b467cb70b43 100644 --- a/runtime/ops/os/mod.rs +++ b/runtime/ops/os/mod.rs @@ -1,7 +1,8 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::collections::HashMap; +use std::env; -use crate::sys_info; -use crate::worker::ExitCode; use deno_core::op2; use deno_core::v8; use deno_core::OpState; @@ -9,8 +10,9 @@ use deno_node::NODE_ENV_VAR_ALLOWLIST; use deno_path_util::normalize_path; use deno_permissions::PermissionsContainer; use serde::Serialize; -use std::collections::HashMap; -use std::env; + +use crate::sys_info; +use crate::worker::ExitCode; deno_core::extension!( deno_os, @@ -87,7 +89,7 @@ pub enum OsError { Io(#[from] std::io::Error), } -#[op2] +#[op2(stack_trace)] #[string] fn op_exec_path(state: &mut OpState) -> Result { let current_exe = env::current_exe().unwrap(); @@ -103,7 +105,7 @@ fn op_exec_path(state: &mut OpState) -> Result { .map_err(OsError::InvalidUtf8) } -#[op2(fast)] +#[op2(fast, stack_trace)] fn op_set_env( state: &mut OpState, #[string] key: &str, @@ -123,7 +125,7 @@ fn op_set_env( Ok(()) } -#[op2] +#[op2(stack_trace)] #[serde] fn op_env( state: &mut OpState, @@ -132,7 +134,7 @@ fn op_env( Ok(env::vars().collect()) } -#[op2] +#[op2(stack_trace)] #[string] fn op_get_env( state: &mut OpState, @@ -159,7 +161,7 @@ fn op_get_env( Ok(r) } -#[op2(fast)] +#[op2(fast, stack_trace)] fn op_delete_env( state: &mut OpState, #[string] key: String, @@ -189,7 +191,7 @@ fn op_exit(state: &mut OpState) { crate::exit(code) } -#[op2] +#[op2(stack_trace)] #[serde] fn op_loadavg( state: &mut OpState, @@ -200,7 +202,7 @@ fn op_loadavg( Ok(sys_info::loadavg()) } -#[op2] +#[op2(stack_trace, stack_trace)] #[string] fn op_hostname( state: &mut OpState, @@ -211,7 +213,7 @@ fn op_hostname( Ok(sys_info::hostname()) } -#[op2] +#[op2(stack_trace)] #[string] fn op_os_release( state: &mut OpState, @@ -222,7 +224,7 @@ fn op_os_release( Ok(sys_info::os_release()) } -#[op2] +#[op2(stack_trace)] #[serde] fn op_network_interfaces( state: &mut OpState, @@ -274,7 +276,7 @@ impl From for NetworkInterface { } } -#[op2] +#[op2(stack_trace)] #[serde] fn op_system_memory_info( state: &mut OpState, @@ -286,7 +288,7 @@ fn op_system_memory_info( } #[cfg(not(windows))] -#[op2] +#[op2(stack_trace)] #[smi] fn op_gid( state: &mut OpState, @@ -302,7 +304,7 @@ fn op_gid( } #[cfg(windows)] -#[op2] +#[op2(stack_trace)] #[smi] fn op_gid( state: &mut OpState, @@ -314,7 +316,7 @@ fn op_gid( } #[cfg(not(windows))] -#[op2] +#[op2(stack_trace)] #[smi] fn op_uid( state: &mut OpState, @@ -330,7 +332,7 @@ fn op_uid( } #[cfg(windows)] -#[op2] +#[op2(stack_trace)] #[smi] fn op_uid( state: &mut OpState, @@ -424,8 +426,11 @@ fn rss() -> usize { let mut count = libc::MACH_TASK_BASIC_INFO_COUNT; // SAFETY: libc calls let r = unsafe { + extern "C" { + static mut mach_task_self_: std::ffi::c_uint; + } libc::task_info( - libc::mach_task_self(), + mach_task_self_, libc::MACH_TASK_BASIC_INFO, task_info.as_mut_ptr() as libc::task_info_t, &mut count as *mut libc::mach_msg_type_number_t, @@ -519,7 +524,7 @@ fn os_uptime(state: &mut OpState) -> Result { Ok(sys_info::os_uptime()) } -#[op2(fast)] +#[op2(fast, stack_trace)] #[number] fn op_os_uptime( state: &mut OpState, diff --git a/runtime/ops/otel.rs b/runtime/ops/otel.rs deleted file mode 100644 index b32764d7f8f511..00000000000000 --- a/runtime/ops/otel.rs +++ /dev/null @@ -1,744 +0,0 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. - -use crate::tokio_util::create_basic_runtime; -use deno_core::anyhow::anyhow; -use deno_core::anyhow::{self}; -use deno_core::futures::channel::mpsc; -use deno_core::futures::channel::mpsc::UnboundedSender; -use deno_core::futures::future::BoxFuture; -use deno_core::futures::stream; -use deno_core::futures::Stream; -use deno_core::futures::StreamExt; -use deno_core::op2; -use deno_core::v8; -use deno_core::OpState; -use once_cell::sync::Lazy; -use once_cell::sync::OnceCell; -use opentelemetry::logs::AnyValue; -use opentelemetry::logs::LogRecord as LogRecordTrait; -use opentelemetry::logs::Severity; -use opentelemetry::trace::SpanContext; -use opentelemetry::trace::SpanId; -use opentelemetry::trace::SpanKind; -use opentelemetry::trace::Status as SpanStatus; -use opentelemetry::trace::TraceFlags; -use opentelemetry::trace::TraceId; -use opentelemetry::InstrumentationScope; -use opentelemetry::Key; -use opentelemetry::KeyValue; -use opentelemetry::StringValue; -use opentelemetry::Value; -use opentelemetry_otlp::HttpExporterBuilder; -use opentelemetry_otlp::Protocol; -use opentelemetry_otlp::WithExportConfig; -use opentelemetry_otlp::WithHttpConfig; -use opentelemetry_sdk::export::trace::SpanData; -use opentelemetry_sdk::logs::BatchLogProcessor; -use opentelemetry_sdk::logs::LogProcessor as LogProcessorTrait; -use opentelemetry_sdk::logs::LogRecord; -use opentelemetry_sdk::trace::BatchSpanProcessor; -use opentelemetry_sdk::trace::SpanProcessor as SpanProcessorTrait; -use opentelemetry_sdk::Resource; -use opentelemetry_semantic_conventions::resource::PROCESS_RUNTIME_NAME; -use opentelemetry_semantic_conventions::resource::PROCESS_RUNTIME_VERSION; -use opentelemetry_semantic_conventions::resource::TELEMETRY_SDK_LANGUAGE; -use opentelemetry_semantic_conventions::resource::TELEMETRY_SDK_NAME; -use opentelemetry_semantic_conventions::resource::TELEMETRY_SDK_VERSION; -use serde::Deserialize; -use serde::Serialize; -use std::borrow::Cow; -use std::env; -use std::fmt::Debug; -use std::pin::Pin; -use std::task::Context; -use std::task::Poll; -use std::thread; -use std::time::Duration; -use std::time::SystemTime; - -type SpanProcessor = BatchSpanProcessor; -type LogProcessor = BatchLogProcessor; - -deno_core::extension!( - deno_otel, - ops = [ - op_otel_log, - op_otel_span_start, - op_otel_span_continue, - op_otel_span_attribute, - op_otel_span_attribute2, - op_otel_span_attribute3, - op_otel_span_flush, - ], -); - -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct OtelConfig { - pub runtime_name: Cow<'static, str>, - pub runtime_version: Cow<'static, str>, - pub console: OtelConsoleConfig, - pub deterministic: bool, -} - -#[derive(Debug, Clone, Copy, Serialize, Deserialize)] -#[repr(u8)] -pub enum OtelConsoleConfig { - Ignore = 0, - Capture = 1, - Replace = 2, -} - -impl Default for OtelConfig { - fn default() -> Self { - Self { - runtime_name: Cow::Borrowed(env!("CARGO_PKG_NAME")), - runtime_version: Cow::Borrowed(env!("CARGO_PKG_VERSION")), - console: OtelConsoleConfig::Capture, - deterministic: false, - } - } -} - -static OTEL_SHARED_RUNTIME_SPAWN_TASK_TX: Lazy< - UnboundedSender>, -> = Lazy::new(otel_create_shared_runtime); - -fn otel_create_shared_runtime() -> UnboundedSender> { - let (spawn_task_tx, mut spawn_task_rx) = - mpsc::unbounded::>(); - - thread::spawn(move || { - let rt = create_basic_runtime(); - rt.block_on(async move { - while let Some(task) = spawn_task_rx.next().await { - tokio::spawn(task); - } - }); - }); - - spawn_task_tx -} - -#[derive(Clone, Copy)] -struct OtelSharedRuntime; - -impl hyper::rt::Executor> for OtelSharedRuntime { - fn execute(&self, fut: BoxFuture<'static, ()>) { - (*OTEL_SHARED_RUNTIME_SPAWN_TASK_TX) - .unbounded_send(fut) - .expect("failed to send task to shared OpenTelemetry runtime"); - } -} - -impl opentelemetry_sdk::runtime::Runtime for OtelSharedRuntime { - type Interval = Pin + Send + 'static>>; - type Delay = Pin>; - - fn interval(&self, period: Duration) -> Self::Interval { - stream::repeat(()) - .then(move |_| tokio::time::sleep(period)) - .boxed() - } - - fn spawn(&self, future: BoxFuture<'static, ()>) { - (*OTEL_SHARED_RUNTIME_SPAWN_TASK_TX) - .unbounded_send(future) - .expect("failed to send task to shared OpenTelemetry runtime"); - } - - fn delay(&self, duration: Duration) -> Self::Delay { - Box::pin(tokio::time::sleep(duration)) - } -} - -impl opentelemetry_sdk::runtime::RuntimeChannel for OtelSharedRuntime { - type Receiver = BatchMessageChannelReceiver; - type Sender = BatchMessageChannelSender; - - fn batch_message_channel( - &self, - capacity: usize, - ) -> (Self::Sender, Self::Receiver) { - let (batch_tx, batch_rx) = tokio::sync::mpsc::channel::(capacity); - (batch_tx.into(), batch_rx.into()) - } -} - -#[derive(Debug)] -pub struct BatchMessageChannelSender { - sender: tokio::sync::mpsc::Sender, -} - -impl From> - for BatchMessageChannelSender -{ - fn from(sender: tokio::sync::mpsc::Sender) -> Self { - Self { sender } - } -} - -impl opentelemetry_sdk::runtime::TrySend - for BatchMessageChannelSender -{ - type Message = T; - - fn try_send( - &self, - item: Self::Message, - ) -> Result<(), opentelemetry_sdk::runtime::TrySendError> { - self.sender.try_send(item).map_err(|err| match err { - tokio::sync::mpsc::error::TrySendError::Full(_) => { - opentelemetry_sdk::runtime::TrySendError::ChannelFull - } - tokio::sync::mpsc::error::TrySendError::Closed(_) => { - opentelemetry_sdk::runtime::TrySendError::ChannelClosed - } - }) - } -} - -pub struct BatchMessageChannelReceiver { - receiver: tokio::sync::mpsc::Receiver, -} - -impl From> - for BatchMessageChannelReceiver -{ - fn from(receiver: tokio::sync::mpsc::Receiver) -> Self { - Self { receiver } - } -} - -impl Stream for BatchMessageChannelReceiver { - type Item = T; - - fn poll_next( - mut self: Pin<&mut Self>, - cx: &mut Context<'_>, - ) -> Poll> { - self.receiver.poll_recv(cx) - } -} - -mod hyper_client { - use http_body_util::BodyExt; - use http_body_util::Full; - use hyper::body::Body as HttpBody; - use hyper::body::Frame; - use hyper_util::client::legacy::connect::HttpConnector; - use hyper_util::client::legacy::Client; - use opentelemetry_http::Bytes; - use opentelemetry_http::HttpError; - use opentelemetry_http::Request; - use opentelemetry_http::Response; - use opentelemetry_http::ResponseExt; - use std::fmt::Debug; - use std::pin::Pin; - use std::task::Poll; - use std::task::{self}; - - use super::OtelSharedRuntime; - - // same as opentelemetry_http::HyperClient except it uses OtelSharedRuntime - #[derive(Debug, Clone)] - pub struct HyperClient { - inner: Client, - } - - impl HyperClient { - pub fn new() -> Self { - Self { - inner: Client::builder(OtelSharedRuntime).build(HttpConnector::new()), - } - } - } - - #[async_trait::async_trait] - impl opentelemetry_http::HttpClient for HyperClient { - async fn send( - &self, - request: Request>, - ) -> Result, HttpError> { - let (parts, body) = request.into_parts(); - let request = Request::from_parts(parts, Body(Full::from(body))); - let mut response = self.inner.request(request).await?; - let headers = std::mem::take(response.headers_mut()); - - let mut http_response = Response::builder() - .status(response.status()) - .body(response.into_body().collect().await?.to_bytes())?; - *http_response.headers_mut() = headers; - - Ok(http_response.error_for_status()?) - } - } - - #[pin_project::pin_project] - pub struct Body(#[pin] Full); - - impl HttpBody for Body { - type Data = Bytes; - type Error = Box; - - #[inline] - fn poll_frame( - self: Pin<&mut Self>, - cx: &mut task::Context<'_>, - ) -> Poll, Self::Error>>> { - self.project().0.poll_frame(cx).map_err(Into::into) - } - - #[inline] - fn is_end_stream(&self) -> bool { - self.0.is_end_stream() - } - - #[inline] - fn size_hint(&self) -> hyper::body::SizeHint { - self.0.size_hint() - } - } -} - -static OTEL_PROCESSORS: OnceCell<(SpanProcessor, LogProcessor)> = - OnceCell::new(); - -pub fn init(config: OtelConfig) -> anyhow::Result<()> { - // Parse the `OTEL_EXPORTER_OTLP_PROTOCOL` variable. The opentelemetry_* - // crates don't do this automatically. - // TODO(piscisaureus): enable GRPC support. - let protocol = match env::var("OTEL_EXPORTER_OTLP_PROTOCOL").as_deref() { - Ok("http/protobuf") => Protocol::HttpBinary, - Ok("http/json") => Protocol::HttpJson, - Ok("") | Err(env::VarError::NotPresent) => { - return Ok(()); - } - Ok(protocol) => { - return Err(anyhow!( - "Env var OTEL_EXPORTER_OTLP_PROTOCOL specifies an unsupported protocol: {}", - protocol - )); - } - Err(err) => { - return Err(anyhow!( - "Failed to read env var OTEL_EXPORTER_OTLP_PROTOCOL: {}", - err - )); - } - }; - - // Define the resource attributes that will be attached to all log records. - // These attributes are sourced as follows (in order of precedence): - // * The `service.name` attribute from the `OTEL_SERVICE_NAME` env var. - // * Additional attributes from the `OTEL_RESOURCE_ATTRIBUTES` env var. - // * Default attribute values defined here. - // TODO(piscisaureus): add more default attributes (e.g. script path). - let mut resource = Resource::default(); - - // Add the runtime name and version to the resource attributes. Also override - // the `telemetry.sdk` attributes to include the Deno runtime. - resource = resource.merge(&Resource::new(vec![ - KeyValue::new(PROCESS_RUNTIME_NAME, config.runtime_name), - KeyValue::new(PROCESS_RUNTIME_VERSION, config.runtime_version.clone()), - KeyValue::new( - TELEMETRY_SDK_LANGUAGE, - format!( - "deno-{}", - resource.get(Key::new(TELEMETRY_SDK_LANGUAGE)).unwrap() - ), - ), - KeyValue::new( - TELEMETRY_SDK_NAME, - format!( - "deno-{}", - resource.get(Key::new(TELEMETRY_SDK_NAME)).unwrap() - ), - ), - KeyValue::new( - TELEMETRY_SDK_VERSION, - format!( - "{}-{}", - config.runtime_version, - resource.get(Key::new(TELEMETRY_SDK_VERSION)).unwrap() - ), - ), - ])); - - // The OTLP endpoint is automatically picked up from the - // `OTEL_EXPORTER_OTLP_ENDPOINT` environment variable. Additional headers can - // be specified using `OTEL_EXPORTER_OTLP_HEADERS`. - - let client = hyper_client::HyperClient::new(); - - let span_exporter = HttpExporterBuilder::default() - .with_http_client(client.clone()) - .with_protocol(protocol) - .build_span_exporter()?; - let mut span_processor = - BatchSpanProcessor::builder(span_exporter, OtelSharedRuntime).build(); - span_processor.set_resource(&resource); - - let log_exporter = HttpExporterBuilder::default() - .with_http_client(client) - .with_protocol(protocol) - .build_log_exporter()?; - let log_processor = - BatchLogProcessor::builder(log_exporter, OtelSharedRuntime).build(); - log_processor.set_resource(&resource); - - OTEL_PROCESSORS - .set((span_processor, log_processor)) - .map_err(|_| anyhow!("failed to init otel"))?; - - Ok(()) -} - -/// This function is called by the runtime whenever it is about to call -/// `process::exit()`, to ensure that all OpenTelemetry logs are properly -/// flushed before the process terminates. -pub fn flush() { - if let Some((span_processor, log_processor)) = OTEL_PROCESSORS.get() { - let _ = span_processor.force_flush(); - let _ = log_processor.force_flush(); - } -} - -pub fn handle_log(record: &log::Record) { - use log::Level; - - let Some((_, log_processor)) = OTEL_PROCESSORS.get() else { - return; - }; - - let mut log_record = LogRecord::default(); - - log_record.set_observed_timestamp(SystemTime::now()); - log_record.set_severity_number(match record.level() { - Level::Error => Severity::Error, - Level::Warn => Severity::Warn, - Level::Info => Severity::Info, - Level::Debug => Severity::Debug, - Level::Trace => Severity::Trace, - }); - log_record.set_severity_text(record.level().as_str()); - log_record.set_body(record.args().to_string().into()); - log_record.set_target(record.metadata().target().to_string()); - - struct Visitor<'s>(&'s mut LogRecord); - - impl<'s, 'kvs> log::kv::VisitSource<'kvs> for Visitor<'s> { - fn visit_pair( - &mut self, - key: log::kv::Key<'kvs>, - value: log::kv::Value<'kvs>, - ) -> Result<(), log::kv::Error> { - #[allow(clippy::manual_map)] - let value = if let Some(v) = value.to_bool() { - Some(AnyValue::Boolean(v)) - } else if let Some(v) = value.to_borrowed_str() { - Some(AnyValue::String(v.to_owned().into())) - } else if let Some(v) = value.to_f64() { - Some(AnyValue::Double(v)) - } else if let Some(v) = value.to_i64() { - Some(AnyValue::Int(v)) - } else { - None - }; - - if let Some(value) = value { - let key = Key::from(key.as_str().to_owned()); - self.0.add_attribute(key, value); - } - - Ok(()) - } - } - - let _ = record.key_values().visit(&mut Visitor(&mut log_record)); - - log_processor.emit( - &mut log_record, - &InstrumentationScope::builder("deno").build(), - ); -} - -#[op2(fast)] -fn op_otel_log( - #[string] message: String, - #[smi] level: i32, - #[string] trace_id: &str, - #[string] span_id: &str, - #[smi] trace_flags: u8, -) { - let Some((_, log_processor)) = OTEL_PROCESSORS.get() else { - return; - }; - - // Convert the integer log level that ext/console uses to the corresponding - // OpenTelemetry log severity. - let severity = match level { - ..=0 => Severity::Debug, - 1 => Severity::Info, - 2 => Severity::Warn, - 3.. => Severity::Error, - }; - - let mut log_record = LogRecord::default(); - - log_record.set_observed_timestamp(SystemTime::now()); - log_record.set_body(message.into()); - log_record.set_severity_number(severity); - log_record.set_severity_text(severity.name()); - if let (Ok(trace_id), Ok(span_id)) = - (TraceId::from_hex(trace_id), SpanId::from_hex(span_id)) - { - log_record.set_trace_context( - trace_id, - span_id, - Some(TraceFlags::new(trace_flags)), - ); - } - - log_processor.emit( - &mut log_record, - &InstrumentationScope::builder("deno").build(), - ); -} - -struct TemporarySpan(SpanData); - -#[allow(clippy::too_many_arguments)] -#[op2(fast)] -fn op_otel_span_start<'s>( - scope: &mut v8::HandleScope<'s>, - state: &mut OpState, - trace_id: v8::Local<'s, v8::Value>, - span_id: v8::Local<'s, v8::Value>, - parent_span_id: v8::Local<'s, v8::Value>, - #[smi] span_kind: u8, - name: v8::Local<'s, v8::Value>, - start_time: f64, - end_time: f64, -) -> Result<(), anyhow::Error> { - if let Some(temporary_span) = state.try_take::() { - let Some((span_processor, _)) = OTEL_PROCESSORS.get() else { - return Ok(()); - }; - span_processor.on_end(temporary_span.0); - }; - - let trace_id = { - let x = v8::ValueView::new(scope, trace_id.try_cast()?); - match x.data() { - v8::ValueViewData::OneByte(bytes) => { - TraceId::from_hex(&String::from_utf8_lossy(bytes))? - } - _ => return Err(anyhow!("invalid trace_id")), - } - }; - - let span_id = { - let x = v8::ValueView::new(scope, span_id.try_cast()?); - match x.data() { - v8::ValueViewData::OneByte(bytes) => { - SpanId::from_hex(&String::from_utf8_lossy(bytes))? - } - _ => return Err(anyhow!("invalid span_id")), - } - }; - - let parent_span_id = { - let x = v8::ValueView::new(scope, parent_span_id.try_cast()?); - match x.data() { - v8::ValueViewData::OneByte(bytes) => { - let s = String::from_utf8_lossy(bytes); - if s.is_empty() { - SpanId::INVALID - } else { - SpanId::from_hex(&s)? - } - } - _ => return Err(anyhow!("invalid parent_span_id")), - } - }; - - let name = { - let x = v8::ValueView::new(scope, name.try_cast()?); - match x.data() { - v8::ValueViewData::OneByte(bytes) => { - String::from_utf8_lossy(bytes).into_owned() - } - v8::ValueViewData::TwoByte(bytes) => String::from_utf16_lossy(bytes), - } - }; - - let temporary_span = TemporarySpan(SpanData { - span_context: SpanContext::new( - trace_id, - span_id, - TraceFlags::SAMPLED, - false, - Default::default(), - ), - parent_span_id, - span_kind: match span_kind { - 0 => SpanKind::Internal, - 1 => SpanKind::Server, - 2 => SpanKind::Client, - 3 => SpanKind::Producer, - 4 => SpanKind::Consumer, - _ => return Err(anyhow!("invalid span kind")), - }, - name: Cow::Owned(name), - start_time: SystemTime::UNIX_EPOCH - .checked_add(std::time::Duration::from_secs_f64(start_time)) - .ok_or_else(|| anyhow!("invalid start time"))?, - end_time: SystemTime::UNIX_EPOCH - .checked_add(std::time::Duration::from_secs_f64(end_time)) - .ok_or_else(|| anyhow!("invalid start time"))?, - attributes: Vec::new(), - dropped_attributes_count: 0, - events: Default::default(), - links: Default::default(), - status: SpanStatus::Unset, - instrumentation_scope: InstrumentationScope::builder("deno").build(), - }); - state.put(temporary_span); - - Ok(()) -} - -#[op2(fast)] -fn op_otel_span_continue( - state: &mut OpState, - #[smi] status: u8, - #[string] error_description: Cow<'_, str>, -) { - if let Some(temporary_span) = state.try_borrow_mut::() { - temporary_span.0.status = match status { - 0 => SpanStatus::Unset, - 1 => SpanStatus::Ok, - 2 => SpanStatus::Error { - description: Cow::Owned(error_description.into_owned()), - }, - _ => return, - }; - } -} - -macro_rules! attr { - ($scope:ident, $temporary_span:ident, $name:ident, $value:ident) => { - let name = if let Ok(name) = $name.try_cast() { - let view = v8::ValueView::new($scope, name); - match view.data() { - v8::ValueViewData::OneByte(bytes) => { - Some(String::from_utf8_lossy(bytes).into_owned()) - } - v8::ValueViewData::TwoByte(bytes) => { - Some(String::from_utf16_lossy(bytes)) - } - } - } else { - None - }; - let value = if let Ok(string) = $value.try_cast::() { - Some(Value::String(StringValue::from({ - let x = v8::ValueView::new($scope, string); - match x.data() { - v8::ValueViewData::OneByte(bytes) => { - String::from_utf8_lossy(bytes).into_owned() - } - v8::ValueViewData::TwoByte(bytes) => String::from_utf16_lossy(bytes), - } - }))) - } else if let Ok(number) = $value.try_cast::() { - Some(Value::F64(number.value())) - } else if let Ok(boolean) = $value.try_cast::() { - Some(Value::Bool(boolean.is_true())) - } else if let Ok(bigint) = $value.try_cast::() { - let (i64_value, _lossless) = bigint.i64_value(); - Some(Value::I64(i64_value)) - } else { - None - }; - if let (Some(name), Some(value)) = (name, value) { - $temporary_span - .0 - .attributes - .push(KeyValue::new(name, value)); - } else { - $temporary_span.0.dropped_attributes_count += 1; - } - }; -} - -#[op2(fast)] -fn op_otel_span_attribute<'s>( - scope: &mut v8::HandleScope<'s>, - state: &mut OpState, - #[smi] capacity: u32, - key: v8::Local<'s, v8::Value>, - value: v8::Local<'s, v8::Value>, -) { - if let Some(temporary_span) = state.try_borrow_mut::() { - temporary_span.0.attributes.reserve_exact( - (capacity as usize) - temporary_span.0.attributes.capacity(), - ); - attr!(scope, temporary_span, key, value); - } -} - -#[op2(fast)] -fn op_otel_span_attribute2<'s>( - scope: &mut v8::HandleScope<'s>, - state: &mut OpState, - #[smi] capacity: u32, - key1: v8::Local<'s, v8::Value>, - value1: v8::Local<'s, v8::Value>, - key2: v8::Local<'s, v8::Value>, - value2: v8::Local<'s, v8::Value>, -) { - if let Some(temporary_span) = state.try_borrow_mut::() { - temporary_span.0.attributes.reserve_exact( - (capacity as usize) - temporary_span.0.attributes.capacity(), - ); - attr!(scope, temporary_span, key1, value1); - attr!(scope, temporary_span, key2, value2); - } -} - -#[allow(clippy::too_many_arguments)] -#[op2(fast)] -fn op_otel_span_attribute3<'s>( - scope: &mut v8::HandleScope<'s>, - state: &mut OpState, - #[smi] capacity: u32, - key1: v8::Local<'s, v8::Value>, - value1: v8::Local<'s, v8::Value>, - key2: v8::Local<'s, v8::Value>, - value2: v8::Local<'s, v8::Value>, - key3: v8::Local<'s, v8::Value>, - value3: v8::Local<'s, v8::Value>, -) { - if let Some(temporary_span) = state.try_borrow_mut::() { - temporary_span.0.attributes.reserve_exact( - (capacity as usize) - temporary_span.0.attributes.capacity(), - ); - attr!(scope, temporary_span, key1, value1); - attr!(scope, temporary_span, key2, value2); - attr!(scope, temporary_span, key3, value3); - } -} - -#[op2(fast)] -fn op_otel_span_flush(state: &mut OpState) { - let Some(temporary_span) = state.try_take::() else { - return; - }; - - let Some((span_processor, _)) = OTEL_PROCESSORS.get() else { - return; - }; - - span_processor.on_end(temporary_span.0); -} diff --git a/runtime/ops/permissions.rs b/runtime/ops/permissions.rs index 9ad963f3bc1aa4..216637787ced1b 100644 --- a/runtime/ops/permissions.rs +++ b/runtime/ops/permissions.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use ::deno_permissions::PermissionState; use ::deno_permissions::PermissionsContainer; @@ -99,7 +99,7 @@ pub fn op_revoke_permission( Ok(PermissionStatus::from(perm)) } -#[op2] +#[op2(stack_trace)] #[serde] pub fn op_request_permission( state: &mut OpState, diff --git a/runtime/ops/process.rs b/runtime/ops/process.rs index ee2f660dccf80c..cda0c73111b59d 100644 --- a/runtime/ops/process.rs +++ b/runtime/ops/process.rs @@ -1,4 +1,20 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::borrow::Cow; +use std::cell::RefCell; +use std::collections::HashMap; +use std::ffi::OsString; +use std::io::Write; +#[cfg(unix)] +use std::os::unix::prelude::ExitStatusExt; +#[cfg(unix)] +use std::os::unix::process::CommandExt; +#[cfg(windows)] +use std::os::windows::process::CommandExt; +use std::path::Path; +use std::path::PathBuf; +use std::process::ExitStatus; +use std::rc::Rc; use deno_core::op2; use deno_core::serde_json; @@ -18,25 +34,9 @@ use deno_permissions::PermissionsContainer; use deno_permissions::RunQueryDescriptor; use serde::Deserialize; use serde::Serialize; -use std::borrow::Cow; -use std::cell::RefCell; -use std::collections::HashMap; -use std::ffi::OsString; -use std::io::Write; -use std::path::Path; -use std::path::PathBuf; -use std::process::ExitStatus; -use std::rc::Rc; use tokio::process::Command; -#[cfg(windows)] -use std::os::windows::process::CommandExt; - use crate::ops::signal::SignalError; -#[cfg(unix)] -use std::os::unix::prelude::ExitStatusExt; -#[cfg(unix)] -use std::os::unix::process::CommandExt; pub const UNSTABLE_FEATURE_NAME: &str = "process"; @@ -256,9 +256,7 @@ impl TryFrom for ChildStatus { success: false, code: 128 + signal, #[cfg(unix)] - signal: Some( - crate::ops::signal::signal_int_to_str(signal)?.to_string(), - ), + signal: Some(crate::signal::signal_int_to_str(signal)?.to_string()), #[cfg(not(unix))] signal: None, } @@ -802,7 +800,7 @@ fn get_requires_allow_all_env_vars(env: &RunEnv) -> Vec<&str> { found_envs } -#[op2] +#[op2(stack_trace)] #[serde] fn op_spawn_child( state: &mut OpState, @@ -844,7 +842,7 @@ async fn op_spawn_wait( Ok(result) } -#[op2] +#[op2(stack_trace)] #[serde] fn op_spawn_sync( state: &mut OpState, @@ -928,7 +926,7 @@ mod deprecated { stderr_rid: Option, } - #[op2] + #[op2(stack_trace)] #[serde] pub fn op_run( state: &mut OpState, @@ -1076,7 +1074,8 @@ mod deprecated { #[cfg(unix)] pub fn kill(pid: i32, signal: &str) -> Result<(), ProcessError> { - let signo = super::super::signal::signal_str_to_int(signal)?; + let signo = crate::signal::signal_str_to_int(signal) + .map_err(SignalError::InvalidSignalStr)?; use nix::sys::signal::kill as unix_kill; use nix::sys::signal::Signal; use nix::unistd::Pid; @@ -1088,6 +1087,7 @@ mod deprecated { pub fn kill(pid: i32, signal: &str) -> Result<(), ProcessError> { use std::io::Error; use std::io::ErrorKind::NotFound; + use winapi::shared::minwindef::DWORD; use winapi::shared::minwindef::FALSE; use winapi::shared::minwindef::TRUE; @@ -1099,7 +1099,12 @@ mod deprecated { use winapi::um::winnt::PROCESS_TERMINATE; if !matches!(signal, "SIGKILL" | "SIGTERM") { - Err(SignalError::InvalidSignalStr(signal.to_string()).into()) + Err( + SignalError::InvalidSignalStr(crate::signal::InvalidSignalStrError( + signal.to_string(), + )) + .into(), + ) } else if pid <= 0 { Err(ProcessError::InvalidPid) } else { @@ -1129,7 +1134,7 @@ mod deprecated { } } - #[op2(fast)] + #[op2(fast, stack_trace)] pub fn op_kill( state: &mut OpState, #[smi] pid: i32, diff --git a/runtime/ops/runtime.rs b/runtime/ops/runtime.rs index 8d54783fc96ec2..e95193167dd2a7 100644 --- a/runtime/ops/runtime.rs +++ b/runtime/ops/runtime.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_core::op2; use deno_core::ModuleSpecifier; @@ -34,6 +34,7 @@ pub fn op_ppid() -> i64 { // - Apache License, Version 2.0 // - MIT license use std::mem; + use winapi::shared::minwindef::DWORD; use winapi::um::handleapi::CloseHandle; use winapi::um::handleapi::INVALID_HANDLE_VALUE; diff --git a/runtime/ops/signal.rs b/runtime/ops/signal.rs index e1e4ab68bcf86f..dfb52463cd82fc 100644 --- a/runtime/ops/signal.rs +++ b/runtime/ops/signal.rs @@ -1,13 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -use deno_core::op2; -use deno_core::AsyncRefCell; -use deno_core::CancelFuture; -use deno_core::CancelHandle; -use deno_core::OpState; -use deno_core::RcRef; -use deno_core::Resource; -use deno_core::ResourceId; - +// Copyright 2018-2025 the Deno authors. MIT license. use std::borrow::Cow; use std::cell::RefCell; #[cfg(unix)] @@ -18,6 +9,14 @@ use std::sync::atomic::AtomicBool; #[cfg(unix)] use std::sync::Arc; +use deno_core::op2; +use deno_core::AsyncRefCell; +use deno_core::CancelFuture; +use deno_core::CancelHandle; +use deno_core::OpState; +use deno_core::RcRef; +use deno_core::Resource; +use deno_core::ResourceId; #[cfg(unix)] use tokio::signal::unix::signal; #[cfg(unix)] @@ -46,34 +45,10 @@ deno_core::extension!( #[derive(Debug, thiserror::Error)] pub enum SignalError { - #[cfg(any( - target_os = "android", - target_os = "linux", - target_os = "openbsd", - target_os = "openbsd", - target_os = "macos", - target_os = "solaris", - target_os = "illumos" - ))] - #[error("Invalid signal: {0}")] - InvalidSignalStr(String), - #[cfg(any( - target_os = "android", - target_os = "linux", - target_os = "openbsd", - target_os = "openbsd", - target_os = "macos", - target_os = "solaris", - target_os = "illumos" - ))] - #[error("Invalid signal: {0}")] - InvalidSignalInt(libc::c_int), - #[cfg(target_os = "windows")] - #[error("Windows only supports ctrl-c (SIGINT) and ctrl-break (SIGBREAK), but got {0}")] - InvalidSignalStr(String), - #[cfg(target_os = "windows")] - #[error("Windows only supports ctrl-c (SIGINT) and ctrl-break (SIGBREAK), but got {0}")] - InvalidSignalInt(libc::c_int), + #[error(transparent)] + InvalidSignalStr(#[from] crate::signal::InvalidSignalStrError), + #[error(transparent)] + InvalidSignalInt(#[from] crate::signal::InvalidSignalIntError), #[error("Binding to signal '{0}' is not allowed")] SignalNotAllowed(String), #[error("{0}")] @@ -181,218 +156,6 @@ impl Resource for SignalStreamResource { } } -macro_rules! first_literal { - ($head:literal $(, $tail:literal)*) => { - $head - }; -} -macro_rules! signal_dict { - ($(($number:literal, $($name:literal)|+)),*) => { - pub fn signal_str_to_int(s: &str) -> Result { - match s { - $($($name)|* => Ok($number),)* - _ => Err(SignalError::InvalidSignalStr(s.to_string())), - } - } - - pub fn signal_int_to_str(s: libc::c_int) -> Result<&'static str, SignalError> { - match s { - $($number => Ok(first_literal!($($name),+)),)* - _ => Err(SignalError::InvalidSignalInt(s)), - } - } - } -} - -#[cfg(target_os = "freebsd")] -signal_dict!( - (1, "SIGHUP"), - (2, "SIGINT"), - (3, "SIGQUIT"), - (4, "SIGILL"), - (5, "SIGTRAP"), - (6, "SIGABRT" | "SIGIOT"), - (7, "SIGEMT"), - (8, "SIGFPE"), - (9, "SIGKILL"), - (10, "SIGBUS"), - (11, "SIGSEGV"), - (12, "SIGSYS"), - (13, "SIGPIPE"), - (14, "SIGALRM"), - (15, "SIGTERM"), - (16, "SIGURG"), - (17, "SIGSTOP"), - (18, "SIGTSTP"), - (19, "SIGCONT"), - (20, "SIGCHLD"), - (21, "SIGTTIN"), - (22, "SIGTTOU"), - (23, "SIGIO"), - (24, "SIGXCPU"), - (25, "SIGXFSZ"), - (26, "SIGVTALRM"), - (27, "SIGPROF"), - (28, "SIGWINCH"), - (29, "SIGINFO"), - (30, "SIGUSR1"), - (31, "SIGUSR2"), - (32, "SIGTHR"), - (33, "SIGLIBRT") -); - -#[cfg(target_os = "openbsd")] -signal_dict!( - (1, "SIGHUP"), - (2, "SIGINT"), - (3, "SIGQUIT"), - (4, "SIGILL"), - (5, "SIGTRAP"), - (6, "SIGABRT" | "SIGIOT"), - (7, "SIGEMT"), - (8, "SIGKILL"), - (10, "SIGBUS"), - (11, "SIGSEGV"), - (12, "SIGSYS"), - (13, "SIGPIPE"), - (14, "SIGALRM"), - (15, "SIGTERM"), - (16, "SIGURG"), - (17, "SIGSTOP"), - (18, "SIGTSTP"), - (19, "SIGCONT"), - (20, "SIGCHLD"), - (21, "SIGTTIN"), - (22, "SIGTTOU"), - (23, "SIGIO"), - (24, "SIGXCPU"), - (25, "SIGXFSZ"), - (26, "SIGVTALRM"), - (27, "SIGPROF"), - (28, "SIGWINCH"), - (29, "SIGINFO"), - (30, "SIGUSR1"), - (31, "SIGUSR2"), - (32, "SIGTHR") -); - -#[cfg(any(target_os = "android", target_os = "linux"))] -signal_dict!( - (1, "SIGHUP"), - (2, "SIGINT"), - (3, "SIGQUIT"), - (4, "SIGILL"), - (5, "SIGTRAP"), - (6, "SIGABRT" | "SIGIOT"), - (7, "SIGBUS"), - (8, "SIGFPE"), - (9, "SIGKILL"), - (10, "SIGUSR1"), - (11, "SIGSEGV"), - (12, "SIGUSR2"), - (13, "SIGPIPE"), - (14, "SIGALRM"), - (15, "SIGTERM"), - (16, "SIGSTKFLT"), - (17, "SIGCHLD"), - (18, "SIGCONT"), - (19, "SIGSTOP"), - (20, "SIGTSTP"), - (21, "SIGTTIN"), - (22, "SIGTTOU"), - (23, "SIGURG"), - (24, "SIGXCPU"), - (25, "SIGXFSZ"), - (26, "SIGVTALRM"), - (27, "SIGPROF"), - (28, "SIGWINCH"), - (29, "SIGIO" | "SIGPOLL"), - (30, "SIGPWR"), - (31, "SIGSYS" | "SIGUNUSED") -); - -#[cfg(target_os = "macos")] -signal_dict!( - (1, "SIGHUP"), - (2, "SIGINT"), - (3, "SIGQUIT"), - (4, "SIGILL"), - (5, "SIGTRAP"), - (6, "SIGABRT" | "SIGIOT"), - (7, "SIGEMT"), - (8, "SIGFPE"), - (9, "SIGKILL"), - (10, "SIGBUS"), - (11, "SIGSEGV"), - (12, "SIGSYS"), - (13, "SIGPIPE"), - (14, "SIGALRM"), - (15, "SIGTERM"), - (16, "SIGURG"), - (17, "SIGSTOP"), - (18, "SIGTSTP"), - (19, "SIGCONT"), - (20, "SIGCHLD"), - (21, "SIGTTIN"), - (22, "SIGTTOU"), - (23, "SIGIO"), - (24, "SIGXCPU"), - (25, "SIGXFSZ"), - (26, "SIGVTALRM"), - (27, "SIGPROF"), - (28, "SIGWINCH"), - (29, "SIGINFO"), - (30, "SIGUSR1"), - (31, "SIGUSR2") -); - -#[cfg(any(target_os = "solaris", target_os = "illumos"))] -signal_dict!( - (1, "SIGHUP"), - (2, "SIGINT"), - (3, "SIGQUIT"), - (4, "SIGILL"), - (5, "SIGTRAP"), - (6, "SIGABRT" | "SIGIOT"), - (7, "SIGEMT"), - (8, "SIGFPE"), - (9, "SIGKILL"), - (10, "SIGBUS"), - (11, "SIGSEGV"), - (12, "SIGSYS"), - (13, "SIGPIPE"), - (14, "SIGALRM"), - (15, "SIGTERM"), - (16, "SIGUSR1"), - (17, "SIGUSR2"), - (18, "SIGCHLD"), - (19, "SIGPWR"), - (20, "SIGWINCH"), - (21, "SIGURG"), - (22, "SIGPOLL"), - (23, "SIGSTOP"), - (24, "SIGTSTP"), - (25, "SIGCONT"), - (26, "SIGTTIN"), - (27, "SIGTTOU"), - (28, "SIGVTALRM"), - (29, "SIGPROF"), - (30, "SIGXCPU"), - (31, "SIGXFSZ"), - (32, "SIGWAITING"), - (33, "SIGLWP"), - (34, "SIGFREEZE"), - (35, "SIGTHAW"), - (36, "SIGCANCEL"), - (37, "SIGLOST"), - (38, "SIGXRES"), - (39, "SIGJVM1"), - (40, "SIGJVM2") -); - -#[cfg(target_os = "windows")] -signal_dict!((2, "SIGINT"), (21, "SIGBREAK")); - #[cfg(unix)] #[op2(fast)] #[smi] @@ -400,7 +163,7 @@ fn op_signal_bind( state: &mut OpState, #[string] sig: &str, ) -> Result { - let signo = signal_str_to_int(sig)?; + let signo = crate::signal::signal_str_to_int(sig)?; if signal_hook_registry::FORBIDDEN.contains(&signo) { return Err(SignalError::SignalNotAllowed(sig.to_string())); } @@ -437,7 +200,7 @@ fn op_signal_bind( state: &mut OpState, #[string] sig: &str, ) -> Result { - let signo = signal_str_to_int(sig)?; + let signo = crate::signal::signal_str_to_int(sig)?; let resource = SignalStreamResource { signal: AsyncRefCell::new(match signo { // SIGINT diff --git a/runtime/ops/tty.rs b/runtime/ops/tty.rs index 7849185faaeaf8..4843acccf3b329 100644 --- a/runtime/ops/tty.rs +++ b/runtime/ops/tty.rs @@ -1,9 +1,23 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. +#[cfg(unix)] +use std::cell::RefCell; +#[cfg(unix)] +use std::collections::HashMap; use std::io::Error; +#[cfg(windows)] +use std::sync::Arc; use deno_core::op2; +#[cfg(windows)] +use deno_core::parking_lot::Mutex; use deno_core::OpState; +#[cfg(unix)] +use deno_core::ResourceId; +#[cfg(windows)] +use deno_io::WinTtyState; +#[cfg(unix)] +use nix::sys::termios; use rustyline::config::Configurer; use rustyline::error::ReadlineError; use rustyline::Cmd; @@ -12,22 +26,6 @@ use rustyline::KeyCode; use rustyline::KeyEvent; use rustyline::Modifiers; -#[cfg(windows)] -use deno_core::parking_lot::Mutex; -#[cfg(windows)] -use deno_io::WinTtyState; -#[cfg(windows)] -use std::sync::Arc; - -#[cfg(unix)] -use deno_core::ResourceId; -#[cfg(unix)] -use nix::sys::termios; -#[cfg(unix)] -use std::cell::RefCell; -#[cfg(unix)] -use std::collections::HashMap; - #[cfg(unix)] #[derive(Default, Clone)] struct TtyModeStore( @@ -116,7 +114,6 @@ fn op_set_raw( #[cfg(windows)] { use winapi::shared::minwindef::FALSE; - use winapi::um::consoleapi; let handle = handle_or_fd; diff --git a/runtime/ops/web_worker.rs b/runtime/ops/web_worker.rs index d0c3eea668b791..5cde7d5373e879 100644 --- a/runtime/ops/web_worker.rs +++ b/runtime/ops/web_worker.rs @@ -1,19 +1,20 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. mod sync_fetch; -use crate::web_worker::WebWorkerInternalHandle; -use crate::web_worker::WebWorkerType; +use std::cell::RefCell; +use std::rc::Rc; + use deno_core::op2; use deno_core::CancelFuture; use deno_core::OpState; use deno_web::JsMessageData; use deno_web::MessagePortError; -use std::cell::RefCell; -use std::rc::Rc; +pub use sync_fetch::SyncFetchError; use self::sync_fetch::op_worker_sync_fetch; -pub use sync_fetch::SyncFetchError; +use crate::web_worker::WebWorkerInternalHandle; +use crate::web_worker::WebWorkerType; deno_core::extension!( deno_web_worker, diff --git a/runtime/ops/web_worker/sync_fetch.rs b/runtime/ops/web_worker/sync_fetch.rs index d1f133d3d22e66..c9b622d31e9c14 100644 --- a/runtime/ops/web_worker/sync_fetch.rs +++ b/runtime/ops/web_worker/sync_fetch.rs @@ -1,9 +1,7 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::sync::Arc; -use crate::web_worker::WebWorkerInternalHandle; -use crate::web_worker::WebWorkerType; use deno_core::futures::StreamExt; use deno_core::op2; use deno_core::url::Url; @@ -16,6 +14,9 @@ use hyper::body::Bytes; use serde::Deserialize; use serde::Serialize; +use crate::web_worker::WebWorkerInternalHandle; +use crate::web_worker::WebWorkerType; + // TODO(andreubotella) Properly parse the MIME type fn mime_type_essence(mime_type: &str) -> String { let essence = match mime_type.split_once(';') { @@ -104,11 +105,7 @@ pub fn op_worker_sync_fetch( let (body, mime_type, res_url) = match script_url.scheme() { "http" | "https" => { - let mut req = http::Request::new( - http_body_util::Empty::new() - .map_err(|never| match never {}) - .boxed(), - ); + let mut req = http::Request::new(deno_fetch::ReqBody::empty()); *req.uri_mut() = script_url.as_str().parse()?; let resp = diff --git a/runtime/ops/worker_host.rs b/runtime/ops/worker_host.rs index 521284a6a065b2..45285943eb5659 100644 --- a/runtime/ops/worker_host.rs +++ b/runtime/ops/worker_host.rs @@ -1,15 +1,10 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::cell::RefCell; +use std::collections::HashMap; +use std::rc::Rc; +use std::sync::Arc; -use crate::ops::TestingFeaturesEnabled; -use crate::web_worker::run_web_worker; -use crate::web_worker::SendableWebWorkerHandle; -use crate::web_worker::WebWorker; -use crate::web_worker::WebWorkerHandle; -use crate::web_worker::WebWorkerType; -use crate::web_worker::WorkerControlEvent; -use crate::web_worker::WorkerId; -use crate::web_worker::WorkerMetadata; -use crate::worker::FormatJsErrorFn; use deno_core::op2; use deno_core::serde::Deserialize; use deno_core::CancelFuture; @@ -22,10 +17,17 @@ use deno_web::deserialize_js_transferables; use deno_web::JsMessageData; use deno_web::MessagePortError; use log::debug; -use std::cell::RefCell; -use std::collections::HashMap; -use std::rc::Rc; -use std::sync::Arc; + +use crate::ops::TestingFeaturesEnabled; +use crate::web_worker::run_web_worker; +use crate::web_worker::SendableWebWorkerHandle; +use crate::web_worker::WebWorker; +use crate::web_worker::WebWorkerHandle; +use crate::web_worker::WebWorkerType; +use crate::web_worker::WorkerControlEvent; +use crate::web_worker::WorkerId; +use crate::web_worker::WorkerMetadata; +use crate::worker::FormatJsErrorFn; pub const UNSTABLE_FEATURE_NAME: &str = "worker-options"; @@ -133,7 +135,7 @@ pub enum CreateWorkerError { } /// Create worker as the host -#[op2] +#[op2(stack_trace)] #[serde] fn op_create_worker( state: &mut OpState, diff --git a/runtime/permissions.rs b/runtime/permissions.rs index e8460e03f88a8d..8b65c6b1b027de 100644 --- a/runtime/permissions.rs +++ b/runtime/permissions.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::path::Path; use std::path::PathBuf; @@ -21,13 +21,17 @@ use deno_permissions::SysDescriptorParseError; use deno_permissions::WriteDescriptor; #[derive(Debug)] -pub struct RuntimePermissionDescriptorParser { - fs: deno_fs::FileSystemRc, +pub struct RuntimePermissionDescriptorParser< + TSys: sys_traits::EnvCurrentDir + Send + Sync, +> { + sys: TSys, } -impl RuntimePermissionDescriptorParser { - pub fn new(fs: deno_fs::FileSystemRc) -> Self { - Self { fs } +impl + RuntimePermissionDescriptorParser +{ + pub fn new(sys: TSys) -> Self { + Self { sys } } fn resolve_from_cwd(&self, path: &str) -> Result { @@ -45,14 +49,15 @@ impl RuntimePermissionDescriptorParser { fn resolve_cwd(&self) -> Result { self - .fs - .cwd() - .map_err(|e| PathResolveError::CwdResolve(e.into_io_error())) + .sys + .env_current_dir() + .map_err(PathResolveError::CwdResolve) } } -impl deno_permissions::PermissionDescriptorParser - for RuntimePermissionDescriptorParser +impl + deno_permissions::PermissionDescriptorParser + for RuntimePermissionDescriptorParser { fn parse_read_descriptor( &self, @@ -151,16 +156,14 @@ impl deno_permissions::PermissionDescriptorParser #[cfg(test)] mod test { - use std::sync::Arc; - - use deno_fs::RealFs; use deno_permissions::PermissionDescriptorParser; use super::*; #[test] fn test_handle_empty_value() { - let parser = RuntimePermissionDescriptorParser::new(Arc::new(RealFs)); + let parser = + RuntimePermissionDescriptorParser::new(sys_traits::impls::RealSys); assert!(parser.parse_read_descriptor("").is_err()); assert!(parser.parse_write_descriptor("").is_err()); assert!(parser.parse_env_descriptor("").is_err()); diff --git a/runtime/permissions/Cargo.toml b/runtime/permissions/Cargo.toml index e088eb8ce53813..b9259941aaf7fe 100644 --- a/runtime/permissions/Cargo.toml +++ b/runtime/permissions/Cargo.toml @@ -1,8 +1,8 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "deno_permissions" -version = "0.37.0" +version = "0.43.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -14,6 +14,7 @@ name = "deno_permissions" path = "lib.rs" [dependencies] +capacity_builder.workspace = true deno_core.workspace = true deno_path_util.workspace = true deno_terminal.workspace = true diff --git a/runtime/permissions/lib.rs b/runtime/permissions/lib.rs index 71ef7d22899be9..8ab4058e79ed2c 100644 --- a/runtime/permissions/lib.rs +++ b/runtime/permissions/lib.rs @@ -1,5 +1,19 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. +use std::borrow::Cow; +use std::collections::HashSet; +use std::ffi::OsStr; +use std::fmt; +use std::fmt::Debug; +use std::hash::Hash; +use std::net::IpAddr; +use std::net::Ipv6Addr; +use std::path::Path; +use std::path::PathBuf; +use std::string::ToString; +use std::sync::Arc; + +use capacity_builder::StringBuilder; use deno_core::parking_lot::Mutex; use deno_core::serde::de; use deno_core::serde::Deserialize; @@ -14,34 +28,22 @@ use deno_path_util::url_to_file_path; use deno_terminal::colors; use fqdn::FQDN; use once_cell::sync::Lazy; -use std::borrow::Cow; -use std::collections::HashSet; -use std::ffi::OsStr; -use std::fmt; -use std::fmt::Debug; -use std::hash::Hash; -use std::net::IpAddr; -use std::net::Ipv6Addr; -use std::path::Path; -use std::path::PathBuf; -use std::string::ToString; -use std::sync::Arc; pub mod prompter; use prompter::permission_prompt; -use prompter::PERMISSION_EMOJI; - pub use prompter::set_prompt_callbacks; pub use prompter::set_prompter; pub use prompter::PermissionPrompter; pub use prompter::PromptCallback; pub use prompter::PromptResponse; +use prompter::PERMISSION_EMOJI; #[derive(Debug, thiserror::Error)] -#[error("Requires {access}, {}", format_permission_error(.name))] -pub struct PermissionDeniedError { - pub access: String, - pub name: &'static str, +pub enum PermissionDeniedError { + #[error("Requires {access}, {}", format_permission_error(.name))] + Retryable { access: String, name: &'static str }, + #[error("Requires {access}, which cannot be granted in this environment")] + Fatal { access: String }, } fn format_permission_error(name: &'static str) -> String { @@ -143,11 +145,11 @@ impl PermissionState { ) } - fn error( + fn retryable_error( name: &'static str, info: impl FnOnce() -> Option, ) -> PermissionDeniedError { - PermissionDeniedError { + PermissionDeniedError::Retryable { access: Self::fmt_access(name, info), name, } @@ -179,13 +181,18 @@ impl PermissionState { (Ok(()), false, false) } PermissionState::Prompt if prompt => { - let msg = format!( - "{} access{}", - name, - info() - .map(|info| { format!(" to {info}") }) - .unwrap_or_default(), - ); + let msg = { + let info = info(); + StringBuilder::::build(|builder| { + builder.append(name); + builder.append(" access"); + if let Some(info) = &info { + builder.append(" to "); + builder.append(info); + } + }) + .unwrap() + }; match permission_prompt(&msg, name, api_name, true) { PromptResponse::Allow => { Self::log_perm_access(name, info); @@ -195,10 +202,12 @@ impl PermissionState { Self::log_perm_access(name, info); (Ok(()), true, true) } - PromptResponse::Deny => (Err(Self::error(name, info)), true, false), + PromptResponse::Deny => { + (Err(Self::retryable_error(name, info)), true, false) + } } } - _ => (Err(Self::error(name, info)), false, false), + _ => (Err(Self::retryable_error(name, info)), false, false), } } } @@ -294,7 +303,7 @@ impl UnitPermission { /// A normalized environment variable name. On Windows this will /// be uppercase and on other platforms it will stay as-is. #[derive(Clone, Eq, PartialEq, Hash, Debug)] -struct EnvVarName { +pub struct EnvVarName { inner: String, } @@ -344,11 +353,11 @@ pub trait QueryDescriptor: Debug { fn overlaps_deny(&self, other: &Self::DenyDesc) -> bool; } -fn format_display_name(display_name: Cow) -> String { +fn format_display_name(display_name: Cow) -> Cow { if display_name.starts_with('<') && display_name.ends_with('>') { - display_name.into_owned() + display_name } else { - format!("\"{}\"", display_name) + Cow::Owned(format!("\"{}\"", display_name)) } } @@ -424,7 +433,7 @@ impl UnaryPermission { .check2( TQuery::flag_name(), api_name, - || desc.map(|d| format_display_name(d.display_name())), + || desc.map(|d| format_display_name(d.display_name()).into_owned()), self.prompt, ); if prompted { @@ -487,12 +496,17 @@ impl UnaryPermission { if !self.prompt { return PermissionState::Denied; } - let mut message = String::with_capacity(40); - message.push_str(&format!("{} access", TQuery::flag_name())); - if let Some(desc) = desc { - message - .push_str(&format!(" to {}", format_display_name(desc.display_name()))); - } + let maybe_formatted_display_name = + desc.map(|d| format_display_name(d.display_name())); + let message = StringBuilder::::build(|builder| { + builder.append(TQuery::flag_name()); + builder.append(" access"); + if let Some(display_name) = &maybe_formatted_display_name { + builder.append(" to "); + builder.append(display_name) + } + }) + .unwrap(); match permission_prompt( &message, TQuery::flag_name(), @@ -1114,15 +1128,37 @@ impl ImportDescriptor { pub struct EnvDescriptorParseError; #[derive(Clone, Eq, PartialEq, Hash, Debug)] -pub struct EnvDescriptor(EnvVarName); +pub enum EnvDescriptor { + Name(EnvVarName), + PrefixPattern(EnvVarName), +} impl EnvDescriptor { pub fn new(env: impl AsRef) -> Self { - Self(EnvVarName::new(env)) + if let Some(prefix_pattern) = env.as_ref().strip_suffix('*') { + Self::PrefixPattern(EnvVarName::new(prefix_pattern)) + } else { + Self::Name(EnvVarName::new(env)) + } + } +} + +#[derive(Clone, Eq, PartialEq, Hash, Debug)] +enum EnvQueryDescriptorInner { + Name(EnvVarName), + PrefixPattern(EnvVarName), +} + +#[derive(Clone, Eq, PartialEq, Hash, Debug)] +pub struct EnvQueryDescriptor(EnvQueryDescriptorInner); + +impl EnvQueryDescriptor { + pub fn new(env: impl AsRef) -> Self { + Self(EnvQueryDescriptorInner::Name(EnvVarName::new(env))) } } -impl QueryDescriptor for EnvDescriptor { +impl QueryDescriptor for EnvQueryDescriptor { type AllowDesc = EnvDescriptor; type DenyDesc = EnvDescriptor; @@ -1131,19 +1167,45 @@ impl QueryDescriptor for EnvDescriptor { } fn display_name(&self) -> Cow { - Cow::from(self.0.as_ref()) + Cow::from(match &self.0 { + EnvQueryDescriptorInner::Name(env_var_name) => env_var_name.as_ref(), + EnvQueryDescriptorInner::PrefixPattern(env_var_name) => { + env_var_name.as_ref() + } + }) } fn from_allow(allow: &Self::AllowDesc) -> Self { - allow.clone() + match allow { + Self::AllowDesc::Name(s) => { + Self(EnvQueryDescriptorInner::Name(s.clone())) + } + Self::AllowDesc::PrefixPattern(s) => { + Self(EnvQueryDescriptorInner::PrefixPattern(s.clone())) + } + } } fn as_allow(&self) -> Option { - Some(self.clone()) + Some(match &self.0 { + EnvQueryDescriptorInner::Name(env_var_name) => { + Self::AllowDesc::Name(env_var_name.clone()) + } + EnvQueryDescriptorInner::PrefixPattern(env_var_name) => { + Self::AllowDesc::PrefixPattern(env_var_name.clone()) + } + }) } fn as_deny(&self) -> Self::DenyDesc { - self.clone() + match &self.0 { + EnvQueryDescriptorInner::Name(env_var_name) => { + Self::DenyDesc::Name(env_var_name.clone()) + } + EnvQueryDescriptorInner::PrefixPattern(env_var_name) => { + Self::DenyDesc::PrefixPattern(env_var_name.clone()) + } + } } fn check_in_permission( @@ -1156,19 +1218,79 @@ impl QueryDescriptor for EnvDescriptor { } fn matches_allow(&self, other: &Self::AllowDesc) -> bool { - self == other + match other { + Self::AllowDesc::Name(n) => match &self.0 { + EnvQueryDescriptorInner::Name(env_var_name) => n == env_var_name, + EnvQueryDescriptorInner::PrefixPattern(env_var_name) => { + env_var_name.as_ref().starts_with(n.as_ref()) + } + }, + Self::AllowDesc::PrefixPattern(p) => match &self.0 { + EnvQueryDescriptorInner::Name(env_var_name) => { + env_var_name.as_ref().starts_with(p.as_ref()) + } + EnvQueryDescriptorInner::PrefixPattern(env_var_name) => { + env_var_name.as_ref().starts_with(p.as_ref()) + } + }, + } } fn matches_deny(&self, other: &Self::DenyDesc) -> bool { - self == other + match other { + Self::AllowDesc::Name(n) => match &self.0 { + EnvQueryDescriptorInner::Name(env_var_name) => n == env_var_name, + EnvQueryDescriptorInner::PrefixPattern(env_var_name) => { + env_var_name.as_ref().starts_with(n.as_ref()) + } + }, + Self::AllowDesc::PrefixPattern(p) => match &self.0 { + EnvQueryDescriptorInner::Name(env_var_name) => { + env_var_name.as_ref().starts_with(p.as_ref()) + } + EnvQueryDescriptorInner::PrefixPattern(env_var_name) => { + p == env_var_name + } + }, + } } fn revokes(&self, other: &Self::AllowDesc) -> bool { - self == other + match other { + Self::AllowDesc::Name(n) => match &self.0 { + EnvQueryDescriptorInner::Name(env_var_name) => n == env_var_name, + EnvQueryDescriptorInner::PrefixPattern(env_var_name) => { + env_var_name.as_ref().starts_with(n.as_ref()) + } + }, + Self::AllowDesc::PrefixPattern(p) => match &self.0 { + EnvQueryDescriptorInner::Name(env_var_name) => { + env_var_name.as_ref().starts_with(p.as_ref()) + } + EnvQueryDescriptorInner::PrefixPattern(env_var_name) => { + p == env_var_name + } + }, + } } fn stronger_than_deny(&self, other: &Self::DenyDesc) -> bool { - self == other + match other { + Self::AllowDesc::Name(n) => match &self.0 { + EnvQueryDescriptorInner::Name(env_var_name) => n == env_var_name, + EnvQueryDescriptorInner::PrefixPattern(env_var_name) => { + env_var_name.as_ref().starts_with(n.as_ref()) + } + }, + Self::AllowDesc::PrefixPattern(p) => match &self.0 { + EnvQueryDescriptorInner::Name(env_var_name) => { + env_var_name.as_ref().starts_with(p.as_ref()) + } + EnvQueryDescriptorInner::PrefixPattern(env_var_name) => { + p == env_var_name + } + }, + } } fn overlaps_deny(&self, _other: &Self::DenyDesc) -> bool { @@ -1176,9 +1298,14 @@ impl QueryDescriptor for EnvDescriptor { } } -impl AsRef for EnvDescriptor { +impl AsRef for EnvQueryDescriptor { fn as_ref(&self) -> &str { - self.0.as_ref() + match &self.0 { + EnvQueryDescriptorInner::Name(env_var_name) => env_var_name.as_ref(), + EnvQueryDescriptorInner::PrefixPattern(env_var_name) => { + env_var_name.as_ref() + } + } } } @@ -1383,11 +1510,10 @@ impl AllowRunDescriptor { match which::which_in(text, std::env::var_os("PATH"), cwd) { Ok(path) => path, Err(err) => match err { - which::Error::BadAbsolutePath | which::Error::BadRelativePath => { + which::Error::CannotGetCurrentDirAndPathListEmpty => { return Err(err); } which::Error::CannotFindBinaryPath - | which::Error::CannotGetCurrentDir | which::Error::CannotCanonicalize => { return Ok(AllowRunDescriptorParseResult::Unresolved(Box::new(err))) } @@ -1749,20 +1875,20 @@ impl UnaryPermission { } } -impl UnaryPermission { +impl UnaryPermission { pub fn query(&self, env: Option<&str>) -> PermissionState { self.query_desc( - env.map(EnvDescriptor::new).as_ref(), + env.map(EnvQueryDescriptor::new).as_ref(), AllowPartial::TreatAsPartialGranted, ) } pub fn request(&mut self, env: Option<&str>) -> PermissionState { - self.request_desc(env.map(EnvDescriptor::new).as_ref()) + self.request_desc(env.map(EnvQueryDescriptor::new).as_ref()) } pub fn revoke(&mut self, env: Option<&str>) -> PermissionState { - self.revoke_desc(env.map(EnvDescriptor::new).as_ref()) + self.revoke_desc(env.map(EnvQueryDescriptor::new).as_ref()) } pub fn check( @@ -1771,7 +1897,7 @@ impl UnaryPermission { api_name: Option<&str>, ) -> Result<(), PermissionDeniedError> { skip_check_if_is_permission_fully_granted!(self); - self.check_desc(Some(&EnvDescriptor::new(env)), false, api_name) + self.check_desc(Some(&EnvQueryDescriptor::new(env)), false, api_name) } pub fn check_all(&mut self) -> Result<(), PermissionDeniedError> { @@ -1905,7 +2031,7 @@ pub struct Permissions { pub read: UnaryPermission, pub write: UnaryPermission, pub net: UnaryPermission, - pub env: UnaryPermission, + pub env: UnaryPermission, pub sys: UnaryPermission, pub run: UnaryPermission, pub ffi: UnaryPermission, @@ -3564,11 +3690,13 @@ pub fn is_standalone() -> bool { #[cfg(test)] mod tests { - use super::*; + use std::net::Ipv4Addr; + use deno_core::serde_json::json; use fqdn::fqdn; use prompter::tests::*; - use std::net::Ipv4Addr; + + use super::*; // Creates vector of strings, Vec macro_rules! svec { @@ -4564,6 +4692,56 @@ mod tests { assert_eq!(perms.env.revoke(Some("HomE")), PermissionState::Prompt); } + #[test] + fn test_env_wildcards() { + set_prompter(Box::new(TestPrompter)); + let _prompt_value = PERMISSION_PROMPT_STUB_VALUE_SETTER.lock(); + let mut perms = Permissions::allow_all(); + perms.env = UnaryPermission { + granted_global: false, + ..Permissions::new_unary( + Some(HashSet::from([EnvDescriptor::new("HOME_*")])), + None, + false, + ) + }; + assert_eq!(perms.env.query(Some("HOME")), PermissionState::Prompt); + assert_eq!(perms.env.query(Some("HOME_")), PermissionState::Granted); + assert_eq!(perms.env.query(Some("HOME_TEST")), PermissionState::Granted); + + // assert no privilege escalation + let parser = TestPermissionDescriptorParser; + assert!(perms + .env + .create_child_permissions( + ChildUnaryPermissionArg::GrantedList(vec!["HOME_SUB".to_string()]), + |value| parser.parse_env_descriptor(value).map(Some), + ) + .is_ok()); + assert!(perms + .env + .create_child_permissions( + ChildUnaryPermissionArg::GrantedList(vec!["HOME*".to_string()]), + |value| parser.parse_env_descriptor(value).map(Some), + ) + .is_err()); + assert!(perms + .env + .create_child_permissions( + ChildUnaryPermissionArg::GrantedList(vec!["OUTSIDE".to_string()]), + |value| parser.parse_env_descriptor(value).map(Some), + ) + .is_err()); + assert!(perms + .env + .create_child_permissions( + // ok because this is a subset of HOME_* + ChildUnaryPermissionArg::GrantedList(vec!["HOME_S*".to_string()]), + |value| parser.parse_env_descriptor(value).map(Some), + ) + .is_ok()); + } + #[test] fn test_check_partial_denied() { let parser = TestPermissionDescriptorParser; diff --git a/runtime/permissions/prompter.rs b/runtime/permissions/prompter.rs index 168a845a29611a..94384427d153c0 100644 --- a/runtime/permissions/prompter.rs +++ b/runtime/permissions/prompter.rs @@ -1,8 +1,5 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use deno_core::parking_lot::Mutex; -use deno_terminal::colors; -use once_cell::sync::Lazy; use std::fmt::Write; use std::io::BufRead; use std::io::IsTerminal; @@ -10,6 +7,11 @@ use std::io::StderrLock; use std::io::StdinLock; use std::io::Write as IoWrite; +use deno_core::error::JsStackFrame; +use deno_core::parking_lot::Mutex; +use deno_terminal::colors; +use once_cell::sync::Lazy; + use crate::is_standalone; /// Helper function to make control characters visible so users can see the underlying filename. @@ -53,6 +55,13 @@ static MAYBE_BEFORE_PROMPT_CALLBACK: Lazy>> = static MAYBE_AFTER_PROMPT_CALLBACK: Lazy>> = Lazy::new(|| Mutex::new(None)); +static MAYBE_CURRENT_STACKTRACE: Lazy>>> = + Lazy::new(|| Mutex::new(None)); + +pub fn set_current_stacktrace(trace: Vec) { + *MAYBE_CURRENT_STACKTRACE.lock() = Some(trace); +} + pub fn permission_prompt( message: &str, flag: &str, @@ -62,9 +71,10 @@ pub fn permission_prompt( if let Some(before_callback) = MAYBE_BEFORE_PROMPT_CALLBACK.lock().as_mut() { before_callback(); } + let stack = MAYBE_CURRENT_STACKTRACE.lock().take(); let r = PERMISSION_PROMPTER .lock() - .prompt(message, flag, api_name, is_unary); + .prompt(message, flag, api_name, is_unary, stack); if let Some(after_callback) = MAYBE_AFTER_PROMPT_CALLBACK.lock().as_mut() { after_callback(); } @@ -92,6 +102,7 @@ pub trait PermissionPrompter: Send + Sync { name: &str, api_name: Option<&str>, is_unary: bool, + stack: Option>, ) -> PromptResponse; } @@ -298,6 +309,7 @@ impl PermissionPrompter for TtyPrompter { name: &str, api_name: Option<&str>, is_unary: bool, + stack: Option>, ) -> PromptResponse { if !std::io::stdin().is_terminal() || !std::io::stderr().is_terminal() { return PromptResponse::Deny; @@ -340,7 +352,7 @@ impl PermissionPrompter for TtyPrompter { }; // output everything in one shot to make the tests more reliable - { + let stack_lines_count = { let mut output = String::new(); write!(&mut output, "┏ {PERMISSION_EMOJI} ").unwrap(); write!(&mut output, "{}", colors::bold("Deno requests ")).unwrap(); @@ -354,6 +366,27 @@ impl PermissionPrompter for TtyPrompter { ) .unwrap(); } + let stack_lines_count = if let Some(stack) = stack { + let len = stack.len(); + for (idx, frame) in stack.into_iter().enumerate() { + writeln!( + &mut output, + "┃ {} {}", + colors::gray(if idx != len - 1 { "├─" } else { "└─" }), + colors::gray(deno_core::error::format_frame::< + deno_core::error::NoAnsiColors, + >(&frame)) + ) + .unwrap(); + } + len + } else { + writeln!( + &mut output, + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.", + ).unwrap(); + 1 + }; let msg = format!( "Learn more at: {}", colors::cyan_with_underline(&format!( @@ -372,7 +405,9 @@ impl PermissionPrompter for TtyPrompter { write!(&mut output, " {opts} > ").unwrap(); stderr_lock.write_all(output.as_bytes()).unwrap(); - } + + stack_lines_count + }; let value = loop { // Clear stdin each time we loop around in case the user accidentally pasted @@ -391,30 +426,24 @@ impl PermissionPrompter for TtyPrompter { if result.is_err() || input.len() != 1 { break PromptResponse::Deny; }; + + let clear_n = if api_name.is_some() { 5 } else { 4 } + stack_lines_count; + match input.as_bytes()[0] as char { 'y' | 'Y' => { - clear_n_lines( - &mut stderr_lock, - if api_name.is_some() { 5 } else { 4 }, - ); + clear_n_lines(&mut stderr_lock, clear_n); let msg = format!("Granted {message}."); writeln!(stderr_lock, "✅ {}", colors::bold(&msg)).unwrap(); break PromptResponse::Allow; } 'n' | 'N' | '\x1b' => { - clear_n_lines( - &mut stderr_lock, - if api_name.is_some() { 5 } else { 4 }, - ); + clear_n_lines(&mut stderr_lock, clear_n); let msg = format!("Denied {message}."); writeln!(stderr_lock, "❌ {}", colors::bold(&msg)).unwrap(); break PromptResponse::Deny; } 'A' if is_unary => { - clear_n_lines( - &mut stderr_lock, - if api_name.is_some() { 5 } else { 4 }, - ); + clear_n_lines(&mut stderr_lock, clear_n); let msg = format!("Granted all {name} access."); writeln!(stderr_lock, "✅ {}", colors::bold(&msg)).unwrap(); break PromptResponse::AllowAll; @@ -462,10 +491,11 @@ impl PermissionPrompter for TtyPrompter { #[cfg(test)] pub mod tests { - use super::*; use std::sync::atomic::AtomicBool; use std::sync::atomic::Ordering; + use super::*; + pub struct TestPrompter; impl PermissionPrompter for TestPrompter { @@ -475,6 +505,7 @@ pub mod tests { _name: &str, _api_name: Option<&str>, _is_unary: bool, + _stack: Option>, ) -> PromptResponse { if STUB_PROMPT_VALUE.load(Ordering::SeqCst) { PromptResponse::Allow diff --git a/runtime/shared.rs b/runtime/shared.rs index c05f352f1c3ef6..1a9f2e66be1814 100644 --- a/runtime/shared.rs +++ b/runtime/shared.rs @@ -1,6 +1,8 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Utilities shared between `build.rs` and the rest of the crate. +use std::path::Path; + use deno_ast::MediaType; use deno_ast::ParseParams; use deno_ast::SourceMapOption; @@ -10,7 +12,6 @@ use deno_core::Extension; use deno_core::ModuleCodeString; use deno_core::ModuleName; use deno_core::SourceMapData; -use std::path::Path; extension!(runtime, deps = [ @@ -47,7 +48,6 @@ extension!(runtime, "40_signals.js", "40_tty.js", "41_prompt.js", - "telemetry.js", "90_deno_ns.js", "98_global_scope_shared.js", "98_global_scope_window.js", diff --git a/runtime/signal.rs b/runtime/signal.rs new file mode 100644 index 00000000000000..b11353b3b2ee42 --- /dev/null +++ b/runtime/signal.rs @@ -0,0 +1,257 @@ +// Copyright 2018-2025 the Deno authors. MIT license. + +#[cfg(target_os = "windows")] +#[derive(Debug, thiserror::Error)] +#[error("Windows only supports ctrl-c (SIGINT) and ctrl-break (SIGBREAK), but got {0}")] +pub struct InvalidSignalStrError(pub String); + +#[cfg(any( + target_os = "android", + target_os = "linux", + target_os = "openbsd", + target_os = "openbsd", + target_os = "macos", + target_os = "solaris", + target_os = "illumos" +))] +#[derive(Debug, thiserror::Error)] +#[error("Invalid signal: {0}")] +pub struct InvalidSignalStrError(pub String); + +#[cfg(target_os = "windows")] +#[derive(Debug, thiserror::Error)] +#[error("Windows only supports ctrl-c (SIGINT) and ctrl-break (SIGBREAK), but got {0}")] +pub struct InvalidSignalIntError(pub libc::c_int); + +#[cfg(any( + target_os = "android", + target_os = "linux", + target_os = "openbsd", + target_os = "openbsd", + target_os = "macos", + target_os = "solaris", + target_os = "illumos" +))] +#[derive(Debug, thiserror::Error)] +#[error("Invalid signal: {0}")] +pub struct InvalidSignalIntError(pub libc::c_int); + +macro_rules! first_literal { + ($head:literal $(, $tail:literal)*) => { + $head + }; +} + +macro_rules! signal_dict { + ($(($number:literal, $($name:literal)|+)),*) => { + + pub const SIGNAL_NUMS: &'static [libc::c_int] = &[ + $( + $number + ),* + ]; + + pub fn signal_str_to_int(s: &str) -> Result { + match s { + $($($name)|* => Ok($number),)* + _ => Err(InvalidSignalStrError(s.to_string())), + } + } + + pub fn signal_int_to_str(s: libc::c_int) -> Result<&'static str, InvalidSignalIntError> { + match s { + $($number => Ok(first_literal!($($name),+)),)* + _ => Err(InvalidSignalIntError(s)), + } + } + } +} + +#[cfg(target_os = "freebsd")] +signal_dict!( + (1, "SIGHUP"), + (2, "SIGINT"), + (3, "SIGQUIT"), + (4, "SIGILL"), + (5, "SIGTRAP"), + (6, "SIGABRT" | "SIGIOT"), + (7, "SIGEMT"), + (8, "SIGFPE"), + (9, "SIGKILL"), + (10, "SIGBUS"), + (11, "SIGSEGV"), + (12, "SIGSYS"), + (13, "SIGPIPE"), + (14, "SIGALRM"), + (15, "SIGTERM"), + (16, "SIGURG"), + (17, "SIGSTOP"), + (18, "SIGTSTP"), + (19, "SIGCONT"), + (20, "SIGCHLD"), + (21, "SIGTTIN"), + (22, "SIGTTOU"), + (23, "SIGIO"), + (24, "SIGXCPU"), + (25, "SIGXFSZ"), + (26, "SIGVTALRM"), + (27, "SIGPROF"), + (28, "SIGWINCH"), + (29, "SIGINFO"), + (30, "SIGUSR1"), + (31, "SIGUSR2"), + (32, "SIGTHR"), + (33, "SIGLIBRT") +); + +#[cfg(target_os = "openbsd")] +signal_dict!( + (1, "SIGHUP"), + (2, "SIGINT"), + (3, "SIGQUIT"), + (4, "SIGILL"), + (5, "SIGTRAP"), + (6, "SIGABRT" | "SIGIOT"), + (7, "SIGEMT"), + (8, "SIGKILL"), + (10, "SIGBUS"), + (11, "SIGSEGV"), + (12, "SIGSYS"), + (13, "SIGPIPE"), + (14, "SIGALRM"), + (15, "SIGTERM"), + (16, "SIGURG"), + (17, "SIGSTOP"), + (18, "SIGTSTP"), + (19, "SIGCONT"), + (20, "SIGCHLD"), + (21, "SIGTTIN"), + (22, "SIGTTOU"), + (23, "SIGIO"), + (24, "SIGXCPU"), + (25, "SIGXFSZ"), + (26, "SIGVTALRM"), + (27, "SIGPROF"), + (28, "SIGWINCH"), + (29, "SIGINFO"), + (30, "SIGUSR1"), + (31, "SIGUSR2"), + (32, "SIGTHR") +); + +#[cfg(any(target_os = "android", target_os = "linux"))] +signal_dict!( + (1, "SIGHUP"), + (2, "SIGINT"), + (3, "SIGQUIT"), + (4, "SIGILL"), + (5, "SIGTRAP"), + (6, "SIGABRT" | "SIGIOT"), + (7, "SIGBUS"), + (8, "SIGFPE"), + (9, "SIGKILL"), + (10, "SIGUSR1"), + (11, "SIGSEGV"), + (12, "SIGUSR2"), + (13, "SIGPIPE"), + (14, "SIGALRM"), + (15, "SIGTERM"), + (16, "SIGSTKFLT"), + (17, "SIGCHLD"), + (18, "SIGCONT"), + (19, "SIGSTOP"), + (20, "SIGTSTP"), + (21, "SIGTTIN"), + (22, "SIGTTOU"), + (23, "SIGURG"), + (24, "SIGXCPU"), + (25, "SIGXFSZ"), + (26, "SIGVTALRM"), + (27, "SIGPROF"), + (28, "SIGWINCH"), + (29, "SIGIO" | "SIGPOLL"), + (30, "SIGPWR"), + (31, "SIGSYS" | "SIGUNUSED") +); + +#[cfg(target_os = "macos")] +signal_dict!( + (1, "SIGHUP"), + (2, "SIGINT"), + (3, "SIGQUIT"), + (4, "SIGILL"), + (5, "SIGTRAP"), + (6, "SIGABRT" | "SIGIOT"), + (7, "SIGEMT"), + (8, "SIGFPE"), + (9, "SIGKILL"), + (10, "SIGBUS"), + (11, "SIGSEGV"), + (12, "SIGSYS"), + (13, "SIGPIPE"), + (14, "SIGALRM"), + (15, "SIGTERM"), + (16, "SIGURG"), + (17, "SIGSTOP"), + (18, "SIGTSTP"), + (19, "SIGCONT"), + (20, "SIGCHLD"), + (21, "SIGTTIN"), + (22, "SIGTTOU"), + (23, "SIGIO"), + (24, "SIGXCPU"), + (25, "SIGXFSZ"), + (26, "SIGVTALRM"), + (27, "SIGPROF"), + (28, "SIGWINCH"), + (29, "SIGINFO"), + (30, "SIGUSR1"), + (31, "SIGUSR2") +); + +#[cfg(any(target_os = "solaris", target_os = "illumos"))] +signal_dict!( + (1, "SIGHUP"), + (2, "SIGINT"), + (3, "SIGQUIT"), + (4, "SIGILL"), + (5, "SIGTRAP"), + (6, "SIGABRT" | "SIGIOT"), + (7, "SIGEMT"), + (8, "SIGFPE"), + (9, "SIGKILL"), + (10, "SIGBUS"), + (11, "SIGSEGV"), + (12, "SIGSYS"), + (13, "SIGPIPE"), + (14, "SIGALRM"), + (15, "SIGTERM"), + (16, "SIGUSR1"), + (17, "SIGUSR2"), + (18, "SIGCHLD"), + (19, "SIGPWR"), + (20, "SIGWINCH"), + (21, "SIGURG"), + (22, "SIGPOLL"), + (23, "SIGSTOP"), + (24, "SIGTSTP"), + (25, "SIGCONT"), + (26, "SIGTTIN"), + (27, "SIGTTOU"), + (28, "SIGVTALRM"), + (29, "SIGPROF"), + (30, "SIGXCPU"), + (31, "SIGXFSZ"), + (32, "SIGWAITING"), + (33, "SIGLWP"), + (34, "SIGFREEZE"), + (35, "SIGTHAW"), + (36, "SIGCANCEL"), + (37, "SIGLOST"), + (38, "SIGXRES"), + (39, "SIGJVM1"), + (40, "SIGJVM2") +); + +#[cfg(target_os = "windows")] +signal_dict!((2, "SIGINT"), (21, "SIGBREAK")); diff --git a/runtime/snapshot.rs b/runtime/snapshot.rs index 7f6e6b8ab6ca2c..8d008eeab0043a 100644 --- a/runtime/snapshot.rs +++ b/runtime/snapshot.rs @@ -1,9 +1,12 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::borrow::Cow; +use std::io::Write; +use std::path::Path; +use std::path::PathBuf; +use std::rc::Rc; +use std::sync::Arc; -use crate::ops; -use crate::ops::bootstrap::SnapshotOptions; -use crate::shared::maybe_transpile_source; -use crate::shared::runtime; use deno_cache::SqliteBackedCache; use deno_core::snapshot::*; use deno_core::v8; @@ -11,12 +14,11 @@ use deno_core::Extension; use deno_http::DefaultHttpPropertyExtractor; use deno_io::fs::FsError; use deno_permissions::PermissionCheckError; -use std::borrow::Cow; -use std::io::Write; -use std::path::Path; -use std::path::PathBuf; -use std::rc::Rc; -use std::sync::Arc; + +use crate::ops; +use crate::ops::bootstrap::SnapshotOptions; +use crate::shared::maybe_transpile_source; +use crate::shared::runtime; #[derive(Clone)] struct Permissions; @@ -268,6 +270,7 @@ pub fn create_runtime_snapshot( // `runtime/worker.rs`, `runtime/web_worker.rs` and `runtime/snapshot.rs`! let fs = std::sync::Arc::new(deno_fs::RealFs); let mut extensions: Vec = vec![ + deno_telemetry::deno_telemetry::init_ops_and_esm(), deno_webidl::deno_webidl::init_ops_and_esm(), deno_console::deno_console::init_ops_and_esm(), deno_url::deno_url::init_ops_and_esm(), @@ -300,10 +303,15 @@ pub fn create_runtime_snapshot( deno_cron::local::LocalCronHandler::new(), ), deno_napi::deno_napi::init_ops_and_esm::(), - deno_http::deno_http::init_ops_and_esm::(), + deno_http::deno_http::init_ops_and_esm::( + deno_http::Options::default(), + ), deno_io::deno_io::init_ops_and_esm(Default::default()), deno_fs::deno_fs::init_ops_and_esm::(fs.clone()), - deno_node::deno_node::init_ops_and_esm::(None, fs.clone()), + deno_node::deno_node::init_ops_and_esm::< + Permissions, + sys_traits::impls::RealSys, + >(None, fs.clone()), runtime::init_ops_and_esm(), ops::runtime::deno_runtime::init_ops("deno:runtime".parse().unwrap()), ops::worker_host::deno_worker_host::init_ops( @@ -312,7 +320,6 @@ pub fn create_runtime_snapshot( ), ops::fs_events::deno_fs_events::init_ops(), ops::os::deno_os::init_ops(Default::default()), - ops::otel::deno_otel::init_ops(), ops::permissions::deno_permissions::init_ops(), ops::process::deno_process::init_ops(None), ops::signal::deno_signal::init_ops(), diff --git a/runtime/sys_info.rs b/runtime/sys_info.rs index cffc90e9da5280..e6bd16c0f3d46a 100644 --- a/runtime/sys_info.rs +++ b/runtime/sys_info.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. #[cfg(target_family = "windows")] use std::sync::Once; @@ -159,6 +159,7 @@ pub fn hostname() -> String { use std::ffi::OsString; use std::mem; use std::os::windows::ffi::OsStringExt; + use winapi::shared::minwindef::MAKEWORD; use winapi::um::winsock2::GetHostNameW; use winapi::um::winsock2::WSAStartup; @@ -278,11 +279,15 @@ pub fn mem_info() -> Option { mem_info.swap_total = xs.xsu_total; mem_info.swap_free = xs.xsu_avail; + extern "C" { + fn mach_host_self() -> std::ffi::c_uint; + } + let mut count: u32 = libc::HOST_VM_INFO64_COUNT as _; let mut stat = std::mem::zeroed::(); if libc::host_statistics64( // TODO(@littledivy): Put this in a once_cell. - libc::mach_host_self(), + mach_host_self(), libc::HOST_VM_INFO64, &mut stat as *mut libc::vm_statistics64 as *mut _, &mut count, @@ -291,11 +296,9 @@ pub fn mem_info() -> Option { // TODO(@littledivy): Put this in a once_cell let page_size = libc::sysconf(libc::_SC_PAGESIZE) as u64; mem_info.available = - (stat.free_count as u64 + stat.inactive_count as u64) * page_size - / 1024; + (stat.free_count as u64 + stat.inactive_count as u64) * page_size; mem_info.free = - (stat.free_count as u64 - stat.speculative_count as u64) * page_size - / 1024; + (stat.free_count as u64 - stat.speculative_count as u64) * page_size; } } } @@ -305,6 +308,7 @@ pub fn mem_info() -> Option { // - `dwLength` is set to the size of the struct. unsafe { use std::mem; + use winapi::shared::minwindef; use winapi::um::psapi::GetPerformanceInfo; use winapi::um::psapi::PERFORMANCE_INFORMATION; diff --git a/runtime/tokio_util.rs b/runtime/tokio_util.rs index aa0282ece87caa..370b8a6d927ed9 100644 --- a/runtime/tokio_util.rs +++ b/runtime/tokio_util.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::fmt::Debug; use std::str::FromStr; diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs index 8e0c870d1ad6ae..270fc1ab9f77b7 100644 --- a/runtime/web_worker.rs +++ b/runtime/web_worker.rs @@ -1,4 +1,14 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::cell::RefCell; +use std::fmt; +use std::rc::Rc; +use std::sync::atomic::AtomicBool; +use std::sync::atomic::AtomicU32; +use std::sync::atomic::Ordering; +use std::sync::Arc; +use std::task::Context; +use std::task::Poll; use deno_broadcast_channel::InMemoryBroadcastChannel; use deno_cache::CreateCache; @@ -33,6 +43,7 @@ use deno_fs::FileSystem; use deno_http::DefaultHttpPropertyExtractor; use deno_io::Stdio; use deno_kv::dynamic::MultiBackendDbHandler; +use deno_node::ExtNodeSys; use deno_node::NodeExtInitServices; use deno_permissions::PermissionsContainer; use deno_terminal::colors; @@ -45,20 +56,10 @@ use deno_web::JsMessageData; use deno_web::MessagePort; use deno_web::Transferable; use log::debug; -use std::cell::RefCell; -use std::fmt; -use std::rc::Rc; -use std::sync::atomic::AtomicBool; -use std::sync::atomic::AtomicU32; -use std::sync::atomic::Ordering; -use std::sync::Arc; -use std::task::Context; -use std::task::Poll; use crate::inspector_server::InspectorServer; use crate::ops; use crate::ops::process::NpmProcessStateProviderRc; -use crate::ops::worker_host::WorkersTable; use crate::shared::maybe_transpile_source; use crate::shared::runtime; use crate::tokio_util::create_and_run_current_thread; @@ -338,7 +339,7 @@ fn create_handles( (internal_handle, external_handle) } -pub struct WebWorkerServiceOptions { +pub struct WebWorkerServiceOptions { pub blob_store: Arc, pub broadcast_channel: InMemoryBroadcastChannel, pub compiled_wasm_module_store: Option, @@ -346,7 +347,7 @@ pub struct WebWorkerServiceOptions { pub fs: Arc, pub maybe_inspector_server: Option>, pub module_loader: Rc, - pub node_services: Option, + pub node_services: Option>, pub npm_process_state_provider: Option, pub permissions: PermissionsContainer, pub root_cert_store_provider: Option>, @@ -373,6 +374,7 @@ pub struct WebWorkerOptions { pub strace_ops: Option>, pub close_on_idle: bool, pub maybe_worker_metadata: Option, + pub enable_stack_trace_arg_in_ops: bool, } /// This struct is an implementation of `Worker` Web API @@ -384,7 +386,6 @@ pub struct WebWorker { pub js_runtime: JsRuntime, pub name: String, close_on_idle: bool, - has_executed_main_module: bool, internal_handle: WebWorkerInternalHandle, pub worker_type: WebWorkerType, pub main_module: ModuleSpecifier, @@ -403,8 +404,8 @@ impl Drop for WebWorker { } impl WebWorker { - pub fn bootstrap_from_options( - services: WebWorkerServiceOptions, + pub fn bootstrap_from_options( + services: WebWorkerServiceOptions, options: WebWorkerOptions, ) -> (Self, SendableWebWorkerHandle) { let (mut worker, handle, bootstrap_options) = @@ -413,8 +414,8 @@ impl WebWorker { (worker, handle) } - fn from_options( - services: WebWorkerServiceOptions, + fn from_options( + services: WebWorkerServiceOptions, mut options: WebWorkerOptions, ) -> (Self, SendableWebWorkerHandle, BootstrapOptions) { deno_core::extension!(deno_permissions_web_worker, @@ -439,6 +440,7 @@ impl WebWorker { // `runtime/worker.rs` and `runtime/snapshot.rs`! let mut extensions = vec![ + deno_telemetry::deno_telemetry::init_ops_and_esm(), // Web APIs deno_webidl::deno_webidl::init_ops_and_esm(), deno_console::deno_console::init_ops_and_esm(), @@ -497,12 +499,14 @@ impl WebWorker { ), deno_cron::deno_cron::init_ops_and_esm(LocalCronHandler::new()), deno_napi::deno_napi::init_ops_and_esm::(), - deno_http::deno_http::init_ops_and_esm::(), + deno_http::deno_http::init_ops_and_esm::( + deno_http::Options::default(), + ), deno_io::deno_io::init_ops_and_esm(Some(options.stdio)), deno_fs::deno_fs::init_ops_and_esm::( services.fs.clone(), ), - deno_node::deno_node::init_ops_and_esm::( + deno_node::deno_node::init_ops_and_esm::( services.node_services, services.fs, ), @@ -514,7 +518,6 @@ impl WebWorker { ), ops::fs_events::deno_fs_events::init_ops_and_esm(), ops::os::deno_os_worker::init_ops_and_esm(), - ops::otel::deno_otel::init_ops_and_esm(), ops::permissions::deno_permissions::init_ops_and_esm(), ops::process::deno_process::init_ops_and_esm( services.npm_process_state_provider, @@ -583,6 +586,13 @@ impl WebWorker { validate_import_attributes_callback, )), import_assertions_support: deno_core::ImportAssertionsSupport::Error, + maybe_op_stack_trace_callback: if options.enable_stack_trace_arg_in_ops { + Some(Box::new(|stack| { + deno_permissions::prompter::set_current_stacktrace(stack) + })) + } else { + None + }, ..Default::default() }); @@ -648,7 +658,6 @@ impl WebWorker { has_message_event_listener_fn: None, bootstrap_fn_global: Some(bootstrap_fn_global), close_on_idle: options.close_on_idle, - has_executed_main_module: false, maybe_worker_metadata: options.maybe_worker_metadata, }, external_handle, @@ -789,7 +798,6 @@ impl WebWorker { maybe_result = &mut receiver => { debug!("received worker module evaluate {:#?}", maybe_result); - self.has_executed_main_module = true; maybe_result } @@ -827,6 +835,9 @@ impl WebWorker { } if self.close_on_idle { + if self.has_message_event_listener() { + return Poll::Pending; + } return Poll::Ready(Ok(())); } @@ -841,22 +852,7 @@ impl WebWorker { Poll::Ready(Ok(())) } } - Poll::Pending => { - // This is special code path for workers created from `node:worker_threads` - // module that have different semantics than Web workers. - // We want the worker thread to terminate automatically if we've done executing - // Top-Level await, there are no child workers spawned by that workers - // and there's no "message" event listener. - if self.close_on_idle - && self.has_executed_main_module - && !self.has_child_workers() - && !self.has_message_event_listener() - { - Poll::Ready(Ok(())) - } else { - Poll::Pending - } - } + Poll::Pending => Poll::Pending, } } @@ -894,15 +890,6 @@ impl WebWorker { None => false, } } - - fn has_child_workers(&mut self) -> bool { - !self - .js_runtime - .op_state() - .borrow() - .borrow::() - .is_empty() - } } fn print_worker_error( diff --git a/runtime/worker.rs b/runtime/worker.rs index 99123463cf15e5..de29b66291fb8e 100644 --- a/runtime/worker.rs +++ b/runtime/worker.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::borrow::Cow; use std::collections::HashMap; use std::rc::Rc; @@ -39,6 +39,7 @@ use deno_fs::FileSystem; use deno_http::DefaultHttpPropertyExtractor; use deno_io::Stdio; use deno_kv::dynamic::MultiBackendDbHandler; +use deno_node::ExtNodeSys; use deno_node::NodeExtInitServices; use deno_permissions::PermissionsContainer; use deno_tls::RootCertStoreProvider; @@ -78,7 +79,7 @@ pub fn validate_import_attributes_callback( for (key, value) in attributes { let msg = if key != "type" { Some(format!("\"{key}\" attribute is not supported.")) - } else if value != "json" { + } else if value != "json" && value != "$$deno-core-internal-wasm-module" { Some(format!("\"{value}\" is not a valid module type.")) } else { None @@ -128,7 +129,7 @@ pub struct MainWorker { dispatch_process_exit_event_fn_global: v8::Global, } -pub struct WorkerServiceOptions { +pub struct WorkerServiceOptions { pub blob_store: Arc, pub broadcast_channel: InMemoryBroadcastChannel, pub feature_checker: Arc, @@ -139,7 +140,7 @@ pub struct WorkerServiceOptions { /// If not provided runtime will error if code being /// executed tries to load modules. pub module_loader: Rc, - pub node_services: Option, + pub node_services: Option>, pub npm_process_state_provider: Option, pub permissions: PermissionsContainer, pub root_cert_store_provider: Option>, @@ -207,6 +208,7 @@ pub struct WorkerOptions { pub cache_storage_dir: Option, pub origin_storage_dir: Option, pub stdio: Stdio, + pub enable_stack_trace_arg_in_ops: bool, } impl Default for WorkerOptions { @@ -231,6 +233,7 @@ impl Default for WorkerOptions { create_params: Default::default(), bootstrap: Default::default(), stdio: Default::default(), + enable_stack_trace_arg_in_ops: false, } } } @@ -302,9 +305,9 @@ pub fn create_op_metrics( } impl MainWorker { - pub fn bootstrap_from_options( + pub fn bootstrap_from_options( main_module: ModuleSpecifier, - services: WorkerServiceOptions, + services: WorkerServiceOptions, options: WorkerOptions, ) -> Self { let (mut worker, bootstrap_options) = @@ -313,9 +316,9 @@ impl MainWorker { worker } - fn from_options( + fn from_options( main_module: ModuleSpecifier, - services: WorkerServiceOptions, + services: WorkerServiceOptions, mut options: WorkerOptions, ) -> (Self, BootstrapOptions) { deno_core::extension!(deno_permissions_worker, @@ -346,6 +349,7 @@ impl MainWorker { // NOTE(bartlomieju): ordering is important here, keep it in sync with // `runtime/web_worker.rs` and `runtime/snapshot.rs`! let mut extensions = vec![ + deno_telemetry::deno_telemetry::init_ops_and_esm(), // Web APIs deno_webidl::deno_webidl::init_ops_and_esm(), deno_console::deno_console::init_ops_and_esm(), @@ -407,12 +411,14 @@ impl MainWorker { ), deno_cron::deno_cron::init_ops_and_esm(LocalCronHandler::new()), deno_napi::deno_napi::init_ops_and_esm::(), - deno_http::deno_http::init_ops_and_esm::(), + deno_http::deno_http::init_ops_and_esm::( + deno_http::Options::default(), + ), deno_io::deno_io::init_ops_and_esm(Some(options.stdio)), deno_fs::deno_fs::init_ops_and_esm::( services.fs.clone(), ), - deno_node::deno_node::init_ops_and_esm::( + deno_node::deno_node::init_ops_and_esm::( services.node_services, services.fs, ), @@ -424,7 +430,6 @@ impl MainWorker { ), ops::fs_events::deno_fs_events::init_ops_and_esm(), ops::os::deno_os::init_ops_and_esm(exit_code.clone()), - ops::otel::deno_otel::init_ops_and_esm(), ops::permissions::deno_permissions::init_ops_and_esm(), ops::process::deno_process::init_ops_and_esm( services.npm_process_state_provider, @@ -542,6 +547,11 @@ impl MainWorker { ) as Box, ) }), + maybe_op_stack_trace_callback: if options.enable_stack_trace_arg_in_ops { + Some(Box::new(|stack| { + deno_permissions::prompter::set_current_stacktrace(stack) + })) + } else { None }, ..Default::default() }); diff --git a/runtime/worker_bootstrap.rs b/runtime/worker_bootstrap.rs index 3f5c245a0faacd..ff90804f3b9d83 100644 --- a/runtime/worker_bootstrap.rs +++ b/runtime/worker_bootstrap.rs @@ -1,13 +1,13 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::ops::otel::OtelConfig; -use deno_core::v8; -use deno_core::ModuleSpecifier; -use serde::Serialize; use std::cell::RefCell; use std::thread; +use deno_core::v8; +use deno_core::ModuleSpecifier; +use deno_telemetry::OtelConfig; use deno_terminal::colors; +use serde::Serialize; /// The execution mode for this worker. Some modes may have implicit behaviour. #[derive(Copy, Clone)] @@ -119,8 +119,8 @@ pub struct BootstrapOptions { // Used by `deno serve` pub serve_port: Option, pub serve_host: Option, - // OpenTelemetry output options. If `None`, OpenTelemetry is disabled. - pub otel_config: Option, + pub otel_config: OtelConfig, + pub close_on_idle: bool, } impl Default for BootstrapOptions { @@ -155,7 +155,8 @@ impl Default for BootstrapOptions { mode: WorkerExecutionMode::None, serve_port: Default::default(), serve_host: Default::default(), - otel_config: None, + otel_config: Default::default(), + close_on_idle: false, } } } @@ -199,6 +200,8 @@ struct BootstrapV8<'a>( Option, // OTEL config Box<[u8]>, + // close on idle + bool, ); impl BootstrapOptions { @@ -225,11 +228,8 @@ impl BootstrapOptions { self.serve_host.as_deref(), serve_is_main, serve_worker_count, - if let Some(otel_config) = self.otel_config.as_ref() { - Box::new([otel_config.console as u8, otel_config.deterministic as u8]) - } else { - Box::new([]) - }, + self.otel_config.as_v8(), + self.close_on_idle, ); bootstrap.serialize(ser).unwrap() diff --git a/tests/Cargo.toml b/tests/Cargo.toml index ede509e38095b2..cff778b2de95cc 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -1,4 +1,4 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "cli_tests" @@ -45,10 +45,11 @@ deno_semver.workspace = true deno_terminal.workspace = true deno_tls.workspace = true fastwebsockets = { workspace = true, features = ["upgrade", "unstable-split"] } -file_test_runner = "0.7.2" +file_test_runner = "0.7.3" flaky_test = "=0.2.2" -hickory-client = "=0.24" -hickory-server = "=0.24" +hickory-client = "0.25.0-alpha.4" +hickory-proto = "0.25.0-alpha.4" +hickory-server = "0.25.0-alpha.4" http.workspace = true http-body-util.workspace = true hyper.workspace = true @@ -59,6 +60,7 @@ pretty_assertions.workspace = true regex.workspace = true reqwest.workspace = true serde.workspace = true +sys_traits = { workspace = true, features = ["real", "getrandom", "libc", "winapi"] } test_util.workspace = true tokio.workspace = true tower-lsp.workspace = true diff --git a/tests/ffi/Cargo.toml b/tests/ffi/Cargo.toml index a5d2883ef23b96..bae9aa6bb50510 100644 --- a/tests/ffi/Cargo.toml +++ b/tests/ffi/Cargo.toml @@ -1,4 +1,4 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "test_ffi" diff --git a/tests/ffi/src/lib.rs b/tests/ffi/src/lib.rs index 09c2afb3deb40d..ca416fb9801d1b 100644 --- a/tests/ffi/src/lib.rs +++ b/tests/ffi/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. #![allow(clippy::print_stdout)] #![allow(clippy::print_stderr)] diff --git a/tests/ffi/tests/bench.js b/tests/ffi/tests/bench.js index 2b4fbd55ba8384..c4b935398ae66a 100644 --- a/tests/ffi/tests/bench.js +++ b/tests/ffi/tests/bench.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file const targetDir = Deno.execPath().replace(/[^\/\\]+$/, ""); diff --git a/tests/ffi/tests/event_loop_integration.ts b/tests/ffi/tests/event_loop_integration.ts index e3914d9662d211..17c2d17f0b20f7 100644 --- a/tests/ffi/tests/event_loop_integration.ts +++ b/tests/ffi/tests/event_loop_integration.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-console diff --git a/tests/ffi/tests/ffi_callback_errors.ts b/tests/ffi/tests/ffi_callback_errors.ts index 797ff236c16969..3f165158b470f3 100644 --- a/tests/ffi/tests/ffi_callback_errors.ts +++ b/tests/ffi/tests/ffi_callback_errors.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-console diff --git a/tests/ffi/tests/ffi_types.ts b/tests/ffi/tests/ffi_types.ts index a996195c694621..0ae51c61fbf1d3 100644 --- a/tests/ffi/tests/ffi_types.ts +++ b/tests/ffi/tests/ffi_types.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file // Only for testing types. Invoke with `deno install --entrypoint` diff --git a/tests/ffi/tests/integration_tests.rs b/tests/ffi/tests/integration_tests.rs index dbc0036bc2fefb..7e92641ae55493 100644 --- a/tests/ffi/tests/integration_tests.rs +++ b/tests/ffi/tests/integration_tests.rs @@ -1,10 +1,11 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. #![allow(clippy::print_stdout)] #![allow(clippy::print_stderr)] -use pretty_assertions::assert_eq; use std::process::Command; + +use pretty_assertions::assert_eq; use test_util::deno_cmd; use test_util::deno_config_path; use test_util::ffi_tests_path; diff --git a/tests/ffi/tests/test.js b/tests/ffi/tests/test.js index 074db818822bbb..a93b648a2e8d73 100644 --- a/tests/ffi/tests/test.js +++ b/tests/ffi/tests/test.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file // Run using cargo test or `--v8-flags=--allow-natives-syntax` diff --git a/tests/ffi/tests/thread_safe_test.js b/tests/ffi/tests/thread_safe_test.js index fffa61a04fff59..519b0bd4fd2b5c 100644 --- a/tests/ffi/tests/thread_safe_test.js +++ b/tests/ffi/tests/thread_safe_test.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file const targetDir = Deno.execPath().replace(/[^\/\\]+$/, ""); diff --git a/tests/ffi/tests/thread_safe_test_worker.js b/tests/ffi/tests/thread_safe_test_worker.js index fc4854436ec29f..390b4d8a3f8638 100644 --- a/tests/ffi/tests/thread_safe_test_worker.js +++ b/tests/ffi/tests/thread_safe_test_worker.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file const targetDir = Deno.execPath().replace(/[^\/\\]+$/, ""); diff --git a/tests/integration/bench_tests.rs b/tests/integration/bench_tests.rs index d588f5b43797b4..b8d38a7f9164d6 100644 --- a/tests/integration/bench_tests.rs +++ b/tests/integration/bench_tests.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_core::serde_json::json; use deno_core::url::Url; @@ -43,7 +43,7 @@ fn conditionally_loads_type_graph() { .new_command() .args("bench --reload -L debug run/type_directives_js_main.js") .run(); - output.assert_matches_text("[WILDCARD] - FileFetcher::fetch_no_follow_with_options - specifier: file:///[WILDCARD]/subdir/type_reference.d.ts[WILDCARD]"); + output.assert_matches_text("[WILDCARD] - FileFetcher::fetch_no_follow - specifier: file:///[WILDCARD]/subdir/type_reference.d.ts[WILDCARD]"); let output = context .new_command() .args("bench --reload -L debug --no-check run/type_directives_js_main.js") diff --git a/tests/integration/cache_tests.rs b/tests/integration/cache_tests.rs index d9fb8e38e52aa7..3fbed3cbd46df4 100644 --- a/tests/integration/cache_tests.rs +++ b/tests/integration/cache_tests.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use test_util::TestContext; use test_util::TestContextBuilder; @@ -107,5 +107,5 @@ fn loads_type_graph() { .new_command() .args("cache --reload -L debug run/type_directives_js_main.js") .run(); - output.assert_matches_text("[WILDCARD] - FileFetcher::fetch_no_follow_with_options - specifier: file:///[WILDCARD]/subdir/type_reference.d.ts[WILDCARD]"); + output.assert_matches_text("[WILDCARD] - FileFetcher::fetch_no_follow - specifier: file:///[WILDCARD]/subdir/type_reference.d.ts[WILDCARD]"); } diff --git a/tests/integration/check_tests.rs b/tests/integration/check_tests.rs index 178ac6493f0cb5..15a2d96d04648c 100644 --- a/tests/integration/check_tests.rs +++ b/tests/integration/check_tests.rs @@ -1,25 +1,11 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_lockfile::NewLockfileOptions; use deno_semver::jsr::JsrDepPackageReq; use test_util as util; -use test_util::itest; use util::TestContext; use util::TestContextBuilder; -itest!(check_all { - args: "check --allow-import --quiet --all check/all/check_all.ts", - output: "check/all/check_all.out", - http_server: true, - exit_code: 1, -}); - -itest!(check_all_local { - args: "check --allow-import --quiet check/all/check_all.ts", - output_str: Some(""), - http_server: true, -}); - #[test] fn cache_switching_config_then_no_config() { let context = TestContext::default(); @@ -232,7 +218,7 @@ fn npm_module_check_then_error() { "npm:@denotest/breaking-change-between-versions", ) .unwrap(), - "1.0.0".to_string(), + "1.0.0".into(), ); lockfile_path.write(lockfile.as_json_string()); temp_dir.write( @@ -250,7 +236,7 @@ fn npm_module_check_then_error() { "npm:@denotest/breaking-change-between-versions", ) .unwrap(), - "2.0.0".to_string(), + "2.0.0".into(), ); lockfile_path.write(lockfile.as_json_string()); diff --git a/tests/integration/compile_tests.rs b/tests/integration/compile_tests.rs index fa6364a136414c..e61a1ed9eb1019 100644 --- a/tests/integration/compile_tests.rs +++ b/tests/integration/compile_tests.rs @@ -1,8 +1,7 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_core::serde_json; use test_util as util; -use util::assert_contains; use util::assert_not_contains; use util::testdata_path; use util::TestContext; @@ -90,78 +89,6 @@ fn standalone_args() { .assert_exit_code(0); } -#[test] -fn standalone_error() { - let context = TestContextBuilder::new().build(); - let dir = context.temp_dir(); - let exe = if cfg!(windows) { - dir.path().join("error.exe") - } else { - dir.path().join("error") - }; - context - .new_command() - .args_vec([ - "compile", - "--output", - &exe.to_string_lossy(), - "./compile/standalone_error.ts", - ]) - .run() - .skip_output_check() - .assert_exit_code(0); - - let output = context.new_command().name(&exe).split_output().run(); - output.assert_exit_code(1); - output.assert_stdout_matches_text(""); - let stderr = output.stderr(); - // On Windows, we cannot assert the file path (because '\'). - // Instead we just check for relevant output. - assert_contains!(stderr, "error: Uncaught (in promise) Error: boom!"); - assert_contains!(stderr, "\n at boom (file://"); - assert_contains!(stderr, "standalone_error.ts:2:9"); - assert_contains!(stderr, "at foo (file://"); - assert_contains!(stderr, "standalone_error.ts:5:3"); - assert_contains!(stderr, "standalone_error.ts:7:1"); -} - -#[test] -fn standalone_error_module_with_imports() { - let context = TestContextBuilder::new().build(); - let dir = context.temp_dir(); - let exe = if cfg!(windows) { - dir.path().join("error.exe") - } else { - dir.path().join("error") - }; - context - .new_command() - .args_vec([ - "compile", - "--output", - &exe.to_string_lossy(), - "./compile/standalone_error_module_with_imports_1.ts", - ]) - .run() - .skip_output_check() - .assert_exit_code(0); - - let output = context - .new_command() - .name(&exe) - .env("NO_COLOR", "1") - .split_output() - .run(); - output.assert_stdout_matches_text("hello\n"); - let stderr = output.stderr(); - // On Windows, we cannot assert the file path (because '\'). - // Instead we just check for relevant output. - assert_contains!(stderr, "error: Uncaught (in promise) Error: boom!"); - assert_contains!(stderr, "\n at file://"); - assert_contains!(stderr, "standalone_error_module_with_imports_2.ts:2:7"); - output.assert_exit_code(1); -} - #[test] fn standalone_load_datauri() { let context = TestContextBuilder::new().build(); @@ -846,21 +773,6 @@ testing[WILDCARD]this .assert_matches_text("2\n"); } -#[test] -fn compile_npm_file_system() { - run_npm_bin_compile_test(RunNpmBinCompileOptions { - input_specifier: "compile/npm_fs/main.ts", - copy_temp_dir: Some("compile/npm_fs"), - compile_args: vec!["-A"], - run_args: vec![], - output_file: "compile/npm_fs/main.out", - node_modules_local: true, - input_name: Some("binary"), - expected_name: "binary", - exit_code: 0, - }); -} - #[test] fn compile_npm_bin_esm() { run_npm_bin_compile_test(RunNpmBinCompileOptions { @@ -906,21 +818,6 @@ fn compile_npm_cowsay_main() { }); } -#[test] -fn compile_npm_vfs_implicit_read_permissions() { - run_npm_bin_compile_test(RunNpmBinCompileOptions { - input_specifier: "compile/vfs_implicit_read_permission/main.ts", - copy_temp_dir: Some("compile/vfs_implicit_read_permission"), - compile_args: vec![], - run_args: vec![], - output_file: "compile/vfs_implicit_read_permission/main.out", - node_modules_local: false, - input_name: Some("binary"), - expected_name: "binary", - exit_code: 0, - }); -} - #[test] fn compile_npm_no_permissions() { run_npm_bin_compile_test(RunNpmBinCompileOptions { @@ -1045,6 +942,7 @@ fn compile_node_modules_symlink_outside() { let symlink_target_dir = temp_dir.path().join("some_folder"); project_dir.join("node_modules").create_dir_all(); symlink_target_dir.create_dir_all(); + symlink_target_dir.join("file.txt").write("5"); let symlink_target_file = temp_dir.path().join("target.txt"); symlink_target_file.write("5"); let symlink_dir = project_dir.join("node_modules").join("symlink_dir"); @@ -1119,6 +1017,11 @@ Compile file:///[WILDCARD]/main.ts to [WILDCARD] Warning Failed resolving symlink. Ignoring. Path: [WILDCARD] Message: [WILDCARD]) + +Embedded Files + +[WILDCARD] + "#, ); diff --git a/tests/integration/coverage_tests.rs b/tests/integration/coverage_tests.rs index ab18ef76d3491d..ab09d542676f13 100644 --- a/tests/integration/coverage_tests.rs +++ b/tests/integration/coverage_tests.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_core::serde_json; use test_util as util; diff --git a/tests/integration/eval_tests.rs b/tests/integration/eval_tests.rs index 198be3a4e80de9..836cab900e7bdd 100644 --- a/tests/integration/eval_tests.rs +++ b/tests/integration/eval_tests.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use test_util as util; diff --git a/tests/integration/flags_tests.rs b/tests/integration/flags_tests.rs index 663da363da88a2..e819ea6c99852b 100644 --- a/tests/integration/flags_tests.rs +++ b/tests/integration/flags_tests.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use test_util as util; use util::assert_contains; @@ -24,7 +24,7 @@ fn help_output() { "Type-check the dependencies", "Compile the script into a self contained executable", "Print coverage reports", - "Genereate and show documentation for a module or built-ins", + "Generate and show documentation for a module or built-ins", "Format source files", "Show info about cache or info related to source file", "Deno kernel for Jupyter notebooks", diff --git a/tests/integration/fmt_tests.rs b/tests/integration/fmt_tests.rs index b890b3b72a1470..468c9cfbc829f6 100644 --- a/tests/integration/fmt_tests.rs +++ b/tests/integration/fmt_tests.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_core::serde_json::json; use test_util as util; @@ -61,6 +61,12 @@ fn fmt_test() { let badly_formatted_yaml = t.path().join("badly_formatted.yaml"); badly_formatted_original_yaml.copy(&badly_formatted_yaml); + let fixed_sql = testdata_fmt_dir.join("badly_formatted_fixed.sql"); + let badly_formatted_original_sql = + testdata_fmt_dir.join("badly_formatted.sql"); + let badly_formatted_sql = t.path().join("badly_formatted.sql"); + badly_formatted_original_sql.copy(&badly_formatted_sql); + // First, check formatting by ignoring the badly formatted file. let output = context .new_command() @@ -71,11 +77,12 @@ fn fmt_test() { "--unstable-html".to_string(), "--unstable-component".to_string(), "--unstable-yaml".to_string(), + "--unstable-sql".to_string(), format!( - "--ignore={badly_formatted_js},{badly_formatted_md},{badly_formatted_json},{badly_formatted_css},{badly_formatted_html},{badly_formatted_component},{badly_formatted_yaml},{badly_formatted_ipynb}", + "--ignore={badly_formatted_js},{badly_formatted_md},{badly_formatted_json},{badly_formatted_css},{badly_formatted_html},{badly_formatted_component},{badly_formatted_yaml},{badly_formatted_ipynb},{badly_formatted_sql}", ), format!( - "--check {badly_formatted_js} {badly_formatted_md} {badly_formatted_json} {badly_formatted_css} {badly_formatted_html} {badly_formatted_component} {badly_formatted_yaml} {badly_formatted_ipynb}", + "--check {badly_formatted_js} {badly_formatted_md} {badly_formatted_json} {badly_formatted_css} {badly_formatted_html} {badly_formatted_component} {badly_formatted_yaml} {badly_formatted_ipynb} {badly_formatted_sql}", ), ]) .run(); @@ -95,6 +102,7 @@ fn fmt_test() { "--unstable-html".to_string(), "--unstable-component".to_string(), "--unstable-yaml".to_string(), + "--unstable-sql".to_string(), badly_formatted_js.to_string(), badly_formatted_md.to_string(), badly_formatted_json.to_string(), @@ -103,6 +111,7 @@ fn fmt_test() { badly_formatted_component.to_string(), badly_formatted_yaml.to_string(), badly_formatted_ipynb.to_string(), + badly_formatted_sql.to_string(), ]) .run(); @@ -119,6 +128,7 @@ fn fmt_test() { "--unstable-html".to_string(), "--unstable-component".to_string(), "--unstable-yaml".to_string(), + "--unstable-sql".to_string(), badly_formatted_js.to_string(), badly_formatted_md.to_string(), badly_formatted_json.to_string(), @@ -127,6 +137,7 @@ fn fmt_test() { badly_formatted_component.to_string(), badly_formatted_yaml.to_string(), badly_formatted_ipynb.to_string(), + badly_formatted_sql.to_string(), ]) .run(); @@ -141,6 +152,7 @@ fn fmt_test() { let expected_component = fixed_component.read_to_string(); let expected_yaml = fixed_yaml.read_to_string(); let expected_ipynb = fixed_ipynb.read_to_string(); + let expected_sql = fixed_sql.read_to_string(); let actual_js = badly_formatted_js.read_to_string(); let actual_md = badly_formatted_md.read_to_string(); let actual_json = badly_formatted_json.read_to_string(); @@ -149,6 +161,7 @@ fn fmt_test() { let actual_component = badly_formatted_component.read_to_string(); let actual_yaml = badly_formatted_yaml.read_to_string(); let actual_ipynb = badly_formatted_ipynb.read_to_string(); + let actual_sql = badly_formatted_sql.read_to_string(); assert_eq!(expected_js, actual_js); assert_eq!(expected_md, actual_md); assert_eq!(expected_json, actual_json); @@ -157,6 +170,7 @@ fn fmt_test() { assert_eq!(expected_component, actual_component); assert_eq!(expected_yaml, actual_yaml); assert_eq!(expected_ipynb, actual_ipynb); + assert_eq!(expected_sql, actual_sql); } #[test] diff --git a/tests/integration/init_tests.rs b/tests/integration/init_tests.rs index a447e7bcefdcb7..5bbec687b02fc5 100644 --- a/tests/integration/init_tests.rs +++ b/tests/integration/init_tests.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use test_util as util; use util::assert_contains; diff --git a/tests/integration/inspector_tests.rs b/tests/integration/inspector_tests.rs index fa1b3a9d83671c..7c1be193a119c8 100644 --- a/tests/integration/inspector_tests.rs +++ b/tests/integration/inspector_tests.rs @@ -1,4 +1,8 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::io::BufRead; +use std::process::ChildStderr; +use std::time::Duration; use bytes::Bytes; use deno_core::anyhow::anyhow; @@ -6,7 +10,6 @@ use deno_core::error::AnyError; use deno_core::serde_json; use deno_core::serde_json::json; use deno_core::url; - use fastwebsockets::FragmentCollector; use fastwebsockets::Frame; use fastwebsockets::WebSocket; @@ -15,9 +18,6 @@ use hyper::upgrade::Upgraded; use hyper::Request; use hyper::Response; use hyper_util::rt::TokioIo; -use std::io::BufRead; -use std::process::ChildStderr; -use std::time::Duration; use test_util as util; use tokio::net::TcpStream; use tokio::time::timeout; diff --git a/tests/integration/install_tests.rs b/tests/integration/install_tests.rs index b0c1e44778d125..29a65a70b81b65 100644 --- a/tests/integration/install_tests.rs +++ b/tests/integration/install_tests.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use test_util as util; use test_util::assert_contains; diff --git a/tests/integration/js_unit_tests.rs b/tests/integration/js_unit_tests.rs index 577ca043ca6937..9ecec8b426c844 100644 --- a/tests/integration/js_unit_tests.rs +++ b/tests/integration/js_unit_tests.rs @@ -1,9 +1,10 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::io::BufRead; use std::io::BufReader; use std::time::Duration; use std::time::Instant; + use test_util as util; util::unit_test_factory!( @@ -52,6 +53,8 @@ util::unit_test_factory!( kv_queue_test, kv_queue_undelivered_test, link_test, + lint_selectors_test, + lint_plugin_test, make_temp_test, message_channel_test, mkdir_test, @@ -66,6 +69,7 @@ util::unit_test_factory!( process_test, progressevent_test, promise_hooks_test, + quic_test, read_dir_test, read_file_test, read_link_test, diff --git a/tests/integration/jsr_tests.rs b/tests/integration/jsr_tests.rs index c4812e6bfb3b8c..0902b7d0a2a186 100644 --- a/tests/integration/jsr_tests.rs +++ b/tests/integration/jsr_tests.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_cache_dir::HttpCache; use deno_core::serde_json; @@ -66,12 +66,11 @@ fn fast_check_cache() { // ensure cache works let output = check_debug_cmd.run(); assert_contains!(output.combined_output(), "Already type checked."); - let building_fast_check_msg = "Building fast check graph"; - assert_not_contains!(output.combined_output(), building_fast_check_msg); // now validated type_check_cache_path.remove_file(); let output = check_debug_cmd.run(); + let building_fast_check_msg = "Building fast check graph"; assert_contains!(output.combined_output(), building_fast_check_msg); assert_contains!( output.combined_output(), @@ -159,7 +158,7 @@ console.log(version);"#, .get_mut( &JsrDepPackageReq::from_str("jsr:@denotest/no-module-graph@0.1").unwrap(), ) - .unwrap() = "0.1.0".to_string(); + .unwrap() = "0.1.0".into(); lockfile_path.write(lockfile.as_json_string()); test_context @@ -191,8 +190,8 @@ fn reload_info_not_found_cache_but_exists_remote() { Url::parse(&format!("http://127.0.0.1:4250/{}/meta.json", package)) .unwrap(); let cache = deno_cache_dir::GlobalHttpCache::new( + sys_traits::impls::RealSys, deno_dir.path().join("remote").to_path_buf(), - deno_cache_dir::TestRealDenoCacheEnv, ); let entry = cache .get(&cache.cache_item_key(&specifier).unwrap(), None) diff --git a/tests/integration/jupyter_tests.rs b/tests/integration/jupyter_tests.rs index e99780a27647a8..4ef993c1573b95 100644 --- a/tests/integration/jupyter_tests.rs +++ b/tests/integration/jupyter_tests.rs @@ -1,15 +1,10 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::process::Output; use std::sync::Arc; use std::time::Duration; use bytes::Bytes; -use test_util::assertions::assert_json_subset; -use test_util::DenoChild; -use test_util::TestContext; -use test_util::TestContextBuilder; - use chrono::DateTime; use chrono::Utc; use deno_core::anyhow::Result; @@ -18,6 +13,10 @@ use deno_core::serde_json::json; use deno_core::serde_json::Value; use serde::Deserialize; use serde::Serialize; +use test_util::assertions::assert_json_subset; +use test_util::DenoChild; +use test_util::TestContext; +use test_util::TestContextBuilder; use tokio::sync::Mutex; use tokio::time::timeout; use uuid::Uuid; diff --git a/tests/integration/lsp_tests.rs b/tests/integration/lsp_tests.rs index a5b0ee24715acb..9efb34f337f669 100644 --- a/tests/integration/lsp_tests.rs +++ b/tests/integration/lsp_tests.rs @@ -1,4 +1,7 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::fs; +use std::str::FromStr; use deno_ast::ModuleSpecifier; use deno_core::serde::Deserialize; @@ -7,8 +10,6 @@ use deno_core::serde_json::json; use deno_core::serde_json::Value; use deno_core::url::Url; use pretty_assertions::assert_eq; -use std::fs; -use std::str::FromStr; use test_util::assert_starts_with; use test_util::assertions::assert_json_subset; use test_util::deno_cmd_with_deno_dir; @@ -1360,26 +1361,31 @@ fn lsp_deno_task() { let temp_dir = context.temp_dir(); temp_dir.write( "deno.jsonc", - r#"{ - "tasks": { - "build": "deno test" - } - }"#, + json!({ + "tasks": { + "build": "deno test", + "serve": { + "description": "Start the dev server", + "command": "deno run -RN server.ts", + }, + }, + }) + .to_string(), ); - let mut client = context.new_lsp_command().build(); - client.initialize(|builder| { - builder.set_config("./deno.jsonc"); - }); - - let res = client.write_request("deno/task", json!(null)); - + client.initialize_default(); + let res = client.write_request("deno/taskDefinitions", json!(null)); assert_eq!( res, json!([ { "name": "build", - "detail": "deno test", + "command": "deno test", + "sourceUri": temp_dir.url().join("deno.jsonc").unwrap(), + }, + { + "name": "serve", + "command": "deno run -RN server.ts", "sourceUri": temp_dir.url().join("deno.jsonc").unwrap(), } ]) @@ -2077,6 +2083,88 @@ fn lsp_inlay_hints_not_enabled() { client.shutdown(); } +#[test] +fn lsp_suggestion_actions_disabled() { + let context = TestContextBuilder::new().use_temp_cwd().build(); + let temp_dir = context.temp_dir(); + let mut client = context.new_lsp_command().build(); + client.initialize_default(); + client.change_configuration(json!({ + "deno": { + "enable": true, + "lint": false, + }, + "typescript": { + "suggestionActions": { + "enabled": false, + }, + }, + })); + client.read_diagnostics(); + let diagnostics = client.did_open(json!({ + "textDocument": { + "uri": temp_dir.url().join("file.ts").unwrap(), + "languageId": "typescript", + "version": 1, + "text": r#" + // The settings should disable the suggestion for this to be async. + function asyncLikeFunction() { + return new Promise((r) => r(null)).then((v) => v); + } + console.log(asyncLikeFunction); + + // Deprecated warnings should remain. + /** @deprecated */ + function deprecatedFunction() {} + console.log(deprecatedFunction); + + // Unused warnings should remain. + const unsusedVariable = 1; + "#, + }, + })); + assert_eq!( + json!(diagnostics.all()), + json!([ + { + "range": { + "start": { "line": 10, "character": 20 }, + "end": { "line": 10, "character": 38 }, + }, + "severity": 4, + "code": 6385, + "source": "deno-ts", + "message": "'deprecatedFunction' is deprecated.", + "relatedInformation": [ + { + "location": { + "uri": temp_dir.url().join("file.ts").unwrap(), + "range": { + "start": { "line": 8, "character": 12 }, + "end": { "line": 8, "character": 24 }, + }, + }, + "message": "The declaration was marked as deprecated here.", + }, + ], + "tags": [2], + }, + { + "range": { + "start": { "line": 13, "character": 14 }, + "end": { "line": 13, "character": 29 }, + }, + "severity": 4, + "code": 6133, + "source": "deno-ts", + "message": "'unsusedVariable' is declared but its value is never read.", + "tags": [1], + }, + ]), + ); + client.shutdown(); +} + #[test] fn lsp_workspace_disable_enable_paths() { fn run_test(use_trailing_slash: bool) { @@ -2696,7 +2784,7 @@ fn lsp_hover_dependency() { "uri": "file:///a/file.ts", "languageId": "typescript", "version": 1, - "text": "import * as a from \"http://127.0.0.1:4545/xTypeScriptTypes.js\";\n// @deno-types=\"http://127.0.0.1:4545/type_definitions/foo.d.ts\"\nimport * as b from \"http://127.0.0.1:4545/type_definitions/foo.js\";\nimport * as c from \"http://127.0.0.1:4545/subdir/type_reference.js\";\nimport * as d from \"http://127.0.0.1:4545/subdir/mod1.ts\";\nimport * as e from \"data:application/typescript;base64,ZXhwb3J0IGNvbnN0IGEgPSAiYSI7CgpleHBvcnQgZW51bSBBIHsKICBBLAogIEIsCiAgQywKfQo=\";\nimport * as f from \"./file_01.ts\";\nimport * as g from \"http://localhost:4545/x/a/mod.ts\";\nimport * as h from \"./mod🦕.ts\";\n\nconsole.log(a, b, c, d, e, f, g, h);\n" + "text": "import * as a from \"http://127.0.0.1:4545/xTypeScriptTypes.js\";\n// @ts-types=\"http://127.0.0.1:4545/type_definitions/foo.d.ts\"\nimport * as b from \"http://127.0.0.1:4545/type_definitions/foo.js\";\nimport * as c from \"http://127.0.0.1:4545/subdir/type_reference.js\";\nimport * as d from \"http://127.0.0.1:4545/subdir/mod1.ts\";\nimport * as e from \"data:application/typescript;base64,ZXhwb3J0IGNvbnN0IGEgPSAiYSI7CgpleHBvcnQgZW51bSBBIHsKICBBLAogIEIsCiAgQywKfQo=\";\nimport * as f from \"./file_01.ts\";\nimport * as g from \"http://localhost:4545/x/a/mod.ts\";\nimport * as h from \"./mod🦕.ts\";\n\nconsole.log(a, b, c, d, e, f, g, h);\n" } }), ); @@ -5427,7 +5515,8 @@ fn lsp_code_actions_deno_cache() { let res = client - .write_request( "textDocument/codeAction", + .write_request( + "textDocument/codeAction", json!({ "textDocument": { "uri": "file:///a/file.ts" @@ -5453,8 +5542,7 @@ fn lsp_code_actions_deno_cache() { "only": ["quickfix"] } }), - ) - ; + ); assert_eq!( res, json!([{ @@ -5979,6 +6067,119 @@ fn lsp_jsr_code_action_missing_declaration() { ); } +#[test] +fn lsp_jsr_code_action_move_to_new_file() { + let context = TestContextBuilder::new() + .use_http_server() + .use_temp_cwd() + .build(); + let temp_dir = context.temp_dir(); + let file = source_file( + temp_dir.path().join("file.ts"), + r#" + import { someFunction } from "jsr:@denotest/types-file"; + export const someValue = someFunction(); + "#, + ); + let mut client = context.new_lsp_command().build(); + client.initialize_default(); + client.write_request( + "workspace/executeCommand", + json!({ + "command": "deno.cache", + "arguments": [[], file.url()], + }), + ); + client.did_open_file(&file); + let list = client + .write_request_with_res_as::>( + "textDocument/codeAction", + json!({ + "textDocument": { "uri": file.url() }, + "range": { + "start": { "line": 2, "character": 19 }, + "end": { "line": 2, "character": 28 }, + }, + "context": { "diagnostics": [] }, + }), + ) + .unwrap(); + let action = list + .iter() + .find_map(|c| match c { + lsp::CodeActionOrCommand::CodeAction(a) + if &a.title == "Move to a new file" => + { + Some(a) + } + _ => None, + }) + .unwrap(); + let res = client.write_request("codeAction/resolve", json!(action)); + assert_eq!( + res, + json!({ + "title": "Move to a new file", + "kind": "refactor.move.newFile", + "edit": { + "documentChanges": [ + { + "textDocument": { "uri": file.url(), "version": 1 }, + "edits": [ + { + "range": { + "start": { "line": 1, "character": 6 }, + "end": { "line": 2, "character": 0 }, + }, + "newText": "", + }, + { + "range": { + "start": { "line": 2, "character": 0 }, + "end": { "line": 3, "character": 4 }, + }, + "newText": "", + }, + ], + }, + { + "kind": "create", + "uri": file.url().join("someValue.ts").unwrap(), + "options": { + "ignoreIfExists": true, + }, + }, + { + "textDocument": { + "uri": file.url().join("someValue.ts").unwrap(), + "version": null, + }, + "edits": [ + { + "range": { + "start": { "line": 0, "character": 0 }, + "end": { "line": 0, "character": 0 }, + }, + "newText": "import { someFunction } from \"jsr:@denotest/types-file\";\n\nexport const someValue = someFunction();\n", + }, + ], + }, + ], + }, + "isPreferred": false, + "data": { + "specifier": file.url(), + "range": { + "start": { "line": 2, "character": 19 }, + "end": { "line": 2, "character": 28 }, + }, + "refactorName": "Move to a new file", + "actionName": "Move to a new file", + }, + }), + ); +} + #[test] fn lsp_code_actions_deno_cache_npm() { let context = TestContextBuilder::new().use_temp_cwd().build(); @@ -6004,7 +6205,7 @@ fn lsp_code_actions_deno_cache_npm() { "severity": 1, "code": "not-installed-npm", "source": "deno", - "message": "NPM package \"chalk\" is not installed or doesn't exist.", + "message": "npm package \"chalk\" is not installed or doesn't exist.", "data": { "specifier": "npm:chalk" } }], "version": 1 @@ -6031,7 +6232,7 @@ fn lsp_code_actions_deno_cache_npm() { "severity": 1, "code": "not-installed-npm", "source": "deno", - "message": "NPM package \"chalk\" is not installed or doesn't exist.", + "message": "npm package \"chalk\" is not installed or doesn't exist.", "data": { "specifier": "npm:chalk" } }], "only": ["quickfix"] @@ -6051,7 +6252,7 @@ fn lsp_code_actions_deno_cache_npm() { "severity": 1, "code": "not-installed-npm", "source": "deno", - "message": "NPM package \"chalk\" is not installed or doesn't exist.", + "message": "npm package \"chalk\" is not installed or doesn't exist.", "data": { "specifier": "npm:chalk" } }], "command": { @@ -6106,7 +6307,7 @@ fn lsp_code_actions_deno_cache_all() { "severity": 1, "code": "not-installed-npm", "source": "deno", - "message": "NPM package \"chalk\" is not installed or doesn't exist.", + "message": "npm package \"chalk\" is not installed or doesn't exist.", "data": { "specifier": "npm:chalk" }, }, ], @@ -6194,7 +6395,7 @@ fn lsp_code_actions_deno_cache_all() { "severity": 1, "code": "not-installed-npm", "source": "deno", - "message": "NPM package \"chalk\" is not installed or doesn't exist.", + "message": "npm package \"chalk\" is not installed or doesn't exist.", "data": { "specifier": "npm:chalk" }, }, ], @@ -6264,7 +6465,7 @@ fn lsp_code_actions_deno_types_for_npm() { res, json!([ { - "title": "Add @deno-types directive for \"@types/react\"", + "title": "Add @ts-types directive for \"@types/react\"", "kind": "quickfix", "edit": { "changes": { @@ -6274,7 +6475,7 @@ fn lsp_code_actions_deno_types_for_npm() { "start": { "line": 0, "character": 0 }, "end": { "line": 0, "character": 0 }, }, - "newText": "// @deno-types=\"@types/react\"\n", + "newText": "// @ts-types=\"@types/react\"\n", }, ], }, @@ -6317,7 +6518,7 @@ fn lsp_code_actions_deno_types_for_npm() { res, json!([ { - "title": "Add @deno-types directive for \"npm:@types/react@^18.3.10\"", + "title": "Add @ts-types directive for \"npm:@types/react@^18.3.10\"", "kind": "quickfix", "edit": { "changes": { @@ -6327,7 +6528,7 @@ fn lsp_code_actions_deno_types_for_npm() { "start": { "line": 0, "character": 0 }, "end": { "line": 0, "character": 0 }, }, - "newText": "// @deno-types=\"npm:@types/react@^18.3.10\"\n", + "newText": "// @ts-types=\"npm:@types/react@^18.3.10\"\n", }, ], }, @@ -7873,6 +8074,73 @@ fn lsp_completions_auto_import() { client.shutdown(); } +#[test] +fn lsp_completions_auto_import_node_builtin() { + let context = TestContextBuilder::new() + .use_http_server() + .use_temp_cwd() + .build(); + let temp_dir = context.temp_dir(); + let mut client = context.new_lsp_command().build(); + client.initialize_default(); + client.did_open(json!({ + "textDocument": { + "uri": temp_dir.url().join("file.ts").unwrap(), + "languageId": "typescript", + "version": 1, + "text": r#" + import "npm:@types/node"; + pathToFileURL + "#, + } + })); + client.write_request( + "workspace/executeCommand", + json!({ + "command": "deno.cache", + "arguments": [[], temp_dir.url().join("file.ts").unwrap()], + }), + ); + let list = client.get_completion_list( + temp_dir.url().join("file.ts").unwrap(), + (2, 21), + json!({ "triggerKind": 2 }), + ); + assert!(!list.is_incomplete); + let item = list + .items + .iter() + .find(|item| item.label == "pathToFileURL") + .unwrap(); + let res = client.write_request("completionItem/resolve", json!(item)); + assert_eq!( + res, + json!({ + "label": "pathToFileURL", + "labelDetails": { + "description": "node:url", + }, + "kind": 3, + "detail": "function pathToFileURL(path: string, options?: PathToFileUrlOptions): URL", + "documentation": { + "kind": "markdown", + "value": "This function ensures that `path` is resolved absolutely, and that the URL\ncontrol characters are correctly encoded when converting into a File URL.\n\n```js\nimport { pathToFileURL } from 'node:url';\n\nnew URL('/foo#1', 'file:'); // Incorrect: file:///foo#1\npathToFileURL('/foo#1'); // Correct: file:///foo#1 (POSIX)\n\nnew URL('/some/path%.c', 'file:'); // Incorrect: file:///some/path%.c\npathToFileURL('/some/path%.c'); // Correct: file:///some/path%.c (POSIX)\n```\n\n*@since* - v10.12.0 \n\n*@param* - path The path to convert to a File URL. \n\n*@return* - The file URL object.", + }, + "sortText": "￿16_1", + "additionalTextEdits": [ + { + "range": { + "start": { "line": 2, "character": 0 }, + "end": { "line": 2, "character": 0 }, + }, + "newText": " import { pathToFileURL } from \"node:url\";\n", + }, + ], + }), + ); + client.shutdown(); +} + #[test] fn lsp_npm_completions_auto_import_and_quick_fix_no_import_map() { let context = TestContextBuilder::new() @@ -8305,7 +8573,7 @@ fn lsp_npm_auto_import_with_deno_types() { temp_dir.write( "other.ts", r#" - // @deno-types="@types/lz-string" + // @ts-types="@types/lz-string" import "lz-string"; "#, ); @@ -8353,7 +8621,7 @@ fn lsp_npm_auto_import_with_deno_types() { "start": { "line": 0, "character": 0 }, "end": { "line": 0, "character": 0 }, }, - "newText": "// @deno-types=\"@types/lz-string\"\nimport { compressToBase64 } from \"lz-string\";\n", + "newText": "// @ts-types=\"@types/lz-string\"\nimport { compressToBase64 } from \"lz-string\";\n", }, ], }), @@ -8386,7 +8654,7 @@ fn lsp_npm_auto_import_with_deno_types() { "start": { "line": 0, "character": 0 }, "end": { "line": 0, "character": 0 }, }, - "newText": "// @deno-types=\"@types/react\"\nimport { createRef } from \"react\";\n", + "newText": "// @ts-types=\"@types/react\"\nimport { createRef } from \"react\";\n", }, ], }), @@ -8445,6 +8713,7 @@ fn lsp_completions_node_specifier() { "node:http2", "node:https", "node:inspector", + "node:inspector/promises", "node:module", "node:net", "node:os", @@ -8455,9 +8724,9 @@ fn lsp_completions_node_specifier() { "node:process", "node:punycode", "node:querystring", - "node:repl", "node:readline", "node:readline/promises", + "node:repl", "node:stream", "node:stream/consumers", "node:stream/promises", @@ -9606,30 +9875,93 @@ fn lsp_completions_npm() { } #[test] -fn lsp_npm_specifier_unopened_file() { - let context = TestContextBuilder::new() - .use_http_server() - .use_temp_cwd() - .build(); - let temp_dir = context.temp_dir(); - // create other.ts, which re-exports an npm specifier - temp_dir.write( - "other.ts", - "export { default as chalk } from 'npm:chalk@5';", - ); +fn lsp_auto_imports_npm_auto() { + let context = TestContextBuilder::for_npm().use_temp_cwd().build(); + let temp_dir_path = context.temp_dir().path(); + temp_dir_path.join("deno.json").write_json(&json!({ + "nodeModulesDir": "auto", + "imports": { + "preact": "npm:preact@^10.19.6", + }, + })); + // add a file that uses the import so that typescript knows about it + temp_dir_path + .join("mod.ts") + .write("import { useEffect } from 'preact/hooks'; console.log(useEffect);"); + context.run_deno("cache mod.ts"); let mut client = context.new_lsp_command().build(); client.initialize_default(); - - // cache the other.ts file to the DENO_DIR - let deno = deno_cmd_with_deno_dir(client.deno_dir()) - .current_dir(temp_dir.path()) - .arg("cache") - .arg("--quiet") - .arg("other.ts") - .envs(env_vars_for_npm_tests()) - .piped_output() - .spawn() - .unwrap(); + let file_uri = temp_dir_path.join("file.ts").url_file(); + let mut diagnostics = client + .did_open(json!({ + "textDocument": { + "uri": file_uri, + "languageId": "typescript", + "version": 1, + "text": "useEffect", + } + })) + .all(); + assert_eq!(diagnostics.len(), 1); + let diagnostic = diagnostics.remove(0); + let res = client.write_request( + "textDocument/codeAction", + json!({ + "textDocument": { + "uri": file_uri, + }, + "range": { + "start": { "line": 0, "character": 0 }, + "end": { "line": 0, "character": 9 } + }, + "context": { + "diagnostics": [diagnostic], + "only": ["quickfix"] + } + }), + ); + assert_eq!( + res + .as_array() + .unwrap() + .first() + .unwrap() + .as_object() + .unwrap() + .get("title") + .unwrap() + .as_str() + .unwrap(), + "Add import from \"preact/hooks\"" + ); + client.shutdown(); +} + +#[test] +fn lsp_npm_specifier_unopened_file() { + let context = TestContextBuilder::new() + .use_http_server() + .use_temp_cwd() + .build(); + let temp_dir = context.temp_dir(); + // create other.ts, which re-exports an npm specifier + temp_dir.write( + "other.ts", + "export { default as chalk } from 'npm:chalk@5';", + ); + let mut client = context.new_lsp_command().build(); + client.initialize_default(); + + // cache the other.ts file to the DENO_DIR + let deno = deno_cmd_with_deno_dir(client.deno_dir()) + .current_dir(temp_dir.path()) + .arg("cache") + .arg("--quiet") + .arg("other.ts") + .envs(env_vars_for_npm_tests()) + .piped_output() + .spawn() + .unwrap(); let output = deno.wait_with_output().unwrap(); assert!(output.status.success()); assert_eq!(output.status.code(), Some(0)); @@ -9855,7 +10187,7 @@ fn lsp_completions_node_builtin() { "severity": 1, "code": "not-installed-npm", "source": "deno", - "message": "NPM package \"@types/node\" is not installed or doesn't exist." + "message": "npm package \"@types/node\" is not installed or doesn't exist." } ]) ); @@ -10158,7 +10490,7 @@ fn lsp_cache_location() { "uri": "file:///a/file.ts", "languageId": "typescript", "version": 1, - "text": "import * as a from \"http://127.0.0.1:4545/xTypeScriptTypes.js\";\n// @deno-types=\"http://127.0.0.1:4545/type_definitions/foo.d.ts\"\nimport * as b from \"http://127.0.0.1:4545/type_definitions/foo.js\";\nimport * as c from \"http://127.0.0.1:4545/subdir/type_reference.js\";\nimport * as d from \"http://127.0.0.1:4545/subdir/mod1.ts\";\nimport * as e from \"data:application/typescript;base64,ZXhwb3J0IGNvbnN0IGEgPSAiYSI7CgpleHBvcnQgZW51bSBBIHsKICBBLAogIEIsCiAgQywKfQo=\";\nimport * as f from \"./file_01.ts\";\nimport * as g from \"http://localhost:4545/x/a/mod.ts\";\n\nconsole.log(a, b, c, d, e, f, g);\n" + "text": "import * as a from \"http://127.0.0.1:4545/xTypeScriptTypes.js\";\n// @ts-types=\"http://127.0.0.1:4545/type_definitions/foo.d.ts\"\nimport * as b from \"http://127.0.0.1:4545/type_definitions/foo.js\";\nimport * as c from \"http://127.0.0.1:4545/subdir/type_reference.js\";\nimport * as d from \"http://127.0.0.1:4545/subdir/mod1.ts\";\nimport * as e from \"data:application/typescript;base64,ZXhwb3J0IGNvbnN0IGEgPSAiYSI7CgpleHBvcnQgZW51bSBBIHsKICBBLAogIEIsCiAgQywKfQo=\";\nimport * as f from \"./file_01.ts\";\nimport * as g from \"http://localhost:4545/x/a/mod.ts\";\n\nconsole.log(a, b, c, d, e, f, g);\n" } })); assert_eq!(diagnostics.all().len(), 6); @@ -10251,7 +10583,7 @@ fn lsp_tls_cert() { "uri": "file:///a/file.ts", "languageId": "typescript", "version": 1, - "text": "import * as a from \"https://localhost:5545/xTypeScriptTypes.js\";\n// @deno-types=\"https://localhost:5545/type_definitions/foo.d.ts\"\nimport * as b from \"https://localhost:5545/type_definitions/foo.js\";\nimport * as c from \"https://localhost:5545/subdir/type_reference.js\";\nimport * as d from \"https://localhost:5545/subdir/mod1.ts\";\nimport * as e from \"data:application/typescript;base64,ZXhwb3J0IGNvbnN0IGEgPSAiYSI7CgpleHBvcnQgZW51bSBBIHsKICBBLAogIEIsCiAgQywKfQo=\";\nimport * as f from \"./file_01.ts\";\nimport * as g from \"http://localhost:4545/x/a/mod.ts\";\n\nconsole.log(a, b, c, d, e, f, g);\n" + "text": "import * as a from \"https://localhost:5545/xTypeScriptTypes.js\";\n// @ts-types=\"https://localhost:5545/type_definitions/foo.d.ts\"\nimport * as b from \"https://localhost:5545/type_definitions/foo.js\";\nimport * as c from \"https://localhost:5545/subdir/type_reference.js\";\nimport * as d from \"https://localhost:5545/subdir/mod1.ts\";\nimport * as e from \"data:application/typescript;base64,ZXhwb3J0IGNvbnN0IGEgPSAiYSI7CgpleHBvcnQgZW51bSBBIHsKICBBLAogIEIsCiAgQywKfQo=\";\nimport * as f from \"./file_01.ts\";\nimport * as g from \"http://localhost:4545/x/a/mod.ts\";\n\nconsole.log(a, b, c, d, e, f, g);\n" } })); let diagnostics = diagnostics.all(); @@ -10716,7 +11048,7 @@ fn lsp_diagnostics_deno_types() { "uri": "file:///a/file.ts", "languageId": "typescript", "version": 1, - "text": "/// \n/// \n/// "); + let file = source_file(temp_dir.path().join("file.html"), " "); let mut client = context.new_lsp_command().build(); client.initialize_default(); let res = client.write_request( "textDocument/formatting", json!({ - "textDocument": { "uri": html_file.url() }, + "textDocument": { "uri": file.url() }, "options": { "tabSize": 2, "insertSpaces": true, @@ -11559,7 +11889,16 @@ fn lsp_format_html() { fn lsp_format_css() { let context = TestContextBuilder::new().use_temp_cwd().build(); let temp_dir = context.temp_dir(); - let css_file = source_file(temp_dir.path().join("file.css"), " foo {}"); + let css_file = source_file(temp_dir.path().join("file.css"), " foo {}\n"); + let scss_file = source_file(temp_dir.path().join("file.scss"), " $font-stack: Helvetica, sans-serif;\n\nbody {\n font: 100% $font-stack;\n}\n"); + let sass_file = source_file( + temp_dir.path().join("file.sass"), + " $font-stack: Helvetica, sans-serif\n\nbody\n font: 100% $font-stack\n", + ); + let less_file = source_file( + temp_dir.path().join("file.less"), + " @width: 10px;\n\n#header {\n width: @width;\n}\n", + ); let mut client = context.new_lsp_command().build(); client.initialize_default(); let res = client.write_request( @@ -11582,12 +11921,71 @@ fn lsp_format_css() { }, "newText": "", }, + ]), + ); + let res = client.write_request( + "textDocument/formatting", + json!({ + "textDocument": { "uri": scss_file.url() }, + "options": { + "tabSize": 2, + "insertSpaces": true, + }, + }), + ); + assert_eq!( + res, + json!([ { "range": { - "start": { "line": 0, "character": 8 }, - "end": { "line": 0, "character": 8 }, + "start": { "line": 0, "character": 0 }, + "end": { "line": 0, "character": 2 }, }, - "newText": "\n", + "newText": "", + }, + ]), + ); + let res = client.write_request( + "textDocument/formatting", + json!({ + "textDocument": { "uri": sass_file.url() }, + "options": { + "tabSize": 2, + "insertSpaces": true, + }, + }), + ); + assert_eq!( + res, + json!([ + { + "range": { + "start": { "line": 0, "character": 0 }, + "end": { "line": 0, "character": 2 }, + }, + "newText": "", + }, + ]), + ); + let res = client.write_request( + "textDocument/formatting", + json!({ + "textDocument": { "uri": less_file.url() }, + "options": { + "tabSize": 2, + "insertSpaces": true, + }, + }), + ); + assert_eq!( + res, + json!([ + { + "range": { + "start": { "line": 0, "character": 0 }, + "end": { "line": 0, "character": 2 }, + }, + "newText": "", }, ]), ); @@ -11598,13 +11996,13 @@ fn lsp_format_css() { fn lsp_format_yaml() { let context = TestContextBuilder::new().use_temp_cwd().build(); let temp_dir = context.temp_dir(); - let yaml_file = source_file(temp_dir.path().join("file.yaml"), " foo: 1"); + let file = source_file(temp_dir.path().join("file.yaml"), " foo: 1"); let mut client = context.new_lsp_command().build(); client.initialize_default(); let res = client.write_request( "textDocument/formatting", json!({ - "textDocument": { "uri": yaml_file.url() }, + "textDocument": { "uri": file.url() }, "options": { "tabSize": 2, "insertSpaces": true, @@ -11633,6 +12031,201 @@ fn lsp_format_yaml() { client.shutdown(); } +#[test] +fn lsp_format_sql() { + let context = TestContextBuilder::new().use_temp_cwd().build(); + let temp_dir = context.temp_dir(); + temp_dir.write( + "deno.json", + json!({ + "unstable": ["fmt-sql"], + }) + .to_string(), + ); + let file = source_file( + temp_dir.path().join("file.sql"), + " CREATE TABLE item (id int NOT NULL IDENTITY(1, 1))", + ); + let mut client = context.new_lsp_command().build(); + client.initialize_default(); + let res = client.write_request( + "textDocument/formatting", + json!({ + "textDocument": { "uri": file.url() }, + "options": { + "tabSize": 2, + "insertSpaces": true, + }, + }), + ); + assert_eq!( + res, + json!([ + { + "range": { + "start": { "line": 0, "character": 0 }, + "end": { "line": 0, "character": 2 }, + }, + "newText": "", + }, + { + "range": { + "start": { "line": 0, "character": 52 }, + "end": { "line": 0, "character": 52 }, + }, + "newText": "\n", + }, + ]), + ); + client.shutdown(); +} + +#[test] +fn lsp_format_component() { + let context = TestContextBuilder::new().use_temp_cwd().build(); + let temp_dir = context.temp_dir(); + temp_dir.write( + "deno.json", + json!({ + "unstable": ["fmt-component"], + }) + .to_string(), + ); + let svelte_file = source_file( + temp_dir.path().join("file.svelte"), + " \n", + ); + let vue_file = source_file( + temp_dir.path().join("file.vue"), + " \n", + ); + let astro_file = source_file( + temp_dir.path().join("file.astro"), + " ---\n// foo\n---\n\n", + ); + let vento_file = source_file( + temp_dir.path().join("file.vto"), + " {{ layout \"foo.vto\" }}\n

Foo!

\n{{ /layout }}\n", + ); + let nunjucks_file = source_file( + temp_dir.path().join("file.njk"), + " {% block header %}\n Foo\n{% endblock %}\n", + ); + let mut client = context.new_lsp_command().build(); + client.initialize_default(); + let res = client.write_request( + "textDocument/formatting", + json!({ + "textDocument": { "uri": svelte_file.url() }, + "options": { + "tabSize": 2, + "insertSpaces": true, + }, + }), + ); + assert_eq!( + res, + json!([ + { + "range": { + "start": { "line": 0, "character": 0 }, + "end": { "line": 0, "character": 2 }, + }, + "newText": "", + }, + ]), + ); + let res = client.write_request( + "textDocument/formatting", + json!({ + "textDocument": { "uri": vue_file.url() }, + "options": { + "tabSize": 2, + "insertSpaces": true, + }, + }), + ); + assert_eq!( + res, + json!([ + { + "range": { + "start": { "line": 0, "character": 0 }, + "end": { "line": 0, "character": 2 }, + }, + "newText": "", + }, + ]), + ); + let res = client.write_request( + "textDocument/formatting", + json!({ + "textDocument": { "uri": astro_file.url() }, + "options": { + "tabSize": 2, + "insertSpaces": true, + }, + }), + ); + assert_eq!( + res, + json!([ + { + "range": { + "start": { "line": 0, "character": 0 }, + "end": { "line": 0, "character": 2 }, + }, + "newText": "", + }, + ]), + ); + let res = client.write_request( + "textDocument/formatting", + json!({ + "textDocument": { "uri": vento_file.url() }, + "options": { + "tabSize": 2, + "insertSpaces": true, + }, + }), + ); + assert_eq!( + res, + json!([ + { + "range": { + "start": { "line": 0, "character": 0 }, + "end": { "line": 0, "character": 2 }, + }, + "newText": "", + }, + ]), + ); + let res = client.write_request( + "textDocument/formatting", + json!({ + "textDocument": { "uri": nunjucks_file.url() }, + "options": { + "tabSize": 2, + "insertSpaces": true, + }, + }), + ); + assert_eq!( + res, + json!([ + { + "range": { + "start": { "line": 0, "character": 0 }, + "end": { "line": 0, "character": 2 }, + }, + "newText": "", + }, + ]), + ); + client.shutdown(); +} + #[test] fn lsp_format_with_config() { let context = TestContextBuilder::new().use_temp_cwd().build(); @@ -11680,7 +12273,7 @@ fn lsp_format_with_config() { }, "options": { "tabSize": 2, - "insertSpaces": false + "insertSpaces": true, } }), ); @@ -15714,7 +16307,7 @@ fn lsp_sloppy_imports() { "import * as b from './b.js';\n", // this one's types resolve to a .d.ts file and we don't // bother warning about it because it's a bit complicated - // to explain to use @deno-types in a diagnostic + // to explain to use @ts-types in a diagnostic "import * as c from './c.js';\n", "console.log(a)\n", "console.log(b);\n", @@ -16516,3 +17109,47 @@ fn lsp_jsdoc_named_example() { }), ); } + +#[test] +fn lsp_wasm_module() { + let context = TestContextBuilder::new() + .use_temp_cwd() + .use_http_server() + .build(); + let mut client = context.new_lsp_command().build(); + client.initialize_default(); + client.did_open(json!({ + "textDocument": { + "uri": "file:///a/file.ts", + "languageId": "typescript", + "version": 1, + "text": "import { add } from \"http://localhost:4545/wasm/math.wasm\";\nadd(1, '');\n" + } + })); + + client.write_request( + "workspace/executeCommand", + json!({ + "command": "deno.cache", + "arguments": [[], "file:///a/file.ts"], + }), + ); + + let diagnostics = client.read_diagnostics(); + assert_eq!( + json!(diagnostics.all()), + json!([ + { + "range": { + "start": { "line": 1, "character": 7 }, + "end": { "line": 1, "character": 9 } + }, + "severity": 1, + "code": 2345, + "source": "deno-ts", + "message": "Argument of type 'string' is not assignable to parameter of type 'number'." + } + ]) + ); + client.shutdown(); +} diff --git a/tests/integration/mod.rs b/tests/integration/mod.rs index 37c7502284d057..a69bc6504211a1 100644 --- a/tests/integration/mod.rs +++ b/tests/integration/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. #![allow(clippy::print_stdout)] #![allow(clippy::print_stderr)] diff --git a/tests/integration/node_unit_tests.rs b/tests/integration/node_unit_tests.rs index 9cb1af94965082..ef76e365a45417 100644 --- a/tests/integration/node_unit_tests.rs +++ b/tests/integration/node_unit_tests.rs @@ -1,9 +1,10 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::io::BufRead; use std::io::BufReader; use std::time::Duration; use std::time::Instant; + use test_util as util; use test_util::itest; use util::deno_config_path; diff --git a/tests/integration/npm_tests.rs b/tests/integration/npm_tests.rs index f8c6eebf397abe..033d948b2ec39e 100644 --- a/tests/integration/npm_tests.rs +++ b/tests/integration/npm_tests.rs @@ -1,9 +1,8 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_core::serde_json; use deno_core::serde_json::json; use deno_core::serde_json::Value; - use pretty_assertions::assert_eq; use test_util as util; use test_util::itest; @@ -102,7 +101,7 @@ fn cached_only_after_first_run() { let stdout = String::from_utf8_lossy(&output.stdout); assert_contains!( stderr, - "An npm specifier not found in cache: \"ansi-styles\", --cached-only is specified." + "npm package not found in cache: \"ansi-styles\", --cached-only is specified." ); assert!(stdout.is_empty()); assert!(!output.status.success()); diff --git a/tests/integration/pm_tests.rs b/tests/integration/pm_tests.rs index e3db9006faa27a..e8985ebfb1dc4e 100644 --- a/tests/integration/pm_tests.rs +++ b/tests/integration/pm_tests.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use deno_core::serde_json::json; use test_util::assert_contains; diff --git a/tests/integration/publish_tests.rs b/tests/integration/publish_tests.rs index b97479e78e2a99..332b7c6fa6e1d3 100644 --- a/tests/integration/publish_tests.rs +++ b/tests/integration/publish_tests.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::process::Command; diff --git a/tests/integration/repl_tests.rs b/tests/integration/repl_tests.rs index 9eceb2f05d9efa..4faf629af5fca7 100644 --- a/tests/integration/repl_tests.rs +++ b/tests/integration/repl_tests.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use test_util as util; use test_util::assert_contains; diff --git a/tests/integration/run_tests.rs b/tests/integration/run_tests.rs index c97b700c5ddedc..ebb372418e6e36 100644 --- a/tests/integration/run_tests.rs +++ b/tests/integration/run_tests.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::io::BufReader; use std::io::Cursor; @@ -11,12 +11,12 @@ use std::sync::Arc; use bytes::Bytes; use deno_core::serde_json::json; use deno_core::url; - use deno_tls::rustls; use deno_tls::rustls::ClientConnection; use deno_tls::rustls_pemfile; use deno_tls::TlsStream; -use hickory_client::serialize::txt::Parser; +use hickory_proto::serialize::txt::Parser; +use hickory_server::authority::AuthorityObject; use pretty_assertions::assert_eq; use test_util as util; use test_util::itest; @@ -179,6 +179,7 @@ fn _090_run_permissions_request() { console.expect(concat!( "┏ ⚠️ Deno requests run access to \"ls\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-run\r\n", "┠─ Run again with --allow-run to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all run permissions)", @@ -189,6 +190,7 @@ fn _090_run_permissions_request() { console.expect(concat!( "┏ ⚠️ Deno requests run access to \"cat\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-run\r\n", "┠─ Run again with --allow-run to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all run permissions)", @@ -210,6 +212,7 @@ fn _090_run_permissions_request_sync() { console.expect(concat!( "┏ ⚠️ Deno requests run access to \"ls\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-run\r\n", "┠─ Run again with --allow-run to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all run permissions)", @@ -220,6 +223,7 @@ fn _090_run_permissions_request_sync() { console.expect(concat!( "┏ ⚠️ Deno requests run access to \"cat\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-run\r\n", "┠─ Run again with --allow-run to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all run permissions)", @@ -242,6 +246,7 @@ fn permissions_prompt_allow_all() { console.expect(concat!( "┏ ⚠️ Deno requests run access to \"FOO\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-run\r\n", "┠─ Run again with --allow-run to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all run permissions)", @@ -253,6 +258,7 @@ fn permissions_prompt_allow_all() { console.expect(concat!( "┏ ⚠️ Deno requests read access to \"FOO\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-read\r\n", "┠─ Run again with --allow-read to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all read permissions)", @@ -264,6 +270,7 @@ fn permissions_prompt_allow_all() { console.expect(concat!( "┏ ⚠️ Deno requests write access to \"FOO\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-write\r\n", "┠─ Run again with --allow-write to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all write permissions)", @@ -275,6 +282,7 @@ fn permissions_prompt_allow_all() { console.expect(concat!( "┏ ⚠️ Deno requests net access to \"foo\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-net\r\n", "┠─ Run again with --allow-net to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all net permissions)", @@ -286,6 +294,7 @@ fn permissions_prompt_allow_all() { console.expect(concat!( "┏ ⚠️ Deno requests env access to \"FOO\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-env\r\n", "┠─ Run again with --allow-env to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all env permissions)", @@ -297,6 +306,7 @@ fn permissions_prompt_allow_all() { console.expect(concat!( "┏ ⚠️ Deno requests sys access to \"loadavg\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-sys\r\n", "┠─ Run again with --allow-sys to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all sys permissions)", @@ -308,6 +318,7 @@ fn permissions_prompt_allow_all() { console.expect(concat!( "┏ ⚠️ Deno requests ffi access to \"FOO\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-ffi\r\n", "┠─ Run again with --allow-ffi to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all ffi permissions)", @@ -328,6 +339,7 @@ fn permissions_prompt_allow_all_2() { // "env" permissions console.expect(concat!( "┏ ⚠️ Deno requests env access to \"FOO\".\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-env\r\n", "┠─ Run again with --allow-env to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all env permissions)", @@ -340,6 +352,7 @@ fn permissions_prompt_allow_all_2() { console.expect(concat!( "┏ ⚠️ Deno requests sys access to \"loadavg\".\r\n", "┠─ Requested by `Deno.loadavg()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-sys\r\n", "┠─ Run again with --allow-sys to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all sys permissions)", @@ -352,6 +365,7 @@ fn permissions_prompt_allow_all_2() { console.expect(concat!( "┏ ⚠️ Deno requests read access to .\r\n", "┠─ Requested by `Deno.cwd()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-read\r\n", "┠─ Run again with --allow-read to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all read permissions)", @@ -372,6 +386,7 @@ fn permissions_prompt_allow_all_lowercase_a() { console.expect(concat!( "┏ ⚠️ Deno requests run access to \"FOO\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-run\r\n", "┠─ Run again with --allow-run to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all run permissions)", @@ -406,6 +421,7 @@ fn permissions_cache() { "prompt\r\n", "┏ ⚠️ Deno requests read access to \"foo\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-read\r\n", "┠─ Run again with --allow-read to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all read permissions)", @@ -418,6 +434,32 @@ fn permissions_cache() { }); } +#[test] +fn permissions_trace() { + TestContext::default() + .new_command() + .env("DENO_TRACE_PERMISSIONS", "1") + .args_vec(["run", "--quiet", "run/permissions_trace.ts"]) + .with_pty(|mut console| { + let text = console.read_until("Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all sys permissions)"); + test_util::assertions::assert_wildcard_match(&text, concat!( + "┏ ⚠️ Deno requests sys access to \"hostname\".\r\n", + "┠─ Requested by `Deno.hostname()` API.\r\n", + "┃ ├─ Object.hostname (ext:runtime/30_os.js:43:10)\r\n", + "┃ ├─ foo (file://[WILDCARD]/run/permissions_trace.ts:2:8)\r\n", + "┃ ├─ bar (file://[WILDCARD]/run/permissions_trace.ts:6:3)\r\n", + "┃ └─ file://[WILDCARD]/run/permissions_trace.ts:9:1\r\n", + "┠─ Learn more at: https://docs.deno.com/go/--allow-sys\r\n", + "┠─ Run again with --allow-sys to bypass this prompt.\r\n", + "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all sys permissions)", + )); + + console.human_delay(); + console.write_line_raw("y"); + console.expect("✅ Granted sys access to \"hostname\"."); + }); +} + itest!(lock_write_fetch { args: "run --quiet --allow-import --allow-read --allow-write --allow-env --allow-run run/lock_write_fetch/main.ts", @@ -879,7 +921,7 @@ fn type_directives_js_main() { .new_command() .args("run --reload -L debug --check run/type_directives_js_main.js") .run(); - output.assert_matches_text("[WILDCARD] - FileFetcher::fetch_no_follow_with_options - specifier: file:///[WILDCARD]/subdir/type_reference.d.ts[WILDCARD]"); + output.assert_matches_text("[WILDCARD] - FileFetcher::fetch_no_follow - specifier: file:///[WILDCARD]/subdir/type_reference.d.ts[WILDCARD]"); let output = context .new_command() .args("run --reload -L debug run/type_directives_js_main.js") @@ -1512,6 +1554,7 @@ mod permissions { console.expect(concat!( "┏ ⚠️ Deno requests read access to \"foo\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-read\r\n", "┠─ Run again with --allow-read to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all read permissions)", @@ -1521,6 +1564,7 @@ mod permissions { console.expect(concat!( "┏ ⚠️ Deno requests read access to \"bar\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-read\r\n", "┠─ Run again with --allow-read to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all read permissions)", @@ -1542,6 +1586,7 @@ mod permissions { console.expect(concat!( "┏ ⚠️ Deno requests read access to \"foo\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-read\r\n", "┠─ Run again with --allow-read to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all read permissions)", @@ -1551,6 +1596,7 @@ mod permissions { console.expect(concat!( "┏ ⚠️ Deno requests read access to \"bar\".\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-read\r\n", "┠─ Run again with --allow-read to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all read permissions)", @@ -1572,6 +1618,7 @@ mod permissions { console.expect(concat!( "┏ ⚠️ Deno requests read access.\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-read\r\n", "┠─ Run again with --allow-read to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all read permissions)", @@ -1596,6 +1643,7 @@ mod permissions { console.expect(concat!( "┏ ⚠️ Deno requests read access.\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-read\r\n", "┠─ Run again with --allow-read to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all read permissions)", @@ -1673,6 +1721,7 @@ fn issue9750() { console.expect(concat!( "┏ ⚠️ Deno requests env access.\r\n", "┠─ Requested by `Deno.permissions.request()` API.\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-env\r\n", "┠─ Run again with --allow-env to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all env permissions)", @@ -1682,6 +1731,7 @@ fn issue9750() { console.expect("Denied env access."); console.expect(concat!( "┏ ⚠️ Deno requests env access to \"SECRET\".\r\n", + "┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.\r\n", "┠─ Learn more at: https://docs.deno.com/go/--allow-env\r\n", "┠─ Run again with --allow-env to bypass this prompt.\r\n", "┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all env permissions)", @@ -2164,15 +2214,16 @@ fn basic_auth_tokens() { #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn test_resolve_dns() { + use std::net::SocketAddr; + use std::str::FromStr; + use std::sync::Arc; + use std::time::Duration; + use hickory_server::authority::Catalog; use hickory_server::authority::ZoneType; use hickory_server::proto::rr::Name; use hickory_server::store::in_memory::InMemoryAuthority; use hickory_server::ServerFuture; - use std::net::SocketAddr; - use std::str::FromStr; - use std::sync::Arc; - use std::time::Duration; use tokio::net::TcpListener; use tokio::net::UdpSocket; use tokio::sync::oneshot; @@ -2195,10 +2246,10 @@ async fn test_resolve_dns() { panic!("failed to parse: {:?}", records.err()) } let (origin, records) = records.unwrap(); - let authority = Box::new(Arc::new( + let authority: Vec> = vec![Arc::new( InMemoryAuthority::new(origin, records, ZoneType::Primary, false) .unwrap(), - )); + )]; let mut catalog: Catalog = Catalog::new(); catalog.upsert(Name::root().into(), authority); @@ -2723,7 +2774,7 @@ fn stdio_streams_are_locked_in_permission_prompt() { console.human_delay(); console.write_line_raw("y"); // We ensure that nothing gets written here between the permission prompt and this text, despire the delay - console.expect_raw_next(format!("y{newline}\x1b[5A\x1b[0J✅ Granted read access to \"")); + console.expect_raw_next(format!("y{newline}\x1b[6A\x1b[0J✅ Granted read access to \"")); // Back to spamming! console.expect(malicious_output); diff --git a/tests/integration/serve_tests.rs b/tests/integration/serve_tests.rs index f3c8a31d93727b..87719308475312 100644 --- a/tests/integration/serve_tests.rs +++ b/tests/integration/serve_tests.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::cell::RefCell; use std::collections::HashMap; diff --git a/tests/integration/shared_library_tests.rs b/tests/integration/shared_library_tests.rs index 4d33e6584e526b..d7cdf5b4262f3f 100644 --- a/tests/integration/shared_library_tests.rs +++ b/tests/integration/shared_library_tests.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. #[cfg(all(target_os = "linux", target_arch = "x86_64"))] #[test] diff --git a/tests/integration/task_tests.rs b/tests/integration/task_tests.rs index 56bab2970d051b..1db5376cddd87a 100644 --- a/tests/integration/task_tests.rs +++ b/tests/integration/task_tests.rs @@ -1,8 +1,11 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Most of the tests for this are in deno_task_shell. // These tests are intended to only test integration. +use test_util as util; +use util::TestContextBuilder; + // use test_util::env_vars_for_npm_tests; // use test_util::itest; // use test_util::TestContext; @@ -28,3 +31,59 @@ // exit_code: 1, // http_server: true, // }); + +#[test] +fn deno_task_ansi_escape_codes() { + let context = TestContextBuilder::default().use_temp_cwd().build(); + let temp_dir = context.temp_dir(); + temp_dir.write("deno.json", r#"{ + "tasks": { + "dev": "echo 'BOOO!!!'", + "next": "\u001b[3F\u001b[0G- dev\u001b[1E\u001b[2K echo 'I am your friend.'" + } +} +"#); + + context + .new_command() + .args_vec(["task"]) + .with_pty(|mut console| { + console.expect("Available tasks:"); + console.expect("- dev"); + console.expect(" echo 'BOOO!!!'"); + console.expect("- next"); + console.expect(" - dev echo 'I am your friend.'"); + }); +} + +#[test] +fn deno_task_control_chars() { + let context = TestContextBuilder::default().use_temp_cwd().build(); + let temp_dir = context.temp_dir(); + temp_dir.write( + "deno.json", + r#"{ + "tasks": { + "dev": "echo 'BOOO!!!' && \r echo hi there is my command", + "serve": { + "description": "this is a\tm\rangled description", + "command": "echo hello" + } + } +} +"#, + ); + + context + .new_command() + .args_vec(["task"]) + .with_pty(|mut console| { + console.expect("Available tasks:"); + console.expect("- dev"); + console + .expect(" echo 'BOOO!!!' && \\r echo hi there is my command"); + console.expect("- serve"); + console.expect(" // this is a\\tm\\rangled description"); + console.expect(" echo hello"); + }); +} diff --git a/tests/integration/test_tests.rs b/tests/integration/test_tests.rs index 64857ae1102fa8..cfa9d9f2d67c02 100644 --- a/tests/integration/test_tests.rs +++ b/tests/integration/test_tests.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use test_util as util; use util::assert_contains; @@ -111,7 +111,7 @@ fn conditionally_loads_type_graph() { .new_command() .args("test --reload -L debug run/type_directives_js_main.js") .run(); - output.assert_matches_text("[WILDCARD] - FileFetcher::fetch_no_follow_with_options - specifier: file:///[WILDCARD]/subdir/type_reference.d.ts[WILDCARD]"); + output.assert_matches_text("[WILDCARD] - FileFetcher::fetch_no_follow - specifier: file:///[WILDCARD]/subdir/type_reference.d.ts[WILDCARD]"); let output = context .new_command() .args("test --reload -L debug --no-check run/type_directives_js_main.js") diff --git a/tests/integration/upgrade_tests.rs b/tests/integration/upgrade_tests.rs index 5132b4ca5b38c9..7748f0ca1a7f89 100644 --- a/tests/integration/upgrade_tests.rs +++ b/tests/integration/upgrade_tests.rs @@ -1,8 +1,9 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::process::Command; use std::process::Stdio; use std::time::Instant; + use test_util as util; use test_util::assert_starts_with; use test_util::TestContext; diff --git a/tests/integration/watcher_tests.rs b/tests/integration/watcher_tests.rs index 055e46af9cf555..a180be2fb3bd38 100644 --- a/tests/integration/watcher_tests.rs +++ b/tests/integration/watcher_tests.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use flaky_test::flaky_test; use test_util as util; @@ -6,9 +6,8 @@ use test_util::assert_contains; use test_util::env_vars_for_npm_tests; use test_util::TempDir; use tokio::io::AsyncBufReadExt; -use util::DenoChild; - use util::assert_not_contains; +use util::DenoChild; /// Logs to stderr every time next_line() is called struct LoggingLines diff --git a/tests/lib.rs b/tests/lib.rs index 0a39b9f87d6908..d841ab9f3fb3d3 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -1 +1 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. diff --git a/tests/napi/Cargo.toml b/tests/napi/Cargo.toml index e3de2536830605..e8a39a0cda825e 100644 --- a/tests/napi/Cargo.toml +++ b/tests/napi/Cargo.toml @@ -1,4 +1,4 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "test_napi" diff --git a/tests/napi/array_test.js b/tests/napi/array_test.js index 572d3a8994dbf5..c72e5d38493e72 100644 --- a/tests/napi/array_test.js +++ b/tests/napi/array_test.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, loadTestLibrary } from "./common.js"; diff --git a/tests/napi/arraybuffer_test.js b/tests/napi/arraybuffer_test.js index f55b9a78c514a1..a11f76113087ac 100644 --- a/tests/napi/arraybuffer_test.js +++ b/tests/napi/arraybuffer_test.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, loadTestLibrary } from "./common.js"; diff --git a/tests/napi/async_test.js b/tests/napi/async_test.js index 4d9ad99c2694f2..f3d258a543535a 100644 --- a/tests/napi/async_test.js +++ b/tests/napi/async_test.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, loadTestLibrary } from "./common.js"; diff --git a/tests/napi/bigint_test.js b/tests/napi/bigint_test.js index 4a9ada20577ed1..19c5317d756256 100644 --- a/tests/napi/bigint_test.js +++ b/tests/napi/bigint_test.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, assertThrows, loadTestLibrary } from "./common.js"; diff --git a/tests/napi/build.rs b/tests/napi/build.rs index c2fe86a5315a17..73fce9172a617d 100644 --- a/tests/napi/build.rs +++ b/tests/napi/build.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. extern crate napi_build; diff --git a/tests/napi/callback_test.js b/tests/napi/callback_test.js index c132fefa183720..3c56b11a28907a 100644 --- a/tests/napi/callback_test.js +++ b/tests/napi/callback_test.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, assertThrows, loadTestLibrary } from "./common.js"; diff --git a/tests/napi/cleanup_hook_test.js b/tests/napi/cleanup_hook_test.js index 2c1f73e12b9c05..8e4430eef75074 100644 --- a/tests/napi/cleanup_hook_test.js +++ b/tests/napi/cleanup_hook_test.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-console diff --git a/tests/napi/coerce_test.js b/tests/napi/coerce_test.js index 64f0148016113b..91e8950980ce26 100644 --- a/tests/napi/coerce_test.js +++ b/tests/napi/coerce_test.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, loadTestLibrary } from "./common.js"; diff --git a/tests/napi/common.js b/tests/napi/common.js index 6dfdc873a862e7..7df63c4f90be65 100644 --- a/tests/napi/common.js +++ b/tests/napi/common.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. export { assert, assertEquals, assertRejects, assertThrows } from "@std/assert"; export { fromFileUrl } from "@std/path"; diff --git a/tests/napi/date_test.js b/tests/napi/date_test.js index 49eec5cca17e00..2625010494c537 100644 --- a/tests/napi/date_test.js +++ b/tests/napi/date_test.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, loadTestLibrary } from "./common.js"; diff --git a/tests/napi/env_test.js b/tests/napi/env_test.js index 72b868a6682c4f..0b9fad314b47b3 100644 --- a/tests/napi/env_test.js +++ b/tests/napi/env_test.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, loadTestLibrary } from "./common.js"; diff --git a/tests/napi/error_test.js b/tests/napi/error_test.js index 57acde5c16bd3b..cab36b0a307e8b 100644 --- a/tests/napi/error_test.js +++ b/tests/napi/error_test.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, diff --git a/tests/napi/init_test.js b/tests/napi/init_test.js index 9486824780de3b..8cd5298dde5a1b 100644 --- a/tests/napi/init_test.js +++ b/tests/napi/init_test.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { Buffer } from "node:buffer"; import { assert, libSuffix } from "./common.js"; diff --git a/tests/napi/make_callback_test.js b/tests/napi/make_callback_test.js index b1f7912aea5288..60aa5ae4c774a7 100644 --- a/tests/napi/make_callback_test.js +++ b/tests/napi/make_callback_test.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, loadTestLibrary } from "./common.js"; diff --git a/tests/napi/mem_test.js b/tests/napi/mem_test.js index bee8c194ea6538..2c8b0be75ad479 100644 --- a/tests/napi/mem_test.js +++ b/tests/napi/mem_test.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, loadTestLibrary } from "./common.js"; diff --git a/tests/napi/module.c b/tests/napi/module.c index 1ae2ace5d36aad..9eb90887a8ab8e 100644 --- a/tests/napi/module.c +++ b/tests/napi/module.c @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. typedef struct napi_module { int nm_version; diff --git a/tests/napi/numbers_test.js b/tests/napi/numbers_test.js index 8a99c831d06e43..4914a247515d48 100644 --- a/tests/napi/numbers_test.js +++ b/tests/napi/numbers_test.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, loadTestLibrary } from "./common.js"; diff --git a/tests/napi/object_test.js b/tests/napi/object_test.js index 6226b0138ccba3..5ab81359c4a1cf 100644 --- a/tests/napi/object_test.js +++ b/tests/napi/object_test.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, diff --git a/tests/napi/object_wrap_test.js b/tests/napi/object_wrap_test.js index ee6d4af86b2f84..7c7eecbbd48814 100644 --- a/tests/napi/object_wrap_test.js +++ b/tests/napi/object_wrap_test.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { Buffer } from "node:buffer"; import { assert, assertEquals, loadTestLibrary } from "./common.js"; diff --git a/tests/napi/promise_test.js b/tests/napi/promise_test.js index e4bbfee6b800bd..3b9ba15b674b0a 100644 --- a/tests/napi/promise_test.js +++ b/tests/napi/promise_test.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, assertRejects, loadTestLibrary } from "./common.js"; diff --git a/tests/napi/properties_test.js b/tests/napi/properties_test.js index 21a3555e8e558f..ee86eaa19b5a02 100644 --- a/tests/napi/properties_test.js +++ b/tests/napi/properties_test.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, loadTestLibrary } from "./common.js"; diff --git a/tests/napi/src/array.rs b/tests/napi/src/array.rs index 6df420eb57f983..b2aba94fff0165 100644 --- a/tests/napi/src/array.rs +++ b/tests/napi/src/array.rs @@ -1,12 +1,14 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::ptr; -use crate::assert_napi_ok; -use crate::napi_get_callback_info; -use crate::napi_new_property; use napi_sys::ValueType::napi_number; use napi_sys::ValueType::napi_object; use napi_sys::*; -use std::ptr; + +use crate::assert_napi_ok; +use crate::napi_get_callback_info; +use crate::napi_new_property; extern "C" fn test_array_new( env: napi_env, diff --git a/tests/napi/src/arraybuffer.rs b/tests/napi/src/arraybuffer.rs index 8402f5d861b0a1..0fe39b53ccf7d3 100644 --- a/tests/napi/src/arraybuffer.rs +++ b/tests/napi/src/arraybuffer.rs @@ -1,9 +1,10 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use napi_sys::*; use crate::assert_napi_ok; use crate::napi_get_callback_info; use crate::napi_new_property; -use napi_sys::*; extern "C" fn test_detached( env: napi_env, diff --git a/tests/napi/src/async.rs b/tests/napi/src/async.rs index 367d2e9ef02c8e..a91f7037b22dbb 100644 --- a/tests/napi/src/async.rs +++ b/tests/napi/src/async.rs @@ -1,15 +1,17 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::assert_napi_ok; -use crate::napi_get_callback_info; -use crate::napi_new_property; -use napi_sys::Status::napi_ok; -use napi_sys::ValueType::napi_function; -use napi_sys::*; use std::os::raw::c_char; use std::os::raw::c_void; use std::ptr; +use napi_sys::Status::napi_ok; +use napi_sys::ValueType::napi_function; +use napi_sys::*; + +use crate::assert_napi_ok; +use crate::napi_get_callback_info; +use crate::napi_new_property; + pub struct Baton { called: bool, func: napi_ref, diff --git a/tests/napi/src/bigint.rs b/tests/napi/src/bigint.rs index d8678233134e90..6e1d728b32f9be 100644 --- a/tests/napi/src/bigint.rs +++ b/tests/napi/src/bigint.rs @@ -1,13 +1,15 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::ptr; + +use napi_sys::Status::napi_pending_exception; +use napi_sys::ValueType::napi_bigint; +use napi_sys::*; use crate::assert_napi_ok; use crate::cstr; use crate::napi_get_callback_info; use crate::napi_new_property; -use napi_sys::Status::napi_pending_exception; -use napi_sys::ValueType::napi_bigint; -use napi_sys::*; -use std::ptr; extern "C" fn is_lossless( env: napi_env, diff --git a/tests/napi/src/callback.rs b/tests/napi/src/callback.rs index 2512f6a38f0527..1ce1d688c28fe1 100644 --- a/tests/napi/src/callback.rs +++ b/tests/napi/src/callback.rs @@ -1,15 +1,17 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::ptr; -use crate::assert_napi_ok; -use crate::napi_get_callback_info; -use crate::napi_new_property; use napi_sys::ValueType::napi_function; use napi_sys::ValueType::napi_object; use napi_sys::ValueType::napi_undefined; use napi_sys::*; -use std::ptr; use Status::napi_pending_exception; +use crate::assert_napi_ok; +use crate::napi_get_callback_info; +use crate::napi_new_property; + /// `test_callback_run((a, b) => a + b, [1, 2])` => 3 extern "C" fn test_callback_run( env: napi_env, diff --git a/tests/napi/src/coerce.rs b/tests/napi/src/coerce.rs index a4057838438f5b..e0fa50c89e044a 100644 --- a/tests/napi/src/coerce.rs +++ b/tests/napi/src/coerce.rs @@ -1,10 +1,12 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::ptr; + +use napi_sys::*; use crate::assert_napi_ok; use crate::napi_get_callback_info; use crate::napi_new_property; -use napi_sys::*; -use std::ptr; extern "C" fn test_coerce_bool( env: napi_env, diff --git a/tests/napi/src/date.rs b/tests/napi/src/date.rs index 4d3c155c32e9dc..1db5bd088ba3d2 100644 --- a/tests/napi/src/date.rs +++ b/tests/napi/src/date.rs @@ -1,11 +1,13 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::ptr; + +use napi_sys::ValueType::napi_number; +use napi_sys::*; use crate::assert_napi_ok; use crate::napi_get_callback_info; use crate::napi_new_property; -use napi_sys::ValueType::napi_number; -use napi_sys::*; -use std::ptr; extern "C" fn create_date( env: napi_env, diff --git a/tests/napi/src/env.rs b/tests/napi/src/env.rs index ebc6532a3c651c..b1b56191ec9f3a 100644 --- a/tests/napi/src/env.rs +++ b/tests/napi/src/env.rs @@ -1,9 +1,10 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use napi_sys::*; use crate::assert_napi_ok; use crate::napi_get_callback_info; use crate::napi_new_property; -use napi_sys::*; extern "C" fn get_node_global( env: napi_env, diff --git a/tests/napi/src/error.rs b/tests/napi/src/error.rs index e0d79c836abf36..6de0d529b24b71 100644 --- a/tests/napi/src/error.rs +++ b/tests/napi/src/error.rs @@ -1,11 +1,13 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::ptr; + +use napi_sys::*; use crate::assert_napi_ok; use crate::cstr; use crate::napi_get_callback_info; use crate::napi_new_property; -use napi_sys::*; -use std::ptr; extern "C" fn check_error( env: napi_env, diff --git a/tests/napi/src/finalizer.rs b/tests/napi/src/finalizer.rs index 9769e775e247c4..56e0a326a712c3 100644 --- a/tests/napi/src/finalizer.rs +++ b/tests/napi/src/finalizer.rs @@ -1,11 +1,13 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::ptr; + +use napi_sys::ValueType::napi_object; +use napi_sys::*; use crate::assert_napi_ok; use crate::napi_get_callback_info; use crate::napi_new_property; -use napi_sys::ValueType::napi_object; -use napi_sys::*; -use std::ptr; unsafe extern "C" fn finalize_cb( _env: napi_env, diff --git a/tests/napi/src/lib.rs b/tests/napi/src/lib.rs index 8c6190ad3e7c2d..6162feded6284f 100644 --- a/tests/napi/src/lib.rs +++ b/tests/napi/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. #![allow(clippy::all)] #![allow(clippy::print_stdout)] diff --git a/tests/napi/src/make_callback.rs b/tests/napi/src/make_callback.rs index 945df3452324bb..c19d34e50c303f 100644 --- a/tests/napi/src/make_callback.rs +++ b/tests/napi/src/make_callback.rs @@ -1,10 +1,12 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::ptr; -use crate::assert_napi_ok; -use crate::cstr; use napi_sys::ValueType::napi_function; use napi_sys::*; -use std::ptr; + +use crate::assert_napi_ok; +use crate::cstr; extern "C" fn make_callback( env: napi_env, diff --git a/tests/napi/src/mem.rs b/tests/napi/src/mem.rs index ebb6a5c7acbe2d..a05cd3abf46089 100644 --- a/tests/napi/src/mem.rs +++ b/tests/napi/src/mem.rs @@ -1,9 +1,11 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::ptr; + +use napi_sys::*; use crate::assert_napi_ok; use crate::napi_new_property; -use napi_sys::*; -use std::ptr; extern "C" fn adjust_external_memory( env: napi_env, diff --git a/tests/napi/src/numbers.rs b/tests/napi/src/numbers.rs index 777ccbfac7e708..9c4174f7278654 100644 --- a/tests/napi/src/numbers.rs +++ b/tests/napi/src/numbers.rs @@ -1,11 +1,13 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::ptr; + +use napi_sys::ValueType::napi_number; +use napi_sys::*; use crate::assert_napi_ok; use crate::napi_get_callback_info; use crate::napi_new_property; -use napi_sys::ValueType::napi_number; -use napi_sys::*; -use std::ptr; extern "C" fn test_int32( env: napi_env, diff --git a/tests/napi/src/object.rs b/tests/napi/src/object.rs index 9876f4dae0d8fa..9014134803eacd 100644 --- a/tests/napi/src/object.rs +++ b/tests/napi/src/object.rs @@ -1,10 +1,12 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::ptr; + +use napi_sys::*; use crate::assert_napi_ok; use crate::napi_get_callback_info; use crate::napi_new_property; -use napi_sys::*; -use std::ptr; extern "C" fn test_object_new( env: napi_env, diff --git a/tests/napi/src/object_wrap.rs b/tests/napi/src/object_wrap.rs index 63e9e2e23202cc..11844917b5a951 100644 --- a/tests/napi/src/object_wrap.rs +++ b/tests/napi/src/object_wrap.rs @@ -1,16 +1,18 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::assert_napi_ok; -use crate::napi_get_callback_info; -use crate::napi_new_property; -use napi_sys::ValueType::napi_number; -use napi_sys::*; use std::cell::RefCell; use std::collections::HashMap; use std::os::raw::c_char; use std::os::raw::c_void; use std::ptr; +use napi_sys::ValueType::napi_number; +use napi_sys::*; + +use crate::assert_napi_ok; +use crate::napi_get_callback_info; +use crate::napi_new_property; + pub struct NapiObject { counter: i32, } diff --git a/tests/napi/src/primitives.rs b/tests/napi/src/primitives.rs index 28fb8ec3db6310..7717a0aaac167f 100644 --- a/tests/napi/src/primitives.rs +++ b/tests/napi/src/primitives.rs @@ -1,9 +1,11 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::ptr; + +use napi_sys::*; use crate::assert_napi_ok; use crate::napi_new_property; -use napi_sys::*; -use std::ptr; extern "C" fn test_get_undefined( env: napi_env, diff --git a/tests/napi/src/promise.rs b/tests/napi/src/promise.rs index 1f1c31f1eb5960..eab379d617e00a 100644 --- a/tests/napi/src/promise.rs +++ b/tests/napi/src/promise.rs @@ -1,11 +1,13 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::ptr; +use std::ptr::addr_of_mut; + +use napi_sys::*; use crate::assert_napi_ok; use crate::napi_get_callback_info; use crate::napi_new_property; -use napi_sys::*; -use std::ptr; -use std::ptr::addr_of_mut; static mut CURRENT_DEFERRED: napi_deferred = ptr::null_mut(); diff --git a/tests/napi/src/properties.rs b/tests/napi/src/properties.rs index 43bef1949a48e9..4244c7ba06b36b 100644 --- a/tests/napi/src/properties.rs +++ b/tests/napi/src/properties.rs @@ -1,10 +1,12 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::ptr; -use crate::assert_napi_ok; -use crate::cstr; use napi_sys::PropertyAttributes::*; use napi_sys::*; -use std::ptr; + +use crate::assert_napi_ok; +use crate::cstr; static NICE: i64 = 69; diff --git a/tests/napi/src/strings.rs b/tests/napi/src/strings.rs index 301ab23df2b432..027ae681769a4e 100644 --- a/tests/napi/src/strings.rs +++ b/tests/napi/src/strings.rs @@ -1,10 +1,11 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use napi_sys::ValueType::napi_string; +use napi_sys::*; use crate::assert_napi_ok; use crate::napi_get_callback_info; use crate::napi_new_property; -use napi_sys::ValueType::napi_string; -use napi_sys::*; extern "C" fn test_utf8(env: napi_env, info: napi_callback_info) -> napi_value { let (args, argc, _) = napi_get_callback_info!(env, info, 1); diff --git a/tests/napi/src/symbol.rs b/tests/napi/src/symbol.rs index 6387d449f13c39..30c7cbde64eed1 100644 --- a/tests/napi/src/symbol.rs +++ b/tests/napi/src/symbol.rs @@ -1,10 +1,11 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use napi_sys::ValueType::napi_string; +use napi_sys::*; use crate::assert_napi_ok; use crate::napi_get_callback_info; use crate::napi_new_property; -use napi_sys::ValueType::napi_string; -use napi_sys::*; extern "C" fn symbol_new( env: napi_env, diff --git a/tests/napi/src/tsfn.rs b/tests/napi/src/tsfn.rs index a3a231cec19c12..830145501dd260 100644 --- a/tests/napi/src/tsfn.rs +++ b/tests/napi/src/tsfn.rs @@ -1,13 +1,14 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // This test performs initialization similar to napi-rs. // https://github.com/napi-rs/napi-rs/commit/a5a04a4e545f268769cc78e2bd6c45af4336aac3 -use napi_sys as sys; use std::ffi::c_char; use std::ffi::c_void; use std::ptr; +use napi_sys as sys; + macro_rules! check_status_or_panic { ($code:expr, $msg:expr) => {{ let c = $code; diff --git a/tests/napi/src/typedarray.rs b/tests/napi/src/typedarray.rs index b512bd32fe71a2..95adf957e45ec1 100644 --- a/tests/napi/src/typedarray.rs +++ b/tests/napi/src/typedarray.rs @@ -1,16 +1,18 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::assert_napi_ok; -use crate::napi_get_callback_info; -use crate::napi_new_property; use core::ffi::c_void; +use std::os::raw::c_char; +use std::ptr; + use napi_sys::Status::napi_ok; use napi_sys::TypedarrayType; use napi_sys::ValueType::napi_number; use napi_sys::ValueType::napi_object; use napi_sys::*; -use std::os::raw::c_char; -use std::ptr; + +use crate::assert_napi_ok; +use crate::napi_get_callback_info; +use crate::napi_new_property; extern "C" fn test_multiply( env: napi_env, diff --git a/tests/napi/src/uv.rs b/tests/napi/src/uv.rs index 555470c008c461..45ca114adc6842 100644 --- a/tests/napi/src/uv.rs +++ b/tests/napi/src/uv.rs @@ -1,8 +1,11 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::mem::MaybeUninit; +use std::ptr; +use std::ptr::addr_of_mut; +use std::ptr::null_mut; +use std::time::Duration; -use crate::assert_napi_ok; -use crate::napi_get_callback_info; -use crate::napi_new_property; use libuv_sys_lite::uv_async_init; use libuv_sys_lite::uv_async_t; use libuv_sys_lite::uv_close; @@ -12,11 +15,10 @@ use libuv_sys_lite::uv_mutex_lock; use libuv_sys_lite::uv_mutex_t; use libuv_sys_lite::uv_mutex_unlock; use napi_sys::*; -use std::mem::MaybeUninit; -use std::ptr; -use std::ptr::addr_of_mut; -use std::ptr::null_mut; -use std::time::Duration; + +use crate::assert_napi_ok; +use crate::napi_get_callback_info; +use crate::napi_new_property; struct KeepAlive { tsfn: napi_threadsafe_function, diff --git a/tests/napi/strings_test.js b/tests/napi/strings_test.js index 45cb133b287b6c..01fc873a7412d9 100644 --- a/tests/napi/strings_test.js +++ b/tests/napi/strings_test.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, loadTestLibrary } from "./common.js"; diff --git a/tests/napi/symbol_test.js b/tests/napi/symbol_test.js index d8edec02326c53..3f0f2776470ef4 100644 --- a/tests/napi/symbol_test.js +++ b/tests/napi/symbol_test.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, loadTestLibrary } from "./common.js"; diff --git a/tests/napi/tests/napi_tests.rs b/tests/napi/tests/napi_tests.rs index 53d4258f932f19..f97fdce2894062 100644 --- a/tests/napi/tests/napi_tests.rs +++ b/tests/napi/tests/napi_tests.rs @@ -1,9 +1,10 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. #![allow(clippy::print_stdout)] #![allow(clippy::print_stderr)] use std::process::Command; + use test_util::deno_cmd; use test_util::deno_config_path; use test_util::env_vars_for_npm_tests; diff --git a/tests/napi/typedarray_test.js b/tests/napi/typedarray_test.js index 25729754a558d2..f7887e4b1c8ba5 100644 --- a/tests/napi/typedarray_test.js +++ b/tests/napi/typedarray_test.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, loadTestLibrary } from "./common.js"; diff --git a/tests/napi/uv_test.js b/tests/napi/uv_test.js index af20b264931f7a..f0ff613f314d9a 100644 --- a/tests/napi/uv_test.js +++ b/tests/napi/uv_test.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, loadTestLibrary } from "./common.js"; diff --git a/tests/node_compat/common.ts b/tests/node_compat/common.ts index 9f56744fa7462b..a86373d69fd550 100644 --- a/tests/node_compat/common.ts +++ b/tests/node_compat/common.ts @@ -1,7 +1,10 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { partition } from "@std/collections/partition"; import { join } from "@std/path"; import * as JSONC from "@std/jsonc"; +import { walk } from "@std/fs/walk"; +import { relative } from "@std/path/posix/relative"; + /** * The test suite matches the folders inside the `test` folder inside the * node repo @@ -12,7 +15,6 @@ import * as JSONC from "@std/jsonc"; type TestSuites = Record; interface Config { - nodeVersion: string; /** Ignored files won't regenerated by the update script */ ignore: TestSuites; /** @@ -62,3 +64,130 @@ export function partitionParallelTestPaths( const partitions = partition(testPaths, (p) => !!p.match(PARALLEL_PATTERN)); return { parallel: partitions[0], sequential: partitions[1] }; } + +export const NODE_IGNORED_TEST_DIRS = [ + "addons", + "async-hooks", + "cctest", + "common", + "doctool", + "embedding", + "fixtures", + "fuzzers", + "js-native-api", + "node-api", + "overlapped-checker", + "report", + "testpy", + "tick-processor", + "tools", + "v8-updates", + "wasi", + "wpt", +]; + +export const VENDORED_NODE_TEST = new URL( + "./runner/suite/test/", + import.meta.url, +); +export const NODE_COMPAT_TEST_DEST_URL = new URL( + "./test/", + import.meta.url, +); + +export async function getNodeTests(): Promise { + const paths: string[] = []; + const rootPath = VENDORED_NODE_TEST.href.slice(7); + for await ( + const item of walk(VENDORED_NODE_TEST, { exts: [".js"] }) + ) { + const path = relative(rootPath, item.path); + if (NODE_IGNORED_TEST_DIRS.every((dir) => !path.startsWith(dir))) { + paths.push(path); + } + } + + return paths.sort(); +} + +export async function getDenoTests() { + const paths: string[] = []; + const rootPath = NODE_COMPAT_TEST_DEST_URL.href.slice(7); + for await ( + const item of walk(NODE_COMPAT_TEST_DEST_URL, { exts: [".js"] }) + ) { + const path = relative(rootPath, item.path); + paths.push(path); + } + + return paths.sort(); +} + +let testSerialId = 0; +const cwd = new URL(".", import.meta.url); + +export async function runNodeCompatTestCase( + testCase: string, + signal?: AbortSignal, +) { + const v8Flags = ["--stack-size=4000"]; + const testSource = await Deno.readTextFile(testCase); + const envVars: Record = {}; + const knownGlobals: string[] = []; + parseFlags(testSource).forEach((flag) => { + switch (flag) { + case "--expose_externalize_string": + v8Flags.push("--expose-externalize-string"); + knownGlobals.push("createExternalizableString"); + break; + case "--expose-gc": + v8Flags.push("--expose-gc"); + knownGlobals.push("gc"); + break; + default: + break; + } + }); + if (knownGlobals.length > 0) { + envVars["NODE_TEST_KNOWN_GLOBALS"] = knownGlobals.join(","); + } + // TODO(nathanwhit): once we match node's behavior on executing + // `node:test` tests when we run a file, we can remove this + const usesNodeTest = testSource.includes("node:test"); + const args = [ + usesNodeTest ? "test" : "run", + "-A", + "--quiet", + "--unstable-unsafe-proto", + "--unstable-bare-node-builtins", + "--unstable-fs", + "--v8-flags=" + v8Flags.join(), + ]; + if (usesNodeTest) { + // deno test typechecks by default + we want to pass script args + args.push("--no-check", "runner.ts", "--", testCase); + } else { + args.push("runner.ts", testCase); + } + + // Pipe stdout in order to output each test result as Deno.test output + // That way the tests will respect the `--quiet` option when provided + return new Deno.Command(Deno.execPath(), { + args, + env: { + TEST_SERIAL_ID: String(testSerialId++), + ...envVars, + }, + cwd, + stdout: "piped", + stderr: "piped", + signal, + }).spawn(); +} + +/** Parses the special "Flags:"" syntax in Node.js test files */ +function parseFlags(source: string): string[] { + const line = /^\/\/ Flags: (.+)$/um.exec(source); + if (line == null) return []; + return line[1].split(" "); +} diff --git a/tests/node_compat/config.jsonc b/tests/node_compat/config.jsonc index 664adaedfa0c49..cda2923789ef08 100644 --- a/tests/node_compat/config.jsonc +++ b/tests/node_compat/config.jsonc @@ -1,5 +1,4 @@ { - "nodeVersion": "18.12.1", "ignore": { "common": ["index.js", "internet.js"], "fixtures": [ @@ -13,10 +12,12 @@ "x.txt" ], "internet": [ - "test-dns-any.js", - "test-dns-ipv4.js", - "test-dns-ipv6.js", - "test-dns.js" + // TODO(bartlomieju): temporarily disabled as these tests were hitting nodejs.org + // server. We should have a setup that hits a local server instead. + // "test-dns-any.js", + // "test-dns-ipv4.js", + // "test-dns-ipv6.js", + // "test-dns.js" ], "parallel": [ "test-assert.js", @@ -121,6 +122,16 @@ "sequential": ["test-child-process-exit.js"] }, "tests": { + "abort": [ + "test-addon-uv-handle-leak.js" + ], + "benchmark": [ + "test-benchmark-async-hooks.js", + "test-benchmark-http.js", + "test-benchmark-http2.js", + "test-benchmark-tls.js", + "test-benchmark-worker.js" + ], "common": [ "child_process.js", "countdown.js", @@ -132,6 +143,13 @@ "internet.js", "tmpdir.js" ], + "es-module": [ + "test-cjs-prototype-pollution.js", + "test-esm-dynamic-import-mutating-fs.js", + "test-esm-loader-cache-clearing.js", + "test-esm-windows.js", + "test-vm-compile-function-lineoffset.js" + ], "fixtures": [ "a.js", "child_process_should_emit_error.js", @@ -149,23 +167,40 @@ ], "fixtures/keys": ["agent1-cert.pem", "agent1-key.pem", "ca1-cert.pem"], "internet": [ - "test-dns-any.js", + // "test-dns-any.js", "test-dns-idna2008.js", - "test-dns-ipv4.js", - "test-dns-ipv6.js", + // "test-dns-ipv4.js", + // "test-dns-ipv6.js", "test-dns-lookup.js", "test-dns-promises-resolve.js", "test-dns-regress-6244.js", "test-dns-setserver-in-callback-of-resolve4.js", - "test-dns.js", + // "test-dns.js", "test-http-https-default-ports.js" ], + "message": [ + "eval_messages.js", + "max_tick_depth.js", + "stdin_messages.js", + "util_inspect_error.js" + ], "parallel": [ + "test-arm-math-illegal-instruction.js", "test-assert-async.js", "test-assert-fail.js", "test-assert-strict-exists.js", "test-assert.js", + "test-async-hooks-run-in-async-scope-caught-exception.js", + "test-async-hooks-run-in-async-scope-this-arg.js", + "test-async-local-storage-bind.js", + "test-async-local-storage-contexts.js", + "test-async-local-storage-deep-stack.js", + "test-async-local-storage-http-multiclients.js", + "test-async-local-storage-snapshot.js", + "test-atomics-wake.js", "test-bad-unicode.js", + "test-beforeexit-event-exit.js", + "test-blob-buffer-too-large.js", "test-blocklist.js", "test-btoa-atob.js", "test-buffer-alloc.js", @@ -201,6 +236,7 @@ "test-buffer-readint.js", "test-buffer-readuint.js", "test-buffer-safe-unsafe.js", + "test-buffer-sharedarraybuffer.js", "test-buffer-slice.js", "test-buffer-slow.js", "test-buffer-swap.js", @@ -208,6 +244,7 @@ "test-buffer-tostring-range.js", "test-buffer-tostring-rangeerror.js", "test-buffer-tostring.js", + "test-buffer-write.js", "test-buffer-writedouble.js", "test-buffer-writefloat.js", "test-buffer-writeint.js", @@ -236,8 +273,10 @@ "test-child-process-execfilesync-maxbuf.js", "test-child-process-execsync-maxbuf.js", "test-child-process-flush-stdio.js", + "test-child-process-fork3.js", "test-child-process-ipc-next-tick.js", "test-child-process-kill.js", + "test-child-process-send-type-error.js", "test-child-process-set-blocking.js", "test-child-process-spawn-args.js", "test-child-process-spawn-event.js", @@ -245,49 +284,139 @@ "test-child-process-spawnsync-maxbuf.js", "test-child-process-spawnsync-validation-errors.js", "test-child-process-spawnsync.js", - // TODO(crowlKats): socket is not yet polyfilled - // "test-client-request-destroy.js", + "test-child-process-stdin-ipc.js", + "test-child-process-stdio-overlapped.js", + "test-client-request-destroy.js", + "test-cluster-uncaught-exception.js", + "test-console-assign-undefined.js", "test-console-async-write-error.js", + "test-console-formatTime.js", "test-console-group.js", "test-console-log-stdio-broken-dest.js", "test-console-log-throw-primitive.js", "test-console-no-swallow-stack-overflow.js", + "test-console-not-call-toString.js", + "test-console-self-assign.js", "test-console-sync-write-error.js", "test-console-table.js", "test-console-tty-colors.js", + "test-crypto-dh-errors.js", + "test-crypto-dh-odd-key.js", "test-crypto-dh-shared.js", "test-crypto-dh.js", + "test-crypto-domain.js", + "test-crypto-from-binary.js", "test-crypto-hash.js", "test-crypto-hkdf.js", "test-crypto-hmac.js", + "test-crypto-keygen-dh-classic.js", + "test-crypto-keygen-duplicate-deprecated-option.js", + "test-crypto-keygen-empty-passphrase-no-error.js", + "test-crypto-keygen-key-objects.js", + "test-crypto-keygen-missing-oid.js", + "test-crypto-keygen-non-standard-public-exponent.js", + "test-crypto-keygen-rfc8017-9-1.js", + "test-crypto-keygen-rfc8017-a-2-3.js", + "test-crypto-lazy-transform-writable.js", + "test-crypto-no-algorithm.js", + "test-crypto-op-during-process-exit.js", + "test-crypto-padding-aes256.js", "test-crypto-pbkdf2.js", "test-crypto-prime.js", + "test-crypto-psychic-signatures.js", + "test-crypto-publicDecrypt-fails-first-time.js", + "test-crypto-randomfillsync-regression.js", + "test-crypto-scrypt.js", "test-crypto-secret-keygen.js", "test-crypto-stream.js", + "test-crypto-subtle-zero-length.js", "test-crypto-update-encoding.js", "test-crypto-x509.js", + "test-dgram-address.js", + "test-dgram-bind-default-address.js", + "test-dgram-bind-error-repeat.js", + "test-dgram-bind.js", + "test-dgram-bytes-length.js", "test-dgram-close-during-bind.js", + "test-dgram-close-in-listening.js", + "test-dgram-close-is-not-callback.js", "test-dgram-close-signal.js", + "test-dgram-close.js", + "test-dgram-connect-send-callback-buffer-length.js", + "test-dgram-connect-send-callback-buffer.js", + "test-dgram-connect-send-callback-multi-buffer.js", + "test-dgram-connect-send-default-host.js", + "test-dgram-connect-send-empty-array.js", + "test-dgram-connect-send-empty-buffer.js", + "test-dgram-connect-send-multi-buffer-copy.js", + "test-dgram-connect-send-multi-string-array.js", + "test-dgram-connect.js", + "test-dgram-createSocket-type.js", + "test-dgram-error-message-address.js", + "test-dgram-implicit-bind.js", + "test-dgram-listen-after-bind.js", + "test-dgram-msgsize.js", + "test-dgram-oob-buffer.js", + "test-dgram-recv-error.js", + "test-dgram-ref.js", + "test-dgram-send-bad-arguments.js", + "test-dgram-send-callback-buffer-empty-address.js", + "test-dgram-send-callback-buffer-length-empty-address.js", + "test-dgram-send-callback-buffer-length.js", + "test-dgram-send-callback-buffer.js", + "test-dgram-send-callback-multi-buffer-empty-address.js", + "test-dgram-send-callback-multi-buffer.js", + "test-dgram-send-callback-recursive.js", + "test-dgram-send-default-host.js", + "test-dgram-send-empty-array.js", + "test-dgram-send-empty-buffer.js", + "test-dgram-send-empty-packet.js", + "test-dgram-send-error.js", + "test-dgram-send-invalid-msg-type.js", + "test-dgram-send-multi-buffer-copy.js", + "test-dgram-send-multi-string-array.js", + "test-dgram-udp4.js", + "test-dgram-udp6-send-default-host.js", + "test-dgram-unref.js", + "test-diagnostics-channel-bind-store.js", "test-diagnostics-channel-has-subscribers.js", "test-diagnostics-channel-net.js", "test-diagnostics-channel-object-channel-pub-sub.js", "test-diagnostics-channel-pub-sub.js", + "test-diagnostics-channel-safe-subscriber-errors.js", "test-diagnostics-channel-symbol-named.js", "test-diagnostics-channel-sync-unsubscribe.js", "test-diagnostics-channel-tracing-channel-args-types.js", + "test-diagnostics-channel-tracing-channel-async-error.js", + "test-diagnostics-channel-tracing-channel-async.js", "test-diagnostics-channel-tracing-channel-callback-run-stores.js", "test-diagnostics-channel-tracing-channel-promise-run-stores.js", + "test-diagnostics-channel-tracing-channel-run-stores.js", "test-diagnostics-channel-tracing-channel-sync-error.js", "test-diagnostics-channel-tracing-channel-sync.js", "test-diagnostics-channel-udp.js", "test-dns-lookup.js", "test-dns-memory-error.js", + "test-dns-multi-channel.js", "test-dns-promises-exists.js", "test-dns-resolvens-typeerror.js", "test-dns-setservers-type-check.js", + "test-domain-crypto.js", + "test-domain-ee-error-listener.js", + "test-domain-nested-throw.js", + "test-domain-nested.js", + "test-domain-stack.js", + "test-domain-top-level-error-handler-clears-stack.js", + "test-dsa-fips-invalid-key.js", + "test-env-newprotomethod-remove-unnecessary-prototypes.js", + "test-error-aggregateTwoErrors.js", + "test-error-prepare-stack-trace.js", + "test-errors-aborterror.js", "test-eval-strict-referenceerror.js", "test-eval.js", + "test-event-capture-rejections.js", "test-event-emitter-add-listeners.js", + "test-event-emitter-check-listener-leaks.js", "test-event-emitter-emit-context.js", "test-event-emitter-error-monitor.js", "test-event-emitter-errors.js", @@ -296,6 +425,9 @@ "test-event-emitter-listener-count.js", "test-event-emitter-listeners-side-effects.js", "test-event-emitter-listeners.js", + "test-event-emitter-max-listeners-warning-for-null.js", + "test-event-emitter-max-listeners-warning-for-symbol.js", + "test-event-emitter-max-listeners-warning.js", "test-event-emitter-max-listeners.js", "test-event-emitter-method-names.js", "test-event-emitter-modify-in-emit.js", @@ -314,6 +446,7 @@ "test-events-once.js", "test-events-uncaught-exception-stack.js", "test-eventtarget-brandcheck.js", + "test-eventtarget-once-twice.js", "test-exception-handler.js", "test-exception-handler2.js", "test-file-read-noexist.js", @@ -324,27 +457,42 @@ "test-fs-access.js", "test-fs-append-file-sync.js", "test-fs-append-file.js", + "test-fs-buffertype-writesync.js", "test-fs-chmod-mask.js", "test-fs-chmod.js", "test-fs-chown-type-check.js", + "test-fs-close.js", + "test-fs-constants.js", "test-fs-copyfile.js", "test-fs-empty-readStream.js", + "test-fs-fmap.js", "test-fs-lchown.js", + "test-fs-long-path.js", "test-fs-mkdir.js", + "test-fs-non-number-arguments-throw.js", "test-fs-open-flags.js", "test-fs-open-mode-mask.js", "test-fs-open-no-close.js", "test-fs-open-numeric-flags.js", "test-fs-open.js", "test-fs-opendir.js", + "test-fs-promises-exists.js", + "test-fs-promises-file-handle-stat.js", + "test-fs-promises-file-handle-write.js", + "test-fs-promises-readfile-empty.js", + "test-fs-promises-readfile-with-fd.js", "test-fs-promises-writefile-with-fd.js", + "test-fs-read-file-sync-hostname.js", + "test-fs-read-file-sync.js", "test-fs-read-stream-autoClose.js", "test-fs-read-stream-concurrent-reads.js", "test-fs-read-stream-double-close.js", "test-fs-read-stream-encoding.js", + "test-fs-read-stream-fd-leak.js", "test-fs-read-stream-fd.js", "test-fs-read-stream-inherit.js", "test-fs-read-stream-patch-open.js", + "test-fs-read-stream-pos.js", "test-fs-read-stream-resume.js", "test-fs-read-stream-throw-type-error.js", "test-fs-read-stream.js", @@ -354,8 +502,13 @@ "test-fs-readdir-stack-overflow.js", "test-fs-readdir.js", "test-fs-readfile-empty.js", + "test-fs-readfile-fd.js", + "test-fs-readfile-unlink.js", + "test-fs-readfile-zero-byte-liar.js", + "test-fs-readfilesync-enoent.js", "test-fs-readv-sync.js", "test-fs-readv.js", + "test-fs-ready-event-stream.js", "test-fs-realpath-native.js", "test-fs-rmdir-recursive-sync-warns-not-found.js", "test-fs-rmdir-recursive-sync-warns-on-file.js", @@ -365,33 +518,117 @@ "test-fs-rmdir-recursive-warns-on-file.js", "test-fs-rmdir-recursive.js", "test-fs-rmdir-type-check.js", + "test-fs-sir-writes-alot.js", + "test-fs-stream-construct-compat-error-read.js", + "test-fs-stream-construct-compat-graceful-fs.js", + "test-fs-stream-construct-compat-old-node.js", + "test-fs-stream-destroy-emit-error.js", + "test-fs-stream-double-close.js", + "test-fs-stream-fs-options.js", + "test-fs-stream-options.js", + "test-fs-symlink-dir-junction-relative.js", + "test-fs-timestamp-parsing-error.js", + "test-fs-truncate-clear-file-zero.js", + "test-fs-util-validateoffsetlength.js", + "test-fs-utimes-y2K38.js", "test-fs-utimes.js", + "test-fs-watch-file-enoent-after-deletion.js", + "test-fs-watch-recursive-add-file-with-url.js", + "test-fs-watch-recursive-add-file.js", + "test-fs-watch-recursive-add-folder.js", + "test-fs-watch-recursive-update-file.js", "test-fs-watchfile.js", "test-fs-write-buffer.js", "test-fs-write-file-buffer.js", "test-fs-write-file-invalid-path.js", "test-fs-write-file-sync.js", "test-fs-write-file.js", + "test-fs-write-negativeoffset.js", "test-fs-write-no-fd.js", "test-fs-write-stream-autoclose-option.js", "test-fs-write-stream-close-without-callback.js", "test-fs-write-stream-double-close.js", + "test-fs-write-stream-encoding.js", "test-fs-write-stream-end.js", "test-fs-write-stream-fs.js", + "test-fs-write-stream-patch-open.js", "test-fs-write-stream-throw-type-error.js", "test-fs-write-stream.js", "test-fs-write-sync.js", "test-fs-write.js", "test-fs-writev-sync.js", + "test-fs-writev.js", + "test-global-domexception.js", + "test-global-encoder.js", + "test-global-webcrypto.js", + "test-global-webstreams.js", "test-handle-wrap-close-abort.js", + "test-http-abort-before-end.js", + "test-http-addrequest-localaddress.js", "test-http-agent-getname.js", + "test-http-agent-maxtotalsockets.js", + "test-http-agent-no-protocol.js", + "test-http-agent-null.js", + "test-http-allow-req-after-204-res.js", + "test-http-bind-twice.js", + "test-http-buffer-sanity.js", + "test-http-chunked-smuggling.js", + "test-http-chunked.js", + "test-http-client-abort2.js", + "test-http-client-check-http-token.js", + "test-http-client-close-with-default-agent.js", + "test-http-client-default-headers-exist.js", + "test-http-client-defaults.js", + "test-http-client-encoding.js", "test-http-client-get-url.js", + "test-http-client-headers-array.js", + "test-http-client-invalid-path.js", + "test-http-client-keep-alive-hint.js", + "test-http-client-race-2.js", + "test-http-client-race.js", "test-http-client-read-in-error.js", + "test-http-client-reject-unexpected-agent.js", + "test-http-client-timeout-with-data.js", + "test-http-client-unescaped-path.js", + "test-http-client-upload-buf.js", + "test-http-client-upload.js", // TODO(lev): ClientRequest.socket is not polyfilled so this test keeps // failing //"test-http-client-set-timeout.js", + "test-http-common.js", + "test-http-contentLength0.js", + "test-http-correct-hostname.js", + "test-http-date-header.js", + "test-http-decoded-auth.js", + "test-http-default-encoding.js", + "test-http-end-throw-socket-handling.js", + "test-http-eof-on-connect.js", + "test-http-extra-response.js", + "test-http-flush-headers.js", + "test-http-full-response.js", + "test-http-head-request.js", + "test-http-head-response-has-no-body-end-implicit-headers.js", + "test-http-head-response-has-no-body-end.js", + "test-http-head-response-has-no-body.js", + "test-http-head-throw-on-response-body-write.js", + "test-http-header-obstext.js", + "test-http-header-owstext.js", + "test-http-header-read.js", "test-http-header-validators.js", + "test-http-hex-write.js", + "test-http-highwatermark.js", + "test-http-host-headers.js", + "test-http-incoming-message-destroy.js", + "test-http-invalid-path-chars.js", + "test-http-invalidheaderfield.js", + "test-http-invalidheaderfield2.js", + "test-http-keep-alive-timeout-custom.js", + "test-http-listening.js", + "test-http-localaddress-bind-error.js", "test-http-localaddress.js", + "test-http-methods.js", + "test-http-outgoing-end-types.js", + "test-http-outgoing-finished.js", // TODO(bartlomieju): temporarily disabled while we iterate on the HTTP client // "test-http-outgoing-buffer.js", "test-http-outgoing-internal-headernames-getter.js", @@ -401,53 +638,186 @@ // "test-http-outgoing-message-inheritance.js", "test-http-outgoing-renderHeaders.js", "test-http-outgoing-settimeout.js", + "test-http-outgoing-write-types.js", + "test-http-parser-free.js", + "test-http-pause-no-dump.js", + "test-http-pause-resume-one-end.js", + "test-http-pause.js", + "test-http-pipe-fs.js", + "test-http-pipeline-requests-connection-leak.js", + "test-http-proxy.js", + "test-http-readable-data-event.js", + "test-http-request-arguments.js", + "test-http-request-dont-override-options.js", + "test-http-request-end-twice.js", + "test-http-request-end.js", + "test-http-request-invalid-method-error.js", + "test-http-request-large-payload.js", + "test-http-request-methods.js", + "test-http-res-write-end-dont-take-array.js", + "test-http-response-multiheaders.js", + "test-http-response-readable.js", + "test-http-response-writehead-returns-this.js", + "test-http-server-delete-parser.js", + "test-http-server-write-after-end.js", + "test-http-server-write-end-after-end.js", + "test-http-set-cookies.js", + "test-http-set-header-chain.js", + "test-http-status-code.js", + "test-http-status-reason-invalid-chars.js", + "test-http-uncaught-from-request-callback.js", + "test-http-url.parse-auth.js", + "test-http-url.parse-basic.js", "test-http-url.parse-https.request.js", "test-http-url.parse-only-support-http-https-protocol.js", + "test-http-url.parse-path.js", + "test-http-url.parse-post.js", + "test-http-url.parse-search.js", + "test-http-wget.js", + "test-http-write-empty-string.js", + "test-http-zerolengthbuffer.js", + "test-http2-client-request-listeners-warning.js", + "test-http2-compat-expect-handling.js", + "test-http2-compat-socket-set.js", + "test-http2-connect-options.js", + "test-http2-date-header.js", + "test-http2-dont-override.js", + "test-http2-endafterheaders.js", + "test-http2-methods.js", + "test-http2-request-response-proto.js", + "test-http2-respond-file-204.js", + "test-http2-respond-file-compat.js", + "test-http2-session-timeout.js", + "test-http2-socket-proxy.js", + "test-http2-status-code-invalid.js", + "test-http2-status-code.js", + "test-http2-stream-removelisteners-after-close.js", + "test-http2-write-empty-string.js", + "test-https-client-renegotiation-limit.js", + "test-https-connecting-to-http.js", + "test-https-foafssl.js", + "test-https-localaddress-bind-error.js", + "test-https-localaddress.js", + "test-icu-data-dir.js", + "test-icu-env.js", + "test-icu-stringwidth.js", "test-icu-transcode.js", + "test-inspector-stops-no-file.js", + "test-instanceof.js", + "test-internal-fs.js", + "test-internal-util-normalizeencoding.js", + "test-kill-segfault-freebsd.js", + "test-listen-fd-detached-inherit.js", + "test-listen-fd-detached.js", + "test-memory-usage-emfile.js", + "test-memory-usage.js", + "test-messagechannel.js", + "test-microtask-queue-integration.js", + "test-microtask-queue-run-immediate.js", + "test-microtask-queue-run.js", + "test-module-cache.js", + "test-module-circular-symlinks.js", + "test-module-isBuiltin.js", + "test-module-multi-extensions.js", + "test-module-nodemodulepaths.js", + "test-module-readonly.js", + "test-module-relative-lookup.js", "test-net-access-byteswritten.js", + "test-net-after-close.js", "test-net-autoselectfamily.js", "test-net-better-error-messages-listen-path.js", + "test-net-better-error-messages-listen.js", "test-net-better-error-messages-path.js", "test-net-better-error-messages-port-hostname.js", + "test-net-bind-twice.js", + "test-net-buffersize.js", + "test-net-bytes-written-large.js", + "test-net-can-reset-timeout.js", "test-net-connect-after-destroy.js", + "test-net-connect-call-socket-connect.js", "test-net-connect-destroy.js", "test-net-connect-immediate-destroy.js", "test-net-connect-immediate-finish.js", "test-net-connect-no-arg.js", + "test-net-connect-options-fd.js", + "test-net-connect-options-ipv6.js", + "test-net-connect-options-port.js", + "test-net-connect-paused-connection.js", + "test-net-dns-custom-lookup.js", "test-net-dns-error.js", + "test-net-dns-lookup-skip.js", + "test-net-dns-lookup.js", "test-net-during-close.js", + "test-net-eaddrinuse.js", "test-net-end-close.js", "test-net-end-without-connect.js", + "test-net-error-twice.js", "test-net-isip.js", "test-net-isipv4.js", "test-net-isipv6.js", + "test-net-keepalive.js", + "test-net-listen-after-destroying-stdin.js", "test-net-listen-close-server-callback-is-not-function.js", "test-net-listen-close-server.js", + "test-net-listen-error.js", "test-net-listen-invalid-port.js", "test-net-listening.js", + "test-net-local-address-port.js", "test-net-localerror.js", "test-net-options-lookup.js", + "test-net-pause-resume-connecting.js", + "test-net-persistent-keepalive.js", + "test-net-persistent-nodelay.js", + "test-net-persistent-ref-unref.js", "test-net-pipe-connect-errors.js", + "test-net-reconnect.js", + "test-net-remote-address-port.js", + "test-net-remote-address.js", + "test-net-server-capture-rejection.js", + "test-net-server-close.js", "test-net-server-listen-options-signal.js", "test-net-server-listen-options.js", "test-net-server-listen-path.js", "test-net-server-listen-remove-callback.js", "test-net-server-options.js", + "test-net-server-pause-on-connect.js", "test-net-server-unref-persistent.js", "test-net-server-unref.js", + "test-net-settimeout.js", + "test-net-socket-close-after-end.js", + "test-net-socket-connect-invalid-autoselectfamily.js", + "test-net-socket-connect-without-cb.js", + "test-net-socket-connecting.js", + "test-net-socket-destroy-send.js", "test-net-socket-destroy-twice.js", + "test-net-socket-end-before-connect.js", + "test-net-socket-end-callback.js", "test-net-socket-no-halfopen-enforcer.js", + "test-net-socket-ready-without-cb.js", "test-net-socket-setnodelay.js", + "test-net-socket-timeout-unref.js", + "test-net-socket-write-after-close.js", + "test-net-socket-write-error.js", + "test-net-sync-cork.js", "test-net-timeout-no-handle.js", + "test-net-writable.js", "test-net-write-arguments.js", + "test-net-write-connect-write.js", + "test-net-write-fully-async-buffer.js", + "test-net-write-fully-async-hex-string.js", + "test-net-write-slow.js", "test-next-tick-doesnt-hang.js", + "test-next-tick-domain.js", + "test-next-tick-errors.js", "test-next-tick-fixed-queue-regression.js", "test-next-tick-intentional-starvation.js", "test-next-tick-ordering.js", "test-next-tick-ordering2.js", "test-next-tick-when-exiting.js", "test-next-tick.js", + "test-no-node-snapshot.js", "test-nodeeventtarget.js", + "test-os-homedir-no-envvar.js", "test-os.js", "test-outgoing-message-destroy.js", "test-outgoing-message-pipe.js", @@ -466,15 +836,35 @@ "test-path-win32-exists.js", "test-path-zero-length-strings.js", "test-path.js", + "test-perf-gc-crash.js", + "test-performanceobserver-gc.js", + "test-pipe-return-val.js", + "test-pipe-writev.js", + "test-process-abort.js", + "test-process-argv-0.js", "test-process-beforeexit.js", "test-process-binding-internalbinding-allowlist.js", + "test-process-binding.js", + "test-process-dlopen-undefined-exports.js", + "test-process-domain-segfault.js", + "test-process-emitwarning.js", "test-process-env-allowed-flags.js", + "test-process-env-delete.js", + "test-process-env-windows-error-reset.js", "test-process-exit-from-before-exit.js", "test-process-exit-handler.js", "test-process-exit-recursive.js", "test-process-exit.js", + "test-process-getgroups.js", + "test-process-hrtime-bigint.js", "test-process-kill-pid.js", + "test-process-next-tick.js", + "test-process-no-deprecation.js", + "test-process-ppid.js", + "test-process-really-exit.js", "test-process-uptime.js", + "test-process-warning.js", + "test-promise-handled-rejection-no-warning.js", "test-promise-unhandled-silent.js", "test-promise-unhandled-throw-handler.js", "test-punycode.js", @@ -482,6 +872,14 @@ "test-querystring-maxKeys-non-finite.js", "test-querystring-multichar-separator.js", "test-querystring.js", + "test-readable-from-iterator-closing.js", + "test-readable-from.js", + "test-readable-large-hwm.js", + "test-readable-single-end.js", + "test-readline-async-iterators-destroy.js", + "test-readline-async-iterators.js", + "test-readline-carriage-return-between-chunks.js", + "test-readline-csi.js", "test-readline-emit-keypress-events.js", "test-readline-interface-escapecodetimeout.js", "test-readline-keys.js", @@ -490,7 +888,31 @@ "test-readline-set-raw-mode.js", "test-readline-undefined-columns.js", "test-readline.js", + "test-ref-unref-return.js", + "test-regression-object-prototype.js", + "test-require-invalid-package.js", + "test-require-long-path.js", + "test-require-nul.js", + "test-require-process.js", + "test-signal-handler-remove-on-exit.js", + "test-signal-handler.js", + "test-socket-address.js", + "test-socket-write-after-fin-error.js", + "test-source-map-enable.js", + "test-spawn-cmd-named-pipe.js", "test-stdin-from-file-spawn.js", + "test-stdin-hang.js", + "test-stdin-pipe-large.js", + "test-stdin-pipe-resume.js", + "test-stdin-script-child-option.js", + "test-stdio-pipe-access.js", + "test-stdio-pipe-redirect.js", + "test-stdio-pipe-stderr.js", + "test-stdio-undestroy.js", + "test-stdout-cannot-be-closed-child-process-pipe.js", + "test-stdout-pipeline-destroy.js", + "test-stdout-stderr-reading.js", + "test-stdout-stderr-write.js", "test-stream-add-abort-signal.js", "test-stream-aliases-legacy.js", "test-stream-auto-destroy.js", @@ -498,22 +920,30 @@ "test-stream-backpressure.js", "test-stream-big-packet.js", "test-stream-big-push.js", + "test-stream-catch-rejections.js", "test-stream-construct.js", + "test-stream-decoder-objectmode.js", "test-stream-destroy-event-order.js", "test-stream-duplex-destroy.js", "test-stream-duplex-end.js", "test-stream-duplex-from.js", "test-stream-duplex-props.js", "test-stream-duplex-readable-end.js", + "test-stream-duplex-readable-writable.js", "test-stream-duplex-writable-finished.js", "test-stream-duplex.js", + "test-stream-end-of-streams.js", "test-stream-end-paused.js", "test-stream-error-once.js", "test-stream-events-prepend.js", + "test-stream-filter.js", + "test-stream-flatMap.js", + "test-stream-forEach.js", "test-stream-inheritance.js", "test-stream-ispaused.js", "test-stream-objectmode-undefined.js", "test-stream-once-readable-pipe.js", + "test-stream-passthrough-drain.js", "test-stream-pipe-after-end.js", "test-stream-pipe-await-drain-manual-resume.js", "test-stream-pipe-await-drain-push-while-write.js", @@ -521,6 +951,7 @@ "test-stream-pipe-cleanup-pause.js", "test-stream-pipe-cleanup.js", "test-stream-pipe-error-handling.js", + "test-stream-pipe-error-unhandled.js", "test-stream-pipe-event.js", "test-stream-pipe-flow-after-unpipe.js", "test-stream-pipe-flow.js", @@ -531,8 +962,12 @@ "test-stream-pipe-unpipe-streams.js", "test-stream-pipe-without-listenerCount.js", "test-stream-pipeline-async-iterator.js", + "test-stream-pipeline-duplex.js", + "test-stream-pipeline-listeners.js", "test-stream-pipeline-queued-end-in-destroy.js", + "test-stream-pipeline-uncaught.js", "test-stream-pipeline-with-empty-string.js", + "test-stream-push-order.js", "test-stream-push-strings.js", "test-stream-readable-aborted.js", "test-stream-readable-add-chunk-during-data.js", @@ -564,15 +999,21 @@ "test-stream-readable-resumeScheduled.js", "test-stream-readable-setEncoding-existing-buffers.js", "test-stream-readable-setEncoding-null.js", + "test-stream-readable-strategy-option.js", + "test-stream-readable-unpipe-resume.js", "test-stream-readable-unshift.js", "test-stream-readable-with-unimplemented-_read.js", "test-stream-readableListening-state.js", + "test-stream-reduce.js", + "test-stream-toArray.js", + "test-stream-toWeb-allows-server-response.js", "test-stream-transform-callback-twice.js", "test-stream-transform-constructor-set-methods.js", "test-stream-transform-destroy.js", "test-stream-transform-final-sync.js", "test-stream-transform-final.js", "test-stream-transform-flush-data.js", + "test-stream-transform-hwm0.js", "test-stream-transform-objectmode-falsey-value.js", "test-stream-transform-split-highwatermark.js", "test-stream-transform-split-objectmode.js", @@ -587,6 +1028,7 @@ "test-stream-writable-decoded-encoding.js", "test-stream-writable-destroy.js", "test-stream-writable-end-cb-error.js", + "test-stream-writable-end-cb-uncaught.js", "test-stream-writable-end-multiple.js", "test-stream-writable-ended-state.js", "test-stream-writable-final-async.js", @@ -614,6 +1056,7 @@ "test-stream2-basic.js", "test-stream2-compatibility.js", "test-stream2-decode-partial.js", + "test-stream2-finish-pipe-error.js", "test-stream2-finish-pipe.js", "test-stream2-large-read-stall.js", "test-stream2-objects.js", @@ -636,24 +1079,60 @@ "test-stream3-cork-end.js", "test-stream3-cork-uncork.js", "test-stream3-pause-then-read.js", + "test-stream3-pipeline-async-iterator.js", "test-streams-highwatermark.js", "test-string-decoder.js", + "test-stringbytes-external.js", + "test-sync-fileread.js", + "test-sys.js", + "test-tick-processor-arguments.js", "test-timers-api-refs.js", "test-timers-args.js", "test-timers-clear-null-does-not-throw-error.js", "test-timers-clear-object-does-not-throw-error.js", "test-timers-clear-timeout-interval-equivalent.js", + "test-timers-clearImmediate-als.js", "test-timers-clearImmediate.js", + "test-timers-immediate-queue.js", + "test-timers-immediate.js", "test-timers-interval-throw.js", "test-timers-non-integer-delay.js", + "test-timers-refresh-in-callback.js", "test-timers-refresh.js", "test-timers-same-timeout-wrong-list-deleted.js", + "test-timers-setimmediate-infinite-loop.js", + "test-timers-socket-timeout-removes-other-socket-unref-timer.js", "test-timers-timeout-with-non-integer.js", "test-timers-uncaught-exception.js", "test-timers-unref-throw-then-ref.js", + "test-timers-unref.js", + "test-timers-unrefd-interval-still-fires.js", + "test-timers-unrefed-in-beforeexit.js", + "test-timers-unrefed-in-callback.js", "test-timers-user-call.js", "test-timers-zero-timeout.js", + "test-timers.js", + "test-tls-alert-handling.js", + "test-tls-alert.js", + "test-tls-client-renegotiation-limit.js", + "test-tls-dhe.js", + "test-tls-ecdh-auto.js", + "test-tls-ecdh-multiple.js", + "test-tls-ecdh.js", + "test-tls-enable-trace-cli.js", + "test-tls-enable-trace.js", + "test-tls-env-extra-ca-no-crypto.js", + "test-tls-ocsp-callback.js", + "test-tls-psk-server.js", + "test-tls-securepair-server.js", + "test-tls-server-verify.js", + "test-tls-session-cache.js", + "test-tls-set-ciphers.js", + "test-tls-transport-destroy-after-own-gc.js", + "test-trace-events-async-hooks-dynamic.js", + "test-trace-events-async-hooks-worker.js", "test-tty-stdin-end.js", + "test-tz-version.js", "test-url-domain-ascii-unicode.js", "test-url-fileurltopath.js", "test-url-format-invalid-input.js", @@ -664,19 +1143,31 @@ "test-url-pathtofileurl.js", "test-url-relative.js", "test-url-urltooptions.js", + "test-utf8-scripts.js", "test-util-deprecate-invalid-code.js", "test-util-deprecate.js", "test-util-format.js", "test-util-inherits.js", + "test-util-inspect-getters-accessing-this.js", "test-util-inspect-long-running.js", "test-util-inspect-namespace.js", "test-util-inspect-proxy.js", "test-util-inspect.js", "test-util-isDeepStrictEqual.js", + "test-util-primordial-monkeypatching.js", "test-util-promisify.js", "test-util-types-exists.js", "test-util-types.js", "test-util.js", + "test-uv-binding-constant.js", + "test-uv-unmapped-exception.js", + "test-v8-coverage.js", + "test-v8-deserialize-buffer.js", + "test-v8-flag-pool-size-0.js", + "test-v8-global-setter.js", + "test-v8-stop-coverage.js", + "test-v8-take-coverage-noop.js", + "test-v8-take-coverage.js", "test-vm-access-process-env.js", "test-vm-attributes-property-not-on-sandbox.js", "test-vm-codegen.js", @@ -721,28 +1212,39 @@ "test-vm-timeout-escape-promise-2.js", "test-vm-timeout-escape-promise.js", "test-vm-timeout.js", + "test-weakref.js", + "test-webcrypto-encrypt-decrypt.js", "test-webcrypto-sign-verify.js", + "test-websocket.js", + "test-webstream-string-tag.js", "test-whatwg-encoding-custom-api-basics.js", "test-whatwg-encoding-custom-textdecoder-ignorebom.js", "test-whatwg-encoding-custom-textdecoder-streaming.js", "test-whatwg-events-add-event-listener-options-passive.js", "test-whatwg-events-add-event-listener-options-signal.js", "test-whatwg-events-customevent.js", + "test-whatwg-readablebytestreambyob.js", "test-whatwg-url-custom-deepequal.js", "test-whatwg-url-custom-global.js", "test-whatwg-url-custom-href-side-effect.js", "test-whatwg-url-custom-tostringtag.js", "test-whatwg-url-override-hostname.js", "test-whatwg-url-properties.js", + "test-worker-cleanexit-with-js.js", "test-worker-message-port-infinite-message-loop.js", "test-worker-message-port-multiple-sharedarraybuffers.js", "test-worker-message-port-receive-message.js", + "test-worker-on-process-exit.js", + "test-worker-ref-onexit.js", + "test-worker-terminate-unrefed.js", "test-zlib-close-after-error.js", "test-zlib-close-after-write.js", "test-zlib-convenience-methods.js", + "test-zlib-create-raw.js", "test-zlib-deflate-raw-inherits.js", "test-zlib-destroy-pipe.js", "test-zlib-empty-buffer.js", + "test-zlib-flush-write-sync-interleaved.js", "test-zlib-from-string.js", "test-zlib-invalid-input.js", "test-zlib-no-stream.js", @@ -760,14 +1262,38 @@ "console-dumb-tty.js", "no_dropped_stdio.js", "no_interleaved_stdio.js", + "test-set-raw-mode-reset-process-exit.js", + "test-set-raw-mode-reset.js", "test-tty-color-support-warning-2.js", "test-tty-color-support-warning.js", + "test-tty-stdin-call-end.js", "test-tty-stdin-end.js", "test-tty-stdout-end.js" ], - "pummel": [], + "pummel": [ + "test-crypto-dh-hash.js", + "test-crypto-timing-safe-equal-benchmarks.js", + "test-dh-regr.js", + "test-fs-largefile.js", + "test-fs-readfile-tostring-fail.js", + "test-fs-watch-system-limit.js", + "test-heapsnapshot-near-heap-limit-big.js", + "test-net-many-clients.js", + "test-net-pingpong-delay.js", + "test-process-cpuUsage.js", + "test-stream-pipe-multi.js" + ], "sequential": [ - "test-child-process-exit.js" + "test-buffer-creation-regression.js", + "test-child-process-exit.js", + "test-http-server-keep-alive-timeout-slow-server.js", + "test-net-connect-local-error.js", + "test-net-response-size.js", + "test-net-server-bind.js", + "test-tls-lookup.js", + "test-tls-psk-client.js", + "test-tls-securepair-client.js", + "test-tls-session-timeout.js" ] }, "windowsIgnore": { diff --git a/tests/node_compat/polyfill_globals.js b/tests/node_compat/polyfill_globals.js index f22143d9bd58ff..8bbd5cc7df9489 100644 --- a/tests/node_compat/polyfill_globals.js +++ b/tests/node_compat/polyfill_globals.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { Buffer } from "node:buffer"; import { clearImmediate, diff --git a/tests/node_compat/runner.ts b/tests/node_compat/runner.ts index 56803fad4437b2..6bc750447a447c 100644 --- a/tests/node_compat/runner.ts +++ b/tests/node_compat/runner.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import "./polyfill_globals.js"; import { createRequire } from "node:module"; import { toFileUrl } from "@std/path/to-file-url"; diff --git a/tests/node_compat/runner/TODO.md b/tests/node_compat/runner/TODO.md index 27c2ef3e789059..8ad00c9bfd337a 100644 --- a/tests/node_compat/runner/TODO.md +++ b/tests/node_compat/runner/TODO.md @@ -1,3092 +1,2552 @@ # Remaining Node Tests +1155 tests out of 3681 have been ported from Node 20.11.1 (31.38% ported, 69.14% remaining). + NOTE: This file should not be manually edited. Please edit `tests/node_compat/config.json` and run `deno task setup` in `tests/node_compat/runner` dir instead. -- [abort/test-abort-backtrace.js](https://github.com/nodejs/node/tree/v18.12.1/test/abort/test-abort-backtrace.js) -- [abort/test-abort-fatal-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/abort/test-abort-fatal-error.js) -- [abort/test-abort-uncaught-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/abort/test-abort-uncaught-exception.js) -- [abort/test-addon-register-signal-handler.js](https://github.com/nodejs/node/tree/v18.12.1/test/abort/test-addon-register-signal-handler.js) -- [abort/test-addon-uv-handle-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/abort/test-addon-uv-handle-leak.js) -- [abort/test-http-parser-consume.js](https://github.com/nodejs/node/tree/v18.12.1/test/abort/test-http-parser-consume.js) -- [abort/test-process-abort-exitcode.js](https://github.com/nodejs/node/tree/v18.12.1/test/abort/test-process-abort-exitcode.js) -- [abort/test-signal-handler.js](https://github.com/nodejs/node/tree/v18.12.1/test/abort/test-signal-handler.js) -- [abort/test-worker-abort-uncaught-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/abort/test-worker-abort-uncaught-exception.js) -- [abort/test-zlib-invalid-internals-usage.js](https://github.com/nodejs/node/tree/v18.12.1/test/abort/test-zlib-invalid-internals-usage.js) -- [benchmark/test-bechmark-readline.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-bechmark-readline.js) -- [benchmark/test-benchmark-assert.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-assert.js) -- [benchmark/test-benchmark-async-hooks.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-async-hooks.js) -- [benchmark/test-benchmark-blob.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-blob.js) -- [benchmark/test-benchmark-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-buffer.js) -- [benchmark/test-benchmark-child-process.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-child-process.js) -- [benchmark/test-benchmark-cluster.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-cluster.js) -- [benchmark/test-benchmark-crypto.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-crypto.js) -- [benchmark/test-benchmark-dgram.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-dgram.js) -- [benchmark/test-benchmark-dns.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-dns.js) -- [benchmark/test-benchmark-domain.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-domain.js) -- [benchmark/test-benchmark-es.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-es.js) -- [benchmark/test-benchmark-esm.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-esm.js) -- [benchmark/test-benchmark-events.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-events.js) -- [benchmark/test-benchmark-fs.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-fs.js) -- [benchmark/test-benchmark-http.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-http.js) -- [benchmark/test-benchmark-http2.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-http2.js) -- [benchmark/test-benchmark-mime.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-mime.js) -- [benchmark/test-benchmark-misc.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-misc.js) -- [benchmark/test-benchmark-module.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-module.js) -- [benchmark/test-benchmark-napi.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-napi.js) -- [benchmark/test-benchmark-net.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-net.js) -- [benchmark/test-benchmark-os.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-os.js) -- [benchmark/test-benchmark-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-path.js) -- [benchmark/test-benchmark-policy.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-policy.js) -- [benchmark/test-benchmark-process.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-process.js) -- [benchmark/test-benchmark-querystring.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-querystring.js) -- [benchmark/test-benchmark-streams.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-streams.js) -- [benchmark/test-benchmark-string_decoder.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-string_decoder.js) -- [benchmark/test-benchmark-timers.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-timers.js) -- [benchmark/test-benchmark-tls.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-tls.js) -- [benchmark/test-benchmark-url.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-url.js) -- [benchmark/test-benchmark-util.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-util.js) -- [benchmark/test-benchmark-v8.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-v8.js) -- [benchmark/test-benchmark-validators.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-validators.js) -- [benchmark/test-benchmark-vm.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-vm.js) -- [benchmark/test-benchmark-webstreams.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-webstreams.js) -- [benchmark/test-benchmark-worker.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-worker.js) -- [benchmark/test-benchmark-zlib.js](https://github.com/nodejs/node/tree/v18.12.1/test/benchmark/test-benchmark-zlib.js) -- [es-module/test-cjs-esm-warn.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-cjs-esm-warn.js) -- [es-module/test-cjs-legacyMainResolve-permission.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-cjs-legacyMainResolve-permission.js) -- [es-module/test-cjs-legacyMainResolve.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-cjs-legacyMainResolve.js) -- [es-module/test-cjs-prototype-pollution.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-cjs-prototype-pollution.js) -- [es-module/test-dynamic-import-script-lifetime.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-dynamic-import-script-lifetime.js) -- [es-module/test-esm-assertionless-json-import.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-assertionless-json-import.js) -- [es-module/test-esm-cjs-builtins.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-cjs-builtins.js) -- [es-module/test-esm-cjs-exports.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-cjs-exports.js) -- [es-module/test-esm-cjs-main.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-cjs-main.js) -- [es-module/test-esm-data-urls.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-data-urls.js) -- [es-module/test-esm-dynamic-import-attribute.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-dynamic-import-attribute.js) -- [es-module/test-esm-dynamic-import-commonjs.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-dynamic-import-commonjs.js) -- [es-module/test-esm-dynamic-import-mutating-fs.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-dynamic-import-mutating-fs.js) -- [es-module/test-esm-dynamic-import.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-dynamic-import.js) -- [es-module/test-esm-encoded-path-native.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-encoded-path-native.js) -- [es-module/test-esm-error-cache.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-error-cache.js) -- [es-module/test-esm-import-attributes-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-import-attributes-errors.js) -- [es-module/test-esm-import-attributes-validation.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-import-attributes-validation.js) -- [es-module/test-esm-invalid-data-urls.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-invalid-data-urls.js) -- [es-module/test-esm-invalid-pjson.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-invalid-pjson.js) -- [es-module/test-esm-loader-cache-clearing.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-loader-cache-clearing.js) -- [es-module/test-esm-loader-modulemap.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-loader-modulemap.js) -- [es-module/test-esm-loader-search.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-loader-search.js) -- [es-module/test-esm-named-exports.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-named-exports.js) -- [es-module/test-esm-preserve-symlinks-main.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-preserve-symlinks-main.js) -- [es-module/test-esm-preserve-symlinks.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-preserve-symlinks.js) -- [es-module/test-esm-repl-imports.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-repl-imports.js) -- [es-module/test-esm-repl.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-repl.js) -- [es-module/test-esm-symlink-main.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-symlink-main.js) -- [es-module/test-esm-symlink-type.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-symlink-type.js) -- [es-module/test-esm-symlink.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-symlink.js) -- [es-module/test-esm-type-field-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-type-field-errors.js) -- [es-module/test-esm-undefined-cjs-global-like-variables.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-undefined-cjs-global-like-variables.js) -- [es-module/test-esm-unknown-extension.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-unknown-extension.js) -- [es-module/test-esm-url-extname.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-url-extname.js) -- [es-module/test-esm-windows.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-esm-windows.js) -- [es-module/test-loaders-hidden-from-users.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-loaders-hidden-from-users.js) -- [es-module/test-vm-compile-function-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-vm-compile-function-leak.js) -- [es-module/test-vm-compile-function-lineoffset.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-vm-compile-function-lineoffset.js) -- [es-module/test-vm-contextified-script-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-vm-contextified-script-leak.js) -- [es-module/test-vm-source-text-module-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-vm-source-text-module-leak.js) -- [es-module/test-vm-synthetic-module-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-vm-synthetic-module-leak.js) -- [es-module/test-wasm-memory-out-of-bound.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-wasm-memory-out-of-bound.js) -- [es-module/test-wasm-simple.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-wasm-simple.js) -- [es-module/test-wasm-web-api.js](https://github.com/nodejs/node/tree/v18.12.1/test/es-module/test-wasm-web-api.js) -- [internet/test-corepack-yarn-install.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-corepack-yarn-install.js) -- [internet/test-dgram-broadcast-multi-process.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dgram-broadcast-multi-process.js) -- [internet/test-dgram-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dgram-connect.js) -- [internet/test-dgram-membership.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dgram-membership.js) -- [internet/test-dgram-multicast-multi-process.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dgram-multicast-multi-process.js) -- [internet/test-dgram-multicast-set-interface-lo.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dgram-multicast-set-interface-lo.js) -- [internet/test-dgram-multicast-ssm-multi-process.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dgram-multicast-ssm-multi-process.js) -- [internet/test-dgram-multicast-ssmv6-multi-process.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dgram-multicast-ssmv6-multi-process.js) -- [internet/test-dns-cares-domains.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dns-cares-domains.js) -- [internet/test-dns-getDefaultResultOrder.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dns-getDefaultResultOrder.js) -- [internet/test-dns-txt-sigsegv.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dns-txt-sigsegv.js) -- [internet/test-http-dns-fail.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-http-dns-fail.js) -- [internet/test-http2-issue-32922.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-http2-issue-32922.js) -- [internet/test-https-autoselectfamily-slow-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-https-autoselectfamily-slow-timeout.js) -- [internet/test-https-issue-43963.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-https-issue-43963.js) -- [internet/test-inspector-help-page.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-inspector-help-page.js) -- [internet/test-net-autoselectfamily-timeout-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-net-autoselectfamily-timeout-close.js) -- [internet/test-net-connect-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-net-connect-timeout.js) -- [internet/test-net-connect-unref.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-net-connect-unref.js) -- [internet/test-snapshot-dns-lookup.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-snapshot-dns-lookup.js) -- [internet/test-snapshot-dns-resolve.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-snapshot-dns-resolve.js) -- [internet/test-tls-add-ca-cert.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-tls-add-ca-cert.js) -- [internet/test-tls-autoselectfamily-backing-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-tls-autoselectfamily-backing-socket.js) -- [internet/test-tls-autoselectfamily-servername.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-tls-autoselectfamily-servername.js) -- [internet/test-trace-events-dns.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-trace-events-dns.js) -- [internet/test-uv-threadpool-schedule.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-uv-threadpool-schedule.js) -- [known_issues/test-cli-print-var-crypto.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-cli-print-var-crypto.js) -- [known_issues/test-cwd-enoent-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-cwd-enoent-file.js) -- [known_issues/test-dgram-bind-shared-ports-after-port-0.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-dgram-bind-shared-ports-after-port-0.js) -- [known_issues/test-fs-writeFileSync-invalid-windows.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-fs-writeFileSync-invalid-windows.js) -- [known_issues/test-http-path-contains-unicode.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-http-path-contains-unicode.js) -- [known_issues/test-inspector-cluster-port-clash.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-inspector-cluster-port-clash.js) -- [known_issues/test-permission-model-path-resolution.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-permission-model-path-resolution.js) -- [known_issues/test-repl-require-context.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-repl-require-context.js) -- [known_issues/test-stdin-is-always-net.socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-stdin-is-always-net.socket.js) -- [known_issues/test-stream-writable-sync-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-stream-writable-sync-error.js) -- [known_issues/test-url-parse-conformance.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-url-parse-conformance.js) -- [known_issues/test-vm-function-declaration-uses-define.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-vm-function-declaration-uses-define.js) -- [known_issues/test-vm-ownkeys.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-vm-ownkeys.js) -- [known_issues/test-vm-ownpropertynames.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-vm-ownpropertynames.js) -- [known_issues/test-vm-ownpropertysymbols.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-vm-ownpropertysymbols.js) -- [known_issues/test-vm-timeout-escape-nexttick.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-vm-timeout-escape-nexttick.js) -- [known_issues/test-vm-timeout-escape-queuemicrotask.js](https://github.com/nodejs/node/tree/v18.12.1/test/known_issues/test-vm-timeout-escape-queuemicrotask.js) -- [message/assert_throws_stack.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/assert_throws_stack.js) -- [message/eval_messages.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/eval_messages.js) -- [message/internal_assert.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/internal_assert.js) -- [message/internal_assert_fail.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/internal_assert_fail.js) -- [message/max_tick_depth.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/max_tick_depth.js) -- [message/nexttick_throw.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/nexttick_throw.js) -- [message/stdin_messages.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/stdin_messages.js) -- [message/util-inspect-error-cause.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/util-inspect-error-cause.js) -- [message/util_inspect_error.js](https://github.com/nodejs/node/tree/v18.12.1/test/message/util_inspect_error.js) -- [parallel/test-abortcontroller.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-abortcontroller.js) -- [parallel/test-aborted-util.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-aborted-util.js) -- [parallel/test-abortsignal-cloneable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-abortsignal-cloneable.js) -- [parallel/test-accessor-properties.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-accessor-properties.js) -- [parallel/test-arm-math-illegal-instruction.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-arm-math-illegal-instruction.js) -- [parallel/test-assert-builtins-not-read-from-filesystem.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-assert-builtins-not-read-from-filesystem.js) -- [parallel/test-assert-calltracker-calls.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-assert-calltracker-calls.js) -- [parallel/test-assert-calltracker-getCalls.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-assert-calltracker-getCalls.js) -- [parallel/test-assert-calltracker-report.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-assert-calltracker-report.js) -- [parallel/test-assert-calltracker-verify.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-assert-calltracker-verify.js) -- [parallel/test-assert-checktag.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-assert-checktag.js) -- [parallel/test-assert-deep.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-assert-deep.js) -- [parallel/test-assert-esm-cjs-message-verify.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-assert-esm-cjs-message-verify.js) -- [parallel/test-assert-fail-deprecation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-assert-fail-deprecation.js) -- [parallel/test-assert-first-line.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-assert-first-line.js) -- [parallel/test-assert-if-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-assert-if-error.js) -- [parallel/test-assert-typedarray-deepequal.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-assert-typedarray-deepequal.js) -- [parallel/test-async-hooks-async-await.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-async-await.js) -- [parallel/test-async-hooks-asyncresource-constructor.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-asyncresource-constructor.js) -- [parallel/test-async-hooks-close-during-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-close-during-destroy.js) -- [parallel/test-async-hooks-constructor.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-constructor.js) -- [parallel/test-async-hooks-correctly-switch-promise-hook.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-correctly-switch-promise-hook.js) -- [parallel/test-async-hooks-destroy-on-gc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-destroy-on-gc.js) -- [parallel/test-async-hooks-disable-during-promise.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-disable-during-promise.js) -- [parallel/test-async-hooks-disable-gc-tracking.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-disable-gc-tracking.js) -- [parallel/test-async-hooks-enable-before-promise-resolve.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-enable-before-promise-resolve.js) -- [parallel/test-async-hooks-enable-disable-enable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-enable-disable-enable.js) -- [parallel/test-async-hooks-enable-disable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-enable-disable.js) -- [parallel/test-async-hooks-enable-during-promise.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-enable-during-promise.js) -- [parallel/test-async-hooks-enable-recursive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-enable-recursive.js) -- [parallel/test-async-hooks-execution-async-resource-await.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-execution-async-resource-await.js) -- [parallel/test-async-hooks-execution-async-resource.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-execution-async-resource.js) -- [parallel/test-async-hooks-fatal-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-fatal-error.js) -- [parallel/test-async-hooks-http-agent-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-http-agent-destroy.js) -- [parallel/test-async-hooks-http-agent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-http-agent.js) -- [parallel/test-async-hooks-http-parser-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-http-parser-destroy.js) -- [parallel/test-async-hooks-prevent-double-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-prevent-double-destroy.js) -- [parallel/test-async-hooks-promise-enable-disable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-promise-enable-disable.js) -- [parallel/test-async-hooks-promise-triggerid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-promise-triggerid.js) -- [parallel/test-async-hooks-promise.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-promise.js) -- [parallel/test-async-hooks-recursive-stack-runInAsyncScope.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-recursive-stack-runInAsyncScope.js) -- [parallel/test-async-hooks-run-in-async-scope-caught-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-run-in-async-scope-caught-exception.js) -- [parallel/test-async-hooks-run-in-async-scope-this-arg.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-run-in-async-scope-this-arg.js) -- [parallel/test-async-hooks-top-level-clearimmediate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-top-level-clearimmediate.js) -- [parallel/test-async-hooks-vm-gc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-vm-gc.js) -- [parallel/test-async-hooks-worker-asyncfn-terminate-1.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-worker-asyncfn-terminate-1.js) -- [parallel/test-async-hooks-worker-asyncfn-terminate-2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-worker-asyncfn-terminate-2.js) -- [parallel/test-async-hooks-worker-asyncfn-terminate-3.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-worker-asyncfn-terminate-3.js) -- [parallel/test-async-hooks-worker-asyncfn-terminate-4.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-hooks-worker-asyncfn-terminate-4.js) -- [parallel/test-async-local-storage-bind.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-local-storage-bind.js) -- [parallel/test-async-local-storage-contexts.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-local-storage-contexts.js) -- [parallel/test-async-local-storage-deep-stack.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-local-storage-deep-stack.js) -- [parallel/test-async-local-storage-exit-does-not-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-local-storage-exit-does-not-leak.js) -- [parallel/test-async-local-storage-http-multiclients.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-local-storage-http-multiclients.js) -- [parallel/test-async-local-storage-snapshot.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-local-storage-snapshot.js) -- [parallel/test-async-wrap-constructor.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-wrap-constructor.js) -- [parallel/test-async-wrap-destroyid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-wrap-destroyid.js) -- [parallel/test-async-wrap-pop-id-during-load.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-wrap-pop-id-during-load.js) -- [parallel/test-async-wrap-promise-after-enabled.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-wrap-promise-after-enabled.js) -- [parallel/test-async-wrap-tlssocket-asyncreset.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-wrap-tlssocket-asyncreset.js) -- [parallel/test-async-wrap-trigger-id.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-wrap-trigger-id.js) -- [parallel/test-async-wrap-uncaughtexception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-async-wrap-uncaughtexception.js) -- [parallel/test-asyncresource-bind.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-asyncresource-bind.js) -- [parallel/test-atomics-wake.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-atomics-wake.js) -- [parallel/test-bash-completion.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-bash-completion.js) -- [parallel/test-beforeexit-event-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-beforeexit-event-exit.js) -- [parallel/test-benchmark-cli.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-benchmark-cli.js) -- [parallel/test-binding-constants.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-binding-constants.js) -- [parallel/test-blob-buffer-too-large.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-blob-buffer-too-large.js) -- [parallel/test-blob-createobjecturl.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-blob-createobjecturl.js) -- [parallel/test-blob-file-backed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-blob-file-backed.js) -- [parallel/test-blob.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-blob.js) -- [parallel/test-blocklist-clone.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-blocklist-clone.js) -- [parallel/test-bootstrap-modules.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-bootstrap-modules.js) -- [parallel/test-broadcastchannel-custom-inspect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-broadcastchannel-custom-inspect.js) -- [parallel/test-buffer-backing-arraybuffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-backing-arraybuffer.js) -- [parallel/test-buffer-compare.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-compare.js) -- [parallel/test-buffer-constructor-deprecation-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-constructor-deprecation-error.js) -- [parallel/test-buffer-constructor-node-modules-paths.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-constructor-node-modules-paths.js) -- [parallel/test-buffer-constructor-outside-node-modules.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-constructor-outside-node-modules.js) -- [parallel/test-buffer-fill.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-fill.js) -- [parallel/test-buffer-inspect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-inspect.js) -- [parallel/test-buffer-pending-deprecation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-pending-deprecation.js) -- [parallel/test-buffer-pool-untransferable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-pool-untransferable.js) -- [parallel/test-buffer-prototype-inspect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-prototype-inspect.js) -- [parallel/test-buffer-set-inspect-max-bytes.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-set-inspect-max-bytes.js) -- [parallel/test-buffer-sharedarraybuffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-sharedarraybuffer.js) -- [parallel/test-buffer-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-buffer-write.js) -- [parallel/test-c-ares.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-c-ares.js) -- [parallel/test-child-process-advanced-serialization-largebuffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-advanced-serialization-largebuffer.js) -- [parallel/test-child-process-advanced-serialization.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-advanced-serialization.js) -- [parallel/test-child-process-bad-stdio.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-bad-stdio.js) -- [parallel/test-child-process-can-write-to-stdout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-can-write-to-stdout.js) -- [parallel/test-child-process-constructor.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-constructor.js) -- [parallel/test-child-process-cwd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-cwd.js) -- [parallel/test-child-process-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-destroy.js) -- [parallel/test-child-process-detached.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-detached.js) -- [parallel/test-child-process-disconnect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-disconnect.js) -- [parallel/test-child-process-env.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-env.js) -- [parallel/test-child-process-exec-any-shells-windows.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-exec-any-shells-windows.js) -- [parallel/test-child-process-exec-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-exec-encoding.js) -- [parallel/test-child-process-exec-std-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-exec-std-encoding.js) -- [parallel/test-child-process-exec-timeout-expire.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-exec-timeout-expire.js) -- [parallel/test-child-process-exec-timeout-kill.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-exec-timeout-kill.js) -- [parallel/test-child-process-exec-timeout-not-expired.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-exec-timeout-not-expired.js) -- [parallel/test-child-process-execFile-promisified-abortController.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-execFile-promisified-abortController.js) -- [parallel/test-child-process-execfile.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-execfile.js) -- [parallel/test-child-process-exit-code.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-exit-code.js) -- [parallel/test-child-process-fork-abort-signal.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-abort-signal.js) -- [parallel/test-child-process-fork-and-spawn.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-and-spawn.js) -- [parallel/test-child-process-fork-args.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-args.js) -- [parallel/test-child-process-fork-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-close.js) -- [parallel/test-child-process-fork-closed-channel-segfault.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-closed-channel-segfault.js) -- [parallel/test-child-process-fork-detached.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-detached.js) -- [parallel/test-child-process-fork-dgram.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-dgram.js) -- [parallel/test-child-process-fork-exec-argv.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-exec-argv.js) -- [parallel/test-child-process-fork-exec-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-exec-path.js) -- [parallel/test-child-process-fork-getconnections.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-getconnections.js) -- [parallel/test-child-process-fork-net-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-net-server.js) -- [parallel/test-child-process-fork-net-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-net-socket.js) -- [parallel/test-child-process-fork-net.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-net.js) -- [parallel/test-child-process-fork-no-shell.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-no-shell.js) -- [parallel/test-child-process-fork-ref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-ref.js) -- [parallel/test-child-process-fork-ref2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-ref2.js) -- [parallel/test-child-process-fork-stdio-string-variant.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-stdio-string-variant.js) -- [parallel/test-child-process-fork-stdio.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-stdio.js) -- [parallel/test-child-process-fork-timeout-kill-signal.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork-timeout-kill-signal.js) -- [parallel/test-child-process-fork.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork.js) -- [parallel/test-child-process-fork3.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork3.js) -- [parallel/test-child-process-http-socket-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-http-socket-leak.js) -- [parallel/test-child-process-internal.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-internal.js) -- [parallel/test-child-process-ipc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-ipc.js) -- [parallel/test-child-process-no-deprecation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-no-deprecation.js) -- [parallel/test-child-process-pipe-dataflow.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-pipe-dataflow.js) -- [parallel/test-child-process-promisified.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-promisified.js) -- [parallel/test-child-process-recv-handle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-recv-handle.js) -- [parallel/test-child-process-reject-null-bytes.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-reject-null-bytes.js) -- [parallel/test-child-process-send-after-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-send-after-close.js) -- [parallel/test-child-process-send-cb.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-send-cb.js) -- [parallel/test-child-process-send-keep-open.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-send-keep-open.js) -- [parallel/test-child-process-send-returns-boolean.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-send-returns-boolean.js) -- [parallel/test-child-process-send-type-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-send-type-error.js) -- [parallel/test-child-process-send-utf8.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-send-utf8.js) -- [parallel/test-child-process-server-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-server-close.js) -- [parallel/test-child-process-silent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-silent.js) -- [parallel/test-child-process-spawn-argv0.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-spawn-argv0.js) -- [parallel/test-child-process-spawn-controller.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-spawn-controller.js) -- [parallel/test-child-process-spawn-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-spawn-error.js) -- [parallel/test-child-process-spawn-shell.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-spawn-shell.js) -- [parallel/test-child-process-spawn-timeout-kill-signal.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-spawn-timeout-kill-signal.js) -- [parallel/test-child-process-spawn-typeerror.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-spawn-typeerror.js) -- [parallel/test-child-process-spawnsync-env.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-spawnsync-env.js) -- [parallel/test-child-process-spawnsync-input.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-spawnsync-input.js) -- [parallel/test-child-process-spawnsync-kill-signal.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-spawnsync-kill-signal.js) -- [parallel/test-child-process-spawnsync-shell.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-spawnsync-shell.js) -- [parallel/test-child-process-spawnsync-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-spawnsync-timeout.js) -- [parallel/test-child-process-stdin-ipc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-stdin-ipc.js) -- [parallel/test-child-process-stdin.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-stdin.js) -- [parallel/test-child-process-stdio-big-write-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-stdio-big-write-end.js) -- [parallel/test-child-process-stdio-inherit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-stdio-inherit.js) -- [parallel/test-child-process-stdio-merge-stdouts-into-cat.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-stdio-merge-stdouts-into-cat.js) -- [parallel/test-child-process-stdio-overlapped.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-stdio-overlapped.js) -- [parallel/test-child-process-stdio-reuse-readable-stdio.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-stdio-reuse-readable-stdio.js) -- [parallel/test-child-process-stdio.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-stdio.js) -- [parallel/test-child-process-stdout-flush-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-stdout-flush-exit.js) -- [parallel/test-child-process-stdout-flush.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-stdout-flush.js) -- [parallel/test-child-process-stdout-ipc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-stdout-ipc.js) -- [parallel/test-child-process-uid-gid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-uid-gid.js) -- [parallel/test-child-process-validate-stdio.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-validate-stdio.js) -- [parallel/test-child-process-windows-hide.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-windows-hide.js) -- [parallel/test-cli-bad-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-bad-options.js) -- [parallel/test-cli-eval-event.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-eval-event.js) -- [parallel/test-cli-eval.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-eval.js) -- [parallel/test-cli-node-options-disallowed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-node-options-disallowed.js) -- [parallel/test-cli-node-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-node-options.js) -- [parallel/test-cli-node-print-help.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-node-print-help.js) -- [parallel/test-cli-options-negation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-options-negation.js) -- [parallel/test-cli-options-precedence.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-options-precedence.js) -- [parallel/test-cli-permission-deny-fs.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-permission-deny-fs.js) -- [parallel/test-cli-permission-multiple-allow.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-permission-multiple-allow.js) -- [parallel/test-cli-syntax-eval.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-syntax-eval.js) -- [parallel/test-cli-syntax-piped-bad.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-syntax-piped-bad.js) -- [parallel/test-cli-syntax-piped-good.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cli-syntax-piped-good.js) -- [parallel/test-client-request-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-client-request-destroy.js) -- [parallel/test-cluster-accept-fail.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-accept-fail.js) -- [parallel/test-cluster-advanced-serialization.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-advanced-serialization.js) -- [parallel/test-cluster-basic.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-basic.js) -- [parallel/test-cluster-bind-privileged-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-bind-privileged-port.js) -- [parallel/test-cluster-bind-twice.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-bind-twice.js) -- [parallel/test-cluster-call-and-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-call-and-destroy.js) -- [parallel/test-cluster-child-index-dgram.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-child-index-dgram.js) -- [parallel/test-cluster-child-index-net.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-child-index-net.js) -- [parallel/test-cluster-concurrent-disconnect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-concurrent-disconnect.js) -- [parallel/test-cluster-cwd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-cwd.js) -- [parallel/test-cluster-dgram-1.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-dgram-1.js) -- [parallel/test-cluster-dgram-2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-dgram-2.js) -- [parallel/test-cluster-dgram-bind-fd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-dgram-bind-fd.js) -- [parallel/test-cluster-dgram-ipv6only.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-dgram-ipv6only.js) -- [parallel/test-cluster-dgram-reuse.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-dgram-reuse.js) -- [parallel/test-cluster-disconnect-before-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-disconnect-before-exit.js) -- [parallel/test-cluster-disconnect-exitedAfterDisconnect-race.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-disconnect-exitedAfterDisconnect-race.js) -- [parallel/test-cluster-disconnect-idle-worker.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-disconnect-idle-worker.js) -- [parallel/test-cluster-disconnect-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-disconnect-leak.js) -- [parallel/test-cluster-disconnect-race.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-disconnect-race.js) -- [parallel/test-cluster-disconnect-unshared-tcp.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-disconnect-unshared-tcp.js) -- [parallel/test-cluster-disconnect-unshared-udp.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-disconnect-unshared-udp.js) -- [parallel/test-cluster-disconnect-with-no-workers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-disconnect-with-no-workers.js) -- [parallel/test-cluster-disconnect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-disconnect.js) -- [parallel/test-cluster-eaccess.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-eaccess.js) -- [parallel/test-cluster-eaddrinuse.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-eaddrinuse.js) -- [parallel/test-cluster-fork-env.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-fork-env.js) -- [parallel/test-cluster-fork-stdio.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-fork-stdio.js) -- [parallel/test-cluster-fork-windowsHide.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-fork-windowsHide.js) -- [parallel/test-cluster-http-pipe.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-http-pipe.js) -- [parallel/test-cluster-invalid-message.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-invalid-message.js) -- [parallel/test-cluster-ipc-throw.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-ipc-throw.js) -- [parallel/test-cluster-kill-disconnect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-kill-disconnect.js) -- [parallel/test-cluster-kill-infinite-loop.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-kill-infinite-loop.js) -- [parallel/test-cluster-listen-pipe-readable-writable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-listen-pipe-readable-writable.js) -- [parallel/test-cluster-listening-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-listening-port.js) -- [parallel/test-cluster-message.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-message.js) -- [parallel/test-cluster-net-listen-backlog.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-net-listen-backlog.js) -- [parallel/test-cluster-net-listen-ipv6only-false.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-net-listen-ipv6only-false.js) -- [parallel/test-cluster-net-listen-relative-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-net-listen-relative-path.js) -- [parallel/test-cluster-net-listen.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-net-listen.js) -- [parallel/test-cluster-net-send.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-net-send.js) -- [parallel/test-cluster-net-server-drop-connection.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-net-server-drop-connection.js) -- [parallel/test-cluster-primary-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-primary-error.js) -- [parallel/test-cluster-primary-kill.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-primary-kill.js) -- [parallel/test-cluster-process-disconnect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-process-disconnect.js) -- [parallel/test-cluster-rr-domain-listen.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-rr-domain-listen.js) -- [parallel/test-cluster-rr-handle-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-rr-handle-close.js) -- [parallel/test-cluster-rr-handle-keep-loop-alive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-rr-handle-keep-loop-alive.js) -- [parallel/test-cluster-rr-handle-ref-unref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-rr-handle-ref-unref.js) -- [parallel/test-cluster-rr-ref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-rr-ref.js) -- [parallel/test-cluster-send-deadlock.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-send-deadlock.js) -- [parallel/test-cluster-send-handle-twice.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-send-handle-twice.js) -- [parallel/test-cluster-send-socket-to-worker-http-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-send-socket-to-worker-http-server.js) -- [parallel/test-cluster-server-restart-none.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-server-restart-none.js) -- [parallel/test-cluster-server-restart-rr.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-server-restart-rr.js) -- [parallel/test-cluster-setup-primary-argv.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-setup-primary-argv.js) -- [parallel/test-cluster-setup-primary-cumulative.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-setup-primary-cumulative.js) -- [parallel/test-cluster-setup-primary-emit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-setup-primary-emit.js) -- [parallel/test-cluster-setup-primary-multiple.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-setup-primary-multiple.js) -- [parallel/test-cluster-setup-primary.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-setup-primary.js) -- [parallel/test-cluster-shared-handle-bind-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-shared-handle-bind-error.js) -- [parallel/test-cluster-shared-handle-bind-privileged-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-shared-handle-bind-privileged-port.js) -- [parallel/test-cluster-shared-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-shared-leak.js) -- [parallel/test-cluster-uncaught-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-uncaught-exception.js) -- [parallel/test-cluster-worker-constructor.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-constructor.js) -- [parallel/test-cluster-worker-death.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-death.js) -- [parallel/test-cluster-worker-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-destroy.js) -- [parallel/test-cluster-worker-disconnect-on-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-disconnect-on-error.js) -- [parallel/test-cluster-worker-disconnect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-disconnect.js) -- [parallel/test-cluster-worker-events.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-events.js) -- [parallel/test-cluster-worker-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-exit.js) -- [parallel/test-cluster-worker-forced-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-forced-exit.js) -- [parallel/test-cluster-worker-handle-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-handle-close.js) -- [parallel/test-cluster-worker-init.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-init.js) -- [parallel/test-cluster-worker-isconnected.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-isconnected.js) -- [parallel/test-cluster-worker-isdead.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-isdead.js) -- [parallel/test-cluster-worker-kill-signal.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-kill-signal.js) -- [parallel/test-cluster-worker-kill.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-kill.js) -- [parallel/test-cluster-worker-no-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-no-exit.js) -- [parallel/test-cluster-worker-wait-server-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-wait-server-close.js) -- [parallel/test-code-cache.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-code-cache.js) -- [parallel/test-common-countdown.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-common-countdown.js) -- [parallel/test-common-expect-warning.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-common-expect-warning.js) -- [parallel/test-common-gc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-common-gc.js) -- [parallel/test-common-must-not-call.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-common-must-not-call.js) -- [parallel/test-common.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-common.js) -- [parallel/test-console-assign-undefined.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-console-assign-undefined.js) -- [parallel/test-console-clear.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-console-clear.js) -- [parallel/test-console-count.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-console-count.js) -- [parallel/test-console-formatTime.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-console-formatTime.js) -- [parallel/test-console-instance.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-console-instance.js) -- [parallel/test-console-issue-43095.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-console-issue-43095.js) -- [parallel/test-console-methods.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-console-methods.js) -- [parallel/test-console-not-call-toString.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-console-not-call-toString.js) -- [parallel/test-console-self-assign.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-console-self-assign.js) -- [parallel/test-console-stdio-setters.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-console-stdio-setters.js) -- [parallel/test-console.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-console.js) -- [parallel/test-constants.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-constants.js) -- [parallel/test-corepack-version.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-corepack-version.js) -- [parallel/test-coverage-with-inspector-disabled.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-coverage-with-inspector-disabled.js) -- [parallel/test-crypto-aes-wrap.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-aes-wrap.js) -- [parallel/test-crypto-async-sign-verify.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-async-sign-verify.js) -- [parallel/test-crypto-authenticated-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-authenticated-stream.js) -- [parallel/test-crypto-authenticated.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-authenticated.js) -- [parallel/test-crypto-certificate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-certificate.js) -- [parallel/test-crypto-cipher-decipher.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-cipher-decipher.js) -- [parallel/test-crypto-cipheriv-decipheriv.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-cipheriv-decipheriv.js) -- [parallel/test-crypto-classes.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-classes.js) -- [parallel/test-crypto-des3-wrap.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-des3-wrap.js) -- [parallel/test-crypto-dh-constructor.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-dh-constructor.js) -- [parallel/test-crypto-dh-curves.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-dh-curves.js) -- [parallel/test-crypto-dh-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-dh-errors.js) -- [parallel/test-crypto-dh-generate-keys.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-dh-generate-keys.js) -- [parallel/test-crypto-dh-group-setters.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-dh-group-setters.js) -- [parallel/test-crypto-dh-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-dh-leak.js) -- [parallel/test-crypto-dh-modp2-views.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-dh-modp2-views.js) -- [parallel/test-crypto-dh-modp2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-dh-modp2.js) -- [parallel/test-crypto-dh-odd-key.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-dh-odd-key.js) -- [parallel/test-crypto-dh-padding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-dh-padding.js) -- [parallel/test-crypto-dh-stateless.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-dh-stateless.js) -- [parallel/test-crypto-domain.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-domain.js) -- [parallel/test-crypto-domains.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-domains.js) -- [parallel/test-crypto-ecb.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-ecb.js) -- [parallel/test-crypto-ecdh-convert-key.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-ecdh-convert-key.js) -- [parallel/test-crypto-encoding-validation-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-encoding-validation-error.js) -- [parallel/test-crypto-fips.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-fips.js) -- [parallel/test-crypto-from-binary.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-from-binary.js) -- [parallel/test-crypto-getcipherinfo.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-getcipherinfo.js) -- [parallel/test-crypto-hash-stream-pipe.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-hash-stream-pipe.js) -- [parallel/test-crypto-key-objects-messageport.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-key-objects-messageport.js) -- [parallel/test-crypto-key-objects.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-key-objects.js) -- [parallel/test-crypto-keygen-async-dsa-key-object.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-dsa-key-object.js) -- [parallel/test-crypto-keygen-async-dsa.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-dsa.js) -- [parallel/test-crypto-keygen-async-elliptic-curve-jwk-ec.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-elliptic-curve-jwk-ec.js) -- [parallel/test-crypto-keygen-async-elliptic-curve-jwk-rsa.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-elliptic-curve-jwk-rsa.js) -- [parallel/test-crypto-keygen-async-elliptic-curve-jwk.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-elliptic-curve-jwk.js) -- [parallel/test-crypto-keygen-async-encrypted-private-key-der.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-encrypted-private-key-der.js) -- [parallel/test-crypto-keygen-async-encrypted-private-key.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-encrypted-private-key.js) -- [parallel/test-crypto-keygen-async-explicit-elliptic-curve-encrypted-p256.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-explicit-elliptic-curve-encrypted-p256.js) -- [parallel/test-crypto-keygen-async-explicit-elliptic-curve-encrypted.js.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-explicit-elliptic-curve-encrypted.js.js) -- [parallel/test-crypto-keygen-async-explicit-elliptic-curve.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-explicit-elliptic-curve.js) -- [parallel/test-crypto-keygen-async-named-elliptic-curve-encrypted-p256.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-named-elliptic-curve-encrypted-p256.js) -- [parallel/test-crypto-keygen-async-named-elliptic-curve-encrypted.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-named-elliptic-curve-encrypted.js) -- [parallel/test-crypto-keygen-async-named-elliptic-curve.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-named-elliptic-curve.js) -- [parallel/test-crypto-keygen-async-rsa.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-async-rsa.js) -- [parallel/test-crypto-keygen-bit-length.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-bit-length.js) -- [parallel/test-crypto-keygen-deprecation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-deprecation.js) -- [parallel/test-crypto-keygen-dh-classic.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-dh-classic.js) -- [parallel/test-crypto-keygen-duplicate-deprecated-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-duplicate-deprecated-option.js) -- [parallel/test-crypto-keygen-eddsa.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-eddsa.js) -- [parallel/test-crypto-keygen-empty-passphrase-no-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-empty-passphrase-no-error.js) -- [parallel/test-crypto-keygen-empty-passphrase-no-prompt.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-empty-passphrase-no-prompt.js) -- [parallel/test-crypto-keygen-invalid-parameter-encoding-dsa.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-invalid-parameter-encoding-dsa.js) -- [parallel/test-crypto-keygen-invalid-parameter-encoding-ec.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-invalid-parameter-encoding-ec.js) -- [parallel/test-crypto-keygen-key-object-without-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-key-object-without-encoding.js) -- [parallel/test-crypto-keygen-key-objects.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-key-objects.js) -- [parallel/test-crypto-keygen-missing-oid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-missing-oid.js) -- [parallel/test-crypto-keygen-no-rsassa-pss-params.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-no-rsassa-pss-params.js) -- [parallel/test-crypto-keygen-non-standard-public-exponent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-non-standard-public-exponent.js) -- [parallel/test-crypto-keygen-promisify.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-promisify.js) -- [parallel/test-crypto-keygen-rfc8017-9-1.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-rfc8017-9-1.js) -- [parallel/test-crypto-keygen-rfc8017-a-2-3.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-rfc8017-a-2-3.js) -- [parallel/test-crypto-keygen-rsa-pss.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-rsa-pss.js) -- [parallel/test-crypto-keygen-sync.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen-sync.js) -- [parallel/test-crypto-keygen.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-keygen.js) -- [parallel/test-crypto-lazy-transform-writable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-lazy-transform-writable.js) -- [parallel/test-crypto-no-algorithm.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-no-algorithm.js) -- [parallel/test-crypto-op-during-process-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-op-during-process-exit.js) -- [parallel/test-crypto-padding-aes256.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-padding-aes256.js) -- [parallel/test-crypto-padding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-padding.js) -- [parallel/test-crypto-private-decrypt-gh32240.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-private-decrypt-gh32240.js) -- [parallel/test-crypto-psychic-signatures.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-psychic-signatures.js) -- [parallel/test-crypto-publicDecrypt-fails-first-time.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-publicDecrypt-fails-first-time.js) -- [parallel/test-crypto-random.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-random.js) -- [parallel/test-crypto-randomfillsync-regression.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-randomfillsync-regression.js) -- [parallel/test-crypto-randomuuid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-randomuuid.js) -- [parallel/test-crypto-rsa-dsa-revert.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-rsa-dsa-revert.js) -- [parallel/test-crypto-rsa-dsa.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-rsa-dsa.js) -- [parallel/test-crypto-scrypt.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-scrypt.js) -- [parallel/test-crypto-secure-heap.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-secure-heap.js) -- [parallel/test-crypto-sign-verify.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-sign-verify.js) -- [parallel/test-crypto-subtle-zero-length.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-subtle-zero-length.js) -- [parallel/test-crypto-verify-failure.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-verify-failure.js) -- [parallel/test-crypto-webcrypto-aes-decrypt-tag-too-small.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-webcrypto-aes-decrypt-tag-too-small.js) -- [parallel/test-crypto-worker-thread.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto-worker-thread.js) -- [parallel/test-crypto.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-crypto.js) -- [parallel/test-cwd-enoent-preload.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cwd-enoent-preload.js) -- [parallel/test-cwd-enoent-repl.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cwd-enoent-repl.js) -- [parallel/test-cwd-enoent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cwd-enoent.js) -- [parallel/test-datetime-change-notify.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-datetime-change-notify.js) -- [parallel/test-debugger-backtrace.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-backtrace.js) -- [parallel/test-debugger-break.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-break.js) -- [parallel/test-debugger-breakpoint-exists.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-breakpoint-exists.js) -- [parallel/test-debugger-clear-breakpoints.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-clear-breakpoints.js) -- [parallel/test-debugger-exceptions.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-exceptions.js) -- [parallel/test-debugger-exec.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-exec.js) -- [parallel/test-debugger-heap-profiler.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-heap-profiler.js) -- [parallel/test-debugger-list.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-list.js) -- [parallel/test-debugger-low-level.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-low-level.js) -- [parallel/test-debugger-object-type-remote-object.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-object-type-remote-object.js) -- [parallel/test-debugger-pid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-pid.js) -- [parallel/test-debugger-preserve-breaks.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-preserve-breaks.js) -- [parallel/test-debugger-profile-command.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-profile-command.js) -- [parallel/test-debugger-profile.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-profile.js) -- [parallel/test-debugger-random-port-with-inspect-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-random-port-with-inspect-port.js) -- [parallel/test-debugger-random-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-random-port.js) -- [parallel/test-debugger-repeat-last.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-repeat-last.js) -- [parallel/test-debugger-restart-message.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-restart-message.js) -- [parallel/test-debugger-run-after-quit-restart.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-run-after-quit-restart.js) -- [parallel/test-debugger-sb-before-load.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-sb-before-load.js) -- [parallel/test-debugger-scripts.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-scripts.js) -- [parallel/test-debugger-unavailable-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-unavailable-port.js) -- [parallel/test-debugger-use-strict.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-use-strict.js) -- [parallel/test-debugger-watch-validation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-watch-validation.js) -- [parallel/test-debugger-websocket-secret-mismatch.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-debugger-websocket-secret-mismatch.js) -- [parallel/test-delayed-require.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-delayed-require.js) -- [parallel/test-dgram-abort-closed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-abort-closed.js) -- [parallel/test-dgram-address.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-address.js) -- [parallel/test-dgram-bind-default-address.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-bind-default-address.js) -- [parallel/test-dgram-bind-error-repeat.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-bind-error-repeat.js) -- [parallel/test-dgram-bind-fd-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-bind-fd-error.js) -- [parallel/test-dgram-bind-fd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-bind-fd.js) -- [parallel/test-dgram-bind.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-bind.js) -- [parallel/test-dgram-bytes-length.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-bytes-length.js) -- [parallel/test-dgram-close-in-listening.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-close-in-listening.js) -- [parallel/test-dgram-close-is-not-callback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-close-is-not-callback.js) -- [parallel/test-dgram-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-close.js) -- [parallel/test-dgram-cluster-bind-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-cluster-bind-error.js) -- [parallel/test-dgram-cluster-close-during-bind.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-cluster-close-during-bind.js) -- [parallel/test-dgram-cluster-close-in-listening.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-cluster-close-in-listening.js) -- [parallel/test-dgram-connect-send-callback-buffer-length.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-connect-send-callback-buffer-length.js) -- [parallel/test-dgram-connect-send-callback-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-connect-send-callback-buffer.js) -- [parallel/test-dgram-connect-send-callback-multi-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-connect-send-callback-multi-buffer.js) -- [parallel/test-dgram-connect-send-default-host.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-connect-send-default-host.js) -- [parallel/test-dgram-connect-send-empty-array.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-connect-send-empty-array.js) -- [parallel/test-dgram-connect-send-empty-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-connect-send-empty-buffer.js) -- [parallel/test-dgram-connect-send-empty-packet.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-connect-send-empty-packet.js) -- [parallel/test-dgram-connect-send-multi-buffer-copy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-connect-send-multi-buffer-copy.js) -- [parallel/test-dgram-connect-send-multi-string-array.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-connect-send-multi-string-array.js) -- [parallel/test-dgram-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-connect.js) -- [parallel/test-dgram-create-socket-handle-fd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-create-socket-handle-fd.js) -- [parallel/test-dgram-create-socket-handle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-create-socket-handle.js) -- [parallel/test-dgram-createSocket-type.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-createSocket-type.js) -- [parallel/test-dgram-custom-lookup.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-custom-lookup.js) -- [parallel/test-dgram-deprecation-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-deprecation-error.js) -- [parallel/test-dgram-error-message-address.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-error-message-address.js) -- [parallel/test-dgram-exclusive-implicit-bind.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-exclusive-implicit-bind.js) -- [parallel/test-dgram-implicit-bind.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-implicit-bind.js) -- [parallel/test-dgram-ipv6only.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-ipv6only.js) -- [parallel/test-dgram-listen-after-bind.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-listen-after-bind.js) -- [parallel/test-dgram-membership.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-membership.js) -- [parallel/test-dgram-msgsize.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-msgsize.js) -- [parallel/test-dgram-multicast-loopback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-multicast-loopback.js) -- [parallel/test-dgram-multicast-set-interface.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-multicast-set-interface.js) -- [parallel/test-dgram-multicast-setTTL.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-multicast-setTTL.js) -- [parallel/test-dgram-oob-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-oob-buffer.js) -- [parallel/test-dgram-recv-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-recv-error.js) -- [parallel/test-dgram-ref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-ref.js) -- [parallel/test-dgram-send-address-types.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-address-types.js) -- [parallel/test-dgram-send-bad-arguments.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-bad-arguments.js) -- [parallel/test-dgram-send-callback-buffer-empty-address.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-callback-buffer-empty-address.js) -- [parallel/test-dgram-send-callback-buffer-length-empty-address.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-callback-buffer-length-empty-address.js) -- [parallel/test-dgram-send-callback-buffer-length.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-callback-buffer-length.js) -- [parallel/test-dgram-send-callback-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-callback-buffer.js) -- [parallel/test-dgram-send-callback-multi-buffer-empty-address.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-callback-multi-buffer-empty-address.js) -- [parallel/test-dgram-send-callback-multi-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-callback-multi-buffer.js) -- [parallel/test-dgram-send-callback-recursive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-callback-recursive.js) -- [parallel/test-dgram-send-cb-quelches-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-cb-quelches-error.js) -- [parallel/test-dgram-send-default-host.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-default-host.js) -- [parallel/test-dgram-send-empty-array.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-empty-array.js) -- [parallel/test-dgram-send-empty-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-empty-buffer.js) -- [parallel/test-dgram-send-empty-packet.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-empty-packet.js) -- [parallel/test-dgram-send-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-error.js) -- [parallel/test-dgram-send-invalid-msg-type.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-invalid-msg-type.js) -- [parallel/test-dgram-send-multi-buffer-copy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-multi-buffer-copy.js) -- [parallel/test-dgram-send-multi-string-array.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-multi-string-array.js) -- [parallel/test-dgram-send-queue-info.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-send-queue-info.js) -- [parallel/test-dgram-sendto.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-sendto.js) -- [parallel/test-dgram-setBroadcast.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-setBroadcast.js) -- [parallel/test-dgram-setTTL.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-setTTL.js) -- [parallel/test-dgram-socket-buffer-size.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-socket-buffer-size.js) -- [parallel/test-dgram-udp4.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-udp4.js) -- [parallel/test-dgram-udp6-link-local-address.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-udp6-link-local-address.js) -- [parallel/test-dgram-udp6-send-default-host.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-udp6-send-default-host.js) -- [parallel/test-dgram-unref-in-cluster.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-unref-in-cluster.js) -- [parallel/test-dgram-unref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dgram-unref.js) -- [parallel/test-diagnostics-channel-bind-store.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-bind-store.js) -- [parallel/test-diagnostics-channel-http-server-start.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-http-server-start.js) -- [parallel/test-diagnostics-channel-http.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-http.js) -- [parallel/test-diagnostics-channel-memory-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-memory-leak.js) -- [parallel/test-diagnostics-channel-process.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-process.js) -- [parallel/test-diagnostics-channel-safe-subscriber-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-safe-subscriber-errors.js) -- [parallel/test-diagnostics-channel-tracing-channel-async-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-tracing-channel-async-error.js) -- [parallel/test-diagnostics-channel-tracing-channel-async.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-tracing-channel-async.js) -- [parallel/test-diagnostics-channel-tracing-channel-run-stores.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-tracing-channel-run-stores.js) -- [parallel/test-diagnostics-channel-worker-threads.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-diagnostics-channel-worker-threads.js) -- [parallel/test-directory-import.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-directory-import.js) -- [parallel/test-disable-proto-delete.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-disable-proto-delete.js) -- [parallel/test-disable-proto-throw.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-disable-proto-throw.js) -- [parallel/test-dns-cancel-reverse-lookup.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-cancel-reverse-lookup.js) -- [parallel/test-dns-channel-cancel-promise.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-channel-cancel-promise.js) -- [parallel/test-dns-channel-cancel.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-channel-cancel.js) -- [parallel/test-dns-channel-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-channel-timeout.js) -- [parallel/test-dns-default-verbatim-false.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-default-verbatim-false.js) -- [parallel/test-dns-default-verbatim-true.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-default-verbatim-true.js) -- [parallel/test-dns-get-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-get-server.js) -- [parallel/test-dns-lookup-promises-options-deprecated.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-lookup-promises-options-deprecated.js) -- [parallel/test-dns-lookup-promises.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-lookup-promises.js) -- [parallel/test-dns-lookupService-promises.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-lookupService-promises.js) -- [parallel/test-dns-lookupService.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-lookupService.js) -- [parallel/test-dns-multi-channel.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-multi-channel.js) -- [parallel/test-dns-perf_hooks.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-perf_hooks.js) -- [parallel/test-dns-resolve-promises.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-resolve-promises.js) -- [parallel/test-dns-resolveany-bad-ancount.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-resolveany-bad-ancount.js) -- [parallel/test-dns-resolveany.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-resolveany.js) -- [parallel/test-dns-set-default-order.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-set-default-order.js) -- [parallel/test-dns-setlocaladdress.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-setlocaladdress.js) -- [parallel/test-dns-setserver-when-querying.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns-setserver-when-querying.js) -- [parallel/test-dns.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dns.js) -- [parallel/test-domain-abort-on-uncaught.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-abort-on-uncaught.js) -- [parallel/test-domain-add-remove.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-add-remove.js) -- [parallel/test-domain-async-id-map-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-async-id-map-leak.js) -- [parallel/test-domain-bind-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-bind-timeout.js) -- [parallel/test-domain-crypto.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-crypto.js) -- [parallel/test-domain-dep0097.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-dep0097.js) -- [parallel/test-domain-ee-error-listener.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-ee-error-listener.js) -- [parallel/test-domain-ee-implicit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-ee-implicit.js) -- [parallel/test-domain-ee.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-ee.js) -- [parallel/test-domain-emit-error-handler-stack.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-emit-error-handler-stack.js) -- [parallel/test-domain-enter-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-enter-exit.js) -- [parallel/test-domain-error-types.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-error-types.js) -- [parallel/test-domain-from-timer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-from-timer.js) -- [parallel/test-domain-fs-enoent-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-fs-enoent-stream.js) -- [parallel/test-domain-http-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-http-server.js) -- [parallel/test-domain-implicit-binding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-implicit-binding.js) -- [parallel/test-domain-implicit-fs.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-implicit-fs.js) -- [parallel/test-domain-intercept.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-intercept.js) -- [parallel/test-domain-load-after-set-uncaught-exception-capture.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-load-after-set-uncaught-exception-capture.js) -- [parallel/test-domain-multi.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-multi.js) -- [parallel/test-domain-multiple-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-multiple-errors.js) -- [parallel/test-domain-nested-throw.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-nested-throw.js) -- [parallel/test-domain-nested.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-nested.js) -- [parallel/test-domain-nexttick.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-nexttick.js) -- [parallel/test-domain-no-error-handler-abort-on-uncaught-0.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-0.js) -- [parallel/test-domain-no-error-handler-abort-on-uncaught-1.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-1.js) -- [parallel/test-domain-no-error-handler-abort-on-uncaught-2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-2.js) -- [parallel/test-domain-no-error-handler-abort-on-uncaught-3.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-3.js) -- [parallel/test-domain-no-error-handler-abort-on-uncaught-4.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-4.js) -- [parallel/test-domain-no-error-handler-abort-on-uncaught-5.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-5.js) -- [parallel/test-domain-no-error-handler-abort-on-uncaught-6.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-6.js) -- [parallel/test-domain-no-error-handler-abort-on-uncaught-7.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-7.js) -- [parallel/test-domain-no-error-handler-abort-on-uncaught-8.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-8.js) -- [parallel/test-domain-no-error-handler-abort-on-uncaught-9.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-9.js) -- [parallel/test-domain-promise.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-promise.js) -- [parallel/test-domain-run.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-run.js) -- [parallel/test-domain-safe-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-safe-exit.js) -- [parallel/test-domain-set-uncaught-exception-capture-after-load.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-set-uncaught-exception-capture-after-load.js) -- [parallel/test-domain-stack-empty-in-process-uncaughtexception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-stack-empty-in-process-uncaughtexception.js) -- [parallel/test-domain-stack.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-stack.js) -- [parallel/test-domain-throw-error-then-throw-from-uncaught-exception-handler.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-throw-error-then-throw-from-uncaught-exception-handler.js) -- [parallel/test-domain-thrown-error-handler-stack.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-thrown-error-handler-stack.js) -- [parallel/test-domain-timer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-timer.js) -- [parallel/test-domain-timers-uncaught-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-timers-uncaught-exception.js) -- [parallel/test-domain-timers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-timers.js) -- [parallel/test-domain-top-level-error-handler-clears-stack.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-top-level-error-handler-clears-stack.js) -- [parallel/test-domain-top-level-error-handler-throw.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-top-level-error-handler-throw.js) -- [parallel/test-domain-uncaught-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-uncaught-exception.js) -- [parallel/test-domain-vm-promise-isolation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-vm-promise-isolation.js) -- [parallel/test-domain-with-abort-on-uncaught-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domain-with-abort-on-uncaught-exception.js) -- [parallel/test-domexception-cause.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-domexception-cause.js) -- [parallel/test-dotenv-edge-cases.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dotenv-edge-cases.js) -- [parallel/test-dotenv-node-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dotenv-node-options.js) -- [parallel/test-dotenv.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dotenv.js) -- [parallel/test-double-tls-client.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-double-tls-client.js) -- [parallel/test-double-tls-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-double-tls-server.js) -- [parallel/test-dsa-fips-invalid-key.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dsa-fips-invalid-key.js) -- [parallel/test-dummy-stdio.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-dummy-stdio.js) -- [parallel/test-emit-after-uncaught-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-emit-after-uncaught-exception.js) -- [parallel/test-env-newprotomethod-remove-unnecessary-prototypes.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-env-newprotomethod-remove-unnecessary-prototypes.js) -- [parallel/test-env-var-no-warnings.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-env-var-no-warnings.js) -- [parallel/test-err-name-deprecation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-err-name-deprecation.js) -- [parallel/test-error-aggregateTwoErrors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-error-aggregateTwoErrors.js) -- [parallel/test-error-format-list.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-error-format-list.js) -- [parallel/test-error-prepare-stack-trace.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-error-prepare-stack-trace.js) -- [parallel/test-error-reporting.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-error-reporting.js) -- [parallel/test-error-serdes.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-error-serdes.js) -- [parallel/test-errors-aborterror.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-errors-aborterror.js) -- [parallel/test-errors-systemerror-frozen-intrinsics.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-errors-systemerror-frozen-intrinsics.js) -- [parallel/test-errors-systemerror-stackTraceLimit-custom-setter.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-errors-systemerror-stackTraceLimit-custom-setter.js) -- [parallel/test-errors-systemerror-stackTraceLimit-deleted-and-Error-sealed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-errors-systemerror-stackTraceLimit-deleted-and-Error-sealed.js) -- [parallel/test-errors-systemerror-stackTraceLimit-deleted.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-errors-systemerror-stackTraceLimit-deleted.js) -- [parallel/test-errors-systemerror-stackTraceLimit-has-only-a-getter.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-errors-systemerror-stackTraceLimit-has-only-a-getter.js) -- [parallel/test-errors-systemerror-stackTraceLimit-not-writable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-errors-systemerror-stackTraceLimit-not-writable.js) -- [parallel/test-errors-systemerror.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-errors-systemerror.js) -- [parallel/test-eslint-alphabetize-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-alphabetize-errors.js) -- [parallel/test-eslint-async-iife-no-unused-result.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-async-iife-no-unused-result.js) -- [parallel/test-eslint-avoid-prototype-pollution.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-avoid-prototype-pollution.js) -- [parallel/test-eslint-crypto-check.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-crypto-check.js) -- [parallel/test-eslint-documented-deprecation-codes.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-documented-deprecation-codes.js) -- [parallel/test-eslint-documented-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-documented-errors.js) -- [parallel/test-eslint-duplicate-requires.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-duplicate-requires.js) -- [parallel/test-eslint-eslint-check.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-eslint-check.js) -- [parallel/test-eslint-inspector-check.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-inspector-check.js) -- [parallel/test-eslint-lowercase-name-for-primitive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-lowercase-name-for-primitive.js) -- [parallel/test-eslint-no-array-destructuring.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-no-array-destructuring.js) -- [parallel/test-eslint-no-unescaped-regexp-dot.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-no-unescaped-regexp-dot.js) -- [parallel/test-eslint-non-ascii-character.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-non-ascii-character.js) -- [parallel/test-eslint-prefer-assert-iferror.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-prefer-assert-iferror.js) -- [parallel/test-eslint-prefer-assert-methods.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-prefer-assert-methods.js) -- [parallel/test-eslint-prefer-common-mustnotcall.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-prefer-common-mustnotcall.js) -- [parallel/test-eslint-prefer-common-mustsucceed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-prefer-common-mustsucceed.js) -- [parallel/test-eslint-prefer-primordials.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-prefer-primordials.js) -- [parallel/test-eslint-prefer-proto.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-prefer-proto.js) -- [parallel/test-eslint-prefer-util-format-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-prefer-util-format-errors.js) -- [parallel/test-eslint-require-common-first.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-require-common-first.js) -- [parallel/test-eslint-required-modules.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eslint-required-modules.js) -- [parallel/test-eval-disallow-code-generation-from-strings.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eval-disallow-code-generation-from-strings.js) -- [parallel/test-event-capture-rejections.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-event-capture-rejections.js) -- [parallel/test-event-emitter-check-listener-leaks.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-event-emitter-check-listener-leaks.js) -- [parallel/test-event-emitter-max-listeners-warning-for-null.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-event-emitter-max-listeners-warning-for-null.js) -- [parallel/test-event-emitter-max-listeners-warning-for-symbol.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-event-emitter-max-listeners-warning-for-symbol.js) -- [parallel/test-event-emitter-max-listeners-warning.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-event-emitter-max-listeners-warning.js) -- [parallel/test-event-target.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-event-target.js) -- [parallel/test-eventemitter-asyncresource.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eventemitter-asyncresource.js) -- [parallel/test-events-customevent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-events-customevent.js) -- [parallel/test-events-getmaxlisteners.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-events-getmaxlisteners.js) -- [parallel/test-events-listener-count-with-listener.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-events-listener-count-with-listener.js) -- [parallel/test-events-static-geteventlisteners.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-events-static-geteventlisteners.js) -- [parallel/test-eventtarget-memoryleakwarning.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eventtarget-memoryleakwarning.js) -- [parallel/test-eventtarget-once-twice.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eventtarget-once-twice.js) -- [parallel/test-eventtarget.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-eventtarget.js) -- [parallel/test-experimental-shared-value-conveyor.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-experimental-shared-value-conveyor.js) -- [parallel/test-file-validate-mode-flag.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-file-validate-mode-flag.js) -- [parallel/test-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-file.js) -- [parallel/test-filehandle-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-filehandle-close.js) -- [parallel/test-filehandle-readablestream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-filehandle-readablestream.js) -- [parallel/test-fixed-queue.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fixed-queue.js) -- [parallel/test-force-repl-with-eval.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-force-repl-with-eval.js) -- [parallel/test-force-repl.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-force-repl.js) -- [parallel/test-freelist.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-freelist.js) -- [parallel/test-freeze-intrinsics.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-freeze-intrinsics.js) -- [parallel/test-fs-append-file-flush.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-append-file-flush.js) -- [parallel/test-fs-assert-encoding-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-assert-encoding-error.js) -- [parallel/test-fs-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-buffer.js) -- [parallel/test-fs-buffertype-writesync.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-buffertype-writesync.js) -- [parallel/test-fs-close-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-close-errors.js) -- [parallel/test-fs-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-close.js) -- [parallel/test-fs-constants.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-constants.js) -- [parallel/test-fs-copyfile-respect-permissions.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-copyfile-respect-permissions.js) -- [parallel/test-fs-error-messages.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-error-messages.js) -- [parallel/test-fs-exists.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-exists.js) -- [parallel/test-fs-existssync-false.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-existssync-false.js) -- [parallel/test-fs-fchmod.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-fchmod.js) -- [parallel/test-fs-fchown.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-fchown.js) -- [parallel/test-fs-filehandle-use-after-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-filehandle-use-after-close.js) -- [parallel/test-fs-filehandle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-filehandle.js) -- [parallel/test-fs-fmap.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-fmap.js) -- [parallel/test-fs-fsync.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-fsync.js) -- [parallel/test-fs-lchmod.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-lchmod.js) -- [parallel/test-fs-link.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-link.js) -- [parallel/test-fs-long-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-long-path.js) -- [parallel/test-fs-make-callback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-make-callback.js) -- [parallel/test-fs-makeStatsCallback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-makeStatsCallback.js) -- [parallel/test-fs-mkdir-mode-mask.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-mkdir-mode-mask.js) -- [parallel/test-fs-mkdir-recursive-eaccess.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-mkdir-recursive-eaccess.js) -- [parallel/test-fs-mkdir-rmdir.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-mkdir-rmdir.js) -- [parallel/test-fs-mkdtemp-prefix-check.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-mkdtemp-prefix-check.js) -- [parallel/test-fs-mkdtemp.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-mkdtemp.js) -- [parallel/test-fs-non-number-arguments-throw.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-non-number-arguments-throw.js) -- [parallel/test-fs-null-bytes.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-null-bytes.js) -- [parallel/test-fs-options-immutable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-options-immutable.js) -- [parallel/test-fs-promises-exists.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-exists.js) -- [parallel/test-fs-promises-file-handle-aggregate-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-aggregate-errors.js) -- [parallel/test-fs-promises-file-handle-append-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-append-file.js) -- [parallel/test-fs-promises-file-handle-chmod.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-chmod.js) -- [parallel/test-fs-promises-file-handle-close-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-close-errors.js) -- [parallel/test-fs-promises-file-handle-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-close.js) -- [parallel/test-fs-promises-file-handle-dispose.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-dispose.js) -- [parallel/test-fs-promises-file-handle-op-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-op-errors.js) -- [parallel/test-fs-promises-file-handle-read-worker.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-read-worker.js) -- [parallel/test-fs-promises-file-handle-read.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-read.js) -- [parallel/test-fs-promises-file-handle-readFile.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-readFile.js) -- [parallel/test-fs-promises-file-handle-stat.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-stat.js) -- [parallel/test-fs-promises-file-handle-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-stream.js) -- [parallel/test-fs-promises-file-handle-sync.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-sync.js) -- [parallel/test-fs-promises-file-handle-truncate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-truncate.js) -- [parallel/test-fs-promises-file-handle-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-write.js) -- [parallel/test-fs-promises-file-handle-writeFile.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-file-handle-writeFile.js) -- [parallel/test-fs-promises-readfile-empty.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-readfile-empty.js) -- [parallel/test-fs-promises-readfile-with-fd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-readfile-with-fd.js) -- [parallel/test-fs-promises-readfile.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-readfile.js) -- [parallel/test-fs-promises-watch.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-watch.js) -- [parallel/test-fs-promises-write-optional-params.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-write-optional-params.js) -- [parallel/test-fs-promises-writefile-typedarray.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-writefile-typedarray.js) -- [parallel/test-fs-promises-writefile.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises-writefile.js) -- [parallel/test-fs-promises.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promises.js) -- [parallel/test-fs-promisified.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-promisified.js) -- [parallel/test-fs-read-empty-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-read-empty-buffer.js) -- [parallel/test-fs-read-file-assert-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-read-file-assert-encoding.js) -- [parallel/test-fs-read-file-sync-hostname.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-read-file-sync-hostname.js) -- [parallel/test-fs-read-file-sync.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-read-file-sync.js) -- [parallel/test-fs-read-offset-null.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-read-offset-null.js) -- [parallel/test-fs-read-optional-params.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-read-optional-params.js) -- [parallel/test-fs-read-promises-optional-params.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-read-promises-optional-params.js) -- [parallel/test-fs-read-stream-err.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-read-stream-err.js) -- [parallel/test-fs-read-stream-fd-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-read-stream-fd-leak.js) -- [parallel/test-fs-read-stream-file-handle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-read-stream-file-handle.js) -- [parallel/test-fs-read-stream-pos.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-read-stream-pos.js) -- [parallel/test-fs-readSync-optional-params.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readSync-optional-params.js) -- [parallel/test-fs-readdir-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readdir-buffer.js) -- [parallel/test-fs-readdir-types.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readdir-types.js) -- [parallel/test-fs-readdir-ucs2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readdir-ucs2.js) -- [parallel/test-fs-readfile-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readfile-error.js) -- [parallel/test-fs-readfile-fd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readfile-fd.js) -- [parallel/test-fs-readfile-flags.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readfile-flags.js) -- [parallel/test-fs-readfile-pipe-large.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readfile-pipe-large.js) -- [parallel/test-fs-readfile-pipe.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readfile-pipe.js) -- [parallel/test-fs-readfile-unlink.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readfile-unlink.js) -- [parallel/test-fs-readfile-zero-byte-liar.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readfile-zero-byte-liar.js) -- [parallel/test-fs-readfile.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readfile.js) -- [parallel/test-fs-readfilesync-enoent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readfilesync-enoent.js) -- [parallel/test-fs-readfilesync-pipe-large.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readfilesync-pipe-large.js) -- [parallel/test-fs-readlink-type-check.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readlink-type-check.js) -- [parallel/test-fs-readv-promises.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readv-promises.js) -- [parallel/test-fs-readv-promisify.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-readv-promisify.js) -- [parallel/test-fs-ready-event-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-ready-event-stream.js) -- [parallel/test-fs-realpath-buffer-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-realpath-buffer-encoding.js) -- [parallel/test-fs-realpath-on-substed-drive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-realpath-on-substed-drive.js) -- [parallel/test-fs-realpath-pipe.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-realpath-pipe.js) -- [parallel/test-fs-realpath.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-realpath.js) -- [parallel/test-fs-rename-type-check.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-rename-type-check.js) -- [parallel/test-fs-rm.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-rm.js) -- [parallel/test-fs-sir-writes-alot.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-sir-writes-alot.js) -- [parallel/test-fs-stat-bigint.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-stat-bigint.js) -- [parallel/test-fs-stat.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-stat.js) -- [parallel/test-fs-statfs.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-statfs.js) -- [parallel/test-fs-stream-construct-compat-error-read.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-stream-construct-compat-error-read.js) -- [parallel/test-fs-stream-construct-compat-error-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-stream-construct-compat-error-write.js) -- [parallel/test-fs-stream-construct-compat-graceful-fs.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-stream-construct-compat-graceful-fs.js) -- [parallel/test-fs-stream-construct-compat-old-node.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-stream-construct-compat-old-node.js) -- [parallel/test-fs-stream-destroy-emit-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-stream-destroy-emit-error.js) -- [parallel/test-fs-stream-double-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-stream-double-close.js) -- [parallel/test-fs-stream-fs-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-stream-fs-options.js) -- [parallel/test-fs-stream-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-stream-options.js) -- [parallel/test-fs-symlink-buffer-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-symlink-buffer-path.js) -- [parallel/test-fs-symlink-dir-junction-relative.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-symlink-dir-junction-relative.js) -- [parallel/test-fs-symlink-dir-junction.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-symlink-dir-junction.js) -- [parallel/test-fs-symlink-dir.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-symlink-dir.js) -- [parallel/test-fs-symlink-longpath.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-symlink-longpath.js) -- [parallel/test-fs-symlink.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-symlink.js) -- [parallel/test-fs-sync-fd-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-sync-fd-leak.js) -- [parallel/test-fs-syncwritestream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-syncwritestream.js) -- [parallel/test-fs-timestamp-parsing-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-timestamp-parsing-error.js) -- [parallel/test-fs-truncate-clear-file-zero.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-truncate-clear-file-zero.js) -- [parallel/test-fs-truncate-fd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-truncate-fd.js) -- [parallel/test-fs-truncate-sync.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-truncate-sync.js) -- [parallel/test-fs-truncate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-truncate.js) -- [parallel/test-fs-unlink-type-check.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-unlink-type-check.js) -- [parallel/test-fs-util-validateoffsetlength.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-util-validateoffsetlength.js) -- [parallel/test-fs-utils-get-dirents.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-utils-get-dirents.js) -- [parallel/test-fs-utimes-y2K38.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-utimes-y2K38.js) -- [parallel/test-fs-watch-abort-signal.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-abort-signal.js) -- [parallel/test-fs-watch-close-when-destroyed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-close-when-destroyed.js) -- [parallel/test-fs-watch-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-encoding.js) -- [parallel/test-fs-watch-enoent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-enoent.js) -- [parallel/test-fs-watch-file-enoent-after-deletion.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-file-enoent-after-deletion.js) -- [parallel/test-fs-watch-recursive-add-file-to-existing-subfolder.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-add-file-to-existing-subfolder.js) -- [parallel/test-fs-watch-recursive-add-file-to-new-folder.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-add-file-to-new-folder.js) -- [parallel/test-fs-watch-recursive-add-file-with-url.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-add-file-with-url.js) -- [parallel/test-fs-watch-recursive-add-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-add-file.js) -- [parallel/test-fs-watch-recursive-add-folder.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-add-folder.js) -- [parallel/test-fs-watch-recursive-assert-leaks.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-assert-leaks.js) -- [parallel/test-fs-watch-recursive-promise.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-promise.js) -- [parallel/test-fs-watch-recursive-symlink.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-symlink.js) -- [parallel/test-fs-watch-recursive-update-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-update-file.js) -- [parallel/test-fs-watch-recursive-validate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-validate.js) -- [parallel/test-fs-watch-recursive-watch-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-recursive-watch-file.js) -- [parallel/test-fs-watch-ref-unref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-ref-unref.js) -- [parallel/test-fs-watch-stop-async.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-stop-async.js) -- [parallel/test-fs-watch-stop-sync.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch-stop-sync.js) -- [parallel/test-fs-watch.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watch.js) -- [parallel/test-fs-watchfile-bigint.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watchfile-bigint.js) -- [parallel/test-fs-watchfile-ref-unref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-watchfile-ref-unref.js) -- [parallel/test-fs-whatwg-url.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-whatwg-url.js) -- [parallel/test-fs-write-buffer-large.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-buffer-large.js) -- [parallel/test-fs-write-file-flush.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-file-flush.js) -- [parallel/test-fs-write-file-typedarrays.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-file-typedarrays.js) -- [parallel/test-fs-write-negativeoffset.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-negativeoffset.js) -- [parallel/test-fs-write-optional-params.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-optional-params.js) -- [parallel/test-fs-write-reuse-callback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-reuse-callback.js) -- [parallel/test-fs-write-sigxfsz.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-sigxfsz.js) -- [parallel/test-fs-write-stream-change-open.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-stream-change-open.js) -- [parallel/test-fs-write-stream-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-stream-encoding.js) -- [parallel/test-fs-write-stream-err.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-stream-err.js) -- [parallel/test-fs-write-stream-file-handle-2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-stream-file-handle-2.js) -- [parallel/test-fs-write-stream-file-handle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-stream-file-handle.js) -- [parallel/test-fs-write-stream-flush.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-stream-flush.js) -- [parallel/test-fs-write-stream-patch-open.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-stream-patch-open.js) -- [parallel/test-fs-write-sync-optional-params.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-write-sync-optional-params.js) -- [parallel/test-fs-writefile-with-fd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-writefile-with-fd.js) -- [parallel/test-fs-writev-promises.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-writev-promises.js) -- [parallel/test-fs-writev.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-fs-writev.js) -- [parallel/test-gc-http-client-connaborted.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-gc-http-client-connaborted.js) -- [parallel/test-gc-net-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-gc-net-timeout.js) -- [parallel/test-gc-tls-external-memory.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-gc-tls-external-memory.js) -- [parallel/test-global-console-exists.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global-console-exists.js) -- [parallel/test-global-customevent-disabled.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global-customevent-disabled.js) -- [parallel/test-global-customevent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global-customevent.js) -- [parallel/test-global-domexception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global-domexception.js) -- [parallel/test-global-encoder.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global-encoder.js) -- [parallel/test-global-setters.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global-setters.js) -- [parallel/test-global-webcrypto-classes.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global-webcrypto-classes.js) -- [parallel/test-global-webcrypto-disbled.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global-webcrypto-disbled.js) -- [parallel/test-global-webcrypto.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global-webcrypto.js) -- [parallel/test-global-webstreams.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global-webstreams.js) -- [parallel/test-global.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-global.js) -- [parallel/test-h2-large-header-cause-client-to-hangup.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-h2-large-header-cause-client-to-hangup.js) -- [parallel/test-handle-wrap-hasref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-handle-wrap-hasref.js) -- [parallel/test-heap-prof-basic.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-heap-prof-basic.js) -- [parallel/test-heap-prof-dir-absolute.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-heap-prof-dir-absolute.js) -- [parallel/test-heap-prof-dir-name.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-heap-prof-dir-name.js) -- [parallel/test-heap-prof-dir-relative.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-heap-prof-dir-relative.js) -- [parallel/test-heap-prof-exec-argv.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-heap-prof-exec-argv.js) -- [parallel/test-heap-prof-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-heap-prof-exit.js) -- [parallel/test-heap-prof-interval.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-heap-prof-interval.js) -- [parallel/test-heap-prof-invalid-args.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-heap-prof-invalid-args.js) -- [parallel/test-heap-prof-loop-drained.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-heap-prof-loop-drained.js) -- [parallel/test-heap-prof-name.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-heap-prof-name.js) -- [parallel/test-heap-prof-sigint.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-heap-prof-sigint.js) -- [parallel/test-heapdump-async-hooks-init-promise.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-heapdump-async-hooks-init-promise.js) -- [parallel/test-heapsnapshot-near-heap-limit-by-api-in-worker.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-heapsnapshot-near-heap-limit-by-api-in-worker.js) -- [parallel/test-heapsnapshot-near-heap-limit-worker.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-heapsnapshot-near-heap-limit-worker.js) -- [parallel/test-http-1.0-keep-alive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-1.0-keep-alive.js) -- [parallel/test-http-1.0.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-1.0.js) -- [parallel/test-http-abort-before-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-abort-before-end.js) -- [parallel/test-http-abort-client.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-abort-client.js) -- [parallel/test-http-abort-queued.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-abort-queued.js) -- [parallel/test-http-abort-stream-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-abort-stream-end.js) -- [parallel/test-http-aborted.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-aborted.js) -- [parallel/test-http-addrequest-localaddress.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-addrequest-localaddress.js) -- [parallel/test-http-after-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-after-connect.js) -- [parallel/test-http-agent-abort-controller.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-abort-controller.js) -- [parallel/test-http-agent-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-close.js) -- [parallel/test-http-agent-destroyed-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-destroyed-socket.js) -- [parallel/test-http-agent-domain-reused-gc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-domain-reused-gc.js) -- [parallel/test-http-agent-error-on-idle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-error-on-idle.js) -- [parallel/test-http-agent-false.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-false.js) -- [parallel/test-http-agent-keepalive-delay.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-keepalive-delay.js) -- [parallel/test-http-agent-keepalive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-keepalive.js) -- [parallel/test-http-agent-maxsockets-respected.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-maxsockets-respected.js) -- [parallel/test-http-agent-maxsockets.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-maxsockets.js) -- [parallel/test-http-agent-maxtotalsockets.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-maxtotalsockets.js) -- [parallel/test-http-agent-no-protocol.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-no-protocol.js) -- [parallel/test-http-agent-null.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-null.js) -- [parallel/test-http-agent-remove.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-remove.js) -- [parallel/test-http-agent-reuse-drained-socket-only.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-reuse-drained-socket-only.js) -- [parallel/test-http-agent-scheduling.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-scheduling.js) -- [parallel/test-http-agent-timeout-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-timeout-option.js) -- [parallel/test-http-agent-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-timeout.js) -- [parallel/test-http-agent-uninitialized-with-handle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-uninitialized-with-handle.js) -- [parallel/test-http-agent-uninitialized.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent-uninitialized.js) -- [parallel/test-http-agent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-agent.js) -- [parallel/test-http-allow-content-length-304.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-allow-content-length-304.js) -- [parallel/test-http-allow-req-after-204-res.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-allow-req-after-204-res.js) -- [parallel/test-http-automatic-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-automatic-headers.js) -- [parallel/test-http-autoselectfamily.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-autoselectfamily.js) -- [parallel/test-http-bind-twice.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-bind-twice.js) -- [parallel/test-http-blank-header.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-blank-header.js) -- [parallel/test-http-buffer-sanity.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-buffer-sanity.js) -- [parallel/test-http-byteswritten.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-byteswritten.js) -- [parallel/test-http-catch-uncaughtexception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-catch-uncaughtexception.js) -- [parallel/test-http-chunk-extensions-limit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-chunk-extensions-limit.js) -- [parallel/test-http-chunk-problem.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-chunk-problem.js) -- [parallel/test-http-chunked-304.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-chunked-304.js) -- [parallel/test-http-chunked-smuggling.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-chunked-smuggling.js) -- [parallel/test-http-chunked.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-chunked.js) -- [parallel/test-http-client-abort-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-abort-destroy.js) -- [parallel/test-http-client-abort-event.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-abort-event.js) -- [parallel/test-http-client-abort-keep-alive-destroy-res.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-abort-keep-alive-destroy-res.js) -- [parallel/test-http-client-abort-keep-alive-queued-tcp-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-abort-keep-alive-queued-tcp-socket.js) -- [parallel/test-http-client-abort-keep-alive-queued-unix-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-abort-keep-alive-queued-unix-socket.js) -- [parallel/test-http-client-abort-no-agent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-abort-no-agent.js) -- [parallel/test-http-client-abort-response-event.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-abort-response-event.js) -- [parallel/test-http-client-abort-unix-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-abort-unix-socket.js) -- [parallel/test-http-client-abort.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-abort.js) -- [parallel/test-http-client-abort2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-abort2.js) -- [parallel/test-http-client-abort3.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-abort3.js) -- [parallel/test-http-client-aborted-event.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-aborted-event.js) -- [parallel/test-http-client-agent-abort-close-event.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-agent-abort-close-event.js) -- [parallel/test-http-client-agent-end-close-event.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-agent-end-close-event.js) -- [parallel/test-http-client-agent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-agent.js) -- [parallel/test-http-client-check-http-token.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-check-http-token.js) -- [parallel/test-http-client-close-event.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-close-event.js) -- [parallel/test-http-client-close-with-default-agent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-close-with-default-agent.js) -- [parallel/test-http-client-default-headers-exist.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-default-headers-exist.js) -- [parallel/test-http-client-defaults.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-defaults.js) -- [parallel/test-http-client-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-encoding.js) -- [parallel/test-http-client-error-rawbytes.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-error-rawbytes.js) -- [parallel/test-http-client-finished.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-finished.js) -- [parallel/test-http-client-headers-array.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-headers-array.js) -- [parallel/test-http-client-headers-host-array.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-headers-host-array.js) -- [parallel/test-http-client-immediate-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-immediate-error.js) -- [parallel/test-http-client-incomingmessage-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-incomingmessage-destroy.js) -- [parallel/test-http-client-invalid-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-invalid-path.js) -- [parallel/test-http-client-keep-alive-hint.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-keep-alive-hint.js) -- [parallel/test-http-client-keep-alive-release-before-finish.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-keep-alive-release-before-finish.js) -- [parallel/test-http-client-override-global-agent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-override-global-agent.js) -- [parallel/test-http-client-parse-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-parse-error.js) -- [parallel/test-http-client-pipe-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-pipe-end.js) -- [parallel/test-http-client-race-2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-race-2.js) -- [parallel/test-http-client-race.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-race.js) -- [parallel/test-http-client-readable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-readable.js) -- [parallel/test-http-client-reject-chunked-with-content-length.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-reject-chunked-with-content-length.js) -- [parallel/test-http-client-reject-cr-no-lf.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-reject-cr-no-lf.js) -- [parallel/test-http-client-reject-unexpected-agent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-reject-unexpected-agent.js) -- [parallel/test-http-client-req-error-dont-double-fire.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-req-error-dont-double-fire.js) -- [parallel/test-http-client-request-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-request-options.js) -- [parallel/test-http-client-res-destroyed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-res-destroyed.js) -- [parallel/test-http-client-response-domain.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-response-domain.js) -- [parallel/test-http-client-response-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-response-timeout.js) -- [parallel/test-http-client-set-timeout-after-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-set-timeout-after-end.js) -- [parallel/test-http-client-set-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-set-timeout.js) -- [parallel/test-http-client-spurious-aborted.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-spurious-aborted.js) -- [parallel/test-http-client-timeout-agent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-timeout-agent.js) -- [parallel/test-http-client-timeout-connect-listener.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-timeout-connect-listener.js) -- [parallel/test-http-client-timeout-event.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-timeout-event.js) -- [parallel/test-http-client-timeout-on-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-timeout-on-connect.js) -- [parallel/test-http-client-timeout-option-listeners.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-timeout-option-listeners.js) -- [parallel/test-http-client-timeout-option-with-agent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-timeout-option-with-agent.js) -- [parallel/test-http-client-timeout-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-timeout-option.js) -- [parallel/test-http-client-timeout-with-data.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-timeout-with-data.js) -- [parallel/test-http-client-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-timeout.js) -- [parallel/test-http-client-unescaped-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-unescaped-path.js) -- [parallel/test-http-client-upload-buf.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-upload-buf.js) -- [parallel/test-http-client-upload.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-client-upload.js) -- [parallel/test-http-common.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-common.js) -- [parallel/test-http-conn-reset.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-conn-reset.js) -- [parallel/test-http-connect-req-res.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-connect-req-res.js) -- [parallel/test-http-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-connect.js) -- [parallel/test-http-content-length-mismatch.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-content-length-mismatch.js) -- [parallel/test-http-content-length.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-content-length.js) -- [parallel/test-http-contentLength0.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-contentLength0.js) -- [parallel/test-http-correct-hostname.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-correct-hostname.js) -- [parallel/test-http-createConnection.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-createConnection.js) -- [parallel/test-http-date-header.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-date-header.js) -- [parallel/test-http-debug.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-debug.js) -- [parallel/test-http-decoded-auth.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-decoded-auth.js) -- [parallel/test-http-default-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-default-encoding.js) -- [parallel/test-http-default-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-default-port.js) -- [parallel/test-http-destroyed-socket-write2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-destroyed-socket-write2.js) -- [parallel/test-http-dns-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-dns-error.js) -- [parallel/test-http-double-content-length.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-double-content-length.js) -- [parallel/test-http-dump-req-when-res-ends.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-dump-req-when-res-ends.js) -- [parallel/test-http-early-hints-invalid-argument.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-early-hints-invalid-argument.js) -- [parallel/test-http-early-hints.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-early-hints.js) -- [parallel/test-http-end-throw-socket-handling.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-end-throw-socket-handling.js) -- [parallel/test-http-eof-on-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-eof-on-connect.js) -- [parallel/test-http-exceptions.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-exceptions.js) -- [parallel/test-http-expect-continue.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-expect-continue.js) -- [parallel/test-http-expect-handling.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-expect-handling.js) -- [parallel/test-http-extra-response.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-extra-response.js) -- [parallel/test-http-flush-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-flush-headers.js) -- [parallel/test-http-flush-response-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-flush-response-headers.js) -- [parallel/test-http-full-response.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-full-response.js) -- [parallel/test-http-generic-streams.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-generic-streams.js) -- [parallel/test-http-get-pipeline-problem.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-get-pipeline-problem.js) -- [parallel/test-http-head-request.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-head-request.js) -- [parallel/test-http-head-response-has-no-body-end-implicit-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-head-response-has-no-body-end-implicit-headers.js) -- [parallel/test-http-head-response-has-no-body-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-head-response-has-no-body-end.js) -- [parallel/test-http-head-response-has-no-body.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-head-response-has-no-body.js) -- [parallel/test-http-head-throw-on-response-body-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-head-throw-on-response-body-write.js) -- [parallel/test-http-header-badrequest.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-header-badrequest.js) -- [parallel/test-http-header-obstext.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-header-obstext.js) -- [parallel/test-http-header-overflow.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-header-overflow.js) -- [parallel/test-http-header-owstext.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-header-owstext.js) -- [parallel/test-http-header-read.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-header-read.js) -- [parallel/test-http-hex-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-hex-write.js) -- [parallel/test-http-highwatermark.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-highwatermark.js) -- [parallel/test-http-host-header-ipv6-fail.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-host-header-ipv6-fail.js) -- [parallel/test-http-host-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-host-headers.js) -- [parallel/test-http-hostname-typechecking.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-hostname-typechecking.js) -- [parallel/test-http-incoming-matchKnownFields.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-incoming-matchKnownFields.js) -- [parallel/test-http-incoming-message-connection-setter.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-incoming-message-connection-setter.js) -- [parallel/test-http-incoming-message-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-incoming-message-destroy.js) -- [parallel/test-http-incoming-message-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-incoming-message-options.js) -- [parallel/test-http-incoming-pipelined-socket-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-incoming-pipelined-socket-destroy.js) -- [parallel/test-http-information-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-information-headers.js) -- [parallel/test-http-information-processing.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-information-processing.js) -- [parallel/test-http-insecure-parser-per-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-insecure-parser-per-stream.js) -- [parallel/test-http-insecure-parser.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-insecure-parser.js) -- [parallel/test-http-invalid-path-chars.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-invalid-path-chars.js) -- [parallel/test-http-invalid-te.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-invalid-te.js) -- [parallel/test-http-invalid-urls.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-invalid-urls.js) -- [parallel/test-http-invalidheaderfield.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-invalidheaderfield.js) -- [parallel/test-http-invalidheaderfield2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-invalidheaderfield2.js) -- [parallel/test-http-keep-alive-close-on-header.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-keep-alive-close-on-header.js) -- [parallel/test-http-keep-alive-drop-requests.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-keep-alive-drop-requests.js) -- [parallel/test-http-keep-alive-max-requests.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-keep-alive-max-requests.js) -- [parallel/test-http-keep-alive-pipeline-max-requests.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-keep-alive-pipeline-max-requests.js) -- [parallel/test-http-keep-alive-timeout-custom.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-keep-alive-timeout-custom.js) -- [parallel/test-http-keep-alive-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-keep-alive-timeout.js) -- [parallel/test-http-keep-alive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-keep-alive.js) -- [parallel/test-http-keepalive-client.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-keepalive-client.js) -- [parallel/test-http-keepalive-free.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-keepalive-free.js) -- [parallel/test-http-keepalive-override.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-keepalive-override.js) -- [parallel/test-http-keepalive-request.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-keepalive-request.js) -- [parallel/test-http-listening.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-listening.js) -- [parallel/test-http-localaddress-bind-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-localaddress-bind-error.js) -- [parallel/test-http-malformed-request.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-malformed-request.js) -- [parallel/test-http-many-ended-pipelines.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-many-ended-pipelines.js) -- [parallel/test-http-max-header-size-per-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-max-header-size-per-stream.js) -- [parallel/test-http-max-header-size.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-max-header-size.js) -- [parallel/test-http-max-headers-count.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-max-headers-count.js) -- [parallel/test-http-max-http-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-max-http-headers.js) -- [parallel/test-http-methods.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-methods.js) -- [parallel/test-http-missing-header-separator-cr.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-missing-header-separator-cr.js) -- [parallel/test-http-missing-header-separator-lf.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-missing-header-separator-lf.js) -- [parallel/test-http-multi-line-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-multi-line-headers.js) -- [parallel/test-http-multiple-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-multiple-headers.js) -- [parallel/test-http-mutable-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-mutable-headers.js) -- [parallel/test-http-no-content-length.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-no-content-length.js) -- [parallel/test-http-no-read-no-dump.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-no-read-no-dump.js) -- [parallel/test-http-nodelay.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-nodelay.js) -- [parallel/test-http-outgoing-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-buffer.js) -- [parallel/test-http-outgoing-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-destroy.js) -- [parallel/test-http-outgoing-destroyed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-destroyed.js) -- [parallel/test-http-outgoing-end-cork.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-end-cork.js) -- [parallel/test-http-outgoing-end-multiple.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-end-multiple.js) -- [parallel/test-http-outgoing-end-types.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-end-types.js) -- [parallel/test-http-outgoing-finish-writable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-finish-writable.js) -- [parallel/test-http-outgoing-finish.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-finish.js) -- [parallel/test-http-outgoing-finished.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-finished.js) -- [parallel/test-http-outgoing-first-chunk-singlebyte-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-first-chunk-singlebyte-encoding.js) -- [parallel/test-http-outgoing-message-capture-rejection.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-message-capture-rejection.js) -- [parallel/test-http-outgoing-message-inheritance.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-message-inheritance.js) -- [parallel/test-http-outgoing-message-write-callback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-message-write-callback.js) -- [parallel/test-http-outgoing-properties.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-properties.js) -- [parallel/test-http-outgoing-proto.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-proto.js) -- [parallel/test-http-outgoing-writableFinished.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-writableFinished.js) -- [parallel/test-http-outgoing-write-types.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-outgoing-write-types.js) -- [parallel/test-http-parser-bad-ref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-parser-bad-ref.js) -- [parallel/test-http-parser-finish-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-parser-finish-error.js) -- [parallel/test-http-parser-free.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-parser-free.js) -- [parallel/test-http-parser-freed-before-upgrade.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-parser-freed-before-upgrade.js) -- [parallel/test-http-parser-lazy-loaded.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-parser-lazy-loaded.js) -- [parallel/test-http-parser-memory-retention.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-parser-memory-retention.js) -- [parallel/test-http-parser-multiple-execute.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-parser-multiple-execute.js) -- [parallel/test-http-parser-timeout-reset.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-parser-timeout-reset.js) -- [parallel/test-http-parser.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-parser.js) -- [parallel/test-http-pause-no-dump.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-pause-no-dump.js) -- [parallel/test-http-pause-resume-one-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-pause-resume-one-end.js) -- [parallel/test-http-pause.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-pause.js) -- [parallel/test-http-perf_hooks.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-perf_hooks.js) -- [parallel/test-http-pipe-fs.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-pipe-fs.js) -- [parallel/test-http-pipeline-assertionerror-finish.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-pipeline-assertionerror-finish.js) -- [parallel/test-http-pipeline-flood.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-pipeline-flood.js) -- [parallel/test-http-pipeline-requests-connection-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-pipeline-requests-connection-leak.js) -- [parallel/test-http-pipeline-socket-parser-typeerror.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-pipeline-socket-parser-typeerror.js) -- [parallel/test-http-proxy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-proxy.js) -- [parallel/test-http-raw-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-raw-headers.js) -- [parallel/test-http-readable-data-event.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-readable-data-event.js) -- [parallel/test-http-remove-connection-header-persists-connection.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-remove-connection-header-persists-connection.js) -- [parallel/test-http-remove-header-stays-removed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-remove-header-stays-removed.js) -- [parallel/test-http-req-close-robust-from-tampering.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-req-close-robust-from-tampering.js) -- [parallel/test-http-req-res-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-req-res-close.js) -- [parallel/test-http-request-agent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-request-agent.js) -- [parallel/test-http-request-arguments.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-request-arguments.js) -- [parallel/test-http-request-dont-override-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-request-dont-override-options.js) -- [parallel/test-http-request-end-twice.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-request-end-twice.js) -- [parallel/test-http-request-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-request-end.js) -- [parallel/test-http-request-host-header.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-request-host-header.js) -- [parallel/test-http-request-invalid-method-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-request-invalid-method-error.js) -- [parallel/test-http-request-join-authorization-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-request-join-authorization-headers.js) -- [parallel/test-http-request-large-payload.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-request-large-payload.js) -- [parallel/test-http-request-methods.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-request-methods.js) -- [parallel/test-http-request-smuggling-content-length.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-request-smuggling-content-length.js) -- [parallel/test-http-res-write-after-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-res-write-after-end.js) -- [parallel/test-http-res-write-end-dont-take-array.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-res-write-end-dont-take-array.js) -- [parallel/test-http-response-add-header-after-sent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-response-add-header-after-sent.js) -- [parallel/test-http-response-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-response-close.js) -- [parallel/test-http-response-cork.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-response-cork.js) -- [parallel/test-http-response-multi-content-length.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-response-multi-content-length.js) -- [parallel/test-http-response-multiheaders.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-response-multiheaders.js) -- [parallel/test-http-response-no-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-response-no-headers.js) -- [parallel/test-http-response-readable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-response-readable.js) -- [parallel/test-http-response-remove-header-after-sent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-response-remove-header-after-sent.js) -- [parallel/test-http-response-setheaders.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-response-setheaders.js) -- [parallel/test-http-response-splitting.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-response-splitting.js) -- [parallel/test-http-response-status-message.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-response-status-message.js) -- [parallel/test-http-response-statuscode.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-response-statuscode.js) -- [parallel/test-http-response-writehead-returns-this.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-response-writehead-returns-this.js) -- [parallel/test-http-same-map.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-same-map.js) -- [parallel/test-http-server-async-dispose.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-async-dispose.js) -- [parallel/test-http-server-capture-rejections.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-capture-rejections.js) -- [parallel/test-http-server-client-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-client-error.js) -- [parallel/test-http-server-close-all.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-close-all.js) -- [parallel/test-http-server-close-destroy-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-close-destroy-timeout.js) -- [parallel/test-http-server-close-idle-wait-response.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-close-idle-wait-response.js) -- [parallel/test-http-server-close-idle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-close-idle.js) -- [parallel/test-http-server-connection-list-when-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-connection-list-when-close.js) -- [parallel/test-http-server-connections-checking-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-connections-checking-leak.js) -- [parallel/test-http-server-consumed-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-consumed-timeout.js) -- [parallel/test-http-server-de-chunked-trailer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-de-chunked-trailer.js) -- [parallel/test-http-server-delete-parser.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-delete-parser.js) -- [parallel/test-http-server-destroy-socket-on-client-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-destroy-socket-on-client-error.js) -- [parallel/test-http-server-headers-timeout-delayed-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-headers-timeout-delayed-headers.js) -- [parallel/test-http-server-headers-timeout-interrupted-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-headers-timeout-interrupted-headers.js) -- [parallel/test-http-server-headers-timeout-keepalive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-headers-timeout-keepalive.js) -- [parallel/test-http-server-headers-timeout-pipelining.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-headers-timeout-pipelining.js) -- [parallel/test-http-server-incomingmessage-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-incomingmessage-destroy.js) -- [parallel/test-http-server-keep-alive-defaults.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-keep-alive-defaults.js) -- [parallel/test-http-server-keep-alive-max-requests-null.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-keep-alive-max-requests-null.js) -- [parallel/test-http-server-keep-alive-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-keep-alive-timeout.js) -- [parallel/test-http-server-keepalive-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-keepalive-end.js) -- [parallel/test-http-server-keepalive-req-gc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-keepalive-req-gc.js) -- [parallel/test-http-server-multiheaders.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-multiheaders.js) -- [parallel/test-http-server-multiheaders2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-multiheaders2.js) -- [parallel/test-http-server-non-utf8-header.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-non-utf8-header.js) -- [parallel/test-http-server-options-highwatermark.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-options-highwatermark.js) -- [parallel/test-http-server-options-incoming-message.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-options-incoming-message.js) -- [parallel/test-http-server-options-server-response.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-options-server-response.js) -- [parallel/test-http-server-reject-chunked-with-content-length.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-reject-chunked-with-content-length.js) -- [parallel/test-http-server-reject-cr-no-lf.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-reject-cr-no-lf.js) -- [parallel/test-http-server-request-timeout-delayed-body.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-request-timeout-delayed-body.js) -- [parallel/test-http-server-request-timeout-delayed-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-request-timeout-delayed-headers.js) -- [parallel/test-http-server-request-timeout-interrupted-body.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-request-timeout-interrupted-body.js) -- [parallel/test-http-server-request-timeout-interrupted-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-request-timeout-interrupted-headers.js) -- [parallel/test-http-server-request-timeout-keepalive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-request-timeout-keepalive.js) -- [parallel/test-http-server-request-timeout-pipelining.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-request-timeout-pipelining.js) -- [parallel/test-http-server-request-timeout-upgrade.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-request-timeout-upgrade.js) -- [parallel/test-http-server-request-timeouts-mixed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-request-timeouts-mixed.js) -- [parallel/test-http-server-response-standalone.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-response-standalone.js) -- [parallel/test-http-server-stale-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-stale-close.js) -- [parallel/test-http-server-timeouts-validation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-timeouts-validation.js) -- [parallel/test-http-server-unconsume-consume.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-unconsume-consume.js) -- [parallel/test-http-server-unconsume.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-unconsume.js) -- [parallel/test-http-server-write-after-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-write-after-end.js) -- [parallel/test-http-server-write-end-after-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server-write-end-after-end.js) -- [parallel/test-http-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-server.js) -- [parallel/test-http-set-cookies.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-set-cookies.js) -- [parallel/test-http-set-header-chain.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-set-header-chain.js) -- [parallel/test-http-set-max-idle-http-parser.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-set-max-idle-http-parser.js) -- [parallel/test-http-set-timeout-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-set-timeout-server.js) -- [parallel/test-http-set-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-set-timeout.js) -- [parallel/test-http-set-trailers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-set-trailers.js) -- [parallel/test-http-should-keep-alive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-should-keep-alive.js) -- [parallel/test-http-socket-encoding-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-socket-encoding-error.js) -- [parallel/test-http-socket-error-listeners.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-socket-error-listeners.js) -- [parallel/test-http-status-code.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-status-code.js) -- [parallel/test-http-status-message.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-status-message.js) -- [parallel/test-http-status-reason-invalid-chars.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-status-reason-invalid-chars.js) -- [parallel/test-http-sync-write-error-during-continue.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-sync-write-error-during-continue.js) -- [parallel/test-http-timeout-client-warning.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-timeout-client-warning.js) -- [parallel/test-http-timeout-overflow.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-timeout-overflow.js) -- [parallel/test-http-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-timeout.js) -- [parallel/test-http-transfer-encoding-repeated-chunked.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-transfer-encoding-repeated-chunked.js) -- [parallel/test-http-transfer-encoding-smuggling.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-transfer-encoding-smuggling.js) -- [parallel/test-http-uncaught-from-request-callback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-uncaught-from-request-callback.js) -- [parallel/test-http-unix-socket-keep-alive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-unix-socket-keep-alive.js) -- [parallel/test-http-unix-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-unix-socket.js) -- [parallel/test-http-upgrade-advertise.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-upgrade-advertise.js) -- [parallel/test-http-upgrade-agent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-upgrade-agent.js) -- [parallel/test-http-upgrade-binary.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-upgrade-binary.js) -- [parallel/test-http-upgrade-client.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-upgrade-client.js) -- [parallel/test-http-upgrade-client2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-upgrade-client2.js) -- [parallel/test-http-upgrade-reconsume-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-upgrade-reconsume-stream.js) -- [parallel/test-http-upgrade-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-upgrade-server.js) -- [parallel/test-http-upgrade-server2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-upgrade-server2.js) -- [parallel/test-http-url.parse-auth-with-header-in-request.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-url.parse-auth-with-header-in-request.js) -- [parallel/test-http-url.parse-auth.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-url.parse-auth.js) -- [parallel/test-http-url.parse-basic.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-url.parse-basic.js) -- [parallel/test-http-url.parse-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-url.parse-path.js) -- [parallel/test-http-url.parse-post.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-url.parse-post.js) -- [parallel/test-http-url.parse-search.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-url.parse-search.js) -- [parallel/test-http-wget.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-wget.js) -- [parallel/test-http-writable-true-after-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-writable-true-after-close.js) -- [parallel/test-http-write-callbacks.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-write-callbacks.js) -- [parallel/test-http-write-empty-string.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-write-empty-string.js) -- [parallel/test-http-write-head-2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-write-head-2.js) -- [parallel/test-http-write-head.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-write-head.js) -- [parallel/test-http-zero-length-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-zero-length-write.js) -- [parallel/test-http-zerolengthbuffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http-zerolengthbuffer.js) -- [parallel/test-http.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http.js) -- [parallel/test-http2-altsvc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-altsvc.js) -- [parallel/test-http2-autoselect-protocol.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-autoselect-protocol.js) -- [parallel/test-http2-backpressure.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-backpressure.js) -- [parallel/test-http2-binding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-binding.js) -- [parallel/test-http2-buffersize.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-buffersize.js) -- [parallel/test-http2-byteswritten-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-byteswritten-server.js) -- [parallel/test-http2-cancel-while-client-reading.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-cancel-while-client-reading.js) -- [parallel/test-http2-capture-rejection.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-capture-rejection.js) -- [parallel/test-http2-clean-output.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-clean-output.js) -- [parallel/test-http2-client-connection-tunnelling.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-connection-tunnelling.js) -- [parallel/test-http2-client-data-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-data-end.js) -- [parallel/test-http2-client-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-destroy.js) -- [parallel/test-http2-client-http1-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-http1-server.js) -- [parallel/test-http2-client-jsstream-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-jsstream-destroy.js) -- [parallel/test-http2-client-onconnect-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-onconnect-errors.js) -- [parallel/test-http2-client-port-80.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-port-80.js) -- [parallel/test-http2-client-priority-before-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-priority-before-connect.js) -- [parallel/test-http2-client-promisify-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-promisify-connect.js) -- [parallel/test-http2-client-request-listeners-warning.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-request-listeners-warning.js) -- [parallel/test-http2-client-request-options-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-request-options-errors.js) -- [parallel/test-http2-client-rststream-before-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-rststream-before-connect.js) -- [parallel/test-http2-client-set-priority.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-set-priority.js) -- [parallel/test-http2-client-setLocalWindowSize.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-setLocalWindowSize.js) -- [parallel/test-http2-client-setNextStreamID-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-setNextStreamID-errors.js) -- [parallel/test-http2-client-settings-before-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-settings-before-connect.js) -- [parallel/test-http2-client-shutdown-before-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-shutdown-before-connect.js) -- [parallel/test-http2-client-socket-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-socket-destroy.js) -- [parallel/test-http2-client-stream-destroy-before-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-stream-destroy-before-connect.js) -- [parallel/test-http2-client-unescaped-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-unescaped-path.js) -- [parallel/test-http2-client-upload-reject.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-upload-reject.js) -- [parallel/test-http2-client-upload.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-upload.js) -- [parallel/test-http2-client-write-before-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-write-before-connect.js) -- [parallel/test-http2-client-write-empty-string.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-client-write-empty-string.js) -- [parallel/test-http2-close-while-writing.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-close-while-writing.js) -- [parallel/test-http2-compat-aborted.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-aborted.js) -- [parallel/test-http2-compat-client-upload-reject.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-client-upload-reject.js) -- [parallel/test-http2-compat-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-errors.js) -- [parallel/test-http2-compat-expect-continue-check.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-expect-continue-check.js) -- [parallel/test-http2-compat-expect-continue.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-expect-continue.js) -- [parallel/test-http2-compat-expect-handling.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-expect-handling.js) -- [parallel/test-http2-compat-method-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-method-connect.js) -- [parallel/test-http2-compat-serverrequest-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverrequest-end.js) -- [parallel/test-http2-compat-serverrequest-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverrequest-headers.js) -- [parallel/test-http2-compat-serverrequest-host.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverrequest-host.js) -- [parallel/test-http2-compat-serverrequest-pause.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverrequest-pause.js) -- [parallel/test-http2-compat-serverrequest-pipe.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverrequest-pipe.js) -- [parallel/test-http2-compat-serverrequest-settimeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverrequest-settimeout.js) -- [parallel/test-http2-compat-serverrequest-trailers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverrequest-trailers.js) -- [parallel/test-http2-compat-serverrequest.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverrequest.js) -- [parallel/test-http2-compat-serverresponse-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-close.js) -- [parallel/test-http2-compat-serverresponse-createpushresponse.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-createpushresponse.js) -- [parallel/test-http2-compat-serverresponse-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-destroy.js) -- [parallel/test-http2-compat-serverresponse-drain.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-drain.js) -- [parallel/test-http2-compat-serverresponse-end-after-statuses-without-body.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-end-after-statuses-without-body.js) -- [parallel/test-http2-compat-serverresponse-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-end.js) -- [parallel/test-http2-compat-serverresponse-finished.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-finished.js) -- [parallel/test-http2-compat-serverresponse-flushheaders.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-flushheaders.js) -- [parallel/test-http2-compat-serverresponse-headers-after-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-headers-after-destroy.js) -- [parallel/test-http2-compat-serverresponse-headers-send-date.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-headers-send-date.js) -- [parallel/test-http2-compat-serverresponse-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-headers.js) -- [parallel/test-http2-compat-serverresponse-settimeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-settimeout.js) -- [parallel/test-http2-compat-serverresponse-statuscode.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-statuscode.js) -- [parallel/test-http2-compat-serverresponse-statusmessage-property-set.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-statusmessage-property-set.js) -- [parallel/test-http2-compat-serverresponse-statusmessage-property.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-statusmessage-property.js) -- [parallel/test-http2-compat-serverresponse-statusmessage.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-statusmessage.js) -- [parallel/test-http2-compat-serverresponse-trailers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-trailers.js) -- [parallel/test-http2-compat-serverresponse-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-write.js) -- [parallel/test-http2-compat-serverresponse-writehead-array.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-writehead-array.js) -- [parallel/test-http2-compat-serverresponse-writehead.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse-writehead.js) -- [parallel/test-http2-compat-serverresponse.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-serverresponse.js) -- [parallel/test-http2-compat-short-stream-client-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-short-stream-client-server.js) -- [parallel/test-http2-compat-socket-destroy-delayed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-socket-destroy-delayed.js) -- [parallel/test-http2-compat-socket-set.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-socket-set.js) -- [parallel/test-http2-compat-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-socket.js) -- [parallel/test-http2-compat-write-early-hints-invalid-argument-type.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-write-early-hints-invalid-argument-type.js) -- [parallel/test-http2-compat-write-early-hints-invalid-argument-value.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-write-early-hints-invalid-argument-value.js) -- [parallel/test-http2-compat-write-early-hints.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-write-early-hints.js) -- [parallel/test-http2-compat-write-head-destroyed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-compat-write-head-destroyed.js) -- [parallel/test-http2-connect-method-extended-cant-turn-off.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-connect-method-extended-cant-turn-off.js) -- [parallel/test-http2-connect-method-extended.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-connect-method-extended.js) -- [parallel/test-http2-connect-method.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-connect-method.js) -- [parallel/test-http2-connect-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-connect-options.js) -- [parallel/test-http2-connect-tls-with-delay.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-connect-tls-with-delay.js) -- [parallel/test-http2-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-connect.js) -- [parallel/test-http2-cookies.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-cookies.js) -- [parallel/test-http2-create-client-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-create-client-connect.js) -- [parallel/test-http2-create-client-secure-session.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-create-client-secure-session.js) -- [parallel/test-http2-create-client-session.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-create-client-session.js) -- [parallel/test-http2-createsecureserver-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-createsecureserver-options.js) -- [parallel/test-http2-createserver-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-createserver-options.js) -- [parallel/test-http2-createwritereq.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-createwritereq.js) -- [parallel/test-http2-date-header.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-date-header.js) -- [parallel/test-http2-debug.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-debug.js) -- [parallel/test-http2-destroy-after-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-destroy-after-write.js) -- [parallel/test-http2-dont-lose-data.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-dont-lose-data.js) -- [parallel/test-http2-dont-override.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-dont-override.js) -- [parallel/test-http2-empty-frame-without-eof.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-empty-frame-without-eof.js) -- [parallel/test-http2-endafterheaders.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-endafterheaders.js) -- [parallel/test-http2-error-order.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-error-order.js) -- [parallel/test-http2-exceeds-server-trailer-size.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-exceeds-server-trailer-size.js) -- [parallel/test-http2-forget-closed-streams.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-forget-closed-streams.js) -- [parallel/test-http2-generic-streams-sendfile.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-generic-streams-sendfile.js) -- [parallel/test-http2-generic-streams.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-generic-streams.js) -- [parallel/test-http2-getpackedsettings.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-getpackedsettings.js) -- [parallel/test-http2-goaway-delayed-request.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-goaway-delayed-request.js) -- [parallel/test-http2-goaway-opaquedata.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-goaway-opaquedata.js) -- [parallel/test-http2-head-request.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-head-request.js) -- [parallel/test-http2-https-fallback-http-server-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-https-fallback-http-server-options.js) -- [parallel/test-http2-https-fallback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-https-fallback.js) -- [parallel/test-http2-info-headers-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-info-headers-errors.js) -- [parallel/test-http2-info-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-info-headers.js) -- [parallel/test-http2-invalidargtypes-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-invalidargtypes-errors.js) -- [parallel/test-http2-invalidheaderfield.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-invalidheaderfield.js) -- [parallel/test-http2-invalidheaderfields-client.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-invalidheaderfields-client.js) -- [parallel/test-http2-large-write-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-large-write-close.js) -- [parallel/test-http2-large-write-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-large-write-destroy.js) -- [parallel/test-http2-large-write-multiple-requests.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-large-write-multiple-requests.js) -- [parallel/test-http2-large-writes-session-memory-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-large-writes-session-memory-leak.js) -- [parallel/test-http2-malformed-altsvc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-malformed-altsvc.js) -- [parallel/test-http2-many-writes-and-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-many-writes-and-destroy.js) -- [parallel/test-http2-max-concurrent-streams.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-max-concurrent-streams.js) -- [parallel/test-http2-max-invalid-frames.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-max-invalid-frames.js) -- [parallel/test-http2-max-session-memory-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-max-session-memory-leak.js) -- [parallel/test-http2-max-settings.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-max-settings.js) -- [parallel/test-http2-methods.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-methods.js) -- [parallel/test-http2-misbehaving-flow-control-paused.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-misbehaving-flow-control-paused.js) -- [parallel/test-http2-misbehaving-flow-control.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-misbehaving-flow-control.js) -- [parallel/test-http2-misbehaving-multiplex.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-misbehaving-multiplex.js) -- [parallel/test-http2-misc-util.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-misc-util.js) -- [parallel/test-http2-misused-pseudoheaders.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-misused-pseudoheaders.js) -- [parallel/test-http2-multi-content-length.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-multi-content-length.js) -- [parallel/test-http2-multiheaders-raw.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-multiheaders-raw.js) -- [parallel/test-http2-multiheaders.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-multiheaders.js) -- [parallel/test-http2-multiplex.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-multiplex.js) -- [parallel/test-http2-multistream-destroy-on-read-tls.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-multistream-destroy-on-read-tls.js) -- [parallel/test-http2-no-more-streams.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-no-more-streams.js) -- [parallel/test-http2-no-wanttrailers-listener.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-no-wanttrailers-listener.js) -- [parallel/test-http2-onping.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-onping.js) -- [parallel/test-http2-options-max-headers-block-length.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-options-max-headers-block-length.js) -- [parallel/test-http2-options-max-headers-exceeds-nghttp2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-options-max-headers-exceeds-nghttp2.js) -- [parallel/test-http2-options-max-reserved-streams.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-options-max-reserved-streams.js) -- [parallel/test-http2-options-server-request.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-options-server-request.js) -- [parallel/test-http2-options-server-response.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-options-server-response.js) -- [parallel/test-http2-origin.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-origin.js) -- [parallel/test-http2-pack-end-stream-flag.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-pack-end-stream-flag.js) -- [parallel/test-http2-padding-aligned.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-padding-aligned.js) -- [parallel/test-http2-perf_hooks.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-perf_hooks.js) -- [parallel/test-http2-ping-settings-heapdump.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-ping-settings-heapdump.js) -- [parallel/test-http2-ping-unsolicited-ack.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-ping-unsolicited-ack.js) -- [parallel/test-http2-ping.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-ping.js) -- [parallel/test-http2-pipe-named-pipe.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-pipe-named-pipe.js) -- [parallel/test-http2-pipe.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-pipe.js) -- [parallel/test-http2-priority-cycle-.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-priority-cycle-.js) -- [parallel/test-http2-priority-event.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-priority-event.js) -- [parallel/test-http2-propagate-session-destroy-code.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-propagate-session-destroy-code.js) -- [parallel/test-http2-removed-header-stays-removed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-removed-header-stays-removed.js) -- [parallel/test-http2-request-remove-connect-listener.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-request-remove-connect-listener.js) -- [parallel/test-http2-request-response-proto.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-request-response-proto.js) -- [parallel/test-http2-res-corked.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-res-corked.js) -- [parallel/test-http2-res-writable-properties.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-res-writable-properties.js) -- [parallel/test-http2-reset-flood.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-reset-flood.js) -- [parallel/test-http2-respond-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-errors.js) -- [parallel/test-http2-respond-file-204.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file-204.js) -- [parallel/test-http2-respond-file-304.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file-304.js) -- [parallel/test-http2-respond-file-404.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file-404.js) -- [parallel/test-http2-respond-file-compat.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file-compat.js) -- [parallel/test-http2-respond-file-error-dir.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file-error-dir.js) -- [parallel/test-http2-respond-file-error-pipe-offset.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file-error-pipe-offset.js) -- [parallel/test-http2-respond-file-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file-errors.js) -- [parallel/test-http2-respond-file-fd-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file-fd-errors.js) -- [parallel/test-http2-respond-file-fd-invalid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file-fd-invalid.js) -- [parallel/test-http2-respond-file-fd-range.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file-fd-range.js) -- [parallel/test-http2-respond-file-fd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file-fd.js) -- [parallel/test-http2-respond-file-filehandle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file-filehandle.js) -- [parallel/test-http2-respond-file-push.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file-push.js) -- [parallel/test-http2-respond-file-range.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file-range.js) -- [parallel/test-http2-respond-file-with-pipe.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file-with-pipe.js) -- [parallel/test-http2-respond-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-file.js) -- [parallel/test-http2-respond-nghttperrors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-nghttperrors.js) -- [parallel/test-http2-respond-no-data.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-no-data.js) -- [parallel/test-http2-respond-with-fd-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-with-fd-errors.js) -- [parallel/test-http2-respond-with-file-connection-abort.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-respond-with-file-connection-abort.js) -- [parallel/test-http2-response-splitting.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-response-splitting.js) -- [parallel/test-http2-sensitive-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-sensitive-headers.js) -- [parallel/test-http2-sent-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-sent-headers.js) -- [parallel/test-http2-serve-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-serve-file.js) -- [parallel/test-http2-server-async-dispose.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-async-dispose.js) -- [parallel/test-http2-server-close-callback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-close-callback.js) -- [parallel/test-http2-server-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-errors.js) -- [parallel/test-http2-server-http1-client.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-http1-client.js) -- [parallel/test-http2-server-push-disabled.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-push-disabled.js) -- [parallel/test-http2-server-push-stream-errors-args.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-push-stream-errors-args.js) -- [parallel/test-http2-server-push-stream-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-push-stream-errors.js) -- [parallel/test-http2-server-push-stream-head.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-push-stream-head.js) -- [parallel/test-http2-server-push-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-push-stream.js) -- [parallel/test-http2-server-rst-before-respond.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-rst-before-respond.js) -- [parallel/test-http2-server-rst-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-rst-stream.js) -- [parallel/test-http2-server-session-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-session-destroy.js) -- [parallel/test-http2-server-sessionerror.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-sessionerror.js) -- [parallel/test-http2-server-set-header.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-set-header.js) -- [parallel/test-http2-server-setLocalWindowSize.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-setLocalWindowSize.js) -- [parallel/test-http2-server-settimeout-no-callback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-settimeout-no-callback.js) -- [parallel/test-http2-server-shutdown-before-respond.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-shutdown-before-respond.js) -- [parallel/test-http2-server-shutdown-options-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-shutdown-options-errors.js) -- [parallel/test-http2-server-shutdown-redundant.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-shutdown-redundant.js) -- [parallel/test-http2-server-socket-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-socket-destroy.js) -- [parallel/test-http2-server-startup.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-startup.js) -- [parallel/test-http2-server-stream-session-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-stream-session-destroy.js) -- [parallel/test-http2-server-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-timeout.js) -- [parallel/test-http2-server-unknown-protocol.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-server-unknown-protocol.js) -- [parallel/test-http2-session-gc-while-write-scheduled.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-session-gc-while-write-scheduled.js) -- [parallel/test-http2-session-settings.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-session-settings.js) -- [parallel/test-http2-session-stream-state.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-session-stream-state.js) -- [parallel/test-http2-session-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-session-timeout.js) -- [parallel/test-http2-session-unref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-session-unref.js) -- [parallel/test-http2-settings-unsolicited-ack.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-settings-unsolicited-ack.js) -- [parallel/test-http2-short-stream-client-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-short-stream-client-server.js) -- [parallel/test-http2-single-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-single-headers.js) -- [parallel/test-http2-socket-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-socket-close.js) -- [parallel/test-http2-socket-proxy-handler-for-has.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-socket-proxy-handler-for-has.js) -- [parallel/test-http2-socket-proxy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-socket-proxy.js) -- [parallel/test-http2-status-code-invalid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-status-code-invalid.js) -- [parallel/test-http2-status-code.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-status-code.js) -- [parallel/test-http2-stream-client.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-stream-client.js) -- [parallel/test-http2-stream-destroy-event-order.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-stream-destroy-event-order.js) -- [parallel/test-http2-stream-removelisteners-after-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-stream-removelisteners-after-close.js) -- [parallel/test-http2-timeouts.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-timeouts.js) -- [parallel/test-http2-tls-disconnect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-tls-disconnect.js) -- [parallel/test-http2-too-large-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-too-large-headers.js) -- [parallel/test-http2-too-many-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-too-many-headers.js) -- [parallel/test-http2-too-many-settings.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-too-many-settings.js) -- [parallel/test-http2-too-many-streams.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-too-many-streams.js) -- [parallel/test-http2-trailers-after-session-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-trailers-after-session-close.js) -- [parallel/test-http2-trailers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-trailers.js) -- [parallel/test-http2-unbound-socket-proxy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-unbound-socket-proxy.js) -- [parallel/test-http2-update-settings.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-update-settings.js) -- [parallel/test-http2-util-assert-valid-pseudoheader.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-util-assert-valid-pseudoheader.js) -- [parallel/test-http2-util-asserts.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-util-asserts.js) -- [parallel/test-http2-util-headers-list.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-util-headers-list.js) -- [parallel/test-http2-util-nghttp2error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-util-nghttp2error.js) -- [parallel/test-http2-util-update-options-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-util-update-options-buffer.js) -- [parallel/test-http2-window-size.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-window-size.js) -- [parallel/test-http2-write-callbacks.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-write-callbacks.js) -- [parallel/test-http2-write-empty-string.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-write-empty-string.js) -- [parallel/test-http2-write-finishes-after-stream-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-write-finishes-after-stream-destroy.js) -- [parallel/test-http2-zero-length-header.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-zero-length-header.js) -- [parallel/test-http2-zero-length-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-http2-zero-length-write.js) -- [parallel/test-https-abortcontroller.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-abortcontroller.js) -- [parallel/test-https-agent-abort-controller.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-agent-abort-controller.js) -- [parallel/test-https-agent-additional-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-agent-additional-options.js) -- [parallel/test-https-agent-constructor.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-agent-constructor.js) -- [parallel/test-https-agent-create-connection.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-agent-create-connection.js) -- [parallel/test-https-agent-disable-session-reuse.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-agent-disable-session-reuse.js) -- [parallel/test-https-agent-getname.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-agent-getname.js) -- [parallel/test-https-agent-keylog.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-agent-keylog.js) -- [parallel/test-https-agent-servername.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-agent-servername.js) -- [parallel/test-https-agent-session-eviction.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-agent-session-eviction.js) -- [parallel/test-https-agent-session-injection.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-agent-session-injection.js) -- [parallel/test-https-agent-session-reuse.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-agent-session-reuse.js) -- [parallel/test-https-agent-sni.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-agent-sni.js) -- [parallel/test-https-agent-sockets-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-agent-sockets-leak.js) -- [parallel/test-https-agent-unref-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-agent-unref-socket.js) -- [parallel/test-https-agent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-agent.js) -- [parallel/test-https-argument-of-creating.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-argument-of-creating.js) -- [parallel/test-https-autoselectfamily.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-autoselectfamily.js) -- [parallel/test-https-byteswritten.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-byteswritten.js) -- [parallel/test-https-client-checkServerIdentity.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-client-checkServerIdentity.js) -- [parallel/test-https-client-get-url.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-client-get-url.js) -- [parallel/test-https-client-override-global-agent.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-client-override-global-agent.js) -- [parallel/test-https-client-reject.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-client-reject.js) -- [parallel/test-https-client-renegotiation-limit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-client-renegotiation-limit.js) -- [parallel/test-https-client-resume.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-client-resume.js) -- [parallel/test-https-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-close.js) -- [parallel/test-https-connect-address-family.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-connect-address-family.js) -- [parallel/test-https-connecting-to-http.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-connecting-to-http.js) -- [parallel/test-https-drain.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-drain.js) -- [parallel/test-https-eof-for-eom.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-eof-for-eom.js) -- [parallel/test-https-foafssl.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-foafssl.js) -- [parallel/test-https-host-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-host-headers.js) -- [parallel/test-https-hwm.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-hwm.js) -- [parallel/test-https-insecure-parse-per-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-insecure-parse-per-stream.js) -- [parallel/test-https-keep-alive-drop-requests.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-keep-alive-drop-requests.js) -- [parallel/test-https-localaddress-bind-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-localaddress-bind-error.js) -- [parallel/test-https-localaddress.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-localaddress.js) -- [parallel/test-https-max-header-size-per-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-max-header-size-per-stream.js) -- [parallel/test-https-max-headers-count.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-max-headers-count.js) -- [parallel/test-https-options-boolean-check.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-options-boolean-check.js) -- [parallel/test-https-pfx.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-pfx.js) -- [parallel/test-https-request-arguments.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-request-arguments.js) -- [parallel/test-https-resume-after-renew.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-resume-after-renew.js) -- [parallel/test-https-selfsigned-no-keycertsign-no-crash.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-selfsigned-no-keycertsign-no-crash.js) -- [parallel/test-https-server-async-dispose.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-server-async-dispose.js) -- [parallel/test-https-server-close-all.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-server-close-all.js) -- [parallel/test-https-server-close-destroy-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-server-close-destroy-timeout.js) -- [parallel/test-https-server-close-idle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-server-close-idle.js) -- [parallel/test-https-server-connections-checking-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-server-connections-checking-leak.js) -- [parallel/test-https-server-headers-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-server-headers-timeout.js) -- [parallel/test-https-server-options-incoming-message.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-server-options-incoming-message.js) -- [parallel/test-https-server-options-server-response.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-server-options-server-response.js) -- [parallel/test-https-server-request-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-server-request-timeout.js) -- [parallel/test-https-set-timeout-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-set-timeout-server.js) -- [parallel/test-https-simple.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-simple.js) -- [parallel/test-https-socket-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-socket-options.js) -- [parallel/test-https-strict.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-strict.js) -- [parallel/test-https-timeout-server-2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-timeout-server-2.js) -- [parallel/test-https-timeout-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-timeout-server.js) -- [parallel/test-https-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-timeout.js) -- [parallel/test-https-truncate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-truncate.js) -- [parallel/test-https-unix-socket-self-signed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-https-unix-socket-self-signed.js) -- [parallel/test-icu-data-dir.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-icu-data-dir.js) -- [parallel/test-icu-env.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-icu-env.js) -- [parallel/test-icu-minimum-version.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-icu-minimum-version.js) -- [parallel/test-icu-punycode.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-icu-punycode.js) -- [parallel/test-icu-stringwidth.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-icu-stringwidth.js) -- [parallel/test-inspect-address-in-use.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspect-address-in-use.js) -- [parallel/test-inspect-async-hook-setup-at-inspect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspect-async-hook-setup-at-inspect.js) -- [parallel/test-inspect-publish-uid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspect-publish-uid.js) -- [parallel/test-inspect-support-for-node_options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspect-support-for-node_options.js) -- [parallel/test-inspector-already-activated-cli.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-already-activated-cli.js) -- [parallel/test-inspector-async-call-stack-abort.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-async-call-stack-abort.js) -- [parallel/test-inspector-async-call-stack.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-async-call-stack.js) -- [parallel/test-inspector-async-hook-after-done.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-async-hook-after-done.js) -- [parallel/test-inspector-async-hook-setup-at-inspect-brk.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-async-hook-setup-at-inspect-brk.js) -- [parallel/test-inspector-async-hook-setup-at-signal.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-async-hook-setup-at-signal.js) -- [parallel/test-inspector-async-stack-traces-promise-then.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-async-stack-traces-promise-then.js) -- [parallel/test-inspector-async-stack-traces-set-interval.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-async-stack-traces-set-interval.js) -- [parallel/test-inspector-bindings.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-bindings.js) -- [parallel/test-inspector-break-e.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-break-e.js) -- [parallel/test-inspector-break-when-eval.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-break-when-eval.js) -- [parallel/test-inspector-close-worker.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-close-worker.js) -- [parallel/test-inspector-connect-main-thread.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-connect-main-thread.js) -- [parallel/test-inspector-connect-to-main-thread.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-connect-to-main-thread.js) -- [parallel/test-inspector-console-top-frame.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-console-top-frame.js) -- [parallel/test-inspector-console.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-console.js) -- [parallel/test-inspector-contexts.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-contexts.js) -- [parallel/test-inspector-debug-brk-flag.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-debug-brk-flag.js) -- [parallel/test-inspector-debug-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-debug-end.js) -- [parallel/test-inspector-enabled.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-enabled.js) -- [parallel/test-inspector-esm.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-esm.js) -- [parallel/test-inspector-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-exception.js) -- [parallel/test-inspector-has-idle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-has-idle.js) -- [parallel/test-inspector-has-inspector-false.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-has-inspector-false.js) -- [parallel/test-inspector-heap-allocation-tracker.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-heap-allocation-tracker.js) -- [parallel/test-inspector-heapdump.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-heapdump.js) -- [parallel/test-inspector-inspect-brk-node.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-inspect-brk-node.js) -- [parallel/test-inspector-invalid-args.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-invalid-args.js) -- [parallel/test-inspector-ip-detection.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-ip-detection.js) -- [parallel/test-inspector-module.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-module.js) -- [parallel/test-inspector-multisession-js.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-multisession-js.js) -- [parallel/test-inspector-multisession-ws.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-multisession-ws.js) -- [parallel/test-inspector-not-blocked-on-idle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-not-blocked-on-idle.js) -- [parallel/test-inspector-open-coverage.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-open-coverage.js) -- [parallel/test-inspector-open-port-integer-overflow.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-open-port-integer-overflow.js) -- [parallel/test-inspector-open.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-open.js) -- [parallel/test-inspector-overwrite-config.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-overwrite-config.js) -- [parallel/test-inspector-port-zero-cluster.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-port-zero-cluster.js) -- [parallel/test-inspector-port-zero.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-port-zero.js) -- [parallel/test-inspector-promises.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-promises.js) -- [parallel/test-inspector-reported-host.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-reported-host.js) -- [parallel/test-inspector-resource-name-to-url.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-resource-name-to-url.js) -- [parallel/test-inspector-runtime-evaluate-with-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-runtime-evaluate-with-timeout.js) -- [parallel/test-inspector-scriptparsed-context.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-scriptparsed-context.js) -- [parallel/test-inspector-stop-profile-after-done.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-stop-profile-after-done.js) -- [parallel/test-inspector-stops-no-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-stops-no-file.js) -- [parallel/test-inspector-stress-http.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-stress-http.js) -- [parallel/test-inspector-tracing-domain.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-tracing-domain.js) -- [parallel/test-inspector-vm-global-accessors-getter-sideeffect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-vm-global-accessors-getter-sideeffect.js) -- [parallel/test-inspector-vm-global-accessors-sideeffects.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-vm-global-accessors-sideeffects.js) -- [parallel/test-inspector-wait-for-connection.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-wait-for-connection.js) -- [parallel/test-inspector-waiting-for-disconnect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-waiting-for-disconnect.js) -- [parallel/test-inspector-workers-flat-list.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector-workers-flat-list.js) -- [parallel/test-inspector.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-inspector.js) -- [parallel/test-instanceof.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-instanceof.js) -- [parallel/test-internal-assert.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-assert.js) -- [parallel/test-internal-error-original-names.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-error-original-names.js) -- [parallel/test-internal-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-errors.js) -- [parallel/test-internal-fs-syncwritestream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-fs-syncwritestream.js) -- [parallel/test-internal-fs.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-fs.js) -- [parallel/test-internal-iterable-weak-map.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-iterable-weak-map.js) -- [parallel/test-internal-module-require.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-module-require.js) -- [parallel/test-internal-module-wrap.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-module-wrap.js) -- [parallel/test-internal-modules.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-modules.js) -- [parallel/test-internal-process-binding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-process-binding.js) -- [parallel/test-internal-socket-list-receive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-socket-list-receive.js) -- [parallel/test-internal-socket-list-send.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-socket-list-send.js) -- [parallel/test-internal-util-assertCrypto.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-util-assertCrypto.js) -- [parallel/test-internal-util-classwrapper.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-util-classwrapper.js) -- [parallel/test-internal-util-decorate-error-stack.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-util-decorate-error-stack.js) -- [parallel/test-internal-util-helpers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-util-helpers.js) -- [parallel/test-internal-util-normalizeencoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-util-normalizeencoding.js) -- [parallel/test-internal-util-objects.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-util-objects.js) -- [parallel/test-internal-util-weakreference.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-util-weakreference.js) -- [parallel/test-internal-validators-validateoneof.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-validators-validateoneof.js) -- [parallel/test-internal-validators-validateport.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-validators-validateport.js) -- [parallel/test-internal-webidl-converttoint.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-internal-webidl-converttoint.js) -- [parallel/test-intl-v8BreakIterator.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-intl-v8BreakIterator.js) -- [parallel/test-intl.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-intl.js) -- [parallel/test-js-stream-call-properties.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-js-stream-call-properties.js) -- [parallel/test-kill-segfault-freebsd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-kill-segfault-freebsd.js) -- [parallel/test-listen-fd-cluster.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-listen-fd-cluster.js) -- [parallel/test-listen-fd-detached-inherit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-listen-fd-detached-inherit.js) -- [parallel/test-listen-fd-detached.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-listen-fd-detached.js) -- [parallel/test-listen-fd-ebadf.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-listen-fd-ebadf.js) -- [parallel/test-listen-fd-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-listen-fd-server.js) -- [parallel/test-macos-app-sandbox.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-macos-app-sandbox.js) -- [parallel/test-math-random.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-math-random.js) -- [parallel/test-memory-usage-emfile.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-memory-usage-emfile.js) -- [parallel/test-memory-usage.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-memory-usage.js) -- [parallel/test-messagechannel.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-messagechannel.js) -- [parallel/test-messageevent-brandcheck.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-messageevent-brandcheck.js) -- [parallel/test-messageport-hasref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-messageport-hasref.js) -- [parallel/test-messaging-maketransferable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-messaging-maketransferable.js) -- [parallel/test-microtask-queue-integration.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-microtask-queue-integration.js) -- [parallel/test-microtask-queue-run-immediate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-microtask-queue-run-immediate.js) -- [parallel/test-microtask-queue-run.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-microtask-queue-run.js) -- [parallel/test-mime-api.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-mime-api.js) -- [parallel/test-mime-whatwg.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-mime-whatwg.js) -- [parallel/test-module-binding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-binding.js) -- [parallel/test-module-builtin.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-builtin.js) -- [parallel/test-module-cache.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-cache.js) -- [parallel/test-module-children.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-children.js) -- [parallel/test-module-circular-dependency-warning.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-circular-dependency-warning.js) -- [parallel/test-module-circular-symlinks.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-circular-symlinks.js) -- [parallel/test-module-create-require.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-create-require.js) -- [parallel/test-module-globalpaths-nodepath.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-globalpaths-nodepath.js) -- [parallel/test-module-isBuiltin.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-isBuiltin.js) -- [parallel/test-module-loading-deprecated.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-loading-deprecated.js) -- [parallel/test-module-loading-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-loading-error.js) -- [parallel/test-module-loading-globalpaths.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-loading-globalpaths.js) -- [parallel/test-module-main-extension-lookup.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-main-extension-lookup.js) -- [parallel/test-module-main-fail.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-main-fail.js) -- [parallel/test-module-main-preserve-symlinks-fail.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-main-preserve-symlinks-fail.js) -- [parallel/test-module-multi-extensions.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-multi-extensions.js) -- [parallel/test-module-nodemodulepaths.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-nodemodulepaths.js) -- [parallel/test-module-parent-deprecation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-parent-deprecation.js) -- [parallel/test-module-parent-setter-deprecation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-parent-setter-deprecation.js) -- [parallel/test-module-prototype-mutation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-prototype-mutation.js) -- [parallel/test-module-readonly.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-readonly.js) -- [parallel/test-module-relative-lookup.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-relative-lookup.js) -- [parallel/test-module-run-main-monkey-patch.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-run-main-monkey-patch.js) -- [parallel/test-module-stat.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-stat.js) -- [parallel/test-module-symlinked-peer-modules.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-symlinked-peer-modules.js) -- [parallel/test-module-version.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-version.js) -- [parallel/test-module-wrap.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-wrap.js) -- [parallel/test-module-wrapper.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-module-wrapper.js) -- [parallel/test-net-after-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-after-close.js) -- [parallel/test-net-allow-half-open.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-allow-half-open.js) -- [parallel/test-net-autoselectfamily-commandline-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-autoselectfamily-commandline-option.js) -- [parallel/test-net-autoselectfamily-default.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-autoselectfamily-default.js) -- [parallel/test-net-autoselectfamily-ipv4first.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-autoselectfamily-ipv4first.js) -- [parallel/test-net-better-error-messages-listen.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-better-error-messages-listen.js) -- [parallel/test-net-binary.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-binary.js) -- [parallel/test-net-bind-twice.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-bind-twice.js) -- [parallel/test-net-buffersize.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-buffersize.js) -- [parallel/test-net-bytes-read.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-bytes-read.js) -- [parallel/test-net-bytes-stats.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-bytes-stats.js) -- [parallel/test-net-bytes-written-large.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-bytes-written-large.js) -- [parallel/test-net-can-reset-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-can-reset-timeout.js) -- [parallel/test-net-child-process-connect-reset.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-child-process-connect-reset.js) -- [parallel/test-net-client-bind-twice.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-client-bind-twice.js) -- [parallel/test-net-connect-abort-controller.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-abort-controller.js) -- [parallel/test-net-connect-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-buffer.js) -- [parallel/test-net-connect-buffer2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-buffer2.js) -- [parallel/test-net-connect-call-socket-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-call-socket-connect.js) -- [parallel/test-net-connect-keepalive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-keepalive.js) -- [parallel/test-net-connect-memleak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-memleak.js) -- [parallel/test-net-connect-nodelay.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-nodelay.js) -- [parallel/test-net-connect-options-allowhalfopen.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-options-allowhalfopen.js) -- [parallel/test-net-connect-options-fd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-options-fd.js) -- [parallel/test-net-connect-options-invalid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-options-invalid.js) -- [parallel/test-net-connect-options-ipv6.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-options-ipv6.js) -- [parallel/test-net-connect-options-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-options-path.js) -- [parallel/test-net-connect-options-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-options-port.js) -- [parallel/test-net-connect-paused-connection.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-paused-connection.js) -- [parallel/test-net-connect-reset-after-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-reset-after-destroy.js) -- [parallel/test-net-connect-reset-before-connected.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-reset-before-connected.js) -- [parallel/test-net-connect-reset-until-connected.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-reset-until-connected.js) -- [parallel/test-net-connect-reset.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-connect-reset.js) -- [parallel/test-net-deprecated-setsimultaneousaccepts.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-deprecated-setsimultaneousaccepts.js) -- [parallel/test-net-dns-custom-lookup.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-dns-custom-lookup.js) -- [parallel/test-net-dns-lookup-skip.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-dns-lookup-skip.js) -- [parallel/test-net-dns-lookup.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-dns-lookup.js) -- [parallel/test-net-eaddrinuse.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-eaddrinuse.js) -- [parallel/test-net-end-destroyed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-end-destroyed.js) -- [parallel/test-net-error-twice.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-error-twice.js) -- [parallel/test-net-keepalive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-keepalive.js) -- [parallel/test-net-large-string.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-large-string.js) -- [parallel/test-net-listen-after-destroying-stdin.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-listen-after-destroying-stdin.js) -- [parallel/test-net-listen-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-listen-error.js) -- [parallel/test-net-listen-exclusive-random-ports.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-listen-exclusive-random-ports.js) -- [parallel/test-net-listen-fd0.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-listen-fd0.js) -- [parallel/test-net-listen-ipv6only.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-listen-ipv6only.js) -- [parallel/test-net-local-address-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-local-address-port.js) -- [parallel/test-net-normalize-args.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-normalize-args.js) -- [parallel/test-net-onread-static-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-onread-static-buffer.js) -- [parallel/test-net-pause-resume-connecting.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-pause-resume-connecting.js) -- [parallel/test-net-perf_hooks.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-perf_hooks.js) -- [parallel/test-net-persistent-keepalive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-persistent-keepalive.js) -- [parallel/test-net-persistent-nodelay.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-persistent-nodelay.js) -- [parallel/test-net-persistent-ref-unref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-persistent-ref-unref.js) -- [parallel/test-net-pingpong.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-pingpong.js) -- [parallel/test-net-reconnect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-reconnect.js) -- [parallel/test-net-remote-address-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-remote-address-port.js) -- [parallel/test-net-remote-address.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-remote-address.js) -- [parallel/test-net-server-call-listen-multiple-times.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-server-call-listen-multiple-times.js) -- [parallel/test-net-server-capture-rejection.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-server-capture-rejection.js) -- [parallel/test-net-server-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-server-close.js) -- [parallel/test-net-server-drop-connections.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-server-drop-connections.js) -- [parallel/test-net-server-keepalive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-server-keepalive.js) -- [parallel/test-net-server-listen-handle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-server-listen-handle.js) -- [parallel/test-net-server-max-connections-close-makes-more-available.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-server-max-connections-close-makes-more-available.js) -- [parallel/test-net-server-max-connections.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-server-max-connections.js) -- [parallel/test-net-server-nodelay.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-server-nodelay.js) -- [parallel/test-net-server-pause-on-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-server-pause-on-connect.js) -- [parallel/test-net-server-reset.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-server-reset.js) -- [parallel/test-net-server-simultaneous-accepts-produce-warning-once.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-server-simultaneous-accepts-produce-warning-once.js) -- [parallel/test-net-server-try-ports.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-server-try-ports.js) -- [parallel/test-net-settimeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-settimeout.js) -- [parallel/test-net-socket-byteswritten.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-byteswritten.js) -- [parallel/test-net-socket-close-after-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-close-after-end.js) -- [parallel/test-net-socket-connect-invalid-autoselectfamily.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-connect-invalid-autoselectfamily.js) -- [parallel/test-net-socket-connect-invalid-autoselectfamilyattempttimeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-connect-invalid-autoselectfamilyattempttimeout.js) -- [parallel/test-net-socket-connect-without-cb.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-connect-without-cb.js) -- [parallel/test-net-socket-connecting.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-connecting.js) -- [parallel/test-net-socket-constructor.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-constructor.js) -- [parallel/test-net-socket-destroy-send.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-destroy-send.js) -- [parallel/test-net-socket-end-before-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-end-before-connect.js) -- [parallel/test-net-socket-end-callback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-end-callback.js) -- [parallel/test-net-socket-local-address.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-local-address.js) -- [parallel/test-net-socket-ready-without-cb.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-ready-without-cb.js) -- [parallel/test-net-socket-reset-send.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-reset-send.js) -- [parallel/test-net-socket-reset-twice.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-reset-twice.js) -- [parallel/test-net-socket-timeout-unref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-timeout-unref.js) -- [parallel/test-net-socket-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-timeout.js) -- [parallel/test-net-socket-write-after-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-write-after-close.js) -- [parallel/test-net-socket-write-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-write-error.js) -- [parallel/test-net-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-stream.js) -- [parallel/test-net-sync-cork.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-sync-cork.js) -- [parallel/test-net-throttle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-throttle.js) -- [parallel/test-net-writable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-writable.js) -- [parallel/test-net-write-after-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-write-after-close.js) -- [parallel/test-net-write-after-end-nt.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-write-after-end-nt.js) -- [parallel/test-net-write-cb-on-destroy-before-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-write-cb-on-destroy-before-connect.js) -- [parallel/test-net-write-connect-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-write-connect-write.js) -- [parallel/test-net-write-fully-async-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-write-fully-async-buffer.js) -- [parallel/test-net-write-fully-async-hex-string.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-write-fully-async-hex-string.js) -- [parallel/test-net-write-slow.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-write-slow.js) -- [parallel/test-next-tick-domain.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-next-tick-domain.js) -- [parallel/test-next-tick-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-next-tick-errors.js) -- [parallel/test-no-addons-resolution-condition.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-no-addons-resolution-condition.js) -- [parallel/test-no-node-snapshot.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-no-node-snapshot.js) -- [parallel/test-npm-install.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-npm-install.js) -- [parallel/test-npm-version.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-npm-version.js) -- [parallel/test-openssl-ca-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-openssl-ca-options.js) -- [parallel/test-options-binding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-options-binding.js) -- [parallel/test-os-checked-function.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-os-checked-function.js) -- [parallel/test-os-eol.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-os-eol.js) -- [parallel/test-os-homedir-no-envvar.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-os-homedir-no-envvar.js) -- [parallel/test-os-process-priority.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-os-process-priority.js) -- [parallel/test-os-userinfo-handles-getter-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-os-userinfo-handles-getter-errors.js) -- [parallel/test-path-posix-relative-on-windows.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-path-posix-relative-on-windows.js) -- [parallel/test-pending-deprecation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-pending-deprecation.js) -- [parallel/test-perf-gc-crash.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-perf-gc-crash.js) -- [parallel/test-perf-hooks-histogram.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-perf-hooks-histogram.js) -- [parallel/test-perf-hooks-resourcetiming.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-perf-hooks-resourcetiming.js) -- [parallel/test-perf-hooks-usertiming.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-perf-hooks-usertiming.js) -- [parallel/test-perf-hooks-worker-timeorigin.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-perf-hooks-worker-timeorigin.js) -- [parallel/test-performance-eventlooputil.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performance-eventlooputil.js) -- [parallel/test-performance-function-async.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performance-function-async.js) -- [parallel/test-performance-function.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performance-function.js) -- [parallel/test-performance-gc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performance-gc.js) -- [parallel/test-performance-global.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performance-global.js) -- [parallel/test-performance-measure.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performance-measure.js) -- [parallel/test-performance-nodetiming.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performance-nodetiming.js) -- [parallel/test-performance-resourcetimingbufferfull.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performance-resourcetimingbufferfull.js) -- [parallel/test-performance-resourcetimingbuffersize.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performance-resourcetimingbuffersize.js) -- [parallel/test-performanceobserver-gc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performanceobserver-gc.js) -- [parallel/test-performanceobserver.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-performanceobserver.js) -- [parallel/test-permission-allow-child-process-cli.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-allow-child-process-cli.js) -- [parallel/test-permission-allow-worker-cli.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-allow-worker-cli.js) -- [parallel/test-permission-child-process-cli.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-child-process-cli.js) -- [parallel/test-permission-experimental.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-experimental.js) -- [parallel/test-permission-fs-read.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-read.js) -- [parallel/test-permission-fs-relative-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-relative-path.js) -- [parallel/test-permission-fs-supported.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-supported.js) -- [parallel/test-permission-fs-symlink-relative.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-symlink-relative.js) -- [parallel/test-permission-fs-symlink-target-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-symlink-target-write.js) -- [parallel/test-permission-fs-symlink.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-symlink.js) -- [parallel/test-permission-fs-traversal-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-traversal-path.js) -- [parallel/test-permission-fs-wildcard.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-wildcard.js) -- [parallel/test-permission-fs-windows-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-windows-path.js) -- [parallel/test-permission-fs-write-report.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-write-report.js) -- [parallel/test-permission-fs-write-v8.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-write-v8.js) -- [parallel/test-permission-fs-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-fs-write.js) -- [parallel/test-permission-has.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-has.js) -- [parallel/test-permission-inspector.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-inspector.js) -- [parallel/test-permission-processbinding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-processbinding.js) -- [parallel/test-permission-warning-flags.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-warning-flags.js) -- [parallel/test-permission-worker-threads-cli.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-permission-worker-threads-cli.js) -- [parallel/test-pipe-abstract-socket-http.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-pipe-abstract-socket-http.js) -- [parallel/test-pipe-abstract-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-pipe-abstract-socket.js) -- [parallel/test-pipe-address.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-pipe-address.js) -- [parallel/test-pipe-file-to-http.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-pipe-file-to-http.js) -- [parallel/test-pipe-head.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-pipe-head.js) -- [parallel/test-pipe-outgoing-message-data-emitted-after-ended.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-pipe-outgoing-message-data-emitted-after-ended.js) -- [parallel/test-pipe-return-val.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-pipe-return-val.js) -- [parallel/test-pipe-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-pipe-stream.js) -- [parallel/test-pipe-unref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-pipe-unref.js) -- [parallel/test-pipe-writev.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-pipe-writev.js) -- [parallel/test-policy-crypto-default-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-policy-crypto-default-encoding.js) -- [parallel/test-policy-crypto-hash-tampering.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-policy-crypto-hash-tampering.js) -- [parallel/test-policy-dependencies.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-policy-dependencies.js) -- [parallel/test-policy-dependency-conditions.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-policy-dependency-conditions.js) -- [parallel/test-policy-integrity-flag.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-policy-integrity-flag.js) -- [parallel/test-policy-manifest.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-policy-manifest.js) -- [parallel/test-policy-parse-integrity.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-policy-parse-integrity.js) -- [parallel/test-policy-process-binding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-policy-process-binding.js) -- [parallel/test-policy-scopes-dependencies.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-policy-scopes-dependencies.js) -- [parallel/test-policy-scopes-integrity.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-policy-scopes-integrity.js) -- [parallel/test-policy-scopes.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-policy-scopes.js) -- [parallel/test-preload-print-process-argv.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-preload-print-process-argv.js) -- [parallel/test-preload-self-referential.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-preload-self-referential.js) -- [parallel/test-preload-worker.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-preload-worker.js) -- [parallel/test-preload.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-preload.js) -- [parallel/test-primordials-apply.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-primordials-apply.js) -- [parallel/test-primordials-promise.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-primordials-promise.js) -- [parallel/test-primordials-regexp.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-primordials-regexp.js) -- [parallel/test-priority-queue.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-priority-queue.js) -- [parallel/test-process-abort.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-abort.js) -- [parallel/test-process-argv-0.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-argv-0.js) -- [parallel/test-process-assert.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-assert.js) -- [parallel/test-process-beforeexit-throw-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-beforeexit-throw-exit.js) -- [parallel/test-process-binding-util.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-binding-util.js) -- [parallel/test-process-binding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-binding.js) -- [parallel/test-process-chdir-errormessage.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-chdir-errormessage.js) -- [parallel/test-process-chdir.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-chdir.js) -- [parallel/test-process-config.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-config.js) -- [parallel/test-process-constants-noatime.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-constants-noatime.js) -- [parallel/test-process-constrained-memory.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-constrained-memory.js) -- [parallel/test-process-cpuUsage.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-cpuUsage.js) -- [parallel/test-process-dlopen-error-message-crash.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-dlopen-error-message-crash.js) -- [parallel/test-process-dlopen-undefined-exports.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-dlopen-undefined-exports.js) -- [parallel/test-process-domain-segfault.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-domain-segfault.js) -- [parallel/test-process-emit-warning-from-native.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-emit-warning-from-native.js) -- [parallel/test-process-emit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-emit.js) -- [parallel/test-process-emitwarning.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-emitwarning.js) -- [parallel/test-process-env-allowed-flags-are-documented.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-env-allowed-flags-are-documented.js) -- [parallel/test-process-env-delete.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-env-delete.js) -- [parallel/test-process-env-deprecation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-env-deprecation.js) -- [parallel/test-process-env-ignore-getter-setter.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-env-ignore-getter-setter.js) -- [parallel/test-process-env-sideeffects.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-env-sideeffects.js) -- [parallel/test-process-env-symbols.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-env-symbols.js) -- [parallel/test-process-env-tz.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-env-tz.js) -- [parallel/test-process-env-windows-error-reset.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-env-windows-error-reset.js) -- [parallel/test-process-env.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-env.js) -- [parallel/test-process-euid-egid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-euid-egid.js) -- [parallel/test-process-exception-capture-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-exception-capture-errors.js) -- [parallel/test-process-exception-capture-should-abort-on-uncaught-setflagsfromstring.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-exception-capture-should-abort-on-uncaught-setflagsfromstring.js) -- [parallel/test-process-exception-capture-should-abort-on-uncaught.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-exception-capture-should-abort-on-uncaught.js) -- [parallel/test-process-exception-capture.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-exception-capture.js) -- [parallel/test-process-exec-argv.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-exec-argv.js) -- [parallel/test-process-execpath.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-execpath.js) -- [parallel/test-process-exit-code-validation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-exit-code-validation.js) -- [parallel/test-process-exit-code.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-exit-code.js) -- [parallel/test-process-external-stdio-close-spawn.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-external-stdio-close-spawn.js) -- [parallel/test-process-external-stdio-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-external-stdio-close.js) -- [parallel/test-process-features.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-features.js) -- [parallel/test-process-getactivehandles.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-getactivehandles.js) -- [parallel/test-process-getactiverequests.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-getactiverequests.js) -- [parallel/test-process-getactiveresources-track-active-handles.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-getactiveresources-track-active-handles.js) -- [parallel/test-process-getactiveresources-track-active-requests.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-getactiveresources-track-active-requests.js) -- [parallel/test-process-getactiveresources-track-interval-lifetime.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-getactiveresources-track-interval-lifetime.js) -- [parallel/test-process-getactiveresources-track-multiple-timers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-getactiveresources-track-multiple-timers.js) -- [parallel/test-process-getactiveresources-track-timer-lifetime.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-getactiveresources-track-timer-lifetime.js) -- [parallel/test-process-getactiveresources.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-getactiveresources.js) -- [parallel/test-process-getgroups.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-getgroups.js) -- [parallel/test-process-hrtime-bigint.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-hrtime-bigint.js) -- [parallel/test-process-hrtime.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-hrtime.js) -- [parallel/test-process-initgroups.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-initgroups.js) -- [parallel/test-process-kill-null.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-kill-null.js) -- [parallel/test-process-next-tick.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-next-tick.js) -- [parallel/test-process-no-deprecation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-no-deprecation.js) -- [parallel/test-process-ppid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-ppid.js) -- [parallel/test-process-prototype.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-prototype.js) -- [parallel/test-process-raw-debug.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-raw-debug.js) -- [parallel/test-process-really-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-really-exit.js) -- [parallel/test-process-redirect-warnings-env.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-redirect-warnings-env.js) -- [parallel/test-process-redirect-warnings.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-redirect-warnings.js) -- [parallel/test-process-release.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-release.js) -- [parallel/test-process-remove-all-signal-listeners.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-remove-all-signal-listeners.js) -- [parallel/test-process-setgroups.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-setgroups.js) -- [parallel/test-process-setsourcemapsenabled.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-setsourcemapsenabled.js) -- [parallel/test-process-setuid-io-uring.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-setuid-io-uring.js) -- [parallel/test-process-title-cli.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-title-cli.js) -- [parallel/test-process-uid-gid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-uid-gid.js) -- [parallel/test-process-umask-mask.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-umask-mask.js) -- [parallel/test-process-umask.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-umask.js) -- [parallel/test-process-uncaught-exception-monitor.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-uncaught-exception-monitor.js) -- [parallel/test-process-versions.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-versions.js) -- [parallel/test-process-warning.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-process-warning.js) -- [parallel/test-promise-handled-rejection-no-warning.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-handled-rejection-no-warning.js) -- [parallel/test-promise-hook-create-hook.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-hook-create-hook.js) -- [parallel/test-promise-hook-exceptions.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-hook-exceptions.js) -- [parallel/test-promise-hook-on-after.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-hook-on-after.js) -- [parallel/test-promise-hook-on-before.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-hook-on-before.js) -- [parallel/test-promise-hook-on-init.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-hook-on-init.js) -- [parallel/test-promise-hook-on-resolve.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-hook-on-resolve.js) -- [parallel/test-promise-reject-callback-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-reject-callback-exception.js) -- [parallel/test-promise-swallowed-event.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-swallowed-event.js) -- [parallel/test-promise-unhandled-default.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-unhandled-default.js) -- [parallel/test-promise-unhandled-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-unhandled-error.js) -- [parallel/test-promise-unhandled-flag.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-unhandled-flag.js) -- [parallel/test-promise-unhandled-silent-no-hook.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-unhandled-silent-no-hook.js) -- [parallel/test-promise-unhandled-throw.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-unhandled-throw.js) -- [parallel/test-promise-unhandled-warn-no-hook.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-unhandled-warn-no-hook.js) -- [parallel/test-promise-unhandled-warn.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promise-unhandled-warn.js) -- [parallel/test-promises-unhandled-proxy-rejections.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promises-unhandled-proxy-rejections.js) -- [parallel/test-promises-unhandled-rejections.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promises-unhandled-rejections.js) -- [parallel/test-promises-unhandled-symbol-rejections.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promises-unhandled-symbol-rejections.js) -- [parallel/test-promises-warning-on-unhandled-rejection.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-promises-warning-on-unhandled-rejection.js) -- [parallel/test-queue-microtask-uncaught-asynchooks.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-queue-microtask-uncaught-asynchooks.js) -- [parallel/test-queue-microtask.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-queue-microtask.js) -- [parallel/test-readable-from-iterator-closing.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readable-from-iterator-closing.js) -- [parallel/test-readable-from-web-enqueue-then-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readable-from-web-enqueue-then-close.js) -- [parallel/test-readable-from.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readable-from.js) -- [parallel/test-readable-large-hwm.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readable-large-hwm.js) -- [parallel/test-readable-single-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readable-single-end.js) -- [parallel/test-readline-async-iterators-backpressure.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readline-async-iterators-backpressure.js) -- [parallel/test-readline-async-iterators-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readline-async-iterators-destroy.js) -- [parallel/test-readline-async-iterators.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readline-async-iterators.js) -- [parallel/test-readline-carriage-return-between-chunks.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readline-carriage-return-between-chunks.js) -- [parallel/test-readline-csi.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readline-csi.js) -- [parallel/test-readline-input-onerror.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readline-input-onerror.js) -- [parallel/test-readline-interface-no-trailing-newline.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readline-interface-no-trailing-newline.js) -- [parallel/test-readline-interface-recursive-writes.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readline-interface-recursive-writes.js) -- [parallel/test-readline-interface.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readline-interface.js) -- [parallel/test-readline-promises-interface.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readline-promises-interface.js) -- [parallel/test-readline-promises-tab-complete.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readline-promises-tab-complete.js) -- [parallel/test-readline-tab-complete.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-readline-tab-complete.js) -- [parallel/test-ref-unref-return.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-ref-unref-return.js) -- [parallel/test-regression-object-prototype.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-regression-object-prototype.js) -- [parallel/test-release-changelog.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-release-changelog.js) -- [parallel/test-release-npm.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-release-npm.js) -- [parallel/test-repl-array-prototype-tempering.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-array-prototype-tempering.js) -- [parallel/test-repl-autocomplete.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-autocomplete.js) -- [parallel/test-repl-autolibs.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-autolibs.js) -- [parallel/test-repl-clear-immediate-crash.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-clear-immediate-crash.js) -- [parallel/test-repl-cli-eval.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-cli-eval.js) -- [parallel/test-repl-colors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-colors.js) -- [parallel/test-repl-context.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-context.js) -- [parallel/test-repl-definecommand.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-definecommand.js) -- [parallel/test-repl-domain.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-domain.js) -- [parallel/test-repl-dynamic-import.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-dynamic-import.js) -- [parallel/test-repl-editor.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-editor.js) -- [parallel/test-repl-empty.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-empty.js) -- [parallel/test-repl-end-emits-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-end-emits-exit.js) -- [parallel/test-repl-envvars.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-envvars.js) -- [parallel/test-repl-eval.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-eval.js) -- [parallel/test-repl-function-definition-edge-case.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-function-definition-edge-case.js) -- [parallel/test-repl-harmony.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-harmony.js) -- [parallel/test-repl-history-navigation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-history-navigation.js) -- [parallel/test-repl-history-perm.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-history-perm.js) -- [parallel/test-repl-import-referrer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-import-referrer.js) -- [parallel/test-repl-inspect-defaults.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-inspect-defaults.js) -- [parallel/test-repl-inspector.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-inspector.js) -- [parallel/test-repl-let-process.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-let-process.js) -- [parallel/test-repl-load-multiline-no-trailing-newline.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-load-multiline-no-trailing-newline.js) -- [parallel/test-repl-load-multiline.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-load-multiline.js) -- [parallel/test-repl-mode.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-mode.js) -- [parallel/test-repl-multiline.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-multiline.js) -- [parallel/test-repl-no-terminal.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-no-terminal.js) -- [parallel/test-repl-null-thrown.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-null-thrown.js) -- [parallel/test-repl-null.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-null.js) -- [parallel/test-repl-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-options.js) -- [parallel/test-repl-permission-model.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-permission-model.js) -- [parallel/test-repl-persistent-history.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-persistent-history.js) -- [parallel/test-repl-preprocess-top-level-await.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-preprocess-top-level-await.js) -- [parallel/test-repl-pretty-custom-stack.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-pretty-custom-stack.js) -- [parallel/test-repl-pretty-stack-custom-writer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-pretty-stack-custom-writer.js) -- [parallel/test-repl-pretty-stack.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-pretty-stack.js) -- [parallel/test-repl-preview.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-preview.js) -- [parallel/test-repl-programmatic-history.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-programmatic-history.js) -- [parallel/test-repl-recoverable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-recoverable.js) -- [parallel/test-repl-require-after-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-require-after-write.js) -- [parallel/test-repl-require-cache.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-require-cache.js) -- [parallel/test-repl-require-context.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-require-context.js) -- [parallel/test-repl-require-self-referential.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-require-self-referential.js) -- [parallel/test-repl-require.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-require.js) -- [parallel/test-repl-reset-event.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-reset-event.js) -- [parallel/test-repl-reverse-search.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-reverse-search.js) -- [parallel/test-repl-save-load.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-save-load.js) -- [parallel/test-repl-setprompt.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-setprompt.js) -- [parallel/test-repl-sigint-nested-eval.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-sigint-nested-eval.js) -- [parallel/test-repl-sigint.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-sigint.js) -- [parallel/test-repl-stdin-push-null.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-stdin-push-null.js) -- [parallel/test-repl-strict-mode-previews.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-strict-mode-previews.js) -- [parallel/test-repl-syntax-error-handling.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-syntax-error-handling.js) -- [parallel/test-repl-syntax-error-stack.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-syntax-error-stack.js) -- [parallel/test-repl-tab-complete-crash.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-tab-complete-crash.js) -- [parallel/test-repl-tab-complete-import.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-tab-complete-import.js) -- [parallel/test-repl-tab-complete-nested-repls.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-tab-complete-nested-repls.js) -- [parallel/test-repl-tab-complete-no-warn.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-tab-complete-no-warn.js) -- [parallel/test-repl-tab-complete-on-editor-mode.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-tab-complete-on-editor-mode.js) -- [parallel/test-repl-tab-complete.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-tab-complete.js) -- [parallel/test-repl-tab.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-tab.js) -- [parallel/test-repl-throw-null-or-undefined.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-throw-null-or-undefined.js) -- [parallel/test-repl-top-level-await.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-top-level-await.js) -- [parallel/test-repl-uncaught-exception-async.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-uncaught-exception-async.js) -- [parallel/test-repl-uncaught-exception-evalcallback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-uncaught-exception-evalcallback.js) -- [parallel/test-repl-uncaught-exception-standalone.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-uncaught-exception-standalone.js) -- [parallel/test-repl-uncaught-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-uncaught-exception.js) -- [parallel/test-repl-underscore.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-underscore.js) -- [parallel/test-repl-unexpected-token-recoverable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-unexpected-token-recoverable.js) -- [parallel/test-repl-unsafe-array-iteration.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-unsafe-array-iteration.js) -- [parallel/test-repl-unsupported-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-unsupported-option.js) -- [parallel/test-repl-use-global.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl-use-global.js) -- [parallel/test-repl.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-repl.js) -- [parallel/test-require-cache.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-cache.js) -- [parallel/test-require-delete-array-iterator.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-delete-array-iterator.js) -- [parallel/test-require-dot.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-dot.js) -- [parallel/test-require-empty-main.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-empty-main.js) -- [parallel/test-require-enoent-dir.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-enoent-dir.js) -- [parallel/test-require-exceptions.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-exceptions.js) -- [parallel/test-require-extension-over-directory.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-extension-over-directory.js) -- [parallel/test-require-extensions-main.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-extensions-main.js) -- [parallel/test-require-extensions-same-filename-as-dir-trailing-slash.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-extensions-same-filename-as-dir-trailing-slash.js) -- [parallel/test-require-extensions-same-filename-as-dir.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-extensions-same-filename-as-dir.js) -- [parallel/test-require-invalid-main-no-exports.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-invalid-main-no-exports.js) -- [parallel/test-require-invalid-package.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-invalid-package.js) -- [parallel/test-require-json.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-json.js) -- [parallel/test-require-long-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-long-path.js) -- [parallel/test-require-mjs.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-mjs.js) -- [parallel/test-require-node-prefix.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-node-prefix.js) -- [parallel/test-require-nul.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-nul.js) -- [parallel/test-require-process.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-process.js) -- [parallel/test-require-resolve.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-resolve.js) -- [parallel/test-require-symlink.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-symlink.js) -- [parallel/test-require-unicode.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-require-unicode.js) -- [parallel/test-resource-usage.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-resource-usage.js) -- [parallel/test-runner-cli-concurrency.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-cli-concurrency.js) -- [parallel/test-runner-cli-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-cli-timeout.js) -- [parallel/test-runner-cli.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-cli.js) -- [parallel/test-runner-concurrency.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-concurrency.js) -- [parallel/test-runner-coverage.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-coverage.js) -- [parallel/test-runner-exit-code.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-exit-code.js) -- [parallel/test-runner-extraneous-async-activity.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-extraneous-async-activity.js) -- [parallel/test-runner-filetest-location.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-filetest-location.js) -- [parallel/test-runner-import-no-scheme.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-import-no-scheme.js) -- [parallel/test-runner-misc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-misc.js) -- [parallel/test-runner-mock-timers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-mock-timers.js) -- [parallel/test-runner-mocking.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-mocking.js) -- [parallel/test-runner-option-validation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-option-validation.js) -- [parallel/test-runner-reporters.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-reporters.js) -- [parallel/test-runner-root-after-with-refed-handles.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-root-after-with-refed-handles.js) -- [parallel/test-runner-string-to-regexp.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-string-to-regexp.js) -- [parallel/test-runner-test-filter.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-test-filter.js) -- [parallel/test-runner-typechecking.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-runner-typechecking.js) -- [parallel/test-safe-get-env.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-safe-get-env.js) -- [parallel/test-security-revert-unknown.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-security-revert-unknown.js) -- [parallel/test-set-http-max-http-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-set-http-max-http-headers.js) -- [parallel/test-set-incoming-message-header.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-set-incoming-message-header.js) -- [parallel/test-set-process-debug-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-set-process-debug-port.js) -- [parallel/test-setproctitle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-setproctitle.js) -- [parallel/test-shadow-realm-allowed-builtin-modules.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-shadow-realm-allowed-builtin-modules.js) -- [parallel/test-shadow-realm-custom-loaders.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-shadow-realm-custom-loaders.js) -- [parallel/test-shadow-realm-gc-module.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-shadow-realm-gc-module.js) -- [parallel/test-shadow-realm-gc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-shadow-realm-gc.js) -- [parallel/test-shadow-realm-globals.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-shadow-realm-globals.js) -- [parallel/test-shadow-realm-import-value-resolve.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-shadow-realm-import-value-resolve.js) -- [parallel/test-shadow-realm-module.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-shadow-realm-module.js) -- [parallel/test-shadow-realm-preload-module.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-shadow-realm-preload-module.js) -- [parallel/test-shadow-realm-prepare-stack-trace.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-shadow-realm-prepare-stack-trace.js) -- [parallel/test-shadow-realm.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-shadow-realm.js) -- [parallel/test-sigint-infinite-loop.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-sigint-infinite-loop.js) -- [parallel/test-signal-args.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-signal-args.js) -- [parallel/test-signal-handler-remove-on-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-signal-handler-remove-on-exit.js) -- [parallel/test-signal-handler.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-signal-handler.js) -- [parallel/test-signal-safety.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-signal-safety.js) -- [parallel/test-signal-unregister.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-signal-unregister.js) -- [parallel/test-single-executable-blob-config-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-single-executable-blob-config-errors.js) -- [parallel/test-single-executable-blob-config.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-single-executable-blob-config.js) -- [parallel/test-snapshot-api.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-api.js) -- [parallel/test-snapshot-argv1.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-argv1.js) -- [parallel/test-snapshot-basic.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-basic.js) -- [parallel/test-snapshot-cjs-main.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-cjs-main.js) -- [parallel/test-snapshot-console.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-console.js) -- [parallel/test-snapshot-cwd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-cwd.js) -- [parallel/test-snapshot-dns-lookup-localhost-promise.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-dns-lookup-localhost-promise.js) -- [parallel/test-snapshot-dns-lookup-localhost.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-dns-lookup-localhost.js) -- [parallel/test-snapshot-dns-resolve-localhost-promise.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-dns-resolve-localhost-promise.js) -- [parallel/test-snapshot-dns-resolve-localhost.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-dns-resolve-localhost.js) -- [parallel/test-snapshot-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-error.js) -- [parallel/test-snapshot-eval.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-eval.js) -- [parallel/test-snapshot-gzip.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-gzip.js) -- [parallel/test-snapshot-incompatible.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-incompatible.js) -- [parallel/test-snapshot-namespaced-builtin.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-namespaced-builtin.js) -- [parallel/test-snapshot-net.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-net.js) -- [parallel/test-snapshot-typescript.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-typescript.js) -- [parallel/test-snapshot-umd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-umd.js) -- [parallel/test-snapshot-warning.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-warning.js) -- [parallel/test-snapshot-weak-reference.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-weak-reference.js) -- [parallel/test-snapshot-worker.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-snapshot-worker.js) -- [parallel/test-socket-address.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-socket-address.js) -- [parallel/test-socket-options-invalid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-socket-options-invalid.js) -- [parallel/test-socket-write-after-fin-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-socket-write-after-fin-error.js) -- [parallel/test-socket-write-after-fin.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-socket-write-after-fin.js) -- [parallel/test-socket-writes-before-passed-to-tls-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-socket-writes-before-passed-to-tls-socket.js) -- [parallel/test-socketaddress.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-socketaddress.js) -- [parallel/test-source-map-api.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-source-map-api.js) -- [parallel/test-source-map-enable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-source-map-enable.js) -- [parallel/test-spawn-cmd-named-pipe.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-spawn-cmd-named-pipe.js) -- [parallel/test-stack-size-limit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stack-size-limit.js) -- [parallel/test-startup-empty-regexp-statics.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-startup-empty-regexp-statics.js) -- [parallel/test-startup-large-pages.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-startup-large-pages.js) -- [parallel/test-stdin-child-proc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdin-child-proc.js) -- [parallel/test-stdin-from-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdin-from-file.js) -- [parallel/test-stdin-hang.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdin-hang.js) -- [parallel/test-stdin-pause-resume-sync.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdin-pause-resume-sync.js) -- [parallel/test-stdin-pause-resume.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdin-pause-resume.js) -- [parallel/test-stdin-pipe-large.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdin-pipe-large.js) -- [parallel/test-stdin-pipe-resume.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdin-pipe-resume.js) -- [parallel/test-stdin-resume-pause.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdin-resume-pause.js) -- [parallel/test-stdin-script-child-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdin-script-child-option.js) -- [parallel/test-stdin-script-child.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdin-script-child.js) -- [parallel/test-stdio-closed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdio-closed.js) -- [parallel/test-stdio-pipe-access.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdio-pipe-access.js) -- [parallel/test-stdio-pipe-redirect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdio-pipe-redirect.js) -- [parallel/test-stdio-pipe-stderr.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdio-pipe-stderr.js) -- [parallel/test-stdio-undestroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdio-undestroy.js) -- [parallel/test-stdout-cannot-be-closed-child-process-pipe.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdout-cannot-be-closed-child-process-pipe.js) -- [parallel/test-stdout-close-catch.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdout-close-catch.js) -- [parallel/test-stdout-close-unref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdout-close-unref.js) -- [parallel/test-stdout-pipeline-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdout-pipeline-destroy.js) -- [parallel/test-stdout-stderr-reading.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdout-stderr-reading.js) -- [parallel/test-stdout-stderr-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdout-stderr-write.js) -- [parallel/test-stdout-to-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stdout-to-file.js) -- [parallel/test-strace-openat-openssl.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-strace-openat-openssl.js) -- [parallel/test-stream-base-prototype-accessors-enumerability.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-base-prototype-accessors-enumerability.js) -- [parallel/test-stream-base-typechecking.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-base-typechecking.js) -- [parallel/test-stream-catch-rejections.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-catch-rejections.js) -- [parallel/test-stream-compose-operator.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-compose-operator.js) -- [parallel/test-stream-compose.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-compose.js) -- [parallel/test-stream-consumers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-consumers.js) -- [parallel/test-stream-decoder-objectmode.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-decoder-objectmode.js) -- [parallel/test-stream-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-destroy.js) -- [parallel/test-stream-drop-take.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-drop-take.js) -- [parallel/test-stream-duplex-readable-writable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-duplex-readable-writable.js) -- [parallel/test-stream-end-of-streams.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-end-of-streams.js) -- [parallel/test-stream-filter.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-filter.js) -- [parallel/test-stream-finished.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-finished.js) -- [parallel/test-stream-flatMap.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-flatMap.js) -- [parallel/test-stream-forEach.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-forEach.js) -- [parallel/test-stream-map.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-map.js) -- [parallel/test-stream-passthrough-drain.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-passthrough-drain.js) -- [parallel/test-stream-pipe-deadlock.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-pipe-deadlock.js) -- [parallel/test-stream-pipe-error-unhandled.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-pipe-error-unhandled.js) -- [parallel/test-stream-pipeline-duplex.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-pipeline-duplex.js) -- [parallel/test-stream-pipeline-http2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-pipeline-http2.js) -- [parallel/test-stream-pipeline-listeners.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-pipeline-listeners.js) -- [parallel/test-stream-pipeline-process.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-pipeline-process.js) -- [parallel/test-stream-pipeline-uncaught.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-pipeline-uncaught.js) -- [parallel/test-stream-pipeline.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-pipeline.js) -- [parallel/test-stream-preprocess.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-preprocess.js) -- [parallel/test-stream-promises.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-promises.js) -- [parallel/test-stream-push-order.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-push-order.js) -- [parallel/test-stream-readable-async-iterators.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-readable-async-iterators.js) -- [parallel/test-stream-readable-default-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-readable-default-encoding.js) -- [parallel/test-stream-readable-dispose.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-readable-dispose.js) -- [parallel/test-stream-readable-strategy-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-readable-strategy-option.js) -- [parallel/test-stream-readable-unpipe-resume.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-readable-unpipe-resume.js) -- [parallel/test-stream-reduce.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-reduce.js) -- [parallel/test-stream-set-default-hwm.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-set-default-hwm.js) -- [parallel/test-stream-toArray.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-toArray.js) -- [parallel/test-stream-toWeb-allows-server-response.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-toWeb-allows-server-response.js) -- [parallel/test-stream-transform-hwm0.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-transform-hwm0.js) -- [parallel/test-stream-wrap-drain.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-wrap-drain.js) -- [parallel/test-stream-wrap-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-wrap-encoding.js) -- [parallel/test-stream-wrap.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-wrap.js) -- [parallel/test-stream-writable-end-cb-uncaught.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-writable-end-cb-uncaught.js) -- [parallel/test-stream-writable-samecb-singletick.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream-writable-samecb-singletick.js) -- [parallel/test-stream2-finish-pipe-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream2-finish-pipe-error.js) -- [parallel/test-stream2-httpclient-response-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream2-httpclient-response-end.js) -- [parallel/test-stream3-pipeline-async-iterator.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stream3-pipeline-async-iterator.js) -- [parallel/test-string-decoder-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-string-decoder-end.js) -- [parallel/test-string-decoder-fuzz.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-string-decoder-fuzz.js) -- [parallel/test-stringbytes-external.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-stringbytes-external.js) -- [parallel/test-structuredClone-global.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-structuredClone-global.js) -- [parallel/test-sync-fileread.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-sync-fileread.js) -- [parallel/test-sync-io-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-sync-io-option.js) -- [parallel/test-sys.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-sys.js) -- [parallel/test-tcp-wrap-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tcp-wrap-connect.js) -- [parallel/test-tcp-wrap-listen.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tcp-wrap-listen.js) -- [parallel/test-tcp-wrap.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tcp-wrap.js) -- [parallel/test-tick-processor-arguments.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tick-processor-arguments.js) -- [parallel/test-tick-processor-version-check.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tick-processor-version-check.js) -- [parallel/test-timer-immediate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timer-immediate.js) -- [parallel/test-timers-active.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-active.js) -- [parallel/test-timers-clearImmediate-als.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-clearImmediate-als.js) -- [parallel/test-timers-destroyed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-destroyed.js) -- [parallel/test-timers-dispose.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-dispose.js) -- [parallel/test-timers-enroll-invalid-msecs.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-enroll-invalid-msecs.js) -- [parallel/test-timers-enroll-second-time.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-enroll-second-time.js) -- [parallel/test-timers-immediate-promisified.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-immediate-promisified.js) -- [parallel/test-timers-immediate-queue-throw.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-immediate-queue-throw.js) -- [parallel/test-timers-immediate-queue.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-immediate-queue.js) -- [parallel/test-timers-immediate-unref-nested-once.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-immediate-unref-nested-once.js) -- [parallel/test-timers-immediate-unref-simple.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-immediate-unref-simple.js) -- [parallel/test-timers-immediate-unref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-immediate-unref.js) -- [parallel/test-timers-immediate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-immediate.js) -- [parallel/test-timers-interval-promisified.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-interval-promisified.js) -- [parallel/test-timers-linked-list.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-linked-list.js) -- [parallel/test-timers-max-duration-warning.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-max-duration-warning.js) -- [parallel/test-timers-nested.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-nested.js) -- [parallel/test-timers-next-tick.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-next-tick.js) -- [parallel/test-timers-now.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-now.js) -- [parallel/test-timers-ordering.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-ordering.js) -- [parallel/test-timers-promises-scheduler.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-promises-scheduler.js) -- [parallel/test-timers-refresh-in-callback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-refresh-in-callback.js) -- [parallel/test-timers-reset-process-domain-on-throw.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-reset-process-domain-on-throw.js) -- [parallel/test-timers-setimmediate-infinite-loop.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-setimmediate-infinite-loop.js) -- [parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js) -- [parallel/test-timers-this.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-this.js) -- [parallel/test-timers-throw-when-cb-not-function.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-throw-when-cb-not-function.js) -- [parallel/test-timers-timeout-promisified.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-timeout-promisified.js) -- [parallel/test-timers-timeout-to-interval.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-timeout-to-interval.js) -- [parallel/test-timers-to-primitive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-to-primitive.js) -- [parallel/test-timers-unenroll-unref-interval.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-unenroll-unref-interval.js) -- [parallel/test-timers-unref-active.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-unref-active.js) -- [parallel/test-timers-unref-remove-other-unref-timers-only-one-fires.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-unref-remove-other-unref-timers-only-one-fires.js) -- [parallel/test-timers-unref-remove-other-unref-timers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-unref-remove-other-unref-timers.js) -- [parallel/test-timers-unref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-unref.js) -- [parallel/test-timers-unrefd-interval-still-fires.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-unrefd-interval-still-fires.js) -- [parallel/test-timers-unrefed-in-beforeexit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-unrefed-in-beforeexit.js) -- [parallel/test-timers-unrefed-in-callback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers-unrefed-in-callback.js) -- [parallel/test-timers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-timers.js) -- [parallel/test-tls-0-dns-altname.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-0-dns-altname.js) -- [parallel/test-tls-add-context.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-add-context.js) -- [parallel/test-tls-addca.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-addca.js) -- [parallel/test-tls-alert-handling.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-alert-handling.js) -- [parallel/test-tls-alert.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-alert.js) -- [parallel/test-tls-alpn-server-client.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-alpn-server-client.js) -- [parallel/test-tls-async-cb-after-socket-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-async-cb-after-socket-end.js) -- [parallel/test-tls-basic-validations.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-basic-validations.js) -- [parallel/test-tls-buffersize.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-buffersize.js) -- [parallel/test-tls-ca-concat.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-ca-concat.js) -- [parallel/test-tls-canonical-ip.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-canonical-ip.js) -- [parallel/test-tls-cert-chains-concat.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-cert-chains-concat.js) -- [parallel/test-tls-cert-chains-in-ca.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-cert-chains-in-ca.js) -- [parallel/test-tls-cert-ext-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-cert-ext-encoding.js) -- [parallel/test-tls-cert-regression.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-cert-regression.js) -- [parallel/test-tls-check-server-identity.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-check-server-identity.js) -- [parallel/test-tls-cipher-list.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-cipher-list.js) -- [parallel/test-tls-cli-max-version-1.2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-cli-max-version-1.2.js) -- [parallel/test-tls-cli-max-version-1.3.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-cli-max-version-1.3.js) -- [parallel/test-tls-cli-min-max-conflict.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-cli-min-max-conflict.js) -- [parallel/test-tls-cli-min-version-1.0.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-cli-min-version-1.0.js) -- [parallel/test-tls-cli-min-version-1.1.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-cli-min-version-1.1.js) -- [parallel/test-tls-cli-min-version-1.2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-cli-min-version-1.2.js) -- [parallel/test-tls-cli-min-version-1.3.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-cli-min-version-1.3.js) -- [parallel/test-tls-client-abort.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-client-abort.js) -- [parallel/test-tls-client-abort2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-client-abort2.js) -- [parallel/test-tls-client-auth.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-client-auth.js) -- [parallel/test-tls-client-default-ciphers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-client-default-ciphers.js) -- [parallel/test-tls-client-destroy-soon.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-client-destroy-soon.js) -- [parallel/test-tls-client-getephemeralkeyinfo.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-client-getephemeralkeyinfo.js) -- [parallel/test-tls-client-mindhsize.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-client-mindhsize.js) -- [parallel/test-tls-client-reject-12.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-client-reject-12.js) -- [parallel/test-tls-client-reject.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-client-reject.js) -- [parallel/test-tls-client-renegotiation-13.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-client-renegotiation-13.js) -- [parallel/test-tls-client-renegotiation-limit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-client-renegotiation-limit.js) -- [parallel/test-tls-client-resume-12.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-client-resume-12.js) -- [parallel/test-tls-client-resume.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-client-resume.js) -- [parallel/test-tls-client-verify.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-client-verify.js) -- [parallel/test-tls-clientcertengine-invalid-arg-type.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-clientcertengine-invalid-arg-type.js) -- [parallel/test-tls-clientcertengine-unsupported.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-clientcertengine-unsupported.js) -- [parallel/test-tls-close-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-close-error.js) -- [parallel/test-tls-close-event-after-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-close-event-after-write.js) -- [parallel/test-tls-close-notify.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-close-notify.js) -- [parallel/test-tls-cnnic-whitelist.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-cnnic-whitelist.js) -- [parallel/test-tls-connect-abort-controller.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-connect-abort-controller.js) -- [parallel/test-tls-connect-address-family.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-connect-address-family.js) -- [parallel/test-tls-connect-allow-half-open-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-connect-allow-half-open-option.js) -- [parallel/test-tls-connect-given-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-connect-given-socket.js) -- [parallel/test-tls-connect-hints-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-connect-hints-option.js) -- [parallel/test-tls-connect-hwm-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-connect-hwm-option.js) -- [parallel/test-tls-connect-memleak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-connect-memleak.js) -- [parallel/test-tls-connect-no-host.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-connect-no-host.js) -- [parallel/test-tls-connect-pipe.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-connect-pipe.js) -- [parallel/test-tls-connect-secure-context.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-connect-secure-context.js) -- [parallel/test-tls-connect-simple.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-connect-simple.js) -- [parallel/test-tls-connect-stream-writes.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-connect-stream-writes.js) -- [parallel/test-tls-connect-timeout-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-connect-timeout-option.js) -- [parallel/test-tls-delayed-attach-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-delayed-attach-error.js) -- [parallel/test-tls-delayed-attach.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-delayed-attach.js) -- [parallel/test-tls-destroy-stream-12.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-destroy-stream-12.js) -- [parallel/test-tls-destroy-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-destroy-stream.js) -- [parallel/test-tls-destroy-whilst-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-destroy-whilst-write.js) -- [parallel/test-tls-dhe.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-dhe.js) -- [parallel/test-tls-disable-renegotiation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-disable-renegotiation.js) -- [parallel/test-tls-ecdh-auto.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-ecdh-auto.js) -- [parallel/test-tls-ecdh-multiple.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-ecdh-multiple.js) -- [parallel/test-tls-ecdh.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-ecdh.js) -- [parallel/test-tls-econnreset.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-econnreset.js) -- [parallel/test-tls-empty-sni-context.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-empty-sni-context.js) -- [parallel/test-tls-enable-keylog-cli.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-enable-keylog-cli.js) -- [parallel/test-tls-enable-trace-cli.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-enable-trace-cli.js) -- [parallel/test-tls-enable-trace.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-enable-trace.js) -- [parallel/test-tls-env-bad-extra-ca.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-env-bad-extra-ca.js) -- [parallel/test-tls-env-extra-ca-file-load.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-env-extra-ca-file-load.js) -- [parallel/test-tls-env-extra-ca-no-crypto.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-env-extra-ca-no-crypto.js) -- [parallel/test-tls-env-extra-ca.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-env-extra-ca.js) -- [parallel/test-tls-error-servername.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-error-servername.js) -- [parallel/test-tls-exportkeyingmaterial.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-exportkeyingmaterial.js) -- [parallel/test-tls-external-accessor.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-external-accessor.js) -- [parallel/test-tls-fast-writing.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-fast-writing.js) -- [parallel/test-tls-finished.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-finished.js) -- [parallel/test-tls-friendly-error-message.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-friendly-error-message.js) -- [parallel/test-tls-generic-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-generic-stream.js) -- [parallel/test-tls-getcertificate-x509.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-getcertificate-x509.js) -- [parallel/test-tls-getcipher.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-getcipher.js) -- [parallel/test-tls-getprotocol.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-getprotocol.js) -- [parallel/test-tls-handshake-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-handshake-error.js) -- [parallel/test-tls-handshake-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-handshake-exception.js) -- [parallel/test-tls-handshake-nohang.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-handshake-nohang.js) -- [parallel/test-tls-hello-parser-failure.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-hello-parser-failure.js) -- [parallel/test-tls-honorcipherorder.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-honorcipherorder.js) -- [parallel/test-tls-inception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-inception.js) -- [parallel/test-tls-interleave.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-interleave.js) -- [parallel/test-tls-invalid-pfx.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-invalid-pfx.js) -- [parallel/test-tls-invoke-queued.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-invoke-queued.js) -- [parallel/test-tls-ip-servername-deprecation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-ip-servername-deprecation.js) -- [parallel/test-tls-js-stream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-js-stream.js) -- [parallel/test-tls-junk-closes-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-junk-closes-server.js) -- [parallel/test-tls-junk-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-junk-server.js) -- [parallel/test-tls-key-mismatch.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-key-mismatch.js) -- [parallel/test-tls-keyengine-invalid-arg-type.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-keyengine-invalid-arg-type.js) -- [parallel/test-tls-keyengine-unsupported.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-keyengine-unsupported.js) -- [parallel/test-tls-keylog-tlsv13.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-keylog-tlsv13.js) -- [parallel/test-tls-legacy-deprecated.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-legacy-deprecated.js) -- [parallel/test-tls-max-send-fragment.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-max-send-fragment.js) -- [parallel/test-tls-min-max-version.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-min-max-version.js) -- [parallel/test-tls-multi-key.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-multi-key.js) -- [parallel/test-tls-multi-pfx.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-multi-pfx.js) -- [parallel/test-tls-multiple-cas-as-string.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-multiple-cas-as-string.js) -- [parallel/test-tls-net-connect-prefer-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-net-connect-prefer-path.js) -- [parallel/test-tls-net-socket-keepalive-12.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-net-socket-keepalive-12.js) -- [parallel/test-tls-net-socket-keepalive.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-net-socket-keepalive.js) -- [parallel/test-tls-no-cert-required.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-no-cert-required.js) -- [parallel/test-tls-no-rsa-key.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-no-rsa-key.js) -- [parallel/test-tls-no-sslv23.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-no-sslv23.js) -- [parallel/test-tls-no-sslv3.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-no-sslv3.js) -- [parallel/test-tls-ocsp-callback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-ocsp-callback.js) -- [parallel/test-tls-on-empty-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-on-empty-socket.js) -- [parallel/test-tls-onread-static-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-onread-static-buffer.js) -- [parallel/test-tls-options-boolean-check.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-options-boolean-check.js) -- [parallel/test-tls-over-http-tunnel.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-over-http-tunnel.js) -- [parallel/test-tls-passphrase.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-passphrase.js) -- [parallel/test-tls-pause.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-pause.js) -- [parallel/test-tls-peer-certificate-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-peer-certificate-encoding.js) -- [parallel/test-tls-peer-certificate-multi-keys.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-peer-certificate-multi-keys.js) -- [parallel/test-tls-peer-certificate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-peer-certificate.js) -- [parallel/test-tls-pfx-authorizationerror.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-pfx-authorizationerror.js) -- [parallel/test-tls-psk-circuit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-psk-circuit.js) -- [parallel/test-tls-psk-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-psk-errors.js) -- [parallel/test-tls-psk-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-psk-server.js) -- [parallel/test-tls-reduced-SECLEVEL-in-cipher.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-reduced-SECLEVEL-in-cipher.js) -- [parallel/test-tls-reinitialize-listeners.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-reinitialize-listeners.js) -- [parallel/test-tls-request-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-request-timeout.js) -- [parallel/test-tls-retain-handle-no-abort.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-retain-handle-no-abort.js) -- [parallel/test-tls-reuse-host-from-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-reuse-host-from-socket.js) -- [parallel/test-tls-root-certificates.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-root-certificates.js) -- [parallel/test-tls-secure-context-usage-order.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-secure-context-usage-order.js) -- [parallel/test-tls-secure-session.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-secure-session.js) -- [parallel/test-tls-securepair-fiftharg.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-securepair-fiftharg.js) -- [parallel/test-tls-securepair-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-securepair-leak.js) -- [parallel/test-tls-securepair-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-securepair-server.js) -- [parallel/test-tls-server-capture-rejection.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-server-capture-rejection.js) -- [parallel/test-tls-server-connection-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-server-connection-server.js) -- [parallel/test-tls-server-failed-handshake-emits-clienterror.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-server-failed-handshake-emits-clienterror.js) -- [parallel/test-tls-server-parent-constructor-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-server-parent-constructor-options.js) -- [parallel/test-tls-server-setoptions-clientcertengine.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-server-setoptions-clientcertengine.js) -- [parallel/test-tls-server-verify.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-server-verify.js) -- [parallel/test-tls-session-cache.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-session-cache.js) -- [parallel/test-tls-set-ciphers-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-set-ciphers-error.js) -- [parallel/test-tls-set-ciphers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-set-ciphers.js) -- [parallel/test-tls-set-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-set-encoding.js) -- [parallel/test-tls-set-secure-context.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-set-secure-context.js) -- [parallel/test-tls-set-sigalgs.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-set-sigalgs.js) -- [parallel/test-tls-sni-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-sni-option.js) -- [parallel/test-tls-sni-server-client.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-sni-server-client.js) -- [parallel/test-tls-sni-servername.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-sni-servername.js) -- [parallel/test-tls-snicallback-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-snicallback-error.js) -- [parallel/test-tls-socket-allow-half-open-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-socket-allow-half-open-option.js) -- [parallel/test-tls-socket-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-socket-close.js) -- [parallel/test-tls-socket-constructor-alpn-options-parsing.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-socket-constructor-alpn-options-parsing.js) -- [parallel/test-tls-socket-default-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-socket-default-options.js) -- [parallel/test-tls-socket-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-socket-destroy.js) -- [parallel/test-tls-socket-failed-handshake-emits-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-socket-failed-handshake-emits-error.js) -- [parallel/test-tls-socket-snicallback-without-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-socket-snicallback-without-server.js) -- [parallel/test-tls-startcom-wosign-whitelist.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-startcom-wosign-whitelist.js) -- [parallel/test-tls-starttls-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-starttls-server.js) -- [parallel/test-tls-streamwrap-buffersize.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-streamwrap-buffersize.js) -- [parallel/test-tls-ticket-12.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-ticket-12.js) -- [parallel/test-tls-ticket-cluster.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-ticket-cluster.js) -- [parallel/test-tls-ticket-invalid-arg.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-ticket-invalid-arg.js) -- [parallel/test-tls-ticket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-ticket.js) -- [parallel/test-tls-timeout-server-2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-timeout-server-2.js) -- [parallel/test-tls-timeout-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-timeout-server.js) -- [parallel/test-tls-tlswrap-segfault-2.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-tlswrap-segfault-2.js) -- [parallel/test-tls-tlswrap-segfault.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-tlswrap-segfault.js) -- [parallel/test-tls-translate-peer-certificate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-translate-peer-certificate.js) -- [parallel/test-tls-transport-destroy-after-own-gc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-transport-destroy-after-own-gc.js) -- [parallel/test-tls-use-after-free-regression.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-use-after-free-regression.js) -- [parallel/test-tls-wrap-econnreset-localaddress.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-wrap-econnreset-localaddress.js) -- [parallel/test-tls-wrap-econnreset-pipe.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-wrap-econnreset-pipe.js) -- [parallel/test-tls-wrap-econnreset-socket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-wrap-econnreset-socket.js) -- [parallel/test-tls-wrap-econnreset.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-wrap-econnreset.js) -- [parallel/test-tls-wrap-event-emmiter.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-wrap-event-emmiter.js) -- [parallel/test-tls-wrap-no-abort.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-wrap-no-abort.js) -- [parallel/test-tls-wrap-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-wrap-timeout.js) -- [parallel/test-tls-write-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-write-error.js) -- [parallel/test-tls-writewrap-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-writewrap-leak.js) -- [parallel/test-tls-zero-clear-in.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tls-zero-clear-in.js) -- [parallel/test-tojson-perf_hooks.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tojson-perf_hooks.js) -- [parallel/test-trace-atomics-wait.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-atomics-wait.js) -- [parallel/test-trace-events-all.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-all.js) -- [parallel/test-trace-events-api-worker-disabled.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-api-worker-disabled.js) -- [parallel/test-trace-events-api.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-api.js) -- [parallel/test-trace-events-async-hooks-dynamic.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-async-hooks-dynamic.js) -- [parallel/test-trace-events-async-hooks-worker.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-async-hooks-worker.js) -- [parallel/test-trace-events-async-hooks.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-async-hooks.js) -- [parallel/test-trace-events-binding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-binding.js) -- [parallel/test-trace-events-bootstrap.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-bootstrap.js) -- [parallel/test-trace-events-category-used.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-category-used.js) -- [parallel/test-trace-events-console.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-console.js) -- [parallel/test-trace-events-dynamic-enable-workers-disabled.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-dynamic-enable-workers-disabled.js) -- [parallel/test-trace-events-dynamic-enable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-dynamic-enable.js) -- [parallel/test-trace-events-environment.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-environment.js) -- [parallel/test-trace-events-file-pattern.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-file-pattern.js) -- [parallel/test-trace-events-fs-async.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-fs-async.js) -- [parallel/test-trace-events-fs-sync.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-fs-sync.js) -- [parallel/test-trace-events-http.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-http.js) -- [parallel/test-trace-events-metadata.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-metadata.js) -- [parallel/test-trace-events-net.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-net.js) -- [parallel/test-trace-events-none.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-none.js) -- [parallel/test-trace-events-process-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-process-exit.js) -- [parallel/test-trace-events-promises.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-promises.js) -- [parallel/test-trace-events-threadpool.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-threadpool.js) -- [parallel/test-trace-events-v8.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-v8.js) -- [parallel/test-trace-events-vm.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-vm.js) -- [parallel/test-trace-events-worker-metadata-with-name.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-worker-metadata-with-name.js) -- [parallel/test-trace-events-worker-metadata.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-events-worker-metadata.js) -- [parallel/test-trace-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-trace-exit.js) -- [parallel/test-tracing-no-crash.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tracing-no-crash.js) -- [parallel/test-tty-backwards-api.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tty-backwards-api.js) -- [parallel/test-tty-stdin-pipe.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tty-stdin-pipe.js) -- [parallel/test-ttywrap-invalid-fd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-ttywrap-invalid-fd.js) -- [parallel/test-ttywrap-stack.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-ttywrap-stack.js) -- [parallel/test-tz-version.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-tz-version.js) -- [parallel/test-unhandled-exception-rethrow-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-unhandled-exception-rethrow-error.js) -- [parallel/test-unhandled-exception-with-worker-inuse.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-unhandled-exception-with-worker-inuse.js) -- [parallel/test-unicode-node-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-unicode-node-options.js) -- [parallel/test-url-canParse-whatwg.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-url-canParse-whatwg.js) -- [parallel/test-url-is-url.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-url-is-url.js) -- [parallel/test-url-null-char.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-url-null-char.js) -- [parallel/test-url-parse-format.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-url-parse-format.js) -- [parallel/test-utf8-scripts.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-utf8-scripts.js) -- [parallel/test-util-callbackify.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-util-callbackify.js) -- [parallel/test-util-emit-experimental-warning.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-util-emit-experimental-warning.js) -- [parallel/test-util-inspect-getters-accessing-this.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-util-inspect-getters-accessing-this.js) -- [parallel/test-util-internal.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-util-internal.js) -- [parallel/test-util-log.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-util-log.js) -- [parallel/test-util-primordial-monkeypatching.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-util-primordial-monkeypatching.js) -- [parallel/test-util-sigint-watchdog.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-util-sigint-watchdog.js) -- [parallel/test-util-sleep.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-util-sleep.js) -- [parallel/test-uv-binding-constant.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-uv-binding-constant.js) -- [parallel/test-uv-errmap.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-uv-errmap.js) -- [parallel/test-uv-errno.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-uv-errno.js) -- [parallel/test-uv-unmapped-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-uv-unmapped-exception.js) -- [parallel/test-v8-collect-gc-profile-exit-before-stop.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-collect-gc-profile-exit-before-stop.js) -- [parallel/test-v8-collect-gc-profile-in-worker.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-collect-gc-profile-in-worker.js) -- [parallel/test-v8-collect-gc-profile.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-collect-gc-profile.js) -- [parallel/test-v8-coverage.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-coverage.js) -- [parallel/test-v8-deserialize-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-deserialize-buffer.js) -- [parallel/test-v8-flag-pool-size-0.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-flag-pool-size-0.js) -- [parallel/test-v8-flag-type-check.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-flag-type-check.js) -- [parallel/test-v8-flags.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-flags.js) -- [parallel/test-v8-getheapsnapshot-twice.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-getheapsnapshot-twice.js) -- [parallel/test-v8-global-setter.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-global-setter.js) -- [parallel/test-v8-serdes.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-serdes.js) -- [parallel/test-v8-serialize-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-serialize-leak.js) -- [parallel/test-v8-startup-snapshot-api.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-startup-snapshot-api.js) -- [parallel/test-v8-stats.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-stats.js) -- [parallel/test-v8-stop-coverage.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-stop-coverage.js) -- [parallel/test-v8-take-coverage-noop.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-take-coverage-noop.js) -- [parallel/test-v8-take-coverage.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-take-coverage.js) -- [parallel/test-v8-version-tag.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-v8-version-tag.js) -- [parallel/test-validators.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-validators.js) -- [parallel/test-vfs.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vfs.js) -- [parallel/test-vm-api-handles-getter-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-api-handles-getter-errors.js) -- [parallel/test-vm-basic.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-basic.js) -- [parallel/test-vm-cached-data.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-cached-data.js) -- [parallel/test-vm-context.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-context.js) -- [parallel/test-vm-dynamic-import-callback-missing-flag.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-dynamic-import-callback-missing-flag.js) -- [parallel/test-vm-global-get-own.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-global-get-own.js) -- [parallel/test-vm-global-non-writable-properties.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-global-non-writable-properties.js) -- [parallel/test-vm-global-property-interceptors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-global-property-interceptors.js) -- [parallel/test-vm-measure-memory-lazy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-measure-memory-lazy.js) -- [parallel/test-vm-measure-memory-multi-context.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-measure-memory-multi-context.js) -- [parallel/test-vm-measure-memory.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-measure-memory.js) -- [parallel/test-vm-module-basic.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-module-basic.js) -- [parallel/test-vm-module-cached-data.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-module-cached-data.js) -- [parallel/test-vm-module-dynamic-import.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-module-dynamic-import.js) -- [parallel/test-vm-module-dynamic-namespace.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-module-dynamic-namespace.js) -- [parallel/test-vm-module-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-module-errors.js) -- [parallel/test-vm-module-import-meta.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-module-import-meta.js) -- [parallel/test-vm-module-link.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-module-link.js) -- [parallel/test-vm-module-reevaluate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-module-reevaluate.js) -- [parallel/test-vm-module-synthetic.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-module-synthetic.js) -- [parallel/test-vm-no-dynamic-import-callback.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-no-dynamic-import-callback.js) -- [parallel/test-vm-run-in-new-context.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-run-in-new-context.js) -- [parallel/test-vm-sigint-existing-handler.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-sigint-existing-handler.js) -- [parallel/test-vm-sigint.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-sigint.js) -- [parallel/test-vm-strict-assign.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-strict-assign.js) -- [parallel/test-vm-syntax-error-message.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-syntax-error-message.js) -- [parallel/test-vm-syntax-error-stderr.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-syntax-error-stderr.js) -- [parallel/test-vm-timeout-escape-promise-module.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-vm-timeout-escape-promise-module.js) -- [parallel/test-warn-sigprof.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-warn-sigprof.js) -- [parallel/test-warn-stream-wrap.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-warn-stream-wrap.js) -- [parallel/test-weakref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-weakref.js) -- [parallel/test-webcrypto-constructors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-constructors.js) -- [parallel/test-webcrypto-cryptokey-workers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-cryptokey-workers.js) -- [parallel/test-webcrypto-derivebits-cfrg.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-derivebits-cfrg.js) -- [parallel/test-webcrypto-derivebits-ecdh.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-derivebits-ecdh.js) -- [parallel/test-webcrypto-derivebits-hkdf.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-derivebits-hkdf.js) -- [parallel/test-webcrypto-derivebits.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-derivebits.js) -- [parallel/test-webcrypto-derivekey-cfrg.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-derivekey-cfrg.js) -- [parallel/test-webcrypto-derivekey-ecdh.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-derivekey-ecdh.js) -- [parallel/test-webcrypto-derivekey.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-derivekey.js) -- [parallel/test-webcrypto-digest.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-digest.js) -- [parallel/test-webcrypto-encrypt-decrypt-aes.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-encrypt-decrypt-aes.js) -- [parallel/test-webcrypto-encrypt-decrypt-rsa.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-encrypt-decrypt-rsa.js) -- [parallel/test-webcrypto-encrypt-decrypt.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-encrypt-decrypt.js) -- [parallel/test-webcrypto-export-import-cfrg.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-export-import-cfrg.js) -- [parallel/test-webcrypto-export-import-ec.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-export-import-ec.js) -- [parallel/test-webcrypto-export-import-rsa.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-export-import-rsa.js) -- [parallel/test-webcrypto-export-import.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-export-import.js) -- [parallel/test-webcrypto-getRandomValues.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-getRandomValues.js) -- [parallel/test-webcrypto-keygen.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-keygen.js) -- [parallel/test-webcrypto-random.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-random.js) -- [parallel/test-webcrypto-sign-verify-ecdsa.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-sign-verify-ecdsa.js) -- [parallel/test-webcrypto-sign-verify-eddsa.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-sign-verify-eddsa.js) -- [parallel/test-webcrypto-sign-verify-hmac.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-sign-verify-hmac.js) -- [parallel/test-webcrypto-sign-verify-rsa.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-sign-verify-rsa.js) -- [parallel/test-webcrypto-util.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-util.js) -- [parallel/test-webcrypto-webidl.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-webidl.js) -- [parallel/test-webcrypto-wrap-unwrap.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webcrypto-wrap-unwrap.js) -- [parallel/test-websocket.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-websocket.js) -- [parallel/test-webstream-encoding-inspect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webstream-encoding-inspect.js) -- [parallel/test-webstream-readablestream-pipeto.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webstream-readablestream-pipeto.js) -- [parallel/test-webstream-string-tag.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webstream-string-tag.js) -- [parallel/test-webstreams-abort-controller.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webstreams-abort-controller.js) -- [parallel/test-webstreams-compose.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webstreams-compose.js) -- [parallel/test-webstreams-finished.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webstreams-finished.js) -- [parallel/test-webstreams-pipeline.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-webstreams-pipeline.js) -- [parallel/test-whatwg-encoding-custom-fatal-streaming.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-encoding-custom-fatal-streaming.js) -- [parallel/test-whatwg-encoding-custom-internals.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-encoding-custom-internals.js) -- [parallel/test-whatwg-encoding-custom-interop.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-encoding-custom-interop.js) -- [parallel/test-whatwg-encoding-custom-textdecoder-api-invalid-label.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-encoding-custom-textdecoder-api-invalid-label.js) -- [parallel/test-whatwg-encoding-custom-textdecoder-fatal.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-encoding-custom-textdecoder-fatal.js) -- [parallel/test-whatwg-encoding-custom-textdecoder-invalid-arg.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-encoding-custom-textdecoder-invalid-arg.js) -- [parallel/test-whatwg-encoding-custom-textdecoder-utf16-surrogates.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-encoding-custom-textdecoder-utf16-surrogates.js) -- [parallel/test-whatwg-encoding-custom-textdecoder.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-encoding-custom-textdecoder.js) -- [parallel/test-whatwg-events-event-constructors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-events-event-constructors.js) -- [parallel/test-whatwg-events-eventtarget-this-of-listener.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-events-eventtarget-this-of-listener.js) -- [parallel/test-whatwg-readablebytestream-bad-buffers-and-views.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-readablebytestream-bad-buffers-and-views.js) -- [parallel/test-whatwg-readablebytestream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-readablebytestream.js) -- [parallel/test-whatwg-readablebytestreambyob.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-readablebytestreambyob.js) -- [parallel/test-whatwg-readablestream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-readablestream.js) -- [parallel/test-whatwg-transformstream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-transformstream.js) -- [parallel/test-whatwg-url-canparse.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-canparse.js) -- [parallel/test-whatwg-url-custom-domainto.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-domainto.js) -- [parallel/test-whatwg-url-custom-inspect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-inspect.js) -- [parallel/test-whatwg-url-custom-parsing.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-parsing.js) -- [parallel/test-whatwg-url-custom-properties.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-properties.js) -- [parallel/test-whatwg-url-custom-searchparams-append.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-searchparams-append.js) -- [parallel/test-whatwg-url-custom-searchparams-constructor.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-searchparams-constructor.js) -- [parallel/test-whatwg-url-custom-searchparams-delete.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-searchparams-delete.js) -- [parallel/test-whatwg-url-custom-searchparams-entries.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-searchparams-entries.js) -- [parallel/test-whatwg-url-custom-searchparams-foreach.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-searchparams-foreach.js) -- [parallel/test-whatwg-url-custom-searchparams-get.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-searchparams-get.js) -- [parallel/test-whatwg-url-custom-searchparams-getall.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-searchparams-getall.js) -- [parallel/test-whatwg-url-custom-searchparams-has.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-searchparams-has.js) -- [parallel/test-whatwg-url-custom-searchparams-inspect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-searchparams-inspect.js) -- [parallel/test-whatwg-url-custom-searchparams-keys.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-searchparams-keys.js) -- [parallel/test-whatwg-url-custom-searchparams-set.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-searchparams-set.js) -- [parallel/test-whatwg-url-custom-searchparams-sort.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-searchparams-sort.js) -- [parallel/test-whatwg-url-custom-searchparams-stringifier.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-searchparams-stringifier.js) -- [parallel/test-whatwg-url-custom-searchparams-values.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-searchparams-values.js) -- [parallel/test-whatwg-url-custom-searchparams.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-searchparams.js) -- [parallel/test-whatwg-url-custom-setters.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-custom-setters.js) -- [parallel/test-whatwg-url-invalidthis.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-invalidthis.js) -- [parallel/test-whatwg-url-toascii.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-url-toascii.js) -- [parallel/test-whatwg-webstreams-adapters-streambase.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-webstreams-adapters-streambase.js) -- [parallel/test-whatwg-webstreams-adapters-to-readablestream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-webstreams-adapters-to-readablestream.js) -- [parallel/test-whatwg-webstreams-adapters-to-readablewritablepair.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-webstreams-adapters-to-readablewritablepair.js) -- [parallel/test-whatwg-webstreams-adapters-to-streamduplex.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-webstreams-adapters-to-streamduplex.js) -- [parallel/test-whatwg-webstreams-adapters-to-streamreadable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-webstreams-adapters-to-streamreadable.js) -- [parallel/test-whatwg-webstreams-adapters-to-streamwritable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-webstreams-adapters-to-streamwritable.js) -- [parallel/test-whatwg-webstreams-adapters-to-writablestream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-webstreams-adapters-to-writablestream.js) -- [parallel/test-whatwg-webstreams-compression.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-webstreams-compression.js) -- [parallel/test-whatwg-webstreams-coverage.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-webstreams-coverage.js) -- [parallel/test-whatwg-webstreams-encoding.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-webstreams-encoding.js) -- [parallel/test-whatwg-webstreams-transfer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-webstreams-transfer.js) -- [parallel/test-whatwg-writablestream.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-whatwg-writablestream.js) -- [parallel/test-windows-abort-exitcode.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-windows-abort-exitcode.js) -- [parallel/test-windows-failed-heap-allocation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-windows-failed-heap-allocation.js) -- [parallel/test-worker-abort-on-uncaught-exception-terminate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-abort-on-uncaught-exception-terminate.js) -- [parallel/test-worker-abort-on-uncaught-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-abort-on-uncaught-exception.js) -- [parallel/test-worker-arraybuffer-zerofill.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-arraybuffer-zerofill.js) -- [parallel/test-worker-beforeexit-throw-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-beforeexit-throw-exit.js) -- [parallel/test-worker-broadcastchannel-wpt.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-broadcastchannel-wpt.js) -- [parallel/test-worker-broadcastchannel.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-broadcastchannel.js) -- [parallel/test-worker-cjs-workerdata.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-cjs-workerdata.js) -- [parallel/test-worker-cleanexit-with-js.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-cleanexit-with-js.js) -- [parallel/test-worker-cleanexit-with-moduleload.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-cleanexit-with-moduleload.js) -- [parallel/test-worker-cleanup-handles.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-cleanup-handles.js) -- [parallel/test-worker-console-listeners.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-console-listeners.js) -- [parallel/test-worker-crypto-sign-transfer-result.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-crypto-sign-transfer-result.js) -- [parallel/test-worker-data-url.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-data-url.js) -- [parallel/test-worker-debug.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-debug.js) -- [parallel/test-worker-dns-terminate-during-query.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-dns-terminate-during-query.js) -- [parallel/test-worker-dns-terminate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-dns-terminate.js) -- [parallel/test-worker-environmentdata.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-environmentdata.js) -- [parallel/test-worker-error-stack-getter-throws.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-error-stack-getter-throws.js) -- [parallel/test-worker-esm-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-esm-exit.js) -- [parallel/test-worker-esm-missing-main.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-esm-missing-main.js) -- [parallel/test-worker-esmodule.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-esmodule.js) -- [parallel/test-worker-event.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-event.js) -- [parallel/test-worker-execargv-invalid.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-execargv-invalid.js) -- [parallel/test-worker-execargv.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-execargv.js) -- [parallel/test-worker-exit-code.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-exit-code.js) -- [parallel/test-worker-exit-event-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-exit-event-error.js) -- [parallel/test-worker-exit-from-uncaught-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-exit-from-uncaught-exception.js) -- [parallel/test-worker-exit-heapsnapshot.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-exit-heapsnapshot.js) -- [parallel/test-worker-fs-stat-watcher.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-fs-stat-watcher.js) -- [parallel/test-worker-hasref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-hasref.js) -- [parallel/test-worker-heap-snapshot.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-heap-snapshot.js) -- [parallel/test-worker-heapdump-failure.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-heapdump-failure.js) -- [parallel/test-worker-http2-generic-streams-terminate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-http2-generic-streams-terminate.js) -- [parallel/test-worker-http2-stream-terminate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-http2-stream-terminate.js) -- [parallel/test-worker-init-failure.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-init-failure.js) -- [parallel/test-worker-invalid-workerdata.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-invalid-workerdata.js) -- [parallel/test-worker-load-file-with-extension-other-than-js.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-load-file-with-extension-other-than-js.js) -- [parallel/test-worker-memory.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-memory.js) -- [parallel/test-worker-message-channel-sharedarraybuffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-channel-sharedarraybuffer.js) -- [parallel/test-worker-message-channel.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-channel.js) -- [parallel/test-worker-message-event.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-event.js) -- [parallel/test-worker-message-not-serializable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-not-serializable.js) -- [parallel/test-worker-message-port-arraybuffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-arraybuffer.js) -- [parallel/test-worker-message-port-close-while-receiving.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-close-while-receiving.js) -- [parallel/test-worker-message-port-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-close.js) -- [parallel/test-worker-message-port-constructor.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-constructor.js) -- [parallel/test-worker-message-port-drain.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-drain.js) -- [parallel/test-worker-message-port-inspect-during-init-hook.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-inspect-during-init-hook.js) -- [parallel/test-worker-message-port-jstransferable-nested-untransferable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-jstransferable-nested-untransferable.js) -- [parallel/test-worker-message-port-message-before-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-message-before-close.js) -- [parallel/test-worker-message-port-message-port-transferring.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-message-port-transferring.js) -- [parallel/test-worker-message-port-move.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-move.js) -- [parallel/test-worker-message-port-terminate-transfer-list.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-terminate-transfer-list.js) -- [parallel/test-worker-message-port-transfer-closed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-transfer-closed.js) -- [parallel/test-worker-message-port-transfer-duplicate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-transfer-duplicate.js) -- [parallel/test-worker-message-port-transfer-fake-js-transferable-internal.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-transfer-fake-js-transferable-internal.js) -- [parallel/test-worker-message-port-transfer-fake-js-transferable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-transfer-fake-js-transferable.js) -- [parallel/test-worker-message-port-transfer-filehandle.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-transfer-filehandle.js) -- [parallel/test-worker-message-port-transfer-native.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-transfer-native.js) -- [parallel/test-worker-message-port-transfer-self.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-transfer-self.js) -- [parallel/test-worker-message-port-transfer-target.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-transfer-target.js) -- [parallel/test-worker-message-port-transfer-terminate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-transfer-terminate.js) -- [parallel/test-worker-message-port-wasm-module.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-wasm-module.js) -- [parallel/test-worker-message-port-wasm-threads.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port-wasm-threads.js) -- [parallel/test-worker-message-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-port.js) -- [parallel/test-worker-message-transfer-port-mark-as-untransferable.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-transfer-port-mark-as-untransferable.js) -- [parallel/test-worker-message-type-unknown.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-message-type-unknown.js) -- [parallel/test-worker-messageport-hasref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-messageport-hasref.js) -- [parallel/test-worker-mjs-workerdata.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-mjs-workerdata.js) -- [parallel/test-worker-name.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-name.js) -- [parallel/test-worker-nearheaplimit-deadlock.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-nearheaplimit-deadlock.js) -- [parallel/test-worker-nested-on-process-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-nested-on-process-exit.js) -- [parallel/test-worker-nested-uncaught.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-nested-uncaught.js) -- [parallel/test-worker-nexttick-terminate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-nexttick-terminate.js) -- [parallel/test-worker-no-atomics.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-no-atomics.js) -- [parallel/test-worker-no-sab.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-no-sab.js) -- [parallel/test-worker-no-stdin-stdout-interaction.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-no-stdin-stdout-interaction.js) -- [parallel/test-worker-non-fatal-uncaught-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-non-fatal-uncaught-exception.js) -- [parallel/test-worker-on-process-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-on-process-exit.js) -- [parallel/test-worker-onmessage-not-a-function.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-onmessage-not-a-function.js) -- [parallel/test-worker-onmessage.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-onmessage.js) -- [parallel/test-worker-parent-port-ref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-parent-port-ref.js) -- [parallel/test-worker-process-argv.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-process-argv.js) -- [parallel/test-worker-process-cwd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-process-cwd.js) -- [parallel/test-worker-process-env-shared.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-process-env-shared.js) -- [parallel/test-worker-process-env.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-process-env.js) -- [parallel/test-worker-process-exit-async-module.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-process-exit-async-module.js) -- [parallel/test-worker-ref-onexit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-ref-onexit.js) -- [parallel/test-worker-ref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-ref.js) -- [parallel/test-worker-relative-path-double-dot.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-relative-path-double-dot.js) -- [parallel/test-worker-relative-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-relative-path.js) -- [parallel/test-worker-resource-limits.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-resource-limits.js) -- [parallel/test-worker-safe-getters.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-safe-getters.js) -- [parallel/test-worker-sharedarraybuffer-from-worker-thread.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-sharedarraybuffer-from-worker-thread.js) -- [parallel/test-worker-stack-overflow-stack-size.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-stack-overflow-stack-size.js) -- [parallel/test-worker-stack-overflow.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-stack-overflow.js) -- [parallel/test-worker-stdio-from-preload-module.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-stdio-from-preload-module.js) -- [parallel/test-worker-stdio.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-stdio.js) -- [parallel/test-worker-syntax-error-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-syntax-error-file.js) -- [parallel/test-worker-syntax-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-syntax-error.js) -- [parallel/test-worker-terminate-http2-respond-with-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-terminate-http2-respond-with-file.js) -- [parallel/test-worker-terminate-microtask-loop.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-terminate-microtask-loop.js) -- [parallel/test-worker-terminate-nested.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-terminate-nested.js) -- [parallel/test-worker-terminate-null-handler.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-terminate-null-handler.js) -- [parallel/test-worker-terminate-ref-public-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-terminate-ref-public-port.js) -- [parallel/test-worker-terminate-source-map.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-terminate-source-map.js) -- [parallel/test-worker-terminate-timers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-terminate-timers.js) -- [parallel/test-worker-terminate-unrefed.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-terminate-unrefed.js) -- [parallel/test-worker-track-unmanaged-fds.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-track-unmanaged-fds.js) -- [parallel/test-worker-type-check.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-type-check.js) -- [parallel/test-worker-uncaught-exception-async.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-uncaught-exception-async.js) -- [parallel/test-worker-uncaught-exception.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-uncaught-exception.js) -- [parallel/test-worker-unref-from-message-during-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-unref-from-message-during-exit.js) -- [parallel/test-worker-unsupported-path.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-unsupported-path.js) -- [parallel/test-worker-unsupported-things.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-unsupported-things.js) -- [parallel/test-worker-vm-context-terminate.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-vm-context-terminate.js) -- [parallel/test-worker-voluntarily-exit-followed-by-addition.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-voluntarily-exit-followed-by-addition.js) -- [parallel/test-worker-voluntarily-exit-followed-by-throw.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-voluntarily-exit-followed-by-throw.js) -- [parallel/test-worker-workerdata-messageport.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-workerdata-messageport.js) -- [parallel/test-worker-workerdata-sharedarraybuffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker-workerdata-sharedarraybuffer.js) -- [parallel/test-worker.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-worker.js) -- [parallel/test-wrap-js-stream-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-wrap-js-stream-destroy.js) -- [parallel/test-wrap-js-stream-duplex.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-wrap-js-stream-duplex.js) -- [parallel/test-wrap-js-stream-exceptions.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-wrap-js-stream-exceptions.js) -- [parallel/test-wrap-js-stream-read-stop.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-wrap-js-stream-read-stop.js) -- [parallel/test-x509-escaping.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-x509-escaping.js) -- [parallel/test-zlib-brotli-16GB.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-brotli-16GB.js) -- [parallel/test-zlib-brotli-flush.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-brotli-flush.js) -- [parallel/test-zlib-brotli-from-brotli.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-brotli-from-brotli.js) -- [parallel/test-zlib-brotli-from-string.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-brotli-from-string.js) -- [parallel/test-zlib-brotli-kmaxlength-rangeerror.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-brotli-kmaxlength-rangeerror.js) -- [parallel/test-zlib-brotli.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-brotli.js) -- [parallel/test-zlib-bytes-read.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-bytes-read.js) -- [parallel/test-zlib-close-in-ondata.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-close-in-ondata.js) -- [parallel/test-zlib-const.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-const.js) -- [parallel/test-zlib-create-raw.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-create-raw.js) -- [parallel/test-zlib-deflate-constructors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-deflate-constructors.js) -- [parallel/test-zlib-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-destroy.js) -- [parallel/test-zlib-dictionary-fail.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-dictionary-fail.js) -- [parallel/test-zlib-dictionary.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-dictionary.js) -- [parallel/test-zlib-failed-init.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-failed-init.js) -- [parallel/test-zlib-flush-drain-longblock.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-flush-drain-longblock.js) -- [parallel/test-zlib-flush-drain.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-flush-drain.js) -- [parallel/test-zlib-flush-flags.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-flush-flags.js) -- [parallel/test-zlib-flush-write-sync-interleaved.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-flush-write-sync-interleaved.js) -- [parallel/test-zlib-flush.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-flush.js) -- [parallel/test-zlib-from-concatenated-gzip.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-from-concatenated-gzip.js) -- [parallel/test-zlib-from-gzip-with-trailing-garbage.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-from-gzip-with-trailing-garbage.js) -- [parallel/test-zlib-from-gzip.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-from-gzip.js) -- [parallel/test-zlib-invalid-arg-value-brotli-compress.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-invalid-arg-value-brotli-compress.js) -- [parallel/test-zlib-invalid-input-memory.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-invalid-input-memory.js) -- [parallel/test-zlib-kmaxlength-rangeerror.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-kmaxlength-rangeerror.js) -- [parallel/test-zlib-maxOutputLength.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-maxOutputLength.js) -- [parallel/test-zlib-not-string-or-buffer.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-not-string-or-buffer.js) -- [parallel/test-zlib-object-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-object-write.js) -- [parallel/test-zlib-params.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-params.js) -- [parallel/test-zlib-premature-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-premature-end.js) -- [parallel/test-zlib-reset-before-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-reset-before-write.js) -- [parallel/test-zlib-unused-weak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-unused-weak.js) -- [parallel/test-zlib-write-after-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib-write-after-close.js) -- [parallel/test-zlib.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-zlib.js) -- [pseudo-tty/readline-dumb-tty.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/readline-dumb-tty.js) -- [pseudo-tty/ref_keeps_node_running.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/ref_keeps_node_running.js) -- [pseudo-tty/repl-dumb-tty.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/repl-dumb-tty.js) -- [pseudo-tty/stdin-setrawmode.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/stdin-setrawmode.js) -- [pseudo-tty/test-assert-colors.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-assert-colors.js) -- [pseudo-tty/test-assert-no-color.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-assert-no-color.js) -- [pseudo-tty/test-assert-position-indicator.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-assert-position-indicator.js) -- [pseudo-tty/test-async-wrap-getasyncid-tty.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-async-wrap-getasyncid-tty.js) -- [pseudo-tty/test-fatal-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-fatal-error.js) -- [pseudo-tty/test-handle-wrap-hasref-tty.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-handle-wrap-hasref-tty.js) -- [pseudo-tty/test-readable-tty-keepalive.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-readable-tty-keepalive.js) -- [pseudo-tty/test-repl-external-module.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-repl-external-module.js) -- [pseudo-tty/test-set-raw-mode-reset-process-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-set-raw-mode-reset-process-exit.js) -- [pseudo-tty/test-set-raw-mode-reset-signal.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-set-raw-mode-reset-signal.js) -- [pseudo-tty/test-set-raw-mode-reset.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-set-raw-mode-reset.js) -- [pseudo-tty/test-stderr-stdout-handle-sigwinch.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-stderr-stdout-handle-sigwinch.js) -- [pseudo-tty/test-stdin-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-stdin-write.js) -- [pseudo-tty/test-stdout-read.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-stdout-read.js) -- [pseudo-tty/test-trace-sigint-disabled.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-trace-sigint-disabled.js) -- [pseudo-tty/test-trace-sigint-on-idle.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-trace-sigint-on-idle.js) -- [pseudo-tty/test-trace-sigint.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-trace-sigint.js) -- [pseudo-tty/test-tty-color-support.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-tty-color-support.js) -- [pseudo-tty/test-tty-isatty.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-tty-isatty.js) -- [pseudo-tty/test-tty-stdin-call-end.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-tty-stdin-call-end.js) -- [pseudo-tty/test-tty-stdout-resize.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-tty-stdout-resize.js) -- [pseudo-tty/test-tty-stream-constructors.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-tty-stream-constructors.js) -- [pseudo-tty/test-tty-window-size.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-tty-window-size.js) -- [pseudo-tty/test-tty-wrap.js](https://github.com/nodejs/node/tree/v18.12.1/test/pseudo-tty/test-tty-wrap.js) -- [pummel/test-child-process-spawn-loop.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-child-process-spawn-loop.js) -- [pummel/test-crypto-dh-hash.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-crypto-dh-hash.js) -- [pummel/test-crypto-dh-keys.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-crypto-dh-keys.js) -- [pummel/test-crypto-timing-safe-equal-benchmarks.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-crypto-timing-safe-equal-benchmarks.js) -- [pummel/test-dh-regr.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-dh-regr.js) -- [pummel/test-fs-largefile.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-fs-largefile.js) -- [pummel/test-fs-readfile-tostring-fail.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-fs-readfile-tostring-fail.js) -- [pummel/test-fs-watch-file-slow.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-fs-watch-file-slow.js) -- [pummel/test-fs-watch-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-fs-watch-file.js) -- [pummel/test-fs-watch-non-recursive.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-fs-watch-non-recursive.js) -- [pummel/test-fs-watch-system-limit.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-fs-watch-system-limit.js) -- [pummel/test-hash-seed.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-hash-seed.js) -- [pummel/test-heapdump-dns.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapdump-dns.js) -- [pummel/test-heapdump-env.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapdump-env.js) -- [pummel/test-heapdump-fs-promise.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapdump-fs-promise.js) -- [pummel/test-heapdump-http2.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapdump-http2.js) -- [pummel/test-heapdump-inspector.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapdump-inspector.js) -- [pummel/test-heapdump-shadow-realm.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapdump-shadow-realm.js) -- [pummel/test-heapdump-tls.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapdump-tls.js) -- [pummel/test-heapdump-worker.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapdump-worker.js) -- [pummel/test-heapdump-zlib.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapdump-zlib.js) -- [pummel/test-heapsnapshot-near-heap-limit-big.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapsnapshot-near-heap-limit-big.js) -- [pummel/test-heapsnapshot-near-heap-limit-bounded.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapsnapshot-near-heap-limit-bounded.js) -- [pummel/test-heapsnapshot-near-heap-limit-by-api.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapsnapshot-near-heap-limit-by-api.js) -- [pummel/test-heapsnapshot-near-heap-limit.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-heapsnapshot-near-heap-limit.js) -- [pummel/test-http-many-keep-alive-connections.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-http-many-keep-alive-connections.js) -- [pummel/test-http-upload-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-http-upload-timeout.js) -- [pummel/test-https-large-response.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-https-large-response.js) -- [pummel/test-https-no-reader.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-https-no-reader.js) -- [pummel/test-keep-alive.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-keep-alive.js) -- [pummel/test-net-many-clients.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-net-many-clients.js) -- [pummel/test-net-pause.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-net-pause.js) -- [pummel/test-net-pingpong-delay.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-net-pingpong-delay.js) -- [pummel/test-net-pingpong.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-net-pingpong.js) -- [pummel/test-net-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-net-timeout.js) -- [pummel/test-net-timeout2.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-net-timeout2.js) -- [pummel/test-net-write-callbacks.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-net-write-callbacks.js) -- [pummel/test-next-tick-infinite-calls.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-next-tick-infinite-calls.js) -- [pummel/test-policy-integrity-dep.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-policy-integrity-dep.js) -- [pummel/test-policy-integrity-parent-commonjs.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-policy-integrity-parent-commonjs.js) -- [pummel/test-policy-integrity-parent-module.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-policy-integrity-parent-module.js) -- [pummel/test-policy-integrity-parent-no-package-json.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-policy-integrity-parent-no-package-json.js) -- [pummel/test-policy-integrity-worker-commonjs.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-policy-integrity-worker-commonjs.js) -- [pummel/test-policy-integrity-worker-module.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-policy-integrity-worker-module.js) -- [pummel/test-policy-integrity-worker-no-package-json.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-policy-integrity-worker-no-package-json.js) -- [pummel/test-process-cpuUsage.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-process-cpuUsage.js) -- [pummel/test-process-hrtime.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-process-hrtime.js) -- [pummel/test-regress-GH-892.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-regress-GH-892.js) -- [pummel/test-stream-pipe-multi.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-stream-pipe-multi.js) -- [pummel/test-timers.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-timers.js) -- [pummel/test-tls-server-large-request.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-tls-server-large-request.js) -- [pummel/test-tls-throttle.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-tls-throttle.js) -- [pummel/test-vm-memleak.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-vm-memleak.js) -- [pummel/test-vm-race.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-vm-race.js) -- [pummel/test-watch-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-watch-file.js) -- [pummel/test-webcrypto-derivebits-pbkdf2.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-webcrypto-derivebits-pbkdf2.js) -- [pummel/test-worker-take-heapsnapshot.js](https://github.com/nodejs/node/tree/v18.12.1/test/pummel/test-worker-take-heapsnapshot.js) -- [sequential/test-async-wrap-getasyncid.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-async-wrap-getasyncid.js) -- [sequential/test-buffer-creation-regression.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-buffer-creation-regression.js) -- [sequential/test-child-process-emfile.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-child-process-emfile.js) -- [sequential/test-child-process-execsync.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-child-process-execsync.js) -- [sequential/test-child-process-pass-fd.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-child-process-pass-fd.js) -- [sequential/test-cli-syntax-bad.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cli-syntax-bad.js) -- [sequential/test-cli-syntax-file-not-found.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cli-syntax-file-not-found.js) -- [sequential/test-cli-syntax-good.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cli-syntax-good.js) -- [sequential/test-cli-syntax-require.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cli-syntax-require.js) -- [sequential/test-cluster-inspect-brk.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cluster-inspect-brk.js) -- [sequential/test-cluster-net-listen-ipv6only-none.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cluster-net-listen-ipv6only-none.js) -- [sequential/test-cluster-net-listen-ipv6only-rr.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cluster-net-listen-ipv6only-rr.js) -- [sequential/test-cluster-send-handle-large-payload.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cluster-send-handle-large-payload.js) -- [sequential/test-cpu-prof-default.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cpu-prof-default.js) -- [sequential/test-cpu-prof-dir-absolute.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cpu-prof-dir-absolute.js) -- [sequential/test-cpu-prof-dir-and-name.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cpu-prof-dir-and-name.js) -- [sequential/test-cpu-prof-dir-relative.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cpu-prof-dir-relative.js) -- [sequential/test-cpu-prof-dir-worker.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cpu-prof-dir-worker.js) -- [sequential/test-cpu-prof-drained.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cpu-prof-drained.js) -- [sequential/test-cpu-prof-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cpu-prof-exit.js) -- [sequential/test-cpu-prof-invalid-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cpu-prof-invalid-options.js) -- [sequential/test-cpu-prof-kill.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cpu-prof-kill.js) -- [sequential/test-cpu-prof-name.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cpu-prof-name.js) -- [sequential/test-cpu-prof-worker-argv.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-cpu-prof-worker-argv.js) -- [sequential/test-crypto-timing-safe-equal.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-crypto-timing-safe-equal.js) -- [sequential/test-debug-prompt.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-debug-prompt.js) -- [sequential/test-debugger-custom-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-debugger-custom-port.js) -- [sequential/test-debugger-debug-brk.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-debugger-debug-brk.js) -- [sequential/test-debugger-invalid-args.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-debugger-invalid-args.js) -- [sequential/test-debugger-pid.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-debugger-pid.js) -- [sequential/test-deprecation-flags.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-deprecation-flags.js) -- [sequential/test-dgram-bind-shared-ports.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-dgram-bind-shared-ports.js) -- [sequential/test-dgram-implicit-bind-failure.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-dgram-implicit-bind-failure.js) -- [sequential/test-dgram-pingpong.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-dgram-pingpong.js) -- [sequential/test-diagnostic-dir-cpu-prof.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-diagnostic-dir-cpu-prof.js) -- [sequential/test-diagnostic-dir-heap-prof.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-diagnostic-dir-heap-prof.js) -- [sequential/test-fs-opendir-recursive.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-fs-opendir-recursive.js) -- [sequential/test-fs-readdir-recursive.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-fs-readdir-recursive.js) -- [sequential/test-fs-stat-sync-overflow.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-fs-stat-sync-overflow.js) -- [sequential/test-fs-watch.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-fs-watch.js) -- [sequential/test-gc-http-client-onerror.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-gc-http-client-onerror.js) -- [sequential/test-gc-http-client-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-gc-http-client-timeout.js) -- [sequential/test-gc-http-client.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-gc-http-client.js) -- [sequential/test-get-heapsnapshot-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-get-heapsnapshot-options.js) -- [sequential/test-heapdump-flag-custom-dir.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-heapdump-flag-custom-dir.js) -- [sequential/test-heapdump-flag.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-heapdump-flag.js) -- [sequential/test-heapdump.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-heapdump.js) -- [sequential/test-http-econnrefused.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-http-econnrefused.js) -- [sequential/test-http-keep-alive-large-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-http-keep-alive-large-write.js) -- [sequential/test-http-keepalive-maxsockets.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-http-keepalive-maxsockets.js) -- [sequential/test-http-max-sockets.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-http-max-sockets.js) -- [sequential/test-http-regr-gh-2928.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-http-regr-gh-2928.js) -- [sequential/test-http-server-keep-alive-timeout-slow-client-headers.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-http-server-keep-alive-timeout-slow-client-headers.js) -- [sequential/test-http-server-keep-alive-timeout-slow-server.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-http-server-keep-alive-timeout-slow-server.js) -- [sequential/test-http2-large-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-http2-large-file.js) -- [sequential/test-http2-max-session-memory.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-http2-max-session-memory.js) -- [sequential/test-http2-ping-flood.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-http2-ping-flood.js) -- [sequential/test-http2-settings-flood.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-http2-settings-flood.js) -- [sequential/test-http2-timeout-large-write-file.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-http2-timeout-large-write-file.js) -- [sequential/test-http2-timeout-large-write.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-http2-timeout-large-write.js) -- [sequential/test-https-connect-localport.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-https-connect-localport.js) -- [sequential/test-https-server-keep-alive-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-https-server-keep-alive-timeout.js) -- [sequential/test-init.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-init.js) -- [sequential/test-inspector-port-cluster.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-inspector-port-cluster.js) -- [sequential/test-module-loading.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-module-loading.js) -- [sequential/test-net-GH-5504.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-net-GH-5504.js) -- [sequential/test-net-better-error-messages-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-net-better-error-messages-port.js) -- [sequential/test-net-connect-econnrefused.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-net-connect-econnrefused.js) -- [sequential/test-net-connect-handle-econnrefused.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-net-connect-handle-econnrefused.js) -- [sequential/test-net-connect-local-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-net-connect-local-error.js) -- [sequential/test-net-listen-shared-ports.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-net-listen-shared-ports.js) -- [sequential/test-net-localport.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-net-localport.js) -- [sequential/test-net-reconnect-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-net-reconnect-error.js) -- [sequential/test-net-response-size.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-net-response-size.js) -- [sequential/test-net-server-address.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-net-server-address.js) -- [sequential/test-net-server-bind.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-net-server-bind.js) -- [sequential/test-next-tick-error-spin.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-next-tick-error-spin.js) -- [sequential/test-perf-hooks.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-perf-hooks.js) -- [sequential/test-performance-eventloopdelay.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-performance-eventloopdelay.js) -- [sequential/test-pipe.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-pipe.js) -- [sequential/test-process-title.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-process-title.js) -- [sequential/test-process-warnings.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-process-warnings.js) -- [sequential/test-repl-timeout-throw.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-repl-timeout-throw.js) -- [sequential/test-require-cache-without-stat.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-require-cache-without-stat.js) -- [sequential/test-resolution-inspect-brk.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-resolution-inspect-brk.js) -- [sequential/test-single-executable-application-disable-experimental-sea-warning.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-single-executable-application-disable-experimental-sea-warning.js) -- [sequential/test-single-executable-application-empty.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-single-executable-application-empty.js) -- [sequential/test-single-executable-application-snapshot-and-code-cache.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-single-executable-application-snapshot-and-code-cache.js) -- [sequential/test-single-executable-application-snapshot.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-single-executable-application-snapshot.js) -- [sequential/test-single-executable-application-use-code-cache.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-single-executable-application-use-code-cache.js) -- [sequential/test-single-executable-application.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-single-executable-application.js) -- [sequential/test-stream2-fs.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-stream2-fs.js) -- [sequential/test-stream2-stderr-sync.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-stream2-stderr-sync.js) -- [sequential/test-timers-block-eventloop.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-timers-block-eventloop.js) -- [sequential/test-timers-set-interval-excludes-callback-duration.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-timers-set-interval-excludes-callback-duration.js) -- [sequential/test-tls-connect.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-tls-connect.js) -- [sequential/test-tls-lookup.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-tls-lookup.js) -- [sequential/test-tls-psk-client.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-tls-psk-client.js) -- [sequential/test-tls-securepair-client.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-tls-securepair-client.js) -- [sequential/test-tls-session-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-tls-session-timeout.js) -- [sequential/test-util-debug.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-util-debug.js) -- [sequential/test-vm-break-on-sigint.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-vm-break-on-sigint.js) -- [sequential/test-vm-timeout-escape-promise-module-2.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-vm-timeout-escape-promise-module-2.js) -- [sequential/test-vm-timeout-rethrow.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-vm-timeout-rethrow.js) -- [sequential/test-worker-eventlooputil.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-worker-eventlooputil.js) -- [sequential/test-worker-fshandles-error-on-termination.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-worker-fshandles-error-on-termination.js) -- [sequential/test-worker-fshandles-open-close-on-termination.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-worker-fshandles-open-close-on-termination.js) -- [sequential/test-worker-heapsnapshot-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-worker-heapsnapshot-options.js) -- [sequential/test-worker-prof.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-worker-prof.js) -- [sequential/test-write-heapsnapshot-options.js](https://github.com/nodejs/node/tree/v18.12.1/test/sequential/test-write-heapsnapshot-options.js) +- [abort/test-abort-backtrace.js](https://github.com/nodejs/node/tree/v20.11.1/test/abort/test-abort-backtrace.js) +- [abort/test-abort-fatal-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/abort/test-abort-fatal-error.js) +- [abort/test-abort-uncaught-exception.js](https://github.com/nodejs/node/tree/v20.11.1/test/abort/test-abort-uncaught-exception.js) +- [abort/test-addon-register-signal-handler.js](https://github.com/nodejs/node/tree/v20.11.1/test/abort/test-addon-register-signal-handler.js) +- [abort/test-http-parser-consume.js](https://github.com/nodejs/node/tree/v20.11.1/test/abort/test-http-parser-consume.js) +- [abort/test-process-abort-exitcode.js](https://github.com/nodejs/node/tree/v20.11.1/test/abort/test-process-abort-exitcode.js) +- [abort/test-signal-handler.js](https://github.com/nodejs/node/tree/v20.11.1/test/abort/test-signal-handler.js) +- [abort/test-worker-abort-uncaught-exception.js](https://github.com/nodejs/node/tree/v20.11.1/test/abort/test-worker-abort-uncaught-exception.js) +- [abort/test-zlib-invalid-internals-usage.js](https://github.com/nodejs/node/tree/v20.11.1/test/abort/test-zlib-invalid-internals-usage.js) +- [benchmark/test-bechmark-readline.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-bechmark-readline.js) +- [benchmark/test-benchmark-assert.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-assert.js) +- [benchmark/test-benchmark-blob.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-blob.js) +- [benchmark/test-benchmark-buffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-buffer.js) +- [benchmark/test-benchmark-child-process.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-child-process.js) +- [benchmark/test-benchmark-cluster.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-cluster.js) +- [benchmark/test-benchmark-crypto.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-crypto.js) +- [benchmark/test-benchmark-dgram.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-dgram.js) +- [benchmark/test-benchmark-dns.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-dns.js) +- [benchmark/test-benchmark-domain.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-domain.js) +- [benchmark/test-benchmark-es.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-es.js) +- [benchmark/test-benchmark-esm.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-esm.js) +- [benchmark/test-benchmark-events.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-events.js) +- [benchmark/test-benchmark-fs.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-fs.js) +- [benchmark/test-benchmark-mime.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-mime.js) +- [benchmark/test-benchmark-misc.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-misc.js) +- [benchmark/test-benchmark-module.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-module.js) +- [benchmark/test-benchmark-napi.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-napi.js) +- [benchmark/test-benchmark-net.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-net.js) +- [benchmark/test-benchmark-os.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-os.js) +- [benchmark/test-benchmark-path.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-path.js) +- [benchmark/test-benchmark-policy.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-policy.js) +- [benchmark/test-benchmark-process.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-process.js) +- [benchmark/test-benchmark-querystring.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-querystring.js) +- [benchmark/test-benchmark-streams.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-streams.js) +- [benchmark/test-benchmark-string_decoder.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-string_decoder.js) +- [benchmark/test-benchmark-timers.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-timers.js) +- [benchmark/test-benchmark-url.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-url.js) +- [benchmark/test-benchmark-util.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-util.js) +- [benchmark/test-benchmark-v8.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-v8.js) +- [benchmark/test-benchmark-validators.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-validators.js) +- [benchmark/test-benchmark-vm.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-vm.js) +- [benchmark/test-benchmark-webstreams.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-webstreams.js) +- [benchmark/test-benchmark-zlib.js](https://github.com/nodejs/node/tree/v20.11.1/test/benchmark/test-benchmark-zlib.js) +- [es-module/test-cjs-esm-warn.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-cjs-esm-warn.js) +- [es-module/test-cjs-legacyMainResolve-permission.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-cjs-legacyMainResolve-permission.js) +- [es-module/test-cjs-legacyMainResolve.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-cjs-legacyMainResolve.js) +- [es-module/test-dynamic-import-script-lifetime.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-dynamic-import-script-lifetime.js) +- [es-module/test-esm-assertionless-json-import.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-assertionless-json-import.js) +- [es-module/test-esm-cjs-builtins.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-cjs-builtins.js) +- [es-module/test-esm-cjs-exports.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-cjs-exports.js) +- [es-module/test-esm-cjs-main.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-cjs-main.js) +- [es-module/test-esm-data-urls.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-data-urls.js) +- [es-module/test-esm-dynamic-import-attribute.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-dynamic-import-attribute.js) +- [es-module/test-esm-dynamic-import-commonjs.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-dynamic-import-commonjs.js) +- [es-module/test-esm-dynamic-import.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-dynamic-import.js) +- [es-module/test-esm-encoded-path-native.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-encoded-path-native.js) +- [es-module/test-esm-error-cache.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-error-cache.js) +- [es-module/test-esm-import-attributes-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-import-attributes-errors.js) +- [es-module/test-esm-import-attributes-validation.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-import-attributes-validation.js) +- [es-module/test-esm-invalid-data-urls.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-invalid-data-urls.js) +- [es-module/test-esm-invalid-pjson.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-invalid-pjson.js) +- [es-module/test-esm-loader-modulemap.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-loader-modulemap.js) +- [es-module/test-esm-loader-search.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-loader-search.js) +- [es-module/test-esm-named-exports.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-named-exports.js) +- [es-module/test-esm-preserve-symlinks-main.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-preserve-symlinks-main.js) +- [es-module/test-esm-preserve-symlinks.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-preserve-symlinks.js) +- [es-module/test-esm-repl-imports.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-repl-imports.js) +- [es-module/test-esm-repl.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-repl.js) +- [es-module/test-esm-symlink-main.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-symlink-main.js) +- [es-module/test-esm-symlink-type.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-symlink-type.js) +- [es-module/test-esm-symlink.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-symlink.js) +- [es-module/test-esm-type-field-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-type-field-errors.js) +- [es-module/test-esm-undefined-cjs-global-like-variables.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-undefined-cjs-global-like-variables.js) +- [es-module/test-esm-unknown-extension.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-unknown-extension.js) +- [es-module/test-esm-url-extname.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-esm-url-extname.js) +- [es-module/test-loaders-hidden-from-users.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-loaders-hidden-from-users.js) +- [es-module/test-vm-compile-function-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-vm-compile-function-leak.js) +- [es-module/test-vm-contextified-script-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-vm-contextified-script-leak.js) +- [es-module/test-vm-source-text-module-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-vm-source-text-module-leak.js) +- [es-module/test-vm-synthetic-module-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-vm-synthetic-module-leak.js) +- [es-module/test-wasm-memory-out-of-bound.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-wasm-memory-out-of-bound.js) +- [es-module/test-wasm-simple.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-wasm-simple.js) +- [es-module/test-wasm-web-api.js](https://github.com/nodejs/node/tree/v20.11.1/test/es-module/test-wasm-web-api.js) +- [internet/test-corepack-yarn-install.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-corepack-yarn-install.js) +- [internet/test-dgram-broadcast-multi-process.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-dgram-broadcast-multi-process.js) +- [internet/test-dgram-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-dgram-connect.js) +- [internet/test-dgram-membership.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-dgram-membership.js) +- [internet/test-dgram-multicast-multi-process.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-dgram-multicast-multi-process.js) +- [internet/test-dgram-multicast-set-interface-lo.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-dgram-multicast-set-interface-lo.js) +- [internet/test-dgram-multicast-ssm-multi-process.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-dgram-multicast-ssm-multi-process.js) +- [internet/test-dgram-multicast-ssmv6-multi-process.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-dgram-multicast-ssmv6-multi-process.js) +- [internet/test-dns-any.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-dns-any.js) +- [internet/test-dns-cares-domains.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-dns-cares-domains.js) +- [internet/test-dns-getDefaultResultOrder.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-dns-getDefaultResultOrder.js) +- [internet/test-dns-ipv4.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-dns-ipv4.js) +- [internet/test-dns-ipv6.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-dns-ipv6.js) +- [internet/test-dns-txt-sigsegv.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-dns-txt-sigsegv.js) +- [internet/test-dns.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-dns.js) +- [internet/test-http-dns-fail.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-http-dns-fail.js) +- [internet/test-http2-issue-32922.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-http2-issue-32922.js) +- [internet/test-https-autoselectfamily-slow-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-https-autoselectfamily-slow-timeout.js) +- [internet/test-https-issue-43963.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-https-issue-43963.js) +- [internet/test-inspector-help-page.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-inspector-help-page.js) +- [internet/test-net-autoselectfamily-timeout-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-net-autoselectfamily-timeout-close.js) +- [internet/test-net-connect-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-net-connect-timeout.js) +- [internet/test-net-connect-unref.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-net-connect-unref.js) +- [internet/test-snapshot-dns-lookup.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-snapshot-dns-lookup.js) +- [internet/test-snapshot-dns-resolve.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-snapshot-dns-resolve.js) +- [internet/test-tls-add-ca-cert.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-tls-add-ca-cert.js) +- [internet/test-tls-autoselectfamily-backing-socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-tls-autoselectfamily-backing-socket.js) +- [internet/test-tls-autoselectfamily-servername.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-tls-autoselectfamily-servername.js) +- [internet/test-trace-events-dns.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-trace-events-dns.js) +- [internet/test-uv-threadpool-schedule.js](https://github.com/nodejs/node/tree/v20.11.1/test/internet/test-uv-threadpool-schedule.js) +- [known_issues/test-cli-print-var-crypto.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-cli-print-var-crypto.js) +- [known_issues/test-cwd-enoent-file.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-cwd-enoent-file.js) +- [known_issues/test-dgram-bind-shared-ports-after-port-0.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-dgram-bind-shared-ports-after-port-0.js) +- [known_issues/test-fs-writeFileSync-invalid-windows.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-fs-writeFileSync-invalid-windows.js) +- [known_issues/test-http-path-contains-unicode.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-http-path-contains-unicode.js) +- [known_issues/test-inspector-cluster-port-clash.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-inspector-cluster-port-clash.js) +- [known_issues/test-permission-model-path-resolution.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-permission-model-path-resolution.js) +- [known_issues/test-repl-require-context.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-repl-require-context.js) +- [known_issues/test-stdin-is-always-net.socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-stdin-is-always-net.socket.js) +- [known_issues/test-stream-writable-sync-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-stream-writable-sync-error.js) +- [known_issues/test-url-parse-conformance.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-url-parse-conformance.js) +- [known_issues/test-vm-function-declaration-uses-define.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-vm-function-declaration-uses-define.js) +- [known_issues/test-vm-ownkeys.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-vm-ownkeys.js) +- [known_issues/test-vm-ownpropertynames.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-vm-ownpropertynames.js) +- [known_issues/test-vm-ownpropertysymbols.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-vm-ownpropertysymbols.js) +- [known_issues/test-vm-timeout-escape-nexttick.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-vm-timeout-escape-nexttick.js) +- [known_issues/test-vm-timeout-escape-queuemicrotask.js](https://github.com/nodejs/node/tree/v20.11.1/test/known_issues/test-vm-timeout-escape-queuemicrotask.js) +- [message/assert_throws_stack.js](https://github.com/nodejs/node/tree/v20.11.1/test/message/assert_throws_stack.js) +- [message/internal_assert.js](https://github.com/nodejs/node/tree/v20.11.1/test/message/internal_assert.js) +- [message/internal_assert_fail.js](https://github.com/nodejs/node/tree/v20.11.1/test/message/internal_assert_fail.js) +- [message/nexttick_throw.js](https://github.com/nodejs/node/tree/v20.11.1/test/message/nexttick_throw.js) +- [message/util-inspect-error-cause.js](https://github.com/nodejs/node/tree/v20.11.1/test/message/util-inspect-error-cause.js) +- [parallel/test-abortcontroller.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-abortcontroller.js) +- [parallel/test-aborted-util.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-aborted-util.js) +- [parallel/test-abortsignal-cloneable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-abortsignal-cloneable.js) +- [parallel/test-accessor-properties.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-accessor-properties.js) +- [parallel/test-assert-builtins-not-read-from-filesystem.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-assert-builtins-not-read-from-filesystem.js) +- [parallel/test-assert-calltracker-calls.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-assert-calltracker-calls.js) +- [parallel/test-assert-calltracker-getCalls.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-assert-calltracker-getCalls.js) +- [parallel/test-assert-calltracker-report.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-assert-calltracker-report.js) +- [parallel/test-assert-calltracker-verify.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-assert-calltracker-verify.js) +- [parallel/test-assert-checktag.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-assert-checktag.js) +- [parallel/test-assert-deep.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-assert-deep.js) +- [parallel/test-assert-esm-cjs-message-verify.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-assert-esm-cjs-message-verify.js) +- [parallel/test-assert-fail-deprecation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-assert-fail-deprecation.js) +- [parallel/test-assert-first-line.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-assert-first-line.js) +- [parallel/test-assert-if-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-assert-if-error.js) +- [parallel/test-assert-typedarray-deepequal.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-assert-typedarray-deepequal.js) +- [parallel/test-async-hooks-async-await.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-async-await.js) +- [parallel/test-async-hooks-asyncresource-constructor.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-asyncresource-constructor.js) +- [parallel/test-async-hooks-close-during-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-close-during-destroy.js) +- [parallel/test-async-hooks-constructor.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-constructor.js) +- [parallel/test-async-hooks-correctly-switch-promise-hook.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-correctly-switch-promise-hook.js) +- [parallel/test-async-hooks-destroy-on-gc.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-destroy-on-gc.js) +- [parallel/test-async-hooks-disable-during-promise.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-disable-during-promise.js) +- [parallel/test-async-hooks-disable-gc-tracking.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-disable-gc-tracking.js) +- [parallel/test-async-hooks-enable-before-promise-resolve.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-enable-before-promise-resolve.js) +- [parallel/test-async-hooks-enable-disable-enable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-enable-disable-enable.js) +- [parallel/test-async-hooks-enable-disable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-enable-disable.js) +- [parallel/test-async-hooks-enable-during-promise.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-enable-during-promise.js) +- [parallel/test-async-hooks-enable-recursive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-enable-recursive.js) +- [parallel/test-async-hooks-execution-async-resource-await.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-execution-async-resource-await.js) +- [parallel/test-async-hooks-execution-async-resource.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-execution-async-resource.js) +- [parallel/test-async-hooks-fatal-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-fatal-error.js) +- [parallel/test-async-hooks-http-agent-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-http-agent-destroy.js) +- [parallel/test-async-hooks-http-agent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-http-agent.js) +- [parallel/test-async-hooks-http-parser-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-http-parser-destroy.js) +- [parallel/test-async-hooks-prevent-double-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-prevent-double-destroy.js) +- [parallel/test-async-hooks-promise-enable-disable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-promise-enable-disable.js) +- [parallel/test-async-hooks-promise-triggerid.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-promise-triggerid.js) +- [parallel/test-async-hooks-promise.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-promise.js) +- [parallel/test-async-hooks-recursive-stack-runInAsyncScope.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-recursive-stack-runInAsyncScope.js) +- [parallel/test-async-hooks-top-level-clearimmediate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-top-level-clearimmediate.js) +- [parallel/test-async-hooks-vm-gc.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-vm-gc.js) +- [parallel/test-async-hooks-worker-asyncfn-terminate-1.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-worker-asyncfn-terminate-1.js) +- [parallel/test-async-hooks-worker-asyncfn-terminate-2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-worker-asyncfn-terminate-2.js) +- [parallel/test-async-hooks-worker-asyncfn-terminate-3.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-worker-asyncfn-terminate-3.js) +- [parallel/test-async-hooks-worker-asyncfn-terminate-4.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-hooks-worker-asyncfn-terminate-4.js) +- [parallel/test-async-local-storage-exit-does-not-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-local-storage-exit-does-not-leak.js) +- [parallel/test-async-wrap-constructor.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-wrap-constructor.js) +- [parallel/test-async-wrap-destroyid.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-wrap-destroyid.js) +- [parallel/test-async-wrap-pop-id-during-load.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-wrap-pop-id-during-load.js) +- [parallel/test-async-wrap-promise-after-enabled.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-wrap-promise-after-enabled.js) +- [parallel/test-async-wrap-tlssocket-asyncreset.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-wrap-tlssocket-asyncreset.js) +- [parallel/test-async-wrap-trigger-id.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-wrap-trigger-id.js) +- [parallel/test-async-wrap-uncaughtexception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-async-wrap-uncaughtexception.js) +- [parallel/test-asyncresource-bind.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-asyncresource-bind.js) +- [parallel/test-bash-completion.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-bash-completion.js) +- [parallel/test-benchmark-cli.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-benchmark-cli.js) +- [parallel/test-binding-constants.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-binding-constants.js) +- [parallel/test-blob-createobjecturl.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-blob-createobjecturl.js) +- [parallel/test-blob-file-backed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-blob-file-backed.js) +- [parallel/test-blob.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-blob.js) +- [parallel/test-blocklist-clone.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-blocklist-clone.js) +- [parallel/test-bootstrap-modules.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-bootstrap-modules.js) +- [parallel/test-broadcastchannel-custom-inspect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-broadcastchannel-custom-inspect.js) +- [parallel/test-buffer-backing-arraybuffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-buffer-backing-arraybuffer.js) +- [parallel/test-buffer-compare.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-buffer-compare.js) +- [parallel/test-buffer-constructor-deprecation-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-buffer-constructor-deprecation-error.js) +- [parallel/test-buffer-constructor-node-modules-paths.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-buffer-constructor-node-modules-paths.js) +- [parallel/test-buffer-constructor-outside-node-modules.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-buffer-constructor-outside-node-modules.js) +- [parallel/test-buffer-fill.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-buffer-fill.js) +- [parallel/test-buffer-inspect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-buffer-inspect.js) +- [parallel/test-buffer-pending-deprecation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-buffer-pending-deprecation.js) +- [parallel/test-buffer-pool-untransferable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-buffer-pool-untransferable.js) +- [parallel/test-buffer-prototype-inspect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-buffer-prototype-inspect.js) +- [parallel/test-buffer-set-inspect-max-bytes.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-buffer-set-inspect-max-bytes.js) +- [parallel/test-c-ares.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-c-ares.js) +- [parallel/test-child-process-advanced-serialization-largebuffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-advanced-serialization-largebuffer.js) +- [parallel/test-child-process-advanced-serialization.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-advanced-serialization.js) +- [parallel/test-child-process-bad-stdio.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-bad-stdio.js) +- [parallel/test-child-process-can-write-to-stdout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-can-write-to-stdout.js) +- [parallel/test-child-process-constructor.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-constructor.js) +- [parallel/test-child-process-cwd.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-cwd.js) +- [parallel/test-child-process-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-destroy.js) +- [parallel/test-child-process-disconnect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-disconnect.js) +- [parallel/test-child-process-env.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-env.js) +- [parallel/test-child-process-exec-any-shells-windows.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-exec-any-shells-windows.js) +- [parallel/test-child-process-exec-timeout-expire.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-exec-timeout-expire.js) +- [parallel/test-child-process-exec-timeout-kill.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-exec-timeout-kill.js) +- [parallel/test-child-process-execFile-promisified-abortController.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-execFile-promisified-abortController.js) +- [parallel/test-child-process-fork-abort-signal.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-abort-signal.js) +- [parallel/test-child-process-fork-and-spawn.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-and-spawn.js) +- [parallel/test-child-process-fork-args.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-args.js) +- [parallel/test-child-process-fork-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-close.js) +- [parallel/test-child-process-fork-closed-channel-segfault.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-closed-channel-segfault.js) +- [parallel/test-child-process-fork-detached.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-detached.js) +- [parallel/test-child-process-fork-dgram.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-dgram.js) +- [parallel/test-child-process-fork-exec-argv.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-exec-argv.js) +- [parallel/test-child-process-fork-exec-path.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-exec-path.js) +- [parallel/test-child-process-fork-getconnections.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-getconnections.js) +- [parallel/test-child-process-fork-net-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-net-server.js) +- [parallel/test-child-process-fork-net-socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-net-socket.js) +- [parallel/test-child-process-fork-net.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-net.js) +- [parallel/test-child-process-fork-no-shell.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-no-shell.js) +- [parallel/test-child-process-fork-stdio-string-variant.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-stdio-string-variant.js) +- [parallel/test-child-process-fork-stdio.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-stdio.js) +- [parallel/test-child-process-fork-timeout-kill-signal.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork-timeout-kill-signal.js) +- [parallel/test-child-process-fork.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-fork.js) +- [parallel/test-child-process-http-socket-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-http-socket-leak.js) +- [parallel/test-child-process-internal.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-internal.js) +- [parallel/test-child-process-no-deprecation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-no-deprecation.js) +- [parallel/test-child-process-pipe-dataflow.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-pipe-dataflow.js) +- [parallel/test-child-process-promisified.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-promisified.js) +- [parallel/test-child-process-recv-handle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-recv-handle.js) +- [parallel/test-child-process-reject-null-bytes.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-reject-null-bytes.js) +- [parallel/test-child-process-send-after-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-send-after-close.js) +- [parallel/test-child-process-send-cb.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-send-cb.js) +- [parallel/test-child-process-send-keep-open.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-send-keep-open.js) +- [parallel/test-child-process-send-returns-boolean.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-send-returns-boolean.js) +- [parallel/test-child-process-send-utf8.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-send-utf8.js) +- [parallel/test-child-process-server-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-server-close.js) +- [parallel/test-child-process-silent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-silent.js) +- [parallel/test-child-process-spawn-argv0.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-spawn-argv0.js) +- [parallel/test-child-process-spawn-controller.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-spawn-controller.js) +- [parallel/test-child-process-spawn-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-spawn-error.js) +- [parallel/test-child-process-spawn-shell.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-spawn-shell.js) +- [parallel/test-child-process-spawn-timeout-kill-signal.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-spawn-timeout-kill-signal.js) +- [parallel/test-child-process-spawn-typeerror.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-spawn-typeerror.js) +- [parallel/test-child-process-spawnsync-input.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-spawnsync-input.js) +- [parallel/test-child-process-spawnsync-kill-signal.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-spawnsync-kill-signal.js) +- [parallel/test-child-process-spawnsync-shell.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-spawnsync-shell.js) +- [parallel/test-child-process-spawnsync-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-spawnsync-timeout.js) +- [parallel/test-child-process-stdin.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-stdin.js) +- [parallel/test-child-process-stdio-big-write-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-stdio-big-write-end.js) +- [parallel/test-child-process-stdio-merge-stdouts-into-cat.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-stdio-merge-stdouts-into-cat.js) +- [parallel/test-child-process-stdio-reuse-readable-stdio.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-stdio-reuse-readable-stdio.js) +- [parallel/test-child-process-stdio.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-stdio.js) +- [parallel/test-child-process-stdout-ipc.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-stdout-ipc.js) +- [parallel/test-child-process-uid-gid.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-uid-gid.js) +- [parallel/test-child-process-validate-stdio.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-validate-stdio.js) +- [parallel/test-child-process-windows-hide.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-child-process-windows-hide.js) +- [parallel/test-cli-bad-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cli-bad-options.js) +- [parallel/test-cli-eval-event.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cli-eval-event.js) +- [parallel/test-cli-eval.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cli-eval.js) +- [parallel/test-cli-node-options-disallowed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cli-node-options-disallowed.js) +- [parallel/test-cli-node-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cli-node-options.js) +- [parallel/test-cli-node-print-help.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cli-node-print-help.js) +- [parallel/test-cli-options-negation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cli-options-negation.js) +- [parallel/test-cli-options-precedence.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cli-options-precedence.js) +- [parallel/test-cli-permission-deny-fs.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cli-permission-deny-fs.js) +- [parallel/test-cli-permission-multiple-allow.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cli-permission-multiple-allow.js) +- [parallel/test-cli-syntax-eval.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cli-syntax-eval.js) +- [parallel/test-cli-syntax-piped-bad.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cli-syntax-piped-bad.js) +- [parallel/test-cli-syntax-piped-good.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cli-syntax-piped-good.js) +- [parallel/test-cluster-accept-fail.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-accept-fail.js) +- [parallel/test-cluster-advanced-serialization.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-advanced-serialization.js) +- [parallel/test-cluster-basic.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-basic.js) +- [parallel/test-cluster-bind-privileged-port.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-bind-privileged-port.js) +- [parallel/test-cluster-bind-twice.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-bind-twice.js) +- [parallel/test-cluster-call-and-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-call-and-destroy.js) +- [parallel/test-cluster-child-index-dgram.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-child-index-dgram.js) +- [parallel/test-cluster-child-index-net.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-child-index-net.js) +- [parallel/test-cluster-concurrent-disconnect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-concurrent-disconnect.js) +- [parallel/test-cluster-cwd.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-cwd.js) +- [parallel/test-cluster-dgram-1.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-dgram-1.js) +- [parallel/test-cluster-dgram-2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-dgram-2.js) +- [parallel/test-cluster-dgram-bind-fd.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-dgram-bind-fd.js) +- [parallel/test-cluster-dgram-ipv6only.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-dgram-ipv6only.js) +- [parallel/test-cluster-dgram-reuse.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-dgram-reuse.js) +- [parallel/test-cluster-disconnect-before-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-disconnect-before-exit.js) +- [parallel/test-cluster-disconnect-exitedAfterDisconnect-race.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-disconnect-exitedAfterDisconnect-race.js) +- [parallel/test-cluster-disconnect-idle-worker.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-disconnect-idle-worker.js) +- [parallel/test-cluster-disconnect-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-disconnect-leak.js) +- [parallel/test-cluster-disconnect-race.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-disconnect-race.js) +- [parallel/test-cluster-disconnect-unshared-tcp.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-disconnect-unshared-tcp.js) +- [parallel/test-cluster-disconnect-unshared-udp.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-disconnect-unshared-udp.js) +- [parallel/test-cluster-disconnect-with-no-workers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-disconnect-with-no-workers.js) +- [parallel/test-cluster-disconnect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-disconnect.js) +- [parallel/test-cluster-eaccess.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-eaccess.js) +- [parallel/test-cluster-eaddrinuse.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-eaddrinuse.js) +- [parallel/test-cluster-fork-env.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-fork-env.js) +- [parallel/test-cluster-fork-stdio.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-fork-stdio.js) +- [parallel/test-cluster-fork-windowsHide.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-fork-windowsHide.js) +- [parallel/test-cluster-http-pipe.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-http-pipe.js) +- [parallel/test-cluster-invalid-message.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-invalid-message.js) +- [parallel/test-cluster-ipc-throw.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-ipc-throw.js) +- [parallel/test-cluster-kill-disconnect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-kill-disconnect.js) +- [parallel/test-cluster-kill-infinite-loop.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-kill-infinite-loop.js) +- [parallel/test-cluster-listen-pipe-readable-writable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-listen-pipe-readable-writable.js) +- [parallel/test-cluster-listening-port.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-listening-port.js) +- [parallel/test-cluster-message.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-message.js) +- [parallel/test-cluster-net-listen-backlog.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-net-listen-backlog.js) +- [parallel/test-cluster-net-listen-ipv6only-false.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-net-listen-ipv6only-false.js) +- [parallel/test-cluster-net-listen-relative-path.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-net-listen-relative-path.js) +- [parallel/test-cluster-net-listen.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-net-listen.js) +- [parallel/test-cluster-net-send.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-net-send.js) +- [parallel/test-cluster-net-server-drop-connection.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-net-server-drop-connection.js) +- [parallel/test-cluster-primary-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-primary-error.js) +- [parallel/test-cluster-primary-kill.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-primary-kill.js) +- [parallel/test-cluster-process-disconnect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-process-disconnect.js) +- [parallel/test-cluster-rr-domain-listen.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-rr-domain-listen.js) +- [parallel/test-cluster-rr-handle-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-rr-handle-close.js) +- [parallel/test-cluster-rr-handle-keep-loop-alive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-rr-handle-keep-loop-alive.js) +- [parallel/test-cluster-rr-handle-ref-unref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-rr-handle-ref-unref.js) +- [parallel/test-cluster-rr-ref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-rr-ref.js) +- [parallel/test-cluster-send-deadlock.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-send-deadlock.js) +- [parallel/test-cluster-send-handle-twice.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-send-handle-twice.js) +- [parallel/test-cluster-send-socket-to-worker-http-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-send-socket-to-worker-http-server.js) +- [parallel/test-cluster-server-restart-none.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-server-restart-none.js) +- [parallel/test-cluster-server-restart-rr.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-server-restart-rr.js) +- [parallel/test-cluster-setup-primary-argv.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-setup-primary-argv.js) +- [parallel/test-cluster-setup-primary-cumulative.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-setup-primary-cumulative.js) +- [parallel/test-cluster-setup-primary-emit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-setup-primary-emit.js) +- [parallel/test-cluster-setup-primary-multiple.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-setup-primary-multiple.js) +- [parallel/test-cluster-setup-primary.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-setup-primary.js) +- [parallel/test-cluster-shared-handle-bind-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-shared-handle-bind-error.js) +- [parallel/test-cluster-shared-handle-bind-privileged-port.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-shared-handle-bind-privileged-port.js) +- [parallel/test-cluster-shared-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-shared-leak.js) +- [parallel/test-cluster-worker-constructor.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-constructor.js) +- [parallel/test-cluster-worker-death.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-death.js) +- [parallel/test-cluster-worker-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-destroy.js) +- [parallel/test-cluster-worker-disconnect-on-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-disconnect-on-error.js) +- [parallel/test-cluster-worker-disconnect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-disconnect.js) +- [parallel/test-cluster-worker-events.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-events.js) +- [parallel/test-cluster-worker-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-exit.js) +- [parallel/test-cluster-worker-forced-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-forced-exit.js) +- [parallel/test-cluster-worker-handle-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-handle-close.js) +- [parallel/test-cluster-worker-init.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-init.js) +- [parallel/test-cluster-worker-isconnected.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-isconnected.js) +- [parallel/test-cluster-worker-isdead.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-isdead.js) +- [parallel/test-cluster-worker-kill-signal.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-kill-signal.js) +- [parallel/test-cluster-worker-kill.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-kill.js) +- [parallel/test-cluster-worker-no-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-no-exit.js) +- [parallel/test-cluster-worker-wait-server-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cluster-worker-wait-server-close.js) +- [parallel/test-code-cache.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-code-cache.js) +- [parallel/test-common-countdown.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-common-countdown.js) +- [parallel/test-common-expect-warning.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-common-expect-warning.js) +- [parallel/test-common-gc.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-common-gc.js) +- [parallel/test-common-must-not-call.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-common-must-not-call.js) +- [parallel/test-common.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-common.js) +- [parallel/test-console-clear.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-console-clear.js) +- [parallel/test-console-count.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-console-count.js) +- [parallel/test-console-issue-43095.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-console-issue-43095.js) +- [parallel/test-console-methods.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-console-methods.js) +- [parallel/test-console-stdio-setters.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-console-stdio-setters.js) +- [parallel/test-console.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-console.js) +- [parallel/test-constants.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-constants.js) +- [parallel/test-corepack-version.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-corepack-version.js) +- [parallel/test-coverage-with-inspector-disabled.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-coverage-with-inspector-disabled.js) +- [parallel/test-crypto-aes-wrap.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-aes-wrap.js) +- [parallel/test-crypto-async-sign-verify.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-async-sign-verify.js) +- [parallel/test-crypto-authenticated-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-authenticated-stream.js) +- [parallel/test-crypto-authenticated.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-authenticated.js) +- [parallel/test-crypto-certificate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-certificate.js) +- [parallel/test-crypto-cipher-decipher.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-cipher-decipher.js) +- [parallel/test-crypto-cipheriv-decipheriv.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-cipheriv-decipheriv.js) +- [parallel/test-crypto-classes.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-classes.js) +- [parallel/test-crypto-des3-wrap.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-des3-wrap.js) +- [parallel/test-crypto-dh-constructor.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-dh-constructor.js) +- [parallel/test-crypto-dh-curves.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-dh-curves.js) +- [parallel/test-crypto-dh-generate-keys.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-dh-generate-keys.js) +- [parallel/test-crypto-dh-group-setters.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-dh-group-setters.js) +- [parallel/test-crypto-dh-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-dh-leak.js) +- [parallel/test-crypto-dh-modp2-views.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-dh-modp2-views.js) +- [parallel/test-crypto-dh-modp2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-dh-modp2.js) +- [parallel/test-crypto-dh-padding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-dh-padding.js) +- [parallel/test-crypto-dh-stateless.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-dh-stateless.js) +- [parallel/test-crypto-domains.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-domains.js) +- [parallel/test-crypto-ecb.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-ecb.js) +- [parallel/test-crypto-ecdh-convert-key.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-ecdh-convert-key.js) +- [parallel/test-crypto-encoding-validation-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-encoding-validation-error.js) +- [parallel/test-crypto-fips.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-fips.js) +- [parallel/test-crypto-getcipherinfo.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-getcipherinfo.js) +- [parallel/test-crypto-hash-stream-pipe.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-hash-stream-pipe.js) +- [parallel/test-crypto-key-objects-messageport.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-key-objects-messageport.js) +- [parallel/test-crypto-key-objects.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-key-objects.js) +- [parallel/test-crypto-keygen-async-dsa-key-object.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-async-dsa-key-object.js) +- [parallel/test-crypto-keygen-async-dsa.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-async-dsa.js) +- [parallel/test-crypto-keygen-async-elliptic-curve-jwk-ec.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-async-elliptic-curve-jwk-ec.js) +- [parallel/test-crypto-keygen-async-elliptic-curve-jwk-rsa.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-async-elliptic-curve-jwk-rsa.js) +- [parallel/test-crypto-keygen-async-elliptic-curve-jwk.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-async-elliptic-curve-jwk.js) +- [parallel/test-crypto-keygen-async-encrypted-private-key-der.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-async-encrypted-private-key-der.js) +- [parallel/test-crypto-keygen-async-encrypted-private-key.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-async-encrypted-private-key.js) +- [parallel/test-crypto-keygen-async-explicit-elliptic-curve-encrypted-p256.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-async-explicit-elliptic-curve-encrypted-p256.js) +- [parallel/test-crypto-keygen-async-explicit-elliptic-curve-encrypted.js.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-async-explicit-elliptic-curve-encrypted.js.js) +- [parallel/test-crypto-keygen-async-explicit-elliptic-curve.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-async-explicit-elliptic-curve.js) +- [parallel/test-crypto-keygen-async-named-elliptic-curve-encrypted-p256.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-async-named-elliptic-curve-encrypted-p256.js) +- [parallel/test-crypto-keygen-async-named-elliptic-curve-encrypted.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-async-named-elliptic-curve-encrypted.js) +- [parallel/test-crypto-keygen-async-named-elliptic-curve.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-async-named-elliptic-curve.js) +- [parallel/test-crypto-keygen-async-rsa.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-async-rsa.js) +- [parallel/test-crypto-keygen-bit-length.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-bit-length.js) +- [parallel/test-crypto-keygen-deprecation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-deprecation.js) +- [parallel/test-crypto-keygen-eddsa.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-eddsa.js) +- [parallel/test-crypto-keygen-empty-passphrase-no-prompt.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-empty-passphrase-no-prompt.js) +- [parallel/test-crypto-keygen-invalid-parameter-encoding-dsa.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-invalid-parameter-encoding-dsa.js) +- [parallel/test-crypto-keygen-invalid-parameter-encoding-ec.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-invalid-parameter-encoding-ec.js) +- [parallel/test-crypto-keygen-key-object-without-encoding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-key-object-without-encoding.js) +- [parallel/test-crypto-keygen-no-rsassa-pss-params.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-no-rsassa-pss-params.js) +- [parallel/test-crypto-keygen-promisify.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-promisify.js) +- [parallel/test-crypto-keygen-rsa-pss.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-rsa-pss.js) +- [parallel/test-crypto-keygen-sync.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen-sync.js) +- [parallel/test-crypto-keygen.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-keygen.js) +- [parallel/test-crypto-padding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-padding.js) +- [parallel/test-crypto-private-decrypt-gh32240.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-private-decrypt-gh32240.js) +- [parallel/test-crypto-random.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-random.js) +- [parallel/test-crypto-randomuuid.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-randomuuid.js) +- [parallel/test-crypto-rsa-dsa-revert.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-rsa-dsa-revert.js) +- [parallel/test-crypto-rsa-dsa.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-rsa-dsa.js) +- [parallel/test-crypto-secure-heap.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-secure-heap.js) +- [parallel/test-crypto-sign-verify.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-sign-verify.js) +- [parallel/test-crypto-verify-failure.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-verify-failure.js) +- [parallel/test-crypto-webcrypto-aes-decrypt-tag-too-small.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-webcrypto-aes-decrypt-tag-too-small.js) +- [parallel/test-crypto-worker-thread.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto-worker-thread.js) +- [parallel/test-crypto.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-crypto.js) +- [parallel/test-cwd-enoent-preload.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cwd-enoent-preload.js) +- [parallel/test-cwd-enoent-repl.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cwd-enoent-repl.js) +- [parallel/test-cwd-enoent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-cwd-enoent.js) +- [parallel/test-datetime-change-notify.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-datetime-change-notify.js) +- [parallel/test-debugger-backtrace.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-backtrace.js) +- [parallel/test-debugger-break.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-break.js) +- [parallel/test-debugger-breakpoint-exists.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-breakpoint-exists.js) +- [parallel/test-debugger-clear-breakpoints.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-clear-breakpoints.js) +- [parallel/test-debugger-exceptions.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-exceptions.js) +- [parallel/test-debugger-exec.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-exec.js) +- [parallel/test-debugger-heap-profiler.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-heap-profiler.js) +- [parallel/test-debugger-list.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-list.js) +- [parallel/test-debugger-low-level.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-low-level.js) +- [parallel/test-debugger-object-type-remote-object.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-object-type-remote-object.js) +- [parallel/test-debugger-pid.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-pid.js) +- [parallel/test-debugger-preserve-breaks.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-preserve-breaks.js) +- [parallel/test-debugger-profile-command.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-profile-command.js) +- [parallel/test-debugger-profile.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-profile.js) +- [parallel/test-debugger-random-port-with-inspect-port.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-random-port-with-inspect-port.js) +- [parallel/test-debugger-random-port.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-random-port.js) +- [parallel/test-debugger-repeat-last.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-repeat-last.js) +- [parallel/test-debugger-restart-message.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-restart-message.js) +- [parallel/test-debugger-run-after-quit-restart.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-run-after-quit-restart.js) +- [parallel/test-debugger-sb-before-load.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-sb-before-load.js) +- [parallel/test-debugger-scripts.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-scripts.js) +- [parallel/test-debugger-unavailable-port.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-unavailable-port.js) +- [parallel/test-debugger-use-strict.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-use-strict.js) +- [parallel/test-debugger-watch-validation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-watch-validation.js) +- [parallel/test-debugger-websocket-secret-mismatch.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-debugger-websocket-secret-mismatch.js) +- [parallel/test-delayed-require.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-delayed-require.js) +- [parallel/test-dgram-abort-closed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-abort-closed.js) +- [parallel/test-dgram-bind-fd-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-bind-fd-error.js) +- [parallel/test-dgram-bind-fd.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-bind-fd.js) +- [parallel/test-dgram-cluster-bind-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-cluster-bind-error.js) +- [parallel/test-dgram-cluster-close-during-bind.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-cluster-close-during-bind.js) +- [parallel/test-dgram-cluster-close-in-listening.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-cluster-close-in-listening.js) +- [parallel/test-dgram-connect-send-empty-packet.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-connect-send-empty-packet.js) +- [parallel/test-dgram-create-socket-handle-fd.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-create-socket-handle-fd.js) +- [parallel/test-dgram-create-socket-handle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-create-socket-handle.js) +- [parallel/test-dgram-deprecation-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-deprecation-error.js) +- [parallel/test-dgram-exclusive-implicit-bind.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-exclusive-implicit-bind.js) +- [parallel/test-dgram-membership.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-membership.js) +- [parallel/test-dgram-multicast-loopback.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-multicast-loopback.js) +- [parallel/test-dgram-multicast-set-interface.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-multicast-set-interface.js) +- [parallel/test-dgram-multicast-setTTL.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-multicast-setTTL.js) +- [parallel/test-dgram-send-address-types.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-send-address-types.js) +- [parallel/test-dgram-send-queue-info.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-send-queue-info.js) +- [parallel/test-dgram-sendto.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-sendto.js) +- [parallel/test-dgram-setBroadcast.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-setBroadcast.js) +- [parallel/test-dgram-setTTL.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-setTTL.js) +- [parallel/test-dgram-udp6-link-local-address.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-udp6-link-local-address.js) +- [parallel/test-dgram-unref-in-cluster.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dgram-unref-in-cluster.js) +- [parallel/test-diagnostics-channel-http-server-start.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-diagnostics-channel-http-server-start.js) +- [parallel/test-diagnostics-channel-http.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-diagnostics-channel-http.js) +- [parallel/test-diagnostics-channel-memory-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-diagnostics-channel-memory-leak.js) +- [parallel/test-diagnostics-channel-process.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-diagnostics-channel-process.js) +- [parallel/test-diagnostics-channel-worker-threads.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-diagnostics-channel-worker-threads.js) +- [parallel/test-directory-import.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-directory-import.js) +- [parallel/test-disable-proto-delete.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-disable-proto-delete.js) +- [parallel/test-disable-proto-throw.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-disable-proto-throw.js) +- [parallel/test-dns-cancel-reverse-lookup.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-cancel-reverse-lookup.js) +- [parallel/test-dns-channel-cancel-promise.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-channel-cancel-promise.js) +- [parallel/test-dns-channel-cancel.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-channel-cancel.js) +- [parallel/test-dns-channel-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-channel-timeout.js) +- [parallel/test-dns-default-verbatim-false.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-default-verbatim-false.js) +- [parallel/test-dns-default-verbatim-true.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-default-verbatim-true.js) +- [parallel/test-dns-get-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-get-server.js) +- [parallel/test-dns-lookup-promises-options-deprecated.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-lookup-promises-options-deprecated.js) +- [parallel/test-dns-lookup-promises.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-lookup-promises.js) +- [parallel/test-dns-lookupService-promises.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-lookupService-promises.js) +- [parallel/test-dns-lookupService.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-lookupService.js) +- [parallel/test-dns-perf_hooks.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-perf_hooks.js) +- [parallel/test-dns-resolve-promises.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-resolve-promises.js) +- [parallel/test-dns-resolveany-bad-ancount.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-resolveany-bad-ancount.js) +- [parallel/test-dns-set-default-order.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-set-default-order.js) +- [parallel/test-dns-setlocaladdress.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-setlocaladdress.js) +- [parallel/test-dns-setserver-when-querying.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dns-setserver-when-querying.js) +- [parallel/test-domain-abort-on-uncaught.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-abort-on-uncaught.js) +- [parallel/test-domain-add-remove.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-add-remove.js) +- [parallel/test-domain-async-id-map-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-async-id-map-leak.js) +- [parallel/test-domain-bind-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-bind-timeout.js) +- [parallel/test-domain-dep0097.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-dep0097.js) +- [parallel/test-domain-ee-implicit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-ee-implicit.js) +- [parallel/test-domain-ee.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-ee.js) +- [parallel/test-domain-emit-error-handler-stack.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-emit-error-handler-stack.js) +- [parallel/test-domain-enter-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-enter-exit.js) +- [parallel/test-domain-error-types.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-error-types.js) +- [parallel/test-domain-from-timer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-from-timer.js) +- [parallel/test-domain-fs-enoent-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-fs-enoent-stream.js) +- [parallel/test-domain-http-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-http-server.js) +- [parallel/test-domain-implicit-binding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-implicit-binding.js) +- [parallel/test-domain-implicit-fs.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-implicit-fs.js) +- [parallel/test-domain-intercept.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-intercept.js) +- [parallel/test-domain-load-after-set-uncaught-exception-capture.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-load-after-set-uncaught-exception-capture.js) +- [parallel/test-domain-multi.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-multi.js) +- [parallel/test-domain-multiple-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-multiple-errors.js) +- [parallel/test-domain-nexttick.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-nexttick.js) +- [parallel/test-domain-no-error-handler-abort-on-uncaught-0.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-0.js) +- [parallel/test-domain-no-error-handler-abort-on-uncaught-1.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-1.js) +- [parallel/test-domain-no-error-handler-abort-on-uncaught-2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-2.js) +- [parallel/test-domain-no-error-handler-abort-on-uncaught-3.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-3.js) +- [parallel/test-domain-no-error-handler-abort-on-uncaught-4.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-4.js) +- [parallel/test-domain-no-error-handler-abort-on-uncaught-5.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-5.js) +- [parallel/test-domain-no-error-handler-abort-on-uncaught-6.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-6.js) +- [parallel/test-domain-no-error-handler-abort-on-uncaught-7.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-7.js) +- [parallel/test-domain-no-error-handler-abort-on-uncaught-8.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-8.js) +- [parallel/test-domain-no-error-handler-abort-on-uncaught-9.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-no-error-handler-abort-on-uncaught-9.js) +- [parallel/test-domain-promise.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-promise.js) +- [parallel/test-domain-run.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-run.js) +- [parallel/test-domain-safe-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-safe-exit.js) +- [parallel/test-domain-set-uncaught-exception-capture-after-load.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-set-uncaught-exception-capture-after-load.js) +- [parallel/test-domain-stack-empty-in-process-uncaughtexception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-stack-empty-in-process-uncaughtexception.js) +- [parallel/test-domain-throw-error-then-throw-from-uncaught-exception-handler.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-throw-error-then-throw-from-uncaught-exception-handler.js) +- [parallel/test-domain-thrown-error-handler-stack.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-thrown-error-handler-stack.js) +- [parallel/test-domain-timer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-timer.js) +- [parallel/test-domain-timers-uncaught-exception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-timers-uncaught-exception.js) +- [parallel/test-domain-timers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-timers.js) +- [parallel/test-domain-top-level-error-handler-throw.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-top-level-error-handler-throw.js) +- [parallel/test-domain-uncaught-exception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-uncaught-exception.js) +- [parallel/test-domain-vm-promise-isolation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-vm-promise-isolation.js) +- [parallel/test-domain-with-abort-on-uncaught-exception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domain-with-abort-on-uncaught-exception.js) +- [parallel/test-domexception-cause.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-domexception-cause.js) +- [parallel/test-dotenv-edge-cases.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dotenv-edge-cases.js) +- [parallel/test-dotenv-node-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dotenv-node-options.js) +- [parallel/test-dotenv.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dotenv.js) +- [parallel/test-double-tls-client.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-double-tls-client.js) +- [parallel/test-double-tls-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-double-tls-server.js) +- [parallel/test-dummy-stdio.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-dummy-stdio.js) +- [parallel/test-emit-after-uncaught-exception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-emit-after-uncaught-exception.js) +- [parallel/test-env-var-no-warnings.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-env-var-no-warnings.js) +- [parallel/test-err-name-deprecation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-err-name-deprecation.js) +- [parallel/test-error-format-list.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-error-format-list.js) +- [parallel/test-error-reporting.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-error-reporting.js) +- [parallel/test-error-serdes.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-error-serdes.js) +- [parallel/test-errors-systemerror-frozen-intrinsics.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-errors-systemerror-frozen-intrinsics.js) +- [parallel/test-errors-systemerror-stackTraceLimit-custom-setter.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-errors-systemerror-stackTraceLimit-custom-setter.js) +- [parallel/test-errors-systemerror-stackTraceLimit-deleted-and-Error-sealed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-errors-systemerror-stackTraceLimit-deleted-and-Error-sealed.js) +- [parallel/test-errors-systemerror-stackTraceLimit-deleted.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-errors-systemerror-stackTraceLimit-deleted.js) +- [parallel/test-errors-systemerror-stackTraceLimit-has-only-a-getter.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-errors-systemerror-stackTraceLimit-has-only-a-getter.js) +- [parallel/test-errors-systemerror-stackTraceLimit-not-writable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-errors-systemerror-stackTraceLimit-not-writable.js) +- [parallel/test-errors-systemerror.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-errors-systemerror.js) +- [parallel/test-eslint-alphabetize-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-alphabetize-errors.js) +- [parallel/test-eslint-async-iife-no-unused-result.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-async-iife-no-unused-result.js) +- [parallel/test-eslint-avoid-prototype-pollution.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-avoid-prototype-pollution.js) +- [parallel/test-eslint-crypto-check.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-crypto-check.js) +- [parallel/test-eslint-documented-deprecation-codes.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-documented-deprecation-codes.js) +- [parallel/test-eslint-documented-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-documented-errors.js) +- [parallel/test-eslint-duplicate-requires.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-duplicate-requires.js) +- [parallel/test-eslint-eslint-check.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-eslint-check.js) +- [parallel/test-eslint-inspector-check.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-inspector-check.js) +- [parallel/test-eslint-lowercase-name-for-primitive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-lowercase-name-for-primitive.js) +- [parallel/test-eslint-no-array-destructuring.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-no-array-destructuring.js) +- [parallel/test-eslint-no-unescaped-regexp-dot.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-no-unescaped-regexp-dot.js) +- [parallel/test-eslint-non-ascii-character.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-non-ascii-character.js) +- [parallel/test-eslint-prefer-assert-iferror.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-prefer-assert-iferror.js) +- [parallel/test-eslint-prefer-assert-methods.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-prefer-assert-methods.js) +- [parallel/test-eslint-prefer-common-mustnotcall.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-prefer-common-mustnotcall.js) +- [parallel/test-eslint-prefer-common-mustsucceed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-prefer-common-mustsucceed.js) +- [parallel/test-eslint-prefer-primordials.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-prefer-primordials.js) +- [parallel/test-eslint-prefer-proto.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-prefer-proto.js) +- [parallel/test-eslint-prefer-util-format-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-prefer-util-format-errors.js) +- [parallel/test-eslint-require-common-first.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-require-common-first.js) +- [parallel/test-eslint-required-modules.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eslint-required-modules.js) +- [parallel/test-eval-disallow-code-generation-from-strings.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eval-disallow-code-generation-from-strings.js) +- [parallel/test-event-target.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-event-target.js) +- [parallel/test-eventemitter-asyncresource.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eventemitter-asyncresource.js) +- [parallel/test-events-customevent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-events-customevent.js) +- [parallel/test-events-getmaxlisteners.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-events-getmaxlisteners.js) +- [parallel/test-events-listener-count-with-listener.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-events-listener-count-with-listener.js) +- [parallel/test-events-static-geteventlisteners.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-events-static-geteventlisteners.js) +- [parallel/test-eventtarget-memoryleakwarning.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eventtarget-memoryleakwarning.js) +- [parallel/test-eventtarget.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-eventtarget.js) +- [parallel/test-experimental-shared-value-conveyor.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-experimental-shared-value-conveyor.js) +- [parallel/test-file-validate-mode-flag.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-file-validate-mode-flag.js) +- [parallel/test-file.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-file.js) +- [parallel/test-filehandle-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-filehandle-close.js) +- [parallel/test-filehandle-readablestream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-filehandle-readablestream.js) +- [parallel/test-fixed-queue.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fixed-queue.js) +- [parallel/test-force-repl-with-eval.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-force-repl-with-eval.js) +- [parallel/test-force-repl.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-force-repl.js) +- [parallel/test-freelist.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-freelist.js) +- [parallel/test-freeze-intrinsics.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-freeze-intrinsics.js) +- [parallel/test-fs-append-file-flush.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-append-file-flush.js) +- [parallel/test-fs-assert-encoding-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-assert-encoding-error.js) +- [parallel/test-fs-buffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-buffer.js) +- [parallel/test-fs-close-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-close-errors.js) +- [parallel/test-fs-copyfile-respect-permissions.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-copyfile-respect-permissions.js) +- [parallel/test-fs-error-messages.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-error-messages.js) +- [parallel/test-fs-exists.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-exists.js) +- [parallel/test-fs-existssync-false.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-existssync-false.js) +- [parallel/test-fs-fchmod.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-fchmod.js) +- [parallel/test-fs-fchown.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-fchown.js) +- [parallel/test-fs-filehandle-use-after-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-filehandle-use-after-close.js) +- [parallel/test-fs-filehandle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-filehandle.js) +- [parallel/test-fs-fsync.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-fsync.js) +- [parallel/test-fs-lchmod.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-lchmod.js) +- [parallel/test-fs-link.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-link.js) +- [parallel/test-fs-make-callback.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-make-callback.js) +- [parallel/test-fs-makeStatsCallback.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-makeStatsCallback.js) +- [parallel/test-fs-mkdir-mode-mask.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-mkdir-mode-mask.js) +- [parallel/test-fs-mkdir-recursive-eaccess.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-mkdir-recursive-eaccess.js) +- [parallel/test-fs-mkdir-rmdir.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-mkdir-rmdir.js) +- [parallel/test-fs-mkdtemp-prefix-check.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-mkdtemp-prefix-check.js) +- [parallel/test-fs-mkdtemp.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-mkdtemp.js) +- [parallel/test-fs-null-bytes.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-null-bytes.js) +- [parallel/test-fs-options-immutable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-options-immutable.js) +- [parallel/test-fs-promises-file-handle-aggregate-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-aggregate-errors.js) +- [parallel/test-fs-promises-file-handle-append-file.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-append-file.js) +- [parallel/test-fs-promises-file-handle-chmod.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-chmod.js) +- [parallel/test-fs-promises-file-handle-close-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-close-errors.js) +- [parallel/test-fs-promises-file-handle-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-close.js) +- [parallel/test-fs-promises-file-handle-dispose.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-dispose.js) +- [parallel/test-fs-promises-file-handle-op-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-op-errors.js) +- [parallel/test-fs-promises-file-handle-read-worker.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-read-worker.js) +- [parallel/test-fs-promises-file-handle-read.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-read.js) +- [parallel/test-fs-promises-file-handle-readFile.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-readFile.js) +- [parallel/test-fs-promises-file-handle-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-stream.js) +- [parallel/test-fs-promises-file-handle-sync.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-sync.js) +- [parallel/test-fs-promises-file-handle-truncate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-truncate.js) +- [parallel/test-fs-promises-file-handle-writeFile.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-file-handle-writeFile.js) +- [parallel/test-fs-promises-readfile.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-readfile.js) +- [parallel/test-fs-promises-watch.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-watch.js) +- [parallel/test-fs-promises-write-optional-params.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-write-optional-params.js) +- [parallel/test-fs-promises-writefile-typedarray.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-writefile-typedarray.js) +- [parallel/test-fs-promises-writefile.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises-writefile.js) +- [parallel/test-fs-promises.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promises.js) +- [parallel/test-fs-promisified.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-promisified.js) +- [parallel/test-fs-read-empty-buffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-read-empty-buffer.js) +- [parallel/test-fs-read-file-assert-encoding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-read-file-assert-encoding.js) +- [parallel/test-fs-read-offset-null.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-read-offset-null.js) +- [parallel/test-fs-read-optional-params.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-read-optional-params.js) +- [parallel/test-fs-read-promises-optional-params.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-read-promises-optional-params.js) +- [parallel/test-fs-read-stream-err.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-read-stream-err.js) +- [parallel/test-fs-read-stream-file-handle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-read-stream-file-handle.js) +- [parallel/test-fs-readSync-optional-params.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-readSync-optional-params.js) +- [parallel/test-fs-readdir-buffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-readdir-buffer.js) +- [parallel/test-fs-readdir-types.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-readdir-types.js) +- [parallel/test-fs-readdir-ucs2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-readdir-ucs2.js) +- [parallel/test-fs-readfile-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-readfile-error.js) +- [parallel/test-fs-readfile-flags.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-readfile-flags.js) +- [parallel/test-fs-readfile-pipe-large.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-readfile-pipe-large.js) +- [parallel/test-fs-readfile-pipe.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-readfile-pipe.js) +- [parallel/test-fs-readfile.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-readfile.js) +- [parallel/test-fs-readfilesync-pipe-large.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-readfilesync-pipe-large.js) +- [parallel/test-fs-readlink-type-check.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-readlink-type-check.js) +- [parallel/test-fs-readv-promises.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-readv-promises.js) +- [parallel/test-fs-readv-promisify.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-readv-promisify.js) +- [parallel/test-fs-realpath-buffer-encoding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-realpath-buffer-encoding.js) +- [parallel/test-fs-realpath-on-substed-drive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-realpath-on-substed-drive.js) +- [parallel/test-fs-realpath-pipe.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-realpath-pipe.js) +- [parallel/test-fs-realpath.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-realpath.js) +- [parallel/test-fs-rename-type-check.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-rename-type-check.js) +- [parallel/test-fs-rm.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-rm.js) +- [parallel/test-fs-stat-bigint.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-stat-bigint.js) +- [parallel/test-fs-stat.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-stat.js) +- [parallel/test-fs-statfs.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-statfs.js) +- [parallel/test-fs-stream-construct-compat-error-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-stream-construct-compat-error-write.js) +- [parallel/test-fs-symlink-buffer-path.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-symlink-buffer-path.js) +- [parallel/test-fs-symlink-dir-junction.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-symlink-dir-junction.js) +- [parallel/test-fs-symlink-dir.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-symlink-dir.js) +- [parallel/test-fs-symlink-longpath.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-symlink-longpath.js) +- [parallel/test-fs-symlink.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-symlink.js) +- [parallel/test-fs-sync-fd-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-sync-fd-leak.js) +- [parallel/test-fs-syncwritestream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-syncwritestream.js) +- [parallel/test-fs-truncate-fd.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-truncate-fd.js) +- [parallel/test-fs-truncate-sync.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-truncate-sync.js) +- [parallel/test-fs-truncate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-truncate.js) +- [parallel/test-fs-unlink-type-check.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-unlink-type-check.js) +- [parallel/test-fs-utils-get-dirents.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-utils-get-dirents.js) +- [parallel/test-fs-watch-abort-signal.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-abort-signal.js) +- [parallel/test-fs-watch-close-when-destroyed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-close-when-destroyed.js) +- [parallel/test-fs-watch-encoding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-encoding.js) +- [parallel/test-fs-watch-enoent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-enoent.js) +- [parallel/test-fs-watch-recursive-add-file-to-existing-subfolder.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-recursive-add-file-to-existing-subfolder.js) +- [parallel/test-fs-watch-recursive-add-file-to-new-folder.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-recursive-add-file-to-new-folder.js) +- [parallel/test-fs-watch-recursive-assert-leaks.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-recursive-assert-leaks.js) +- [parallel/test-fs-watch-recursive-promise.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-recursive-promise.js) +- [parallel/test-fs-watch-recursive-symlink.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-recursive-symlink.js) +- [parallel/test-fs-watch-recursive-validate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-recursive-validate.js) +- [parallel/test-fs-watch-recursive-watch-file.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-recursive-watch-file.js) +- [parallel/test-fs-watch-ref-unref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-ref-unref.js) +- [parallel/test-fs-watch-stop-async.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-stop-async.js) +- [parallel/test-fs-watch-stop-sync.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch-stop-sync.js) +- [parallel/test-fs-watch.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watch.js) +- [parallel/test-fs-watchfile-bigint.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watchfile-bigint.js) +- [parallel/test-fs-watchfile-ref-unref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-watchfile-ref-unref.js) +- [parallel/test-fs-whatwg-url.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-whatwg-url.js) +- [parallel/test-fs-write-buffer-large.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-write-buffer-large.js) +- [parallel/test-fs-write-file-flush.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-write-file-flush.js) +- [parallel/test-fs-write-file-typedarrays.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-write-file-typedarrays.js) +- [parallel/test-fs-write-optional-params.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-write-optional-params.js) +- [parallel/test-fs-write-reuse-callback.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-write-reuse-callback.js) +- [parallel/test-fs-write-sigxfsz.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-write-sigxfsz.js) +- [parallel/test-fs-write-stream-change-open.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-write-stream-change-open.js) +- [parallel/test-fs-write-stream-err.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-write-stream-err.js) +- [parallel/test-fs-write-stream-file-handle-2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-write-stream-file-handle-2.js) +- [parallel/test-fs-write-stream-file-handle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-write-stream-file-handle.js) +- [parallel/test-fs-write-stream-flush.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-write-stream-flush.js) +- [parallel/test-fs-write-sync-optional-params.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-write-sync-optional-params.js) +- [parallel/test-fs-writefile-with-fd.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-writefile-with-fd.js) +- [parallel/test-fs-writev-promises.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-fs-writev-promises.js) +- [parallel/test-gc-http-client-connaborted.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-gc-http-client-connaborted.js) +- [parallel/test-gc-net-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-gc-net-timeout.js) +- [parallel/test-gc-tls-external-memory.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-gc-tls-external-memory.js) +- [parallel/test-global-console-exists.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-global-console-exists.js) +- [parallel/test-global-customevent-disabled.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-global-customevent-disabled.js) +- [parallel/test-global-customevent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-global-customevent.js) +- [parallel/test-global-setters.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-global-setters.js) +- [parallel/test-global-webcrypto-classes.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-global-webcrypto-classes.js) +- [parallel/test-global-webcrypto-disbled.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-global-webcrypto-disbled.js) +- [parallel/test-global.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-global.js) +- [parallel/test-h2-large-header-cause-client-to-hangup.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-h2-large-header-cause-client-to-hangup.js) +- [parallel/test-handle-wrap-hasref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-handle-wrap-hasref.js) +- [parallel/test-heap-prof-basic.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-heap-prof-basic.js) +- [parallel/test-heap-prof-dir-absolute.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-heap-prof-dir-absolute.js) +- [parallel/test-heap-prof-dir-name.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-heap-prof-dir-name.js) +- [parallel/test-heap-prof-dir-relative.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-heap-prof-dir-relative.js) +- [parallel/test-heap-prof-exec-argv.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-heap-prof-exec-argv.js) +- [parallel/test-heap-prof-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-heap-prof-exit.js) +- [parallel/test-heap-prof-interval.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-heap-prof-interval.js) +- [parallel/test-heap-prof-invalid-args.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-heap-prof-invalid-args.js) +- [parallel/test-heap-prof-loop-drained.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-heap-prof-loop-drained.js) +- [parallel/test-heap-prof-name.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-heap-prof-name.js) +- [parallel/test-heap-prof-sigint.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-heap-prof-sigint.js) +- [parallel/test-heapdump-async-hooks-init-promise.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-heapdump-async-hooks-init-promise.js) +- [parallel/test-heapsnapshot-near-heap-limit-by-api-in-worker.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-heapsnapshot-near-heap-limit-by-api-in-worker.js) +- [parallel/test-heapsnapshot-near-heap-limit-worker.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-heapsnapshot-near-heap-limit-worker.js) +- [parallel/test-http-1.0-keep-alive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-1.0-keep-alive.js) +- [parallel/test-http-1.0.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-1.0.js) +- [parallel/test-http-abort-client.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-abort-client.js) +- [parallel/test-http-abort-queued.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-abort-queued.js) +- [parallel/test-http-abort-stream-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-abort-stream-end.js) +- [parallel/test-http-aborted.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-aborted.js) +- [parallel/test-http-after-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-after-connect.js) +- [parallel/test-http-agent-abort-controller.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-abort-controller.js) +- [parallel/test-http-agent-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-close.js) +- [parallel/test-http-agent-destroyed-socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-destroyed-socket.js) +- [parallel/test-http-agent-domain-reused-gc.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-domain-reused-gc.js) +- [parallel/test-http-agent-error-on-idle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-error-on-idle.js) +- [parallel/test-http-agent-false.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-false.js) +- [parallel/test-http-agent-keepalive-delay.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-keepalive-delay.js) +- [parallel/test-http-agent-keepalive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-keepalive.js) +- [parallel/test-http-agent-maxsockets-respected.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-maxsockets-respected.js) +- [parallel/test-http-agent-maxsockets.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-maxsockets.js) +- [parallel/test-http-agent-remove.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-remove.js) +- [parallel/test-http-agent-reuse-drained-socket-only.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-reuse-drained-socket-only.js) +- [parallel/test-http-agent-scheduling.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-scheduling.js) +- [parallel/test-http-agent-timeout-option.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-timeout-option.js) +- [parallel/test-http-agent-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-timeout.js) +- [parallel/test-http-agent-uninitialized-with-handle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-uninitialized-with-handle.js) +- [parallel/test-http-agent-uninitialized.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent-uninitialized.js) +- [parallel/test-http-agent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-agent.js) +- [parallel/test-http-allow-content-length-304.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-allow-content-length-304.js) +- [parallel/test-http-automatic-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-automatic-headers.js) +- [parallel/test-http-autoselectfamily.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-autoselectfamily.js) +- [parallel/test-http-blank-header.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-blank-header.js) +- [parallel/test-http-byteswritten.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-byteswritten.js) +- [parallel/test-http-catch-uncaughtexception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-catch-uncaughtexception.js) +- [parallel/test-http-chunk-extensions-limit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-chunk-extensions-limit.js) +- [parallel/test-http-chunk-problem.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-chunk-problem.js) +- [parallel/test-http-chunked-304.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-chunked-304.js) +- [parallel/test-http-client-abort-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-abort-destroy.js) +- [parallel/test-http-client-abort-event.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-abort-event.js) +- [parallel/test-http-client-abort-keep-alive-destroy-res.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-abort-keep-alive-destroy-res.js) +- [parallel/test-http-client-abort-keep-alive-queued-tcp-socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-abort-keep-alive-queued-tcp-socket.js) +- [parallel/test-http-client-abort-keep-alive-queued-unix-socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-abort-keep-alive-queued-unix-socket.js) +- [parallel/test-http-client-abort-no-agent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-abort-no-agent.js) +- [parallel/test-http-client-abort-response-event.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-abort-response-event.js) +- [parallel/test-http-client-abort-unix-socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-abort-unix-socket.js) +- [parallel/test-http-client-abort.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-abort.js) +- [parallel/test-http-client-abort3.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-abort3.js) +- [parallel/test-http-client-aborted-event.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-aborted-event.js) +- [parallel/test-http-client-agent-abort-close-event.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-agent-abort-close-event.js) +- [parallel/test-http-client-agent-end-close-event.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-agent-end-close-event.js) +- [parallel/test-http-client-agent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-agent.js) +- [parallel/test-http-client-close-event.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-close-event.js) +- [parallel/test-http-client-error-rawbytes.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-error-rawbytes.js) +- [parallel/test-http-client-finished.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-finished.js) +- [parallel/test-http-client-headers-host-array.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-headers-host-array.js) +- [parallel/test-http-client-immediate-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-immediate-error.js) +- [parallel/test-http-client-incomingmessage-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-incomingmessage-destroy.js) +- [parallel/test-http-client-keep-alive-release-before-finish.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-keep-alive-release-before-finish.js) +- [parallel/test-http-client-override-global-agent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-override-global-agent.js) +- [parallel/test-http-client-parse-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-parse-error.js) +- [parallel/test-http-client-pipe-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-pipe-end.js) +- [parallel/test-http-client-readable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-readable.js) +- [parallel/test-http-client-reject-chunked-with-content-length.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-reject-chunked-with-content-length.js) +- [parallel/test-http-client-reject-cr-no-lf.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-reject-cr-no-lf.js) +- [parallel/test-http-client-req-error-dont-double-fire.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-req-error-dont-double-fire.js) +- [parallel/test-http-client-request-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-request-options.js) +- [parallel/test-http-client-res-destroyed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-res-destroyed.js) +- [parallel/test-http-client-response-domain.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-response-domain.js) +- [parallel/test-http-client-response-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-response-timeout.js) +- [parallel/test-http-client-set-timeout-after-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-set-timeout-after-end.js) +- [parallel/test-http-client-set-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-set-timeout.js) +- [parallel/test-http-client-spurious-aborted.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-spurious-aborted.js) +- [parallel/test-http-client-timeout-agent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-timeout-agent.js) +- [parallel/test-http-client-timeout-connect-listener.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-timeout-connect-listener.js) +- [parallel/test-http-client-timeout-event.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-timeout-event.js) +- [parallel/test-http-client-timeout-on-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-timeout-on-connect.js) +- [parallel/test-http-client-timeout-option-listeners.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-timeout-option-listeners.js) +- [parallel/test-http-client-timeout-option-with-agent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-timeout-option-with-agent.js) +- [parallel/test-http-client-timeout-option.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-timeout-option.js) +- [parallel/test-http-client-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-client-timeout.js) +- [parallel/test-http-conn-reset.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-conn-reset.js) +- [parallel/test-http-connect-req-res.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-connect-req-res.js) +- [parallel/test-http-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-connect.js) +- [parallel/test-http-content-length-mismatch.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-content-length-mismatch.js) +- [parallel/test-http-content-length.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-content-length.js) +- [parallel/test-http-createConnection.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-createConnection.js) +- [parallel/test-http-debug.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-debug.js) +- [parallel/test-http-default-port.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-default-port.js) +- [parallel/test-http-destroyed-socket-write2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-destroyed-socket-write2.js) +- [parallel/test-http-dns-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-dns-error.js) +- [parallel/test-http-double-content-length.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-double-content-length.js) +- [parallel/test-http-dump-req-when-res-ends.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-dump-req-when-res-ends.js) +- [parallel/test-http-early-hints-invalid-argument.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-early-hints-invalid-argument.js) +- [parallel/test-http-early-hints.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-early-hints.js) +- [parallel/test-http-exceptions.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-exceptions.js) +- [parallel/test-http-expect-continue.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-expect-continue.js) +- [parallel/test-http-expect-handling.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-expect-handling.js) +- [parallel/test-http-flush-response-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-flush-response-headers.js) +- [parallel/test-http-generic-streams.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-generic-streams.js) +- [parallel/test-http-get-pipeline-problem.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-get-pipeline-problem.js) +- [parallel/test-http-header-badrequest.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-header-badrequest.js) +- [parallel/test-http-header-overflow.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-header-overflow.js) +- [parallel/test-http-host-header-ipv6-fail.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-host-header-ipv6-fail.js) +- [parallel/test-http-hostname-typechecking.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-hostname-typechecking.js) +- [parallel/test-http-incoming-matchKnownFields.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-incoming-matchKnownFields.js) +- [parallel/test-http-incoming-message-connection-setter.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-incoming-message-connection-setter.js) +- [parallel/test-http-incoming-message-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-incoming-message-options.js) +- [parallel/test-http-incoming-pipelined-socket-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-incoming-pipelined-socket-destroy.js) +- [parallel/test-http-information-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-information-headers.js) +- [parallel/test-http-information-processing.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-information-processing.js) +- [parallel/test-http-insecure-parser-per-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-insecure-parser-per-stream.js) +- [parallel/test-http-insecure-parser.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-insecure-parser.js) +- [parallel/test-http-invalid-te.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-invalid-te.js) +- [parallel/test-http-invalid-urls.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-invalid-urls.js) +- [parallel/test-http-keep-alive-close-on-header.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-keep-alive-close-on-header.js) +- [parallel/test-http-keep-alive-drop-requests.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-keep-alive-drop-requests.js) +- [parallel/test-http-keep-alive-max-requests.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-keep-alive-max-requests.js) +- [parallel/test-http-keep-alive-pipeline-max-requests.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-keep-alive-pipeline-max-requests.js) +- [parallel/test-http-keep-alive-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-keep-alive-timeout.js) +- [parallel/test-http-keep-alive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-keep-alive.js) +- [parallel/test-http-keepalive-client.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-keepalive-client.js) +- [parallel/test-http-keepalive-free.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-keepalive-free.js) +- [parallel/test-http-keepalive-override.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-keepalive-override.js) +- [parallel/test-http-keepalive-request.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-keepalive-request.js) +- [parallel/test-http-malformed-request.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-malformed-request.js) +- [parallel/test-http-many-ended-pipelines.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-many-ended-pipelines.js) +- [parallel/test-http-max-header-size-per-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-max-header-size-per-stream.js) +- [parallel/test-http-max-header-size.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-max-header-size.js) +- [parallel/test-http-max-headers-count.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-max-headers-count.js) +- [parallel/test-http-max-http-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-max-http-headers.js) +- [parallel/test-http-missing-header-separator-cr.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-missing-header-separator-cr.js) +- [parallel/test-http-missing-header-separator-lf.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-missing-header-separator-lf.js) +- [parallel/test-http-multi-line-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-multi-line-headers.js) +- [parallel/test-http-multiple-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-multiple-headers.js) +- [parallel/test-http-mutable-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-mutable-headers.js) +- [parallel/test-http-no-content-length.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-no-content-length.js) +- [parallel/test-http-no-read-no-dump.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-no-read-no-dump.js) +- [parallel/test-http-nodelay.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-nodelay.js) +- [parallel/test-http-outgoing-buffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-outgoing-buffer.js) +- [parallel/test-http-outgoing-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-outgoing-destroy.js) +- [parallel/test-http-outgoing-destroyed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-outgoing-destroyed.js) +- [parallel/test-http-outgoing-end-cork.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-outgoing-end-cork.js) +- [parallel/test-http-outgoing-end-multiple.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-outgoing-end-multiple.js) +- [parallel/test-http-outgoing-finish-writable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-outgoing-finish-writable.js) +- [parallel/test-http-outgoing-finish.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-outgoing-finish.js) +- [parallel/test-http-outgoing-first-chunk-singlebyte-encoding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-outgoing-first-chunk-singlebyte-encoding.js) +- [parallel/test-http-outgoing-message-capture-rejection.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-outgoing-message-capture-rejection.js) +- [parallel/test-http-outgoing-message-inheritance.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-outgoing-message-inheritance.js) +- [parallel/test-http-outgoing-message-write-callback.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-outgoing-message-write-callback.js) +- [parallel/test-http-outgoing-properties.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-outgoing-properties.js) +- [parallel/test-http-outgoing-proto.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-outgoing-proto.js) +- [parallel/test-http-outgoing-writableFinished.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-outgoing-writableFinished.js) +- [parallel/test-http-parser-bad-ref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-parser-bad-ref.js) +- [parallel/test-http-parser-finish-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-parser-finish-error.js) +- [parallel/test-http-parser-freed-before-upgrade.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-parser-freed-before-upgrade.js) +- [parallel/test-http-parser-lazy-loaded.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-parser-lazy-loaded.js) +- [parallel/test-http-parser-memory-retention.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-parser-memory-retention.js) +- [parallel/test-http-parser-multiple-execute.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-parser-multiple-execute.js) +- [parallel/test-http-parser-timeout-reset.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-parser-timeout-reset.js) +- [parallel/test-http-parser.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-parser.js) +- [parallel/test-http-perf_hooks.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-perf_hooks.js) +- [parallel/test-http-pipeline-assertionerror-finish.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-pipeline-assertionerror-finish.js) +- [parallel/test-http-pipeline-flood.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-pipeline-flood.js) +- [parallel/test-http-pipeline-socket-parser-typeerror.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-pipeline-socket-parser-typeerror.js) +- [parallel/test-http-raw-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-raw-headers.js) +- [parallel/test-http-remove-connection-header-persists-connection.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-remove-connection-header-persists-connection.js) +- [parallel/test-http-remove-header-stays-removed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-remove-header-stays-removed.js) +- [parallel/test-http-req-close-robust-from-tampering.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-req-close-robust-from-tampering.js) +- [parallel/test-http-req-res-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-req-res-close.js) +- [parallel/test-http-request-agent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-request-agent.js) +- [parallel/test-http-request-host-header.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-request-host-header.js) +- [parallel/test-http-request-join-authorization-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-request-join-authorization-headers.js) +- [parallel/test-http-request-smuggling-content-length.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-request-smuggling-content-length.js) +- [parallel/test-http-res-write-after-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-res-write-after-end.js) +- [parallel/test-http-response-add-header-after-sent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-response-add-header-after-sent.js) +- [parallel/test-http-response-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-response-close.js) +- [parallel/test-http-response-cork.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-response-cork.js) +- [parallel/test-http-response-multi-content-length.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-response-multi-content-length.js) +- [parallel/test-http-response-no-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-response-no-headers.js) +- [parallel/test-http-response-remove-header-after-sent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-response-remove-header-after-sent.js) +- [parallel/test-http-response-setheaders.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-response-setheaders.js) +- [parallel/test-http-response-splitting.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-response-splitting.js) +- [parallel/test-http-response-status-message.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-response-status-message.js) +- [parallel/test-http-response-statuscode.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-response-statuscode.js) +- [parallel/test-http-same-map.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-same-map.js) +- [parallel/test-http-server-async-dispose.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-async-dispose.js) +- [parallel/test-http-server-capture-rejections.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-capture-rejections.js) +- [parallel/test-http-server-client-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-client-error.js) +- [parallel/test-http-server-close-all.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-close-all.js) +- [parallel/test-http-server-close-destroy-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-close-destroy-timeout.js) +- [parallel/test-http-server-close-idle-wait-response.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-close-idle-wait-response.js) +- [parallel/test-http-server-close-idle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-close-idle.js) +- [parallel/test-http-server-connection-list-when-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-connection-list-when-close.js) +- [parallel/test-http-server-connections-checking-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-connections-checking-leak.js) +- [parallel/test-http-server-consumed-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-consumed-timeout.js) +- [parallel/test-http-server-de-chunked-trailer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-de-chunked-trailer.js) +- [parallel/test-http-server-destroy-socket-on-client-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-destroy-socket-on-client-error.js) +- [parallel/test-http-server-headers-timeout-delayed-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-headers-timeout-delayed-headers.js) +- [parallel/test-http-server-headers-timeout-interrupted-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-headers-timeout-interrupted-headers.js) +- [parallel/test-http-server-headers-timeout-keepalive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-headers-timeout-keepalive.js) +- [parallel/test-http-server-headers-timeout-pipelining.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-headers-timeout-pipelining.js) +- [parallel/test-http-server-incomingmessage-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-incomingmessage-destroy.js) +- [parallel/test-http-server-keep-alive-defaults.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-keep-alive-defaults.js) +- [parallel/test-http-server-keep-alive-max-requests-null.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-keep-alive-max-requests-null.js) +- [parallel/test-http-server-keep-alive-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-keep-alive-timeout.js) +- [parallel/test-http-server-keepalive-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-keepalive-end.js) +- [parallel/test-http-server-keepalive-req-gc.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-keepalive-req-gc.js) +- [parallel/test-http-server-multiheaders.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-multiheaders.js) +- [parallel/test-http-server-multiheaders2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-multiheaders2.js) +- [parallel/test-http-server-non-utf8-header.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-non-utf8-header.js) +- [parallel/test-http-server-options-highwatermark.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-options-highwatermark.js) +- [parallel/test-http-server-options-incoming-message.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-options-incoming-message.js) +- [parallel/test-http-server-options-server-response.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-options-server-response.js) +- [parallel/test-http-server-reject-chunked-with-content-length.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-reject-chunked-with-content-length.js) +- [parallel/test-http-server-reject-cr-no-lf.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-reject-cr-no-lf.js) +- [parallel/test-http-server-request-timeout-delayed-body.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-request-timeout-delayed-body.js) +- [parallel/test-http-server-request-timeout-delayed-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-request-timeout-delayed-headers.js) +- [parallel/test-http-server-request-timeout-interrupted-body.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-request-timeout-interrupted-body.js) +- [parallel/test-http-server-request-timeout-interrupted-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-request-timeout-interrupted-headers.js) +- [parallel/test-http-server-request-timeout-keepalive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-request-timeout-keepalive.js) +- [parallel/test-http-server-request-timeout-pipelining.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-request-timeout-pipelining.js) +- [parallel/test-http-server-request-timeout-upgrade.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-request-timeout-upgrade.js) +- [parallel/test-http-server-request-timeouts-mixed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-request-timeouts-mixed.js) +- [parallel/test-http-server-response-standalone.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-response-standalone.js) +- [parallel/test-http-server-stale-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-stale-close.js) +- [parallel/test-http-server-timeouts-validation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-timeouts-validation.js) +- [parallel/test-http-server-unconsume-consume.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-unconsume-consume.js) +- [parallel/test-http-server-unconsume.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server-unconsume.js) +- [parallel/test-http-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-server.js) +- [parallel/test-http-set-max-idle-http-parser.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-set-max-idle-http-parser.js) +- [parallel/test-http-set-timeout-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-set-timeout-server.js) +- [parallel/test-http-set-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-set-timeout.js) +- [parallel/test-http-set-trailers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-set-trailers.js) +- [parallel/test-http-should-keep-alive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-should-keep-alive.js) +- [parallel/test-http-socket-encoding-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-socket-encoding-error.js) +- [parallel/test-http-socket-error-listeners.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-socket-error-listeners.js) +- [parallel/test-http-status-message.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-status-message.js) +- [parallel/test-http-sync-write-error-during-continue.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-sync-write-error-during-continue.js) +- [parallel/test-http-timeout-client-warning.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-timeout-client-warning.js) +- [parallel/test-http-timeout-overflow.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-timeout-overflow.js) +- [parallel/test-http-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-timeout.js) +- [parallel/test-http-transfer-encoding-repeated-chunked.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-transfer-encoding-repeated-chunked.js) +- [parallel/test-http-transfer-encoding-smuggling.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-transfer-encoding-smuggling.js) +- [parallel/test-http-unix-socket-keep-alive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-unix-socket-keep-alive.js) +- [parallel/test-http-unix-socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-unix-socket.js) +- [parallel/test-http-upgrade-advertise.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-upgrade-advertise.js) +- [parallel/test-http-upgrade-agent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-upgrade-agent.js) +- [parallel/test-http-upgrade-binary.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-upgrade-binary.js) +- [parallel/test-http-upgrade-client.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-upgrade-client.js) +- [parallel/test-http-upgrade-client2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-upgrade-client2.js) +- [parallel/test-http-upgrade-reconsume-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-upgrade-reconsume-stream.js) +- [parallel/test-http-upgrade-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-upgrade-server.js) +- [parallel/test-http-upgrade-server2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-upgrade-server2.js) +- [parallel/test-http-url.parse-auth-with-header-in-request.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-url.parse-auth-with-header-in-request.js) +- [parallel/test-http-writable-true-after-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-writable-true-after-close.js) +- [parallel/test-http-write-callbacks.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-write-callbacks.js) +- [parallel/test-http-write-head-2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-write-head-2.js) +- [parallel/test-http-write-head.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-write-head.js) +- [parallel/test-http-zero-length-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http-zero-length-write.js) +- [parallel/test-http.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http.js) +- [parallel/test-http2-altsvc.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-altsvc.js) +- [parallel/test-http2-autoselect-protocol.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-autoselect-protocol.js) +- [parallel/test-http2-backpressure.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-backpressure.js) +- [parallel/test-http2-binding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-binding.js) +- [parallel/test-http2-buffersize.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-buffersize.js) +- [parallel/test-http2-byteswritten-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-byteswritten-server.js) +- [parallel/test-http2-cancel-while-client-reading.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-cancel-while-client-reading.js) +- [parallel/test-http2-capture-rejection.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-capture-rejection.js) +- [parallel/test-http2-clean-output.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-clean-output.js) +- [parallel/test-http2-client-connection-tunnelling.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-connection-tunnelling.js) +- [parallel/test-http2-client-data-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-data-end.js) +- [parallel/test-http2-client-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-destroy.js) +- [parallel/test-http2-client-http1-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-http1-server.js) +- [parallel/test-http2-client-jsstream-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-jsstream-destroy.js) +- [parallel/test-http2-client-onconnect-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-onconnect-errors.js) +- [parallel/test-http2-client-port-80.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-port-80.js) +- [parallel/test-http2-client-priority-before-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-priority-before-connect.js) +- [parallel/test-http2-client-promisify-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-promisify-connect.js) +- [parallel/test-http2-client-request-options-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-request-options-errors.js) +- [parallel/test-http2-client-rststream-before-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-rststream-before-connect.js) +- [parallel/test-http2-client-set-priority.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-set-priority.js) +- [parallel/test-http2-client-setLocalWindowSize.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-setLocalWindowSize.js) +- [parallel/test-http2-client-setNextStreamID-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-setNextStreamID-errors.js) +- [parallel/test-http2-client-settings-before-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-settings-before-connect.js) +- [parallel/test-http2-client-shutdown-before-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-shutdown-before-connect.js) +- [parallel/test-http2-client-socket-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-socket-destroy.js) +- [parallel/test-http2-client-stream-destroy-before-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-stream-destroy-before-connect.js) +- [parallel/test-http2-client-unescaped-path.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-unescaped-path.js) +- [parallel/test-http2-client-upload-reject.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-upload-reject.js) +- [parallel/test-http2-client-upload.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-upload.js) +- [parallel/test-http2-client-write-before-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-write-before-connect.js) +- [parallel/test-http2-client-write-empty-string.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-client-write-empty-string.js) +- [parallel/test-http2-close-while-writing.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-close-while-writing.js) +- [parallel/test-http2-compat-aborted.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-aborted.js) +- [parallel/test-http2-compat-client-upload-reject.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-client-upload-reject.js) +- [parallel/test-http2-compat-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-errors.js) +- [parallel/test-http2-compat-expect-continue-check.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-expect-continue-check.js) +- [parallel/test-http2-compat-expect-continue.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-expect-continue.js) +- [parallel/test-http2-compat-method-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-method-connect.js) +- [parallel/test-http2-compat-serverrequest-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverrequest-end.js) +- [parallel/test-http2-compat-serverrequest-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverrequest-headers.js) +- [parallel/test-http2-compat-serverrequest-host.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverrequest-host.js) +- [parallel/test-http2-compat-serverrequest-pause.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverrequest-pause.js) +- [parallel/test-http2-compat-serverrequest-pipe.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverrequest-pipe.js) +- [parallel/test-http2-compat-serverrequest-settimeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverrequest-settimeout.js) +- [parallel/test-http2-compat-serverrequest-trailers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverrequest-trailers.js) +- [parallel/test-http2-compat-serverrequest.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverrequest.js) +- [parallel/test-http2-compat-serverresponse-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-close.js) +- [parallel/test-http2-compat-serverresponse-createpushresponse.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-createpushresponse.js) +- [parallel/test-http2-compat-serverresponse-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-destroy.js) +- [parallel/test-http2-compat-serverresponse-drain.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-drain.js) +- [parallel/test-http2-compat-serverresponse-end-after-statuses-without-body.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-end-after-statuses-without-body.js) +- [parallel/test-http2-compat-serverresponse-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-end.js) +- [parallel/test-http2-compat-serverresponse-finished.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-finished.js) +- [parallel/test-http2-compat-serverresponse-flushheaders.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-flushheaders.js) +- [parallel/test-http2-compat-serverresponse-headers-after-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-headers-after-destroy.js) +- [parallel/test-http2-compat-serverresponse-headers-send-date.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-headers-send-date.js) +- [parallel/test-http2-compat-serverresponse-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-headers.js) +- [parallel/test-http2-compat-serverresponse-settimeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-settimeout.js) +- [parallel/test-http2-compat-serverresponse-statuscode.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-statuscode.js) +- [parallel/test-http2-compat-serverresponse-statusmessage-property-set.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-statusmessage-property-set.js) +- [parallel/test-http2-compat-serverresponse-statusmessage-property.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-statusmessage-property.js) +- [parallel/test-http2-compat-serverresponse-statusmessage.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-statusmessage.js) +- [parallel/test-http2-compat-serverresponse-trailers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-trailers.js) +- [parallel/test-http2-compat-serverresponse-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-write.js) +- [parallel/test-http2-compat-serverresponse-writehead-array.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-writehead-array.js) +- [parallel/test-http2-compat-serverresponse-writehead.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse-writehead.js) +- [parallel/test-http2-compat-serverresponse.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-serverresponse.js) +- [parallel/test-http2-compat-short-stream-client-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-short-stream-client-server.js) +- [parallel/test-http2-compat-socket-destroy-delayed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-socket-destroy-delayed.js) +- [parallel/test-http2-compat-socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-socket.js) +- [parallel/test-http2-compat-write-early-hints-invalid-argument-type.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-write-early-hints-invalid-argument-type.js) +- [parallel/test-http2-compat-write-early-hints-invalid-argument-value.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-write-early-hints-invalid-argument-value.js) +- [parallel/test-http2-compat-write-early-hints.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-write-early-hints.js) +- [parallel/test-http2-compat-write-head-destroyed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-compat-write-head-destroyed.js) +- [parallel/test-http2-connect-method-extended-cant-turn-off.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-connect-method-extended-cant-turn-off.js) +- [parallel/test-http2-connect-method-extended.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-connect-method-extended.js) +- [parallel/test-http2-connect-method.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-connect-method.js) +- [parallel/test-http2-connect-tls-with-delay.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-connect-tls-with-delay.js) +- [parallel/test-http2-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-connect.js) +- [parallel/test-http2-cookies.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-cookies.js) +- [parallel/test-http2-create-client-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-create-client-connect.js) +- [parallel/test-http2-create-client-secure-session.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-create-client-secure-session.js) +- [parallel/test-http2-create-client-session.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-create-client-session.js) +- [parallel/test-http2-createsecureserver-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-createsecureserver-options.js) +- [parallel/test-http2-createserver-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-createserver-options.js) +- [parallel/test-http2-createwritereq.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-createwritereq.js) +- [parallel/test-http2-debug.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-debug.js) +- [parallel/test-http2-destroy-after-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-destroy-after-write.js) +- [parallel/test-http2-dont-lose-data.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-dont-lose-data.js) +- [parallel/test-http2-empty-frame-without-eof.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-empty-frame-without-eof.js) +- [parallel/test-http2-error-order.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-error-order.js) +- [parallel/test-http2-exceeds-server-trailer-size.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-exceeds-server-trailer-size.js) +- [parallel/test-http2-forget-closed-streams.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-forget-closed-streams.js) +- [parallel/test-http2-generic-streams-sendfile.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-generic-streams-sendfile.js) +- [parallel/test-http2-generic-streams.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-generic-streams.js) +- [parallel/test-http2-getpackedsettings.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-getpackedsettings.js) +- [parallel/test-http2-goaway-delayed-request.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-goaway-delayed-request.js) +- [parallel/test-http2-goaway-opaquedata.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-goaway-opaquedata.js) +- [parallel/test-http2-head-request.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-head-request.js) +- [parallel/test-http2-https-fallback-http-server-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-https-fallback-http-server-options.js) +- [parallel/test-http2-https-fallback.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-https-fallback.js) +- [parallel/test-http2-info-headers-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-info-headers-errors.js) +- [parallel/test-http2-info-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-info-headers.js) +- [parallel/test-http2-invalidargtypes-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-invalidargtypes-errors.js) +- [parallel/test-http2-invalidheaderfield.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-invalidheaderfield.js) +- [parallel/test-http2-invalidheaderfields-client.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-invalidheaderfields-client.js) +- [parallel/test-http2-large-write-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-large-write-close.js) +- [parallel/test-http2-large-write-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-large-write-destroy.js) +- [parallel/test-http2-large-write-multiple-requests.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-large-write-multiple-requests.js) +- [parallel/test-http2-large-writes-session-memory-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-large-writes-session-memory-leak.js) +- [parallel/test-http2-malformed-altsvc.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-malformed-altsvc.js) +- [parallel/test-http2-many-writes-and-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-many-writes-and-destroy.js) +- [parallel/test-http2-max-concurrent-streams.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-max-concurrent-streams.js) +- [parallel/test-http2-max-invalid-frames.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-max-invalid-frames.js) +- [parallel/test-http2-max-session-memory-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-max-session-memory-leak.js) +- [parallel/test-http2-max-settings.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-max-settings.js) +- [parallel/test-http2-misbehaving-flow-control-paused.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-misbehaving-flow-control-paused.js) +- [parallel/test-http2-misbehaving-flow-control.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-misbehaving-flow-control.js) +- [parallel/test-http2-misbehaving-multiplex.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-misbehaving-multiplex.js) +- [parallel/test-http2-misc-util.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-misc-util.js) +- [parallel/test-http2-misused-pseudoheaders.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-misused-pseudoheaders.js) +- [parallel/test-http2-multi-content-length.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-multi-content-length.js) +- [parallel/test-http2-multiheaders-raw.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-multiheaders-raw.js) +- [parallel/test-http2-multiheaders.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-multiheaders.js) +- [parallel/test-http2-multiplex.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-multiplex.js) +- [parallel/test-http2-multistream-destroy-on-read-tls.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-multistream-destroy-on-read-tls.js) +- [parallel/test-http2-no-more-streams.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-no-more-streams.js) +- [parallel/test-http2-no-wanttrailers-listener.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-no-wanttrailers-listener.js) +- [parallel/test-http2-onping.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-onping.js) +- [parallel/test-http2-options-max-headers-block-length.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-options-max-headers-block-length.js) +- [parallel/test-http2-options-max-headers-exceeds-nghttp2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-options-max-headers-exceeds-nghttp2.js) +- [parallel/test-http2-options-max-reserved-streams.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-options-max-reserved-streams.js) +- [parallel/test-http2-options-server-request.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-options-server-request.js) +- [parallel/test-http2-options-server-response.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-options-server-response.js) +- [parallel/test-http2-origin.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-origin.js) +- [parallel/test-http2-pack-end-stream-flag.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-pack-end-stream-flag.js) +- [parallel/test-http2-padding-aligned.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-padding-aligned.js) +- [parallel/test-http2-perf_hooks.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-perf_hooks.js) +- [parallel/test-http2-ping-settings-heapdump.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-ping-settings-heapdump.js) +- [parallel/test-http2-ping-unsolicited-ack.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-ping-unsolicited-ack.js) +- [parallel/test-http2-ping.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-ping.js) +- [parallel/test-http2-pipe-named-pipe.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-pipe-named-pipe.js) +- [parallel/test-http2-pipe.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-pipe.js) +- [parallel/test-http2-priority-cycle-.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-priority-cycle-.js) +- [parallel/test-http2-priority-event.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-priority-event.js) +- [parallel/test-http2-propagate-session-destroy-code.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-propagate-session-destroy-code.js) +- [parallel/test-http2-removed-header-stays-removed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-removed-header-stays-removed.js) +- [parallel/test-http2-request-remove-connect-listener.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-request-remove-connect-listener.js) +- [parallel/test-http2-res-corked.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-res-corked.js) +- [parallel/test-http2-res-writable-properties.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-res-writable-properties.js) +- [parallel/test-http2-reset-flood.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-reset-flood.js) +- [parallel/test-http2-respond-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-errors.js) +- [parallel/test-http2-respond-file-304.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-file-304.js) +- [parallel/test-http2-respond-file-404.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-file-404.js) +- [parallel/test-http2-respond-file-error-dir.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-file-error-dir.js) +- [parallel/test-http2-respond-file-error-pipe-offset.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-file-error-pipe-offset.js) +- [parallel/test-http2-respond-file-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-file-errors.js) +- [parallel/test-http2-respond-file-fd-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-file-fd-errors.js) +- [parallel/test-http2-respond-file-fd-invalid.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-file-fd-invalid.js) +- [parallel/test-http2-respond-file-fd-range.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-file-fd-range.js) +- [parallel/test-http2-respond-file-fd.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-file-fd.js) +- [parallel/test-http2-respond-file-filehandle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-file-filehandle.js) +- [parallel/test-http2-respond-file-push.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-file-push.js) +- [parallel/test-http2-respond-file-range.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-file-range.js) +- [parallel/test-http2-respond-file-with-pipe.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-file-with-pipe.js) +- [parallel/test-http2-respond-file.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-file.js) +- [parallel/test-http2-respond-nghttperrors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-nghttperrors.js) +- [parallel/test-http2-respond-no-data.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-no-data.js) +- [parallel/test-http2-respond-with-fd-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-with-fd-errors.js) +- [parallel/test-http2-respond-with-file-connection-abort.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-respond-with-file-connection-abort.js) +- [parallel/test-http2-response-splitting.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-response-splitting.js) +- [parallel/test-http2-sensitive-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-sensitive-headers.js) +- [parallel/test-http2-sent-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-sent-headers.js) +- [parallel/test-http2-serve-file.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-serve-file.js) +- [parallel/test-http2-server-async-dispose.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-async-dispose.js) +- [parallel/test-http2-server-close-callback.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-close-callback.js) +- [parallel/test-http2-server-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-errors.js) +- [parallel/test-http2-server-http1-client.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-http1-client.js) +- [parallel/test-http2-server-push-disabled.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-push-disabled.js) +- [parallel/test-http2-server-push-stream-errors-args.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-push-stream-errors-args.js) +- [parallel/test-http2-server-push-stream-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-push-stream-errors.js) +- [parallel/test-http2-server-push-stream-head.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-push-stream-head.js) +- [parallel/test-http2-server-push-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-push-stream.js) +- [parallel/test-http2-server-rst-before-respond.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-rst-before-respond.js) +- [parallel/test-http2-server-rst-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-rst-stream.js) +- [parallel/test-http2-server-session-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-session-destroy.js) +- [parallel/test-http2-server-sessionerror.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-sessionerror.js) +- [parallel/test-http2-server-set-header.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-set-header.js) +- [parallel/test-http2-server-setLocalWindowSize.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-setLocalWindowSize.js) +- [parallel/test-http2-server-settimeout-no-callback.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-settimeout-no-callback.js) +- [parallel/test-http2-server-shutdown-before-respond.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-shutdown-before-respond.js) +- [parallel/test-http2-server-shutdown-options-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-shutdown-options-errors.js) +- [parallel/test-http2-server-shutdown-redundant.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-shutdown-redundant.js) +- [parallel/test-http2-server-socket-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-socket-destroy.js) +- [parallel/test-http2-server-startup.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-startup.js) +- [parallel/test-http2-server-stream-session-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-stream-session-destroy.js) +- [parallel/test-http2-server-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-timeout.js) +- [parallel/test-http2-server-unknown-protocol.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-server-unknown-protocol.js) +- [parallel/test-http2-session-gc-while-write-scheduled.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-session-gc-while-write-scheduled.js) +- [parallel/test-http2-session-settings.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-session-settings.js) +- [parallel/test-http2-session-stream-state.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-session-stream-state.js) +- [parallel/test-http2-session-unref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-session-unref.js) +- [parallel/test-http2-settings-unsolicited-ack.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-settings-unsolicited-ack.js) +- [parallel/test-http2-short-stream-client-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-short-stream-client-server.js) +- [parallel/test-http2-single-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-single-headers.js) +- [parallel/test-http2-socket-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-socket-close.js) +- [parallel/test-http2-socket-proxy-handler-for-has.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-socket-proxy-handler-for-has.js) +- [parallel/test-http2-stream-client.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-stream-client.js) +- [parallel/test-http2-stream-destroy-event-order.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-stream-destroy-event-order.js) +- [parallel/test-http2-timeouts.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-timeouts.js) +- [parallel/test-http2-tls-disconnect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-tls-disconnect.js) +- [parallel/test-http2-too-large-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-too-large-headers.js) +- [parallel/test-http2-too-many-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-too-many-headers.js) +- [parallel/test-http2-too-many-settings.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-too-many-settings.js) +- [parallel/test-http2-too-many-streams.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-too-many-streams.js) +- [parallel/test-http2-trailers-after-session-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-trailers-after-session-close.js) +- [parallel/test-http2-trailers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-trailers.js) +- [parallel/test-http2-unbound-socket-proxy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-unbound-socket-proxy.js) +- [parallel/test-http2-update-settings.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-update-settings.js) +- [parallel/test-http2-util-assert-valid-pseudoheader.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-util-assert-valid-pseudoheader.js) +- [parallel/test-http2-util-asserts.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-util-asserts.js) +- [parallel/test-http2-util-headers-list.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-util-headers-list.js) +- [parallel/test-http2-util-nghttp2error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-util-nghttp2error.js) +- [parallel/test-http2-util-update-options-buffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-util-update-options-buffer.js) +- [parallel/test-http2-window-size.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-window-size.js) +- [parallel/test-http2-write-callbacks.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-write-callbacks.js) +- [parallel/test-http2-write-finishes-after-stream-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-write-finishes-after-stream-destroy.js) +- [parallel/test-http2-zero-length-header.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-zero-length-header.js) +- [parallel/test-http2-zero-length-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-http2-zero-length-write.js) +- [parallel/test-https-abortcontroller.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-abortcontroller.js) +- [parallel/test-https-agent-abort-controller.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-agent-abort-controller.js) +- [parallel/test-https-agent-additional-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-agent-additional-options.js) +- [parallel/test-https-agent-constructor.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-agent-constructor.js) +- [parallel/test-https-agent-create-connection.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-agent-create-connection.js) +- [parallel/test-https-agent-disable-session-reuse.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-agent-disable-session-reuse.js) +- [parallel/test-https-agent-getname.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-agent-getname.js) +- [parallel/test-https-agent-keylog.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-agent-keylog.js) +- [parallel/test-https-agent-servername.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-agent-servername.js) +- [parallel/test-https-agent-session-eviction.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-agent-session-eviction.js) +- [parallel/test-https-agent-session-injection.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-agent-session-injection.js) +- [parallel/test-https-agent-session-reuse.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-agent-session-reuse.js) +- [parallel/test-https-agent-sni.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-agent-sni.js) +- [parallel/test-https-agent-sockets-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-agent-sockets-leak.js) +- [parallel/test-https-agent-unref-socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-agent-unref-socket.js) +- [parallel/test-https-agent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-agent.js) +- [parallel/test-https-argument-of-creating.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-argument-of-creating.js) +- [parallel/test-https-autoselectfamily.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-autoselectfamily.js) +- [parallel/test-https-byteswritten.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-byteswritten.js) +- [parallel/test-https-client-checkServerIdentity.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-client-checkServerIdentity.js) +- [parallel/test-https-client-get-url.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-client-get-url.js) +- [parallel/test-https-client-override-global-agent.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-client-override-global-agent.js) +- [parallel/test-https-client-reject.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-client-reject.js) +- [parallel/test-https-client-resume.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-client-resume.js) +- [parallel/test-https-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-close.js) +- [parallel/test-https-connect-address-family.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-connect-address-family.js) +- [parallel/test-https-drain.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-drain.js) +- [parallel/test-https-eof-for-eom.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-eof-for-eom.js) +- [parallel/test-https-host-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-host-headers.js) +- [parallel/test-https-hwm.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-hwm.js) +- [parallel/test-https-insecure-parse-per-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-insecure-parse-per-stream.js) +- [parallel/test-https-keep-alive-drop-requests.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-keep-alive-drop-requests.js) +- [parallel/test-https-max-header-size-per-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-max-header-size-per-stream.js) +- [parallel/test-https-max-headers-count.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-max-headers-count.js) +- [parallel/test-https-options-boolean-check.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-options-boolean-check.js) +- [parallel/test-https-pfx.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-pfx.js) +- [parallel/test-https-request-arguments.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-request-arguments.js) +- [parallel/test-https-resume-after-renew.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-resume-after-renew.js) +- [parallel/test-https-selfsigned-no-keycertsign-no-crash.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-selfsigned-no-keycertsign-no-crash.js) +- [parallel/test-https-server-async-dispose.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-server-async-dispose.js) +- [parallel/test-https-server-close-all.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-server-close-all.js) +- [parallel/test-https-server-close-destroy-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-server-close-destroy-timeout.js) +- [parallel/test-https-server-close-idle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-server-close-idle.js) +- [parallel/test-https-server-connections-checking-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-server-connections-checking-leak.js) +- [parallel/test-https-server-headers-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-server-headers-timeout.js) +- [parallel/test-https-server-options-incoming-message.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-server-options-incoming-message.js) +- [parallel/test-https-server-options-server-response.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-server-options-server-response.js) +- [parallel/test-https-server-request-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-server-request-timeout.js) +- [parallel/test-https-set-timeout-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-set-timeout-server.js) +- [parallel/test-https-simple.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-simple.js) +- [parallel/test-https-socket-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-socket-options.js) +- [parallel/test-https-strict.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-strict.js) +- [parallel/test-https-timeout-server-2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-timeout-server-2.js) +- [parallel/test-https-timeout-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-timeout-server.js) +- [parallel/test-https-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-timeout.js) +- [parallel/test-https-truncate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-truncate.js) +- [parallel/test-https-unix-socket-self-signed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-https-unix-socket-self-signed.js) +- [parallel/test-icu-minimum-version.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-icu-minimum-version.js) +- [parallel/test-icu-punycode.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-icu-punycode.js) +- [parallel/test-inspect-address-in-use.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspect-address-in-use.js) +- [parallel/test-inspect-async-hook-setup-at-inspect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspect-async-hook-setup-at-inspect.js) +- [parallel/test-inspect-publish-uid.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspect-publish-uid.js) +- [parallel/test-inspect-support-for-node_options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspect-support-for-node_options.js) +- [parallel/test-inspector-already-activated-cli.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-already-activated-cli.js) +- [parallel/test-inspector-async-call-stack-abort.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-async-call-stack-abort.js) +- [parallel/test-inspector-async-call-stack.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-async-call-stack.js) +- [parallel/test-inspector-async-hook-after-done.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-async-hook-after-done.js) +- [parallel/test-inspector-async-hook-setup-at-inspect-brk.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-async-hook-setup-at-inspect-brk.js) +- [parallel/test-inspector-async-hook-setup-at-signal.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-async-hook-setup-at-signal.js) +- [parallel/test-inspector-async-stack-traces-promise-then.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-async-stack-traces-promise-then.js) +- [parallel/test-inspector-async-stack-traces-set-interval.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-async-stack-traces-set-interval.js) +- [parallel/test-inspector-bindings.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-bindings.js) +- [parallel/test-inspector-break-e.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-break-e.js) +- [parallel/test-inspector-break-when-eval.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-break-when-eval.js) +- [parallel/test-inspector-close-worker.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-close-worker.js) +- [parallel/test-inspector-connect-main-thread.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-connect-main-thread.js) +- [parallel/test-inspector-connect-to-main-thread.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-connect-to-main-thread.js) +- [parallel/test-inspector-console-top-frame.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-console-top-frame.js) +- [parallel/test-inspector-console.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-console.js) +- [parallel/test-inspector-contexts.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-contexts.js) +- [parallel/test-inspector-debug-brk-flag.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-debug-brk-flag.js) +- [parallel/test-inspector-debug-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-debug-end.js) +- [parallel/test-inspector-enabled.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-enabled.js) +- [parallel/test-inspector-esm.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-esm.js) +- [parallel/test-inspector-exception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-exception.js) +- [parallel/test-inspector-has-idle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-has-idle.js) +- [parallel/test-inspector-has-inspector-false.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-has-inspector-false.js) +- [parallel/test-inspector-heap-allocation-tracker.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-heap-allocation-tracker.js) +- [parallel/test-inspector-heapdump.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-heapdump.js) +- [parallel/test-inspector-inspect-brk-node.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-inspect-brk-node.js) +- [parallel/test-inspector-invalid-args.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-invalid-args.js) +- [parallel/test-inspector-ip-detection.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-ip-detection.js) +- [parallel/test-inspector-module.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-module.js) +- [parallel/test-inspector-multisession-js.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-multisession-js.js) +- [parallel/test-inspector-multisession-ws.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-multisession-ws.js) +- [parallel/test-inspector-not-blocked-on-idle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-not-blocked-on-idle.js) +- [parallel/test-inspector-open-coverage.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-open-coverage.js) +- [parallel/test-inspector-open-port-integer-overflow.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-open-port-integer-overflow.js) +- [parallel/test-inspector-open.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-open.js) +- [parallel/test-inspector-overwrite-config.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-overwrite-config.js) +- [parallel/test-inspector-port-zero-cluster.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-port-zero-cluster.js) +- [parallel/test-inspector-port-zero.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-port-zero.js) +- [parallel/test-inspector-promises.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-promises.js) +- [parallel/test-inspector-reported-host.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-reported-host.js) +- [parallel/test-inspector-resource-name-to-url.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-resource-name-to-url.js) +- [parallel/test-inspector-runtime-evaluate-with-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-runtime-evaluate-with-timeout.js) +- [parallel/test-inspector-scriptparsed-context.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-scriptparsed-context.js) +- [parallel/test-inspector-stop-profile-after-done.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-stop-profile-after-done.js) +- [parallel/test-inspector-stress-http.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-stress-http.js) +- [parallel/test-inspector-tracing-domain.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-tracing-domain.js) +- [parallel/test-inspector-vm-global-accessors-getter-sideeffect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-vm-global-accessors-getter-sideeffect.js) +- [parallel/test-inspector-vm-global-accessors-sideeffects.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-vm-global-accessors-sideeffects.js) +- [parallel/test-inspector-wait-for-connection.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-wait-for-connection.js) +- [parallel/test-inspector-waiting-for-disconnect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-waiting-for-disconnect.js) +- [parallel/test-inspector-workers-flat-list.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector-workers-flat-list.js) +- [parallel/test-inspector.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-inspector.js) +- [parallel/test-internal-assert.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-assert.js) +- [parallel/test-internal-error-original-names.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-error-original-names.js) +- [parallel/test-internal-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-errors.js) +- [parallel/test-internal-fs-syncwritestream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-fs-syncwritestream.js) +- [parallel/test-internal-iterable-weak-map.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-iterable-weak-map.js) +- [parallel/test-internal-module-require.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-module-require.js) +- [parallel/test-internal-module-wrap.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-module-wrap.js) +- [parallel/test-internal-modules.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-modules.js) +- [parallel/test-internal-process-binding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-process-binding.js) +- [parallel/test-internal-socket-list-receive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-socket-list-receive.js) +- [parallel/test-internal-socket-list-send.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-socket-list-send.js) +- [parallel/test-internal-util-assertCrypto.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-util-assertCrypto.js) +- [parallel/test-internal-util-classwrapper.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-util-classwrapper.js) +- [parallel/test-internal-util-decorate-error-stack.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-util-decorate-error-stack.js) +- [parallel/test-internal-util-helpers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-util-helpers.js) +- [parallel/test-internal-util-objects.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-util-objects.js) +- [parallel/test-internal-util-weakreference.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-util-weakreference.js) +- [parallel/test-internal-validators-validateoneof.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-validators-validateoneof.js) +- [parallel/test-internal-validators-validateport.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-validators-validateport.js) +- [parallel/test-internal-webidl-converttoint.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-internal-webidl-converttoint.js) +- [parallel/test-intl-v8BreakIterator.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-intl-v8BreakIterator.js) +- [parallel/test-intl.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-intl.js) +- [parallel/test-js-stream-call-properties.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-js-stream-call-properties.js) +- [parallel/test-listen-fd-cluster.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-listen-fd-cluster.js) +- [parallel/test-listen-fd-ebadf.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-listen-fd-ebadf.js) +- [parallel/test-listen-fd-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-listen-fd-server.js) +- [parallel/test-macos-app-sandbox.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-macos-app-sandbox.js) +- [parallel/test-math-random.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-math-random.js) +- [parallel/test-messageevent-brandcheck.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-messageevent-brandcheck.js) +- [parallel/test-messageport-hasref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-messageport-hasref.js) +- [parallel/test-messaging-maketransferable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-messaging-maketransferable.js) +- [parallel/test-mime-api.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-mime-api.js) +- [parallel/test-mime-whatwg.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-mime-whatwg.js) +- [parallel/test-module-binding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-binding.js) +- [parallel/test-module-builtin.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-builtin.js) +- [parallel/test-module-children.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-children.js) +- [parallel/test-module-circular-dependency-warning.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-circular-dependency-warning.js) +- [parallel/test-module-create-require.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-create-require.js) +- [parallel/test-module-globalpaths-nodepath.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-globalpaths-nodepath.js) +- [parallel/test-module-loading-deprecated.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-loading-deprecated.js) +- [parallel/test-module-loading-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-loading-error.js) +- [parallel/test-module-loading-globalpaths.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-loading-globalpaths.js) +- [parallel/test-module-main-extension-lookup.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-main-extension-lookup.js) +- [parallel/test-module-main-fail.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-main-fail.js) +- [parallel/test-module-main-preserve-symlinks-fail.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-main-preserve-symlinks-fail.js) +- [parallel/test-module-parent-deprecation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-parent-deprecation.js) +- [parallel/test-module-parent-setter-deprecation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-parent-setter-deprecation.js) +- [parallel/test-module-prototype-mutation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-prototype-mutation.js) +- [parallel/test-module-run-main-monkey-patch.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-run-main-monkey-patch.js) +- [parallel/test-module-stat.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-stat.js) +- [parallel/test-module-symlinked-peer-modules.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-symlinked-peer-modules.js) +- [parallel/test-module-version.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-version.js) +- [parallel/test-module-wrap.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-wrap.js) +- [parallel/test-module-wrapper.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-module-wrapper.js) +- [parallel/test-net-allow-half-open.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-allow-half-open.js) +- [parallel/test-net-autoselectfamily-commandline-option.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-autoselectfamily-commandline-option.js) +- [parallel/test-net-autoselectfamily-default.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-autoselectfamily-default.js) +- [parallel/test-net-autoselectfamily-ipv4first.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-autoselectfamily-ipv4first.js) +- [parallel/test-net-binary.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-binary.js) +- [parallel/test-net-bytes-read.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-bytes-read.js) +- [parallel/test-net-bytes-stats.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-bytes-stats.js) +- [parallel/test-net-child-process-connect-reset.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-child-process-connect-reset.js) +- [parallel/test-net-client-bind-twice.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-client-bind-twice.js) +- [parallel/test-net-connect-abort-controller.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-connect-abort-controller.js) +- [parallel/test-net-connect-keepalive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-connect-keepalive.js) +- [parallel/test-net-connect-memleak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-connect-memleak.js) +- [parallel/test-net-connect-nodelay.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-connect-nodelay.js) +- [parallel/test-net-connect-options-allowhalfopen.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-connect-options-allowhalfopen.js) +- [parallel/test-net-connect-options-invalid.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-connect-options-invalid.js) +- [parallel/test-net-connect-options-path.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-connect-options-path.js) +- [parallel/test-net-connect-reset-after-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-connect-reset-after-destroy.js) +- [parallel/test-net-connect-reset-before-connected.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-connect-reset-before-connected.js) +- [parallel/test-net-connect-reset-until-connected.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-connect-reset-until-connected.js) +- [parallel/test-net-connect-reset.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-connect-reset.js) +- [parallel/test-net-deprecated-setsimultaneousaccepts.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-deprecated-setsimultaneousaccepts.js) +- [parallel/test-net-end-destroyed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-end-destroyed.js) +- [parallel/test-net-large-string.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-large-string.js) +- [parallel/test-net-listen-exclusive-random-ports.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-listen-exclusive-random-ports.js) +- [parallel/test-net-listen-fd0.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-listen-fd0.js) +- [parallel/test-net-listen-ipv6only.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-listen-ipv6only.js) +- [parallel/test-net-normalize-args.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-normalize-args.js) +- [parallel/test-net-onread-static-buffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-onread-static-buffer.js) +- [parallel/test-net-perf_hooks.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-perf_hooks.js) +- [parallel/test-net-pingpong.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-pingpong.js) +- [parallel/test-net-server-drop-connections.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-server-drop-connections.js) +- [parallel/test-net-server-keepalive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-server-keepalive.js) +- [parallel/test-net-server-listen-handle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-server-listen-handle.js) +- [parallel/test-net-server-max-connections-close-makes-more-available.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-server-max-connections-close-makes-more-available.js) +- [parallel/test-net-server-max-connections.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-server-max-connections.js) +- [parallel/test-net-server-nodelay.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-server-nodelay.js) +- [parallel/test-net-server-reset.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-server-reset.js) +- [parallel/test-net-server-simultaneous-accepts-produce-warning-once.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-server-simultaneous-accepts-produce-warning-once.js) +- [parallel/test-net-socket-byteswritten.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-socket-byteswritten.js) +- [parallel/test-net-socket-connect-invalid-autoselectfamilyattempttimeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-socket-connect-invalid-autoselectfamilyattempttimeout.js) +- [parallel/test-net-socket-constructor.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-socket-constructor.js) +- [parallel/test-net-socket-local-address.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-socket-local-address.js) +- [parallel/test-net-socket-reset-send.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-socket-reset-send.js) +- [parallel/test-net-socket-reset-twice.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-socket-reset-twice.js) +- [parallel/test-net-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-stream.js) +- [parallel/test-net-throttle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-throttle.js) +- [parallel/test-net-write-after-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-write-after-close.js) +- [parallel/test-net-write-after-end-nt.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-write-after-end-nt.js) +- [parallel/test-net-write-cb-on-destroy-before-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-net-write-cb-on-destroy-before-connect.js) +- [parallel/test-no-addons-resolution-condition.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-no-addons-resolution-condition.js) +- [parallel/test-npm-install.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-npm-install.js) +- [parallel/test-npm-version.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-npm-version.js) +- [parallel/test-openssl-ca-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-openssl-ca-options.js) +- [parallel/test-options-binding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-options-binding.js) +- [parallel/test-os-checked-function.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-os-checked-function.js) +- [parallel/test-os-eol.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-os-eol.js) +- [parallel/test-os-process-priority.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-os-process-priority.js) +- [parallel/test-os-userinfo-handles-getter-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-os-userinfo-handles-getter-errors.js) +- [parallel/test-path-posix-relative-on-windows.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-path-posix-relative-on-windows.js) +- [parallel/test-pending-deprecation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-pending-deprecation.js) +- [parallel/test-perf-hooks-histogram.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-perf-hooks-histogram.js) +- [parallel/test-perf-hooks-resourcetiming.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-perf-hooks-resourcetiming.js) +- [parallel/test-perf-hooks-usertiming.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-perf-hooks-usertiming.js) +- [parallel/test-perf-hooks-worker-timeorigin.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-perf-hooks-worker-timeorigin.js) +- [parallel/test-performance-eventlooputil.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-performance-eventlooputil.js) +- [parallel/test-performance-function-async.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-performance-function-async.js) +- [parallel/test-performance-function.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-performance-function.js) +- [parallel/test-performance-gc.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-performance-gc.js) +- [parallel/test-performance-global.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-performance-global.js) +- [parallel/test-performance-measure.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-performance-measure.js) +- [parallel/test-performance-nodetiming.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-performance-nodetiming.js) +- [parallel/test-performance-resourcetimingbufferfull.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-performance-resourcetimingbufferfull.js) +- [parallel/test-performance-resourcetimingbuffersize.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-performance-resourcetimingbuffersize.js) +- [parallel/test-performanceobserver.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-performanceobserver.js) +- [parallel/test-permission-allow-child-process-cli.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-allow-child-process-cli.js) +- [parallel/test-permission-allow-worker-cli.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-allow-worker-cli.js) +- [parallel/test-permission-child-process-cli.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-child-process-cli.js) +- [parallel/test-permission-experimental.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-experimental.js) +- [parallel/test-permission-fs-read.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-fs-read.js) +- [parallel/test-permission-fs-relative-path.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-fs-relative-path.js) +- [parallel/test-permission-fs-supported.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-fs-supported.js) +- [parallel/test-permission-fs-symlink-relative.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-fs-symlink-relative.js) +- [parallel/test-permission-fs-symlink-target-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-fs-symlink-target-write.js) +- [parallel/test-permission-fs-symlink.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-fs-symlink.js) +- [parallel/test-permission-fs-traversal-path.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-fs-traversal-path.js) +- [parallel/test-permission-fs-wildcard.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-fs-wildcard.js) +- [parallel/test-permission-fs-windows-path.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-fs-windows-path.js) +- [parallel/test-permission-fs-write-report.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-fs-write-report.js) +- [parallel/test-permission-fs-write-v8.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-fs-write-v8.js) +- [parallel/test-permission-fs-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-fs-write.js) +- [parallel/test-permission-has.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-has.js) +- [parallel/test-permission-inspector.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-inspector.js) +- [parallel/test-permission-processbinding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-processbinding.js) +- [parallel/test-permission-warning-flags.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-warning-flags.js) +- [parallel/test-permission-worker-threads-cli.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-permission-worker-threads-cli.js) +- [parallel/test-pipe-abstract-socket-http.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-pipe-abstract-socket-http.js) +- [parallel/test-pipe-abstract-socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-pipe-abstract-socket.js) +- [parallel/test-pipe-address.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-pipe-address.js) +- [parallel/test-pipe-file-to-http.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-pipe-file-to-http.js) +- [parallel/test-pipe-head.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-pipe-head.js) +- [parallel/test-pipe-outgoing-message-data-emitted-after-ended.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-pipe-outgoing-message-data-emitted-after-ended.js) +- [parallel/test-pipe-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-pipe-stream.js) +- [parallel/test-pipe-unref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-pipe-unref.js) +- [parallel/test-policy-crypto-default-encoding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-policy-crypto-default-encoding.js) +- [parallel/test-policy-crypto-hash-tampering.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-policy-crypto-hash-tampering.js) +- [parallel/test-policy-dependencies.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-policy-dependencies.js) +- [parallel/test-policy-dependency-conditions.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-policy-dependency-conditions.js) +- [parallel/test-policy-integrity-flag.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-policy-integrity-flag.js) +- [parallel/test-policy-manifest.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-policy-manifest.js) +- [parallel/test-policy-parse-integrity.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-policy-parse-integrity.js) +- [parallel/test-policy-process-binding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-policy-process-binding.js) +- [parallel/test-policy-scopes-dependencies.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-policy-scopes-dependencies.js) +- [parallel/test-policy-scopes-integrity.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-policy-scopes-integrity.js) +- [parallel/test-policy-scopes.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-policy-scopes.js) +- [parallel/test-preload-print-process-argv.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-preload-print-process-argv.js) +- [parallel/test-preload-self-referential.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-preload-self-referential.js) +- [parallel/test-preload-worker.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-preload-worker.js) +- [parallel/test-preload.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-preload.js) +- [parallel/test-primordials-apply.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-primordials-apply.js) +- [parallel/test-primordials-promise.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-primordials-promise.js) +- [parallel/test-primordials-regexp.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-primordials-regexp.js) +- [parallel/test-priority-queue.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-priority-queue.js) +- [parallel/test-process-assert.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-assert.js) +- [parallel/test-process-beforeexit-throw-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-beforeexit-throw-exit.js) +- [parallel/test-process-binding-util.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-binding-util.js) +- [parallel/test-process-chdir-errormessage.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-chdir-errormessage.js) +- [parallel/test-process-chdir.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-chdir.js) +- [parallel/test-process-config.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-config.js) +- [parallel/test-process-constants-noatime.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-constants-noatime.js) +- [parallel/test-process-constrained-memory.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-constrained-memory.js) +- [parallel/test-process-cpuUsage.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-cpuUsage.js) +- [parallel/test-process-dlopen-error-message-crash.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-dlopen-error-message-crash.js) +- [parallel/test-process-emit-warning-from-native.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-emit-warning-from-native.js) +- [parallel/test-process-emit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-emit.js) +- [parallel/test-process-env-allowed-flags-are-documented.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-env-allowed-flags-are-documented.js) +- [parallel/test-process-env-deprecation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-env-deprecation.js) +- [parallel/test-process-env-ignore-getter-setter.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-env-ignore-getter-setter.js) +- [parallel/test-process-env-sideeffects.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-env-sideeffects.js) +- [parallel/test-process-env-symbols.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-env-symbols.js) +- [parallel/test-process-env-tz.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-env-tz.js) +- [parallel/test-process-env.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-env.js) +- [parallel/test-process-euid-egid.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-euid-egid.js) +- [parallel/test-process-exception-capture-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-exception-capture-errors.js) +- [parallel/test-process-exception-capture-should-abort-on-uncaught-setflagsfromstring.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-exception-capture-should-abort-on-uncaught-setflagsfromstring.js) +- [parallel/test-process-exception-capture-should-abort-on-uncaught.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-exception-capture-should-abort-on-uncaught.js) +- [parallel/test-process-exception-capture.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-exception-capture.js) +- [parallel/test-process-exec-argv.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-exec-argv.js) +- [parallel/test-process-execpath.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-execpath.js) +- [parallel/test-process-exit-code-validation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-exit-code-validation.js) +- [parallel/test-process-exit-code.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-exit-code.js) +- [parallel/test-process-external-stdio-close-spawn.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-external-stdio-close-spawn.js) +- [parallel/test-process-external-stdio-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-external-stdio-close.js) +- [parallel/test-process-features.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-features.js) +- [parallel/test-process-getactivehandles.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-getactivehandles.js) +- [parallel/test-process-getactiverequests.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-getactiverequests.js) +- [parallel/test-process-getactiveresources-track-active-handles.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-getactiveresources-track-active-handles.js) +- [parallel/test-process-getactiveresources-track-active-requests.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-getactiveresources-track-active-requests.js) +- [parallel/test-process-getactiveresources-track-interval-lifetime.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-getactiveresources-track-interval-lifetime.js) +- [parallel/test-process-getactiveresources-track-multiple-timers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-getactiveresources-track-multiple-timers.js) +- [parallel/test-process-getactiveresources-track-timer-lifetime.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-getactiveresources-track-timer-lifetime.js) +- [parallel/test-process-getactiveresources.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-getactiveresources.js) +- [parallel/test-process-hrtime.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-hrtime.js) +- [parallel/test-process-initgroups.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-initgroups.js) +- [parallel/test-process-kill-null.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-kill-null.js) +- [parallel/test-process-prototype.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-prototype.js) +- [parallel/test-process-raw-debug.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-raw-debug.js) +- [parallel/test-process-redirect-warnings-env.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-redirect-warnings-env.js) +- [parallel/test-process-redirect-warnings.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-redirect-warnings.js) +- [parallel/test-process-release.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-release.js) +- [parallel/test-process-remove-all-signal-listeners.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-remove-all-signal-listeners.js) +- [parallel/test-process-setgroups.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-setgroups.js) +- [parallel/test-process-setsourcemapsenabled.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-setsourcemapsenabled.js) +- [parallel/test-process-setuid-io-uring.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-setuid-io-uring.js) +- [parallel/test-process-title-cli.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-title-cli.js) +- [parallel/test-process-uid-gid.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-uid-gid.js) +- [parallel/test-process-umask-mask.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-umask-mask.js) +- [parallel/test-process-umask.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-umask.js) +- [parallel/test-process-uncaught-exception-monitor.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-uncaught-exception-monitor.js) +- [parallel/test-process-versions.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-process-versions.js) +- [parallel/test-promise-hook-create-hook.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promise-hook-create-hook.js) +- [parallel/test-promise-hook-exceptions.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promise-hook-exceptions.js) +- [parallel/test-promise-hook-on-after.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promise-hook-on-after.js) +- [parallel/test-promise-hook-on-before.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promise-hook-on-before.js) +- [parallel/test-promise-hook-on-init.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promise-hook-on-init.js) +- [parallel/test-promise-hook-on-resolve.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promise-hook-on-resolve.js) +- [parallel/test-promise-reject-callback-exception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promise-reject-callback-exception.js) +- [parallel/test-promise-swallowed-event.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promise-swallowed-event.js) +- [parallel/test-promise-unhandled-default.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promise-unhandled-default.js) +- [parallel/test-promise-unhandled-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promise-unhandled-error.js) +- [parallel/test-promise-unhandled-flag.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promise-unhandled-flag.js) +- [parallel/test-promise-unhandled-silent-no-hook.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promise-unhandled-silent-no-hook.js) +- [parallel/test-promise-unhandled-throw.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promise-unhandled-throw.js) +- [parallel/test-promise-unhandled-warn-no-hook.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promise-unhandled-warn-no-hook.js) +- [parallel/test-promise-unhandled-warn.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promise-unhandled-warn.js) +- [parallel/test-promises-unhandled-proxy-rejections.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promises-unhandled-proxy-rejections.js) +- [parallel/test-promises-unhandled-rejections.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promises-unhandled-rejections.js) +- [parallel/test-promises-unhandled-symbol-rejections.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promises-unhandled-symbol-rejections.js) +- [parallel/test-promises-warning-on-unhandled-rejection.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-promises-warning-on-unhandled-rejection.js) +- [parallel/test-queue-microtask-uncaught-asynchooks.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-queue-microtask-uncaught-asynchooks.js) +- [parallel/test-queue-microtask.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-queue-microtask.js) +- [parallel/test-readable-from-web-enqueue-then-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-readable-from-web-enqueue-then-close.js) +- [parallel/test-readline-async-iterators-backpressure.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-readline-async-iterators-backpressure.js) +- [parallel/test-readline-input-onerror.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-readline-input-onerror.js) +- [parallel/test-readline-interface-no-trailing-newline.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-readline-interface-no-trailing-newline.js) +- [parallel/test-readline-interface-recursive-writes.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-readline-interface-recursive-writes.js) +- [parallel/test-readline-promises-interface.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-readline-promises-interface.js) +- [parallel/test-readline-promises-tab-complete.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-readline-promises-tab-complete.js) +- [parallel/test-readline-tab-complete.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-readline-tab-complete.js) +- [parallel/test-release-changelog.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-release-changelog.js) +- [parallel/test-release-npm.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-release-npm.js) +- [parallel/test-repl-array-prototype-tempering.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-array-prototype-tempering.js) +- [parallel/test-repl-autocomplete.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-autocomplete.js) +- [parallel/test-repl-autolibs.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-autolibs.js) +- [parallel/test-repl-clear-immediate-crash.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-clear-immediate-crash.js) +- [parallel/test-repl-cli-eval.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-cli-eval.js) +- [parallel/test-repl-colors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-colors.js) +- [parallel/test-repl-context.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-context.js) +- [parallel/test-repl-definecommand.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-definecommand.js) +- [parallel/test-repl-domain.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-domain.js) +- [parallel/test-repl-dynamic-import.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-dynamic-import.js) +- [parallel/test-repl-editor.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-editor.js) +- [parallel/test-repl-empty.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-empty.js) +- [parallel/test-repl-end-emits-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-end-emits-exit.js) +- [parallel/test-repl-envvars.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-envvars.js) +- [parallel/test-repl-eval.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-eval.js) +- [parallel/test-repl-function-definition-edge-case.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-function-definition-edge-case.js) +- [parallel/test-repl-harmony.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-harmony.js) +- [parallel/test-repl-history-navigation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-history-navigation.js) +- [parallel/test-repl-history-perm.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-history-perm.js) +- [parallel/test-repl-import-referrer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-import-referrer.js) +- [parallel/test-repl-inspect-defaults.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-inspect-defaults.js) +- [parallel/test-repl-inspector.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-inspector.js) +- [parallel/test-repl-let-process.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-let-process.js) +- [parallel/test-repl-load-multiline-no-trailing-newline.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-load-multiline-no-trailing-newline.js) +- [parallel/test-repl-load-multiline.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-load-multiline.js) +- [parallel/test-repl-mode.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-mode.js) +- [parallel/test-repl-multiline.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-multiline.js) +- [parallel/test-repl-no-terminal.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-no-terminal.js) +- [parallel/test-repl-null-thrown.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-null-thrown.js) +- [parallel/test-repl-null.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-null.js) +- [parallel/test-repl-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-options.js) +- [parallel/test-repl-permission-model.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-permission-model.js) +- [parallel/test-repl-persistent-history.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-persistent-history.js) +- [parallel/test-repl-preprocess-top-level-await.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-preprocess-top-level-await.js) +- [parallel/test-repl-pretty-custom-stack.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-pretty-custom-stack.js) +- [parallel/test-repl-pretty-stack-custom-writer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-pretty-stack-custom-writer.js) +- [parallel/test-repl-pretty-stack.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-pretty-stack.js) +- [parallel/test-repl-preview.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-preview.js) +- [parallel/test-repl-programmatic-history.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-programmatic-history.js) +- [parallel/test-repl-recoverable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-recoverable.js) +- [parallel/test-repl-require-after-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-require-after-write.js) +- [parallel/test-repl-require-cache.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-require-cache.js) +- [parallel/test-repl-require-context.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-require-context.js) +- [parallel/test-repl-require-self-referential.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-require-self-referential.js) +- [parallel/test-repl-require.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-require.js) +- [parallel/test-repl-reset-event.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-reset-event.js) +- [parallel/test-repl-reverse-search.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-reverse-search.js) +- [parallel/test-repl-save-load.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-save-load.js) +- [parallel/test-repl-setprompt.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-setprompt.js) +- [parallel/test-repl-sigint-nested-eval.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-sigint-nested-eval.js) +- [parallel/test-repl-sigint.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-sigint.js) +- [parallel/test-repl-stdin-push-null.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-stdin-push-null.js) +- [parallel/test-repl-strict-mode-previews.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-strict-mode-previews.js) +- [parallel/test-repl-syntax-error-handling.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-syntax-error-handling.js) +- [parallel/test-repl-syntax-error-stack.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-syntax-error-stack.js) +- [parallel/test-repl-tab-complete-crash.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-tab-complete-crash.js) +- [parallel/test-repl-tab-complete-import.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-tab-complete-import.js) +- [parallel/test-repl-tab-complete-nested-repls.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-tab-complete-nested-repls.js) +- [parallel/test-repl-tab-complete-no-warn.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-tab-complete-no-warn.js) +- [parallel/test-repl-tab-complete-on-editor-mode.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-tab-complete-on-editor-mode.js) +- [parallel/test-repl-tab-complete.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-tab-complete.js) +- [parallel/test-repl-tab.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-tab.js) +- [parallel/test-repl-throw-null-or-undefined.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-throw-null-or-undefined.js) +- [parallel/test-repl-top-level-await.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-top-level-await.js) +- [parallel/test-repl-uncaught-exception-async.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-uncaught-exception-async.js) +- [parallel/test-repl-uncaught-exception-evalcallback.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-uncaught-exception-evalcallback.js) +- [parallel/test-repl-uncaught-exception-standalone.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-uncaught-exception-standalone.js) +- [parallel/test-repl-uncaught-exception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-uncaught-exception.js) +- [parallel/test-repl-underscore.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-underscore.js) +- [parallel/test-repl-unexpected-token-recoverable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-unexpected-token-recoverable.js) +- [parallel/test-repl-unsafe-array-iteration.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-unsafe-array-iteration.js) +- [parallel/test-repl-unsupported-option.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-unsupported-option.js) +- [parallel/test-repl-use-global.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl-use-global.js) +- [parallel/test-repl.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-repl.js) +- [parallel/test-require-cache.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-cache.js) +- [parallel/test-require-delete-array-iterator.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-delete-array-iterator.js) +- [parallel/test-require-dot.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-dot.js) +- [parallel/test-require-empty-main.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-empty-main.js) +- [parallel/test-require-enoent-dir.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-enoent-dir.js) +- [parallel/test-require-exceptions.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-exceptions.js) +- [parallel/test-require-extension-over-directory.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-extension-over-directory.js) +- [parallel/test-require-extensions-main.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-extensions-main.js) +- [parallel/test-require-extensions-same-filename-as-dir-trailing-slash.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-extensions-same-filename-as-dir-trailing-slash.js) +- [parallel/test-require-extensions-same-filename-as-dir.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-extensions-same-filename-as-dir.js) +- [parallel/test-require-invalid-main-no-exports.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-invalid-main-no-exports.js) +- [parallel/test-require-json.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-json.js) +- [parallel/test-require-mjs.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-mjs.js) +- [parallel/test-require-node-prefix.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-node-prefix.js) +- [parallel/test-require-resolve.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-resolve.js) +- [parallel/test-require-symlink.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-symlink.js) +- [parallel/test-require-unicode.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-require-unicode.js) +- [parallel/test-resource-usage.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-resource-usage.js) +- [parallel/test-runner-cli-concurrency.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-cli-concurrency.js) +- [parallel/test-runner-cli-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-cli-timeout.js) +- [parallel/test-runner-cli.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-cli.js) +- [parallel/test-runner-concurrency.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-concurrency.js) +- [parallel/test-runner-coverage.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-coverage.js) +- [parallel/test-runner-exit-code.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-exit-code.js) +- [parallel/test-runner-extraneous-async-activity.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-extraneous-async-activity.js) +- [parallel/test-runner-filetest-location.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-filetest-location.js) +- [parallel/test-runner-import-no-scheme.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-import-no-scheme.js) +- [parallel/test-runner-misc.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-misc.js) +- [parallel/test-runner-mock-timers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-mock-timers.js) +- [parallel/test-runner-mocking.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-mocking.js) +- [parallel/test-runner-option-validation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-option-validation.js) +- [parallel/test-runner-reporters.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-reporters.js) +- [parallel/test-runner-root-after-with-refed-handles.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-root-after-with-refed-handles.js) +- [parallel/test-runner-string-to-regexp.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-string-to-regexp.js) +- [parallel/test-runner-test-filter.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-test-filter.js) +- [parallel/test-runner-typechecking.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-runner-typechecking.js) +- [parallel/test-safe-get-env.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-safe-get-env.js) +- [parallel/test-security-revert-unknown.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-security-revert-unknown.js) +- [parallel/test-set-http-max-http-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-set-http-max-http-headers.js) +- [parallel/test-set-incoming-message-header.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-set-incoming-message-header.js) +- [parallel/test-set-process-debug-port.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-set-process-debug-port.js) +- [parallel/test-setproctitle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-setproctitle.js) +- [parallel/test-shadow-realm-allowed-builtin-modules.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-shadow-realm-allowed-builtin-modules.js) +- [parallel/test-shadow-realm-custom-loaders.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-shadow-realm-custom-loaders.js) +- [parallel/test-shadow-realm-gc-module.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-shadow-realm-gc-module.js) +- [parallel/test-shadow-realm-gc.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-shadow-realm-gc.js) +- [parallel/test-shadow-realm-globals.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-shadow-realm-globals.js) +- [parallel/test-shadow-realm-import-value-resolve.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-shadow-realm-import-value-resolve.js) +- [parallel/test-shadow-realm-module.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-shadow-realm-module.js) +- [parallel/test-shadow-realm-preload-module.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-shadow-realm-preload-module.js) +- [parallel/test-shadow-realm-prepare-stack-trace.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-shadow-realm-prepare-stack-trace.js) +- [parallel/test-shadow-realm.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-shadow-realm.js) +- [parallel/test-sigint-infinite-loop.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-sigint-infinite-loop.js) +- [parallel/test-signal-args.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-signal-args.js) +- [parallel/test-signal-safety.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-signal-safety.js) +- [parallel/test-signal-unregister.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-signal-unregister.js) +- [parallel/test-single-executable-blob-config-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-single-executable-blob-config-errors.js) +- [parallel/test-single-executable-blob-config.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-single-executable-blob-config.js) +- [parallel/test-snapshot-api.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-api.js) +- [parallel/test-snapshot-argv1.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-argv1.js) +- [parallel/test-snapshot-basic.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-basic.js) +- [parallel/test-snapshot-cjs-main.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-cjs-main.js) +- [parallel/test-snapshot-console.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-console.js) +- [parallel/test-snapshot-cwd.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-cwd.js) +- [parallel/test-snapshot-dns-lookup-localhost-promise.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-dns-lookup-localhost-promise.js) +- [parallel/test-snapshot-dns-lookup-localhost.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-dns-lookup-localhost.js) +- [parallel/test-snapshot-dns-resolve-localhost-promise.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-dns-resolve-localhost-promise.js) +- [parallel/test-snapshot-dns-resolve-localhost.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-dns-resolve-localhost.js) +- [parallel/test-snapshot-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-error.js) +- [parallel/test-snapshot-eval.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-eval.js) +- [parallel/test-snapshot-gzip.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-gzip.js) +- [parallel/test-snapshot-incompatible.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-incompatible.js) +- [parallel/test-snapshot-namespaced-builtin.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-namespaced-builtin.js) +- [parallel/test-snapshot-net.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-net.js) +- [parallel/test-snapshot-typescript.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-typescript.js) +- [parallel/test-snapshot-umd.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-umd.js) +- [parallel/test-snapshot-warning.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-warning.js) +- [parallel/test-snapshot-weak-reference.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-weak-reference.js) +- [parallel/test-snapshot-worker.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-snapshot-worker.js) +- [parallel/test-socket-options-invalid.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-socket-options-invalid.js) +- [parallel/test-socket-write-after-fin.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-socket-write-after-fin.js) +- [parallel/test-socket-writes-before-passed-to-tls-socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-socket-writes-before-passed-to-tls-socket.js) +- [parallel/test-socketaddress.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-socketaddress.js) +- [parallel/test-source-map-api.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-source-map-api.js) +- [parallel/test-stack-size-limit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stack-size-limit.js) +- [parallel/test-startup-empty-regexp-statics.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-startup-empty-regexp-statics.js) +- [parallel/test-startup-large-pages.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-startup-large-pages.js) +- [parallel/test-stdin-child-proc.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdin-child-proc.js) +- [parallel/test-stdin-from-file.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdin-from-file.js) +- [parallel/test-stdin-pause-resume-sync.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdin-pause-resume-sync.js) +- [parallel/test-stdin-pause-resume.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdin-pause-resume.js) +- [parallel/test-stdin-resume-pause.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdin-resume-pause.js) +- [parallel/test-stdin-script-child.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdin-script-child.js) +- [parallel/test-stdio-closed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdio-closed.js) +- [parallel/test-stdout-close-catch.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdout-close-catch.js) +- [parallel/test-stdout-close-unref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdout-close-unref.js) +- [parallel/test-stdout-to-file.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stdout-to-file.js) +- [parallel/test-strace-openat-openssl.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-strace-openat-openssl.js) +- [parallel/test-stream-base-prototype-accessors-enumerability.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-base-prototype-accessors-enumerability.js) +- [parallel/test-stream-base-typechecking.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-base-typechecking.js) +- [parallel/test-stream-compose-operator.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-compose-operator.js) +- [parallel/test-stream-compose.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-compose.js) +- [parallel/test-stream-consumers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-consumers.js) +- [parallel/test-stream-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-destroy.js) +- [parallel/test-stream-drop-take.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-drop-take.js) +- [parallel/test-stream-finished.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-finished.js) +- [parallel/test-stream-map.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-map.js) +- [parallel/test-stream-pipe-deadlock.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-pipe-deadlock.js) +- [parallel/test-stream-pipeline-http2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-pipeline-http2.js) +- [parallel/test-stream-pipeline-process.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-pipeline-process.js) +- [parallel/test-stream-pipeline.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-pipeline.js) +- [parallel/test-stream-preprocess.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-preprocess.js) +- [parallel/test-stream-promises.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-promises.js) +- [parallel/test-stream-readable-async-iterators.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-readable-async-iterators.js) +- [parallel/test-stream-readable-default-encoding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-readable-default-encoding.js) +- [parallel/test-stream-readable-dispose.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-readable-dispose.js) +- [parallel/test-stream-set-default-hwm.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-set-default-hwm.js) +- [parallel/test-stream-wrap-drain.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-wrap-drain.js) +- [parallel/test-stream-wrap-encoding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-wrap-encoding.js) +- [parallel/test-stream-wrap.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-wrap.js) +- [parallel/test-stream-writable-samecb-singletick.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream-writable-samecb-singletick.js) +- [parallel/test-stream2-httpclient-response-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-stream2-httpclient-response-end.js) +- [parallel/test-string-decoder-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-string-decoder-end.js) +- [parallel/test-string-decoder-fuzz.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-string-decoder-fuzz.js) +- [parallel/test-structuredClone-global.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-structuredClone-global.js) +- [parallel/test-sync-io-option.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-sync-io-option.js) +- [parallel/test-tcp-wrap-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tcp-wrap-connect.js) +- [parallel/test-tcp-wrap-listen.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tcp-wrap-listen.js) +- [parallel/test-tcp-wrap.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tcp-wrap.js) +- [parallel/test-tick-processor-version-check.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tick-processor-version-check.js) +- [parallel/test-timer-immediate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timer-immediate.js) +- [parallel/test-timers-active.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-active.js) +- [parallel/test-timers-destroyed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-destroyed.js) +- [parallel/test-timers-dispose.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-dispose.js) +- [parallel/test-timers-enroll-invalid-msecs.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-enroll-invalid-msecs.js) +- [parallel/test-timers-enroll-second-time.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-enroll-second-time.js) +- [parallel/test-timers-immediate-promisified.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-immediate-promisified.js) +- [parallel/test-timers-immediate-queue-throw.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-immediate-queue-throw.js) +- [parallel/test-timers-immediate-unref-nested-once.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-immediate-unref-nested-once.js) +- [parallel/test-timers-immediate-unref-simple.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-immediate-unref-simple.js) +- [parallel/test-timers-immediate-unref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-immediate-unref.js) +- [parallel/test-timers-interval-promisified.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-interval-promisified.js) +- [parallel/test-timers-linked-list.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-linked-list.js) +- [parallel/test-timers-max-duration-warning.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-max-duration-warning.js) +- [parallel/test-timers-nested.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-nested.js) +- [parallel/test-timers-next-tick.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-next-tick.js) +- [parallel/test-timers-now.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-now.js) +- [parallel/test-timers-ordering.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-ordering.js) +- [parallel/test-timers-promises-scheduler.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-promises-scheduler.js) +- [parallel/test-timers-reset-process-domain-on-throw.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-reset-process-domain-on-throw.js) +- [parallel/test-timers-this.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-this.js) +- [parallel/test-timers-throw-when-cb-not-function.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-throw-when-cb-not-function.js) +- [parallel/test-timers-timeout-promisified.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-timeout-promisified.js) +- [parallel/test-timers-timeout-to-interval.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-timeout-to-interval.js) +- [parallel/test-timers-to-primitive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-to-primitive.js) +- [parallel/test-timers-unenroll-unref-interval.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-unenroll-unref-interval.js) +- [parallel/test-timers-unref-active.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-unref-active.js) +- [parallel/test-timers-unref-remove-other-unref-timers-only-one-fires.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-unref-remove-other-unref-timers-only-one-fires.js) +- [parallel/test-timers-unref-remove-other-unref-timers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-timers-unref-remove-other-unref-timers.js) +- [parallel/test-tls-0-dns-altname.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-0-dns-altname.js) +- [parallel/test-tls-add-context.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-add-context.js) +- [parallel/test-tls-addca.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-addca.js) +- [parallel/test-tls-alpn-server-client.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-alpn-server-client.js) +- [parallel/test-tls-async-cb-after-socket-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-async-cb-after-socket-end.js) +- [parallel/test-tls-basic-validations.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-basic-validations.js) +- [parallel/test-tls-buffersize.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-buffersize.js) +- [parallel/test-tls-ca-concat.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-ca-concat.js) +- [parallel/test-tls-canonical-ip.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-canonical-ip.js) +- [parallel/test-tls-cert-chains-concat.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-cert-chains-concat.js) +- [parallel/test-tls-cert-chains-in-ca.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-cert-chains-in-ca.js) +- [parallel/test-tls-cert-ext-encoding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-cert-ext-encoding.js) +- [parallel/test-tls-cert-regression.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-cert-regression.js) +- [parallel/test-tls-check-server-identity.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-check-server-identity.js) +- [parallel/test-tls-cipher-list.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-cipher-list.js) +- [parallel/test-tls-cli-max-version-1.2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-cli-max-version-1.2.js) +- [parallel/test-tls-cli-max-version-1.3.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-cli-max-version-1.3.js) +- [parallel/test-tls-cli-min-max-conflict.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-cli-min-max-conflict.js) +- [parallel/test-tls-cli-min-version-1.0.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-cli-min-version-1.0.js) +- [parallel/test-tls-cli-min-version-1.1.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-cli-min-version-1.1.js) +- [parallel/test-tls-cli-min-version-1.2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-cli-min-version-1.2.js) +- [parallel/test-tls-cli-min-version-1.3.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-cli-min-version-1.3.js) +- [parallel/test-tls-client-abort.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-client-abort.js) +- [parallel/test-tls-client-abort2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-client-abort2.js) +- [parallel/test-tls-client-auth.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-client-auth.js) +- [parallel/test-tls-client-default-ciphers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-client-default-ciphers.js) +- [parallel/test-tls-client-destroy-soon.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-client-destroy-soon.js) +- [parallel/test-tls-client-getephemeralkeyinfo.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-client-getephemeralkeyinfo.js) +- [parallel/test-tls-client-mindhsize.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-client-mindhsize.js) +- [parallel/test-tls-client-reject-12.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-client-reject-12.js) +- [parallel/test-tls-client-reject.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-client-reject.js) +- [parallel/test-tls-client-renegotiation-13.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-client-renegotiation-13.js) +- [parallel/test-tls-client-resume-12.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-client-resume-12.js) +- [parallel/test-tls-client-resume.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-client-resume.js) +- [parallel/test-tls-client-verify.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-client-verify.js) +- [parallel/test-tls-clientcertengine-invalid-arg-type.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-clientcertengine-invalid-arg-type.js) +- [parallel/test-tls-clientcertengine-unsupported.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-clientcertengine-unsupported.js) +- [parallel/test-tls-close-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-close-error.js) +- [parallel/test-tls-close-event-after-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-close-event-after-write.js) +- [parallel/test-tls-close-notify.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-close-notify.js) +- [parallel/test-tls-cnnic-whitelist.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-cnnic-whitelist.js) +- [parallel/test-tls-connect-abort-controller.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-connect-abort-controller.js) +- [parallel/test-tls-connect-address-family.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-connect-address-family.js) +- [parallel/test-tls-connect-allow-half-open-option.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-connect-allow-half-open-option.js) +- [parallel/test-tls-connect-given-socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-connect-given-socket.js) +- [parallel/test-tls-connect-hints-option.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-connect-hints-option.js) +- [parallel/test-tls-connect-hwm-option.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-connect-hwm-option.js) +- [parallel/test-tls-connect-memleak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-connect-memleak.js) +- [parallel/test-tls-connect-no-host.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-connect-no-host.js) +- [parallel/test-tls-connect-pipe.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-connect-pipe.js) +- [parallel/test-tls-connect-secure-context.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-connect-secure-context.js) +- [parallel/test-tls-connect-simple.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-connect-simple.js) +- [parallel/test-tls-connect-stream-writes.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-connect-stream-writes.js) +- [parallel/test-tls-connect-timeout-option.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-connect-timeout-option.js) +- [parallel/test-tls-delayed-attach-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-delayed-attach-error.js) +- [parallel/test-tls-delayed-attach.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-delayed-attach.js) +- [parallel/test-tls-destroy-stream-12.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-destroy-stream-12.js) +- [parallel/test-tls-destroy-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-destroy-stream.js) +- [parallel/test-tls-destroy-whilst-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-destroy-whilst-write.js) +- [parallel/test-tls-disable-renegotiation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-disable-renegotiation.js) +- [parallel/test-tls-econnreset.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-econnreset.js) +- [parallel/test-tls-empty-sni-context.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-empty-sni-context.js) +- [parallel/test-tls-enable-keylog-cli.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-enable-keylog-cli.js) +- [parallel/test-tls-env-bad-extra-ca.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-env-bad-extra-ca.js) +- [parallel/test-tls-env-extra-ca-file-load.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-env-extra-ca-file-load.js) +- [parallel/test-tls-env-extra-ca.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-env-extra-ca.js) +- [parallel/test-tls-error-servername.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-error-servername.js) +- [parallel/test-tls-exportkeyingmaterial.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-exportkeyingmaterial.js) +- [parallel/test-tls-external-accessor.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-external-accessor.js) +- [parallel/test-tls-fast-writing.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-fast-writing.js) +- [parallel/test-tls-finished.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-finished.js) +- [parallel/test-tls-friendly-error-message.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-friendly-error-message.js) +- [parallel/test-tls-generic-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-generic-stream.js) +- [parallel/test-tls-getcertificate-x509.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-getcertificate-x509.js) +- [parallel/test-tls-getcipher.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-getcipher.js) +- [parallel/test-tls-getprotocol.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-getprotocol.js) +- [parallel/test-tls-handshake-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-handshake-error.js) +- [parallel/test-tls-handshake-exception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-handshake-exception.js) +- [parallel/test-tls-handshake-nohang.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-handshake-nohang.js) +- [parallel/test-tls-hello-parser-failure.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-hello-parser-failure.js) +- [parallel/test-tls-honorcipherorder.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-honorcipherorder.js) +- [parallel/test-tls-inception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-inception.js) +- [parallel/test-tls-interleave.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-interleave.js) +- [parallel/test-tls-invalid-pfx.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-invalid-pfx.js) +- [parallel/test-tls-invoke-queued.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-invoke-queued.js) +- [parallel/test-tls-ip-servername-deprecation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-ip-servername-deprecation.js) +- [parallel/test-tls-js-stream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-js-stream.js) +- [parallel/test-tls-junk-closes-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-junk-closes-server.js) +- [parallel/test-tls-junk-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-junk-server.js) +- [parallel/test-tls-key-mismatch.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-key-mismatch.js) +- [parallel/test-tls-keyengine-invalid-arg-type.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-keyengine-invalid-arg-type.js) +- [parallel/test-tls-keyengine-unsupported.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-keyengine-unsupported.js) +- [parallel/test-tls-keylog-tlsv13.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-keylog-tlsv13.js) +- [parallel/test-tls-legacy-deprecated.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-legacy-deprecated.js) +- [parallel/test-tls-max-send-fragment.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-max-send-fragment.js) +- [parallel/test-tls-min-max-version.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-min-max-version.js) +- [parallel/test-tls-multi-key.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-multi-key.js) +- [parallel/test-tls-multi-pfx.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-multi-pfx.js) +- [parallel/test-tls-multiple-cas-as-string.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-multiple-cas-as-string.js) +- [parallel/test-tls-net-connect-prefer-path.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-net-connect-prefer-path.js) +- [parallel/test-tls-net-socket-keepalive-12.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-net-socket-keepalive-12.js) +- [parallel/test-tls-net-socket-keepalive.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-net-socket-keepalive.js) +- [parallel/test-tls-no-cert-required.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-no-cert-required.js) +- [parallel/test-tls-no-rsa-key.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-no-rsa-key.js) +- [parallel/test-tls-no-sslv23.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-no-sslv23.js) +- [parallel/test-tls-no-sslv3.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-no-sslv3.js) +- [parallel/test-tls-on-empty-socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-on-empty-socket.js) +- [parallel/test-tls-onread-static-buffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-onread-static-buffer.js) +- [parallel/test-tls-options-boolean-check.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-options-boolean-check.js) +- [parallel/test-tls-over-http-tunnel.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-over-http-tunnel.js) +- [parallel/test-tls-passphrase.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-passphrase.js) +- [parallel/test-tls-pause.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-pause.js) +- [parallel/test-tls-peer-certificate-encoding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-peer-certificate-encoding.js) +- [parallel/test-tls-peer-certificate-multi-keys.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-peer-certificate-multi-keys.js) +- [parallel/test-tls-peer-certificate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-peer-certificate.js) +- [parallel/test-tls-pfx-authorizationerror.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-pfx-authorizationerror.js) +- [parallel/test-tls-psk-circuit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-psk-circuit.js) +- [parallel/test-tls-psk-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-psk-errors.js) +- [parallel/test-tls-reduced-SECLEVEL-in-cipher.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-reduced-SECLEVEL-in-cipher.js) +- [parallel/test-tls-reinitialize-listeners.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-reinitialize-listeners.js) +- [parallel/test-tls-request-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-request-timeout.js) +- [parallel/test-tls-retain-handle-no-abort.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-retain-handle-no-abort.js) +- [parallel/test-tls-reuse-host-from-socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-reuse-host-from-socket.js) +- [parallel/test-tls-root-certificates.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-root-certificates.js) +- [parallel/test-tls-secure-context-usage-order.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-secure-context-usage-order.js) +- [parallel/test-tls-secure-session.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-secure-session.js) +- [parallel/test-tls-securepair-fiftharg.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-securepair-fiftharg.js) +- [parallel/test-tls-securepair-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-securepair-leak.js) +- [parallel/test-tls-server-capture-rejection.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-server-capture-rejection.js) +- [parallel/test-tls-server-connection-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-server-connection-server.js) +- [parallel/test-tls-server-failed-handshake-emits-clienterror.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-server-failed-handshake-emits-clienterror.js) +- [parallel/test-tls-server-parent-constructor-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-server-parent-constructor-options.js) +- [parallel/test-tls-server-setoptions-clientcertengine.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-server-setoptions-clientcertengine.js) +- [parallel/test-tls-set-ciphers-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-set-ciphers-error.js) +- [parallel/test-tls-set-encoding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-set-encoding.js) +- [parallel/test-tls-set-secure-context.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-set-secure-context.js) +- [parallel/test-tls-set-sigalgs.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-set-sigalgs.js) +- [parallel/test-tls-sni-option.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-sni-option.js) +- [parallel/test-tls-sni-server-client.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-sni-server-client.js) +- [parallel/test-tls-sni-servername.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-sni-servername.js) +- [parallel/test-tls-snicallback-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-snicallback-error.js) +- [parallel/test-tls-socket-allow-half-open-option.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-socket-allow-half-open-option.js) +- [parallel/test-tls-socket-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-socket-close.js) +- [parallel/test-tls-socket-constructor-alpn-options-parsing.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-socket-constructor-alpn-options-parsing.js) +- [parallel/test-tls-socket-default-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-socket-default-options.js) +- [parallel/test-tls-socket-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-socket-destroy.js) +- [parallel/test-tls-socket-failed-handshake-emits-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-socket-failed-handshake-emits-error.js) +- [parallel/test-tls-socket-snicallback-without-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-socket-snicallback-without-server.js) +- [parallel/test-tls-startcom-wosign-whitelist.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-startcom-wosign-whitelist.js) +- [parallel/test-tls-starttls-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-starttls-server.js) +- [parallel/test-tls-streamwrap-buffersize.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-streamwrap-buffersize.js) +- [parallel/test-tls-ticket-12.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-ticket-12.js) +- [parallel/test-tls-ticket-cluster.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-ticket-cluster.js) +- [parallel/test-tls-ticket-invalid-arg.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-ticket-invalid-arg.js) +- [parallel/test-tls-ticket.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-ticket.js) +- [parallel/test-tls-timeout-server-2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-timeout-server-2.js) +- [parallel/test-tls-timeout-server.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-timeout-server.js) +- [parallel/test-tls-tlswrap-segfault-2.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-tlswrap-segfault-2.js) +- [parallel/test-tls-tlswrap-segfault.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-tlswrap-segfault.js) +- [parallel/test-tls-translate-peer-certificate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-translate-peer-certificate.js) +- [parallel/test-tls-use-after-free-regression.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-use-after-free-regression.js) +- [parallel/test-tls-wrap-econnreset-localaddress.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-wrap-econnreset-localaddress.js) +- [parallel/test-tls-wrap-econnreset-pipe.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-wrap-econnreset-pipe.js) +- [parallel/test-tls-wrap-econnreset-socket.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-wrap-econnreset-socket.js) +- [parallel/test-tls-wrap-econnreset.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-wrap-econnreset.js) +- [parallel/test-tls-wrap-event-emmiter.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-wrap-event-emmiter.js) +- [parallel/test-tls-wrap-no-abort.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-wrap-no-abort.js) +- [parallel/test-tls-wrap-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-wrap-timeout.js) +- [parallel/test-tls-write-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-write-error.js) +- [parallel/test-tls-writewrap-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-writewrap-leak.js) +- [parallel/test-tls-zero-clear-in.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tls-zero-clear-in.js) +- [parallel/test-tojson-perf_hooks.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tojson-perf_hooks.js) +- [parallel/test-trace-atomics-wait.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-atomics-wait.js) +- [parallel/test-trace-events-all.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-all.js) +- [parallel/test-trace-events-api-worker-disabled.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-api-worker-disabled.js) +- [parallel/test-trace-events-api.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-api.js) +- [parallel/test-trace-events-async-hooks.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-async-hooks.js) +- [parallel/test-trace-events-binding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-binding.js) +- [parallel/test-trace-events-bootstrap.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-bootstrap.js) +- [parallel/test-trace-events-category-used.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-category-used.js) +- [parallel/test-trace-events-console.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-console.js) +- [parallel/test-trace-events-dynamic-enable-workers-disabled.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-dynamic-enable-workers-disabled.js) +- [parallel/test-trace-events-dynamic-enable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-dynamic-enable.js) +- [parallel/test-trace-events-environment.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-environment.js) +- [parallel/test-trace-events-file-pattern.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-file-pattern.js) +- [parallel/test-trace-events-fs-async.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-fs-async.js) +- [parallel/test-trace-events-fs-sync.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-fs-sync.js) +- [parallel/test-trace-events-http.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-http.js) +- [parallel/test-trace-events-metadata.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-metadata.js) +- [parallel/test-trace-events-net.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-net.js) +- [parallel/test-trace-events-none.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-none.js) +- [parallel/test-trace-events-process-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-process-exit.js) +- [parallel/test-trace-events-promises.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-promises.js) +- [parallel/test-trace-events-threadpool.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-threadpool.js) +- [parallel/test-trace-events-v8.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-v8.js) +- [parallel/test-trace-events-vm.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-vm.js) +- [parallel/test-trace-events-worker-metadata-with-name.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-worker-metadata-with-name.js) +- [parallel/test-trace-events-worker-metadata.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-events-worker-metadata.js) +- [parallel/test-trace-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-trace-exit.js) +- [parallel/test-tracing-no-crash.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tracing-no-crash.js) +- [parallel/test-tty-backwards-api.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tty-backwards-api.js) +- [parallel/test-tty-stdin-pipe.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-tty-stdin-pipe.js) +- [parallel/test-ttywrap-stack.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-ttywrap-stack.js) +- [parallel/test-unhandled-exception-rethrow-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-unhandled-exception-rethrow-error.js) +- [parallel/test-unhandled-exception-with-worker-inuse.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-unhandled-exception-with-worker-inuse.js) +- [parallel/test-unicode-node-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-unicode-node-options.js) +- [parallel/test-url-canParse-whatwg.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-url-canParse-whatwg.js) +- [parallel/test-url-is-url.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-url-is-url.js) +- [parallel/test-url-null-char.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-url-null-char.js) +- [parallel/test-url-parse-format.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-url-parse-format.js) +- [parallel/test-util-callbackify.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-util-callbackify.js) +- [parallel/test-util-emit-experimental-warning.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-util-emit-experimental-warning.js) +- [parallel/test-util-internal.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-util-internal.js) +- [parallel/test-util-log.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-util-log.js) +- [parallel/test-util-sigint-watchdog.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-util-sigint-watchdog.js) +- [parallel/test-util-sleep.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-util-sleep.js) +- [parallel/test-uv-errmap.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-uv-errmap.js) +- [parallel/test-uv-errno.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-uv-errno.js) +- [parallel/test-v8-collect-gc-profile-exit-before-stop.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-v8-collect-gc-profile-exit-before-stop.js) +- [parallel/test-v8-collect-gc-profile-in-worker.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-v8-collect-gc-profile-in-worker.js) +- [parallel/test-v8-collect-gc-profile.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-v8-collect-gc-profile.js) +- [parallel/test-v8-flag-type-check.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-v8-flag-type-check.js) +- [parallel/test-v8-flags.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-v8-flags.js) +- [parallel/test-v8-getheapsnapshot-twice.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-v8-getheapsnapshot-twice.js) +- [parallel/test-v8-serialize-leak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-v8-serialize-leak.js) +- [parallel/test-v8-startup-snapshot-api.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-v8-startup-snapshot-api.js) +- [parallel/test-v8-stats.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-v8-stats.js) +- [parallel/test-v8-version-tag.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-v8-version-tag.js) +- [parallel/test-validators.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-validators.js) +- [parallel/test-vfs.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vfs.js) +- [parallel/test-vm-api-handles-getter-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-api-handles-getter-errors.js) +- [parallel/test-vm-basic.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-basic.js) +- [parallel/test-vm-cached-data.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-cached-data.js) +- [parallel/test-vm-context.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-context.js) +- [parallel/test-vm-dynamic-import-callback-missing-flag.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-dynamic-import-callback-missing-flag.js) +- [parallel/test-vm-global-get-own.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-global-get-own.js) +- [parallel/test-vm-global-non-writable-properties.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-global-non-writable-properties.js) +- [parallel/test-vm-global-property-interceptors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-global-property-interceptors.js) +- [parallel/test-vm-measure-memory-lazy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-measure-memory-lazy.js) +- [parallel/test-vm-measure-memory-multi-context.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-measure-memory-multi-context.js) +- [parallel/test-vm-measure-memory.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-measure-memory.js) +- [parallel/test-vm-module-basic.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-module-basic.js) +- [parallel/test-vm-module-cached-data.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-module-cached-data.js) +- [parallel/test-vm-module-dynamic-import.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-module-dynamic-import.js) +- [parallel/test-vm-module-dynamic-namespace.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-module-dynamic-namespace.js) +- [parallel/test-vm-module-errors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-module-errors.js) +- [parallel/test-vm-module-import-meta.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-module-import-meta.js) +- [parallel/test-vm-module-link.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-module-link.js) +- [parallel/test-vm-module-reevaluate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-module-reevaluate.js) +- [parallel/test-vm-module-synthetic.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-module-synthetic.js) +- [parallel/test-vm-no-dynamic-import-callback.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-no-dynamic-import-callback.js) +- [parallel/test-vm-run-in-new-context.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-run-in-new-context.js) +- [parallel/test-vm-sigint-existing-handler.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-sigint-existing-handler.js) +- [parallel/test-vm-sigint.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-sigint.js) +- [parallel/test-vm-strict-assign.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-strict-assign.js) +- [parallel/test-vm-syntax-error-message.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-syntax-error-message.js) +- [parallel/test-vm-syntax-error-stderr.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-syntax-error-stderr.js) +- [parallel/test-vm-timeout-escape-promise-module.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-vm-timeout-escape-promise-module.js) +- [parallel/test-warn-sigprof.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-warn-sigprof.js) +- [parallel/test-warn-stream-wrap.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-warn-stream-wrap.js) +- [parallel/test-webcrypto-constructors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-constructors.js) +- [parallel/test-webcrypto-cryptokey-workers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-cryptokey-workers.js) +- [parallel/test-webcrypto-derivebits-cfrg.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-derivebits-cfrg.js) +- [parallel/test-webcrypto-derivebits-ecdh.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-derivebits-ecdh.js) +- [parallel/test-webcrypto-derivebits-hkdf.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-derivebits-hkdf.js) +- [parallel/test-webcrypto-derivebits.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-derivebits.js) +- [parallel/test-webcrypto-derivekey-cfrg.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-derivekey-cfrg.js) +- [parallel/test-webcrypto-derivekey-ecdh.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-derivekey-ecdh.js) +- [parallel/test-webcrypto-derivekey.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-derivekey.js) +- [parallel/test-webcrypto-digest.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-digest.js) +- [parallel/test-webcrypto-encrypt-decrypt-aes.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-encrypt-decrypt-aes.js) +- [parallel/test-webcrypto-encrypt-decrypt-rsa.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-encrypt-decrypt-rsa.js) +- [parallel/test-webcrypto-export-import-cfrg.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-export-import-cfrg.js) +- [parallel/test-webcrypto-export-import-ec.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-export-import-ec.js) +- [parallel/test-webcrypto-export-import-rsa.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-export-import-rsa.js) +- [parallel/test-webcrypto-export-import.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-export-import.js) +- [parallel/test-webcrypto-getRandomValues.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-getRandomValues.js) +- [parallel/test-webcrypto-keygen.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-keygen.js) +- [parallel/test-webcrypto-random.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-random.js) +- [parallel/test-webcrypto-sign-verify-ecdsa.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-sign-verify-ecdsa.js) +- [parallel/test-webcrypto-sign-verify-eddsa.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-sign-verify-eddsa.js) +- [parallel/test-webcrypto-sign-verify-hmac.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-sign-verify-hmac.js) +- [parallel/test-webcrypto-sign-verify-rsa.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-sign-verify-rsa.js) +- [parallel/test-webcrypto-util.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-util.js) +- [parallel/test-webcrypto-webidl.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-webidl.js) +- [parallel/test-webcrypto-wrap-unwrap.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webcrypto-wrap-unwrap.js) +- [parallel/test-webstream-encoding-inspect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webstream-encoding-inspect.js) +- [parallel/test-webstream-readablestream-pipeto.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webstream-readablestream-pipeto.js) +- [parallel/test-webstreams-abort-controller.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webstreams-abort-controller.js) +- [parallel/test-webstreams-compose.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webstreams-compose.js) +- [parallel/test-webstreams-finished.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webstreams-finished.js) +- [parallel/test-webstreams-pipeline.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-webstreams-pipeline.js) +- [parallel/test-whatwg-encoding-custom-fatal-streaming.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-encoding-custom-fatal-streaming.js) +- [parallel/test-whatwg-encoding-custom-internals.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-encoding-custom-internals.js) +- [parallel/test-whatwg-encoding-custom-interop.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-encoding-custom-interop.js) +- [parallel/test-whatwg-encoding-custom-textdecoder-api-invalid-label.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-encoding-custom-textdecoder-api-invalid-label.js) +- [parallel/test-whatwg-encoding-custom-textdecoder-fatal.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-encoding-custom-textdecoder-fatal.js) +- [parallel/test-whatwg-encoding-custom-textdecoder-invalid-arg.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-encoding-custom-textdecoder-invalid-arg.js) +- [parallel/test-whatwg-encoding-custom-textdecoder-utf16-surrogates.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-encoding-custom-textdecoder-utf16-surrogates.js) +- [parallel/test-whatwg-encoding-custom-textdecoder.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-encoding-custom-textdecoder.js) +- [parallel/test-whatwg-events-event-constructors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-events-event-constructors.js) +- [parallel/test-whatwg-events-eventtarget-this-of-listener.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-events-eventtarget-this-of-listener.js) +- [parallel/test-whatwg-readablebytestream-bad-buffers-and-views.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-readablebytestream-bad-buffers-and-views.js) +- [parallel/test-whatwg-readablebytestream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-readablebytestream.js) +- [parallel/test-whatwg-readablestream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-readablestream.js) +- [parallel/test-whatwg-transformstream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-transformstream.js) +- [parallel/test-whatwg-url-canparse.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-canparse.js) +- [parallel/test-whatwg-url-custom-domainto.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-domainto.js) +- [parallel/test-whatwg-url-custom-inspect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-inspect.js) +- [parallel/test-whatwg-url-custom-parsing.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-parsing.js) +- [parallel/test-whatwg-url-custom-properties.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-properties.js) +- [parallel/test-whatwg-url-custom-searchparams-append.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-searchparams-append.js) +- [parallel/test-whatwg-url-custom-searchparams-constructor.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-searchparams-constructor.js) +- [parallel/test-whatwg-url-custom-searchparams-delete.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-searchparams-delete.js) +- [parallel/test-whatwg-url-custom-searchparams-entries.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-searchparams-entries.js) +- [parallel/test-whatwg-url-custom-searchparams-foreach.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-searchparams-foreach.js) +- [parallel/test-whatwg-url-custom-searchparams-get.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-searchparams-get.js) +- [parallel/test-whatwg-url-custom-searchparams-getall.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-searchparams-getall.js) +- [parallel/test-whatwg-url-custom-searchparams-has.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-searchparams-has.js) +- [parallel/test-whatwg-url-custom-searchparams-inspect.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-searchparams-inspect.js) +- [parallel/test-whatwg-url-custom-searchparams-keys.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-searchparams-keys.js) +- [parallel/test-whatwg-url-custom-searchparams-set.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-searchparams-set.js) +- [parallel/test-whatwg-url-custom-searchparams-sort.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-searchparams-sort.js) +- [parallel/test-whatwg-url-custom-searchparams-stringifier.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-searchparams-stringifier.js) +- [parallel/test-whatwg-url-custom-searchparams-values.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-searchparams-values.js) +- [parallel/test-whatwg-url-custom-searchparams.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-searchparams.js) +- [parallel/test-whatwg-url-custom-setters.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-custom-setters.js) +- [parallel/test-whatwg-url-invalidthis.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-invalidthis.js) +- [parallel/test-whatwg-url-toascii.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-url-toascii.js) +- [parallel/test-whatwg-webstreams-adapters-streambase.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-webstreams-adapters-streambase.js) +- [parallel/test-whatwg-webstreams-adapters-to-readablestream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-webstreams-adapters-to-readablestream.js) +- [parallel/test-whatwg-webstreams-adapters-to-readablewritablepair.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-webstreams-adapters-to-readablewritablepair.js) +- [parallel/test-whatwg-webstreams-adapters-to-streamduplex.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-webstreams-adapters-to-streamduplex.js) +- [parallel/test-whatwg-webstreams-adapters-to-streamreadable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-webstreams-adapters-to-streamreadable.js) +- [parallel/test-whatwg-webstreams-adapters-to-streamwritable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-webstreams-adapters-to-streamwritable.js) +- [parallel/test-whatwg-webstreams-adapters-to-writablestream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-webstreams-adapters-to-writablestream.js) +- [parallel/test-whatwg-webstreams-compression.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-webstreams-compression.js) +- [parallel/test-whatwg-webstreams-coverage.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-webstreams-coverage.js) +- [parallel/test-whatwg-webstreams-encoding.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-webstreams-encoding.js) +- [parallel/test-whatwg-webstreams-transfer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-webstreams-transfer.js) +- [parallel/test-whatwg-writablestream.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-whatwg-writablestream.js) +- [parallel/test-windows-abort-exitcode.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-windows-abort-exitcode.js) +- [parallel/test-windows-failed-heap-allocation.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-windows-failed-heap-allocation.js) +- [parallel/test-worker-abort-on-uncaught-exception-terminate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-abort-on-uncaught-exception-terminate.js) +- [parallel/test-worker-abort-on-uncaught-exception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-abort-on-uncaught-exception.js) +- [parallel/test-worker-arraybuffer-zerofill.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-arraybuffer-zerofill.js) +- [parallel/test-worker-beforeexit-throw-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-beforeexit-throw-exit.js) +- [parallel/test-worker-broadcastchannel-wpt.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-broadcastchannel-wpt.js) +- [parallel/test-worker-broadcastchannel.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-broadcastchannel.js) +- [parallel/test-worker-cjs-workerdata.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-cjs-workerdata.js) +- [parallel/test-worker-cleanexit-with-moduleload.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-cleanexit-with-moduleload.js) +- [parallel/test-worker-cleanup-handles.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-cleanup-handles.js) +- [parallel/test-worker-console-listeners.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-console-listeners.js) +- [parallel/test-worker-crypto-sign-transfer-result.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-crypto-sign-transfer-result.js) +- [parallel/test-worker-data-url.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-data-url.js) +- [parallel/test-worker-debug.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-debug.js) +- [parallel/test-worker-dns-terminate-during-query.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-dns-terminate-during-query.js) +- [parallel/test-worker-dns-terminate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-dns-terminate.js) +- [parallel/test-worker-environmentdata.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-environmentdata.js) +- [parallel/test-worker-error-stack-getter-throws.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-error-stack-getter-throws.js) +- [parallel/test-worker-esm-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-esm-exit.js) +- [parallel/test-worker-esm-missing-main.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-esm-missing-main.js) +- [parallel/test-worker-esmodule.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-esmodule.js) +- [parallel/test-worker-event.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-event.js) +- [parallel/test-worker-execargv-invalid.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-execargv-invalid.js) +- [parallel/test-worker-execargv.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-execargv.js) +- [parallel/test-worker-exit-code.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-exit-code.js) +- [parallel/test-worker-exit-event-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-exit-event-error.js) +- [parallel/test-worker-exit-from-uncaught-exception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-exit-from-uncaught-exception.js) +- [parallel/test-worker-exit-heapsnapshot.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-exit-heapsnapshot.js) +- [parallel/test-worker-fs-stat-watcher.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-fs-stat-watcher.js) +- [parallel/test-worker-hasref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-hasref.js) +- [parallel/test-worker-heap-snapshot.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-heap-snapshot.js) +- [parallel/test-worker-heapdump-failure.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-heapdump-failure.js) +- [parallel/test-worker-http2-generic-streams-terminate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-http2-generic-streams-terminate.js) +- [parallel/test-worker-http2-stream-terminate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-http2-stream-terminate.js) +- [parallel/test-worker-init-failure.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-init-failure.js) +- [parallel/test-worker-invalid-workerdata.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-invalid-workerdata.js) +- [parallel/test-worker-load-file-with-extension-other-than-js.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-load-file-with-extension-other-than-js.js) +- [parallel/test-worker-memory.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-memory.js) +- [parallel/test-worker-message-channel-sharedarraybuffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-channel-sharedarraybuffer.js) +- [parallel/test-worker-message-channel.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-channel.js) +- [parallel/test-worker-message-event.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-event.js) +- [parallel/test-worker-message-not-serializable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-not-serializable.js) +- [parallel/test-worker-message-port-arraybuffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-arraybuffer.js) +- [parallel/test-worker-message-port-close-while-receiving.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-close-while-receiving.js) +- [parallel/test-worker-message-port-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-close.js) +- [parallel/test-worker-message-port-constructor.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-constructor.js) +- [parallel/test-worker-message-port-drain.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-drain.js) +- [parallel/test-worker-message-port-inspect-during-init-hook.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-inspect-during-init-hook.js) +- [parallel/test-worker-message-port-jstransferable-nested-untransferable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-jstransferable-nested-untransferable.js) +- [parallel/test-worker-message-port-message-before-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-message-before-close.js) +- [parallel/test-worker-message-port-message-port-transferring.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-message-port-transferring.js) +- [parallel/test-worker-message-port-move.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-move.js) +- [parallel/test-worker-message-port-terminate-transfer-list.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-terminate-transfer-list.js) +- [parallel/test-worker-message-port-transfer-closed.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-transfer-closed.js) +- [parallel/test-worker-message-port-transfer-duplicate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-transfer-duplicate.js) +- [parallel/test-worker-message-port-transfer-fake-js-transferable-internal.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-transfer-fake-js-transferable-internal.js) +- [parallel/test-worker-message-port-transfer-fake-js-transferable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-transfer-fake-js-transferable.js) +- [parallel/test-worker-message-port-transfer-filehandle.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-transfer-filehandle.js) +- [parallel/test-worker-message-port-transfer-native.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-transfer-native.js) +- [parallel/test-worker-message-port-transfer-self.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-transfer-self.js) +- [parallel/test-worker-message-port-transfer-target.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-transfer-target.js) +- [parallel/test-worker-message-port-transfer-terminate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-transfer-terminate.js) +- [parallel/test-worker-message-port-wasm-module.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-wasm-module.js) +- [parallel/test-worker-message-port-wasm-threads.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port-wasm-threads.js) +- [parallel/test-worker-message-port.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-port.js) +- [parallel/test-worker-message-transfer-port-mark-as-untransferable.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-transfer-port-mark-as-untransferable.js) +- [parallel/test-worker-message-type-unknown.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-message-type-unknown.js) +- [parallel/test-worker-messageport-hasref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-messageport-hasref.js) +- [parallel/test-worker-mjs-workerdata.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-mjs-workerdata.js) +- [parallel/test-worker-name.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-name.js) +- [parallel/test-worker-nearheaplimit-deadlock.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-nearheaplimit-deadlock.js) +- [parallel/test-worker-nested-on-process-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-nested-on-process-exit.js) +- [parallel/test-worker-nested-uncaught.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-nested-uncaught.js) +- [parallel/test-worker-nexttick-terminate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-nexttick-terminate.js) +- [parallel/test-worker-no-atomics.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-no-atomics.js) +- [parallel/test-worker-no-sab.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-no-sab.js) +- [parallel/test-worker-no-stdin-stdout-interaction.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-no-stdin-stdout-interaction.js) +- [parallel/test-worker-non-fatal-uncaught-exception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-non-fatal-uncaught-exception.js) +- [parallel/test-worker-onmessage-not-a-function.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-onmessage-not-a-function.js) +- [parallel/test-worker-onmessage.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-onmessage.js) +- [parallel/test-worker-parent-port-ref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-parent-port-ref.js) +- [parallel/test-worker-process-argv.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-process-argv.js) +- [parallel/test-worker-process-cwd.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-process-cwd.js) +- [parallel/test-worker-process-env-shared.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-process-env-shared.js) +- [parallel/test-worker-process-env.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-process-env.js) +- [parallel/test-worker-process-exit-async-module.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-process-exit-async-module.js) +- [parallel/test-worker-ref.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-ref.js) +- [parallel/test-worker-relative-path-double-dot.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-relative-path-double-dot.js) +- [parallel/test-worker-relative-path.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-relative-path.js) +- [parallel/test-worker-resource-limits.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-resource-limits.js) +- [parallel/test-worker-safe-getters.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-safe-getters.js) +- [parallel/test-worker-sharedarraybuffer-from-worker-thread.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-sharedarraybuffer-from-worker-thread.js) +- [parallel/test-worker-stack-overflow-stack-size.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-stack-overflow-stack-size.js) +- [parallel/test-worker-stack-overflow.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-stack-overflow.js) +- [parallel/test-worker-stdio-from-preload-module.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-stdio-from-preload-module.js) +- [parallel/test-worker-stdio.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-stdio.js) +- [parallel/test-worker-syntax-error-file.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-syntax-error-file.js) +- [parallel/test-worker-syntax-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-syntax-error.js) +- [parallel/test-worker-terminate-http2-respond-with-file.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-terminate-http2-respond-with-file.js) +- [parallel/test-worker-terminate-microtask-loop.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-terminate-microtask-loop.js) +- [parallel/test-worker-terminate-nested.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-terminate-nested.js) +- [parallel/test-worker-terminate-null-handler.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-terminate-null-handler.js) +- [parallel/test-worker-terminate-ref-public-port.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-terminate-ref-public-port.js) +- [parallel/test-worker-terminate-source-map.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-terminate-source-map.js) +- [parallel/test-worker-terminate-timers.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-terminate-timers.js) +- [parallel/test-worker-track-unmanaged-fds.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-track-unmanaged-fds.js) +- [parallel/test-worker-type-check.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-type-check.js) +- [parallel/test-worker-uncaught-exception-async.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-uncaught-exception-async.js) +- [parallel/test-worker-uncaught-exception.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-uncaught-exception.js) +- [parallel/test-worker-unref-from-message-during-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-unref-from-message-during-exit.js) +- [parallel/test-worker-unsupported-path.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-unsupported-path.js) +- [parallel/test-worker-unsupported-things.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-unsupported-things.js) +- [parallel/test-worker-vm-context-terminate.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-vm-context-terminate.js) +- [parallel/test-worker-voluntarily-exit-followed-by-addition.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-voluntarily-exit-followed-by-addition.js) +- [parallel/test-worker-voluntarily-exit-followed-by-throw.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-voluntarily-exit-followed-by-throw.js) +- [parallel/test-worker-workerdata-messageport.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-workerdata-messageport.js) +- [parallel/test-worker-workerdata-sharedarraybuffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker-workerdata-sharedarraybuffer.js) +- [parallel/test-worker.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-worker.js) +- [parallel/test-wrap-js-stream-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-wrap-js-stream-destroy.js) +- [parallel/test-wrap-js-stream-duplex.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-wrap-js-stream-duplex.js) +- [parallel/test-wrap-js-stream-exceptions.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-wrap-js-stream-exceptions.js) +- [parallel/test-wrap-js-stream-read-stop.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-wrap-js-stream-read-stop.js) +- [parallel/test-x509-escaping.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-x509-escaping.js) +- [parallel/test-zlib-brotli-16GB.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-brotli-16GB.js) +- [parallel/test-zlib-brotli-flush.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-brotli-flush.js) +- [parallel/test-zlib-brotli-from-brotli.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-brotli-from-brotli.js) +- [parallel/test-zlib-brotli-from-string.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-brotli-from-string.js) +- [parallel/test-zlib-brotli-kmaxlength-rangeerror.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-brotli-kmaxlength-rangeerror.js) +- [parallel/test-zlib-brotli.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-brotli.js) +- [parallel/test-zlib-bytes-read.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-bytes-read.js) +- [parallel/test-zlib-close-in-ondata.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-close-in-ondata.js) +- [parallel/test-zlib-const.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-const.js) +- [parallel/test-zlib-deflate-constructors.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-deflate-constructors.js) +- [parallel/test-zlib-destroy.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-destroy.js) +- [parallel/test-zlib-dictionary-fail.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-dictionary-fail.js) +- [parallel/test-zlib-dictionary.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-dictionary.js) +- [parallel/test-zlib-failed-init.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-failed-init.js) +- [parallel/test-zlib-flush-drain-longblock.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-flush-drain-longblock.js) +- [parallel/test-zlib-flush-drain.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-flush-drain.js) +- [parallel/test-zlib-flush-flags.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-flush-flags.js) +- [parallel/test-zlib-flush.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-flush.js) +- [parallel/test-zlib-from-concatenated-gzip.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-from-concatenated-gzip.js) +- [parallel/test-zlib-from-gzip-with-trailing-garbage.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-from-gzip-with-trailing-garbage.js) +- [parallel/test-zlib-from-gzip.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-from-gzip.js) +- [parallel/test-zlib-invalid-arg-value-brotli-compress.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-invalid-arg-value-brotli-compress.js) +- [parallel/test-zlib-invalid-input-memory.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-invalid-input-memory.js) +- [parallel/test-zlib-kmaxlength-rangeerror.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-kmaxlength-rangeerror.js) +- [parallel/test-zlib-maxOutputLength.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-maxOutputLength.js) +- [parallel/test-zlib-not-string-or-buffer.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-not-string-or-buffer.js) +- [parallel/test-zlib-object-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-object-write.js) +- [parallel/test-zlib-params.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-params.js) +- [parallel/test-zlib-premature-end.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-premature-end.js) +- [parallel/test-zlib-reset-before-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-reset-before-write.js) +- [parallel/test-zlib-unused-weak.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-unused-weak.js) +- [parallel/test-zlib-write-after-close.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib-write-after-close.js) +- [parallel/test-zlib.js](https://github.com/nodejs/node/tree/v20.11.1/test/parallel/test-zlib.js) +- [pseudo-tty/readline-dumb-tty.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/readline-dumb-tty.js) +- [pseudo-tty/ref_keeps_node_running.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/ref_keeps_node_running.js) +- [pseudo-tty/repl-dumb-tty.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/repl-dumb-tty.js) +- [pseudo-tty/stdin-setrawmode.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/stdin-setrawmode.js) +- [pseudo-tty/test-assert-colors.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-assert-colors.js) +- [pseudo-tty/test-assert-no-color.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-assert-no-color.js) +- [pseudo-tty/test-assert-position-indicator.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-assert-position-indicator.js) +- [pseudo-tty/test-async-wrap-getasyncid-tty.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-async-wrap-getasyncid-tty.js) +- [pseudo-tty/test-fatal-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-fatal-error.js) +- [pseudo-tty/test-handle-wrap-hasref-tty.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-handle-wrap-hasref-tty.js) +- [pseudo-tty/test-readable-tty-keepalive.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-readable-tty-keepalive.js) +- [pseudo-tty/test-repl-external-module.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-repl-external-module.js) +- [pseudo-tty/test-set-raw-mode-reset-signal.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-set-raw-mode-reset-signal.js) +- [pseudo-tty/test-stderr-stdout-handle-sigwinch.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-stderr-stdout-handle-sigwinch.js) +- [pseudo-tty/test-stdin-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-stdin-write.js) +- [pseudo-tty/test-stdout-read.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-stdout-read.js) +- [pseudo-tty/test-trace-sigint-disabled.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-trace-sigint-disabled.js) +- [pseudo-tty/test-trace-sigint-on-idle.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-trace-sigint-on-idle.js) +- [pseudo-tty/test-trace-sigint.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-trace-sigint.js) +- [pseudo-tty/test-tty-color-support.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-tty-color-support.js) +- [pseudo-tty/test-tty-isatty.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-tty-isatty.js) +- [pseudo-tty/test-tty-stdout-resize.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-tty-stdout-resize.js) +- [pseudo-tty/test-tty-stream-constructors.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-tty-stream-constructors.js) +- [pseudo-tty/test-tty-window-size.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-tty-window-size.js) +- [pseudo-tty/test-tty-wrap.js](https://github.com/nodejs/node/tree/v20.11.1/test/pseudo-tty/test-tty-wrap.js) +- [pummel/test-child-process-spawn-loop.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-child-process-spawn-loop.js) +- [pummel/test-crypto-dh-keys.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-crypto-dh-keys.js) +- [pummel/test-fs-watch-file-slow.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-fs-watch-file-slow.js) +- [pummel/test-fs-watch-file.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-fs-watch-file.js) +- [pummel/test-fs-watch-non-recursive.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-fs-watch-non-recursive.js) +- [pummel/test-hash-seed.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-hash-seed.js) +- [pummel/test-heapdump-dns.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-heapdump-dns.js) +- [pummel/test-heapdump-env.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-heapdump-env.js) +- [pummel/test-heapdump-fs-promise.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-heapdump-fs-promise.js) +- [pummel/test-heapdump-http2.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-heapdump-http2.js) +- [pummel/test-heapdump-inspector.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-heapdump-inspector.js) +- [pummel/test-heapdump-shadow-realm.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-heapdump-shadow-realm.js) +- [pummel/test-heapdump-tls.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-heapdump-tls.js) +- [pummel/test-heapdump-worker.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-heapdump-worker.js) +- [pummel/test-heapdump-zlib.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-heapdump-zlib.js) +- [pummel/test-heapsnapshot-near-heap-limit-bounded.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-heapsnapshot-near-heap-limit-bounded.js) +- [pummel/test-heapsnapshot-near-heap-limit-by-api.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-heapsnapshot-near-heap-limit-by-api.js) +- [pummel/test-heapsnapshot-near-heap-limit.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-heapsnapshot-near-heap-limit.js) +- [pummel/test-http-many-keep-alive-connections.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-http-many-keep-alive-connections.js) +- [pummel/test-http-upload-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-http-upload-timeout.js) +- [pummel/test-https-large-response.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-https-large-response.js) +- [pummel/test-https-no-reader.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-https-no-reader.js) +- [pummel/test-keep-alive.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-keep-alive.js) +- [pummel/test-net-pause.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-net-pause.js) +- [pummel/test-net-pingpong.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-net-pingpong.js) +- [pummel/test-net-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-net-timeout.js) +- [pummel/test-net-timeout2.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-net-timeout2.js) +- [pummel/test-net-write-callbacks.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-net-write-callbacks.js) +- [pummel/test-next-tick-infinite-calls.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-next-tick-infinite-calls.js) +- [pummel/test-policy-integrity-dep.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-policy-integrity-dep.js) +- [pummel/test-policy-integrity-parent-commonjs.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-policy-integrity-parent-commonjs.js) +- [pummel/test-policy-integrity-parent-module.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-policy-integrity-parent-module.js) +- [pummel/test-policy-integrity-parent-no-package-json.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-policy-integrity-parent-no-package-json.js) +- [pummel/test-policy-integrity-worker-commonjs.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-policy-integrity-worker-commonjs.js) +- [pummel/test-policy-integrity-worker-module.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-policy-integrity-worker-module.js) +- [pummel/test-policy-integrity-worker-no-package-json.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-policy-integrity-worker-no-package-json.js) +- [pummel/test-process-hrtime.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-process-hrtime.js) +- [pummel/test-regress-GH-892.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-regress-GH-892.js) +- [pummel/test-timers.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-timers.js) +- [pummel/test-tls-server-large-request.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-tls-server-large-request.js) +- [pummel/test-tls-throttle.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-tls-throttle.js) +- [pummel/test-vm-memleak.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-vm-memleak.js) +- [pummel/test-vm-race.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-vm-race.js) +- [pummel/test-watch-file.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-watch-file.js) +- [pummel/test-webcrypto-derivebits-pbkdf2.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-webcrypto-derivebits-pbkdf2.js) +- [pummel/test-worker-take-heapsnapshot.js](https://github.com/nodejs/node/tree/v20.11.1/test/pummel/test-worker-take-heapsnapshot.js) +- [sequential/test-async-wrap-getasyncid.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-async-wrap-getasyncid.js) +- [sequential/test-child-process-emfile.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-child-process-emfile.js) +- [sequential/test-child-process-execsync.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-child-process-execsync.js) +- [sequential/test-child-process-pass-fd.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-child-process-pass-fd.js) +- [sequential/test-cli-syntax-bad.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cli-syntax-bad.js) +- [sequential/test-cli-syntax-file-not-found.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cli-syntax-file-not-found.js) +- [sequential/test-cli-syntax-good.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cli-syntax-good.js) +- [sequential/test-cli-syntax-require.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cli-syntax-require.js) +- [sequential/test-cluster-inspect-brk.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cluster-inspect-brk.js) +- [sequential/test-cluster-net-listen-ipv6only-none.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cluster-net-listen-ipv6only-none.js) +- [sequential/test-cluster-net-listen-ipv6only-rr.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cluster-net-listen-ipv6only-rr.js) +- [sequential/test-cluster-send-handle-large-payload.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cluster-send-handle-large-payload.js) +- [sequential/test-cpu-prof-default.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cpu-prof-default.js) +- [sequential/test-cpu-prof-dir-absolute.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cpu-prof-dir-absolute.js) +- [sequential/test-cpu-prof-dir-and-name.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cpu-prof-dir-and-name.js) +- [sequential/test-cpu-prof-dir-relative.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cpu-prof-dir-relative.js) +- [sequential/test-cpu-prof-dir-worker.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cpu-prof-dir-worker.js) +- [sequential/test-cpu-prof-drained.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cpu-prof-drained.js) +- [sequential/test-cpu-prof-exit.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cpu-prof-exit.js) +- [sequential/test-cpu-prof-invalid-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cpu-prof-invalid-options.js) +- [sequential/test-cpu-prof-kill.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cpu-prof-kill.js) +- [sequential/test-cpu-prof-name.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cpu-prof-name.js) +- [sequential/test-cpu-prof-worker-argv.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-cpu-prof-worker-argv.js) +- [sequential/test-crypto-timing-safe-equal.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-crypto-timing-safe-equal.js) +- [sequential/test-debug-prompt.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-debug-prompt.js) +- [sequential/test-debugger-custom-port.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-debugger-custom-port.js) +- [sequential/test-debugger-debug-brk.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-debugger-debug-brk.js) +- [sequential/test-debugger-invalid-args.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-debugger-invalid-args.js) +- [sequential/test-debugger-pid.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-debugger-pid.js) +- [sequential/test-deprecation-flags.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-deprecation-flags.js) +- [sequential/test-dgram-bind-shared-ports.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-dgram-bind-shared-ports.js) +- [sequential/test-dgram-implicit-bind-failure.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-dgram-implicit-bind-failure.js) +- [sequential/test-dgram-pingpong.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-dgram-pingpong.js) +- [sequential/test-diagnostic-dir-cpu-prof.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-diagnostic-dir-cpu-prof.js) +- [sequential/test-diagnostic-dir-heap-prof.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-diagnostic-dir-heap-prof.js) +- [sequential/test-fs-opendir-recursive.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-fs-opendir-recursive.js) +- [sequential/test-fs-readdir-recursive.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-fs-readdir-recursive.js) +- [sequential/test-fs-stat-sync-overflow.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-fs-stat-sync-overflow.js) +- [sequential/test-fs-watch.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-fs-watch.js) +- [sequential/test-gc-http-client-onerror.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-gc-http-client-onerror.js) +- [sequential/test-gc-http-client-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-gc-http-client-timeout.js) +- [sequential/test-gc-http-client.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-gc-http-client.js) +- [sequential/test-get-heapsnapshot-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-get-heapsnapshot-options.js) +- [sequential/test-heapdump-flag-custom-dir.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-heapdump-flag-custom-dir.js) +- [sequential/test-heapdump-flag.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-heapdump-flag.js) +- [sequential/test-heapdump.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-heapdump.js) +- [sequential/test-http-econnrefused.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-http-econnrefused.js) +- [sequential/test-http-keep-alive-large-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-http-keep-alive-large-write.js) +- [sequential/test-http-keepalive-maxsockets.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-http-keepalive-maxsockets.js) +- [sequential/test-http-max-sockets.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-http-max-sockets.js) +- [sequential/test-http-regr-gh-2928.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-http-regr-gh-2928.js) +- [sequential/test-http-server-keep-alive-timeout-slow-client-headers.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-http-server-keep-alive-timeout-slow-client-headers.js) +- [sequential/test-http2-large-file.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-http2-large-file.js) +- [sequential/test-http2-max-session-memory.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-http2-max-session-memory.js) +- [sequential/test-http2-ping-flood.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-http2-ping-flood.js) +- [sequential/test-http2-settings-flood.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-http2-settings-flood.js) +- [sequential/test-http2-timeout-large-write-file.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-http2-timeout-large-write-file.js) +- [sequential/test-http2-timeout-large-write.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-http2-timeout-large-write.js) +- [sequential/test-https-connect-localport.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-https-connect-localport.js) +- [sequential/test-https-server-keep-alive-timeout.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-https-server-keep-alive-timeout.js) +- [sequential/test-init.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-init.js) +- [sequential/test-inspector-port-cluster.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-inspector-port-cluster.js) +- [sequential/test-module-loading.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-module-loading.js) +- [sequential/test-net-GH-5504.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-net-GH-5504.js) +- [sequential/test-net-better-error-messages-port.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-net-better-error-messages-port.js) +- [sequential/test-net-connect-econnrefused.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-net-connect-econnrefused.js) +- [sequential/test-net-connect-handle-econnrefused.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-net-connect-handle-econnrefused.js) +- [sequential/test-net-listen-shared-ports.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-net-listen-shared-ports.js) +- [sequential/test-net-localport.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-net-localport.js) +- [sequential/test-net-reconnect-error.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-net-reconnect-error.js) +- [sequential/test-net-server-address.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-net-server-address.js) +- [sequential/test-next-tick-error-spin.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-next-tick-error-spin.js) +- [sequential/test-perf-hooks.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-perf-hooks.js) +- [sequential/test-performance-eventloopdelay.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-performance-eventloopdelay.js) +- [sequential/test-pipe.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-pipe.js) +- [sequential/test-process-title.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-process-title.js) +- [sequential/test-process-warnings.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-process-warnings.js) +- [sequential/test-repl-timeout-throw.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-repl-timeout-throw.js) +- [sequential/test-require-cache-without-stat.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-require-cache-without-stat.js) +- [sequential/test-resolution-inspect-brk.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-resolution-inspect-brk.js) +- [sequential/test-single-executable-application-disable-experimental-sea-warning.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-single-executable-application-disable-experimental-sea-warning.js) +- [sequential/test-single-executable-application-empty.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-single-executable-application-empty.js) +- [sequential/test-single-executable-application-snapshot-and-code-cache.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-single-executable-application-snapshot-and-code-cache.js) +- [sequential/test-single-executable-application-snapshot.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-single-executable-application-snapshot.js) +- [sequential/test-single-executable-application-use-code-cache.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-single-executable-application-use-code-cache.js) +- [sequential/test-single-executable-application.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-single-executable-application.js) +- [sequential/test-stream2-fs.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-stream2-fs.js) +- [sequential/test-stream2-stderr-sync.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-stream2-stderr-sync.js) +- [sequential/test-timers-block-eventloop.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-timers-block-eventloop.js) +- [sequential/test-timers-set-interval-excludes-callback-duration.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-timers-set-interval-excludes-callback-duration.js) +- [sequential/test-tls-connect.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-tls-connect.js) +- [sequential/test-util-debug.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-util-debug.js) +- [sequential/test-vm-break-on-sigint.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-vm-break-on-sigint.js) +- [sequential/test-vm-timeout-escape-promise-module-2.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-vm-timeout-escape-promise-module-2.js) +- [sequential/test-vm-timeout-rethrow.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-vm-timeout-rethrow.js) +- [sequential/test-worker-eventlooputil.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-worker-eventlooputil.js) +- [sequential/test-worker-fshandles-error-on-termination.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-worker-fshandles-error-on-termination.js) +- [sequential/test-worker-fshandles-open-close-on-termination.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-worker-fshandles-open-close-on-termination.js) +- [sequential/test-worker-heapsnapshot-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-worker-heapsnapshot-options.js) +- [sequential/test-worker-prof.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-worker-prof.js) +- [sequential/test-write-heapsnapshot-options.js](https://github.com/nodejs/node/tree/v20.11.1/test/sequential/test-write-heapsnapshot-options.js) diff --git a/tests/node_compat/runner/challenge_new_test.ts b/tests/node_compat/runner/challenge_new_test.ts new file mode 100644 index 00000000000000..c95391d3e0aae0 --- /dev/null +++ b/tests/node_compat/runner/challenge_new_test.ts @@ -0,0 +1,72 @@ +// Copyright 2018-2025 the Deno authors. MIT license. +// deno-lint-ignore-file no-console + +import { deadline } from "@std/async/deadline"; +import { ensureDir } from "@std/fs/ensure-dir"; +import { copy } from "@std/fs/copy"; +import { withoutAll } from "@std/collections/without-all"; +import { + getDenoTests, + getNodeTests, + NODE_COMPAT_TEST_DEST_URL, + runNodeCompatTestCase, + VENDORED_NODE_TEST, +} from "../common.ts"; +import { fromFileUrl } from "@std/path/from-file-url"; + +/** The timeout ms for single test execution. If a single test didn't finish in this timeout milliseconds, the test is considered as failure */ +const TIMEOUT = 2000; + +async function main() { + const remainingTests = withoutAll(await getNodeTests(), await getDenoTests()); + + console.log(`Remaining tests: ${remainingTests.length}`); + const success = [] as string[]; + let i = 0; + + Deno.addSignalListener("SIGINT", () => { + console.log(`Success: ${success.length}`); + for (const testPath of success) { + console.log(testPath); + } + Deno.exit(1); + }); + + for (const testPath of remainingTests) { + i++; + const source = new URL(testPath, VENDORED_NODE_TEST); + const dest = new URL(testPath, NODE_COMPAT_TEST_DEST_URL); + + await ensureDir(new URL(".", dest)); + await copy(source, dest); + const num = String(i).padStart(4, " "); + try { + const cp = await runNodeCompatTestCase( + fromFileUrl(dest), + AbortSignal.timeout(TIMEOUT), + ); + const result = await deadline(cp.output(), TIMEOUT + 1000); + if (result.code === 0) { + console.log(`${num} %cPASS`, "color: green", testPath); + success.push(testPath); + } else { + console.log(`${num} %cFAIL`, "color: red", testPath); + } + } catch (e) { + if (e instanceof DOMException && e.name === "TimeoutError") { + console.log(`${num} %cFAIL`, "color: red", testPath); + } else { + console.log(`Unexpected Error`, e); + } + } finally { + await Deno.remove(dest); + } + } + console.log(`Success: ${success.length}`); + for (const testPath of success) { + console.log(testPath); + } + Deno.exit(0); +} + +await main(); diff --git a/tests/node_compat/runner/setup.ts b/tests/node_compat/runner/setup.ts index 37f1aba9b25934..d256842e144798 100755 --- a/tests/node_compat/runner/setup.ts +++ b/tests/node_compat/runner/setup.ts @@ -1,5 +1,5 @@ #!/usr/bin/env -S deno run --allow-read=. --allow-write=. --allow-run=git --config=tests/config/deno.json -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-console @@ -10,61 +10,19 @@ import { SEPARATOR } from "@std/path/constants"; import { ensureFile } from "@std/fs/ensure-file"; import { writeAll } from "@std/io/write-all"; import { withoutAll } from "@std/collections/without-all"; -import { relative } from "@std/path/posix/relative"; - -import { config, ignoreList } from "../common.ts"; +import { version } from "./suite/node_version.ts"; +import { + config, + getDenoTests, + getNodeTests, + ignoreList, + NODE_COMPAT_TEST_DEST_URL, + VENDORED_NODE_TEST, +} from "../common.ts"; const encoder = new TextEncoder(); -const NODE_VERSION = config.nodeVersion; - -const NODE_IGNORED_TEST_DIRS = [ - "addons", - "async-hooks", - "cctest", - "common", - "doctool", - "embedding", - "fixtures", - "fuzzers", - "js-native-api", - "node-api", - "overlapped-checker", - "report", - "testpy", - "tick-processor", - "tools", - "v8-updates", - "wasi", - "wpt", -]; - -const VENDORED_NODE_TEST = new URL("./suite/test/", import.meta.url); -const NODE_COMPAT_TEST_DEST_URL = new URL( - "../test/", - import.meta.url, -); - -async function getNodeTests(): Promise { - const paths: string[] = []; - const rootPath = VENDORED_NODE_TEST.href.slice(7); - for await ( - const item of walk(VENDORED_NODE_TEST, { exts: [".js"] }) - ) { - const path = relative(rootPath, item.path); - if (NODE_IGNORED_TEST_DIRS.every((dir) => !path.startsWith(dir))) { - paths.push(path); - } - } - - return paths.sort(); -} - -function getDenoTests() { - return Object.entries(config.tests) - .filter(([testDir]) => !NODE_IGNORED_TEST_DIRS.includes(testDir)) - .flatMap(([testDir, tests]) => tests.map((test) => testDir + "/" + test)); -} +const NODE_VERSION = version; async function updateToDo() { using file = await Deno.open(new URL("./TODO.md", import.meta.url), { @@ -73,15 +31,24 @@ async function updateToDo() { truncate: true, }); - const missingTests = withoutAll(await getNodeTests(), await getDenoTests()); + const nodeTests = await getNodeTests(); + const portedTests = await getDenoTests(); + const remainingTests = withoutAll(nodeTests, portedTests); + const numPorted = portedTests.length; + const numMissing = remainingTests.length; + const numTotal = nodeTests.length; + const portedPercentage = (numPorted / numTotal * 100).toFixed(2); + const remainingPercentage = (numMissing / numTotal * 100).toFixed(2); await file.write(encoder.encode(` # Remaining Node Tests +${numPorted} tests out of ${numTotal} have been ported from Node ${NODE_VERSION} (${portedPercentage}% ported, ${remainingPercentage}% remaining). + NOTE: This file should not be manually edited. Please edit \`tests/node_compat/config.json\` and run \`deno task setup\` in \`tests/node_compat/runner\` dir instead. `)); - for (const test of missingTests) { + for (const test of remainingTests) { await file.write( encoder.encode( `- [${test}](https://github.com/nodejs/node/tree/v${NODE_VERSION}/test/${test})\n`, @@ -157,7 +124,9 @@ await copyTests(); await updateToDo(); if (Deno.args[0] === "--check") { - const cmd = new Deno.Command("git", { args: ["status", "-s"] }); + const cmd = new Deno.Command("git", { + args: ["status", "-s", "tests/node_compat/test"], + }); const { stdout } = await cmd.output(); if (stdout.length > 0) { diff --git a/tests/node_compat/runner/suite b/tests/node_compat/runner/suite index d12a68fc493006..1c9511e584eb9d 160000 --- a/tests/node_compat/runner/suite +++ b/tests/node_compat/runner/suite @@ -1 +1 @@ -Subproject commit d12a68fc4930062c0bed26447a6b5245697e77c1 +Subproject commit 1c9511e584eb9d465bcd4b1e6c05ecedf7f15549 diff --git a/tests/node_compat/test.ts b/tests/node_compat/test.ts index 6cb41d2e452c72..fe6b2e879b1bc3 100644 --- a/tests/node_compat/test.ts +++ b/tests/node_compat/test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-console @@ -24,6 +24,7 @@ import { config, getPathsFromTestSuites, partitionParallelTestPaths, + runNodeCompatTestCase, } from "./common.ts"; // If the test case is invoked like @@ -40,7 +41,6 @@ const testPaths = partitionParallelTestPaths( testPaths.sequential = distinct(testPaths.sequential); testPaths.parallel = distinct(testPaths.parallel); -const cwd = new URL(".", import.meta.url); const windowsIgnorePaths = new Set( getPathsFromTestSuites(config.windowsIgnore), ); @@ -49,13 +49,6 @@ const darwinIgnorePaths = new Set( ); const decoder = new TextDecoder(); -let testSerialId = 0; - -function parseFlags(source: string): string[] { - const line = /^\/\/ Flags: (.+)$/um.exec(source); - if (line == null) return []; - return line[1].split(" "); -} async function runTest(t: Deno.TestContext, path: string): Promise { // If filter patterns are given and any pattern doesn't match @@ -77,60 +70,7 @@ async function runTest(t: Deno.TestContext, path: string): Promise { sanitizeExit: false, fn: async () => { const testCase = join(toolsPath, "test", path); - - const v8Flags = ["--stack-size=4000"]; - const testSource = await Deno.readTextFile(testCase); - const envVars: Record = {}; - const knownGlobals: string[] = []; - parseFlags(testSource).forEach((flag) => { - switch (flag) { - case "--expose_externalize_string": - v8Flags.push("--expose-externalize-string"); - knownGlobals.push("createExternalizableString"); - break; - case "--expose-gc": - v8Flags.push("--expose-gc"); - knownGlobals.push("gc"); - break; - default: - break; - } - }); - if (knownGlobals.length > 0) { - envVars["NODE_TEST_KNOWN_GLOBALS"] = knownGlobals.join(","); - } - // TODO(nathanwhit): once we match node's behavior on executing - // `node:test` tests when we run a file, we can remove this - const usesNodeTest = testSource.includes("node:test"); - const args = [ - usesNodeTest ? "test" : "run", - "-A", - "--quiet", - //"--unsafely-ignore-certificate-errors", - "--unstable-unsafe-proto", - "--unstable-bare-node-builtins", - "--unstable-fs", - "--v8-flags=" + v8Flags.join(), - ]; - if (usesNodeTest) { - // deno test typechecks by default + we want to pass script args - args.push("--no-check", "runner.ts", "--", testCase); - } else { - args.push("runner.ts", testCase); - } - - // Pipe stdout in order to output each test result as Deno.test output - // That way the tests will respect the `--quiet` option when provided - const command = new Deno.Command(Deno.execPath(), { - args, - env: { - TEST_SERIAL_ID: String(testSerialId++), - ...envVars, - }, - cwd, - stdout: "piped", - stderr: "piped", - }).spawn(); + const command = await runNodeCompatTestCase(testCase); const warner = setTimeout(() => { console.error(`Test is running slow: ${testCase}`); }, 2 * 60_000); diff --git a/tests/node_compat/test/abort/test-addon-uv-handle-leak.js b/tests/node_compat/test/abort/test-addon-uv-handle-leak.js new file mode 100644 index 00000000000000..618eea481dc9b4 --- /dev/null +++ b/tests/node_compat/test/abort/test-addon-uv-handle-leak.js @@ -0,0 +1,143 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const fs = require('fs'); +const path = require('path'); +const cp = require('child_process'); +const { spawnSync } = require('child_process'); + +// This is a sibling test to test/addons/uv-handle-leak. + +const bindingPath = path.resolve( + __dirname, '..', 'addons', 'uv-handle-leak', 'build', + `${common.buildType}/binding.node`); + +if (!fs.existsSync(bindingPath)) + common.skip('binding not built yet'); + +if (process.argv[2] === 'child') { + + const { Worker } = require('worker_threads'); + + // The worker thread loads and then unloads `bindingPath`. Because of this the + // symbols in `bindingPath` are lost when the worker thread quits, but the + // number of open handles in the worker thread's event loop is assessed in the + // main thread afterwards, and the names of the callbacks associated with the + // open handles is retrieved at that time as well. Thus, we require + // `bindingPath` here so that the symbols and their names survive the life + // cycle of the worker thread. + require(bindingPath); + + new Worker(` + const binding = require(${JSON.stringify(bindingPath)}); + + binding.leakHandle(); + binding.leakHandle(0); + binding.leakHandle(0x42); + `, { eval: true }); +} else { + const child = cp.spawnSync(process.execPath, [__filename, 'child']); + const stderr = child.stderr.toString(); + + assert.strictEqual(child.stdout.toString(), ''); + + const lines = stderr.split('\n'); + + let state = 'initial'; + + // Parse output that is formatted like this: + + // uv loop at [0x559b65ed5770] has open handles: + // [0x7f2de0018430] timer (active) + // Close callback: 0x7f2df31de220 CloseCallback(uv_handle_s*) [...] + // Data: 0x7f2df33df140 example_instance [...] + // (First field): 0x7f2df33dedc0 vtable for ExampleOwnerClass [...] + // [0x7f2de000b870] timer + // Close callback: 0x7f2df31de220 CloseCallback(uv_handle_s*) [...] + // Data: (nil) + // [0x7f2de000b910] timer + // Close callback: 0x7f2df31de220 CloseCallback(uv_handle_s*) [...] + // Data: 0x42 + // uv loop at [0x559b65ed5770] has 3 open handles in total + + function isGlibc() { + try { + const lddOut = spawnSync('ldd', [process.execPath]).stdout; + const libcInfo = lddOut.toString().split('\n').map( + (line) => line.match(/libc\.so.+=>\s*(\S+)\s/)).filter((info) => info); + if (libcInfo.length === 0) + return false; + const nmOut = spawnSync('nm', ['-D', libcInfo[0][1]]).stdout; + if (/gnu_get_libc_version/.test(nmOut)) + return true; + } catch { + return false; + } + } + + + if (!(common.isFreeBSD || + common.isAIX || + common.isIBMi || + (common.isLinux && !isGlibc()) || + common.isWindows)) { + assert(stderr.includes('ExampleOwnerClass'), stderr); + assert(stderr.includes('CloseCallback'), stderr); + assert(stderr.includes('example_instance'), stderr); + } + + while (lines.length > 0) { + const line = lines.shift().trim(); + if (line.length === 0) { + continue; // Skip empty lines. + } + + switch (state) { + case 'initial': + assert.match(line, /^uv loop at \[.+\] has open handles:$/); + state = 'handle-start'; + break; + case 'handle-start': + if (/^uv loop at \[.+\] has \d+ open handles in total$/.test(line)) { + state = 'source-line'; + break; + } + assert.match(line, /^\[.+\] timer( \(active\))?$/); + state = 'close-callback'; + break; + case 'close-callback': + assert.match(line, /^Close callback:/); + state = 'data'; + break; + case 'data': + assert.match(line, /^Data: .+$/); + state = 'maybe-first-field'; + break; + case 'maybe-first-field': + if (!/^\(First field\)/.test(line)) { + lines.unshift(line); + } + state = 'handle-start'; + break; + case 'source-line': + assert.match(line, /CheckedUvLoopClose/); + state = 'assertion-failure'; + break; + case 'assertion-failure': + assert.match(line, /Assertion failed:/); + state = 'done'; + break; + case 'done': + break; + } + } + + assert.strictEqual(state, 'done'); +} diff --git a/tests/node_compat/test/benchmark/test-benchmark-async-hooks.js b/tests/node_compat/test/benchmark/test-benchmark-async-hooks.js new file mode 100644 index 00000000000000..282d1b2fcf9516 --- /dev/null +++ b/tests/node_compat/test/benchmark/test-benchmark-async-hooks.js @@ -0,0 +1,20 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); + +if (!common.hasCrypto) + common.skip('missing crypto'); + +if (!common.enoughTestMem) + common.skip('Insufficient memory for async_hooks benchmark test'); + +const runBenchmark = require('../common/benchmark'); + +runBenchmark('async_hooks'); diff --git a/tests/node_compat/test/benchmark/test-benchmark-http.js b/tests/node_compat/test/benchmark/test-benchmark-http.js new file mode 100644 index 00000000000000..ee54b6ba376bb3 --- /dev/null +++ b/tests/node_compat/test/benchmark/test-benchmark-http.js @@ -0,0 +1,21 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); + +if (!common.enoughTestMem) + common.skip('Insufficient memory for HTTP benchmark test'); + +// Because the http benchmarks use hardcoded ports, this should be in sequential +// rather than parallel to make sure it does not conflict with tests that choose +// random available ports. + +const runBenchmark = require('../common/benchmark'); + +runBenchmark('http', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); diff --git a/tests/node_compat/test/benchmark/test-benchmark-http2.js b/tests/node_compat/test/benchmark/test-benchmark-http2.js new file mode 100644 index 00000000000000..d880132577f29e --- /dev/null +++ b/tests/node_compat/test/benchmark/test-benchmark-http2.js @@ -0,0 +1,23 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +if (!common.enoughTestMem) + common.skip('Insufficient memory for HTTP/2 benchmark test'); + +// Because the http benchmarks use hardcoded ports, this should be in sequential +// rather than parallel to make sure it does not conflict with tests that choose +// random available ports. + +const runBenchmark = require('../common/benchmark'); + +runBenchmark('http2', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); diff --git a/tests/node_compat/test/benchmark/test-benchmark-tls.js b/tests/node_compat/test/benchmark/test-benchmark-tls.js new file mode 100644 index 00000000000000..ae97d0987254d0 --- /dev/null +++ b/tests/node_compat/test/benchmark/test-benchmark-tls.js @@ -0,0 +1,24 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); + +if (!common.hasCrypto) + common.skip('missing crypto'); + +if (!common.enoughTestMem) + common.skip('Insufficient memory for TLS benchmark test'); + +// Because the TLS benchmarks use hardcoded ports, this should be in sequential +// rather than parallel to make sure it does not conflict with tests that choose +// random available ports. + +const runBenchmark = require('../common/benchmark'); + +runBenchmark('tls', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); diff --git a/tests/node_compat/test/benchmark/test-benchmark-worker.js b/tests/node_compat/test/benchmark/test-benchmark-worker.js new file mode 100644 index 00000000000000..ef65c9cc2137ab --- /dev/null +++ b/tests/node_compat/test/benchmark/test-benchmark-worker.js @@ -0,0 +1,21 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); + +if (!common.enoughTestMem) + common.skip('Insufficient memory for Worker benchmark test'); + +// Because the worker benchmarks can run on different threads, +// this should be in sequential rather than parallel to make sure +// it does not conflict with tests that choose random available ports. + +const runBenchmark = require('../common/benchmark'); + +runBenchmark('worker', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); diff --git a/tests/node_compat/test/common/child_process.js b/tests/node_compat/test/common/child_process.js index e30ec0c0008e60..fd6676f570191e 100644 --- a/tests/node_compat/test/common/child_process.js +++ b/tests/node_compat/test/common/child_process.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/common/countdown.js b/tests/node_compat/test/common/countdown.js index 67742db188ddfc..1e3512e54089b3 100644 --- a/tests/node_compat/test/common/countdown.js +++ b/tests/node_compat/test/common/countdown.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/common/dns.js b/tests/node_compat/test/common/dns.js index e8301344c12def..b3b92a18e0740a 100644 --- a/tests/node_compat/test/common/dns.js +++ b/tests/node_compat/test/common/dns.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/common/duplexpair.js b/tests/node_compat/test/common/duplexpair.js index fdd77f9dd641af..782c4673952c18 100644 --- a/tests/node_compat/test/common/duplexpair.js +++ b/tests/node_compat/test/common/duplexpair.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/common/fixtures.js b/tests/node_compat/test/common/fixtures.js index 08c8fd20cc60a8..6f68d8a0aab4d6 100644 --- a/tests/node_compat/test/common/fixtures.js +++ b/tests/node_compat/test/common/fixtures.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/common/hijackstdio.js b/tests/node_compat/test/common/hijackstdio.js index db35fda5650d47..cb4be687f192d7 100644 --- a/tests/node_compat/test/common/hijackstdio.js +++ b/tests/node_compat/test/common/hijackstdio.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/common/index.mjs b/tests/node_compat/test/common/index.mjs index d9992e67d766d0..1ede6073156e33 100644 --- a/tests/node_compat/test/common/index.mjs +++ b/tests/node_compat/test/common/index.mjs @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. import { createRequire } from 'module'; diff --git a/tests/node_compat/test/common/tmpdir.js b/tests/node_compat/test/common/tmpdir.js index 9315b874711cfe..c8951a1992fb73 100644 --- a/tests/node_compat/test/common/tmpdir.js +++ b/tests/node_compat/test/common/tmpdir.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/es-module/test-cjs-prototype-pollution.js b/tests/node_compat/test/es-module/test-cjs-prototype-pollution.js new file mode 100644 index 00000000000000..8859653f49ac27 --- /dev/null +++ b/tests/node_compat/test/es-module/test-cjs-prototype-pollution.js @@ -0,0 +1,19 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const { mustNotCall, mustCall } = require('../common'); + +Object.defineProperties(Object.prototype, { + then: { + set: mustNotCall('set %Object.prototype%.then'), + get: mustNotCall('get %Object.prototype%.then'), + }, +}); + +import('data:text/javascript,').then(mustCall()); diff --git a/tests/node_compat/test/es-module/test-esm-dynamic-import-mutating-fs.js b/tests/node_compat/test/es-module/test-esm-dynamic-import-mutating-fs.js new file mode 100644 index 00000000000000..7e5050a87d0c1b --- /dev/null +++ b/tests/node_compat/test/es-module/test-esm-dynamic-import-mutating-fs.js @@ -0,0 +1,29 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const tmpdir = require('../common/tmpdir'); + +const assert = require('node:assert'); +const fs = require('node:fs/promises'); + +tmpdir.refresh(); +const target = tmpdir.fileURL(`${Math.random()}.mjs`); + +(async () => { + + await assert.rejects(import(target), { code: 'ERR_MODULE_NOT_FOUND' }); + + await fs.writeFile(target, 'export default "actual target"\n'); + + const moduleRecord = await import(target); + + await fs.rm(target); + + assert.strictEqual(await import(target), moduleRecord); +})().then(common.mustCall()); diff --git a/tests/node_compat/test/es-module/test-esm-loader-cache-clearing.js b/tests/node_compat/test/es-module/test-esm-loader-cache-clearing.js new file mode 100644 index 00000000000000..0f511fc867ac78 --- /dev/null +++ b/tests/node_compat/test/es-module/test-esm-loader-cache-clearing.js @@ -0,0 +1,17 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); + +const { cache } = require; + +Object.keys(cache).forEach((key) => { + delete cache[key]; +}); +// Require the same module again triggers the crash +require('../common'); diff --git a/tests/node_compat/test/es-module/test-esm-windows.js b/tests/node_compat/test/es-module/test-esm-windows.js new file mode 100644 index 00000000000000..9150dbc1d9e402 --- /dev/null +++ b/tests/node_compat/test/es-module/test-esm-windows.js @@ -0,0 +1,54 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +// This test ensures that JavaScript file that includes +// a reserved Windows word can be loaded as ESM module + +const common = require('../common'); +const tmpdir = require('../common/tmpdir'); +const assert = require('assert'); +const fs = require('fs').promises; +const path = require('path'); + +const imp = (file) => { + return import(path.relative(__dirname, file).replace(/\\/g, '/')); +}; + +(async () => { + tmpdir.refresh(); + const rel = (file) => tmpdir.resolve(file); + + { // Load a single script + const file = rel('con.mjs'); + await fs.writeFile(file, 'export default "ok"'); + assert.strictEqual((await imp(file)).default, 'ok'); + await fs.unlink(file); + } + + { // Load a module + const entry = rel('entry.mjs'); + const nmDir = rel('node_modules'); + const mDir = rel('node_modules/con'); + const pkg = rel('node_modules/con/package.json'); + const script = rel('node_modules/con/index.mjs'); + + await fs.writeFile(entry, 'export {default} from "con"'); + await fs.mkdir(nmDir); + await fs.mkdir(mDir); + await fs.writeFile(pkg, '{"main":"index.mjs"}'); + await fs.writeFile(script, 'export default "ok"'); + + assert.strictEqual((await imp(entry)).default, 'ok'); + await fs.unlink(script); + await fs.unlink(pkg); + await fs.rmdir(mDir); + await fs.rmdir(nmDir); + await fs.unlink(entry); + } +})().then(common.mustCall()); diff --git a/tests/node_compat/test/es-module/test-vm-compile-function-lineoffset.js b/tests/node_compat/test/es-module/test-vm-compile-function-lineoffset.js new file mode 100644 index 00000000000000..d287a3afb6d260 --- /dev/null +++ b/tests/node_compat/test/es-module/test-vm-compile-function-lineoffset.js @@ -0,0 +1,41 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +require('../common'); + +const assert = require('assert'); +const { compileFunction } = require('node:vm'); + +const min = -2147483648; +const max = 2147483647; + +compileFunction('', [], { lineOffset: min, columnOffset: min }); +compileFunction('', [], { lineOffset: max, columnOffset: max }); + +assert.throws( + () => { + compileFunction('', [], { lineOffset: min - 1, columnOffset: max }); + }, + { + code: 'ERR_OUT_OF_RANGE', + name: 'RangeError', + message: /The value of "options\.lineOffset" is out of range/, + } +); + +assert.throws( + () => { + compileFunction('', [], { lineOffset: min, columnOffset: min - 1 }); + }, + { + code: 'ERR_OUT_OF_RANGE', + name: 'RangeError', + message: /The value of "options\.columnOffset" is out of range/, + } +); diff --git a/tests/node_compat/test/fixtures/GH-1899-output.js b/tests/node_compat/test/fixtures/GH-1899-output.js index ffb0515cbc00e8..736ce3681e5333 100644 --- a/tests/node_compat/test/fixtures/GH-1899-output.js +++ b/tests/node_compat/test/fixtures/GH-1899-output.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/fixtures/a.js b/tests/node_compat/test/fixtures/a.js index b63484fe5c7e46..18504e4781d003 100644 --- a/tests/node_compat/test/fixtures/a.js +++ b/tests/node_compat/test/fixtures/a.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/fixtures/child-process-persistent.js b/tests/node_compat/test/fixtures/child-process-persistent.js index 520c4bebc14f87..9ca3f6b6a2c2f7 100644 --- a/tests/node_compat/test/fixtures/child-process-persistent.js +++ b/tests/node_compat/test/fixtures/child-process-persistent.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. setInterval(function() {}, 9999); diff --git a/tests/node_compat/test/fixtures/child_process_should_emit_error.js b/tests/node_compat/test/fixtures/child_process_should_emit_error.js index e2bbad2dda7215..e1c42d1d6d3d07 100644 --- a/tests/node_compat/test/fixtures/child_process_should_emit_error.js +++ b/tests/node_compat/test/fixtures/child_process_should_emit_error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/fixtures/loop.js b/tests/node_compat/test/fixtures/loop.js index aad83d0f67ecce..e815aaabd9e3d8 100644 --- a/tests/node_compat/test/fixtures/loop.js +++ b/tests/node_compat/test/fixtures/loop.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. var t = 1; diff --git a/tests/node_compat/test/internet/test-dns-any.js b/tests/node_compat/test/internet/test-dns-any.js deleted file mode 100644 index b8a70b8e2e7136..00000000000000 --- a/tests/node_compat/test/internet/test-dns-any.js +++ /dev/null @@ -1,194 +0,0 @@ -// deno-fmt-ignore-file -// deno-lint-ignore-file - -// Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 16.13.0 -// This file is automatically generated by "node/_tools/setup.ts". Do not modify this file manually - -// TODO(cmorten): enable remaining tests once functionality is implemented. - -'use strict'; - -const common = require('../common'); - -const assert = require('assert'); -const dns = require('dns'); -const net = require('net'); - -let running = false; -const queue = []; - -const dnsPromises = dns.promises; -const isIPv4 = net.isIPv4; -const isIPv6 = net.isIPv6; - -dns.setServers([ '8.8.8.8', '8.8.4.4' ]); - -function checkWrap(req) { - assert.ok(typeof req === 'object'); -} - -const checkers = { - checkA(r) { - assert.ok(isIPv4(r.address)); - // assert.strictEqual(typeof r.ttl, 'number'); - assert.strictEqual(r.type, 'A'); - }, - checkAAAA(r) { - assert.ok(isIPv6(r.address)); - // assert.strictEqual(typeof r.ttl, 'number'); - assert.strictEqual(r.type, 'AAAA'); - }, - checkCNAME(r) { - assert.ok(r.value); - assert.strictEqual(typeof r.value, 'string'); - assert.strictEqual(r.type, 'CNAME'); - }, - checkMX(r) { - assert.strictEqual(typeof r.exchange, 'string'); - assert.strictEqual(typeof r.priority, 'number'); - assert.strictEqual(r.type, 'MX'); - }, - checkNAPTR(r) { - assert.strictEqual(typeof r.flags, 'string'); - assert.strictEqual(typeof r.service, 'string'); - assert.strictEqual(typeof r.regexp, 'string'); - assert.strictEqual(typeof r.replacement, 'string'); - assert.strictEqual(typeof r.order, 'number'); - assert.strictEqual(typeof r.preference, 'number'); - assert.strictEqual(r.type, 'NAPTR'); - }, - checkNS(r) { - assert.strictEqual(typeof r.value, 'string'); - assert.strictEqual(r.type, 'NS'); - }, - checkPTR(r) { - assert.strictEqual(typeof r.value, 'string'); - assert.strictEqual(r.type, 'PTR'); - }, - checkTXT(r) { - assert.ok(Array.isArray(r.entries)); - assert.ok(r.entries.length > 0); - assert.strictEqual(r.type, 'TXT'); - }, - checkSOA(r) { - assert.strictEqual(typeof r.nsname, 'string'); - assert.strictEqual(typeof r.hostmaster, 'string'); - assert.strictEqual(typeof r.serial, 'number'); - assert.strictEqual(typeof r.refresh, 'number'); - assert.strictEqual(typeof r.retry, 'number'); - assert.strictEqual(typeof r.expire, 'number'); - assert.strictEqual(typeof r.minttl, 'number'); - assert.strictEqual(r.type, 'SOA'); - }, - checkSRV(r) { - assert.strictEqual(typeof r.name, 'string'); - assert.strictEqual(typeof r.port, 'number'); - assert.strictEqual(typeof r.priority, 'number'); - assert.strictEqual(typeof r.weight, 'number'); - assert.strictEqual(r.type, 'SRV'); - } -}; - -function TEST(f) { - function next() { - const f = queue.shift(); - if (f) { - running = true; - f(done); - } - } - - function done() { - running = false; - process.nextTick(next); - } - - queue.push(f); - - if (!running) { - next(); - } -} - -function processResult(res) { - assert.ok(Array.isArray(res)); - assert.ok(res.length > 0); - - const types = {}; - res.forEach((obj) => { - types[obj.type] = true; - checkers[`check${obj.type}`](obj); - }); - - return types; -} - -TEST(async function test_sip2sip_for_naptr(done) { - function validateResult(res) { - const types = processResult(res); - assert.ok( - types.A && types.NS && types.NAPTR && types.SOA, - `Missing record type, found ${Object.keys(types)}` - ); - } - - validateResult(await dnsPromises.resolve('sip2sip.info', 'ANY')); - - const req = dns.resolve( - 'sip2sip.info', - 'ANY', - common.mustSucceed((ret) => { - validateResult(ret); - done(); - })); - - checkWrap(req); -}); - -TEST(async function test_google_for_cname_and_srv(done) { - function validateResult(res) { - const types = processResult(res); - assert.ok(types.SRV); - } - - // TODO(kt3k): Temporarily use _caldav._tcp.google.com instead of - // _jabber._tcp.google.com, which currently doesn't respond - // validateResult(await dnsPromises.resolve('_jabber._tcp.google.com', 'ANY')); - validateResult(await dnsPromises.resolve('_caldav._tcp.google.com', 'ANY')); - - - // TODO(kt3k): Temporarily use _caldav._tcp.google.com instead of - // _jabber._tcp.google.com, which currently doesn't respond - const req = dns.resolve( - // '_jabber._tcp.google.com', - '_caldav._tcp.google.com', - 'ANY', - common.mustSucceed((ret) => { - validateResult(ret); - done(); - })); - - checkWrap(req); -}); - -// TODO(bartlomieju): this test started failing on CI on Dec 28th, 2023 returning -// ENOTFOUND. It's unclear what's going on, since `dig -x 8.8.8.8.in-addr.arpa` -// TEST(async function test_ptr(done) { -// function validateResult(res) { -// const types = processResult(res); -// assert.ok(types.PTR); -// } - -// validateResult(await dnsPromises.resolve('8.8.8.8.in-addr.arpa', 'ANY')); - -// const req = dns.resolve( -// '8.8.8.8.in-addr.arpa', -// 'ANY', -// common.mustSucceed((ret) => { -// validateResult(ret); -// done(); -// })); - -// checkWrap(req); -// }); diff --git a/tests/node_compat/test/internet/test-dns-idna2008.js b/tests/node_compat/test/internet/test-dns-idna2008.js index 9527ec22fd3c74..21072829370f0f 100644 --- a/tests/node_compat/test/internet/test-dns-idna2008.js +++ b/tests/node_compat/test/internet/test-dns-idna2008.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/internet/test-dns-ipv4.js b/tests/node_compat/test/internet/test-dns-ipv4.js deleted file mode 100644 index 43b60950a0b04d..00000000000000 --- a/tests/node_compat/test/internet/test-dns-ipv4.js +++ /dev/null @@ -1,257 +0,0 @@ -// deno-fmt-ignore-file -// deno-lint-ignore-file - -// Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 16.13.0 -// This file is automatically generated by "node/_tools/setup.ts". Do not modify this file manually - -'use strict'; - -// TODO: enable remaining tests once functionality is implemented. - -const common = require('../common'); -const { addresses } = require('../common/internet'); -const assert = require('assert'); -const dns = require('dns'); -const net = require('net'); -// const util = require('util'); -const isIPv4 = net.isIPv4; - -const dnsPromises = dns.promises; -let running = false; -const queue = []; - -function TEST(f) { - function next() { - const f = queue.shift(); - if (f) { - running = true; - console.log(f.name); - f(done); - } - } - - function done() { - running = false; - process.nextTick(next); - } - - queue.push(f); - - if (!running) { - next(); - } -} - -function checkWrap(req) { - assert.ok(typeof req === 'object'); -} - -TEST(async function test_resolve4(done) { - function validateResult(res) { - assert.ok(res.length > 0); - - for (let i = 0; i < res.length; i++) { - assert.ok(isIPv4(res[i])); - } - } - - validateResult(await dnsPromises.resolve4(addresses.INET4_HOST)); - - const req = dns.resolve4( - addresses.INET4_HOST, - common.mustSucceed((ips) => { - validateResult(ips); - done(); - })); - - checkWrap(req); -}); - -// TEST(async function test_reverse_ipv4(done) { -// function validateResult(res) { -// assert.ok(res.length > 0); - -// for (let i = 0; i < res.length; i++) { -// assert.ok(res[i]); -// assert.ok(typeof res[i] === 'string'); -// } -// } - -// validateResult(await dnsPromises.reverse(addresses.INET4_IP)); - -// const req = dns.reverse( -// addresses.INET4_IP, -// common.mustSucceed((domains) => { -// validateResult(domains); -// done(); -// })); - -// checkWrap(req); -// }); - -TEST(async function test_lookup_ipv4_explicit(done) { - function validateResult(res) { - assert.ok(net.isIPv4(res.address)); - assert.strictEqual(res.family, 4); - } - - validateResult(await dnsPromises.lookup(addresses.INET4_HOST, 4)); - - const req = dns.lookup( - addresses.INET4_HOST, 4, - common.mustSucceed((ip, family) => { - validateResult({ address: ip, family }); - done(); - })); - - checkWrap(req); -}); - -TEST(async function test_lookup_ipv4_implicit(done) { - function validateResult(res) { - assert.ok(net.isIPv4(res.address)); - assert.strictEqual(res.family, 4); - } - - validateResult(await dnsPromises.lookup(addresses.INET4_HOST)); - - const req = dns.lookup( - addresses.INET4_HOST, - common.mustSucceed((ip, family) => { - validateResult({ address: ip, family }); - done(); - })); - - checkWrap(req); -}); - -TEST(async function test_lookup_ipv4_explicit_object(done) { - function validateResult(res) { - assert.ok(net.isIPv4(res.address)); - assert.strictEqual(res.family, 4); - } - - validateResult(await dnsPromises.lookup(addresses.INET4_HOST, { family: 4 })); - - const req = dns.lookup(addresses.INET4_HOST, { - family: 4 - }, common.mustSucceed((ip, family) => { - validateResult({ address: ip, family }); - done(); - })); - - checkWrap(req); -}); - -TEST(async function test_lookup_ipv4_hint_addrconfig(done) { - function validateResult(res) { - assert.ok(net.isIPv4(res.address)); - assert.strictEqual(res.family, 4); - } - - validateResult(await dnsPromises.lookup(addresses.INET4_HOST, { - hints: dns.ADDRCONFIG - })); - - const req = dns.lookup(addresses.INET4_HOST, { - hints: dns.ADDRCONFIG - }, common.mustSucceed((ip, family) => { - validateResult({ address: ip, family }); - done(); - })); - - checkWrap(req); -}); - -TEST(async function test_lookup_ip_ipv4(done) { - function validateResult(res) { - assert.strictEqual(res.address, '127.0.0.1'); - assert.strictEqual(res.family, 4); - } - - validateResult(await dnsPromises.lookup('127.0.0.1')); - - const req = dns.lookup('127.0.0.1', - common.mustSucceed((ip, family) => { - validateResult({ address: ip, family }); - done(); - })); - - checkWrap(req); -}); - -TEST(async function test_lookup_localhost_ipv4(done) { - function validateResult(res) { - assert.strictEqual(res.address, '127.0.0.1'); - assert.strictEqual(res.family, 4); - } - - validateResult(await dnsPromises.lookup('localhost', 4)); - - const req = dns.lookup('localhost', 4, - common.mustSucceed((ip, family) => { - validateResult({ address: ip, family }); - done(); - })); - - checkWrap(req); -}); - -TEST(async function test_lookup_all_ipv4(done) { - function validateResult(res) { - assert.ok(Array.isArray(res)); - assert.ok(res.length > 0); - - res.forEach((ip) => { - assert.ok(isIPv4(ip.address)); - assert.strictEqual(ip.family, 4); - }); - } - - validateResult(await dnsPromises.lookup(addresses.INET4_HOST, { - all: true, - family: 4 - })); - - const req = dns.lookup( - addresses.INET4_HOST, - { all: true, family: 4 }, - common.mustSucceed((ips) => { - validateResult(ips); - done(); - }) - ); - - checkWrap(req); -}); - -// TEST(async function test_lookupservice_ip_ipv4(done) { -// function validateResult(res) { -// assert.strictEqual(typeof res.hostname, 'string'); -// assert(res.hostname); -// assert(['http', 'www', '80'].includes(res.service)); -// } - -// validateResult(await dnsPromises.lookupService('127.0.0.1', 80)); - -// const req = dns.lookupService( -// '127.0.0.1', 80, -// common.mustSucceed((hostname, service) => { -// validateResult({ hostname, service }); -// done(); -// }) -// ); - -// checkWrap(req); -// }); - -// TEST(function test_lookupservice_ip_ipv4_promise(done) { -// util.promisify(dns.lookupService)('127.0.0.1', 80) -// .then(common.mustCall(({ hostname, service }) => { -// assert.strictEqual(typeof hostname, 'string'); -// assert(hostname.length > 0); -// assert(['http', 'www', '80'].includes(service)); -// done(); -// })); -// }); diff --git a/tests/node_compat/test/internet/test-dns-ipv6.js b/tests/node_compat/test/internet/test-dns-ipv6.js deleted file mode 100644 index 4b94d60414ecca..00000000000000 --- a/tests/node_compat/test/internet/test-dns-ipv6.js +++ /dev/null @@ -1,250 +0,0 @@ -// deno-fmt-ignore-file -// deno-lint-ignore-file - -// Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 16.13.0 -// This file is automatically generated by "node/_tools/setup.ts". Do not modify this file manually - -'use strict'; - -// TODO: enable remaining tests once functionality is implemented. - -const common = require('../common'); -const { addresses } = require('../common/internet'); -if (!common.hasIPv6) - common.skip('this test, no IPv6 support'); - -const assert = require('assert'); -const dns = require('dns'); -const net = require('net'); -const dnsPromises = dns.promises; -const isIPv6 = net.isIPv6; - -let running = false; -const queue = []; - -function TEST(f) { - function next() { - const f = queue.shift(); - if (f) { - running = true; - console.log(f.name); - f(done); - } - } - - function done() { - running = false; - process.nextTick(next); - } - - queue.push(f); - - if (!running) { - next(); - } -} - -function checkWrap(req) { - assert.ok(typeof req === 'object'); -} - -TEST(async function test_resolve6(done) { - function validateResult(res) { - assert.ok(res.length > 0); - - for (let i = 0; i < res.length; i++) { - assert.ok(isIPv6(res[i])); - } - } - - validateResult(await dnsPromises.resolve6(addresses.INET6_HOST)); - - const req = dns.resolve6( - addresses.INET6_HOST, - common.mustSucceed((ips) => { - validateResult(ips); - done(); - })); - - checkWrap(req); -}); - -// TEST(async function test_reverse_ipv6(done) { -// function validateResult(res) { -// assert.ok(res.length > 0); - -// for (let i = 0; i < res.length; i++) { -// assert.ok(typeof res[i] === 'string'); -// } -// } - -// validateResult(await dnsPromises.reverse(addresses.INET6_IP)); - -// const req = dns.reverse( -// addresses.INET6_IP, -// common.mustSucceed((domains) => { -// validateResult(domains); -// done(); -// })); - -// checkWrap(req); -// }); - -TEST(async function test_lookup_ipv6_explicit(done) { - function validateResult(res) { - assert.ok(isIPv6(res.address)); - assert.strictEqual(res.family, 6); - } - - validateResult(await dnsPromises.lookup(addresses.INET6_HOST, 6)); - - const req = dns.lookup( - addresses.INET6_HOST, - 6, - common.mustSucceed((ip, family) => { - validateResult({ address: ip, family }); - done(); - })); - - checkWrap(req); -}); - -// This ends up just being too problematic to test -// TEST(function test_lookup_ipv6_implicit(done) { -// var req = dns.lookup(addresses.INET6_HOST, function(err, ip, family) { -// assert.ifError(err); -// assert.ok(net.isIPv6(ip)); -// assert.strictEqual(family, 6); - -// done(); -// }); - -// checkWrap(req); -// }); - -TEST(async function test_lookup_ipv6_explicit_object(done) { - function validateResult(res) { - assert.ok(isIPv6(res.address)); - assert.strictEqual(res.family, 6); - } - - validateResult(await dnsPromises.lookup(addresses.INET6_HOST, { family: 6 })); - - const req = dns.lookup(addresses.INET6_HOST, { - family: 6 - }, common.mustSucceed((ip, family) => { - validateResult({ address: ip, family }); - done(); - })); - - checkWrap(req); -}); - -TEST(function test_lookup_ipv6_hint(done) { - const req = dns.lookup(addresses.INET6_HOST, { - family: 6, - hints: dns.V4MAPPED - }, common.mustCall((err, ip, family) => { - if (err) { - // FreeBSD does not support V4MAPPED - if (common.isFreeBSD) { - assert(err instanceof Error); - assert.strictEqual(err.code, 'EAI_BADFLAGS'); - assert.strictEqual(err.hostname, addresses.INET_HOST); - assert.match(err.message, /getaddrinfo EAI_BADFLAGS/); - done(); - return; - } - - assert.ifError(err); - } - - assert.ok(isIPv6(ip)); - assert.strictEqual(family, 6); - - done(); - })); - - checkWrap(req); -}); - -TEST(async function test_lookup_ip_ipv6(done) { - function validateResult(res) { - assert.ok(isIPv6(res.address)); - assert.strictEqual(res.family, 6); - } - - validateResult(await dnsPromises.lookup('::1')); - - const req = dns.lookup( - '::1', - common.mustSucceed((ip, family) => { - validateResult({ address: ip, family }); - done(); - })); - - checkWrap(req); -}); - -TEST(async function test_lookup_all_ipv6(done) { - function validateResult(res) { - assert.ok(Array.isArray(res)); - assert.ok(res.length > 0); - - res.forEach((ip) => { - assert.ok(isIPv6(ip.address), - `Invalid IPv6: ${ip.address.toString()}`); - assert.strictEqual(ip.family, 6); - }); - } - - validateResult(await dnsPromises.lookup(addresses.INET6_HOST, { - all: true, - family: 6 - })); - - const req = dns.lookup( - addresses.INET6_HOST, - { all: true, family: 6 }, - common.mustSucceed((ips) => { - validateResult(ips); - done(); - }) - ); - - checkWrap(req); -}); - -// TEST(function test_lookupservice_ip_ipv6(done) { -// const req = dns.lookupService( -// '::1', 80, -// common.mustCall((err, host, service) => { -// if (err) { -// // Not skipping the test, rather checking an alternative result, -// // i.e. that ::1 may not be configured (e.g. in /etc/hosts) -// assert.strictEqual(err.code, 'ENOTFOUND'); -// return done(); -// } -// assert.strictEqual(typeof host, 'string'); -// assert(host); -// assert(['http', 'www', '80'].includes(service)); -// done(); -// }) -// ); - -// checkWrap(req); -// }); - -// Disabled because it appears to be not working on Linux. -// TEST(function test_lookup_localhost_ipv6(done) { -// var req = dns.lookup('localhost', 6, function(err, ip, family) { -// assert.ifError(err); -// assert.ok(net.isIPv6(ip)); -// assert.strictEqual(family, 6); -// -// done(); -// }); -// -// checkWrap(req); -// }); diff --git a/tests/node_compat/test/internet/test-dns-lookup.js b/tests/node_compat/test/internet/test-dns-lookup.js index ff9c31544cf317..2f8405d36475fb 100644 --- a/tests/node_compat/test/internet/test-dns-lookup.js +++ b/tests/node_compat/test/internet/test-dns-lookup.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/internet/test-dns-promises-resolve.js b/tests/node_compat/test/internet/test-dns-promises-resolve.js index 130c7342291b4b..aa4e1daa0b281e 100644 --- a/tests/node_compat/test/internet/test-dns-promises-resolve.js +++ b/tests/node_compat/test/internet/test-dns-promises-resolve.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/internet/test-dns-regress-6244.js b/tests/node_compat/test/internet/test-dns-regress-6244.js index 9d37d6c729c1ba..76617f685b3ce8 100644 --- a/tests/node_compat/test/internet/test-dns-regress-6244.js +++ b/tests/node_compat/test/internet/test-dns-regress-6244.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/internet/test-dns-setserver-in-callback-of-resolve4.js b/tests/node_compat/test/internet/test-dns-setserver-in-callback-of-resolve4.js index e2ecc8786815e0..ab2eac8fe1c7f9 100644 --- a/tests/node_compat/test/internet/test-dns-setserver-in-callback-of-resolve4.js +++ b/tests/node_compat/test/internet/test-dns-setserver-in-callback-of-resolve4.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/internet/test-dns.js b/tests/node_compat/test/internet/test-dns.js deleted file mode 100644 index 8aaeb728d59bd6..00000000000000 --- a/tests/node_compat/test/internet/test-dns.js +++ /dev/null @@ -1,766 +0,0 @@ -// deno-fmt-ignore-file -// deno-lint-ignore-file - -// Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 16.13.0 -// This file is automatically generated by "node/_tools/setup.ts". Do not modify this file manually - -// Flags: --expose-internals -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -// TODO(cmorten): enable remaining tests once functionality is implemented. - -const common = require('../common'); -const { addresses } = require('../common/internet'); -const { internalBinding } = require('internal/test/binding'); -// const { getSystemErrorName } = require('util'); -const assert = require('assert'); -const dns = require('dns'); -const net = require('net'); -const isIPv4 = net.isIPv4; -const isIPv6 = net.isIPv6; -const util = require('util'); -const dnsPromises = dns.promises; - -let expected = 0; -let completed = 0; -let running = false; -const queue = []; - - -function TEST(f) { - function next() { - const f = queue.shift(); - if (f) { - running = true; - console.log(f.name); - f(done); - } - } - - function done() { - running = false; - completed++; - process.nextTick(next); - } - - expected++; - queue.push(f); - - if (!running) { - next(); - } -} - - -function checkWrap(req) { - assert.strictEqual(typeof req, 'object'); -} - - -// TEST(function test_reverse_bogus(done) { -// dnsPromises.reverse('bogus ip') -// .then(common.mustNotCall()) -// .catch(common.mustCall((err) => { -// assert.strictEqual(err.code, 'EINVAL'); -// assert.strictEqual(getSystemErrorName(err.errno), 'EINVAL'); -// })); - -// assert.throws(() => { -// dns.reverse('bogus ip', common.mustNotCall()); -// }, /^Error: getHostByAddr EINVAL bogus ip$/); -// done(); -// }); - -// TEST(async function test_resolve4_ttl(done) { -// function validateResult(result) { -// assert.ok(result.length > 0); - -// for (const item of result) { -// assert.strictEqual(typeof item, 'object'); -// assert.strictEqual(typeof item.ttl, 'number'); -// assert.strictEqual(typeof item.address, 'string'); -// assert.ok(item.ttl >= 0); -// assert.ok(isIPv4(item.address)); -// } -// } - -// validateResult(await dnsPromises.resolve4(addresses.INET4_HOST, { -// ttl: true -// })); - -// const req = dns.resolve4(addresses.INET4_HOST, { -// ttl: true -// }, function(err, result) { -// assert.ifError(err); -// validateResult(result); -// done(); -// }); - -// checkWrap(req); -// }); - -// TEST(async function test_resolve6_ttl(done) { -// function validateResult(result) { -// assert.ok(result.length > 0); - -// for (const item of result) { -// assert.strictEqual(typeof item, 'object'); -// assert.strictEqual(typeof item.ttl, 'number'); -// assert.strictEqual(typeof item.address, 'string'); -// assert.ok(item.ttl >= 0); -// assert.ok(isIPv6(item.address)); -// } -// } - -// validateResult(await dnsPromises.resolve6(addresses.INET6_HOST, { -// ttl: true -// })); - -// const req = dns.resolve6(addresses.INET6_HOST, { -// ttl: true -// }, function(err, result) { -// assert.ifError(err); -// validateResult(result); -// done(); -// }); - -// checkWrap(req); -// }); - -TEST(async function test_resolveMx(done) { - function validateResult(result) { - assert.ok(result.length > 0); - - for (const item of result) { - assert.strictEqual(typeof item, 'object'); - assert.ok(item.exchange); - assert.strictEqual(typeof item.exchange, 'string'); - assert.strictEqual(typeof item.priority, 'number'); - } - } - - validateResult(await dnsPromises.resolveMx(addresses.MX_HOST)); - - const req = dns.resolveMx(addresses.MX_HOST, function(err, result) { - assert.ifError(err); - validateResult(result); - done(); - }); - - checkWrap(req); -}); - -// TODO(bartlomieju): this test became very flaky on CI, returning `UNKNOWN` -// instead of `ENOTFOUND`. -// TEST(function test_resolveMx_failure(done) { -// dnsPromises.resolveMx(addresses.NOT_FOUND) -// .then(common.mustNotCall()) -// .catch(common.mustCall((err) => { -// assert.strictEqual(err.code, 'ENOTFOUND'); -// })); - -// const req = dns.resolveMx(addresses.NOT_FOUND, function(err, result) { -// assert.ok(err instanceof Error); -// assert.strictEqual(err.code, 'ENOTFOUND'); - -// assert.strictEqual(result, undefined); - -// done(); -// }); - -// checkWrap(req); -// }); - -TEST(async function test_resolveNs(done) { - function validateResult(result) { - assert.ok(result.length > 0); - - for (const item of result) { - assert.ok(item); - assert.strictEqual(typeof item, 'string'); - } - } - - validateResult(await dnsPromises.resolveNs(addresses.NS_HOST)); - - const req = dns.resolveNs(addresses.NS_HOST, function(err, names) { - assert.ifError(err); - validateResult(names); - done(); - }); - - checkWrap(req); -}); - -// TODO(bartlomieju): this test became very flaky on CI, returning `UNKNOWN` -// instead of `ENOTFOUND`. -// TEST(function test_resolveNs_failure(done) { -// dnsPromises.resolveNs(addresses.NOT_FOUND) -// .then(common.mustNotCall()) -// .catch(common.mustCall((err) => { -// assert.strictEqual(err.code, 'ENOTFOUND'); -// })); - -// const req = dns.resolveNs(addresses.NOT_FOUND, function(err, result) { -// assert.ok(err instanceof Error); -// assert.strictEqual(err.code, 'ENOTFOUND'); - -// assert.strictEqual(result, undefined); - -// done(); -// }); - -// checkWrap(req); -// }); - -TEST(async function test_resolveSrv(done) { - function validateResult(result) { - assert.ok(result.length > 0); - - for (const item of result) { - assert.strictEqual(typeof item, 'object'); - assert.ok(item.name); - assert.strictEqual(typeof item.name, 'string'); - assert.strictEqual(typeof item.port, 'number'); - assert.strictEqual(typeof item.priority, 'number'); - assert.strictEqual(typeof item.weight, 'number'); - } - } - - validateResult(await dnsPromises.resolveSrv(addresses.SRV_HOST)); - - const req = dns.resolveSrv(addresses.SRV_HOST, function(err, result) { - assert.ifError(err); - validateResult(result); - done(); - }); - - checkWrap(req); -}); - -// TODO(bartlomieju): this test became very flaky on CI, returning `UNKNOWN` -// instead of `ENOTFOUND`. -// TEST(function test_resolveSrv_failure(done) { -// dnsPromises.resolveSrv(addresses.NOT_FOUND) -// .then(common.mustNotCall()) -// .catch(common.mustCall((err) => { -// assert.strictEqual(err.code, 'ENOTFOUND'); -// })); - -// const req = dns.resolveSrv(addresses.NOT_FOUND, function(err, result) { -// assert.ok(err instanceof Error); -// assert.strictEqual(err.code, 'ENOTFOUND'); - -// assert.strictEqual(result, undefined); - -// done(); -// }); - -// checkWrap(req); -// }); - -// TODO(bartlomieju): this test started failing on CI on Dec 28th, 2023 returning -// ENOTFOUND. It's unclear what's going on, since `dig -x 8.8.8.8.in-addr.arpa` -// returns correct PTR record. -// TEST(async function test_resolvePtr(done) { -// function validateResult(result) { -// assert.ok(result.length > 0); - -// for (const item of result) { -// assert.ok(item); -// assert.strictEqual(typeof item, 'string'); -// } -// } - -// validateResult(await dnsPromises.resolvePtr(addresses.PTR_HOST)); - -// const req = dns.resolvePtr(addresses.PTR_HOST, function(err, result) { -// assert.ifError(err); -// validateResult(result); -// done(); -// }); - -// checkWrap(req); -// }); - -// TODO(bartlomieju): this test became very flaky on CI, returning `UNKNOWN` -// instead of `ENOTFOUND`. -// TEST(function test_resolvePtr_failure(done) { -// dnsPromises.resolvePtr(addresses.NOT_FOUND) -// .then(common.mustNotCall()) -// .catch(common.mustCall((err) => { -// assert.strictEqual(err.code, 'ENOTFOUND'); -// })); - -// const req = dns.resolvePtr(addresses.NOT_FOUND, function(err, result) { -// assert.ok(err instanceof Error); -// assert.strictEqual(err.code, 'ENOTFOUND'); - -// assert.strictEqual(result, undefined); - -// done(); -// }); - -// checkWrap(req); -// }); - -TEST(async function test_resolveNaptr(done) { - function validateResult(result) { - assert.ok(result.length > 0); - - for (const item of result) { - assert.strictEqual(typeof item, 'object'); - assert.strictEqual(typeof item.flags, 'string'); - assert.strictEqual(typeof item.service, 'string'); - assert.strictEqual(typeof item.regexp, 'string'); - assert.strictEqual(typeof item.replacement, 'string'); - assert.strictEqual(typeof item.order, 'number'); - assert.strictEqual(typeof item.preference, 'number'); - } - } - - validateResult(await dnsPromises.resolveNaptr(addresses.NAPTR_HOST)); - - const req = dns.resolveNaptr(addresses.NAPTR_HOST, function(err, result) { - assert.ifError(err); - validateResult(result); - done(); - }); - - checkWrap(req); -}); - -// TODO(bartlomieju): this test became very flaky on CI, returning `UNKNOWN` -// instead of `ENOTFOUND`. -// TEST(function test_resolveNaptr_failure(done) { -// dnsPromises.resolveNaptr(addresses.NOT_FOUND) -// .then(common.mustNotCall()) -// .catch(common.mustCall((err) => { -// assert.strictEqual(err.code, 'ENOTFOUND'); -// })); - -// const req = dns.resolveNaptr(addresses.NOT_FOUND, function(err, result) { -// assert.ok(err instanceof Error); -// assert.strictEqual(err.code, 'ENOTFOUND'); - -// assert.strictEqual(result, undefined); - -// done(); -// }); - -// checkWrap(req); -// }); - -TEST(async function test_resolveSoa(done) { - function validateResult(result) { - assert.strictEqual(typeof result, 'object'); - assert.strictEqual(typeof result.nsname, 'string'); - assert.ok(result.nsname.length > 0); - assert.strictEqual(typeof result.hostmaster, 'string'); - assert.ok(result.hostmaster.length > 0); - assert.strictEqual(typeof result.serial, 'number'); - assert.ok((result.serial > 0) && (result.serial < 4294967295)); - assert.strictEqual(typeof result.refresh, 'number'); - assert.ok((result.refresh > 0) && (result.refresh < 2147483647)); - assert.strictEqual(typeof result.retry, 'number'); - assert.ok((result.retry > 0) && (result.retry < 2147483647)); - assert.strictEqual(typeof result.expire, 'number'); - assert.ok((result.expire > 0) && (result.expire < 2147483647)); - assert.strictEqual(typeof result.minttl, 'number'); - assert.ok((result.minttl >= 0) && (result.minttl < 2147483647)); - } - - validateResult(await dnsPromises.resolveSoa(addresses.SOA_HOST)); - - const req = dns.resolveSoa(addresses.SOA_HOST, function(err, result) { - assert.ifError(err); - validateResult(result); - done(); - }); - - checkWrap(req); -}); - -// TODO(bartlomieju): this test became very flaky on CI, returning `UNKNOWN` -// instead of `ENOTFOUND`. -// TEST(function test_resolveSoa_failure(done) { -// dnsPromises.resolveSoa(addresses.NOT_FOUND) -// .then(common.mustNotCall()) -// .catch(common.mustCall((err) => { -// assert.strictEqual(err.code, 'ENOTFOUND'); -// })); - -// const req = dns.resolveSoa(addresses.NOT_FOUND, function(err, result) { -// assert.ok(err instanceof Error); -// assert.strictEqual(err.code, 'ENOTFOUND'); - -// assert.strictEqual(result, undefined); - -// done(); -// }); - -// checkWrap(req); -// }); - -TEST(async function test_resolveCaa(done) { - function validateResult(result) { - assert.ok(Array.isArray(result), - `expected array, got ${util.inspect(result)}`); - assert.strictEqual(result.length, 1); - assert.strictEqual(typeof result[0].critical, 'number'); - assert.strictEqual(result[0].critical, 0); - assert.strictEqual(result[0].issue, 'pki.goog'); - } - - validateResult(await dnsPromises.resolveCaa(addresses.CAA_HOST)); - - const req = dns.resolveCaa(addresses.CAA_HOST, function(err, records) { - assert.ifError(err); - validateResult(records); - done(); - }); - - checkWrap(req); -}); - -// NOTE(bartlomieju): this test started failing around July 11th, 2023. -// TEST(async function test_resolveCname(done) { -// function validateResult(result) { -// assert.ok(result.length > 0); -// -// for (const item of result) { -// assert.ok(item); -// assert.strictEqual(typeof item, 'string'); -// } -// } -// -// validateResult(await dnsPromises.resolveCname(addresses.CNAME_HOST)); -// -// const req = dns.resolveCname(addresses.CNAME_HOST, function(err, names) { -// assert.ifError(err); -// validateResult(names); -// done(); -// }); -// -// checkWrap(req); -// }); - -// TODO(bartlomieju): this test became very flaky on CI, returning `UNKNOWN` -// instead of `ENOTFOUND`. -// TEST(function test_resolveCname_failure(done) { -// dnsPromises.resolveCname(addresses.NOT_FOUND) -// .then(common.mustNotCall()) -// .catch(common.mustCall((err) => { -// assert.strictEqual(err.code, 'ENOTFOUND'); -// })); - -// const req = dns.resolveCname(addresses.NOT_FOUND, function(err, result) { -// assert.ok(err instanceof Error); -// assert.strictEqual(err.code, 'ENOTFOUND'); - -// assert.strictEqual(result, undefined); - -// done(); -// }); - -// checkWrap(req); -// }); - - -TEST(async function test_resolveTxt(done) { - function validateResult(result) { - assert.ok(Array.isArray(result[0])); - assert.strictEqual(result.length, 1); - assert(result[0][0].startsWith('v=spf1')); - } - - validateResult(await dnsPromises.resolveTxt(addresses.TXT_HOST)); - - const req = dns.resolveTxt(addresses.TXT_HOST, function(err, records) { - assert.ifError(err); - validateResult(records); - done(); - }); - - checkWrap(req); -}); - -// TODO(bartlomieju): this test became very flaky on CI, returning `UNKNOWN` -// instead of `ENOTFOUND`. -// TEST(function test_resolveTxt_failure(done) { -// dnsPromises.resolveTxt(addresses.NOT_FOUND) -// .then(common.mustNotCall()) -// .catch(common.mustCall((err) => { -// assert.strictEqual(err.code, 'ENOTFOUND'); -// })); - -// const req = dns.resolveTxt(addresses.NOT_FOUND, function(err, result) { -// assert.ok(err instanceof Error); -// assert.strictEqual(err.code, 'ENOTFOUND'); - -// assert.strictEqual(result, undefined); - -// done(); -// }); - -// checkWrap(req); -// }); - - -TEST(function test_lookup_failure(done) { - dnsPromises.lookup(addresses.NOT_FOUND, 4) - .then(common.mustNotCall()) - .catch(common.expectsError({ code: dns.NOTFOUND })); - - const req = dns.lookup(addresses.NOT_FOUND, 4, (err) => { - assert.ok(err instanceof Error); - assert.strictEqual(err.code, dns.NOTFOUND); - assert.strictEqual(err.code, 'ENOTFOUND'); - assert.doesNotMatch(err.message, /ENOENT/); - assert.ok(err.message.includes(addresses.NOT_FOUND)); - - done(); - }); - - checkWrap(req); -}); - - -TEST(async function test_lookup_ip_all(done) { - function validateResult(result) { - assert.ok(Array.isArray(result)); - assert.ok(result.length > 0); - assert.strictEqual(result[0].address, '127.0.0.1'); - assert.strictEqual(result[0].family, 4); - } - - validateResult(await dnsPromises.lookup('127.0.0.1', { all: true })); - - const req = dns.lookup( - '127.0.0.1', - { all: true }, - function(err, ips, family) { - assert.ifError(err); - assert.strictEqual(family, undefined); - validateResult(ips); - done(); - } - ); - - checkWrap(req); -}); - - -TEST(function test_lookup_ip_all_promise(done) { - const req = util.promisify(dns.lookup)('127.0.0.1', { all: true }) - .then(function(ips) { - assert.ok(Array.isArray(ips)); - assert.ok(ips.length > 0); - assert.strictEqual(ips[0].address, '127.0.0.1'); - assert.strictEqual(ips[0].family, 4); - - done(); - }); - - checkWrap(req); -}); - - -TEST(function test_lookup_ip_promise(done) { - util.promisify(dns.lookup)('127.0.0.1') - .then(function({ address, family }) { - assert.strictEqual(address, '127.0.0.1'); - assert.strictEqual(family, 4); - - done(); - }); -}); - - -TEST(async function test_lookup_null_all(done) { - assert.deepStrictEqual(await dnsPromises.lookup(null, { all: true }), []); - - const req = dns.lookup(null, { all: true }, (err, ips) => { - assert.ifError(err); - assert.ok(Array.isArray(ips)); - assert.strictEqual(ips.length, 0); - - done(); - }); - - checkWrap(req); -}); - - -TEST(async function test_lookup_all_mixed(done) { - function validateResult(result) { - assert.ok(Array.isArray(result)); - assert.ok(result.length > 0); - - result.forEach(function(ip) { - if (isIPv4(ip.address)) - assert.strictEqual(ip.family, 4); - else if (isIPv6(ip.address)) - assert.strictEqual(ip.family, 6); - else - assert.fail('unexpected IP address'); - }); - } - - validateResult(await dnsPromises.lookup(addresses.INET_HOST, { all: true })); - - const req = dns.lookup(addresses.INET_HOST, { - all: true - }, function(err, ips) { - assert.ifError(err); - validateResult(ips); - done(); - }); - - checkWrap(req); -}); - - -// TEST(function test_lookupservice_invalid(done) { -// dnsPromises.lookupService('1.2.3.4', 80) -// .then(common.mustNotCall()) -// .catch(common.expectsError({ code: 'ENOTFOUND' })); - -// const req = dns.lookupService('1.2.3.4', 80, (err) => { -// assert(err instanceof Error); -// assert.strictEqual(err.code, 'ENOTFOUND'); -// assert.match(err.message, /1\.2\.3\.4/); - -// done(); -// }); - -// checkWrap(req); -// }); - - -// TEST(function test_reverse_failure(done) { -// dnsPromises.reverse('203.0.113.0') -// .then(common.mustNotCall()) -// .catch(common.expectsError({ -// code: 'ENOTFOUND', -// hostname: '203.0.113.0' -// })); - -// // 203.0.113.0/24 are addresses reserved for (RFC) documentation use only -// const req = dns.reverse('203.0.113.0', function(err) { -// assert(err instanceof Error); -// assert.strictEqual(err.code, 'ENOTFOUND'); // Silly error code... -// assert.strictEqual(err.hostname, '203.0.113.0'); -// assert.match(err.message, /203\.0\.113\.0/); - -// done(); -// }); - -// checkWrap(req); -// }); - - -// TODO(bartlomieju): this test became very flaky on CI, returning `UNKNOWN` -// instead of `ENOTFOUND`. -// TEST(function test_lookup_failure(done) { -// dnsPromises.lookup(addresses.NOT_FOUND) -// .then(common.mustNotCall()) -// .catch(common.expectsError({ -// code: 'ENOTFOUND', -// hostname: addresses.NOT_FOUND -// })); - -// const req = dns.lookup(addresses.NOT_FOUND, (err) => { -// assert(err instanceof Error); -// assert.strictEqual(err.code, 'ENOTFOUND'); // Silly error code... -// assert.strictEqual(err.hostname, addresses.NOT_FOUND); -// assert.ok(err.message.includes(addresses.NOT_FOUND)); - -// done(); -// }); - -// checkWrap(req); -// }); - - -// TODO(bartlomieju): this test became very flaky on CI, returning `UNKNOWN` -// instead of `ENOTFOUND`. -// TEST(function test_resolve_failure(done) { -// const req = dns.resolve4(addresses.NOT_FOUND, (err) => { -// assert(err instanceof Error); - -// switch (err.code) { -// case 'ENOTFOUND': -// case 'ESERVFAIL': -// break; -// default: -// assert.strictEqual(err.code, 'ENOTFOUND'); // Silly error code... -// break; -// } - -// assert.strictEqual(err.hostname, addresses.NOT_FOUND); -// assert.ok(err.message.includes(addresses.NOT_FOUND)); - -// done(); -// }); - -// checkWrap(req); -// }); - - -let getaddrinfoCallbackCalled = false; - -console.log(`looking up ${addresses.INET4_HOST}..`); - -const cares = internalBinding('cares_wrap'); -const req = new cares.GetAddrInfoReqWrap(); -cares.getaddrinfo(req, addresses.INET4_HOST, 4, - /* hints */ 0, /* verbatim */ true); - -req.oncomplete = function(err, domains) { - assert.strictEqual(err, 0); - console.log(`${addresses.INET4_HOST} = ${domains}`); - assert.ok(Array.isArray(domains)); - assert.ok(domains.length >= 1); - assert.strictEqual(typeof domains[0], 'string'); - getaddrinfoCallbackCalled = true; -}; - -process.on('exit', function() { - console.log(`${completed} tests completed`); - assert.strictEqual(running, false); - assert.strictEqual(completed, expected); - assert.ok(getaddrinfoCallbackCalled); -}); - -// Should not throw. -dns.lookup(addresses.INET6_HOST, 6, common.mustCall()); -dns.lookup(addresses.INET_HOST, {}, common.mustCall()); -// dns.lookupService('0.0.0.0', '0', common.mustCall()); -// dns.lookupService('0.0.0.0', 0, common.mustCall()); -(async function() { - await dnsPromises.lookup(addresses.INET6_HOST, 6); - await dnsPromises.lookup(addresses.INET_HOST, {}); -})().then(common.mustCall()); diff --git a/tests/node_compat/test/internet/test-http-https-default-ports.js b/tests/node_compat/test/internet/test-http-https-default-ports.js index 90e0f299a8b04a..92ddbf36567f2f 100644 --- a/tests/node_compat/test/internet/test-http-https-default-ports.js +++ b/tests/node_compat/test/internet/test-http-https-default-ports.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/message/eval_messages.js b/tests/node_compat/test/message/eval_messages.js new file mode 100644 index 00000000000000..c8e41c9109db53 --- /dev/null +++ b/tests/node_compat/test/message/eval_messages.js @@ -0,0 +1,60 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +require('../common'); + +const spawn = require('child_process').spawn; + +function run(cmd, strict, cb) { + const args = []; + if (strict) args.push('--use_strict'); + args.push('-pe', cmd); + const child = spawn(process.execPath, args); + child.stdout.pipe(process.stdout); + child.stderr.pipe(process.stdout); + child.on('close', cb); +} + +const queue = + [ 'with(this){__filename}', + '42', + 'throw new Error("hello")', + 'var x = 100; y = x;', + 'var ______________________________________________; throw 10' ]; + +function go() { + const c = queue.shift(); + if (!c) return console.log('done'); + run(c, false, function() { + run(c, true, go); + }); +} + +go(); diff --git a/tests/node_compat/test/message/max_tick_depth.js b/tests/node_compat/test/message/max_tick_depth.js new file mode 100644 index 00000000000000..5a2afb59676e68 --- /dev/null +++ b/tests/node_compat/test/message/max_tick_depth.js @@ -0,0 +1,38 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); + +process.maxTickDepth = 10; +let i = 20; +process.nextTick(function f() { + console.error(`tick ${i}`); + if (i-- > 0) + process.nextTick(f); +}); diff --git a/tests/node_compat/test/message/stdin_messages.js b/tests/node_compat/test/message/stdin_messages.js new file mode 100644 index 00000000000000..15911b69991d02 --- /dev/null +++ b/tests/node_compat/test/message/stdin_messages.js @@ -0,0 +1,61 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +require('../common'); + +const spawn = require('child_process').spawn; + +function run(cmd, strict, cb) { + const args = []; + if (strict) args.push('--use_strict'); + args.push('-p'); + const child = spawn(process.execPath, args); + child.stdout.pipe(process.stdout); + child.stderr.pipe(process.stdout); + child.stdin.end(cmd); + child.on('close', cb); +} + +const queue = + [ 'with(this){__filename}', + '42', + 'throw new Error("hello")', + 'let x = 100; y = x;', + 'let ______________________________________________; throw 10' ]; + +function go() { + const c = queue.shift(); + if (!c) return console.log('done'); + run(c, false, function() { + run(c, true, go); + }); +} + +go(); diff --git a/tests/node_compat/test/message/util_inspect_error.js b/tests/node_compat/test/message/util_inspect_error.js new file mode 100644 index 00000000000000..d3aad09fcdfc9b --- /dev/null +++ b/tests/node_compat/test/message/util_inspect_error.js @@ -0,0 +1,19 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +require('../common'); +const util = require('util'); + +const err = new Error('foo\nbar'); + +console.log(util.inspect({ err, nested: { err } }, { compact: true })); +console.log(util.inspect({ err, nested: { err } }, { compact: false })); + +err.foo = 'bar'; +console.log(util.inspect(err, { compact: true, breakLength: 5 })); diff --git a/tests/node_compat/test/parallel/test-arm-math-illegal-instruction.js b/tests/node_compat/test/parallel/test-arm-math-illegal-instruction.js new file mode 100644 index 00000000000000..9eccee9887e8b5 --- /dev/null +++ b/tests/node_compat/test/parallel/test-arm-math-illegal-instruction.js @@ -0,0 +1,22 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); + +// This test ensures Math functions don't fail with an "illegal instruction" +// error on ARM devices (primarily on the Raspberry Pi 1) +// See https://github.com/nodejs/node/issues/1376 +// and https://code.google.com/p/v8/issues/detail?id=4019 + +// Iterate over all Math functions +Object.getOwnPropertyNames(Math).forEach((functionName) => { + if (!/[A-Z]/.test(functionName)) { + // The function names don't have capital letters. + Math[functionName](-0.5); + } +}); diff --git a/tests/node_compat/test/parallel/test-assert-async.js b/tests/node_compat/test/parallel/test-assert-async.js index db6bfabdcde722..111cf44c6774ca 100644 --- a/tests/node_compat/test/parallel/test-assert-async.js +++ b/tests/node_compat/test/parallel/test-assert-async.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-assert-fail.js b/tests/node_compat/test/parallel/test-assert-fail.js index 7c7ceef5153823..8718a9ea465001 100644 --- a/tests/node_compat/test/parallel/test-assert-fail.js +++ b/tests/node_compat/test/parallel/test-assert-fail.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-assert-strict-exists.js b/tests/node_compat/test/parallel/test-assert-strict-exists.js index 7a9c96a9415cf9..806cff31f288d3 100644 --- a/tests/node_compat/test/parallel/test-assert-strict-exists.js +++ b/tests/node_compat/test/parallel/test-assert-strict-exists.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-async-hooks-run-in-async-scope-caught-exception.js b/tests/node_compat/test/parallel/test-async-hooks-run-in-async-scope-caught-exception.js new file mode 100644 index 00000000000000..17e1e35a873bc7 --- /dev/null +++ b/tests/node_compat/test/parallel/test-async-hooks-run-in-async-scope-caught-exception.js @@ -0,0 +1,18 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +require('../common'); +const { AsyncResource } = require('async_hooks'); + +try { + new AsyncResource('foo').runInAsyncScope(() => { throw new Error('bar'); }); +} catch { + // Continue regardless of error. +} +// Should abort (fail the case) if async id is not matching. diff --git a/tests/node_compat/test/parallel/test-async-hooks-run-in-async-scope-this-arg.js b/tests/node_compat/test/parallel/test-async-hooks-run-in-async-scope-this-arg.js new file mode 100644 index 00000000000000..f6886347fb84b8 --- /dev/null +++ b/tests/node_compat/test/parallel/test-async-hooks-run-in-async-scope-this-arg.js @@ -0,0 +1,24 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +// Test that passing thisArg to runInAsyncScope() works. + +const common = require('../common'); +const assert = require('assert'); +const { AsyncResource } = require('async_hooks'); + +const thisArg = {}; + +const res = new AsyncResource('fhqwhgads'); + +function callback() { + assert.strictEqual(this, thisArg); +} + +res.runInAsyncScope(common.mustCall(callback), thisArg); diff --git a/tests/node_compat/test/parallel/test-async-local-storage-bind.js b/tests/node_compat/test/parallel/test-async-local-storage-bind.js new file mode 100644 index 00000000000000..2036c47aa9d1cb --- /dev/null +++ b/tests/node_compat/test/parallel/test-async-local-storage-bind.js @@ -0,0 +1,24 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const { AsyncLocalStorage } = require('async_hooks'); + +[1, false, '', {}, []].forEach((i) => { + assert.throws(() => AsyncLocalStorage.bind(i), { + code: 'ERR_INVALID_ARG_TYPE' + }); +}); + +const fn = common.mustCall(AsyncLocalStorage.bind(() => 123)); +assert.strictEqual(fn(), 123); + +const fn2 = AsyncLocalStorage.bind(common.mustCall((arg) => assert.strictEqual(arg, 'test'))); +fn2('test'); diff --git a/tests/node_compat/test/parallel/test-async-local-storage-contexts.js b/tests/node_compat/test/parallel/test-async-local-storage-contexts.js new file mode 100644 index 00000000000000..de31622c142cd4 --- /dev/null +++ b/tests/node_compat/test/parallel/test-async-local-storage-contexts.js @@ -0,0 +1,42 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +require('../common'); +const assert = require('assert'); +const vm = require('vm'); +const { AsyncLocalStorage } = require('async_hooks'); + +// Regression test for https://github.com/nodejs/node/issues/38781 + +const context = vm.createContext({ + AsyncLocalStorage, + assert +}); + +vm.runInContext(` + const storage = new AsyncLocalStorage() + async function test() { + return storage.run({ test: 'vm' }, async () => { + assert.strictEqual(storage.getStore().test, 'vm'); + await 42; + assert.strictEqual(storage.getStore().test, 'vm'); + }); + } + test() +`, context); + +const storage = new AsyncLocalStorage(); +async function test() { + return storage.run({ test: 'main context' }, async () => { + assert.strictEqual(storage.getStore().test, 'main context'); + await 42; + assert.strictEqual(storage.getStore().test, 'main context'); + }); +} +test(); diff --git a/tests/node_compat/test/parallel/test-async-local-storage-deep-stack.js b/tests/node_compat/test/parallel/test-async-local-storage-deep-stack.js new file mode 100644 index 00000000000000..ee51af0eabbb51 --- /dev/null +++ b/tests/node_compat/test/parallel/test-async-local-storage-deep-stack.js @@ -0,0 +1,22 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const { AsyncLocalStorage } = require('async_hooks'); + +// Regression test for: https://github.com/nodejs/node/issues/34556 + +const als = new AsyncLocalStorage(); + +const done = common.mustCall(); + +function run(count) { + if (count !== 0) return als.run({}, run, --count); + done(); +} +run(1000); diff --git a/tests/node_compat/test/parallel/test-async-local-storage-http-multiclients.js b/tests/node_compat/test/parallel/test-async-local-storage-http-multiclients.js new file mode 100644 index 00000000000000..44e07f4c6b298f --- /dev/null +++ b/tests/node_compat/test/parallel/test-async-local-storage-http-multiclients.js @@ -0,0 +1,72 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const Countdown = require('../common/countdown'); +const assert = require('assert'); +const { AsyncLocalStorage } = require('async_hooks'); +const http = require('http'); +const cls = new AsyncLocalStorage(); +const NUM_CLIENTS = 10; + +// Run multiple clients that receive data from a server +// in multiple chunks, in a single non-closure function. +// Use the AsyncLocalStorage (ALS) APIs to maintain the context +// and data download. Make sure that individual clients +// receive their respective data, with no conflicts. + +// Set up a server that sends large buffers of data, filled +// with cardinal numbers, increasing per request +let index = 0; +const server = http.createServer((q, r) => { + // Send a large chunk as response, otherwise the data + // may be sent in a single chunk, and the callback in the + // client may be called only once, defeating the purpose of test + r.end((index++ % 10).toString().repeat(1024 * 1024)); +}); + +const countdown = new Countdown(NUM_CLIENTS, () => { + server.close(); +}); + +server.listen(0, common.mustCall(() => { + for (let i = 0; i < NUM_CLIENTS; i++) { + cls.run(new Map(), common.mustCall(() => { + const options = { port: server.address().port }; + const req = http.get(options, common.mustCall((res) => { + const store = cls.getStore(); + store.set('data', ''); + + // Make ondata and onend non-closure + // functions and fully dependent on ALS + res.setEncoding('utf8'); + res.on('data', ondata); + res.on('end', common.mustCall(onend)); + })); + req.end(); + })); + } +})); + +// Accumulate the current data chunk with the store data +function ondata(d) { + const store = cls.getStore(); + assert.notStrictEqual(store, undefined); + let chunk = store.get('data'); + chunk += d; + store.set('data', chunk); +} + +// Retrieve the store data, and test for homogeneity +function onend() { + const store = cls.getStore(); + assert.notStrictEqual(store, undefined); + const data = store.get('data'); + assert.strictEqual(data, data[0].repeat(data.length)); + countdown.dec(); +} diff --git a/tests/node_compat/test/parallel/test-async-local-storage-snapshot.js b/tests/node_compat/test/parallel/test-async-local-storage-snapshot.js new file mode 100644 index 00000000000000..70fd7aa1c7ea19 --- /dev/null +++ b/tests/node_compat/test/parallel/test-async-local-storage-snapshot.js @@ -0,0 +1,23 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const { strictEqual } = require('assert'); +const { AsyncLocalStorage } = require('async_hooks'); + +const asyncLocalStorage = new AsyncLocalStorage(); +const runInAsyncScope = + asyncLocalStorage.run(123, common.mustCall(() => AsyncLocalStorage.snapshot())); +const result = + asyncLocalStorage.run(321, common.mustCall(() => { + return runInAsyncScope(() => { + return asyncLocalStorage.getStore(); + }); + })); +strictEqual(result, 123); diff --git a/tests/node_compat/test/parallel/test-atomics-wake.js b/tests/node_compat/test/parallel/test-atomics-wake.js new file mode 100644 index 00000000000000..c7a4eca36a0d3a --- /dev/null +++ b/tests/node_compat/test/parallel/test-atomics-wake.js @@ -0,0 +1,14 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +require('../common'); +const assert = require('assert'); + +// https://github.com/nodejs/node/issues/21219 +assert.strictEqual(Atomics.wake, undefined); diff --git a/tests/node_compat/test/parallel/test-bad-unicode.js b/tests/node_compat/test/parallel/test-bad-unicode.js index fea7e3cd7ab0b4..5b72fd25e54df5 100644 --- a/tests/node_compat/test/parallel/test-bad-unicode.js +++ b/tests/node_compat/test/parallel/test-bad-unicode.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-beforeexit-event-exit.js b/tests/node_compat/test/parallel/test-beforeexit-event-exit.js new file mode 100644 index 00000000000000..ef8963abf5949b --- /dev/null +++ b/tests/node_compat/test/parallel/test-beforeexit-event-exit.js @@ -0,0 +1,34 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const { mustNotCall } = require('../common'); + +process.on('beforeExit', mustNotCall('exit should not allow this to occur')); + +process.exit(); diff --git a/tests/node_compat/test/parallel/test-blob-buffer-too-large.js b/tests/node_compat/test/parallel/test-blob-buffer-too-large.js new file mode 100644 index 00000000000000..8ae291fda2103a --- /dev/null +++ b/tests/node_compat/test/parallel/test-blob-buffer-too-large.js @@ -0,0 +1,31 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Flags: --no-warnings +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const { Blob, kMaxLength } = require('buffer'); + +if (common.isFreeBSD) + common.skip('Oversized buffer make the FreeBSD CI runner crash'); + +try { + new Blob([new Uint8Array(kMaxLength), [1]]); +} catch (e) { + if ( + e.message === 'Array buffer allocation failed' || + e.message === `Invalid typed array length: ${kMaxLength}` + ) { + common.skip( + 'Insufficient memory on this platform for oversized buffer test.' + ); + } else { + assert.strictEqual(e.code, 'ERR_BUFFER_TOO_LARGE'); + } +} diff --git a/tests/node_compat/test/parallel/test-btoa-atob.js b/tests/node_compat/test/parallel/test-btoa-atob.js index 22a9affecd45fa..60c5d58c0f8fc3 100644 --- a/tests/node_compat/test/parallel/test-btoa-atob.js +++ b/tests/node_compat/test/parallel/test-btoa-atob.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-ascii.js b/tests/node_compat/test/parallel/test-buffer-ascii.js index 5695a275aa032c..f47a841e78530c 100644 --- a/tests/node_compat/test/parallel/test-buffer-ascii.js +++ b/tests/node_compat/test/parallel/test-buffer-ascii.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-buffer-badhex.js b/tests/node_compat/test/parallel/test-buffer-badhex.js index 7f1f57a76a7502..ee227f578ef5f3 100644 --- a/tests/node_compat/test/parallel/test-buffer-badhex.js +++ b/tests/node_compat/test/parallel/test-buffer-badhex.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-bigint64.js b/tests/node_compat/test/parallel/test-buffer-bigint64.js index 2ba709bfe706fc..10fdb761b46d67 100644 --- a/tests/node_compat/test/parallel/test-buffer-bigint64.js +++ b/tests/node_compat/test/parallel/test-buffer-bigint64.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-bytelength.js b/tests/node_compat/test/parallel/test-buffer-bytelength.js index 858c72f671998b..781c08a1a1ba71 100644 --- a/tests/node_compat/test/parallel/test-buffer-bytelength.js +++ b/tests/node_compat/test/parallel/test-buffer-bytelength.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-compare-offset.js b/tests/node_compat/test/parallel/test-buffer-compare-offset.js index 9583ded36bfcbd..7e8f6d405a2760 100644 --- a/tests/node_compat/test/parallel/test-buffer-compare-offset.js +++ b/tests/node_compat/test/parallel/test-buffer-compare-offset.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-concat.js b/tests/node_compat/test/parallel/test-buffer-concat.js index cd63be4e4e782d..ba84bbd6d4ea88 100644 --- a/tests/node_compat/test/parallel/test-buffer-concat.js +++ b/tests/node_compat/test/parallel/test-buffer-concat.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-buffer-constants.js b/tests/node_compat/test/parallel/test-buffer-constants.js index 026ac41d8ac775..bbe3f579b762cf 100644 --- a/tests/node_compat/test/parallel/test-buffer-constants.js +++ b/tests/node_compat/test/parallel/test-buffer-constants.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-copy.js b/tests/node_compat/test/parallel/test-buffer-copy.js index 38f32e52fec377..8526070c24f8cc 100644 --- a/tests/node_compat/test/parallel/test-buffer-copy.js +++ b/tests/node_compat/test/parallel/test-buffer-copy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-equals.js b/tests/node_compat/test/parallel/test-buffer-equals.js index c7768da1aa6e85..b74b86f6520288 100644 --- a/tests/node_compat/test/parallel/test-buffer-equals.js +++ b/tests/node_compat/test/parallel/test-buffer-equals.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-failed-alloc-typed-arrays.js b/tests/node_compat/test/parallel/test-buffer-failed-alloc-typed-arrays.js index 89bf7806558b3d..6055da4ab7b76d 100644 --- a/tests/node_compat/test/parallel/test-buffer-failed-alloc-typed-arrays.js +++ b/tests/node_compat/test/parallel/test-buffer-failed-alloc-typed-arrays.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-fakes.js b/tests/node_compat/test/parallel/test-buffer-fakes.js index bcd97042a0bcaf..e9db549cb228be 100644 --- a/tests/node_compat/test/parallel/test-buffer-fakes.js +++ b/tests/node_compat/test/parallel/test-buffer-fakes.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-inheritance.js b/tests/node_compat/test/parallel/test-buffer-inheritance.js index 5c3d5925fa5c4c..7c5564ade0c358 100644 --- a/tests/node_compat/test/parallel/test-buffer-inheritance.js +++ b/tests/node_compat/test/parallel/test-buffer-inheritance.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-isascii.js b/tests/node_compat/test/parallel/test-buffer-isascii.js index 59612bb9d9952a..6c4abfb71d9ddb 100644 --- a/tests/node_compat/test/parallel/test-buffer-isascii.js +++ b/tests/node_compat/test/parallel/test-buffer-isascii.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-isencoding.js b/tests/node_compat/test/parallel/test-buffer-isencoding.js index 8f9089a02fae33..68bb94d60d28a0 100644 --- a/tests/node_compat/test/parallel/test-buffer-isencoding.js +++ b/tests/node_compat/test/parallel/test-buffer-isencoding.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-isutf8.js b/tests/node_compat/test/parallel/test-buffer-isutf8.js index 02f142db893b57..3c4d31da4b554d 100644 --- a/tests/node_compat/test/parallel/test-buffer-isutf8.js +++ b/tests/node_compat/test/parallel/test-buffer-isutf8.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-iterator.js b/tests/node_compat/test/parallel/test-buffer-iterator.js index 279f75ac851d46..76d5df5e63a0c5 100644 --- a/tests/node_compat/test/parallel/test-buffer-iterator.js +++ b/tests/node_compat/test/parallel/test-buffer-iterator.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-new.js b/tests/node_compat/test/parallel/test-buffer-new.js index aaa08f39a64d20..110de4f3fe16b5 100644 --- a/tests/node_compat/test/parallel/test-buffer-new.js +++ b/tests/node_compat/test/parallel/test-buffer-new.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-no-negative-allocation.js b/tests/node_compat/test/parallel/test-buffer-no-negative-allocation.js index a679f26bb057ee..2ad0642f7fce42 100644 --- a/tests/node_compat/test/parallel/test-buffer-no-negative-allocation.js +++ b/tests/node_compat/test/parallel/test-buffer-no-negative-allocation.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-nopendingdep-map.js b/tests/node_compat/test/parallel/test-buffer-nopendingdep-map.js index 54f272c7e09871..c94ac5db40ed44 100644 --- a/tests/node_compat/test/parallel/test-buffer-nopendingdep-map.js +++ b/tests/node_compat/test/parallel/test-buffer-nopendingdep-map.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --no-warnings --pending-deprecation diff --git a/tests/node_compat/test/parallel/test-buffer-of-no-deprecation.js b/tests/node_compat/test/parallel/test-buffer-of-no-deprecation.js index 84e0a476df9bb7..661201d2ff7516 100644 --- a/tests/node_compat/test/parallel/test-buffer-of-no-deprecation.js +++ b/tests/node_compat/test/parallel/test-buffer-of-no-deprecation.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-over-max-length.js b/tests/node_compat/test/parallel/test-buffer-over-max-length.js index c53a9d6110b7f4..56107e88313e02 100644 --- a/tests/node_compat/test/parallel/test-buffer-over-max-length.js +++ b/tests/node_compat/test/parallel/test-buffer-over-max-length.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-parent-property.js b/tests/node_compat/test/parallel/test-buffer-parent-property.js index 7c5f4acce57971..44c4e83fea3b84 100644 --- a/tests/node_compat/test/parallel/test-buffer-parent-property.js +++ b/tests/node_compat/test/parallel/test-buffer-parent-property.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-read.js b/tests/node_compat/test/parallel/test-buffer-read.js index 0b6db96b11ea52..751572e54fd45c 100644 --- a/tests/node_compat/test/parallel/test-buffer-read.js +++ b/tests/node_compat/test/parallel/test-buffer-read.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-readdouble.js b/tests/node_compat/test/parallel/test-buffer-readdouble.js index 7fe5a48417eb1c..ba159661a58c9f 100644 --- a/tests/node_compat/test/parallel/test-buffer-readdouble.js +++ b/tests/node_compat/test/parallel/test-buffer-readdouble.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-readfloat.js b/tests/node_compat/test/parallel/test-buffer-readfloat.js index de7bd6c9b4a148..56ad624cca1f1c 100644 --- a/tests/node_compat/test/parallel/test-buffer-readfloat.js +++ b/tests/node_compat/test/parallel/test-buffer-readfloat.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-readint.js b/tests/node_compat/test/parallel/test-buffer-readint.js index edcba393b0d727..ccf8e3616de65f 100644 --- a/tests/node_compat/test/parallel/test-buffer-readint.js +++ b/tests/node_compat/test/parallel/test-buffer-readint.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-readuint.js b/tests/node_compat/test/parallel/test-buffer-readuint.js index 7e1ed1442df97f..948dc21962e61d 100644 --- a/tests/node_compat/test/parallel/test-buffer-readuint.js +++ b/tests/node_compat/test/parallel/test-buffer-readuint.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-safe-unsafe.js b/tests/node_compat/test/parallel/test-buffer-safe-unsafe.js index 5f810d2e20e98b..f3ca64c5f19f75 100644 --- a/tests/node_compat/test/parallel/test-buffer-safe-unsafe.js +++ b/tests/node_compat/test/parallel/test-buffer-safe-unsafe.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-sharedarraybuffer.js b/tests/node_compat/test/parallel/test-buffer-sharedarraybuffer.js new file mode 100644 index 00000000000000..a7e8f03d92c1b7 --- /dev/null +++ b/tests/node_compat/test/parallel/test-buffer-sharedarraybuffer.js @@ -0,0 +1,34 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +require('../common'); +const assert = require('assert'); + +const sab = new SharedArrayBuffer(24); +const arr1 = new Uint16Array(sab); +const arr2 = new Uint16Array(12); +arr2[0] = 5000; +arr1[0] = 5000; +arr1[1] = 4000; +arr2[1] = 4000; + +const arr_buf = Buffer.from(arr1.buffer); +const ar_buf = Buffer.from(arr2.buffer); + +assert.deepStrictEqual(arr_buf, ar_buf); + +arr1[1] = 6000; +arr2[1] = 6000; + +assert.deepStrictEqual(arr_buf, ar_buf); + +// Checks for calling Buffer.byteLength on a SharedArrayBuffer. +assert.strictEqual(Buffer.byteLength(sab), sab.byteLength); + +Buffer.from({ buffer: sab }); // Should not throw. diff --git a/tests/node_compat/test/parallel/test-buffer-slice.js b/tests/node_compat/test/parallel/test-buffer-slice.js index bd3e8bbb445193..f67e59a6935fba 100644 --- a/tests/node_compat/test/parallel/test-buffer-slice.js +++ b/tests/node_compat/test/parallel/test-buffer-slice.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-buffer-slow.js b/tests/node_compat/test/parallel/test-buffer-slow.js index 577a92a9f6142e..16ead49c8a4230 100644 --- a/tests/node_compat/test/parallel/test-buffer-slow.js +++ b/tests/node_compat/test/parallel/test-buffer-slow.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-swap.js b/tests/node_compat/test/parallel/test-buffer-swap.js index 3885672b5bc9d4..7afdaf1db8e3f0 100644 --- a/tests/node_compat/test/parallel/test-buffer-swap.js +++ b/tests/node_compat/test/parallel/test-buffer-swap.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-tojson.js b/tests/node_compat/test/parallel/test-buffer-tojson.js index 353eb4746f32db..b135e655ab900a 100644 --- a/tests/node_compat/test/parallel/test-buffer-tojson.js +++ b/tests/node_compat/test/parallel/test-buffer-tojson.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-tostring-range.js b/tests/node_compat/test/parallel/test-buffer-tostring-range.js index f4555d5a95641c..d5ead53b83532d 100644 --- a/tests/node_compat/test/parallel/test-buffer-tostring-range.js +++ b/tests/node_compat/test/parallel/test-buffer-tostring-range.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-tostring-rangeerror.js b/tests/node_compat/test/parallel/test-buffer-tostring-rangeerror.js index 9ec11056c5c833..dc0f3afc5682ac 100644 --- a/tests/node_compat/test/parallel/test-buffer-tostring-rangeerror.js +++ b/tests/node_compat/test/parallel/test-buffer-tostring-rangeerror.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-tostring.js b/tests/node_compat/test/parallel/test-buffer-tostring.js index 4a71ce651ed31b..ce018a1b69ac1c 100644 --- a/tests/node_compat/test/parallel/test-buffer-tostring.js +++ b/tests/node_compat/test/parallel/test-buffer-tostring.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-write.js b/tests/node_compat/test/parallel/test-buffer-write.js new file mode 100644 index 00000000000000..672d5d0bc2a867 --- /dev/null +++ b/tests/node_compat/test/parallel/test-buffer-write.js @@ -0,0 +1,115 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); + +[-1, 10].forEach((offset) => { + assert.throws( + () => Buffer.alloc(9).write('foo', offset), + { + code: 'ERR_OUT_OF_RANGE', + name: 'RangeError', + message: 'The value of "offset" is out of range. ' + + `It must be >= 0 && <= 9. Received ${offset}` + } + ); +}); + +const resultMap = new Map([ + ['utf8', Buffer.from([102, 111, 111, 0, 0, 0, 0, 0, 0])], + ['ucs2', Buffer.from([102, 0, 111, 0, 111, 0, 0, 0, 0])], + ['ascii', Buffer.from([102, 111, 111, 0, 0, 0, 0, 0, 0])], + ['latin1', Buffer.from([102, 111, 111, 0, 0, 0, 0, 0, 0])], + ['binary', Buffer.from([102, 111, 111, 0, 0, 0, 0, 0, 0])], + ['utf16le', Buffer.from([102, 0, 111, 0, 111, 0, 0, 0, 0])], + ['base64', Buffer.from([102, 111, 111, 0, 0, 0, 0, 0, 0])], + ['base64url', Buffer.from([102, 111, 111, 0, 0, 0, 0, 0, 0])], + ['hex', Buffer.from([102, 111, 111, 0, 0, 0, 0, 0, 0])], +]); + +// utf8, ucs2, ascii, latin1, utf16le +const encodings = ['utf8', 'utf-8', 'ucs2', 'ucs-2', 'ascii', 'latin1', + 'binary', 'utf16le', 'utf-16le']; + +encodings + .reduce((es, e) => es.concat(e, e.toUpperCase()), []) + .forEach((encoding) => { + const buf = Buffer.alloc(9); + const len = Buffer.byteLength('foo', encoding); + assert.strictEqual(buf.write('foo', 0, len, encoding), len); + + if (encoding.includes('-')) + encoding = encoding.replace('-', ''); + + assert.deepStrictEqual(buf, resultMap.get(encoding.toLowerCase())); + }); + +// base64 +['base64', 'BASE64', 'base64url', 'BASE64URL'].forEach((encoding) => { + const buf = Buffer.alloc(9); + const len = Buffer.byteLength('Zm9v', encoding); + + assert.strictEqual(buf.write('Zm9v', 0, len, encoding), len); + assert.deepStrictEqual(buf, resultMap.get(encoding.toLowerCase())); +}); + +// hex +['hex', 'HEX'].forEach((encoding) => { + const buf = Buffer.alloc(9); + const len = Buffer.byteLength('666f6f', encoding); + + assert.strictEqual(buf.write('666f6f', 0, len, encoding), len); + assert.deepStrictEqual(buf, resultMap.get(encoding.toLowerCase())); +}); + +// Invalid encodings +for (let i = 1; i < 10; i++) { + const encoding = String(i).repeat(i); + const error = common.expectsError({ + code: 'ERR_UNKNOWN_ENCODING', + name: 'TypeError', + message: `Unknown encoding: ${encoding}` + }); + + assert.ok(!Buffer.isEncoding(encoding)); + assert.throws(() => Buffer.alloc(9).write('foo', encoding), error); +} + +// UCS-2 overflow CVE-2018-12115 +for (let i = 1; i < 4; i++) { + // Allocate two Buffers sequentially off the pool. Run more than once in case + // we hit the end of the pool and don't get sequential allocations + const x = Buffer.allocUnsafe(4).fill(0); + const y = Buffer.allocUnsafe(4).fill(1); + // Should not write anything, pos 3 doesn't have enough room for a 16-bit char + assert.strictEqual(x.write('ыыыыыы', 3, 'ucs2'), 0); + // CVE-2018-12115 experienced via buffer overrun to next block in the pool + assert.strictEqual(Buffer.compare(y, Buffer.alloc(4, 1)), 0); +} + +// Should not write any data when there is no space for 16-bit chars +const z = Buffer.alloc(4, 0); +assert.strictEqual(z.write('\u0001', 3, 'ucs2'), 0); +assert.strictEqual(Buffer.compare(z, Buffer.alloc(4, 0)), 0); +// Make sure longer strings are written up to the buffer end. +assert.strictEqual(z.write('abcd', 2), 2); +assert.deepStrictEqual([...z], [0, 0, 0x61, 0x62]); + +// Large overrun could corrupt the process +assert.strictEqual(Buffer.alloc(4) + .write('ыыыыыы'.repeat(100), 3, 'utf16le'), 0); + +{ + // .write() does not affect the byte after the written-to slice of the Buffer. + // Refs: https://github.com/nodejs/node/issues/26422 + const buf = Buffer.alloc(8); + assert.strictEqual(buf.write('ыы', 1, 'utf16le'), 4); + assert.deepStrictEqual([...buf], [0, 0x4b, 0x04, 0x4b, 0x04, 0, 0, 0]); +} diff --git a/tests/node_compat/test/parallel/test-buffer-writedouble.js b/tests/node_compat/test/parallel/test-buffer-writedouble.js index aaa41fb21692cb..a41a433a0fc134 100644 --- a/tests/node_compat/test/parallel/test-buffer-writedouble.js +++ b/tests/node_compat/test/parallel/test-buffer-writedouble.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-writefloat.js b/tests/node_compat/test/parallel/test-buffer-writefloat.js index d971fccc3d17ec..56b9a4ebc89584 100644 --- a/tests/node_compat/test/parallel/test-buffer-writefloat.js +++ b/tests/node_compat/test/parallel/test-buffer-writefloat.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-writeint.js b/tests/node_compat/test/parallel/test-buffer-writeint.js index 227663b85789c2..df36f6a7779e10 100644 --- a/tests/node_compat/test/parallel/test-buffer-writeint.js +++ b/tests/node_compat/test/parallel/test-buffer-writeint.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-writeuint.js b/tests/node_compat/test/parallel/test-buffer-writeuint.js index 50ab0888de63c7..831c27f602d279 100644 --- a/tests/node_compat/test/parallel/test-buffer-writeuint.js +++ b/tests/node_compat/test/parallel/test-buffer-writeuint.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-zero-fill-cli.js b/tests/node_compat/test/parallel/test-buffer-zero-fill-cli.js index e886f7baa38dae..8edddbe418d8b5 100644 --- a/tests/node_compat/test/parallel/test-buffer-zero-fill-cli.js +++ b/tests/node_compat/test/parallel/test-buffer-zero-fill-cli.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-zero-fill-reset.js b/tests/node_compat/test/parallel/test-buffer-zero-fill-reset.js index b1dca54ac1c2de..86236f2c332aa7 100644 --- a/tests/node_compat/test/parallel/test-buffer-zero-fill-reset.js +++ b/tests/node_compat/test/parallel/test-buffer-zero-fill-reset.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-buffer-zero-fill.js b/tests/node_compat/test/parallel/test-buffer-zero-fill.js index a891343c6a6f02..9291887523765f 100644 --- a/tests/node_compat/test/parallel/test-buffer-zero-fill.js +++ b/tests/node_compat/test/parallel/test-buffer-zero-fill.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-child-process-default-options.js b/tests/node_compat/test/parallel/test-child-process-default-options.js index 2dafeb493862da..29bbf49a633e17 100644 --- a/tests/node_compat/test/parallel/test-child-process-default-options.js +++ b/tests/node_compat/test/parallel/test-child-process-default-options.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-child-process-double-pipe.js b/tests/node_compat/test/parallel/test-child-process-double-pipe.js index 5703c9bcdf9458..ac75915564f0af 100644 --- a/tests/node_compat/test/parallel/test-child-process-double-pipe.js +++ b/tests/node_compat/test/parallel/test-child-process-double-pipe.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-child-process-exec-cwd.js b/tests/node_compat/test/parallel/test-child-process-exec-cwd.js index 34a31615dd1602..09e06b20a732b5 100644 --- a/tests/node_compat/test/parallel/test-child-process-exec-cwd.js +++ b/tests/node_compat/test/parallel/test-child-process-exec-cwd.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-child-process-exec-env.js b/tests/node_compat/test/parallel/test-child-process-exec-env.js index ce3ef261349089..5e144074b04f10 100644 --- a/tests/node_compat/test/parallel/test-child-process-exec-env.js +++ b/tests/node_compat/test/parallel/test-child-process-exec-env.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-child-process-exec-error.js b/tests/node_compat/test/parallel/test-child-process-exec-error.js index 8af3bbefa994ce..ab16bdf7d5de81 100644 --- a/tests/node_compat/test/parallel/test-child-process-exec-error.js +++ b/tests/node_compat/test/parallel/test-child-process-exec-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-child-process-exec-stdout-stderr-data-string.js b/tests/node_compat/test/parallel/test-child-process-exec-stdout-stderr-data-string.js index 07a13c888c1ee4..7d15e05696e64b 100644 --- a/tests/node_compat/test/parallel/test-child-process-exec-stdout-stderr-data-string.js +++ b/tests/node_compat/test/parallel/test-child-process-exec-stdout-stderr-data-string.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-child-process-execfile-maxbuf.js b/tests/node_compat/test/parallel/test-child-process-execfile-maxbuf.js index ef69cf2d019733..a30c8b55efdc4c 100644 --- a/tests/node_compat/test/parallel/test-child-process-execfile-maxbuf.js +++ b/tests/node_compat/test/parallel/test-child-process-execfile-maxbuf.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-child-process-execfilesync-maxbuf.js b/tests/node_compat/test/parallel/test-child-process-execfilesync-maxbuf.js index 4c1d50e2a97db3..b44160ffcd82c8 100644 --- a/tests/node_compat/test/parallel/test-child-process-execfilesync-maxbuf.js +++ b/tests/node_compat/test/parallel/test-child-process-execfilesync-maxbuf.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-child-process-flush-stdio.js b/tests/node_compat/test/parallel/test-child-process-flush-stdio.js index bb9b10e6dd7dad..3909eca4a76fa0 100644 --- a/tests/node_compat/test/parallel/test-child-process-flush-stdio.js +++ b/tests/node_compat/test/parallel/test-child-process-flush-stdio.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-child-process-fork3.js b/tests/node_compat/test/parallel/test-child-process-fork3.js new file mode 100644 index 00000000000000..cda9098a3b161c --- /dev/null +++ b/tests/node_compat/test/parallel/test-child-process-fork3.js @@ -0,0 +1,34 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const child_process = require('child_process'); +const fixtures = require('../common/fixtures'); + +child_process.fork(fixtures.path('empty.js')); // should not hang diff --git a/tests/node_compat/test/parallel/test-child-process-ipc-next-tick.js b/tests/node_compat/test/parallel/test-child-process-ipc-next-tick.js index f511d2500449a1..cf37a1c5dedbea 100644 --- a/tests/node_compat/test/parallel/test-child-process-ipc-next-tick.js +++ b/tests/node_compat/test/parallel/test-child-process-ipc-next-tick.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-child-process-kill.js b/tests/node_compat/test/parallel/test-child-process-kill.js index 319fba5df94038..a776bff50ff2f9 100644 --- a/tests/node_compat/test/parallel/test-child-process-kill.js +++ b/tests/node_compat/test/parallel/test-child-process-kill.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-child-process-send-type-error.js b/tests/node_compat/test/parallel/test-child-process-send-type-error.js new file mode 100644 index 00000000000000..0ee7a8c9c398cd --- /dev/null +++ b/tests/node_compat/test/parallel/test-child-process-send-type-error.js @@ -0,0 +1,36 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); + +const assert = require('assert'); +const cp = require('child_process'); + +function fail(proc, args) { + assert.throws(() => { + proc.send.apply(proc, args); + }, { code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError' }); +} + +let target = process; + +if (process.argv[2] !== 'child') { + target = cp.fork(__filename, ['child']); + target.on('exit', common.mustCall((code, signal) => { + assert.strictEqual(code, 0); + assert.strictEqual(signal, null); + })); +} + +fail(target, ['msg', null, null]); +fail(target, ['msg', null, '']); +fail(target, ['msg', null, 'foo']); +fail(target, ['msg', null, 0]); +fail(target, ['msg', null, NaN]); +fail(target, ['msg', null, 1]); +fail(target, ['msg', null, null, common.mustNotCall()]); diff --git a/tests/node_compat/test/parallel/test-child-process-set-blocking.js b/tests/node_compat/test/parallel/test-child-process-set-blocking.js index d3d03d7b557291..6d3b6120337891 100644 --- a/tests/node_compat/test/parallel/test-child-process-set-blocking.js +++ b/tests/node_compat/test/parallel/test-child-process-set-blocking.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-child-process-spawn-args.js b/tests/node_compat/test/parallel/test-child-process-spawn-args.js index 1b21fe61634df0..55f9dbcad871f7 100644 --- a/tests/node_compat/test/parallel/test-child-process-spawn-args.js +++ b/tests/node_compat/test/parallel/test-child-process-spawn-args.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-child-process-spawn-event.js b/tests/node_compat/test/parallel/test-child-process-spawn-event.js index bf1f26ff0d1299..0b044a8013803c 100644 --- a/tests/node_compat/test/parallel/test-child-process-spawn-event.js +++ b/tests/node_compat/test/parallel/test-child-process-spawn-event.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-child-process-spawnsync-args.js b/tests/node_compat/test/parallel/test-child-process-spawnsync-args.js index 8a531007a3b84e..7909eddeffdb47 100644 --- a/tests/node_compat/test/parallel/test-child-process-spawnsync-args.js +++ b/tests/node_compat/test/parallel/test-child-process-spawnsync-args.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-child-process-spawnsync-maxbuf.js b/tests/node_compat/test/parallel/test-child-process-spawnsync-maxbuf.js index 12102182529e63..df7b4a3058ce5c 100644 --- a/tests/node_compat/test/parallel/test-child-process-spawnsync-maxbuf.js +++ b/tests/node_compat/test/parallel/test-child-process-spawnsync-maxbuf.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-child-process-spawnsync-validation-errors.js b/tests/node_compat/test/parallel/test-child-process-spawnsync-validation-errors.js index 09a306c136e854..5e6ffda9d58b58 100644 --- a/tests/node_compat/test/parallel/test-child-process-spawnsync-validation-errors.js +++ b/tests/node_compat/test/parallel/test-child-process-spawnsync-validation-errors.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-child-process-spawnsync.js b/tests/node_compat/test/parallel/test-child-process-spawnsync.js index 5fbd994cc2b54b..e6e667a22720ab 100644 --- a/tests/node_compat/test/parallel/test-child-process-spawnsync.js +++ b/tests/node_compat/test/parallel/test-child-process-spawnsync.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-child-process-stdin-ipc.js b/tests/node_compat/test/parallel/test-child-process-stdin-ipc.js new file mode 100644 index 00000000000000..46bfdc7be6064d --- /dev/null +++ b/tests/node_compat/test/parallel/test-child-process-stdin-ipc.js @@ -0,0 +1,47 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); + +const spawn = require('child_process').spawn; + +if (process.argv[2] === 'child') { + // Just reference stdin, it should start it + process.stdin; // eslint-disable-line no-unused-expressions + return; +} + +const proc = spawn(process.execPath, [__filename, 'child'], { + stdio: ['ipc', 'inherit', 'inherit'] +}); + +proc.on('exit', common.mustCall(function(code) { + assert.strictEqual(code, 0); +})); diff --git a/tests/node_compat/test/parallel/test-child-process-stdio-overlapped.js b/tests/node_compat/test/parallel/test-child-process-stdio-overlapped.js new file mode 100644 index 00000000000000..9ee17df49f16e8 --- /dev/null +++ b/tests/node_compat/test/parallel/test-child-process-stdio-overlapped.js @@ -0,0 +1,86 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Test for "overlapped" stdio option. This test uses the "overlapped-checker" +// helper program which basically a specialized echo program. +// +// The test has two goals: +// +// - Verify that overlapped I/O works on windows. The test program will deadlock +// if stdin doesn't have the FILE_FLAG_OVERLAPPED flag set on startup (see +// test/overlapped-checker/main_win.c for more details). +// - Verify that "overlapped" stdio option works transparently as a pipe (on +// unix/windows) +// +// This is how the test works: +// +// - This script assumes only numeric strings are written to the test program +// stdout. +// - The test program will be spawned with "overlapped" set on stdin and "pipe" +// set on stdout/stderr and at startup writes a number to its stdout +// - When this script receives some data, it will parse the number, add 50 and +// write to the test program's stdin. +// - The test program will then echo the number back to us which will repeat the +// cycle until the number reaches 200, at which point we send the "exit" +// string, which causes the test program to exit. +// - Extra assertion: Every time the test program writes a string to its stdout, +// it will write the number of bytes written to stderr. +// - If overlapped I/O is not setup correctly, this test is going to hang. +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const path = require('path'); +const child_process = require('child_process'); + +const exeExtension = process.platform === 'win32' ? '.exe' : ''; +const exe = 'overlapped-checker' + exeExtension; +const exePath = path.join(path.dirname(process.execPath), exe); + +if (!require('fs').existsSync(exePath)) { + common.skip(exe + ' binary is not available'); +} + +const child = child_process.spawn(exePath, [], { + stdio: ['overlapped', 'pipe', 'pipe'] +}); + +child.stdin.setEncoding('utf8'); +child.stdout.setEncoding('utf8'); +child.stderr.setEncoding('utf8'); + +function writeNext(n) { + child.stdin.write((n + 50).toString()); +} + +child.stdout.on('data', (s) => { + const n = Number(s); + if (n >= 200) { + child.stdin.write('exit'); + return; + } + writeNext(n); +}); + +let stderr = ''; +child.stderr.on('data', (s) => { + stderr += s; +}); + +child.stderr.on('end', common.mustCall(() => { + // This is the sequence of numbers sent to us: + // - 0 (1 byte written) + // - 50 (2 bytes written) + // - 100 (3 bytes written) + // - 150 (3 bytes written) + // - 200 (3 bytes written) + assert.strictEqual(stderr, '12333'); +})); + +child.on('exit', common.mustCall((status) => { + // The test program will return the number of writes as status code. + assert.strictEqual(status, 0); +})); diff --git a/tests/node_compat/test/parallel/test-client-request-destroy.js b/tests/node_compat/test/parallel/test-client-request-destroy.js new file mode 100644 index 00000000000000..dabdb8c4d3a32c --- /dev/null +++ b/tests/node_compat/test/parallel/test-client-request-destroy.js @@ -0,0 +1,20 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +// Test that http.ClientRequest,prototype.destroy() returns `this`. +require('../common'); + +const assert = require('assert'); +const http = require('http'); +const clientRequest = new http.ClientRequest({ createConnection: () => {} }); + +assert.strictEqual(clientRequest.destroyed, false); +assert.strictEqual(clientRequest.destroy(), clientRequest); +assert.strictEqual(clientRequest.destroyed, true); +assert.strictEqual(clientRequest.destroy(), clientRequest); diff --git a/tests/node_compat/test/parallel/test-cluster-uncaught-exception.js b/tests/node_compat/test/parallel/test-cluster-uncaught-exception.js new file mode 100644 index 00000000000000..96a5d261867ac4 --- /dev/null +++ b/tests/node_compat/test/parallel/test-cluster-uncaught-exception.js @@ -0,0 +1,56 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +// Installing a custom uncaughtException handler should override the default +// one that the cluster module installs. +// https://github.com/joyent/node/issues/2556 + +const common = require('../common'); +const assert = require('assert'); +const cluster = require('cluster'); +const fork = require('child_process').fork; + +const MAGIC_EXIT_CODE = 42; + +const isTestRunner = process.argv[2] !== 'child'; + +if (isTestRunner) { + const primary = fork(__filename, ['child']); + primary.on('exit', common.mustCall((code) => { + assert.strictEqual(code, MAGIC_EXIT_CODE); + })); +} else if (cluster.isPrimary) { + process.on('uncaughtException', common.mustCall(() => { + process.nextTick(() => process.exit(MAGIC_EXIT_CODE)); + })); + cluster.fork(); + throw new Error('kill primary'); +} else { // worker + process.exit(); +} diff --git a/tests/node_compat/test/parallel/test-console-assign-undefined.js b/tests/node_compat/test/parallel/test-console-assign-undefined.js new file mode 100644 index 00000000000000..f19fb5c1f79eed --- /dev/null +++ b/tests/node_compat/test/parallel/test-console-assign-undefined.js @@ -0,0 +1,35 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +// Patch global.console before importing modules that may modify the console +// object. + +const tmp = global.console; +global.console = 42; + +require('../common'); +const assert = require('assert'); + +// Originally the console had a getter. Test twice to verify it had no side +// effect. +assert.strictEqual(global.console, 42); +assert.strictEqual(global.console, 42); + +assert.throws( + () => console.log('foo'), + { name: 'TypeError' } +); + +global.console = 1; +assert.strictEqual(global.console, 1); +assert.strictEqual(console, 1); + +// Reset the console +global.console = tmp; +console.log('foo'); diff --git a/tests/node_compat/test/parallel/test-console-async-write-error.js b/tests/node_compat/test/parallel/test-console-async-write-error.js index 1e079292d4ee99..812848f6e5e61a 100644 --- a/tests/node_compat/test/parallel/test-console-async-write-error.js +++ b/tests/node_compat/test/parallel/test-console-async-write-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-console-formatTime.js b/tests/node_compat/test/parallel/test-console-formatTime.js new file mode 100644 index 00000000000000..3ab6e9ca8aad0c --- /dev/null +++ b/tests/node_compat/test/parallel/test-console-formatTime.js @@ -0,0 +1,21 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +// Flags: --expose-internals +require('../common'); +const { formatTime } = require('internal/console/constructor'); +const assert = require('assert'); + +assert.strictEqual(formatTime(100.0096), '100.01ms'); +assert.strictEqual(formatTime(100.0115), '100.011ms'); +assert.strictEqual(formatTime(1500.04), '1.500s'); +assert.strictEqual(formatTime(1000.056), '1.000s'); +assert.strictEqual(formatTime(60300.3), '1:00.300 (m:ss.mmm)'); +assert.strictEqual(formatTime(4000457.4), '1:06:40.457 (h:mm:ss.mmm)'); +assert.strictEqual(formatTime(3601310.4), '1:00:01.310 (h:mm:ss.mmm)'); +assert.strictEqual(formatTime(3213601017.6), '892:40:01.018 (h:mm:ss.mmm)'); diff --git a/tests/node_compat/test/parallel/test-console-group.js b/tests/node_compat/test/parallel/test-console-group.js index 3224ddb1bfd88e..272981e4672cfe 100644 --- a/tests/node_compat/test/parallel/test-console-group.js +++ b/tests/node_compat/test/parallel/test-console-group.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-console-log-stdio-broken-dest.js b/tests/node_compat/test/parallel/test-console-log-stdio-broken-dest.js index 153dd9e542adc9..cbbcd9d92b776e 100644 --- a/tests/node_compat/test/parallel/test-console-log-stdio-broken-dest.js +++ b/tests/node_compat/test/parallel/test-console-log-stdio-broken-dest.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-console-log-throw-primitive.js b/tests/node_compat/test/parallel/test-console-log-throw-primitive.js index 6e1a8c7a7b9405..3d397598456e73 100644 --- a/tests/node_compat/test/parallel/test-console-log-throw-primitive.js +++ b/tests/node_compat/test/parallel/test-console-log-throw-primitive.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-console-no-swallow-stack-overflow.js b/tests/node_compat/test/parallel/test-console-no-swallow-stack-overflow.js index 8dcd68d33d5d43..d7fc0269b5cea6 100644 --- a/tests/node_compat/test/parallel/test-console-no-swallow-stack-overflow.js +++ b/tests/node_compat/test/parallel/test-console-no-swallow-stack-overflow.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-console-not-call-toString.js b/tests/node_compat/test/parallel/test-console-not-call-toString.js new file mode 100644 index 00000000000000..fd7416dc2d9b32 --- /dev/null +++ b/tests/node_compat/test/parallel/test-console-not-call-toString.js @@ -0,0 +1,41 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); + +function func() {} +let toStringCalled = false; +func.toString = function() { + toStringCalled = true; +}; + +require('util').inspect(func); + +assert.ok(!toStringCalled); diff --git a/tests/node_compat/test/parallel/test-console-self-assign.js b/tests/node_compat/test/parallel/test-console-self-assign.js new file mode 100644 index 00000000000000..780bbfa81c33bd --- /dev/null +++ b/tests/node_compat/test/parallel/test-console-self-assign.js @@ -0,0 +1,13 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +require('../common'); + +// Assigning to itself should not throw. +global.console = global.console; // eslint-disable-line no-self-assign diff --git a/tests/node_compat/test/parallel/test-console-sync-write-error.js b/tests/node_compat/test/parallel/test-console-sync-write-error.js index 9a9766645b629a..58fca44ba05531 100644 --- a/tests/node_compat/test/parallel/test-console-sync-write-error.js +++ b/tests/node_compat/test/parallel/test-console-sync-write-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-console-table.js b/tests/node_compat/test/parallel/test-console-table.js index 991521e8e350b4..6a3de08f21b85e 100644 --- a/tests/node_compat/test/parallel/test-console-table.js +++ b/tests/node_compat/test/parallel/test-console-table.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-console-tty-colors.js b/tests/node_compat/test/parallel/test-console-tty-colors.js index 5d2a994bb4f43d..236ed613f98edb 100644 --- a/tests/node_compat/test/parallel/test-console-tty-colors.js +++ b/tests/node_compat/test/parallel/test-console-tty-colors.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-crypto-dh-errors.js b/tests/node_compat/test/parallel/test-crypto-dh-errors.js new file mode 100644 index 00000000000000..73224a715c1876 --- /dev/null +++ b/tests/node_compat/test/parallel/test-crypto-dh-errors.js @@ -0,0 +1,118 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const assert = require('assert'); +const crypto = require('crypto'); + +// https://github.com/nodejs/node/issues/32738 +// XXX(bnoordhuis) validateInt32() throwing ERR_OUT_OF_RANGE and RangeError +// instead of ERR_INVALID_ARG_TYPE and TypeError is questionable, IMO. +assert.throws(() => crypto.createDiffieHellman(13.37), { + code: 'ERR_OUT_OF_RANGE', + name: 'RangeError', + message: 'The value of "sizeOrKey" is out of range. ' + + 'It must be an integer. Received 13.37', +}); + +assert.throws(() => crypto.createDiffieHellman('abcdef', 13.37), { + code: 'ERR_OUT_OF_RANGE', + name: 'RangeError', + message: 'The value of "generator" is out of range. ' + + 'It must be an integer. Received 13.37', +}); + +for (const bits of [-1, 0, 1]) { + if (common.hasOpenSSL3) { + assert.throws(() => crypto.createDiffieHellman(bits), { + code: 'ERR_OSSL_DH_MODULUS_TOO_SMALL', + name: 'Error', + message: /modulus too small/, + }); + } else { + assert.throws(() => crypto.createDiffieHellman(bits), { + code: 'ERR_OSSL_BN_BITS_TOO_SMALL', + name: 'Error', + message: /bits too small/, + }); + } +} + +for (const g of [-1, 1]) { + const ex = { + code: 'ERR_OSSL_DH_BAD_GENERATOR', + name: 'Error', + message: /bad generator/, + }; + assert.throws(() => crypto.createDiffieHellman('abcdef', g), ex); + assert.throws(() => crypto.createDiffieHellman('abcdef', 'hex', g), ex); +} + +for (const g of [Buffer.from([]), + Buffer.from([0]), + Buffer.from([1])]) { + const ex = { + code: 'ERR_OSSL_DH_BAD_GENERATOR', + name: 'Error', + message: /bad generator/, + }; + assert.throws(() => crypto.createDiffieHellman('abcdef', g), ex); + assert.throws(() => crypto.createDiffieHellman('abcdef', 'hex', g), ex); +} + +[ + [0x1, 0x2], + () => { }, + /abc/, + {}, +].forEach((input) => { + assert.throws( + () => crypto.createDiffieHellman(input), + { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError', + } + ); +}); + +// Invalid test: curve argument is undefined +assert.throws( + () => crypto.createECDH(), + { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError', + message: 'The "curve" argument must be of type string. ' + + 'Received undefined' + }); + +assert.throws( + function() { + crypto.getDiffieHellman('unknown-group'); + }, + { + name: 'Error', + code: 'ERR_CRYPTO_UNKNOWN_DH_GROUP', + message: 'Unknown DH group' + }, + 'crypto.getDiffieHellman(\'unknown-group\') ' + + 'failed to throw the expected error.' +); + +assert.throws( + () => crypto.createDiffieHellman('', true), + { + code: 'ERR_INVALID_ARG_TYPE' + } +); +[true, Symbol(), {}, () => {}, []].forEach((generator) => assert.throws( + () => crypto.createDiffieHellman('', 'base64', generator), + { code: 'ERR_INVALID_ARG_TYPE' } +)); diff --git a/tests/node_compat/test/parallel/test-crypto-dh-odd-key.js b/tests/node_compat/test/parallel/test-crypto-dh-odd-key.js new file mode 100644 index 00000000000000..ba5e64f945c63f --- /dev/null +++ b/tests/node_compat/test/parallel/test-crypto-dh-odd-key.js @@ -0,0 +1,50 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const assert = require('assert'); +const crypto = require('crypto'); + +function test() { + const odd = Buffer.alloc(39, 'A'); + + const c = crypto.createDiffieHellman(common.hasOpenSSL3 ? 1024 : 32); + c.setPrivateKey(odd); + c.generateKeys(); +} + +// FIPS requires a length of at least 1024 +if (!common.hasFipsCrypto) { + test(); +} else { + assert.throws(function() { test(); }, /key size too small/); +} diff --git a/tests/node_compat/test/parallel/test-crypto-dh-shared.js b/tests/node_compat/test/parallel/test-crypto-dh-shared.js index c087e15d87ddf6..d2afeaf38c00a7 100644 --- a/tests/node_compat/test/parallel/test-crypto-dh-shared.js +++ b/tests/node_compat/test/parallel/test-crypto-dh-shared.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-crypto-domain.js b/tests/node_compat/test/parallel/test-crypto-domain.js new file mode 100644 index 00000000000000..e0a7c7f11eb911 --- /dev/null +++ b/tests/node_compat/test/parallel/test-crypto-domain.js @@ -0,0 +1,56 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const assert = require('assert'); +const crypto = require('crypto'); +const domain = require('domain'); + +const test = (fn) => { + const ex = new Error('BAM'); + const d = domain.create(); + d.on('error', common.mustCall(function(err) { + assert.strictEqual(err, ex); + })); + const cb = common.mustCall(function() { + throw ex; + }); + d.run(cb); +}; + +test(function(cb) { + crypto.pbkdf2('password', 'salt', 1, 8, cb); +}); + +test(function(cb) { + crypto.randomBytes(32, cb); +}); diff --git a/tests/node_compat/test/parallel/test-crypto-from-binary.js b/tests/node_compat/test/parallel/test-crypto-from-binary.js new file mode 100644 index 00000000000000..f1eee30a9620b4 --- /dev/null +++ b/tests/node_compat/test/parallel/test-crypto-from-binary.js @@ -0,0 +1,72 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +// This is the same as test/simple/test-crypto, but from before the shift +// to use buffers by default. + + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const assert = require('assert'); +const crypto = require('crypto'); + +const EXTERN_APEX = 0xFBEE9; + +// Manually controlled string for checking binary output +let ucs2_control = 'a\u0000'; + +// Grow the strings to proper length +while (ucs2_control.length <= EXTERN_APEX) { + ucs2_control = ucs2_control.repeat(2); +} + + +// Check resultant buffer and output string +const b = Buffer.from(ucs2_control + ucs2_control, 'ucs2'); + +// +// Test updating from birant data +// +{ + const datum1 = b.slice(700000); + const hash1_converted = crypto.createHash('sha1') + .update(datum1.toString('base64'), 'base64') + .digest('hex'); + const hash1_direct = crypto.createHash('sha1').update(datum1).digest('hex'); + assert.strictEqual(hash1_direct, hash1_converted); + + const datum2 = b; + const hash2_converted = crypto.createHash('sha1') + .update(datum2.toString('base64'), 'base64') + .digest('hex'); + const hash2_direct = crypto.createHash('sha1').update(datum2).digest('hex'); + assert.strictEqual(hash2_direct, hash2_converted); +} diff --git a/tests/node_compat/test/parallel/test-crypto-hash.js b/tests/node_compat/test/parallel/test-crypto-hash.js index 18c57dab74949c..c24531138c416e 100644 --- a/tests/node_compat/test/parallel/test-crypto-hash.js +++ b/tests/node_compat/test/parallel/test-crypto-hash.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-crypto-keygen-dh-classic.js b/tests/node_compat/test/parallel/test-crypto-keygen-dh-classic.js new file mode 100644 index 00000000000000..172a91470d807a --- /dev/null +++ b/tests/node_compat/test/parallel/test-crypto-keygen-dh-classic.js @@ -0,0 +1,30 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const assert = require('assert'); +const { + generateKeyPair, +} = require('crypto'); + +// Test classic Diffie-Hellman key generation. +{ + generateKeyPair('dh', { + primeLength: 512 + }, common.mustSucceed((publicKey, privateKey) => { + assert.strictEqual(publicKey.type, 'public'); + assert.strictEqual(publicKey.asymmetricKeyType, 'dh'); + + assert.strictEqual(privateKey.type, 'private'); + assert.strictEqual(privateKey.asymmetricKeyType, 'dh'); + })); +} diff --git a/tests/node_compat/test/parallel/test-crypto-keygen-duplicate-deprecated-option.js b/tests/node_compat/test/parallel/test-crypto-keygen-duplicate-deprecated-option.js new file mode 100644 index 00000000000000..300c8d893d0ddf --- /dev/null +++ b/tests/node_compat/test/parallel/test-crypto-keygen-duplicate-deprecated-option.js @@ -0,0 +1,50 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const assert = require('assert'); +const { + generateKeyPair, +} = require('crypto'); + +// This test makes sure deprecated and new options may be used +// simultaneously so long as they're identical values. +{ + generateKeyPair('rsa-pss', { + modulusLength: 512, + saltLength: 16, + hash: 'sha256', + hashAlgorithm: 'sha256', + mgf1Hash: 'sha256', + mgf1HashAlgorithm: 'sha256' + }, common.mustSucceed((publicKey, privateKey) => { + assert.strictEqual(publicKey.type, 'public'); + assert.strictEqual(publicKey.asymmetricKeyType, 'rsa-pss'); + assert.deepStrictEqual(publicKey.asymmetricKeyDetails, { + modulusLength: 512, + publicExponent: 65537n, + hashAlgorithm: 'sha256', + mgf1HashAlgorithm: 'sha256', + saltLength: 16 + }); + + assert.strictEqual(privateKey.type, 'private'); + assert.strictEqual(privateKey.asymmetricKeyType, 'rsa-pss'); + assert.deepStrictEqual(privateKey.asymmetricKeyDetails, { + modulusLength: 512, + publicExponent: 65537n, + hashAlgorithm: 'sha256', + mgf1HashAlgorithm: 'sha256', + saltLength: 16 + }); + })); +} diff --git a/tests/node_compat/test/parallel/test-crypto-keygen-empty-passphrase-no-error.js b/tests/node_compat/test/parallel/test-crypto-keygen-empty-passphrase-no-error.js new file mode 100644 index 00000000000000..ad6f10931cda40 --- /dev/null +++ b/tests/node_compat/test/parallel/test-crypto-keygen-empty-passphrase-no-error.js @@ -0,0 +1,36 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const assert = require('assert'); +const { + generateKeyPair, +} = require('crypto'); + +// Passing an empty passphrase string should not throw ERR_OSSL_CRYPTO_MALLOC_FAILURE even on OpenSSL 3. +// Regression test for https://github.com/nodejs/node/issues/41428. +generateKeyPair('rsa', { + modulusLength: 1024, + publicKeyEncoding: { + type: 'spki', + format: 'pem' + }, + privateKeyEncoding: { + type: 'pkcs8', + format: 'pem', + cipher: 'aes-256-cbc', + passphrase: '' + } +}, common.mustSucceed((publicKey, privateKey) => { + assert.strictEqual(typeof publicKey, 'string'); + assert.strictEqual(typeof privateKey, 'string'); +})); diff --git a/tests/node_compat/test/parallel/test-crypto-keygen-key-objects.js b/tests/node_compat/test/parallel/test-crypto-keygen-key-objects.js new file mode 100644 index 00000000000000..e0dba542979333 --- /dev/null +++ b/tests/node_compat/test/parallel/test-crypto-keygen-key-objects.js @@ -0,0 +1,40 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const assert = require('assert'); +const { + generateKeyPairSync, +} = require('crypto'); + +// Test sync key generation with key objects. +{ + const { publicKey, privateKey } = generateKeyPairSync('rsa', { + modulusLength: 512 + }); + + assert.strictEqual(typeof publicKey, 'object'); + assert.strictEqual(publicKey.type, 'public'); + assert.strictEqual(publicKey.asymmetricKeyType, 'rsa'); + assert.deepStrictEqual(publicKey.asymmetricKeyDetails, { + modulusLength: 512, + publicExponent: 65537n + }); + + assert.strictEqual(typeof privateKey, 'object'); + assert.strictEqual(privateKey.type, 'private'); + assert.strictEqual(privateKey.asymmetricKeyType, 'rsa'); + assert.deepStrictEqual(privateKey.asymmetricKeyDetails, { + modulusLength: 512, + publicExponent: 65537n + }); +} diff --git a/tests/node_compat/test/parallel/test-crypto-keygen-missing-oid.js b/tests/node_compat/test/parallel/test-crypto-keygen-missing-oid.js new file mode 100644 index 00000000000000..0d7e0cb693120f --- /dev/null +++ b/tests/node_compat/test/parallel/test-crypto-keygen-missing-oid.js @@ -0,0 +1,50 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const assert = require('assert'); +const { + generateKeyPair, + generateKeyPairSync, + getCurves, +} = require('crypto'); + +// This test creates EC key pairs on curves without associated OIDs. +// Specifying a key encoding should not crash. +{ + if (process.versions.openssl >= '1.1.1i') { + for (const namedCurve of ['Oakley-EC2N-3', 'Oakley-EC2N-4']) { + if (!getCurves().includes(namedCurve)) + continue; + + const expectedErrorCode = + common.hasOpenSSL3 ? 'ERR_OSSL_MISSING_OID' : 'ERR_OSSL_EC_MISSING_OID'; + const params = { + namedCurve, + publicKeyEncoding: { + format: 'der', + type: 'spki' + } + }; + + assert.throws(() => { + generateKeyPairSync('ec', params); + }, { + code: expectedErrorCode + }); + + generateKeyPair('ec', params, common.mustCall((err) => { + assert.strictEqual(err.code, expectedErrorCode); + })); + } + } +} diff --git a/tests/node_compat/test/parallel/test-crypto-keygen-non-standard-public-exponent.js b/tests/node_compat/test/parallel/test-crypto-keygen-non-standard-public-exponent.js new file mode 100644 index 00000000000000..b769bb2437d1d0 --- /dev/null +++ b/tests/node_compat/test/parallel/test-crypto-keygen-non-standard-public-exponent.js @@ -0,0 +1,42 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const assert = require('assert'); +const { + generateKeyPairSync, +} = require('crypto'); + +// Test sync key generation with key objects with a non-standard +// publicExponent +{ + const { publicKey, privateKey } = generateKeyPairSync('rsa', { + publicExponent: 3, + modulusLength: 512 + }); + + assert.strictEqual(typeof publicKey, 'object'); + assert.strictEqual(publicKey.type, 'public'); + assert.strictEqual(publicKey.asymmetricKeyType, 'rsa'); + assert.deepStrictEqual(publicKey.asymmetricKeyDetails, { + modulusLength: 512, + publicExponent: 3n + }); + + assert.strictEqual(typeof privateKey, 'object'); + assert.strictEqual(privateKey.type, 'private'); + assert.strictEqual(privateKey.asymmetricKeyType, 'rsa'); + assert.deepStrictEqual(privateKey.asymmetricKeyDetails, { + modulusLength: 512, + publicExponent: 3n + }); +} diff --git a/tests/node_compat/test/parallel/test-crypto-keygen-rfc8017-9-1.js b/tests/node_compat/test/parallel/test-crypto-keygen-rfc8017-9-1.js new file mode 100644 index 00000000000000..2019f03f6ac5bf --- /dev/null +++ b/tests/node_compat/test/parallel/test-crypto-keygen-rfc8017-9-1.js @@ -0,0 +1,39 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const assert = require('assert'); +const { + generateKeyPair, +} = require('crypto'); + +// RFC 8017, 9.1.: "Assuming that the mask generation function is based on a +// hash function, it is RECOMMENDED that the hash function be the same as the +// one that is applied to the message." +{ + + generateKeyPair('rsa-pss', { + modulusLength: 512, + hashAlgorithm: 'sha256', + saltLength: 16 + }, common.mustSucceed((publicKey, privateKey) => { + const expectedKeyDetails = { + modulusLength: 512, + publicExponent: 65537n, + hashAlgorithm: 'sha256', + mgf1HashAlgorithm: 'sha256', + saltLength: 16 + }; + assert.deepStrictEqual(publicKey.asymmetricKeyDetails, expectedKeyDetails); + assert.deepStrictEqual(privateKey.asymmetricKeyDetails, expectedKeyDetails); + })); +} diff --git a/tests/node_compat/test/parallel/test-crypto-keygen-rfc8017-a-2-3.js b/tests/node_compat/test/parallel/test-crypto-keygen-rfc8017-a-2-3.js new file mode 100644 index 00000000000000..fe732269a3c25c --- /dev/null +++ b/tests/node_compat/test/parallel/test-crypto-keygen-rfc8017-a-2-3.js @@ -0,0 +1,53 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const assert = require('assert'); +const { + generateKeyPair, +} = require('crypto'); + +// RFC 8017, A.2.3.: "For a given hashAlgorithm, the default value of +// saltLength is the octet length of the hash value." +{ + generateKeyPair('rsa-pss', { + modulusLength: 512, + hashAlgorithm: 'sha512' + }, common.mustSucceed((publicKey, privateKey) => { + const expectedKeyDetails = { + modulusLength: 512, + publicExponent: 65537n, + hashAlgorithm: 'sha512', + mgf1HashAlgorithm: 'sha512', + saltLength: 64 + }; + assert.deepStrictEqual(publicKey.asymmetricKeyDetails, expectedKeyDetails); + assert.deepStrictEqual(privateKey.asymmetricKeyDetails, expectedKeyDetails); + })); + + // It is still possible to explicitly set saltLength to 0. + generateKeyPair('rsa-pss', { + modulusLength: 512, + hashAlgorithm: 'sha512', + saltLength: 0 + }, common.mustSucceed((publicKey, privateKey) => { + const expectedKeyDetails = { + modulusLength: 512, + publicExponent: 65537n, + hashAlgorithm: 'sha512', + mgf1HashAlgorithm: 'sha512', + saltLength: 0 + }; + assert.deepStrictEqual(publicKey.asymmetricKeyDetails, expectedKeyDetails); + assert.deepStrictEqual(privateKey.asymmetricKeyDetails, expectedKeyDetails); + })); +} diff --git a/tests/node_compat/test/parallel/test-crypto-lazy-transform-writable.js b/tests/node_compat/test/parallel/test-crypto-lazy-transform-writable.js new file mode 100644 index 00000000000000..af0cf7d688a1f6 --- /dev/null +++ b/tests/node_compat/test/parallel/test-crypto-lazy-transform-writable.js @@ -0,0 +1,43 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const assert = require('assert'); +const crypto = require('crypto'); +const Stream = require('stream'); + +const hasher1 = crypto.createHash('sha256'); +const hasher2 = crypto.createHash('sha256'); + +// Calculate the expected result. +hasher1.write(Buffer.from('hello world')); +hasher1.end(); + +const expected = hasher1.read().toString('hex'); + +class OldStream extends Stream { + constructor() { + super(); + this.readable = true; + } +} + +const stream = new OldStream(); + +stream.pipe(hasher2).on('finish', common.mustCall(function() { + const hash = hasher2.read().toString('hex'); + assert.strictEqual(hash, expected); +})); + +stream.emit('data', Buffer.from('hello')); +stream.emit('data', Buffer.from(' world')); +stream.emit('end'); diff --git a/tests/node_compat/test/parallel/test-crypto-no-algorithm.js b/tests/node_compat/test/parallel/test-crypto-no-algorithm.js new file mode 100644 index 00000000000000..32265ae8e5e665 --- /dev/null +++ b/tests/node_compat/test/parallel/test-crypto-no-algorithm.js @@ -0,0 +1,45 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +if (!common.hasOpenSSL3) + common.skip('this test requires OpenSSL 3.x'); + +const assert = require('node:assert/strict'); +const crypto = require('node:crypto'); + +if (common.isMainThread) { + // TODO(richardlau): Decide if `crypto.setFips` should error if the + // provider named "fips" is not available. + crypto.setFips(1); + crypto.randomBytes(20, common.mustCall((err) => { + // crypto.randomBytes should either succeed or fail but not hang. + if (err) { + assert.match(err.message, /digital envelope routines::unsupported/); + const expected = /random number generator::unable to fetch drbg/; + assert(err.opensslErrorStack.some((msg) => expected.test(msg)), + `did not find ${expected} in ${err.opensslErrorStack}`); + } + })); +} + +{ + // Startup test. Should not hang. + const { path } = require('../common/fixtures'); + const { spawnSync } = require('node:child_process'); + const baseConf = path('openssl3-conf', 'base_only.cnf'); + const cp = spawnSync(process.execPath, + [ `--openssl-config=${baseConf}`, '-p', '"hello"' ], + { encoding: 'utf8' }); + assert(common.nodeProcessAborted(cp.status, cp.signal), + `process did not abort, code:${cp.status} signal:${cp.signal}`); +} diff --git a/tests/node_compat/test/parallel/test-crypto-op-during-process-exit.js b/tests/node_compat/test/parallel/test-crypto-op-during-process-exit.js new file mode 100644 index 00000000000000..2c75cbfcb737ba --- /dev/null +++ b/tests/node_compat/test/parallel/test-crypto-op-during-process-exit.js @@ -0,0 +1,35 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +if (!common.hasCrypto) { common.skip('missing crypto'); } +const assert = require('assert'); +const { generateKeyPair } = require('crypto'); + +if (common.isWindows) { + // Remove this conditional once the libuv change is in Node.js. + common.skip('crashing due to https://github.com/libuv/libuv/pull/2983'); +} + +// Regression test for a race condition: process.exit() might lead to OpenSSL +// cleaning up state from the exit() call via calling its destructor, but +// running OpenSSL operations on another thread might lead to them attempting +// to initialize OpenSSL, leading to a crash. +// This test crashed consistently on x64 Linux on Node v14.9.0. + +generateKeyPair('rsa', { + modulusLength: 2048, + privateKeyEncoding: { + type: 'pkcs1', + format: 'pem' + } +}, (err/* , publicKey, privateKey */) => { + assert.ifError(err); +}); + +setTimeout(() => process.exit(), common.platformTimeout(10)); diff --git a/tests/node_compat/test/parallel/test-crypto-padding-aes256.js b/tests/node_compat/test/parallel/test-crypto-padding-aes256.js new file mode 100644 index 00000000000000..812755a95cdbf5 --- /dev/null +++ b/tests/node_compat/test/parallel/test-crypto-padding-aes256.js @@ -0,0 +1,67 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const assert = require('assert'); +const crypto = require('crypto'); + +const iv = Buffer.from('00000000000000000000000000000000', 'hex'); +const key = Buffer.from('0123456789abcdef0123456789abcdef' + + '0123456789abcdef0123456789abcdef', 'hex'); + +function encrypt(val, pad) { + const c = crypto.createCipheriv('aes256', key, iv); + c.setAutoPadding(pad); + return c.update(val, 'utf8', 'latin1') + c.final('latin1'); +} + +function decrypt(val, pad) { + const c = crypto.createDecipheriv('aes256', key, iv); + c.setAutoPadding(pad); + return c.update(val, 'latin1', 'utf8') + c.final('utf8'); +} + +// echo 0123456789abcdef0123456789abcdef \ +// | openssl enc -e -aes256 -nopad -K -iv \ +// | openssl enc -d -aes256 -nopad -K -iv +let plaintext = '0123456789abcdef0123456789abcdef'; // Multiple of block size +let encrypted = encrypt(plaintext, false); +let decrypted = decrypt(encrypted, false); +assert.strictEqual(decrypted, plaintext); + +// echo 0123456789abcdef0123456789abcde \ +// | openssl enc -e -aes256 -K -iv \ +// | openssl enc -d -aes256 -K -iv +plaintext = '0123456789abcdef0123456789abcde'; // not a multiple +encrypted = encrypt(plaintext, true); +decrypted = decrypt(encrypted, true); +assert.strictEqual(decrypted, plaintext); diff --git a/tests/node_compat/test/parallel/test-crypto-psychic-signatures.js b/tests/node_compat/test/parallel/test-crypto-psychic-signatures.js new file mode 100644 index 00000000000000..f24d2d8b36f2ac --- /dev/null +++ b/tests/node_compat/test/parallel/test-crypto-psychic-signatures.js @@ -0,0 +1,107 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const assert = require('assert'); + +const crypto = require('crypto'); + +// Tests for CVE-2022-21449 +// https://neilmadden.blog/2022/04/19/psychic-signatures-in-java/ +// Dubbed "Psychic Signatures", these signatures bypassed the ECDSA signature +// verification implementation in Java in 15, 16, 17, and 18. OpenSSL is not +// (and was not) vulnerable so these are a precaution. + +const vectors = { + 'ieee-p1363': [ + Buffer.from('0000000000000000000000000000000000000000000000000000000000000000' + + '0000000000000000000000000000000000000000000000000000000000000000', 'hex'), + Buffer.from('ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551' + + 'ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551', 'hex'), + ], + 'der': [ + Buffer.from('3046022100' + + '0000000000000000000000000000000000000000000000000000000000000000' + + '022100' + + '0000000000000000000000000000000000000000000000000000000000000000', 'hex'), + Buffer.from('3046022100' + + 'ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551' + + '022100' + + 'ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551', 'hex'), + ], +}; + +const keyPair = crypto.generateKeyPairSync('ec', { + namedCurve: 'P-256', + publicKeyEncoding: { + format: 'der', + type: 'spki' + }, +}); + +const data = Buffer.from('Hello!'); + +for (const [encoding, signatures] of Object.entries(vectors)) { + for (const signature of signatures) { + const key = { + key: keyPair.publicKey, + format: 'der', + type: 'spki', + dsaEncoding: encoding, + }; + + // one-shot sync + assert.strictEqual( + crypto.verify( + 'sha256', + data, + key, + signature, + ), + false, + ); + + // one-shot async + crypto.verify( + 'sha256', + data, + key, + signature, + common.mustSucceed((verified) => assert.strictEqual(verified, false)), + ); + + // stream + assert.strictEqual( + crypto.createVerify('sha256') + .update(data) + .verify(key, signature), + false, + ); + + // webcrypto + globalThis.crypto.subtle.importKey( + 'spki', + keyPair.publicKey, + { name: 'ECDSA', namedCurve: 'P-256' }, + false, + ['verify'], + ).then((publicKey) => { + return globalThis.crypto.subtle.verify( + { name: 'ECDSA', hash: 'SHA-256' }, + publicKey, + signature, + data, + ); + }).then(common.mustCall((verified) => { + assert.strictEqual(verified, false); + })); + } +} diff --git a/tests/node_compat/test/parallel/test-crypto-publicDecrypt-fails-first-time.js b/tests/node_compat/test/parallel/test-crypto-publicDecrypt-fails-first-time.js new file mode 100644 index 00000000000000..324878859249dd --- /dev/null +++ b/tests/node_compat/test/parallel/test-crypto-publicDecrypt-fails-first-time.js @@ -0,0 +1,48 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); + +// Test for https://github.com/nodejs/node/issues/40814 + +if (!common.hasCrypto) + common.skip('missing crypto'); + +if (!common.hasOpenSSL3) + common.skip('only openssl3'); // https://github.com/nodejs/node/pull/42793#issuecomment-1107491901 + +const assert = require('assert'); +const crypto = require('crypto'); + +const { privateKey, publicKey } = crypto.generateKeyPairSync('rsa', { + modulusLength: 2048, + publicKeyEncoding: { + type: 'spki', + format: 'pem' + }, + privateKeyEncoding: { + type: 'pkcs8', + format: 'pem', + cipher: 'aes-128-ecb', + passphrase: 'abcdef' + } +}); +assert.notStrictEqual(privateKey.toString(), ''); + +const msg = 'The quick brown fox jumps over the lazy dog'; + +const encryptedString = crypto.privateEncrypt({ + key: privateKey, + passphrase: 'abcdef' +}, Buffer.from(msg)).toString('base64'); +const decryptedString = crypto.publicDecrypt(publicKey, Buffer.from(encryptedString, 'base64')).toString(); +console.log(`Encrypted: ${encryptedString}`); +console.log(`Decrypted: ${decryptedString}`); + +assert.notStrictEqual(encryptedString, ''); +assert.strictEqual(decryptedString, msg); diff --git a/tests/node_compat/test/parallel/test-crypto-randomfillsync-regression.js b/tests/node_compat/test/parallel/test-crypto-randomfillsync-regression.js new file mode 100644 index 00000000000000..e81ec392727179 --- /dev/null +++ b/tests/node_compat/test/parallel/test-crypto-randomfillsync-regression.js @@ -0,0 +1,25 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const { randomFillSync } = require('crypto'); +const { notStrictEqual } = require('assert'); + +const ab = new ArrayBuffer(20); +const buf = Buffer.from(ab, 10); + +const before = buf.toString('hex'); + +randomFillSync(buf); + +const after = buf.toString('hex'); + +notStrictEqual(before, after); diff --git a/tests/node_compat/test/parallel/test-crypto-scrypt.js b/tests/node_compat/test/parallel/test-crypto-scrypt.js new file mode 100644 index 00000000000000..427e22537cef7a --- /dev/null +++ b/tests/node_compat/test/parallel/test-crypto-scrypt.js @@ -0,0 +1,266 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Flags: --expose-internals +'use strict'; +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const assert = require('assert'); +const crypto = require('crypto'); + +const { internalBinding } = require('internal/test/binding'); +if (typeof internalBinding('crypto').ScryptJob !== 'function') + common.skip('no scrypt support'); + +const good = [ + // Zero-length key is legal, functions as a parameter validation check. + { + pass: '', + salt: '', + keylen: 0, + N: 16, + p: 1, + r: 1, + expected: '', + }, + // Test vectors from https://tools.ietf.org/html/rfc7914#page-13 that + // should pass. Note that the test vector with N=1048576 is omitted + // because it takes too long to complete and uses over 1 GiB of memory. + { + pass: '', + salt: '', + keylen: 64, + N: 16, + p: 1, + r: 1, + expected: + '77d6576238657b203b19ca42c18a0497f16b4844e3074ae8dfdffa3fede21442' + + 'fcd0069ded0948f8326a753a0fc81f17e8d3e0fb2e0d3628cf35e20c38d18906', + }, + { + pass: 'password', + salt: 'NaCl', + keylen: 64, + N: 1024, + p: 16, + r: 8, + expected: + 'fdbabe1c9d3472007856e7190d01e9fe7c6ad7cbc8237830e77376634b373162' + + '2eaf30d92e22a3886ff109279d9830dac727afb94a83ee6d8360cbdfa2cc0640', + }, + { + pass: 'pleaseletmein', + salt: 'SodiumChloride', + keylen: 64, + N: 16384, + p: 1, + r: 8, + expected: + '7023bdcb3afd7348461c06cd81fd38ebfda8fbba904f8e3ea9b543f6545da1f2' + + 'd5432955613f0fcf62d49705242a9af9e61e85dc0d651e40dfcf017b45575887', + }, + { + pass: '', + salt: '', + keylen: 64, + cost: 16, + parallelization: 1, + blockSize: 1, + expected: + '77d6576238657b203b19ca42c18a0497f16b4844e3074ae8dfdffa3fede21442' + + 'fcd0069ded0948f8326a753a0fc81f17e8d3e0fb2e0d3628cf35e20c38d18906', + }, + { + pass: 'password', + salt: 'NaCl', + keylen: 64, + cost: 1024, + parallelization: 16, + blockSize: 8, + expected: + 'fdbabe1c9d3472007856e7190d01e9fe7c6ad7cbc8237830e77376634b373162' + + '2eaf30d92e22a3886ff109279d9830dac727afb94a83ee6d8360cbdfa2cc0640', + }, + { + pass: 'pleaseletmein', + salt: 'SodiumChloride', + keylen: 64, + cost: 16384, + parallelization: 1, + blockSize: 8, + expected: + '7023bdcb3afd7348461c06cd81fd38ebfda8fbba904f8e3ea9b543f6545da1f2' + + 'd5432955613f0fcf62d49705242a9af9e61e85dc0d651e40dfcf017b45575887', + }, +]; + +// Test vectors that should fail. +const bad = [ + { N: 1, p: 1, r: 1 }, // N < 2 + { N: 3, p: 1, r: 1 }, // Not power of 2. + { N: 1, cost: 1 }, // Both N and cost + { p: 1, parallelization: 1 }, // Both p and parallelization + { r: 1, blockSize: 1 }, // Both r and blocksize +]; + +// Test vectors where 128*N*r exceeds maxmem. +const toobig = [ + { N: 2 ** 16, p: 1, r: 1 }, // N >= 2**(r*16) + { N: 2, p: 2 ** 30, r: 1 }, // p > (2**30-1)/r + { N: 2 ** 20, p: 1, r: 8 }, + { N: 2 ** 10, p: 1, r: 8, maxmem: 2 ** 20 }, +]; + +const badargs = [ + { + args: [], + expected: { code: 'ERR_INVALID_ARG_TYPE', message: /"password"/ }, + }, + { + args: [null], + expected: { code: 'ERR_INVALID_ARG_TYPE', message: /"password"/ }, + }, + { + args: [''], + expected: { code: 'ERR_INVALID_ARG_TYPE', message: /"salt"/ }, + }, + { + args: ['', null], + expected: { code: 'ERR_INVALID_ARG_TYPE', message: /"salt"/ }, + }, + { + args: ['', ''], + expected: { code: 'ERR_INVALID_ARG_TYPE', message: /"keylen"/ }, + }, + { + args: ['', '', null], + expected: { code: 'ERR_INVALID_ARG_TYPE', message: /"keylen"/ }, + }, + { + args: ['', '', .42], + expected: { code: 'ERR_OUT_OF_RANGE', message: /"keylen"/ }, + }, + { + args: ['', '', -42], + expected: { code: 'ERR_OUT_OF_RANGE', message: /"keylen"/ }, + }, + { + args: ['', '', 2 ** 31], + expected: { code: 'ERR_OUT_OF_RANGE', message: /"keylen"/ }, + }, + { + args: ['', '', 2147485780], + expected: { code: 'ERR_OUT_OF_RANGE', message: /"keylen"/ }, + }, + { + args: ['', '', 2 ** 32], + expected: { code: 'ERR_OUT_OF_RANGE', message: /"keylen"/ }, + }, +]; + +for (const options of good) { + const { pass, salt, keylen, expected } = options; + const actual = crypto.scryptSync(pass, salt, keylen, options); + assert.strictEqual(actual.toString('hex'), expected); + crypto.scrypt(pass, salt, keylen, options, common.mustSucceed((actual) => { + assert.strictEqual(actual.toString('hex'), expected); + })); +} + +for (const options of bad) { + const expected = { + message: /Invalid scrypt param/, + }; + assert.throws(() => crypto.scrypt('pass', 'salt', 1, options, () => {}), + expected); + assert.throws(() => crypto.scryptSync('pass', 'salt', 1, options), + expected); +} + +for (const options of toobig) { + const expected = { + message: /Invalid scrypt param/ + }; + assert.throws(() => crypto.scrypt('pass', 'salt', 1, options, () => {}), + expected); + assert.throws(() => crypto.scryptSync('pass', 'salt', 1, options), + expected); +} + +{ + const defaults = { N: 16384, p: 1, r: 8 }; + const expected = crypto.scryptSync('pass', 'salt', 1, defaults); + const actual = crypto.scryptSync('pass', 'salt', 1); + assert.deepStrictEqual(actual.toString('hex'), expected.toString('hex')); + crypto.scrypt('pass', 'salt', 1, common.mustSucceed((actual) => { + assert.deepStrictEqual(actual.toString('hex'), expected.toString('hex')); + })); +} + +for (const { args, expected } of badargs) { + assert.throws(() => crypto.scrypt(...args), expected); + assert.throws(() => crypto.scryptSync(...args), expected); +} + +{ + const expected = { code: 'ERR_INVALID_ARG_TYPE' }; + assert.throws(() => crypto.scrypt('', '', 42, null), expected); + assert.throws(() => crypto.scrypt('', '', 42, {}, null), expected); + assert.throws(() => crypto.scrypt('', '', 42, {}), expected); + assert.throws(() => crypto.scrypt('', '', 42, {}, {}), expected); +} + +{ + // Values for maxmem that do not fit in 32 bits but that are still safe + // integers should be allowed. + crypto.scrypt('', '', 4, { maxmem: 2 ** 52 }, + common.mustSucceed((actual) => { + assert.strictEqual(actual.toString('hex'), 'd72c87d0'); + })); + + // Values that exceed Number.isSafeInteger should not be allowed. + assert.throws(() => crypto.scryptSync('', '', 0, { maxmem: 2 ** 53 }), { + code: 'ERR_OUT_OF_RANGE' + }); +} + +{ + // Regression test for https://github.com/nodejs/node/issues/28836. + + function testParameter(name, value) { + let accessCount = 0; + + // Find out how often the value is accessed. + crypto.scryptSync('', '', 1, { + get [name]() { + accessCount++; + return value; + } + }); + + // Try to crash the process on the last access. + assert.throws(() => { + crypto.scryptSync('', '', 1, { + get [name]() { + if (--accessCount === 0) + return ''; + return value; + } + }); + }, { + code: 'ERR_INVALID_ARG_TYPE' + }); + } + + [ + ['N', 16384], ['cost', 16384], + ['r', 8], ['blockSize', 8], + ['p', 1], ['parallelization', 1], + ].forEach((arg) => testParameter(...arg)); +} diff --git a/tests/node_compat/test/parallel/test-crypto-secret-keygen.js b/tests/node_compat/test/parallel/test-crypto-secret-keygen.js index 9e9205e3f249ac..5f70109f10710b 100644 --- a/tests/node_compat/test/parallel/test-crypto-secret-keygen.js +++ b/tests/node_compat/test/parallel/test-crypto-secret-keygen.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-crypto-subtle-zero-length.js b/tests/node_compat/test/parallel/test-crypto-subtle-zero-length.js new file mode 100644 index 00000000000000..7aa73660a547fe --- /dev/null +++ b/tests/node_compat/test/parallel/test-crypto-subtle-zero-length.js @@ -0,0 +1,46 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); + +if (!common.hasCrypto) + common.skip('missing crypto'); + +const assert = require('assert'); +const { subtle } = globalThis.crypto; + +(async () => { + const k = await subtle.importKey( + 'raw', + new Uint8Array(32), + { name: 'AES-GCM' }, + false, + [ 'encrypt', 'decrypt' ]); + assert(k instanceof CryptoKey); + + const e = await subtle.encrypt({ + name: 'AES-GCM', + iv: new Uint8Array(12), + }, k, new Uint8Array(0)); + assert(e instanceof ArrayBuffer); + assert.deepStrictEqual( + Buffer.from(e), + Buffer.from([ + 0x53, 0x0f, 0x8a, 0xfb, 0xc7, 0x45, 0x36, 0xb9, + 0xa9, 0x63, 0xb4, 0xf1, 0xc4, 0xcb, 0x73, 0x8b ])); + + const v = await subtle.decrypt({ + name: 'AES-GCM', + iv: new Uint8Array(12), + }, k, e); + assert(v instanceof ArrayBuffer); + assert.strictEqual(v.byteLength, 0); +})().then(common.mustCall()).catch((e) => { + assert.ifError(e); +}); diff --git a/tests/node_compat/test/parallel/test-crypto-update-encoding.js b/tests/node_compat/test/parallel/test-crypto-update-encoding.js index 8694ca1717b1ab..75064d8d148adc 100644 --- a/tests/node_compat/test/parallel/test-crypto-update-encoding.js +++ b/tests/node_compat/test/parallel/test-crypto-update-encoding.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-dgram-address.js b/tests/node_compat/test/parallel/test-dgram-address.js new file mode 100644 index 00000000000000..63e7c9e1ac1058 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-address.js @@ -0,0 +1,88 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const dgram = require('dgram'); + +{ + // IPv4 Test + const socket = dgram.createSocket('udp4'); + + socket.on('listening', common.mustCall(() => { + const address = socket.address(); + + assert.strictEqual(address.address, common.localhostIPv4); + assert.strictEqual(typeof address.port, 'number'); + assert.ok(isFinite(address.port)); + assert.ok(address.port > 0); + assert.strictEqual(address.family, 'IPv4'); + socket.close(); + })); + + socket.on('error', (err) => { + socket.close(); + assert.fail(`Unexpected error on udp4 socket. ${err.toString()}`); + }); + + socket.bind(0, common.localhostIPv4); +} + +if (common.hasIPv6) { + // IPv6 Test + const socket = dgram.createSocket('udp6'); + const localhost = '::1'; + + socket.on('listening', common.mustCall(() => { + const address = socket.address(); + + assert.strictEqual(address.address, localhost); + assert.strictEqual(typeof address.port, 'number'); + assert.ok(isFinite(address.port)); + assert.ok(address.port > 0); + assert.strictEqual(address.family, 'IPv6'); + socket.close(); + })); + + socket.on('error', (err) => { + socket.close(); + assert.fail(`Unexpected error on udp6 socket. ${err.toString()}`); + }); + + socket.bind(0, localhost); +} + +{ + // Verify that address() throws if the socket is not bound. + const socket = dgram.createSocket('udp4'); + + assert.throws(() => { + socket.address(); + }, /^Error: getsockname EBADF$/); +} diff --git a/tests/node_compat/test/parallel/test-dgram-bind-default-address.js b/tests/node_compat/test/parallel/test-dgram-bind-default-address.js new file mode 100644 index 00000000000000..ec3ab66a2058a1 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-bind-default-address.js @@ -0,0 +1,60 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +// Skip test in FreeBSD jails since 0.0.0.0 will resolve to default interface +if (common.inFreeBSDJail) + common.skip('In a FreeBSD jail'); + +const assert = require('assert'); +const dgram = require('dgram'); + +dgram.createSocket('udp4').bind(0, common.mustCall(function() { + assert.strictEqual(typeof this.address().port, 'number'); + assert.ok(isFinite(this.address().port)); + assert.ok(this.address().port > 0); + assert.strictEqual(this.address().address, '0.0.0.0'); + this.close(); +})); + +if (!common.hasIPv6) { + common.printSkipMessage('udp6 part of test, because no IPv6 support'); + return; +} + +dgram.createSocket('udp6').bind(0, common.mustCall(function() { + assert.strictEqual(typeof this.address().port, 'number'); + assert.ok(isFinite(this.address().port)); + assert.ok(this.address().port > 0); + let address = this.address().address; + if (address === '::ffff:0.0.0.0') + address = '::'; + assert.strictEqual(address, '::'); + this.close(); +})); diff --git a/tests/node_compat/test/parallel/test-dgram-bind-error-repeat.js b/tests/node_compat/test/parallel/test-dgram-bind-error-repeat.js new file mode 100644 index 00000000000000..d03b133bf44db5 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-bind-error-repeat.js @@ -0,0 +1,34 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const dgram = require('dgram'); + +// Regression test for https://github.com/nodejs/node/issues/30209 +// No warning should be emitted when re-trying `.bind()` on UDP sockets +// repeatedly. + +process.on('warning', common.mustNotCall()); + +const reservePortSocket = dgram.createSocket('udp4'); +reservePortSocket.bind(() => { + const { port } = reservePortSocket.address(); + + const newSocket = dgram.createSocket('udp4'); + + let errors = 0; + newSocket.on('error', common.mustCall(() => { + if (++errors < 20) { + newSocket.bind(port, common.mustNotCall()); + } else { + newSocket.close(); + reservePortSocket.close(); + } + }, 20)); + newSocket.bind(port, common.mustNotCall()); +}); diff --git a/tests/node_compat/test/parallel/test-dgram-bind.js b/tests/node_compat/test/parallel/test-dgram-bind.js new file mode 100644 index 00000000000000..010d795f833847 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-bind.js @@ -0,0 +1,50 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const dgram = require('dgram'); + +const socket = dgram.createSocket('udp4'); + +socket.on('listening', common.mustCall(() => { + assert.throws(() => { + socket.bind(); + }, { + code: 'ERR_SOCKET_ALREADY_BOUND', + name: 'Error', + message: /^Socket is already bound$/ + }); + + socket.close(); +})); + +const result = socket.bind(); // Should not throw. + +assert.strictEqual(result, socket); // Should have returned itself. diff --git a/tests/node_compat/test/parallel/test-dgram-bytes-length.js b/tests/node_compat/test/parallel/test-dgram-bytes-length.js new file mode 100644 index 00000000000000..df2a9608031a64 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-bytes-length.js @@ -0,0 +1,46 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); +const dgram = require('dgram'); + +const message = Buffer.from('Some bytes'); +const client = dgram.createSocket('udp4'); +client.send( + message, + 0, + message.length, + 41234, + 'localhost', + function(err, bytes) { + assert.strictEqual(bytes, message.length); + client.close(); + } +); diff --git a/tests/node_compat/test/parallel/test-dgram-close-during-bind.js b/tests/node_compat/test/parallel/test-dgram-close-during-bind.js index 2a89c4567025e4..0333da5b9e1bb8 100644 --- a/tests/node_compat/test/parallel/test-dgram-close-during-bind.js +++ b/tests/node_compat/test/parallel/test-dgram-close-during-bind.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --expose-internals diff --git a/tests/node_compat/test/parallel/test-dgram-close-in-listening.js b/tests/node_compat/test/parallel/test-dgram-close-in-listening.js new file mode 100644 index 00000000000000..fc0827d86f9672 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-close-in-listening.js @@ -0,0 +1,33 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +// Ensure that if a dgram socket is closed before the sendQueue is drained +// will not crash + +const common = require('../common'); +const dgram = require('dgram'); + +const buf = Buffer.alloc(1024, 42); + +const socket = dgram.createSocket('udp4'); + +socket.on('listening', function() { + socket.close(); +}); + +// Get a random port for send +const portGetter = dgram.createSocket('udp4') + .bind(0, 'localhost', common.mustCall(() => { + // Adds a listener to 'listening' to send the data when + // the socket is available + socket.send(buf, 0, buf.length, + portGetter.address().port, + portGetter.address().address); + + portGetter.close(); + })); diff --git a/tests/node_compat/test/parallel/test-dgram-close-is-not-callback.js b/tests/node_compat/test/parallel/test-dgram-close-is-not-callback.js new file mode 100644 index 00000000000000..6af6dcf956c144 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-close-is-not-callback.js @@ -0,0 +1,28 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const dgram = require('dgram'); + +const buf = Buffer.alloc(1024, 42); + +const socket = dgram.createSocket('udp4'); + +// Get a random port for send +const portGetter = dgram.createSocket('udp4') + .bind(0, 'localhost', common.mustCall(() => { + socket.send(buf, 0, buf.length, + portGetter.address().port, + portGetter.address().address); + + // If close callback is not function, ignore the argument. + socket.close('bad argument'); + portGetter.close(); + + socket.on('close', common.mustCall()); + })); diff --git a/tests/node_compat/test/parallel/test-dgram-close-signal.js b/tests/node_compat/test/parallel/test-dgram-close-signal.js index 108cfd9be3e64f..788018e77c5d89 100644 --- a/tests/node_compat/test/parallel/test-dgram-close-signal.js +++ b/tests/node_compat/test/parallel/test-dgram-close-signal.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-dgram-close.js b/tests/node_compat/test/parallel/test-dgram-close.js new file mode 100644 index 00000000000000..0bd7e78d103482 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-close.js @@ -0,0 +1,63 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// Flags: --expose-internals +'use strict'; +// Ensure that if a dgram socket is closed before the DNS lookup completes, it +// won't crash. + +const common = require('../common'); +const assert = require('assert'); +const dgram = require('dgram'); +const { kStateSymbol } = require('internal/dgram'); + +const buf = Buffer.alloc(1024, 42); + +let socket = dgram.createSocket('udp4'); +const { handle } = socket[kStateSymbol]; + +// Get a random port for send +const portGetter = dgram.createSocket('udp4') + .bind(0, 'localhost', common.mustCall(() => { + socket.send(buf, 0, buf.length, + portGetter.address().port, + portGetter.address().address); + + assert.strictEqual(socket.close(common.mustCall()), socket); + socket.on('close', common.mustCall()); + socket = null; + + // Verify that accessing handle after closure doesn't throw + setImmediate(function() { + setImmediate(function() { + console.log('Handle fd is: ', handle.fd); + }); + }); + + portGetter.close(); + })); diff --git a/tests/node_compat/test/parallel/test-dgram-connect-send-callback-buffer-length.js b/tests/node_compat/test/parallel/test-dgram-connect-send-callback-buffer-length.js new file mode 100644 index 00000000000000..aa8e32eecc82b3 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-connect-send-callback-buffer-length.js @@ -0,0 +1,30 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); + +const dgram = require('dgram'); +const client = dgram.createSocket('udp4'); + +const buf = Buffer.allocUnsafe(256); +const offset = 20; +const len = buf.length - offset; + +const messageSent = common.mustSucceed(function messageSent(bytes) { + assert.notStrictEqual(bytes, buf.length); + assert.strictEqual(bytes, buf.length - offset); + client.close(); +}); + +client.bind(0, common.mustCall(() => { + client.connect(client.address().port, common.mustCall(() => { + client.send(buf, offset, len, messageSent); + })); +})); diff --git a/tests/node_compat/test/parallel/test-dgram-connect-send-callback-buffer.js b/tests/node_compat/test/parallel/test-dgram-connect-send-callback-buffer.js new file mode 100644 index 00000000000000..19e01d6af82290 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-connect-send-callback-buffer.js @@ -0,0 +1,27 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const dgram = require('dgram'); + +const client = dgram.createSocket('udp4'); + +const buf = Buffer.allocUnsafe(256); + +const onMessage = common.mustSucceed((bytes) => { + assert.strictEqual(bytes, buf.length); + client.close(); +}); + +client.bind(0, common.mustCall(() => { + client.connect(client.address().port, common.mustCall(() => { + client.send(buf, onMessage); + })); +})); diff --git a/tests/node_compat/test/parallel/test-dgram-connect-send-callback-multi-buffer.js b/tests/node_compat/test/parallel/test-dgram-connect-send-callback-multi-buffer.js new file mode 100644 index 00000000000000..4f0a19ceab075b --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-connect-send-callback-multi-buffer.js @@ -0,0 +1,36 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const dgram = require('dgram'); + +const client = dgram.createSocket('udp4'); + +const messageSent = common.mustCall((err, bytes) => { + assert.strictEqual(bytes, buf1.length + buf2.length); +}); + +const buf1 = Buffer.alloc(256, 'x'); +const buf2 = Buffer.alloc(256, 'y'); + +client.on('listening', common.mustCall(() => { + const port = client.address().port; + client.connect(port, common.mustCall(() => { + client.send([buf1, buf2], messageSent); + })); +})); + +client.on('message', common.mustCall((buf, info) => { + const expected = Buffer.concat([buf1, buf2]); + assert.ok(buf.equals(expected), 'message was received correctly'); + client.close(); +})); + +client.bind(0); diff --git a/tests/node_compat/test/parallel/test-dgram-connect-send-default-host.js b/tests/node_compat/test/parallel/test-dgram-connect-send-default-host.js new file mode 100644 index 00000000000000..7ca49680d69d84 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-connect-send-default-host.js @@ -0,0 +1,55 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const dgram = require('dgram'); + +const client = dgram.createSocket('udp4'); +const server = dgram.createSocket('udp4'); + +const toSend = [Buffer.alloc(256, 'x'), + Buffer.alloc(256, 'y'), + Buffer.alloc(256, 'z'), + 'hello']; + +const received = []; + +server.on('listening', common.mustCall(() => { + const port = server.address().port; + client.connect(port, (err) => { + assert.ifError(err); + client.send(toSend[0], 0, toSend[0].length); + client.send(toSend[1]); + client.send([toSend[2]]); + client.send(toSend[3], 0, toSend[3].length); + + client.send(new Uint8Array(toSend[0]), 0, toSend[0].length); + client.send(new Uint8Array(toSend[1])); + client.send([new Uint8Array(toSend[2])]); + client.send(new Uint8Array(Buffer.from(toSend[3])), + 0, toSend[3].length); + }); +})); + +server.on('message', common.mustCall((buf, info) => { + received.push(buf.toString()); + + if (received.length === toSend.length * 2) { + // The replies may arrive out of order -> sort them before checking. + received.sort(); + + const expected = toSend.concat(toSend).map(String).sort(); + assert.deepStrictEqual(received, expected); + client.close(); + server.close(); + } +}, toSend.length * 2)); + +server.bind(0); diff --git a/tests/node_compat/test/parallel/test-dgram-connect-send-empty-array.js b/tests/node_compat/test/parallel/test-dgram-connect-send-empty-array.js new file mode 100644 index 00000000000000..a47645c104e6c0 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-connect-send-empty-array.js @@ -0,0 +1,29 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); + +const assert = require('assert'); +const dgram = require('dgram'); + +const client = dgram.createSocket('udp4'); + +client.on('message', common.mustCall((buf, info) => { + const expected = Buffer.alloc(0); + assert.ok(buf.equals(expected), `Expected empty message but got ${buf}`); + client.close(); +})); + +client.on('listening', common.mustCall(() => { + client.connect(client.address().port, + common.localhostIPv4, + common.mustCall(() => client.send([]))); +})); + +client.bind(0); diff --git a/tests/node_compat/test/parallel/test-dgram-connect-send-empty-buffer.js b/tests/node_compat/test/parallel/test-dgram-connect-send-empty-buffer.js new file mode 100644 index 00000000000000..17e10aa804f699 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-connect-send-empty-buffer.js @@ -0,0 +1,27 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); + +const assert = require('assert'); +const dgram = require('dgram'); + +const client = dgram.createSocket('udp4'); + +client.bind(0, common.mustCall(function() { + const port = this.address().port; + client.connect(port, common.mustCall(() => { + const buf = Buffer.alloc(0); + client.send(buf, 0, 0, common.mustSucceed()); + })); + + client.on('message', common.mustCall((buffer) => { + assert.strictEqual(buffer.length, 0); + client.close(); + })); +})); diff --git a/tests/node_compat/test/parallel/test-dgram-connect-send-multi-buffer-copy.js b/tests/node_compat/test/parallel/test-dgram-connect-send-multi-buffer-copy.js new file mode 100644 index 00000000000000..e561ffbdcac8cf --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-connect-send-multi-buffer-copy.js @@ -0,0 +1,36 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const dgram = require('dgram'); + +const client = dgram.createSocket('udp4'); + +const onMessage = common.mustCall(common.mustSucceed((bytes) => { + assert.strictEqual(bytes, buf1.length + buf2.length); +})); + +const buf1 = Buffer.alloc(256, 'x'); +const buf2 = Buffer.alloc(256, 'y'); + +client.on('listening', common.mustCall(function() { + const toSend = [buf1, buf2]; + client.connect(client.address().port, common.mustCall(() => { + client.send(toSend, onMessage); + })); +})); + +client.on('message', common.mustCall(function onMessage(buf, info) { + const expected = Buffer.concat([buf1, buf2]); + assert.ok(buf.equals(expected), 'message was received correctly'); + client.close(); +})); + +client.bind(0); diff --git a/tests/node_compat/test/parallel/test-dgram-connect-send-multi-string-array.js b/tests/node_compat/test/parallel/test-dgram-connect-send-multi-string-array.js new file mode 100644 index 00000000000000..9f94a59b3cd240 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-connect-send-multi-string-array.js @@ -0,0 +1,24 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const dgram = require('dgram'); +const socket = dgram.createSocket('udp4'); +const data = ['foo', 'bar', 'baz']; + +socket.on('message', common.mustCall((msg, rinfo) => { + socket.close(); + assert.deepStrictEqual(msg.toString(), data.join('')); +})); + +socket.bind(0, () => { + socket.connect(socket.address().port, common.mustCall(() => { + socket.send(data); + })); +}); diff --git a/tests/node_compat/test/parallel/test-dgram-connect.js b/tests/node_compat/test/parallel/test-dgram-connect.js new file mode 100644 index 00000000000000..d6c2df6f46f2e3 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-connect.js @@ -0,0 +1,73 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const dgram = require('dgram'); + +const PORT = 12345; + +const client = dgram.createSocket('udp4'); +client.connect(PORT, common.mustCall(() => { + const remoteAddr = client.remoteAddress(); + assert.strictEqual(remoteAddr.port, PORT); + assert.throws(() => { + client.connect(PORT, common.mustNotCall()); + }, { + name: 'Error', + message: 'Already connected', + code: 'ERR_SOCKET_DGRAM_IS_CONNECTED' + }); + + client.disconnect(); + assert.throws(() => { + client.disconnect(); + }, { + name: 'Error', + message: 'Not connected', + code: 'ERR_SOCKET_DGRAM_NOT_CONNECTED' + }); + + assert.throws(() => { + client.remoteAddress(); + }, { + name: 'Error', + message: 'Not connected', + code: 'ERR_SOCKET_DGRAM_NOT_CONNECTED' + }); + + client.once('connect', common.mustCall(() => client.close())); + client.connect(PORT); +})); + +assert.throws(() => { + client.connect(PORT); +}, { + name: 'Error', + message: 'Already connected', + code: 'ERR_SOCKET_DGRAM_IS_CONNECTED' +}); + +assert.throws(() => { + client.disconnect(); +}, { + name: 'Error', + message: 'Not connected', + code: 'ERR_SOCKET_DGRAM_NOT_CONNECTED' +}); + +[ 0, null, 78960, undefined ].forEach((port) => { + assert.throws(() => { + client.connect(port); + }, { + name: 'RangeError', + message: /^Port should be > 0 and < 65536/, + code: 'ERR_SOCKET_BAD_PORT' + }); +}); diff --git a/tests/node_compat/test/parallel/test-dgram-createSocket-type.js b/tests/node_compat/test/parallel/test-dgram-createSocket-type.js new file mode 100644 index 00000000000000..78f77b554463d7 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-createSocket-type.js @@ -0,0 +1,68 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const dgram = require('dgram'); +const invalidTypes = [ + 'test', + ['udp4'], + new String('udp4'), + 1, + {}, + true, + false, + null, + undefined, +]; +const validTypes = [ + 'udp4', + 'udp6', + { type: 'udp4' }, + { type: 'udp6' }, +]; +const errMessage = /^Bad socket type specified\. Valid types are: udp4, udp6$/; + +// Error must be thrown with invalid types +invalidTypes.forEach((invalidType) => { + assert.throws(() => { + dgram.createSocket(invalidType); + }, { + code: 'ERR_SOCKET_BAD_TYPE', + name: 'TypeError', + message: errMessage + }); +}); + +// Error must not be thrown with valid types +validTypes.forEach((validType) => { + const socket = dgram.createSocket(validType); + socket.close(); +}); + +// Ensure buffer sizes can be set +{ + const socket = dgram.createSocket({ + type: 'udp4', + recvBufferSize: 10000, + sendBufferSize: 15000 + }); + + socket.bind(common.mustCall(() => { + // note: linux will double the buffer size + assert.ok(socket.getRecvBufferSize() === 10000 || + socket.getRecvBufferSize() === 20000, + 'SO_RCVBUF not 10000 or 20000, ' + + `was ${socket.getRecvBufferSize()}`); + assert.ok(socket.getSendBufferSize() === 15000 || + socket.getSendBufferSize() === 30000, + 'SO_SNDBUF not 15000 or 30000, ' + + `was ${socket.getRecvBufferSize()}`); + socket.close(); + })); +} diff --git a/tests/node_compat/test/parallel/test-dgram-error-message-address.js b/tests/node_compat/test/parallel/test-dgram-error-message-address.js new file mode 100644 index 00000000000000..b8fab2d3cb61c5 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-error-message-address.js @@ -0,0 +1,64 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const dgram = require('dgram'); + +// IPv4 Test +const socket_ipv4 = dgram.createSocket('udp4'); + +socket_ipv4.on('listening', common.mustNotCall()); + +socket_ipv4.on('error', common.mustCall(function(e) { + assert.strictEqual(e.port, undefined); + assert.strictEqual(e.message, 'bind EADDRNOTAVAIL 1.1.1.1'); + assert.strictEqual(e.address, '1.1.1.1'); + assert.strictEqual(e.code, 'EADDRNOTAVAIL'); + socket_ipv4.close(); +})); + +socket_ipv4.bind(0, '1.1.1.1'); + +// IPv6 Test +const socket_ipv6 = dgram.createSocket('udp6'); + +socket_ipv6.on('listening', common.mustNotCall()); + +socket_ipv6.on('error', common.mustCall(function(e) { + // EAFNOSUPPORT or EPROTONOSUPPORT means IPv6 is disabled on this system. + const allowed = ['EADDRNOTAVAIL', 'EAFNOSUPPORT', 'EPROTONOSUPPORT']; + assert(allowed.includes(e.code), `'${e.code}' was not one of ${allowed}.`); + assert.strictEqual(e.port, undefined); + assert.strictEqual(e.message, `bind ${e.code} 111::1`); + assert.strictEqual(e.address, '111::1'); + socket_ipv6.close(); +})); + +socket_ipv6.bind(0, '111::1'); diff --git a/tests/node_compat/test/parallel/test-dgram-implicit-bind.js b/tests/node_compat/test/parallel/test-dgram-implicit-bind.js new file mode 100644 index 00000000000000..dfafc2d1ac7d8b --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-implicit-bind.js @@ -0,0 +1,53 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const dgram = require('dgram'); + +const source = dgram.createSocket('udp4'); +const target = dgram.createSocket('udp4'); +let messages = 0; + +target.on('message', common.mustCall(function(buf) { + if (buf.toString() === 'abc') ++messages; + if (buf.toString() === 'def') ++messages; + if (messages === 2) { + source.close(); + target.close(); + } +}, 2)); + +target.on('listening', common.mustCall(function() { + // Second .send() call should not throw a bind error. + const port = this.address().port; + source.send(Buffer.from('abc'), 0, 3, port, '127.0.0.1'); + source.send(Buffer.from('def'), 0, 3, port, '127.0.0.1'); +})); + +target.bind(0); diff --git a/tests/node_compat/test/parallel/test-dgram-listen-after-bind.js b/tests/node_compat/test/parallel/test-dgram-listen-after-bind.js new file mode 100644 index 00000000000000..7cfdd824ea0514 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-listen-after-bind.js @@ -0,0 +1,52 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const common = require('../common'); +const assert = require('assert'); +const dgram = require('dgram'); + +const socket = dgram.createSocket('udp4'); + +socket.bind(); + +let fired = false; +const timer = setTimeout(() => { + socket.close(); +}, 100); + +socket.on('listening', common.mustCall(() => { + clearTimeout(timer); + fired = true; + socket.close(); +})); + +socket.on('close', common.mustCall(() => { + assert(fired, 'listening should fire after bind'); +})); diff --git a/tests/node_compat/test/parallel/test-dgram-msgsize.js b/tests/node_compat/test/parallel/test-dgram-msgsize.js new file mode 100644 index 00000000000000..81754f66502d15 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-msgsize.js @@ -0,0 +1,46 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const dgram = require('dgram'); + +// Send a too big datagram. The destination doesn't matter because it's +// not supposed to get sent out anyway. +const buf = Buffer.allocUnsafe(256 * 1024); +const sock = dgram.createSocket('udp4'); +sock.send(buf, 0, buf.length, 12345, '127.0.0.1', common.mustCall(cb)); +function cb(err) { + assert(err instanceof Error); + assert.strictEqual(err.code, 'EMSGSIZE'); + assert.strictEqual(err.address, '127.0.0.1'); + assert.strictEqual(err.port, 12345); + assert.strictEqual(err.message, 'send EMSGSIZE 127.0.0.1:12345'); + sock.close(); +} diff --git a/tests/node_compat/test/parallel/test-dgram-oob-buffer.js b/tests/node_compat/test/parallel/test-dgram-oob-buffer.js new file mode 100644 index 00000000000000..af9629c3ac88ab --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-oob-buffer.js @@ -0,0 +1,52 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +// Some operating systems report errors when an UDP message is sent to an +// unreachable host. This error can be reported by sendto() and even by +// recvfrom(). Node should not propagate this error to the user. + +const common = require('../common'); +const dgram = require('dgram'); + +const socket = dgram.createSocket('udp4'); +const buf = Buffer.from([1, 2, 3, 4]); +const portGetter = dgram.createSocket('udp4') + .bind(0, 'localhost', common.mustCall(() => { + const { address, port } = portGetter.address(); + portGetter.close(common.mustCall(() => { + socket.send(buf, 0, 0, port, address, common.mustNotCall()); + socket.send(buf, 0, 4, port, address, common.mustNotCall()); + socket.send(buf, 1, 3, port, address, common.mustNotCall()); + socket.send(buf, 3, 1, port, address, common.mustNotCall()); + // Since length of zero means nothing, don't error despite OOB. + socket.send(buf, 4, 0, port, address, common.mustNotCall()); + + socket.close(); + })); + })); diff --git a/tests/node_compat/test/parallel/test-dgram-recv-error.js b/tests/node_compat/test/parallel/test-dgram-recv-error.js new file mode 100644 index 00000000000000..3bbdb300aaba7f --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-recv-error.js @@ -0,0 +1,26 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Flags: --expose-internals +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const dgram = require('dgram'); +const { kStateSymbol } = require('internal/dgram'); +const s = dgram.createSocket('udp4'); +const { handle } = s[kStateSymbol]; + +s.on('error', common.mustCall((err) => { + s.close(); + + // Don't check the full error message, as the errno is not important here. + assert.match(String(err), /^Error: recvmsg/); + assert.strictEqual(err.syscall, 'recvmsg'); +})); + +s.on('message', common.mustNotCall('no message should be received.')); +s.bind(common.mustCall(() => handle.onmessage(-1, handle, null, null))); diff --git a/tests/node_compat/test/parallel/test-dgram-ref.js b/tests/node_compat/test/parallel/test-dgram-ref.js new file mode 100644 index 00000000000000..7cd9200955be8e --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-ref.js @@ -0,0 +1,42 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const dgram = require('dgram'); + +// Should not hang, see https://github.com/nodejs/node-v0.x-archive/issues/1282 +dgram.createSocket('udp4'); +dgram.createSocket('udp6'); + +{ + // Test the case of ref()'ing a socket with no handle. + const s = dgram.createSocket('udp4'); + + s.close(common.mustCall(() => s.ref())); +} diff --git a/tests/node_compat/test/parallel/test-dgram-send-bad-arguments.js b/tests/node_compat/test/parallel/test-dgram-send-bad-arguments.js new file mode 100644 index 00000000000000..a99f3596639683 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-send-bad-arguments.js @@ -0,0 +1,162 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const dgram = require('dgram'); + +const buf = Buffer.from('test'); +const host = '127.0.0.1'; +const sock = dgram.createSocket('udp4'); + +function checkArgs(connected) { + // First argument should be a buffer. + assert.throws( + () => { sock.send(); }, + { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError', + message: 'The "buffer" argument must be of type string or an instance ' + + 'of Buffer, TypedArray, or DataView. Received undefined' + } + ); + + // send(buf, offset, length, port, host) + if (connected) { + assert.throws( + () => { sock.send(buf, 1, 1, -1, host); }, + { + code: 'ERR_SOCKET_DGRAM_IS_CONNECTED', + name: 'Error', + message: 'Already connected' + } + ); + + assert.throws( + () => { sock.send(buf, 1, 1, 0, host); }, + { + code: 'ERR_SOCKET_DGRAM_IS_CONNECTED', + name: 'Error', + message: 'Already connected' + } + ); + + assert.throws( + () => { sock.send(buf, 1, 1, 65536, host); }, + { + code: 'ERR_SOCKET_DGRAM_IS_CONNECTED', + name: 'Error', + message: 'Already connected' + } + ); + + assert.throws( + () => { sock.send(buf, 1234, '127.0.0.1', common.mustNotCall()); }, + { + code: 'ERR_SOCKET_DGRAM_IS_CONNECTED', + name: 'Error', + message: 'Already connected' + } + ); + + const longArray = [1, 2, 3, 4, 5, 6, 7, 8]; + for (const input of ['hello', + Buffer.from('hello'), + Buffer.from('hello world').subarray(0, 5), + Buffer.from('hello world').subarray(4, 9), + Buffer.from('hello world').subarray(6), + new Uint8Array([1, 2, 3, 4, 5]), + new Uint8Array(longArray).subarray(0, 5), + new Uint8Array(longArray).subarray(2, 7), + new Uint8Array(longArray).subarray(3), + new DataView(new ArrayBuffer(5), 0), + new DataView(new ArrayBuffer(6), 1), + new DataView(new ArrayBuffer(7), 1, 5)]) { + assert.throws( + () => { sock.send(input, 6, 0); }, + { + code: 'ERR_BUFFER_OUT_OF_BOUNDS', + name: 'RangeError', + message: '"offset" is outside of buffer bounds', + } + ); + + assert.throws( + () => { sock.send(input, 0, 6); }, + { + code: 'ERR_BUFFER_OUT_OF_BOUNDS', + name: 'RangeError', + message: '"length" is outside of buffer bounds', + } + ); + + assert.throws( + () => { sock.send(input, 3, 4); }, + { + code: 'ERR_BUFFER_OUT_OF_BOUNDS', + name: 'RangeError', + message: '"length" is outside of buffer bounds', + } + ); + } + } else { + assert.throws(() => { sock.send(buf, 1, 1, -1, host); }, RangeError); + assert.throws(() => { sock.send(buf, 1, 1, 0, host); }, RangeError); + assert.throws(() => { sock.send(buf, 1, 1, 65536, host); }, RangeError); + } + + // send(buf, port, host) + assert.throws( + () => { sock.send(23, 12345, host); }, + { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError', + message: 'The "buffer" argument must be of type string or an instance ' + + 'of Buffer, TypedArray, or DataView. Received type number (23)' + } + ); + + // send([buf1, ..], port, host) + assert.throws( + () => { sock.send([buf, 23], 12345, host); }, + { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError', + message: 'The "buffer list arguments" argument must be of type string ' + + 'or an instance of Buffer, TypedArray, or DataView. ' + + 'Received an instance of Array' + } + ); +} + +checkArgs(); +sock.connect(12345, common.mustCall(() => { + checkArgs(true); + sock.close(); +})); diff --git a/tests/node_compat/test/parallel/test-dgram-send-callback-buffer-empty-address.js b/tests/node_compat/test/parallel/test-dgram-send-callback-buffer-empty-address.js new file mode 100644 index 00000000000000..c9b8d08f03ae8e --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-send-callback-buffer-empty-address.js @@ -0,0 +1,23 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const dgram = require('dgram'); + +const client = dgram.createSocket('udp4'); + +const buf = Buffer.alloc(256, 'x'); + +const onMessage = common.mustSucceed((bytes) => { + assert.strictEqual(bytes, buf.length); + client.close(); +}); + +client.bind(0, () => client.send(buf, client.address().port, onMessage)); diff --git a/tests/node_compat/test/parallel/test-dgram-send-callback-buffer-length-empty-address.js b/tests/node_compat/test/parallel/test-dgram-send-callback-buffer-length-empty-address.js new file mode 100644 index 00000000000000..aeab74b411bd60 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-send-callback-buffer-length-empty-address.js @@ -0,0 +1,28 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); + +const dgram = require('dgram'); +const client = dgram.createSocket('udp4'); + +const buf = Buffer.alloc(256, 'x'); +const offset = 20; +const len = buf.length - offset; + +const onMessage = common.mustSucceed(function messageSent(bytes) { + assert.notStrictEqual(bytes, buf.length); + assert.strictEqual(bytes, buf.length - offset); + client.close(); +}); + +client.bind(0, () => client.send(buf, offset, len, + client.address().port, + onMessage)); diff --git a/tests/node_compat/test/parallel/test-dgram-send-callback-buffer-length.js b/tests/node_compat/test/parallel/test-dgram-send-callback-buffer-length.js new file mode 100644 index 00000000000000..decb1388e5ed93 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-send-callback-buffer-length.js @@ -0,0 +1,50 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); + +const dgram = require('dgram'); +const client = dgram.createSocket('udp4'); + +const buf = Buffer.allocUnsafe(256); +const offset = 20; +const len = buf.length - offset; + +const messageSent = common.mustSucceed(function messageSent(bytes) { + assert.notStrictEqual(bytes, buf.length); + assert.strictEqual(bytes, buf.length - offset); + client.close(); +}); + +client.bind(0, () => client.send(buf, offset, len, + client.address().port, + '127.0.0.1', + messageSent)); diff --git a/tests/node_compat/test/parallel/test-dgram-send-callback-buffer.js b/tests/node_compat/test/parallel/test-dgram-send-callback-buffer.js new file mode 100644 index 00000000000000..73593844db470e --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-send-callback-buffer.js @@ -0,0 +1,26 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const dgram = require('dgram'); + +const client = dgram.createSocket('udp4'); + +const buf = Buffer.allocUnsafe(256); + +const onMessage = common.mustSucceed((bytes) => { + assert.strictEqual(bytes, buf.length); + client.close(); +}); + +client.bind(0, () => client.send(buf, + client.address().port, + common.localhostIPv4, + onMessage)); diff --git a/tests/node_compat/test/parallel/test-dgram-send-callback-multi-buffer-empty-address.js b/tests/node_compat/test/parallel/test-dgram-send-callback-multi-buffer-empty-address.js new file mode 100644 index 00000000000000..4a9d80eb578943 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-send-callback-multi-buffer-empty-address.js @@ -0,0 +1,34 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const dgram = require('dgram'); + +const client = dgram.createSocket('udp4'); + +const messageSent = common.mustSucceed(function messageSent(bytes) { + assert.strictEqual(bytes, buf1.length + buf2.length); +}); + +const buf1 = Buffer.alloc(256, 'x'); +const buf2 = Buffer.alloc(256, 'y'); + +client.on('listening', function() { + const port = this.address().port; + client.send([buf1, buf2], port, messageSent); +}); + +client.on('message', common.mustCall(function onMessage(buf) { + const expected = Buffer.concat([buf1, buf2]); + assert.ok(buf.equals(expected), 'message was received correctly'); + client.close(); +})); + +client.bind(0); diff --git a/tests/node_compat/test/parallel/test-dgram-send-callback-multi-buffer.js b/tests/node_compat/test/parallel/test-dgram-send-callback-multi-buffer.js new file mode 100644 index 00000000000000..b775978be594e7 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-send-callback-multi-buffer.js @@ -0,0 +1,34 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const dgram = require('dgram'); + +const client = dgram.createSocket('udp4'); + +const messageSent = common.mustCall((err, bytes) => { + assert.strictEqual(bytes, buf1.length + buf2.length); +}); + +const buf1 = Buffer.alloc(256, 'x'); +const buf2 = Buffer.alloc(256, 'y'); + +client.on('listening', () => { + const port = client.address().port; + client.send([buf1, buf2], port, common.localhostIPv4, messageSent); +}); + +client.on('message', common.mustCall((buf, info) => { + const expected = Buffer.concat([buf1, buf2]); + assert.ok(buf.equals(expected), 'message was received correctly'); + client.close(); +})); + +client.bind(0); diff --git a/tests/node_compat/test/parallel/test-dgram-send-callback-recursive.js b/tests/node_compat/test/parallel/test-dgram-send-callback-recursive.js new file mode 100644 index 00000000000000..27579516c887e9 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-send-callback-recursive.js @@ -0,0 +1,50 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); + +const dgram = require('dgram'); +const client = dgram.createSocket('udp4'); +const chunk = 'abc'; +let received = 0; +let sent = 0; +const limit = 10; +let async = false; +let port; + +function onsend() { + if (sent++ < limit) { + client.send(chunk, 0, chunk.length, port, common.localhostIPv4, onsend); + } else { + assert.strictEqual(async, true); + } +} + +client.on('listening', function() { + port = this.address().port; + + process.nextTick(() => { + async = true; + }); + + onsend(); +}); + +client.on('message', (buf, info) => { + received++; + if (received === limit) { + client.close(); + } +}); + +client.on('close', common.mustCall(function() { + assert.strictEqual(received, limit); +})); + +client.bind(0); diff --git a/tests/node_compat/test/parallel/test-dgram-send-default-host.js b/tests/node_compat/test/parallel/test-dgram-send-default-host.js new file mode 100644 index 00000000000000..989dca888bde85 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-send-default-host.js @@ -0,0 +1,79 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const dgram = require('dgram'); + +const client = dgram.createSocket('udp4'); + +const toSend = [Buffer.alloc(256, 'x'), + Buffer.alloc(256, 'y'), + Buffer.alloc(256, 'z'), + 'hello']; + +const received = []; +let totalBytesSent = 0; +let totalBytesReceived = 0; +const arrayBufferViewsCount = common.getArrayBufferViews( + Buffer.from('') +).length; + +client.on('listening', common.mustCall(() => { + const port = client.address().port; + + client.send(toSend[0], 0, toSend[0].length, port); + client.send(toSend[1], port); + client.send([toSend[2]], port); + client.send(toSend[3], 0, toSend[3].length, port); + + totalBytesSent += toSend.map((buf) => buf.length) + .reduce((a, b) => a + b, 0); + + for (const msgBuf of common.getArrayBufferViews(toSend[0])) { + client.send(msgBuf, 0, msgBuf.byteLength, port); + totalBytesSent += msgBuf.byteLength; + } + for (const msgBuf of common.getArrayBufferViews(toSend[1])) { + client.send(msgBuf, port); + totalBytesSent += msgBuf.byteLength; + } + for (const msgBuf of common.getArrayBufferViews(toSend[2])) { + client.send([msgBuf], port); + totalBytesSent += msgBuf.byteLength; + } +})); + +client.on('message', common.mustCall((buf, info) => { + received.push(buf.toString()); + totalBytesReceived += info.size; + + if (totalBytesReceived === totalBytesSent) { + client.close(); + } + // For every buffer in `toSend`, we send the raw Buffer, + // as well as every TypedArray in getArrayBufferViews() +}, toSend.length + (toSend.length - 1) * arrayBufferViewsCount)); + +client.on('close', common.mustCall((buf, info) => { + // The replies may arrive out of order -> sort them before checking. + received.sort(); + + const repeated = [...toSend]; + for (let i = 0; i < arrayBufferViewsCount; i++) { + repeated.push(...toSend.slice(0, 3)); + } + + assert.strictEqual(totalBytesSent, totalBytesReceived); + + const expected = repeated.map(String).sort(); + assert.deepStrictEqual(received, expected); +})); + +client.bind(0); diff --git a/tests/node_compat/test/parallel/test-dgram-send-empty-array.js b/tests/node_compat/test/parallel/test-dgram-send-empty-array.js new file mode 100644 index 00000000000000..cf2508d9ca02b0 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-send-empty-array.js @@ -0,0 +1,32 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); + +const assert = require('assert'); +const dgram = require('dgram'); + +const client = dgram.createSocket('udp4'); + +let interval; + +client.on('message', common.mustCall(function onMessage(buf, info) { + const expected = Buffer.alloc(0); + assert.ok(buf.equals(expected), `Expected empty message but got ${buf}`); + clearInterval(interval); + client.close(); +})); + +client.on('listening', common.mustCall(function() { + interval = setInterval(function() { + client.send([], client.address().port, common.localhostIPv4); + }, 10); +})); + +client.bind(0); diff --git a/tests/node_compat/test/parallel/test-dgram-send-empty-buffer.js b/tests/node_compat/test/parallel/test-dgram-send-empty-buffer.js new file mode 100644 index 00000000000000..de5101cbd2c3ed --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-send-empty-buffer.js @@ -0,0 +1,50 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); + +const assert = require('assert'); +const dgram = require('dgram'); + +const client = dgram.createSocket('udp4'); + +client.bind(0, common.mustCall(function() { + const port = this.address().port; + + client.on('message', common.mustCall(function onMessage(buffer) { + assert.strictEqual(buffer.length, 0); + clearInterval(interval); + client.close(); + })); + + const buf = Buffer.alloc(0); + const interval = setInterval(function() { + client.send(buf, 0, 0, port, '127.0.0.1', common.mustCall()); + }, 10); +})); diff --git a/tests/node_compat/test/parallel/test-dgram-send-empty-packet.js b/tests/node_compat/test/parallel/test-dgram-send-empty-packet.js new file mode 100644 index 00000000000000..01f7a459ce4046 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-send-empty-packet.js @@ -0,0 +1,36 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); + +const assert = require('assert'); +const dgram = require('dgram'); + +const client = dgram.createSocket('udp4'); + +client.bind(0, common.mustCall(function() { + + client.on('message', common.mustCall(callback)); + + const port = this.address().port; + const buf = Buffer.alloc(1); + + const interval = setInterval(function() { + client.send(buf, 0, 0, port, '127.0.0.1', common.mustCall(callback)); + }, 10); + + function callback(firstArg) { + // If client.send() callback, firstArg should be null. + // If client.on('message') listener, firstArg should be a 0-length buffer. + if (firstArg instanceof Buffer) { + assert.strictEqual(firstArg.length, 0); + clearInterval(interval); + client.close(); + } + } +})); diff --git a/tests/node_compat/test/parallel/test-dgram-send-error.js b/tests/node_compat/test/parallel/test-dgram-send-error.js new file mode 100644 index 00000000000000..8b0887e349da37 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-send-error.js @@ -0,0 +1,77 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Flags: --expose-internals +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const dgram = require('dgram'); +const { internalBinding } = require('internal/test/binding'); +const { UV_UNKNOWN } = internalBinding('uv'); +const { getSystemErrorName } = require('util'); +const { kStateSymbol } = require('internal/dgram'); +const mockError = new Error('mock DNS error'); + +function getSocket(callback) { + const socket = dgram.createSocket('udp4'); + + socket.on('message', common.mustNotCall('Should not receive any messages.')); + socket.bind(common.mustCall(() => { + socket[kStateSymbol].handle.lookup = function(address, callback) { + process.nextTick(callback, mockError); + }; + + callback(socket); + })); + return socket; +} + +getSocket((socket) => { + socket.on('error', common.mustCall((err) => { + socket.close(); + assert.strictEqual(err, mockError); + })); + + socket.send('foo', socket.address().port, 'localhost'); +}); + +getSocket((socket) => { + const callback = common.mustCall((err) => { + socket.close(); + assert.strictEqual(err, mockError); + }); + + socket.send('foo', socket.address().port, 'localhost', callback); +}); + +{ + const socket = dgram.createSocket('udp4'); + + socket.on('message', common.mustNotCall('Should not receive any messages.')); + + socket.bind(common.mustCall(() => { + const port = socket.address().port; + const callback = common.mustCall((err) => { + socket.close(); + assert.strictEqual(err.code, 'UNKNOWN'); + assert.strictEqual(getSystemErrorName(err.errno), 'UNKNOWN'); + assert.strictEqual(err.syscall, 'send'); + assert.strictEqual(err.address, common.localhostIPv4); + assert.strictEqual(err.port, port); + assert.strictEqual( + err.message, + `${err.syscall} ${err.code} ${err.address}:${err.port}` + ); + }); + + socket[kStateSymbol].handle.send = function() { + return UV_UNKNOWN; + }; + + socket.send('foo', port, common.localhostIPv4, callback); + })); +} diff --git a/tests/node_compat/test/parallel/test-dgram-send-invalid-msg-type.js b/tests/node_compat/test/parallel/test-dgram-send-invalid-msg-type.js new file mode 100644 index 00000000000000..7fbe1730a44ab9 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-send-invalid-msg-type.js @@ -0,0 +1,43 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); + +// This test ensures that a TypeError is raised when the argument to `send()` +// or `sendto()` is anything but a Buffer. +// https://github.com/nodejs/node-v0.x-archive/issues/4496 + +const assert = require('assert'); +const dgram = require('dgram'); + +// Should throw but not crash. +const socket = dgram.createSocket('udp4'); +assert.throws(function() { socket.send(true, 0, 1, 1, 'host'); }, TypeError); +assert.throws(function() { socket.sendto(5, 0, 1, 1, 'host'); }, TypeError); +socket.close(); diff --git a/tests/node_compat/test/parallel/test-dgram-send-multi-buffer-copy.js b/tests/node_compat/test/parallel/test-dgram-send-multi-buffer-copy.js new file mode 100644 index 00000000000000..bb5217de718767 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-send-multi-buffer-copy.js @@ -0,0 +1,35 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const dgram = require('dgram'); + +const client = dgram.createSocket('udp4'); + +const onMessage = common.mustCall(function(err, bytes) { + assert.strictEqual(bytes, buf1.length + buf2.length); +}); + +const buf1 = Buffer.alloc(256, 'x'); +const buf2 = Buffer.alloc(256, 'y'); + +client.on('listening', function() { + const toSend = [buf1, buf2]; + client.send(toSend, this.address().port, common.localhostIPv4, onMessage); + toSend.splice(0, 2); +}); + +client.on('message', common.mustCall(function onMessage(buf, info) { + const expected = Buffer.concat([buf1, buf2]); + assert.ok(buf.equals(expected), 'message was received correctly'); + client.close(); +})); + +client.bind(0); diff --git a/tests/node_compat/test/parallel/test-dgram-send-multi-string-array.js b/tests/node_compat/test/parallel/test-dgram-send-multi-string-array.js new file mode 100644 index 00000000000000..ae77a421ed1f3e --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-send-multi-string-array.js @@ -0,0 +1,20 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const dgram = require('dgram'); +const socket = dgram.createSocket('udp4'); +const data = ['foo', 'bar', 'baz']; + +socket.on('message', common.mustCall((msg, rinfo) => { + socket.close(); + assert.deepStrictEqual(msg.toString(), data.join('')); +})); + +socket.bind(() => socket.send(data, socket.address().port, 'localhost')); diff --git a/tests/node_compat/test/parallel/test-dgram-udp4.js b/tests/node_compat/test/parallel/test-dgram-udp4.js new file mode 100644 index 00000000000000..f477746a0dc603 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-udp4.js @@ -0,0 +1,59 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const dgram = require('dgram'); +const message_to_send = 'A message to send'; + +const server = dgram.createSocket('udp4'); +server.on('message', common.mustCall((msg, rinfo) => { + assert.strictEqual(rinfo.address, common.localhostIPv4); + assert.strictEqual(msg.toString(), message_to_send.toString()); + server.send(msg, 0, msg.length, rinfo.port, rinfo.address); +})); +server.on('listening', common.mustCall(() => { + const client = dgram.createSocket('udp4'); + const port = server.address().port; + client.on('message', common.mustCall((msg, rinfo) => { + assert.strictEqual(rinfo.address, common.localhostIPv4); + assert.strictEqual(rinfo.port, port); + assert.strictEqual(msg.toString(), message_to_send.toString()); + client.close(); + server.close(); + })); + client.send(message_to_send, + 0, + message_to_send.length, + port, + 'localhost'); + client.on('close', common.mustCall()); +})); +server.on('close', common.mustCall()); +server.bind(0); diff --git a/tests/node_compat/test/parallel/test-dgram-udp6-send-default-host.js b/tests/node_compat/test/parallel/test-dgram-udp6-send-default-host.js new file mode 100644 index 00000000000000..039df7615b04a6 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-udp6-send-default-host.js @@ -0,0 +1,83 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +if (!common.hasIPv6) + common.skip('no IPv6 support'); + +const assert = require('assert'); +const dgram = require('dgram'); + +const client = dgram.createSocket('udp6'); + +const toSend = [Buffer.alloc(256, 'x'), + Buffer.alloc(256, 'y'), + Buffer.alloc(256, 'z'), + 'hello']; + +const received = []; +let totalBytesSent = 0; +let totalBytesReceived = 0; +const arrayBufferViewLength = common.getArrayBufferViews( + Buffer.from('') +).length; + +client.on('listening', common.mustCall(() => { + const port = client.address().port; + + client.send(toSend[0], 0, toSend[0].length, port); + client.send(toSend[1], port); + client.send([toSend[2]], port); + client.send(toSend[3], 0, toSend[3].length, port); + + totalBytesSent += toSend.map((buf) => buf.length) + .reduce((a, b) => a + b, 0); + + for (const msgBuf of common.getArrayBufferViews(toSend[0])) { + client.send(msgBuf, 0, msgBuf.byteLength, port); + totalBytesSent += msgBuf.byteLength; + } + for (const msgBuf of common.getArrayBufferViews(toSend[1])) { + client.send(msgBuf, port); + totalBytesSent += msgBuf.byteLength; + } + for (const msgBuf of common.getArrayBufferViews(toSend[2])) { + client.send([msgBuf], port); + totalBytesSent += msgBuf.byteLength; + } +})); + +client.on('message', common.mustCall((buf, info) => { + received.push(buf.toString()); + totalBytesReceived += info.size; + + if (totalBytesReceived === totalBytesSent) { + client.close(); + } + // For every buffer in `toSend`, we send the raw Buffer, + // as well as every TypedArray in getArrayBufferViews() +}, toSend.length + (toSend.length - 1) * arrayBufferViewLength)); + +client.on('close', common.mustCall((buf, info) => { + // The replies may arrive out of order -> sort them before checking. + received.sort(); + + const repeated = [...toSend]; + for (let i = 0; i < arrayBufferViewLength; i++) { + // We get arrayBufferViews only for toSend[0..2]. + repeated.push(...toSend.slice(0, 3)); + } + + assert.strictEqual(totalBytesSent, totalBytesReceived); + + const expected = repeated.map(String).sort(); + assert.deepStrictEqual(received, expected); +})); + +client.bind(0); diff --git a/tests/node_compat/test/parallel/test-dgram-unref.js b/tests/node_compat/test/parallel/test-dgram-unref.js new file mode 100644 index 00000000000000..282c3ec3be0640 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dgram-unref.js @@ -0,0 +1,47 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const dgram = require('dgram'); + +{ + // Test the case of unref()'ing a socket with a handle. + const s = dgram.createSocket('udp4'); + s.bind(); + s.unref(); +} + +{ + // Test the case of unref()'ing a socket with no handle. + const s = dgram.createSocket('udp4'); + + s.close(common.mustCall(() => s.unref())); +} + +setTimeout(common.mustNotCall(), 1000).unref(); diff --git a/tests/node_compat/test/parallel/test-diagnostics-channel-bind-store.js b/tests/node_compat/test/parallel/test-diagnostics-channel-bind-store.js new file mode 100644 index 00000000000000..823c5bb63cc52e --- /dev/null +++ b/tests/node_compat/test/parallel/test-diagnostics-channel-bind-store.js @@ -0,0 +1,115 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const dc = require('diagnostics_channel'); +const { AsyncLocalStorage } = require('async_hooks'); + +let n = 0; +const thisArg = new Date(); +const inputs = [ + { foo: 'bar' }, + { baz: 'buz' }, +]; + +const channel = dc.channel('test'); + +// Bind a storage directly to published data +const store1 = new AsyncLocalStorage(); +channel.bindStore(store1); +let store1bound = true; + +// Bind a store with transformation of published data +const store2 = new AsyncLocalStorage(); +channel.bindStore(store2, common.mustCall((data) => { + assert.strictEqual(data, inputs[n]); + return { data }; +}, 4)); + +// Regular subscribers should see publishes from runStores calls +channel.subscribe(common.mustCall((data) => { + if (store1bound) { + assert.deepStrictEqual(data, store1.getStore()); + } + assert.deepStrictEqual({ data }, store2.getStore()); + assert.strictEqual(data, inputs[n]); +}, 4)); + +// Verify stores are empty before run +assert.strictEqual(store1.getStore(), undefined); +assert.strictEqual(store2.getStore(), undefined); + +channel.runStores(inputs[n], common.mustCall(function(a, b) { + // Verify this and argument forwarding + assert.strictEqual(this, thisArg); + assert.strictEqual(a, 1); + assert.strictEqual(b, 2); + + // Verify store 1 state matches input + assert.strictEqual(store1.getStore(), inputs[n]); + + // Verify store 2 state has expected transformation + assert.deepStrictEqual(store2.getStore(), { data: inputs[n] }); + + // Should support nested contexts + n++; + channel.runStores(inputs[n], common.mustCall(function() { + // Verify this and argument forwarding + assert.strictEqual(this, undefined); + + // Verify store 1 state matches input + assert.strictEqual(store1.getStore(), inputs[n]); + + // Verify store 2 state has expected transformation + assert.deepStrictEqual(store2.getStore(), { data: inputs[n] }); + })); + n--; + + // Verify store 1 state matches input + assert.strictEqual(store1.getStore(), inputs[n]); + + // Verify store 2 state has expected transformation + assert.deepStrictEqual(store2.getStore(), { data: inputs[n] }); +}), thisArg, 1, 2); + +// Verify stores are empty after run +assert.strictEqual(store1.getStore(), undefined); +assert.strictEqual(store2.getStore(), undefined); + +// Verify unbinding works +assert.ok(channel.unbindStore(store1)); +store1bound = false; + +// Verify unbinding a store that is not bound returns false +assert.ok(!channel.unbindStore(store1)); + +n++; +channel.runStores(inputs[n], common.mustCall(() => { + // Verify after unbinding store 1 will remain undefined + assert.strictEqual(store1.getStore(), undefined); + + // Verify still bound store 2 receives expected data + assert.deepStrictEqual(store2.getStore(), { data: inputs[n] }); +})); + +// Contain transformer errors and emit on next tick +const fail = new Error('fail'); +channel.bindStore(store1, () => { + throw fail; +}); + +let calledRunStores = false; +process.once('uncaughtException', common.mustCall((err) => { + assert.strictEqual(calledRunStores, true); + assert.strictEqual(err, fail); +})); + +channel.runStores(inputs[n], common.mustCall()); +calledRunStores = true; diff --git a/tests/node_compat/test/parallel/test-diagnostics-channel-has-subscribers.js b/tests/node_compat/test/parallel/test-diagnostics-channel-has-subscribers.js index 18132783a7b6db..a86dc23675f4bf 100644 --- a/tests/node_compat/test/parallel/test-diagnostics-channel-has-subscribers.js +++ b/tests/node_compat/test/parallel/test-diagnostics-channel-has-subscribers.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-diagnostics-channel-net.js b/tests/node_compat/test/parallel/test-diagnostics-channel-net.js index 504c3e5dc82ab0..147030ee62b384 100644 --- a/tests/node_compat/test/parallel/test-diagnostics-channel-net.js +++ b/tests/node_compat/test/parallel/test-diagnostics-channel-net.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-diagnostics-channel-object-channel-pub-sub.js b/tests/node_compat/test/parallel/test-diagnostics-channel-object-channel-pub-sub.js index efea42371df9e0..2466b67b1f4d40 100644 --- a/tests/node_compat/test/parallel/test-diagnostics-channel-object-channel-pub-sub.js +++ b/tests/node_compat/test/parallel/test-diagnostics-channel-object-channel-pub-sub.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-diagnostics-channel-pub-sub.js b/tests/node_compat/test/parallel/test-diagnostics-channel-pub-sub.js index ef2486f5afb937..cc21955ca0920f 100644 --- a/tests/node_compat/test/parallel/test-diagnostics-channel-pub-sub.js +++ b/tests/node_compat/test/parallel/test-diagnostics-channel-pub-sub.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-diagnostics-channel-safe-subscriber-errors.js b/tests/node_compat/test/parallel/test-diagnostics-channel-safe-subscriber-errors.js new file mode 100644 index 00000000000000..62a4edafdf2adf --- /dev/null +++ b/tests/node_compat/test/parallel/test-diagnostics-channel-safe-subscriber-errors.js @@ -0,0 +1,36 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const dc = require('diagnostics_channel'); +const assert = require('assert'); + +const input = { + foo: 'bar' +}; + +const channel = dc.channel('fail'); + +const error = new Error('nope'); + +process.on('uncaughtException', common.mustCall((err) => { + assert.strictEqual(err, error); +})); + +channel.subscribe(common.mustCall((message, name) => { + throw error; +})); + +// The failing subscriber should not stop subsequent subscribers from running +channel.subscribe(common.mustCall()); + +// Publish should continue without throwing +const fn = common.mustCall(); +channel.publish(input); +fn(); diff --git a/tests/node_compat/test/parallel/test-diagnostics-channel-symbol-named.js b/tests/node_compat/test/parallel/test-diagnostics-channel-symbol-named.js index 34af2679884520..6c7fd4cfbb2353 100644 --- a/tests/node_compat/test/parallel/test-diagnostics-channel-symbol-named.js +++ b/tests/node_compat/test/parallel/test-diagnostics-channel-symbol-named.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-diagnostics-channel-sync-unsubscribe.js b/tests/node_compat/test/parallel/test-diagnostics-channel-sync-unsubscribe.js index 767382476bb200..72b43972b5550b 100644 --- a/tests/node_compat/test/parallel/test-diagnostics-channel-sync-unsubscribe.js +++ b/tests/node_compat/test/parallel/test-diagnostics-channel-sync-unsubscribe.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-args-types.js b/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-args-types.js index 885c9d76b5645d..af5d08d790be4a 100644 --- a/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-args-types.js +++ b/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-args-types.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-async-error.js b/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-async-error.js new file mode 100644 index 00000000000000..fa48387a269f94 --- /dev/null +++ b/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-async-error.js @@ -0,0 +1,53 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const dc = require('diagnostics_channel'); +const assert = require('assert'); + +const channel = dc.tracingChannel('test'); + +const expectedError = new Error('test'); +const input = { foo: 'bar' }; +const thisArg = { baz: 'buz' }; + +function check(found) { + assert.deepStrictEqual(found, input); +} + +const handlers = { + start: common.mustCall(check, 2), + end: common.mustCall(check, 2), + asyncStart: common.mustCall(check, 2), + asyncEnd: common.mustCall(check, 2), + error: common.mustCall((found) => { + check(found); + assert.deepStrictEqual(found.error, expectedError); + }, 2) +}; + +channel.subscribe(handlers); + +channel.traceCallback(function(cb, err) { + assert.deepStrictEqual(this, thisArg); + setImmediate(cb, err); +}, 0, input, thisArg, common.mustCall((err, res) => { + assert.strictEqual(err, expectedError); + assert.strictEqual(res, undefined); +}), expectedError); + +channel.tracePromise(function(value) { + assert.deepStrictEqual(this, thisArg); + return Promise.reject(value); +}, input, thisArg, expectedError).then( + common.mustNotCall(), + common.mustCall((value) => { + assert.deepStrictEqual(value, expectedError); + }) +); diff --git a/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-async.js b/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-async.js new file mode 100644 index 00000000000000..25c67f77ce5a7d --- /dev/null +++ b/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-async.js @@ -0,0 +1,67 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const dc = require('diagnostics_channel'); +const assert = require('assert'); + +const channel = dc.tracingChannel('test'); + +const expectedResult = { foo: 'bar' }; +const input = { foo: 'bar' }; +const thisArg = { baz: 'buz' }; + +function check(found) { + assert.deepStrictEqual(found, input); +} + +const handlers = { + start: common.mustCall(check, 2), + end: common.mustCall(check, 2), + asyncStart: common.mustCall((found) => { + check(found); + assert.strictEqual(found.error, undefined); + assert.deepStrictEqual(found.result, expectedResult); + }, 2), + asyncEnd: common.mustCall((found) => { + check(found); + assert.strictEqual(found.error, undefined); + assert.deepStrictEqual(found.result, expectedResult); + }, 2), + error: common.mustNotCall() +}; + +channel.subscribe(handlers); + +channel.traceCallback(function(cb, err, res) { + assert.deepStrictEqual(this, thisArg); + setImmediate(cb, err, res); +}, 0, input, thisArg, common.mustCall((err, res) => { + assert.strictEqual(err, null); + assert.deepStrictEqual(res, expectedResult); +}), null, expectedResult); + +channel.tracePromise(function(value) { + assert.deepStrictEqual(this, thisArg); + return Promise.resolve(value); +}, input, thisArg, expectedResult).then( + common.mustCall((value) => { + assert.deepStrictEqual(value, expectedResult); + }), + common.mustNotCall() +); + +let failed = false; +try { + channel.traceCallback(common.mustNotCall(), 0, input, thisArg, 1, 2, 3); +} catch (err) { + assert.ok(/"callback" argument must be of type function/.test(err.message)); + failed = true; +} +assert.strictEqual(failed, true); diff --git a/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-callback-run-stores.js b/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-callback-run-stores.js index 1160e6464a9df2..6f91c361d0393a 100644 --- a/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-callback-run-stores.js +++ b/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-callback-run-stores.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-promise-run-stores.js b/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-promise-run-stores.js index 3f015e192b61b4..0a713e64a076c4 100644 --- a/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-promise-run-stores.js +++ b/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-promise-run-stores.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-run-stores.js b/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-run-stores.js new file mode 100644 index 00000000000000..8efaaf4e278508 --- /dev/null +++ b/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-run-stores.js @@ -0,0 +1,28 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const { AsyncLocalStorage } = require('async_hooks'); +const dc = require('diagnostics_channel'); +const assert = require('assert'); + +const channel = dc.tracingChannel('test'); +const store = new AsyncLocalStorage(); + +const context = { foo: 'bar' }; + +channel.start.bindStore(store, common.mustCall(() => { + return context; +})); + +assert.strictEqual(store.getStore(), undefined); +channel.traceSync(common.mustCall(() => { + assert.deepStrictEqual(store.getStore(), context); +})); +assert.strictEqual(store.getStore(), undefined); diff --git a/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-sync-error.js b/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-sync-error.js index 09fc103293746c..0f5d276ac58854 100644 --- a/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-sync-error.js +++ b/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-sync-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-sync.js b/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-sync.js index 036bcce3b84b1f..b8c642a9aaf4ae 100644 --- a/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-sync.js +++ b/tests/node_compat/test/parallel/test-diagnostics-channel-tracing-channel-sync.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-diagnostics-channel-udp.js b/tests/node_compat/test/parallel/test-diagnostics-channel-udp.js index a6ea753c963f12..6843d0f30e83e6 100644 --- a/tests/node_compat/test/parallel/test-diagnostics-channel-udp.js +++ b/tests/node_compat/test/parallel/test-diagnostics-channel-udp.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-dns-memory-error.js b/tests/node_compat/test/parallel/test-dns-memory-error.js index 74aafa52ff2740..1131c7f9b7658e 100644 --- a/tests/node_compat/test/parallel/test-dns-memory-error.js +++ b/tests/node_compat/test/parallel/test-dns-memory-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --expose-internals diff --git a/tests/node_compat/test/parallel/test-dns-multi-channel.js b/tests/node_compat/test/parallel/test-dns-multi-channel.js new file mode 100644 index 00000000000000..708b49648fc71a --- /dev/null +++ b/tests/node_compat/test/parallel/test-dns-multi-channel.js @@ -0,0 +1,59 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const dnstools = require('../common/dns'); +const { Resolver } = require('dns'); +const assert = require('assert'); +const dgram = require('dgram'); + +const servers = [ + { + socket: dgram.createSocket('udp4'), + reply: { type: 'A', address: '1.2.3.4', ttl: 123, domain: 'example.org' } + }, + { + socket: dgram.createSocket('udp4'), + reply: { type: 'A', address: '5.6.7.8', ttl: 123, domain: 'example.org' } + }, +]; + +let waiting = servers.length; +for (const { socket, reply } of servers) { + socket.on('message', common.mustCall((msg, { address, port }) => { + const parsed = dnstools.parseDNSPacket(msg); + const domain = parsed.questions[0].domain; + assert.strictEqual(domain, 'example.org'); + + socket.send(dnstools.writeDNSPacket({ + id: parsed.id, + questions: parsed.questions, + answers: [reply], + }), port, address); + })); + + socket.bind(0, common.mustCall(() => { + if (--waiting === 0) ready(); + })); +} + + +function ready() { + const resolvers = servers.map((server) => ({ + server, + resolver: new Resolver() + })); + + for (const { server: { socket, reply }, resolver } of resolvers) { + resolver.setServers([`127.0.0.1:${socket.address().port}`]); + resolver.resolve4('example.org', common.mustSucceed((res) => { + assert.deepStrictEqual(res, [reply.address]); + socket.close(); + })); + } +} diff --git a/tests/node_compat/test/parallel/test-dns-promises-exists.js b/tests/node_compat/test/parallel/test-dns-promises-exists.js index 897c922048837c..3368abc194cd9c 100644 --- a/tests/node_compat/test/parallel/test-dns-promises-exists.js +++ b/tests/node_compat/test/parallel/test-dns-promises-exists.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-dns-resolvens-typeerror.js b/tests/node_compat/test/parallel/test-dns-resolvens-typeerror.js index 925537c6004657..b271ae34cebde8 100644 --- a/tests/node_compat/test/parallel/test-dns-resolvens-typeerror.js +++ b/tests/node_compat/test/parallel/test-dns-resolvens-typeerror.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-dns-setservers-type-check.js b/tests/node_compat/test/parallel/test-dns-setservers-type-check.js index 597241604a580c..6218a1bdfd384f 100644 --- a/tests/node_compat/test/parallel/test-dns-setservers-type-check.js +++ b/tests/node_compat/test/parallel/test-dns-setservers-type-check.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-domain-crypto.js b/tests/node_compat/test/parallel/test-domain-crypto.js new file mode 100644 index 00000000000000..1d289eea6c7660 --- /dev/null +++ b/tests/node_compat/test/parallel/test-domain-crypto.js @@ -0,0 +1,50 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +const common = require('../common'); + +if (!common.hasCrypto) + common.skip('node compiled without OpenSSL.'); + +const crypto = require('crypto'); + +// Pollution of global is intentional as part of test. +common.allowGlobals(require('domain')); +// See https://github.com/nodejs/node/commit/d1eff9ab +global.domain = require('domain'); + +// Should not throw a 'TypeError: undefined is not a function' exception +crypto.randomBytes(8); +crypto.randomBytes(8, common.mustSucceed()); +const buf = Buffer.alloc(8); +crypto.randomFillSync(buf); +crypto.pseudoRandomBytes(8); +crypto.pseudoRandomBytes(8, common.mustSucceed()); +crypto.pbkdf2('password', 'salt', 8, 8, 'sha1', common.mustSucceed()); diff --git a/tests/node_compat/test/parallel/test-domain-ee-error-listener.js b/tests/node_compat/test/parallel/test-domain-ee-error-listener.js new file mode 100644 index 00000000000000..a89345fafeb9da --- /dev/null +++ b/tests/node_compat/test/parallel/test-domain-ee-error-listener.js @@ -0,0 +1,27 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const domain = require('domain').create(); +const EventEmitter = require('events'); + +domain.on('error', common.mustNotCall()); + +const ee = new EventEmitter(); + +const plainObject = { justAn: 'object' }; +ee.once('error', common.mustCall((err) => { + assert.deepStrictEqual(err, plainObject); +})); +ee.emit('error', plainObject); + +const err = new Error('test error'); +ee.once('error', common.expectsError(err)); +ee.emit('error', err); diff --git a/tests/node_compat/test/parallel/test-domain-nested-throw.js b/tests/node_compat/test/parallel/test-domain-nested-throw.js new file mode 100644 index 00000000000000..fa8d5763c2fb9b --- /dev/null +++ b/tests/node_compat/test/parallel/test-domain-nested-throw.js @@ -0,0 +1,108 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); + +const domain = require('domain'); + +if (process.argv[2] !== 'child') { + parent(); + return; +} + +function parent() { + const node = process.execPath; + const spawn = require('child_process').spawn; + const opt = { stdio: 'inherit' }; + const child = spawn(node, [__filename, 'child'], opt); + child.on('exit', function(c) { + assert(!c); + console.log('ok'); + }); +} + +let gotDomain1Error = false; +let gotDomain2Error = false; + +let threw1 = false; +let threw2 = false; + +function throw1() { + threw1 = true; + throw new Error('handled by domain1'); +} + +function throw2() { + threw2 = true; + throw new Error('handled by domain2'); +} + +function inner(throw1, throw2) { + const domain1 = domain.createDomain(); + + domain1.on('error', function(err) { + if (gotDomain1Error) { + console.error('got domain 1 twice'); + process.exit(1); + } + gotDomain1Error = true; + throw2(); + }); + + domain1.run(function() { + throw1(); + }); +} + +function outer() { + const domain2 = domain.createDomain(); + + domain2.on('error', function(err) { + if (gotDomain2Error) { + console.error('got domain 2 twice'); + process.exit(1); + } + gotDomain2Error = true; + }); + + domain2.run(function() { + inner(throw1, throw2); + }); +} + +process.on('exit', function() { + assert(gotDomain1Error); + assert(gotDomain2Error); + assert(threw1); + assert(threw2); + console.log('ok'); +}); + +outer(); diff --git a/tests/node_compat/test/parallel/test-domain-nested.js b/tests/node_compat/test/parallel/test-domain-nested.js new file mode 100644 index 00000000000000..8bffb960c2a380 --- /dev/null +++ b/tests/node_compat/test/parallel/test-domain-nested.js @@ -0,0 +1,50 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +// Make sure that the nested domains don't cause the domain stack to grow + +require('../common'); +const assert = require('assert'); +const domain = require('domain'); + +process.on('exit', function(c) { + assert.strictEqual(domain._stack.length, 0); +}); + +domain.create().run(function() { + domain.create().run(function() { + domain.create().run(function() { + domain.create().on('error', function(e) { + // Don't need to do anything here + }).run(function() { + throw new Error('died'); + }); + }); + }); +}); diff --git a/tests/node_compat/test/parallel/test-domain-stack.js b/tests/node_compat/test/parallel/test-domain-stack.js new file mode 100644 index 00000000000000..b7399ff2969e2c --- /dev/null +++ b/tests/node_compat/test/parallel/test-domain-stack.js @@ -0,0 +1,55 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +// Make sure that the domain stack doesn't get out of hand. + +require('../common'); +const domain = require('domain'); + +const a = domain.create(); +a.name = 'a'; + +a.on('error', function() { + if (domain._stack.length > 5) { + console.error('leaking!', domain._stack); + process.exit(1); + } +}); + +const foo = a.bind(function() { + throw new Error('error from foo'); +}); + +for (let i = 0; i < 1000; i++) { + process.nextTick(foo); +} + +process.on('exit', function(c) { + if (!c) console.log('ok'); +}); diff --git a/tests/node_compat/test/parallel/test-domain-top-level-error-handler-clears-stack.js b/tests/node_compat/test/parallel/test-domain-top-level-error-handler-clears-stack.js new file mode 100644 index 00000000000000..718159c0f4db46 --- /dev/null +++ b/tests/node_compat/test/parallel/test-domain-top-level-error-handler-clears-stack.js @@ -0,0 +1,38 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const domain = require('domain'); + +// Make sure that the domains stack is cleared after a top-level domain +// error handler exited gracefully. +const d = domain.create(); + +d.on('error', common.mustCall(() => { + // Scheduling a callback with process.nextTick _could_ enter a _new_ domain, + // but domain's error handlers are called outside of their domain's context. + // So there should _no_ domain on the domains stack if the domains stack was + // cleared properly when the domain error handler was called. + process.nextTick(() => { + if (domain._stack.length !== 0) { + // Do not use assert to perform this test: this callback runs in a + // different callstack as the original process._fatalException that + // handled the original error, thus throwing here would trigger another + // call to process._fatalException, and so on recursively and + // indefinitely. + console.error('domains stack length should be 0, but instead is:', + domain._stack.length); + process.exit(1); + } + }); +})); + +d.run(() => { + throw new Error('Error from domain'); +}); diff --git a/tests/node_compat/test/parallel/test-dsa-fips-invalid-key.js b/tests/node_compat/test/parallel/test-dsa-fips-invalid-key.js new file mode 100644 index 00000000000000..90a41e25680d42 --- /dev/null +++ b/tests/node_compat/test/parallel/test-dsa-fips-invalid-key.js @@ -0,0 +1,26 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const fixtures = require('../common/fixtures'); + +if (!common.hasFipsCrypto) + common.skip('node compiled without FIPS OpenSSL.'); + +const assert = require('assert'); +const crypto = require('crypto'); + +const input = 'hello'; + +const dsapri = fixtures.readKey('dsa_private_1025.pem'); +const sign = crypto.createSign('SHA1'); +sign.update(input); + +assert.throws(function() { + sign.sign(dsapri); +}, /PEM_read_bio_PrivateKey failed/); diff --git a/tests/node_compat/test/parallel/test-env-newprotomethod-remove-unnecessary-prototypes.js b/tests/node_compat/test/parallel/test-env-newprotomethod-remove-unnecessary-prototypes.js new file mode 100644 index 00000000000000..bded14a4074351 --- /dev/null +++ b/tests/node_compat/test/parallel/test-env-newprotomethod-remove-unnecessary-prototypes.js @@ -0,0 +1,26 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Flags: --expose-internals +'use strict'; +require('../common'); + +// This test ensures that unnecessary prototypes are no longer +// being generated by node::NewFunctionTemplate. + +const assert = require('assert'); +const { internalBinding } = require('internal/test/binding'); +[ + internalBinding('udp_wrap').UDP.prototype.bind6, + internalBinding('tcp_wrap').TCP.prototype.bind6, + internalBinding('udp_wrap').UDP.prototype.send6, + internalBinding('tcp_wrap').TCP.prototype.bind, + internalBinding('udp_wrap').UDP.prototype.close, + internalBinding('tcp_wrap').TCP.prototype.open, +].forEach((binding, i) => { + assert.strictEqual('prototype' in binding, false, `Test ${i} failed`); +}); diff --git a/tests/node_compat/test/parallel/test-error-aggregateTwoErrors.js b/tests/node_compat/test/parallel/test-error-aggregateTwoErrors.js new file mode 100644 index 00000000000000..1ae41a0c129e0e --- /dev/null +++ b/tests/node_compat/test/parallel/test-error-aggregateTwoErrors.js @@ -0,0 +1,66 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Flags: --expose-internals +'use strict'; + +require('../common'); +const assert = require('assert'); +const { aggregateTwoErrors } = require('internal/errors'); + +assert.strictEqual(aggregateTwoErrors(null, null), null); + +{ + const err = new Error(); + assert.strictEqual(aggregateTwoErrors(null, err), err); +} + +{ + const err = new Error(); + assert.strictEqual(aggregateTwoErrors(err, null), err); +} + +{ + const err0 = new Error('original'); + const err1 = new Error('second error'); + + err0.code = 'ERR0'; + err1.code = 'ERR1'; + + const chainedError = aggregateTwoErrors(err1, err0); + assert.strictEqual(chainedError.message, err0.message); + assert.strictEqual(chainedError.code, err0.code); + assert.deepStrictEqual(chainedError.errors, [err0, err1]); +} + +{ + const err0 = new Error('original'); + const err1 = new Error('second error'); + const err2 = new Error('third error'); + + err0.code = 'ERR0'; + err1.code = 'ERR1'; + err2.code = 'ERR2'; + + const chainedError = aggregateTwoErrors(err2, aggregateTwoErrors(err1, err0)); + assert.strictEqual(chainedError.message, err0.message); + assert.strictEqual(chainedError.code, err0.code); + assert.deepStrictEqual(chainedError.errors, [err0, err1, err2]); +} + +{ + const err0 = new Error('original'); + const err1 = new Error('second error'); + + err0.code = 'ERR0'; + err1.code = 'ERR1'; + + const chainedError = aggregateTwoErrors(null, aggregateTwoErrors(err1, err0)); + assert.strictEqual(chainedError.message, err0.message); + assert.strictEqual(chainedError.code, err0.code); + assert.deepStrictEqual(chainedError.errors, [err0, err1]); +} diff --git a/tests/node_compat/test/parallel/test-error-prepare-stack-trace.js b/tests/node_compat/test/parallel/test-error-prepare-stack-trace.js new file mode 100644 index 00000000000000..ede87825cb6304 --- /dev/null +++ b/tests/node_compat/test/parallel/test-error-prepare-stack-trace.js @@ -0,0 +1,26 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Flags: --enable-source-maps +'use strict'; + +require('../common'); +const assert = require('assert'); + +// Error.prepareStackTrace() can be overridden with source maps enabled. +{ + let prepareCalled = false; + Error.prepareStackTrace = (_error, trace) => { + prepareCalled = true; + }; + try { + throw new Error('foo'); + } catch (err) { + err.stack; // eslint-disable-line no-unused-expressions + } + assert(prepareCalled); +} diff --git a/tests/node_compat/test/parallel/test-errors-aborterror.js b/tests/node_compat/test/parallel/test-errors-aborterror.js new file mode 100644 index 00000000000000..38c4df0873f4ea --- /dev/null +++ b/tests/node_compat/test/parallel/test-errors-aborterror.js @@ -0,0 +1,38 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Flags: --expose-internals +'use strict'; + +require('../common'); +const { + strictEqual, + throws, +} = require('assert'); +const { AbortError } = require('internal/errors'); + +{ + const err = new AbortError(); + strictEqual(err.message, 'The operation was aborted'); + strictEqual(err.cause, undefined); +} + +{ + const cause = new Error('boom'); + const err = new AbortError('bang', { cause }); + strictEqual(err.message, 'bang'); + strictEqual(err.cause, cause); +} + +{ + throws(() => new AbortError('', false), { + code: 'ERR_INVALID_ARG_TYPE' + }); + throws(() => new AbortError('', ''), { + code: 'ERR_INVALID_ARG_TYPE' + }); +} diff --git a/tests/node_compat/test/parallel/test-eval-strict-referenceerror.js b/tests/node_compat/test/parallel/test-eval-strict-referenceerror.js index 628d03a6f3a43b..2c9943bbe8a6fa 100644 --- a/tests/node_compat/test/parallel/test-eval-strict-referenceerror.js +++ b/tests/node_compat/test/parallel/test-eval-strict-referenceerror.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. /* eslint-disable strict */ diff --git a/tests/node_compat/test/parallel/test-eval.js b/tests/node_compat/test/parallel/test-eval.js index 8b3046af79f862..a6fb713b0b819c 100644 --- a/tests/node_compat/test/parallel/test-eval.js +++ b/tests/node_compat/test/parallel/test-eval.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-event-capture-rejections.js b/tests/node_compat/test/parallel/test-event-capture-rejections.js new file mode 100644 index 00000000000000..ae34d26b49451a --- /dev/null +++ b/tests/node_compat/test/parallel/test-event-capture-rejections.js @@ -0,0 +1,327 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const { EventEmitter, captureRejectionSymbol } = require('events'); +const { inherits } = require('util'); + +// Inherits from EE without a call to the +// parent constructor. +function NoConstructor() { +} + +// captureRejections param validation +{ + [1, [], function() {}, {}, Infinity, Math.PI, 'meow'].forEach((arg) => { + assert.throws( + () => new EventEmitter({ captureRejections: arg }), + { + name: 'TypeError', + code: 'ERR_INVALID_ARG_TYPE', + message: 'The "options.captureRejections" property must be of type boolean.' + + common.invalidArgTypeHelper(arg), + } + ); + }); +} + +inherits(NoConstructor, EventEmitter); + +function captureRejections() { + const ee = new EventEmitter({ captureRejections: true }); + const _err = new Error('kaboom'); + ee.on('something', common.mustCall(async (value) => { + throw _err; + })); + + ee.on('error', common.mustCall((err) => { + assert.strictEqual(err, _err); + process.nextTick(captureRejectionsTwoHandlers); + })); + + ee.emit('something'); +} + +function captureRejectionsTwoHandlers() { + const ee = new EventEmitter({ captureRejections: true }); + const _err = new Error('kaboom'); + + ee.on('something', common.mustCall(async (value) => { + throw _err; + })); + + // throw twice + ee.on('something', common.mustCall(async (value) => { + throw _err; + })); + + let count = 0; + + ee.on('error', common.mustCall((err) => { + assert.strictEqual(err, _err); + if (++count === 2) { + process.nextTick(defaultValue); + } + }, 2)); + + ee.emit('something'); +} + +function defaultValue() { + const ee = new EventEmitter(); + const _err = new Error('kaboom'); + ee.on('something', common.mustCall(async (value) => { + throw _err; + })); + + process.removeAllListeners('unhandledRejection'); + + process.once('unhandledRejection', common.mustCall((err) => { + // restore default + process.on('unhandledRejection', (err) => { throw err; }); + + assert.strictEqual(err, _err); + process.nextTick(globalSetting); + })); + + ee.emit('something'); +} + +function globalSetting() { + assert.strictEqual(EventEmitter.captureRejections, false); + EventEmitter.captureRejections = true; + const ee = new EventEmitter(); + const _err = new Error('kaboom'); + ee.on('something', common.mustCall(async (value) => { + throw _err; + })); + + ee.on('error', common.mustCall((err) => { + assert.strictEqual(err, _err); + + // restore default + EventEmitter.captureRejections = false; + process.nextTick(configurable); + })); + + ee.emit('something'); +} + +// We need to be able to configure this for streams, as we would +// like to call destroy(err) there. +function configurable() { + const ee = new EventEmitter({ captureRejections: true }); + const _err = new Error('kaboom'); + ee.on('something', common.mustCall(async (...args) => { + assert.deepStrictEqual(args, [42, 'foobar']); + throw _err; + })); + + assert.strictEqual(captureRejectionSymbol, Symbol.for('nodejs.rejection')); + + ee[captureRejectionSymbol] = common.mustCall((err, type, ...args) => { + assert.strictEqual(err, _err); + assert.strictEqual(type, 'something'); + assert.deepStrictEqual(args, [42, 'foobar']); + process.nextTick(globalSettingNoConstructor); + }); + + ee.emit('something', 42, 'foobar'); +} + +function globalSettingNoConstructor() { + assert.strictEqual(EventEmitter.captureRejections, false); + EventEmitter.captureRejections = true; + const ee = new NoConstructor(); + const _err = new Error('kaboom'); + ee.on('something', common.mustCall(async (value) => { + throw _err; + })); + + ee.on('error', common.mustCall((err) => { + assert.strictEqual(err, _err); + + // restore default + EventEmitter.captureRejections = false; + process.nextTick(thenable); + })); + + ee.emit('something'); +} + +function thenable() { + const ee = new EventEmitter({ captureRejections: true }); + const _err = new Error('kaboom'); + ee.on('something', common.mustCall((value) => { + const obj = {}; + + Object.defineProperty(obj, 'then', { + get: common.mustCall(() => { + return common.mustCall((resolved, rejected) => { + assert.strictEqual(resolved, undefined); + rejected(_err); + }); + }, 1), // Only 1 call for Promises/A+ compat. + }); + + return obj; + })); + + ee.on('error', common.mustCall((err) => { + assert.strictEqual(err, _err); + process.nextTick(avoidLoopOnRejection); + })); + + ee.emit('something'); +} + +function avoidLoopOnRejection() { + const ee = new EventEmitter({ captureRejections: true }); + const _err1 = new Error('kaboom'); + const _err2 = new Error('kaboom2'); + ee.on('something', common.mustCall(async (value) => { + throw _err1; + })); + + ee[captureRejectionSymbol] = common.mustCall(async (err) => { + assert.strictEqual(err, _err1); + throw _err2; + }); + + process.removeAllListeners('unhandledRejection'); + + process.once('unhandledRejection', common.mustCall((err) => { + // restore default + process.on('unhandledRejection', (err) => { throw err; }); + + assert.strictEqual(err, _err2); + process.nextTick(avoidLoopOnError); + })); + + ee.emit('something'); +} + +function avoidLoopOnError() { + const ee = new EventEmitter({ captureRejections: true }); + const _err1 = new Error('kaboom'); + const _err2 = new Error('kaboom2'); + ee.on('something', common.mustCall(async (value) => { + throw _err1; + })); + + ee.on('error', common.mustCall(async (err) => { + assert.strictEqual(err, _err1); + throw _err2; + })); + + process.removeAllListeners('unhandledRejection'); + + process.once('unhandledRejection', common.mustCall((err) => { + // restore default + process.on('unhandledRejection', (err) => { throw err; }); + + assert.strictEqual(err, _err2); + process.nextTick(thenableThatThrows); + })); + + ee.emit('something'); +} + +function thenableThatThrows() { + const ee = new EventEmitter({ captureRejections: true }); + const _err = new Error('kaboom'); + ee.on('something', common.mustCall((value) => { + const obj = {}; + + Object.defineProperty(obj, 'then', { + get: common.mustCall(() => { + throw _err; + }, 1), // Only 1 call for Promises/A+ compat. + }); + + return obj; + })); + + ee.on('error', common.mustCall((err) => { + assert.strictEqual(err, _err); + process.nextTick(resetCaptureOnThrowInError); + })); + + ee.emit('something'); +} + +function resetCaptureOnThrowInError() { + const ee = new EventEmitter({ captureRejections: true }); + ee.on('something', common.mustCall(async (value) => { + throw new Error('kaboom'); + })); + + ee.once('error', common.mustCall((err) => { + throw err; + })); + + process.removeAllListeners('uncaughtException'); + + process.once('uncaughtException', common.mustCall((err) => { + process.nextTick(next); + })); + + ee.emit('something'); + + function next() { + process.on('uncaughtException', common.mustNotCall()); + + const _err = new Error('kaboom2'); + ee.on('something2', common.mustCall(async (value) => { + throw _err; + })); + + ee.on('error', common.mustCall((err) => { + assert.strictEqual(err, _err); + + process.removeAllListeners('uncaughtException'); + + // restore default + process.on('uncaughtException', (err) => { throw err; }); + + process.nextTick(argValidation); + })); + + ee.emit('something2'); + } +} + +function argValidation() { + + function testType(obj) { + const received = obj.constructor.name !== 'Number' ? + `an instance of ${obj.constructor.name}` : + `type number (${obj})`; + + assert.throws(() => new EventEmitter({ captureRejections: obj }), { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError', + message: 'The "options.captureRejections" property must be of type ' + + `boolean. Received ${received}`, + }); + + assert.throws(() => EventEmitter.captureRejections = obj, { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError', + message: 'The "EventEmitter.captureRejections" property must be of ' + + `type boolean. Received ${received}`, + }); + } + + testType([]); + testType({ hello: 42 }); + testType(42); +} + +captureRejections(); diff --git a/tests/node_compat/test/parallel/test-event-emitter-add-listeners.js b/tests/node_compat/test/parallel/test-event-emitter-add-listeners.js index 08f5870bd05fc1..ec1a171230b7ff 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-add-listeners.js +++ b/tests/node_compat/test/parallel/test-event-emitter-add-listeners.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-event-emitter-check-listener-leaks.js b/tests/node_compat/test/parallel/test-event-emitter-check-listener-leaks.js new file mode 100644 index 00000000000000..3233ca06a67cde --- /dev/null +++ b/tests/node_compat/test/parallel/test-event-emitter-check-listener-leaks.js @@ -0,0 +1,110 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const events = require('events'); + +// default +{ + const e = new events.EventEmitter(); + + for (let i = 0; i < 10; i++) { + e.on('default', common.mustNotCall()); + } + assert.ok(!Object.hasOwn(e._events.default, 'warned')); + e.on('default', common.mustNotCall()); + assert.ok(e._events.default.warned); + + // symbol + const symbol = Symbol('symbol'); + e.setMaxListeners(1); + e.on(symbol, common.mustNotCall()); + assert.ok(!Object.hasOwn(e._events[symbol], 'warned')); + e.on(symbol, common.mustNotCall()); + assert.ok(Object.hasOwn(e._events[symbol], 'warned')); + + // specific + e.setMaxListeners(5); + for (let i = 0; i < 5; i++) { + e.on('specific', common.mustNotCall()); + } + assert.ok(!Object.hasOwn(e._events.specific, 'warned')); + e.on('specific', common.mustNotCall()); + assert.ok(e._events.specific.warned); + + // only one + e.setMaxListeners(1); + e.on('only one', common.mustNotCall()); + assert.ok(!Object.hasOwn(e._events['only one'], 'warned')); + e.on('only one', common.mustNotCall()); + assert.ok(Object.hasOwn(e._events['only one'], 'warned')); + + // unlimited + e.setMaxListeners(0); + for (let i = 0; i < 1000; i++) { + e.on('unlimited', common.mustNotCall()); + } + assert.ok(!Object.hasOwn(e._events.unlimited, 'warned')); +} + +// process-wide +{ + events.EventEmitter.defaultMaxListeners = 42; + const e = new events.EventEmitter(); + + for (let i = 0; i < 42; ++i) { + e.on('fortytwo', common.mustNotCall()); + } + assert.ok(!Object.hasOwn(e._events.fortytwo, 'warned')); + e.on('fortytwo', common.mustNotCall()); + assert.ok(Object.hasOwn(e._events.fortytwo, 'warned')); + delete e._events.fortytwo.warned; + + events.EventEmitter.defaultMaxListeners = 44; + e.on('fortytwo', common.mustNotCall()); + assert.ok(!Object.hasOwn(e._events.fortytwo, 'warned')); + e.on('fortytwo', common.mustNotCall()); + assert.ok(Object.hasOwn(e._events.fortytwo, 'warned')); +} + +// But _maxListeners still has precedence over defaultMaxListeners +{ + events.EventEmitter.defaultMaxListeners = 42; + const e = new events.EventEmitter(); + e.setMaxListeners(1); + e.on('uno', common.mustNotCall()); + assert.ok(!Object.hasOwn(e._events.uno, 'warned')); + e.on('uno', common.mustNotCall()); + assert.ok(Object.hasOwn(e._events.uno, 'warned')); + + // chainable + assert.strictEqual(e, e.setMaxListeners(1)); +} diff --git a/tests/node_compat/test/parallel/test-event-emitter-emit-context.js b/tests/node_compat/test/parallel/test-event-emitter-emit-context.js index 76c22aa9a02368..03614bab76ad3a 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-emit-context.js +++ b/tests/node_compat/test/parallel/test-event-emitter-emit-context.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-event-emitter-error-monitor.js b/tests/node_compat/test/parallel/test-event-emitter-error-monitor.js index e5df20e601927d..39ba06f365c1ec 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-error-monitor.js +++ b/tests/node_compat/test/parallel/test-event-emitter-error-monitor.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-event-emitter-errors.js b/tests/node_compat/test/parallel/test-event-emitter-errors.js index e8bbbb4781b971..da8b27b39b3216 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-errors.js +++ b/tests/node_compat/test/parallel/test-event-emitter-errors.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-event-emitter-get-max-listeners.js b/tests/node_compat/test/parallel/test-event-emitter-get-max-listeners.js index 15f04f266b400b..111bb6b7304cb0 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-get-max-listeners.js +++ b/tests/node_compat/test/parallel/test-event-emitter-get-max-listeners.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-event-emitter-invalid-listener.js b/tests/node_compat/test/parallel/test-event-emitter-invalid-listener.js index cb92dc5b2df98c..5053f399c750d4 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-invalid-listener.js +++ b/tests/node_compat/test/parallel/test-event-emitter-invalid-listener.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-event-emitter-listener-count.js b/tests/node_compat/test/parallel/test-event-emitter-listener-count.js index cb084166f17db4..bfe8bcced05872 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-listener-count.js +++ b/tests/node_compat/test/parallel/test-event-emitter-listener-count.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-event-emitter-listeners-side-effects.js b/tests/node_compat/test/parallel/test-event-emitter-listeners-side-effects.js index 51c28c35bf40a5..c52acd2dde07df 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-listeners-side-effects.js +++ b/tests/node_compat/test/parallel/test-event-emitter-listeners-side-effects.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-event-emitter-listeners.js b/tests/node_compat/test/parallel/test-event-emitter-listeners.js index cbfb9471eb0890..b62aac9f9108cf 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-listeners.js +++ b/tests/node_compat/test/parallel/test-event-emitter-listeners.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-event-emitter-max-listeners-warning-for-null.js b/tests/node_compat/test/parallel/test-event-emitter-max-listeners-warning-for-null.js new file mode 100644 index 00000000000000..1e3435ef39036f --- /dev/null +++ b/tests/node_compat/test/parallel/test-event-emitter-max-listeners-warning-for-null.js @@ -0,0 +1,30 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Flags: --no-warnings +// The flag suppresses stderr output but the warning event will still emit +'use strict'; + +const common = require('../common'); +const events = require('events'); +const assert = require('assert'); + +const e = new events.EventEmitter(); +e.setMaxListeners(1); + +process.on('warning', common.mustCall((warning) => { + assert.ok(warning instanceof Error); + assert.strictEqual(warning.name, 'MaxListenersExceededWarning'); + assert.strictEqual(warning.emitter, e); + assert.strictEqual(warning.count, 2); + assert.strictEqual(warning.type, null); + assert.ok(warning.message.includes( + '2 null listeners added to [EventEmitter].')); +})); + +e.on(null, () => {}); +e.on(null, () => {}); diff --git a/tests/node_compat/test/parallel/test-event-emitter-max-listeners-warning-for-symbol.js b/tests/node_compat/test/parallel/test-event-emitter-max-listeners-warning-for-symbol.js new file mode 100644 index 00000000000000..113fba229c3fe7 --- /dev/null +++ b/tests/node_compat/test/parallel/test-event-emitter-max-listeners-warning-for-symbol.js @@ -0,0 +1,32 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Flags: --no-warnings +// The flag suppresses stderr output but the warning event will still emit +'use strict'; + +const common = require('../common'); +const events = require('events'); +const assert = require('assert'); + +const symbol = Symbol('symbol'); + +const e = new events.EventEmitter(); +e.setMaxListeners(1); + +process.on('warning', common.mustCall((warning) => { + assert.ok(warning instanceof Error); + assert.strictEqual(warning.name, 'MaxListenersExceededWarning'); + assert.strictEqual(warning.emitter, e); + assert.strictEqual(warning.count, 2); + assert.strictEqual(warning.type, symbol); + assert.ok(warning.message.includes( + '2 Symbol(symbol) listeners added to [EventEmitter].')); +})); + +e.on(symbol, () => {}); +e.on(symbol, () => {}); diff --git a/tests/node_compat/test/parallel/test-event-emitter-max-listeners-warning.js b/tests/node_compat/test/parallel/test-event-emitter-max-listeners-warning.js new file mode 100644 index 00000000000000..69977a96796379 --- /dev/null +++ b/tests/node_compat/test/parallel/test-event-emitter-max-listeners-warning.js @@ -0,0 +1,38 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Flags: --no-warnings +// The flag suppresses stderr output but the warning event will still emit +'use strict'; + +const common = require('../common'); +const events = require('events'); +const assert = require('assert'); + +class FakeInput extends events.EventEmitter { + resume() {} + pause() {} + write() {} + end() {} +} + +const e = new FakeInput(); +e.setMaxListeners(1); + +process.on('warning', common.mustCall((warning) => { + assert.ok(warning instanceof Error); + assert.strictEqual(warning.name, 'MaxListenersExceededWarning'); + assert.strictEqual(warning.emitter, e); + assert.strictEqual(warning.count, 2); + assert.strictEqual(warning.type, 'event-type'); + assert.ok(warning.message.includes( + '2 event-type listeners added to [FakeInput].')); +})); + +e.on('event-type', () => {}); +e.on('event-type', () => {}); // Trigger warning. +e.on('event-type', () => {}); // Verify that warning is emitted only once. diff --git a/tests/node_compat/test/parallel/test-event-emitter-method-names.js b/tests/node_compat/test/parallel/test-event-emitter-method-names.js index 558fb83dfa51f2..f3890b839a8783 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-method-names.js +++ b/tests/node_compat/test/parallel/test-event-emitter-method-names.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-event-emitter-modify-in-emit.js b/tests/node_compat/test/parallel/test-event-emitter-modify-in-emit.js index c08c0c31c753e5..564f16246cfd43 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-modify-in-emit.js +++ b/tests/node_compat/test/parallel/test-event-emitter-modify-in-emit.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-event-emitter-num-args.js b/tests/node_compat/test/parallel/test-event-emitter-num-args.js index b1ef4bc0afd3e5..6e2cdf42f17e4f 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-num-args.js +++ b/tests/node_compat/test/parallel/test-event-emitter-num-args.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-event-emitter-once.js b/tests/node_compat/test/parallel/test-event-emitter-once.js index eff0861f57e655..a93a5a43b648a4 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-once.js +++ b/tests/node_compat/test/parallel/test-event-emitter-once.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-event-emitter-remove-all-listeners.js b/tests/node_compat/test/parallel/test-event-emitter-remove-all-listeners.js index a2bac54c3960cd..cfc76fc2fa3585 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-remove-all-listeners.js +++ b/tests/node_compat/test/parallel/test-event-emitter-remove-all-listeners.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-event-emitter-remove-listeners.js b/tests/node_compat/test/parallel/test-event-emitter-remove-listeners.js index 966bc46e22b3b2..983da177a5c1bd 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-remove-listeners.js +++ b/tests/node_compat/test/parallel/test-event-emitter-remove-listeners.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-event-emitter-set-max-listeners-side-effects.js b/tests/node_compat/test/parallel/test-event-emitter-set-max-listeners-side-effects.js index 2923a3ec77ad2c..bc50b32cdacf6f 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-set-max-listeners-side-effects.js +++ b/tests/node_compat/test/parallel/test-event-emitter-set-max-listeners-side-effects.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-event-emitter-special-event-names.js b/tests/node_compat/test/parallel/test-event-emitter-special-event-names.js index b8bc4d7e61eb19..21455a24288d9a 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-special-event-names.js +++ b/tests/node_compat/test/parallel/test-event-emitter-special-event-names.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-event-emitter-subclass.js b/tests/node_compat/test/parallel/test-event-emitter-subclass.js index 7ef141e93f49f9..46d08041df7e17 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-subclass.js +++ b/tests/node_compat/test/parallel/test-event-emitter-subclass.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-event-emitter-symbols.js b/tests/node_compat/test/parallel/test-event-emitter-symbols.js index 0b8c133b0c7f73..74f43f229a4163 100644 --- a/tests/node_compat/test/parallel/test-event-emitter-symbols.js +++ b/tests/node_compat/test/parallel/test-event-emitter-symbols.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-events-list.js b/tests/node_compat/test/parallel/test-events-list.js index 0e83894bee7b0c..f0b553812f9102 100644 --- a/tests/node_compat/test/parallel/test-events-list.js +++ b/tests/node_compat/test/parallel/test-events-list.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-events-on-async-iterator.js b/tests/node_compat/test/parallel/test-events-on-async-iterator.js index a0ab2a5b466bed..2516f1e1d71689 100644 --- a/tests/node_compat/test/parallel/test-events-on-async-iterator.js +++ b/tests/node_compat/test/parallel/test-events-on-async-iterator.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --expose-internals --no-warnings diff --git a/tests/node_compat/test/parallel/test-events-uncaught-exception-stack.js b/tests/node_compat/test/parallel/test-events-uncaught-exception-stack.js index 58919ef14e7c7e..72a4067b39a6a2 100644 --- a/tests/node_compat/test/parallel/test-events-uncaught-exception-stack.js +++ b/tests/node_compat/test/parallel/test-events-uncaught-exception-stack.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-eventtarget-brandcheck.js b/tests/node_compat/test/parallel/test-eventtarget-brandcheck.js index 9084bad3c58a9e..de5592b169153d 100644 --- a/tests/node_compat/test/parallel/test-eventtarget-brandcheck.js +++ b/tests/node_compat/test/parallel/test-eventtarget-brandcheck.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --expose-internals diff --git a/tests/node_compat/test/parallel/test-eventtarget-once-twice.js b/tests/node_compat/test/parallel/test-eventtarget-once-twice.js new file mode 100644 index 00000000000000..82877c7987dcdf --- /dev/null +++ b/tests/node_compat/test/parallel/test-eventtarget-once-twice.js @@ -0,0 +1,21 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const { once } = require('events'); + +const et = new EventTarget(); +(async function() { + await once(et, 'foo'); + await once(et, 'foo'); +})().then(common.mustCall()); + +et.dispatchEvent(new Event('foo')); +setImmediate(() => { + et.dispatchEvent(new Event('foo')); +}); diff --git a/tests/node_compat/test/parallel/test-exception-handler.js b/tests/node_compat/test/parallel/test-exception-handler.js index f3ea6e506974c9..18557fbf81fa6d 100644 --- a/tests/node_compat/test/parallel/test-exception-handler.js +++ b/tests/node_compat/test/parallel/test-exception-handler.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-exception-handler2.js b/tests/node_compat/test/parallel/test-exception-handler2.js index bf9efd85af6759..2dce592830a0e9 100644 --- a/tests/node_compat/test/parallel/test-exception-handler2.js +++ b/tests/node_compat/test/parallel/test-exception-handler2.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-file-read-noexist.js b/tests/node_compat/test/parallel/test-file-read-noexist.js index 2224315e934e98..3865ccfdd2677b 100644 --- a/tests/node_compat/test/parallel/test-file-read-noexist.js +++ b/tests/node_compat/test/parallel/test-file-read-noexist.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-file-write-stream.js b/tests/node_compat/test/parallel/test-file-write-stream.js index 22ebadd1cbefdc..bb247d1fb9bf67 100644 --- a/tests/node_compat/test/parallel/test-file-write-stream.js +++ b/tests/node_compat/test/parallel/test-file-write-stream.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-file-write-stream2.js b/tests/node_compat/test/parallel/test-file-write-stream2.js index 8b23683a75845c..39d595f3d52513 100644 --- a/tests/node_compat/test/parallel/test-file-write-stream2.js +++ b/tests/node_compat/test/parallel/test-file-write-stream2.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-file-write-stream3.js b/tests/node_compat/test/parallel/test-file-write-stream3.js index 2dd5444a659c82..94775e0ef6751a 100644 --- a/tests/node_compat/test/parallel/test-file-write-stream3.js +++ b/tests/node_compat/test/parallel/test-file-write-stream3.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-file-write-stream4.js b/tests/node_compat/test/parallel/test-file-write-stream4.js index 9d5cd7d32fc6e4..82bd96b4698166 100644 --- a/tests/node_compat/test/parallel/test-file-write-stream4.js +++ b/tests/node_compat/test/parallel/test-file-write-stream4.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-access.js b/tests/node_compat/test/parallel/test-fs-access.js index 8add7d553edd0a..a9c627b9bfdd18 100644 --- a/tests/node_compat/test/parallel/test-fs-access.js +++ b/tests/node_compat/test/parallel/test-fs-access.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --expose-internals diff --git a/tests/node_compat/test/parallel/test-fs-append-file-sync.js b/tests/node_compat/test/parallel/test-fs-append-file-sync.js index fa79ddb55f1673..44f62f9a08b188 100644 --- a/tests/node_compat/test/parallel/test-fs-append-file-sync.js +++ b/tests/node_compat/test/parallel/test-fs-append-file-sync.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-fs-buffertype-writesync.js b/tests/node_compat/test/parallel/test-fs-buffertype-writesync.js new file mode 100644 index 00000000000000..f2e8c97ee798d8 --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-buffertype-writesync.js @@ -0,0 +1,23 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); + +// This test ensures that writeSync throws for invalid data input. + +const assert = require('assert'); +const fs = require('fs'); + +[ + true, false, 0, 1, Infinity, () => {}, {}, [], undefined, null, +].forEach((value) => { + assert.throws( + () => fs.writeSync(1, value), + { message: /"buffer"/, code: 'ERR_INVALID_ARG_TYPE' } + ); +}); diff --git a/tests/node_compat/test/parallel/test-fs-chown-type-check.js b/tests/node_compat/test/parallel/test-fs-chown-type-check.js index 2a0e8409906791..3431e0a4c427b9 100644 --- a/tests/node_compat/test/parallel/test-fs-chown-type-check.js +++ b/tests/node_compat/test/parallel/test-fs-chown-type-check.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-close.js b/tests/node_compat/test/parallel/test-fs-close.js new file mode 100644 index 00000000000000..1efb90ecd3d07f --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-close.js @@ -0,0 +1,19 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); + +const assert = require('assert'); +const fs = require('fs'); + +const fd = fs.openSync(__filename, 'r'); + +fs.close(fd, common.mustCall(function(...args) { + assert.deepStrictEqual(args, [null]); +})); diff --git a/tests/node_compat/test/parallel/test-fs-constants.js b/tests/node_compat/test/parallel/test-fs-constants.js new file mode 100644 index 00000000000000..f6599ae8592d21 --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-constants.js @@ -0,0 +1,15 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); +const fs = require('fs'); +const assert = require('assert'); + +// Check if the two constants accepted by chmod() on Windows are defined. +assert.notStrictEqual(fs.constants.S_IRUSR, undefined); +assert.notStrictEqual(fs.constants.S_IWUSR, undefined); diff --git a/tests/node_compat/test/parallel/test-fs-copyfile.js b/tests/node_compat/test/parallel/test-fs-copyfile.js index d00a076f314a64..4135b90678ece6 100644 --- a/tests/node_compat/test/parallel/test-fs-copyfile.js +++ b/tests/node_compat/test/parallel/test-fs-copyfile.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --expose-internals diff --git a/tests/node_compat/test/parallel/test-fs-empty-readStream.js b/tests/node_compat/test/parallel/test-fs-empty-readStream.js index d3c7faf54c13f8..618eca5fbfe4c4 100644 --- a/tests/node_compat/test/parallel/test-fs-empty-readStream.js +++ b/tests/node_compat/test/parallel/test-fs-empty-readStream.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-fs-fmap.js b/tests/node_compat/test/parallel/test-fs-fmap.js new file mode 100644 index 00000000000000..728cdc8c54c397 --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-fmap.js @@ -0,0 +1,35 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); +const assert = require('assert'); +const fs = require('fs'); + +const { + O_CREAT = 0, + O_RDONLY = 0, + O_TRUNC = 0, + O_WRONLY = 0, + UV_FS_O_FILEMAP = 0 +} = fs.constants; + +const tmpdir = require('../common/tmpdir'); +tmpdir.refresh(); + +// Run this test on all platforms. While UV_FS_O_FILEMAP is only available on +// Windows, it should be silently ignored on other platforms. + +const filename = tmpdir.resolve('fmap.txt'); +const text = 'Memory File Mapping Test'; + +const mw = UV_FS_O_FILEMAP | O_TRUNC | O_CREAT | O_WRONLY; +const mr = UV_FS_O_FILEMAP | O_RDONLY; + +fs.writeFileSync(filename, text, { flag: mw }); +const r1 = fs.readFileSync(filename, { encoding: 'utf8', flag: mr }); +assert.strictEqual(r1, text); diff --git a/tests/node_compat/test/parallel/test-fs-lchown.js b/tests/node_compat/test/parallel/test-fs-lchown.js index ce3333745b869a..cdb4c7cb148b96 100644 --- a/tests/node_compat/test/parallel/test-fs-lchown.js +++ b/tests/node_compat/test/parallel/test-fs-lchown.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-long-path.js b/tests/node_compat/test/parallel/test-fs-long-path.js new file mode 100644 index 00000000000000..9b818cb75b4014 --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-long-path.js @@ -0,0 +1,56 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +if (!common.isWindows) + common.skip('this test is Windows-specific.'); + +const fs = require('fs'); +const path = require('path'); + +const tmpdir = require('../common/tmpdir'); + +// Make a path that will be at least 260 chars long. +const fileNameLen = Math.max(260 - tmpdir.path.length - 1, 1); +const fileName = tmpdir.resolve('x'.repeat(fileNameLen)); +const fullPath = path.resolve(fileName); + +tmpdir.refresh(); + +console.log({ + filenameLength: fileName.length, + fullPathLength: fullPath.length +}); + +fs.writeFile(fullPath, 'ok', common.mustSucceed(() => { + fs.stat(fullPath, common.mustSucceed()); + + // Tests https://github.com/nodejs/node/issues/39721 + fs.realpath.native(fullPath, common.mustSucceed()); +})); diff --git a/tests/node_compat/test/parallel/test-fs-non-number-arguments-throw.js b/tests/node_compat/test/parallel/test-fs-non-number-arguments-throw.js new file mode 100644 index 00000000000000..404ef6c29832a5 --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-non-number-arguments-throw.js @@ -0,0 +1,54 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const fs = require('fs'); +const tmpdir = require('../common/tmpdir'); +const tempFile = tmpdir.resolve('fs-non-number-arguments-throw'); + +tmpdir.refresh(); +fs.writeFileSync(tempFile, 'abc\ndef'); + +// A sanity check when using numbers instead of strings +const sanity = 'def'; +const saneEmitter = fs.createReadStream(tempFile, { start: 4, end: 6 }); + +assert.throws( + () => { + fs.createReadStream(tempFile, { start: '4', end: 6 }); + }, + { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError' + }); + +assert.throws( + () => { + fs.createReadStream(tempFile, { start: 4, end: '6' }); + }, + { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError' + }); + +assert.throws( + () => { + fs.createWriteStream(tempFile, { start: '4' }); + }, + { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError' + }); + +saneEmitter.on('data', common.mustCall(function(data) { + assert.strictEqual( + sanity, data.toString('utf8'), + `read ${data.toString('utf8')} instead of ${sanity}`); +})); diff --git a/tests/node_compat/test/parallel/test-fs-open-flags.js b/tests/node_compat/test/parallel/test-fs-open-flags.js index 89f6bdcb62a065..64967252a7db98 100644 --- a/tests/node_compat/test/parallel/test-fs-open-flags.js +++ b/tests/node_compat/test/parallel/test-fs-open-flags.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-fs-open-mode-mask.js b/tests/node_compat/test/parallel/test-fs-open-mode-mask.js index 30a2cd354d1eeb..a39b1e4bfb8c69 100644 --- a/tests/node_compat/test/parallel/test-fs-open-mode-mask.js +++ b/tests/node_compat/test/parallel/test-fs-open-mode-mask.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-open-no-close.js b/tests/node_compat/test/parallel/test-fs-open-no-close.js index 27e23a18245738..4ba8890d9fb787 100644 --- a/tests/node_compat/test/parallel/test-fs-open-no-close.js +++ b/tests/node_compat/test/parallel/test-fs-open-no-close.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-open-numeric-flags.js b/tests/node_compat/test/parallel/test-fs-open-numeric-flags.js index 025eff60d2a13c..d658e329f0956b 100644 --- a/tests/node_compat/test/parallel/test-fs-open-numeric-flags.js +++ b/tests/node_compat/test/parallel/test-fs-open-numeric-flags.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-promises-exists.js b/tests/node_compat/test/parallel/test-fs-promises-exists.js new file mode 100644 index 00000000000000..14550471750eed --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-promises-exists.js @@ -0,0 +1,16 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +require('../common'); +const assert = require('assert'); +const fs = require('fs'); +const fsPromises = require('fs/promises'); + +assert.strictEqual(fsPromises, fs.promises); +assert.strictEqual(fsPromises.constants, fs.constants); diff --git a/tests/node_compat/test/parallel/test-fs-promises-file-handle-stat.js b/tests/node_compat/test/parallel/test-fs-promises-file-handle-stat.js new file mode 100644 index 00000000000000..45315c10b2cf7a --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-promises-file-handle-stat.js @@ -0,0 +1,30 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); + +// The following tests validate base functionality for the fs.promises +// FileHandle.stat method. + +const { open } = require('fs').promises; +const tmpdir = require('../common/tmpdir'); +const assert = require('assert'); + +tmpdir.refresh(); + +async function validateStat() { + const filePath = tmpdir.resolve('tmp-read-file.txt'); + const fileHandle = await open(filePath, 'w+'); + const stats = await fileHandle.stat(); + assert.ok(stats.mtime instanceof Date); + await fileHandle.close(); +} + +validateStat() + .then(common.mustCall()); diff --git a/tests/node_compat/test/parallel/test-fs-promises-file-handle-write.js b/tests/node_compat/test/parallel/test-fs-promises-file-handle-write.js new file mode 100644 index 00000000000000..994ce4ee6d3aea --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-promises-file-handle-write.js @@ -0,0 +1,84 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); + +// The following tests validate base functionality for the fs.promises +// FileHandle.write method. + +const fs = require('fs'); +const { open } = fs.promises; +const path = require('path'); +const tmpdir = require('../common/tmpdir'); +const assert = require('assert'); +const tmpDir = tmpdir.path; + +tmpdir.refresh(); + +async function validateWrite() { + const filePathForHandle = path.resolve(tmpDir, 'tmp-write.txt'); + const fileHandle = await open(filePathForHandle, 'w+'); + const buffer = Buffer.from('Hello world'.repeat(100), 'utf8'); + + await fileHandle.write(buffer, 0, buffer.length); + const readFileData = fs.readFileSync(filePathForHandle); + assert.deepStrictEqual(buffer, readFileData); + + await fileHandle.close(); +} + +async function validateEmptyWrite() { + const filePathForHandle = path.resolve(tmpDir, 'tmp-empty-write.txt'); + const fileHandle = await open(filePathForHandle, 'w+'); + const buffer = Buffer.from(''); // empty buffer + + await fileHandle.write(buffer, 0, buffer.length); + const readFileData = fs.readFileSync(filePathForHandle); + assert.deepStrictEqual(buffer, readFileData); + + await fileHandle.close(); +} + +async function validateNonUint8ArrayWrite() { + const filePathForHandle = path.resolve(tmpDir, 'tmp-data-write.txt'); + const fileHandle = await open(filePathForHandle, 'w+'); + const buffer = Buffer.from('Hello world', 'utf8').toString('base64'); + + await fileHandle.write(buffer, 0, buffer.length); + const readFileData = fs.readFileSync(filePathForHandle); + assert.deepStrictEqual(Buffer.from(buffer, 'utf8'), readFileData); + + await fileHandle.close(); +} + +async function validateNonStringValuesWrite() { + const filePathForHandle = path.resolve(tmpDir, 'tmp-non-string-write.txt'); + const fileHandle = await open(filePathForHandle, 'w+'); + const nonStringValues = [ + 123, {}, new Map(), null, undefined, 0n, () => {}, Symbol(), true, + new String('notPrimitive'), + { toString() { return 'amObject'; } }, + { [Symbol.toPrimitive]: (hint) => 'amObject' }, + ]; + for (const nonStringValue of nonStringValues) { + await assert.rejects( + fileHandle.write(nonStringValue), + { message: /"buffer"/, code: 'ERR_INVALID_ARG_TYPE' } + ); + } + + await fileHandle.close(); +} + +Promise.all([ + validateWrite(), + validateEmptyWrite(), + validateNonUint8ArrayWrite(), + validateNonStringValuesWrite(), +]).then(common.mustCall()); diff --git a/tests/node_compat/test/parallel/test-fs-promises-readfile-empty.js b/tests/node_compat/test/parallel/test-fs-promises-readfile-empty.js new file mode 100644 index 00000000000000..3a72b0c6e61bf7 --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-promises-readfile-empty.js @@ -0,0 +1,24 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); + +const assert = require('assert'); +const { promises: fs } = require('fs'); +const fixtures = require('../common/fixtures'); + +const fn = fixtures.path('empty.txt'); + +fs.readFile(fn) + .then(assert.ok); + +fs.readFile(fn, 'utf8') + .then(assert.strictEqual.bind(this, '')); + +fs.readFile(fn, { encoding: 'utf8' }) + .then(assert.strictEqual.bind(this, '')); diff --git a/tests/node_compat/test/parallel/test-fs-promises-readfile-with-fd.js b/tests/node_compat/test/parallel/test-fs-promises-readfile-with-fd.js new file mode 100644 index 00000000000000..f5a0199d9398a0 --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-promises-readfile-with-fd.js @@ -0,0 +1,41 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +// This test makes sure that `readFile()` always reads from the current +// position of the file, instead of reading from the beginning of the file. + +const common = require('../common'); +const assert = require('assert'); +const { writeFileSync } = require('fs'); +const { open } = require('fs').promises; + +const tmpdir = require('../common/tmpdir'); +tmpdir.refresh(); + +const fn = tmpdir.resolve('test.txt'); +writeFileSync(fn, 'Hello World'); + +async function readFileTest() { + const handle = await open(fn, 'r'); + + /* Read only five bytes, so that the position moves to five. */ + const buf = Buffer.alloc(5); + const { bytesRead } = await handle.read(buf, 0, 5, null); + assert.strictEqual(bytesRead, 5); + assert.strictEqual(buf.toString(), 'Hello'); + + /* readFile() should read from position five, instead of zero. */ + assert.strictEqual((await handle.readFile()).toString(), ' World'); + + await handle.close(); +} + + +readFileTest() + .then(common.mustCall()); diff --git a/tests/node_compat/test/parallel/test-fs-promises-writefile-with-fd.js b/tests/node_compat/test/parallel/test-fs-promises-writefile-with-fd.js index f750c28be787eb..7812a4a87920d7 100644 --- a/tests/node_compat/test/parallel/test-fs-promises-writefile-with-fd.js +++ b/tests/node_compat/test/parallel/test-fs-promises-writefile-with-fd.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-read-file-sync-hostname.js b/tests/node_compat/test/parallel/test-fs-read-file-sync-hostname.js new file mode 100644 index 00000000000000..104f1c2b924118 --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-read-file-sync-hostname.js @@ -0,0 +1,40 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +if (!common.isLinux) + common.skip('Test is linux specific.'); + +const assert = require('assert'); +const fs = require('fs'); + +// Test to make sure reading a file under the /proc directory works. See: +// https://groups.google.com/forum/#!topic/nodejs-dev/rxZ_RoH1Gn0 +const hostname = fs.readFileSync('/proc/sys/kernel/hostname'); +assert.ok(hostname.length > 0); diff --git a/tests/node_compat/test/parallel/test-fs-read-file-sync.js b/tests/node_compat/test/parallel/test-fs-read-file-sync.js new file mode 100644 index 00000000000000..ae50907fd835d1 --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-read-file-sync.js @@ -0,0 +1,41 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); +const fs = require('fs'); +const fixtures = require('../common/fixtures'); + +const fn = fixtures.path('elipses.txt'); + +const s = fs.readFileSync(fn, 'utf8'); +for (let i = 0; i < s.length; i++) { + assert.strictEqual(s[i], '\u2026'); +} +assert.strictEqual(s.length, 10000); diff --git a/tests/node_compat/test/parallel/test-fs-read-stream-autoClose.js b/tests/node_compat/test/parallel/test-fs-read-stream-autoClose.js index 2ab7b69e33317f..0719a62c94edd7 100644 --- a/tests/node_compat/test/parallel/test-fs-read-stream-autoClose.js +++ b/tests/node_compat/test/parallel/test-fs-read-stream-autoClose.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-read-stream-concurrent-reads.js b/tests/node_compat/test/parallel/test-fs-read-stream-concurrent-reads.js index df8cead2abc9fe..89325bd322deb8 100644 --- a/tests/node_compat/test/parallel/test-fs-read-stream-concurrent-reads.js +++ b/tests/node_compat/test/parallel/test-fs-read-stream-concurrent-reads.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-read-stream-double-close.js b/tests/node_compat/test/parallel/test-fs-read-stream-double-close.js index 30129532bb94b0..3b17d45ffb2ea0 100644 --- a/tests/node_compat/test/parallel/test-fs-read-stream-double-close.js +++ b/tests/node_compat/test/parallel/test-fs-read-stream-double-close.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-read-stream-encoding.js b/tests/node_compat/test/parallel/test-fs-read-stream-encoding.js index f3632dfed6e88e..2b3fe85b0d9c1c 100644 --- a/tests/node_compat/test/parallel/test-fs-read-stream-encoding.js +++ b/tests/node_compat/test/parallel/test-fs-read-stream-encoding.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-read-stream-fd-leak.js b/tests/node_compat/test/parallel/test-fs-read-stream-fd-leak.js new file mode 100644 index 00000000000000..88025721ca5f4f --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-read-stream-fd-leak.js @@ -0,0 +1,69 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +require('../common'); +const assert = require('assert'); +const fs = require('fs'); +const fixtures = require('../common/fixtures'); + +let openCount = 0; +const _fsopen = fs.open; +const _fsclose = fs.close; + +const loopCount = 50; +const totalCheck = 50; +const emptyTxt = fixtures.path('empty.txt'); + +fs.open = function() { + openCount++; + return _fsopen.apply(null, arguments); +}; + +fs.close = function() { + openCount--; + return _fsclose.apply(null, arguments); +}; + +function testLeak(endFn, callback) { + console.log(`testing for leaks from fs.createReadStream().${endFn}()...`); + + let i = 0; + let check = 0; + + function checkFunction() { + if (openCount !== 0 && check < totalCheck) { + check++; + setTimeout(checkFunction, 100); + return; + } + + assert.strictEqual( + openCount, + 0, + `no leaked file descriptors using ${endFn}() (got ${openCount})` + ); + + openCount = 0; + callback && setTimeout(callback, 100); + } + + setInterval(function() { + const s = fs.createReadStream(emptyTxt); + s[endFn](); + + if (++i === loopCount) { + clearTimeout(this); + setTimeout(checkFunction, 100); + } + }, 2); +} + +testLeak('close', function() { + testLeak('destroy'); +}); diff --git a/tests/node_compat/test/parallel/test-fs-read-stream-fd.js b/tests/node_compat/test/parallel/test-fs-read-stream-fd.js index ba7c06419a38a3..03a4dd4bf57c35 100644 --- a/tests/node_compat/test/parallel/test-fs-read-stream-fd.js +++ b/tests/node_compat/test/parallel/test-fs-read-stream-fd.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-fs-read-stream-inherit.js b/tests/node_compat/test/parallel/test-fs-read-stream-inherit.js index 2f8c139e8c3d02..e5ad24fc6c5d63 100644 --- a/tests/node_compat/test/parallel/test-fs-read-stream-inherit.js +++ b/tests/node_compat/test/parallel/test-fs-read-stream-inherit.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-read-stream-patch-open.js b/tests/node_compat/test/parallel/test-fs-read-stream-patch-open.js index c05a4818a1d3b8..e662bf29597d20 100644 --- a/tests/node_compat/test/parallel/test-fs-read-stream-patch-open.js +++ b/tests/node_compat/test/parallel/test-fs-read-stream-patch-open.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-read-stream-pos.js b/tests/node_compat/test/parallel/test-fs-read-stream-pos.js new file mode 100644 index 00000000000000..58a79794e1691c --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-read-stream-pos.js @@ -0,0 +1,89 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +// Refs: https://github.com/nodejs/node/issues/33940 + +const common = require('../common'); +const tmpdir = require('../common/tmpdir'); +const fs = require('fs'); +const assert = require('assert'); + +tmpdir.refresh(); + +const file = tmpdir.resolve('read_stream_pos_test.txt'); + +fs.writeFileSync(file, ''); + +let counter = 0; + +const writeInterval = setInterval(() => { + counter = counter + 1; + const line = `hello at ${counter}\n`; + fs.writeFileSync(file, line, { flag: 'a' }); +}, 1); + +const hwm = 10; +let bufs = []; +let isLow = false; +let cur = 0; +let stream; + +const readInterval = setInterval(() => { + if (stream) return; + + stream = fs.createReadStream(file, { + highWaterMark: hwm, + start: cur + }); + stream.on('data', common.mustCallAtLeast((chunk) => { + cur += chunk.length; + bufs.push(chunk); + if (isLow) { + const brokenLines = Buffer.concat(bufs).toString() + .split('\n') + .filter((line) => { + const s = 'hello at'.slice(0, line.length); + if (line && !line.startsWith(s)) { + return true; + } + return false; + }); + assert.strictEqual(brokenLines.length, 0); + exitTest(); + return; + } + if (chunk.length !== hwm) { + isLow = true; + } + })); + stream.on('end', () => { + stream = null; + isLow = false; + bufs = []; + }); +}, 10); + +// Time longer than 90 seconds to exit safely +const endTimer = setTimeout(() => { + exitTest(); +}, 90000); + +const exitTest = () => { + clearInterval(readInterval); + clearInterval(writeInterval); + clearTimeout(endTimer); + if (stream && !stream.destroyed) { + stream.on('close', () => { + process.exit(); + }); + stream.destroy(); + } else { + process.exit(); + } +}; diff --git a/tests/node_compat/test/parallel/test-fs-read-stream-resume.js b/tests/node_compat/test/parallel/test-fs-read-stream-resume.js index 2ab23dc7907279..df89ba23a877b2 100644 --- a/tests/node_compat/test/parallel/test-fs-read-stream-resume.js +++ b/tests/node_compat/test/parallel/test-fs-read-stream-resume.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-fs-read-stream-throw-type-error.js b/tests/node_compat/test/parallel/test-fs-read-stream-throw-type-error.js index 798627e04d3065..efc2c796d0ece9 100644 --- a/tests/node_compat/test/parallel/test-fs-read-stream-throw-type-error.js +++ b/tests/node_compat/test/parallel/test-fs-read-stream-throw-type-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-read-type.js b/tests/node_compat/test/parallel/test-fs-read-type.js index 73653bdaeedbe8..d127554b8ea963 100644 --- a/tests/node_compat/test/parallel/test-fs-read-type.js +++ b/tests/node_compat/test/parallel/test-fs-read-type.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-read-zero-length.js b/tests/node_compat/test/parallel/test-fs-read-zero-length.js index 59eaf2e5a83ded..062f290a54198b 100644 --- a/tests/node_compat/test/parallel/test-fs-read-zero-length.js +++ b/tests/node_compat/test/parallel/test-fs-read-zero-length.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-read.js b/tests/node_compat/test/parallel/test-fs-read.js index e8318df1ec4bd6..0681e42dce3c67 100644 --- a/tests/node_compat/test/parallel/test-fs-read.js +++ b/tests/node_compat/test/parallel/test-fs-read.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-fs-readdir-stack-overflow.js b/tests/node_compat/test/parallel/test-fs-readdir-stack-overflow.js index e3724c56dced2d..a466e7e0109b59 100644 --- a/tests/node_compat/test/parallel/test-fs-readdir-stack-overflow.js +++ b/tests/node_compat/test/parallel/test-fs-readdir-stack-overflow.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-readdir.js b/tests/node_compat/test/parallel/test-fs-readdir.js index 319020c933f7dc..31e8221ef5e70b 100644 --- a/tests/node_compat/test/parallel/test-fs-readdir.js +++ b/tests/node_compat/test/parallel/test-fs-readdir.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-readfile-empty.js b/tests/node_compat/test/parallel/test-fs-readfile-empty.js index c076223fb32796..3f3f9e83e95f93 100644 --- a/tests/node_compat/test/parallel/test-fs-readfile-empty.js +++ b/tests/node_compat/test/parallel/test-fs-readfile-empty.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-fs-readfile-fd.js b/tests/node_compat/test/parallel/test-fs-readfile-fd.js new file mode 100644 index 00000000000000..7edfd1d6a96437 --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-readfile-fd.js @@ -0,0 +1,101 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); + +// Test fs.readFile using a file descriptor. + +const fixtures = require('../common/fixtures'); +const assert = require('assert'); +const fs = require('fs'); +const fn = fixtures.path('empty.txt'); +const tmpdir = require('../common/tmpdir'); +tmpdir.refresh(); + +tempFd(function(fd, close) { + fs.readFile(fd, function(err, data) { + assert.ok(data); + close(); + }); +}); + +tempFd(function(fd, close) { + fs.readFile(fd, 'utf8', function(err, data) { + assert.strictEqual(data, ''); + close(); + }); +}); + +tempFdSync(function(fd) { + assert.ok(fs.readFileSync(fd)); +}); + +tempFdSync(function(fd) { + assert.strictEqual(fs.readFileSync(fd, 'utf8'), ''); +}); + +function tempFd(callback) { + fs.open(fn, 'r', function(err, fd) { + assert.ifError(err); + callback(fd, function() { + fs.close(fd, function(err) { + assert.ifError(err); + }); + }); + }); +} + +function tempFdSync(callback) { + const fd = fs.openSync(fn, 'r'); + callback(fd); + fs.closeSync(fd); +} + +{ + // This test makes sure that `readFile()` always reads from the current + // position of the file, instead of reading from the beginning of the file, + // when used with file descriptors. + + const filename = tmpdir.resolve('test.txt'); + fs.writeFileSync(filename, 'Hello World'); + + { + // Tests the fs.readFileSync(). + const fd = fs.openSync(filename, 'r'); + + // Read only five bytes, so that the position moves to five. + const buf = Buffer.alloc(5); + assert.strictEqual(fs.readSync(fd, buf, 0, 5), 5); + assert.strictEqual(buf.toString(), 'Hello'); + + // readFileSync() should read from position five, instead of zero. + assert.strictEqual(fs.readFileSync(fd).toString(), ' World'); + + fs.closeSync(fd); + } + + { + // Tests the fs.readFile(). + fs.open(filename, 'r', common.mustSucceed((fd) => { + const buf = Buffer.alloc(5); + + // Read only five bytes, so that the position moves to five. + fs.read(fd, buf, 0, 5, null, common.mustSucceed((bytes) => { + assert.strictEqual(bytes, 5); + assert.strictEqual(buf.toString(), 'Hello'); + + fs.readFile(fd, common.mustSucceed((data) => { + // readFile() should read from position five, instead of zero. + assert.strictEqual(data.toString(), ' World'); + + fs.closeSync(fd); + })); + })); + })); + } +} diff --git a/tests/node_compat/test/parallel/test-fs-readfile-unlink.js b/tests/node_compat/test/parallel/test-fs-readfile-unlink.js new file mode 100644 index 00000000000000..e9e4b67b17ff14 --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-readfile-unlink.js @@ -0,0 +1,53 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); + +// Test that unlink succeeds immediately after readFile completes. + +const assert = require('assert'); +const fs = require('fs'); + +const tmpdir = require('../common/tmpdir'); + +const fileName = tmpdir.resolve('test.bin'); +const buf = Buffer.alloc(512 * 1024, 42); + +tmpdir.refresh(); + +fs.writeFileSync(fileName, buf); + +fs.readFile(fileName, common.mustSucceed((data) => { + assert.strictEqual(data.length, buf.length); + assert.strictEqual(buf[0], 42); + + // Unlink should not throw. This is part of the test. It used to throw on + // Windows due to a bug. + fs.unlinkSync(fileName); +})); diff --git a/tests/node_compat/test/parallel/test-fs-readfile-zero-byte-liar.js b/tests/node_compat/test/parallel/test-fs-readfile-zero-byte-liar.js new file mode 100644 index 00000000000000..e2481554c61505 --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-readfile-zero-byte-liar.js @@ -0,0 +1,62 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); + +// Test that readFile works even when stat returns size 0. + +const assert = require('assert'); +const fs = require('fs'); + +const dataExpected = fs.readFileSync(__filename, 'utf8'); + +// Sometimes stat returns size=0, but it's a lie. +fs._fstat = fs.fstat; +fs._fstatSync = fs.fstatSync; + +fs.fstat = (fd, cb) => { + fs._fstat(fd, (er, st) => { + if (er) return cb(er); + st.size = 0; + return cb(er, st); + }); +}; + +fs.fstatSync = (fd) => { + const st = fs._fstatSync(fd); + st.size = 0; + return st; +}; + +const d = fs.readFileSync(__filename, 'utf8'); +assert.strictEqual(d, dataExpected); + +fs.readFile(__filename, 'utf8', common.mustCall((er, d) => { + assert.strictEqual(d, dataExpected); +})); diff --git a/tests/node_compat/test/parallel/test-fs-readfilesync-enoent.js b/tests/node_compat/test/parallel/test-fs-readfilesync-enoent.js new file mode 100644 index 00000000000000..ba888cee5a8b26 --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-readfilesync-enoent.js @@ -0,0 +1,39 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); + +// This test is only relevant on Windows. +if (!common.isWindows) + common.skip('Windows specific test.'); + +// This test ensures fs.realpathSync works on properly on Windows without +// throwing ENOENT when the path involves a fileserver. +// https://github.com/nodejs/node-v0.x-archive/issues/3542 + +const assert = require('assert'); +const fs = require('fs'); +const os = require('os'); +const path = require('path'); + +function test(p) { + const result = fs.realpathSync(p); + assert.strictEqual(result.toLowerCase(), path.resolve(p).toLowerCase()); + + fs.realpath(p, common.mustSucceed((result) => { + assert.strictEqual(result.toLowerCase(), path.resolve(p).toLowerCase()); + })); +} + +test(`//${os.hostname()}/c$/Windows/System32`); +test(`//${os.hostname()}/c$/Windows`); +test(`//${os.hostname()}/c$/`); +test(`\\\\${os.hostname()}\\c$\\`); +test('C:\\'); +test('C:'); +test(process.env.windir); diff --git a/tests/node_compat/test/parallel/test-fs-readv-sync.js b/tests/node_compat/test/parallel/test-fs-readv-sync.js index fd0fc8cdaf6193..2829dbb2c8d967 100644 --- a/tests/node_compat/test/parallel/test-fs-readv-sync.js +++ b/tests/node_compat/test/parallel/test-fs-readv-sync.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-readv.js b/tests/node_compat/test/parallel/test-fs-readv.js index 42581cfe8bafd8..834d1da63edead 100644 --- a/tests/node_compat/test/parallel/test-fs-readv.js +++ b/tests/node_compat/test/parallel/test-fs-readv.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-ready-event-stream.js b/tests/node_compat/test/parallel/test-fs-ready-event-stream.js new file mode 100644 index 00000000000000..12f1b044438ecc --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-ready-event-stream.js @@ -0,0 +1,27 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const fs = require('fs'); +const tmpdir = require('../common/tmpdir'); + +const readStream = fs.createReadStream(__filename); +assert.strictEqual(readStream.pending, true); +readStream.on('ready', common.mustCall(() => { + assert.strictEqual(readStream.pending, false); +})); + +const writeFile = tmpdir.resolve('write-fsreadyevent.txt'); +tmpdir.refresh(); +const writeStream = fs.createWriteStream(writeFile, { autoClose: true }); +assert.strictEqual(writeStream.pending, true); +writeStream.on('ready', common.mustCall(() => { + assert.strictEqual(writeStream.pending, false); + writeStream.end(); +})); diff --git a/tests/node_compat/test/parallel/test-fs-realpath-native.js b/tests/node_compat/test/parallel/test-fs-realpath-native.js index f4cc649a042704..753dfc1613af07 100644 --- a/tests/node_compat/test/parallel/test-fs-realpath-native.js +++ b/tests/node_compat/test/parallel/test-fs-realpath-native.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-sync-warns-not-found.js b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-sync-warns-not-found.js index 121a66e0944517..e20f5e622b64f0 100644 --- a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-sync-warns-not-found.js +++ b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-sync-warns-not-found.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-sync-warns-on-file.js b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-sync-warns-on-file.js index b3f4d1fab0211d..0691083103bb0e 100644 --- a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-sync-warns-on-file.js +++ b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-sync-warns-on-file.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-throws-not-found.js b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-throws-not-found.js index 931308aadb916d..f337af1db284d8 100644 --- a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-throws-not-found.js +++ b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-throws-not-found.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-throws-on-file.js b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-throws-on-file.js index 6a48678bc6eac0..123ca9775569b8 100644 --- a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-throws-on-file.js +++ b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-throws-on-file.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-warns-not-found.js b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-warns-not-found.js index 2eae8b1e307e2b..f99f413b169721 100644 --- a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-warns-not-found.js +++ b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-warns-not-found.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-warns-on-file.js b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-warns-on-file.js index 89250b048fecae..f1ed786977fb3a 100644 --- a/tests/node_compat/test/parallel/test-fs-rmdir-recursive-warns-on-file.js +++ b/tests/node_compat/test/parallel/test-fs-rmdir-recursive-warns-on-file.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-rmdir-type-check.js b/tests/node_compat/test/parallel/test-fs-rmdir-type-check.js index df1d7a84f6af7d..335824b2658d52 100644 --- a/tests/node_compat/test/parallel/test-fs-rmdir-type-check.js +++ b/tests/node_compat/test/parallel/test-fs-rmdir-type-check.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-sir-writes-alot.js b/tests/node_compat/test/parallel/test-fs-sir-writes-alot.js new file mode 100644 index 00000000000000..4cf0fbe4e85c55 --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-sir-writes-alot.js @@ -0,0 +1,77 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const fs = require('fs'); +const assert = require('assert'); + +const tmpdir = require('../common/tmpdir'); + +const filename = tmpdir.resolve('out.txt'); + +tmpdir.refresh(); + +const fd = fs.openSync(filename, 'w'); + +const line = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaa\n'; + +const N = 10240; +let complete = 0; + +for (let i = 0; i < N; i++) { + // Create a new buffer for each write. Before the write is actually + // executed by the thread pool, the buffer will be collected. + const buffer = Buffer.from(line); + fs.write(fd, buffer, 0, buffer.length, null, function(er, written) { + complete++; + if (complete === N) { + fs.closeSync(fd); + const s = fs.createReadStream(filename); + s.on('data', testBuffer); + } + }); +} + +let bytesChecked = 0; + +function testBuffer(b) { + for (let i = 0; i < b.length; i++) { + bytesChecked++; + if (b[i] !== 'a'.charCodeAt(0) && b[i] !== '\n'.charCodeAt(0)) { + throw new Error(`invalid char ${i},${b[i]}`); + } + } +} + +process.on('exit', function() { + // Probably some of the writes are going to overlap, so we can't assume + // that we get (N * line.length). Let's just make sure we've checked a + // few... + assert.ok(bytesChecked > 1000); +}); diff --git a/tests/node_compat/test/parallel/test-fs-stream-construct-compat-error-read.js b/tests/node_compat/test/parallel/test-fs-stream-construct-compat-error-read.js new file mode 100644 index 00000000000000..210217ca1770f6 --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-stream-construct-compat-error-read.js @@ -0,0 +1,39 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const fs = require('fs'); +const assert = require('assert'); + +const tmpdir = require('../common/tmpdir'); +tmpdir.refresh(); + +{ + // Compat error. + + function ReadStream(...args) { + fs.ReadStream.call(this, ...args); + } + Object.setPrototypeOf(ReadStream.prototype, fs.ReadStream.prototype); + Object.setPrototypeOf(ReadStream, fs.ReadStream); + + ReadStream.prototype.open = common.mustCall(function ReadStream$open() { + const that = this; + fs.open(that.path, that.flags, that.mode, (err, fd) => { + that.emit('error', err); + }); + }); + + const r = new ReadStream('/doesnotexist', { emitClose: true }) + .on('error', common.mustCall((err) => { + assert.strictEqual(err.code, 'ENOENT'); + assert.strictEqual(r.destroyed, true); + r.on('close', common.mustCall()); + })); +} diff --git a/tests/node_compat/test/parallel/test-fs-stream-construct-compat-graceful-fs.js b/tests/node_compat/test/parallel/test-fs-stream-construct-compat-graceful-fs.js new file mode 100644 index 00000000000000..7df6566f832d73 --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-stream-construct-compat-graceful-fs.js @@ -0,0 +1,77 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const fs = require('fs'); +const assert = require('assert'); +const fixtures = require('../common/fixtures'); + +const tmpdir = require('../common/tmpdir'); +tmpdir.refresh(); + +{ + // Compat with graceful-fs. + + function ReadStream(...args) { + fs.ReadStream.call(this, ...args); + } + Object.setPrototypeOf(ReadStream.prototype, fs.ReadStream.prototype); + Object.setPrototypeOf(ReadStream, fs.ReadStream); + + ReadStream.prototype.open = common.mustCall(function ReadStream$open() { + const that = this; + fs.open(that.path, that.flags, that.mode, (err, fd) => { + if (err) { + if (that.autoClose) + that.destroy(); + + that.emit('error', err); + } else { + that.fd = fd; + that.emit('open', fd); + that.read(); + } + }); + }); + + const r = new ReadStream(fixtures.path('x.txt')) + .on('open', common.mustCall((fd) => { + assert.strictEqual(fd, r.fd); + r.destroy(); + })); +} + +{ + // Compat with graceful-fs. + + function WriteStream(...args) { + fs.WriteStream.call(this, ...args); + } + Object.setPrototypeOf(WriteStream.prototype, fs.WriteStream.prototype); + Object.setPrototypeOf(WriteStream, fs.WriteStream); + + WriteStream.prototype.open = common.mustCall(function WriteStream$open() { + const that = this; + fs.open(that.path, that.flags, that.mode, function(err, fd) { + if (err) { + that.destroy(); + that.emit('error', err); + } else { + that.fd = fd; + that.emit('open', fd); + } + }); + }); + + const w = new WriteStream(`${tmpdir.path}/dummy`) + .on('open', common.mustCall((fd) => { + assert.strictEqual(fd, w.fd); + w.destroy(); + })); +} diff --git a/tests/node_compat/test/parallel/test-fs-stream-construct-compat-old-node.js b/tests/node_compat/test/parallel/test-fs-stream-construct-compat-old-node.js new file mode 100644 index 00000000000000..12ff3984b9dfe1 --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-stream-construct-compat-old-node.js @@ -0,0 +1,104 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const fs = require('fs'); +const assert = require('assert'); +const fixtures = require('../common/fixtures'); + +const tmpdir = require('../common/tmpdir'); +tmpdir.refresh(); + +{ + // Compat with old node. + + function ReadStream(...args) { + fs.ReadStream.call(this, ...args); + } + Object.setPrototypeOf(ReadStream.prototype, fs.ReadStream.prototype); + Object.setPrototypeOf(ReadStream, fs.ReadStream); + + ReadStream.prototype.open = common.mustCall(function() { + fs.open(this.path, this.flags, this.mode, (er, fd) => { + if (er) { + if (this.autoClose) { + this.destroy(); + } + this.emit('error', er); + return; + } + + this.fd = fd; + this.emit('open', fd); + this.emit('ready'); + }); + }); + + let readyCalled = false; + let ticked = false; + const r = new ReadStream(fixtures.path('x.txt')) + .on('ready', common.mustCall(() => { + readyCalled = true; + // Make sure 'ready' is emitted in same tick as 'open'. + assert.strictEqual(ticked, false); + })) + .on('error', common.mustNotCall()) + .on('open', common.mustCall((fd) => { + process.nextTick(() => { + ticked = true; + r.destroy(); + }); + assert.strictEqual(readyCalled, false); + assert.strictEqual(fd, r.fd); + })); +} + +{ + // Compat with old node. + + function WriteStream(...args) { + fs.WriteStream.call(this, ...args); + } + Object.setPrototypeOf(WriteStream.prototype, fs.WriteStream.prototype); + Object.setPrototypeOf(WriteStream, fs.WriteStream); + + WriteStream.prototype.open = common.mustCall(function() { + fs.open(this.path, this.flags, this.mode, (er, fd) => { + if (er) { + if (this.autoClose) { + this.destroy(); + } + this.emit('error', er); + return; + } + + this.fd = fd; + this.emit('open', fd); + this.emit('ready'); + }); + }); + + let readyCalled = false; + let ticked = false; + const w = new WriteStream(`${tmpdir.path}/dummy`) + .on('ready', common.mustCall(() => { + readyCalled = true; + // Make sure 'ready' is emitted in same tick as 'open'. + assert.strictEqual(ticked, false); + })) + .on('error', common.mustNotCall()) + .on('open', common.mustCall((fd) => { + process.nextTick(() => { + ticked = true; + w.destroy(); + }); + assert.strictEqual(readyCalled, false); + assert.strictEqual(fd, w.fd); + })); +} diff --git a/tests/node_compat/test/parallel/test-fs-stream-destroy-emit-error.js b/tests/node_compat/test/parallel/test-fs-stream-destroy-emit-error.js new file mode 100644 index 00000000000000..1a3008895fa5f5 --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-stream-destroy-emit-error.js @@ -0,0 +1,50 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const fs = require('fs'); + +const tmpdir = require('../common/tmpdir'); +tmpdir.refresh(); + +{ + const stream = fs.createReadStream(__filename); + stream.on('close', common.mustCall()); + test(stream); +} + +{ + const stream = fs.createWriteStream(`${tmpdir.path}/dummy`); + stream.on('close', common.mustCall()); + test(stream); +} + +{ + const stream = fs.createReadStream(__filename, { emitClose: true }); + stream.on('close', common.mustCall()); + test(stream); +} + +{ + const stream = fs.createWriteStream(`${tmpdir.path}/dummy2`, + { emitClose: true }); + stream.on('close', common.mustCall()); + test(stream); +} + + +function test(stream) { + const err = new Error('DESTROYED'); + stream.on('open', function() { + stream.destroy(err); + }); + stream.on('error', common.mustCall(function(err_) { + assert.strictEqual(err_, err); + })); +} diff --git a/tests/node_compat/test/parallel/test-fs-stream-double-close.js b/tests/node_compat/test/parallel/test-fs-stream-double-close.js new file mode 100644 index 00000000000000..01894e26029803 --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-stream-double-close.js @@ -0,0 +1,61 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const fs = require('fs'); + +const tmpdir = require('../common/tmpdir'); +tmpdir.refresh(); + +test1(fs.createReadStream(__filename)); +test2(fs.createReadStream(__filename)); +test3(fs.createReadStream(__filename)); + +test1(fs.createWriteStream(`${tmpdir.path}/dummy1`)); +test2(fs.createWriteStream(`${tmpdir.path}/dummy2`)); +test3(fs.createWriteStream(`${tmpdir.path}/dummy3`)); + +function test1(stream) { + stream.destroy(); + stream.destroy(); +} + +function test2(stream) { + stream.destroy(); + stream.on('open', common.mustCall(function(fd) { + stream.destroy(); + })); +} + +function test3(stream) { + stream.on('open', common.mustCall(function(fd) { + stream.destroy(); + stream.destroy(); + })); +} diff --git a/tests/node_compat/test/parallel/test-fs-stream-fs-options.js b/tests/node_compat/test/parallel/test-fs-stream-fs-options.js new file mode 100644 index 00000000000000..3740962b7adf7b --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-stream-fs-options.js @@ -0,0 +1,79 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +require('../common'); +const fixtures = require('../common/fixtures'); +const fs = require('fs'); +const assert = require('assert'); + +const tmpdir = require('../common/tmpdir'); +tmpdir.refresh(); + +const streamOpts = ['open', 'close']; +const writeStreamOptions = [...streamOpts, 'write']; +const readStreamOptions = [...streamOpts, 'read']; +const originalFs = { fs }; + +{ + const file = tmpdir.resolve('write-end-test0.txt'); + + writeStreamOptions.forEach((fn) => { + const overrideFs = Object.assign({}, originalFs.fs, { [fn]: null }); + if (fn === 'write') overrideFs.writev = null; + + const opts = { + fs: overrideFs + }; + assert.throws( + () => fs.createWriteStream(file, opts), { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError', + message: `The "options.fs.${fn}" property must be of type function. ` + + 'Received null' + }, + `createWriteStream options.fs.${fn} should throw if isn't a function` + ); + }); +} + +{ + const file = tmpdir.resolve('write-end-test0.txt'); + const overrideFs = Object.assign({}, originalFs.fs, { writev: 'not a fn' }); + const opts = { + fs: overrideFs + }; + assert.throws( + () => fs.createWriteStream(file, opts), { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError', + message: 'The "options.fs.writev" property must be of type function. ' + + 'Received type string (\'not a fn\')' + }, + 'createWriteStream options.fs.writev should throw if isn\'t a function' + ); +} + +{ + const file = fixtures.path('x.txt'); + readStreamOptions.forEach((fn) => { + const overrideFs = Object.assign({}, originalFs.fs, { [fn]: null }); + const opts = { + fs: overrideFs + }; + assert.throws( + () => fs.createReadStream(file, opts), { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError', + message: `The "options.fs.${fn}" property must be of type function. ` + + 'Received null' + }, + `createReadStream options.fs.${fn} should throw if isn't a function` + ); + }); +} diff --git a/tests/node_compat/test/parallel/test-fs-stream-options.js b/tests/node_compat/test/parallel/test-fs-stream-options.js new file mode 100644 index 00000000000000..1733d191934d21 --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-stream-options.js @@ -0,0 +1,56 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const { mustNotMutateObjectDeep } = require('../common'); + +const assert = require('assert'); +const fs = require('fs'); + +{ + const fd = 'k'; + + assert.throws( + () => { + fs.createReadStream(null, mustNotMutateObjectDeep({ fd })); + }, + { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError', + }); + + assert.throws( + () => { + fs.createWriteStream(null, mustNotMutateObjectDeep({ fd })); + }, + { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError', + }); +} + +{ + const path = 46; + + assert.throws( + () => { + fs.createReadStream(path); + }, + { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError', + }); + + assert.throws( + () => { + fs.createWriteStream(path); + }, + { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError', + }); +} diff --git a/tests/node_compat/test/parallel/test-fs-symlink-dir-junction-relative.js b/tests/node_compat/test/parallel/test-fs-symlink-dir-junction-relative.js new file mode 100644 index 00000000000000..90487f51f5048b --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-symlink-dir-junction-relative.js @@ -0,0 +1,65 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +// Test creating and resolving relative junction or symbolic link + +const common = require('../common'); +const fixtures = require('../common/fixtures'); +const assert = require('assert'); +const fs = require('fs'); + +const tmpdir = require('../common/tmpdir'); + +const linkPath1 = tmpdir.resolve('junction1'); +const linkPath2 = tmpdir.resolve('junction2'); +const linkTarget = fixtures.fixturesDir; +const linkData = fixtures.fixturesDir; + +tmpdir.refresh(); + +// Test fs.symlink() +fs.symlink(linkData, linkPath1, 'junction', common.mustSucceed(() => { + verifyLink(linkPath1); +})); + +// Test fs.symlinkSync() +fs.symlinkSync(linkData, linkPath2, 'junction'); +verifyLink(linkPath2); + +function verifyLink(linkPath) { + const stats = fs.lstatSync(linkPath); + assert.ok(stats.isSymbolicLink()); + + const data1 = fs.readFileSync(`${linkPath}/x.txt`, 'ascii'); + const data2 = fs.readFileSync(`${linkTarget}/x.txt`, 'ascii'); + assert.strictEqual(data1, data2); + + // Clean up. + fs.unlinkSync(linkPath); +} diff --git a/tests/node_compat/test/parallel/test-fs-timestamp-parsing-error.js b/tests/node_compat/test/parallel/test-fs-timestamp-parsing-error.js new file mode 100644 index 00000000000000..1319f998b96335 --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-timestamp-parsing-error.js @@ -0,0 +1,36 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); +const assert = require('assert'); +const fs = require('fs'); + +for (const input of [Infinity, -Infinity, NaN]) { + assert.throws( + () => { + fs._toUnixTimestamp(input); + }, + { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError' + }); +} + +assert.throws( + () => { + fs._toUnixTimestamp({}); + }, + { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError' + }); + +const okInputs = [1, -1, '1', '-1', Date.now()]; +for (const input of okInputs) { + fs._toUnixTimestamp(input); +} diff --git a/tests/node_compat/test/parallel/test-fs-truncate-clear-file-zero.js b/tests/node_compat/test/parallel/test-fs-truncate-clear-file-zero.js new file mode 100644 index 00000000000000..0dc50ef5638839 --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-truncate-clear-file-zero.js @@ -0,0 +1,63 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const tmpdir = require('../common/tmpdir'); + +// This test ensures that `fs.truncate` opens the file with `r+` and not `w`, +// which had earlier resulted in the target file's content getting zeroed out. +// https://github.com/nodejs/node-v0.x-archive/issues/6233 + +const assert = require('assert'); +const fs = require('fs'); + +const filename = `${tmpdir.path}/truncate-file.txt`; + +tmpdir.refresh(); + +// Synchronous test. +{ + fs.writeFileSync(filename, '0123456789'); + assert.strictEqual(fs.readFileSync(filename).toString(), '0123456789'); + fs.truncateSync(filename, 5); + assert.strictEqual(fs.readFileSync(filename).toString(), '01234'); +} + +// Asynchronous test. +{ + fs.writeFileSync(filename, '0123456789'); + assert.strictEqual(fs.readFileSync(filename).toString(), '0123456789'); + fs.truncate( + filename, + 5, + common.mustSucceed(() => { + assert.strictEqual(fs.readFileSync(filename).toString(), '01234'); + }) + ); +} diff --git a/tests/node_compat/test/parallel/test-fs-util-validateoffsetlength.js b/tests/node_compat/test/parallel/test-fs-util-validateoffsetlength.js new file mode 100644 index 00000000000000..7186df40715a24 --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-util-validateoffsetlength.js @@ -0,0 +1,94 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Flags: --expose-internals +'use strict'; + +const common = require('../common'); + +const assert = require('assert'); +const { + validateOffsetLengthRead, + validateOffsetLengthWrite, +} = require('internal/fs/utils'); + +{ + const offset = -1; + assert.throws( + () => validateOffsetLengthRead(offset, 0, 0), + common.expectsError({ + code: 'ERR_OUT_OF_RANGE', + name: 'RangeError', + message: 'The value of "offset" is out of range. ' + + `It must be >= 0. Received ${offset}` + }) + ); +} + +{ + const length = -1; + assert.throws( + () => validateOffsetLengthRead(0, length, 0), + common.expectsError({ + code: 'ERR_OUT_OF_RANGE', + name: 'RangeError', + message: 'The value of "length" is out of range. ' + + `It must be >= 0. Received ${length}` + }) + ); +} + +{ + const offset = 1; + const length = 1; + const byteLength = offset + length - 1; + assert.throws( + () => validateOffsetLengthRead(offset, length, byteLength), + common.expectsError({ + code: 'ERR_OUT_OF_RANGE', + name: 'RangeError', + message: 'The value of "length" is out of range. ' + + `It must be <= ${byteLength - offset}. Received ${length}` + }) + ); +} + +// Most platforms don't allow reads or writes >= 2 GiB. +// See https://github.com/libuv/libuv/pull/1501. +const kIoMaxLength = 2 ** 31 - 1; + +// RangeError when offset > byteLength +{ + const offset = 100; + const length = 100; + const byteLength = 50; + assert.throws( + () => validateOffsetLengthWrite(offset, length, byteLength), + common.expectsError({ + code: 'ERR_OUT_OF_RANGE', + name: 'RangeError', + message: 'The value of "offset" is out of range. ' + + `It must be <= ${byteLength}. Received ${offset}` + }) + ); +} + +// RangeError when byteLength < kIoMaxLength, and length > byteLength - offset. +{ + const offset = kIoMaxLength - 150; + const length = 200; + const byteLength = kIoMaxLength - 100; + assert.throws( + () => validateOffsetLengthWrite(offset, length, byteLength), + common.expectsError({ + code: 'ERR_OUT_OF_RANGE', + name: 'RangeError', + message: 'The value of "length" is out of range. ' + + `It must be <= ${byteLength - offset}. Received ${length}` + }) + ); +} diff --git a/tests/node_compat/test/parallel/test-fs-utimes-y2K38.js b/tests/node_compat/test/parallel/test-fs-utimes-y2K38.js new file mode 100644 index 00000000000000..381b46b1fb3d66 --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-utimes-y2K38.js @@ -0,0 +1,73 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); + +const tmpdir = require('../common/tmpdir'); +tmpdir.refresh(); + +const assert = require('assert'); +const fs = require('fs'); + +// Check for Y2K38 support. For Windows, assume it's there. Windows +// doesn't have `touch` and `date -r` which are used in the check for support. +if (!common.isWindows) { + const testFilePath = `${tmpdir.path}/y2k38-test`; + const testFileDate = '204001020304'; + const { spawnSync } = require('child_process'); + const touchResult = spawnSync('touch', + ['-t', testFileDate, testFilePath], + { encoding: 'utf8' }); + if (touchResult.status !== 0) { + common.skip('File system appears to lack Y2K38 support (touch failed)'); + } + + // On some file systems that lack Y2K38 support, `touch` will succeed but + // the time will be incorrect. + const dateResult = spawnSync('date', + ['-r', testFilePath, '+%Y%m%d%H%M'], + { encoding: 'utf8' }); + if (dateResult.status === 0) { + if (dateResult.stdout.trim() !== testFileDate) { + common.skip('File system appears to lack Y2k38 support (date failed)'); + } + } else { + // On some platforms `date` may not support the `-r` option. Usually + // this will result in a non-zero status and usage information printed. + // In this case optimistically proceed -- the earlier `touch` succeeded + // but validation that the file has the correct time is not easily possible. + assert.match(dateResult.stderr, /[Uu]sage:/); + } +} + +// Ref: https://github.com/nodejs/node/issues/13255 +const path = `${tmpdir.path}/test-utimes-precision`; +fs.writeFileSync(path, ''); + +const Y2K38_mtime = 2 ** 31; +fs.utimesSync(path, Y2K38_mtime, Y2K38_mtime); +const Y2K38_stats = fs.statSync(path); +assert.strictEqual(Y2K38_stats.mtime.getTime() / 1000, Y2K38_mtime); + +if (common.isWindows) { + // This value would get converted to (double)1713037251359.9998 + const truncate_mtime = 1713037251360; + fs.utimesSync(path, truncate_mtime / 1000, truncate_mtime / 1000); + const truncate_stats = fs.statSync(path); + assert.strictEqual(truncate_stats.mtime.getTime(), truncate_mtime); + + // test Y2K38 for windows + // This value if treaded as a `signed long` gets converted to -2135622133469. + // POSIX systems stores timestamps in {long t_sec, long t_usec}. + // NTFS stores times in nanoseconds in a single `uint64_t`, so when libuv + // calculates (long)`uv_timespec_t.tv_sec` we get 2's complement. + const overflow_mtime = 2159345162531; + fs.utimesSync(path, overflow_mtime / 1000, overflow_mtime / 1000); + const overflow_stats = fs.statSync(path); + assert.strictEqual(overflow_stats.mtime.getTime(), overflow_mtime); +} diff --git a/tests/node_compat/test/parallel/test-fs-utimes.js b/tests/node_compat/test/parallel/test-fs-utimes.js index f24e27f36796f0..afc57776078521 100644 --- a/tests/node_compat/test/parallel/test-fs-utimes.js +++ b/tests/node_compat/test/parallel/test-fs-utimes.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-fs-watch-file-enoent-after-deletion.js b/tests/node_compat/test/parallel/test-fs-watch-file-enoent-after-deletion.js new file mode 100644 index 00000000000000..5b4c892d00de14 --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-watch-file-enoent-after-deletion.js @@ -0,0 +1,54 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); + +// Make sure the deletion event gets reported in the following scenario: +// 1. Watch a file. +// 2. The initial stat() goes okay. +// 3. Something deletes the watched file. +// 4. The second stat() fails with ENOENT. + +// The second stat() translates into the first 'change' event but a logic error +// stopped it from getting emitted. +// https://github.com/nodejs/node-v0.x-archive/issues/4027 + +const fs = require('fs'); + +const tmpdir = require('../common/tmpdir'); +tmpdir.refresh(); + +const filename = tmpdir.resolve('watched'); +fs.writeFileSync(filename, 'quis custodiet ipsos custodes'); + +fs.watchFile(filename, { interval: 50 }, common.mustCall(function(curr, prev) { + fs.unwatchFile(filename); +})); + +fs.unlinkSync(filename); diff --git a/tests/node_compat/test/parallel/test-fs-watch-recursive-add-file-with-url.js b/tests/node_compat/test/parallel/test-fs-watch-recursive-add-file-with-url.js new file mode 100644 index 00000000000000..eb79cc85a99760 --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-watch-recursive-add-file-with-url.js @@ -0,0 +1,59 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const { setTimeout } = require('timers/promises'); + +if (common.isIBMi) + common.skip('IBMi does not support `fs.watch()`'); + +// fs-watch on folders have limited capability in AIX. +// The testcase makes use of folder watching, and causes +// hang. This behavior is documented. Skip this for AIX. + +if (common.isAIX) + common.skip('folder watch capability is limited in AIX.'); + +const assert = require('assert'); +const path = require('path'); +const fs = require('fs'); +const { pathToFileURL } = require('url'); + +const tmpdir = require('../common/tmpdir'); +const testDir = tmpdir.path; +tmpdir.refresh(); + +(async () => { + // Add a file to already watching folder, and use URL as the path + + const rootDirectory = fs.mkdtempSync(testDir + path.sep); + const testDirectory = path.join(rootDirectory, 'test-5'); + fs.mkdirSync(testDirectory); + + const filePath = path.join(testDirectory, 'file-8.txt'); + const url = pathToFileURL(testDirectory); + + const watcher = fs.watch(url, { recursive: true }); + let watcherClosed = false; + watcher.on('change', function(event, filename) { + assert.strictEqual(event, 'rename'); + + if (filename === path.basename(filePath)) { + watcher.close(); + watcherClosed = true; + } + }); + + await setTimeout(common.platformTimeout(100)); + fs.writeFileSync(filePath, 'world'); + + process.on('exit', function() { + assert(watcherClosed, 'watcher Object was not closed'); + }); +})().then(common.mustCall()); diff --git a/tests/node_compat/test/parallel/test-fs-watch-recursive-add-file.js b/tests/node_compat/test/parallel/test-fs-watch-recursive-add-file.js new file mode 100644 index 00000000000000..d572026da56ddb --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-watch-recursive-add-file.js @@ -0,0 +1,57 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const { setTimeout } = require('timers/promises'); + +if (common.isIBMi) + common.skip('IBMi does not support `fs.watch()`'); + +// fs-watch on folders have limited capability in AIX. +// The testcase makes use of folder watching, and causes +// hang. This behavior is documented. Skip this for AIX. + +if (common.isAIX) + common.skip('folder watch capability is limited in AIX.'); + +const assert = require('assert'); +const path = require('path'); +const fs = require('fs'); + +const tmpdir = require('../common/tmpdir'); +const testDir = tmpdir.path; +tmpdir.refresh(); + +(async () => { + // Add a file to already watching folder + + const rootDirectory = fs.mkdtempSync(testDir + path.sep); + const testDirectory = path.join(rootDirectory, 'test-1'); + fs.mkdirSync(testDirectory); + + const testFile = path.join(testDirectory, 'file-1.txt'); + + const watcher = fs.watch(testDirectory, { recursive: true }); + let watcherClosed = false; + watcher.on('change', function(event, filename) { + assert.strictEqual(event, 'rename'); + + if (filename === path.basename(testFile)) { + watcher.close(); + watcherClosed = true; + } + }); + + await setTimeout(common.platformTimeout(100)); + fs.writeFileSync(testFile, 'world'); + + process.once('exit', function() { + assert(watcherClosed, 'watcher Object was not closed'); + }); +})().then(common.mustCall()); diff --git a/tests/node_compat/test/parallel/test-fs-watch-recursive-add-folder.js b/tests/node_compat/test/parallel/test-fs-watch-recursive-add-folder.js new file mode 100644 index 00000000000000..46345443c5bc74 --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-watch-recursive-add-folder.js @@ -0,0 +1,57 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const { setTimeout } = require('timers/promises'); + +if (common.isIBMi) + common.skip('IBMi does not support `fs.watch()`'); + +// fs-watch on folders have limited capability in AIX. +// The testcase makes use of folder watching, and causes +// hang. This behavior is documented. Skip this for AIX. + +if (common.isAIX) + common.skip('folder watch capability is limited in AIX.'); + +const assert = require('assert'); +const path = require('path'); +const fs = require('fs'); + +const tmpdir = require('../common/tmpdir'); +const testDir = tmpdir.path; +tmpdir.refresh(); + +(async () => { + // Add a folder to already watching folder + + const rootDirectory = fs.mkdtempSync(testDir + path.sep); + const testDirectory = path.join(rootDirectory, 'test-2'); + fs.mkdirSync(testDirectory); + + const testFile = path.join(testDirectory, 'folder-2'); + + const watcher = fs.watch(testDirectory, { recursive: true }); + let watcherClosed = false; + watcher.on('change', function(event, filename) { + assert.strictEqual(event, 'rename'); + + if (filename === path.basename(testFile)) { + watcher.close(); + watcherClosed = true; + } + }); + + await setTimeout(common.platformTimeout(100)); + fs.mkdirSync(testFile); + + process.once('exit', function() { + assert(watcherClosed, 'watcher Object was not closed'); + }); +})().then(common.mustCall()); diff --git a/tests/node_compat/test/parallel/test-fs-watch-recursive-update-file.js b/tests/node_compat/test/parallel/test-fs-watch-recursive-update-file.js new file mode 100644 index 00000000000000..185db0d645d9d9 --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-watch-recursive-update-file.js @@ -0,0 +1,59 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const { setTimeout } = require('timers/promises'); + +if (common.isIBMi) + common.skip('IBMi does not support `fs.watch()`'); + +// fs-watch on folders have limited capability in AIX. +// The testcase makes use of folder watching, and causes +// hang. This behavior is documented. Skip this for AIX. + +if (common.isAIX) + common.skip('folder watch capability is limited in AIX.'); + +const assert = require('assert'); +const path = require('path'); +const fs = require('fs'); + +const tmpdir = require('../common/tmpdir'); +const testDir = tmpdir.path; +tmpdir.refresh(); + +(async () => { + // Watch a folder and update an already existing file in it. + + const rootDirectory = fs.mkdtempSync(testDir + path.sep); + const testDirectory = path.join(rootDirectory, 'test-0'); + fs.mkdirSync(testDirectory); + + const testFile = path.join(testDirectory, 'file-1.txt'); + fs.writeFileSync(testFile, 'hello'); + + const watcher = fs.watch(testDirectory, { recursive: true }); + let watcherClosed = false; + watcher.on('change', common.mustCallAtLeast(function(event, filename) { + // Libuv inconsistenly emits a rename event for the file we are watching + assert.ok(event === 'change' || event === 'rename'); + + if (filename === path.basename(testFile)) { + watcher.close(); + watcherClosed = true; + } + })); + + await setTimeout(common.platformTimeout(100)); + fs.writeFileSync(testFile, 'hello'); + + process.once('exit', function() { + assert(watcherClosed, 'watcher Object was not closed'); + }); +})().then(common.mustCall()); diff --git a/tests/node_compat/test/parallel/test-fs-watchfile.js b/tests/node_compat/test/parallel/test-fs-watchfile.js index ccbaabe06fa0a7..b46e2e5efef344 100644 --- a/tests/node_compat/test/parallel/test-fs-watchfile.js +++ b/tests/node_compat/test/parallel/test-fs-watchfile.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-write-buffer.js b/tests/node_compat/test/parallel/test-fs-write-buffer.js index 13ee5f068cbdd7..4971a101d5db2e 100644 --- a/tests/node_compat/test/parallel/test-fs-write-buffer.js +++ b/tests/node_compat/test/parallel/test-fs-write-buffer.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-fs-write-file-buffer.js b/tests/node_compat/test/parallel/test-fs-write-file-buffer.js index d0bfd32aa99819..155047de8a358f 100644 --- a/tests/node_compat/test/parallel/test-fs-write-file-buffer.js +++ b/tests/node_compat/test/parallel/test-fs-write-file-buffer.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-fs-write-file-invalid-path.js b/tests/node_compat/test/parallel/test-fs-write-file-invalid-path.js index 063f3e4915d392..93459235825a55 100644 --- a/tests/node_compat/test/parallel/test-fs-write-file-invalid-path.js +++ b/tests/node_compat/test/parallel/test-fs-write-file-invalid-path.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-write-file-sync.js b/tests/node_compat/test/parallel/test-fs-write-file-sync.js index e7da8526063e49..01d14b8fd04f21 100644 --- a/tests/node_compat/test/parallel/test-fs-write-file-sync.js +++ b/tests/node_compat/test/parallel/test-fs-write-file-sync.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-fs-write-negativeoffset.js b/tests/node_compat/test/parallel/test-fs-write-negativeoffset.js new file mode 100644 index 00000000000000..101b6ecc3b4f3b --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-write-negativeoffset.js @@ -0,0 +1,58 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +// Tests that passing a negative offset does not crash the process + +const common = require('../common'); + +const { + closeSync, + open, + write, + writeSync, +} = require('fs'); + +const assert = require('assert'); + +const tmpdir = require('../common/tmpdir'); +tmpdir.refresh(); + +const filename = tmpdir.resolve('test.txt'); + +open(filename, 'w+', common.mustSucceed((fd) => { + assert.throws(() => { + write(fd, Buffer.alloc(0), -1, common.mustNotCall()); + }, { + code: 'ERR_OUT_OF_RANGE', + }); + assert.throws(() => { + writeSync(fd, Buffer.alloc(0), -1); + }, { + code: 'ERR_OUT_OF_RANGE', + }); + closeSync(fd); +})); + +const filename2 = tmpdir.resolve('test2.txt'); + +// Make sure negative length's don't cause aborts either + +open(filename2, 'w+', common.mustSucceed((fd) => { + assert.throws(() => { + write(fd, Buffer.alloc(0), 0, -1, common.mustNotCall()); + }, { + code: 'ERR_OUT_OF_RANGE', + }); + assert.throws(() => { + writeSync(fd, Buffer.alloc(0), 0, -1); + }, { + code: 'ERR_OUT_OF_RANGE', + }); + closeSync(fd); +})); diff --git a/tests/node_compat/test/parallel/test-fs-write-no-fd.js b/tests/node_compat/test/parallel/test-fs-write-no-fd.js index 5723e17128a9f6..a6fdbf8eebd162 100644 --- a/tests/node_compat/test/parallel/test-fs-write-no-fd.js +++ b/tests/node_compat/test/parallel/test-fs-write-no-fd.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-write-stream-autoclose-option.js b/tests/node_compat/test/parallel/test-fs-write-stream-autoclose-option.js index 480f7dcdb36fb4..a38de9119e3db8 100644 --- a/tests/node_compat/test/parallel/test-fs-write-stream-autoclose-option.js +++ b/tests/node_compat/test/parallel/test-fs-write-stream-autoclose-option.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-write-stream-close-without-callback.js b/tests/node_compat/test/parallel/test-fs-write-stream-close-without-callback.js index ad685be77f20a5..10ab6ca769cdc2 100644 --- a/tests/node_compat/test/parallel/test-fs-write-stream-close-without-callback.js +++ b/tests/node_compat/test/parallel/test-fs-write-stream-close-without-callback.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-write-stream-double-close.js b/tests/node_compat/test/parallel/test-fs-write-stream-double-close.js index 0f57333081d984..901a77cea9ef1d 100644 --- a/tests/node_compat/test/parallel/test-fs-write-stream-double-close.js +++ b/tests/node_compat/test/parallel/test-fs-write-stream-double-close.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-write-stream-encoding.js b/tests/node_compat/test/parallel/test-fs-write-stream-encoding.js new file mode 100644 index 00000000000000..85f63bd7e97744 --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-write-stream-encoding.js @@ -0,0 +1,42 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); +const assert = require('assert'); +const fixtures = require('../common/fixtures'); +const fs = require('fs'); +const stream = require('stream'); +const tmpdir = require('../common/tmpdir'); +const firstEncoding = 'base64'; +const secondEncoding = 'latin1'; + +const examplePath = fixtures.path('x.txt'); +const dummyPath = tmpdir.resolve('x.txt'); + +tmpdir.refresh(); + +const exampleReadStream = fs.createReadStream(examplePath, { + encoding: firstEncoding +}); + +const dummyWriteStream = fs.createWriteStream(dummyPath, { + encoding: firstEncoding +}); + +exampleReadStream.pipe(dummyWriteStream).on('finish', function() { + const assertWriteStream = new stream.Writable({ + write: function(chunk, enc, next) { + const expected = Buffer.from('xyz\n'); + assert(chunk.equals(expected)); + } + }); + assertWriteStream.setDefaultEncoding(secondEncoding); + fs.createReadStream(dummyPath, { + encoding: secondEncoding + }).pipe(assertWriteStream); +}); diff --git a/tests/node_compat/test/parallel/test-fs-write-stream-end.js b/tests/node_compat/test/parallel/test-fs-write-stream-end.js index 3221a558e8b409..d162e9644c8766 100644 --- a/tests/node_compat/test/parallel/test-fs-write-stream-end.js +++ b/tests/node_compat/test/parallel/test-fs-write-stream-end.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-fs-write-stream-fs.js b/tests/node_compat/test/parallel/test-fs-write-stream-fs.js index 253f5e425240db..95fcdde26bb605 100644 --- a/tests/node_compat/test/parallel/test-fs-write-stream-fs.js +++ b/tests/node_compat/test/parallel/test-fs-write-stream-fs.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-write-stream-patch-open.js b/tests/node_compat/test/parallel/test-fs-write-stream-patch-open.js new file mode 100644 index 00000000000000..8f9b15c59c1592 --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-write-stream-patch-open.js @@ -0,0 +1,43 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const fs = require('fs'); + +const tmpdir = require('../common/tmpdir'); + +// Run in a child process because 'out' is opened twice, blocking the tmpdir +// and preventing cleanup. +if (process.argv[2] !== 'child') { + // Parent + const assert = require('assert'); + const { fork } = require('child_process'); + tmpdir.refresh(); + + // Run test + const child = fork(__filename, ['child'], { stdio: 'inherit' }); + child.on('exit', common.mustCall(function(code) { + assert.strictEqual(code, 0); + })); + + return; +} + +// Child + +common.expectWarning( + 'DeprecationWarning', + 'WriteStream.prototype.open() is deprecated', 'DEP0135'); +const s = fs.createWriteStream(`${tmpdir.path}/out`); +s.open(); + +process.nextTick(() => { + // Allow overriding open(). + fs.WriteStream.prototype.open = common.mustCall(); + fs.createWriteStream('asd'); +}); diff --git a/tests/node_compat/test/parallel/test-fs-write-stream-throw-type-error.js b/tests/node_compat/test/parallel/test-fs-write-stream-throw-type-error.js index 988512aa3bdf08..d53ec243bc9148 100644 --- a/tests/node_compat/test/parallel/test-fs-write-stream-throw-type-error.js +++ b/tests/node_compat/test/parallel/test-fs-write-stream-throw-type-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-write-stream.js b/tests/node_compat/test/parallel/test-fs-write-stream.js index 107f22af04dfef..589308135a7a1f 100644 --- a/tests/node_compat/test/parallel/test-fs-write-stream.js +++ b/tests/node_compat/test/parallel/test-fs-write-stream.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-fs-write-sync.js b/tests/node_compat/test/parallel/test-fs-write-sync.js index e65923102e6b1b..c846989f3b4e14 100644 --- a/tests/node_compat/test/parallel/test-fs-write-sync.js +++ b/tests/node_compat/test/parallel/test-fs-write-sync.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-fs-write.js b/tests/node_compat/test/parallel/test-fs-write.js index e10db287fb238a..c8d0c2b53f3ab0 100644 --- a/tests/node_compat/test/parallel/test-fs-write.js +++ b/tests/node_compat/test/parallel/test-fs-write.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-fs-writev-sync.js b/tests/node_compat/test/parallel/test-fs-writev-sync.js index 35db3675fdbcfe..eb4eee6bc12a30 100644 --- a/tests/node_compat/test/parallel/test-fs-writev-sync.js +++ b/tests/node_compat/test/parallel/test-fs-writev-sync.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-fs-writev.js b/tests/node_compat/test/parallel/test-fs-writev.js new file mode 100644 index 00000000000000..2212aa65f44cdc --- /dev/null +++ b/tests/node_compat/test/parallel/test-fs-writev.js @@ -0,0 +1,113 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const fs = require('fs'); +const tmpdir = require('../common/tmpdir'); + +tmpdir.refresh(); + +const expected = 'ümlaut. Лорем 運務ホソモ指及 आपको करने विकास 紙読決多密所 أضف'; + +const getFileName = (i) => tmpdir.resolve(`writev_${i}.txt`); + +/** + * Testing with a array of buffers input + */ + +// fs.writev with array of buffers with all parameters +{ + const filename = getFileName(1); + const fd = fs.openSync(filename, 'w'); + + const buffer = Buffer.from(expected); + const bufferArr = [buffer, buffer]; + + const done = common.mustSucceed((written, buffers) => { + assert.deepStrictEqual(bufferArr, buffers); + const expectedLength = bufferArr.length * buffer.byteLength; + assert.deepStrictEqual(written, expectedLength); + fs.closeSync(fd); + + assert(Buffer.concat(bufferArr).equals(fs.readFileSync(filename))); + }); + + fs.writev(fd, bufferArr, null, done); +} + +// fs.writev with array of buffers without position +{ + const filename = getFileName(2); + const fd = fs.openSync(filename, 'w'); + + const buffer = Buffer.from(expected); + const bufferArr = [buffer, buffer]; + + const done = common.mustSucceed((written, buffers) => { + assert.deepStrictEqual(bufferArr, buffers); + + const expectedLength = bufferArr.length * buffer.byteLength; + assert.deepStrictEqual(written, expectedLength); + fs.closeSync(fd); + + assert(Buffer.concat(bufferArr).equals(fs.readFileSync(filename))); + }); + + fs.writev(fd, bufferArr, done); +} + + +// fs.writev with empty array of buffers +{ + const filename = getFileName(3); + const fd = fs.openSync(filename, 'w'); + const bufferArr = []; + let afterSyncCall = false; + + const done = common.mustSucceed((written, buffers) => { + assert.strictEqual(buffers.length, 0); + assert.strictEqual(written, 0); + assert(afterSyncCall); + fs.closeSync(fd); + }); + + fs.writev(fd, bufferArr, done); + afterSyncCall = true; +} + +/** + * Testing with wrong input types + */ +{ + const filename = getFileName(4); + const fd = fs.openSync(filename, 'w'); + + [false, 'test', {}, [{}], ['sdf'], null, undefined].forEach((i) => { + assert.throws( + () => fs.writev(fd, i, null, common.mustNotCall()), { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError' + } + ); + }); + + fs.closeSync(fd); +} + +// fs.writev with wrong fd types +[false, 'test', {}, [{}], null, undefined].forEach((i) => { + assert.throws( + () => fs.writev(i, common.mustNotCall()), + { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError' + } + ); +}); diff --git a/tests/node_compat/test/parallel/test-global-domexception.js b/tests/node_compat/test/parallel/test-global-domexception.js new file mode 100644 index 00000000000000..1b88a08916b403 --- /dev/null +++ b/tests/node_compat/test/parallel/test-global-domexception.js @@ -0,0 +1,18 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +require('../common'); + +const assert = require('assert'); + +assert.strictEqual(typeof DOMException, 'function'); + +assert.throws(() => { + atob('我要抛错!'); +}, DOMException); diff --git a/tests/node_compat/test/parallel/test-global-encoder.js b/tests/node_compat/test/parallel/test-global-encoder.js new file mode 100644 index 00000000000000..4a2db0d2f36dd7 --- /dev/null +++ b/tests/node_compat/test/parallel/test-global-encoder.js @@ -0,0 +1,15 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +require('../common'); +const { strictEqual } = require('assert'); +const util = require('util'); + +strictEqual(TextDecoder, util.TextDecoder); +strictEqual(TextEncoder, util.TextEncoder); diff --git a/tests/node_compat/test/parallel/test-global-webcrypto.js b/tests/node_compat/test/parallel/test-global-webcrypto.js new file mode 100644 index 00000000000000..b2074cf8bf718f --- /dev/null +++ b/tests/node_compat/test/parallel/test-global-webcrypto.js @@ -0,0 +1,20 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const assert = require('assert'); +const crypto = require('crypto'); + +/* eslint-disable no-restricted-syntax */ +assert.strictEqual(globalThis.crypto, crypto.webcrypto); +assert.strictEqual(Crypto, crypto.webcrypto.constructor); +assert.strictEqual(SubtleCrypto, crypto.webcrypto.subtle.constructor); diff --git a/tests/node_compat/test/parallel/test-global-webstreams.js b/tests/node_compat/test/parallel/test-global-webstreams.js new file mode 100644 index 00000000000000..ae61fbe9fbf3a1 --- /dev/null +++ b/tests/node_compat/test/parallel/test-global-webstreams.js @@ -0,0 +1,31 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +require('../common'); + +const assert = require('assert'); +const webstreams = require('stream/web'); + +assert.strictEqual(ReadableStream, webstreams.ReadableStream); +assert.strictEqual(ReadableStreamDefaultReader, webstreams.ReadableStreamDefaultReader); +assert.strictEqual(ReadableStreamBYOBReader, webstreams.ReadableStreamBYOBReader); +assert.strictEqual(ReadableStreamBYOBRequest, webstreams.ReadableStreamBYOBRequest); +assert.strictEqual(ReadableByteStreamController, webstreams.ReadableByteStreamController); +assert.strictEqual(ReadableStreamDefaultController, webstreams.ReadableStreamDefaultController); +assert.strictEqual(TransformStream, webstreams.TransformStream); +assert.strictEqual(TransformStreamDefaultController, webstreams.TransformStreamDefaultController); +assert.strictEqual(WritableStream, webstreams.WritableStream); +assert.strictEqual(WritableStreamDefaultWriter, webstreams.WritableStreamDefaultWriter); +assert.strictEqual(WritableStreamDefaultController, webstreams.WritableStreamDefaultController); +assert.strictEqual(ByteLengthQueuingStrategy, webstreams.ByteLengthQueuingStrategy); +assert.strictEqual(CountQueuingStrategy, webstreams.CountQueuingStrategy); +assert.strictEqual(TextEncoderStream, webstreams.TextEncoderStream); +assert.strictEqual(TextDecoderStream, webstreams.TextDecoderStream); +assert.strictEqual(CompressionStream, webstreams.CompressionStream); +assert.strictEqual(DecompressionStream, webstreams.DecompressionStream); diff --git a/tests/node_compat/test/parallel/test-handle-wrap-close-abort.js b/tests/node_compat/test/parallel/test-handle-wrap-close-abort.js index 92ad796a7524be..c4cd5a42bc127d 100644 --- a/tests/node_compat/test/parallel/test-handle-wrap-close-abort.js +++ b/tests/node_compat/test/parallel/test-handle-wrap-close-abort.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-http-abort-before-end.js b/tests/node_compat/test/parallel/test-http-abort-before-end.js new file mode 100644 index 00000000000000..f144dff65d37a4 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-abort-before-end.js @@ -0,0 +1,50 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const http = require('http'); + +const server = http.createServer(common.mustNotCall()); + +server.listen(0, common.mustCall(() => { + const req = http.request({ + method: 'GET', + host: '127.0.0.1', + port: server.address().port + }); + + req.on('abort', common.mustCall(() => { + server.close(); + })); + + req.on('error', common.mustNotCall()); + + req.abort(); + req.end(); +})); diff --git a/tests/node_compat/test/parallel/test-http-addrequest-localaddress.js b/tests/node_compat/test/parallel/test-http-addrequest-localaddress.js new file mode 100644 index 00000000000000..7f4cbc3f3120ce --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-addrequest-localaddress.js @@ -0,0 +1,44 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); + +// This test ensures that `addRequest`'s Legacy API accepts `localAddress` +// correctly instead of accepting `path`. +// https://github.com/nodejs/node/issues/5051 + +const assert = require('assert'); +const agent = require('http').globalAgent; + +// Small stub just so we can call addRequest directly +const req = { + getHeader: () => {} +}; + +agent.maxSockets = 0; + +// `localAddress` is used when naming requests / sockets while using the Legacy +// API. Port 8080 is hardcoded since this does not create a network connection. +agent.addRequest(req, 'localhost', 8080, '127.0.0.1'); +assert.strictEqual(Object.keys(agent.requests).length, 1); +assert.strictEqual( + Object.keys(agent.requests)[0], + 'localhost:8080:127.0.0.1'); + +// `path` is *not* used when naming requests / sockets. +// Port 8080 is hardcoded since this does not create a network connection +agent.addRequest(req, { + host: 'localhost', + port: 8080, + localAddress: '127.0.0.1', + path: '/foo' +}); +assert.strictEqual(Object.keys(agent.requests).length, 1); +assert.strictEqual( + Object.keys(agent.requests)[0], + 'localhost:8080:127.0.0.1'); diff --git a/tests/node_compat/test/parallel/test-http-agent-getname.js b/tests/node_compat/test/parallel/test-http-agent-getname.js index 530cc1378d97e3..2a41d3813dd561 100644 --- a/tests/node_compat/test/parallel/test-http-agent-getname.js +++ b/tests/node_compat/test/parallel/test-http-agent-getname.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-http-agent-maxtotalsockets.js b/tests/node_compat/test/parallel/test-http-agent-maxtotalsockets.js new file mode 100644 index 00000000000000..ee7e2bb5d58069 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-agent-maxtotalsockets.js @@ -0,0 +1,118 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); +const Countdown = require('../common/countdown'); + +assert.throws(() => new http.Agent({ + maxTotalSockets: 'test', +}), { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError', + message: 'The "maxTotalSockets" argument must be of type number. ' + + "Received type string ('test')", +}); + +[-1, 0, NaN].forEach((item) => { + assert.throws(() => new http.Agent({ + maxTotalSockets: item, + }), { + code: 'ERR_OUT_OF_RANGE', + name: 'RangeError', + }); +}); + +assert.ok(new http.Agent({ + maxTotalSockets: Infinity, +})); + +function start(param = {}) { + const { maxTotalSockets, maxSockets } = param; + + const agent = new http.Agent({ + keepAlive: true, + keepAliveMsecs: 1000, + maxTotalSockets, + maxSockets, + maxFreeSockets: 3 + }); + + const server = http.createServer(common.mustCall((req, res) => { + res.end('hello world'); + }, 6)); + const server2 = http.createServer(common.mustCall((req, res) => { + res.end('hello world'); + }, 6)); + + server.keepAliveTimeout = 0; + server2.keepAliveTimeout = 0; + + const countdown = new Countdown(12, () => { + assert.strictEqual(getRequestCount(), 0); + agent.destroy(); + server.close(); + server2.close(); + }); + + function handler(s) { + for (let i = 0; i < 6; i++) { + http.get({ + host: 'localhost', + port: s.address().port, + agent, + path: `/${i}`, + }, common.mustCall((res) => { + assert.strictEqual(res.statusCode, 200); + res.resume(); + res.on('end', common.mustCall(() => { + for (const key of Object.keys(agent.sockets)) { + assert(agent.sockets[key].length <= maxSockets); + } + assert(getTotalSocketsCount() <= maxTotalSockets); + countdown.dec(); + })); + })); + } + } + + function getTotalSocketsCount() { + let num = 0; + for (const key of Object.keys(agent.sockets)) { + num += agent.sockets[key].length; + } + return num; + } + + function getRequestCount() { + let num = 0; + for (const key of Object.keys(agent.requests)) { + num += agent.requests[key].length; + } + return num; + } + + server.listen(0, common.mustCall(() => handler(server))); + server2.listen(0, common.mustCall(() => handler(server2))); +} + +// If maxTotalSockets is larger than maxSockets, +// then the origin check will be skipped +// when the socket is removed. +[{ + maxTotalSockets: 2, + maxSockets: 3, +}, { + maxTotalSockets: 3, + maxSockets: 2, +}, { + maxTotalSockets: 2, + maxSockets: 2, +}].forEach(start); diff --git a/tests/node_compat/test/parallel/test-http-agent-no-protocol.js b/tests/node_compat/test/parallel/test-http-agent-no-protocol.js new file mode 100644 index 00000000000000..58a43792a9adb2 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-agent-no-protocol.js @@ -0,0 +1,48 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const http = require('http'); +const url = require('url'); + +const server = http.createServer(common.mustCall((req, res) => { + res.end(); +})).listen(0, '127.0.0.1', common.mustCall(() => { + const opts = url.parse(`http://127.0.0.1:${server.address().port}/`); + + // Remove the `protocol` field… the `http` module should fall back + // to "http:", as defined by the global, default `http.Agent` instance. + opts.agent = new http.Agent(); + opts.agent.protocol = null; + + http.get(opts, common.mustCall((res) => { + res.resume(); + server.close(); + })); +})); diff --git a/tests/node_compat/test/parallel/test-http-agent-null.js b/tests/node_compat/test/parallel/test-http-agent-null.js new file mode 100644 index 00000000000000..7619be7ecdeeb1 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-agent-null.js @@ -0,0 +1,44 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const http = require('http'); + +const server = http.createServer(common.mustCall((req, res) => { + res.end(); +})).listen(0, common.mustCall(() => { + const options = { + agent: null, + port: server.address().port + }; + http.get(options, common.mustCall((res) => { + res.resume(); + server.close(); + })); +})); diff --git a/tests/node_compat/test/parallel/test-http-allow-req-after-204-res.js b/tests/node_compat/test/parallel/test-http-allow-req-after-204-res.js new file mode 100644 index 00000000000000..04d2560a44734f --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-allow-req-after-204-res.js @@ -0,0 +1,68 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const http = require('http'); +const assert = require('assert'); +const Countdown = require('../common/countdown'); + +// first 204 or 304 works, subsequent anything fails +const codes = [204, 200]; + +const countdown = new Countdown(codes.length, () => server.close()); + +const server = http.createServer(common.mustCall((req, res) => { + const code = codes.shift(); + assert.strictEqual(typeof code, 'number'); + assert.ok(code > 0); + res.writeHead(code, {}); + res.end(); +}, codes.length)); + +function nextRequest() { + + const request = http.get({ + port: server.address().port, + path: '/' + }, common.mustCall((response) => { + response.on('end', common.mustCall(() => { + if (countdown.dec()) { + // throws error: + nextRequest(); + // TODO: investigate why this does not work fine even though it should. + // works just fine: + // process.nextTick(nextRequest); + } + })); + response.resume(); + })); + request.end(); +} + +server.listen(0, nextRequest); diff --git a/tests/node_compat/test/parallel/test-http-bind-twice.js b/tests/node_compat/test/parallel/test-http-bind-twice.js new file mode 100644 index 00000000000000..6ec3d2070867b1 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-bind-twice.js @@ -0,0 +1,43 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); + +const server1 = http.createServer(common.mustNotCall()); +server1.listen(0, '127.0.0.1', common.mustCall(function() { + const server2 = http.createServer(common.mustNotCall()); + server2.listen(this.address().port, '127.0.0.1', common.mustNotCall()); + + server2.on('error', common.mustCall(function(e) { + assert.strictEqual(e.code, 'EADDRINUSE'); + server1.close(); + })); +})); diff --git a/tests/node_compat/test/parallel/test-http-buffer-sanity.js b/tests/node_compat/test/parallel/test-http-buffer-sanity.js new file mode 100644 index 00000000000000..b9b5832be06af5 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-buffer-sanity.js @@ -0,0 +1,78 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); + +const bufferSize = 5 * 1024 * 1024; +let measuredSize = 0; + +const buffer = Buffer.allocUnsafe(bufferSize); +for (let i = 0; i < buffer.length; i++) { + buffer[i] = i % 256; +} + +const server = http.Server(function(req, res) { + server.close(); + + let i = 0; + + req.on('data', (d) => { + measuredSize += d.length; + for (let j = 0; j < d.length; j++) { + assert.strictEqual(d[j], buffer[i]); + i++; + } + }); + + req.on('end', common.mustCall(() => { + assert.strictEqual(measuredSize, bufferSize); + res.writeHead(200); + res.write('thanks'); + res.end(); + })); +}); + +server.listen(0, common.mustCall(() => { + const req = http.request({ + port: server.address().port, + method: 'POST', + path: '/', + headers: { 'content-length': buffer.length } + }, common.mustCall((res) => { + res.setEncoding('utf8'); + let data = ''; + res.on('data', (chunk) => data += chunk); + res.on('end', common.mustCall(() => { + assert.strictEqual(data, 'thanks'); + })); + })); + req.end(buffer); +})); diff --git a/tests/node_compat/test/parallel/test-http-chunked-smuggling.js b/tests/node_compat/test/parallel/test-http-chunked-smuggling.js new file mode 100644 index 00000000000000..ef85d16798e111 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-chunked-smuggling.js @@ -0,0 +1,50 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const http = require('http'); +const net = require('net'); +const assert = require('assert'); + +// Verify that invalid chunk extensions cannot be used to perform HTTP request +// smuggling attacks. + +const server = http.createServer(common.mustCall((request, response) => { + assert.notStrictEqual(request.url, '/admin'); + response.end('hello world'); +}), 1); + +server.listen(0, common.mustCall(start)); + +function start() { + const sock = net.connect(server.address().port); + + sock.write('' + + 'GET / HTTP/1.1\r\n' + + 'Host: localhost:8080\r\n' + + 'Transfer-Encoding: chunked\r\n' + + '\r\n' + + '2;\n' + + 'xx\r\n' + + '4c\r\n' + + '0\r\n' + + '\r\n' + + 'GET /admin HTTP/1.1\r\n' + + 'Host: localhost:8080\r\n' + + 'Transfer-Encoding: chunked\r\n' + + '\r\n' + + '0\r\n' + + '\r\n' + ); + + sock.resume(); + sock.on('end', common.mustCall(function() { + server.close(); + })); +} diff --git a/tests/node_compat/test/parallel/test-http-chunked.js b/tests/node_compat/test/parallel/test-http-chunked.js new file mode 100644 index 00000000000000..13a7c62b950402 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-chunked.js @@ -0,0 +1,63 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); + +const UTF8_STRING = '南越国是前203年至前111年存在于岭南地区的一个国家,' + + '国都位于番禺,疆域包括今天中国的广东、广西两省区的大部份地区,福建省、湖南、' + + '贵州、云南的一小部份地区和越南的北部。南越国是秦朝灭亡后,' + + '由南海郡尉赵佗于前203年起兵兼并桂林郡和象郡后建立。前196年和前179年,' + + '南越国曾先后两次名义上臣属于西汉,成为西汉的“外臣”。前112年,' + + '南越国末代君主赵建德与西汉发生战争,被汉武帝于前111年所灭。' + + '南越国共存在93年,历经五代君主。南越国是岭南地区的第一个有记载的政权国家,' + + '采用封建制和郡县制并存的制度,它的建立保证了秦末乱世岭南地区社会秩序的稳定,' + + '有效的改善了岭南地区落后的政治、经济现状。'; + +const server = http.createServer(common.mustCall((req, res) => { + res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf8' }); + res.end(UTF8_STRING, 'utf8'); +})); +server.listen(0, common.mustCall(() => { + let data = ''; + http.get({ + path: '/', + host: 'localhost', + port: server.address().port + }, common.mustCall((x) => { + x.setEncoding('utf8'); + x.on('data', (c) => data += c); + x.on('end', common.mustCall(() => { + assert.strictEqual(typeof data, 'string'); + assert.strictEqual(UTF8_STRING, data); + server.close(); + })); + })).end(); +})); diff --git a/tests/node_compat/test/parallel/test-http-client-abort2.js b/tests/node_compat/test/parallel/test-http-client-abort2.js new file mode 100644 index 00000000000000..f179e4951403a5 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-client-abort2.js @@ -0,0 +1,45 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const http = require('http'); + +const server = http.createServer(common.mustCall((req, res) => { + res.end('Hello'); +})); + +server.listen(0, common.mustCall(() => { + const options = { port: server.address().port }; + const req = http.get(options, common.mustCall((res) => { + res.on('data', (data) => { + req.abort(); + server.close(); + }); + })); +})); diff --git a/tests/node_compat/test/parallel/test-http-client-check-http-token.js b/tests/node_compat/test/parallel/test-http-client-check-http-token.js new file mode 100644 index 00000000000000..2457523b214b7f --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-client-check-http-token.js @@ -0,0 +1,41 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); +const Countdown = require('../common/countdown'); + +const expectedSuccesses = [undefined, null, 'GET', 'post']; +const expectedFails = [-1, 1, 0, {}, true, false, [], Symbol()]; + +const countdown = + new Countdown(expectedSuccesses.length, + common.mustCall(() => server.close())); + +const server = http.createServer(common.mustCall((req, res) => { + res.end(); + countdown.dec(); +}, expectedSuccesses.length)); + +server.listen(0, common.mustCall(() => { + expectedFails.forEach((method) => { + assert.throws(() => { + http.request({ method, path: '/' }, common.mustNotCall()); + }, { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError', + message: 'The "options.method" property must be of type string.' + + common.invalidArgTypeHelper(method) + }); + }); + + expectedSuccesses.forEach((method) => { + http.request({ method, port: server.address().port }).end(); + }); +})); diff --git a/tests/node_compat/test/parallel/test-http-client-close-with-default-agent.js b/tests/node_compat/test/parallel/test-http-client-close-with-default-agent.js new file mode 100644 index 00000000000000..67c2ae61560d23 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-client-close-with-default-agent.js @@ -0,0 +1,30 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); + +const server = http.createServer(function(req, res) { + res.writeHead(200); + res.end(); +}); + +server.listen(0, common.mustCall(() => { + const req = http.get({ port: server.address().port }, (res) => { + assert.strictEqual(res.statusCode, 200); + res.resume(); + server.close(); + }); + + req.end(); +})); + +// This timer should never go off as the server will close the socket +setTimeout(common.mustNotCall(), common.platformTimeout(1000)).unref(); diff --git a/tests/node_compat/test/parallel/test-http-client-default-headers-exist.js b/tests/node_compat/test/parallel/test-http-client-default-headers-exist.js new file mode 100644 index 00000000000000..883154db3dfbaa --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-client-default-headers-exist.js @@ -0,0 +1,77 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); + +const { once } = require('events'); + +const expectedHeaders = { + 'DELETE': ['host', 'connection'], + 'GET': ['host', 'connection'], + 'HEAD': ['host', 'connection'], + 'OPTIONS': ['host', 'connection'], + 'POST': ['host', 'connection', 'content-length'], + 'PUT': ['host', 'connection', 'content-length'], + 'TRACE': ['host', 'connection'] +}; + +const expectedMethods = Object.keys(expectedHeaders); + +const server = http.createServer(common.mustCall((req, res) => { + res.end(); + + assert(Object.hasOwn(expectedHeaders, req.method), + `${req.method} was an unexpected method`); + + const requestHeaders = Object.keys(req.headers); + requestHeaders.forEach((header) => { + assert.ok( + expectedHeaders[req.method].includes(header.toLowerCase()), + `${header} should not exist for method ${req.method}` + ); + }); + + assert.strictEqual( + requestHeaders.length, + expectedHeaders[req.method].length, + `some headers were missing for method: ${req.method}` + ); +}, expectedMethods.length)); + +server.listen(0, common.mustCall(() => { + Promise.all(expectedMethods.map(async (method) => { + const request = http.request({ + method: method, + port: server.address().port + }).end(); + return once(request, 'response'); + })).then(common.mustCall(() => { server.close(); })); +})); diff --git a/tests/node_compat/test/parallel/test-http-client-defaults.js b/tests/node_compat/test/parallel/test-http-client-defaults.js new file mode 100644 index 00000000000000..815dd60c0dd77e --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-client-defaults.js @@ -0,0 +1,30 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +require('../common'); +const assert = require('assert'); +const ClientRequest = require('http').ClientRequest; + +{ + const req = new ClientRequest({ createConnection: () => {} }); + assert.strictEqual(req.path, '/'); + assert.strictEqual(req.method, 'GET'); +} + +{ + const req = new ClientRequest({ method: '', createConnection: () => {} }); + assert.strictEqual(req.path, '/'); + assert.strictEqual(req.method, 'GET'); +} + +{ + const req = new ClientRequest({ path: '', createConnection: () => {} }); + assert.strictEqual(req.path, '/'); + assert.strictEqual(req.method, 'GET'); +} diff --git a/tests/node_compat/test/parallel/test-http-client-encoding.js b/tests/node_compat/test/parallel/test-http-client-encoding.js new file mode 100644 index 00000000000000..3003bdf6e023a0 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-client-encoding.js @@ -0,0 +1,46 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); + +const server = http.createServer((req, res) => { + res.end('ok'); + server.close(); +}).listen(0, common.mustCall(() => { + http.request({ + port: server.address().port, + encoding: 'utf8' + }, common.mustCall((res) => { + let data = ''; + res.on('data', (chunk) => data += chunk); + res.on('end', common.mustCall(() => assert.strictEqual(data, 'ok'))); + })).end(); +})); diff --git a/tests/node_compat/test/parallel/test-http-client-get-url.js b/tests/node_compat/test/parallel/test-http-client-get-url.js index 2aeb0e9024b73a..073bcbe1dc758c 100644 --- a/tests/node_compat/test/parallel/test-http-client-get-url.js +++ b/tests/node_compat/test/parallel/test-http-client-get-url.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-http-client-headers-array.js b/tests/node_compat/test/parallel/test-http-client-headers-array.js new file mode 100644 index 00000000000000..9558d22f6a8adc --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-client-headers-array.js @@ -0,0 +1,77 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +require('../common'); + +const assert = require('assert'); +const http = require('http'); + +function execute(options) { + http.createServer(function(req, res) { + const expectHeaders = { + 'x-foo': 'boom', + 'cookie': 'a=1; b=2; c=3', + 'connection': 'keep-alive', + 'host': 'example.com', + }; + + // no Host header when you set headers an array + if (!Array.isArray(options.headers)) { + expectHeaders.host = `localhost:${this.address().port}`; + } + + // no Authorization header when you set headers an array + if (options.auth && !Array.isArray(options.headers)) { + expectHeaders.authorization = + `Basic ${Buffer.from(options.auth).toString('base64')}`; + } + + this.close(); + + assert.deepStrictEqual(req.headers, expectHeaders); + + res.writeHead(200, { 'Connection': 'close' }); + res.end(); + }).listen(0, function() { + options = Object.assign(options, { + port: this.address().port, + path: '/' + }); + const req = http.request(options); + req.end(); + }); +} + +// Should be the same except for implicit Host header on the first two +execute({ headers: { 'x-foo': 'boom', 'cookie': 'a=1; b=2; c=3' } }); +execute({ headers: { 'x-foo': 'boom', 'cookie': [ 'a=1', 'b=2', 'c=3' ] } }); +execute({ headers: [ + [ 'x-foo', 'boom' ], + [ 'cookie', 'a=1; b=2; c=3' ], + [ 'Host', 'example.com' ], +] }); +execute({ headers: [ + [ 'x-foo', 'boom' ], + [ 'cookie', [ 'a=1', 'b=2', 'c=3' ]], + [ 'Host', 'example.com' ], +] }); +execute({ headers: [ + [ 'x-foo', 'boom' ], [ 'cookie', 'a=1' ], + [ 'cookie', 'b=2' ], [ 'cookie', 'c=3' ], + [ 'Host', 'example.com'], +] }); + +// Authorization and Host header both missing from the second +execute({ auth: 'foo:bar', headers: + { 'x-foo': 'boom', 'cookie': 'a=1; b=2; c=3' } }); +execute({ auth: 'foo:bar', headers: [ + [ 'x-foo', 'boom' ], [ 'cookie', 'a=1' ], + [ 'cookie', 'b=2' ], [ 'cookie', 'c=3'], + [ 'Host', 'example.com'], +] }); diff --git a/tests/node_compat/test/parallel/test-http-client-invalid-path.js b/tests/node_compat/test/parallel/test-http-client-invalid-path.js new file mode 100644 index 00000000000000..096d7674989631 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-client-invalid-path.js @@ -0,0 +1,20 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); +const assert = require('assert'); +const http = require('http'); + +assert.throws(() => { + http.request({ + path: '/thisisinvalid\uffe2' + }).end(); +}, { + code: 'ERR_UNESCAPED_CHARACTERS', + name: 'TypeError' +}); diff --git a/tests/node_compat/test/parallel/test-http-client-keep-alive-hint.js b/tests/node_compat/test/parallel/test-http-client-keep-alive-hint.js new file mode 100644 index 00000000000000..91141329e086c4 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-client-keep-alive-hint.js @@ -0,0 +1,34 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); + +const server = http.createServer( + { keepAliveTimeout: common.platformTimeout(60000) }, + function(req, res) { + req.resume(); + res.writeHead(200, { 'Connection': 'keep-alive', 'Keep-Alive': 'timeout=1' }); + res.end('FOO'); + } +); + +server.listen(0, common.mustCall(() => { + http.get({ port: server.address().port }, (res) => { + assert.strictEqual(res.statusCode, 200); + + res.resume(); + server.close(); + }); +})); + + +// This timer should never go off as the agent will parse the hint and terminate earlier +setTimeout(common.mustNotCall(), common.platformTimeout(3000)).unref(); diff --git a/tests/node_compat/test/parallel/test-http-client-race-2.js b/tests/node_compat/test/parallel/test-http-client-race-2.js new file mode 100644 index 00000000000000..09e77070fddfe4 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-client-race-2.js @@ -0,0 +1,119 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); +const http = require('http'); +const url = require('url'); + +// +// Slight variation on test-http-client-race to test for another race +// condition involving the parsers FreeList used internally by http.Client. +// + +const body1_s = '1111111111111111'; +const body2_s = '22222'; +const body3_s = '3333333333333333333'; + +const server = http.createServer(function(req, res) { + const pathname = url.parse(req.url).pathname; + + let body; + switch (pathname) { + case '/1': body = body1_s; break; + case '/2': body = body2_s; break; + default: body = body3_s; + } + + res.writeHead(200, { + 'Content-Type': 'text/plain', + 'Content-Length': body.length + }); + res.end(body); +}); +server.listen(0); + +let body1 = ''; +let body2 = ''; +let body3 = ''; + +server.on('listening', function() { + // + // Client #1 is assigned Parser #1 + // + const req1 = http.get({ port: this.address().port, path: '/1' }); + req1.on('response', function(res1) { + res1.setEncoding('utf8'); + + res1.on('data', function(chunk) { + body1 += chunk; + }); + + res1.on('end', function() { + // + // Delay execution a little to allow the 'close' event to be processed + // (required to trigger this bug!) + // + setTimeout(function() { + // + // The bug would introduce itself here: Client #2 would be allocated the + // parser that previously belonged to Client #1. But we're not finished + // with Client #1 yet! + // + // At this point, the bug would manifest itself and crash because the + // internal state of the parser was no longer valid for use by Client #1 + // + const req2 = http.get({ port: server.address().port, path: '/2' }); + req2.on('response', function(res2) { + res2.setEncoding('utf8'); + res2.on('data', function(chunk) { body2 += chunk; }); + res2.on('end', function() { + + // + // Just to be really sure we've covered all our bases, execute a + // request using client2. + // + const req3 = http.get({ port: server.address().port, path: '/3' }); + req3.on('response', function(res3) { + res3.setEncoding('utf8'); + res3.on('data', function(chunk) { body3 += chunk; }); + res3.on('end', function() { server.close(); }); + }); + }); + }); + }, 500); + }); + }); +}); + +process.on('exit', function() { + assert.strictEqual(body1_s, body1); + assert.strictEqual(body2_s, body2); + assert.strictEqual(body3_s, body3); +}); diff --git a/tests/node_compat/test/parallel/test-http-client-race.js b/tests/node_compat/test/parallel/test-http-client-race.js new file mode 100644 index 00000000000000..0dff9ce830e5ba --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-client-race.js @@ -0,0 +1,76 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); +const http = require('http'); +const url = require('url'); + +const body1_s = '1111111111111111'; +const body2_s = '22222'; + +const server = http.createServer(function(req, res) { + const body = url.parse(req.url).pathname === '/1' ? body1_s : body2_s; + res.writeHead(200, { + 'Content-Type': 'text/plain', + 'Content-Length': body.length + }); + res.end(body); +}); +server.listen(0); + +let body1 = ''; +let body2 = ''; + +server.on('listening', function() { + const req1 = http.request({ port: this.address().port, path: '/1' }); + req1.end(); + req1.on('response', function(res1) { + res1.setEncoding('utf8'); + + res1.on('data', function(chunk) { + body1 += chunk; + }); + + res1.on('end', function() { + const req2 = http.request({ port: server.address().port, path: '/2' }); + req2.end(); + req2.on('response', function(res2) { + res2.setEncoding('utf8'); + res2.on('data', function(chunk) { body2 += chunk; }); + res2.on('end', function() { server.close(); }); + }); + }); + }); +}); + +process.on('exit', function() { + assert.strictEqual(body1_s, body1); + assert.strictEqual(body2_s, body2); +}); diff --git a/tests/node_compat/test/parallel/test-http-client-read-in-error.js b/tests/node_compat/test/parallel/test-http-client-read-in-error.js index 7f28c076814bae..0f54b721e42534 100644 --- a/tests/node_compat/test/parallel/test-http-client-read-in-error.js +++ b/tests/node_compat/test/parallel/test-http-client-read-in-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-http-client-reject-unexpected-agent.js b/tests/node_compat/test/parallel/test-http-client-reject-unexpected-agent.js new file mode 100644 index 00000000000000..4bfd4210a92448 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-client-reject-unexpected-agent.js @@ -0,0 +1,76 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); + +const baseOptions = { + method: 'GET', + port: undefined, + host: common.localhostIPv4, +}; + +const failingAgentOptions = [ + true, + 'agent', + {}, + 1, + () => null, + Symbol(), +]; + +const acceptableAgentOptions = [ + false, + undefined, + null, + new http.Agent(), +]; + +const server = http.createServer((req, res) => { + res.end('hello'); +}); + +let numberOfResponses = 0; + +function createRequest(agent) { + const options = Object.assign(baseOptions, { agent }); + const request = http.request(options); + request.end(); + request.on('response', common.mustCall(() => { + numberOfResponses++; + if (numberOfResponses === acceptableAgentOptions.length) { + server.close(); + } + })); +} + +server.listen(0, baseOptions.host, common.mustCall(function() { + baseOptions.port = this.address().port; + + failingAgentOptions.forEach((agent) => { + assert.throws( + () => createRequest(agent), + { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError', + message: 'The "options.agent" property must be one of Agent-like ' + + 'Object, undefined, or false.' + + common.invalidArgTypeHelper(agent) + } + ); + }); + + acceptableAgentOptions.forEach((agent) => { + createRequest(agent); + }); +})); + +process.on('exit', () => { + assert.strictEqual(numberOfResponses, acceptableAgentOptions.length); +}); diff --git a/tests/node_compat/test/parallel/test-http-client-timeout-with-data.js b/tests/node_compat/test/parallel/test-http-client-timeout-with-data.js new file mode 100644 index 00000000000000..9e0f521b2e2d4c --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-client-timeout-with-data.js @@ -0,0 +1,70 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); + +let nchunks = 0; + +const options = { + method: 'GET', + port: undefined, + host: '127.0.0.1', + path: '/' +}; + +const server = http.createServer(function(req, res) { + res.writeHead(200, { 'Content-Length': '2' }); + res.write('*'); + server.once('timeout', common.mustCall(function() { res.end('*'); })); +}); + +server.listen(0, options.host, function() { + options.port = this.address().port; + const req = http.request(options, onresponse); + req.end(); + + function onresponse(res) { + req.setTimeout(50, common.mustCall(function() { + assert.strictEqual(nchunks, 1); // Should have received the first chunk + server.emit('timeout'); + })); + + res.on('data', common.mustCall(function(data) { + assert.strictEqual(String(data), '*'); + nchunks++; + }, 2)); + + res.on('end', common.mustCall(function() { + assert.strictEqual(nchunks, 2); + server.close(); + })); + } +}); diff --git a/tests/node_compat/test/parallel/test-http-client-unescaped-path.js b/tests/node_compat/test/parallel/test-http-client-unescaped-path.js new file mode 100644 index 00000000000000..6ae8106390f1c5 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-client-unescaped-path.js @@ -0,0 +1,44 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); + +for (let i = 0; i <= 32; i += 1) { + const path = `bad${String.fromCharCode(i)}path`; + assert.throws( + () => http.get({ path }, common.mustNotCall()), + { + code: 'ERR_UNESCAPED_CHARACTERS', + name: 'TypeError', + message: 'Request path contains unescaped characters' + } + ); +} diff --git a/tests/node_compat/test/parallel/test-http-client-upload-buf.js b/tests/node_compat/test/parallel/test-http-client-upload-buf.js new file mode 100644 index 00000000000000..a8299363fc02c6 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-client-upload-buf.js @@ -0,0 +1,71 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); + +const N = 1024; + +const server = http.createServer(common.mustCall(function(req, res) { + assert.strictEqual(req.method, 'POST'); + let bytesReceived = 0; + + req.on('data', function(chunk) { + bytesReceived += chunk.length; + }); + + req.on('end', common.mustCall(function() { + assert.strictEqual(N, bytesReceived); + console.log('request complete from server'); + res.writeHead(200, { 'Content-Type': 'text/plain' }); + res.write('hello\n'); + res.end(); + })); +})); +server.listen(0); + +server.on('listening', common.mustCall(function() { + const req = http.request({ + port: this.address().port, + method: 'POST', + path: '/' + }, common.mustCall(function(res) { + res.setEncoding('utf8'); + res.on('data', function(chunk) { + console.log(chunk); + }); + res.on('end', common.mustCall(function() { + server.close(); + })); + })); + + req.write(Buffer.allocUnsafe(N)); + req.end(); +})); diff --git a/tests/node_compat/test/parallel/test-http-client-upload.js b/tests/node_compat/test/parallel/test-http-client-upload.js new file mode 100644 index 00000000000000..4501c1e5fe095f --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-client-upload.js @@ -0,0 +1,74 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); + +const server = http.createServer(common.mustCall(function(req, res) { + assert.strictEqual(req.method, 'POST'); + req.setEncoding('utf8'); + + let sent_body = ''; + + req.on('data', function(chunk) { + console.log(`server got: ${JSON.stringify(chunk)}`); + sent_body += chunk; + }); + + req.on('end', common.mustCall(function() { + assert.strictEqual(sent_body, '1\n2\n3\n'); + console.log('request complete from server'); + res.writeHead(200, { 'Content-Type': 'text/plain' }); + res.write('hello\n'); + res.end(); + })); +})); +server.listen(0); + +server.on('listening', common.mustCall(function() { + const req = http.request({ + port: this.address().port, + method: 'POST', + path: '/' + }, common.mustCall(function(res) { + res.setEncoding('utf8'); + res.on('data', function(chunk) { + console.log(chunk); + }); + res.on('end', common.mustCall(function() { + server.close(); + })); + })); + + req.write('1\n'); + req.write('2\n'); + req.write('3\n'); + req.end(); +})); diff --git a/tests/node_compat/test/parallel/test-http-common.js b/tests/node_compat/test/parallel/test-http-common.js new file mode 100644 index 00000000000000..ce900ea72b2c7c --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-common.js @@ -0,0 +1,40 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); +const assert = require('assert'); +const httpCommon = require('_http_common'); +const checkIsHttpToken = httpCommon._checkIsHttpToken; +const checkInvalidHeaderChar = httpCommon._checkInvalidHeaderChar; + +// checkIsHttpToken +assert(checkIsHttpToken('t')); +assert(checkIsHttpToken('tt')); +assert(checkIsHttpToken('ttt')); +assert(checkIsHttpToken('tttt')); +assert(checkIsHttpToken('ttttt')); + +assert.strictEqual(checkIsHttpToken(''), false); +assert.strictEqual(checkIsHttpToken(' '), false); +assert.strictEqual(checkIsHttpToken('あ'), false); +assert.strictEqual(checkIsHttpToken('あa'), false); +assert.strictEqual(checkIsHttpToken('aaaaあaaaa'), false); + +// checkInvalidHeaderChar +assert(checkInvalidHeaderChar('あ')); +assert(checkInvalidHeaderChar('aaaaあaaaa')); + +assert.strictEqual(checkInvalidHeaderChar(''), false); +assert.strictEqual(checkInvalidHeaderChar(1), false); +assert.strictEqual(checkInvalidHeaderChar(' '), false); +assert.strictEqual(checkInvalidHeaderChar(false), false); +assert.strictEqual(checkInvalidHeaderChar('t'), false); +assert.strictEqual(checkInvalidHeaderChar('tt'), false); +assert.strictEqual(checkInvalidHeaderChar('ttt'), false); +assert.strictEqual(checkInvalidHeaderChar('tttt'), false); +assert.strictEqual(checkInvalidHeaderChar('ttttt'), false); diff --git a/tests/node_compat/test/parallel/test-http-contentLength0.js b/tests/node_compat/test/parallel/test-http-contentLength0.js new file mode 100644 index 00000000000000..8a0dc19ff32ba4 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-contentLength0.js @@ -0,0 +1,51 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const http = require('http'); + +// Simple test of Node's HTTP Client choking on a response +// with a 'Content-Length: 0 ' response header. +// I.E. a space character after the 'Content-Length' throws an `error` event. + + +const s = http.createServer(function(req, res) { + res.writeHead(200, { 'Content-Length': '0 ' }); + res.end(); +}); +s.listen(0, function() { + + const request = http.request({ port: this.address().port }, (response) => { + console.log(`STATUS: ${response.statusCode}`); + s.close(); + response.resume(); + }); + + request.end(); +}); diff --git a/tests/node_compat/test/parallel/test-http-correct-hostname.js b/tests/node_compat/test/parallel/test-http-correct-hostname.js new file mode 100644 index 00000000000000..a38d57f03d9071 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-correct-hostname.js @@ -0,0 +1,35 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +/* eslint-disable node-core/crypto-check */ +// Flags: --expose-internals +'use strict'; + +const common = require('../common'); +const assert = require('assert'); + +const { kOutHeaders } = require('internal/http'); + +const http = require('http'); +const modules = { http }; + +if (common.hasCrypto) { + const https = require('https'); + modules.https = https; +} + +Object.keys(modules).forEach((module) => { + const doNotCall = common.mustNotCall( + `${module}.request should not connect to ${module}://example.com%60x.example.com` + ); + const req = modules[module].request(`${module}://example.com%60x.example.com`, doNotCall); + assert.deepStrictEqual(req[kOutHeaders].host, [ + 'Host', + 'example.com`x.example.com', + ]); + req.abort(); +}); diff --git a/tests/node_compat/test/parallel/test-http-date-header.js b/tests/node_compat/test/parallel/test-http-date-header.js new file mode 100644 index 00000000000000..4299a6848acfbe --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-date-header.js @@ -0,0 +1,62 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); +const http = require('http'); + +const testResBody = 'other stuff!\n'; + +const server = http.createServer((req, res) => { + assert.ok(!('date' in req.headers), + 'Request headers contained a Date.'); + res.writeHead(200, { + 'Content-Type': 'text/plain' + }); + res.end(testResBody); +}); +server.listen(0); + + +server.addListener('listening', () => { + const options = { + port: server.address().port, + path: '/', + method: 'GET' + }; + const req = http.request(options, (res) => { + assert.ok('date' in res.headers, + 'Response headers didn\'t contain a Date.'); + res.addListener('end', () => { + server.close(); + }); + res.resume(); + }); + req.end(); +}); diff --git a/tests/node_compat/test/parallel/test-http-decoded-auth.js b/tests/node_compat/test/parallel/test-http-decoded-auth.js new file mode 100644 index 00000000000000..a0d2eb953e68c6 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-decoded-auth.js @@ -0,0 +1,55 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); +const assert = require('assert'); +const http = require('http'); + +const testCases = [ + { + username: 'test@test"', + password: '123456^', + expected: 'dGVzdEB0ZXN0IjoxMjM0NTZe' + }, + { + username: 'test%40test', + password: '123456', + expected: 'dGVzdEB0ZXN0OjEyMzQ1Ng==' + }, + { + username: 'not%3Agood', + password: 'god', + expected: 'bm90Omdvb2Q6Z29k' + }, + { + username: 'not%22good', + password: 'g%5Eod', + expected: 'bm90Imdvb2Q6Z15vZA==' + }, + { + username: 'test1234::::', + password: 'mypass', + expected: 'dGVzdDEyMzQ6Ojo6Om15cGFzcw==' + }, +]; + +for (const testCase of testCases) { + const server = http.createServer(function(request, response) { + // The correct authorization header is be passed + assert.strictEqual(request.headers.authorization, `Basic ${testCase.expected}`); + response.writeHead(200, {}); + response.end('ok'); + server.close(); + }); + + server.listen(0, function() { + // make the request + const url = new URL(`http://${testCase.username}:${testCase.password}@localhost:${this.address().port}`); + http.request(url).end(); + }); +} diff --git a/tests/node_compat/test/parallel/test-http-default-encoding.js b/tests/node_compat/test/parallel/test-http-default-encoding.js new file mode 100644 index 00000000000000..a87831c6327d92 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-default-encoding.js @@ -0,0 +1,65 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); +const http = require('http'); + +const expected = 'This is a unicode text: سلام'; +let result = ''; + +const server = http.Server((req, res) => { + req.setEncoding('utf8'); + req.on('data', (chunk) => { + result += chunk; + }).on('end', () => { + res.writeHead(200); + res.end('hello world\n'); + server.close(); + }); + +}); + +server.listen(0, function() { + http.request({ + port: this.address().port, + path: '/', + method: 'POST' + }, (res) => { + console.log(res.statusCode); + res.resume(); + }).on('error', (e) => { + console.log(e.message); + process.exit(1); + }).end(expected); +}); + +process.on('exit', () => { + assert.strictEqual(result, expected); +}); diff --git a/tests/node_compat/test/parallel/test-http-end-throw-socket-handling.js b/tests/node_compat/test/parallel/test-http-end-throw-socket-handling.js new file mode 100644 index 00000000000000..2e963648e806ab --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-end-throw-socket-handling.js @@ -0,0 +1,60 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const Countdown = require('../common/countdown'); + +// Make sure that throwing in 'end' handler doesn't lock +// up the socket forever. +// +// This is NOT a good way to handle errors in general, but all +// the same, we should not be so brittle and easily broken. + +const http = require('http'); +const countdown = new Countdown(10, () => server.close()); + +const server = http.createServer((req, res) => { + countdown.dec(); + res.end('ok'); +}); + +server.listen(0, common.mustCall(() => { + for (let i = 0; i < 10; i++) { + const options = { port: server.address().port }; + const req = http.request(options, (res) => { + res.resume(); + res.on('end', common.mustCall(() => { + throw new Error('gleep glorp'); + })); + }); + req.end(); + } +})); + +process.on('uncaughtException', common.mustCall(10)); diff --git a/tests/node_compat/test/parallel/test-http-eof-on-connect.js b/tests/node_compat/test/parallel/test-http-eof-on-connect.js new file mode 100644 index 00000000000000..7a682a03c009d3 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-eof-on-connect.js @@ -0,0 +1,48 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +const common = require('../common'); +const net = require('net'); +const http = require('http'); + +// This is a regression test for https://github.com/joyent/node/issues/44 +// It is separate from test-http-malformed-request.js because it is only +// reproducible on the first packet on the first connection to a server. + +const server = http.createServer(common.mustNotCall()); +server.listen(0); + +server.on('listening', function() { + net.createConnection(this.address().port).on('connect', function() { + this.destroy(); + }).on('close', function() { + server.close(); + }); +}); diff --git a/tests/node_compat/test/parallel/test-http-extra-response.js b/tests/node_compat/test/parallel/test-http-extra-response.js new file mode 100644 index 00000000000000..5d2ba9d36f5521 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-extra-response.js @@ -0,0 +1,87 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); +const net = require('net'); + +// If an HTTP server is broken and sends data after the end of the response, +// node should ignore it and drop the connection. +// Demos this bug: https://github.com/joyent/node/issues/680 + +const body = 'hello world\r\n'; +const fullResponse = + 'HTTP/1.1 500 Internal Server Error\r\n' + + `Content-Length: ${body.length}\r\n` + + 'Content-Type: text/plain\r\n' + + 'Date: Fri + 18 Feb 2011 06:22:45 GMT\r\n' + + 'Host: 10.20.149.2\r\n' + + 'Access-Control-Allow-Credentials: true\r\n' + + 'Server: badly broken/0.1 (OS NAME)\r\n' + + '\r\n' + + body; + +const server = net.createServer(function(socket) { + let postBody = ''; + + socket.setEncoding('utf8'); + + socket.on('data', function(chunk) { + postBody += chunk; + + if (postBody.includes('\r\n')) { + socket.write(fullResponse); + socket.end(fullResponse); + } + }); + + socket.on('error', function(err) { + assert.strictEqual(err.code, 'ECONNRESET'); + }); +}); + + +server.listen(0, common.mustCall(function() { + http.get({ port: this.address().port }, common.mustCall(function(res) { + let buffer = ''; + console.log(`Got res code: ${res.statusCode}`); + + res.setEncoding('utf8'); + res.on('data', function(chunk) { + buffer += chunk; + }); + + res.on('end', common.mustCall(function() { + console.log(`Response ended, read ${buffer.length} bytes`); + assert.strictEqual(body, buffer); + server.close(); + })); + })); +})); diff --git a/tests/node_compat/test/parallel/test-http-flush-headers.js b/tests/node_compat/test/parallel/test-http-flush-headers.js new file mode 100644 index 00000000000000..5b5fe341990982 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-flush-headers.js @@ -0,0 +1,27 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); +const assert = require('assert'); +const http = require('http'); + +const server = http.createServer(); +server.on('request', function(req, res) { + assert.strictEqual(req.headers.foo, 'bar'); + res.end('ok'); + server.close(); +}); +server.listen(0, '127.0.0.1', function() { + const req = http.request({ + method: 'GET', + host: '127.0.0.1', + port: this.address().port, + }); + req.setHeader('foo', 'bar'); + req.flushHeaders(); +}); diff --git a/tests/node_compat/test/parallel/test-http-full-response.js b/tests/node_compat/test/parallel/test-http-full-response.js new file mode 100644 index 00000000000000..cef22c7c802754 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-full-response.js @@ -0,0 +1,88 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +// This test requires the program 'ab' +const http = require('http'); +const exec = require('child_process').exec; + +const bodyLength = 12345; + +const body = 'c'.repeat(bodyLength); + +const server = http.createServer(function(req, res) { + res.writeHead(200, { + 'Content-Length': bodyLength, + 'Content-Type': 'text/plain' + }); + res.end(body); +}); + +function runAb(opts, callback) { + const command = `ab ${opts} http://127.0.0.1:${server.address().port}/`; + exec(command, function(err, stdout, stderr) { + if (err) { + if (/ab|apr/i.test(stderr)) { + common.printSkipMessage(`problem spawning \`ab\`.\n${stderr}`); + process.reallyExit(0); + } + throw err; + } + + let m = /Document Length:\s*(\d+) bytes/i.exec(stdout); + const documentLength = parseInt(m[1]); + + m = /Complete requests:\s*(\d+)/i.exec(stdout); + const completeRequests = parseInt(m[1]); + + m = /HTML transferred:\s*(\d+) bytes/i.exec(stdout); + const htmlTransferred = parseInt(m[1]); + + assert.strictEqual(bodyLength, documentLength); + assert.strictEqual(completeRequests * documentLength, htmlTransferred); + + if (callback) callback(); + }); +} + +server.listen(0, common.mustCall(function() { + runAb('-c 1 -n 10', common.mustCall(function() { + console.log('-c 1 -n 10 okay'); + + runAb('-c 1 -n 100', common.mustCall(function() { + console.log('-c 1 -n 100 okay'); + + runAb('-c 1 -n 1000', common.mustCall(function() { + console.log('-c 1 -n 1000 okay'); + server.close(); + })); + })); + })); +})); diff --git a/tests/node_compat/test/parallel/test-http-head-request.js b/tests/node_compat/test/parallel/test-http-head-request.js new file mode 100644 index 00000000000000..fe3cc09ed16596 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-head-request.js @@ -0,0 +1,64 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const http = require('http'); + +const body = 'hello world\n'; + +function test(headers) { + const server = http.createServer(function(req, res) { + console.error('req: %s headers: %j', req.method, headers); + res.writeHead(200, headers); + res.end(); + server.close(); + }); + + server.listen(0, common.mustCall(function() { + const request = http.request({ + port: this.address().port, + method: 'HEAD', + path: '/' + }, common.mustCall(function(response) { + console.error('response start'); + response.on('end', common.mustCall(function() { + console.error('response end'); + })); + response.resume(); + })); + request.end(); + })); +} + +test({ + 'Transfer-Encoding': 'chunked' +}); +test({ + 'Content-Length': body.length +}); diff --git a/tests/node_compat/test/parallel/test-http-head-response-has-no-body-end-implicit-headers.js b/tests/node_compat/test/parallel/test-http-head-response-has-no-body-end-implicit-headers.js new file mode 100644 index 00000000000000..514fb4584b0f9a --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-head-response-has-no-body-end-implicit-headers.js @@ -0,0 +1,34 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const http = require('http'); + +// This test is to make sure that when the HTTP server +// responds to a HEAD request with data to res.end, +// it does not send any body but the response is sent +// anyway. + +const server = http.createServer(function(req, res) { + res.end('FAIL'); // broken: sends FAIL from hot path. +}); +server.listen(0); + +server.on('listening', common.mustCall(function() { + const req = http.request({ + port: this.address().port, + method: 'HEAD', + path: '/' + }, common.mustCall(function(res) { + res.on('end', common.mustCall(function() { + server.close(); + })); + res.resume(); + })); + req.end(); +})); diff --git a/tests/node_compat/test/parallel/test-http-head-response-has-no-body-end.js b/tests/node_compat/test/parallel/test-http-head-response-has-no-body-end.js new file mode 100644 index 00000000000000..9b831751a8146c --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-head-response-has-no-body-end.js @@ -0,0 +1,55 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const http = require('http'); + +// This test is to make sure that when the HTTP server +// responds to a HEAD request with data to res.end, +// it does not send any body. + +const server = http.createServer(function(req, res) { + res.writeHead(200); + res.end('FAIL'); // broken: sends FAIL from hot path. +}); +server.listen(0); + +server.on('listening', common.mustCall(function() { + const req = http.request({ + port: this.address().port, + method: 'HEAD', + path: '/' + }, common.mustCall(function(res) { + res.on('end', common.mustCall(function() { + server.close(); + })); + res.resume(); + })); + req.end(); +})); diff --git a/tests/node_compat/test/parallel/test-http-head-response-has-no-body.js b/tests/node_compat/test/parallel/test-http-head-response-has-no-body.js new file mode 100644 index 00000000000000..334c89193d161f --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-head-response-has-no-body.js @@ -0,0 +1,55 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const http = require('http'); + +// This test is to make sure that when the HTTP server +// responds to a HEAD request, it does not send any body. +// In this case it was sending '0\r\n\r\n' + +const server = http.createServer(function(req, res) { + res.writeHead(200); // broken: defaults to TE chunked + res.end(); +}); +server.listen(0); + +server.on('listening', common.mustCall(function() { + const req = http.request({ + port: this.address().port, + method: 'HEAD', + path: '/' + }, common.mustCall(function(res) { + res.on('end', common.mustCall(function() { + server.close(); + })); + res.resume(); + })); + req.end(); +})); diff --git a/tests/node_compat/test/parallel/test-http-head-throw-on-response-body-write.js b/tests/node_compat/test/parallel/test-http-head-throw-on-response-body-write.js new file mode 100644 index 00000000000000..237cc1d89125be --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-head-throw-on-response-body-write.js @@ -0,0 +1,109 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); + +{ + const server = http.createServer((req, res) => { + res.writeHead(200); + res.end('this is content'); + }); + server.listen(0); + + server.on('listening', common.mustCall(function() { + const req = http.request({ + port: this.address().port, + method: 'HEAD', + path: '/' + }, common.mustCall((res) => { + res.resume(); + res.on('end', common.mustCall(function() { + server.close(); + })); + })); + req.end(); + })); +} + +{ + const server = http.createServer({ + rejectNonStandardBodyWrites: true, + }, (req, res) => { + res.writeHead(204); + assert.throws(() => { + res.write('this is content'); + }, { + code: 'ERR_HTTP_BODY_NOT_ALLOWED', + name: 'Error', + message: 'Adding content for this request method or response status is not allowed.' + }); + res.end(); + }); + server.listen(0); + + server.on('listening', common.mustCall(function() { + const req = http.request({ + port: this.address().port, + method: 'GET', + path: '/' + }, common.mustCall((res) => { + res.resume(); + res.on('end', common.mustCall(function() { + server.close(); + })); + })); + req.end(); + })); +} + +{ + const server = http.createServer({ + rejectNonStandardBodyWrites: false, + }, (req, res) => { + res.writeHead(200); + res.end('this is content'); + }); + server.listen(0); + + server.on('listening', common.mustCall(function() { + const req = http.request({ + port: this.address().port, + method: 'HEAD', + path: '/' + }, common.mustCall((res) => { + res.resume(); + res.on('end', common.mustCall(function() { + server.close(); + })); + })); + req.end(); + })); +} diff --git a/tests/node_compat/test/parallel/test-http-header-obstext.js b/tests/node_compat/test/parallel/test-http-header-obstext.js new file mode 100644 index 00000000000000..acdcef81add8ca --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-header-obstext.js @@ -0,0 +1,28 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); + +// This test ensures that the http-parser can handle UTF-8 characters +// in the http header. + +const http = require('http'); +const assert = require('assert'); + +const server = http.createServer(common.mustCall((req, res) => { + res.end('ok'); +})); +server.listen(0, () => { + http.get({ + port: server.address().port, + headers: { 'Test': 'Düsseldorf' } + }, common.mustCall((res) => { + assert.strictEqual(res.statusCode, 200); + server.close(); + })); +}); diff --git a/tests/node_compat/test/parallel/test-http-header-owstext.js b/tests/node_compat/test/parallel/test-http-header-owstext.js new file mode 100644 index 00000000000000..488f14d026a311 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-header-owstext.js @@ -0,0 +1,56 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); + +// This test ensures that the http-parser strips leading and trailing OWS from +// header values. It sends the header values in chunks to force the parser to +// build the string up through multiple calls to on_header_value(). + +const assert = require('assert'); +const http = require('http'); +const net = require('net'); + +function check(hdr, snd, rcv) { + const server = http.createServer(common.mustCall((req, res) => { + assert.strictEqual(req.headers[hdr], rcv); + req.pipe(res); + })); + + server.listen(0, common.mustCall(function() { + const client = net.connect(this.address().port, start); + function start() { + client.write('GET / HTTP/1.1\r\n' + hdr + ':', drain); + } + + function drain() { + if (snd.length === 0) { + return client.write('\r\nConnection: close\r\n\r\n'); + } + client.write(snd.shift(), drain); + } + + const bufs = []; + client.on('data', function(chunk) { + bufs.push(chunk); + }); + client.on('end', common.mustCall(function() { + const head = Buffer.concat(bufs) + .toString('latin1') + .split('\r\n')[0]; + assert.strictEqual(head, 'HTTP/1.1 200 OK'); + server.close(); + })); + })); +} + +check('host', [' \t foo.com\t'], 'foo.com'); +check('host', [' \t foo\tcom\t'], 'foo\tcom'); +check('host', [' \t', ' ', ' foo.com\t', '\t '], 'foo.com'); +check('host', [' \t', ' \t'.repeat(100), '\t '], ''); +check('host', [' \t', ' - - - - ', '\t '], '- - - -'); diff --git a/tests/node_compat/test/parallel/test-http-header-read.js b/tests/node_compat/test/parallel/test-http-header-read.js new file mode 100644 index 00000000000000..cc57cc7a9e5612 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-header-read.js @@ -0,0 +1,59 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); +const http = require('http'); + +// Verify that ServerResponse.getHeader() works correctly even after +// the response header has been sent. Issue 752 on github. + +const s = http.createServer(function(req, res) { + const contentType = 'Content-Type'; + const plain = 'text/plain'; + res.setHeader(contentType, plain); + assert.ok(!res.headersSent); + res.writeHead(200); + assert.ok(res.headersSent); + res.end('hello world\n'); + // This checks that after the headers have been sent, getHeader works + // and does not throw an exception (Issue 752) + assert.strictEqual(plain, res.getHeader(contentType)); +}); + +s.listen(0, runTest); + +function runTest() { + http.get({ port: this.address().port }, function(response) { + response.on('end', function() { + s.close(); + }); + response.resume(); + }); +} diff --git a/tests/node_compat/test/parallel/test-http-header-validators.js b/tests/node_compat/test/parallel/test-http-header-validators.js index 40f1d8b1594774..9d896110d77c95 100644 --- a/tests/node_compat/test/parallel/test-http-header-validators.js +++ b/tests/node_compat/test/parallel/test-http-header-validators.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-http-hex-write.js b/tests/node_compat/test/parallel/test-http-hex-write.js new file mode 100644 index 00000000000000..d855676ced1420 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-hex-write.js @@ -0,0 +1,56 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); + +const http = require('http'); + +const expect = 'hex\nutf8\n'; + +http.createServer(function(q, s) { + s.setHeader('content-length', expect.length); + s.write('6865780a', 'hex'); + s.write('utf8\n'); + s.end(); + this.close(); +}).listen(0, common.mustCall(function() { + http.request({ port: this.address().port }) + .on('response', common.mustCall(function(res) { + let data = ''; + + res.setEncoding('ascii'); + res.on('data', function(c) { + data += c; + }); + res.on('end', common.mustCall(function() { + assert.strictEqual(data, expect); + })); + })).end(); +})); diff --git a/tests/node_compat/test/parallel/test-http-highwatermark.js b/tests/node_compat/test/parallel/test-http-highwatermark.js new file mode 100644 index 00000000000000..52d892f2469800 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-highwatermark.js @@ -0,0 +1,59 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); +const http = require('http'); + +// These test cases to check socketOnDrain where needPause becomes false. +// When send large response enough to exceed highWaterMark, it expect the socket +// to be paused and res.write would be failed. +// And it should be resumed when outgoingData falls below highWaterMark. + +let requestReceived = 0; + +const server = http.createServer(function(req, res) { + const id = ++requestReceived; + const enoughToDrain = req.connection.writableHighWaterMark; + const body = 'x'.repeat(enoughToDrain * 100); + + if (id === 1) { + // Case of needParse = false + req.connection.once('pause', common.mustCall(() => { + assert(req.connection._paused, '_paused must be true because it exceeds' + + 'highWaterMark by second request'); + })); + } else { + // Case of needParse = true + const resume = req.connection.parser.resume.bind(req.connection.parser); + req.connection.parser.resume = common.mustCall((...args) => { + const paused = req.connection._paused; + assert(!paused, '_paused must be false because it become false by ' + + 'socketOnDrain when outgoingData falls below ' + + 'highWaterMark'); + return resume(...args); + }); + } + assert(!res.write(body), 'res.write must return false because it will ' + + 'exceed highWaterMark on this call'); + res.end(); +}).on('listening', () => { + const c = net.createConnection(server.address().port, () => { + c.write('GET / HTTP/1.1\r\n\r\n'); + c.write('GET / HTTP/1.1\r\n\r\n', + () => setImmediate(() => c.resume())); + c.end(); + }); + + c.on('end', () => { + server.close(); + }); +}); + +server.listen(0); diff --git a/tests/node_compat/test/parallel/test-http-host-headers.js b/tests/node_compat/test/parallel/test-http-host-headers.js new file mode 100644 index 00000000000000..e3de01796794ce --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-host-headers.js @@ -0,0 +1,103 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const http = require('http'); +const assert = require('assert'); +const httpServer = http.createServer(reqHandler); + +function reqHandler(req, res) { + if (req.url === '/setHostFalse5') { + assert.strictEqual(req.headers.host, undefined); + } else { + assert.strictEqual( + req.headers.host, `localhost:${this.address().port}`, + `Wrong host header for req[${req.url}]: ${req.headers.host}`); + } + res.writeHead(200, {}); + res.end('ok'); +} + +testHttp(); + +function testHttp() { + + let counter = 0; + + function cb(res) { + counter--; + if (counter === 0) { + httpServer.close(); + } + res.resume(); + } + + httpServer.listen(0, (er) => { + assert.ifError(er); + http.get({ + method: 'GET', + path: `/${counter++}`, + host: 'localhost', + port: httpServer.address().port, + rejectUnauthorized: false + }, cb).on('error', common.mustNotCall()); + + http.request({ + method: 'GET', + path: `/${counter++}`, + host: 'localhost', + port: httpServer.address().port, + rejectUnauthorized: false + }, cb).on('error', common.mustNotCall()).end(); + + http.request({ + method: 'POST', + path: `/${counter++}`, + host: 'localhost', + port: httpServer.address().port, + rejectUnauthorized: false + }, cb).on('error', common.mustNotCall()).end(); + + http.request({ + method: 'PUT', + path: `/${counter++}`, + host: 'localhost', + port: httpServer.address().port, + rejectUnauthorized: false + }, cb).on('error', common.mustNotCall()).end(); + + http.request({ + method: 'DELETE', + path: `/${counter++}`, + host: 'localhost', + port: httpServer.address().port, + rejectUnauthorized: false + }, cb).on('error', common.mustNotCall()).end(); + }); +} diff --git a/tests/node_compat/test/parallel/test-http-incoming-message-destroy.js b/tests/node_compat/test/parallel/test-http-incoming-message-destroy.js new file mode 100644 index 00000000000000..0c41570d9a9bc0 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-incoming-message-destroy.js @@ -0,0 +1,17 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +// Test that http.IncomingMessage,prototype.destroy() returns `this`. +require('../common'); + +const assert = require('assert'); +const http = require('http'); +const incomingMessage = new http.IncomingMessage(); + +assert.strictEqual(incomingMessage.destroy(), incomingMessage); diff --git a/tests/node_compat/test/parallel/test-http-invalid-path-chars.js b/tests/node_compat/test/parallel/test-http-invalid-path-chars.js new file mode 100644 index 00000000000000..be037050d50580 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-invalid-path-chars.js @@ -0,0 +1,27 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +require('../common'); +const assert = require('assert'); +const http = require('http'); + +const theExperimentallyDeterminedNumber = 39; + +for (let i = 0; i <= theExperimentallyDeterminedNumber; i++) { + const prefix = 'a'.repeat(i); + for (let i = 0; i <= 32; i++) { + assert.throws(() => { + http.request({ path: prefix + String.fromCodePoint(i) }, assert.fail); + }, { + code: 'ERR_UNESCAPED_CHARACTERS', + name: 'TypeError', + message: 'Request path contains unescaped characters' + }); + } +} diff --git a/tests/node_compat/test/parallel/test-http-invalidheaderfield.js b/tests/node_compat/test/parallel/test-http-invalidheaderfield.js new file mode 100644 index 00000000000000..93d8d99f888b18 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-invalidheaderfield.js @@ -0,0 +1,59 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); + +const assert = require('assert'); +const EventEmitter = require('events'); +const http = require('http'); + +const ee = new EventEmitter(); +let count = 3; + +const server = http.createServer(function(req, res) { + res.setHeader('testing_123', 123); + assert.throws(function() { + res.setHeader('testing 123', 123); + }, TypeError); + res.end(''); +}); +server.listen(0, function() { + + http.get({ port: this.address().port }, function() { + ee.emit('done'); + }); + + assert.throws( + function() { + const options = { + port: server.address().port, + headers: { 'testing 123': 123 } + }; + http.get(options, common.mustNotCall()); + }, + function(err) { + ee.emit('done'); + if (err instanceof TypeError) return true; + } + ); + + // Should not throw. + const options = { + port: server.address().port, + headers: { 'testing_123': 123 } + }; + http.get(options, function() { + ee.emit('done'); + }); +}); + +ee.on('done', function() { + if (--count === 0) { + server.close(); + } +}); diff --git a/tests/node_compat/test/parallel/test-http-invalidheaderfield2.js b/tests/node_compat/test/parallel/test-http-invalidheaderfield2.js new file mode 100644 index 00000000000000..e6c0f976b6c63a --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-invalidheaderfield2.js @@ -0,0 +1,95 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); +const assert = require('assert'); +const inspect = require('util').inspect; +const { _checkIsHttpToken, _checkInvalidHeaderChar } = require('_http_common'); + +// Good header field names +[ + 'TCN', + 'ETag', + 'date', + 'alt-svc', + 'Content-Type', + '0', + 'Set-Cookie2', + 'Set_Cookie', + 'foo`bar^', + 'foo|bar', + '~foobar', + 'FooBar!', + '#Foo', + '$et-Cookie', + '%%Test%%', + 'Test&123', + 'It\'s_fun', + '2*3', + '4+2', + '3.14159265359', +].forEach(function(str) { + assert.strictEqual( + _checkIsHttpToken(str), true, + `_checkIsHttpToken(${inspect(str)}) unexpectedly failed`); +}); +// Bad header field names +[ + ':', + '@@', + '中文呢', // unicode + '((((())))', + ':alternate-protocol', + 'alternate-protocol:', + 'foo\nbar', + 'foo\rbar', + 'foo\r\nbar', + 'foo\x00bar', + '\x7FMe!', + '{Start', + '(Start', + '[Start', + 'End}', + 'End)', + 'End]', + '"Quote"', + 'This,That', +].forEach(function(str) { + assert.strictEqual( + _checkIsHttpToken(str), false, + `_checkIsHttpToken(${inspect(str)}) unexpectedly succeeded`); +}); + + +// Good header field values +[ + 'foo bar', + 'foo\tbar', + '0123456789ABCdef', + '!@#$%^&*()-_=+\\;\':"[]{}<>,./?|~`', +].forEach(function(str) { + assert.strictEqual( + _checkInvalidHeaderChar(str), false, + `_checkInvalidHeaderChar(${inspect(str)}) unexpectedly failed`); +}); + +// Bad header field values +[ + 'foo\rbar', + 'foo\nbar', + 'foo\r\nbar', + '中文呢', // unicode + '\x7FMe!', + 'Testing 123\x00', + 'foo\vbar', + 'Ding!\x07', +].forEach(function(str) { + assert.strictEqual( + _checkInvalidHeaderChar(str), true, + `_checkInvalidHeaderChar(${inspect(str)}) unexpectedly succeeded`); +}); diff --git a/tests/node_compat/test/parallel/test-http-keep-alive-timeout-custom.js b/tests/node_compat/test/parallel/test-http-keep-alive-timeout-custom.js new file mode 100644 index 00000000000000..eb48c8c0bd2fda --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-keep-alive-timeout-custom.js @@ -0,0 +1,38 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const http = require('http'); +const assert = require('assert'); + +const server = http.createServer(common.mustCall((req, res) => { + const body = 'hello world\n'; + + res.writeHead(200, { + 'Content-Length': body.length, + 'Keep-Alive': 'timeout=50' + }); + res.write(body); + res.end(); +})); +server.keepAliveTimeout = 12010; + +const agent = new http.Agent({ maxSockets: 1, keepAlive: true }); + +server.listen(0, common.mustCall(function() { + http.get({ + path: '/', port: this.address().port, agent: agent + }, common.mustCall((response) => { + response.resume(); + assert.strictEqual( + response.headers['keep-alive'], 'timeout=50'); + server.close(); + agent.destroy(); + })); +})); diff --git a/tests/node_compat/test/parallel/test-http-listening.js b/tests/node_compat/test/parallel/test-http-listening.js new file mode 100644 index 00000000000000..9963e377b558e0 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-listening.js @@ -0,0 +1,23 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); + +const server = http.createServer(); + +assert.strictEqual(server.listening, false); + +server.listen(0, common.mustCall(() => { + assert.strictEqual(server.listening, true); + + server.close(common.mustCall(() => { + assert.strictEqual(server.listening, false); + })); +})); diff --git a/tests/node_compat/test/parallel/test-http-localaddress-bind-error.js b/tests/node_compat/test/parallel/test-http-localaddress-bind-error.js new file mode 100644 index 00000000000000..d951652e1b7d18 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-localaddress-bind-error.js @@ -0,0 +1,59 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); + +const invalidLocalAddress = '1.2.3.4'; + +const server = http.createServer(function(req, res) { + console.log(`Connect from: ${req.connection.remoteAddress}`); + + req.on('end', function() { + res.writeHead(200, { 'Content-Type': 'text/plain' }); + res.end(`You are from: ${req.connection.remoteAddress}`); + }); + req.resume(); +}); + +server.listen(0, '127.0.0.1', common.mustCall(function() { + http.request({ + host: 'localhost', + port: this.address().port, + path: '/', + method: 'GET', + localAddress: invalidLocalAddress + }, function(res) { + assert.fail('unexpectedly got response from server'); + }).on('error', common.mustCall(function(e) { + console.log(`client got error: ${e.message}`); + server.close(); + })).end(); +})); diff --git a/tests/node_compat/test/parallel/test-http-localaddress.js b/tests/node_compat/test/parallel/test-http-localaddress.js index e4f6c4aefe305a..149257d43a9ce0 100644 --- a/tests/node_compat/test/parallel/test-http-localaddress.js +++ b/tests/node_compat/test/parallel/test-http-localaddress.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-http-methods.js b/tests/node_compat/test/parallel/test-http-methods.js new file mode 100644 index 00000000000000..163fb571dd6bf4 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-methods.js @@ -0,0 +1,74 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); +const http = require('http'); + +// This test ensures all http methods from HTTP parser are exposed +// to http library + +const methods = [ + 'ACL', + 'BIND', + 'CHECKOUT', + 'CONNECT', + 'COPY', + 'DELETE', + 'GET', + 'HEAD', + 'LINK', + 'LOCK', + 'M-SEARCH', + 'MERGE', + 'MKACTIVITY', + 'MKCALENDAR', + 'MKCOL', + 'MOVE', + 'NOTIFY', + 'OPTIONS', + 'PATCH', + 'POST', + 'PROPFIND', + 'PROPPATCH', + 'PURGE', + 'PUT', + 'REBIND', + 'REPORT', + 'SEARCH', + 'SOURCE', + 'SUBSCRIBE', + 'TRACE', + 'UNBIND', + 'UNLINK', + 'UNLOCK', + 'UNSUBSCRIBE', +]; + +assert.deepStrictEqual(http.METHODS, methods.sort()); diff --git a/tests/node_compat/test/parallel/test-http-outgoing-end-types.js b/tests/node_compat/test/parallel/test-http-outgoing-end-types.js new file mode 100644 index 00000000000000..30e466c4a8710c --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-outgoing-end-types.js @@ -0,0 +1,25 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); + +const httpServer = http.createServer(common.mustCall(function(req, res) { + httpServer.close(); + assert.throws(() => { + res.end(['Throws.']); + }, { + code: 'ERR_INVALID_ARG_TYPE' + }); + res.end(); +})); + +httpServer.listen(0, common.mustCall(function() { + http.get({ port: this.address().port }); +})); diff --git a/tests/node_compat/test/parallel/test-http-outgoing-finished.js b/tests/node_compat/test/parallel/test-http-outgoing-finished.js new file mode 100644 index 00000000000000..543f4d7c6d42c8 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-outgoing-finished.js @@ -0,0 +1,39 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const { finished } = require('stream'); + +const http = require('http'); +const assert = require('assert'); + +const server = http.createServer(function(req, res) { + let closed = false; + res + .on('close', common.mustCall(() => { + closed = true; + finished(res, common.mustCall(() => { + server.close(); + })); + })) + .end(); + finished(res, common.mustCall(() => { + assert.strictEqual(closed, true); + })); + +}).listen(0, function() { + http + .request({ + port: this.address().port, + method: 'GET' + }) + .on('response', function(res) { + res.resume(); + }) + .end(); +}); diff --git a/tests/node_compat/test/parallel/test-http-outgoing-internal-headernames-getter.js b/tests/node_compat/test/parallel/test-http-outgoing-internal-headernames-getter.js index 490d814b9987f7..dbd7f850a64861 100644 --- a/tests/node_compat/test/parallel/test-http-outgoing-internal-headernames-getter.js +++ b/tests/node_compat/test/parallel/test-http-outgoing-internal-headernames-getter.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-http-outgoing-internal-headernames-setter.js b/tests/node_compat/test/parallel/test-http-outgoing-internal-headernames-setter.js index a36b74ed5c0981..8ecfbc7c3ef1b4 100644 --- a/tests/node_compat/test/parallel/test-http-outgoing-internal-headernames-setter.js +++ b/tests/node_compat/test/parallel/test-http-outgoing-internal-headernames-setter.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-http-outgoing-internal-headers.js b/tests/node_compat/test/parallel/test-http-outgoing-internal-headers.js index ac07a197ab0eb1..05d6aa64a9343d 100644 --- a/tests/node_compat/test/parallel/test-http-outgoing-internal-headers.js +++ b/tests/node_compat/test/parallel/test-http-outgoing-internal-headers.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --expose-internals diff --git a/tests/node_compat/test/parallel/test-http-outgoing-renderHeaders.js b/tests/node_compat/test/parallel/test-http-outgoing-renderHeaders.js index 23c61e61d8a502..c39d62c331ed45 100644 --- a/tests/node_compat/test/parallel/test-http-outgoing-renderHeaders.js +++ b/tests/node_compat/test/parallel/test-http-outgoing-renderHeaders.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-http-outgoing-settimeout.js b/tests/node_compat/test/parallel/test-http-outgoing-settimeout.js index 6e1a51a17cdf33..70373d7c05e917 100644 --- a/tests/node_compat/test/parallel/test-http-outgoing-settimeout.js +++ b/tests/node_compat/test/parallel/test-http-outgoing-settimeout.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-http-outgoing-write-types.js b/tests/node_compat/test/parallel/test-http-outgoing-write-types.js new file mode 100644 index 00000000000000..101f70581cc131 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-outgoing-write-types.js @@ -0,0 +1,31 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); + +const httpServer = http.createServer(common.mustCall(function(req, res) { + httpServer.close(); + assert.throws(() => { + res.write(['Throws.']); + }, { + code: 'ERR_INVALID_ARG_TYPE' + }); + // should not throw + res.write('1a2b3c'); + // should not throw + res.write(new Uint8Array(1024)); + // should not throw + res.write(Buffer.from('1'.repeat(1024))); + res.end(); +})); + +httpServer.listen(0, common.mustCall(function() { + http.get({ port: this.address().port }); +})); diff --git a/tests/node_compat/test/parallel/test-http-parser-free.js b/tests/node_compat/test/parallel/test-http-parser-free.js new file mode 100644 index 00000000000000..d1fe71e254e94c --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-parser-free.js @@ -0,0 +1,59 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); +const http = require('http'); +const Countdown = require('../common/countdown'); +const N = 100; + +const server = http.createServer(function(req, res) { + res.end('Hello'); +}); + +const countdown = new Countdown(N, () => server.close()); + +server.listen(0, function() { + http.globalAgent.maxSockets = 1; + let parser; + for (let i = 0; i < N; ++i) { + (function makeRequest(i) { + const req = http.get({ port: server.address().port }, function(res) { + if (!parser) { + parser = req.parser; + } else { + assert.strictEqual(req.parser, parser); + } + + countdown.dec(); + res.resume(); + }); + })(i); + } +}); diff --git a/tests/node_compat/test/parallel/test-http-pause-no-dump.js b/tests/node_compat/test/parallel/test-http-pause-no-dump.js new file mode 100644 index 00000000000000..0e9fb6605d1b0b --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-pause-no-dump.js @@ -0,0 +1,40 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); + +const server = http.createServer(common.mustCall(function(req, res) { + req.once('data', common.mustCall(() => { + req.pause(); + res.writeHead(200); + res.end(); + res.on('finish', common.mustCall(() => { + assert(!req._dumped); + })); + })); +})); +server.listen(0); + +server.on('listening', common.mustCall(function() { + const req = http.request({ + port: this.address().port, + method: 'POST', + path: '/' + }, common.mustCall(function(res) { + assert.strictEqual(res.statusCode, 200); + res.resume(); + res.on('end', common.mustCall(() => { + server.close(); + })); + })); + + req.end(Buffer.allocUnsafe(1024)); +})); diff --git a/tests/node_compat/test/parallel/test-http-pause-resume-one-end.js b/tests/node_compat/test/parallel/test-http-pause-resume-one-end.js new file mode 100644 index 00000000000000..c7b0126e620cd5 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-pause-resume-one-end.js @@ -0,0 +1,62 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const http = require('http'); +const assert = require('assert'); + +const server = http.Server(function(req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }); + res.end('Hello World\n'); + server.close(); +}); + +server.listen(0, common.mustCall(function() { + const opts = { + port: this.address().port, + headers: { connection: 'close' } + }; + + http.get(opts, common.mustCall(function(res) { + res.on('data', common.mustCall(function() { + res.pause(); + setImmediate(function() { + res.resume(); + }); + })); + + res.on('end', common.mustCall(() => { + assert.strictEqual(res.destroyed, false); + })); + assert.strictEqual(res.destroyed, false); + res.on('close', common.mustCall(() => { + assert.strictEqual(res.destroyed, true); + })); + })); +})); diff --git a/tests/node_compat/test/parallel/test-http-pause.js b/tests/node_compat/test/parallel/test-http-pause.js new file mode 100644 index 00000000000000..a9e377de909f8c --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-pause.js @@ -0,0 +1,85 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); +const http = require('http'); + +const expectedServer = 'Request Body from Client'; +let resultServer = ''; +const expectedClient = 'Response Body from Server'; +let resultClient = ''; + +const server = http.createServer((req, res) => { + console.error('pause server request'); + req.pause(); + setTimeout(() => { + console.error('resume server request'); + req.resume(); + req.setEncoding('utf8'); + req.on('data', (chunk) => { + resultServer += chunk; + }); + req.on('end', () => { + console.error(resultServer); + res.writeHead(200); + res.end(expectedClient); + }); + }, 100); +}); + +server.listen(0, function() { + // Anonymous function rather than arrow function to test `this` value. + assert.strictEqual(this, server); + const req = http.request({ + port: this.address().port, + path: '/', + method: 'POST' + }, (res) => { + console.error('pause client response'); + res.pause(); + setTimeout(() => { + console.error('resume client response'); + res.resume(); + res.on('data', (chunk) => { + resultClient += chunk; + }); + res.on('end', () => { + console.error(resultClient); + server.close(); + }); + }, 100); + }); + req.end(expectedServer); +}); + +process.on('exit', () => { + assert.strictEqual(resultServer, expectedServer); + assert.strictEqual(resultClient, expectedClient); +}); diff --git a/tests/node_compat/test/parallel/test-http-pipe-fs.js b/tests/node_compat/test/parallel/test-http-pipe-fs.js new file mode 100644 index 00000000000000..3fcd2e1f2cdf1b --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-pipe-fs.js @@ -0,0 +1,72 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const http = require('http'); +const fs = require('fs'); +const Countdown = require('../common/countdown'); +const NUMBER_OF_STREAMS = 2; + +const countdown = new Countdown(NUMBER_OF_STREAMS, () => server.close()); + +const tmpdir = require('../common/tmpdir'); +tmpdir.refresh(); + +const file = tmpdir.resolve('http-pipe-fs-test.txt'); + +const server = http.createServer(common.mustCall(function(req, res) { + const stream = fs.createWriteStream(file); + req.pipe(stream); + stream.on('close', function() { + res.writeHead(200); + res.end(); + }); +}, 2)).listen(0, function() { + http.globalAgent.maxSockets = 1; + + for (let i = 0; i < NUMBER_OF_STREAMS; ++i) { + const req = http.request({ + port: server.address().port, + method: 'POST', + headers: { + 'Content-Length': 5 + } + }, function(res) { + res.on('end', function() { + console.error(`res${i + 1} end`); + countdown.dec(); + }); + res.resume(); + }); + req.on('socket', function(s) { + console.error(`req${i + 1} start`); + }); + req.end('12345'); + } +}); diff --git a/tests/node_compat/test/parallel/test-http-pipeline-requests-connection-leak.js b/tests/node_compat/test/parallel/test-http-pipeline-requests-connection-leak.js new file mode 100644 index 00000000000000..3a5498113ba832 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-pipeline-requests-connection-leak.js @@ -0,0 +1,41 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); +const Countdown = require('../common/countdown'); + +// This test ensures Node.js doesn't behave erratically when receiving pipelined +// requests +// https://github.com/nodejs/node/issues/3332 + +const http = require('http'); +const net = require('net'); + +const big = Buffer.alloc(16 * 1024, 'A'); + +const COUNT = 1e4; + +const countdown = new Countdown(COUNT, () => { + server.close(); + client.end(); +}); + +let client; +const server = http + .createServer(function(req, res) { + res.end(big, function() { + countdown.dec(); + }); + }) + .listen(0, function() { + const req = 'GET / HTTP/1.1\r\nHost: example.com\r\n\r\n'.repeat(COUNT); + client = net.connect(this.address().port, function() { + client.write(req); + }); + client.resume(); + }); diff --git a/tests/node_compat/test/parallel/test-http-proxy.js b/tests/node_compat/test/parallel/test-http-proxy.js new file mode 100644 index 00000000000000..a457275239b1e5 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-proxy.js @@ -0,0 +1,114 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); +const http = require('http'); +const url = require('url'); + +const cookies = [ + 'session_token=; path=/; expires=Sun, 15-Sep-2030 13:48:52 GMT', + 'prefers_open_id=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT', +]; + +const headers = { 'content-type': 'text/plain', + 'set-cookie': cookies, + 'hello': 'world' }; + +const backend = http.createServer(function(req, res) { + console.error('backend request'); + res.writeHead(200, headers); + res.write('hello world\n'); + res.end(); +}); + +const proxy = http.createServer(function(req, res) { + console.error(`proxy req headers: ${JSON.stringify(req.headers)}`); + http.get({ + port: backend.address().port, + path: url.parse(req.url).pathname + }, function(proxy_res) { + + console.error(`proxy res headers: ${JSON.stringify(proxy_res.headers)}`); + + assert.strictEqual(proxy_res.headers.hello, 'world'); + assert.strictEqual(proxy_res.headers['content-type'], 'text/plain'); + assert.deepStrictEqual(proxy_res.headers['set-cookie'], cookies); + + res.writeHead(proxy_res.statusCode, proxy_res.headers); + + proxy_res.on('data', function(chunk) { + res.write(chunk); + }); + + proxy_res.on('end', function() { + res.end(); + console.error('proxy res'); + }); + }); +}); + +let body = ''; + +let nlistening = 0; +function startReq() { + nlistening++; + if (nlistening < 2) return; + + http.get({ + port: proxy.address().port, + path: '/test' + }, function(res) { + console.error('got res'); + assert.strictEqual(res.statusCode, 200); + + assert.strictEqual(res.headers.hello, 'world'); + assert.strictEqual(res.headers['content-type'], 'text/plain'); + assert.deepStrictEqual(res.headers['set-cookie'], cookies); + + res.setEncoding('utf8'); + res.on('data', function(chunk) { body += chunk; }); + res.on('end', function() { + proxy.close(); + backend.close(); + console.error('closed both'); + }); + }); + console.error('client req'); +} + +console.error('listen proxy'); +proxy.listen(0, startReq); + +console.error('listen backend'); +backend.listen(0, startReq); + +process.on('exit', function() { + assert.strictEqual(body, 'hello world\n'); +}); diff --git a/tests/node_compat/test/parallel/test-http-readable-data-event.js b/tests/node_compat/test/parallel/test-http-readable-data-event.js new file mode 100644 index 00000000000000..6c91ebe526c6a1 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-readable-data-event.js @@ -0,0 +1,65 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); +const helloWorld = 'Hello World!'; +const helloAgainLater = 'Hello again later!'; + +let next = null; + +const server = http.createServer((req, res) => { + res.writeHead(200, { + 'Content-Length': `${(helloWorld.length + helloAgainLater.length)}` + }); + + // We need to make sure the data is flushed + // before writing again + next = () => { + res.end(helloAgainLater); + next = () => { }; + }; + + res.write(helloWorld); +}).listen(0, function() { + const opts = { + hostname: 'localhost', + port: server.address().port, + path: '/' + }; + + const expectedData = [helloWorld, helloAgainLater]; + const expectedRead = [helloWorld, null, helloAgainLater, null, null]; + + const req = http.request(opts, (res) => { + res.on('error', common.mustNotCall()); + + res.on('readable', common.mustCall(() => { + let data; + + do { + data = res.read(); + assert.strictEqual(data, expectedRead.shift()); + next(); + } while (data !== null); + }, 3)); + + res.setEncoding('utf8'); + res.on('data', common.mustCall((data) => { + assert.strictEqual(data, expectedData.shift()); + }, 2)); + + res.on('end', common.mustCall(() => { + server.close(); + })); + }); + + req.end(); +}); diff --git a/tests/node_compat/test/parallel/test-http-request-arguments.js b/tests/node_compat/test/parallel/test-http-request-arguments.js new file mode 100644 index 00000000000000..d15bfc40eae145 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-request-arguments.js @@ -0,0 +1,35 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); + +// Test providing both a url and options, with the options partially +// replacing address and port portions of the URL provided. +{ + const server = http.createServer( + common.mustCall((req, res) => { + assert.strictEqual(req.url, '/testpath'); + res.end(); + server.close(); + }) + ); + server.listen( + 0, + common.mustCall(() => { + http.get( + 'http://example.com/testpath', + { hostname: 'localhost', port: server.address().port }, + common.mustCall((res) => { + res.resume(); + }) + ); + }) + ); +} diff --git a/tests/node_compat/test/parallel/test-http-request-dont-override-options.js b/tests/node_compat/test/parallel/test-http-request-dont-override-options.js new file mode 100644 index 00000000000000..caa87bd953f04d --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-request-dont-override-options.js @@ -0,0 +1,47 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); + + +const server = http.createServer(common.mustCall(function(req, res) { + res.writeHead(200); + res.end('ok'); +})); + +server.listen(0, function() { + const agent = new http.Agent(); + agent.defaultPort = this.address().port; + + // Options marked as explicitly undefined for readability + // in this test, they should STAY undefined as options should not + // be mutable / modified + const options = { + host: undefined, + hostname: common.localhostIPv4, + port: undefined, + defaultPort: undefined, + path: undefined, + method: undefined, + agent: agent + }; + + http.request(options, function(res) { + res.resume(); + server.close(); + assert.strictEqual(options.host, undefined); + assert.strictEqual(options.hostname, common.localhostIPv4); + assert.strictEqual(options.port, undefined); + assert.strictEqual(options.defaultPort, undefined); + assert.strictEqual(options.path, undefined); + assert.strictEqual(options.method, undefined); + }).end(); +}); diff --git a/tests/node_compat/test/parallel/test-http-request-end-twice.js b/tests/node_compat/test/parallel/test-http-request-end-twice.js new file mode 100644 index 00000000000000..34c3aee390c60b --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-request-end-twice.js @@ -0,0 +1,46 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); +const http = require('http'); + +const server = http.Server(function(req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }); + res.end('hello world\n'); +}); +server.listen(0, function() { + const req = http.get({ port: this.address().port }, function(res) { + res.on('end', function() { + assert.strictEqual(req.end(), req); + server.close(); + }); + res.resume(); + }); +}); diff --git a/tests/node_compat/test/parallel/test-http-request-end.js b/tests/node_compat/test/parallel/test-http-request-end.js new file mode 100644 index 00000000000000..4c71cd14329a71 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-request-end.js @@ -0,0 +1,69 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); +const http = require('http'); + +const expected = 'Post Body For Test'; + +const server = http.Server(function(req, res) { + let result = ''; + + req.setEncoding('utf8'); + req.on('data', function(chunk) { + result += chunk; + }); + + req.on('end', function() { + assert.strictEqual(result, expected); + res.writeHead(200); + res.end('hello world\n'); + server.close(); + }); + +}); + +server.listen(0, function() { + const req = http.request({ + port: this.address().port, + path: '/', + method: 'POST' + }, function(res) { + console.log(res.statusCode); + res.resume(); + }).on('error', function(e) { + console.log(e.message); + process.exit(1); + }); + + const result = req.end(expected); + + assert.strictEqual(req, result); +}); diff --git a/tests/node_compat/test/parallel/test-http-request-invalid-method-error.js b/tests/node_compat/test/parallel/test-http-request-invalid-method-error.js new file mode 100644 index 00000000000000..570966056eef88 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-request-invalid-method-error.js @@ -0,0 +1,20 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); +const assert = require('assert'); +const http = require('http'); + +assert.throws( + () => http.request({ method: '\0' }), + { + code: 'ERR_INVALID_HTTP_TOKEN', + name: 'TypeError', + message: 'Method must be a valid HTTP token ["\u0000"]' + } +); diff --git a/tests/node_compat/test/parallel/test-http-request-large-payload.js b/tests/node_compat/test/parallel/test-http-request-large-payload.js new file mode 100644 index 00000000000000..80e36297ebca8d --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-request-large-payload.js @@ -0,0 +1,33 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); + +// This test ensures Node.js doesn't throw an error when making requests with +// the payload 16kb or more in size. +// https://github.com/nodejs/node/issues/2821 + +const http = require('http'); + +const server = http.createServer(function(req, res) { + res.writeHead(200); + res.end(); + + server.close(); +}); + +server.listen(0, function() { + const req = http.request({ + method: 'POST', + port: this.address().port + }); + + const payload = Buffer.alloc(16390, 'Й'); + req.write(payload); + req.end(); +}); diff --git a/tests/node_compat/test/parallel/test-http-request-methods.js b/tests/node_compat/test/parallel/test-http-request-methods.js new file mode 100644 index 00000000000000..69fb7aa5b1ee2c --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-request-methods.js @@ -0,0 +1,72 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); +const http = require('http'); + +// Test that the DELETE, PATCH and PURGE verbs get passed through correctly + +['DELETE', 'PATCH', 'PURGE'].forEach(function(method, index) { + const server = http.createServer(common.mustCall(function(req, res) { + assert.strictEqual(req.method, method); + res.writeHead(200, { 'Content-Type': 'text/plain' }); + res.write('hello '); + res.write('world\n'); + res.end(); + })); + server.listen(0); + + server.on('listening', common.mustCall(function() { + const c = net.createConnection(this.address().port); + let server_response = ''; + + c.setEncoding('utf8'); + + c.on('connect', function() { + c.write(`${method} / HTTP/1.0\r\n\r\n`); + }); + + c.on('data', function(chunk) { + console.log(chunk); + server_response += chunk; + }); + + c.on('end', common.mustCall(function() { + const m = server_response.split('\r\n\r\n'); + assert.strictEqual(m[1], 'hello world\n'); + c.end(); + })); + + c.on('close', function() { + server.close(); + }); + })); +}); diff --git a/tests/node_compat/test/parallel/test-http-res-write-end-dont-take-array.js b/tests/node_compat/test/parallel/test-http-res-write-end-dont-take-array.js new file mode 100644 index 00000000000000..8d9996382368bb --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-res-write-end-dont-take-array.js @@ -0,0 +1,80 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); + +const server = http.createServer(); + +server.once('request', common.mustCall((req, res) => { + server.on('request', common.mustCall((req, res) => { + res.end(Buffer.from('asdf')); + })); + // `res.write()` should accept `string`. + res.write('string'); + // `res.write()` should accept `buffer`. + res.write(Buffer.from('asdf')); + + const expectedError = { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError', + }; + + // `res.write()` should not accept an Array. + assert.throws( + () => { + res.write(['array']); + }, + expectedError + ); + + // `res.end()` should not accept an Array. + assert.throws( + () => { + res.end(['moo']); + }, + expectedError + ); + + // `res.end()` should accept `string`. + res.end('string'); +})); + +server.listen(0, function() { + // Just make a request, other tests handle responses. + http.get({ port: this.address().port }, (res) => { + res.resume(); + // Do it again to test .end(Buffer); + http.get({ port: server.address().port }, (res) => { + res.resume(); + server.close(); + }); + }); +}); diff --git a/tests/node_compat/test/parallel/test-http-response-multiheaders.js b/tests/node_compat/test/parallel/test-http-response-multiheaders.js new file mode 100644 index 00000000000000..27bfbcdca501c1 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-response-multiheaders.js @@ -0,0 +1,78 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const http = require('http'); +const assert = require('assert'); +const Countdown = require('../common/countdown'); + +// Test that certain response header fields do not repeat. +// 'content-length' should also be in this list but it is +// handled differently because multiple content-lengths are +// an error (see test-http-response-multi-content-length.js). +const norepeat = [ + 'content-type', + 'user-agent', + 'referer', + 'host', + 'authorization', + 'proxy-authorization', + 'if-modified-since', + 'if-unmodified-since', + 'from', + 'location', + 'max-forwards', + 'retry-after', + 'etag', + 'last-modified', + 'server', + 'age', + 'expires', +]; +const runCount = 2; + +const server = http.createServer(function(req, res) { + const num = req.headers['x-num']; + if (num === '1') { + for (const name of norepeat) { + res.setHeader(name, ['A', 'B']); + } + res.setHeader('X-A', ['A', 'B']); + } else if (num === '2') { + const headers = {}; + for (const name of norepeat) { + headers[name] = ['A', 'B']; + } + headers['X-A'] = ['A', 'B']; + res.writeHead(200, headers); + } + res.end('ok'); +}); + +server.listen(0, common.mustCall(function() { + const countdown = new Countdown(runCount, () => server.close()); + for (let n = 1; n <= runCount; n++) { + // This runs twice, the first time, the server will use + // setHeader, the second time it uses writeHead. The + // result on the client side should be the same in + // either case -- only the first instance of the header + // value should be reported for the header fields listed + // in the norepeat array. + http.get( + { port: this.address().port, headers: { 'x-num': n } }, + common.mustCall(function(res) { + countdown.dec(); + for (const name of norepeat) { + assert.strictEqual(res.headers[name], 'A'); + } + assert.strictEqual(res.headers['x-a'], 'A, B'); + }) + ); + } +})); diff --git a/tests/node_compat/test/parallel/test-http-response-readable.js b/tests/node_compat/test/parallel/test-http-response-readable.js new file mode 100644 index 00000000000000..3d2ca1a8597ca6 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-response-readable.js @@ -0,0 +1,48 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); +const http = require('http'); + +const testServer = new http.Server(function(req, res) { + res.writeHead(200); + res.end('Hello world'); +}); + +testServer.listen(0, function() { + http.get({ port: this.address().port }, function(res) { + assert.strictEqual(res.readable, true); + res.on('end', function() { + assert.strictEqual(res.readable, false); + testServer.close(); + }); + res.resume(); + }); +}); diff --git a/tests/node_compat/test/parallel/test-http-response-writehead-returns-this.js b/tests/node_compat/test/parallel/test-http-response-writehead-returns-this.js new file mode 100644 index 00000000000000..a9796890f42306 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-response-writehead-returns-this.js @@ -0,0 +1,29 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); +const http = require('http'); +const assert = require('assert'); + +const server = http.createServer((req, res) => { + res.writeHead(200, { 'a-header': 'a-header-value' }).end('abc'); +}); + +server.listen(0, () => { + http.get({ port: server.address().port }, (res) => { + assert.strictEqual(res.headers['a-header'], 'a-header-value'); + + const chunks = []; + + res.on('data', (chunk) => chunks.push(chunk)); + res.on('end', () => { + assert.strictEqual(Buffer.concat(chunks).toString(), 'abc'); + server.close(); + }); + }); +}); diff --git a/tests/node_compat/test/parallel/test-http-server-delete-parser.js b/tests/node_compat/test/parallel/test-http-server-delete-parser.js new file mode 100644 index 00000000000000..fbb242366fc4a0 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-server-delete-parser.js @@ -0,0 +1,31 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); + +const http = require('http'); + +const server = http.createServer(common.mustCall((req, res) => { + res.writeHead(200, { 'Content-Type': 'text/plain' }); + res.write('okay', common.mustCall(() => { + delete res.socket.parser; + })); + res.end(); +})); + +server.listen(0, '127.0.0.1', common.mustCall(() => { + const req = http.request({ + port: server.address().port, + host: '127.0.0.1', + method: 'GET', + }); + req.end(); +})); + +server.unref(); diff --git a/tests/node_compat/test/parallel/test-http-server-write-after-end.js b/tests/node_compat/test/parallel/test-http-server-write-after-end.js new file mode 100644 index 00000000000000..c7e0cb48eba790 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-server-write-after-end.js @@ -0,0 +1,36 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const http = require('http'); + +// Fix for https://github.com/nodejs/node/issues/14368 + +const server = http.createServer(handle); + +function handle(req, res) { + res.on('error', common.mustNotCall()); + + res.write('hello'); + res.end(); + + setImmediate(common.mustCall(() => { + res.write('world', common.mustCall((err) => { + common.expectsError({ + code: 'ERR_STREAM_WRITE_AFTER_END', + name: 'Error' + })(err); + server.close(); + })); + })); +} + +server.listen(0, common.mustCall(() => { + http.get(`http://localhost:${server.address().port}`); +})); diff --git a/tests/node_compat/test/parallel/test-http-server-write-end-after-end.js b/tests/node_compat/test/parallel/test-http-server-write-end-after-end.js new file mode 100644 index 00000000000000..eb05ea93ccd174 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-server-write-end-after-end.js @@ -0,0 +1,38 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const http = require('http'); + +const server = http.createServer(handle); + +function handle(req, res) { + res.on('error', common.mustNotCall()); + + res.write('hello'); + res.end(); + + setImmediate(common.mustCall(() => { + res.end('world'); + process.nextTick(() => { + server.close(); + }); + res.write('world', common.mustCall((err) => { + common.expectsError({ + code: 'ERR_STREAM_WRITE_AFTER_END', + name: 'Error' + })(err); + server.close(); + })); + })); +} + +server.listen(0, common.mustCall(() => { + http.get(`http://localhost:${server.address().port}`); +})); diff --git a/tests/node_compat/test/parallel/test-http-set-cookies.js b/tests/node_compat/test/parallel/test-http-set-cookies.js new file mode 100644 index 00000000000000..d8c7627b7a0d96 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-set-cookies.js @@ -0,0 +1,84 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); +const http = require('http'); +const Countdown = require('../common/countdown'); + +const countdown = new Countdown(2, () => server.close()); +const server = http.createServer(function(req, res) { + if (req.url === '/one') { + res.writeHead(200, [['set-cookie', 'A'], + ['content-type', 'text/plain']]); + res.end('one\n'); + } else { + res.writeHead(200, [['set-cookie', 'A'], + ['set-cookie', 'B'], + ['content-type', 'text/plain']]); + res.end('two\n'); + } +}); +server.listen(0); + +server.on('listening', function() { + // + // one set-cookie header + // + http.get({ port: this.address().port, path: '/one' }, function(res) { + // set-cookie headers are always return in an array. + // even if there is only one. + assert.deepStrictEqual(res.headers['set-cookie'], ['A']); + assert.strictEqual(res.headers['content-type'], 'text/plain'); + + res.on('data', function(chunk) { + console.log(chunk.toString()); + }); + + res.on('end', function() { + countdown.dec(); + }); + }); + + // Two set-cookie headers + + http.get({ port: this.address().port, path: '/two' }, function(res) { + assert.deepStrictEqual(res.headers['set-cookie'], ['A', 'B']); + assert.strictEqual(res.headers['content-type'], 'text/plain'); + + res.on('data', function(chunk) { + console.log(chunk.toString()); + }); + + res.on('end', function() { + countdown.dec(); + }); + }); + +}); diff --git a/tests/node_compat/test/parallel/test-http-set-header-chain.js b/tests/node_compat/test/parallel/test-http-set-header-chain.js new file mode 100644 index 00000000000000..80f59711ae97f5 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-set-header-chain.js @@ -0,0 +1,36 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const http = require('http'); +const assert = require('assert'); +const expected = { + '__proto__': null, + 'testheader1': 'foo', + 'testheader2': 'bar', + 'testheader3': 'xyz' +}; +const server = http.createServer(common.mustCall((req, res) => { + let retval = res.setHeader('testheader1', 'foo'); + + // Test that the setHeader returns the same response object. + assert.strictEqual(retval, res); + + retval = res.setHeader('testheader2', 'bar').setHeader('testheader3', 'xyz'); + // Test that chaining works for setHeader. + assert.deepStrictEqual(res.getHeaders(), expected); + res.end('ok'); +})); +server.listen(0, () => { + http.get({ port: server.address().port }, common.mustCall((res) => { + res.on('data', () => {}); + res.on('end', common.mustCall(() => { + server.close(); + })); + })); +}); diff --git a/tests/node_compat/test/parallel/test-http-status-code.js b/tests/node_compat/test/parallel/test-http-status-code.js new file mode 100644 index 00000000000000..78808640062849 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-status-code.js @@ -0,0 +1,65 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); +const http = require('http'); +const Countdown = require('../common/countdown'); + +// Simple test of Node's HTTP ServerResponse.statusCode +// ServerResponse.prototype.statusCode + +const tests = [200, 202, 300, 404, 451, 500]; +let test; +const countdown = new Countdown(tests.length, () => s.close()); + +const s = http.createServer(function(req, res) { + res.writeHead(test, { 'Content-Type': 'text/plain' }); + console.log(`--\nserver: statusCode after writeHead: ${res.statusCode}`); + assert.strictEqual(res.statusCode, test); + res.end('hello world\n'); +}); + +s.listen(0, nextTest); + + +function nextTest() { + test = tests.shift(); + + http.get({ port: s.address().port }, function(response) { + console.log(`client: expected status: ${test}`); + console.log(`client: statusCode: ${response.statusCode}`); + assert.strictEqual(response.statusCode, test); + response.on('end', function() { + if (countdown.dec()) + nextTest(); + }); + response.resume(); + }); +} diff --git a/tests/node_compat/test/parallel/test-http-status-reason-invalid-chars.js b/tests/node_compat/test/parallel/test-http-status-reason-invalid-chars.js new file mode 100644 index 00000000000000..cdf36c7cf630bd --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-status-reason-invalid-chars.js @@ -0,0 +1,54 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); +const Countdown = require('../common/countdown'); + +function explicit(req, res) { + assert.throws(() => { + res.writeHead(200, 'OK\r\nContent-Type: text/html\r\n'); + }, /Invalid character in statusMessage/); + + assert.throws(() => { + res.writeHead(200, 'OK\u010D\u010AContent-Type: gotcha\r\n'); + }, /Invalid character in statusMessage/); + + res.statusMessage = 'OK'; + res.end(); +} + +function implicit(req, res) { + assert.throws(() => { + res.statusMessage = 'OK\r\nContent-Type: text/html\r\n'; + res.writeHead(200); + }, /Invalid character in statusMessage/); + res.statusMessage = 'OK'; + res.end(); +} + +const server = http.createServer((req, res) => { + if (req.url === '/explicit') { + explicit(req, res); + } else { + implicit(req, res); + } +}).listen(0, common.mustCall(() => { + const hostname = 'localhost'; + const countdown = new Countdown(2, () => server.close()); + const url = `http://${hostname}:${server.address().port}`; + const check = common.mustCall((res) => { + assert.notStrictEqual(res.headers['content-type'], 'text/html'); + assert.notStrictEqual(res.headers['content-type'], 'gotcha'); + countdown.dec(); + }, 2); + http.get(`${url}/explicit`, check).end(); + http.get(`${url}/implicit`, check).end(); +})); diff --git a/tests/node_compat/test/parallel/test-http-uncaught-from-request-callback.js b/tests/node_compat/test/parallel/test-http-uncaught-from-request-callback.js new file mode 100644 index 00000000000000..32185e57dc4937 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-uncaught-from-request-callback.js @@ -0,0 +1,36 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const asyncHooks = require('async_hooks'); +const http = require('http'); + +// Regression test for https://github.com/nodejs/node/issues/31796 + +asyncHooks.createHook({ + after: () => {} +}).enable(); + + +process.once('uncaughtException', common.mustCall(() => { + server.close(); +})); + +const server = http.createServer(common.mustCall((request, response) => { + response.writeHead(200, { 'Content-Type': 'text/plain' }); + response.end(); +})); + +server.listen(0, common.mustCall(() => { + http.get({ + host: 'localhost', + port: server.address().port + }, common.mustCall(() => { + throw new Error('whoah'); + })); +})); diff --git a/tests/node_compat/test/parallel/test-http-url.parse-auth.js b/tests/node_compat/test/parallel/test-http-url.parse-auth.js new file mode 100644 index 00000000000000..9c805783382566 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-url.parse-auth.js @@ -0,0 +1,55 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); +const http = require('http'); +const url = require('url'); + +function check(request) { + // The correct authorization header is be passed + assert.strictEqual(request.headers.authorization, 'Basic dXNlcjpwYXNzOg=='); +} + +const server = http.createServer(function(request, response) { + // Run the check function + check(request); + response.writeHead(200, {}); + response.end('ok'); + server.close(); +}); + +server.listen(0, function() { + const port = this.address().port; + // username = "user", password = "pass:" + const testURL = url.parse(`http://user:pass%3A@localhost:${port}`); + + // make the request + http.request(testURL).end(); +}); diff --git a/tests/node_compat/test/parallel/test-http-url.parse-basic.js b/tests/node_compat/test/parallel/test-http-url.parse-basic.js new file mode 100644 index 00000000000000..62fa40431fa8a3 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-url.parse-basic.js @@ -0,0 +1,65 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); +const http = require('http'); +const url = require('url'); + +let testURL; + +// Make sure the basics work +function check(request) { + // Default method should still be 'GET' + assert.strictEqual(request.method, 'GET'); + // There are no URL params, so you should not see any + assert.strictEqual(request.url, '/'); + // The host header should use the url.parse.hostname + assert.strictEqual(request.headers.host, + `${testURL.hostname}:${testURL.port}`); +} + +const server = http.createServer(function(request, response) { + // Run the check function + check(request); + response.writeHead(200, {}); + response.end('ok'); + server.close(); +}); + +server.listen(0, function() { + testURL = url.parse(`http://localhost:${this.address().port}`); + + // make the request + const clientRequest = http.request(testURL); + // Since there is a little magic with the agent + // make sure that an http request uses the http.Agent + assert.ok(clientRequest.agent instanceof http.Agent); + clientRequest.end(); +}); diff --git a/tests/node_compat/test/parallel/test-http-url.parse-only-support-http-https-protocol.js b/tests/node_compat/test/parallel/test-http-url.parse-only-support-http-https-protocol.js index 98b222f391e1cf..6e2a25be7909f5 100644 --- a/tests/node_compat/test/parallel/test-http-url.parse-only-support-http-https-protocol.js +++ b/tests/node_compat/test/parallel/test-http-url.parse-only-support-http-https-protocol.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-http-url.parse-path.js b/tests/node_compat/test/parallel/test-http-url.parse-path.js new file mode 100644 index 00000000000000..1fb44adf6225da --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-url.parse-path.js @@ -0,0 +1,53 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); +const http = require('http'); +const url = require('url'); + +function check(request) { + // A path should come over + assert.strictEqual(request.url, '/asdf'); +} + +const server = http.createServer(function(request, response) { + // Run the check function + check(request); + response.writeHead(200, {}); + response.end('ok'); + server.close(); +}); + +server.listen(0, function() { + const testURL = url.parse(`http://localhost:${this.address().port}/asdf`); + + // make the request + http.request(testURL).end(); +}); diff --git a/tests/node_compat/test/parallel/test-http-url.parse-post.js b/tests/node_compat/test/parallel/test-http-url.parse-post.js new file mode 100644 index 00000000000000..17561913793a55 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-url.parse-post.js @@ -0,0 +1,61 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); +const http = require('http'); +const url = require('url'); + +let testURL; + +function check(request) { + // url.parse should not mess with the method + assert.strictEqual(request.method, 'POST'); + // Everything else should be right + assert.strictEqual(request.url, '/asdf?qwer=zxcv'); + // The host header should use the url.parse.hostname + assert.strictEqual(request.headers.host, + `${testURL.hostname}:${testURL.port}`); +} + +const server = http.createServer(function(request, response) { + // Run the check function + check(request); + response.writeHead(200, {}); + response.end('ok'); + server.close(); +}); + +server.listen(0, function() { + testURL = url.parse(`http://localhost:${this.address().port}/asdf?qwer=zxcv`); + testURL.method = 'POST'; + + // make the request + http.request(testURL).end(); +}); diff --git a/tests/node_compat/test/parallel/test-http-url.parse-search.js b/tests/node_compat/test/parallel/test-http-url.parse-search.js new file mode 100644 index 00000000000000..181e1a1fdc60ad --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-url.parse-search.js @@ -0,0 +1,54 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); +const http = require('http'); +const url = require('url'); + +function check(request) { + // A path should come over with params + assert.strictEqual(request.url, '/asdf?qwer=zxcv'); +} + +const server = http.createServer(function(request, response) { + // Run the check function + check(request); + response.writeHead(200, {}); + response.end('ok'); + server.close(); +}); + +server.listen(0, function() { + const port = this.address().port; + const testURL = url.parse(`http://localhost:${port}/asdf?qwer=zxcv`); + + // make the request + http.request(testURL).end(); +}); diff --git a/tests/node_compat/test/parallel/test-http-wget.js b/tests/node_compat/test/parallel/test-http-wget.js new file mode 100644 index 00000000000000..ea31a22acba59f --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-wget.js @@ -0,0 +1,85 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); +const http = require('http'); + +// `wget` sends an HTTP/1.0 request with Connection: Keep-Alive +// +// Sending back a chunked response to an HTTP/1.0 client would be wrong, +// so what has to happen in this case is that the connection is closed +// by the server after the entity body if the Content-Length was not +// sent. +// +// If the Content-Length was sent, we can probably safely honor the +// keep-alive request, even though HTTP 1.0 doesn't say that the +// connection can be kept open. Presumably any client sending this +// header knows that it is extending HTTP/1.0 and can handle the +// response. We don't test that here however, just that if the +// content-length is not provided, that the connection is in fact +// closed. + +const server = http.createServer((req, res) => { + res.writeHead(200, { 'Content-Type': 'text/plain' }); + res.write('hello '); + res.write('world\n'); + res.end(); +}); +server.listen(0); + +server.on('listening', common.mustCall(() => { + const c = net.createConnection(server.address().port); + let server_response = ''; + + c.setEncoding('utf8'); + + c.on('connect', () => { + c.write('GET / HTTP/1.0\r\n' + + 'Connection: Keep-Alive\r\n\r\n'); + }); + + c.on('data', (chunk) => { + console.log(chunk); + server_response += chunk; + }); + + c.on('end', common.mustCall(() => { + const m = server_response.split('\r\n\r\n'); + assert.strictEqual(m[1], 'hello world\n'); + console.log('got end'); + c.end(); + })); + + c.on('close', common.mustCall(() => { + console.log('got close'); + server.close(); + })); +})); diff --git a/tests/node_compat/test/parallel/test-http-write-empty-string.js b/tests/node_compat/test/parallel/test-http-write-empty-string.js new file mode 100644 index 00000000000000..362a2a5cbfcf12 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-write-empty-string.js @@ -0,0 +1,61 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); + +const http = require('http'); + +const server = http.createServer(function(request, response) { + console.log(`responding to ${request.url}`); + + response.writeHead(200, { 'Content-Type': 'text/plain' }); + response.write('1\n'); + response.write(''); + response.write('2\n'); + response.write(''); + response.end('3\n'); + + this.close(); +}); + +server.listen(0, common.mustCall(() => { + http.get({ port: server.address().port }, common.mustCall((res) => { + let response = ''; + + assert.strictEqual(res.statusCode, 200); + res.setEncoding('ascii'); + res.on('data', (chunk) => { + response += chunk; + }); + res.on('end', common.mustCall(() => { + assert.strictEqual(response, '1\n2\n3\n'); + })); + })); +})); diff --git a/tests/node_compat/test/parallel/test-http-zerolengthbuffer.js b/tests/node_compat/test/parallel/test-http-zerolengthbuffer.js new file mode 100644 index 00000000000000..ff41874fa6b239 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http-zerolengthbuffer.js @@ -0,0 +1,30 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +// Serving up a zero-length buffer should work. + +const common = require('../common'); +const http = require('http'); + +const server = http.createServer((req, res) => { + const buffer = Buffer.alloc(0); + res.writeHead(200, { 'Content-Type': 'text/html', + 'Content-Length': buffer.length }); + res.end(buffer); +}); + +server.listen(0, common.mustCall(() => { + http.get({ port: server.address().port }, common.mustCall((res) => { + + res.on('data', common.mustNotCall()); + + res.on('end', (d) => { + server.close(); + }); + })); +})); diff --git a/tests/node_compat/test/parallel/test-http2-client-request-listeners-warning.js b/tests/node_compat/test/parallel/test-http2-client-request-listeners-warning.js new file mode 100644 index 00000000000000..0d1f5e07a85590 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http2-client-request-listeners-warning.js @@ -0,0 +1,48 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); +const http2 = require('http2'); +const EventEmitter = require('events'); + +// This test ensures that a MaxListenersExceededWarning isn't emitted if +// more than EventEmitter.defaultMaxListeners requests are started on a +// ClientHttp2Session before it has finished connecting. + +process.on('warning', common.mustNotCall('A warning was emitted')); + +const server = http2.createServer(); +server.on('stream', (stream) => { + stream.respond(); + stream.end(); +}); + +server.listen(common.mustCall(() => { + const client = http2.connect(`http://localhost:${server.address().port}`); + + function request() { + return new Promise((resolve, reject) => { + const stream = client.request(); + stream.on('error', reject); + stream.on('response', resolve); + stream.end(); + }); + } + + const requests = []; + for (let i = 0; i < EventEmitter.defaultMaxListeners + 1; i++) { + requests.push(request()); + } + + Promise.all(requests).then(common.mustCall()).finally(common.mustCall(() => { + server.close(); + client.close(); + })); +})); diff --git a/tests/node_compat/test/parallel/test-http2-compat-expect-handling.js b/tests/node_compat/test/parallel/test-http2-compat-expect-handling.js new file mode 100644 index 00000000000000..074c76680a2f51 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http2-compat-expect-handling.js @@ -0,0 +1,52 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); +const assert = require('assert'); +const http2 = require('http2'); + +const expectValue = 'meoww'; + +const server = http2.createServer(common.mustNotCall()); + +server.once('checkExpectation', common.mustCall((req, res) => { + assert.strictEqual(req.headers.expect, expectValue); + res.statusCode = 417; + res.end(); +})); + +server.listen(0, common.mustCall(() => nextTest(2))); + +function nextTest(testsToRun) { + if (!testsToRun) { + return server.close(); + } + + const port = server.address().port; + const client = http2.connect(`http://localhost:${port}`); + const req = client.request({ + ':path': '/', + ':method': 'GET', + ':scheme': 'http', + ':authority': `localhost:${port}`, + 'expect': expectValue + }); + + req.on('response', common.mustCall((headers) => { + assert.strictEqual(headers[':status'], 417); + req.resume(); + })); + + req.on('end', common.mustCall(() => { + client.close(); + nextTest(testsToRun - 1); + })); +} diff --git a/tests/node_compat/test/parallel/test-http2-compat-socket-set.js b/tests/node_compat/test/parallel/test-http2-compat-socket-set.js new file mode 100644 index 00000000000000..1346226863c4b3 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http2-compat-socket-set.js @@ -0,0 +1,104 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); +const assert = require('assert'); +const h2 = require('http2'); + +// Tests behavior of the proxied socket in Http2ServerRequest +// & Http2ServerResponse - specifically property setters + +const errMsg = { + code: 'ERR_HTTP2_NO_SOCKET_MANIPULATION', + name: 'Error', + message: 'HTTP/2 sockets should not be directly manipulated ' + + '(e.g. read and written)' +}; + +const server = h2.createServer(); + +server.on('request', common.mustCall(function(request, response) { + const noop = () => {}; + + assert.strictEqual(request.stream.destroyed, false); + request.socket.destroyed = true; + assert.strictEqual(request.stream.destroyed, true); + request.socket.destroyed = false; + + assert.strictEqual(request.stream.readable, true); + request.socket.readable = false; + assert.strictEqual(request.stream.readable, false); + + assert.strictEqual(request.stream.writable, true); + request.socket.writable = false; + assert.strictEqual(request.stream.writable, false); + + const realOn = request.stream.on; + request.socket.on = noop; + assert.strictEqual(request.stream.on, noop); + request.stream.on = realOn; + + const realOnce = request.stream.once; + request.socket.once = noop; + assert.strictEqual(request.stream.once, noop); + request.stream.once = realOnce; + + const realEnd = request.stream.end; + request.socket.end = noop; + assert.strictEqual(request.stream.end, noop); + request.socket.end = common.mustCall(); + request.socket.end(); + request.stream.end = realEnd; + + const realEmit = request.stream.emit; + request.socket.emit = noop; + assert.strictEqual(request.stream.emit, noop); + request.stream.emit = realEmit; + + const realDestroy = request.stream.destroy; + request.socket.destroy = noop; + assert.strictEqual(request.stream.destroy, noop); + request.stream.destroy = realDestroy; + + request.socket.setTimeout = noop; + assert.strictEqual(request.stream.session.setTimeout, noop); + + assert.strictEqual(request.stream.session.socket._isProcessing, undefined); + request.socket._isProcessing = true; + assert.strictEqual(request.stream.session.socket._isProcessing, true); + + assert.throws(() => request.socket.read = noop, errMsg); + assert.throws(() => request.socket.write = noop, errMsg); + assert.throws(() => request.socket.pause = noop, errMsg); + assert.throws(() => request.socket.resume = noop, errMsg); + + response.stream.destroy(); +})); + +server.listen(0, common.mustCall(function() { + const port = server.address().port; + const url = `http://localhost:${port}`; + const client = h2.connect(url, common.mustCall(function() { + const headers = { + ':path': '/', + ':method': 'GET', + ':scheme': 'http', + ':authority': `localhost:${port}` + }; + const request = client.request(headers); + request.on('end', common.mustCall(() => { + client.close(); + server.close(); + })); + request.end(); + request.resume(); + })); +})); diff --git a/tests/node_compat/test/parallel/test-http2-connect-options.js b/tests/node_compat/test/parallel/test-http2-connect-options.js new file mode 100644 index 00000000000000..fa9272ff33b42c --- /dev/null +++ b/tests/node_compat/test/parallel/test-http2-connect-options.js @@ -0,0 +1,48 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Flags: --expose-internals +'use strict'; +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +if (!common.hasMultiLocalhost()) + common.skip('platform-specific test.'); + +const http2 = require('http2'); +const assert = require('assert'); + +const server = http2.createServer((req, res) => { + console.log(`Connect from: ${req.connection.remoteAddress}`); + assert.strictEqual(req.connection.remoteAddress, '127.0.0.2'); + + req.on('end', common.mustCall(() => { + res.writeHead(200, { 'Content-Type': 'text/plain' }); + res.end(`You are from: ${req.connection.remoteAddress}`); + })); + req.resume(); +}); + +server.listen(0, '127.0.0.1', common.mustCall(() => { + const options = { localAddress: '127.0.0.2', family: 4 }; + + const client = http2.connect( + 'http://localhost:' + server.address().port, + options + ); + const req = client.request({ + ':path': '/' + }); + req.on('data', () => req.resume()); + req.on('end', common.mustCall(function() { + client.close(); + req.close(); + server.close(); + })); + req.end(); +})); diff --git a/tests/node_compat/test/parallel/test-http2-date-header.js b/tests/node_compat/test/parallel/test-http2-date-header.js new file mode 100644 index 00000000000000..0a8b9c9df3a6b1 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http2-date-header.js @@ -0,0 +1,36 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); +const assert = require('assert'); +const http2 = require('http2'); + +const server = http2.createServer(); + +server.on('stream', common.mustCall((stream) => { + // Date header is defaulted + stream.respond(); + stream.end(); +})); + +server.listen(0, common.mustCall(() => { + const client = http2.connect(`http://localhost:${server.address().port}`); + const req = client.request(); + req.on('response', common.mustCall((headers) => { + // The date header must be set to a non-invalid value + assert.notStrictEqual((new Date()).toString(), 'Invalid Date'); + })); + req.resume(); + req.on('end', common.mustCall(() => { + server.close(); + client.close(); + })); +})); diff --git a/tests/node_compat/test/parallel/test-http2-dont-override.js b/tests/node_compat/test/parallel/test-http2-dont-override.js new file mode 100644 index 00000000000000..c14863be39a0e8 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http2-dont-override.js @@ -0,0 +1,56 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); +const assert = require('assert'); +const http2 = require('http2'); + +const options = {}; + +const server = http2.createServer(options); + +// Options are defaulted but the options are not modified +assert.deepStrictEqual(Object.keys(options), []); + +server.on('stream', common.mustCall((stream) => { + const headers = {}; + const options = {}; + stream.respond(headers, options); + + // The headers are defaulted but the original object is not modified + assert.deepStrictEqual(Object.keys(headers), []); + + // Options are defaulted but the original object is not modified + assert.deepStrictEqual(Object.keys(options), []); + + stream.end(); +})); + +server.listen(0, common.mustCall(() => { + const client = http2.connect(`http://localhost:${server.address().port}`); + + const headers = {}; + const options = {}; + + const req = client.request(headers, options); + + // The headers are defaulted but the original object is not modified + assert.deepStrictEqual(Object.keys(headers), []); + + // Options are defaulted but the original object is not modified + assert.deepStrictEqual(Object.keys(options), []); + + req.resume(); + req.on('end', common.mustCall(() => { + server.close(); + client.close(); + })); +})); diff --git a/tests/node_compat/test/parallel/test-http2-endafterheaders.js b/tests/node_compat/test/parallel/test-http2-endafterheaders.js new file mode 100644 index 00000000000000..c1f9f0a55393a8 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http2-endafterheaders.js @@ -0,0 +1,57 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); +const assert = require('assert'); +const http2 = require('http2'); +const Countdown = require('../common/countdown'); + +const server = http2.createServer(); +server.on('stream', common.mustCall((stream, headers) => { + const check = headers[':method'] === 'GET'; + assert.strictEqual(stream.endAfterHeaders, check); + stream.on('data', common.mustNotCall()); + stream.on('end', common.mustCall()); + stream.respond(); + stream.end('ok'); +}, 2)); + +const countdown = new Countdown(2, () => server.close()); + +server.listen(0, common.mustCall(() => { + { + const client = http2.connect(`http://localhost:${server.address().port}`); + const req = client.request(); + + req.resume(); + req.on('response', common.mustCall(() => { + assert.strictEqual(req.endAfterHeaders, false); + })); + req.on('end', common.mustCall(() => { + client.close(); + countdown.dec(); + })); + } + { + const client = http2.connect(`http://localhost:${server.address().port}`); + const req = client.request({ ':method': 'POST' }); + + req.resume(); + req.end(); + req.on('response', common.mustCall(() => { + assert.strictEqual(req.endAfterHeaders, false); + })); + req.on('end', common.mustCall(() => { + client.close(); + countdown.dec(); + })); + } +})); diff --git a/tests/node_compat/test/parallel/test-http2-methods.js b/tests/node_compat/test/parallel/test-http2-methods.js new file mode 100644 index 00000000000000..b1597f8c033678 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http2-methods.js @@ -0,0 +1,56 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); +const assert = require('assert'); +const h2 = require('http2'); + +const server = h2.createServer(); + +const methods = ['GET', 'POST', 'PATCH', 'FOO', 'A_B_C']; +let expected = methods.length; + +// We use the lower-level API here +server.on('stream', common.mustCall(onStream, expected)); + +function onStream(stream, headers, flags) { + const method = headers[':method']; + assert.notStrictEqual(method, undefined); + assert(methods.includes(method), `method ${method} not included`); + stream.respond({ + 'content-type': 'text/html', + ':status': 200 + }); + stream.end('hello world'); +} + +server.listen(0); + +server.on('listening', common.mustCall(() => { + + const client = h2.connect(`http://localhost:${server.address().port}`); + + const headers = { ':path': '/' }; + + methods.forEach((method) => { + headers[':method'] = method; + const req = client.request(headers); + req.on('response', common.mustCall()); + req.resume(); + req.on('end', common.mustCall(() => { + if (--expected === 0) { + server.close(); + client.close(); + } + })); + req.end(); + }); +})); diff --git a/tests/node_compat/test/parallel/test-http2-request-response-proto.js b/tests/node_compat/test/parallel/test-http2-request-response-proto.js new file mode 100644 index 00000000000000..8f34cbc3397e76 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http2-request-response-proto.js @@ -0,0 +1,25 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); +const assert = require('assert'); +const http2 = require('http2'); + +const { + Http2ServerRequest, + Http2ServerResponse, +} = http2; + +const protoRequest = { __proto__: Http2ServerRequest.prototype }; +const protoResponse = { __proto__: Http2ServerResponse.prototype }; + +assert.strictEqual(protoRequest instanceof Http2ServerRequest, true); +assert.strictEqual(protoResponse instanceof Http2ServerResponse, true); diff --git a/tests/node_compat/test/parallel/test-http2-respond-file-204.js b/tests/node_compat/test/parallel/test-http2-respond-file-204.js new file mode 100644 index 00000000000000..f0a87337dc5685 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http2-respond-file-204.js @@ -0,0 +1,49 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); +const fixtures = require('../common/fixtures'); +const assert = require('assert'); +const http2 = require('http2'); + +const { + HTTP2_HEADER_CONTENT_TYPE, + HTTP2_HEADER_STATUS +} = http2.constants; + +const fname = fixtures.path('elipses.txt'); + +const server = http2.createServer(); +server.on('stream', (stream) => { + assert.throws(() => { + stream.respondWithFile(fname, { + [HTTP2_HEADER_STATUS]: 204, + [HTTP2_HEADER_CONTENT_TYPE]: 'text/plain' + }); + }, { + code: 'ERR_HTTP2_PAYLOAD_FORBIDDEN', + name: 'Error', + message: 'Responses with 204 status must not have a payload' + }); + stream.respond({}); + stream.end(); +}); +server.listen(0, () => { + const client = http2.connect(`http://localhost:${server.address().port}`); + const req = client.request(); + req.on('response', common.mustCall()); + req.on('data', common.mustNotCall()); + req.on('end', common.mustCall(() => { + client.close(); + server.close(); + })); + req.end(); +}); diff --git a/tests/node_compat/test/parallel/test-http2-respond-file-compat.js b/tests/node_compat/test/parallel/test-http2-respond-file-compat.js new file mode 100644 index 00000000000000..e8c78ce3ab39bb --- /dev/null +++ b/tests/node_compat/test/parallel/test-http2-respond-file-compat.js @@ -0,0 +1,31 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); +const http2 = require('http2'); +const fixtures = require('../common/fixtures'); + +const fname = fixtures.path('elipses.txt'); + +const server = http2.createServer(common.mustCall((request, response) => { + response.stream.respondWithFile(fname); +})); +server.listen(0, () => { + const client = http2.connect(`http://localhost:${server.address().port}`); + const req = client.request(); + req.on('response', common.mustCall()); + req.on('end', common.mustCall(() => { + client.close(); + server.close(); + })); + req.end(); + req.resume(); +}); diff --git a/tests/node_compat/test/parallel/test-http2-session-timeout.js b/tests/node_compat/test/parallel/test-http2-session-timeout.js new file mode 100644 index 00000000000000..84c549aa96acca --- /dev/null +++ b/tests/node_compat/test/parallel/test-http2-session-timeout.js @@ -0,0 +1,71 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); +const assert = require('assert'); +const http2 = require('http2'); +const hrtime = process.hrtime.bigint; +const NS_PER_MS = 1_000_000n; + +let requests = 0; +const mustNotCall = () => { + assert.fail(`Timeout after ${requests} request(s)`); +}; + +const server = http2.createServer(); +// Disable server timeout until first request. We will set the timeout based on +// how long the first request takes. +server.timeout = 0n; + +server.on('request', (req, res) => res.end()); +server.on('timeout', mustNotCall); + +server.listen(0, common.mustCall(() => { + const port = server.address().port; + + const url = `http://localhost:${port}`; + const client = http2.connect(url); + let startTime = hrtime(); + makeReq(); + + function makeReq() { + const request = client.request({ + ':path': '/foobar', + ':method': 'GET', + ':scheme': 'http', + ':authority': `localhost:${port}`, + }); + request.resume(); + request.end(); + + requests += 1; + + request.on('end', () => { + const diff = hrtime() - startTime; + const milliseconds = diff / NS_PER_MS; + if (server.timeout === 0n) { + // Set the timeout now. First connection will take significantly longer + // than subsequent connections, so using the duration of the first + // connection as the timeout should be robust. Double it anyway for good + // measure. + server.timeout = milliseconds * 2n; + startTime = hrtime(); + makeReq(); + } else if (milliseconds < server.timeout * 2n) { + makeReq(); + } else { + server.removeListener('timeout', mustNotCall); + server.close(); + client.close(); + } + }); + } +})); diff --git a/tests/node_compat/test/parallel/test-http2-socket-proxy.js b/tests/node_compat/test/parallel/test-http2-socket-proxy.js new file mode 100644 index 00000000000000..c24ca299828695 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http2-socket-proxy.js @@ -0,0 +1,133 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Flags: --expose-internals + +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); +const assert = require('assert'); +const h2 = require('http2'); +const net = require('net'); +const util = require('util'); + +const { kTimeout } = require('internal/timers'); + +// Tests behavior of the proxied socket on Http2Session + +const errMsg = { + code: 'ERR_HTTP2_NO_SOCKET_MANIPULATION', + name: 'Error', + message: 'HTTP/2 sockets should not be directly manipulated ' + + '(e.g. read and written)' +}; + +const server = h2.createServer(); + +server.on('stream', common.mustCall(function(stream, headers) { + const socket = stream.session.socket; + const session = stream.session; + + assert.ok(socket instanceof net.Socket); + + assert.strictEqual(socket.writable, true); + assert.strictEqual(socket.readable, true); + assert.strictEqual(typeof socket.address(), 'object'); + + socket.setTimeout(987); + assert.strictEqual(session[kTimeout]._idleTimeout, 987); + + // The indentation is corrected depending on the depth. + let inspectedTimeout = util.inspect(session[kTimeout]); + assert(inspectedTimeout.includes(' _idlePrev: [TimersList]')); + assert(inspectedTimeout.includes(' _idleNext: [TimersList]')); + assert(!inspectedTimeout.includes(' _idleNext: [TimersList]')); + + inspectedTimeout = util.inspect([ session[kTimeout] ]); + assert(inspectedTimeout.includes(' _idlePrev: [TimersList]')); + assert(inspectedTimeout.includes(' _idleNext: [TimersList]')); + assert(!inspectedTimeout.includes(' _idleNext: [TimersList]')); + + const inspectedTimersList = util.inspect([[ session[kTimeout]._idlePrev ]]); + assert(inspectedTimersList.includes(' _idlePrev: [Timeout]')); + assert(inspectedTimersList.includes(' _idleNext: [Timeout]')); + assert(!inspectedTimersList.includes(' _idleNext: [Timeout]')); + + assert.throws(() => socket.destroy, errMsg); + assert.throws(() => socket.emit, errMsg); + assert.throws(() => socket.end, errMsg); + assert.throws(() => socket.pause, errMsg); + assert.throws(() => socket.read, errMsg); + assert.throws(() => socket.resume, errMsg); + assert.throws(() => socket.write, errMsg); + assert.throws(() => socket.setEncoding, errMsg); + assert.throws(() => socket.setKeepAlive, errMsg); + assert.throws(() => socket.setNoDelay, errMsg); + + assert.throws(() => (socket.destroy = undefined), errMsg); + assert.throws(() => (socket.emit = undefined), errMsg); + assert.throws(() => (socket.end = undefined), errMsg); + assert.throws(() => (socket.pause = undefined), errMsg); + assert.throws(() => (socket.read = undefined), errMsg); + assert.throws(() => (socket.resume = undefined), errMsg); + assert.throws(() => (socket.write = undefined), errMsg); + assert.throws(() => (socket.setEncoding = undefined), errMsg); + assert.throws(() => (socket.setKeepAlive = undefined), errMsg); + assert.throws(() => (socket.setNoDelay = undefined), errMsg); + + // Resetting the socket listeners to their own value should not throw. + socket.on = socket.on; // eslint-disable-line no-self-assign + socket.once = socket.once; // eslint-disable-line no-self-assign + + socket.unref(); + assert.strictEqual(socket._handle.hasRef(), false); + socket.ref(); + assert.strictEqual(socket._handle.hasRef(), true); + + stream.respond(); + + socket.writable = true; + socket.readable = true; + assert.strictEqual(socket.writable, true); + assert.strictEqual(socket.readable, true); + socket.writable = false; + socket.readable = false; + assert.strictEqual(socket.writable, false); + assert.strictEqual(socket.readable, false); + + stream.end(); + + // Setting socket properties sets the session properties correctly. + const fn = () => {}; + socket.setTimeout = fn; + assert.strictEqual(session.setTimeout, fn); + + socket.ref = fn; + assert.strictEqual(session.ref, fn); + + socket.unref = fn; + assert.strictEqual(session.unref, fn); + + stream.session.on('close', common.mustCall(() => { + assert.strictEqual(session.socket, undefined); + })); +})); + +server.listen(0, common.mustCall(function() { + const port = server.address().port; + const url = `http://localhost:${port}`; + const client = h2.connect(url, common.mustCall(() => { + const request = client.request(); + request.on('end', common.mustCall(() => { + client.close(); + server.close(); + })); + request.resume(); + })); +})); diff --git a/tests/node_compat/test/parallel/test-http2-status-code-invalid.js b/tests/node_compat/test/parallel/test-http2-status-code-invalid.js new file mode 100644 index 00000000000000..3a5e46af843bd4 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http2-status-code-invalid.js @@ -0,0 +1,48 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); +const assert = require('assert'); +const http2 = require('http2'); + +const server = http2.createServer(); + +function expectsError(code) { + return common.expectsError({ + code: 'ERR_HTTP2_STATUS_INVALID', + name: 'RangeError', + message: `Invalid status code: ${code}` + }); +} + +server.on('stream', common.mustCall((stream) => { + + // Anything lower than 100 and greater than 599 is rejected + [ 99, 700, 1000 ].forEach((i) => { + assert.throws(() => stream.respond({ ':status': i }), expectsError(i)); + }); + + stream.respond(); + stream.end(); +})); + +server.listen(0, common.mustCall(() => { + const client = http2.connect(`http://localhost:${server.address().port}`); + const req = client.request(); + req.on('response', common.mustCall((headers) => { + assert.strictEqual(headers[':status'], 200); + })); + req.resume(); + req.on('end', common.mustCall(() => { + server.close(); + client.close(); + })); +})); diff --git a/tests/node_compat/test/parallel/test-http2-status-code.js b/tests/node_compat/test/parallel/test-http2-status-code.js new file mode 100644 index 00000000000000..4af94b0cb7de87 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http2-status-code.js @@ -0,0 +1,48 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); +const assert = require('assert'); +const http2 = require('http2'); + +const codes = [ 200, 202, 300, 400, 404, 451, 500 ]; +let test = 0; + +const server = http2.createServer(); + +server.on('stream', common.mustCall((stream) => { + const status = codes[test++]; + stream.respond({ ':status': status }, { endStream: true }); +}, 7)); + +server.listen(0, common.mustCall(() => { + const client = http2.connect(`http://localhost:${server.address().port}`); + + let remaining = codes.length; + function maybeClose() { + if (--remaining === 0) { + client.close(); + server.close(); + } + } + + function doTest(expected) { + const req = client.request(); + req.on('response', common.mustCall((headers) => { + assert.strictEqual(headers[':status'], expected); + })); + req.resume(); + req.on('end', common.mustCall(maybeClose)); + } + + for (let n = 0; n < codes.length; n++) + doTest(codes[n]); +})); diff --git a/tests/node_compat/test/parallel/test-http2-stream-removelisteners-after-close.js b/tests/node_compat/test/parallel/test-http2-stream-removelisteners-after-close.js new file mode 100644 index 00000000000000..e528dc2670cbd4 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http2-stream-removelisteners-after-close.js @@ -0,0 +1,38 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); +const http2 = require('http2'); + +// Regression test for https://github.com/nodejs/node/issues/29457: +// HTTP/2 stream event listeners can be added and removed after the +// session has been destroyed. + +const server = http2.createServer((req, res) => { + res.end('Hi!\n'); +}); + +server.listen(0, common.mustCall(() => { + const client = http2.connect(`http://localhost:${server.address().port}`); + const headers = { ':path': '/' }; + const req = client.request(headers); + + req.on('close', common.mustCall(() => { + req.removeAllListeners(); + req.on('priority', common.mustNotCall()); + server.close(); + })); + + req.on('priority', common.mustNotCall()); + req.on('error', common.mustCall()); + + client.destroy(); +})); diff --git a/tests/node_compat/test/parallel/test-http2-write-empty-string.js b/tests/node_compat/test/parallel/test-http2-write-empty-string.js new file mode 100644 index 00000000000000..aea523d5d58a05 --- /dev/null +++ b/tests/node_compat/test/parallel/test-http2-write-empty-string.js @@ -0,0 +1,48 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); +const assert = require('assert'); +const http2 = require('http2'); + +const server = http2.createServer(function(request, response) { + response.writeHead(200, { 'Content-Type': 'text/plain' }); + response.write('1\n'); + response.write(''); + response.write('2\n'); + response.write(''); + response.end('3\n'); + + this.close(); +}); + +server.listen(0, common.mustCall(function() { + const client = http2.connect(`http://localhost:${this.address().port}`); + const headers = { ':path': '/' }; + const req = client.request(headers).setEncoding('ascii'); + + let res = ''; + + req.on('response', common.mustCall(function(headers) { + assert.strictEqual(headers[':status'], 200); + })); + + req.on('data', (chunk) => { + res += chunk; + }); + + req.on('end', common.mustCall(function() { + assert.strictEqual(res, '1\n2\n3\n'); + client.close(); + })); + + req.end(); +})); diff --git a/tests/node_compat/test/parallel/test-https-client-renegotiation-limit.js b/tests/node_compat/test/parallel/test-https-client-renegotiation-limit.js new file mode 100644 index 00000000000000..a612de29a65f22 --- /dev/null +++ b/tests/node_compat/test/parallel/test-https-client-renegotiation-limit.js @@ -0,0 +1,118 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +if (!common.opensslCli) + common.skip('node compiled without OpenSSL CLI.'); + +const assert = require('assert'); +const tls = require('tls'); +const https = require('https'); +const fixtures = require('../common/fixtures'); + +// Renegotiation as a protocol feature was dropped after TLS1.2. +tls.DEFAULT_MAX_VERSION = 'TLSv1.2'; + +// Renegotiation limits to test +const LIMITS = [0, 1, 2, 3, 5, 10, 16]; + +{ + let n = 0; + function next() { + if (n >= LIMITS.length) return; + tls.CLIENT_RENEG_LIMIT = LIMITS[n++]; + test(next); + } + next(); +} + +function test(next) { + const options = { + cert: fixtures.readKey('rsa_cert.crt'), + key: fixtures.readKey('rsa_private.pem'), + }; + + const server = https.createServer(options, (req, res) => { + const conn = req.connection; + conn.on('error', (err) => { + console.error(`Caught exception: ${err}`); + assert.match(err.message, /TLS session renegotiation attack/); + conn.destroy(); + }); + res.end('ok'); + }); + + server.listen(0, () => { + const agent = https.Agent({ + keepAlive: true, + }); + + let client; + let renegs = 0; + + const options = { + rejectUnauthorized: false, + agent, + }; + + const { port } = server.address(); + + https.get(`https://localhost:${port}/`, options, (res) => { + client = res.socket; + + client.on('close', (hadErr) => { + assert.strictEqual(hadErr, false); + assert.strictEqual(renegs, tls.CLIENT_RENEG_LIMIT + 1); + server.close(); + process.nextTick(next); + }); + + client.on('error', (err) => { + console.log('CLIENT ERR', err); + throw err; + }); + + spam(); + + // Simulate renegotiation attack + function spam() { + client.renegotiate({}, (err) => { + assert.ifError(err); + assert.ok(renegs <= tls.CLIENT_RENEG_LIMIT); + setImmediate(spam); + }); + renegs++; + } + }); + + }); +} diff --git a/tests/node_compat/test/parallel/test-https-connecting-to-http.js b/tests/node_compat/test/parallel/test-https-connecting-to-http.js new file mode 100644 index 00000000000000..ecb049fba2ee2d --- /dev/null +++ b/tests/node_compat/test/parallel/test-https-connecting-to-http.js @@ -0,0 +1,47 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +// This tests the situation where you try to connect a https client +// to an http server. You should get an error and exit. +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const http = require('http'); +const https = require('https'); +const server = http.createServer(common.mustNotCall()); + +server.listen(0, common.mustCall(function() { + const req = https.get({ port: this.address().port }, common.mustNotCall()); + + req.on('error', common.mustCall(function(e) { + console.log('Got expected error: ', e.message); + server.close(); + })); +})); diff --git a/tests/node_compat/test/parallel/test-https-foafssl.js b/tests/node_compat/test/parallel/test-https-foafssl.js new file mode 100644 index 00000000000000..faa5376f0125f5 --- /dev/null +++ b/tests/node_compat/test/parallel/test-https-foafssl.js @@ -0,0 +1,96 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +if (!common.opensslCli) + common.skip('node compiled without OpenSSL CLI.'); + +const assert = require('assert'); +const fixtures = require('../common/fixtures'); +const https = require('https'); +const spawn = require('child_process').spawn; + +const options = { + key: fixtures.readKey('rsa_private.pem'), + cert: fixtures.readKey('rsa_cert.crt'), + requestCert: true, + rejectUnauthorized: false +}; + +const webIdUrl = 'URI:http://example.com/#me'; +const modulus = fixtures.readKey('rsa_cert_foafssl_b.modulus', 'ascii').replace(/\n/g, ''); +const exponent = fixtures.readKey('rsa_cert_foafssl_b.exponent', 'ascii').replace(/\n/g, ''); + +const CRLF = '\r\n'; +const body = 'hello world\n'; +let cert; + +const server = https.createServer(options, common.mustCall(function(req, res) { + console.log('got request'); + + cert = req.connection.getPeerCertificate(); + + assert.strictEqual(cert.subjectaltname, webIdUrl); + assert.strictEqual(cert.exponent, exponent); + assert.strictEqual(cert.modulus, modulus); + res.writeHead(200, { 'content-type': 'text/plain' }); + res.end(body, () => { console.log('stream finished'); }); + console.log('sent response'); +})); + +server.listen(0, function() { + const args = ['s_client', + '-quiet', + '-connect', `127.0.0.1:${this.address().port}`, + '-cert', fixtures.path('keys/rsa_cert_foafssl_b.crt'), + '-key', fixtures.path('keys/rsa_private_b.pem')]; + + const client = spawn(common.opensslCli, args); + + client.stdout.on('data', function(data) { + console.log('response received'); + const message = data.toString(); + const contents = message.split(CRLF + CRLF).pop(); + assert.strictEqual(body, contents); + server.close((e) => { + assert.ifError(e); + console.log('server closed'); + }); + console.log('server.close() called'); + }); + + client.stdin.write('GET /\n\n'); + + client.on('error', function(error) { + throw error; + }); +}); diff --git a/tests/node_compat/test/parallel/test-https-localaddress-bind-error.js b/tests/node_compat/test/parallel/test-https-localaddress-bind-error.js new file mode 100644 index 00000000000000..304f0b28574402 --- /dev/null +++ b/tests/node_compat/test/parallel/test-https-localaddress-bind-error.js @@ -0,0 +1,69 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const assert = require('assert'); +const https = require('https'); + +const fixtures = require('../common/fixtures'); + +const options = { + key: fixtures.readKey('agent1-key.pem'), + cert: fixtures.readKey('agent1-cert.pem') +}; + +const invalidLocalAddress = '1.2.3.4'; + +const server = https.createServer(options, function(req, res) { + console.log(`Connect from: ${req.connection.remoteAddress}`); + + req.on('end', function() { + res.writeHead(200, { 'Content-Type': 'text/plain' }); + res.end(`You are from: ${req.connection.remoteAddress}`); + }); + req.resume(); +}); + +server.listen(0, '127.0.0.1', common.mustCall(function() { + https.request({ + host: 'localhost', + port: this.address().port, + path: '/', + method: 'GET', + localAddress: invalidLocalAddress + }, function(res) { + assert.fail('unexpectedly got response from server'); + }).on('error', common.mustCall(function(e) { + console.log(`client got error: ${e.message}`); + server.close(); + })).end(); +})); diff --git a/tests/node_compat/test/parallel/test-https-localaddress.js b/tests/node_compat/test/parallel/test-https-localaddress.js new file mode 100644 index 00000000000000..a988c94a388965 --- /dev/null +++ b/tests/node_compat/test/parallel/test-https-localaddress.js @@ -0,0 +1,76 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// Flags: --expose-internals +'use strict'; +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +if (!common.hasMultiLocalhost()) + common.skip('platform-specific test.'); + +const fixtures = require('../common/fixtures'); +const assert = require('assert'); +const https = require('https'); + +const options = { + key: fixtures.readKey('agent1-key.pem'), + cert: fixtures.readKey('agent1-cert.pem') +}; + +const server = https.createServer(options, function(req, res) { + console.log(`Connect from: ${req.connection.remoteAddress}`); + assert.strictEqual(req.connection.remoteAddress, '127.0.0.2'); + + req.on('end', function() { + res.writeHead(200, { 'Content-Type': 'text/plain' }); + res.end(`You are from: ${req.connection.remoteAddress}`); + }); + req.resume(); +}); + +server.listen(0, '127.0.0.1', function() { + const options = { + host: 'localhost', + port: this.address().port, + family: 4, + path: '/', + method: 'GET', + localAddress: '127.0.0.2', + rejectUnauthorized: false + }; + + const req = https.request(options, function(res) { + res.on('end', function() { + server.close(); + }); + res.resume(); + }); + req.end(); +}); diff --git a/tests/node_compat/test/parallel/test-icu-data-dir.js b/tests/node_compat/test/parallel/test-icu-data-dir.js new file mode 100644 index 00000000000000..5054de86ef6504 --- /dev/null +++ b/tests/node_compat/test/parallel/test-icu-data-dir.js @@ -0,0 +1,40 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Flags: --expose-internals +'use strict'; +const common = require('../common'); +const { spawnSyncAndExit } = require('../common/child_process'); +const { internalBinding } = require('internal/test/binding'); + +const { hasSmallICU } = internalBinding('config'); +if (!(common.hasIntl && hasSmallICU)) + common.skip('missing Intl'); + +{ + spawnSyncAndExit( + process.execPath, + ['--icu-data-dir=/', '-e', '0'], + { + status: 9, + signal: null, + stderr: /Could not initialize ICU/ + }); +} + +{ + const env = { ...process.env, NODE_ICU_DATA: '/' }; + spawnSyncAndExit( + process.execPath, + ['-e', '0'], + { env }, + { + status: 9, + signal: null, + stderr: /Could not initialize ICU/ + }); +} diff --git a/tests/node_compat/test/parallel/test-icu-env.js b/tests/node_compat/test/parallel/test-icu-env.js new file mode 100644 index 00000000000000..4a9545d2ca483d --- /dev/null +++ b/tests/node_compat/test/parallel/test-icu-env.js @@ -0,0 +1,295 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const { execFileSync } = require('child_process'); + +// system-icu should not be tested +const hasBuiltinICU = process.config.variables.icu_gyp_path === 'tools/icu/icu-generic.gyp'; +if (!hasBuiltinICU) + common.skip('system ICU'); + +// small-icu doesn't support non-English locales +const hasFullICU = (() => { + try { + const january = new Date(9e8); + const spanish = new Intl.DateTimeFormat('es', { month: 'long' }); + return spanish.format(january) === 'enero'; + } catch { + return false; + } +})(); +if (!hasFullICU) + common.skip('small ICU'); + +const icuVersionMajor = Number(process.config.variables.icu_ver_major ?? 0); +if (icuVersionMajor < 71) + common.skip('ICU too old'); + + +function runEnvOutside(addEnv, code, ...args) { + return execFileSync( + process.execPath, + ['-e', `process.stdout.write(String(${code}));`], + { env: { ...process.env, ...addEnv }, encoding: 'utf8' } + ); +} + +function runEnvInside(addEnv, func, ...args) { + Object.assign(process.env, addEnv); // side effects! + return func(...args); +} + +function isPack(array) { + const firstItem = array[0]; + return array.every((item) => item === firstItem); +} + +function isSet(array) { + const deduped = new Set(array); + return array.length === deduped.size; +} + + +const localesISO639 = [ + 'eng', 'cmn', 'hin', 'spa', + 'fra', 'arb', 'ben', 'rus', + 'por', 'urd', 'ind', 'deu', + 'jpn', 'pcm', 'mar', 'tel', +]; + +const locales = [ + 'en', 'zh', 'hi', 'es', + 'fr', 'ar', 'bn', 'ru', + 'pt', 'ur', 'id', 'de', + 'ja', 'pcm', 'mr', 'te', +]; + +// These must not overlap +const zones = [ + 'America/New_York', + 'UTC', + 'Asia/Irkutsk', + 'Australia/North', + 'Antarctica/South_Pole', +]; + + +assert.deepStrictEqual(Intl.getCanonicalLocales(localesISO639), locales); + + +// On some platforms these keep original locale (for example, 'January') +const enero = runEnvOutside( + { LANG: 'es' }, + 'new Intl.DateTimeFormat(undefined, { month: "long" } ).format(new Date(9e8))' +); +const janvier = runEnvOutside( + { LANG: 'fr' }, + 'new Intl.DateTimeFormat(undefined, { month: "long" } ).format(new Date(9e8))' +); +const isMockable = enero !== janvier; + +// Tests with mocked env +if (isMockable) { + assert.strictEqual( + isSet(zones.map((TZ) => runEnvOutside({ TZ }, 'new Date(333333333333).toString()'))), + true + ); + assert.strictEqual( + isSet(zones.map((TZ) => runEnvOutside({ TZ }, 'new Date(333333333333).toLocaleString()'))), + true + ); + assert.deepStrictEqual( + locales.map((LANG) => runEnvOutside({ LANG, TZ: 'Europe/Zurich' }, 'new Date(333333333333).toString()')), + [ + 'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)', + 'Fri Jul 25 1980 01:35:33 GMT+0100 (中欧标准时间)', + 'Fri Jul 25 1980 01:35:33 GMT+0100 (मध्य यूरोपीय मानक समय)', + 'Fri Jul 25 1980 01:35:33 GMT+0100 (hora estándar de Europa central)', + 'Fri Jul 25 1980 01:35:33 GMT+0100 (heure normale d’Europe centrale)', + 'Fri Jul 25 1980 01:35:33 GMT+0100 (توقيت وسط أوروبا الرسمي)', + 'Fri Jul 25 1980 01:35:33 GMT+0100 (মধ্য ইউরোপীয় মানক সময়)', + 'Fri Jul 25 1980 01:35:33 GMT+0100 (Центральная Европа, стандартное время)', + 'Fri Jul 25 1980 01:35:33 GMT+0100 (Horário Padrão da Europa Central)', + 'Fri Jul 25 1980 01:35:33 GMT+0100 (وسطی یورپ کا معیاری وقت)', + 'Fri Jul 25 1980 01:35:33 GMT+0100 (Waktu Standar Eropa Tengah)', + 'Fri Jul 25 1980 01:35:33 GMT+0100 (Mitteleuropäische Normalzeit)', + 'Fri Jul 25 1980 01:35:33 GMT+0100 (中央ヨーロッパ標準時)', + 'Fri Jul 25 1980 01:35:33 GMT+0100 (Mídúl Yúrop Fíksd Taim)', + 'Fri Jul 25 1980 01:35:33 GMT+0100 (मध्‍य युरोपियन प्रमाण वेळ)', + 'Fri Jul 25 1980 01:35:33 GMT+0100 (సెంట్రల్ యూరోపియన్ ప్రామాణిక సమయం)', + ] + ); + assert.deepStrictEqual( + locales.map((LANG) => runEnvOutside({ LANG, TZ: 'Europe/Zurich' }, 'new Date(333333333333).toLocaleString()')), + [ + '7/25/1980, 1:35:33 AM', + '1980/7/25 01:35:33', + '25/7/1980, 1:35:33 am', + '25/7/1980, 1:35:33', + '25/07/1980 01:35:33', + '٢٥‏/٧‏/١٩٨٠، ١:٣٥:٣٣ ص', + '২৫/৭/১৯৮০, ১:৩৫:৩৩ AM', + '25.07.1980, 01:35:33', + '25/07/1980, 01:35:33', + '25/7/1980، 1:35:33 AM', + '25/7/1980, 01.35.33', + '25.7.1980, 01:35:33', + '1980/7/25 1:35:33', + '25/7/1980 01:35:33', + '२५/७/१९८०, १:३५:३३ AM', + '25/7/1980 1:35:33 AM', + ] + ); + assert.strictEqual( + runEnvOutside({ LANG: 'en' }, '["z", "ä"].sort(new Intl.Collator().compare)'), + 'ä,z' + ); + assert.strictEqual( + runEnvOutside({ LANG: 'sv' }, '["z", "ä"].sort(new Intl.Collator().compare)'), + 'z,ä' + ); + assert.deepStrictEqual( + locales.map( + (LANG) => runEnvOutside({ LANG, TZ: 'Europe/Zurich' }, 'new Intl.DateTimeFormat().format(333333333333)') + ), + [ + '7/25/1980', '1980/7/25', + '25/7/1980', '25/7/1980', + '25/07/1980', '٢٥‏/٧‏/١٩٨٠', + '২৫/৭/১৯৮০', '25.07.1980', + '25/07/1980', '25/7/1980', + '25/7/1980', '25.7.1980', + '1980/7/25', '25/7/1980', + '२५/७/१९८०', '25/7/1980', + ] + ); + assert.deepStrictEqual( + locales.map((LANG) => runEnvOutside({ LANG }, 'new Intl.DisplayNames(undefined, { type: "region" }).of("CH")')), + [ + 'Switzerland', '瑞士', + 'स्विट्ज़रलैंड', 'Suiza', + 'Suisse', 'سويسرا', + 'সুইজারল্যান্ড', 'Швейцария', + 'Suíça', 'سوئٹزر لینڈ', + 'Swiss', 'Schweiz', + 'スイス', 'Swítsaland', + 'स्वित्झर्लंड', 'స్విట్జర్లాండ్', + ] + ); + assert.deepStrictEqual( + locales.map((LANG) => runEnvOutside({ LANG }, 'new Intl.NumberFormat().format(275760.913)')), + [ + '275,760.913', '275,760.913', + '2,75,760.913', '275.760,913', + '275 760,913', '٢٧٥٬٧٦٠٫٩١٣', + '২,৭৫,৭৬০.৯১৩', '275 760,913', + '275.760,913', '275,760.913', + '275.760,913', '275.760,913', + '275,760.913', '275,760.913', + '२,७५,७६०.९१३', '2,75,760.913', + ] + ); + assert.deepStrictEqual( + locales.map((LANG) => runEnvOutside({ LANG }, 'new Intl.PluralRules().select(0)')), + [ + 'other', 'other', 'one', 'other', + 'one', 'zero', 'one', 'many', + 'one', 'other', 'other', 'other', + 'other', 'one', 'other', 'other', + ] + ); + assert.deepStrictEqual( + locales.map((LANG) => runEnvOutside({ LANG }, 'new Intl.RelativeTimeFormat().format(-586920.617, "hour")')), + [ + '586,920.617 hours ago', + '586,920.617小时前', + '5,86,920.617 घंटे पहले', + 'hace 586.920,617 horas', + 'il y a 586 920,617 heures', + 'قبل ٥٨٦٬٩٢٠٫٦١٧ ساعة', + '৫,৮৬,৯২০.৬১৭ ঘন্টা আগে', + '586 920,617 часа назад', + 'há 586.920,617 horas', + '586,920.617 گھنٹے پہلے', + '586.920,617 jam yang lalu', + 'vor 586.920,617 Stunden', + '586,920.617 時間前', + '586,920.617 áwa wé dọ́n pas', + '५,८६,९२०.६१७ तासांपूर्वी', + '5,86,920.617 గంటల క్రితం', + ] + ); +} + + +// Tests with process.env mutated inside +{ + // process.env.TZ is not intercepted in Workers + if (common.isMainThread) { + assert.strictEqual( + isSet(zones.map((TZ) => runEnvInside({ TZ }, () => new Date(333333333333).toString()))), + true + ); + assert.strictEqual( + isSet(zones.map((TZ) => runEnvInside({ TZ }, () => new Date(333333333333).toLocaleString()))), + true + ); + } else { + assert.strictEqual( + isPack(zones.map((TZ) => runEnvInside({ TZ }, () => new Date(333333333333).toString()))), + true + ); + assert.strictEqual( + isPack(zones.map((TZ) => runEnvInside({ TZ }, () => new Date(333333333333).toLocaleString()))), + true + ); + } + + assert.strictEqual( + isPack(locales.map((LANG) => runEnvInside({ LANG, TZ: 'Europe/Zurich' }, () => new Date(333333333333).toString()))), + true + ); + assert.strictEqual( + isPack(locales.map( + (LANG) => runEnvInside({ LANG, TZ: 'Europe/Zurich' }, () => new Date(333333333333).toLocaleString()) + )), + true + ); + assert.deepStrictEqual( + runEnvInside({ LANG: 'en' }, () => ['z', 'ä'].sort(new Intl.Collator().compare)), + runEnvInside({ LANG: 'sv' }, () => ['z', 'ä'].sort(new Intl.Collator().compare)) + ); + assert.strictEqual( + isPack(locales.map( + (LANG) => runEnvInside({ LANG, TZ: 'Europe/Zurich' }, () => new Intl.DateTimeFormat().format(333333333333)) + )), + true + ); + assert.strictEqual( + isPack(locales.map( + (LANG) => runEnvInside({ LANG }, () => new Intl.DisplayNames(undefined, { type: 'region' }).of('CH')) + )), + true + ); + assert.strictEqual( + isPack(locales.map((LANG) => runEnvInside({ LANG }, () => new Intl.NumberFormat().format(275760.913)))), + true + ); + assert.strictEqual( + isPack(locales.map((LANG) => runEnvInside({ LANG }, () => new Intl.PluralRules().select(0)))), + true + ); + assert.strictEqual( + isPack(locales.map( + (LANG) => runEnvInside({ LANG }, () => new Intl.RelativeTimeFormat().format(-586920.617, 'hour')) + )), + true + ); +} diff --git a/tests/node_compat/test/parallel/test-icu-stringwidth.js b/tests/node_compat/test/parallel/test-icu-stringwidth.js new file mode 100644 index 00000000000000..3e3c1f0c311acf --- /dev/null +++ b/tests/node_compat/test/parallel/test-icu-stringwidth.js @@ -0,0 +1,102 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Flags: --expose-internals +'use strict'; +const common = require('../common'); + +const assert = require('assert'); +const { getStringWidth } = require('internal/util/inspect'); + +// Test column width + +// Ll (Lowercase Letter): LATIN SMALL LETTER A +assert.strictEqual(getStringWidth('a'), 1); +assert.strictEqual(getStringWidth(String.fromCharCode(0x0061)), 1); +// Lo (Other Letter) +assert.strictEqual(getStringWidth('丁'), 2); +assert.strictEqual(getStringWidth(String.fromCharCode(0x4E01)), 2); +// Surrogate pairs +assert.strictEqual(getStringWidth('\ud83d\udc78\ud83c\udfff'), 4); +assert.strictEqual(getStringWidth('👅'), 2); +// Cs (Surrogate): High Surrogate +assert.strictEqual(getStringWidth('\ud83d'), 1); +// Cs (Surrogate): Low Surrogate +assert.strictEqual(getStringWidth('\udc78'), 1); +// Cc (Control): NULL +assert.strictEqual(getStringWidth('\u0000'), 0); +// Cc (Control): BELL +assert.strictEqual(getStringWidth(String.fromCharCode(0x0007)), 0); +// Cc (Control): LINE FEED +assert.strictEqual(getStringWidth('\n'), 0); +// Cf (Format): SOFT HYPHEN +assert.strictEqual(getStringWidth(String.fromCharCode(0x00AD)), 1); +// Cf (Format): LEFT-TO-RIGHT MARK +// Cf (Format): RIGHT-TO-LEFT MARK +assert.strictEqual(getStringWidth('\u200Ef\u200F'), 1); +// Cn (Unassigned): Not a character +assert.strictEqual(getStringWidth(String.fromCharCode(0x10FFEF)), 1); +// Cn (Unassigned): Not a character (but in a CJK range) +assert.strictEqual(getStringWidth(String.fromCharCode(0x3FFEF)), 1); +// Mn (Nonspacing Mark): COMBINING ACUTE ACCENT +assert.strictEqual(getStringWidth(String.fromCharCode(0x0301)), 0); +// Mc (Spacing Mark): BALINESE ADEG ADEG +// Chosen as its Canonical_Combining_Class is not 0, but is not a 0-width +// character. +assert.strictEqual(getStringWidth(String.fromCharCode(0x1B44)), 1); +// Me (Enclosing Mark): COMBINING ENCLOSING CIRCLE +assert.strictEqual(getStringWidth(String.fromCharCode(0x20DD)), 0); + +// The following is an emoji sequence with ZWJ (zero-width-joiner). In some +// implementations, it is represented as a single glyph, in other +// implementations as a sequence of individual glyphs. By default, each +// component will be counted individually, since not a lot of systems support +// these fully. +// See https://www.unicode.org/reports/tr51/tr51-16.html#Emoji_ZWJ_Sequences +assert.strictEqual(getStringWidth('👩‍👩‍👧‍👧'), 8); +// TODO(BridgeAR): This should have a width of two and six. The heart contains +// the \uFE0F variation selector that indicates that it should be displayed as +// emoji instead of as text. Emojis are all full width characters when not being +// rendered as text. +// https://en.wikipedia.org/wiki/Variation_Selectors_(Unicode_block) +assert.strictEqual(getStringWidth('❤️'), 1); +assert.strictEqual(getStringWidth('👩‍❤️‍👩'), 5); +// The length of one is correct. It is an emoji treated as text. +assert.strictEqual(getStringWidth('❤'), 1); + +// By default, unicode characters whose width is considered ambiguous will +// be considered half-width. For these characters, getStringWidth will return +// 1. In some contexts, however, it is more appropriate to consider them full +// width. By default, the algorithm will assume half width. +assert.strictEqual(getStringWidth('\u01d4'), 1); + +// Control chars and combining chars are zero +assert.strictEqual(getStringWidth('\u200E\n\u220A\u20D2'), 1); + +// Test that the fast path for ASCII characters yields results consistent +// with the 'slow' path. +for (let i = 0; i < 256; i++) { + const char = String.fromCharCode(i); + assert.strictEqual( + getStringWidth(char + '🎉'), + getStringWidth(char) + 2); + + if (i < 32 || (i >= 127 && i < 160)) { // Control character + assert.strictEqual(getStringWidth(char), 0); + } else { // Regular ASCII character + assert.strictEqual(getStringWidth(char), 1); + } +} + +if (common.hasIntl) { + const a = '한글'.normalize('NFD'); // 한글 + const b = '한글'.normalize('NFC'); // 한글 + assert.strictEqual(a.length, 6); + assert.strictEqual(b.length, 2); + assert.strictEqual(getStringWidth(a), 4); + assert.strictEqual(getStringWidth(b), 4); +} diff --git a/tests/node_compat/test/parallel/test-icu-transcode.js b/tests/node_compat/test/parallel/test-icu-transcode.js index 1f5aeb53551b54..f34626892d0803 100644 --- a/tests/node_compat/test/parallel/test-icu-transcode.js +++ b/tests/node_compat/test/parallel/test-icu-transcode.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-inspector-stops-no-file.js b/tests/node_compat/test/parallel/test-inspector-stops-no-file.js new file mode 100644 index 00000000000000..0eea1e3b1602c7 --- /dev/null +++ b/tests/node_compat/test/parallel/test-inspector-stops-no-file.js @@ -0,0 +1,23 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); + +const spawn = require('child_process').spawn; + +const child = spawn(process.execPath, + [ '--inspect', 'no-such-script.js' ], + { 'stdio': 'inherit' }); + +function signalHandler() { + child.kill(); + process.exit(1); +} + +process.on('SIGINT', signalHandler); +process.on('SIGTERM', signalHandler); diff --git a/tests/node_compat/test/parallel/test-instanceof.js b/tests/node_compat/test/parallel/test-instanceof.js new file mode 100644 index 00000000000000..2d81c1cf158343 --- /dev/null +++ b/tests/node_compat/test/parallel/test-instanceof.js @@ -0,0 +1,18 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +require('../common'); +const assert = require('assert'); + + +// Regression test for instanceof, see +// https://github.com/nodejs/node/issues/7592 +const F = () => {}; +F.prototype = {}; +assert({ __proto__: F.prototype } instanceof F); diff --git a/tests/node_compat/test/parallel/test-internal-fs.js b/tests/node_compat/test/parallel/test-internal-fs.js new file mode 100644 index 00000000000000..b0abd04e9b0c94 --- /dev/null +++ b/tests/node_compat/test/parallel/test-internal-fs.js @@ -0,0 +1,60 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Flags: --expose-internals +'use strict'; + +require('../common'); +const assert = require('assert'); +const fs = require('internal/fs/utils'); + +// Valid encodings and no args should not throw. +fs.assertEncoding(); +fs.assertEncoding('utf8'); + +assert.throws( + () => fs.assertEncoding('foo'), + { code: 'ERR_INVALID_ARG_VALUE', name: 'TypeError' } +); + +// Test junction symlinks +{ + const pathString = 'c:\\test1'; + const linkPathString = '\\test2'; + + const preprocessSymlinkDestination = fs.preprocessSymlinkDestination( + pathString, + 'junction', + linkPathString + ); + + if (process.platform === 'win32') { + assert.match(preprocessSymlinkDestination, /^\\\\\?\\/); + } else { + assert.strictEqual(preprocessSymlinkDestination, pathString); + } +} + +// Test none junction symlinks +{ + const pathString = 'c:\\test1'; + const linkPathString = '\\test2'; + + const preprocessSymlinkDestination = fs.preprocessSymlinkDestination( + pathString, + undefined, + linkPathString + ); + + if (process.platform === 'win32') { + // There should not be any forward slashes + assert.strictEqual( + /\//.test(preprocessSymlinkDestination), false); + } else { + assert.strictEqual(preprocessSymlinkDestination, pathString); + } +} diff --git a/tests/node_compat/test/parallel/test-internal-util-normalizeencoding.js b/tests/node_compat/test/parallel/test-internal-util-normalizeencoding.js new file mode 100644 index 00000000000000..9a85f6192e5679 --- /dev/null +++ b/tests/node_compat/test/parallel/test-internal-util-normalizeencoding.js @@ -0,0 +1,62 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Flags: --expose-internals +'use strict'; + +require('../common'); +const assert = require('assert'); +const util = require('internal/util'); + +const tests = [ + [undefined, 'utf8'], + [null, 'utf8'], + ['', 'utf8'], + ['utf8', 'utf8'], + ['utf-8', 'utf8'], + ['UTF-8', 'utf8'], + ['UTF8', 'utf8'], + ['Utf8', 'utf8'], + ['uTf-8', 'utf8'], + ['utF-8', 'utf8'], + ['ucs2', 'utf16le'], + ['UCS2', 'utf16le'], + ['UcS2', 'utf16le'], + ['ucs-2', 'utf16le'], + ['UCS-2', 'utf16le'], + ['UcS-2', 'utf16le'], + ['utf16le', 'utf16le'], + ['utf-16le', 'utf16le'], + ['UTF-16LE', 'utf16le'], + ['UTF16LE', 'utf16le'], + ['binary', 'latin1'], + ['BINARY', 'latin1'], + ['latin1', 'latin1'], + ['LaTiN1', 'latin1'], + ['base64', 'base64'], + ['BASE64', 'base64'], + ['Base64', 'base64'], + ['base64url', 'base64url'], + ['BASE64url', 'base64url'], + ['Base64url', 'base64url'], + ['hex', 'hex'], + ['HEX', 'hex'], + ['ASCII', 'ascii'], + ['AsCii', 'ascii'], + ['foo', undefined], + [1, undefined], + [false, undefined], + [NaN, undefined], + [0, undefined], + [[], undefined], + [{}, undefined], +]; + +tests.forEach((e, i) => { + const res = util.normalizeEncoding(e[0]); + assert.strictEqual(res, e[1], `#${i} failed: expected ${e[1]}, got ${res}`); +}); diff --git a/tests/node_compat/test/parallel/test-kill-segfault-freebsd.js b/tests/node_compat/test/parallel/test-kill-segfault-freebsd.js new file mode 100644 index 00000000000000..b42901a3221af0 --- /dev/null +++ b/tests/node_compat/test/parallel/test-kill-segfault-freebsd.js @@ -0,0 +1,26 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); + +// This test ensures Node.js doesn't crash on hitting Ctrl+C in order to +// terminate the currently running process (especially on FreeBSD). +// https://github.com/nodejs/node-v0.x-archive/issues/9326 + +const assert = require('assert'); +const child_process = require('child_process'); + +// NOTE: Was crashing on FreeBSD +const cp = child_process.spawn(process.execPath, [ + '-e', + 'process.kill(process.pid, "SIGINT")', +]); + +cp.on('exit', function(code) { + assert.notStrictEqual(code, 0); +}); diff --git a/tests/node_compat/test/parallel/test-listen-fd-detached-inherit.js b/tests/node_compat/test/parallel/test-listen-fd-detached-inherit.js new file mode 100644 index 00000000000000..60ef9ac4b5059e --- /dev/null +++ b/tests/node_compat/test/parallel/test-listen-fd-detached-inherit.js @@ -0,0 +1,125 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +if (common.isWindows) + common.skip('This test is disabled on windows.'); + +const assert = require('assert'); +const http = require('http'); +const net = require('net'); +const spawn = require('child_process').spawn; + +switch (process.argv[2]) { + case 'child': return child(); + case 'parent': return parent(); + default: return test(); +} + +// Spawn the parent, and listen for it to tell us the pid of the child. +// WARNING: This is an example of listening on some arbitrary FD number +// that has already been bound elsewhere in advance. However, binding +// server handles to stdio fd's is NOT a good or reliable way to do +// concurrency in HTTP servers! Use the cluster module, or if you want +// a more low-level approach, use child process IPC manually. +function test() { + const parent = spawn(process.execPath, [__filename, 'parent'], { + stdio: [ 0, 'pipe', 2 ] + }); + let json = ''; + parent.stdout.on('data', function(c) { + json += c.toString(); + if (json.includes('\n')) next(); + }); + function next() { + console.error('output from parent = %s', json); + const child = JSON.parse(json); + // Now make sure that we can request to the subprocess, then kill it. + http.get({ + server: 'localhost', + port: child.port, + path: '/', + }).on('response', function(res) { + let s = ''; + res.on('data', function(c) { + s += c.toString(); + }); + res.on('end', function() { + // Kill the subprocess before we start doing asserts. + // It's really annoying when tests leave orphans! + process.kill(child.pid, 'SIGKILL'); + try { + parent.kill(); + } catch { + // Continue regardless of error. + } + + assert.strictEqual(s, 'hello from child\n'); + assert.strictEqual(res.statusCode, 200); + }); + }); + } +} + +// Listen on port, and then pass the handle to the detached child. +// Then output the child's pid, and immediately exit. +function parent() { + const server = net.createServer(function(conn) { + conn.end('HTTP/1.1 403 Forbidden\r\n\r\nI got problems.\r\n'); + throw new Error('Should not see connections on parent'); + }).listen(0, function() { + console.error('server listening on %d', this.address().port); + + const child = spawn(process.execPath, [__filename, 'child'], { + stdio: [ 0, 1, 2, server._handle ], + detached: true + }); + + console.log('%j\n', { pid: child.pid, port: this.address().port }); + + // Now close the parent, so that the child is the only thing + // referencing that handle. Note that connections will still + // be accepted, because the child has the fd open, but the parent + // will exit gracefully. + server.close(); + child.unref(); + }); +} + +// Run as a child of the parent() mode. +function child() { + // Start a server on fd=3 + http.createServer(function(req, res) { + console.error('request on child'); + console.error('%s %s', req.method, req.url, req.headers); + res.end('hello from child\n'); + }).listen({ fd: 3 }, function() { + console.error('child listening on fd=3'); + }); +} diff --git a/tests/node_compat/test/parallel/test-listen-fd-detached.js b/tests/node_compat/test/parallel/test-listen-fd-detached.js new file mode 100644 index 00000000000000..2bef173a2f2ee3 --- /dev/null +++ b/tests/node_compat/test/parallel/test-listen-fd-detached.js @@ -0,0 +1,122 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +if (common.isWindows) + common.skip('This test is disabled on windows.'); + +const assert = require('assert'); +const http = require('http'); +const net = require('net'); +const spawn = require('child_process').spawn; + +switch (process.argv[2]) { + case 'child': return child(); + case 'parent': return parent(); + default: return test(); +} + +// Spawn the parent, and listen for it to tell us the pid of the child. +// WARNING: This is an example of listening on some arbitrary FD number +// that has already been bound elsewhere in advance. However, binding +// server handles to stdio fd's is NOT a good or reliable way to do +// concurrency in HTTP servers! Use the cluster module, or if you want +// a more low-level approach, use child process IPC manually. +function test() { + const parent = spawn(process.execPath, [__filename, 'parent'], { + stdio: [ 0, 'pipe', 2 ] + }); + let json = ''; + parent.stdout.on('data', function(c) { + json += c.toString(); + if (json.includes('\n')) next(); + }); + function next() { + console.error('output from parent = %s', json); + const child = JSON.parse(json); + // Now make sure that we can request to the subprocess, then kill it. + http.get({ + server: 'localhost', + port: child.port, + path: '/', + }).on('response', function(res) { + let s = ''; + res.on('data', function(c) { + s += c.toString(); + }); + res.on('end', function() { + // Kill the subprocess before we start doing asserts. + // it's really annoying when tests leave orphans! + process.kill(child.pid, 'SIGKILL'); + try { + parent.kill(); + } catch { + // Continue regardless of error. + } + + assert.strictEqual(s, 'hello from child\n'); + assert.strictEqual(res.statusCode, 200); + }); + }); + } +} + +function parent() { + const server = net.createServer(function(conn) { + console.error('connection on parent'); + conn.end('hello from parent\n'); + }).listen(0, function() { + console.error('server listening on %d', this.address().port); + + const child = spawn(process.execPath, [__filename, 'child'], { + stdio: [ 'ignore', 'ignore', 'ignore', server._handle ], + detached: true + }); + + console.log('%j\n', { pid: child.pid, port: this.address().port }); + + // Now close the parent, so that the child is the only thing + // referencing that handle. Note that connections will still + // be accepted, because the child has the fd open, but the parent + // will exit gracefully. + server.close(); + child.unref(); + }); +} + +function child() { + // Start a server on fd=3 + http.createServer(function(req, res) { + console.error('request on child'); + console.error('%s %s', req.method, req.url, req.headers); + res.end('hello from child\n'); + }).listen({ fd: 3 }, function() { + console.error('child listening on fd=3'); + }); +} diff --git a/tests/node_compat/test/parallel/test-memory-usage-emfile.js b/tests/node_compat/test/parallel/test-memory-usage-emfile.js new file mode 100644 index 00000000000000..4a89be3cb52bba --- /dev/null +++ b/tests/node_compat/test/parallel/test-memory-usage-emfile.js @@ -0,0 +1,25 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); + +// On IBMi, the rss memory always returns zero +if (common.isIBMi) + common.skip('On IBMi, the rss memory always returns zero'); + +const assert = require('assert'); + +const fs = require('fs'); + +const files = []; + +while (files.length < 256) + files.push(fs.openSync(__filename, 'r')); + +const r = process.memoryUsage.rss(); +assert.strictEqual(r > 0, true); diff --git a/tests/node_compat/test/parallel/test-memory-usage.js b/tests/node_compat/test/parallel/test-memory-usage.js new file mode 100644 index 00000000000000..8227b7b12265ee --- /dev/null +++ b/tests/node_compat/test/parallel/test-memory-usage.js @@ -0,0 +1,56 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// Flags: --predictable-gc-schedule +'use strict'; +const common = require('../common'); +const assert = require('assert'); + +const r = process.memoryUsage(); +// On IBMi, the rss memory always returns zero +if (!common.isIBMi) { + assert.ok(r.rss > 0); + assert.ok(process.memoryUsage.rss() > 0); +} + +assert.ok(r.heapTotal > 0); +assert.ok(r.heapUsed > 0); +assert.ok(r.external > 0); + +assert.strictEqual(typeof r.arrayBuffers, 'number'); +if (r.arrayBuffers > 0) { + const size = 10 * 1024 * 1024; + // eslint-disable-next-line no-unused-vars + const ab = new ArrayBuffer(size); + + const after = process.memoryUsage(); + assert.ok(after.external - r.external >= size, + `${after.external} - ${r.external} >= ${size}`); + assert.strictEqual(after.arrayBuffers - r.arrayBuffers, size, + `${after.arrayBuffers} - ${r.arrayBuffers} === ${size}`); +} diff --git a/tests/node_compat/test/parallel/test-messagechannel.js b/tests/node_compat/test/parallel/test-messagechannel.js new file mode 100644 index 00000000000000..44ddf6d7aaf140 --- /dev/null +++ b/tests/node_compat/test/parallel/test-messagechannel.js @@ -0,0 +1,19 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); + +// See: https://github.com/nodejs/node/issues/49940 +(async () => { + new MessageChannel().port1.postMessage({}, { + transfer: { + *[Symbol.iterator]() {} + } + }); +})().then(common.mustCall()); diff --git a/tests/node_compat/test/parallel/test-microtask-queue-integration.js b/tests/node_compat/test/parallel/test-microtask-queue-integration.js new file mode 100644 index 00000000000000..8abb41d364efaa --- /dev/null +++ b/tests/node_compat/test/parallel/test-microtask-queue-integration.js @@ -0,0 +1,70 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); + +const implementations = [ + function(fn) { + Promise.resolve().then(fn); + }, +]; + +let expected = 0; +let done = 0; + +process.on('exit', function() { + assert.strictEqual(done, expected); +}); + +function test(scheduleMicrotask) { + let nextTickCalled = false; + expected++; + + scheduleMicrotask(function() { + process.nextTick(function() { + nextTickCalled = true; + }); + + setTimeout(function() { + assert(nextTickCalled); + done++; + }, 0); + }); +} + +// first tick case +implementations.forEach(test); + +// tick callback case +setTimeout(function() { + implementations.forEach(function(impl) { + process.nextTick(test.bind(null, impl)); + }); +}, 0); diff --git a/tests/node_compat/test/parallel/test-microtask-queue-run-immediate.js b/tests/node_compat/test/parallel/test-microtask-queue-run-immediate.js new file mode 100644 index 00000000000000..a1dff2c7e912a7 --- /dev/null +++ b/tests/node_compat/test/parallel/test-microtask-queue-run-immediate.js @@ -0,0 +1,66 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); + +function enqueueMicrotask(fn) { + Promise.resolve().then(fn); +} + +let done = 0; + +process.on('exit', function() { + assert.strictEqual(done, 2); +}); + +// No nextTick, microtask +setImmediate(function() { + enqueueMicrotask(function() { + done++; + }); +}); + + +// No nextTick, microtask with nextTick +setImmediate(function() { + let called = false; + + enqueueMicrotask(function() { + process.nextTick(function() { + called = true; + }); + }); + + setImmediate(function() { + if (called) + done++; + }); + +}); diff --git a/tests/node_compat/test/parallel/test-microtask-queue-run.js b/tests/node_compat/test/parallel/test-microtask-queue-run.js new file mode 100644 index 00000000000000..43900006f04309 --- /dev/null +++ b/tests/node_compat/test/parallel/test-microtask-queue-run.js @@ -0,0 +1,66 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); + +function enqueueMicrotask(fn) { + Promise.resolve().then(fn); +} + +let done = 0; + +process.on('exit', function() { + assert.strictEqual(done, 2); +}); + +// No nextTick, microtask +setTimeout(function() { + enqueueMicrotask(function() { + done++; + }); +}, 0); + + +// No nextTick, microtask with nextTick +setTimeout(function() { + let called = false; + + enqueueMicrotask(function() { + process.nextTick(function() { + called = true; + }); + }); + + setTimeout(function() { + if (called) + done++; + }, 0); + +}, 0); diff --git a/tests/node_compat/test/parallel/test-module-cache.js b/tests/node_compat/test/parallel/test-module-cache.js new file mode 100644 index 00000000000000..01935e9c873fe8 --- /dev/null +++ b/tests/node_compat/test/parallel/test-module-cache.js @@ -0,0 +1,25 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); +const assert = require('assert'); +const fs = require('fs'); +const tmpdir = require('../common/tmpdir'); +tmpdir.refresh(); + +const filePath = tmpdir.resolve('test-module-cache.json'); +assert.throws( + () => require(filePath), + { code: 'MODULE_NOT_FOUND' } +); + +fs.writeFileSync(filePath, '[]'); + +const content = require(filePath); +assert.strictEqual(Array.isArray(content), true); +assert.strictEqual(content.length, 0); diff --git a/tests/node_compat/test/parallel/test-module-circular-symlinks.js b/tests/node_compat/test/parallel/test-module-circular-symlinks.js new file mode 100644 index 00000000000000..0b329805884e65 --- /dev/null +++ b/tests/node_compat/test/parallel/test-module-circular-symlinks.js @@ -0,0 +1,75 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +// This tests to make sure that modules with symlinked circular dependencies +// do not blow out the module cache and recurse forever. See issue +// https://github.com/nodejs/node/pull/5950 for context. PR #5950 attempted +// to solve a problem with symlinked peer dependencies by caching using the +// symlink path. Unfortunately, that breaks the case tested in this module +// because each symlinked module, despite pointing to the same code on disk, +// is loaded and cached as a separate module instance, which blows up the +// cache and leads to a recursion bug. + +// This test should pass in Node.js v4 and v5. It should pass in Node.js v6 +// after https://github.com/nodejs/node/pull/5950 has been reverted. + +const common = require('../common'); +const assert = require('assert'); +const path = require('path'); +const fs = require('fs'); + +// {tmpDir} +// ├── index.js +// └── node_modules +// ├── moduleA +// │ ├── index.js +// │ └── node_modules +// │ └── moduleB -> {tmpDir}/node_modules/moduleB +// └── moduleB +// ├── index.js +// └── node_modules +// └── moduleA -> {tmpDir}/node_modules/moduleA + +const tmpdir = require('../common/tmpdir'); +tmpdir.refresh(); +const tmpDir = tmpdir.path; + +const node_modules = path.join(tmpDir, 'node_modules'); +const moduleA = path.join(node_modules, 'moduleA'); +const moduleB = path.join(node_modules, 'moduleB'); +const moduleA_link = path.join(moduleB, 'node_modules', 'moduleA'); +const moduleB_link = path.join(moduleA, 'node_modules', 'moduleB'); + +fs.mkdirSync(node_modules); +fs.mkdirSync(moduleA); +fs.mkdirSync(moduleB); +fs.mkdirSync(path.join(moduleA, 'node_modules')); +fs.mkdirSync(path.join(moduleB, 'node_modules')); + +try { + fs.symlinkSync(moduleA, moduleA_link); + fs.symlinkSync(moduleB, moduleB_link); +} catch (err) { + if (err.code !== 'EPERM') throw err; + common.skip('insufficient privileges for symlinks'); +} + +fs.writeFileSync(path.join(tmpDir, 'index.js'), + 'module.exports = require(\'moduleA\');', 'utf8'); +fs.writeFileSync(path.join(moduleA, 'index.js'), + 'module.exports = {b: require(\'moduleB\')};', 'utf8'); +fs.writeFileSync(path.join(moduleB, 'index.js'), + 'module.exports = {a: require(\'moduleA\')};', 'utf8'); + +// Ensure that the symlinks are not followed forever... +const obj = require(path.join(tmpDir, 'index')); +assert.ok(obj); +assert.ok(obj.b); +assert.ok(obj.b.a); +assert.ok(!obj.b.a.b); diff --git a/tests/node_compat/test/parallel/test-module-isBuiltin.js b/tests/node_compat/test/parallel/test-module-isBuiltin.js new file mode 100644 index 00000000000000..13746a911685e6 --- /dev/null +++ b/tests/node_compat/test/parallel/test-module-isBuiltin.js @@ -0,0 +1,23 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); +const assert = require('assert'); +const { isBuiltin } = require('module'); + +// Includes modules in lib/ (even deprecated ones) +assert(isBuiltin('http')); +assert(isBuiltin('sys')); +assert(isBuiltin('node:fs')); +assert(isBuiltin('node:test')); + +// Does not include internal modules +assert(!isBuiltin('internal/errors')); +assert(!isBuiltin('test')); +assert(!isBuiltin('')); +assert(!isBuiltin(undefined)); diff --git a/tests/node_compat/test/parallel/test-module-multi-extensions.js b/tests/node_compat/test/parallel/test-module-multi-extensions.js new file mode 100644 index 00000000000000..36de3187f96095 --- /dev/null +++ b/tests/node_compat/test/parallel/test-module-multi-extensions.js @@ -0,0 +1,100 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +// Refs: https://github.com/nodejs/node/issues/4778 + +const common = require('../common'); +const assert = require('assert'); +const fs = require('fs'); +const Module = require('module'); +const tmpdir = require('../common/tmpdir'); +const file = tmpdir.resolve('test-extensions.foo.bar'); +const dotfile = tmpdir.resolve('.bar'); +const dotfileWithExtension = tmpdir.resolve('.foo.bar'); + +tmpdir.refresh(); +fs.writeFileSync(file, 'console.log(__filename);', 'utf8'); +fs.writeFileSync(dotfile, 'console.log(__filename);', 'utf8'); +fs.writeFileSync(dotfileWithExtension, 'console.log(__filename);', 'utf8'); + +{ + require.extensions['.bar'] = common.mustNotCall(); + require.extensions['.foo.bar'] = common.mustCall(); + const modulePath = tmpdir.resolve('test-extensions'); + require(modulePath); + require(file); + delete require.cache[file]; + delete require.extensions['.bar']; + delete require.extensions['.foo.bar']; + Module._pathCache = { __proto__: null }; +} + +{ + require.extensions['.foo.bar'] = common.mustCall(); + const modulePath = tmpdir.resolve('test-extensions'); + require(modulePath); + assert.throws( + () => require(`${modulePath}.foo`), + (err) => err.message.startsWith(`Cannot find module '${modulePath}.foo'`) + ); + require(`${modulePath}.foo.bar`); + delete require.cache[file]; + delete require.extensions['.foo.bar']; + Module._pathCache = { __proto__: null }; +} + +{ + const modulePath = tmpdir.resolve('test-extensions'); + assert.throws( + () => require(modulePath), + (err) => err.message.startsWith(`Cannot find module '${modulePath}'`) + ); + delete require.cache[file]; + Module._pathCache = { __proto__: null }; +} + +{ + require.extensions['.bar'] = common.mustNotCall(); + require.extensions['.foo.bar'] = common.mustCall(); + const modulePath = tmpdir.resolve('test-extensions.foo'); + require(modulePath); + delete require.cache[file]; + delete require.extensions['.bar']; + delete require.extensions['.foo.bar']; + Module._pathCache = { __proto__: null }; +} + +{ + require.extensions['.foo.bar'] = common.mustNotCall(); + const modulePath = tmpdir.resolve('test-extensions.foo'); + assert.throws( + () => require(modulePath), + (err) => err.message.startsWith(`Cannot find module '${modulePath}'`) + ); + delete require.extensions['.foo.bar']; + Module._pathCache = { __proto__: null }; +} + +{ + require.extensions['.bar'] = common.mustNotCall(); + require(dotfile); + delete require.cache[dotfile]; + delete require.extensions['.bar']; + Module._pathCache = { __proto__: null }; +} + +{ + require.extensions['.bar'] = common.mustCall(); + require.extensions['.foo.bar'] = common.mustNotCall(); + require(dotfileWithExtension); + delete require.cache[dotfileWithExtension]; + delete require.extensions['.bar']; + delete require.extensions['.foo.bar']; + Module._pathCache = { __proto__: null }; +} diff --git a/tests/node_compat/test/parallel/test-module-nodemodulepaths.js b/tests/node_compat/test/parallel/test-module-nodemodulepaths.js new file mode 100644 index 00000000000000..cccbbee7f2e580 --- /dev/null +++ b/tests/node_compat/test/parallel/test-module-nodemodulepaths.js @@ -0,0 +1,134 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const _module = require('module'); + +const cases = { + 'WIN': [{ + file: 'C:\\Users\\hefangshi\\AppData\\Roaming\ +\\npm\\node_modules\\npm\\node_modules\\minimatch', + expect: [ + 'C:\\Users\\hefangshi\\AppData\\Roaming\ +\\npm\\node_modules\\npm\\node_modules\\minimatch\\node_modules', + 'C:\\Users\\hefangshi\\AppData\\Roaming\ +\\npm\\node_modules\\npm\\node_modules', + 'C:\\Users\\hefangshi\\AppData\\Roaming\\npm\\node_modules', + 'C:\\Users\\hefangshi\\AppData\\Roaming\\node_modules', + 'C:\\Users\\hefangshi\\AppData\\node_modules', + 'C:\\Users\\hefangshi\\node_modules', + 'C:\\Users\\node_modules', + 'C:\\node_modules', + ] + }, { + file: 'C:\\Users\\Rocko Artischocko\\node_stuff\\foo', + expect: [ + 'C:\\Users\\Rocko Artischocko\\node_stuff\\foo\\node_modules', + 'C:\\Users\\Rocko Artischocko\\node_stuff\\node_modules', + 'C:\\Users\\Rocko Artischocko\\node_modules', + 'C:\\Users\\node_modules', + 'C:\\node_modules', + ] + }, { + file: 'C:\\Users\\Rocko Artischocko\\node_stuff\\foo_node_modules', + expect: [ + 'C:\\Users\\Rocko \ +Artischocko\\node_stuff\\foo_node_modules\\node_modules', + 'C:\\Users\\Rocko Artischocko\\node_stuff\\node_modules', + 'C:\\Users\\Rocko Artischocko\\node_modules', + 'C:\\Users\\node_modules', + 'C:\\node_modules', + ] + }, { + file: 'C:\\node_modules', + expect: [ + 'C:\\node_modules', + ] + }, { + file: 'C:\\', + expect: [ + 'C:\\node_modules', + ] + }], + 'POSIX': [{ + file: '/usr/lib/node_modules/npm/node_modules/\ +node-gyp/node_modules/glob/node_modules/minimatch', + expect: [ + '/usr/lib/node_modules/npm/node_modules/\ +node-gyp/node_modules/glob/node_modules/minimatch/node_modules', + '/usr/lib/node_modules/npm/node_modules/\ +node-gyp/node_modules/glob/node_modules', + '/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules', + '/usr/lib/node_modules/npm/node_modules', + '/usr/lib/node_modules', + '/usr/node_modules', + '/node_modules', + ] + }, { + file: '/usr/test/lib/node_modules/npm/foo', + expect: [ + '/usr/test/lib/node_modules/npm/foo/node_modules', + '/usr/test/lib/node_modules/npm/node_modules', + '/usr/test/lib/node_modules', + '/usr/test/node_modules', + '/usr/node_modules', + '/node_modules', + ] + }, { + file: '/usr/test/lib/node_modules/npm/foo_node_modules', + expect: [ + '/usr/test/lib/node_modules/npm/foo_node_modules/node_modules', + '/usr/test/lib/node_modules/npm/node_modules', + '/usr/test/lib/node_modules', + '/usr/test/node_modules', + '/usr/node_modules', + '/node_modules', + ] + }, { + file: '/node_modules', + expect: [ + '/node_modules', + ] + }, { + file: '/', + expect: [ + '/node_modules', + ] + }] +}; + +const platformCases = common.isWindows ? cases.WIN : cases.POSIX; +platformCases.forEach((c) => { + const paths = _module._nodeModulePaths(c.file); + assert.deepStrictEqual( + c.expect, paths, + `case ${c.file} failed, actual paths is ${JSON.stringify(paths)}`); +}); diff --git a/tests/node_compat/test/parallel/test-module-readonly.js b/tests/node_compat/test/parallel/test-module-readonly.js new file mode 100644 index 00000000000000..f231f8f9400712 --- /dev/null +++ b/tests/node_compat/test/parallel/test-module-readonly.js @@ -0,0 +1,55 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); + +if (!common.isWindows) { + // TODO: Similar checks on *nix-like systems (e.g using chmod or the like) + common.skip('test only runs on Windows'); +} + +const assert = require('assert'); +const fs = require('fs'); +const path = require('path'); +const cp = require('child_process'); + +const tmpdir = require('../common/tmpdir'); +tmpdir.refresh(); + +// Create readOnlyMod.js and set to read only +const readOnlyMod = tmpdir.resolve('readOnlyMod'); +const readOnlyModRelative = path.relative(__dirname, readOnlyMod); +const readOnlyModFullPath = `${readOnlyMod}.js`; + +fs.writeFileSync(readOnlyModFullPath, 'module.exports = 42;'); + +// Removed any inherited ACEs, and any explicitly granted ACEs for the +// current user +cp.execSync( + `icacls.exe "${readOnlyModFullPath}" /inheritance:r /remove "%USERNAME%"`); + +// Grant the current user read & execute only +cp.execSync(`icacls.exe "${readOnlyModFullPath}" /grant "%USERNAME%":RX`); + +let except = null; +try { + // Attempt to load the module. Will fail if write access is required + require(readOnlyModRelative); +} catch (err) { + except = err; +} + +// Remove the explicitly granted rights, and re-enable inheritance +cp.execSync( + `icacls.exe "${readOnlyModFullPath}" /remove "%USERNAME%" /inheritance:e`); + +// Delete the test module (note: tmpdir should get cleaned anyway) +fs.unlinkSync(readOnlyModFullPath); + +assert.ifError(except); diff --git a/tests/node_compat/test/parallel/test-module-relative-lookup.js b/tests/node_compat/test/parallel/test-module-relative-lookup.js new file mode 100644 index 00000000000000..4e714f070fe81f --- /dev/null +++ b/tests/node_compat/test/parallel/test-module-relative-lookup.js @@ -0,0 +1,31 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const _module = require('module'); // Avoid collision with global.module + +// Current directory gets highest priority for local modules +function testFirstInPath(moduleName, isLocalModule) { + const assertFunction = isLocalModule ? + assert.strictEqual : + assert.notStrictEqual; + + let paths = _module._resolveLookupPaths(moduleName); + + assertFunction(paths[0], '.'); + + paths = _module._resolveLookupPaths(moduleName, null); + assertFunction(paths && paths[0], '.'); +} + +testFirstInPath('./lodash', true); + +// Relative path on Windows, but a regular file name elsewhere +testFirstInPath('.\\lodash', common.isWindows); diff --git a/tests/node_compat/test/parallel/test-net-access-byteswritten.js b/tests/node_compat/test/parallel/test-net-access-byteswritten.js index 54221f8551d16b..79c005a71a7c36 100644 --- a/tests/node_compat/test/parallel/test-net-access-byteswritten.js +++ b/tests/node_compat/test/parallel/test-net-access-byteswritten.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-after-close.js b/tests/node_compat/test/parallel/test-net-after-close.js new file mode 100644 index 00000000000000..2f4428c6ca9ec3 --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-after-close.js @@ -0,0 +1,58 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); + +const server = net.createServer(common.mustCall((s) => { + console.error('SERVER: got connection'); + s.end(); +})); + +server.listen(0, common.mustCall(() => { + const c = net.createConnection(server.address().port); + c.on('close', common.mustCall(() => { + /* eslint-disable no-unused-expressions */ + console.error('connection closed'); + assert.strictEqual(c._handle, null); + // Calling functions / accessing properties of a closed socket should not + // throw. + c.setNoDelay(); + c.setKeepAlive(); + c.bufferSize; + c.pause(); + c.resume(); + c.address(); + c.remoteAddress; + c.remotePort; + server.close(); + /* eslint-enable no-unused-expressions */ + })); +})); diff --git a/tests/node_compat/test/parallel/test-net-better-error-messages-listen-path.js b/tests/node_compat/test/parallel/test-net-better-error-messages-listen-path.js index 73c793b1e26a91..c2541199265fee 100644 --- a/tests/node_compat/test/parallel/test-net-better-error-messages-listen-path.js +++ b/tests/node_compat/test/parallel/test-net-better-error-messages-listen-path.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-better-error-messages-listen.js b/tests/node_compat/test/parallel/test-net-better-error-messages-listen.js new file mode 100644 index 00000000000000..f3ddc597ab228b --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-better-error-messages-listen.js @@ -0,0 +1,19 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); + +const server = net.createServer(common.mustNotCall()); +server.listen(1, '1.1.1.1', common.mustNotCall()); +server.on('error', common.mustCall(function(e) { + assert.strictEqual(e.address, '1.1.1.1'); + assert.strictEqual(e.port, 1); + assert.strictEqual(e.syscall, 'listen'); +})); diff --git a/tests/node_compat/test/parallel/test-net-better-error-messages-port-hostname.js b/tests/node_compat/test/parallel/test-net-better-error-messages-port-hostname.js index e1ae0986e8bc99..92720a6101d200 100644 --- a/tests/node_compat/test/parallel/test-net-better-error-messages-port-hostname.js +++ b/tests/node_compat/test/parallel/test-net-better-error-messages-port-hostname.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-bind-twice.js b/tests/node_compat/test/parallel/test-net-bind-twice.js new file mode 100644 index 00000000000000..1794c9a54f6739 --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-bind-twice.js @@ -0,0 +1,43 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); + +const server1 = net.createServer(common.mustNotCall()); +server1.listen(0, '127.0.0.1', common.mustCall(function() { + const server2 = net.createServer(common.mustNotCall()); + server2.listen(this.address().port, '127.0.0.1', common.mustNotCall()); + + server2.on('error', common.mustCall(function(e) { + assert.strictEqual(e.code, 'EADDRINUSE'); + server1.close(); + })); +})); diff --git a/tests/node_compat/test/parallel/test-net-buffersize.js b/tests/node_compat/test/parallel/test-net-buffersize.js new file mode 100644 index 00000000000000..71560688c23e05 --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-buffersize.js @@ -0,0 +1,59 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); + +const iter = 10; + +const server = net.createServer(function(socket) { + socket.on('readable', function() { + socket.read(); + }); + + socket.on('end', function() { + server.close(); + }); +}); + +server.listen(0, common.mustCall(function() { + const client = net.connect(this.address().port); + + client.on('finish', common.mustCall(() => { + assert.strictEqual(client.bufferSize, 0); + })); + + for (let i = 1; i < iter; i++) { + client.write('a'); + assert.strictEqual(client.bufferSize, i); + } + + client.end(); +})); diff --git a/tests/node_compat/test/parallel/test-net-bytes-written-large.js b/tests/node_compat/test/parallel/test-net-bytes-written-large.js new file mode 100644 index 00000000000000..0eae9f10d37d6d --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-bytes-written-large.js @@ -0,0 +1,74 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); + +// Regression test for https://github.com/nodejs/node/issues/19562: +// Writing to a socket first tries to push through as much data as possible +// without blocking synchronously, and, if that is not enough, queues more +// data up for asynchronous writing. +// Check that `bytesWritten` accounts for both parts of a write. + +const N = 10000000; +{ + // Variant 1: Write a Buffer. + const server = net.createServer(common.mustCall((socket) => { + socket.end(Buffer.alloc(N), common.mustCall(() => { + assert.strictEqual(socket.bytesWritten, N); + })); + assert.strictEqual(socket.bytesWritten, N); + })).listen(0, common.mustCall(() => { + const client = net.connect(server.address().port); + client.resume(); + client.on('close', common.mustCall(() => { + assert.strictEqual(client.bytesRead, N); + server.close(); + })); + })); +} + +{ + // Variant 2: Write a string. + const server = net.createServer(common.mustCall((socket) => { + socket.end('a'.repeat(N), common.mustCall(() => { + assert.strictEqual(socket.bytesWritten, N); + })); + assert.strictEqual(socket.bytesWritten, N); + })).listen(0, common.mustCall(() => { + const client = net.connect(server.address().port); + client.resume(); + client.on('close', common.mustCall(() => { + assert.strictEqual(client.bytesRead, N); + server.close(); + })); + })); +} + +{ + // Variant 2: writev() with mixed data. + const server = net.createServer(common.mustCall((socket) => { + socket.cork(); + socket.write('a'.repeat(N)); + assert.strictEqual(socket.bytesWritten, N); + socket.write(Buffer.alloc(N)); + assert.strictEqual(socket.bytesWritten, 2 * N); + socket.end('', common.mustCall(() => { + assert.strictEqual(socket.bytesWritten, 2 * N); + })); + socket.uncork(); + })).listen(0, common.mustCall(() => { + const client = net.connect(server.address().port); + client.resume(); + client.on('close', common.mustCall(() => { + assert.strictEqual(client.bytesRead, 2 * N); + server.close(); + })); + })); +} diff --git a/tests/node_compat/test/parallel/test-net-can-reset-timeout.js b/tests/node_compat/test/parallel/test-net-can-reset-timeout.js new file mode 100644 index 00000000000000..1abd0a16a5ff27 --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-can-reset-timeout.js @@ -0,0 +1,64 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); + +// Ref: https://github.com/nodejs/node-v0.x-archive/issues/481 + +const net = require('net'); + +const server = net.createServer(common.mustCall(function(stream) { + stream.setTimeout(100); + + stream.resume(); + + stream.once('timeout', common.mustCall(function() { + console.log('timeout'); + // Try to reset the timeout. + stream.write('WHAT.'); + })); + + stream.on('end', common.mustCall(function() { + console.log('server side end'); + stream.end(); + })); +})); + +server.listen(0, common.mustCall(function() { + const c = net.createConnection(this.address().port); + + c.on('data', function() { + c.end(); + }); + + c.on('end', function() { + console.log('client side end'); + server.close(); + }); +})); diff --git a/tests/node_compat/test/parallel/test-net-connect-after-destroy.js b/tests/node_compat/test/parallel/test-net-connect-after-destroy.js index 1473877caf7960..76015e7dad81cf 100644 --- a/tests/node_compat/test/parallel/test-net-connect-after-destroy.js +++ b/tests/node_compat/test/parallel/test-net-connect-after-destroy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-connect-call-socket-connect.js b/tests/node_compat/test/parallel/test-net-connect-call-socket-connect.js new file mode 100644 index 00000000000000..db0cef479e3f34 --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-connect-call-socket-connect.js @@ -0,0 +1,46 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); + +// This test checks that calling `net.connect` internally calls +// `Socket.prototype.connect`. +// +// This is important for people who monkey-patch `Socket.prototype.connect` +// since it's not possible to monkey-patch `net.connect` directly (as the core +// `connect` function is called internally in Node instead of calling the +// `exports.connect` function). +// +// Monkey-patching of `Socket.prototype.connect` is done by - among others - +// most APM vendors, the async-listener module and the +// continuation-local-storage module. +// +// Related: +// - https://github.com/nodejs/node/pull/12342 +// - https://github.com/nodejs/node/pull/12852 + +const net = require('net'); +const Socket = net.Socket; + +// Monkey patch Socket.prototype.connect to check that it's called. +const orig = Socket.prototype.connect; +Socket.prototype.connect = common.mustCall(function() { + return orig.apply(this, arguments); +}); + +const server = net.createServer(); + +server.listen(common.mustCall(function() { + const port = server.address().port; + const client = net.connect({ port }, common.mustCall(function() { + client.end(); + })); + client.on('end', common.mustCall(function() { + server.close(); + })); +})); diff --git a/tests/node_compat/test/parallel/test-net-connect-destroy.js b/tests/node_compat/test/parallel/test-net-connect-destroy.js index 5618765e7e41a0..02126aeb48bc47 100644 --- a/tests/node_compat/test/parallel/test-net-connect-destroy.js +++ b/tests/node_compat/test/parallel/test-net-connect-destroy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-connect-immediate-destroy.js b/tests/node_compat/test/parallel/test-net-connect-immediate-destroy.js index 004cb86676ab88..8dcc9262b22ec3 100644 --- a/tests/node_compat/test/parallel/test-net-connect-immediate-destroy.js +++ b/tests/node_compat/test/parallel/test-net-connect-immediate-destroy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-connect-immediate-finish.js b/tests/node_compat/test/parallel/test-net-connect-immediate-finish.js index ef4f3d763aea64..c7ba46098dfffc 100644 --- a/tests/node_compat/test/parallel/test-net-connect-immediate-finish.js +++ b/tests/node_compat/test/parallel/test-net-connect-immediate-finish.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-net-connect-no-arg.js b/tests/node_compat/test/parallel/test-net-connect-no-arg.js index ad12f7abac7431..2211cd4f693aa1 100644 --- a/tests/node_compat/test/parallel/test-net-connect-no-arg.js +++ b/tests/node_compat/test/parallel/test-net-connect-no-arg.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-connect-options-fd.js b/tests/node_compat/test/parallel/test-net-connect-options-fd.js new file mode 100644 index 00000000000000..f9aa99c12bb7a6 --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-connect-options-fd.js @@ -0,0 +1,110 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Flags: --expose-internals +'use strict'; +const common = require('../common'); +if (common.isWindows) + common.skip('Does not support wrapping sockets with fd on Windows'); + +const assert = require('assert'); +const net = require('net'); +const path = require('path'); +const { internalBinding } = require('internal/test/binding'); +const { Pipe, constants: PipeConstants } = internalBinding('pipe_wrap'); + +const tmpdir = require('../common/tmpdir'); +tmpdir.refresh(); + +function testClients(getSocketOpt, getConnectOpt, getConnectCb) { + const cloneOptions = (index) => + ({ ...getSocketOpt(index), ...getConnectOpt(index) }); + return [ + net.connect(cloneOptions(0), getConnectCb(0)), + net.connect(cloneOptions(1)) + .on('connect', getConnectCb(1)), + net.createConnection(cloneOptions(2), getConnectCb(2)), + net.createConnection(cloneOptions(3)) + .on('connect', getConnectCb(3)), + new net.Socket(getSocketOpt(4)).connect(getConnectOpt(4), getConnectCb(4)), + new net.Socket(getSocketOpt(5)).connect(getConnectOpt(5)) + .on('connect', getConnectCb(5)), + ]; +} + +const CLIENT_VARIANTS = 6; // Same length as array above +const forAllClients = (cb) => common.mustCall(cb, CLIENT_VARIANTS); + +// Test Pipe fd is wrapped correctly +{ + // Use relative path to avoid hitting 108-char length limit + // for socket paths in libuv. + const prefix = path.relative('.', `${common.PIPE}-net-connect-options-fd`); + const serverPath = `${prefix}-server`; + let counter = 0; + let socketCounter = 0; + const handleMap = new Map(); + const server = net.createServer() + .on('connection', forAllClients(function serverOnConnection(socket) { + let clientFd; + socket.on('data', common.mustCall(function(data) { + clientFd = data.toString(); + console.error(`[Pipe]Received data from fd ${clientFd}`); + socket.end(); + })); + socket.on('end', common.mustCall(function() { + counter++; + console.error(`[Pipe]Received end from fd ${clientFd}, total ${counter}`); + if (counter === CLIENT_VARIANTS) { + setTimeout(() => { + console.error(`[Pipe]Server closed by fd ${clientFd}`); + server.close(); + }, 10); + } + }, 1)); + })) + .on('close', function() { + setTimeout(() => { + for (const pair of handleMap) { + console.error(`[Pipe]Clean up handle with fd ${pair[1].fd}`); + pair[1].close(); // clean up handles + } + }, 10); + }) + .on('error', function(err) { + console.error(err); + assert.fail(`[Pipe server]${err}`); + }) + .listen({ path: serverPath }, common.mustCall(function serverOnListen() { + const getSocketOpt = (index) => { + const handle = new Pipe(PipeConstants.SOCKET); + const err = handle.bind(`${prefix}-client-${socketCounter++}`); + assert(err >= 0, String(err)); + assert.notStrictEqual(handle.fd, -1); + handleMap.set(index, handle); + console.error(`[Pipe]Bound handle with Pipe ${handle.fd}`); + return { fd: handle.fd, readable: true, writable: true }; + }; + const getConnectOpt = () => ({ + path: serverPath + }); + const getConnectCb = (index) => common.mustCall(function clientOnConnect() { + // Test if it's wrapping an existing fd + assert(handleMap.has(index)); + const oldHandle = handleMap.get(index); + assert.strictEqual(oldHandle.fd, this._handle.fd); + this.write(String(oldHandle.fd)); + console.error(`[Pipe]Sending data through fd ${oldHandle.fd}`); + this.on('error', function(err) { + console.error(err); + assert.fail(`[Pipe Client]${err}`); + }); + }); + + testClients(getSocketOpt, getConnectOpt, getConnectCb); + })); +} diff --git a/tests/node_compat/test/parallel/test-net-connect-options-ipv6.js b/tests/node_compat/test/parallel/test-net-connect-options-ipv6.js new file mode 100644 index 00000000000000..de309e7be2b6c1 --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-connect-options-ipv6.js @@ -0,0 +1,74 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// Test that the family option of net.connect is honored. + +'use strict'; +const common = require('../common'); +if (!common.hasIPv6) + common.skip('no IPv6 support'); + +const assert = require('assert'); +const net = require('net'); + +const hostAddrIPv6 = '::1'; +const HOSTNAME = 'dummy'; + +const server = net.createServer({ allowHalfOpen: true }, (socket) => { + socket.resume(); + socket.on('end', common.mustCall()); + socket.end(); +}); + +function tryConnect() { + const connectOpt = { + host: HOSTNAME, + port: server.address().port, + family: 6, + allowHalfOpen: true, + lookup: common.mustCall((addr, opt, cb) => { + assert.strictEqual(addr, HOSTNAME); + assert.strictEqual(opt.family, 6); + cb(null, hostAddrIPv6, opt.family); + }) + }; + // No `mustCall`, since test could skip, and it's the only path to `close`. + const client = net.connect(connectOpt, () => { + client.resume(); + client.on('end', () => { + // Wait for next uv tick and make sure the socket stream is writable. + setTimeout(function() { + assert(client.writable); + client.end(); + }, 10); + }); + client.on('close', () => server.close()); + }); +} + +server.listen(0, hostAddrIPv6, tryConnect); diff --git a/tests/node_compat/test/parallel/test-net-connect-options-port.js b/tests/node_compat/test/parallel/test-net-connect-options-port.js new file mode 100644 index 00000000000000..b4f747b3ef06f6 --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-connect-options-port.js @@ -0,0 +1,237 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const dns = require('dns'); +const net = require('net'); + +// Test wrong type of ports +{ + const portTypeError = { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError' + }; + + syncFailToConnect(true, portTypeError); + syncFailToConnect(false, portTypeError); + syncFailToConnect([], portTypeError, true); + syncFailToConnect({}, portTypeError, true); + syncFailToConnect(null, portTypeError); +} + +// Test out of range ports +{ + const portRangeError = { + code: 'ERR_SOCKET_BAD_PORT', + name: 'RangeError' + }; + + syncFailToConnect('', portRangeError); + syncFailToConnect(' ', portRangeError); + syncFailToConnect('0x', portRangeError, true); + syncFailToConnect('-0x1', portRangeError, true); + syncFailToConnect(NaN, portRangeError); + syncFailToConnect(Infinity, portRangeError); + syncFailToConnect(-1, portRangeError); + syncFailToConnect(65536, portRangeError); +} + +// Test invalid hints +{ + // connect({hint}, cb) and connect({hint}) + const hints = (dns.ADDRCONFIG | dns.V4MAPPED | dns.ALL) + 42; + const hintOptBlocks = doConnect([{ port: 42, hints }], + () => common.mustNotCall()); + for (const fn of hintOptBlocks) { + assert.throws(fn, { + code: 'ERR_INVALID_ARG_VALUE', + name: 'TypeError', + message: /The argument 'hints' is invalid\. Received \d+/ + }); + } +} + +// Test valid combinations of connect(port) and connect(port, host) +{ + const expectedConnections = 72; + let serverConnected = 0; + + const server = net.createServer(common.mustCall((socket) => { + socket.end('ok'); + if (++serverConnected === expectedConnections) { + server.close(); + } + }, expectedConnections)); + + server.listen(0, common.localhostIPv4, common.mustCall(() => { + const port = server.address().port; + + // Total connections = 3 * 4(canConnect) * 6(doConnect) = 72 + canConnect(port); + canConnect(String(port)); + canConnect(`0x${port.toString(16)}`); + })); + + // Try connecting to random ports, but do so once the server is closed + server.on('close', () => { + asyncFailToConnect(0); + }); +} + +function doConnect(args, getCb) { + return [ + function createConnectionWithCb() { + return net.createConnection.apply(net, args.concat(getCb())) + .resume(); + }, + function createConnectionWithoutCb() { + return net.createConnection.apply(net, args) + .on('connect', getCb()) + .resume(); + }, + function connectWithCb() { + return net.connect.apply(net, args.concat(getCb())) + .resume(); + }, + function connectWithoutCb() { + return net.connect.apply(net, args) + .on('connect', getCb()) + .resume(); + }, + function socketConnectWithCb() { + const socket = new net.Socket(); + return socket.connect.apply(socket, args.concat(getCb())) + .resume(); + }, + function socketConnectWithoutCb() { + const socket = new net.Socket(); + return socket.connect.apply(socket, args) + .on('connect', getCb()) + .resume(); + }, + ]; +} + +function syncFailToConnect(port, assertErr, optOnly) { + const family = 4; + if (!optOnly) { + // connect(port, cb) and connect(port) + const portArgFunctions = doConnect([{ port, family }], + () => common.mustNotCall()); + for (const fn of portArgFunctions) { + assert.throws(fn, assertErr, `${fn.name}(${port})`); + } + + // connect(port, host, cb) and connect(port, host) + const portHostArgFunctions = doConnect([{ port, + host: 'localhost', + family }], + () => common.mustNotCall()); + for (const fn of portHostArgFunctions) { + assert.throws(fn, assertErr, `${fn.name}(${port}, 'localhost')`); + } + } + // connect({port}, cb) and connect({port}) + const portOptFunctions = doConnect([{ port, family }], + () => common.mustNotCall()); + for (const fn of portOptFunctions) { + assert.throws(fn, assertErr, `${fn.name}({port: ${port}})`); + } + + // connect({port, host}, cb) and connect({port, host}) + const portHostOptFunctions = doConnect([{ port: port, + host: 'localhost', + family: family }], + () => common.mustNotCall()); + for (const fn of portHostOptFunctions) { + assert.throws(fn, + assertErr, + `${fn.name}({port: ${port}, host: 'localhost'})`); + } +} + +function canConnect(port) { + const noop = () => common.mustCall(); + const family = 4; + + // connect(port, cb) and connect(port) + const portArgFunctions = doConnect([{ port, family }], noop); + for (const fn of portArgFunctions) { + fn(); + } + + // connect(port, host, cb) and connect(port, host) + const portHostArgFunctions = doConnect([{ port, host: 'localhost', family }], + noop); + for (const fn of portHostArgFunctions) { + fn(); + } + + // connect({port}, cb) and connect({port}) + const portOptFunctions = doConnect([{ port, family }], noop); + for (const fn of portOptFunctions) { + fn(); + } + + // connect({port, host}, cb) and connect({port, host}) + const portHostOptFns = doConnect([{ port, host: 'localhost', family }], + noop); + for (const fn of portHostOptFns) { + fn(); + } +} + +function asyncFailToConnect(port) { + const onError = () => common.mustCall((err) => { + const regexp = /^Error: connect E\w+.+$/; + assert.match(String(err), regexp); + }); + + const dont = () => common.mustNotCall(); + const family = 4; + // connect(port, cb) and connect(port) + const portArgFunctions = doConnect([{ port, family }], dont); + for (const fn of portArgFunctions) { + fn().on('error', onError()); + } + + // connect({port}, cb) and connect({port}) + const portOptFunctions = doConnect([{ port, family }], dont); + for (const fn of portOptFunctions) { + fn().on('error', onError()); + } + + // connect({port, host}, cb) and connect({port, host}) + const portHostOptFns = doConnect([{ port, host: 'localhost', family }], + dont); + for (const fn of portHostOptFns) { + fn().on('error', onError()); + } +} diff --git a/tests/node_compat/test/parallel/test-net-connect-paused-connection.js b/tests/node_compat/test/parallel/test-net-connect-paused-connection.js new file mode 100644 index 00000000000000..81c28aaa891005 --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-connect-paused-connection.js @@ -0,0 +1,40 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); + +const net = require('net'); + +net.createServer(function(conn) { + conn.unref(); +}).listen(0, common.mustCall(function() { + net.connect(this.address().port, 'localhost').pause(); + + setTimeout(common.mustNotCall('expected to exit'), 1000).unref(); +})).unref(); diff --git a/tests/node_compat/test/parallel/test-net-dns-custom-lookup.js b/tests/node_compat/test/parallel/test-net-dns-custom-lookup.js new file mode 100644 index 00000000000000..124a1f804bda4e --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-dns-custom-lookup.js @@ -0,0 +1,74 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); + +function check(addressType, cb) { + const server = net.createServer(function(client) { + client.end(); + server.close(); + cb && cb(); + }); + + const address = addressType === 4 ? common.localhostIPv4 : '::1'; + server.listen(0, address, common.mustCall(function() { + net.connect({ + port: this.address().port, + host: 'localhost', + family: addressType, + lookup: lookup + }).on('lookup', common.mustCall(function(err, ip, type) { + assert.strictEqual(err, null); + assert.strictEqual(address, ip); + assert.strictEqual(type, addressType); + })); + })); + + function lookup(host, dnsopts, cb) { + dnsopts.family = addressType; + + if (addressType === 4) { + process.nextTick(function() { + if (dnsopts.all) { + cb(null, [{ address: common.localhostIPv4, family: 4 }]); + } else { + cb(null, common.localhostIPv4, 4); + } + }); + } else { + process.nextTick(function() { + if (dnsopts.all) { + cb(null, [{ address: '::1', family: 6 }]); + } else { + cb(null, '::1', 6); + } + }); + } + } +} + +check(4, function() { + common.hasIPv6 && check(6); +}); + +// Verify that bad lookup() IPs are handled. +{ + net.connect({ + host: 'localhost', + port: 80, + lookup(host, dnsopts, cb) { + if (dnsopts.all) { + cb(null, [{ address: undefined, family: 4 }]); + } else { + cb(null, undefined, 4); + } + } + }).on('error', common.expectsError({ code: 'ERR_INVALID_IP_ADDRESS' })); +} diff --git a/tests/node_compat/test/parallel/test-net-dns-error.js b/tests/node_compat/test/parallel/test-net-dns-error.js index 0b91b0f227776f..4a78055ccffdd5 100644 --- a/tests/node_compat/test/parallel/test-net-dns-error.js +++ b/tests/node_compat/test/parallel/test-net-dns-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-net-dns-lookup-skip.js b/tests/node_compat/test/parallel/test-net-dns-lookup-skip.js new file mode 100644 index 00000000000000..5010f73e66ebd2 --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-dns-lookup-skip.js @@ -0,0 +1,26 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const net = require('net'); + +function check(addressType) { + const server = net.createServer(function(client) { + client.end(); + server.close(); + }); + + const address = addressType === 4 ? '127.0.0.1' : '::1'; + server.listen(0, address, function() { + net.connect(this.address().port, address) + .on('lookup', common.mustNotCall()); + }); +} + +check(4); +common.hasIPv6 && check(6); diff --git a/tests/node_compat/test/parallel/test-net-dns-lookup.js b/tests/node_compat/test/parallel/test-net-dns-lookup.js new file mode 100644 index 00000000000000..69278d4fbd5deb --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-dns-lookup.js @@ -0,0 +1,47 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); + +const server = net.createServer(function(client) { + client.end(); + server.close(); +}); + +server.listen(0, common.mustCall(function() { + net.connect(this.address().port, 'localhost') + .on('lookup', common.mustCallAtLeast(function(err, ip, type, host) { + assert.strictEqual(err, null); + assert.match(ip, /^(127\.0\.0\.1|::1)$/); + assert.match(type.toString(), /^(4|6)$/); + assert.strictEqual(host, 'localhost'); + }, 1)); +})); diff --git a/tests/node_compat/test/parallel/test-net-during-close.js b/tests/node_compat/test/parallel/test-net-during-close.js index d2ea486094ce47..0c4f51cd3de45c 100644 --- a/tests/node_compat/test/parallel/test-net-during-close.js +++ b/tests/node_compat/test/parallel/test-net-during-close.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-net-eaddrinuse.js b/tests/node_compat/test/parallel/test-net-eaddrinuse.js new file mode 100644 index 00000000000000..12069e3cb1e2a0 --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-eaddrinuse.js @@ -0,0 +1,44 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); + +const server1 = net.createServer(function(socket) { +}); +const server2 = net.createServer(function(socket) { +}); +server1.listen(0, common.mustCall(function() { + server2.on('error', function(error) { + assert.strictEqual(error.message.includes('EADDRINUSE'), true); + server1.close(); + }); + server2.listen(this.address().port); +})); diff --git a/tests/node_compat/test/parallel/test-net-end-without-connect.js b/tests/node_compat/test/parallel/test-net-end-without-connect.js index 44885b81bd7c0b..644b10de2be355 100644 --- a/tests/node_compat/test/parallel/test-net-end-without-connect.js +++ b/tests/node_compat/test/parallel/test-net-end-without-connect.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-net-error-twice.js b/tests/node_compat/test/parallel/test-net-error-twice.js new file mode 100644 index 00000000000000..950847cb2ebebc --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-error-twice.js @@ -0,0 +1,70 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); +const net = require('net'); + +const buf = Buffer.alloc(10 * 1024 * 1024, 0x62); + +const errs = []; +let clientSocket; +let serverSocket; + +function ready() { + if (clientSocket && serverSocket) { + clientSocket.destroy(); + serverSocket.write(buf); + } +} + +const server = net.createServer(function onConnection(conn) { + conn.on('error', function(err) { + errs.push(err); + if (errs.length > 1 && errs[0] === errs[1]) + assert.fail('Should not emit the same error twice'); + }); + conn.on('close', function() { + server.unref(); + }); + serverSocket = conn; + ready(); +}).listen(0, function() { + const client = net.connect({ port: this.address().port }); + + client.on('connect', function() { + clientSocket = client; + ready(); + }); +}); + +process.on('exit', function() { + console.log(errs); + assert.strictEqual(errs.length, 1); +}); diff --git a/tests/node_compat/test/parallel/test-net-isip.js b/tests/node_compat/test/parallel/test-net-isip.js index 5ca25fdb9b0d3e..a4eaa70ce190c9 100644 --- a/tests/node_compat/test/parallel/test-net-isip.js +++ b/tests/node_compat/test/parallel/test-net-isip.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-net-isipv4.js b/tests/node_compat/test/parallel/test-net-isipv4.js index cdc9f22aceaa4e..05ccc57258d2a4 100644 --- a/tests/node_compat/test/parallel/test-net-isipv4.js +++ b/tests/node_compat/test/parallel/test-net-isipv4.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-isipv6.js b/tests/node_compat/test/parallel/test-net-isipv6.js index 752aa5aad7387b..5791c9fa13f33a 100644 --- a/tests/node_compat/test/parallel/test-net-isipv6.js +++ b/tests/node_compat/test/parallel/test-net-isipv6.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-keepalive.js b/tests/node_compat/test/parallel/test-net-keepalive.js new file mode 100644 index 00000000000000..4f01b46751a26a --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-keepalive.js @@ -0,0 +1,59 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); + +let serverConnection; +let clientConnection; +const echoServer = net.createServer(function(connection) { + serverConnection = connection; + setTimeout(common.mustCall(function() { + // Make sure both connections are still open + assert.strictEqual(serverConnection.readyState, 'open'); + assert.strictEqual(clientConnection.readyState, 'open'); + serverConnection.end(); + clientConnection.end(); + echoServer.close(); + }, 1), common.platformTimeout(100)); + connection.setTimeout(0); + assert.notStrictEqual(connection.setKeepAlive, undefined); + // Send a keepalive packet after 50 ms + connection.setKeepAlive(true, common.platformTimeout(50)); + connection.on('end', function() { + connection.end(); + }); +}); +echoServer.listen(0); + +echoServer.on('listening', function() { + clientConnection = net.createConnection(this.address().port); + clientConnection.setTimeout(0); +}); diff --git a/tests/node_compat/test/parallel/test-net-listen-after-destroying-stdin.js b/tests/node_compat/test/parallel/test-net-listen-after-destroying-stdin.js new file mode 100644 index 00000000000000..7dbc610f958d41 --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-listen-after-destroying-stdin.js @@ -0,0 +1,29 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +// Just test that destroying stdin doesn't mess up listening on a server. +// This is a regression test for +// https://github.com/nodejs/node-v0.x-archive/issues/746. + +const common = require('../common'); +const net = require('net'); + +process.stdin.destroy(); + +const server = net.createServer(common.mustCall((socket) => { + console.log('accepted...'); + socket.end(common.mustCall(() => { console.log('finished...'); })); + server.close(common.mustCall(() => { console.log('closed'); })); +})); + + +server.listen(0, common.mustCall(() => { + console.log('listening...'); + + net.createConnection(server.address().port); +})); diff --git a/tests/node_compat/test/parallel/test-net-listen-close-server-callback-is-not-function.js b/tests/node_compat/test/parallel/test-net-listen-close-server-callback-is-not-function.js index 960fe6600c8d2b..94ab88407d2537 100644 --- a/tests/node_compat/test/parallel/test-net-listen-close-server-callback-is-not-function.js +++ b/tests/node_compat/test/parallel/test-net-listen-close-server-callback-is-not-function.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-listen-close-server.js b/tests/node_compat/test/parallel/test-net-listen-close-server.js index 18c4d111c80a41..df000b2dbec05f 100644 --- a/tests/node_compat/test/parallel/test-net-listen-close-server.js +++ b/tests/node_compat/test/parallel/test-net-listen-close-server.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-net-listen-error.js b/tests/node_compat/test/parallel/test-net-listen-error.js new file mode 100644 index 00000000000000..e8a7b2a9313b60 --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-listen-error.js @@ -0,0 +1,36 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const net = require('net'); + +const server = net.createServer(function(socket) { +}); +server.listen(1, '1.1.1.1', common.mustNotCall()); // EACCES or EADDRNOTAVAIL +server.on('error', common.mustCall()); diff --git a/tests/node_compat/test/parallel/test-net-listening.js b/tests/node_compat/test/parallel/test-net-listening.js index b11cfa59f64475..30d832ec0a7ac0 100644 --- a/tests/node_compat/test/parallel/test-net-listening.js +++ b/tests/node_compat/test/parallel/test-net-listening.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-local-address-port.js b/tests/node_compat/test/parallel/test-net-local-address-port.js new file mode 100644 index 00000000000000..9b18f89ee58d09 --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-local-address-port.js @@ -0,0 +1,50 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); + +const server = net.createServer(common.mustCall(function(socket) { + assert.strictEqual(socket.localAddress, common.localhostIPv4); + assert.strictEqual(socket.localPort, this.address().port); + assert.strictEqual(socket.localFamily, this.address().family); + socket.on('end', function() { + server.close(); + }); + socket.resume(); +})); + +server.listen(0, common.localhostIPv4, function() { + const client = net.createConnection(this.address() + .port, common.localhostIPv4); + client.on('connect', function() { + client.end(); + }); +}); diff --git a/tests/node_compat/test/parallel/test-net-localerror.js b/tests/node_compat/test/parallel/test-net-localerror.js index 30287a55c01db0..63276fe2bbdc34 100644 --- a/tests/node_compat/test/parallel/test-net-localerror.js +++ b/tests/node_compat/test/parallel/test-net-localerror.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-net-options-lookup.js b/tests/node_compat/test/parallel/test-net-options-lookup.js index e5b0a4c4c80dee..d285ae6e4a217f 100644 --- a/tests/node_compat/test/parallel/test-net-options-lookup.js +++ b/tests/node_compat/test/parallel/test-net-options-lookup.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-pause-resume-connecting.js b/tests/node_compat/test/parallel/test-net-pause-resume-connecting.js new file mode 100644 index 00000000000000..774ad66742efd1 --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-pause-resume-connecting.js @@ -0,0 +1,102 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); + +let connections = 0; +let dataEvents = 0; +let conn; + + +// Server +const server = net.createServer(function(conn) { + connections++; + conn.end('This was the year he fell to pieces.'); + + if (connections === 5) + server.close(); +}); + +server.listen(0, function() { + // Client 1 + conn = net.createConnection(this.address().port, 'localhost'); + conn.resume(); + conn.on('data', onDataOk); + + + // Client 2 + conn = net.createConnection(this.address().port, 'localhost'); + conn.pause(); + conn.resume(); + conn.on('data', onDataOk); + + + // Client 3 + conn = net.createConnection(this.address().port, 'localhost'); + conn.pause(); + conn.on('data', common.mustNotCall()); + scheduleTearDown(conn); + + + // Client 4 + conn = net.createConnection(this.address().port, 'localhost'); + conn.resume(); + conn.pause(); + conn.resume(); + conn.on('data', onDataOk); + + + // Client 5 + conn = net.createConnection(this.address().port, 'localhost'); + conn.resume(); + conn.resume(); + conn.pause(); + conn.on('data', common.mustNotCall()); + scheduleTearDown(conn); + + function onDataOk() { + dataEvents++; + } + + function scheduleTearDown(conn) { + setTimeout(function() { + conn.removeAllListeners('data'); + conn.resume(); + }, 100); + } +}); + + +// Exit sanity checks +process.on('exit', function() { + assert.strictEqual(connections, 5); + assert.strictEqual(dataEvents, 3); +}); diff --git a/tests/node_compat/test/parallel/test-net-persistent-keepalive.js b/tests/node_compat/test/parallel/test-net-persistent-keepalive.js new file mode 100644 index 00000000000000..80ab2a08db3c71 --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-persistent-keepalive.js @@ -0,0 +1,41 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); +const assert = require('assert'); +const net = require('net'); + +let serverConnection; +let clientConnection; +const echoServer = net.createServer(function(connection) { + serverConnection = connection; + setTimeout(function() { + // Make sure both connections are still open + assert.strictEqual(serverConnection.readyState, 'open'); + assert.strictEqual(clientConnection.readyState, 'open'); + serverConnection.end(); + clientConnection.end(); + echoServer.close(); + }, 600); + connection.setTimeout(0); + assert.strictEqual(typeof connection.setKeepAlive, 'function'); + connection.on('end', function() { + connection.end(); + }); +}); +echoServer.listen(0); + +echoServer.on('listening', function() { + clientConnection = new net.Socket(); + // Send a keepalive packet after 1000 ms + // and make sure it persists + const s = clientConnection.setKeepAlive(true, 400); + assert.ok(s instanceof net.Socket); + clientConnection.connect(this.address().port); + clientConnection.setTimeout(0); +}); diff --git a/tests/node_compat/test/parallel/test-net-persistent-nodelay.js b/tests/node_compat/test/parallel/test-net-persistent-nodelay.js new file mode 100644 index 00000000000000..c8733e31381625 --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-persistent-nodelay.js @@ -0,0 +1,43 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Flags: --expose-internals +'use strict'; +require('../common'); +const assert = require('assert'); +const net = require('net'); +const { internalBinding } = require('internal/test/binding'); +const TCPWrap = internalBinding('tcp_wrap').TCP; + +const echoServer = net.createServer(function(connection) { + connection.end(); +}); +echoServer.listen(0); + +let callCount = 0; + +const Socket = net.Socket; +const setNoDelay = TCPWrap.prototype.setNoDelay; + +TCPWrap.prototype.setNoDelay = function(enable) { + setNoDelay.call(this, enable); + callCount++; +}; + +echoServer.on('listening', function() { + const sock1 = new Socket(); + // setNoDelay before the handle is created + // there is probably a better way to test this + + const s = sock1.setNoDelay(); + assert.ok(s instanceof net.Socket); + sock1.connect(this.address().port); + sock1.on('end', function() { + assert.strictEqual(callCount, 1); + echoServer.close(); + }); +}); diff --git a/tests/node_compat/test/parallel/test-net-persistent-ref-unref.js b/tests/node_compat/test/parallel/test-net-persistent-ref-unref.js new file mode 100644 index 00000000000000..565f1211b1cd3d --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-persistent-ref-unref.js @@ -0,0 +1,48 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Flags: --expose-internals +'use strict'; +require('../common'); +const assert = require('assert'); +const net = require('net'); +const { internalBinding } = require('internal/test/binding'); +const TCPWrap = internalBinding('tcp_wrap').TCP; + +const echoServer = net.createServer((conn) => { + conn.end(); +}); + +const ref = TCPWrap.prototype.ref; +const unref = TCPWrap.prototype.unref; + +let refCount = 0; + +TCPWrap.prototype.ref = function() { + ref.call(this); + refCount++; + assert.strictEqual(refCount, 0); +}; + +TCPWrap.prototype.unref = function() { + unref.call(this); + refCount--; + assert.strictEqual(refCount, -1); +}; + +echoServer.listen(0); + +echoServer.on('listening', function() { + const sock = new net.Socket(); + sock.unref(); + sock.ref(); + sock.connect(this.address().port); + sock.on('end', () => { + assert.strictEqual(refCount, 0); + echoServer.close(); + }); +}); diff --git a/tests/node_compat/test/parallel/test-net-pipe-connect-errors.js b/tests/node_compat/test/parallel/test-net-pipe-connect-errors.js index 1e3681744a7714..c1e68f5b70a8bf 100644 --- a/tests/node_compat/test/parallel/test-net-pipe-connect-errors.js +++ b/tests/node_compat/test/parallel/test-net-pipe-connect-errors.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-net-reconnect.js b/tests/node_compat/test/parallel/test-net-reconnect.js new file mode 100644 index 00000000000000..65a8718e9e7ea7 --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-reconnect.js @@ -0,0 +1,95 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); + +const net = require('net'); + +const N = 50; +let client_recv_count = 0; +let client_end_count = 0; +let disconnect_count = 0; + +const server = net.createServer(function(socket) { + console.error('SERVER: got socket connection'); + socket.resume(); + + console.error('SERVER connect, writing'); + socket.write('hello\r\n'); + + socket.on('end', () => { + console.error('SERVER socket end, calling end()'); + socket.end(); + }); + + socket.on('close', (had_error) => { + console.log(`SERVER had_error: ${JSON.stringify(had_error)}`); + assert.strictEqual(had_error, false); + }); +}); + +server.listen(0, function() { + console.log('SERVER listening'); + const client = net.createConnection(this.address().port); + + client.setEncoding('UTF8'); + + client.on('connect', () => { + console.error('CLIENT connected', client._writableState); + }); + + client.on('data', function(chunk) { + client_recv_count += 1; + console.log(`client_recv_count ${client_recv_count}`); + assert.strictEqual(chunk, 'hello\r\n'); + console.error('CLIENT: calling end', client._writableState); + client.end(); + }); + + client.on('end', () => { + console.error('CLIENT end'); + client_end_count++; + }); + + client.on('close', (had_error) => { + console.log('CLIENT disconnect'); + assert.strictEqual(had_error, false); + if (disconnect_count++ < N) + client.connect(server.address().port); // reconnect + else + server.close(); + }); +}); + +process.on('exit', () => { + assert.strictEqual(disconnect_count, N + 1); + assert.strictEqual(client_recv_count, N + 1); + assert.strictEqual(client_end_count, N + 1); +}); diff --git a/tests/node_compat/test/parallel/test-net-remote-address-port.js b/tests/node_compat/test/parallel/test-net-remote-address-port.js new file mode 100644 index 00000000000000..ff1d209bea9652 --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-remote-address-port.js @@ -0,0 +1,91 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); + +const net = require('net'); + +let conns_closed = 0; + +const remoteAddrCandidates = [ common.localhostIPv4, + '::1', + '::ffff:127.0.0.1' ]; + +const remoteFamilyCandidates = ['IPv4', 'IPv6']; + +const server = net.createServer(common.mustCall(function(socket) { + assert.ok(remoteAddrCandidates.includes(socket.remoteAddress), + `Invalid remoteAddress: ${socket.remoteAddress}`); + assert.ok(remoteFamilyCandidates.includes(socket.remoteFamily), + `Invalid remoteFamily: ${socket.remoteFamily}`); + assert.ok(socket.remotePort); + assert.notStrictEqual(socket.remotePort, this.address().port); + socket.on('end', function() { + if (++conns_closed === 2) server.close(); + }); + socket.on('close', function() { + assert.ok(remoteAddrCandidates.includes(socket.remoteAddress)); + assert.ok(remoteFamilyCandidates.includes(socket.remoteFamily)); + }); + socket.resume(); +}, 2)); + +server.listen(0, function() { + const client = net.createConnection(this.address().port, '127.0.0.1'); + const client2 = net.createConnection(this.address().port); + + assert.strictEqual(client.remoteAddress, undefined); + assert.strictEqual(client.remoteFamily, undefined); + assert.strictEqual(client.remotePort, undefined); + assert.strictEqual(client2.remoteAddress, undefined); + assert.strictEqual(client2.remoteFamily, undefined); + assert.strictEqual(client2.remotePort, undefined); + + client.on('connect', function() { + assert.ok(remoteAddrCandidates.includes(client.remoteAddress)); + assert.ok(remoteFamilyCandidates.includes(client.remoteFamily)); + assert.strictEqual(client.remotePort, server.address().port); + client.end(); + }); + client.on('close', function() { + assert.ok(remoteAddrCandidates.includes(client.remoteAddress)); + assert.ok(remoteFamilyCandidates.includes(client.remoteFamily)); + }); + client2.on('connect', function() { + assert.ok(remoteAddrCandidates.includes(client2.remoteAddress)); + assert.ok(remoteFamilyCandidates.includes(client2.remoteFamily)); + assert.strictEqual(client2.remotePort, server.address().port); + client2.end(); + }); + client2.on('close', function() { + assert.ok(remoteAddrCandidates.includes(client2.remoteAddress)); + assert.ok(remoteFamilyCandidates.includes(client2.remoteFamily)); + }); +}); diff --git a/tests/node_compat/test/parallel/test-net-remote-address.js b/tests/node_compat/test/parallel/test-net-remote-address.js new file mode 100644 index 00000000000000..a157352674827b --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-remote-address.js @@ -0,0 +1,30 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const net = require('net'); +const { strictEqual } = require('assert'); + +const server = net.createServer(); + +server.listen(common.mustCall(function() { + const socket = net.connect({ port: server.address().port }); + + strictEqual(socket.connecting, true); + strictEqual(socket.remoteAddress, undefined); + + socket.on('connect', common.mustCall(function() { + strictEqual(socket.remoteAddress !== undefined, true); + socket.end(); + })); + + socket.on('end', common.mustCall(function() { + server.close(); + })); +})); diff --git a/tests/node_compat/test/parallel/test-net-server-capture-rejection.js b/tests/node_compat/test/parallel/test-net-server-capture-rejection.js new file mode 100644 index 00000000000000..21289d571daf43 --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-server-capture-rejection.js @@ -0,0 +1,34 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const events = require('events'); +const { createServer, connect } = require('net'); + +events.captureRejections = true; + +const server = createServer(common.mustCall(async (sock) => { + server.close(); + + const _err = new Error('kaboom'); + sock.on('error', common.mustCall((err) => { + assert.strictEqual(err, _err); + })); + throw _err; +})); + +server.listen(0, common.mustCall(() => { + const sock = connect( + server.address().port, + server.address().host + ); + + sock.on('close', common.mustCall()); +})); diff --git a/tests/node_compat/test/parallel/test-net-server-close.js b/tests/node_compat/test/parallel/test-net-server-close.js new file mode 100644 index 00000000000000..417bc11d8656be --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-server-close.js @@ -0,0 +1,52 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); + +const sockets = []; + +const server = net.createServer(function(c) { + c.on('close', common.mustCall()); + + sockets.push(c); + + if (sockets.length === 2) { + assert.strictEqual(server.close(), server); + sockets.forEach((c) => c.destroy()); + } +}); + +server.on('close', common.mustCall()); + +assert.strictEqual(server, server.listen(0, () => { + net.createConnection(server.address().port); + net.createConnection(server.address().port); +})); diff --git a/tests/node_compat/test/parallel/test-net-server-listen-options-signal.js b/tests/node_compat/test/parallel/test-net-server-listen-options-signal.js index 080dd933c48bcc..b6e93f37ba4540 100644 --- a/tests/node_compat/test/parallel/test-net-server-listen-options-signal.js +++ b/tests/node_compat/test/parallel/test-net-server-listen-options-signal.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-server-listen-options.js b/tests/node_compat/test/parallel/test-net-server-listen-options.js index 0220a78cbbced3..982373e871b657 100644 --- a/tests/node_compat/test/parallel/test-net-server-listen-options.js +++ b/tests/node_compat/test/parallel/test-net-server-listen-options.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-server-listen-remove-callback.js b/tests/node_compat/test/parallel/test-net-server-listen-remove-callback.js index bc9fff8523c2b3..9f48ce4f2e0f20 100644 --- a/tests/node_compat/test/parallel/test-net-server-listen-remove-callback.js +++ b/tests/node_compat/test/parallel/test-net-server-listen-remove-callback.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-net-server-options.js b/tests/node_compat/test/parallel/test-net-server-options.js index c8403771cd3988..3e4c557ddb5d14 100644 --- a/tests/node_compat/test/parallel/test-net-server-options.js +++ b/tests/node_compat/test/parallel/test-net-server-options.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-server-pause-on-connect.js b/tests/node_compat/test/parallel/test-net-server-pause-on-connect.js new file mode 100644 index 00000000000000..eb2b94d51c124e --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-server-pause-on-connect.js @@ -0,0 +1,79 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); +const msg = 'test'; +let stopped = true; +let server1Sock; + + +const server1ConnHandler = (socket) => { + socket.on('data', function(data) { + if (stopped) { + assert.fail('data event should not have happened yet'); + } + + assert.strictEqual(data.toString(), msg); + socket.end(); + server1.close(); + }); + + server1Sock = socket; +}; + +const server1 = net.createServer({ pauseOnConnect: true }, server1ConnHandler); + +const server2ConnHandler = (socket) => { + socket.on('data', function(data) { + assert.strictEqual(data.toString(), msg); + socket.end(); + server2.close(); + + assert.strictEqual(server1Sock.bytesRead, 0); + server1Sock.resume(); + stopped = false; + }); +}; + +const server2 = net.createServer({ pauseOnConnect: false }, server2ConnHandler); + +server1.listen(0, function() { + const clientHandler = common.mustCall(function() { + server2.listen(0, function() { + net.createConnection({ port: this.address().port }).write(msg); + }); + }); + net.createConnection({ port: this.address().port }).write(msg, clientHandler); +}); + +process.on('exit', function() { + assert.strictEqual(stopped, false); +}); diff --git a/tests/node_compat/test/parallel/test-net-server-unref-persistent.js b/tests/node_compat/test/parallel/test-net-server-unref-persistent.js index efbf38386fc0f5..8cff4eb211090a 100644 --- a/tests/node_compat/test/parallel/test-net-server-unref-persistent.js +++ b/tests/node_compat/test/parallel/test-net-server-unref-persistent.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-server-unref.js b/tests/node_compat/test/parallel/test-net-server-unref.js index 91e3bfdc40620d..30f870585ca919 100644 --- a/tests/node_compat/test/parallel/test-net-server-unref.js +++ b/tests/node_compat/test/parallel/test-net-server-unref.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-net-settimeout.js b/tests/node_compat/test/parallel/test-net-settimeout.js new file mode 100644 index 00000000000000..a1905b7f195197 --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-settimeout.js @@ -0,0 +1,57 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +// This example sets a timeout then immediately attempts to disable the timeout +// https://github.com/joyent/node/pull/2245 + +const common = require('../common'); +const net = require('net'); +const assert = require('assert'); + +const T = 100; + +const server = net.createServer(common.mustCall((c) => { + c.write('hello'); +})); + +server.listen(0, function() { + const socket = net.createConnection(this.address().port, 'localhost'); + + const s = socket.setTimeout(T, common.mustNotCall()); + assert.ok(s instanceof net.Socket); + + socket.on('data', common.mustCall(() => { + setTimeout(function() { + socket.destroy(); + server.close(); + }, T * 2); + })); + + socket.setTimeout(0); +}); diff --git a/tests/node_compat/test/parallel/test-net-socket-close-after-end.js b/tests/node_compat/test/parallel/test-net-socket-close-after-end.js new file mode 100644 index 00000000000000..27540e8fe69f8f --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-socket-close-after-end.js @@ -0,0 +1,38 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); + +const assert = require('assert'); +const net = require('net'); + +const server = net.createServer(); + +server.on('connection', (socket) => { + let endEmitted = false; + + socket.once('readable', () => { + setTimeout(() => { + socket.read(); + }, common.platformTimeout(100)); + }); + socket.on('end', () => { + endEmitted = true; + }); + socket.on('close', () => { + assert(endEmitted); + server.close(); + }); + socket.end('foo'); +}); + +server.listen(common.mustCall(() => { + const socket = net.createConnection(server.address().port, () => { + socket.end('foo'); + }); +})); diff --git a/tests/node_compat/test/parallel/test-net-socket-connect-invalid-autoselectfamily.js b/tests/node_compat/test/parallel/test-net-socket-connect-invalid-autoselectfamily.js new file mode 100644 index 00000000000000..110aadf7dd935f --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-socket-connect-invalid-autoselectfamily.js @@ -0,0 +1,16 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +require('../common'); +const assert = require('assert'); +const net = require('net'); + +assert.throws(() => { + net.connect({ port: 8080, autoSelectFamily: 'INVALID' }); +}, { code: 'ERR_INVALID_ARG_TYPE' }); diff --git a/tests/node_compat/test/parallel/test-net-socket-connect-without-cb.js b/tests/node_compat/test/parallel/test-net-socket-connect-without-cb.js new file mode 100644 index 00000000000000..20c493e2a999ba --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-socket-connect-without-cb.js @@ -0,0 +1,33 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); + +// This test ensures that socket.connect can be called without callback +// which is optional. + +const net = require('net'); + +const server = net.createServer(common.mustCall(function(conn) { + conn.end(); + server.close(); +})).listen(0, common.mustCall(function() { + const client = new net.Socket(); + + client.on('connect', common.mustCall(function() { + client.end(); + })); + + const address = server.address(); + if (!common.hasIPv6 && address.family === 'IPv6') { + // Necessary to pass CI running inside containers. + client.connect(address.port); + } else { + client.connect(address); + } +})); diff --git a/tests/node_compat/test/parallel/test-net-socket-connecting.js b/tests/node_compat/test/parallel/test-net-socket-connecting.js new file mode 100644 index 00000000000000..f5101e81d8764d --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-socket-connecting.js @@ -0,0 +1,28 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); +const assert = require('assert'); +const net = require('net'); + +const server = net.createServer((conn) => { + conn.end(); + server.close(); +}).listen(0, () => { + const client = net.connect(server.address().port, () => { + assert.strictEqual(client.connecting, false); + + // Legacy getter + assert.strictEqual(client._connecting, false); + client.end(); + }); + assert.strictEqual(client.connecting, true); + + // Legacy getter + assert.strictEqual(client._connecting, true); +}); diff --git a/tests/node_compat/test/parallel/test-net-socket-destroy-send.js b/tests/node_compat/test/parallel/test-net-socket-destroy-send.js new file mode 100644 index 00000000000000..b76bca875dc562 --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-socket-destroy-send.js @@ -0,0 +1,31 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const net = require('net'); +const assert = require('assert'); + +const server = net.createServer(); +server.listen(0, common.mustCall(function() { + const port = server.address().port; + const conn = net.createConnection(port); + + conn.on('connect', common.mustCall(function() { + // Test destroy returns this, even on multiple calls when it short-circuits. + assert.strictEqual(conn, conn.destroy().destroy()); + conn.on('error', common.mustNotCall()); + + conn.write(Buffer.from('kaboom'), common.expectsError({ + code: 'ERR_STREAM_DESTROYED', + message: 'Cannot call write after a stream was destroyed', + name: 'Error' + })); + server.close(); + })); +})); diff --git a/tests/node_compat/test/parallel/test-net-socket-destroy-twice.js b/tests/node_compat/test/parallel/test-net-socket-destroy-twice.js index 9aad4f0d25bb0c..597180bf4ebd64 100644 --- a/tests/node_compat/test/parallel/test-net-socket-destroy-twice.js +++ b/tests/node_compat/test/parallel/test-net-socket-destroy-twice.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-net-socket-end-before-connect.js b/tests/node_compat/test/parallel/test-net-socket-end-before-connect.js new file mode 100644 index 00000000000000..afe9664ccdcc11 --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-socket-end-before-connect.js @@ -0,0 +1,20 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); + +const net = require('net'); + +const server = net.createServer(); + +server.listen(common.mustCall(() => { + const socket = net.createConnection(server.address().port); + socket.on('close', common.mustCall(() => server.close())); + socket.end(); +})); diff --git a/tests/node_compat/test/parallel/test-net-socket-end-callback.js b/tests/node_compat/test/parallel/test-net-socket-end-callback.js new file mode 100644 index 00000000000000..7b6d3ae5c2289d --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-socket-end-callback.js @@ -0,0 +1,29 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const net = require('net'); + +const server = net.createServer((socket) => { + socket.resume(); +}).unref(); + +server.listen(common.mustCall(() => { + const connect = (...args) => { + const socket = net.createConnection(server.address().port, () => { + socket.end(...args); + }); + }; + + const cb = common.mustCall(3); + + connect(cb); + connect('foo', cb); + connect('foo', 'utf8', cb); +})); diff --git a/tests/node_compat/test/parallel/test-net-socket-no-halfopen-enforcer.js b/tests/node_compat/test/parallel/test-net-socket-no-halfopen-enforcer.js index 1a2e6f63e49d92..a9c8ef8e80310f 100644 --- a/tests/node_compat/test/parallel/test-net-socket-no-halfopen-enforcer.js +++ b/tests/node_compat/test/parallel/test-net-socket-no-halfopen-enforcer.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-socket-ready-without-cb.js b/tests/node_compat/test/parallel/test-net-socket-ready-without-cb.js new file mode 100644 index 00000000000000..0f71f410bdd8f7 --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-socket-ready-without-cb.js @@ -0,0 +1,27 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); + +// This test ensures that socket.connect can be called without callback +// which is optional. + +const net = require('net'); + +const server = net.createServer(common.mustCall(function(conn) { + conn.end(); + server.close(); +})).listen(0, 'localhost', common.mustCall(function() { + const client = new net.Socket(); + + client.on('ready', common.mustCall(function() { + client.end(); + })); + + client.connect(server.address()); +})); diff --git a/tests/node_compat/test/parallel/test-net-socket-setnodelay.js b/tests/node_compat/test/parallel/test-net-socket-setnodelay.js index 3d11b845280625..ab389c58f7f7d9 100644 --- a/tests/node_compat/test/parallel/test-net-socket-setnodelay.js +++ b/tests/node_compat/test/parallel/test-net-socket-setnodelay.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-socket-timeout-unref.js b/tests/node_compat/test/parallel/test-net-socket-timeout-unref.js new file mode 100644 index 00000000000000..5e3fc8bd3196e1 --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-socket-timeout-unref.js @@ -0,0 +1,63 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +// Test that unref'ed sockets with timeouts do not prevent exit. + +const common = require('../common'); +const net = require('net'); + +const server = net.createServer(function(c) { + c.write('hello'); + c.unref(); +}); +server.listen(0); +server.unref(); + +let connections = 0; +const sockets = []; +const delays = [8, 5, 3, 6, 2, 4]; + +delays.forEach(function(T) { + const socket = net.createConnection(server.address().port, 'localhost'); + socket.on('connect', common.mustCall(function() { + if (++connections === delays.length) { + sockets.forEach(function(s) { + s.socket.setTimeout(s.timeout, function() { + s.socket.destroy(); + throw new Error('socket timed out unexpectedly'); + }); + + s.socket.unref(); + }); + } + })); + + sockets.push({ socket: socket, timeout: T * 1000 }); +}); diff --git a/tests/node_compat/test/parallel/test-net-socket-write-after-close.js b/tests/node_compat/test/parallel/test-net-socket-write-after-close.js new file mode 100644 index 00000000000000..9b2150294e359d --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-socket-write-after-close.js @@ -0,0 +1,49 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); + +{ + const server = net.createServer(); + + server.listen(common.mustCall(() => { + const port = server.address().port; + const client = net.connect({ port }, common.mustCall(() => { + client.on('error', common.mustCall((err) => { + server.close(); + assert.strictEqual(err.constructor, Error); + assert.strictEqual(err.message, 'write EBADF'); + })); + client._handle.close(); + client.write('foo'); + })); + })); +} + +{ + const server = net.createServer(); + + server.listen(common.mustCall(() => { + const port = server.address().port; + const client = net.connect({ port }, common.mustCall(() => { + client.on('error', common.expectsError({ + code: 'ERR_SOCKET_CLOSED', + message: 'Socket is closed', + name: 'Error' + })); + + server.close(); + + client._handle.close(); + client._handle = null; + client.write('foo'); + })); + })); +} diff --git a/tests/node_compat/test/parallel/test-net-socket-write-error.js b/tests/node_compat/test/parallel/test-net-socket-write-error.js new file mode 100644 index 00000000000000..a330058fdebdba --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-socket-write-error.js @@ -0,0 +1,29 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const net = require('net'); +const assert = require('assert'); + +const server = net.createServer().listen(0, connectToServer); + +function connectToServer() { + const client = net.createConnection(this.address().port, () => { + client.on('error', common.mustNotCall()); + assert.throws(() => { + client.write(1337); + }, { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError' + }); + + client.destroy(); + }) + .on('close', () => server.close()); +} diff --git a/tests/node_compat/test/parallel/test-net-sync-cork.js b/tests/node_compat/test/parallel/test-net-sync-cork.js new file mode 100644 index 00000000000000..289319c4294752 --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-sync-cork.js @@ -0,0 +1,40 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); + +const server = net.createServer(handle); + +const N = 100; +const buf = Buffer.alloc(2, 'a'); + +server.listen(0, function() { + const conn = net.connect(this.address().port); + + conn.on('connect', () => { + let res = true; + let i = 0; + for (; i < N && res; i++) { + conn.cork(); + conn.write(buf); + res = conn.write(buf); + conn.uncork(); + } + assert.strictEqual(i, N); + conn.end(); + }); +}); + +function handle(socket) { + socket.resume(); + socket.on('error', common.mustNotCall()) + .on('close', common.mustCall(() => server.close())); +} diff --git a/tests/node_compat/test/parallel/test-net-timeout-no-handle.js b/tests/node_compat/test/parallel/test-net-timeout-no-handle.js index eea460239769d8..7b4e74ff194233 100644 --- a/tests/node_compat/test/parallel/test-net-timeout-no-handle.js +++ b/tests/node_compat/test/parallel/test-net-timeout-no-handle.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-net-writable.js b/tests/node_compat/test/parallel/test-net-writable.js new file mode 100644 index 00000000000000..86ea2a3c037e7d --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-writable.js @@ -0,0 +1,22 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); + +const server = net.createServer(common.mustCall(function(s) { + server.close(); + s.end(); +})).listen(0, '127.0.0.1', common.mustCall(function() { + const socket = net.connect(this.address().port, '127.0.0.1'); + socket.on('end', common.mustCall(() => { + assert.strictEqual(socket.writable, true); + socket.write('hello world'); + })); +})); diff --git a/tests/node_compat/test/parallel/test-net-write-connect-write.js b/tests/node_compat/test/parallel/test-net-write-connect-write.js new file mode 100644 index 00000000000000..a87d80479ed0f8 --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-write-connect-write.js @@ -0,0 +1,53 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); + +const server = net.createServer(function(socket) { + socket.pipe(socket); +}).listen(0, common.mustCall(function() { + const conn = net.connect(this.address().port); + let received = ''; + + conn.setEncoding('utf8'); + conn.write('before'); + conn.on('connect', function() { + conn.write(' after'); + }); + conn.on('data', function(buf) { + received += buf; + conn.end(); + }); + conn.on('end', common.mustCall(function() { + server.close(); + assert.strictEqual(received, 'before after'); + })); +})); diff --git a/tests/node_compat/test/parallel/test-net-write-fully-async-buffer.js b/tests/node_compat/test/parallel/test-net-write-fully-async-buffer.js new file mode 100644 index 00000000000000..222c97ed9426e5 --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-write-fully-async-buffer.js @@ -0,0 +1,41 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +// Flags: --expose-gc + +// Note: This is a variant of test-net-write-fully-async-hex-string.js. +// This always worked, but it seemed appropriate to add a test that checks the +// behavior for Buffers, too. +const common = require('../common'); +const net = require('net'); + +const data = Buffer.alloc(1000000); + +const server = net.createServer(common.mustCall(function(conn) { + conn.resume(); +})).listen(0, common.mustCall(function() { + const conn = net.createConnection(this.address().port, common.mustCall(() => { + let count = 0; + + function writeLoop() { + if (count++ === 200) { + conn.destroy(); + server.close(); + return; + } + + while (conn.write(Buffer.from(data))); + global.gc({ type: 'minor' }); + // The buffer allocated above should still be alive. + } + + conn.on('drain', writeLoop); + + writeLoop(); + })); +})); diff --git a/tests/node_compat/test/parallel/test-net-write-fully-async-hex-string.js b/tests/node_compat/test/parallel/test-net-write-fully-async-hex-string.js new file mode 100644 index 00000000000000..81a3db70105fdf --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-write-fully-async-hex-string.js @@ -0,0 +1,39 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +// Flags: --expose-gc + +// Regression test for https://github.com/nodejs/node/issues/8251. +const common = require('../common'); +const net = require('net'); + +const data = Buffer.alloc(1000000).toString('hex'); + +const server = net.createServer(common.mustCall(function(conn) { + conn.resume(); +})).listen(0, common.mustCall(function() { + const conn = net.createConnection(this.address().port, common.mustCall(() => { + let count = 0; + + function writeLoop() { + if (count++ === 20) { + conn.destroy(); + server.close(); + return; + } + + while (conn.write(data, 'hex')); + global.gc({ type: 'minor' }); + // The buffer allocated inside the .write() call should still be alive. + } + + conn.on('drain', writeLoop); + + writeLoop(); + })); +})); diff --git a/tests/node_compat/test/parallel/test-net-write-slow.js b/tests/node_compat/test/parallel/test-net-write-slow.js new file mode 100644 index 00000000000000..0204bb979fdfc2 --- /dev/null +++ b/tests/node_compat/test/parallel/test-net-write-slow.js @@ -0,0 +1,70 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); + +const SIZE = 2E5; +const N = 10; +let flushed = 0; +let received = 0; +const buf = Buffer.alloc(SIZE, 'a'); + +const server = net.createServer(function(socket) { + socket.setNoDelay(); + socket.setTimeout(9999); + socket.on('timeout', function() { + assert.fail(`flushed: ${flushed}, received: ${received}/${SIZE * N}`); + }); + + for (let i = 0; i < N; ++i) { + socket.write(buf, function() { + ++flushed; + if (flushed === N) { + socket.setTimeout(0); + } + }); + } + socket.end(); + +}).listen(0, common.mustCall(function() { + const conn = net.connect(this.address().port); + conn.on('data', function(buf) { + received += buf.length; + conn.pause(); + setTimeout(function() { + conn.resume(); + }, 20); + }); + conn.on('end', common.mustCall(function() { + server.close(); + assert.strictEqual(received, SIZE * N); + })); +})); diff --git a/tests/node_compat/test/parallel/test-next-tick-doesnt-hang.js b/tests/node_compat/test/parallel/test-next-tick-doesnt-hang.js index a08c9180633021..916e815bc53a16 100644 --- a/tests/node_compat/test/parallel/test-next-tick-doesnt-hang.js +++ b/tests/node_compat/test/parallel/test-next-tick-doesnt-hang.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-next-tick-domain.js b/tests/node_compat/test/parallel/test-next-tick-domain.js new file mode 100644 index 00000000000000..c39f56bea1df93 --- /dev/null +++ b/tests/node_compat/test/parallel/test-next-tick-domain.js @@ -0,0 +1,38 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); + +const origNextTick = process.nextTick; + +require('domain'); + +// Requiring domain should not change nextTick. +assert.strictEqual(origNextTick, process.nextTick); diff --git a/tests/node_compat/test/parallel/test-next-tick-errors.js b/tests/node_compat/test/parallel/test-next-tick-errors.js new file mode 100644 index 00000000000000..a275029f5ac37e --- /dev/null +++ b/tests/node_compat/test/parallel/test-next-tick-errors.js @@ -0,0 +1,81 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); + +const order = []; +let exceptionHandled = false; + +// This nextTick function will throw an error. It should only be called once. +// When it throws an error, it should still get removed from the queue. +process.nextTick(function() { + order.push('A'); + // cause an error + what(); // eslint-disable-line no-undef +}); + +// This nextTick function should remain in the queue when the first one +// is removed. It should be called if the error in the first one is +// caught (which we do in this test). +process.nextTick(function() { + order.push('C'); +}); + +function testNextTickWith(val) { + assert.throws(() => { + process.nextTick(val); + }, { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError' + }); +} + +testNextTickWith(false); +testNextTickWith(true); +testNextTickWith(1); +testNextTickWith('str'); +testNextTickWith({}); +testNextTickWith([]); + +process.on('uncaughtException', function(err, errorOrigin) { + assert.strictEqual(errorOrigin, 'uncaughtException'); + + if (!exceptionHandled) { + exceptionHandled = true; + order.push('B'); + } else { + // If we get here then the first process.nextTick got called twice + order.push('OOPS!'); + } +}); + +process.on('exit', function() { + assert.deepStrictEqual(order, ['A', 'B', 'C']); +}); diff --git a/tests/node_compat/test/parallel/test-next-tick-fixed-queue-regression.js b/tests/node_compat/test/parallel/test-next-tick-fixed-queue-regression.js index d1b2bd56b6f6ef..9129fbbe422557 100644 --- a/tests/node_compat/test/parallel/test-next-tick-fixed-queue-regression.js +++ b/tests/node_compat/test/parallel/test-next-tick-fixed-queue-regression.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-next-tick-intentional-starvation.js b/tests/node_compat/test/parallel/test-next-tick-intentional-starvation.js index 3b286b6bdaa679..16623fb6ca567f 100644 --- a/tests/node_compat/test/parallel/test-next-tick-intentional-starvation.js +++ b/tests/node_compat/test/parallel/test-next-tick-intentional-starvation.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-next-tick-ordering.js b/tests/node_compat/test/parallel/test-next-tick-ordering.js index 3dd4dc2ea2bd27..78f7b3b1204271 100644 --- a/tests/node_compat/test/parallel/test-next-tick-ordering.js +++ b/tests/node_compat/test/parallel/test-next-tick-ordering.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-next-tick-ordering2.js b/tests/node_compat/test/parallel/test-next-tick-ordering2.js index 90239fb219e05d..6ea41c9079e7f1 100644 --- a/tests/node_compat/test/parallel/test-next-tick-ordering2.js +++ b/tests/node_compat/test/parallel/test-next-tick-ordering2.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-next-tick-when-exiting.js b/tests/node_compat/test/parallel/test-next-tick-when-exiting.js index 0ba2a2db3b8ffa..c2e9ecdbc39e93 100644 --- a/tests/node_compat/test/parallel/test-next-tick-when-exiting.js +++ b/tests/node_compat/test/parallel/test-next-tick-when-exiting.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-next-tick.js b/tests/node_compat/test/parallel/test-next-tick.js index 6e4e7bfe79a0c9..1e6ceab70c6b99 100644 --- a/tests/node_compat/test/parallel/test-next-tick.js +++ b/tests/node_compat/test/parallel/test-next-tick.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-no-node-snapshot.js b/tests/node_compat/test/parallel/test-no-node-snapshot.js new file mode 100644 index 00000000000000..a251c9f9d0ce80 --- /dev/null +++ b/tests/node_compat/test/parallel/test-no-node-snapshot.js @@ -0,0 +1,12 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +// Flags: --no-node-snapshot + +require('../common'); diff --git a/tests/node_compat/test/parallel/test-nodeeventtarget.js b/tests/node_compat/test/parallel/test-nodeeventtarget.js index d78a6628793786..aa325f601422a8 100644 --- a/tests/node_compat/test/parallel/test-nodeeventtarget.js +++ b/tests/node_compat/test/parallel/test-nodeeventtarget.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --expose-internals --no-warnings diff --git a/tests/node_compat/test/parallel/test-os-homedir-no-envvar.js b/tests/node_compat/test/parallel/test-os-homedir-no-envvar.js new file mode 100644 index 00000000000000..f687422da8efc2 --- /dev/null +++ b/tests/node_compat/test/parallel/test-os-homedir-no-envvar.js @@ -0,0 +1,37 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const cp = require('child_process'); +const os = require('os'); +const path = require('path'); + + +if (process.argv[2] === 'child') { + if (common.isWindows) + assert.strictEqual(process.env.USERPROFILE, undefined); + else + assert.strictEqual(process.env.HOME, undefined); + + const home = os.homedir(); + + assert.strictEqual(typeof home, 'string'); + assert(home.includes(path.sep)); +} else { + if (common.isWindows) + delete process.env.USERPROFILE; + else + delete process.env.HOME; + + const child = cp.spawnSync(process.execPath, [__filename, 'child'], { + env: process.env + }); + + assert.strictEqual(child.status, 0); +} diff --git a/tests/node_compat/test/parallel/test-os.js b/tests/node_compat/test/parallel/test-os.js index f7c24342adac9d..f3036c2c62ca97 100644 --- a/tests/node_compat/test/parallel/test-os.js +++ b/tests/node_compat/test/parallel/test-os.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-outgoing-message-destroy.js b/tests/node_compat/test/parallel/test-outgoing-message-destroy.js index 1ad4ce2ebff758..1e720ab5bcd03e 100644 --- a/tests/node_compat/test/parallel/test-outgoing-message-destroy.js +++ b/tests/node_compat/test/parallel/test-outgoing-message-destroy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-outgoing-message-pipe.js b/tests/node_compat/test/parallel/test-outgoing-message-pipe.js index d20df11e92e483..a0f28ae8e6f05b 100644 --- a/tests/node_compat/test/parallel/test-outgoing-message-pipe.js +++ b/tests/node_compat/test/parallel/test-outgoing-message-pipe.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-parse-args.mjs b/tests/node_compat/test/parallel/test-parse-args.mjs index 0d5aa72f6302e7..c03c270e0ddfbd 100644 --- a/tests/node_compat/test/parallel/test-parse-args.mjs +++ b/tests/node_compat/test/parallel/test-parse-args.mjs @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. import '../common/index.mjs'; diff --git a/tests/node_compat/test/parallel/test-path-basename.js b/tests/node_compat/test/parallel/test-path-basename.js index 5a5da668e14334..8c186bc5cdc586 100644 --- a/tests/node_compat/test/parallel/test-path-basename.js +++ b/tests/node_compat/test/parallel/test-path-basename.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-path-dirname.js b/tests/node_compat/test/parallel/test-path-dirname.js index b6a59d9991224b..dffb0e11d176f5 100644 --- a/tests/node_compat/test/parallel/test-path-dirname.js +++ b/tests/node_compat/test/parallel/test-path-dirname.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-path-extname.js b/tests/node_compat/test/parallel/test-path-extname.js index 8cba90b073a5c9..96edd9c6acc60f 100644 --- a/tests/node_compat/test/parallel/test-path-extname.js +++ b/tests/node_compat/test/parallel/test-path-extname.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-path-isabsolute.js b/tests/node_compat/test/parallel/test-path-isabsolute.js index 8ad2f93f5cc483..e1820f07189318 100644 --- a/tests/node_compat/test/parallel/test-path-isabsolute.js +++ b/tests/node_compat/test/parallel/test-path-isabsolute.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-path-join.js b/tests/node_compat/test/parallel/test-path-join.js index 05e3d86f780435..ef794619d6ab0f 100644 --- a/tests/node_compat/test/parallel/test-path-join.js +++ b/tests/node_compat/test/parallel/test-path-join.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-path-makelong.js b/tests/node_compat/test/parallel/test-path-makelong.js index a9dbce2a037d94..afd113538b1502 100644 --- a/tests/node_compat/test/parallel/test-path-makelong.js +++ b/tests/node_compat/test/parallel/test-path-makelong.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-path-normalize.js b/tests/node_compat/test/parallel/test-path-normalize.js index 2773a6088f5e3f..f8c9b47622285f 100644 --- a/tests/node_compat/test/parallel/test-path-normalize.js +++ b/tests/node_compat/test/parallel/test-path-normalize.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-path-parse-format.js b/tests/node_compat/test/parallel/test-path-parse-format.js index 7f4682899ef0ac..b2aeb1fb8346b3 100644 --- a/tests/node_compat/test/parallel/test-path-parse-format.js +++ b/tests/node_compat/test/parallel/test-path-parse-format.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-path-posix-exists.js b/tests/node_compat/test/parallel/test-path-posix-exists.js index 97cb68f0a89e52..b3c65726445e9c 100644 --- a/tests/node_compat/test/parallel/test-path-posix-exists.js +++ b/tests/node_compat/test/parallel/test-path-posix-exists.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-path-relative.js b/tests/node_compat/test/parallel/test-path-relative.js index bb0ba2ba11a90a..45d7d092318ff7 100644 --- a/tests/node_compat/test/parallel/test-path-relative.js +++ b/tests/node_compat/test/parallel/test-path-relative.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-path-win32-exists.js b/tests/node_compat/test/parallel/test-path-win32-exists.js index 559142bc221cd5..96ef69191c73cc 100644 --- a/tests/node_compat/test/parallel/test-path-win32-exists.js +++ b/tests/node_compat/test/parallel/test-path-win32-exists.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-path-zero-length-strings.js b/tests/node_compat/test/parallel/test-path-zero-length-strings.js index 8b26e9ffeb738e..8c68bfff1fcef7 100644 --- a/tests/node_compat/test/parallel/test-path-zero-length-strings.js +++ b/tests/node_compat/test/parallel/test-path-zero-length-strings.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-path.js b/tests/node_compat/test/parallel/test-path.js index 2d0a9287236893..4396246b1b96c4 100644 --- a/tests/node_compat/test/parallel/test-path.js +++ b/tests/node_compat/test/parallel/test-path.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-perf-gc-crash.js b/tests/node_compat/test/parallel/test-perf-gc-crash.js new file mode 100644 index 00000000000000..474d1d04668780 --- /dev/null +++ b/tests/node_compat/test/parallel/test-perf-gc-crash.js @@ -0,0 +1,32 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +require('../common'); + +// Refers to https://github.com/nodejs/node/issues/39548 + +// The test fails if this crashes. If it closes normally, +// then all is good. + +const { + PerformanceObserver, +} = require('perf_hooks'); + +// We don't actually care if the observer callback is called here. +const gcObserver = new PerformanceObserver(() => {}); + +gcObserver.observe({ entryTypes: ['gc'] }); + +gcObserver.disconnect(); + +const gcObserver2 = new PerformanceObserver(() => {}); + +gcObserver2.observe({ entryTypes: ['gc'] }); + +gcObserver2.disconnect(); diff --git a/tests/node_compat/test/parallel/test-performanceobserver-gc.js b/tests/node_compat/test/parallel/test-performanceobserver-gc.js new file mode 100644 index 00000000000000..b508bc4dfcc584 --- /dev/null +++ b/tests/node_compat/test/parallel/test-performanceobserver-gc.js @@ -0,0 +1,24 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +require('../common'); + +// Verifies that setting up two observers to listen +// to gc performance does not crash. + +const { + PerformanceObserver, +} = require('perf_hooks'); + +// We don't actually care if the callback is ever invoked in this test +const obs = new PerformanceObserver(() => {}); +const obs2 = new PerformanceObserver(() => {}); + +obs.observe({ type: 'gc' }); +obs2.observe({ type: 'gc' }); diff --git a/tests/node_compat/test/parallel/test-pipe-return-val.js b/tests/node_compat/test/parallel/test-pipe-return-val.js new file mode 100644 index 00000000000000..c72bb275f8d714 --- /dev/null +++ b/tests/node_compat/test/parallel/test-pipe-return-val.js @@ -0,0 +1,40 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +// This test ensures SourceStream.pipe(DestStream) returns DestStream + +require('../common'); +const Stream = require('stream').Stream; +const assert = require('assert'); + +const sourceStream = new Stream(); +const destStream = new Stream(); +const result = sourceStream.pipe(destStream); + +assert.strictEqual(result, destStream); diff --git a/tests/node_compat/test/parallel/test-pipe-writev.js b/tests/node_compat/test/parallel/test-pipe-writev.js new file mode 100644 index 00000000000000..900410427133a2 --- /dev/null +++ b/tests/node_compat/test/parallel/test-pipe-writev.js @@ -0,0 +1,52 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +if (common.isWindows) + common.skip('Unix-specific test'); + +const assert = require('assert'); +const net = require('net'); + +const tmpdir = require('../common/tmpdir'); +tmpdir.refresh(); + +const server = net.createServer((connection) => { + connection.on('error', (err) => { + throw err; + }); + + const writev = connection._writev.bind(connection); + connection._writev = common.mustCall(writev); + + connection.cork(); + connection.write('pi'); + connection.write('ng'); + connection.end(); +}); + +server.on('error', (err) => { + throw err; +}); + +server.listen(common.PIPE, () => { + const client = net.connect(common.PIPE); + + client.on('error', (err) => { + throw err; + }); + + client.on('data', common.mustCall((data) => { + assert.strictEqual(data.toString(), 'ping'); + })); + + client.on('end', () => { + server.close(); + }); +}); diff --git a/tests/node_compat/test/parallel/test-process-abort.js b/tests/node_compat/test/parallel/test-process-abort.js new file mode 100644 index 00000000000000..6117205e6146a4 --- /dev/null +++ b/tests/node_compat/test/parallel/test-process-abort.js @@ -0,0 +1,19 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); + +if (!common.isMainThread) + common.skip('process.abort() is not available in Workers'); + +// Check that our built-in methods do not have a prototype/constructor behaviour +// if they don't need to. This could be tested for any of our C++ methods. +assert.strictEqual(process.abort.prototype, undefined); +assert.throws(() => new process.abort(), TypeError); diff --git a/tests/node_compat/test/parallel/test-process-argv-0.js b/tests/node_compat/test/parallel/test-process-argv-0.js new file mode 100644 index 00000000000000..3a4aa6982242da --- /dev/null +++ b/tests/node_compat/test/parallel/test-process-argv-0.js @@ -0,0 +1,49 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const path = require('path'); +const assert = require('assert'); +const spawn = require('child_process').spawn; + +if (process.argv[2] !== 'child') { + const child = spawn(process.execPath, [__filename, 'child'], { + cwd: path.dirname(process.execPath) + }); + + let childArgv0 = ''; + child.stdout.on('data', function(chunk) { + childArgv0 += chunk; + }); + process.on('exit', function() { + assert.strictEqual(childArgv0, process.execPath); + }); +} else { + process.stdout.write(process.argv[0]); +} diff --git a/tests/node_compat/test/parallel/test-process-beforeexit.js b/tests/node_compat/test/parallel/test-process-beforeexit.js index 036b88c9f2e51b..27bbe677629e9f 100644 --- a/tests/node_compat/test/parallel/test-process-beforeexit.js +++ b/tests/node_compat/test/parallel/test-process-beforeexit.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-process-binding-internalbinding-allowlist.js b/tests/node_compat/test/parallel/test-process-binding-internalbinding-allowlist.js index 52abd847a1af14..2747e9374397a4 100644 --- a/tests/node_compat/test/parallel/test-process-binding-internalbinding-allowlist.js +++ b/tests/node_compat/test/parallel/test-process-binding-internalbinding-allowlist.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --no-warnings diff --git a/tests/node_compat/test/parallel/test-process-binding.js b/tests/node_compat/test/parallel/test-process-binding.js new file mode 100644 index 00000000000000..e4895ed37de683 --- /dev/null +++ b/tests/node_compat/test/parallel/test-process-binding.js @@ -0,0 +1,21 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +// Flags: --expose-internals +require('../common'); +const assert = require('assert'); +const { internalBinding } = require('internal/test/binding'); + +assert.throws( + function() { + process.binding('test'); + }, + /No such module: test/ +); + +internalBinding('buffer'); diff --git a/tests/node_compat/test/parallel/test-process-dlopen-undefined-exports.js b/tests/node_compat/test/parallel/test-process-dlopen-undefined-exports.js new file mode 100644 index 00000000000000..615eaf7aaaa915 --- /dev/null +++ b/tests/node_compat/test/parallel/test-process-dlopen-undefined-exports.js @@ -0,0 +1,17 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +require('../common'); +const assert = require('assert'); + +const someBindingPath = './test/addons/hello-world/build/Release/binding.node'; + +assert.throws(() => { + process.dlopen({ exports: undefined }, someBindingPath); +}, Error); diff --git a/tests/node_compat/test/parallel/test-process-domain-segfault.js b/tests/node_compat/test/parallel/test-process-domain-segfault.js new file mode 100644 index 00000000000000..65a46cebd18daf --- /dev/null +++ b/tests/node_compat/test/parallel/test-process-domain-segfault.js @@ -0,0 +1,39 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); + +// This test ensures that setting `process.domain` to `null` does not result in +// node crashing with a segfault. +// https://github.com/nodejs/node-v0.x-archive/issues/4256 + +process.domain = null; +setTimeout(function() { + console.log('this console.log statement should not make node crash'); +}, 1); diff --git a/tests/node_compat/test/parallel/test-process-emitwarning.js b/tests/node_compat/test/parallel/test-process-emitwarning.js new file mode 100644 index 00000000000000..7bf6082e7d473d --- /dev/null +++ b/tests/node_compat/test/parallel/test-process-emitwarning.js @@ -0,0 +1,88 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Flags: --no-warnings +// The flag suppresses stderr output but the warning event will still emit +'use strict'; + +const common = require('../common'); +const assert = require('assert'); + +const testMsg = 'A Warning'; +const testCode = 'CODE001'; +const testDetail = 'Some detail'; +const testType = 'CustomWarning'; + +process.on('warning', common.mustCall((warning) => { + assert(warning); + assert.match(warning.name, /^(?:Warning|CustomWarning)/); + assert.strictEqual(warning.message, testMsg); + if (warning.code) assert.strictEqual(warning.code, testCode); + if (warning.detail) assert.strictEqual(warning.detail, testDetail); +}, 15)); + +class CustomWarning extends Error { + constructor() { + super(); + this.name = testType; + this.message = testMsg; + this.code = testCode; + Error.captureStackTrace(this, CustomWarning); + } +} + +[ + [testMsg], + [testMsg, testType], + [testMsg, CustomWarning], + [testMsg, testType, CustomWarning], + [testMsg, testType, testCode], + [testMsg, { type: testType }], + [testMsg, { type: testType, code: testCode }], + [testMsg, { type: testType, code: testCode, detail: testDetail }], + [new CustomWarning()], + // Detail will be ignored for the following. No errors thrown + [testMsg, { type: testType, code: testCode, detail: true }], + [testMsg, { type: testType, code: testCode, detail: [] }], + [testMsg, { type: testType, code: testCode, detail: null }], + [testMsg, { type: testType, code: testCode, detail: 1 }], +].forEach((args) => { + process.emitWarning(...args); +}); + +const warningNoToString = new CustomWarning(); +warningNoToString.toString = null; +process.emitWarning(warningNoToString); + +const warningThrowToString = new CustomWarning(); +warningThrowToString.toString = function() { + throw new Error('invalid toString'); +}; +process.emitWarning(warningThrowToString); + +// TypeError is thrown on invalid input +[ + [1], + [{}], + [true], + [[]], + ['', '', {}], + ['', 1], + ['', '', 1], + ['', true], + ['', '', true], + ['', []], + ['', '', []], + [], + [undefined, 'foo', 'bar'], + [undefined], +].forEach((args) => { + assert.throws( + () => process.emitWarning(...args), + { code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError' } + ); +}); diff --git a/tests/node_compat/test/parallel/test-process-env-allowed-flags.js b/tests/node_compat/test/parallel/test-process-env-allowed-flags.js index 621f2710f376ec..cdd847e9fe15a3 100644 --- a/tests/node_compat/test/parallel/test-process-env-allowed-flags.js +++ b/tests/node_compat/test/parallel/test-process-env-allowed-flags.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-process-env-delete.js b/tests/node_compat/test/parallel/test-process-env-delete.js new file mode 100644 index 00000000000000..cb74a681d49bdd --- /dev/null +++ b/tests/node_compat/test/parallel/test-process-env-delete.js @@ -0,0 +1,20 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); +const assert = require('assert'); + +process.env.foo = 'foo'; +assert.strictEqual(process.env.foo, 'foo'); +process.env.foo = undefined; +assert.strictEqual(process.env.foo, 'undefined'); + +process.env.foo = 'foo'; +assert.strictEqual(process.env.foo, 'foo'); +delete process.env.foo; +assert.strictEqual(process.env.foo, undefined); diff --git a/tests/node_compat/test/parallel/test-process-env-windows-error-reset.js b/tests/node_compat/test/parallel/test-process-env-windows-error-reset.js new file mode 100644 index 00000000000000..63b44e98c7ebba --- /dev/null +++ b/tests/node_compat/test/parallel/test-process-env-windows-error-reset.js @@ -0,0 +1,29 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); +const assert = require('assert'); + +// This checks that after accessing a missing env var, a subsequent +// env read will succeed even for empty variables. + +{ + process.env.FOO = ''; + process.env.NONEXISTENT_ENV_VAR; // eslint-disable-line no-unused-expressions + const foo = process.env.FOO; + + assert.strictEqual(foo, ''); +} + +{ + process.env.FOO = ''; + process.env.NONEXISTENT_ENV_VAR; // eslint-disable-line no-unused-expressions + const hasFoo = 'FOO' in process.env; + + assert.strictEqual(hasFoo, true); +} diff --git a/tests/node_compat/test/parallel/test-process-exit-from-before-exit.js b/tests/node_compat/test/parallel/test-process-exit-from-before-exit.js index 000a7691f5e34e..49705c1f32aef2 100644 --- a/tests/node_compat/test/parallel/test-process-exit-from-before-exit.js +++ b/tests/node_compat/test/parallel/test-process-exit-from-before-exit.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-process-exit-handler.js b/tests/node_compat/test/parallel/test-process-exit-handler.js index c79fb7ceee47f3..c8de3a91e5f81a 100644 --- a/tests/node_compat/test/parallel/test-process-exit-handler.js +++ b/tests/node_compat/test/parallel/test-process-exit-handler.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-process-exit-recursive.js b/tests/node_compat/test/parallel/test-process-exit-recursive.js index 77a34f4f2686c0..979347c8a04e44 100644 --- a/tests/node_compat/test/parallel/test-process-exit-recursive.js +++ b/tests/node_compat/test/parallel/test-process-exit-recursive.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-process-exit.js b/tests/node_compat/test/parallel/test-process-exit.js index 8e5e4b806bbbcb..2ff5fc6dc43f3e 100644 --- a/tests/node_compat/test/parallel/test-process-exit.js +++ b/tests/node_compat/test/parallel/test-process-exit.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-process-getgroups.js b/tests/node_compat/test/parallel/test-process-getgroups.js new file mode 100644 index 00000000000000..01eb92bf79222c --- /dev/null +++ b/tests/node_compat/test/parallel/test-process-getgroups.js @@ -0,0 +1,59 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); + +// Check `id -G` and `process.getgroups()` return same groups. + +if (common.isOSX) + common.skip('Output of `id -G` is unreliable on Darwin.'); + +const assert = require('assert'); +const exec = require('child_process').exec; + +if (typeof process.getgroups === 'function') { + const groups = unique(process.getgroups()); + assert(Array.isArray(groups)); + assert(groups.length > 0); + exec('id -G', function(err, stdout) { + assert.ifError(err); + const real_groups = unique(stdout.match(/\d+/g).map(Number)); + assert.deepStrictEqual(groups, real_groups); + check(groups, real_groups); + check(real_groups, groups); + }); +} + +function check(a, b) { + for (let i = 0; i < a.length; ++i) assert(b.includes(a[i])); +} + +function unique(groups) { + return [...new Set(groups)].sort(); +} diff --git a/tests/node_compat/test/parallel/test-process-hrtime-bigint.js b/tests/node_compat/test/parallel/test-process-hrtime-bigint.js new file mode 100644 index 00000000000000..22c382bb45aef4 --- /dev/null +++ b/tests/node_compat/test/parallel/test-process-hrtime-bigint.js @@ -0,0 +1,21 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +// Tests that process.hrtime.bigint() works. + +require('../common'); +const assert = require('assert'); + +const start = process.hrtime.bigint(); +assert.strictEqual(typeof start, 'bigint'); + +const end = process.hrtime.bigint(); +assert.strictEqual(typeof end, 'bigint'); + +assert(end - start >= 0n); diff --git a/tests/node_compat/test/parallel/test-process-kill-pid.js b/tests/node_compat/test/parallel/test-process-kill-pid.js index 12fb72421a2943..45036151122ef9 100644 --- a/tests/node_compat/test/parallel/test-process-kill-pid.js +++ b/tests/node_compat/test/parallel/test-process-kill-pid.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-process-next-tick.js b/tests/node_compat/test/parallel/test-process-next-tick.js new file mode 100644 index 00000000000000..b755188696d232 --- /dev/null +++ b/tests/node_compat/test/parallel/test-process-next-tick.js @@ -0,0 +1,56 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const N = 2; + +function cb() { + throw new Error(); +} + +for (let i = 0; i < N; ++i) { + process.nextTick(common.mustCall(cb)); +} + +process.on('uncaughtException', common.mustCall(N)); + +process.on('exit', function() { + process.removeAllListeners('uncaughtException'); +}); + +[null, 1, 'test', {}, [], Infinity, true].forEach((i) => { + assert.throws( + () => process.nextTick(i), + { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError', + } + ); +}); diff --git a/tests/node_compat/test/parallel/test-process-no-deprecation.js b/tests/node_compat/test/parallel/test-process-no-deprecation.js new file mode 100644 index 00000000000000..310c3dbe4d89dc --- /dev/null +++ b/tests/node_compat/test/parallel/test-process-no-deprecation.js @@ -0,0 +1,39 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +// Flags: --no-warnings + +// The --no-warnings flag only suppresses writing the warning to stderr, not the +// emission of the corresponding event. This test file can be run without it. + +const common = require('../common'); +process.noDeprecation = true; + +const assert = require('assert'); + +function listener() { + assert.fail('received unexpected warning'); +} + +process.addListener('warning', listener); + +process.emitWarning('Something is deprecated.', 'DeprecationWarning'); + +// The warning would be emitted in the next tick, so continue after that. +process.nextTick(common.mustCall(() => { + // Check that deprecations can be re-enabled. + process.noDeprecation = false; + process.removeListener('warning', listener); + + process.addListener('warning', common.mustCall((warning) => { + assert.strictEqual(warning.name, 'DeprecationWarning'); + assert.strictEqual(warning.message, 'Something else is deprecated.'); + })); + + process.emitWarning('Something else is deprecated.', 'DeprecationWarning'); +})); diff --git a/tests/node_compat/test/parallel/test-process-ppid.js b/tests/node_compat/test/parallel/test-process-ppid.js new file mode 100644 index 00000000000000..f9b184e254bb18 --- /dev/null +++ b/tests/node_compat/test/parallel/test-process-ppid.js @@ -0,0 +1,23 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); +const assert = require('assert'); +const cp = require('child_process'); + +if (process.argv[2] === 'child') { + // The following console.log() call is part of the test's functionality. + console.log(process.ppid); +} else { + const child = cp.spawnSync(process.execPath, [__filename, 'child']); + + assert.strictEqual(child.status, 0); + assert.strictEqual(child.signal, null); + assert.strictEqual(+child.stdout.toString().trim(), process.pid); + assert.strictEqual(child.stderr.toString().trim(), ''); +} diff --git a/tests/node_compat/test/parallel/test-process-really-exit.js b/tests/node_compat/test/parallel/test-process-really-exit.js new file mode 100644 index 00000000000000..ea98eadf35a638 --- /dev/null +++ b/tests/node_compat/test/parallel/test-process-really-exit.js @@ -0,0 +1,24 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); +const assert = require('assert'); + +// Ensure that the reallyExit hook is executed. +// see: https://github.com/nodejs/node/issues/25650 +if (process.argv[2] === 'subprocess') { + process.reallyExit = function() { + console.info('really exited'); + }; + process.exit(); +} else { + const { spawnSync } = require('child_process'); + const out = spawnSync(process.execPath, [__filename, 'subprocess']); + const observed = out.output[1].toString('utf8').trim(); + assert.strictEqual(observed, 'really exited'); +} diff --git a/tests/node_compat/test/parallel/test-process-uptime.js b/tests/node_compat/test/parallel/test-process-uptime.js index 31cbcf26c99800..f93ad3d914d450 100644 --- a/tests/node_compat/test/parallel/test-process-uptime.js +++ b/tests/node_compat/test/parallel/test-process-uptime.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-process-warning.js b/tests/node_compat/test/parallel/test-process-warning.js new file mode 100644 index 00000000000000..69514242dbbbae --- /dev/null +++ b/tests/node_compat/test/parallel/test-process-warning.js @@ -0,0 +1,75 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const { + hijackStderr, + restoreStderr +} = require('../common/hijackstdio'); +const assert = require('assert'); + +function test1() { + // Output is skipped if the argument to the 'warning' event is + // not an Error object. + hijackStderr(common.mustNotCall('stderr.write must not be called')); + process.emit('warning', 'test'); + setImmediate(test2); +} + +function test2() { + // Output is skipped if it's a deprecation warning and + // process.noDeprecation = true + process.noDeprecation = true; + process.emitWarning('test', 'DeprecationWarning'); + process.noDeprecation = false; + setImmediate(test3); +} + +function test3() { + restoreStderr(); + // Type defaults to warning when the second argument is an object + process.emitWarning('test', {}); + process.once('warning', common.mustCall((warning) => { + assert.strictEqual(warning.name, 'Warning'); + })); + setImmediate(test4); +} + +function test4() { + // process.emitWarning will throw when process.throwDeprecation is true + // and type is `DeprecationWarning`. + process.throwDeprecation = true; + process.once('uncaughtException', (err) => { + assert.match(err.toString(), /^DeprecationWarning: test$/); + }); + try { + process.emitWarning('test', 'DeprecationWarning'); + } catch { + assert.fail('Unreachable'); + } + process.throwDeprecation = false; + setImmediate(test5); +} + +function test5() { + // Setting toString to a non-function should not cause an error + const err = new Error('test'); + err.toString = 1; + process.emitWarning(err); + setImmediate(test6); +} + +function test6() { + process.emitWarning('test', { detail: 'foo' }); + process.on('warning', (warning) => { + assert.strictEqual(warning.detail, 'foo'); + }); +} + +test1(); diff --git a/tests/node_compat/test/parallel/test-promise-handled-rejection-no-warning.js b/tests/node_compat/test/parallel/test-promise-handled-rejection-no-warning.js new file mode 100644 index 00000000000000..f7d636f187e5a5 --- /dev/null +++ b/tests/node_compat/test/parallel/test-promise-handled-rejection-no-warning.js @@ -0,0 +1,14 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); + +// This test verifies that DEP0018 does not occur when rejections are handled. +process.on('warning', common.mustNotCall()); +process.on('unhandledRejection', common.mustCall()); +Promise.reject(new Error()); diff --git a/tests/node_compat/test/parallel/test-promise-unhandled-silent.js b/tests/node_compat/test/parallel/test-promise-unhandled-silent.js index 2e265db368dd06..fc953ba33b86bd 100644 --- a/tests/node_compat/test/parallel/test-promise-unhandled-silent.js +++ b/tests/node_compat/test/parallel/test-promise-unhandled-silent.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --unhandled-rejections=none diff --git a/tests/node_compat/test/parallel/test-promise-unhandled-throw-handler.js b/tests/node_compat/test/parallel/test-promise-unhandled-throw-handler.js index 3f039f93f173a7..b64e5f669bd1e6 100644 --- a/tests/node_compat/test/parallel/test-promise-unhandled-throw-handler.js +++ b/tests/node_compat/test/parallel/test-promise-unhandled-throw-handler.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --unhandled-rejections=throw diff --git a/tests/node_compat/test/parallel/test-punycode.js b/tests/node_compat/test/parallel/test-punycode.js index d08a6f1497c911..10aabaa2761589 100644 --- a/tests/node_compat/test/parallel/test-punycode.js +++ b/tests/node_compat/test/parallel/test-punycode.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --pending-deprecation diff --git a/tests/node_compat/test/parallel/test-querystring-escape.js b/tests/node_compat/test/parallel/test-querystring-escape.js index 206290b476fb3b..bd23596e3d961a 100644 --- a/tests/node_compat/test/parallel/test-querystring-escape.js +++ b/tests/node_compat/test/parallel/test-querystring-escape.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-querystring-maxKeys-non-finite.js b/tests/node_compat/test/parallel/test-querystring-maxKeys-non-finite.js index 3fb0815be37000..b58be5d340614d 100644 --- a/tests/node_compat/test/parallel/test-querystring-maxKeys-non-finite.js +++ b/tests/node_compat/test/parallel/test-querystring-maxKeys-non-finite.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-querystring-multichar-separator.js b/tests/node_compat/test/parallel/test-querystring-multichar-separator.js index 79ea8dce6b915a..0626803e19be36 100644 --- a/tests/node_compat/test/parallel/test-querystring-multichar-separator.js +++ b/tests/node_compat/test/parallel/test-querystring-multichar-separator.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-readable-from-iterator-closing.js b/tests/node_compat/test/parallel/test-readable-from-iterator-closing.js new file mode 100644 index 00000000000000..fba145d4e7a940 --- /dev/null +++ b/tests/node_compat/test/parallel/test-readable-from-iterator-closing.js @@ -0,0 +1,204 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const { mustCall, mustNotCall } = require('../common'); +const { Readable } = require('stream'); +const { strictEqual } = require('assert'); + +async function asyncSupport() { + const finallyMustCall = mustCall(); + const bodyMustCall = mustCall(); + + async function* infiniteGenerate() { + try { + while (true) yield 'a'; + } finally { + finallyMustCall(); + } + } + + const stream = Readable.from(infiniteGenerate()); + + for await (const chunk of stream) { + bodyMustCall(); + strictEqual(chunk, 'a'); + break; + } +} + +async function syncSupport() { + const finallyMustCall = mustCall(); + const bodyMustCall = mustCall(); + + function* infiniteGenerate() { + try { + while (true) yield 'a'; + } finally { + finallyMustCall(); + } + } + + const stream = Readable.from(infiniteGenerate()); + + for await (const chunk of stream) { + bodyMustCall(); + strictEqual(chunk, 'a'); + break; + } +} + +async function syncPromiseSupport() { + const returnMustBeAwaited = mustCall(); + const bodyMustCall = mustCall(); + + function* infiniteGenerate() { + try { + while (true) yield Promise.resolve('a'); + } finally { + // eslint-disable-next-line no-unsafe-finally + return { then(cb) { + returnMustBeAwaited(); + cb(); + } }; + } + } + + const stream = Readable.from(infiniteGenerate()); + + for await (const chunk of stream) { + bodyMustCall(); + strictEqual(chunk, 'a'); + break; + } +} + +async function syncRejectedSupport() { + const returnMustBeAwaited = mustCall(); + const bodyMustNotCall = mustNotCall(); + const catchMustCall = mustCall(); + const secondNextMustNotCall = mustNotCall(); + + function* generate() { + try { + yield Promise.reject('a'); + secondNextMustNotCall(); + } finally { + // eslint-disable-next-line no-unsafe-finally + return { then(cb) { + returnMustBeAwaited(); + cb(); + } }; + } + } + + const stream = Readable.from(generate()); + + try { + for await (const chunk of stream) { + bodyMustNotCall(chunk); + } + } catch { + catchMustCall(); + } +} + +async function noReturnAfterThrow() { + const returnMustNotCall = mustNotCall(); + const bodyMustNotCall = mustNotCall(); + const catchMustCall = mustCall(); + const nextMustCall = mustCall(); + + const stream = Readable.from({ + [Symbol.asyncIterator]() { return this; }, + async next() { + nextMustCall(); + throw new Error('a'); + }, + async return() { + returnMustNotCall(); + return { done: true }; + }, + }); + + try { + for await (const chunk of stream) { + bodyMustNotCall(chunk); + } + } catch { + catchMustCall(); + } +} + +async function closeStreamWhileNextIsPending() { + const finallyMustCall = mustCall(); + const dataMustCall = mustCall(); + + let resolveDestroy; + const destroyed = + new Promise((resolve) => { resolveDestroy = mustCall(resolve); }); + let resolveYielded; + const yielded = + new Promise((resolve) => { resolveYielded = mustCall(resolve); }); + + async function* infiniteGenerate() { + try { + while (true) { + yield 'a'; + resolveYielded(); + await destroyed; + } + } finally { + finallyMustCall(); + } + } + + const stream = Readable.from(infiniteGenerate()); + + stream.on('data', (data) => { + dataMustCall(); + strictEqual(data, 'a'); + }); + + yielded.then(() => { + stream.destroy(); + resolveDestroy(); + }); +} + +async function closeAfterNullYielded() { + const finallyMustCall = mustCall(); + const dataMustCall = mustCall(3); + + function* generate() { + try { + yield 'a'; + yield 'a'; + yield 'a'; + } finally { + finallyMustCall(); + } + } + + const stream = Readable.from(generate()); + + stream.on('data', (chunk) => { + dataMustCall(); + strictEqual(chunk, 'a'); + }); +} + +Promise.all([ + asyncSupport(), + syncSupport(), + syncPromiseSupport(), + syncRejectedSupport(), + noReturnAfterThrow(), + closeStreamWhileNextIsPending(), + closeAfterNullYielded(), +]).then(mustCall()); diff --git a/tests/node_compat/test/parallel/test-readable-from.js b/tests/node_compat/test/parallel/test-readable-from.js new file mode 100644 index 00000000000000..066532466a9864 --- /dev/null +++ b/tests/node_compat/test/parallel/test-readable-from.js @@ -0,0 +1,230 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const { mustCall } = require('../common'); +const { once } = require('events'); +const { Readable } = require('stream'); +const { strictEqual, throws } = require('assert'); +const common = require('../common'); + +{ + throws(() => { + Readable.from(null); + }, /ERR_INVALID_ARG_TYPE/); +} + +async function toReadableBasicSupport() { + async function* generate() { + yield 'a'; + yield 'b'; + yield 'c'; + } + + const stream = Readable.from(generate()); + + const expected = ['a', 'b', 'c']; + + for await (const chunk of stream) { + strictEqual(chunk, expected.shift()); + } +} + +async function toReadableSyncIterator() { + function* generate() { + yield 'a'; + yield 'b'; + yield 'c'; + } + + const stream = Readable.from(generate()); + + const expected = ['a', 'b', 'c']; + + for await (const chunk of stream) { + strictEqual(chunk, expected.shift()); + } +} + +async function toReadablePromises() { + const promises = [ + Promise.resolve('a'), + Promise.resolve('b'), + Promise.resolve('c'), + ]; + + const stream = Readable.from(promises); + + const expected = ['a', 'b', 'c']; + + for await (const chunk of stream) { + strictEqual(chunk, expected.shift()); + } +} + +async function toReadableString() { + const stream = Readable.from('abc'); + + const expected = ['abc']; + + for await (const chunk of stream) { + strictEqual(chunk, expected.shift()); + } +} + +async function toReadableBuffer() { + const stream = Readable.from(Buffer.from('abc')); + + const expected = ['abc']; + + for await (const chunk of stream) { + strictEqual(chunk.toString(), expected.shift()); + } +} + +async function toReadableOnData() { + async function* generate() { + yield 'a'; + yield 'b'; + yield 'c'; + } + + const stream = Readable.from(generate()); + + let iterations = 0; + const expected = ['a', 'b', 'c']; + + stream.on('data', (chunk) => { + iterations++; + strictEqual(chunk, expected.shift()); + }); + + await once(stream, 'end'); + + strictEqual(iterations, 3); +} + +async function toReadableOnDataNonObject() { + async function* generate() { + yield 'a'; + yield 'b'; + yield 'c'; + } + + const stream = Readable.from(generate(), { objectMode: false }); + + let iterations = 0; + const expected = ['a', 'b', 'c']; + + stream.on('data', (chunk) => { + iterations++; + strictEqual(chunk instanceof Buffer, true); + strictEqual(chunk.toString(), expected.shift()); + }); + + await once(stream, 'end'); + + strictEqual(iterations, 3); +} + +async function destroysTheStreamWhenThrowing() { + async function* generate() { // eslint-disable-line require-yield + throw new Error('kaboom'); + } + + const stream = Readable.from(generate()); + + stream.read(); + + const [err] = await once(stream, 'error'); + strictEqual(err.message, 'kaboom'); + strictEqual(stream.destroyed, true); + +} + +async function asTransformStream() { + async function* generate(stream) { + for await (const chunk of stream) { + yield chunk.toUpperCase(); + } + } + + const source = new Readable({ + objectMode: true, + read() { + this.push('a'); + this.push('b'); + this.push('c'); + this.push(null); + } + }); + + const stream = Readable.from(generate(source)); + + const expected = ['A', 'B', 'C']; + + for await (const chunk of stream) { + strictEqual(chunk, expected.shift()); + } +} + +async function endWithError() { + async function* generate() { + yield 1; + yield 2; + yield Promise.reject('Boum'); + } + + const stream = Readable.from(generate()); + + const expected = [1, 2]; + + try { + for await (const chunk of stream) { + strictEqual(chunk, expected.shift()); + } + throw new Error(); + } catch (err) { + strictEqual(expected.length, 0); + strictEqual(err, 'Boum'); + } +} + +async function destroyingStreamWithErrorThrowsInGenerator() { + const validateError = common.mustCall((e) => { + strictEqual(e, 'Boum'); + }); + async function* generate() { + try { + yield 1; + yield 2; + yield 3; + throw new Error(); + } catch (e) { + validateError(e); + } + } + const stream = Readable.from(generate()); + stream.read(); + stream.once('error', common.mustCall()); + stream.destroy('Boum'); +} + +Promise.all([ + toReadableBasicSupport(), + toReadableSyncIterator(), + toReadablePromises(), + toReadableString(), + toReadableBuffer(), + toReadableOnData(), + toReadableOnDataNonObject(), + destroysTheStreamWhenThrowing(), + asTransformStream(), + endWithError(), + destroyingStreamWithErrorThrowsInGenerator(), +]).then(mustCall()); diff --git a/tests/node_compat/test/parallel/test-readable-large-hwm.js b/tests/node_compat/test/parallel/test-readable-large-hwm.js new file mode 100644 index 00000000000000..79a243a9d179f3 --- /dev/null +++ b/tests/node_compat/test/parallel/test-readable-large-hwm.js @@ -0,0 +1,34 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const { Readable } = require('stream'); + +// Make sure that readable completes +// even when reading larger buffer. +const bufferSize = 10 * 1024 * 1024; +let n = 0; +const r = new Readable({ + read() { + // Try to fill readable buffer piece by piece. + r.push(Buffer.alloc(bufferSize / 10)); + + if (n++ > 10) { + r.push(null); + } + } +}); + +r.on('readable', () => { + while (true) { + const ret = r.read(bufferSize); + if (ret === null) + break; + } +}); +r.on('end', common.mustCall()); diff --git a/tests/node_compat/test/parallel/test-readable-single-end.js b/tests/node_compat/test/parallel/test-readable-single-end.js new file mode 100644 index 00000000000000..33eb32e1fb5dcc --- /dev/null +++ b/tests/node_compat/test/parallel/test-readable-single-end.js @@ -0,0 +1,23 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const { Readable } = require('stream'); + +// This test ensures that there will not be an additional empty 'readable' +// event when stream has ended (only 1 event signalling about end) + +const r = new Readable({ + read: () => {}, +}); + +r.push(null); + +r.on('readable', common.mustCall()); +r.on('end', common.mustCall()); diff --git a/tests/node_compat/test/parallel/test-readline-async-iterators-destroy.js b/tests/node_compat/test/parallel/test-readline-async-iterators-destroy.js new file mode 100644 index 00000000000000..2dcc43e05c0fe5 --- /dev/null +++ b/tests/node_compat/test/parallel/test-readline-async-iterators-destroy.js @@ -0,0 +1,96 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const fs = require('fs'); +const { once } = require('events'); +const readline = require('readline'); +const assert = require('assert'); + +const tmpdir = require('../common/tmpdir'); +tmpdir.refresh(); + +const filename = tmpdir.resolve('test.txt'); + +const testContents = [ + '', + '\n', + 'line 1', + 'line 1\nline 2 南越国是前203年至前111年存在于岭南地区的一个国家\nline 3\ntrailing', + 'line 1\nline 2\nline 3 ends with newline\n', +]; + +async function testSimpleDestroy() { + for (const fileContent of testContents) { + fs.writeFileSync(filename, fileContent); + + const readable = fs.createReadStream(filename); + const rli = readline.createInterface({ + input: readable, + crlfDelay: Infinity + }); + + const iteratedLines = []; + for await (const k of rli) { + iteratedLines.push(k); + break; + } + + const expectedLines = fileContent.split('\n'); + if (expectedLines[expectedLines.length - 1] === '') { + expectedLines.pop(); + } + expectedLines.splice(1); + + assert.deepStrictEqual(iteratedLines, expectedLines); + + rli.close(); + readable.destroy(); + + await once(readable, 'close'); + } +} + +async function testMutualDestroy() { + for (const fileContent of testContents) { + fs.writeFileSync(filename, fileContent); + + const readable = fs.createReadStream(filename); + const rli = readline.createInterface({ + input: readable, + crlfDelay: Infinity + }); + + const expectedLines = fileContent.split('\n'); + if (expectedLines[expectedLines.length - 1] === '') { + expectedLines.pop(); + } + expectedLines.splice(2); + + const iteratedLines = []; + for await (const k of rli) { + iteratedLines.push(k); + for await (const l of rli) { + iteratedLines.push(l); + break; + } + assert.deepStrictEqual(iteratedLines, expectedLines); + break; + } + + assert.deepStrictEqual(iteratedLines, expectedLines); + + rli.close(); + readable.destroy(); + + await once(readable, 'close'); + } +} + +testSimpleDestroy().then(testMutualDestroy).then(common.mustCall()); diff --git a/tests/node_compat/test/parallel/test-readline-async-iterators.js b/tests/node_compat/test/parallel/test-readline-async-iterators.js new file mode 100644 index 00000000000000..a9e3a282fbc56a --- /dev/null +++ b/tests/node_compat/test/parallel/test-readline-async-iterators.js @@ -0,0 +1,127 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const fs = require('fs'); +const readline = require('readline'); +const { Readable } = require('stream'); +const assert = require('assert'); + +const tmpdir = require('../common/tmpdir'); +tmpdir.refresh(); + +const filename = tmpdir.resolve('test.txt'); + +const testContents = [ + '', + '\n', + 'line 1', + 'line 1\nline 2 南越国是前203年至前111年存在于岭南地区的一个国家\nline 3\ntrailing', + 'line 1\nline 2\nline 3 ends with newline\n', +]; + +async function testSimple() { + for (const fileContent of testContents) { + fs.writeFileSync(filename, fileContent); + + const readable = fs.createReadStream(filename); + const rli = readline.createInterface({ + input: readable, + crlfDelay: Infinity + }); + + const iteratedLines = []; + for await (const k of rli) { + iteratedLines.push(k); + } + + const expectedLines = fileContent.split('\n'); + if (expectedLines[expectedLines.length - 1] === '') { + expectedLines.pop(); + } + assert.deepStrictEqual(iteratedLines, expectedLines); + assert.strictEqual(iteratedLines.join(''), fileContent.replace(/\n/g, '')); + } +} + +async function testMutual() { + for (const fileContent of testContents) { + fs.writeFileSync(filename, fileContent); + + const readable = fs.createReadStream(filename); + const rli = readline.createInterface({ + input: readable, + crlfDelay: Infinity + }); + + const expectedLines = fileContent.split('\n'); + if (expectedLines[expectedLines.length - 1] === '') { + expectedLines.pop(); + } + const iteratedLines = []; + let iterated = false; + for await (const k of rli) { + // This outer loop should only iterate once. + assert.strictEqual(iterated, false); + iterated = true; + iteratedLines.push(k); + for await (const l of rli) { + iteratedLines.push(l); + } + assert.deepStrictEqual(iteratedLines, expectedLines); + } + assert.deepStrictEqual(iteratedLines, expectedLines); + } +} + +async function testSlowStreamForLeaks() { + const message = 'a\nb\nc\n'; + const DELAY = 1; + const REPETITIONS = 100; + const warningCallback = common.mustNotCall(); + process.on('warning', warningCallback); + + function getStream() { + const readable = Readable({ + objectMode: true, + }); + readable._read = () => {}; + let i = REPETITIONS; + function schedule() { + setTimeout(() => { + i--; + if (i < 0) { + readable.push(null); + } else { + readable.push(message); + schedule(); + } + }, DELAY); + } + schedule(); + return readable; + } + const iterable = readline.createInterface({ + input: getStream(), + }); + + let lines = 0; + // eslint-disable-next-line no-unused-vars + for await (const _ of iterable) { + lines++; + } + + assert.strictEqual(lines, 3 * REPETITIONS); + process.off('warning', warningCallback); +} + +testSimple() + .then(testMutual) + .then(testSlowStreamForLeaks) + .then(common.mustCall()); diff --git a/tests/node_compat/test/parallel/test-readline-carriage-return-between-chunks.js b/tests/node_compat/test/parallel/test-readline-carriage-return-between-chunks.js new file mode 100644 index 00000000000000..b678f8666d4cde --- /dev/null +++ b/tests/node_compat/test/parallel/test-readline-carriage-return-between-chunks.js @@ -0,0 +1,30 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); + +const assert = require('node:assert'); +const readline = require('node:readline'); +const { Readable } = require('node:stream'); + + +const input = Readable.from((function*() { + yield 'a\nb'; + yield '\r\n'; +})()); +const rl = readline.createInterface({ input, crlfDelay: Infinity }); +let carriageReturns = 0; + +rl.on('line', (line) => { + if (line.includes('\r')) carriageReturns++; +}); + +rl.on('close', common.mustCall(() => { + assert.strictEqual(carriageReturns, 0); +})); diff --git a/tests/node_compat/test/parallel/test-readline-csi.js b/tests/node_compat/test/parallel/test-readline-csi.js new file mode 100644 index 00000000000000..e657ed545e73df --- /dev/null +++ b/tests/node_compat/test/parallel/test-readline-csi.js @@ -0,0 +1,183 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Flags: --expose-internals +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const readline = require('readline'); +const { Writable } = require('stream'); +const { CSI } = require('internal/readline/utils'); + +{ + assert(CSI); + assert.strictEqual(CSI.kClearToLineBeginning, '\x1b[1K'); + assert.strictEqual(CSI.kClearToLineEnd, '\x1b[0K'); + assert.strictEqual(CSI.kClearLine, '\x1b[2K'); + assert.strictEqual(CSI.kClearScreenDown, '\x1b[0J'); + assert.strictEqual(CSI`1${2}3`, '\x1b[123'); +} + +class TestWritable extends Writable { + constructor() { + super(); + this.data = ''; + } + _write(chunk, encoding, callback) { + this.data += chunk.toString(); + callback(); + } +} + +const writable = new TestWritable(); + +assert.strictEqual(readline.clearScreenDown(writable), true); +assert.deepStrictEqual(writable.data, CSI.kClearScreenDown); +assert.strictEqual(readline.clearScreenDown(writable, common.mustCall()), true); + +// Verify that clearScreenDown() throws on invalid callback. +assert.throws(() => { + readline.clearScreenDown(writable, null); +}, /ERR_INVALID_ARG_TYPE/); + +// Verify that clearScreenDown() does not throw on null or undefined stream. +assert.strictEqual(readline.clearScreenDown(null, common.mustCall((err) => { + assert.strictEqual(err, null); +})), true); +assert.strictEqual(readline.clearScreenDown(undefined, common.mustCall()), + true); + +writable.data = ''; +assert.strictEqual(readline.clearLine(writable, -1), true); +assert.deepStrictEqual(writable.data, CSI.kClearToLineBeginning); + +writable.data = ''; +assert.strictEqual(readline.clearLine(writable, 1), true); +assert.deepStrictEqual(writable.data, CSI.kClearToLineEnd); + +writable.data = ''; +assert.strictEqual(readline.clearLine(writable, 0), true); +assert.deepStrictEqual(writable.data, CSI.kClearLine); + +writable.data = ''; +assert.strictEqual(readline.clearLine(writable, -1, common.mustCall()), true); +assert.deepStrictEqual(writable.data, CSI.kClearToLineBeginning); + +// Verify that clearLine() throws on invalid callback. +assert.throws(() => { + readline.clearLine(writable, 0, null); +}, /ERR_INVALID_ARG_TYPE/); + +// Verify that clearLine() does not throw on null or undefined stream. +assert.strictEqual(readline.clearLine(null, 0), true); +assert.strictEqual(readline.clearLine(undefined, 0), true); +assert.strictEqual(readline.clearLine(null, 0, common.mustCall((err) => { + assert.strictEqual(err, null); +})), true); +assert.strictEqual(readline.clearLine(undefined, 0, common.mustCall()), true); + +// Nothing is written when moveCursor 0, 0 +[ + [0, 0, ''], + [1, 0, '\x1b[1C'], + [-1, 0, '\x1b[1D'], + [0, 1, '\x1b[1B'], + [0, -1, '\x1b[1A'], + [1, 1, '\x1b[1C\x1b[1B'], + [-1, 1, '\x1b[1D\x1b[1B'], + [-1, -1, '\x1b[1D\x1b[1A'], + [1, -1, '\x1b[1C\x1b[1A'], +].forEach((set) => { + writable.data = ''; + assert.strictEqual(readline.moveCursor(writable, set[0], set[1]), true); + assert.deepStrictEqual(writable.data, set[2]); + writable.data = ''; + assert.strictEqual( + readline.moveCursor(writable, set[0], set[1], common.mustCall()), + true + ); + assert.deepStrictEqual(writable.data, set[2]); +}); + +// Verify that moveCursor() throws on invalid callback. +assert.throws(() => { + readline.moveCursor(writable, 1, 1, null); +}, /ERR_INVALID_ARG_TYPE/); + +// Verify that moveCursor() does not throw on null or undefined stream. +assert.strictEqual(readline.moveCursor(null, 1, 1), true); +assert.strictEqual(readline.moveCursor(undefined, 1, 1), true); +assert.strictEqual(readline.moveCursor(null, 1, 1, common.mustCall((err) => { + assert.strictEqual(err, null); +})), true); +assert.strictEqual(readline.moveCursor(undefined, 1, 1, common.mustCall()), + true); + +// Undefined or null as stream should not throw. +assert.strictEqual(readline.cursorTo(null), true); +assert.strictEqual(readline.cursorTo(), true); +assert.strictEqual(readline.cursorTo(null, 1, 1, common.mustCall()), true); +assert.strictEqual(readline.cursorTo(undefined, 1, 1, common.mustCall((err) => { + assert.strictEqual(err, null); +})), true); + +writable.data = ''; +assert.strictEqual(readline.cursorTo(writable, 'a'), true); +assert.strictEqual(writable.data, ''); + +writable.data = ''; +assert.strictEqual(readline.cursorTo(writable, 'a', 'b'), true); +assert.strictEqual(writable.data, ''); + +writable.data = ''; +assert.throws( + () => readline.cursorTo(writable, 'a', 1), + { + name: 'TypeError', + code: 'ERR_INVALID_CURSOR_POS', + message: 'Cannot set cursor row without setting its column' + }); +assert.strictEqual(writable.data, ''); + +writable.data = ''; +assert.strictEqual(readline.cursorTo(writable, 1, 'a'), true); +assert.strictEqual(writable.data, '\x1b[2G'); + +writable.data = ''; +assert.strictEqual(readline.cursorTo(writable, 1), true); +assert.strictEqual(writable.data, '\x1b[2G'); + +writable.data = ''; +assert.strictEqual(readline.cursorTo(writable, 1, 2), true); +assert.strictEqual(writable.data, '\x1b[3;2H'); + +writable.data = ''; +assert.strictEqual(readline.cursorTo(writable, 1, 2, common.mustCall()), true); +assert.strictEqual(writable.data, '\x1b[3;2H'); + +writable.data = ''; +assert.strictEqual(readline.cursorTo(writable, 1, common.mustCall()), true); +assert.strictEqual(writable.data, '\x1b[2G'); + +// Verify that cursorTo() throws on invalid callback. +assert.throws(() => { + readline.cursorTo(writable, 1, 1, null); +}, /ERR_INVALID_ARG_TYPE/); + +// Verify that cursorTo() throws if x or y is NaN. +assert.throws(() => { + readline.cursorTo(writable, NaN); +}, /ERR_INVALID_ARG_VALUE/); + +assert.throws(() => { + readline.cursorTo(writable, 1, NaN); +}, /ERR_INVALID_ARG_VALUE/); + +assert.throws(() => { + readline.cursorTo(writable, NaN, NaN); +}, /ERR_INVALID_ARG_VALUE/); diff --git a/tests/node_compat/test/parallel/test-readline-emit-keypress-events.js b/tests/node_compat/test/parallel/test-readline-emit-keypress-events.js index 8f346be18dea49..ccb10af70d1f02 100644 --- a/tests/node_compat/test/parallel/test-readline-emit-keypress-events.js +++ b/tests/node_compat/test/parallel/test-readline-emit-keypress-events.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-readline-interface-escapecodetimeout.js b/tests/node_compat/test/parallel/test-readline-interface-escapecodetimeout.js index 284913b374ab53..69a9ded7c3b234 100644 --- a/tests/node_compat/test/parallel/test-readline-interface-escapecodetimeout.js +++ b/tests/node_compat/test/parallel/test-readline-interface-escapecodetimeout.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-readline-keys.js b/tests/node_compat/test/parallel/test-readline-keys.js index 4487e8d711ae03..fc7feb735f00b1 100644 --- a/tests/node_compat/test/parallel/test-readline-keys.js +++ b/tests/node_compat/test/parallel/test-readline-keys.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-readline-position.js b/tests/node_compat/test/parallel/test-readline-position.js index acc5cf92023a0c..e43851997df309 100644 --- a/tests/node_compat/test/parallel/test-readline-position.js +++ b/tests/node_compat/test/parallel/test-readline-position.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --expose-internals diff --git a/tests/node_compat/test/parallel/test-readline-reopen.js b/tests/node_compat/test/parallel/test-readline-reopen.js index b8a9afe859e9da..a193c1eb811764 100644 --- a/tests/node_compat/test/parallel/test-readline-reopen.js +++ b/tests/node_compat/test/parallel/test-readline-reopen.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-readline-set-raw-mode.js b/tests/node_compat/test/parallel/test-readline-set-raw-mode.js index 5cf7c68f24fb32..7d31896e26c644 100644 --- a/tests/node_compat/test/parallel/test-readline-set-raw-mode.js +++ b/tests/node_compat/test/parallel/test-readline-set-raw-mode.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-readline-undefined-columns.js b/tests/node_compat/test/parallel/test-readline-undefined-columns.js index 5946bf7cbe7936..8de1ce3388e8ac 100644 --- a/tests/node_compat/test/parallel/test-readline-undefined-columns.js +++ b/tests/node_compat/test/parallel/test-readline-undefined-columns.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-readline.js b/tests/node_compat/test/parallel/test-readline.js index 91be36bc615147..fb2388247a38b3 100644 --- a/tests/node_compat/test/parallel/test-readline.js +++ b/tests/node_compat/test/parallel/test-readline.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-ref-unref-return.js b/tests/node_compat/test/parallel/test-ref-unref-return.js new file mode 100644 index 00000000000000..d8f919bf88be8e --- /dev/null +++ b/tests/node_compat/test/parallel/test-ref-unref-return.js @@ -0,0 +1,19 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); +const assert = require('assert'); +const net = require('net'); +const dgram = require('dgram'); + +assert.ok((new net.Server()).ref() instanceof net.Server); +assert.ok((new net.Server()).unref() instanceof net.Server); +assert.ok((new net.Socket()).ref() instanceof net.Socket); +assert.ok((new net.Socket()).unref() instanceof net.Socket); +assert.ok((new dgram.Socket('udp4')).ref() instanceof dgram.Socket); +assert.ok((new dgram.Socket('udp6')).unref() instanceof dgram.Socket); diff --git a/tests/node_compat/test/parallel/test-regression-object-prototype.js b/tests/node_compat/test/parallel/test-regression-object-prototype.js new file mode 100644 index 00000000000000..d2b913604869e9 --- /dev/null +++ b/tests/node_compat/test/parallel/test-regression-object-prototype.js @@ -0,0 +1,35 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +/* eslint-disable node-core/require-common-first, node-core/required-modules */ +'use strict'; + +Object.prototype.xadsadsdasasdxx = function() { +}; + +console.log('puts after'); diff --git a/tests/node_compat/test/parallel/test-require-invalid-package.js b/tests/node_compat/test/parallel/test-require-invalid-package.js new file mode 100644 index 00000000000000..7c8b412dcdf65f --- /dev/null +++ b/tests/node_compat/test/parallel/test-require-invalid-package.js @@ -0,0 +1,16 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +require('../common'); +const assert = require('assert'); + +// Should be an invalid package path. +assert.throws(() => require('package.json'), + { code: 'MODULE_NOT_FOUND' } +); diff --git a/tests/node_compat/test/parallel/test-require-long-path.js b/tests/node_compat/test/parallel/test-require-long-path.js new file mode 100644 index 00000000000000..c9329e4626f0a9 --- /dev/null +++ b/tests/node_compat/test/parallel/test-require-long-path.js @@ -0,0 +1,35 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +if (!common.isWindows) + common.skip('this test is Windows-specific.'); + +const fs = require('fs'); +const path = require('path'); + +const tmpdir = require('../common/tmpdir'); + +// Make a path that is more than 260 chars long. +const dirNameLen = Math.max(260 - tmpdir.path.length, 1); +const dirName = tmpdir.resolve('x'.repeat(dirNameLen)); +const fullDirPath = path.resolve(dirName); + +const indexFile = path.join(fullDirPath, 'index.js'); +const otherFile = path.join(fullDirPath, 'other.js'); + +tmpdir.refresh(); + +fs.mkdirSync(fullDirPath); +fs.writeFileSync(indexFile, 'require("./other");'); +fs.writeFileSync(otherFile, ''); + +require(indexFile); +require(otherFile); + +tmpdir.refresh(); diff --git a/tests/node_compat/test/parallel/test-require-nul.js b/tests/node_compat/test/parallel/test-require-nul.js new file mode 100644 index 00000000000000..b9a77a3004c7f9 --- /dev/null +++ b/tests/node_compat/test/parallel/test-require-nul.js @@ -0,0 +1,18 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +require('../common'); +const assert = require('assert'); + +// Nul bytes should throw, not abort. +/* eslint-disable no-control-regex */ +assert.throws(() => require('\u0000ab'), /Cannot find module '\u0000ab'/); +assert.throws(() => require('a\u0000b'), /Cannot find module 'a\u0000b'/); +assert.throws(() => require('ab\u0000'), /Cannot find module 'ab\u0000'/); +/* eslint-enable no-control-regex */ diff --git a/tests/node_compat/test/parallel/test-require-process.js b/tests/node_compat/test/parallel/test-require-process.js new file mode 100644 index 00000000000000..dff056e4f3b46b --- /dev/null +++ b/tests/node_compat/test/parallel/test-require-process.js @@ -0,0 +1,14 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); +const assert = require('assert'); + +const nativeProcess = require('process'); +// require('process') should return global process reference +assert.strictEqual(nativeProcess, process); diff --git a/tests/node_compat/test/parallel/test-signal-handler-remove-on-exit.js b/tests/node_compat/test/parallel/test-signal-handler-remove-on-exit.js new file mode 100644 index 00000000000000..71ad993e20a2a5 --- /dev/null +++ b/tests/node_compat/test/parallel/test-signal-handler-remove-on-exit.js @@ -0,0 +1,16 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); + +// Regression test for https://github.com/nodejs/node/issues/30581 +// This script should not crash. + +function dummy() {} +process.on('SIGINT', dummy); +process.on('exit', () => process.removeListener('SIGINT', dummy)); diff --git a/tests/node_compat/test/parallel/test-signal-handler.js b/tests/node_compat/test/parallel/test-signal-handler.js new file mode 100644 index 00000000000000..a4cfad7f4d297c --- /dev/null +++ b/tests/node_compat/test/parallel/test-signal-handler.js @@ -0,0 +1,63 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +const common = require('../common'); + +if (common.isWindows) + common.skip('SIGUSR1 and SIGHUP signals are not supported'); +if (!common.isMainThread) + common.skip('Signal handling in Workers is not supported'); + +console.log(`process.pid: ${process.pid}`); + +process.on('SIGUSR1', common.mustCall()); + +process.on('SIGUSR1', common.mustCall(function() { + setTimeout(function() { + console.log('End.'); + process.exit(0); + }, 5); +})); + +let i = 0; +setInterval(function() { + console.log(`running process...${++i}`); + + if (i === 5) { + process.kill(process.pid, 'SIGUSR1'); + } +}, 1); + +// Test on condition where a watcher for SIGNAL +// has been previously registered, and `process.listeners(SIGNAL).length === 1` +process.on('SIGHUP', common.mustNotCall()); +process.removeAllListeners('SIGHUP'); +process.on('SIGHUP', common.mustCall()); +process.kill(process.pid, 'SIGHUP'); diff --git a/tests/node_compat/test/parallel/test-socket-address.js b/tests/node_compat/test/parallel/test-socket-address.js new file mode 100644 index 00000000000000..7b132402aa162a --- /dev/null +++ b/tests/node_compat/test/parallel/test-socket-address.js @@ -0,0 +1,24 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); + +// This tests checks that if server._handle.getsockname +// returns an error number, an error is thrown. + +const server = net.createServer({}); +server.listen(0, common.mustCall(function() { + server._handle.getsockname = function(out) { + return -1; + }; + assert.throws(() => this.address(), + /^Error: address [\w|\s-\d]+$/); + server.close(); +})); diff --git a/tests/node_compat/test/parallel/test-socket-write-after-fin-error.js b/tests/node_compat/test/parallel/test-socket-write-after-fin-error.js new file mode 100644 index 00000000000000..525627f4349639 --- /dev/null +++ b/tests/node_compat/test/parallel/test-socket-write-after-fin-error.js @@ -0,0 +1,69 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); +const assert = require('assert'); + +// This is similar to simple/test-socket-write-after-fin, except that +// we don't set allowHalfOpen. Then we write after the client has sent +// a FIN, and this is an error. However, the standard "write after end" +// message is too vague, and doesn't actually tell you what happens. + +const net = require('net'); +let serverData = ''; +let gotServerEnd = false; +let clientData = ''; +let gotClientEnd = false; +let gotServerError = false; + +const server = net.createServer(function(sock) { + sock.setEncoding('utf8'); + sock.on('error', function() {}); + + sock.on('data', function(c) { + serverData += c; + }); + sock.on('end', function() { + gotServerEnd = true; + setImmediate(() => { + sock.write(serverData, function(er) { + console.error(`${er.code}: ${er.message}`); + gotServerError = er; + }); + sock.end(); + }); + }); + server.close(); +}); +server.listen(0, function() { + const sock = net.connect(this.address().port); + sock.setEncoding('utf8'); + sock.on('data', function(c) { + clientData += c; + }); + + sock.on('end', function() { + gotClientEnd = true; + }); + + process.on('exit', function() { + assert.strictEqual(clientData, ''); + assert.strictEqual(serverData, 'hello1hello2hello3\nTHUNDERMUSCLE!'); + assert(gotClientEnd); + assert(gotServerEnd); + assert(gotServerError); + assert.strictEqual(gotServerError.code, 'EPIPE'); + assert.notStrictEqual(gotServerError.message, 'write after end'); + console.log('ok'); + }); + + sock.write('hello1'); + sock.write('hello2'); + sock.write('hello3\n'); + sock.end('THUNDERMUSCLE!'); +}); diff --git a/tests/node_compat/test/parallel/test-source-map-enable.js b/tests/node_compat/test/parallel/test-source-map-enable.js new file mode 100644 index 00000000000000..b373aadda975ec --- /dev/null +++ b/tests/node_compat/test/parallel/test-source-map-enable.js @@ -0,0 +1,388 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +if (!process.features.inspector) return; + +const common = require('../common'); +const assert = require('assert'); +const { dirname } = require('path'); +const fs = require('fs'); +const path = require('path'); +const { spawnSync } = require('child_process'); +const { pathToFileURL } = require('url'); + +const tmpdir = require('../common/tmpdir'); +tmpdir.refresh(); + +let dirc = 0; +function nextdir() { + return process.env.NODE_V8_COVERAGE || + tmpdir.resolve(`source_map_${++dirc}`); +} + +// Outputs source maps when event loop is drained, with no async logic. +{ + const coverageDirectory = nextdir(); + const output = spawnSync(process.execPath, [ + require.resolve('../fixtures/source-map/basic'), + ], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } }); + if (output.status !== 0) { + console.log(output.stderr.toString()); + } + assert.strictEqual(output.status, 0); + assert.strictEqual(output.stderr.toString(), ''); + const sourceMap = getSourceMapFromCache('basic.js', coverageDirectory); + assert.strictEqual(sourceMap.url, 'https://ci.nodejs.org/418'); +} + +// Outputs source maps when process.kill(process.pid, "SIGINT"); exits process. +{ + const coverageDirectory = nextdir(); + const output = spawnSync(process.execPath, [ + require.resolve('../fixtures/source-map/sigint'), + ], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } }); + if (!common.isWindows) { + if (output.signal !== 'SIGINT') { + console.log(output.stderr.toString()); + } + assert.strictEqual(output.signal, 'SIGINT'); + } + assert.strictEqual(output.stderr.toString(), ''); + const sourceMap = getSourceMapFromCache('sigint.js', coverageDirectory); + assert.strictEqual(sourceMap.url, 'https://ci.nodejs.org/402'); +} + +// Outputs source maps when source-file calls process.exit(1). +{ + const coverageDirectory = nextdir(); + const output = spawnSync(process.execPath, [ + require.resolve('../fixtures/source-map/exit-1'), + ], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } }); + assert.strictEqual(output.stderr.toString(), ''); + const sourceMap = getSourceMapFromCache('exit-1.js', coverageDirectory); + assert.strictEqual(sourceMap.url, 'https://ci.nodejs.org/404'); +} + +// Outputs source-maps for esm module. +{ + const coverageDirectory = nextdir(); + const output = spawnSync(process.execPath, [ + '--no-warnings', + require.resolve('../fixtures/source-map/esm-basic.mjs'), + ], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } }); + assert.strictEqual(output.stderr.toString(), ''); + const sourceMap = getSourceMapFromCache('esm-basic.mjs', coverageDirectory); + assert.strictEqual(sourceMap.url, 'https://ci.nodejs.org/405'); +} + +// Loads source-maps with relative path from .map file on disk. +{ + const coverageDirectory = nextdir(); + const output = spawnSync(process.execPath, [ + require.resolve('../fixtures/source-map/disk-relative-path'), + ], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } }); + assert.strictEqual(output.status, 0); + assert.strictEqual(output.stderr.toString(), ''); + const sourceMap = getSourceMapFromCache( + 'disk-relative-path.js', + coverageDirectory + ); + // Source-map should have been loaded from disk and sources should have been + // rewritten, such that they're absolute paths. + assert.strictEqual( + dirname(pathToFileURL( + require.resolve('../fixtures/source-map/disk-relative-path')).href), + dirname(sourceMap.data.sources[0]) + ); +} + +// Loads source-maps from inline data URL. +{ + const coverageDirectory = nextdir(); + const output = spawnSync(process.execPath, [ + require.resolve('../fixtures/source-map/inline-base64.js'), + ], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } }); + assert.strictEqual(output.status, 0); + assert.strictEqual(output.stderr.toString(), ''); + const sourceMap = getSourceMapFromCache( + 'inline-base64.js', + coverageDirectory + ); + // base64 JSON should have been decoded, and paths to sources should have + // been rewritten such that they're absolute: + assert.strictEqual( + dirname(pathToFileURL( + require.resolve('../fixtures/source-map/inline-base64')).href), + dirname(sourceMap.data.sources[0]) + ); +} + +// base64 encoding error does not crash application. +{ + const coverageDirectory = nextdir(); + const output = spawnSync(process.execPath, [ + require.resolve('../fixtures/source-map/inline-base64-type-error.js'), + ], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } }); + assert.strictEqual(output.status, 0); + assert.strictEqual(output.stderr.toString(), ''); + const sourceMap = getSourceMapFromCache( + 'inline-base64-type-error.js', + coverageDirectory + ); + + assert.strictEqual(sourceMap.data, null); +} + +// JSON error does not crash application. +{ + const coverageDirectory = nextdir(); + const output = spawnSync(process.execPath, [ + require.resolve('../fixtures/source-map/inline-base64-json-error.js'), + ], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } }); + assert.strictEqual(output.status, 0); + assert.strictEqual(output.stderr.toString(), ''); + const sourceMap = getSourceMapFromCache( + 'inline-base64-json-error.js', + coverageDirectory + ); + + assert.strictEqual(sourceMap.data, null); +} + +// Does not apply source-map to stack trace if --experimental-modules +// is not set. +{ + const output = spawnSync(process.execPath, [ + require.resolve('../fixtures/source-map/uglify-throw.js'), + ]); + assert.strictEqual( + output.stderr.toString().match(/.*uglify-throw-original\.js:5:9/), + null + ); + assert.strictEqual( + output.stderr.toString().match(/.*uglify-throw-original\.js:9:3/), + null + ); +} + +// Applies source-maps generated by uglifyjs to stack trace. +{ + const output = spawnSync(process.execPath, [ + '--enable-source-maps', + require.resolve('../fixtures/source-map/uglify-throw.js'), + ]); + assert.match( + output.stderr.toString(), + /.*uglify-throw-original\.js:5:9/ + ); + assert.match( + output.stderr.toString(), + /.*uglify-throw-original\.js:9:3/ + ); + assert.match(output.stderr.toString(), /at Hello/); +} + +// Applies source-maps generated by tsc to stack trace. +{ + const output = spawnSync(process.execPath, [ + '--enable-source-maps', + require.resolve('../fixtures/source-map/typescript-throw.js'), + ]); + assert.ok(output.stderr.toString().match(/.*typescript-throw\.ts:18:11/)); + assert.ok(output.stderr.toString().match(/.*typescript-throw\.ts:24:1/)); +} + +// Applies source-maps generated by babel to stack trace. +{ + const output = spawnSync(process.execPath, [ + '--enable-source-maps', + require.resolve('../fixtures/source-map/babel-throw.js'), + ]); + assert.ok( + output.stderr.toString().match(/.*babel-throw-original\.js:18:31/) + ); +} + +// Applies source-maps generated by nyc to stack trace. +{ + const output = spawnSync(process.execPath, [ + '--enable-source-maps', + require.resolve('../fixtures/source-map/istanbul-throw.js'), + ]); + assert.ok( + output.stderr.toString().match(/.*istanbul-throw-original\.js:5:9/) + ); + assert.ok( + output.stderr.toString().match(/.*istanbul-throw-original\.js:9:3/) + ); +} + +// Applies source-maps in esm modules to stack trace. +{ + const output = spawnSync(process.execPath, [ + '--enable-source-maps', + require.resolve('../fixtures/source-map/babel-esm.mjs'), + ]); + assert.ok( + output.stderr.toString().match(/.*babel-esm-original\.mjs:9:29/) + ); +} + +// Does not persist url parameter if source-map has been parsed. +{ + const coverageDirectory = nextdir(); + spawnSync(process.execPath, [ + require.resolve('../fixtures/source-map/inline-base64.js'), + ], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } }); + const sourceMap = getSourceMapFromCache( + 'inline-base64.js', + coverageDirectory + ); + assert.strictEqual(sourceMap.url, null); +} + +// Persists line lengths for in-memory representation of source file. +{ + const coverageDirectory = nextdir(); + spawnSync(process.execPath, [ + require.resolve('../fixtures/source-map/istanbul-throw.js'), + ], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } }); + const sourceMap = getSourceMapFromCache( + 'istanbul-throw.js', + coverageDirectory + ); + if (common.checkoutEOL === '\r\n') { + assert.deepStrictEqual(sourceMap.lineLengths, [1086, 31, 185, 649, 0]); + } else { + assert.deepStrictEqual(sourceMap.lineLengths, [1085, 30, 184, 648, 0]); + } +} + +// trace.length === 0 . +{ + const output = spawnSync(process.execPath, [ + '--enable-source-maps', + require.resolve('../fixtures/source-map/emptyStackError.js'), + ]); + + assert.ok( + output.stderr.toString().match('emptyStackError') + ); +} + +// Does not attempt to apply path resolution logic to absolute URLs +// with schemes. +// Refs: https://github.com/webpack/webpack/issues/9601 +// Refs: https://sourcemaps.info/spec.html#h.75yo6yoyk7x5 +{ + const output = spawnSync(process.execPath, [ + '--enable-source-maps', + require.resolve('../fixtures/source-map/webpack.js'), + ]); + // Error in original context of source content: + assert.match( + output.stderr.toString(), + /throw new Error\('oh no!'\)\r?\n.*\^/ + ); + // Rewritten stack trace: + assert.match(output.stderr.toString(), /webpack:\/\/\/webpack\.js:14:9/); + assert.match(output.stderr.toString(), /at functionD.*14:9/); + assert.match(output.stderr.toString(), /at functionC.*10:3/); +} + +// Stores and applies source map associated with file that throws while +// being required. +{ + const coverageDirectory = nextdir(); + const output = spawnSync(process.execPath, [ + '--enable-source-maps', + require.resolve('../fixtures/source-map/throw-on-require-entry.js'), + ], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } }); + const sourceMap = getSourceMapFromCache( + 'throw-on-require.js', + coverageDirectory + ); + // Rewritten stack trace. + assert.match(output.stderr.toString(), /throw-on-require\.ts:9:9/); + // Source map should have been serialized. + assert.ok(sourceMap); +} + +// Does not throw TypeError when primitive value is thrown. +{ + const coverageDirectory = nextdir(); + const output = spawnSync(process.execPath, [ + '--enable-source-maps', + require.resolve('../fixtures/source-map/throw-string.js'), + ], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } }); + const sourceMap = getSourceMapFromCache( + 'throw-string.js', + coverageDirectory + ); + // Original stack trace. + assert.match(output.stderr.toString(), /goodbye/); + // Source map should have been serialized. + assert.ok(sourceMap); +} + +// Does not throw TypeError when exception occurs as result of missing named +// export. +{ + const coverageDirectory = nextdir(); + const output = spawnSync(process.execPath, [ + '--enable-source-maps', + require.resolve('../fixtures/source-map/esm-export-missing.mjs'), + ], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } }); + const sourceMap = getSourceMapFromCache( + 'esm-export-missing.mjs', + coverageDirectory + ); + // Module loader error displayed. + assert.match(output.stderr.toString(), + /does not provide an export named 'Something'/); + // Source map should have been serialized. + assert.ok(sourceMap); +} + +// Does not include null for async/await with esm +// Refs: https://github.com/nodejs/node/issues/42417 +{ + const output = spawnSync(process.execPath, [ + '--enable-source-maps', + require.resolve('../fixtures/source-map/throw-async.mjs'), + ]); + // Error in original context of source content: + assert.match( + output.stderr.toString(), + /throw new Error\(message\)\r?\n.*\^/ + ); + // Rewritten stack trace: + assert.match(output.stderr.toString(), /at Throw \([^)]+throw-async\.ts:4:9\)/); +} + +function getSourceMapFromCache(fixtureFile, coverageDirectory) { + const jsonFiles = fs.readdirSync(coverageDirectory); + for (const jsonFile of jsonFiles) { + let maybeSourceMapCache; + try { + maybeSourceMapCache = require( + path.join(coverageDirectory, jsonFile) + )['source-map-cache'] || {}; + } catch (err) { + console.warn(err); + maybeSourceMapCache = {}; + } + const keys = Object.keys(maybeSourceMapCache); + for (const key of keys) { + if (key.includes(fixtureFile)) { + return maybeSourceMapCache[key]; + } + } + } +} diff --git a/tests/node_compat/test/parallel/test-spawn-cmd-named-pipe.js b/tests/node_compat/test/parallel/test-spawn-cmd-named-pipe.js new file mode 100644 index 00000000000000..47b012a9ca5dec --- /dev/null +++ b/tests/node_compat/test/parallel/test-spawn-cmd-named-pipe.js @@ -0,0 +1,57 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +// This test is intended for Windows only +if (!common.isWindows) + common.skip('this test is Windows-specific.'); + +const assert = require('assert'); + +if (!process.argv[2]) { + // parent + const net = require('net'); + const spawn = require('child_process').spawn; + const path = require('path'); + + const pipeNamePrefix = `${path.basename(__filename)}.${process.pid}`; + const stdinPipeName = `\\\\.\\pipe\\${pipeNamePrefix}.stdin`; + const stdoutPipeName = `\\\\.\\pipe\\${pipeNamePrefix}.stdout`; + + const stdinPipeServer = net.createServer(function(c) { + c.on('end', common.mustCall()); + c.end('hello'); + }); + stdinPipeServer.listen(stdinPipeName); + + const output = []; + + const stdoutPipeServer = net.createServer(function(c) { + c.on('data', function(x) { + output.push(x); + }); + c.on('end', common.mustCall(function() { + assert.strictEqual(output.join(''), 'hello'); + })); + }); + stdoutPipeServer.listen(stdoutPipeName); + + const args = + [`"${__filename}"`, 'child', '<', stdinPipeName, '>', stdoutPipeName]; + + const child = spawn(`"${process.execPath}"`, args, { shell: true }); + + child.on('exit', common.mustCall(function(exitCode) { + stdinPipeServer.close(); + stdoutPipeServer.close(); + assert.strictEqual(exitCode, 0); + })); +} else { + // child + process.stdin.pipe(process.stdout); +} diff --git a/tests/node_compat/test/parallel/test-stdin-hang.js b/tests/node_compat/test/parallel/test-stdin-hang.js new file mode 100644 index 00000000000000..26e98abe03917f --- /dev/null +++ b/tests/node_compat/test/parallel/test-stdin-hang.js @@ -0,0 +1,39 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); + +// This test *only* verifies that invoking the stdin getter does not +// cause node to hang indefinitely. +// If it does, then the test-runner will nuke it. + +// invoke the getter. +process.stdin; // eslint-disable-line no-unused-expressions + +console.error('Should exit normally now.'); diff --git a/tests/node_compat/test/parallel/test-stdin-pipe-large.js b/tests/node_compat/test/parallel/test-stdin-pipe-large.js new file mode 100644 index 00000000000000..cdc4e9ff05d292 --- /dev/null +++ b/tests/node_compat/test/parallel/test-stdin-pipe-large.js @@ -0,0 +1,30 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +// See https://github.com/nodejs/node/issues/5927 + +const common = require('../common'); +const assert = require('assert'); +const spawn = require('child_process').spawn; + +if (process.argv[2] === 'child') { + process.stdin.pipe(process.stdout); + return; +} + +const child = spawn(process.execPath, [__filename, 'child'], { stdio: 'pipe' }); + +const expectedBytes = 1024 * 1024; +let readBytes = 0; + +child.stdin.end(Buffer.alloc(expectedBytes)); + +child.stdout.on('data', (chunk) => readBytes += chunk.length); +child.stdout.on('end', common.mustCall(() => { + assert.strictEqual(readBytes, expectedBytes); +})); diff --git a/tests/node_compat/test/parallel/test-stdin-pipe-resume.js b/tests/node_compat/test/parallel/test-stdin-pipe-resume.js new file mode 100644 index 00000000000000..52054d2ddaa5df --- /dev/null +++ b/tests/node_compat/test/parallel/test-stdin-pipe-resume.js @@ -0,0 +1,34 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +// This tests that piping stdin will cause it to resume() as well. +require('../common'); +const assert = require('assert'); + +if (process.argv[2] === 'child') { + process.stdin.pipe(process.stdout); +} else { + const spawn = require('child_process').spawn; + const buffers = []; + const child = spawn(process.execPath, [__filename, 'child']); + child.stdout.on('data', function(c) { + buffers.push(c); + }); + child.stdout.on('close', function() { + const b = Buffer.concat(buffers).toString(); + assert.strictEqual(b, 'Hello, world\n'); + console.log('ok'); + }); + child.stdin.write('Hel'); + child.stdin.write('lo,'); + child.stdin.write(' wo'); + setTimeout(function() { + child.stdin.write('rld\n'); + child.stdin.end(); + }, 10); +} diff --git a/tests/node_compat/test/parallel/test-stdin-script-child-option.js b/tests/node_compat/test/parallel/test-stdin-script-child-option.js new file mode 100644 index 00000000000000..1d4cd00e1eb7cb --- /dev/null +++ b/tests/node_compat/test/parallel/test-stdin-script-child-option.js @@ -0,0 +1,24 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); + +const expected = '--option-to-be-seen-on-child'; + +const { spawn } = require('child_process'); +const child = spawn(process.execPath, ['-', expected], { stdio: 'pipe' }); + +child.stdin.end('console.log(process.argv[2])'); + +let actual = ''; +child.stdout.setEncoding('utf8'); +child.stdout.on('data', (chunk) => actual += chunk); +child.stdout.on('end', common.mustCall(() => { + assert.strictEqual(actual.trim(), expected); +})); diff --git a/tests/node_compat/test/parallel/test-stdio-pipe-access.js b/tests/node_compat/test/parallel/test-stdio-pipe-access.js new file mode 100644 index 00000000000000..ab1db54ccae57d --- /dev/null +++ b/tests/node_compat/test/parallel/test-stdio-pipe-access.js @@ -0,0 +1,45 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +if (!common.isMainThread) + common.skip("Workers don't have process-like stdio"); + +// Test if Node handles accessing process.stdin if it is a redirected +// pipe without deadlocking +const { spawn, spawnSync } = require('child_process'); + +const numTries = 5; +const who = process.argv.length <= 2 ? 'runner' : process.argv[2]; + +switch (who) { + case 'runner': + for (let num = 0; num < numTries; ++num) { + spawnSync(process.argv0, + [process.argv[1], 'parent'], + { 'stdio': 'inherit' }); + } + break; + case 'parent': { + const middle = spawn(process.argv0, + [process.argv[1], 'middle'], + { 'stdio': 'pipe' }); + middle.stdout.on('data', () => {}); + break; + } + case 'middle': + spawn(process.argv0, + [process.argv[1], 'bottom'], + { 'stdio': [ process.stdin, + process.stdout, + process.stderr ] }); + break; + case 'bottom': + process.stdin; // eslint-disable-line no-unused-expressions + break; +} diff --git a/tests/node_compat/test/parallel/test-stdio-pipe-redirect.js b/tests/node_compat/test/parallel/test-stdio-pipe-redirect.js new file mode 100644 index 00000000000000..d2d51f7a697de2 --- /dev/null +++ b/tests/node_compat/test/parallel/test-stdio-pipe-redirect.js @@ -0,0 +1,49 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +if (!common.isMainThread) + common.skip("Workers don't have process-like stdio"); + +// Test if Node handles redirecting one child process stdout to another +// process stdin without crashing. +const spawn = require('child_process').spawn; + +const writeSize = 100; +const totalDots = 10000; + +const who = process.argv.length <= 2 ? 'parent' : process.argv[2]; + +switch (who) { + case 'parent': { + const consumer = spawn(process.argv0, [process.argv[1], 'consumer'], { + stdio: ['pipe', 'ignore', 'inherit'], + }); + const producer = spawn(process.argv0, [process.argv[1], 'producer'], { + stdio: ['pipe', consumer.stdin, 'inherit'], + }); + process.stdin.on('data', () => {}); + producer.on('exit', process.exit); + break; + } + case 'producer': { + const buffer = Buffer.alloc(writeSize, '.'); + let written = 0; + const write = () => { + if (written < totalDots) { + written += writeSize; + process.stdout.write(buffer, write); + } + }; + write(); + break; + } + case 'consumer': + process.stdin.on('data', () => {}); + break; +} diff --git a/tests/node_compat/test/parallel/test-stdio-pipe-stderr.js b/tests/node_compat/test/parallel/test-stdio-pipe-stderr.js new file mode 100644 index 00000000000000..d8242a916e4275 --- /dev/null +++ b/tests/node_compat/test/parallel/test-stdio-pipe-stderr.js @@ -0,0 +1,43 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); +const tmpdir = require('../common/tmpdir'); +const assert = require('assert'); +const fs = require('fs'); +const { spawnSync } = require('child_process'); + +// Test that invoking node with require, and piping stderr to file, +// does not result in exception, +// see: https://github.com/nodejs/node/issues/11257 + +tmpdir.refresh(); +const fakeModulePath = tmpdir.resolve('batman.js'); +const stderrOutputPath = tmpdir.resolve('stderr-output.txt'); +// We need to redirect stderr to a file to produce #11257 +const stream = fs.createWriteStream(stderrOutputPath); + +// The error described in #11257 only happens when we require a +// non-built-in module. +fs.writeFileSync(fakeModulePath, '', 'utf8'); + +stream.on('open', () => { + spawnSync(process.execPath, { + input: `require(${JSON.stringify(fakeModulePath)})`, + stdio: ['pipe', 'pipe', stream] + }); + const stderr = fs.readFileSync(stderrOutputPath, 'utf8').trim(); + assert.strictEqual( + stderr, + '', + `piping stderr to file should not result in exception: ${stderr}` + ); + stream.end(); + fs.unlinkSync(stderrOutputPath); + fs.unlinkSync(fakeModulePath); +}); diff --git a/tests/node_compat/test/parallel/test-stdio-undestroy.js b/tests/node_compat/test/parallel/test-stdio-undestroy.js new file mode 100644 index 00000000000000..f10ec0726d4d71 --- /dev/null +++ b/tests/node_compat/test/parallel/test-stdio-undestroy.js @@ -0,0 +1,43 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const spawn = require('child_process').spawn; + +if (process.argv[2] === 'child') { + process.stdout.destroy(); + process.stderr.destroy(); + console.log('stdout'); + process.stdout.write('rocks\n'); + console.error('stderr'); + setTimeout(function() { + process.stderr.write('rocks too\n'); + }, 10); + return; +} + +const proc = spawn(process.execPath, [__filename, 'child'], { stdio: 'pipe' }); + +let stdout = ''; +proc.stdout.setEncoding('utf8'); +proc.stdout.on('data', common.mustCallAtLeast(function(chunk) { + stdout += chunk; +}, 1)); + +let stderr = ''; +proc.stderr.setEncoding('utf8'); +proc.stderr.on('data', common.mustCallAtLeast(function(chunk) { + stderr += chunk; +}, 1)); + +proc.on('exit', common.mustCall(function(exitCode) { + assert.strictEqual(exitCode, 0); + assert.strictEqual(stdout, 'stdout\nrocks\n'); + assert.strictEqual(stderr, 'stderr\nrocks too\n'); +})); diff --git a/tests/node_compat/test/parallel/test-stdout-cannot-be-closed-child-process-pipe.js b/tests/node_compat/test/parallel/test-stdout-cannot-be-closed-child-process-pipe.js new file mode 100644 index 00000000000000..91dfd44cf67c01 --- /dev/null +++ b/tests/node_compat/test/parallel/test-stdout-cannot-be-closed-child-process-pipe.js @@ -0,0 +1,39 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); +const assert = require('assert'); + +if (process.argv[2] === 'child') + process.stdout.end('foo'); +else + parent(); + +function parent() { + const spawn = require('child_process').spawn; + const child = spawn(process.execPath, [__filename, 'child']); + let out = ''; + let err = ''; + + child.stdout.setEncoding('utf8'); + child.stderr.setEncoding('utf8'); + + child.stdout.on('data', function(c) { + out += c; + }); + child.stderr.on('data', function(c) { + err += c; + }); + + child.on('close', function(code, signal) { + assert.strictEqual(code, 0); + assert.strictEqual(err, ''); + assert.strictEqual(out, 'foo'); + console.log('ok'); + }); +} diff --git a/tests/node_compat/test/parallel/test-stdout-pipeline-destroy.js b/tests/node_compat/test/parallel/test-stdout-pipeline-destroy.js new file mode 100644 index 00000000000000..196f4a96e797f6 --- /dev/null +++ b/tests/node_compat/test/parallel/test-stdout-pipeline-destroy.js @@ -0,0 +1,38 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const { Transform, Readable, pipeline } = require('stream'); +const assert = require('assert'); + +const reader = new Readable({ + read(size) { this.push('foo'); } +}); + +let count = 0; + +const err = new Error('this-error-gets-hidden'); + +const transform = new Transform({ + transform(chunk, enc, cb) { + if (count++ >= 5) + this.emit('error', err); + else + cb(null, count.toString() + '\n'); + } +}); + +pipeline( + reader, + transform, + process.stdout, + common.mustCall((e) => { + assert.strictEqual(e, err); + }) +); diff --git a/tests/node_compat/test/parallel/test-stdout-stderr-reading.js b/tests/node_compat/test/parallel/test-stdout-stderr-reading.js new file mode 100644 index 00000000000000..25eb25b7b00d63 --- /dev/null +++ b/tests/node_compat/test/parallel/test-stdout-stderr-reading.js @@ -0,0 +1,74 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); + +// Verify that stdout is never read from. +const net = require('net'); +const read = net.Socket.prototype.read; + +net.Socket.prototype.read = function() { + if (this.fd === 1) + throw new Error('reading from stdout!'); + if (this.fd === 2) + throw new Error('reading from stderr!'); + return read.apply(this, arguments); +}; + +if (process.argv[2] === 'child') + child(); +else + parent(); + +function parent() { + const spawn = require('child_process').spawn; + const node = process.execPath; + + const c1 = spawn(node, [__filename, 'child']); + let c1out = ''; + c1.stdout.setEncoding('utf8'); + c1.stdout.on('data', function(chunk) { + c1out += chunk; + }); + c1.stderr.setEncoding('utf8'); + c1.stderr.on('data', function(chunk) { + console.error(`c1err: ${chunk.split('\n').join('\nc1err: ')}`); + }); + c1.on('close', common.mustCall(function(code, signal) { + assert(!code); + assert(!signal); + assert.strictEqual(c1out, 'ok\n'); + console.log('ok'); + })); + + const c2 = spawn(node, ['-e', 'console.log("ok")']); + let c2out = ''; + c2.stdout.setEncoding('utf8'); + c2.stdout.on('data', function(chunk) { + c2out += chunk; + }); + c1.stderr.setEncoding('utf8'); + c1.stderr.on('data', function(chunk) { + console.error(`c1err: ${chunk.split('\n').join('\nc1err: ')}`); + }); + c2.on('close', common.mustCall(function(code, signal) { + assert(!code); + assert(!signal); + assert.strictEqual(c2out, 'ok\n'); + console.log('ok'); + })); +} + +function child() { + // Should not be reading *ever* in here. + net.Socket.prototype.read = function() { + throw new Error('no reading allowed in child'); + }; + console.log('ok'); +} diff --git a/tests/node_compat/test/parallel/test-stdout-stderr-write.js b/tests/node_compat/test/parallel/test-stdout-stderr-write.js new file mode 100644 index 00000000000000..afce78d19fab03 --- /dev/null +++ b/tests/node_compat/test/parallel/test-stdout-stderr-write.js @@ -0,0 +1,15 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +require('../common'); +const assert = require('assert'); + +// https://github.com/nodejs/node/pull/39246 +assert.strictEqual(process.stderr.write('asd'), true); +assert.strictEqual(process.stdout.write('asd'), true); diff --git a/tests/node_compat/test/parallel/test-stream-add-abort-signal.js b/tests/node_compat/test/parallel/test-stream-add-abort-signal.js index 684ccff205daa5..1db215a43db4ce 100644 --- a/tests/node_compat/test/parallel/test-stream-add-abort-signal.js +++ b/tests/node_compat/test/parallel/test-stream-add-abort-signal.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --expose-internals diff --git a/tests/node_compat/test/parallel/test-stream-aliases-legacy.js b/tests/node_compat/test/parallel/test-stream-aliases-legacy.js index a62f1f9de6ed77..af966a80c67e0a 100644 --- a/tests/node_compat/test/parallel/test-stream-aliases-legacy.js +++ b/tests/node_compat/test/parallel/test-stream-aliases-legacy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-auto-destroy.js b/tests/node_compat/test/parallel/test-stream-auto-destroy.js index 651c7e2e5d1f92..f036a6e419acff 100644 --- a/tests/node_compat/test/parallel/test-stream-auto-destroy.js +++ b/tests/node_compat/test/parallel/test-stream-auto-destroy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-await-drain-writers-in-synchronously-recursion-write.js b/tests/node_compat/test/parallel/test-stream-await-drain-writers-in-synchronously-recursion-write.js index 597cca87857dfe..1d00048c0ec086 100644 --- a/tests/node_compat/test/parallel/test-stream-await-drain-writers-in-synchronously-recursion-write.js +++ b/tests/node_compat/test/parallel/test-stream-await-drain-writers-in-synchronously-recursion-write.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-backpressure.js b/tests/node_compat/test/parallel/test-stream-backpressure.js index 6bf0c33612d15a..c88c5228caa2e4 100644 --- a/tests/node_compat/test/parallel/test-stream-backpressure.js +++ b/tests/node_compat/test/parallel/test-stream-backpressure.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-big-packet.js b/tests/node_compat/test/parallel/test-stream-big-packet.js index 2708d99f286305..0db08f7e0cdbda 100644 --- a/tests/node_compat/test/parallel/test-stream-big-packet.js +++ b/tests/node_compat/test/parallel/test-stream-big-packet.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-big-push.js b/tests/node_compat/test/parallel/test-stream-big-push.js index 2f6e646cc3d74b..0ccdbc32d53fd1 100644 --- a/tests/node_compat/test/parallel/test-stream-big-push.js +++ b/tests/node_compat/test/parallel/test-stream-big-push.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-catch-rejections.js b/tests/node_compat/test/parallel/test-stream-catch-rejections.js new file mode 100644 index 00000000000000..909f031b27d418 --- /dev/null +++ b/tests/node_compat/test/parallel/test-stream-catch-rejections.js @@ -0,0 +1,58 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const stream = require('stream'); +const assert = require('assert'); + +{ + const r = new stream.Readable({ + captureRejections: true, + read() { + } + }); + r.push('hello'); + r.push('world'); + + const err = new Error('kaboom'); + + r.on('error', common.mustCall((_err) => { + assert.strictEqual(err, _err); + assert.strictEqual(r.destroyed, true); + })); + + r.on('data', async () => { + throw err; + }); +} + +{ + const w = new stream.Writable({ + captureRejections: true, + highWaterMark: 1, + write(chunk, enc, cb) { + process.nextTick(cb); + } + }); + + const err = new Error('kaboom'); + + w.write('hello', () => { + w.write('world'); + }); + + w.on('error', common.mustCall((_err) => { + assert.strictEqual(err, _err); + assert.strictEqual(w.destroyed, true); + })); + + w.on('drain', common.mustCall(async () => { + throw err; + }, 2)); +} diff --git a/tests/node_compat/test/parallel/test-stream-construct.js b/tests/node_compat/test/parallel/test-stream-construct.js index be0f605cd511f1..33a14966626fb8 100644 --- a/tests/node_compat/test/parallel/test-stream-construct.js +++ b/tests/node_compat/test/parallel/test-stream-construct.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-decoder-objectmode.js b/tests/node_compat/test/parallel/test-stream-decoder-objectmode.js new file mode 100644 index 00000000000000..816f35a3fac841 --- /dev/null +++ b/tests/node_compat/test/parallel/test-stream-decoder-objectmode.js @@ -0,0 +1,27 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +require('../common'); +const stream = require('stream'); +const assert = require('assert'); + +const readable = new stream.Readable({ + read: () => {}, + encoding: 'utf16le', + objectMode: true +}); + +readable.push(Buffer.from('abc', 'utf16le')); +readable.push(Buffer.from('def', 'utf16le')); +readable.push(null); + +// Without object mode, these would be concatenated into a single chunk. +assert.strictEqual(readable.read(), 'abc'); +assert.strictEqual(readable.read(), 'def'); +assert.strictEqual(readable.read(), null); diff --git a/tests/node_compat/test/parallel/test-stream-destroy-event-order.js b/tests/node_compat/test/parallel/test-stream-destroy-event-order.js index e974cebc7449ee..83963a9add5493 100644 --- a/tests/node_compat/test/parallel/test-stream-destroy-event-order.js +++ b/tests/node_compat/test/parallel/test-stream-destroy-event-order.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-duplex-destroy.js b/tests/node_compat/test/parallel/test-stream-duplex-destroy.js index fbc9b6b0e5de47..9116dfb412b87f 100644 --- a/tests/node_compat/test/parallel/test-stream-duplex-destroy.js +++ b/tests/node_compat/test/parallel/test-stream-duplex-destroy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-duplex-end.js b/tests/node_compat/test/parallel/test-stream-duplex-end.js index cf5523c51b77cc..c661b9cbd20aaa 100644 --- a/tests/node_compat/test/parallel/test-stream-duplex-end.js +++ b/tests/node_compat/test/parallel/test-stream-duplex-end.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-duplex-props.js b/tests/node_compat/test/parallel/test-stream-duplex-props.js index d12f8fc8276a2c..402c9bfd1f1421 100644 --- a/tests/node_compat/test/parallel/test-stream-duplex-props.js +++ b/tests/node_compat/test/parallel/test-stream-duplex-props.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-duplex-readable-end.js b/tests/node_compat/test/parallel/test-stream-duplex-readable-end.js index 08d831d7f243d2..b091571788f06c 100644 --- a/tests/node_compat/test/parallel/test-stream-duplex-readable-end.js +++ b/tests/node_compat/test/parallel/test-stream-duplex-readable-end.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-duplex-readable-writable.js b/tests/node_compat/test/parallel/test-stream-duplex-readable-writable.js new file mode 100644 index 00000000000000..82dfb54afb3ba9 --- /dev/null +++ b/tests/node_compat/test/parallel/test-stream-duplex-readable-writable.js @@ -0,0 +1,53 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const { Duplex } = require('stream'); +const assert = require('assert'); + +{ + const duplex = new Duplex({ + readable: false + }); + assert.strictEqual(duplex.readable, false); + duplex.push('asd'); + duplex.on('error', common.mustCall((err) => { + assert.strictEqual(err.code, 'ERR_STREAM_PUSH_AFTER_EOF'); + })); + duplex.on('data', common.mustNotCall()); + duplex.on('end', common.mustNotCall()); +} + +{ + const duplex = new Duplex({ + writable: false, + write: common.mustNotCall() + }); + assert.strictEqual(duplex.writable, false); + duplex.write('asd'); + duplex.on('error', common.mustCall((err) => { + assert.strictEqual(err.code, 'ERR_STREAM_WRITE_AFTER_END'); + })); + duplex.on('finish', common.mustNotCall()); +} + +{ + const duplex = new Duplex({ + readable: false + }); + assert.strictEqual(duplex.readable, false); + duplex.on('data', common.mustNotCall()); + duplex.on('end', common.mustNotCall()); + async function run() { + for await (const chunk of duplex) { + assert(false, chunk); + } + } + run().then(common.mustCall()); +} diff --git a/tests/node_compat/test/parallel/test-stream-duplex-writable-finished.js b/tests/node_compat/test/parallel/test-stream-duplex-writable-finished.js index dc542a47bd28d9..49b1e7c05256ed 100644 --- a/tests/node_compat/test/parallel/test-stream-duplex-writable-finished.js +++ b/tests/node_compat/test/parallel/test-stream-duplex-writable-finished.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-duplex.js b/tests/node_compat/test/parallel/test-stream-duplex.js index 18013ec3a0e37d..a83ddf50409d0e 100644 --- a/tests/node_compat/test/parallel/test-stream-duplex.js +++ b/tests/node_compat/test/parallel/test-stream-duplex.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-end-of-streams.js b/tests/node_compat/test/parallel/test-stream-end-of-streams.js new file mode 100644 index 00000000000000..3ac78238ce50e0 --- /dev/null +++ b/tests/node_compat/test/parallel/test-stream-end-of-streams.js @@ -0,0 +1,27 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); +const assert = require('assert'); + +const { Duplex, finished } = require('stream'); + +assert.throws( + () => { + // Passing empty object to mock invalid stream + // should throw error + finished({}, () => {}); + }, + { code: 'ERR_INVALID_ARG_TYPE' } +); + +const streamObj = new Duplex(); +streamObj.end(); +// Below code should not throw any errors as the +// streamObj is `Stream` +finished(streamObj, () => {}); diff --git a/tests/node_compat/test/parallel/test-stream-end-paused.js b/tests/node_compat/test/parallel/test-stream-end-paused.js index dd71ee4762fdbf..7e316bff64a8e8 100644 --- a/tests/node_compat/test/parallel/test-stream-end-paused.js +++ b/tests/node_compat/test/parallel/test-stream-end-paused.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-error-once.js b/tests/node_compat/test/parallel/test-stream-error-once.js index fd36e573fc92c2..60a5cdd4e44aef 100644 --- a/tests/node_compat/test/parallel/test-stream-error-once.js +++ b/tests/node_compat/test/parallel/test-stream-error-once.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-events-prepend.js b/tests/node_compat/test/parallel/test-stream-events-prepend.js index 1ed5563bed5b8a..81de84a26be174 100644 --- a/tests/node_compat/test/parallel/test-stream-events-prepend.js +++ b/tests/node_compat/test/parallel/test-stream-events-prepend.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-filter.js b/tests/node_compat/test/parallel/test-stream-filter.js new file mode 100644 index 00000000000000..7043365ce935e0 --- /dev/null +++ b/tests/node_compat/test/parallel/test-stream-filter.js @@ -0,0 +1,183 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const { + Readable, +} = require('stream'); +const assert = require('assert'); +const { once } = require('events'); +const { setTimeout } = require('timers/promises'); + +{ + // Filter works on synchronous streams with a synchronous predicate + const stream = Readable.from([1, 2, 3, 4, 5]).filter((x) => x < 3); + const result = [1, 2]; + (async () => { + for await (const item of stream) { + assert.strictEqual(item, result.shift()); + } + })().then(common.mustCall()); +} + +{ + // Filter works on synchronous streams with an asynchronous predicate + const stream = Readable.from([1, 2, 3, 4, 5]).filter(async (x) => { + await Promise.resolve(); + return x > 3; + }); + const result = [4, 5]; + (async () => { + for await (const item of stream) { + assert.strictEqual(item, result.shift()); + } + })().then(common.mustCall()); +} + +{ + // Map works on asynchronous streams with a asynchronous mapper + const stream = Readable.from([1, 2, 3, 4, 5]).map(async (x) => { + await Promise.resolve(); + return x + x; + }).filter((x) => x > 5); + const result = [6, 8, 10]; + (async () => { + for await (const item of stream) { + assert.strictEqual(item, result.shift()); + } + })().then(common.mustCall()); +} + +{ + // Filter works on an infinite stream + const stream = Readable.from(async function* () { + while (true) yield 1; + }()).filter(common.mustCall(async (x) => { + return x < 3; + }, 5)); + (async () => { + let i = 1; + for await (const item of stream) { + assert.strictEqual(item, 1); + if (++i === 5) break; + } + })().then(common.mustCall()); +} + +{ + // Filter works on constructor created streams + let i = 0; + const stream = new Readable({ + read() { + if (i === 10) { + this.push(null); + return; + } + this.push(Uint8Array.from([i])); + i++; + }, + highWaterMark: 0, + }).filter(common.mustCall(async ([x]) => { + return x !== 5; + }, 10)); + (async () => { + const result = (await stream.toArray()).map((x) => x[0]); + const expected = [...Array(10).keys()].filter((x) => x !== 5); + assert.deepStrictEqual(result, expected); + })().then(common.mustCall()); +} + +{ + // Throwing an error during `filter` (sync) + const stream = Readable.from([1, 2, 3, 4, 5]).filter((x) => { + if (x === 3) { + throw new Error('boom'); + } + return true; + }); + assert.rejects( + stream.map((x) => x + x).toArray(), + /boom/, + ).then(common.mustCall()); +} + +{ + // Throwing an error during `filter` (async) + const stream = Readable.from([1, 2, 3, 4, 5]).filter(async (x) => { + if (x === 3) { + throw new Error('boom'); + } + return true; + }); + assert.rejects( + stream.filter(() => true).toArray(), + /boom/, + ).then(common.mustCall()); +} + +{ + // Concurrency + AbortSignal + const ac = new AbortController(); + let calls = 0; + const stream = Readable.from([1, 2, 3, 4]).filter(async (_, { signal }) => { + calls++; + await once(signal, 'abort'); + }, { signal: ac.signal, concurrency: 2 }); + // pump + assert.rejects(async () => { + for await (const item of stream) { + // nope + console.log(item); + } + }, { + name: 'AbortError', + }).then(common.mustCall()); + + setImmediate(() => { + ac.abort(); + assert.strictEqual(calls, 2); + }); +} + +{ + // Concurrency result order + const stream = Readable.from([1, 2]).filter(async (item, { signal }) => { + await setTimeout(10 - item, { signal }); + return true; + }, { concurrency: 2 }); + + (async () => { + const expected = [1, 2]; + for await (const item of stream) { + assert.strictEqual(item, expected.shift()); + } + })().then(common.mustCall()); +} + +{ + // Error cases + assert.throws(() => Readable.from([1]).filter(1), /ERR_INVALID_ARG_TYPE/); + assert.throws(() => Readable.from([1]).filter((x) => x, { + concurrency: 'Foo' + }), /ERR_OUT_OF_RANGE/); + assert.throws(() => Readable.from([1]).filter((x) => x, 1), /ERR_INVALID_ARG_TYPE/); +} +{ + // Test result is a Readable + const stream = Readable.from([1, 2, 3, 4, 5]).filter((x) => true); + assert.strictEqual(stream.readable, true); +} +{ + const stream = Readable.from([1, 2, 3, 4, 5]); + Object.defineProperty(stream, 'map', { + value: common.mustNotCall(), + }); + // Check that map isn't getting called. + stream.filter(() => true); +} diff --git a/tests/node_compat/test/parallel/test-stream-flatMap.js b/tests/node_compat/test/parallel/test-stream-flatMap.js new file mode 100644 index 00000000000000..7575f90d651b25 --- /dev/null +++ b/tests/node_compat/test/parallel/test-stream-flatMap.js @@ -0,0 +1,138 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const fixtures = require('../common/fixtures'); +const { + Readable, +} = require('stream'); +const assert = require('assert'); +const { setTimeout } = require('timers/promises'); +const { createReadStream } = require('fs'); + +function oneTo5() { + return Readable.from([1, 2, 3, 4, 5]); +} + +{ + // flatMap works on synchronous streams with a synchronous mapper + (async () => { + assert.deepStrictEqual( + await oneTo5().flatMap((x) => [x + x]).toArray(), + [2, 4, 6, 8, 10] + ); + assert.deepStrictEqual( + await oneTo5().flatMap(() => []).toArray(), + [] + ); + assert.deepStrictEqual( + await oneTo5().flatMap((x) => [x, x]).toArray(), + [1, 1, 2, 2, 3, 3, 4, 4, 5, 5] + ); + })().then(common.mustCall()); +} + + +{ + // flatMap works on sync/async streams with an asynchronous mapper + (async () => { + assert.deepStrictEqual( + await oneTo5().flatMap(async (x) => [x, x]).toArray(), + [1, 1, 2, 2, 3, 3, 4, 4, 5, 5] + ); + const asyncOneTo5 = oneTo5().map(async (x) => x); + assert.deepStrictEqual( + await asyncOneTo5.flatMap(async (x) => [x, x]).toArray(), + [1, 1, 2, 2, 3, 3, 4, 4, 5, 5] + ); + })().then(common.mustCall()); +} +{ + // flatMap works on a stream where mapping returns a stream + (async () => { + const result = await oneTo5().flatMap(async (x) => { + return Readable.from([x, x]); + }).toArray(); + assert.deepStrictEqual(result, [1, 1, 2, 2, 3, 3, 4, 4, 5, 5]); + })().then(common.mustCall()); + // flatMap works on an objectMode stream where mappign returns a stream + (async () => { + const result = await oneTo5().flatMap(() => { + return createReadStream(fixtures.path('x.txt')); + }).toArray(); + // The resultant stream is in object mode so toArray shouldn't flatten + assert.strictEqual(result.length, 5); + assert.deepStrictEqual( + Buffer.concat(result).toString(), + 'xyz\n'.repeat(5) + ); + + })().then(common.mustCall()); + +} + +{ + // Concurrency + AbortSignal + const ac = new AbortController(); + const stream = oneTo5().flatMap(common.mustNotCall(async (_, { signal }) => { + await setTimeout(100, { signal }); + }), { signal: ac.signal, concurrency: 2 }); + // pump + assert.rejects(async () => { + for await (const item of stream) { + // nope + console.log(item); + } + }, { + name: 'AbortError', + }).then(common.mustCall()); + + queueMicrotask(() => { + ac.abort(); + }); +} + +{ + // Already aborted AbortSignal + const stream = oneTo5().flatMap(common.mustNotCall(async (_, { signal }) => { + await setTimeout(100, { signal }); + }), { signal: AbortSignal.abort() }); + // pump + assert.rejects(async () => { + for await (const item of stream) { + // nope + console.log(item); + } + }, { + name: 'AbortError', + }).then(common.mustCall()); +} + +{ + // Error cases + assert.throws(() => Readable.from([1]).flatMap(1), /ERR_INVALID_ARG_TYPE/); + assert.throws(() => Readable.from([1]).flatMap((x) => x, { + concurrency: 'Foo' + }), /ERR_OUT_OF_RANGE/); + assert.throws(() => Readable.from([1]).flatMap((x) => x, 1), /ERR_INVALID_ARG_TYPE/); + assert.throws(() => Readable.from([1]).flatMap((x) => x, { signal: true }), /ERR_INVALID_ARG_TYPE/); +} +{ + // Test result is a Readable + const stream = oneTo5().flatMap((x) => x); + assert.strictEqual(stream.readable, true); +} +{ + const stream = oneTo5(); + Object.defineProperty(stream, 'map', { + value: common.mustNotCall(), + }); + // Check that map isn't getting called. + stream.flatMap(() => true); +} diff --git a/tests/node_compat/test/parallel/test-stream-forEach.js b/tests/node_compat/test/parallel/test-stream-forEach.js new file mode 100644 index 00000000000000..748193e1ba1684 --- /dev/null +++ b/tests/node_compat/test/parallel/test-stream-forEach.js @@ -0,0 +1,146 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const { + Readable, +} = require('stream'); +const assert = require('assert'); +const { once } = require('events'); + +{ + // forEach works on synchronous streams with a synchronous predicate + const stream = Readable.from([1, 2, 3]); + const result = [1, 2, 3]; + (async () => { + await stream.forEach((value) => assert.strictEqual(value, result.shift())); + })().then(common.mustCall()); +} + +{ + // forEach works an asynchronous streams + const stream = Readable.from([1, 2, 3]).filter(async (x) => { + await Promise.resolve(); + return true; + }); + const result = [1, 2, 3]; + (async () => { + await stream.forEach((value) => assert.strictEqual(value, result.shift())); + })().then(common.mustCall()); +} + +{ + // forEach works on asynchronous streams with a asynchronous forEach fn + const stream = Readable.from([1, 2, 3]).filter(async (x) => { + await Promise.resolve(); + return true; + }); + const result = [1, 2, 3]; + (async () => { + await stream.forEach(async (value) => { + await Promise.resolve(); + assert.strictEqual(value, result.shift()); + }); + })().then(common.mustCall()); +} + +{ + // forEach works on an infinite stream + const ac = new AbortController(); + const { signal } = ac; + const stream = Readable.from(async function* () { + while (true) yield 1; + }(), { signal }); + let i = 0; + assert.rejects(stream.forEach(common.mustCall((x) => { + i++; + if (i === 10) ac.abort(); + assert.strictEqual(x, 1); + }, 10)), { name: 'AbortError' }).then(common.mustCall()); +} + +{ + // Emitting an error during `forEach` + const stream = Readable.from([1, 2, 3, 4, 5]); + assert.rejects(stream.forEach(async (x) => { + if (x === 3) { + stream.emit('error', new Error('boom')); + } + }), /boom/).then(common.mustCall()); +} + +{ + // Throwing an error during `forEach` (sync) + const stream = Readable.from([1, 2, 3, 4, 5]); + assert.rejects(stream.forEach((x) => { + if (x === 3) { + throw new Error('boom'); + } + }), /boom/).then(common.mustCall()); +} + +{ + // Throwing an error during `forEach` (async) + const stream = Readable.from([1, 2, 3, 4, 5]); + assert.rejects(stream.forEach(async (x) => { + if (x === 3) { + return Promise.reject(new Error('boom')); + } + }), /boom/).then(common.mustCall()); +} + +{ + // Concurrency + AbortSignal + const ac = new AbortController(); + let calls = 0; + const forEachPromise = + Readable.from([1, 2, 3, 4]).forEach(async (_, { signal }) => { + calls++; + await once(signal, 'abort'); + }, { signal: ac.signal, concurrency: 2, highWaterMark: 0 }); + // pump + assert.rejects(async () => { + await forEachPromise; + }, { + name: 'AbortError', + }).then(common.mustCall()); + + setImmediate(() => { + ac.abort(); + assert.strictEqual(calls, 2); + }); +} + +{ + // Error cases + assert.rejects(async () => { + await Readable.from([1]).forEach(1); + }, /ERR_INVALID_ARG_TYPE/).then(common.mustCall()); + assert.rejects(async () => { + await Readable.from([1]).forEach((x) => x, { + concurrency: 'Foo' + }); + }, /ERR_OUT_OF_RANGE/).then(common.mustCall()); + assert.rejects(async () => { + await Readable.from([1]).forEach((x) => x, 1); + }, /ERR_INVALID_ARG_TYPE/).then(common.mustCall()); +} +{ + // Test result is a Promise + const stream = Readable.from([1, 2, 3, 4, 5]).forEach((_) => true); + assert.strictEqual(typeof stream.then, 'function'); +} +{ + const stream = Readable.from([1, 2, 3, 4, 5]); + Object.defineProperty(stream, 'map', { + value: common.mustNotCall(), + }); + // Check that map isn't getting called. + stream.forEach(() => true); +} diff --git a/tests/node_compat/test/parallel/test-stream-inheritance.js b/tests/node_compat/test/parallel/test-stream-inheritance.js index ca5d9cbe1b773e..f055bb70f2469f 100644 --- a/tests/node_compat/test/parallel/test-stream-inheritance.js +++ b/tests/node_compat/test/parallel/test-stream-inheritance.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-ispaused.js b/tests/node_compat/test/parallel/test-stream-ispaused.js index 796b0d2a82252e..852cd87535a459 100644 --- a/tests/node_compat/test/parallel/test-stream-ispaused.js +++ b/tests/node_compat/test/parallel/test-stream-ispaused.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-objectmode-undefined.js b/tests/node_compat/test/parallel/test-stream-objectmode-undefined.js index 6cc8cbb7003ea5..6d11c60553e3e8 100644 --- a/tests/node_compat/test/parallel/test-stream-objectmode-undefined.js +++ b/tests/node_compat/test/parallel/test-stream-objectmode-undefined.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-once-readable-pipe.js b/tests/node_compat/test/parallel/test-stream-once-readable-pipe.js index e36c77aad0689d..a02a9eb059c9b6 100644 --- a/tests/node_compat/test/parallel/test-stream-once-readable-pipe.js +++ b/tests/node_compat/test/parallel/test-stream-once-readable-pipe.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-passthrough-drain.js b/tests/node_compat/test/parallel/test-stream-passthrough-drain.js new file mode 100644 index 00000000000000..7e4cddc28955d0 --- /dev/null +++ b/tests/node_compat/test/parallel/test-stream-passthrough-drain.js @@ -0,0 +1,17 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const { PassThrough } = require('stream'); + +const pt = new PassThrough({ highWaterMark: 0 }); +pt.on('drain', common.mustCall()); +assert(!pt.write('hello1')); +pt.read(); +pt.read(); diff --git a/tests/node_compat/test/parallel/test-stream-pipe-after-end.js b/tests/node_compat/test/parallel/test-stream-pipe-after-end.js index 680c1d0f9784be..6e71ac79924380 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-after-end.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-after-end.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-pipe-await-drain-manual-resume.js b/tests/node_compat/test/parallel/test-stream-pipe-await-drain-manual-resume.js index 9c9b188fb0ccb4..d6fe4d534a7020 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-await-drain-manual-resume.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-await-drain-manual-resume.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-pipe-await-drain-push-while-write.js b/tests/node_compat/test/parallel/test-stream-pipe-await-drain-push-while-write.js index 32af6c517104b9..00337d32ff31d0 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-await-drain-push-while-write.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-await-drain-push-while-write.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-pipe-await-drain.js b/tests/node_compat/test/parallel/test-stream-pipe-await-drain.js index 75a92e91ca650b..d54955829b0f0f 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-await-drain.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-await-drain.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-pipe-cleanup-pause.js b/tests/node_compat/test/parallel/test-stream-pipe-cleanup-pause.js index a69b3e5be781c4..ce750bd01dcca5 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-cleanup-pause.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-cleanup-pause.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-pipe-cleanup.js b/tests/node_compat/test/parallel/test-stream-pipe-cleanup.js index 908045305b8757..986871125bc318 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-cleanup.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-cleanup.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-pipe-error-handling.js b/tests/node_compat/test/parallel/test-stream-pipe-error-handling.js index 0ef417e875fb46..448cfed936b2f8 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-error-handling.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-error-handling.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-pipe-error-unhandled.js b/tests/node_compat/test/parallel/test-stream-pipe-error-unhandled.js new file mode 100644 index 00000000000000..f4e9f3b4c7a79c --- /dev/null +++ b/tests/node_compat/test/parallel/test-stream-pipe-error-unhandled.js @@ -0,0 +1,28 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const { Readable, Writable } = require('stream'); + +process.on('uncaughtException', common.mustCall((err) => { + assert.strictEqual(err.message, 'asd'); +})); + +const r = new Readable({ + read() { + this.push('asd'); + } +}); +const w = new Writable({ + autoDestroy: true, + write() {} +}); + +r.pipe(w); +w.destroy(new Error('asd')); diff --git a/tests/node_compat/test/parallel/test-stream-pipe-event.js b/tests/node_compat/test/parallel/test-stream-pipe-event.js index 9b90d89efa43e0..f49a6b0ab0a3f8 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-event.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-event.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-pipe-flow-after-unpipe.js b/tests/node_compat/test/parallel/test-stream-pipe-flow-after-unpipe.js index 9115e79756bcf5..f3cf7b7e83ca71 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-flow-after-unpipe.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-flow-after-unpipe.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-pipe-flow.js b/tests/node_compat/test/parallel/test-stream-pipe-flow.js index d7f516bf855d63..6d5ddc44a51bf8 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-flow.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-flow.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-pipe-manual-resume.js b/tests/node_compat/test/parallel/test-stream-pipe-manual-resume.js index 8ea889f1fe2f23..13cf6bc9c71520 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-manual-resume.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-manual-resume.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-pipe-multiple-pipes.js b/tests/node_compat/test/parallel/test-stream-pipe-multiple-pipes.js index 7796eaef141bd5..d9c8a239dc5595 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-multiple-pipes.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-multiple-pipes.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-pipe-needDrain.js b/tests/node_compat/test/parallel/test-stream-pipe-needDrain.js index 9e943844427f41..506b4c727ff681 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-needDrain.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-needDrain.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-pipe-same-destination-twice.js b/tests/node_compat/test/parallel/test-stream-pipe-same-destination-twice.js index 251ae2bbbe482d..f6cf12c952816e 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-same-destination-twice.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-same-destination-twice.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-pipe-unpipe-streams.js b/tests/node_compat/test/parallel/test-stream-pipe-unpipe-streams.js index a69b5877e90579..caba6406963075 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-unpipe-streams.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-unpipe-streams.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-pipe-without-listenerCount.js b/tests/node_compat/test/parallel/test-stream-pipe-without-listenerCount.js index 40cc094394acce..94bccd59f5b4ac 100644 --- a/tests/node_compat/test/parallel/test-stream-pipe-without-listenerCount.js +++ b/tests/node_compat/test/parallel/test-stream-pipe-without-listenerCount.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-pipeline-async-iterator.js b/tests/node_compat/test/parallel/test-stream-pipeline-async-iterator.js index 963bc07685111f..751c003b661c64 100644 --- a/tests/node_compat/test/parallel/test-stream-pipeline-async-iterator.js +++ b/tests/node_compat/test/parallel/test-stream-pipeline-async-iterator.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-pipeline-duplex.js b/tests/node_compat/test/parallel/test-stream-pipeline-duplex.js new file mode 100644 index 00000000000000..b2c0258fc9e2d5 --- /dev/null +++ b/tests/node_compat/test/parallel/test-stream-pipeline-duplex.js @@ -0,0 +1,28 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const { pipeline, Duplex, PassThrough } = require('stream'); +const assert = require('assert'); + +const remote = new PassThrough(); +const local = new Duplex({ + read() {}, + write(chunk, enc, callback) { + callback(); + } +}); + +pipeline(remote, local, remote, common.mustCall((err) => { + assert.strictEqual(err.code, 'ERR_STREAM_PREMATURE_CLOSE'); +})); + +setImmediate(() => { + remote.end(); +}); diff --git a/tests/node_compat/test/parallel/test-stream-pipeline-listeners.js b/tests/node_compat/test/parallel/test-stream-pipeline-listeners.js new file mode 100644 index 00000000000000..09ccc7ea47dda4 --- /dev/null +++ b/tests/node_compat/test/parallel/test-stream-pipeline-listeners.js @@ -0,0 +1,83 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const { pipeline, Duplex, PassThrough, Writable } = require('stream'); +const assert = require('assert'); + +process.on('uncaughtException', common.mustCall((err) => { + assert.strictEqual(err.message, 'no way'); +}, 2)); + +// Ensure that listeners is removed if last stream is readable +// And other stream's listeners unchanged +const a = new PassThrough(); +a.end('foobar'); +const b = new Duplex({ + write(chunk, encoding, callback) { + callback(); + } +}); +pipeline(a, b, common.mustCall((error) => { + if (error) { + assert.ifError(error); + } + + assert(a.listenerCount('error') > 0); + assert.strictEqual(b.listenerCount('error'), 0); + setTimeout(() => { + assert.strictEqual(b.listenerCount('error'), 0); + b.destroy(new Error('no way')); + }, 100); +})); + +// Async generators +const c = new PassThrough(); +c.end('foobar'); +const d = pipeline( + c, + async function* (source) { + for await (const chunk of source) { + yield String(chunk).toUpperCase(); + } + }, + common.mustCall((error) => { + if (error) { + assert.ifError(error); + } + + assert(c.listenerCount('error') > 0); + assert.strictEqual(d.listenerCount('error'), 0); + setTimeout(() => { + assert.strictEqual(b.listenerCount('error'), 0); + d.destroy(new Error('no way')); + }, 100); + }) +); + +// If last stream is not readable, will not throw and remove listeners +const e = new PassThrough(); +e.end('foobar'); +const f = new Writable({ + write(chunk, encoding, callback) { + callback(); + } +}); +pipeline(e, f, common.mustCall((error) => { + if (error) { + assert.ifError(error); + } + + assert(e.listenerCount('error') > 0); + assert(f.listenerCount('error') > 0); + setTimeout(() => { + assert(f.listenerCount('error') > 0); + f.destroy(new Error('no way')); + }, 100); +})); diff --git a/tests/node_compat/test/parallel/test-stream-pipeline-queued-end-in-destroy.js b/tests/node_compat/test/parallel/test-stream-pipeline-queued-end-in-destroy.js index 7060d7da9030d8..305c9f008b08e5 100644 --- a/tests/node_compat/test/parallel/test-stream-pipeline-queued-end-in-destroy.js +++ b/tests/node_compat/test/parallel/test-stream-pipeline-queued-end-in-destroy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-pipeline-uncaught.js b/tests/node_compat/test/parallel/test-stream-pipeline-uncaught.js new file mode 100644 index 00000000000000..77c409c9675b8b --- /dev/null +++ b/tests/node_compat/test/parallel/test-stream-pipeline-uncaught.js @@ -0,0 +1,29 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const { + pipeline, + PassThrough +} = require('stream'); +const assert = require('assert'); + +process.on('uncaughtException', common.mustCall((err) => { + assert.strictEqual(err.message, 'error'); +})); + +// Ensure that pipeline that ends with Promise +// still propagates error to uncaughtException. +const s = new PassThrough(); +s.end('data'); +pipeline(s, async function(source) { + for await (const chunk of source) { } // eslint-disable-line no-unused-vars, no-empty +}, common.mustSucceed(() => { + throw new Error('error'); +})); diff --git a/tests/node_compat/test/parallel/test-stream-pipeline-with-empty-string.js b/tests/node_compat/test/parallel/test-stream-pipeline-with-empty-string.js index a85e12a7f29987..d372c4ffa2a865 100644 --- a/tests/node_compat/test/parallel/test-stream-pipeline-with-empty-string.js +++ b/tests/node_compat/test/parallel/test-stream-pipeline-with-empty-string.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-push-order.js b/tests/node_compat/test/parallel/test-stream-push-order.js new file mode 100644 index 00000000000000..c0202df5422a18 --- /dev/null +++ b/tests/node_compat/test/parallel/test-stream-push-order.js @@ -0,0 +1,59 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const Readable = require('stream').Readable; +const assert = require('assert'); + +const s = new Readable({ + highWaterMark: 20, + encoding: 'ascii' +}); + +const list = ['1', '2', '3', '4', '5', '6']; + +s._read = function(n) { + const one = list.shift(); + if (!one) { + s.push(null); + } else { + const two = list.shift(); + s.push(one); + s.push(two); + } +}; + +s.read(0); + +// ACTUALLY [1, 3, 5, 6, 4, 2] + +process.on('exit', function() { + assert.strictEqual(s.readableBuffer.join(','), '1,2,3,4,5,6'); + console.log('ok'); +}); diff --git a/tests/node_compat/test/parallel/test-stream-push-strings.js b/tests/node_compat/test/parallel/test-stream-push-strings.js index 2720b6b9ef08a7..d98daadbd852ef 100644 --- a/tests/node_compat/test/parallel/test-stream-push-strings.js +++ b/tests/node_compat/test/parallel/test-stream-push-strings.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-readable-aborted.js b/tests/node_compat/test/parallel/test-stream-readable-aborted.js index e7664df4d53a64..3f43426c613ab1 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-aborted.js +++ b/tests/node_compat/test/parallel/test-stream-readable-aborted.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-add-chunk-during-data.js b/tests/node_compat/test/parallel/test-stream-readable-add-chunk-during-data.js index 9358f33b75754c..5ae8f204692167 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-add-chunk-during-data.js +++ b/tests/node_compat/test/parallel/test-stream-readable-add-chunk-during-data.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-constructor-set-methods.js b/tests/node_compat/test/parallel/test-stream-readable-constructor-set-methods.js index 3c4e229e52483a..89bff31ce4dec5 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-constructor-set-methods.js +++ b/tests/node_compat/test/parallel/test-stream-readable-constructor-set-methods.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-data.js b/tests/node_compat/test/parallel/test-stream-readable-data.js index aadf7efd68225e..391ded40d8615c 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-data.js +++ b/tests/node_compat/test/parallel/test-stream-readable-data.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-destroy.js b/tests/node_compat/test/parallel/test-stream-readable-destroy.js index 75cec92dc3f9c3..ed0de9f85533dc 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-destroy.js +++ b/tests/node_compat/test/parallel/test-stream-readable-destroy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-didRead.js b/tests/node_compat/test/parallel/test-stream-readable-didRead.js index ca2a09275affc5..17a6c683fbfc05 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-didRead.js +++ b/tests/node_compat/test/parallel/test-stream-readable-didRead.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-emit-readable-short-stream.js b/tests/node_compat/test/parallel/test-stream-readable-emit-readable-short-stream.js index a0612cacf8abd7..4cb363fe8f3639 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-emit-readable-short-stream.js +++ b/tests/node_compat/test/parallel/test-stream-readable-emit-readable-short-stream.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-emittedReadable.js b/tests/node_compat/test/parallel/test-stream-readable-emittedReadable.js index 24a6d96a42d1fe..5df4ceb8b47a38 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-emittedReadable.js +++ b/tests/node_compat/test/parallel/test-stream-readable-emittedReadable.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-end-destroyed.js b/tests/node_compat/test/parallel/test-stream-readable-end-destroyed.js index 655fd145b6ba44..900f457c0cfbc9 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-end-destroyed.js +++ b/tests/node_compat/test/parallel/test-stream-readable-end-destroyed.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-ended.js b/tests/node_compat/test/parallel/test-stream-readable-ended.js index aaf06aacc8e3ff..26c113d1e1bd8d 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-ended.js +++ b/tests/node_compat/test/parallel/test-stream-readable-ended.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-error-end.js b/tests/node_compat/test/parallel/test-stream-readable-error-end.js index 282b4e90083243..2a56a35af4882a 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-error-end.js +++ b/tests/node_compat/test/parallel/test-stream-readable-error-end.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-event.js b/tests/node_compat/test/parallel/test-stream-readable-event.js index 394a42ffb8eb15..11ff7e51f01bcb 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-event.js +++ b/tests/node_compat/test/parallel/test-stream-readable-event.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-readable-flow-recursion.js b/tests/node_compat/test/parallel/test-stream-readable-flow-recursion.js index 34806a2e3b5d56..cebc1af3abfe5b 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-flow-recursion.js +++ b/tests/node_compat/test/parallel/test-stream-readable-flow-recursion.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-readable-hwm-0-async.js b/tests/node_compat/test/parallel/test-stream-readable-hwm-0-async.js index 21f7cdb26fa675..641ed53e0c0535 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-hwm-0-async.js +++ b/tests/node_compat/test/parallel/test-stream-readable-hwm-0-async.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-hwm-0-no-flow-data.js b/tests/node_compat/test/parallel/test-stream-readable-hwm-0-no-flow-data.js index 05ac0c71ec1a06..1e4d48cd059844 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-hwm-0-no-flow-data.js +++ b/tests/node_compat/test/parallel/test-stream-readable-hwm-0-no-flow-data.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-hwm-0.js b/tests/node_compat/test/parallel/test-stream-readable-hwm-0.js index 94a0657ead9ff3..c16ce1e95d9f1d 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-hwm-0.js +++ b/tests/node_compat/test/parallel/test-stream-readable-hwm-0.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-infinite-read.js b/tests/node_compat/test/parallel/test-stream-readable-infinite-read.js index 7e235e0589d97e..2fab34f49aeb07 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-infinite-read.js +++ b/tests/node_compat/test/parallel/test-stream-readable-infinite-read.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-invalid-chunk.js b/tests/node_compat/test/parallel/test-stream-readable-invalid-chunk.js index e9a9042fb15597..225587e8c1d12d 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-invalid-chunk.js +++ b/tests/node_compat/test/parallel/test-stream-readable-invalid-chunk.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-needReadable.js b/tests/node_compat/test/parallel/test-stream-readable-needReadable.js index 404eb95cd68ab6..1d82a50520be9d 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-needReadable.js +++ b/tests/node_compat/test/parallel/test-stream-readable-needReadable.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-next-no-null.js b/tests/node_compat/test/parallel/test-stream-readable-next-no-null.js index be2edd9d6087a3..da026d98921864 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-next-no-null.js +++ b/tests/node_compat/test/parallel/test-stream-readable-next-no-null.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-no-unneeded-readable.js b/tests/node_compat/test/parallel/test-stream-readable-no-unneeded-readable.js index 863bfff30a86d8..f6f7ef292efe45 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-no-unneeded-readable.js +++ b/tests/node_compat/test/parallel/test-stream-readable-no-unneeded-readable.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-object-multi-push-async.js b/tests/node_compat/test/parallel/test-stream-readable-object-multi-push-async.js index ce153c82294c2e..ba4d932946d8b9 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-object-multi-push-async.js +++ b/tests/node_compat/test/parallel/test-stream-readable-object-multi-push-async.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-pause-and-resume.js b/tests/node_compat/test/parallel/test-stream-readable-pause-and-resume.js index 9be474f4eec368..1e6cf4410e2a84 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-pause-and-resume.js +++ b/tests/node_compat/test/parallel/test-stream-readable-pause-and-resume.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-readable-then-resume.js b/tests/node_compat/test/parallel/test-stream-readable-readable-then-resume.js index 9fea6d2f60ab12..3626f31bdd66fd 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-readable-then-resume.js +++ b/tests/node_compat/test/parallel/test-stream-readable-readable-then-resume.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-readable.js b/tests/node_compat/test/parallel/test-stream-readable-readable.js index ffa722ba256446..6e052754317fb2 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-readable.js +++ b/tests/node_compat/test/parallel/test-stream-readable-readable.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-reading-readingMore.js b/tests/node_compat/test/parallel/test-stream-readable-reading-readingMore.js index 6d12519bfc2853..cf8afaf327129b 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-reading-readingMore.js +++ b/tests/node_compat/test/parallel/test-stream-readable-reading-readingMore.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-resume-hwm.js b/tests/node_compat/test/parallel/test-stream-readable-resume-hwm.js index ed4aca0d99b199..20735923620f11 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-resume-hwm.js +++ b/tests/node_compat/test/parallel/test-stream-readable-resume-hwm.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-resumeScheduled.js b/tests/node_compat/test/parallel/test-stream-readable-resumeScheduled.js index 0163becb8b8c77..2615b662c20f36 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-resumeScheduled.js +++ b/tests/node_compat/test/parallel/test-stream-readable-resumeScheduled.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-setEncoding-existing-buffers.js b/tests/node_compat/test/parallel/test-stream-readable-setEncoding-existing-buffers.js index 79b087dc32095e..2e936cf8baa580 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-setEncoding-existing-buffers.js +++ b/tests/node_compat/test/parallel/test-stream-readable-setEncoding-existing-buffers.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-setEncoding-null.js b/tests/node_compat/test/parallel/test-stream-readable-setEncoding-null.js index f4877aa4becbea..590714c8cb974a 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-setEncoding-null.js +++ b/tests/node_compat/test/parallel/test-stream-readable-setEncoding-null.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-strategy-option.js b/tests/node_compat/test/parallel/test-stream-readable-strategy-option.js new file mode 100644 index 00000000000000..2c8712ee51ac26 --- /dev/null +++ b/tests/node_compat/test/parallel/test-stream-readable-strategy-option.js @@ -0,0 +1,82 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const { Readable } = require('stream'); +const assert = require('assert'); +const { strictEqual } = require('assert'); + +{ + // Strategy 2 + const streamData = ['a', 'b', 'c', null]; + + // Fulfill a Readable object + const readable = new Readable({ + read: common.mustCall(() => { + process.nextTick(() => { + readable.push(streamData.shift()); + }); + }, streamData.length), + }); + + // Use helper to convert it to a Web ReadableStream using ByteLength strategy + const readableStream = Readable.toWeb(readable, { + strategy: new ByteLengthQueuingStrategy({ highWaterMark: 1 }), + }); + + assert(!readableStream.locked); + readableStream.getReader().read().then(common.mustCall()); +} + +{ + // Strategy 2 + const streamData = ['a', 'b', 'c', null]; + + // Fulfill a Readable object + const readable = new Readable({ + read: common.mustCall(() => { + process.nextTick(() => { + readable.push(streamData.shift()); + }); + }, streamData.length), + }); + + // Use helper to convert it to a Web ReadableStream using Count strategy + const readableStream = Readable.toWeb(readable, { + strategy: new CountQueuingStrategy({ highWaterMark: 1 }), + }); + + assert(!readableStream.locked); + readableStream.getReader().read().then(common.mustCall()); +} + +{ + const desireSizeExpected = 2; + + const stringStream = new ReadableStream( + { + start(controller) { + // Check if the strategy is being assigned on the init of the ReadableStream + strictEqual(controller.desiredSize, desireSizeExpected); + controller.enqueue('a'); + controller.enqueue('b'); + controller.close(); + }, + }, + new CountQueuingStrategy({ highWaterMark: desireSizeExpected }) + ); + + const reader = stringStream.getReader(); + + reader.read().then(common.mustCall()); + reader.read().then(common.mustCall()); + reader.read().then(({ value, done }) => { + strictEqual(value, undefined); + strictEqual(done, true); + }); +} diff --git a/tests/node_compat/test/parallel/test-stream-readable-unpipe-resume.js b/tests/node_compat/test/parallel/test-stream-readable-unpipe-resume.js new file mode 100644 index 00000000000000..f8ff846afaebc0 --- /dev/null +++ b/tests/node_compat/test/parallel/test-stream-readable-unpipe-resume.js @@ -0,0 +1,27 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const stream = require('stream'); +const fs = require('fs'); + +const readStream = fs.createReadStream(process.execPath); + +const transformStream = new stream.Transform({ + transform: common.mustCall(() => { + readStream.unpipe(); + readStream.resume(); + }) +}); + +readStream.on('end', common.mustCall()); + +readStream + .pipe(transformStream) + .resume(); diff --git a/tests/node_compat/test/parallel/test-stream-readable-unshift.js b/tests/node_compat/test/parallel/test-stream-readable-unshift.js index 6904c1a581c24c..e7678eea4a7eae 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-unshift.js +++ b/tests/node_compat/test/parallel/test-stream-readable-unshift.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readable-with-unimplemented-_read.js b/tests/node_compat/test/parallel/test-stream-readable-with-unimplemented-_read.js index df45129d0d1078..24ae96af8e6989 100644 --- a/tests/node_compat/test/parallel/test-stream-readable-with-unimplemented-_read.js +++ b/tests/node_compat/test/parallel/test-stream-readable-with-unimplemented-_read.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-readableListening-state.js b/tests/node_compat/test/parallel/test-stream-readableListening-state.js index f53fdee488d0ac..9554387c43e524 100644 --- a/tests/node_compat/test/parallel/test-stream-readableListening-state.js +++ b/tests/node_compat/test/parallel/test-stream-readableListening-state.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-reduce.js b/tests/node_compat/test/parallel/test-stream-reduce.js new file mode 100644 index 00000000000000..e0ec0f26d99596 --- /dev/null +++ b/tests/node_compat/test/parallel/test-stream-reduce.js @@ -0,0 +1,139 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const { + Readable, +} = require('stream'); +const assert = require('assert'); + +function sum(p, c) { + return p + c; +} + +{ + // Does the same thing as `(await stream.toArray()).reduce(...)` + (async () => { + const tests = [ + [[], sum, 0], + [[1], sum, 0], + [[1, 2, 3, 4, 5], sum, 0], + [[...Array(100).keys()], sum, 0], + [['a', 'b', 'c'], sum, ''], + [[1, 2], sum], + [[1, 2, 3], (x, y) => y], + ]; + for (const [values, fn, initial] of tests) { + const streamReduce = await Readable.from(values) + .reduce(fn, initial); + const arrayReduce = values.reduce(fn, initial); + assert.deepStrictEqual(streamReduce, arrayReduce); + } + // Does the same thing as `(await stream.toArray()).reduce(...)` with an + // asynchronous reducer + for (const [values, fn, initial] of tests) { + const streamReduce = await Readable.from(values) + .map(async (x) => x) + .reduce(fn, initial); + const arrayReduce = values.reduce(fn, initial); + assert.deepStrictEqual(streamReduce, arrayReduce); + } + })().then(common.mustCall()); +} +{ + // Works with an async reducer, with or without initial value + (async () => { + const six = await Readable.from([1, 2, 3]).reduce(async (p, c) => p + c, 0); + assert.strictEqual(six, 6); + })().then(common.mustCall()); + (async () => { + const six = await Readable.from([1, 2, 3]).reduce(async (p, c) => p + c); + assert.strictEqual(six, 6); + })().then(common.mustCall()); +} +{ + // Works lazily + assert.rejects(Readable.from([1, 2, 3, 4, 5, 6]) + .map(common.mustCall((x) => { + return x; + }, 3)) // Two consumed and one buffered by `map` due to default concurrency + .reduce(async (p, c) => { + if (p === 1) { + throw new Error('boom'); + } + return c; + }, 0) + , /boom/).then(common.mustCall()); +} + +{ + // Support for AbortSignal + const ac = new AbortController(); + assert.rejects(async () => { + await Readable.from([1, 2, 3]).reduce(async (p, c) => { + if (c === 3) { + await new Promise(() => {}); // Explicitly do not pass signal here + } + return Promise.resolve(); + }, 0, { signal: ac.signal }); + }, { + name: 'AbortError', + }).then(common.mustCall()); + ac.abort(); +} + + +{ + // Support for AbortSignal - pre aborted + const stream = Readable.from([1, 2, 3]); + assert.rejects(async () => { + await stream.reduce(async (p, c) => { + if (c === 3) { + await new Promise(() => {}); // Explicitly do not pass signal here + } + return Promise.resolve(); + }, 0, { signal: AbortSignal.abort() }); + }, { + name: 'AbortError', + }).then(common.mustCall(() => { + assert.strictEqual(stream.destroyed, true); + })); +} + +{ + // Support for AbortSignal - deep + const stream = Readable.from([1, 2, 3]); + assert.rejects(async () => { + await stream.reduce(async (p, c, { signal }) => { + signal.addEventListener('abort', common.mustCall(), { once: true }); + if (c === 3) { + await new Promise(() => {}); // Explicitly do not pass signal here + } + return Promise.resolve(); + }, 0, { signal: AbortSignal.abort() }); + }, { + name: 'AbortError', + }).then(common.mustCall(() => { + assert.strictEqual(stream.destroyed, true); + })); +} + +{ + // Error cases + assert.rejects(() => Readable.from([]).reduce(1), /TypeError/).then(common.mustCall()); + assert.rejects(() => Readable.from([]).reduce('5'), /TypeError/).then(common.mustCall()); + assert.rejects(() => Readable.from([]).reduce((x, y) => x + y, 0, 1), /ERR_INVALID_ARG_TYPE/).then(common.mustCall()); + assert.rejects(() => Readable.from([]).reduce((x, y) => x + y, 0, { signal: true }), /ERR_INVALID_ARG_TYPE/).then(common.mustCall()); +} + +{ + // Test result is a Promise + const result = Readable.from([1, 2, 3, 4, 5]).reduce(sum, 0); + assert.ok(result instanceof Promise); +} diff --git a/tests/node_compat/test/parallel/test-stream-toArray.js b/tests/node_compat/test/parallel/test-stream-toArray.js new file mode 100644 index 00000000000000..514c03112a9c74 --- /dev/null +++ b/tests/node_compat/test/parallel/test-stream-toArray.js @@ -0,0 +1,100 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const { + Readable, +} = require('stream'); +const assert = require('assert'); + +{ + // Works on a synchronous stream + (async () => { + const tests = [ + [], + [1], + [1, 2, 3], + Array(100).fill().map((_, i) => i), + ]; + for (const test of tests) { + const stream = Readable.from(test); + const result = await stream.toArray(); + assert.deepStrictEqual(result, test); + } + })().then(common.mustCall()); +} + +{ + // Works on a non-object-mode stream + (async () => { + const firstBuffer = Buffer.from([1, 2, 3]); + const secondBuffer = Buffer.from([4, 5, 6]); + const stream = Readable.from( + [firstBuffer, secondBuffer], + { objectMode: false }); + const result = await stream.toArray(); + assert.strictEqual(Array.isArray(result), true); + assert.deepStrictEqual(result, [firstBuffer, secondBuffer]); + })().then(common.mustCall()); +} + +{ + // Works on an asynchronous stream + (async () => { + const tests = [ + [], + [1], + [1, 2, 3], + Array(100).fill().map((_, i) => i), + ]; + for (const test of tests) { + const stream = Readable.from(test).map((x) => Promise.resolve(x)); + const result = await stream.toArray(); + assert.deepStrictEqual(result, test); + } + })().then(common.mustCall()); +} + +{ + // Support for AbortSignal + const ac = new AbortController(); + let stream; + assert.rejects(async () => { + stream = Readable.from([1, 2, 3]).map(async (x) => { + if (x === 3) { + await new Promise(() => {}); // Explicitly do not pass signal here + } + return Promise.resolve(x); + }); + await stream.toArray({ signal: ac.signal }); + }, { + name: 'AbortError', + }).then(common.mustCall(() => { + // Only stops toArray, does not destroy the stream + assert(stream.destroyed, false); + })); + ac.abort(); +} +{ + // Test result is a Promise + const result = Readable.from([1, 2, 3, 4, 5]).toArray(); + assert.strictEqual(result instanceof Promise, true); +} +{ + // Error cases + assert.rejects(async () => { + await Readable.from([1]).toArray(1); + }, /ERR_INVALID_ARG_TYPE/).then(common.mustCall()); + + assert.rejects(async () => { + await Readable.from([1]).toArray({ + signal: true + }); + }, /ERR_INVALID_ARG_TYPE/).then(common.mustCall()); +} diff --git a/tests/node_compat/test/parallel/test-stream-toWeb-allows-server-response.js b/tests/node_compat/test/parallel/test-stream-toWeb-allows-server-response.js new file mode 100644 index 00000000000000..656013d89d1c68 --- /dev/null +++ b/tests/node_compat/test/parallel/test-stream-toWeb-allows-server-response.js @@ -0,0 +1,36 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const { Writable } = require('stream'); + +const assert = require('assert'); +const http = require('http'); + +// Check if Writable.toWeb works on the response object after creating a server. +const server = http.createServer( + common.mustCall((req, res) => { + const webStreamResponse = Writable.toWeb(res); + assert.strictEqual(webStreamResponse instanceof WritableStream, true); + res.end(); + }) +); + +server.listen( + 0, + common.mustCall(() => { + http.get( + { + port: server.address().port, + }, + common.mustCall(() => { + server.close(); + }) + ); + }) +); diff --git a/tests/node_compat/test/parallel/test-stream-transform-callback-twice.js b/tests/node_compat/test/parallel/test-stream-transform-callback-twice.js index 57702ef77f2189..47a48c8322b894 100644 --- a/tests/node_compat/test/parallel/test-stream-transform-callback-twice.js +++ b/tests/node_compat/test/parallel/test-stream-transform-callback-twice.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-transform-constructor-set-methods.js b/tests/node_compat/test/parallel/test-stream-transform-constructor-set-methods.js index c0e4f27dc6b261..6c47b2445295c0 100644 --- a/tests/node_compat/test/parallel/test-stream-transform-constructor-set-methods.js +++ b/tests/node_compat/test/parallel/test-stream-transform-constructor-set-methods.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-transform-destroy.js b/tests/node_compat/test/parallel/test-stream-transform-destroy.js index a489da81e872a9..0d29b98ce2421f 100644 --- a/tests/node_compat/test/parallel/test-stream-transform-destroy.js +++ b/tests/node_compat/test/parallel/test-stream-transform-destroy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-transform-final-sync.js b/tests/node_compat/test/parallel/test-stream-transform-final-sync.js index 09294b362dcc9f..5ff0e2177c118a 100644 --- a/tests/node_compat/test/parallel/test-stream-transform-final-sync.js +++ b/tests/node_compat/test/parallel/test-stream-transform-final-sync.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-transform-final.js b/tests/node_compat/test/parallel/test-stream-transform-final.js index 2140363d842162..e2f01188fd22ae 100644 --- a/tests/node_compat/test/parallel/test-stream-transform-final.js +++ b/tests/node_compat/test/parallel/test-stream-transform-final.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-transform-flush-data.js b/tests/node_compat/test/parallel/test-stream-transform-flush-data.js index 5eecaf645dc3e5..33c77475472d2c 100644 --- a/tests/node_compat/test/parallel/test-stream-transform-flush-data.js +++ b/tests/node_compat/test/parallel/test-stream-transform-flush-data.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-transform-hwm0.js b/tests/node_compat/test/parallel/test-stream-transform-hwm0.js new file mode 100644 index 00000000000000..dad67ae4a07b0c --- /dev/null +++ b/tests/node_compat/test/parallel/test-stream-transform-hwm0.js @@ -0,0 +1,35 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const { Transform } = require('stream'); + +const t = new Transform({ + objectMode: true, highWaterMark: 0, + transform(chunk, enc, callback) { + process.nextTick(() => callback(null, chunk, enc)); + } +}); + +assert.strictEqual(t.write(1), false); +t.on('drain', common.mustCall(() => { + assert.strictEqual(t.write(2), false); + t.end(); +})); + +t.once('readable', common.mustCall(() => { + assert.strictEqual(t.read(), 1); + setImmediate(common.mustCall(() => { + assert.strictEqual(t.read(), null); + t.once('readable', common.mustCall(() => { + assert.strictEqual(t.read(), 2); + })); + })); +})); diff --git a/tests/node_compat/test/parallel/test-stream-transform-objectmode-falsey-value.js b/tests/node_compat/test/parallel/test-stream-transform-objectmode-falsey-value.js index 5481f70e99df6f..571fa74d18e996 100644 --- a/tests/node_compat/test/parallel/test-stream-transform-objectmode-falsey-value.js +++ b/tests/node_compat/test/parallel/test-stream-transform-objectmode-falsey-value.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-transform-split-highwatermark.js b/tests/node_compat/test/parallel/test-stream-transform-split-highwatermark.js index dddae4aa2916ce..a4117cc9139a07 100644 --- a/tests/node_compat/test/parallel/test-stream-transform-split-highwatermark.js +++ b/tests/node_compat/test/parallel/test-stream-transform-split-highwatermark.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-transform-split-objectmode.js b/tests/node_compat/test/parallel/test-stream-transform-split-objectmode.js index f3400488a1aef4..66d302371d53b4 100644 --- a/tests/node_compat/test/parallel/test-stream-transform-split-objectmode.js +++ b/tests/node_compat/test/parallel/test-stream-transform-split-objectmode.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-uint8array.js b/tests/node_compat/test/parallel/test-stream-uint8array.js index aa8dbd3d821be7..8820b4f79c885f 100644 --- a/tests/node_compat/test/parallel/test-stream-uint8array.js +++ b/tests/node_compat/test/parallel/test-stream-uint8array.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-unpipe-event.js b/tests/node_compat/test/parallel/test-stream-unpipe-event.js index 0f7bcdb69d6e94..31cedc514cf3f4 100644 --- a/tests/node_compat/test/parallel/test-stream-unpipe-event.js +++ b/tests/node_compat/test/parallel/test-stream-unpipe-event.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-unshift-empty-chunk.js b/tests/node_compat/test/parallel/test-stream-unshift-empty-chunk.js index 0e8337f4c3828e..e9d8ab81a6c904 100644 --- a/tests/node_compat/test/parallel/test-stream-unshift-empty-chunk.js +++ b/tests/node_compat/test/parallel/test-stream-unshift-empty-chunk.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-unshift-read-race.js b/tests/node_compat/test/parallel/test-stream-unshift-read-race.js index 6f400a321ae657..771e3f98acbd80 100644 --- a/tests/node_compat/test/parallel/test-stream-unshift-read-race.js +++ b/tests/node_compat/test/parallel/test-stream-unshift-read-race.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-writable-aborted.js b/tests/node_compat/test/parallel/test-stream-writable-aborted.js index 89dbcc4ee2fb2d..55daa9f213db17 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-aborted.js +++ b/tests/node_compat/test/parallel/test-stream-writable-aborted.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-change-default-encoding.js b/tests/node_compat/test/parallel/test-stream-writable-change-default-encoding.js index 355cb4d6d90aec..555e1924dcff47 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-change-default-encoding.js +++ b/tests/node_compat/test/parallel/test-stream-writable-change-default-encoding.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-writable-clear-buffer.js b/tests/node_compat/test/parallel/test-stream-writable-clear-buffer.js index 58e0ae5dff8eee..3d80c8723463e8 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-clear-buffer.js +++ b/tests/node_compat/test/parallel/test-stream-writable-clear-buffer.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-constructor-set-methods.js b/tests/node_compat/test/parallel/test-stream-writable-constructor-set-methods.js index ca9e1a1d293c38..c1dda3adc5fd9e 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-constructor-set-methods.js +++ b/tests/node_compat/test/parallel/test-stream-writable-constructor-set-methods.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-decoded-encoding.js b/tests/node_compat/test/parallel/test-stream-writable-decoded-encoding.js index d6c77c9a7002cb..d488408262ac94 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-decoded-encoding.js +++ b/tests/node_compat/test/parallel/test-stream-writable-decoded-encoding.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream-writable-destroy.js b/tests/node_compat/test/parallel/test-stream-writable-destroy.js index ac47bb5bc7157a..6684a581ac0faf 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-destroy.js +++ b/tests/node_compat/test/parallel/test-stream-writable-destroy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-end-cb-error.js b/tests/node_compat/test/parallel/test-stream-writable-end-cb-error.js index ecb597f159998b..3d15d8700d4dc1 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-end-cb-error.js +++ b/tests/node_compat/test/parallel/test-stream-writable-end-cb-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-end-cb-uncaught.js b/tests/node_compat/test/parallel/test-stream-writable-end-cb-uncaught.js new file mode 100644 index 00000000000000..40ef4e274c314c --- /dev/null +++ b/tests/node_compat/test/parallel/test-stream-writable-end-cb-uncaught.js @@ -0,0 +1,31 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const stream = require('stream'); + +process.on('uncaughtException', common.mustCall((err) => { + assert.strictEqual(err.message, 'kaboom'); +})); + +const writable = new stream.Writable(); +const _err = new Error('kaboom'); + +writable._write = (chunk, encoding, cb) => { + cb(); +}; +writable._final = (cb) => { + cb(_err); +}; + +writable.write('asd'); +writable.end(common.mustCall((err) => { + assert.strictEqual(err, _err); +})); diff --git a/tests/node_compat/test/parallel/test-stream-writable-end-multiple.js b/tests/node_compat/test/parallel/test-stream-writable-end-multiple.js index edce899e3afba5..999f1402daea05 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-end-multiple.js +++ b/tests/node_compat/test/parallel/test-stream-writable-end-multiple.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-ended-state.js b/tests/node_compat/test/parallel/test-stream-writable-ended-state.js index 57c578037c779d..369fb9b16d8e03 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-ended-state.js +++ b/tests/node_compat/test/parallel/test-stream-writable-ended-state.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-final-async.js b/tests/node_compat/test/parallel/test-stream-writable-final-async.js index c8fe2057b591d1..139471f980402e 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-final-async.js +++ b/tests/node_compat/test/parallel/test-stream-writable-final-async.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-final-destroy.js b/tests/node_compat/test/parallel/test-stream-writable-final-destroy.js index 958a36bfdf64ea..30868200f104e4 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-final-destroy.js +++ b/tests/node_compat/test/parallel/test-stream-writable-final-destroy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-final-throw.js b/tests/node_compat/test/parallel/test-stream-writable-final-throw.js index ba7f87b238d17f..f0ec090b779087 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-final-throw.js +++ b/tests/node_compat/test/parallel/test-stream-writable-final-throw.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-finish-destroyed.js b/tests/node_compat/test/parallel/test-stream-writable-finish-destroyed.js index 1f5617a34f388a..8ce5d29a9cff08 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-finish-destroyed.js +++ b/tests/node_compat/test/parallel/test-stream-writable-finish-destroyed.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-finished-state.js b/tests/node_compat/test/parallel/test-stream-writable-finished-state.js index 23f84187b91e56..b46b760e8b0e20 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-finished-state.js +++ b/tests/node_compat/test/parallel/test-stream-writable-finished-state.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-finished.js b/tests/node_compat/test/parallel/test-stream-writable-finished.js index 61c363b7e61f2a..07b54233b82868 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-finished.js +++ b/tests/node_compat/test/parallel/test-stream-writable-finished.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-invalid-chunk.js b/tests/node_compat/test/parallel/test-stream-writable-invalid-chunk.js index 68760d2c761f4c..b9e90c33784c2c 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-invalid-chunk.js +++ b/tests/node_compat/test/parallel/test-stream-writable-invalid-chunk.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-needdrain-state.js b/tests/node_compat/test/parallel/test-stream-writable-needdrain-state.js index 31c3ba79e7f5ae..b456de29531d2f 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-needdrain-state.js +++ b/tests/node_compat/test/parallel/test-stream-writable-needdrain-state.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-null.js b/tests/node_compat/test/parallel/test-stream-writable-null.js index 467efc005c6aab..57f2188c1e7255 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-null.js +++ b/tests/node_compat/test/parallel/test-stream-writable-null.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-properties.js b/tests/node_compat/test/parallel/test-stream-writable-properties.js index 28a7c2f71d44b0..b7283383a1b2fd 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-properties.js +++ b/tests/node_compat/test/parallel/test-stream-writable-properties.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-writable.js b/tests/node_compat/test/parallel/test-stream-writable-writable.js index 0729e6a381a6b1..274e6872a04937 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-writable.js +++ b/tests/node_compat/test/parallel/test-stream-writable-writable.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-write-cb-error.js b/tests/node_compat/test/parallel/test-stream-writable-write-cb-error.js index cb68a6ee33de34..c4efbd2ddbd385 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-write-cb-error.js +++ b/tests/node_compat/test/parallel/test-stream-writable-write-cb-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-write-cb-twice.js b/tests/node_compat/test/parallel/test-stream-writable-write-cb-twice.js index 696532c2ff85e4..f862ecf0eacbe2 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-write-cb-twice.js +++ b/tests/node_compat/test/parallel/test-stream-writable-write-cb-twice.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-write-error.js b/tests/node_compat/test/parallel/test-stream-writable-write-error.js index a98d9ff8afb660..2013a68fab84d1 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-write-error.js +++ b/tests/node_compat/test/parallel/test-stream-writable-write-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writable-write-writev-finish.js b/tests/node_compat/test/parallel/test-stream-writable-write-writev-finish.js index 3370040e5ec7e4..d32dfae6ed5b85 100644 --- a/tests/node_compat/test/parallel/test-stream-writable-write-writev-finish.js +++ b/tests/node_compat/test/parallel/test-stream-writable-write-writev-finish.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writableState-ending.js b/tests/node_compat/test/parallel/test-stream-writableState-ending.js index 6533f0b83112c7..ebb1146ce2d60d 100644 --- a/tests/node_compat/test/parallel/test-stream-writableState-ending.js +++ b/tests/node_compat/test/parallel/test-stream-writableState-ending.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writableState-uncorked-bufferedRequestCount.js b/tests/node_compat/test/parallel/test-stream-writableState-uncorked-bufferedRequestCount.js index fe505ccf78df86..f0a246ac134922 100644 --- a/tests/node_compat/test/parallel/test-stream-writableState-uncorked-bufferedRequestCount.js +++ b/tests/node_compat/test/parallel/test-stream-writableState-uncorked-bufferedRequestCount.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-write-destroy.js b/tests/node_compat/test/parallel/test-stream-write-destroy.js index 6cd1fb49d5ec1c..ee03edb483d68e 100644 --- a/tests/node_compat/test/parallel/test-stream-write-destroy.js +++ b/tests/node_compat/test/parallel/test-stream-write-destroy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-write-drain.js b/tests/node_compat/test/parallel/test-stream-write-drain.js index ae1494fa17ba97..c23f33e188221e 100644 --- a/tests/node_compat/test/parallel/test-stream-write-drain.js +++ b/tests/node_compat/test/parallel/test-stream-write-drain.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-write-final.js b/tests/node_compat/test/parallel/test-stream-write-final.js index b5b1b7a222ec97..2466da0f9943c9 100644 --- a/tests/node_compat/test/parallel/test-stream-write-final.js +++ b/tests/node_compat/test/parallel/test-stream-write-final.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream-writev.js b/tests/node_compat/test/parallel/test-stream-writev.js index f012515c8c26bb..db6031897b368c 100644 --- a/tests/node_compat/test/parallel/test-stream-writev.js +++ b/tests/node_compat/test/parallel/test-stream-writev.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-base64-single-char-read-end.js b/tests/node_compat/test/parallel/test-stream2-base64-single-char-read-end.js index 8c9f17600a6624..d59d56ec2a9268 100644 --- a/tests/node_compat/test/parallel/test-stream2-base64-single-char-read-end.js +++ b/tests/node_compat/test/parallel/test-stream2-base64-single-char-read-end.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-basic.js b/tests/node_compat/test/parallel/test-stream2-basic.js index 04eecd18eb8020..07942ca300d043 100644 --- a/tests/node_compat/test/parallel/test-stream2-basic.js +++ b/tests/node_compat/test/parallel/test-stream2-basic.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-compatibility.js b/tests/node_compat/test/parallel/test-stream2-compatibility.js index 3f5293a808565b..4b3eb67e79c94b 100644 --- a/tests/node_compat/test/parallel/test-stream2-compatibility.js +++ b/tests/node_compat/test/parallel/test-stream2-compatibility.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-decode-partial.js b/tests/node_compat/test/parallel/test-stream2-decode-partial.js index 8566e8cce67421..9143ea73c3fc71 100644 --- a/tests/node_compat/test/parallel/test-stream2-decode-partial.js +++ b/tests/node_compat/test/parallel/test-stream2-decode-partial.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream2-finish-pipe-error.js b/tests/node_compat/test/parallel/test-stream2-finish-pipe-error.js new file mode 100644 index 00000000000000..3a0b820b4d7cff --- /dev/null +++ b/tests/node_compat/test/parallel/test-stream2-finish-pipe-error.js @@ -0,0 +1,27 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const stream = require('stream'); + +process.on('uncaughtException', common.mustCall()); + +const r = new stream.Readable(); +r._read = function(size) { + r.push(Buffer.allocUnsafe(size)); +}; + +const w = new stream.Writable(); +w._write = function(data, encoding, cb) { + cb(null); +}; + +r.pipe(w); + +// end() after pipe should cause unhandled exception +w.end(); diff --git a/tests/node_compat/test/parallel/test-stream2-finish-pipe.js b/tests/node_compat/test/parallel/test-stream2-finish-pipe.js index 2cd70c62e1958c..22f17a43558dc9 100644 --- a/tests/node_compat/test/parallel/test-stream2-finish-pipe.js +++ b/tests/node_compat/test/parallel/test-stream2-finish-pipe.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-large-read-stall.js b/tests/node_compat/test/parallel/test-stream2-large-read-stall.js index 37f2f68ec79f25..aeefcf21a292fe 100644 --- a/tests/node_compat/test/parallel/test-stream2-large-read-stall.js +++ b/tests/node_compat/test/parallel/test-stream2-large-read-stall.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-objects.js b/tests/node_compat/test/parallel/test-stream2-objects.js index f6bc8b829546a1..68340e0e54ed4c 100644 --- a/tests/node_compat/test/parallel/test-stream2-objects.js +++ b/tests/node_compat/test/parallel/test-stream2-objects.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-pipe-error-handling.js b/tests/node_compat/test/parallel/test-stream2-pipe-error-handling.js index 18e9864c0b3e90..1591f6f4e900bd 100644 --- a/tests/node_compat/test/parallel/test-stream2-pipe-error-handling.js +++ b/tests/node_compat/test/parallel/test-stream2-pipe-error-handling.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-pipe-error-once-listener.js b/tests/node_compat/test/parallel/test-stream2-pipe-error-once-listener.js index 62fafc5b97023f..b9d67cd75ec1fa 100644 --- a/tests/node_compat/test/parallel/test-stream2-pipe-error-once-listener.js +++ b/tests/node_compat/test/parallel/test-stream2-pipe-error-once-listener.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-push.js b/tests/node_compat/test/parallel/test-stream2-push.js index 4d49d62776beea..4cb54a01fd0715 100644 --- a/tests/node_compat/test/parallel/test-stream2-push.js +++ b/tests/node_compat/test/parallel/test-stream2-push.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-read-sync-stack.js b/tests/node_compat/test/parallel/test-stream2-read-sync-stack.js index a5d6eb82cabdcd..0aa654c70d7f55 100644 --- a/tests/node_compat/test/parallel/test-stream2-read-sync-stack.js +++ b/tests/node_compat/test/parallel/test-stream2-read-sync-stack.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-readable-empty-buffer-no-eof.js b/tests/node_compat/test/parallel/test-stream2-readable-empty-buffer-no-eof.js index 772f525555d607..806f958d8e01d5 100644 --- a/tests/node_compat/test/parallel/test-stream2-readable-empty-buffer-no-eof.js +++ b/tests/node_compat/test/parallel/test-stream2-readable-empty-buffer-no-eof.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-readable-legacy-drain.js b/tests/node_compat/test/parallel/test-stream2-readable-legacy-drain.js index 43a1b6616e4dc4..8c3de539880ec1 100644 --- a/tests/node_compat/test/parallel/test-stream2-readable-legacy-drain.js +++ b/tests/node_compat/test/parallel/test-stream2-readable-legacy-drain.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-readable-non-empty-end.js b/tests/node_compat/test/parallel/test-stream2-readable-non-empty-end.js index 0446be665c6094..be14a8983a3d95 100644 --- a/tests/node_compat/test/parallel/test-stream2-readable-non-empty-end.js +++ b/tests/node_compat/test/parallel/test-stream2-readable-non-empty-end.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-readable-wrap-destroy.js b/tests/node_compat/test/parallel/test-stream2-readable-wrap-destroy.js index 08973898d63a08..6c24765e0d764f 100644 --- a/tests/node_compat/test/parallel/test-stream2-readable-wrap-destroy.js +++ b/tests/node_compat/test/parallel/test-stream2-readable-wrap-destroy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream2-readable-wrap-empty.js b/tests/node_compat/test/parallel/test-stream2-readable-wrap-empty.js index 6bf52923c07f76..eeb2d79ac42102 100644 --- a/tests/node_compat/test/parallel/test-stream2-readable-wrap-empty.js +++ b/tests/node_compat/test/parallel/test-stream2-readable-wrap-empty.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-readable-wrap-error.js b/tests/node_compat/test/parallel/test-stream2-readable-wrap-error.js index ad11369f08e57c..56d80b54a6b020 100644 --- a/tests/node_compat/test/parallel/test-stream2-readable-wrap-error.js +++ b/tests/node_compat/test/parallel/test-stream2-readable-wrap-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream2-readable-wrap.js b/tests/node_compat/test/parallel/test-stream2-readable-wrap.js index 65851afb6cde7d..07e4569eb54c54 100644 --- a/tests/node_compat/test/parallel/test-stream2-readable-wrap.js +++ b/tests/node_compat/test/parallel/test-stream2-readable-wrap.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-set-encoding.js b/tests/node_compat/test/parallel/test-stream2-set-encoding.js index 9f07d52e6d810e..3304f0ec47ecd5 100644 --- a/tests/node_compat/test/parallel/test-stream2-set-encoding.js +++ b/tests/node_compat/test/parallel/test-stream2-set-encoding.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-transform.js b/tests/node_compat/test/parallel/test-stream2-transform.js index 4547f9c8f29122..ebca5d33f31ace 100644 --- a/tests/node_compat/test/parallel/test-stream2-transform.js +++ b/tests/node_compat/test/parallel/test-stream2-transform.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-unpipe-drain.js b/tests/node_compat/test/parallel/test-stream2-unpipe-drain.js index be3023efb3df64..2e7eb2713fd573 100644 --- a/tests/node_compat/test/parallel/test-stream2-unpipe-drain.js +++ b/tests/node_compat/test/parallel/test-stream2-unpipe-drain.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-unpipe-leak.js b/tests/node_compat/test/parallel/test-stream2-unpipe-leak.js index a6742f999d3d8e..d9b42ad9a86026 100644 --- a/tests/node_compat/test/parallel/test-stream2-unpipe-leak.js +++ b/tests/node_compat/test/parallel/test-stream2-unpipe-leak.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream2-writable.js b/tests/node_compat/test/parallel/test-stream2-writable.js index 4f5ba53fce5f3d..0145257a33de24 100644 --- a/tests/node_compat/test/parallel/test-stream2-writable.js +++ b/tests/node_compat/test/parallel/test-stream2-writable.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream3-cork-end.js b/tests/node_compat/test/parallel/test-stream3-cork-end.js index 0ae661953ace91..5453a56169e4ac 100644 --- a/tests/node_compat/test/parallel/test-stream3-cork-end.js +++ b/tests/node_compat/test/parallel/test-stream3-cork-end.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream3-cork-uncork.js b/tests/node_compat/test/parallel/test-stream3-cork-uncork.js index fbb50d6aa2978c..4b0ae805354a37 100644 --- a/tests/node_compat/test/parallel/test-stream3-cork-uncork.js +++ b/tests/node_compat/test/parallel/test-stream3-cork-uncork.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-stream3-pause-then-read.js b/tests/node_compat/test/parallel/test-stream3-pause-then-read.js index 0c22e81f8e5626..2a3bdf4bf0d76e 100644 --- a/tests/node_compat/test/parallel/test-stream3-pause-then-read.js +++ b/tests/node_compat/test/parallel/test-stream3-pause-then-read.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stream3-pipeline-async-iterator.js b/tests/node_compat/test/parallel/test-stream3-pipeline-async-iterator.js new file mode 100644 index 00000000000000..6b22012769286a --- /dev/null +++ b/tests/node_compat/test/parallel/test-stream3-pipeline-async-iterator.js @@ -0,0 +1,34 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +/* eslint-disable node-core/require-common-first, require-yield */ +'use strict'; +const { pipeline } = require('node:stream/promises'); +{ + // Ensure that async iterators can act as readable and writable streams + async function* myCustomReadable() { + yield 'Hello'; + yield 'World'; + } + + const messages = []; + async function* myCustomWritable(stream) { + for await (const chunk of stream) { + messages.push(chunk); + } + } + + (async () => { + await pipeline( + myCustomReadable, + myCustomWritable, + ); + // Importing here to avoid initializing streams + require('assert').deepStrictEqual(messages, ['Hello', 'World']); + })() + .then(require('../common').mustCall()); +} diff --git a/tests/node_compat/test/parallel/test-streams-highwatermark.js b/tests/node_compat/test/parallel/test-streams-highwatermark.js index 3498e4296b7fed..451311c2c53475 100644 --- a/tests/node_compat/test/parallel/test-streams-highwatermark.js +++ b/tests/node_compat/test/parallel/test-streams-highwatermark.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-string-decoder.js b/tests/node_compat/test/parallel/test-string-decoder.js index 779e5fc1e1e679..ee7b40d855065c 100644 --- a/tests/node_compat/test/parallel/test-string-decoder.js +++ b/tests/node_compat/test/parallel/test-string-decoder.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-stringbytes-external.js b/tests/node_compat/test/parallel/test-stringbytes-external.js new file mode 100644 index 00000000000000..78f3c8608f4e16 --- /dev/null +++ b/tests/node_compat/test/parallel/test-stringbytes-external.js @@ -0,0 +1,150 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); +// Minimum string size to overflow into external string space +const EXTERN_APEX = 0xFBEE9; + +// Manually controlled string for checking binary output +let ucs2_control = 'a\u0000'; +let write_str = 'a'; + + +// First do basic checks +let b = Buffer.from(write_str, 'ucs2'); +// first check latin1 +let c = b.toString('latin1'); +assert.strictEqual(b[0], 0x61); +assert.strictEqual(b[1], 0); +assert.strictEqual(ucs2_control, c); +// now check binary +c = b.toString('binary'); +assert.strictEqual(b[0], 0x61); +assert.strictEqual(b[1], 0); +assert.strictEqual(ucs2_control, c); + +// Now create big strings +const size = 1 << 20; +write_str = write_str.repeat(size); +ucs2_control = ucs2_control.repeat(size); + +// Check resultant buffer and output string +b = Buffer.from(write_str, 'ucs2'); +// Check fist Buffer created from write string +for (let i = 0; i < b.length; i += 2) { + assert.strictEqual(b[i], 0x61); + assert.strictEqual(b[i + 1], 0); +} + +// Create another string to create an external string +const b_ucs = b.toString('ucs2'); + +// Check control against external binary string +const l_bin = b.toString('latin1'); +assert.strictEqual(ucs2_control, l_bin); + +// Check control against external binary string +const b_bin = b.toString('binary'); +assert.strictEqual(ucs2_control, b_bin); + +// Create buffer copy from external +const c_bin = Buffer.from(l_bin, 'latin1'); +const c_ucs = Buffer.from(b_ucs, 'ucs2'); +// Make sure they're the same length +assert.strictEqual(c_bin.length, c_ucs.length); +// Make sure Buffers from externals are the same +for (let i = 0; i < c_bin.length; i++) { + assert.strictEqual(c_bin[i], c_ucs[i]); +} +// Check resultant strings +assert.strictEqual(c_bin.toString('ucs2'), c_ucs.toString('ucs2')); +assert.strictEqual(c_bin.toString('latin1'), ucs2_control); +assert.strictEqual(c_ucs.toString('latin1'), ucs2_control); + + +// Now let's test BASE64 and HEX encoding/decoding +const RADIOS = 2; +const PRE_HALF_APEX = Math.ceil(EXTERN_APEX / 2) - RADIOS; +const PRE_3OF4_APEX = Math.ceil((EXTERN_APEX / 4) * 3) - RADIOS; + +{ + for (let j = 0; j < RADIOS * 2; j += 1) { + const datum = b; + const slice = datum.slice(0, PRE_HALF_APEX + j); + const slice2 = datum.slice(0, PRE_HALF_APEX + j + 2); + const pumped_string = slice.toString('hex'); + const pumped_string2 = slice2.toString('hex'); + const decoded = Buffer.from(pumped_string, 'hex'); + + // The string are the same? + for (let k = 0; k < pumped_string.length; ++k) { + assert.strictEqual(pumped_string[k], pumped_string2[k]); + } + + // The recoded buffer is the same? + for (let i = 0; i < decoded.length; ++i) { + assert.strictEqual(datum[i], decoded[i]); + } + } +} + +{ + for (let j = 0; j < RADIOS * 2; j += 1) { + const datum = b; + const slice = datum.slice(0, PRE_3OF4_APEX + j); + const slice2 = datum.slice(0, PRE_3OF4_APEX + j + 2); + const pumped_string = slice.toString('base64'); + const pumped_string2 = slice2.toString('base64'); + const decoded = Buffer.from(pumped_string, 'base64'); + + // The string are the same? + for (let k = 0; k < pumped_string.length - 3; ++k) { + assert.strictEqual(pumped_string[k], pumped_string2[k]); + } + + // The recoded buffer is the same? + for (let i = 0; i < decoded.length; ++i) { + assert.strictEqual(datum[i], decoded[i]); + } + } +} + +// https://github.com/nodejs/node/issues/1024 +{ + const a = 'x'.repeat(1 << 20 - 1); + const b = Buffer.from(a, 'ucs2').toString('ucs2'); + const c = Buffer.from(b, 'utf8').toString('utf8'); + + assert.strictEqual(a.length, b.length); + assert.strictEqual(b.length, c.length); + + assert.strictEqual(a, b); + assert.strictEqual(b, c); +} diff --git a/tests/node_compat/test/parallel/test-sync-fileread.js b/tests/node_compat/test/parallel/test-sync-fileread.js new file mode 100644 index 00000000000000..5d7633986737c3 --- /dev/null +++ b/tests/node_compat/test/parallel/test-sync-fileread.js @@ -0,0 +1,14 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); +const assert = require('assert'); +const fs = require('fs'); +const fixtures = require('../common/fixtures'); + +assert.strictEqual(fs.readFileSync(fixtures.path('x.txt')).toString(), 'xyz\n'); diff --git a/tests/node_compat/test/parallel/test-sys.js b/tests/node_compat/test/parallel/test-sys.js new file mode 100644 index 00000000000000..284d622ba454e7 --- /dev/null +++ b/tests/node_compat/test/parallel/test-sys.js @@ -0,0 +1,35 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); +const sys = require('sys'); // eslint-disable-line no-restricted-modules +const util = require('util'); + +assert.strictEqual(sys, util); diff --git a/tests/node_compat/test/parallel/test-tick-processor-arguments.js b/tests/node_compat/test/parallel/test-tick-processor-arguments.js new file mode 100644 index 00000000000000..3ece0fe78db73f --- /dev/null +++ b/tests/node_compat/test/parallel/test-tick-processor-arguments.js @@ -0,0 +1,39 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const tmpdir = require('../common/tmpdir'); +const fs = require('fs'); +const assert = require('assert'); +const { spawnSync } = require('child_process'); + +if (!common.enoughTestMem) + common.skip('skipped due to memory requirements'); +if (common.isAIX) + common.skip('does not work on AIX'); + +tmpdir.refresh(); + +// Generate log file. +spawnSync(process.execPath, [ '--prof', '-p', '42' ], { cwd: tmpdir.path }); + +const files = fs.readdirSync(tmpdir.path); +const logfile = files.filter((name) => /\.log$/.test(name))[0]; +assert(logfile); + +// Make sure that the --preprocess argument is passed through correctly, +// as an example flag listed in deps/v8/tools/tickprocessor.js. +// Any of the other flags there should work for this test too, if --preprocess +// is ever removed. +const { stdout } = spawnSync( + process.execPath, + [ '--prof-process', '--preprocess', logfile ], + { cwd: tmpdir.path, encoding: 'utf8', maxBuffer: Infinity }); + +// Make sure that the result is valid JSON. +JSON.parse(stdout); diff --git a/tests/node_compat/test/parallel/test-timers-api-refs.js b/tests/node_compat/test/parallel/test-timers-api-refs.js index ac5bad9bdf0d69..ccbe58eafa216f 100644 --- a/tests/node_compat/test/parallel/test-timers-api-refs.js +++ b/tests/node_compat/test/parallel/test-timers-api-refs.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-timers-args.js b/tests/node_compat/test/parallel/test-timers-args.js index a7f25609bbf706..c987830e22fe85 100644 --- a/tests/node_compat/test/parallel/test-timers-args.js +++ b/tests/node_compat/test/parallel/test-timers-args.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-timers-clear-null-does-not-throw-error.js b/tests/node_compat/test/parallel/test-timers-clear-null-does-not-throw-error.js index 01ef84df38eecb..102f04a1e6e238 100644 --- a/tests/node_compat/test/parallel/test-timers-clear-null-does-not-throw-error.js +++ b/tests/node_compat/test/parallel/test-timers-clear-null-does-not-throw-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-timers-clear-object-does-not-throw-error.js b/tests/node_compat/test/parallel/test-timers-clear-object-does-not-throw-error.js index 73cd918f16ce48..89a3cc696e2fb3 100644 --- a/tests/node_compat/test/parallel/test-timers-clear-object-does-not-throw-error.js +++ b/tests/node_compat/test/parallel/test-timers-clear-object-does-not-throw-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-timers-clear-timeout-interval-equivalent.js b/tests/node_compat/test/parallel/test-timers-clear-timeout-interval-equivalent.js index c4d1e3fd8337a3..4de5b8a2187c68 100644 --- a/tests/node_compat/test/parallel/test-timers-clear-timeout-interval-equivalent.js +++ b/tests/node_compat/test/parallel/test-timers-clear-timeout-interval-equivalent.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-timers-clearImmediate-als.js b/tests/node_compat/test/parallel/test-timers-clearImmediate-als.js new file mode 100644 index 00000000000000..b9a7d9a4d7eb9d --- /dev/null +++ b/tests/node_compat/test/parallel/test-timers-clearImmediate-als.js @@ -0,0 +1,35 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const { AsyncLocalStorage } = require('async_hooks'); + +// This is an asynclocalstorage variant of test-timers-clearImmediate.js +const asyncLocalStorage = new AsyncLocalStorage(); +const N = 3; + +function next() { + const fn = common.mustCall(onImmediate); + asyncLocalStorage.run(new Map(), common.mustCall(() => { + const immediate = setImmediate(fn); + const store = asyncLocalStorage.getStore(); + store.set('immediate', immediate); + })); +} + +function onImmediate() { + const store = asyncLocalStorage.getStore(); + const immediate = store.get('immediate'); + assert.strictEqual(immediate.constructor.name, 'Immediate'); + clearImmediate(immediate); +} + +for (let i = 0; i < N; i++) { + next(); +} diff --git a/tests/node_compat/test/parallel/test-timers-clearImmediate.js b/tests/node_compat/test/parallel/test-timers-clearImmediate.js index 8460d73c9dde37..60dfeba4b93d5c 100644 --- a/tests/node_compat/test/parallel/test-timers-clearImmediate.js +++ b/tests/node_compat/test/parallel/test-timers-clearImmediate.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-timers-immediate-queue.js b/tests/node_compat/test/parallel/test-timers-immediate-queue.js new file mode 100644 index 00000000000000..9a025624f3b93a --- /dev/null +++ b/tests/node_compat/test/parallel/test-timers-immediate-queue.js @@ -0,0 +1,64 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); + +// setImmediate should run clear its queued cbs once per event loop turn +// but immediates queued while processing the current queue should happen +// on the next turn of the event loop. + +// hit should be the exact same size of QUEUE, if we're letting things +// recursively add to the immediate QUEUE hit will be > QUEUE + +let ticked = false; + +let hit = 0; +const QUEUE = 10; + +function run() { + if (hit === 0) { + setTimeout(() => { ticked = true; }, 1); + const now = Date.now(); + while (Date.now() - now < 2); + } + + if (ticked) return; + + hit += 1; + setImmediate(run); +} + +for (let i = 0; i < QUEUE; i++) + setImmediate(run); + +process.on('exit', function() { + console.log('hit', hit); + assert.strictEqual(hit, QUEUE); +}); diff --git a/tests/node_compat/test/parallel/test-timers-immediate.js b/tests/node_compat/test/parallel/test-timers-immediate.js new file mode 100644 index 00000000000000..847901146c156b --- /dev/null +++ b/tests/node_compat/test/parallel/test-timers-immediate.js @@ -0,0 +1,50 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); + +let mainFinished = false; + +setImmediate(common.mustCall(function() { + assert.strictEqual(mainFinished, true); + clearImmediate(immediateB); +})); + +const immediateB = setImmediate(common.mustNotCall()); + +setImmediate(common.mustCall((...args) => { + assert.deepStrictEqual(args, [1, 2, 3]); +}), 1, 2, 3); + +setImmediate(common.mustCall((...args) => { + assert.deepStrictEqual(args, [1, 2, 3, 4, 5]); +}), 1, 2, 3, 4, 5); + +mainFinished = true; diff --git a/tests/node_compat/test/parallel/test-timers-interval-throw.js b/tests/node_compat/test/parallel/test-timers-interval-throw.js index 5ad1156773b60d..1411e10155f578 100644 --- a/tests/node_compat/test/parallel/test-timers-interval-throw.js +++ b/tests/node_compat/test/parallel/test-timers-interval-throw.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-timers-non-integer-delay.js b/tests/node_compat/test/parallel/test-timers-non-integer-delay.js index b9371d81b860ba..8cc292a98d26d7 100644 --- a/tests/node_compat/test/parallel/test-timers-non-integer-delay.js +++ b/tests/node_compat/test/parallel/test-timers-non-integer-delay.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-timers-refresh-in-callback.js b/tests/node_compat/test/parallel/test-timers-refresh-in-callback.js new file mode 100644 index 00000000000000..8267eff10cf2be --- /dev/null +++ b/tests/node_compat/test/parallel/test-timers-refresh-in-callback.js @@ -0,0 +1,21 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); + +// This test checks whether a refresh called inside the callback will keep +// the event loop alive to run the timer again. + +let didCall = false; +const timer = setTimeout(common.mustCall(() => { + if (!didCall) { + didCall = true; + timer.refresh(); + } +}, 2), 1); diff --git a/tests/node_compat/test/parallel/test-timers-refresh.js b/tests/node_compat/test/parallel/test-timers-refresh.js index 80e78b56a5517a..8a5d95a4e6be3b 100644 --- a/tests/node_compat/test/parallel/test-timers-refresh.js +++ b/tests/node_compat/test/parallel/test-timers-refresh.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --expose-internals diff --git a/tests/node_compat/test/parallel/test-timers-same-timeout-wrong-list-deleted.js b/tests/node_compat/test/parallel/test-timers-same-timeout-wrong-list-deleted.js index c8b0021e3ce5e2..358f4a38f829d7 100644 --- a/tests/node_compat/test/parallel/test-timers-same-timeout-wrong-list-deleted.js +++ b/tests/node_compat/test/parallel/test-timers-same-timeout-wrong-list-deleted.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-timers-setimmediate-infinite-loop.js b/tests/node_compat/test/parallel/test-timers-setimmediate-infinite-loop.js new file mode 100644 index 00000000000000..bf269db64f90cd --- /dev/null +++ b/tests/node_compat/test/parallel/test-timers-setimmediate-infinite-loop.js @@ -0,0 +1,26 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); + +// This test ensures that if an Immediate callback clears subsequent +// immediates we don't get stuck in an infinite loop. +// +// If the process does get stuck, it will be timed out by the test +// runner. +// +// Ref: https://github.com/nodejs/node/issues/9756 + +setImmediate(common.mustCall(function() { + clearImmediate(i2); + clearImmediate(i3); +})); + +const i2 = setImmediate(common.mustNotCall()); + +const i3 = setImmediate(common.mustNotCall()); diff --git a/tests/node_compat/test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js b/tests/node_compat/test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js new file mode 100644 index 00000000000000..80658b4d6784e6 --- /dev/null +++ b/tests/node_compat/test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js @@ -0,0 +1,50 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +// Regression test for https://github.com/nodejs/node-v0.x-archive/issues/8897. + +const common = require('../common'); +const net = require('net'); +const Countdown = require('../common/countdown'); + +const clients = []; + +const server = net.createServer(function onClient(client) { + clients.push(client); + + if (clients.length === 2) { + // Enroll two timers, and make the one supposed to fire first + // unenroll the other one supposed to fire later. This mutates + // the list of unref timers when traversing it, and exposes the + // original issue in joyent/node#8897. + clients[0].setTimeout(1, () => { + clients[1].setTimeout(0); + clients[0].end(); + clients[1].end(); + }); + + // Use a delay that is higher than the lowest timer resolution across all + // supported platforms, so that the two timers don't fire at the same time. + clients[1].setTimeout(50); + } +}); + +server.listen(0, common.mustCall(() => { + const countdown = new Countdown(2, () => server.close()); + + { + const client = net.connect({ port: server.address().port }); + client.on('end', () => countdown.dec()); + } + + { + const client = net.connect({ port: server.address().port }); + client.on('end', () => countdown.dec()); + } +})); diff --git a/tests/node_compat/test/parallel/test-timers-timeout-with-non-integer.js b/tests/node_compat/test/parallel/test-timers-timeout-with-non-integer.js index 585b750b3a073f..3bce7f9d213625 100644 --- a/tests/node_compat/test/parallel/test-timers-timeout-with-non-integer.js +++ b/tests/node_compat/test/parallel/test-timers-timeout-with-non-integer.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-timers-uncaught-exception.js b/tests/node_compat/test/parallel/test-timers-uncaught-exception.js index 954d776d073b6e..9b3567ab71c092 100644 --- a/tests/node_compat/test/parallel/test-timers-uncaught-exception.js +++ b/tests/node_compat/test/parallel/test-timers-uncaught-exception.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-timers-unref-throw-then-ref.js b/tests/node_compat/test/parallel/test-timers-unref-throw-then-ref.js index 4b593a9d433c1a..2c98a13eb1bef6 100644 --- a/tests/node_compat/test/parallel/test-timers-unref-throw-then-ref.js +++ b/tests/node_compat/test/parallel/test-timers-unref-throw-then-ref.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-timers-unref.js b/tests/node_compat/test/parallel/test-timers-unref.js new file mode 100644 index 00000000000000..ca4145d3ef0376 --- /dev/null +++ b/tests/node_compat/test/parallel/test-timers-unref.js @@ -0,0 +1,88 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +const common = require('../common'); + +const assert = require('assert'); + +let unref_interval = false; +let unref_timer = false; +let checks = 0; + +const LONG_TIME = 10 * 1000; +const SHORT_TIME = 100; + +const timer = setTimeout(() => {}, 10); +assert.strictEqual(timer.hasRef(), true); +// Should not throw. +timer.unref().ref().unref(); +assert.strictEqual(timer.hasRef(), false); + +setInterval(() => {}, 10).unref().ref().unref(); + +setInterval(common.mustNotCall('Interval should not fire'), LONG_TIME).unref(); +setTimeout(common.mustNotCall('Timer should not fire'), LONG_TIME).unref(); + +const interval = setInterval(common.mustCall(() => { + unref_interval = true; + clearInterval(interval); +}), SHORT_TIME); +interval.unref(); + +setTimeout(common.mustCall(() => { + unref_timer = true; +}), SHORT_TIME).unref(); + +const check_unref = setInterval(() => { + if (checks > 5 || (unref_interval && unref_timer)) + clearInterval(check_unref); + checks += 1; +}, 100); + +{ + const timeout = + setTimeout(common.mustCall(() => { + timeout.unref(); + }), SHORT_TIME); +} + +{ + // Should not timeout the test + const timeout = + setInterval(() => timeout.unref(), SHORT_TIME); +} + +// Should not assert on args.Holder()->InternalFieldCount() > 0. +// See https://github.com/nodejs/node-v0.x-archive/issues/4261. +{ + const t = setInterval(() => {}, 1); + process.nextTick(t.unref.bind({})); + process.nextTick(t.unref.bind(t)); +} diff --git a/tests/node_compat/test/parallel/test-timers-unrefd-interval-still-fires.js b/tests/node_compat/test/parallel/test-timers-unrefd-interval-still-fires.js new file mode 100644 index 00000000000000..79b68e467d96e3 --- /dev/null +++ b/tests/node_compat/test/parallel/test-timers-unrefd-interval-still-fires.js @@ -0,0 +1,29 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +// Regression test for https://github.com/nodejs/node-v0.x-archive/issues/8900. +const common = require('../common'); + +const TEST_DURATION = common.platformTimeout(1000); +let N = 3; + +const keepOpen = + setTimeout( + common.mustNotCall('Test timed out. keepOpen was not canceled.'), + TEST_DURATION); + +const timer = setInterval(common.mustCall(() => { + if (--N === 0) { + clearInterval(timer); + timer._onTimeout = + common.mustNotCall('Unrefd interval fired after being cleared'); + clearTimeout(keepOpen); + } +}, N), 1); + +timer.unref(); diff --git a/tests/node_compat/test/parallel/test-timers-unrefed-in-beforeexit.js b/tests/node_compat/test/parallel/test-timers-unrefed-in-beforeexit.js new file mode 100644 index 00000000000000..c551d61373cfd0 --- /dev/null +++ b/tests/node_compat/test/parallel/test-timers-unrefed-in-beforeexit.js @@ -0,0 +1,14 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); + +process.on('beforeExit', common.mustCall(() => { + setTimeout(common.mustNotCall(), 1).unref(); +})); diff --git a/tests/node_compat/test/parallel/test-timers-unrefed-in-callback.js b/tests/node_compat/test/parallel/test-timers-unrefed-in-callback.js new file mode 100644 index 00000000000000..362af6516b9319 --- /dev/null +++ b/tests/node_compat/test/parallel/test-timers-unrefed-in-callback.js @@ -0,0 +1,63 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +// Checks that setInterval timers keep running even when they're +// unrefed within their callback. + +const common = require('../common'); +const net = require('net'); + +let counter1 = 0; +let counter2 = 0; + +// Test1 checks that clearInterval works as expected for a timer +// unrefed within its callback: it removes the timer and its callback +// is not called anymore. Note that the only reason why this test is +// robust is that: +// 1. the repeated timer it creates has a delay of 1ms +// 2. when this test is completed, another test starts that creates a +// new repeated timer with the same delay (1ms) +// 3. because of the way timers are implemented in libuv, if two +// repeated timers A and B are created in that order with the same +// delay, it is guaranteed that the first occurrence of timer A +// will fire before the first occurrence of timer B +// 4. as a result, when the timer created by Test2 fired 11 times, if +// the timer created by Test1 hadn't been removed by clearInterval, +// it would have fired 11 more times, and the assertion in the +// process'exit event handler would fail. +function Test1() { + // Server only for maintaining event loop + const server = net.createServer().listen(0); + + const timer1 = setInterval(common.mustCall(() => { + timer1.unref(); + if (counter1++ === 3) { + clearInterval(timer1); + server.close(() => { + Test2(); + }); + } + }, 4), 1); +} + + +// Test2 checks setInterval continues even if it is unrefed within +// timer callback. counter2 continues to be incremented more than 11 +// until server close completed. +function Test2() { + // Server only for maintaining event loop + const server = net.createServer().listen(0); + + const timer2 = setInterval(() => { + timer2.unref(); + if (counter2++ === 3) + server.close(); + }, 1); +} + +Test1(); diff --git a/tests/node_compat/test/parallel/test-timers-user-call.js b/tests/node_compat/test/parallel/test-timers-user-call.js index 673a0c6f2c2228..f8d70d7e368592 100644 --- a/tests/node_compat/test/parallel/test-timers-user-call.js +++ b/tests/node_compat/test/parallel/test-timers-user-call.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Make sure `setTimeout()` and friends don't throw if the user-supplied diff --git a/tests/node_compat/test/parallel/test-timers-zero-timeout.js b/tests/node_compat/test/parallel/test-timers-zero-timeout.js index aeaf476ec4c0e5..9eadfb78bdfd40 100644 --- a/tests/node_compat/test/parallel/test-timers-zero-timeout.js +++ b/tests/node_compat/test/parallel/test-timers-zero-timeout.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-timers.js b/tests/node_compat/test/parallel/test-timers.js new file mode 100644 index 00000000000000..a2f218df810984 --- /dev/null +++ b/tests/node_compat/test/parallel/test-timers.js @@ -0,0 +1,88 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); + +const inputs = [ + undefined, + null, + true, + false, + '', + [], + {}, + NaN, + +Infinity, + -Infinity, + (1.0 / 0.0), // sanity check + parseFloat('x'), // NaN + -10, + -1, + -0.5, + -0.1, + -0.0, + 0, + 0.0, + 0.1, + 0.5, + 1, + 1.0, + 2147483648, // Browser behavior: timeouts > 2^31-1 run on next tick + 12345678901234, // ditto +]; + +const timeouts = []; +const intervals = []; + +inputs.forEach((value, index) => { + setTimeout(() => { + timeouts[index] = true; + }, value); + + const handle = setInterval(() => { + clearInterval(handle); // Disarm timer or we'll never finish + intervals[index] = true; + }, value); +}); + +// All values in inputs array coerce to 1 ms. Therefore, they should all run +// before a timer set here for 2 ms. + +setTimeout(common.mustCall(() => { + // Assert that all other timers have run + inputs.forEach((value, index) => { + assert(timeouts[index]); + assert(intervals[index]); + }); +}), 2); + +// Test 10 ms timeout separately. +setTimeout(common.mustCall(), 10); +setInterval(common.mustCall(function() { clearInterval(this); }), 10); diff --git a/tests/node_compat/test/parallel/test-tls-alert-handling.js b/tests/node_compat/test/parallel/test-tls-alert-handling.js new file mode 100644 index 00000000000000..d682d5bcbbd920 --- /dev/null +++ b/tests/node_compat/test/parallel/test-tls-alert-handling.js @@ -0,0 +1,103 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); + +if (!common.hasCrypto) + common.skip('missing crypto'); + +if (!common.opensslCli) + common.skip('node compiled without OpenSSL CLI'); + +const assert = require('assert'); +const net = require('net'); +const tls = require('tls'); +const fixtures = require('../common/fixtures'); + +let clientClosed = false; +let errorReceived = false; +function canCloseServer() { + return clientClosed && errorReceived; +} + +function loadPEM(n) { + return fixtures.readKey(`${n}.pem`, 'utf-8'); +} + +const opts = { + key: loadPEM('agent2-key'), + cert: loadPEM('agent2-cert') +}; + +const max_iter = 20; +let iter = 0; + +const errorHandler = common.mustCall((err) => { + assert.strictEqual(err.code, 'ERR_SSL_WRONG_VERSION_NUMBER'); + assert.strictEqual(err.library, 'SSL routines'); + if (!common.hasOpenSSL3) assert.strictEqual(err.function, 'ssl3_get_record'); + assert.strictEqual(err.reason, 'wrong version number'); + errorReceived = true; + if (canCloseServer()) + server.close(); +}); +const server = tls.createServer(opts, common.mustCall(function(s) { + s.pipe(s); + s.on('error', errorHandler); +}, 2)); + +server.listen(0, common.mustCall(function() { + sendClient(); +})); + +server.on('tlsClientError', common.mustNotCall()); + +server.on('error', common.mustNotCall()); + +function sendClient() { + const client = tls.connect(server.address().port, { + rejectUnauthorized: false + }); + client.on('data', common.mustCall(function() { + if (iter++ === 2) sendBADTLSRecord(); + if (iter < max_iter) { + client.write('a'); + return; + } + client.end(); + }, max_iter)); + client.write('a', common.mustCall()); + client.on('error', common.mustNotCall()); + client.on('close', common.mustCall(function() { + clientClosed = true; + if (canCloseServer()) + server.close(); + })); +} + + +function sendBADTLSRecord() { + const BAD_RECORD = Buffer.from([0xff, 0xff, 0xff, 0xff, 0xff, 0xff]); + const socket = net.connect(server.address().port); + const client = tls.connect({ + socket: socket, + rejectUnauthorized: false + }, common.mustCall(function() { + client.write('x'); + client.on('data', (data) => { + socket.end(BAD_RECORD); + }); + })); + client.on('error', common.mustCall((err) => { + assert.strictEqual(err.code, 'ERR_SSL_TLSV1_ALERT_PROTOCOL_VERSION'); + assert.strictEqual(err.library, 'SSL routines'); + if (!common.hasOpenSSL3) + assert.strictEqual(err.function, 'ssl3_read_bytes'); + assert.strictEqual(err.reason, 'tlsv1 alert protocol version'); + })); +} diff --git a/tests/node_compat/test/parallel/test-tls-alert.js b/tests/node_compat/test/parallel/test-tls-alert.js new file mode 100644 index 00000000000000..b3e8a948ce01f4 --- /dev/null +++ b/tests/node_compat/test/parallel/test-tls-alert.js @@ -0,0 +1,60 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +if (!common.opensslCli) + common.skip('node compiled without OpenSSL CLI.'); + +const assert = require('assert'); +const { execFile } = require('child_process'); +const tls = require('tls'); +const fixtures = require('../common/fixtures'); + +function loadPEM(n) { + return fixtures.readKey(`${n}.pem`); +} + +const server = tls.Server({ + secureProtocol: 'TLSv1_2_server_method', + key: loadPEM('agent2-key'), + cert: loadPEM('agent2-cert') +}, null).listen(0, common.mustCall(() => { + const args = ['s_client', '-quiet', '-tls1_1', + '-cipher', (common.hasOpenSSL31 ? 'DEFAULT:@SECLEVEL=0' : 'DEFAULT'), + '-connect', `127.0.0.1:${server.address().port}`]; + + execFile(common.opensslCli, args, common.mustCall((err, _, stderr) => { + assert.strictEqual(err.code, 1); + assert.match(stderr, /SSL alert number 70/); + server.close(); + })); +})); diff --git a/tests/node_compat/test/parallel/test-tls-client-renegotiation-limit.js b/tests/node_compat/test/parallel/test-tls-client-renegotiation-limit.js new file mode 100644 index 00000000000000..9f50d82dde2c75 --- /dev/null +++ b/tests/node_compat/test/parallel/test-tls-client-renegotiation-limit.js @@ -0,0 +1,108 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +if (!common.opensslCli) + common.skip('node compiled without OpenSSL CLI.'); + +const assert = require('assert'); +const tls = require('tls'); +const fixtures = require('../common/fixtures'); + +// Renegotiation as a protocol feature was dropped after TLS1.2. +tls.DEFAULT_MAX_VERSION = 'TLSv1.2'; + +// Renegotiation limits to test +const LIMITS = [0, 1, 2, 3, 5, 10, 16]; + +{ + let n = 0; + function next() { + if (n >= LIMITS.length) return; + tls.CLIENT_RENEG_LIMIT = LIMITS[n++]; + test(next); + } + next(); +} + +function test(next) { + const options = { + cert: fixtures.readKey('rsa_cert.crt'), + key: fixtures.readKey('rsa_private.pem'), + }; + + const server = tls.createServer(options, (conn) => { + conn.on('error', (err) => { + console.error(`Caught exception: ${err}`); + assert.match(err.message, /TLS session renegotiation attack/); + conn.destroy(); + }); + conn.pipe(conn); + }); + + server.listen(0, () => { + const options = { + host: server.address().host, + port: server.address().port, + rejectUnauthorized: false, + }; + const client = tls.connect(options, spam); + + let renegs = 0; + + client.on('close', () => { + assert.strictEqual(renegs, tls.CLIENT_RENEG_LIMIT + 1); + server.close(); + process.nextTick(next); + }); + + client.on('error', (err) => { + console.log('CLIENT ERR', err); + throw err; + }); + + client.on('close', (hadErr) => { + assert.strictEqual(hadErr, false); + }); + + // Simulate renegotiation attack + function spam() { + client.write(''); + client.renegotiate({}, (err) => { + assert.ifError(err); + assert.ok(renegs <= tls.CLIENT_RENEG_LIMIT); + spam(); + }); + renegs++; + } + }); +} diff --git a/tests/node_compat/test/parallel/test-tls-dhe.js b/tests/node_compat/test/parallel/test-tls-dhe.js new file mode 100644 index 00000000000000..ea3503f0f6c230 --- /dev/null +++ b/tests/node_compat/test/parallel/test-tls-dhe.js @@ -0,0 +1,119 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Flags: --no-warnings +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +if (!common.opensslCli) + common.skip('missing openssl-cli'); + +const assert = require('assert'); +const { X509Certificate } = require('crypto'); +const { once } = require('events'); +const tls = require('tls'); +const { execFile } = require('child_process'); +const fixtures = require('../common/fixtures'); + +const key = fixtures.readKey('agent2-key.pem'); +const cert = fixtures.readKey('agent2-cert.pem'); + +// Prefer DHE over ECDHE when possible. +const dheCipher = 'DHE-RSA-AES128-SHA256'; +const ecdheCipher = 'ECDHE-RSA-AES128-SHA256'; +const ciphers = `${dheCipher}:${ecdheCipher}`; + +// Test will emit a warning because the DH parameter size is < 2048 bits +common.expectWarning('SecurityWarning', + 'DH parameter is less than 2048 bits'); + +function loadDHParam(n) { + const keyname = `dh${n}.pem`; + return fixtures.readKey(keyname); +} + +function test(dhparam, keylen, expectedCipher) { + const options = { + key, + cert, + ciphers, + dhparam, + maxVersion: 'TLSv1.2', + }; + + const server = tls.createServer(options, (conn) => conn.end()); + + server.listen(0, '127.0.0.1', common.mustCall(() => { + const args = ['s_client', '-connect', `127.0.0.1:${server.address().port}`, + '-cipher', `${ciphers}:@SECLEVEL=1`]; + + execFile(common.opensslCli, args, common.mustSucceed((stdout) => { + assert(keylen === null || + stdout.includes(`Server Temp Key: DH, ${keylen} bits`)); + assert(stdout.includes(`Cipher : ${expectedCipher}`)); + server.close(); + })); + })); + + return once(server, 'close'); +} + +function testCustomParam(keylen, expectedCipher) { + const dhparam = loadDHParam(keylen); + if (keylen === 'error') keylen = null; + return test(dhparam, keylen, expectedCipher); +} + +(async () => { + // By default, DHE is disabled while ECDHE is enabled. + for (const dhparam of [undefined, null]) { + await test(dhparam, null, ecdheCipher); + } + + // The DHE parameters selected by OpenSSL depend on the strength of the + // certificate's key. For this test, we can assume that the modulus length + // of the certificate's key is equal to the size of the DHE parameter, but + // that is really only true for a few modulus lengths. + const { + publicKey: { asymmetricKeyDetails: { modulusLength } } + } = new X509Certificate(cert); + await test('auto', modulusLength, dheCipher); + + assert.throws(() => { + testCustomParam(512); + }, /DH parameter is less than 1024 bits/); + + // Custom DHE parameters are supported (but discouraged). + await testCustomParam(1024, dheCipher); + await testCustomParam(2048, dheCipher); + + // Invalid DHE parameters are discarded. ECDHE remains enabled. + await testCustomParam('error', ecdheCipher); +})().then(common.mustCall()); diff --git a/tests/node_compat/test/parallel/test-tls-ecdh-auto.js b/tests/node_compat/test/parallel/test-tls-ecdh-auto.js new file mode 100644 index 00000000000000..c06dbe1b8a17b7 --- /dev/null +++ b/tests/node_compat/test/parallel/test-tls-ecdh-auto.js @@ -0,0 +1,50 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); + +// This test ensures that the value "auto" on ecdhCurve option is +// supported to enable automatic curve selection in TLS server. + +if (!common.hasCrypto) + common.skip('missing crypto'); + +if (!common.opensslCli) + common.skip('missing openssl-cli'); + +const assert = require('assert'); +const tls = require('tls'); +const { execFile } = require('child_process'); +const fixtures = require('../common/fixtures'); + +function loadPEM(n) { + return fixtures.readKey(`${n}.pem`); +} + +const options = { + key: loadPEM('agent2-key'), + cert: loadPEM('agent2-cert'), + ciphers: '-ALL:ECDHE-RSA-AES128-SHA256', + ecdhCurve: 'auto', + maxVersion: 'TLSv1.2', +}; + +const reply = 'I AM THE WALRUS'; // Something recognizable + +const server = tls.createServer(options, (conn) => { + conn.end(reply); +}).listen(0, common.mustCall(() => { + const args = ['s_client', + '-cipher', `${options.ciphers}`, + '-connect', `127.0.0.1:${server.address().port}`]; + + execFile(common.opensslCli, args, common.mustSucceed((stdout) => { + assert(stdout.includes(reply)); + server.close(); + })); +})); diff --git a/tests/node_compat/test/parallel/test-tls-ecdh-multiple.js b/tests/node_compat/test/parallel/test-tls-ecdh-multiple.js new file mode 100644 index 00000000000000..04163acced5ca2 --- /dev/null +++ b/tests/node_compat/test/parallel/test-tls-ecdh-multiple.js @@ -0,0 +1,68 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); + +// This test ensures that ecdhCurve option of TLS server supports colon +// separated ECDH curve names as value. + +if (!common.hasCrypto) + common.skip('missing crypto'); + +if (!common.opensslCli) + common.skip('missing openssl-cli'); + +const assert = require('assert'); +const tls = require('tls'); +const { execFile } = require('child_process'); +const fixtures = require('../common/fixtures'); + +function loadPEM(n) { + return fixtures.readKey(`${n}.pem`); +} + +const options = { + key: loadPEM('agent2-key'), + cert: loadPEM('agent2-cert'), + ciphers: '-ALL:ECDHE-RSA-AES128-SHA256', + ecdhCurve: 'secp256k1:prime256v1:secp521r1', + maxVersion: 'TLSv1.2', +}; + +const reply = 'I AM THE WALRUS'; // Something recognizable + +const server = tls.createServer(options, (conn) => { + conn.end(reply); +}).listen(0, common.mustCall(() => { + const args = ['s_client', + '-cipher', `${options.ciphers}`, + '-connect', `127.0.0.1:${server.address().port}`]; + + execFile(common.opensslCli, args, common.mustSucceed((stdout) => { + assert(stdout.includes(reply)); + server.close(); + })); +})); + +{ + // Some unsupported curves. + const unsupportedCurves = [ + 'wap-wsg-idm-ecid-wtls1', + 'c2pnb163v1', + 'prime192v3', + ]; + + // Brainpool is not supported in FIPS mode. + if (common.hasFipsCrypto) + unsupportedCurves.push('brainpoolP256r1'); + + unsupportedCurves.forEach((ecdhCurve) => { + assert.throws(() => tls.createServer({ ecdhCurve }), + /Error: Failed to set ECDH curve/); + }); +} diff --git a/tests/node_compat/test/parallel/test-tls-ecdh.js b/tests/node_compat/test/parallel/test-tls-ecdh.js new file mode 100644 index 00000000000000..169e629f8a7bf0 --- /dev/null +++ b/tests/node_compat/test/parallel/test-tls-ecdh.js @@ -0,0 +1,66 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const fixtures = require('../common/fixtures'); + +if (!common.hasCrypto) + common.skip('missing crypto'); + +if (!common.opensslCli) + common.skip('missing openssl-cli'); + +const assert = require('assert'); +const tls = require('tls'); + +const exec = require('child_process').exec; + +const options = { + key: fixtures.readKey('agent2-key.pem'), + cert: fixtures.readKey('agent2-cert.pem'), + ciphers: '-ALL:ECDHE-RSA-AES128-SHA256', + ecdhCurve: 'prime256v1', + maxVersion: 'TLSv1.2' +}; + +const reply = 'I AM THE WALRUS'; // Something recognizable + +const server = tls.createServer(options, common.mustCall(function(conn) { + conn.end(reply); +})); + +server.listen(0, '127.0.0.1', common.mustCall(function() { + const cmd = `"${common.opensslCli}" s_client -cipher ${ + options.ciphers} -connect 127.0.0.1:${this.address().port}`; + + exec(cmd, common.mustSucceed((stdout, stderr) => { + assert(stdout.includes(reply)); + server.close(); + })); +})); diff --git a/tests/node_compat/test/parallel/test-tls-enable-trace-cli.js b/tests/node_compat/test/parallel/test-tls-enable-trace-cli.js new file mode 100644 index 00000000000000..ba049f611fc01c --- /dev/null +++ b/tests/node_compat/test/parallel/test-tls-enable-trace-cli.js @@ -0,0 +1,75 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Flags: --expose-internals +'use strict'; +const common = require('../common'); +if (!common.hasCrypto) common.skip('missing crypto'); +const fixtures = require('../common/fixtures'); + +// Test --trace-tls CLI flag. + +const assert = require('assert'); +const { fork } = require('child_process'); + +if (process.argv[2] === 'test') + return test(); + +const binding = require('internal/test/binding').internalBinding; + +if (!binding('tls_wrap').HAVE_SSL_TRACE) + return common.skip('no SSL_trace() compiled into openssl'); + +const child = fork(__filename, ['test'], { + silent: true, + execArgv: ['--trace-tls'] +}); + +let stdout = ''; +let stderr = ''; +child.stdout.setEncoding('utf8'); +child.stderr.setEncoding('utf8'); +child.stdout.on('data', (data) => stdout += data); +child.stderr.on('data', (data) => stderr += data); +child.on('close', common.mustCall((code, signal) => { + // For debugging and observation of actual trace output. + console.log(stderr); + + assert.strictEqual(code, 0); + assert.strictEqual(signal, null); + assert.strictEqual(stdout.trim(), ''); + assert.match(stderr, /Warning: Enabling --trace-tls can expose sensitive/); + assert.match(stderr, /Sent Record/); +})); + +function test() { + const { + connect, keys + } = require(fixtures.path('tls-connect')); + + connect({ + client: { + checkServerIdentity: (servername, cert) => { }, + ca: `${keys.agent1.cert}\n${keys.agent6.ca}`, + }, + server: { + cert: keys.agent6.cert, + key: keys.agent6.key + }, + }, common.mustCall((err, pair, cleanup) => { + if (pair.server.err) { + console.trace('server', pair.server.err); + } + if (pair.client.err) { + console.trace('client', pair.client.err); + } + assert.ifError(pair.server.err); + assert.ifError(pair.client.err); + + return cleanup(); + })); +} diff --git a/tests/node_compat/test/parallel/test-tls-enable-trace.js b/tests/node_compat/test/parallel/test-tls-enable-trace.js new file mode 100644 index 00000000000000..30be82b47e645f --- /dev/null +++ b/tests/node_compat/test/parallel/test-tls-enable-trace.js @@ -0,0 +1,65 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Flags: --expose-internals +'use strict'; +const common = require('../common'); +if (!common.hasCrypto) common.skip('missing crypto'); +const fixtures = require('../common/fixtures'); + +// Test enableTrace: option for TLS. + +const assert = require('assert'); +const { fork } = require('child_process'); + +if (process.argv[2] === 'test') + return test(); + +const binding = require('internal/test/binding').internalBinding; + +if (!binding('tls_wrap').HAVE_SSL_TRACE) + return common.skip('no SSL_trace() compiled into openssl'); + +const child = fork(__filename, ['test'], { silent: true }); + +let stderr = ''; +child.stderr.setEncoding('utf8'); +child.stderr.on('data', (data) => stderr += data); +child.on('close', common.mustCall(() => { + assert.match(stderr, /Received Record/); + assert.match(stderr, /ClientHello/); +})); + +// For debugging and observation of actual trace output. +child.stderr.pipe(process.stderr); +child.stdout.pipe(process.stdout); + +child.on('exit', common.mustCall((code) => { + assert.strictEqual(code, 0); +})); + +function test() { + const { + connect, keys + } = require(fixtures.path('tls-connect')); + + connect({ + client: { + checkServerIdentity: (servername, cert) => { }, + ca: `${keys.agent1.cert}\n${keys.agent6.ca}`, + }, + server: { + cert: keys.agent6.cert, + key: keys.agent6.key, + enableTrace: true, + }, + }, common.mustCall((err, pair, cleanup) => { + pair.client.conn.enableTrace(); + + return cleanup(); + })); +} diff --git a/tests/node_compat/test/parallel/test-tls-env-extra-ca-no-crypto.js b/tests/node_compat/test/parallel/test-tls-env-extra-ca-no-crypto.js new file mode 100644 index 00000000000000..7ed55855b56728 --- /dev/null +++ b/tests/node_compat/test/parallel/test-tls-env-extra-ca-no-crypto.js @@ -0,0 +1,29 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const fixtures = require('../common/fixtures'); +const assert = require('assert'); +const { fork } = require('child_process'); + +// This test ensures that trying to load extra certs won't throw even when +// there is no crypto support, i.e., built with "./configure --without-ssl". +if (process.argv[2] === 'child') { + // exit +} else { + const NODE_EXTRA_CA_CERTS = fixtures.path('keys', 'ca1-cert.pem'); + + fork( + __filename, + ['child'], + { env: { ...process.env, NODE_EXTRA_CA_CERTS } }, + ).on('exit', common.mustCall(function(status) { + // Client did not succeed in connecting + assert.strictEqual(status, 0); + })); +} diff --git a/tests/node_compat/test/parallel/test-tls-ocsp-callback.js b/tests/node_compat/test/parallel/test-tls-ocsp-callback.js new file mode 100644 index 00000000000000..ca89ef38388290 --- /dev/null +++ b/tests/node_compat/test/parallel/test-tls-ocsp-callback.js @@ -0,0 +1,120 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); + +if (!common.opensslCli) + common.skip('node compiled without OpenSSL CLI.'); + +if (!common.hasCrypto) + common.skip('missing crypto'); + +const tls = require('tls'); +const fixtures = require('../common/fixtures'); + +const assert = require('assert'); + +const SSL_OP_NO_TICKET = require('crypto').constants.SSL_OP_NO_TICKET; + +const pfx = fixtures.readKey('agent1.pfx'); +const key = fixtures.readKey('agent1-key.pem'); +const cert = fixtures.readKey('agent1-cert.pem'); +const ca = fixtures.readKey('ca1-cert.pem'); + +function test(testOptions, cb) { + const options = { + key, + cert, + ca: [ca] + }; + const requestCount = testOptions.response ? 0 : 1; + + if (!testOptions.ocsp) + assert.strictEqual(testOptions.response, undefined); + + if (testOptions.pfx) { + delete options.key; + delete options.cert; + options.pfx = testOptions.pfx; + options.passphrase = testOptions.passphrase; + } + + const server = tls.createServer(options, common.mustCall((cleartext) => { + cleartext.on('error', function(er) { + // We're ok with getting ECONNRESET in this test, but it's + // timing-dependent, and thus unreliable. Any other errors + // are just failures, though. + if (er.code !== 'ECONNRESET') + throw er; + }); + cleartext.end(); + }, requestCount)); + + if (!testOptions.ocsp) + server.on('OCSPRequest', common.mustNotCall()); + else + server.on('OCSPRequest', common.mustCall((cert, issuer, callback) => { + assert.ok(Buffer.isBuffer(cert)); + assert.ok(Buffer.isBuffer(issuer)); + + // Callback a little later to ensure that async really works. + return setTimeout(callback, 100, null, testOptions.response ? + Buffer.from(testOptions.response) : null); + })); + + server.listen(0, function() { + const client = tls.connect({ + port: this.address().port, + requestOCSP: testOptions.ocsp, + secureOptions: testOptions.ocsp ? 0 : SSL_OP_NO_TICKET, + rejectUnauthorized: false + }, common.mustCall(requestCount)); + + client.on('OCSPResponse', common.mustCall((resp) => { + if (testOptions.response) { + assert.strictEqual(resp.toString(), testOptions.response); + client.destroy(); + } else { + assert.strictEqual(resp, null); + } + }, testOptions.ocsp === false ? 0 : 1)); + + client.on('close', common.mustCall(() => { + server.close(cb); + })); + }); +} + +test({ ocsp: true, response: false }); +test({ ocsp: true, response: 'hello world' }); +test({ ocsp: false }); + +if (!common.hasFipsCrypto) { + test({ ocsp: true, response: 'hello pfx', pfx: pfx, passphrase: 'sample' }); +} diff --git a/tests/node_compat/test/parallel/test-tls-psk-server.js b/tests/node_compat/test/parallel/test-tls-psk-server.js new file mode 100644 index 00000000000000..2263fb901d7c51 --- /dev/null +++ b/tests/node_compat/test/parallel/test-tls-psk-server.js @@ -0,0 +1,84 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); + +if (!common.hasCrypto) + common.skip('missing crypto'); +if (!common.opensslCli) + common.skip('missing openssl cli'); + +const assert = require('assert'); + +const tls = require('tls'); +const spawn = require('child_process').spawn; + +const CIPHERS = 'PSK+HIGH'; +const KEY = 'd731ef57be09e5204f0b205b60627028'; +const IDENTITY = 'TestUser'; + +const server = tls.createServer({ + ciphers: CIPHERS, + pskIdentityHint: IDENTITY, + pskCallback(socket, identity) { + assert.ok(socket instanceof tls.TLSSocket); + assert.ok(typeof identity === 'string'); + if (identity === IDENTITY) + return Buffer.from(KEY, 'hex'); + } +}); + +server.on('connection', common.mustCall()); + +server.on('secureConnection', (socket) => { + socket.write('hello\r\n'); + + socket.on('data', (data) => { + socket.write(data); + }); +}); + +let gotHello = false; +let sentWorld = false; +let gotWorld = false; + +server.listen(0, () => { + const client = spawn(common.opensslCli, [ + 's_client', + '-connect', `127.0.0.1:${server.address().port}`, + '-cipher', CIPHERS, + '-psk', KEY, + '-psk_identity', IDENTITY, + ]); + + let out = ''; + + client.stdout.setEncoding('utf8'); + client.stdout.on('data', (d) => { + out += d; + + if (!gotHello && /hello/.test(out)) { + gotHello = true; + client.stdin.write('world\r\n'); + sentWorld = true; + } + + if (!gotWorld && /world/.test(out)) { + gotWorld = true; + client.stdin.end(); + } + }); + + client.on('exit', common.mustCall((code) => { + assert.ok(gotHello); + assert.ok(sentWorld); + assert.ok(gotWorld); + assert.strictEqual(code, 0); + server.close(); + })); +}); diff --git a/tests/node_compat/test/parallel/test-tls-securepair-server.js b/tests/node_compat/test/parallel/test-tls-securepair-server.js new file mode 100644 index 00000000000000..67c727f880a8b6 --- /dev/null +++ b/tests/node_compat/test/parallel/test-tls-securepair-server.js @@ -0,0 +1,152 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +if (!common.opensslCli) + common.skip('missing openssl-cli'); + +const assert = require('assert'); +const tls = require('tls'); +const net = require('net'); +const spawn = require('child_process').spawn; +const fixtures = require('../common/fixtures'); + +const key = fixtures.readKey('rsa_private.pem'); +const cert = fixtures.readKey('rsa_cert.crt'); + +function log(a) { + console.error('***server***', a); +} + +const server = net.createServer(common.mustCall(function(socket) { + log(`connection fd=${socket.fd}`); + const sslcontext = tls.createSecureContext({ key, cert }); + sslcontext.context.setCiphers('RC4-SHA:AES128-SHA:AES256-SHA'); + + const pair = tls.createSecurePair(sslcontext, true); + + assert.ok(pair.encrypted.writable); + assert.ok(pair.cleartext.writable); + + pair.encrypted.pipe(socket); + socket.pipe(pair.encrypted); + + log('i set it secure'); + + pair.on('secure', function() { + log('connected+secure!'); + pair.cleartext.write('hello\r\n'); + log(pair.cleartext.getPeerCertificate()); + log(pair.cleartext.getCipher()); + }); + + pair.cleartext.on('data', function(data) { + log(`read bytes ${data.length}`); + pair.cleartext.write(data); + }); + + socket.on('end', function() { + log('socket end'); + }); + + pair.cleartext.on('error', function(err) { + log('got error: '); + log(err); + socket.destroy(); + }); + + pair.encrypted.on('error', function(err) { + log('encrypted error: '); + log(err); + socket.destroy(); + }); + + socket.on('error', function(err) { + log('socket error: '); + log(err); + socket.destroy(); + }); + + socket.on('close', function(err) { + log('socket closed'); + }); + + pair.on('error', function(err) { + log('secure error: '); + log(err); + socket.destroy(); + }); +})); + +let gotHello = false; +let sentWorld = false; +let gotWorld = false; + +server.listen(0, common.mustCall(function() { + // To test use: openssl s_client -connect localhost:8000 + + const args = ['s_client', '-connect', `127.0.0.1:${this.address().port}`]; + + const client = spawn(common.opensslCli, args); + + + let out = ''; + + client.stdout.setEncoding('utf8'); + client.stdout.on('data', function(d) { + out += d; + + if (!gotHello && /hello/.test(out)) { + gotHello = true; + client.stdin.write('world\r\n'); + sentWorld = true; + } + + if (!gotWorld && /world/.test(out)) { + gotWorld = true; + client.stdin.end(); + } + }); + + client.stdout.pipe(process.stdout, { end: false }); + + client.on('exit', common.mustCall(function(code) { + assert.strictEqual(code, 0); + server.close(); + })); +})); + +process.on('exit', function() { + assert.ok(gotHello); + assert.ok(sentWorld); + assert.ok(gotWorld); +}); diff --git a/tests/node_compat/test/parallel/test-tls-server-verify.js b/tests/node_compat/test/parallel/test-tls-server-verify.js new file mode 100644 index 00000000000000..e4fe6ef4c0a56c --- /dev/null +++ b/tests/node_compat/test/parallel/test-tls-server-verify.js @@ -0,0 +1,355 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); + +if (!common.hasCrypto) + common.skip('missing crypto'); + +if (!common.opensslCli) + common.skip('node compiled without OpenSSL CLI.'); + +// This is a rather complex test which sets up various TLS servers with node +// and connects to them using the 'openssl s_client' command line utility +// with various keys. Depending on the certificate authority and other +// parameters given to the server, the various clients are +// - rejected, +// - accepted and "unauthorized", or +// - accepted and "authorized". + +const assert = require('assert'); +const { spawn } = require('child_process'); +const { SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION } = + require('crypto').constants; +const tls = require('tls'); +const fixtures = require('../common/fixtures'); + +const testCases = + [{ title: 'Do not request certs. Everyone is unauthorized.', + requestCert: false, + rejectUnauthorized: false, + renegotiate: false, + CAs: ['ca1-cert'], + clients: + [{ name: 'agent1', shouldReject: false, shouldAuth: false }, + { name: 'agent2', shouldReject: false, shouldAuth: false }, + { name: 'agent3', shouldReject: false, shouldAuth: false }, + { name: 'nocert', shouldReject: false, shouldAuth: false }, + ] }, + + { title: 'Allow both authed and unauthed connections with CA1', + requestCert: true, + rejectUnauthorized: false, + renegotiate: false, + CAs: ['ca1-cert'], + clients: + [{ name: 'agent1', shouldReject: false, shouldAuth: true }, + { name: 'agent2', shouldReject: false, shouldAuth: false }, + { name: 'agent3', shouldReject: false, shouldAuth: false }, + { name: 'nocert', shouldReject: false, shouldAuth: false }, + ] }, + + { title: 'Do not request certs at connection. Do that later', + requestCert: false, + rejectUnauthorized: false, + renegotiate: true, + CAs: ['ca1-cert'], + clients: + [{ name: 'agent1', shouldReject: false, shouldAuth: true }, + { name: 'agent2', shouldReject: false, shouldAuth: false }, + { name: 'agent3', shouldReject: false, shouldAuth: false }, + { name: 'nocert', shouldReject: false, shouldAuth: false }, + ] }, + + { title: 'Allow only authed connections with CA1', + requestCert: true, + rejectUnauthorized: true, + renegotiate: false, + CAs: ['ca1-cert'], + clients: + [{ name: 'agent1', shouldReject: false, shouldAuth: true }, + { name: 'agent2', shouldReject: true }, + { name: 'agent3', shouldReject: true }, + { name: 'nocert', shouldReject: true }, + ] }, + + { title: 'Allow only authed connections with CA1 and CA2', + requestCert: true, + rejectUnauthorized: true, + renegotiate: false, + CAs: ['ca1-cert', 'ca2-cert'], + clients: + [{ name: 'agent1', shouldReject: false, shouldAuth: true }, + { name: 'agent2', shouldReject: true }, + { name: 'agent3', shouldReject: false, shouldAuth: true }, + { name: 'nocert', shouldReject: true }, + ] }, + + + { title: 'Allow only certs signed by CA2 but not in the CRL', + requestCert: true, + rejectUnauthorized: true, + renegotiate: false, + CAs: ['ca2-cert'], + crl: 'ca2-crl', + clients: [ + { name: 'agent1', shouldReject: true, shouldAuth: false }, + { name: 'agent2', shouldReject: true, shouldAuth: false }, + { name: 'agent3', shouldReject: false, shouldAuth: true }, + // Agent4 has a cert in the CRL. + { name: 'agent4', shouldReject: true, shouldAuth: false }, + { name: 'nocert', shouldReject: true }, + ] }, + ]; + +function filenamePEM(n) { + return fixtures.path('keys', `${n}.pem`); +} + +function loadPEM(n) { + return fixtures.readKey(`${n}.pem`); +} + + +const serverKey = loadPEM('agent2-key'); +const serverCert = loadPEM('agent2-cert'); + + +function runClient(prefix, port, options, cb) { + + // Client can connect in three ways: + // - Self-signed cert + // - Certificate, but not signed by CA. + // - Certificate signed by CA. + + const args = ['s_client', '-connect', `127.0.0.1:${port}`]; + + console.log(`${prefix} connecting with`, options.name); + + switch (options.name) { + case 'agent1': + // Signed by CA1 + args.push('-key'); + args.push(filenamePEM('agent1-key')); + args.push('-cert'); + args.push(filenamePEM('agent1-cert')); + break; + + case 'agent2': + // Self-signed + // This is also the key-cert pair that the server will use. + args.push('-key'); + args.push(filenamePEM('agent2-key')); + args.push('-cert'); + args.push(filenamePEM('agent2-cert')); + break; + + case 'agent3': + // Signed by CA2 + args.push('-key'); + args.push(filenamePEM('agent3-key')); + args.push('-cert'); + args.push(filenamePEM('agent3-cert')); + break; + + case 'agent4': + // Signed by CA2 (rejected by ca2-crl) + args.push('-key'); + args.push(filenamePEM('agent4-key')); + args.push('-cert'); + args.push(filenamePEM('agent4-cert')); + break; + + case 'nocert': + // Do not send certificate + break; + + default: + throw new Error(`${prefix}Unknown agent name`); + } + + // To test use: openssl s_client -connect localhost:8000 + const client = spawn(common.opensslCli, args); + + let out = ''; + + let rejected = true; + let authed = false; + let goodbye = false; + + client.stdout.setEncoding('utf8'); + client.stdout.on('data', function(d) { + out += d; + + if (!goodbye && /_unauthed/.test(out)) { + console.error(`${prefix} * unauthed`); + goodbye = true; + client.kill(); + authed = false; + rejected = false; + } + + if (!goodbye && /_authed/.test(out)) { + console.error(`${prefix} * authed`); + goodbye = true; + client.kill(); + authed = true; + rejected = false; + } + }); + + client.on('exit', function(code) { + if (options.shouldReject) { + assert.strictEqual( + rejected, true, + `${prefix}${options.name} NOT rejected, but should have been`); + } else { + assert.strictEqual( + rejected, false, + `${prefix}${options.name} rejected, but should NOT have been`); + assert.strictEqual( + authed, options.shouldAuth, + `${prefix}${options.name} authed is ${authed} but should have been ${ + options.shouldAuth}`); + } + + cb(); + }); +} + + +// Run the tests +let successfulTests = 0; +function runTest(port, testIndex) { + const prefix = `${testIndex} `; + const tcase = testCases[testIndex]; + if (!tcase) return; + + console.error(`${prefix}Running '${tcase.title}'`); + + const cas = tcase.CAs.map(loadPEM); + + const crl = tcase.crl ? loadPEM(tcase.crl) : null; + + const serverOptions = { + key: serverKey, + cert: serverCert, + ca: cas, + crl: crl, + requestCert: tcase.requestCert, + rejectUnauthorized: tcase.rejectUnauthorized + }; + + // If renegotiating - session might be resumed and openssl won't request + // client's certificate (probably because of bug in the openssl) + if (tcase.renegotiate) { + serverOptions.secureOptions = + SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION; + // Renegotiation as a protocol feature was dropped after TLS1.2. + serverOptions.maxVersion = 'TLSv1.2'; + } + + let renegotiated = false; + const server = tls.Server(serverOptions, function handleConnection(c) { + c.on('error', function(e) { + // child.kill() leads ECONNRESET error in the TLS connection of + // openssl s_client via spawn(). A test result is already + // checked by the data of client.stdout before child.kill() so + // these tls errors can be ignored. + }); + if (tcase.renegotiate && !renegotiated) { + renegotiated = true; + setTimeout(function() { + console.error(`${prefix}- connected, renegotiating`); + c.write('\n_renegotiating\n'); + return c.renegotiate({ + requestCert: true, + rejectUnauthorized: false + }, function(err) { + assert.ifError(err); + c.write('\n_renegotiated\n'); + handleConnection(c); + }); + }, 200); + return; + } + + if (c.authorized) { + console.error(`${prefix}- authed connection: ${ + c.getPeerCertificate().subject.CN}`); + c.write('\n_authed\n'); + } else { + console.error(`${prefix}- unauthed connection: %s`, c.authorizationError); + c.write('\n_unauthed\n'); + } + }); + + function runNextClient(clientIndex) { + const options = tcase.clients[clientIndex]; + if (options) { + runClient(`${prefix}${clientIndex} `, port, options, function() { + runNextClient(clientIndex + 1); + }); + } else { + server.close(); + successfulTests++; + runTest(0, nextTest++); + } + } + + server.listen(port, function() { + port = server.address().port; + if (tcase.debug) { + console.error(`${prefix}TLS server running on port ${port}`); + } else if (tcase.renegotiate) { + runNextClient(0); + } else { + let clientsCompleted = 0; + for (let i = 0; i < tcase.clients.length; i++) { + runClient(`${prefix}${i} `, port, tcase.clients[i], function() { + clientsCompleted++; + if (clientsCompleted === tcase.clients.length) { + server.close(); + successfulTests++; + runTest(0, nextTest++); + } + }); + } + } + }); +} + + +let nextTest = 0; +runTest(0, nextTest++); + + +process.on('exit', function() { + assert.strictEqual(successfulTests, testCases.length); +}); diff --git a/tests/node_compat/test/parallel/test-tls-session-cache.js b/tests/node_compat/test/parallel/test-tls-session-cache.js new file mode 100644 index 00000000000000..c1523d7617b053 --- /dev/null +++ b/tests/node_compat/test/parallel/test-tls-session-cache.js @@ -0,0 +1,171 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); +const fixtures = require('../common/fixtures'); +const assert = require('assert'); +const tls = require('tls'); +const { spawn } = require('child_process'); + +if (!common.opensslCli) + common.skip('node compiled without OpenSSL CLI.'); + + +doTest({ tickets: false }, function() { + doTest({ tickets: true }, function() { + doTest({ tickets: false, invalidSession: true }, function() { + console.error('all done'); + }); + }); +}); + +function doTest(testOptions, callback) { + const key = fixtures.readKey('rsa_private.pem'); + const cert = fixtures.readKey('rsa_cert.crt'); + const options = { + key, + cert, + ca: [cert], + requestCert: true, + rejectUnauthorized: false, + secureProtocol: 'TLS_method', + ciphers: 'RSA@SECLEVEL=0' + }; + let requestCount = 0; + let resumeCount = 0; + let newSessionCount = 0; + let session; + + const server = tls.createServer(options, function(cleartext) { + cleartext.on('error', function(er) { + // We're ok with getting ECONNRESET in this test, but it's + // timing-dependent, and thus unreliable. Any other errors + // are just failures, though. + if (er.code !== 'ECONNRESET') + throw er; + }); + ++requestCount; + cleartext.end(''); + }); + server.on('newSession', function(id, data, cb) { + ++newSessionCount; + // Emulate asynchronous store + setImmediate(() => { + assert.ok(!session); + session = { id, data }; + cb(); + }); + }); + server.on('resumeSession', function(id, callback) { + ++resumeCount; + assert.ok(session); + assert.strictEqual(session.id.toString('hex'), id.toString('hex')); + + let data = session.data; + + // Return an invalid session to test Node does not crash. + if (testOptions.invalidSession) { + data = Buffer.from('INVALID SESSION'); + session = null; + } + + // Just to check that async really works there + setImmediate(() => { + callback(null, data); + }); + }); + + server.listen(0, function() { + const args = [ + 's_client', + '-tls1', + '-cipher', (common.hasOpenSSL31 ? 'DEFAULT:@SECLEVEL=0' : 'DEFAULT'), + '-connect', `localhost:${this.address().port}`, + '-servername', 'ohgod', + '-key', fixtures.path('keys/rsa_private.pem'), + '-cert', fixtures.path('keys/rsa_cert.crt'), + '-reconnect', + ].concat(testOptions.tickets ? [] : '-no_ticket'); + + function spawnClient() { + const client = spawn(common.opensslCli, args, { + stdio: [ 0, 1, 'pipe' ] + }); + let err = ''; + client.stderr.setEncoding('utf8'); + client.stderr.on('data', function(chunk) { + err += chunk; + }); + + client.on('exit', common.mustCall(function(code, signal) { + if (code !== 0) { + // If SmartOS and connection refused, then retry. See + // https://github.com/nodejs/node/issues/2663. + if (common.isSunOS && err.includes('Connection refused')) { + requestCount = 0; + spawnClient(); + return; + } + assert.fail(`code: ${code}, signal: ${signal}, output: ${err}`); + } + assert.strictEqual(code, 0); + server.close(common.mustCall(function() { + setImmediate(callback); + })); + })); + } + + spawnClient(); + }); + + process.on('exit', function() { + // Each test run connects 6 times: an initial request and 5 reconnect + // requests. + assert.strictEqual(requestCount, 6); + + if (testOptions.tickets) { + // No session cache callbacks are called. + assert.strictEqual(resumeCount, 0); + assert.strictEqual(newSessionCount, 0); + } else if (testOptions.invalidSession) { + // The resume callback was called, but each connection established a + // fresh session. + assert.strictEqual(resumeCount, 5); + assert.strictEqual(newSessionCount, 6); + } else { + // The resume callback was called, and only the initial connection + // establishes a fresh session. + assert.ok(session); + assert.strictEqual(resumeCount, 5); + assert.strictEqual(newSessionCount, 1); + } + }); +} diff --git a/tests/node_compat/test/parallel/test-tls-set-ciphers.js b/tests/node_compat/test/parallel/test-tls-set-ciphers.js new file mode 100644 index 00000000000000..c7dddd9aa084d5 --- /dev/null +++ b/tests/node_compat/test/parallel/test-tls-set-ciphers.js @@ -0,0 +1,138 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +if (!common.hasOpenSSL3) + common.skip('missing crypto, or OpenSSL version lower than 3'); + +const fixtures = require('../common/fixtures'); +const { inspect } = require('util'); + +// Test cipher: option for TLS. + +const { + assert, connect, keys +} = require(fixtures.path('tls-connect')); + + +function test(cciphers, sciphers, cipher, cerr, serr, options) { + assert(cipher || cerr || serr, 'test missing any expectations'); + const where = inspect(new Error()).split('\n')[2].replace(/[^(]*/, ''); + + const max_tls_ver = (ciphers, options) => { + if (options instanceof Object && Object.hasOwn(options, 'maxVersion')) + return options.maxVersion; + if ((typeof ciphers === 'string' || ciphers instanceof String) && ciphers.length > 0 && !ciphers.includes('TLS_')) + return 'TLSv1.2'; + + return 'TLSv1.3'; + }; + + connect({ + client: { + checkServerIdentity: (servername, cert) => { }, + ca: `${keys.agent1.cert}\n${keys.agent6.ca}`, + ciphers: cciphers, + maxVersion: max_tls_ver(cciphers, options), + }, + server: { + cert: keys.agent6.cert, + key: keys.agent6.key, + ciphers: sciphers, + maxVersion: max_tls_ver(sciphers, options), + }, + }, common.mustCall((err, pair, cleanup) => { + function u(_) { return _ === undefined ? 'U' : _; } + console.log('test:', u(cciphers), u(sciphers), + 'expect', u(cipher), u(cerr), u(serr)); + console.log(' ', where); + if (!cipher) { + console.log('client', pair.client.err ? pair.client.err.code : undefined); + console.log('server', pair.server.err ? pair.server.err.code : undefined); + if (cerr) { + assert(pair.client.err); + assert.strictEqual(pair.client.err.code, cerr); + } + if (serr) { + assert(pair.server.err); + assert.strictEqual(pair.server.err.code, serr); + } + return cleanup(); + } + + const reply = 'So long and thanks for all the fish.'; + + assert.ifError(err); + assert.ifError(pair.server.err); + assert.ifError(pair.client.err); + assert(pair.server.conn); + assert(pair.client.conn); + assert.strictEqual(pair.client.conn.getCipher().name, cipher); + assert.strictEqual(pair.server.conn.getCipher().name, cipher); + + pair.server.conn.write(reply); + + pair.client.conn.on('data', common.mustCall((data) => { + assert.strictEqual(data.toString(), reply); + return cleanup(); + })); + })); +} + +const U = undefined; + +// Have shared ciphers. +test(U, 'AES256-SHA', 'AES256-SHA'); +test('AES256-SHA', U, 'AES256-SHA'); + +test(U, 'TLS_AES_256_GCM_SHA384', 'TLS_AES_256_GCM_SHA384'); +test('TLS_AES_256_GCM_SHA384', U, 'TLS_AES_256_GCM_SHA384'); +test('TLS_AES_256_GCM_SHA384:!TLS_CHACHA20_POLY1305_SHA256', U, 'TLS_AES_256_GCM_SHA384'); + +// Do not have shared ciphers. +test('TLS_AES_256_GCM_SHA384', 'TLS_CHACHA20_POLY1305_SHA256', + U, 'ERR_SSL_SSLV3_ALERT_HANDSHAKE_FAILURE', 'ERR_SSL_NO_SHARED_CIPHER'); + +test('AES128-SHA', 'AES256-SHA', U, 'ERR_SSL_SSLV3_ALERT_HANDSHAKE_FAILURE', + 'ERR_SSL_NO_SHARED_CIPHER'); +test('AES128-SHA:TLS_AES_256_GCM_SHA384', + 'TLS_CHACHA20_POLY1305_SHA256:AES256-SHA', + U, 'ERR_SSL_SSLV3_ALERT_HANDSHAKE_FAILURE', 'ERR_SSL_NO_SHARED_CIPHER'); + +// Cipher order ignored, TLS1.3 chosen before TLS1.2. +test('AES256-SHA:TLS_AES_256_GCM_SHA384', U, 'TLS_AES_256_GCM_SHA384'); +test(U, 'AES256-SHA:TLS_AES_256_GCM_SHA384', 'TLS_AES_256_GCM_SHA384'); + +// Cipher order ignored, TLS1.3 before TLS1.2 and +// cipher suites are not disabled if TLS ciphers are set only +// TODO: maybe these tests should be reworked so maxVersion clamping +// is done explicitly and not implicitly in the test() function +test('AES256-SHA', U, 'TLS_AES_256_GCM_SHA384', U, U, { maxVersion: 'TLSv1.3' }); +test(U, 'AES256-SHA', 'TLS_AES_256_GCM_SHA384', U, U, { maxVersion: 'TLSv1.3' }); + +// TLS_AES_128_CCM_8_SHA256 & TLS_AES_128_CCM_SHA256 are not enabled by +// default, but work. +test('TLS_AES_128_CCM_8_SHA256', U, + U, 'ERR_SSL_SSLV3_ALERT_HANDSHAKE_FAILURE', 'ERR_SSL_NO_SHARED_CIPHER'); + +test('TLS_AES_128_CCM_8_SHA256', 'TLS_AES_128_CCM_8_SHA256', + 'TLS_AES_128_CCM_8_SHA256'); + +// Invalid cipher values +test(9, 'AES256-SHA', U, 'ERR_INVALID_ARG_TYPE', U); +test('AES256-SHA', 9, U, U, 'ERR_INVALID_ARG_TYPE'); +test(':', 'AES256-SHA', U, 'ERR_INVALID_ARG_VALUE', U); +test('AES256-SHA', ':', U, U, 'ERR_INVALID_ARG_VALUE'); + +// Using '' is synonymous for "use default ciphers" +test('TLS_AES_256_GCM_SHA384', '', 'TLS_AES_256_GCM_SHA384'); +test('', 'TLS_AES_256_GCM_SHA384', 'TLS_AES_256_GCM_SHA384'); + +// Using null should be treated the same as undefined. +test(null, 'AES256-SHA', 'AES256-SHA'); +test('AES256-SHA', null, 'AES256-SHA'); diff --git a/tests/node_compat/test/parallel/test-tls-transport-destroy-after-own-gc.js b/tests/node_compat/test/parallel/test-tls-transport-destroy-after-own-gc.js new file mode 100644 index 00000000000000..68ec2c8f905343 --- /dev/null +++ b/tests/node_compat/test/parallel/test-tls-transport-destroy-after-own-gc.js @@ -0,0 +1,36 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Flags: --expose-gc +'use strict'; + +// Regression test for https://github.com/nodejs/node/issues/17475 +// Unfortunately, this tests only "works" reliably when checked with valgrind or +// a similar tool. + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const { TLSSocket } = require('tls'); +const makeDuplexPair = require('../common/duplexpair'); + +let { clientSide } = makeDuplexPair(); + +let clientTLS = new TLSSocket(clientSide, { isServer: false }); +let clientTLSHandle = clientTLS._handle; // eslint-disable-line no-unused-vars + +setImmediate(() => { + clientTLS = null; + global.gc(); + clientTLSHandle = null; + global.gc(); + setImmediate(() => { + clientSide = null; + global.gc(); + }); +}); diff --git a/tests/node_compat/test/parallel/test-trace-events-async-hooks-dynamic.js b/tests/node_compat/test/parallel/test-trace-events-async-hooks-dynamic.js new file mode 100644 index 00000000000000..6c320b54c0d2a5 --- /dev/null +++ b/tests/node_compat/test/parallel/test-trace-events-async-hooks-dynamic.js @@ -0,0 +1,69 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +// This tests that tracing can be enabled dynamically with the +// trace_events module. + +const common = require('../common'); +try { + require('trace_events'); +} catch { + common.skip('missing trace events'); +} + +const assert = require('assert'); +const cp = require('child_process'); +const fs = require('fs'); + +const enable = `require("trace_events").createTracing( +{ categories: ["node.async_hooks"] }).enable();`; +const code = + 'setTimeout(() => { for (let i = 0; i < 100000; i++) { "test" + i } }, 1)'; + +const tmpdir = require('../common/tmpdir'); +const filename = tmpdir.resolve('node_trace.1.log'); + +tmpdir.refresh(); +const proc = cp.spawnSync( + process.execPath, + ['-e', enable + code ], + { + cwd: tmpdir.path, + env: { ...process.env, + 'NODE_DEBUG_NATIVE': 'tracing', + 'NODE_DEBUG': 'tracing' } + }); + +console.log('process exit with signal:', proc.signal); +console.log('process stderr:', proc.stderr.toString()); + +assert.strictEqual(proc.status, 0); +assert(fs.existsSync(filename)); +const data = fs.readFileSync(filename, 'utf-8'); +const traces = JSON.parse(data).traceEvents; + +function filterTimeoutTraces(trace) { + if (trace.pid !== proc.pid) + return false; + if (trace.cat !== 'node,node.async_hooks') + return false; + if (trace.name !== 'Timeout') + return false; + return true; +} + +{ + const timeoutTraces = traces.filter(filterTimeoutTraces); + assert.notDeepStrictEqual(timeoutTraces, []); + const threads = new Set(); + for (const trace of timeoutTraces) { + threads.add(trace.tid); + } + assert.notDeepStrictEqual(timeoutTraces, []); +} diff --git a/tests/node_compat/test/parallel/test-trace-events-async-hooks-worker.js b/tests/node_compat/test/parallel/test-trace-events-async-hooks-worker.js new file mode 100644 index 00000000000000..c924afc56d1d40 --- /dev/null +++ b/tests/node_compat/test/parallel/test-trace-events-async-hooks-worker.js @@ -0,0 +1,78 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +// This tests that enabling node.async_hooks in main threads also +// affects the workers. + +const common = require('../common'); +try { + require('trace_events'); +} catch { + common.skip('missing trace events'); +} + +const assert = require('assert'); +const cp = require('child_process'); +const fs = require('fs'); + +const code = + 'setTimeout(() => { for (let i = 0; i < 100000; i++) { "test" + i } }, 1)'; +const worker = +`const { Worker } = require('worker_threads'); +const worker = new Worker('${code}', +{ eval: true, stdout: true, stderr: true }); +worker.stdout.on('data', + (chunk) => console.log('worker', chunk.toString())); +worker.stderr.on('data', + (chunk) => console.error('worker', chunk.toString())); +worker.on('exit', () => { ${code} })`; + +const tmpdir = require('../common/tmpdir'); +const filename = tmpdir.resolve('node_trace.1.log'); + +tmpdir.refresh(); +const proc = cp.spawnSync( + process.execPath, + [ '--trace-event-categories', 'node.async_hooks', '-e', worker ], + { + cwd: tmpdir.path, + env: { ...process.env, + 'NODE_DEBUG_NATIVE': 'tracing', + 'NODE_DEBUG': 'tracing' } + }); + +console.log('process exit with signal:', proc.signal); +console.log('process stderr:', proc.stderr.toString()); + +assert.strictEqual(proc.status, 0); +assert(fs.existsSync(filename)); +const data = fs.readFileSync(filename, 'utf-8'); +const traces = JSON.parse(data).traceEvents; + +function filterTimeoutTraces(trace) { + if (trace.pid !== proc.pid) + return false; + if (trace.cat !== 'node,node.async_hooks') + return false; + if (trace.name !== 'Timeout') + return false; + return true; +} + +{ + const timeoutTraces = traces.filter(filterTimeoutTraces); + assert.notDeepStrictEqual(timeoutTraces, []); + const threads = new Set(); + for (const trace of timeoutTraces) { + threads.add(trace.tid); + } + assert.notDeepStrictEqual(timeoutTraces, []); + console.log('Threads with Timeout traces:', threads); + assert.strictEqual(threads.size, 2); +} diff --git a/tests/node_compat/test/parallel/test-tty-stdin-end.js b/tests/node_compat/test/parallel/test-tty-stdin-end.js index 05054d052f6f2d..6ac9b8cb9889d7 100644 --- a/tests/node_compat/test/parallel/test-tty-stdin-end.js +++ b/tests/node_compat/test/parallel/test-tty-stdin-end.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-tz-version.js b/tests/node_compat/test/parallel/test-tz-version.js new file mode 100644 index 00000000000000..e09c23db5589da --- /dev/null +++ b/tests/node_compat/test/parallel/test-tz-version.js @@ -0,0 +1,35 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); + +if (!common.hasIntl) { + common.skip('missing Intl'); +} + +// Refs: https://github.com/nodejs/node/blob/1af63a90ca3a59ca05b3a12ad7dbea04008db7d9/configure.py#L1694-L1711 +if (process.config.variables.icu_path !== 'deps/icu-small') { + // If Node.js is configured to use its built-in ICU, it uses a strict subset + // of ICU formed using `tools/icu/shrink-icu-src.py`, which is present in + // `deps/icu-small`. It is not the same as configuring the build with + // `./configure --with-intl=small-icu`. The latter only uses a subset of the + // locales, i.e., it uses the English locale, `root,en`, by default and other + // locales can also be specified using the `--with-icu-locales` option. + common.skip('not using the icu data file present in deps/icu-small/source/data/in/icudt##l.dat.bz2'); +} + +const fixtures = require('../common/fixtures'); + +// This test ensures the correctness of the automated timezone upgrade PRs. + +const { strictEqual } = require('assert'); +const { readFileSync } = require('fs'); + +const expectedVersion = readFileSync(fixtures.path('tz-version.txt'), 'utf8').trim(); +strictEqual(process.versions.tz, expectedVersion); diff --git a/tests/node_compat/test/parallel/test-url-domain-ascii-unicode.js b/tests/node_compat/test/parallel/test-url-domain-ascii-unicode.js index 39f3a0b4360e70..5bb1761683e9bb 100644 --- a/tests/node_compat/test/parallel/test-url-domain-ascii-unicode.js +++ b/tests/node_compat/test/parallel/test-url-domain-ascii-unicode.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-url-fileurltopath.js b/tests/node_compat/test/parallel/test-url-fileurltopath.js index ddebca69216a28..a590fb349b84a5 100644 --- a/tests/node_compat/test/parallel/test-url-fileurltopath.js +++ b/tests/node_compat/test/parallel/test-url-fileurltopath.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-url-format-invalid-input.js b/tests/node_compat/test/parallel/test-url-format-invalid-input.js index 4ea48d0a817472..2a4db69c7ded5a 100644 --- a/tests/node_compat/test/parallel/test-url-format-invalid-input.js +++ b/tests/node_compat/test/parallel/test-url-format-invalid-input.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-url-format-whatwg.js b/tests/node_compat/test/parallel/test-url-format-whatwg.js index ff8f1201cffe64..77101ed96b9d47 100644 --- a/tests/node_compat/test/parallel/test-url-format-whatwg.js +++ b/tests/node_compat/test/parallel/test-url-format-whatwg.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-url-format.js b/tests/node_compat/test/parallel/test-url-format.js index 3162213b8ae11f..fb495328dba1eb 100644 --- a/tests/node_compat/test/parallel/test-url-format.js +++ b/tests/node_compat/test/parallel/test-url-format.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-url-parse-query.js b/tests/node_compat/test/parallel/test-url-parse-query.js index 6f6c425bb6bf1e..da37e9c4e2eab8 100644 --- a/tests/node_compat/test/parallel/test-url-parse-query.js +++ b/tests/node_compat/test/parallel/test-url-parse-query.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-url-pathtofileurl.js b/tests/node_compat/test/parallel/test-url-pathtofileurl.js index d0f2f4b97e301b..e862c0c9df96f4 100644 --- a/tests/node_compat/test/parallel/test-url-pathtofileurl.js +++ b/tests/node_compat/test/parallel/test-url-pathtofileurl.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-url-relative.js b/tests/node_compat/test/parallel/test-url-relative.js index 3b8524c2d08375..15228095444bf4 100644 --- a/tests/node_compat/test/parallel/test-url-relative.js +++ b/tests/node_compat/test/parallel/test-url-relative.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-utf8-scripts.js b/tests/node_compat/test/parallel/test-utf8-scripts.js new file mode 100644 index 00000000000000..e18b4fa71adda9 --- /dev/null +++ b/tests/node_compat/test/parallel/test-utf8-scripts.js @@ -0,0 +1,37 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); + +// üäö + +console.log('Σὲ γνωρίζω ἀπὸ τὴν κόψη'); + +assert.match('Hellö Wörld', /Hellö Wörld/); diff --git a/tests/node_compat/test/parallel/test-util-deprecate-invalid-code.js b/tests/node_compat/test/parallel/test-util-deprecate-invalid-code.js index 96d9425c53fa7c..9bf5d197e94fff 100644 --- a/tests/node_compat/test/parallel/test-util-deprecate-invalid-code.js +++ b/tests/node_compat/test/parallel/test-util-deprecate-invalid-code.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-util-deprecate.js b/tests/node_compat/test/parallel/test-util-deprecate.js index 0a0edd86e47b35..e69fc3364c2b5e 100644 --- a/tests/node_compat/test/parallel/test-util-deprecate.js +++ b/tests/node_compat/test/parallel/test-util-deprecate.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-util-inherits.js b/tests/node_compat/test/parallel/test-util-inherits.js index 3e948619bbd928..7a2a96982d27fb 100644 --- a/tests/node_compat/test/parallel/test-util-inherits.js +++ b/tests/node_compat/test/parallel/test-util-inherits.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-util-inspect-getters-accessing-this.js b/tests/node_compat/test/parallel/test-util-inspect-getters-accessing-this.js new file mode 100644 index 00000000000000..14a2be456c778f --- /dev/null +++ b/tests/node_compat/test/parallel/test-util-inspect-getters-accessing-this.js @@ -0,0 +1,74 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +require('../common'); + +// This test ensures that util.inspect logs getters +// which access this. + +const assert = require('assert'); + +const { inspect } = require('util'); + +{ + class X { + constructor() { + this._y = 123; + } + + get y() { + return this._y; + } + } + + const result = inspect(new X(), { + getters: true, + showHidden: true + }); + + assert.strictEqual( + result, + 'X { _y: 123, [y]: [Getter: 123] }' + ); +} + +// Regression test for https://github.com/nodejs/node/issues/37054 +{ + class A { + constructor(B) { + this.B = B; + } + get b() { + return this.B; + } + } + + class B { + constructor() { + this.A = new A(this); + } + get a() { + return this.A; + } + } + + const result = inspect(new B(), { + depth: 1, + getters: true, + showHidden: true + }); + + assert.strictEqual( + result, + ' B {\n' + + ' A: A { B: [Circular *1], [b]: [Getter] [Circular *1] },\n' + + ' [a]: [Getter] A { B: [Circular *1], [b]: [Getter] [Circular *1] }\n' + + '}', + ); +} diff --git a/tests/node_compat/test/parallel/test-util-inspect-long-running.js b/tests/node_compat/test/parallel/test-util-inspect-long-running.js index 2ddc5dc7ab9dd6..645aaada73f018 100644 --- a/tests/node_compat/test/parallel/test-util-inspect-long-running.js +++ b/tests/node_compat/test/parallel/test-util-inspect-long-running.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-util-primordial-monkeypatching.js b/tests/node_compat/test/parallel/test-util-primordial-monkeypatching.js new file mode 100644 index 00000000000000..927a3504284d6b --- /dev/null +++ b/tests/node_compat/test/parallel/test-util-primordial-monkeypatching.js @@ -0,0 +1,18 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +// Monkeypatch Object.keys() so that it throws an unexpected error. This tests +// that `util.inspect()` is unaffected by monkey-patching `Object`. + +require('../common'); +const assert = require('assert'); +const util = require('util'); + +Object.keys = () => { throw new Error('fhqwhgads'); }; +assert.strictEqual(util.inspect({}), '{}'); diff --git a/tests/node_compat/test/parallel/test-util-types-exists.js b/tests/node_compat/test/parallel/test-util-types-exists.js index 77e7e7b37e8cfe..a58baf725e25ca 100644 --- a/tests/node_compat/test/parallel/test-util-types-exists.js +++ b/tests/node_compat/test/parallel/test-util-types-exists.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-uv-binding-constant.js b/tests/node_compat/test/parallel/test-uv-binding-constant.js new file mode 100644 index 00000000000000..a4b74fddaee096 --- /dev/null +++ b/tests/node_compat/test/parallel/test-uv-binding-constant.js @@ -0,0 +1,26 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Flags: --expose-internals +'use strict'; + +require('../common'); +const assert = require('assert'); +const { internalBinding } = require('internal/test/binding'); +const uv = internalBinding('uv'); + +// Ensures that the `UV_...` values in internalBinding('uv') +// are constants. + +const keys = Object.keys(uv); +keys.forEach((key) => { + if (key.startsWith('UV_')) { + const val = uv[key]; + assert.throws(() => uv[key] = 1, TypeError); + assert.strictEqual(uv[key], val); + } +}); diff --git a/tests/node_compat/test/parallel/test-uv-unmapped-exception.js b/tests/node_compat/test/parallel/test-uv-unmapped-exception.js new file mode 100644 index 00000000000000..7e0ff2b68248d1 --- /dev/null +++ b/tests/node_compat/test/parallel/test-uv-unmapped-exception.js @@ -0,0 +1,33 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Flags: --expose-internals +'use strict'; +require('../common'); +const assert = require('assert'); +const { uvException, uvExceptionWithHostPort } = require('internal/errors'); + +{ + const exception = uvException({ errno: 100, syscall: 'open' }); + + assert.strictEqual(exception.message, 'UNKNOWN: unknown error, open'); + assert.strictEqual(exception.errno, 100); + assert.strictEqual(exception.syscall, 'open'); + assert.strictEqual(exception.code, 'UNKNOWN'); +} + +{ + const exception = uvExceptionWithHostPort(100, 'listen', '127.0.0.1', 80); + + assert.strictEqual(exception.message, + 'listen UNKNOWN: unknown error 127.0.0.1:80'); + assert.strictEqual(exception.code, 'UNKNOWN'); + assert.strictEqual(exception.errno, 100); + assert.strictEqual(exception.syscall, 'listen'); + assert.strictEqual(exception.address, '127.0.0.1'); + assert.strictEqual(exception.port, 80); +} diff --git a/tests/node_compat/test/parallel/test-v8-coverage.js b/tests/node_compat/test/parallel/test-v8-coverage.js new file mode 100644 index 00000000000000..4b3c01a4387246 --- /dev/null +++ b/tests/node_compat/test/parallel/test-v8-coverage.js @@ -0,0 +1,212 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +if (!process.features.inspector) return; + +const common = require('../common'); +const assert = require('assert'); +const fs = require('fs'); +const path = require('path'); +const { spawnSync } = require('child_process'); + +const tmpdir = require('../common/tmpdir'); +tmpdir.refresh(); + +let dirc = 0; +function nextdir() { + return `cov_${++dirc}`; +} + +// Outputs coverage when event loop is drained, with no async logic. +{ + const coverageDirectory = tmpdir.resolve(nextdir()); + const output = spawnSync(process.execPath, [ + require.resolve('../fixtures/v8-coverage/basic'), + ], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } }); + if (output.status !== 0) { + console.log(output.stderr.toString()); + } + assert.strictEqual(output.status, 0); + assert.strictEqual(output.stderr.toString(), ''); + const fixtureCoverage = getFixtureCoverage('basic.js', coverageDirectory); + assert.ok(fixtureCoverage); + // First branch executed. + assert.strictEqual(fixtureCoverage.functions[0].ranges[0].count, 1); + // Second branch did not execute. + assert.strictEqual(fixtureCoverage.functions[0].ranges[1].count, 0); +} + +// Outputs coverage when error is thrown in first tick. +{ + const coverageDirectory = tmpdir.resolve(nextdir()); + const output = spawnSync(process.execPath, [ + require.resolve('../fixtures/v8-coverage/throw'), + ], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } }); + if (output.status !== 1) { + console.log(output.stderr.toString()); + } + assert.strictEqual(output.status, 1); + const fixtureCoverage = getFixtureCoverage('throw.js', coverageDirectory); + assert.ok(fixtureCoverage, 'coverage not found for file'); + // First branch executed. + assert.strictEqual(fixtureCoverage.functions[0].ranges[0].count, 1); + // Second branch did not execute. + assert.strictEqual(fixtureCoverage.functions[0].ranges[1].count, 0); +} + +// Outputs coverage when process.exit(1) exits process. +{ + const coverageDirectory = tmpdir.resolve(nextdir()); + const output = spawnSync(process.execPath, [ + require.resolve('../fixtures/v8-coverage/exit-1'), + ], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } }); + if (output.status !== 1) { + console.log(output.stderr.toString()); + } + assert.strictEqual(output.status, 1); + assert.strictEqual(output.stderr.toString(), ''); + const fixtureCoverage = getFixtureCoverage('exit-1.js', coverageDirectory); + assert.ok(fixtureCoverage, 'coverage not found for file'); + // First branch executed. + assert.strictEqual(fixtureCoverage.functions[0].ranges[0].count, 1); + // Second branch did not execute. + assert.strictEqual(fixtureCoverage.functions[0].ranges[1].count, 0); +} + +// Outputs coverage when process.kill(process.pid, "SIGINT"); exits process. +{ + const coverageDirectory = tmpdir.resolve(nextdir()); + const output = spawnSync(process.execPath, [ + require.resolve('../fixtures/v8-coverage/sigint'), + ], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } }); + if (!common.isWindows) { + if (output.signal !== 'SIGINT') { + console.log(output.stderr.toString()); + } + assert.strictEqual(output.signal, 'SIGINT'); + } + assert.strictEqual(output.stderr.toString(), ''); + const fixtureCoverage = getFixtureCoverage('sigint.js', coverageDirectory); + assert.ok(fixtureCoverage); + // First branch executed. + assert.strictEqual(fixtureCoverage.functions[0].ranges[0].count, 1); + // Second branch did not execute. + assert.strictEqual(fixtureCoverage.functions[0].ranges[1].count, 0); +} + +// Outputs coverage from subprocess. +{ + const coverageDirectory = tmpdir.resolve(nextdir()); + const output = spawnSync(process.execPath, [ + require.resolve('../fixtures/v8-coverage/spawn-subprocess'), + ], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } }); + if (output.status !== 0) { + console.log(output.stderr.toString()); + } + assert.strictEqual(output.status, 0); + assert.strictEqual(output.stderr.toString(), ''); + const fixtureCoverage = getFixtureCoverage('subprocess.js', + coverageDirectory); + assert.ok(fixtureCoverage); + // First branch executed. + assert.strictEqual(fixtureCoverage.functions[1].ranges[0].count, 1); + // Second branch did not execute. + assert.strictEqual(fixtureCoverage.functions[1].ranges[1].count, 0); +} + +// Outputs coverage from worker. +{ + const coverageDirectory = tmpdir.resolve(nextdir()); + const output = spawnSync(process.execPath, [ + require.resolve('../fixtures/v8-coverage/worker'), + ], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } }); + if (output.status !== 0) { + console.log(output.stderr.toString()); + } + assert.strictEqual(output.status, 0); + assert.strictEqual(output.stderr.toString(), ''); + const fixtureCoverage = getFixtureCoverage('subprocess.js', + coverageDirectory); + assert.ok(fixtureCoverage); + // First branch executed. + assert.strictEqual(fixtureCoverage.functions[1].ranges[0].count, 1); + // Second branch did not execute. + assert.strictEqual(fixtureCoverage.functions[1].ranges[1].count, 0); +} + +// Does not output coverage if NODE_V8_COVERAGE is empty. +{ + const coverageDirectory = tmpdir.resolve(nextdir()); + const output = spawnSync(process.execPath, [ + require.resolve('../fixtures/v8-coverage/spawn-subprocess-no-cov'), + ], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } }); + if (output.status !== 0) { + console.log(output.stderr.toString()); + } + assert.strictEqual(output.status, 0); + assert.strictEqual(output.stderr.toString(), ''); + const fixtureCoverage = getFixtureCoverage('subprocess.js', + coverageDirectory); + assert.strictEqual(fixtureCoverage, undefined); +} + +// Disables async hooks before writing coverage. +{ + const coverageDirectory = tmpdir.resolve(nextdir()); + const output = spawnSync(process.execPath, [ + require.resolve('../fixtures/v8-coverage/async-hooks'), + ], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } }); + if (output.status !== 0) { + console.log(output.stderr.toString()); + } + assert.strictEqual(output.status, 0); + assert.strictEqual(output.stderr.toString(), ''); + const fixtureCoverage = getFixtureCoverage('async-hooks.js', + coverageDirectory); + assert.ok(fixtureCoverage); + // First branch executed. + assert.strictEqual(fixtureCoverage.functions[0].ranges[0].count, 1); +} + +// Outputs coverage when the coverage directory is not absolute. +{ + const coverageDirectory = nextdir(); + const absoluteCoverageDirectory = tmpdir.resolve(coverageDirectory); + const output = spawnSync(process.execPath, [ + require.resolve('../fixtures/v8-coverage/basic'), + ], { + cwd: tmpdir.path, + env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } + }); + if (output.status !== 0) { + console.log(output.stderr.toString()); + } + assert.strictEqual(output.status, 0); + assert.strictEqual(output.stderr.toString(), ''); + const fixtureCoverage = getFixtureCoverage('basic.js', + absoluteCoverageDirectory); + assert.ok(fixtureCoverage); + // First branch executed. + assert.strictEqual(fixtureCoverage.functions[0].ranges[0].count, 1); + // Second branch did not execute. + assert.strictEqual(fixtureCoverage.functions[0].ranges[1].count, 0); +} + +// Extracts the coverage object for a given fixture name. +function getFixtureCoverage(fixtureFile, coverageDirectory) { + const coverageFiles = fs.readdirSync(coverageDirectory); + for (const coverageFile of coverageFiles) { + const coverage = require(path.join(coverageDirectory, coverageFile)); + for (const fixtureCoverage of coverage.result) { + if (fixtureCoverage.url.indexOf(`/${fixtureFile}`) !== -1) { + return fixtureCoverage; + } + } + } +} diff --git a/tests/node_compat/test/parallel/test-v8-deserialize-buffer.js b/tests/node_compat/test/parallel/test-v8-deserialize-buffer.js new file mode 100644 index 00000000000000..5740e0dbab1947 --- /dev/null +++ b/tests/node_compat/test/parallel/test-v8-deserialize-buffer.js @@ -0,0 +1,14 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const v8 = require('v8'); + +process.on('warning', common.mustNotCall()); +v8.deserialize(v8.serialize(Buffer.alloc(0))); diff --git a/tests/node_compat/test/parallel/test-v8-flag-pool-size-0.js b/tests/node_compat/test/parallel/test-v8-flag-pool-size-0.js new file mode 100644 index 00000000000000..cce685573dd84f --- /dev/null +++ b/tests/node_compat/test/parallel/test-v8-flag-pool-size-0.js @@ -0,0 +1,17 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Flags: --v8-pool-size=0 --expose-gc + +'use strict'; + +require('../common'); + +// This verifies that V8 tasks scheduled by GC are handled on worker threads if +// `--v8-pool-size=0` is given. The worker threads are managed by Node.js' +// `v8::Platform` implementation. +globalThis.gc(); diff --git a/tests/node_compat/test/parallel/test-v8-global-setter.js b/tests/node_compat/test/parallel/test-v8-global-setter.js new file mode 100644 index 00000000000000..68ee7230f8440f --- /dev/null +++ b/tests/node_compat/test/parallel/test-v8-global-setter.js @@ -0,0 +1,36 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); + +// This test ensures v8 correctly sets a property on the global object if it +// has a setter interceptor in strict mode. +// https://github.com/nodejs/node-v0.x-archive/issues/6235 + +require('vm').runInNewContext('"use strict"; var v = 1; v = 2'); diff --git a/tests/node_compat/test/parallel/test-v8-stop-coverage.js b/tests/node_compat/test/parallel/test-v8-stop-coverage.js new file mode 100644 index 00000000000000..6092d7115d1076 --- /dev/null +++ b/tests/node_compat/test/parallel/test-v8-stop-coverage.js @@ -0,0 +1,41 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +if (!process.features.inspector) return; + +require('../common'); +const fixtures = require('../common/fixtures'); +const tmpdir = require('../common/tmpdir'); +const assert = require('assert'); +const fs = require('fs'); +const { spawnSync } = require('child_process'); + +tmpdir.refresh(); +const intervals = 20; + +{ + const output = spawnSync(process.execPath, [ + '-r', + fixtures.path('v8-coverage', 'stop-coverage'), + '-r', + fixtures.path('v8-coverage', 'take-coverage'), + fixtures.path('v8-coverage', 'interval'), + ], { + env: { + ...process.env, + NODE_V8_COVERAGE: tmpdir.path, + NODE_DEBUG_NATIVE: 'INSPECTOR_PROFILER', + TEST_INTERVALS: intervals + }, + }); + console.log(output.stderr.toString()); + assert.strictEqual(output.status, 0); + const coverageFiles = fs.readdirSync(tmpdir.path); + assert.strictEqual(coverageFiles.length, 0); +} diff --git a/tests/node_compat/test/parallel/test-v8-take-coverage-noop.js b/tests/node_compat/test/parallel/test-v8-take-coverage-noop.js new file mode 100644 index 00000000000000..931895097ebe36 --- /dev/null +++ b/tests/node_compat/test/parallel/test-v8-take-coverage-noop.js @@ -0,0 +1,39 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +if (!process.features.inspector) return; + +require('../common'); +const fixtures = require('../common/fixtures'); +const tmpdir = require('../common/tmpdir'); +const assert = require('assert'); +const fs = require('fs'); +const { spawnSync } = require('child_process'); + +tmpdir.refresh(); + +// v8.takeCoverage() should be a noop if NODE_V8_COVERAGE is not set. +const intervals = 40; +{ + const output = spawnSync(process.execPath, [ + '-r', + fixtures.path('v8-coverage', 'take-coverage'), + fixtures.path('v8-coverage', 'interval'), + ], { + env: { + ...process.env, + NODE_DEBUG_NATIVE: 'INSPECTOR_PROFILER', + TEST_INTERVALS: intervals + }, + }); + console.log(output.stderr.toString()); + assert.strictEqual(output.status, 0); + const coverageFiles = fs.readdirSync(tmpdir.path); + assert.strictEqual(coverageFiles.length, 0); +} diff --git a/tests/node_compat/test/parallel/test-v8-take-coverage.js b/tests/node_compat/test/parallel/test-v8-take-coverage.js new file mode 100644 index 00000000000000..af5bd7b40289a8 --- /dev/null +++ b/tests/node_compat/test/parallel/test-v8-take-coverage.js @@ -0,0 +1,91 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +if (!process.features.inspector) return; + +require('../common'); +const fixtures = require('../common/fixtures'); +const tmpdir = require('../common/tmpdir'); +const assert = require('assert'); +const fs = require('fs'); +const { spawnSync } = require('child_process'); + +tmpdir.refresh(); +const intervals = 40; +// Outputs coverage when v8.takeCoverage() is invoked. +{ + const output = spawnSync(process.execPath, [ + '-r', + fixtures.path('v8-coverage', 'take-coverage'), + fixtures.path('v8-coverage', 'interval'), + ], { + env: { + ...process.env, + NODE_V8_COVERAGE: tmpdir.path, + NODE_DEBUG_NATIVE: 'INSPECTOR_PROFILER', + TEST_INTERVALS: intervals + }, + }); + console.log(output.stderr.toString()); + assert.strictEqual(output.status, 0); + const coverageFiles = fs.readdirSync(tmpdir.path); + + let coverages = []; + for (const coverageFile of coverageFiles) { + const coverage = require(tmpdir.resolve(coverageFile)); + for (const result of coverage.result) { + if (result.url.includes('/interval')) { + coverages.push({ + file: coverageFile, + func: result.functions.find((f) => f.functionName === 'interval'), + timestamp: coverage.timestamp + }); + } + } + } + + coverages = coverages.sort((a, b) => { return a.timestamp - b.timestamp; }); + // There should be two coverages taken, one triggered by v8.takeCoverage(), + // the other by process exit. + console.log('Coverages:', coverages); + assert.strictEqual(coverages.length, 3); + + let blockHitsTotal = 0; + for (let i = 0; i < coverages.length; ++i) { + const { ranges } = coverages[i].func; + console.log('coverage', i, ranges); + + if (i !== coverages.length - 1) { + // When the first two coverages are taken: + assert.strictEqual(ranges.length, 2); + const blockHits = ranges[0].count; + // The block inside interval() should be hit at least once. + assert.notStrictEqual(blockHits, 0); + blockHitsTotal += blockHits; + // The else branch should not be hit. + const elseBranchHits = ranges[1].count; + assert.strictEqual(elseBranchHits, 0); + } else { + // At process exit: + assert.strictEqual(ranges.length, 3); + const blockHits = ranges[0].count; + // The block inside interval() should be hit at least once more. + assert.notStrictEqual(blockHits, 0); + blockHitsTotal += blockHits; + // The else branch should be hit exactly once. + const elseBranchHits = ranges[2].count; + assert.strictEqual(elseBranchHits, 1); + const ifBranchHits = ranges[1].count; + assert.strictEqual(ifBranchHits, blockHits - elseBranchHits); + } + } + + // The block should be hit `intervals` times in total. + assert.strictEqual(blockHitsTotal, intervals); +} diff --git a/tests/node_compat/test/parallel/test-vm-access-process-env.js b/tests/node_compat/test/parallel/test-vm-access-process-env.js index 95f555dac3e31a..d2589b3aa575c5 100644 --- a/tests/node_compat/test/parallel/test-vm-access-process-env.js +++ b/tests/node_compat/test/parallel/test-vm-access-process-env.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-attributes-property-not-on-sandbox.js b/tests/node_compat/test/parallel/test-vm-attributes-property-not-on-sandbox.js index 940fd4e7fe4d65..ef2d21eb42edab 100644 --- a/tests/node_compat/test/parallel/test-vm-attributes-property-not-on-sandbox.js +++ b/tests/node_compat/test/parallel/test-vm-attributes-property-not-on-sandbox.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-codegen.js b/tests/node_compat/test/parallel/test-vm-codegen.js index fff9c287f4b0ef..7d6fec813d1716 100644 --- a/tests/node_compat/test/parallel/test-vm-codegen.js +++ b/tests/node_compat/test/parallel/test-vm-codegen.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-context-async-script.js b/tests/node_compat/test/parallel/test-vm-context-async-script.js index 271567ccf1740f..9ba46ed890ad1d 100644 --- a/tests/node_compat/test/parallel/test-vm-context-async-script.js +++ b/tests/node_compat/test/parallel/test-vm-context-async-script.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-context-property-forwarding.js b/tests/node_compat/test/parallel/test-vm-context-property-forwarding.js index f5073777182140..1ac2b029eb99cd 100644 --- a/tests/node_compat/test/parallel/test-vm-context-property-forwarding.js +++ b/tests/node_compat/test/parallel/test-vm-context-property-forwarding.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-create-and-run-in-context.js b/tests/node_compat/test/parallel/test-vm-create-and-run-in-context.js index 0674c0b7b8185f..21fdc0c676be8d 100644 --- a/tests/node_compat/test/parallel/test-vm-create-and-run-in-context.js +++ b/tests/node_compat/test/parallel/test-vm-create-and-run-in-context.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-create-context-accessors.js b/tests/node_compat/test/parallel/test-vm-create-context-accessors.js index 4b683d687b0a60..bd79ec12dbf5b7 100644 --- a/tests/node_compat/test/parallel/test-vm-create-context-accessors.js +++ b/tests/node_compat/test/parallel/test-vm-create-context-accessors.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-create-context-arg.js b/tests/node_compat/test/parallel/test-vm-create-context-arg.js index 6eb0f7cf9150c6..513584a1959101 100644 --- a/tests/node_compat/test/parallel/test-vm-create-context-arg.js +++ b/tests/node_compat/test/parallel/test-vm-create-context-arg.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-create-context-circular-reference.js b/tests/node_compat/test/parallel/test-vm-create-context-circular-reference.js index 95056a3d96d8d6..501c728a77d089 100644 --- a/tests/node_compat/test/parallel/test-vm-create-context-circular-reference.js +++ b/tests/node_compat/test/parallel/test-vm-create-context-circular-reference.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-createcacheddata.js b/tests/node_compat/test/parallel/test-vm-createcacheddata.js index 0e786364d3e715..77f5385977c70a 100644 --- a/tests/node_compat/test/parallel/test-vm-createcacheddata.js +++ b/tests/node_compat/test/parallel/test-vm-createcacheddata.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-cross-context.js b/tests/node_compat/test/parallel/test-vm-cross-context.js index 3a1f1678ec5f9e..3107be6a6174eb 100644 --- a/tests/node_compat/test/parallel/test-vm-cross-context.js +++ b/tests/node_compat/test/parallel/test-vm-cross-context.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-data-property-writable.js b/tests/node_compat/test/parallel/test-vm-data-property-writable.js index 1ce76480183af1..f18f1f65969239 100644 --- a/tests/node_compat/test/parallel/test-vm-data-property-writable.js +++ b/tests/node_compat/test/parallel/test-vm-data-property-writable.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-deleting-property.js b/tests/node_compat/test/parallel/test-vm-deleting-property.js index df5ac859a74ceb..b01a7b05e1b3ab 100644 --- a/tests/node_compat/test/parallel/test-vm-deleting-property.js +++ b/tests/node_compat/test/parallel/test-vm-deleting-property.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-function-declaration.js b/tests/node_compat/test/parallel/test-vm-function-declaration.js index 209720c757e736..0bbe7589c57cad 100644 --- a/tests/node_compat/test/parallel/test-vm-function-declaration.js +++ b/tests/node_compat/test/parallel/test-vm-function-declaration.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-function-redefinition.js b/tests/node_compat/test/parallel/test-vm-function-redefinition.js index 7bc62ac0ede364..44ba8da11e6f55 100644 --- a/tests/node_compat/test/parallel/test-vm-function-redefinition.js +++ b/tests/node_compat/test/parallel/test-vm-function-redefinition.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-getters.js b/tests/node_compat/test/parallel/test-vm-getters.js index b9c28014ad494c..8a88abc9ae8910 100644 --- a/tests/node_compat/test/parallel/test-vm-getters.js +++ b/tests/node_compat/test/parallel/test-vm-getters.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-global-assignment.js b/tests/node_compat/test/parallel/test-vm-global-assignment.js index c8fc516d6591e2..1160dca1d78967 100644 --- a/tests/node_compat/test/parallel/test-vm-global-assignment.js +++ b/tests/node_compat/test/parallel/test-vm-global-assignment.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-global-define-property.js b/tests/node_compat/test/parallel/test-vm-global-define-property.js index 28f5070c27c19b..76ad6742e58770 100644 --- a/tests/node_compat/test/parallel/test-vm-global-define-property.js +++ b/tests/node_compat/test/parallel/test-vm-global-define-property.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-global-identity.js b/tests/node_compat/test/parallel/test-vm-global-identity.js index 5413ca94a2fd71..68780ca544250a 100644 --- a/tests/node_compat/test/parallel/test-vm-global-identity.js +++ b/tests/node_compat/test/parallel/test-vm-global-identity.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-global-setter.js b/tests/node_compat/test/parallel/test-vm-global-setter.js index 8f1f862f360cf5..4908ce82caf869 100644 --- a/tests/node_compat/test/parallel/test-vm-global-setter.js +++ b/tests/node_compat/test/parallel/test-vm-global-setter.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-harmony-symbols.js b/tests/node_compat/test/parallel/test-vm-harmony-symbols.js index d4713a2e2424c4..c597b1b49c7995 100644 --- a/tests/node_compat/test/parallel/test-vm-harmony-symbols.js +++ b/tests/node_compat/test/parallel/test-vm-harmony-symbols.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-indexed-properties.js b/tests/node_compat/test/parallel/test-vm-indexed-properties.js index 332905ff74ee3f..dda0aa90321e62 100644 --- a/tests/node_compat/test/parallel/test-vm-indexed-properties.js +++ b/tests/node_compat/test/parallel/test-vm-indexed-properties.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-inherited_properties.js b/tests/node_compat/test/parallel/test-vm-inherited_properties.js index 4994a8ceab2944..a2366bfef6303a 100644 --- a/tests/node_compat/test/parallel/test-vm-inherited_properties.js +++ b/tests/node_compat/test/parallel/test-vm-inherited_properties.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-is-context.js b/tests/node_compat/test/parallel/test-vm-is-context.js index fdbaa36d66b927..95217bc59762f2 100644 --- a/tests/node_compat/test/parallel/test-vm-is-context.js +++ b/tests/node_compat/test/parallel/test-vm-is-context.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-low-stack-space.js b/tests/node_compat/test/parallel/test-vm-low-stack-space.js index d1013772463e19..860bececc46358 100644 --- a/tests/node_compat/test/parallel/test-vm-low-stack-space.js +++ b/tests/node_compat/test/parallel/test-vm-low-stack-space.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-new-script-new-context.js b/tests/node_compat/test/parallel/test-vm-new-script-new-context.js index aada1626297204..b46f99b8f1b518 100644 --- a/tests/node_compat/test/parallel/test-vm-new-script-new-context.js +++ b/tests/node_compat/test/parallel/test-vm-new-script-new-context.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-new-script-this-context.js b/tests/node_compat/test/parallel/test-vm-new-script-this-context.js index 8774711f4be7ef..6f8247233ff8ee 100644 --- a/tests/node_compat/test/parallel/test-vm-new-script-this-context.js +++ b/tests/node_compat/test/parallel/test-vm-new-script-this-context.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-not-strict.js b/tests/node_compat/test/parallel/test-vm-not-strict.js index c5dee3a2c65084..725e00a9a6e2d5 100644 --- a/tests/node_compat/test/parallel/test-vm-not-strict.js +++ b/tests/node_compat/test/parallel/test-vm-not-strict.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. /* eslint-disable strict, no-var, no-delete-var, no-undef, node-core/required-modules, node-core/require-common-first */ diff --git a/tests/node_compat/test/parallel/test-vm-options-validation.js b/tests/node_compat/test/parallel/test-vm-options-validation.js index d1b215ed7024c2..430414379ecbd8 100644 --- a/tests/node_compat/test/parallel/test-vm-options-validation.js +++ b/tests/node_compat/test/parallel/test-vm-options-validation.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-parse-abort-on-uncaught-exception.js b/tests/node_compat/test/parallel/test-vm-parse-abort-on-uncaught-exception.js index e8cae690af6551..16a55508897d69 100644 --- a/tests/node_compat/test/parallel/test-vm-parse-abort-on-uncaught-exception.js +++ b/tests/node_compat/test/parallel/test-vm-parse-abort-on-uncaught-exception.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Flags: --abort-on-uncaught-exception diff --git a/tests/node_compat/test/parallel/test-vm-preserves-property.js b/tests/node_compat/test/parallel/test-vm-preserves-property.js index 28f662a1a21f18..f415aa37d44423 100644 --- a/tests/node_compat/test/parallel/test-vm-preserves-property.js +++ b/tests/node_compat/test/parallel/test-vm-preserves-property.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-property-not-on-sandbox.js b/tests/node_compat/test/parallel/test-vm-property-not-on-sandbox.js index 360a5dabf81375..8fe3a25843cfdc 100644 --- a/tests/node_compat/test/parallel/test-vm-property-not-on-sandbox.js +++ b/tests/node_compat/test/parallel/test-vm-property-not-on-sandbox.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-proxies.js b/tests/node_compat/test/parallel/test-vm-proxies.js index c485e0a62aedeb..a7e86400511b26 100644 --- a/tests/node_compat/test/parallel/test-vm-proxies.js +++ b/tests/node_compat/test/parallel/test-vm-proxies.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-proxy-failure-CP.js b/tests/node_compat/test/parallel/test-vm-proxy-failure-CP.js index 2f503bd312c039..850696f7a49132 100644 --- a/tests/node_compat/test/parallel/test-vm-proxy-failure-CP.js +++ b/tests/node_compat/test/parallel/test-vm-proxy-failure-CP.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-script-throw-in-tostring.js b/tests/node_compat/test/parallel/test-vm-script-throw-in-tostring.js index c1357308643d92..e64777c2928ed4 100644 --- a/tests/node_compat/test/parallel/test-vm-script-throw-in-tostring.js +++ b/tests/node_compat/test/parallel/test-vm-script-throw-in-tostring.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-set-property-proxy.js b/tests/node_compat/test/parallel/test-vm-set-property-proxy.js index 61f80902c9ffdf..b1b0909a41c86e 100644 --- a/tests/node_compat/test/parallel/test-vm-set-property-proxy.js +++ b/tests/node_compat/test/parallel/test-vm-set-property-proxy.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-set-proto-null-on-globalthis.js b/tests/node_compat/test/parallel/test-vm-set-proto-null-on-globalthis.js index 77986466800d30..9b320678909c5a 100644 --- a/tests/node_compat/test/parallel/test-vm-set-proto-null-on-globalthis.js +++ b/tests/node_compat/test/parallel/test-vm-set-proto-null-on-globalthis.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-source-map-url.js b/tests/node_compat/test/parallel/test-vm-source-map-url.js index fb91ff1fc5cf34..f8aafaf3e94ea0 100644 --- a/tests/node_compat/test/parallel/test-vm-source-map-url.js +++ b/tests/node_compat/test/parallel/test-vm-source-map-url.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-static-this.js b/tests/node_compat/test/parallel/test-vm-static-this.js index 58388ba94ea3ca..e99c6438cbbb55 100644 --- a/tests/node_compat/test/parallel/test-vm-static-this.js +++ b/tests/node_compat/test/parallel/test-vm-static-this.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-vm-strict-mode.js b/tests/node_compat/test/parallel/test-vm-strict-mode.js index e759bd2c470cac..9d018216a6e72c 100644 --- a/tests/node_compat/test/parallel/test-vm-strict-mode.js +++ b/tests/node_compat/test/parallel/test-vm-strict-mode.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-symbols.js b/tests/node_compat/test/parallel/test-vm-symbols.js index fbaff6a829b850..a4317f24a94523 100644 --- a/tests/node_compat/test/parallel/test-vm-symbols.js +++ b/tests/node_compat/test/parallel/test-vm-symbols.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-timeout-escape-promise-2.js b/tests/node_compat/test/parallel/test-vm-timeout-escape-promise-2.js index 19ba0a68217c66..176284eee3824d 100644 --- a/tests/node_compat/test/parallel/test-vm-timeout-escape-promise-2.js +++ b/tests/node_compat/test/parallel/test-vm-timeout-escape-promise-2.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-timeout-escape-promise.js b/tests/node_compat/test/parallel/test-vm-timeout-escape-promise.js index c2393a852abb1c..0bf90936d960ca 100644 --- a/tests/node_compat/test/parallel/test-vm-timeout-escape-promise.js +++ b/tests/node_compat/test/parallel/test-vm-timeout-escape-promise.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-vm-timeout.js b/tests/node_compat/test/parallel/test-vm-timeout.js index d345206404e8df..d080dc8eedd7bc 100644 --- a/tests/node_compat/test/parallel/test-vm-timeout.js +++ b/tests/node_compat/test/parallel/test-vm-timeout.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-weakref.js b/tests/node_compat/test/parallel/test-weakref.js new file mode 100644 index 00000000000000..119bf612ae576e --- /dev/null +++ b/tests/node_compat/test/parallel/test-weakref.js @@ -0,0 +1,20 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +// Flags: --expose-gc + +require('../common'); +const assert = require('assert'); + +const w = new globalThis.WeakRef({}); + +setTimeout(() => { + globalThis.gc(); + assert.strictEqual(w.deref(), undefined); +}, 200); diff --git a/tests/node_compat/test/parallel/test-webcrypto-encrypt-decrypt.js b/tests/node_compat/test/parallel/test-webcrypto-encrypt-decrypt.js new file mode 100644 index 00000000000000..1bbfd185e1e782 --- /dev/null +++ b/tests/node_compat/test/parallel/test-webcrypto-encrypt-decrypt.js @@ -0,0 +1,131 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); + +if (!common.hasCrypto) + common.skip('missing crypto'); + +const assert = require('assert'); +const { subtle } = globalThis.crypto; + +// This is only a partial test. The WebCrypto Web Platform Tests +// will provide much greater coverage. + +// Test Encrypt/Decrypt RSA-OAEP +{ + const buf = globalThis.crypto.getRandomValues(new Uint8Array(50)); + + async function test() { + const ec = new TextEncoder(); + const { publicKey, privateKey } = await subtle.generateKey({ + name: 'RSA-OAEP', + modulusLength: 2048, + publicExponent: new Uint8Array([1, 0, 1]), + hash: 'SHA-384', + }, true, ['encrypt', 'decrypt']); + + const ciphertext = await subtle.encrypt({ + name: 'RSA-OAEP', + label: ec.encode('a label') + }, publicKey, buf); + + const plaintext = await subtle.decrypt({ + name: 'RSA-OAEP', + label: ec.encode('a label') + }, privateKey, ciphertext); + + assert.strictEqual( + Buffer.from(plaintext).toString('hex'), + Buffer.from(buf).toString('hex')); + } + + test().then(common.mustCall()); +} + +// Test Encrypt/Decrypt AES-CTR +{ + const buf = globalThis.crypto.getRandomValues(new Uint8Array(50)); + const counter = globalThis.crypto.getRandomValues(new Uint8Array(16)); + + async function test() { + const key = await subtle.generateKey({ + name: 'AES-CTR', + length: 256 + }, true, ['encrypt', 'decrypt']); + + const ciphertext = await subtle.encrypt( + { name: 'AES-CTR', counter, length: 64 }, key, buf, + ); + + const plaintext = await subtle.decrypt( + { name: 'AES-CTR', counter, length: 64 }, key, ciphertext, + ); + + assert.strictEqual( + Buffer.from(plaintext).toString('hex'), + Buffer.from(buf).toString('hex')); + } + + test().then(common.mustCall()); +} + +// Test Encrypt/Decrypt AES-CBC +{ + const buf = globalThis.crypto.getRandomValues(new Uint8Array(50)); + const iv = globalThis.crypto.getRandomValues(new Uint8Array(16)); + + async function test() { + const key = await subtle.generateKey({ + name: 'AES-CBC', + length: 256 + }, true, ['encrypt', 'decrypt']); + + const ciphertext = await subtle.encrypt( + { name: 'AES-CBC', iv }, key, buf, + ); + + const plaintext = await subtle.decrypt( + { name: 'AES-CBC', iv }, key, ciphertext, + ); + + assert.strictEqual( + Buffer.from(plaintext).toString('hex'), + Buffer.from(buf).toString('hex')); + } + + test().then(common.mustCall()); +} + +// Test Encrypt/Decrypt AES-GCM +{ + const buf = globalThis.crypto.getRandomValues(new Uint8Array(50)); + const iv = globalThis.crypto.getRandomValues(new Uint8Array(12)); + + async function test() { + const key = await subtle.generateKey({ + name: 'AES-GCM', + length: 256 + }, true, ['encrypt', 'decrypt']); + + const ciphertext = await subtle.encrypt( + { name: 'AES-GCM', iv }, key, buf, + ); + + const plaintext = await subtle.decrypt( + { name: 'AES-GCM', iv }, key, ciphertext, + ); + + assert.strictEqual( + Buffer.from(plaintext).toString('hex'), + Buffer.from(buf).toString('hex')); + } + + test().then(common.mustCall()); +} diff --git a/tests/node_compat/test/parallel/test-websocket.js b/tests/node_compat/test/parallel/test-websocket.js new file mode 100644 index 00000000000000..325171173276b4 --- /dev/null +++ b/tests/node_compat/test/parallel/test-websocket.js @@ -0,0 +1,14 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Flags: --experimental-websocket +'use strict'; + +require('../common'); +const assert = require('assert'); + +assert.strictEqual(typeof WebSocket, 'function'); diff --git a/tests/node_compat/test/parallel/test-webstream-string-tag.js b/tests/node_compat/test/parallel/test-webstream-string-tag.js new file mode 100644 index 00000000000000..9c44b57ce8abb3 --- /dev/null +++ b/tests/node_compat/test/parallel/test-webstream-string-tag.js @@ -0,0 +1,25 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +require('../common'); + +const assert = require('assert'); + +const classesToBeTested = [ WritableStream, WritableStreamDefaultWriter, WritableStreamDefaultController, + ReadableStream, ReadableStreamBYOBRequest, ReadableStreamDefaultReader, + ReadableStreamBYOBReader, ReadableStreamDefaultController, ReadableByteStreamController, + ByteLengthQueuingStrategy, CountQueuingStrategy, TransformStream, + TransformStreamDefaultController]; + + +classesToBeTested.forEach((cls) => { + assert.strictEqual(cls.prototype[Symbol.toStringTag], cls.name); + assert.deepStrictEqual(Object.getOwnPropertyDescriptor(cls.prototype, Symbol.toStringTag), + { configurable: true, enumerable: false, value: cls.name, writable: false }); +}); diff --git a/tests/node_compat/test/parallel/test-whatwg-encoding-custom-api-basics.js b/tests/node_compat/test/parallel/test-whatwg-encoding-custom-api-basics.js index f1ca3b0bf8a4b1..0e743648f7ce7a 100644 --- a/tests/node_compat/test/parallel/test-whatwg-encoding-custom-api-basics.js +++ b/tests/node_compat/test/parallel/test-whatwg-encoding-custom-api-basics.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-whatwg-encoding-custom-textdecoder-ignorebom.js b/tests/node_compat/test/parallel/test-whatwg-encoding-custom-textdecoder-ignorebom.js index 39c3a6f9d4f0ca..0391378eda2b81 100644 --- a/tests/node_compat/test/parallel/test-whatwg-encoding-custom-textdecoder-ignorebom.js +++ b/tests/node_compat/test/parallel/test-whatwg-encoding-custom-textdecoder-ignorebom.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-whatwg-encoding-custom-textdecoder-streaming.js b/tests/node_compat/test/parallel/test-whatwg-encoding-custom-textdecoder-streaming.js index 05a8988feca583..152d084c5a42a3 100644 --- a/tests/node_compat/test/parallel/test-whatwg-encoding-custom-textdecoder-streaming.js +++ b/tests/node_compat/test/parallel/test-whatwg-encoding-custom-textdecoder-streaming.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-whatwg-events-add-event-listener-options-passive.js b/tests/node_compat/test/parallel/test-whatwg-events-add-event-listener-options-passive.js index 98a3c6c49d641d..f6a9eddf33fe58 100644 --- a/tests/node_compat/test/parallel/test-whatwg-events-add-event-listener-options-passive.js +++ b/tests/node_compat/test/parallel/test-whatwg-events-add-event-listener-options-passive.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-whatwg-events-add-event-listener-options-signal.js b/tests/node_compat/test/parallel/test-whatwg-events-add-event-listener-options-signal.js index 74055b00e69cc5..93a332ab43abb1 100644 --- a/tests/node_compat/test/parallel/test-whatwg-events-add-event-listener-options-signal.js +++ b/tests/node_compat/test/parallel/test-whatwg-events-add-event-listener-options-signal.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-whatwg-events-customevent.js b/tests/node_compat/test/parallel/test-whatwg-events-customevent.js index 1b8584d9c95cdf..44c68a72a491cd 100644 --- a/tests/node_compat/test/parallel/test-whatwg-events-customevent.js +++ b/tests/node_compat/test/parallel/test-whatwg-events-customevent.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-whatwg-readablebytestreambyob.js b/tests/node_compat/test/parallel/test-whatwg-readablebytestreambyob.js new file mode 100644 index 00000000000000..db0125bde139a3 --- /dev/null +++ b/tests/node_compat/test/parallel/test-whatwg-readablebytestreambyob.js @@ -0,0 +1,69 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); + +const { + open, +} = require('fs/promises'); + +const { + Buffer, +} = require('buffer'); + +class Source { + async start(controller) { + this.file = await open(__filename); + this.controller = controller; + } + + async pull(controller) { + const byobRequest = controller.byobRequest; + const view = byobRequest.view; + + const { + bytesRead, + } = await this.file.read({ + buffer: view, + offset: view.byteOffset, + length: view.byteLength + }); + + if (bytesRead === 0) { + await this.file.close(); + this.controller.close(); + } + + byobRequest.respond(bytesRead); + } + + get type() { return 'bytes'; } + + get autoAllocateChunkSize() { return 1024; } +} + +(async () => { + const source = new Source(); + const stream = new ReadableStream(source); + + const { emitWarning } = process; + + process.emitWarning = common.mustNotCall(); + + try { + const reader = stream.getReader({ mode: 'byob' }); + + let result; + do { + result = await reader.read(Buffer.alloc(100)); + } while (!result.done); + } finally { + process.emitWarning = emitWarning; + } +})().then(common.mustCall()); diff --git a/tests/node_compat/test/parallel/test-whatwg-url-custom-deepequal.js b/tests/node_compat/test/parallel/test-whatwg-url-custom-deepequal.js index 26fb76421d51db..2980f554af3eb7 100644 --- a/tests/node_compat/test/parallel/test-whatwg-url-custom-deepequal.js +++ b/tests/node_compat/test/parallel/test-whatwg-url-custom-deepequal.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-whatwg-url-custom-global.js b/tests/node_compat/test/parallel/test-whatwg-url-custom-global.js index 265b0da9e6d13d..39d3cc002db2d8 100644 --- a/tests/node_compat/test/parallel/test-whatwg-url-custom-global.js +++ b/tests/node_compat/test/parallel/test-whatwg-url-custom-global.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-whatwg-url-custom-href-side-effect.js b/tests/node_compat/test/parallel/test-whatwg-url-custom-href-side-effect.js index b23df5bf133c27..e2fbbca398c67c 100644 --- a/tests/node_compat/test/parallel/test-whatwg-url-custom-href-side-effect.js +++ b/tests/node_compat/test/parallel/test-whatwg-url-custom-href-side-effect.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-whatwg-url-custom-tostringtag.js b/tests/node_compat/test/parallel/test-whatwg-url-custom-tostringtag.js index d8464ad2f92647..404d6d8bcf5003 100644 --- a/tests/node_compat/test/parallel/test-whatwg-url-custom-tostringtag.js +++ b/tests/node_compat/test/parallel/test-whatwg-url-custom-tostringtag.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-whatwg-url-override-hostname.js b/tests/node_compat/test/parallel/test-whatwg-url-override-hostname.js index 79ce9002f76337..96a7dfe727c7ed 100644 --- a/tests/node_compat/test/parallel/test-whatwg-url-override-hostname.js +++ b/tests/node_compat/test/parallel/test-whatwg-url-override-hostname.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-worker-cleanexit-with-js.js b/tests/node_compat/test/parallel/test-worker-cleanexit-with-js.js new file mode 100644 index 00000000000000..1be06d334728cf --- /dev/null +++ b/tests/node_compat/test/parallel/test-worker-cleanexit-with-js.js @@ -0,0 +1,28 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); + +// Harden the thread interactions on the exit path. +// Ensure workers are able to bail out safe at +// arbitrary execution points. By running a lot of +// JS code in a tight loop, the expectation +// is that those will be at various control flow points +// preferably in the JS land. + +const { Worker } = require('worker_threads'); +const code = 'setInterval(() => {' + + "require('v8').deserialize(require('v8').serialize({ foo: 'bar' }));" + + "require('vm').runInThisContext('x = \"foo\";');" + + "eval('const y = \"vm\";');}, 10);"; +for (let i = 0; i < 9; i++) { + new Worker(code, { eval: true }); +} +new Worker(code, { eval: true }).on('online', common.mustCall((msg) => { + process.exit(0); +})); diff --git a/tests/node_compat/test/parallel/test-worker-message-port-infinite-message-loop.js b/tests/node_compat/test/parallel/test-worker-message-port-infinite-message-loop.js index 784f72b9bda5a1..f2a4a3242eb969 100644 --- a/tests/node_compat/test/parallel/test-worker-message-port-infinite-message-loop.js +++ b/tests/node_compat/test/parallel/test-worker-message-port-infinite-message-loop.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-worker-message-port-multiple-sharedarraybuffers.js b/tests/node_compat/test/parallel/test-worker-message-port-multiple-sharedarraybuffers.js index 38f0d0d4fac398..986e7f1fb65c11 100644 --- a/tests/node_compat/test/parallel/test-worker-message-port-multiple-sharedarraybuffers.js +++ b/tests/node_compat/test/parallel/test-worker-message-port-multiple-sharedarraybuffers.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-worker-on-process-exit.js b/tests/node_compat/test/parallel/test-worker-on-process-exit.js new file mode 100644 index 00000000000000..4e821c2ac64083 --- /dev/null +++ b/tests/node_compat/test/parallel/test-worker-on-process-exit.js @@ -0,0 +1,29 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); +const assert = require('assert'); +const { spawnSync } = require('child_process'); +const { Worker } = require('worker_threads'); + +// Test that 'exit' events for Workers are not received when the main thread +// terminates itself through process.exit(). + +if (process.argv[2] !== 'child') { + const { + stdout, stderr, status + } = spawnSync(process.execPath, [__filename, 'child'], { encoding: 'utf8' }); + assert.strictEqual(stderr, ''); + assert.strictEqual(stdout, ''); + assert.strictEqual(status, 0); +} else { + const nestedWorker = new Worker('setInterval(() => {}, 100)', { eval: true }); + // This console.log() should never fire. + nestedWorker.on('exit', () => console.log('exit event received')); + nestedWorker.on('online', () => process.exit()); +} diff --git a/tests/node_compat/test/parallel/test-worker-ref-onexit.js b/tests/node_compat/test/parallel/test-worker-ref-onexit.js new file mode 100644 index 00000000000000..6bfccb7e8f0e60 --- /dev/null +++ b/tests/node_compat/test/parallel/test-worker-ref-onexit.js @@ -0,0 +1,19 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const { Worker } = require('worker_threads'); + +// Check that worker.unref() makes the 'exit' event not be emitted, if it is +// the only thing we would otherwise be waiting for. + +// Use `setInterval()` to make sure the worker is alive until the end of the +// event loop turn. +const w = new Worker('setInterval(() => {}, 100);', { eval: true }); +w.unref(); +w.on('exit', common.mustNotCall()); diff --git a/tests/node_compat/test/parallel/test-worker-terminate-unrefed.js b/tests/node_compat/test/parallel/test-worker-terminate-unrefed.js new file mode 100644 index 00000000000000..3647c96efdde17 --- /dev/null +++ b/tests/node_compat/test/parallel/test-worker-terminate-unrefed.js @@ -0,0 +1,23 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const { once } = require('events'); +const { Worker } = require('worker_threads'); + +// Test that calling worker.terminate() on an unref()’ed Worker instance +// still resolves the returned Promise. + +async function test() { + const worker = new Worker('setTimeout(() => {}, 1000000);', { eval: true }); + await once(worker, 'online'); + worker.unref(); + await worker.terminate(); +} + +test().then(common.mustCall()); diff --git a/tests/node_compat/test/parallel/test-zlib-close-after-error.js b/tests/node_compat/test/parallel/test-zlib-close-after-error.js index e0a9e3822b33cc..845a34b39bc044 100644 --- a/tests/node_compat/test/parallel/test-zlib-close-after-error.js +++ b/tests/node_compat/test/parallel/test-zlib-close-after-error.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-zlib-close-after-write.js b/tests/node_compat/test/parallel/test-zlib-close-after-write.js index 82e08d0f918577..76abf5ac68520d 100644 --- a/tests/node_compat/test/parallel/test-zlib-close-after-write.js +++ b/tests/node_compat/test/parallel/test-zlib-close-after-write.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-zlib-create-raw.js b/tests/node_compat/test/parallel/test-zlib-create-raw.js new file mode 100644 index 00000000000000..d8367a889b75a3 --- /dev/null +++ b/tests/node_compat/test/parallel/test-zlib-create-raw.js @@ -0,0 +1,22 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +require('../common'); +const assert = require('assert'); +const zlib = require('zlib'); + +{ + const inflateRaw = zlib.createInflateRaw(); + assert(inflateRaw instanceof zlib.InflateRaw); +} + +{ + const deflateRaw = zlib.createDeflateRaw(); + assert(deflateRaw instanceof zlib.DeflateRaw); +} diff --git a/tests/node_compat/test/parallel/test-zlib-deflate-raw-inherits.js b/tests/node_compat/test/parallel/test-zlib-deflate-raw-inherits.js index 87081f2757c6ad..6c884bb0010791 100644 --- a/tests/node_compat/test/parallel/test-zlib-deflate-raw-inherits.js +++ b/tests/node_compat/test/parallel/test-zlib-deflate-raw-inherits.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-zlib-destroy-pipe.js b/tests/node_compat/test/parallel/test-zlib-destroy-pipe.js index 16c97e7d942b05..3877b887762abd 100644 --- a/tests/node_compat/test/parallel/test-zlib-destroy-pipe.js +++ b/tests/node_compat/test/parallel/test-zlib-destroy-pipe.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-zlib-flush-write-sync-interleaved.js b/tests/node_compat/test/parallel/test-zlib-flush-write-sync-interleaved.js new file mode 100644 index 00000000000000..c398880fc75372 --- /dev/null +++ b/tests/node_compat/test/parallel/test-zlib-flush-write-sync-interleaved.js @@ -0,0 +1,64 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const { createGzip, createGunzip, Z_PARTIAL_FLUSH } = require('zlib'); + +// Verify that .flush() behaves like .write() in terms of ordering, e.g. in +// a sequence like .write() + .flush() + .write() + .flush() each .flush() call +// only affects the data written before it. +// Refs: https://github.com/nodejs/node/issues/28478 + +const compress = createGzip(); +const decompress = createGunzip(); +decompress.setEncoding('utf8'); + +const events = []; +const compressedChunks = []; + +for (const chunk of ['abc', 'def', 'ghi']) { + compress.write(chunk, common.mustCall(() => events.push({ written: chunk }))); + compress.flush(Z_PARTIAL_FLUSH, common.mustCall(() => { + events.push('flushed'); + const chunk = compress.read(); + if (chunk !== null) + compressedChunks.push(chunk); + })); +} + +compress.end(common.mustCall(() => { + events.push('compress end'); + writeToDecompress(); +})); + +function writeToDecompress() { + // Write the compressed chunks to a decompressor, one by one, in order to + // verify that the flushes actually worked. + const chunk = compressedChunks.shift(); + if (chunk === undefined) return decompress.end(); + decompress.write(chunk, common.mustCall(() => { + events.push({ read: decompress.read() }); + writeToDecompress(); + })); +} + +process.on('exit', () => { + assert.deepStrictEqual(events, [ + { written: 'abc' }, + 'flushed', + { written: 'def' }, + 'flushed', + { written: 'ghi' }, + 'flushed', + 'compress end', + { read: 'abc' }, + { read: 'def' }, + { read: 'ghi' }, + ]); +}); diff --git a/tests/node_compat/test/parallel/test-zlib-from-string.js b/tests/node_compat/test/parallel/test-zlib-from-string.js index f7dc413ed9f49e..42ccd0f0952dd6 100644 --- a/tests/node_compat/test/parallel/test-zlib-from-string.js +++ b/tests/node_compat/test/parallel/test-zlib-from-string.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // Copyright Joyent, Inc. and other Node contributors. diff --git a/tests/node_compat/test/parallel/test-zlib-no-stream.js b/tests/node_compat/test/parallel/test-zlib-no-stream.js index aceaca5166e539..f26cd4b2408572 100644 --- a/tests/node_compat/test/parallel/test-zlib-no-stream.js +++ b/tests/node_compat/test/parallel/test-zlib-no-stream.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. /* eslint-disable node-core/required-modules */ diff --git a/tests/node_compat/test/parallel/test-zlib-sync-no-event.js b/tests/node_compat/test/parallel/test-zlib-sync-no-event.js index dfd450a4080ce9..f0b7c998ceecf0 100644 --- a/tests/node_compat/test/parallel/test-zlib-sync-no-event.js +++ b/tests/node_compat/test/parallel/test-zlib-sync-no-event.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-zlib-truncated.js b/tests/node_compat/test/parallel/test-zlib-truncated.js index 184d9ddc5d7154..f73cfd187e0f69 100644 --- a/tests/node_compat/test/parallel/test-zlib-truncated.js +++ b/tests/node_compat/test/parallel/test-zlib-truncated.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-zlib-unzip-one-byte-chunks.js b/tests/node_compat/test/parallel/test-zlib-unzip-one-byte-chunks.js index e5fd62d03825c7..4b295537a25ef4 100644 --- a/tests/node_compat/test/parallel/test-zlib-unzip-one-byte-chunks.js +++ b/tests/node_compat/test/parallel/test-zlib-unzip-one-byte-chunks.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/parallel/test-zlib-write-after-end.js b/tests/node_compat/test/parallel/test-zlib-write-after-end.js index c8c302c22042b4..452fa99c324191 100644 --- a/tests/node_compat/test/parallel/test-zlib-write-after-end.js +++ b/tests/node_compat/test/parallel/test-zlib-write-after-end.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/pseudo-tty/console-dumb-tty.js b/tests/node_compat/test/pseudo-tty/console-dumb-tty.js index a9ea5181123643..9039851e626623 100644 --- a/tests/node_compat/test/pseudo-tty/console-dumb-tty.js +++ b/tests/node_compat/test/pseudo-tty/console-dumb-tty.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/pseudo-tty/console_colors.js b/tests/node_compat/test/pseudo-tty/console_colors.js index 5680a7ef2f0139..c5a6d61ede7d31 100644 --- a/tests/node_compat/test/pseudo-tty/console_colors.js +++ b/tests/node_compat/test/pseudo-tty/console_colors.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/pseudo-tty/no_dropped_stdio.js b/tests/node_compat/test/pseudo-tty/no_dropped_stdio.js index b852083d706732..c8ee979aa69cc7 100644 --- a/tests/node_compat/test/pseudo-tty/no_dropped_stdio.js +++ b/tests/node_compat/test/pseudo-tty/no_dropped_stdio.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // https://github.com/nodejs/node/issues/6456#issuecomment-219320599 diff --git a/tests/node_compat/test/pseudo-tty/no_interleaved_stdio.js b/tests/node_compat/test/pseudo-tty/no_interleaved_stdio.js index 1a573c769715e2..4dd80de3dce499 100644 --- a/tests/node_compat/test/pseudo-tty/no_interleaved_stdio.js +++ b/tests/node_compat/test/pseudo-tty/no_interleaved_stdio.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. // https://github.com/nodejs/node/issues/6456#issuecomment-219320599 diff --git a/tests/node_compat/test/pseudo-tty/test-set-raw-mode-reset-process-exit.js b/tests/node_compat/test/pseudo-tty/test-set-raw-mode-reset-process-exit.js new file mode 100644 index 00000000000000..29d2b58232ffdc --- /dev/null +++ b/tests/node_compat/test/pseudo-tty/test-set-raw-mode-reset-process-exit.js @@ -0,0 +1,25 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); +const child_process = require('child_process'); + +// Tests that exiting through process.exit() resets the TTY mode. + +child_process.spawnSync(process.execPath, [ + '-e', 'process.stdin.setRawMode(true); process.exit(0)', +], { stdio: 'inherit' }); + +const { stdout } = child_process.spawnSync('stty', { + stdio: ['inherit', 'pipe', 'inherit'], + encoding: 'utf8', +}); + +if (stdout.match(/-echo\b/)) { + console.log(stdout); +} diff --git a/tests/node_compat/test/pseudo-tty/test-set-raw-mode-reset.js b/tests/node_compat/test/pseudo-tty/test-set-raw-mode-reset.js new file mode 100644 index 00000000000000..2fbfeb3ee8b8ba --- /dev/null +++ b/tests/node_compat/test/pseudo-tty/test-set-raw-mode-reset.js @@ -0,0 +1,26 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); +const child_process = require('child_process'); + +// Tests that exiting through normal means resets the TTY mode. +// Refs: https://github.com/nodejs/node/issues/21020 + +child_process.spawnSync(process.execPath, [ + '-e', 'process.stdin.setRawMode(true)', +], { stdio: 'inherit' }); + +const { stdout } = child_process.spawnSync('stty', { + stdio: ['inherit', 'pipe', 'inherit'], + encoding: 'utf8', +}); + +if (stdout.match(/-echo\b/)) { + console.log(stdout); +} diff --git a/tests/node_compat/test/pseudo-tty/test-tty-color-support-warning-2.js b/tests/node_compat/test/pseudo-tty/test-tty-color-support-warning-2.js index bcb2ba80b85554..f90fc6b4a17a3b 100644 --- a/tests/node_compat/test/pseudo-tty/test-tty-color-support-warning-2.js +++ b/tests/node_compat/test/pseudo-tty/test-tty-color-support-warning-2.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/pseudo-tty/test-tty-color-support-warning.js b/tests/node_compat/test/pseudo-tty/test-tty-color-support-warning.js index 3e4f06d054d772..cccaa2b6a9e7e4 100644 --- a/tests/node_compat/test/pseudo-tty/test-tty-color-support-warning.js +++ b/tests/node_compat/test/pseudo-tty/test-tty-color-support-warning.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/pseudo-tty/test-tty-stdin-call-end.js b/tests/node_compat/test/pseudo-tty/test-tty-stdin-call-end.js new file mode 100644 index 00000000000000..60570b57469268 --- /dev/null +++ b/tests/node_compat/test/pseudo-tty/test-tty-stdin-call-end.js @@ -0,0 +1,15 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +require('../common'); + +// This tests verifies that process.stdin.end() does not +// crash the process with ENOTCONN + +process.stdin.end(); diff --git a/tests/node_compat/test/pseudo-tty/test-tty-stdin-end.js b/tests/node_compat/test/pseudo-tty/test-tty-stdin-end.js index 05054d052f6f2d..6ac9b8cb9889d7 100644 --- a/tests/node_compat/test/pseudo-tty/test-tty-stdin-end.js +++ b/tests/node_compat/test/pseudo-tty/test-tty-stdin-end.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/pseudo-tty/test-tty-stdout-end.js b/tests/node_compat/test/pseudo-tty/test-tty-stdout-end.js index 7adba81be28737..9b3db4eab63d8c 100644 --- a/tests/node_compat/test/pseudo-tty/test-tty-stdout-end.js +++ b/tests/node_compat/test/pseudo-tty/test-tty-stdout-end.js @@ -2,7 +2,7 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 18.12.1 +// Taken from Node 20.11.1 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; diff --git a/tests/node_compat/test/pummel/test-crypto-dh-hash.js b/tests/node_compat/test/pummel/test-crypto-dh-hash.js new file mode 100644 index 00000000000000..846856806c9933 --- /dev/null +++ b/tests/node_compat/test/pummel/test-crypto-dh-hash.js @@ -0,0 +1,66 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); + +if (!common.hasCrypto) { + common.skip('node compiled without OpenSSL.'); +} + +if (common.isPi) { + common.skip('Too slow for Raspberry Pi devices'); +} + +if (!common.hasOpenSSL3) { + common.skip('Too slow when dynamically linked against OpenSSL 1.1.1'); +} + +const assert = require('assert'); +const crypto = require('crypto'); + +const hashes = { + modp1: '630e9acd2cc63f7e80d8507624ba60ac0757201a', + modp2: '18f7aa964484137f57bca64b21917a385b6a0b60', + modp5: 'c0a8eec0c2c8a5ec2f9c26f9661eb339a010ec61', + modp14: 'af5455606fe74cec49782bb374e4c63c9b1d132c', + modp15: '7bdd39e5cdbb9748113933e5c2623b559c534e74', + modp16: 'daea5277a7ad0116e734a8e0d2f297ef759d1161', + modp17: '3b62aaf0142c2720f0bf26a9589b0432c00eadc1', + modp18: 'a870b491bbbec9b131ae9878d07449d32e54f160', +}; + +for (const name in hashes) { + const group = crypto.getDiffieHellman(name); + const prime = group.getPrime('hex'); + const hash1 = hashes[name]; + const hash2 = crypto.createHash('sha1') + .update(prime.toUpperCase()).digest('hex'); + assert.strictEqual(hash1, hash2); + assert.strictEqual(group.getGenerator('hex'), '02'); +} diff --git a/tests/node_compat/test/pummel/test-crypto-timing-safe-equal-benchmarks.js b/tests/node_compat/test/pummel/test-crypto-timing-safe-equal-benchmarks.js new file mode 100644 index 00000000000000..e7f7b0fedece4f --- /dev/null +++ b/tests/node_compat/test/pummel/test-crypto-timing-safe-equal-benchmarks.js @@ -0,0 +1,129 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +if (!common.enoughTestMem) + common.skip('memory-intensive test'); + +const assert = require('assert'); +const crypto = require('crypto'); + +function runOneBenchmark(compareFunc, firstBufFill, secondBufFill, bufSize) { + return eval(` + const firstBuffer = Buffer.alloc(bufSize, firstBufFill); + const secondBuffer = Buffer.alloc(bufSize, secondBufFill); + + const startTime = process.hrtime(); + const result = compareFunc(firstBuffer, secondBuffer); + const endTime = process.hrtime(startTime); + + // Ensure that the result of the function call gets used, so it doesn't + // get discarded due to engine optimizations. + assert.strictEqual(result, firstBufFill === secondBufFill); + + endTime[0] * 1e9 + endTime[1]; + `); +} + +function getTValue(compareFunc) { + const numTrials = 1e5; + const bufSize = 10000; + // Perform benchmarks to verify that timingSafeEqual is actually timing-safe. + + const rawEqualBenches = Array(numTrials); + const rawUnequalBenches = Array(numTrials); + + for (let i = 0; i < numTrials; i++) { + if (Math.random() < 0.5) { + // First benchmark: comparing two equal buffers + rawEqualBenches[i] = runOneBenchmark(compareFunc, 'A', 'A', bufSize); + // Second benchmark: comparing two unequal buffers + rawUnequalBenches[i] = runOneBenchmark(compareFunc, 'B', 'C', bufSize); + } else { + // Flip the order of the benchmarks half of the time. + rawUnequalBenches[i] = runOneBenchmark(compareFunc, 'B', 'C', bufSize); + rawEqualBenches[i] = runOneBenchmark(compareFunc, 'A', 'A', bufSize); + } + } + + const equalBenches = filterOutliers(rawEqualBenches); + const unequalBenches = filterOutliers(rawUnequalBenches); + + // Use a two-sample t-test to determine whether the timing difference between + // the benchmarks is statistically significant. + // https://wikipedia.org/wiki/Student%27s_t-test#Independent_two-sample_t-test + + const equalMean = mean(equalBenches); + const unequalMean = mean(unequalBenches); + + const equalLen = equalBenches.length; + const unequalLen = unequalBenches.length; + + const combinedStd = combinedStandardDeviation(equalBenches, unequalBenches); + const standardErr = combinedStd * Math.sqrt(1 / equalLen + 1 / unequalLen); + + return (equalMean - unequalMean) / standardErr; +} + +// Returns the mean of an array +function mean(array) { + return array.reduce((sum, val) => sum + val, 0) / array.length; +} + +// Returns the sample standard deviation of an array +function standardDeviation(array) { + const arrMean = mean(array); + const total = array.reduce((sum, val) => sum + Math.pow(val - arrMean, 2), 0); + return Math.sqrt(total / (array.length - 1)); +} + +// Returns the common standard deviation of two arrays +function combinedStandardDeviation(array1, array2) { + const sum1 = Math.pow(standardDeviation(array1), 2) * (array1.length - 1); + const sum2 = Math.pow(standardDeviation(array2), 2) * (array2.length - 1); + return Math.sqrt((sum1 + sum2) / (array1.length + array2.length - 2)); +} + +// Filter large outliers from an array. A 'large outlier' is a value that is at +// least 50 times larger than the mean. This prevents the tests from failing +// due to the standard deviation increase when a function unexpectedly takes +// a very long time to execute. +function filterOutliers(array) { + const arrMean = mean(array); + return array.filter((value) => value / arrMean < 50); +} + +// t_(0.99995, ∞) +// i.e. If a given comparison function is indeed timing-safe, the t-test result +// has a 99.99% chance to be below this threshold. Unfortunately, this means +// that this test will be a bit flakey and will fail 0.01% of the time even if +// crypto.timingSafeEqual is working properly. +// t-table ref: http://www.sjsu.edu/faculty/gerstman/StatPrimer/t-table.pdf +// Note that in reality there are roughly `2 * numTrials - 2` degrees of +// freedom, not ∞. However, assuming `numTrials` is large, this doesn't +// significantly affect the threshold. +const T_THRESHOLD = 3.892; + +const t = getTValue(crypto.timingSafeEqual); +assert( + Math.abs(t) < T_THRESHOLD, + `timingSafeEqual should not leak information from its execution time (t=${t})`, +); + +// As a coherence check to make sure the statistical tests are working, run the +// same benchmarks again, this time with an unsafe comparison function. In this +// case the t-value should be above the threshold. +const unsafeCompare = (bufA, bufB) => bufA.equals(bufB); +const t2 = getTValue(unsafeCompare); +assert( + Math.abs(t2) > T_THRESHOLD, + `Buffer#equals should leak information from its execution time (t=${t2})`, +); diff --git a/tests/node_compat/test/pummel/test-dh-regr.js b/tests/node_compat/test/pummel/test-dh-regr.js new file mode 100644 index 00000000000000..d09f3a2616de38 --- /dev/null +++ b/tests/node_compat/test/pummel/test-dh-regr.js @@ -0,0 +1,66 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); + +if (!common.hasCrypto) { + common.skip('missing crypto'); +} + +if (common.isPi) { + common.skip('Too slow for Raspberry Pi devices'); +} + +const assert = require('assert'); +const crypto = require('crypto'); + +// FIPS requires length >= 1024 but we use 512/256 in this test to keep it from +// taking too long and timing out in CI. +const length = (common.hasFipsCrypto) ? 1024 : common.hasOpenSSL3 ? 512 : 256; + +const p = crypto.createDiffieHellman(length).getPrime(); + +for (let i = 0; i < 2000; i++) { + const a = crypto.createDiffieHellman(p); + const b = crypto.createDiffieHellman(p); + + a.generateKeys(); + b.generateKeys(); + + const aSecret = a.computeSecret(b.getPublicKey()); + const bSecret = b.computeSecret(a.getPublicKey()); + + assert.deepStrictEqual( + aSecret, + bSecret, + 'Secrets should be equal.\n' + + `aSecret: ${aSecret.toString('base64')}\n` + + `bSecret: ${bSecret.toString('base64')}`, + ); +} diff --git a/tests/node_compat/test/pummel/test-fs-largefile.js b/tests/node_compat/test/pummel/test-fs-largefile.js new file mode 100644 index 00000000000000..2a7741f092d4ea --- /dev/null +++ b/tests/node_compat/test/pummel/test-fs-largefile.js @@ -0,0 +1,63 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); + +const assert = require('assert'); +const fs = require('fs'); + +const tmpdir = require('../common/tmpdir'); +tmpdir.refresh(); + +try { + + const filepath = tmpdir.resolve('large.txt'); + const fd = fs.openSync(filepath, 'w+'); + const offset = 5 * 1024 * 1024 * 1024; // 5GB + const message = 'Large File'; + + fs.ftruncateSync(fd, offset); + assert.strictEqual(fs.statSync(filepath).size, offset); + const writeBuf = Buffer.from(message); + fs.writeSync(fd, writeBuf, 0, writeBuf.length, offset); + const readBuf = Buffer.allocUnsafe(writeBuf.length); + fs.readSync(fd, readBuf, 0, readBuf.length, offset); + assert.strictEqual(readBuf.toString(), message); + fs.readSync(fd, readBuf, 0, 1, 0); + assert.strictEqual(readBuf[0], 0); + + // Verify that floating point positions do not throw. + fs.writeSync(fd, writeBuf, 0, writeBuf.length, 42.000001); + fs.close(fd, common.mustCall()); +} catch (e) { + if (e.code !== 'ENOSPC') { + throw e; + } + common.skip('insufficient disk space'); +} diff --git a/tests/node_compat/test/pummel/test-fs-readfile-tostring-fail.js b/tests/node_compat/test/pummel/test-fs-readfile-tostring-fail.js new file mode 100644 index 00000000000000..b0df8eec6ecd15 --- /dev/null +++ b/tests/node_compat/test/pummel/test-fs-readfile-tostring-fail.js @@ -0,0 +1,84 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); + +if (!common.enoughTestMem) + common.skip('intensive toString tests due to memory confinements'); + +const assert = require('assert'); +const fs = require('fs'); +const cp = require('child_process'); +const kStringMaxLength = require('buffer').constants.MAX_STRING_LENGTH; +if (common.isAIX && (Number(cp.execSync('ulimit -f')) * 512) < kStringMaxLength) + common.skip('intensive toString tests due to file size confinements'); + +const tmpdir = require('../common/tmpdir'); +tmpdir.refresh(); + +if (!tmpdir.hasEnoughSpace(kStringMaxLength)) { + common.skip(`Not enough space in ${tmpdir.path}`); +} + +const file = tmpdir.resolve('toobig.txt'); +const stream = fs.createWriteStream(file, { + flags: 'a', +}); + +stream.on('error', (err) => { throw err; }); + +const size = kStringMaxLength / 200; +const a = Buffer.alloc(size, 'a'); +let expectedSize = 0; + +for (let i = 0; i < 201; i++) { + stream.write(a, (err) => { assert.ifError(err); }); + expectedSize += a.length; +} + +stream.end(); +stream.on('finish', common.mustCall(function() { + assert.strictEqual(stream.bytesWritten, expectedSize, + `${stream.bytesWritten} bytes written (expected ${expectedSize} bytes).`); + fs.readFile(file, 'utf8', common.mustCall(function(err, buf) { + assert.ok(err instanceof Error); + if (err.message !== 'Array buffer allocation failed') { + const stringLengthHex = kStringMaxLength.toString(16); + common.expectsError({ + message: 'Cannot create a string longer than ' + + `0x${stringLengthHex} characters`, + code: 'ERR_STRING_TOO_LONG', + name: 'Error', + })(err); + } + assert.strictEqual(buf, undefined); + })); +})); + +function destroy() { + try { + fs.unlinkSync(file); + } catch { + // it may not exist + } +} + +process.on('exit', destroy); + +process.on('SIGINT', function() { + destroy(); + process.exit(); +}); + +// To make sure we don't leave a very large file +// on test machines in the event this test fails. +process.on('uncaughtException', function(err) { + destroy(); + throw err; +}); diff --git a/tests/node_compat/test/pummel/test-fs-watch-system-limit.js b/tests/node_compat/test/pummel/test-fs-watch-system-limit.js new file mode 100644 index 00000000000000..cadb48033af8ff --- /dev/null +++ b/tests/node_compat/test/pummel/test-fs-watch-system-limit.js @@ -0,0 +1,77 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const child_process = require('child_process'); +const fs = require('fs'); +const stream = require('stream'); + +if (!common.isLinux) { + common.skip('The fs watch limit is OS-dependent'); +} + +if (common.isPi) { + common.skip('Too slow for Raspberry Pi devices'); +} + +try { + // Ensure inotify limit is low enough for the test to actually exercise the + // limit with small enough resources. + const limit = Number( + fs.readFileSync('/proc/sys/fs/inotify/max_user_watches', 'utf8')); + if (limit > 16384) + common.skip('inotify limit is quite large'); +} catch (e) { + if (e.code === 'ENOENT') + common.skip('the inotify /proc subsystem does not exist'); + // Fail on other errors. + throw e; +} + +const processes = []; +const gatherStderr = new stream.PassThrough(); +gatherStderr.setEncoding('utf8'); +gatherStderr.setMaxListeners(Infinity); + +let finished = false; +function spawnProcesses() { + for (let i = 0; i < 10; ++i) { + const proc = child_process.spawn( + process.execPath, + [ '-e', + `process.chdir(${JSON.stringify(__dirname)}); + for (const file of fs.readdirSync('.')) + fs.watch(file, () => {});`, + ], { stdio: ['inherit', 'inherit', 'pipe'] }); + proc.stderr.pipe(gatherStderr); + processes.push(proc); + } + + setTimeout(() => { + if (!finished && processes.length < 200) + spawnProcesses(); + }, 100); +} + +spawnProcesses(); + +let accumulated = ''; +gatherStderr.on('data', common.mustCallAtLeast((chunk) => { + accumulated += chunk; + if (accumulated.includes('Error:') && !finished) { + assert( + accumulated.includes('ENOSPC: System limit for number ' + + 'of file watchers reached') || + accumulated.includes('EMFILE: '), + accumulated); + console.log(`done after ${processes.length} processes, cleaning up`); + finished = true; + processes.forEach((proc) => proc.kill()); + } +}, 1)); diff --git a/tests/node_compat/test/pummel/test-heapsnapshot-near-heap-limit-big.js b/tests/node_compat/test/pummel/test-heapsnapshot-near-heap-limit-big.js new file mode 100644 index 00000000000000..e1bb1280a3f28f --- /dev/null +++ b/tests/node_compat/test/pummel/test-heapsnapshot-near-heap-limit-big.js @@ -0,0 +1,49 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const tmpdir = require('../common/tmpdir'); +const assert = require('assert'); +const { spawnSync } = require('child_process'); +const fixtures = require('../common/fixtures'); +const fs = require('fs'); +const env = { + ...process.env, + NODE_DEBUG_NATIVE: 'diagnostics', +}; + +if (!common.enoughTestMem) + common.skip('Insufficient memory for snapshot test'); + +{ + console.log('\nTesting limit = 3'); + tmpdir.refresh(); + const child = spawnSync(process.execPath, [ + '--heapsnapshot-near-heap-limit=3', + '--max-old-space-size=512', + fixtures.path('workload', 'grow.js'), + ], { + cwd: tmpdir.path, + env: { + ...env, + TEST_CHUNK: 2000, + }, + }); + const stderr = child.stderr.toString(); + console.log(stderr); + assert(common.nodeProcessAborted(child.status, child.signal), + 'process should have aborted, but did not'); + const list = fs.readdirSync(tmpdir.path) + .filter((file) => file.endsWith('.heapsnapshot')); + const risky = [...stderr.matchAll( + /Not generating snapshots because it's too risky/g)].length; + assert(list.length + risky > 0 && list.length <= 3, + `Generated ${list.length} snapshots ` + + `and ${risky} was too risky`); +} diff --git a/tests/node_compat/test/pummel/test-net-many-clients.js b/tests/node_compat/test/pummel/test-net-many-clients.js new file mode 100644 index 00000000000000..a1789fa3559f96 --- /dev/null +++ b/tests/node_compat/test/pummel/test-net-many-clients.js @@ -0,0 +1,107 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +require('../common'); +const assert = require('assert'); +const net = require('net'); + +// settings +const bytes = 1024 * 40; +const concurrency = 50; +const connections_per_client = 3; + +// measured +let total_connections = 0; + +const body = 'C'.repeat(bytes); + +const server = net.createServer(function(c) { + total_connections++; + console.log('connected', total_connections); + c.write(body); + c.end(); +}); + +function runClient(port, callback) { + const client = net.createConnection(port); + + client.connections = 0; + + client.setEncoding('utf8'); + + client.on('connect', function() { + console.log('c'); + client.recved = ''; + client.connections += 1; + }); + + client.on('data', function(chunk) { + this.recved += chunk; + }); + + client.on('end', function() { + client.end(); + }); + + client.on('error', function(e) { + console.log('\n\nERROOOOOr'); + throw e; + }); + + client.on('close', function(had_error) { + console.log('.'); + assert.strictEqual(had_error, false); + assert.strictEqual(client.recved.length, bytes); + + if (client.fd) { + console.log(client.fd); + } + assert.ok(!client.fd); + + if (this.connections < connections_per_client) { + this.connect(port); + } else { + callback(); + } + }); +} + +server.listen(0, function() { + let finished_clients = 0; + for (let i = 0; i < concurrency; i++) { + runClient(server.address().port, function() { + if (++finished_clients === concurrency) server.close(); + }); + } +}); + +process.on('exit', function() { + assert.strictEqual(total_connections, connections_per_client * concurrency); + console.log('\nokay!'); +}); diff --git a/tests/node_compat/test/pummel/test-net-pingpong-delay.js b/tests/node_compat/test/pummel/test-net-pingpong-delay.js new file mode 100644 index 00000000000000..8eb3edfa24ab81 --- /dev/null +++ b/tests/node_compat/test/pummel/test-net-pingpong-delay.js @@ -0,0 +1,114 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); + +function pingPongTest(host, on_complete) { + const N = 100; + const DELAY = 1; + let count = 0; + let client_ended = false; + + const server = net.createServer({ allowHalfOpen: true }, function(socket) { + socket.setEncoding('utf8'); + + socket.on('data', function(data) { + console.log(data); + assert.strictEqual(data, 'PING'); + assert.strictEqual(socket.readyState, 'open'); + assert.strictEqual(count <= N, true); + setTimeout(function() { + assert.strictEqual(socket.readyState, 'open'); + socket.write('PONG'); + }, DELAY); + }); + + socket.on('timeout', function() { + console.error('server-side timeout!!'); + assert.strictEqual(false, true); + }); + + socket.on('end', function() { + console.log('server-side socket EOF'); + assert.strictEqual(socket.readyState, 'writeOnly'); + socket.end(); + }); + + socket.on('close', function(had_error) { + console.log('server-side socket.end'); + assert.strictEqual(had_error, false); + assert.strictEqual(socket.readyState, 'closed'); + socket.server.close(); + }); + }); + + server.listen(0, host, common.mustCall(function() { + const client = net.createConnection(server.address().port, host); + + client.setEncoding('utf8'); + + client.on('connect', function() { + assert.strictEqual(client.readyState, 'open'); + client.write('PING'); + }); + + client.on('data', function(data) { + console.log(data); + assert.strictEqual(data, 'PONG'); + assert.strictEqual(client.readyState, 'open'); + + setTimeout(function() { + assert.strictEqual(client.readyState, 'open'); + if (count++ < N) { + client.write('PING'); + } else { + console.log('closing client'); + client.end(); + client_ended = true; + } + }, DELAY); + }); + + client.on('timeout', function() { + console.error('client-side timeout!!'); + assert.strictEqual(false, true); + }); + + client.on('close', common.mustCall(function() { + console.log('client.end'); + assert.strictEqual(count, N + 1); + assert.ok(client_ended); + if (on_complete) on_complete(); + })); + })); +} + +pingPongTest(); diff --git a/tests/node_compat/test/pummel/test-process-cpuUsage.js b/tests/node_compat/test/pummel/test-process-cpuUsage.js new file mode 100644 index 00000000000000..b571e0ced8ed56 --- /dev/null +++ b/tests/node_compat/test/pummel/test-process-cpuUsage.js @@ -0,0 +1,37 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +require('../common'); +const assert = require('assert'); + +const start = process.cpuUsage(); + +// Run a busy-loop for specified # of milliseconds. +const RUN_FOR_MS = 500; + +// Define slop factor for checking maximum expected diff values. +const SLOP_FACTOR = 2; + +// Run a busy loop. +const now = Date.now(); +while (Date.now() - now < RUN_FOR_MS); + +// Get a diff reading from when we started. +const diff = process.cpuUsage(start); + +const MICROSECONDS_PER_MILLISECOND = 1000; + +// Diff usages should be >= 0, <= ~RUN_FOR_MS millis. +// Let's be generous with the slop factor, defined above, in case other things +// are happening on this CPU. The <= check may be invalid if the node process +// is making use of multiple CPUs, in which case, just remove it. +assert(diff.user >= 0); +assert(diff.user <= SLOP_FACTOR * RUN_FOR_MS * MICROSECONDS_PER_MILLISECOND); + +assert(diff.system >= 0); +assert(diff.system <= SLOP_FACTOR * RUN_FOR_MS * MICROSECONDS_PER_MILLISECOND); diff --git a/tests/node_compat/test/pummel/test-stream-pipe-multi.js b/tests/node_compat/test/pummel/test-stream-pipe-multi.js new file mode 100644 index 00000000000000..979a722a5413d0 --- /dev/null +++ b/tests/node_compat/test/pummel/test-stream-pipe-multi.js @@ -0,0 +1,129 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +// Test that having a bunch of streams piping in parallel +// doesn't break anything. + +require('../common'); +const assert = require('assert'); +const Stream = require('stream').Stream; +const rr = []; +const ww = []; +const cnt = 100; +const chunks = 1000; +const chunkSize = 250; +const data = Buffer.allocUnsafe(chunkSize); +let wclosed = 0; +let rclosed = 0; + +function FakeStream() { + Stream.apply(this); + this.wait = false; + this.writable = true; + this.readable = true; +} + +FakeStream.prototype = { __proto__: Stream.prototype }; + +FakeStream.prototype.write = function(chunk) { + console.error(this.ID, 'write', this.wait); + if (this.wait) { + process.nextTick(this.emit.bind(this, 'drain')); + } + this.wait = !this.wait; + return this.wait; +}; + +FakeStream.prototype.end = function() { + this.emit('end'); + process.nextTick(this.close.bind(this)); +}; + +// noop - closes happen automatically on end. +FakeStream.prototype.close = function() { + this.emit('close'); +}; + + +// Expect all streams to close properly. +process.on('exit', function() { + assert.strictEqual(wclosed, cnt); + assert.strictEqual(rclosed, cnt); +}); + +for (let i = 0; i < chunkSize; i++) { + data[i] = i; +} + +for (let i = 0; i < cnt; i++) { + const r = new FakeStream(); + r.on('close', function() { + console.error(this.ID, 'read close'); + rclosed++; + }); + rr.push(r); + + const w = new FakeStream(); + w.on('close', function() { + console.error(this.ID, 'write close'); + wclosed++; + }); + ww.push(w); + + r.ID = w.ID = i; + r.pipe(w); +} + +// Now start passing through data. +// Simulate a relatively fast async stream. +rr.forEach(function(r) { + let cnt = chunks; + let paused = false; + + r.on('pause', function() { + paused = true; + }); + + r.on('resume', function() { + paused = false; + step(); + }); + + function step() { + r.emit('data', data); + if (--cnt === 0) { + r.end(); + return; + } + if (paused) return; + process.nextTick(step); + } + + process.nextTick(step); +}); diff --git a/tests/node_compat/test/sequential/test-buffer-creation-regression.js b/tests/node_compat/test/sequential/test-buffer-creation-regression.js new file mode 100644 index 00000000000000..d4b46fc8949e54 --- /dev/null +++ b/tests/node_compat/test/sequential/test-buffer-creation-regression.js @@ -0,0 +1,43 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); + +function test(arrayBuffer, offset, length) { + const uint8Array = new Uint8Array(arrayBuffer, offset, length); + for (let i = 0; i < length; i += 1) { + uint8Array[i] = 1; + } + + const buffer = Buffer.from(arrayBuffer, offset, length); + for (let i = 0; i < length; i += 1) { + assert.strictEqual(buffer[i], 1); + } +} + +const acceptableOOMErrors = [ + 'Array buffer allocation failed', + 'Invalid array buffer length', +]; + +const length = 1000; +const offset = 4294967296; /* 1 << 32 */ +const size = offset + length; +let arrayBuffer; + +try { + arrayBuffer = new ArrayBuffer(size); +} catch (e) { + if (e instanceof RangeError && acceptableOOMErrors.includes(e.message)) + common.skip(`Unable to allocate ${size} bytes for ArrayBuffer`); + throw e; +} + +test(arrayBuffer, offset, length); diff --git a/tests/node_compat/test/sequential/test-http-server-keep-alive-timeout-slow-server.js b/tests/node_compat/test/sequential/test-http-server-keep-alive-timeout-slow-server.js new file mode 100644 index 00000000000000..c07eae3f8d1ac8 --- /dev/null +++ b/tests/node_compat/test/sequential/test-http-server-keep-alive-timeout-slow-server.js @@ -0,0 +1,57 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); + +const server = http.createServer(common.mustCall((req, res) => { + if (req.url === '/first') { + res.end('ok'); + return; + } + setTimeout(() => { + res.end('ok'); + }, common.platformTimeout(500)); +}, 2)); + +server.keepAliveTimeout = common.platformTimeout(200); + +const agent = new http.Agent({ + keepAlive: true, + maxSockets: 1 +}); + +function request(path, callback) { + const port = server.address().port; + const req = http.request({ agent, path, port }, common.mustCall((res) => { + assert.strictEqual(res.statusCode, 200); + + res.setEncoding('utf8'); + + let result = ''; + res.on('data', (chunk) => { + result += chunk; + }); + + res.on('end', common.mustCall(() => { + assert.strictEqual(result, 'ok'); + callback(); + })); + })); + req.end(); +} + +server.listen(0, common.mustCall(() => { + request('/first', () => { + request('/second', () => { + server.close(); + }); + }); +})); diff --git a/tests/node_compat/test/sequential/test-net-connect-local-error.js b/tests/node_compat/test/sequential/test-net-connect-local-error.js new file mode 100644 index 00000000000000..d11ef37bc34e72 --- /dev/null +++ b/tests/node_compat/test/sequential/test-net-connect-local-error.js @@ -0,0 +1,53 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); + +// EADDRINUSE is expected to occur on FreeBSD +// Ref: https://github.com/nodejs/node/issues/13055 +const expectedErrorCodes = ['ECONNREFUSED', 'EADDRINUSE']; + +const optionsIPv4 = { + port: common.PORT, + family: 4, + localPort: common.PORT + 1, + localAddress: common.localhostIPv4 +}; + +const optionsIPv6 = { + host: '::1', + family: 6, + port: common.PORT + 2, + localPort: common.PORT + 3, + localAddress: '::1', +}; + +function onError(err, options) { + assert.ok(expectedErrorCodes.includes(err.code)); + assert.strictEqual(err.syscall, 'connect'); + assert.strictEqual(err.localPort, options.localPort); + assert.strictEqual(err.localAddress, options.localAddress); + assert.strictEqual( + err.message, + `connect ${err.code} ${err.address}:${err.port} ` + + `- Local (${err.localAddress}:${err.localPort})` + ); +} + +const clientIPv4 = net.connect(optionsIPv4); +clientIPv4.on('error', common.mustCall((err) => onError(err, optionsIPv4))); + +if (!common.hasIPv6) { + common.printSkipMessage('ipv6 part of test, no IPv6 support'); + return; +} + +const clientIPv6 = net.connect(optionsIPv6); +clientIPv6.on('error', common.mustCall((err) => onError(err, optionsIPv6))); diff --git a/tests/node_compat/test/sequential/test-net-response-size.js b/tests/node_compat/test/sequential/test-net-response-size.js new file mode 100644 index 00000000000000..2c279aaad0a844 --- /dev/null +++ b/tests/node_compat/test/sequential/test-net-response-size.js @@ -0,0 +1,82 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); + +// Make sure the net module's server doesn't throw an error when handling +// responses that are either too long or too small (especially on Windows) +// https://github.com/nodejs/node-v0.x-archive/issues/1697 + +const net = require('net'); +const cp = require('child_process'); + +if (process.argv[2] === 'server') { + // Server + + const server = net.createServer(function(conn) { + conn.on('data', function(data) { + console.log(`server received ${data.length} bytes`); + }); + + conn.on('close', function() { + server.close(); + }); + }); + + server.listen(common.PORT, '127.0.0.1', function() { + console.log('Server running.'); + }); + +} else { + // Client + + const serverProcess = cp.spawn(process.execPath, [process.argv[1], 'server']); + serverProcess.stdout.pipe(process.stdout); + serverProcess.stderr.pipe(process.stdout); + + serverProcess.stdout.once('data', function() { + const client = net.createConnection(common.PORT, '127.0.0.1'); + client.on('connect', function() { + const alot = Buffer.allocUnsafe(1024); + const alittle = Buffer.allocUnsafe(1); + + for (let i = 0; i < 100; i++) { + client.write(alot); + } + + // Block the event loop for 1 second + const start = (new Date()).getTime(); + while ((new Date()).getTime() < start + 1000); + + client.write(alittle); + + client.destroySoon(); + }); + }); +} diff --git a/tests/node_compat/test/sequential/test-net-server-bind.js b/tests/node_compat/test/sequential/test-net-server-bind.js new file mode 100644 index 00000000000000..7048c097d6b140 --- /dev/null +++ b/tests/node_compat/test/sequential/test-net-server-bind.js @@ -0,0 +1,71 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); + + +// With only a callback, server should get a port assigned by the OS +{ + const server = net.createServer(common.mustNotCall()); + + server.listen(common.mustCall(function() { + assert.ok(server.address().port > 100); + server.close(); + })); +} + +// No callback to listen(), assume we can bind in 100 ms +{ + const server = net.createServer(common.mustNotCall()); + + server.listen(common.PORT); + + setTimeout(function() { + const address = server.address(); + assert.strictEqual(address.port, common.PORT); + + if (address.family === 'IPv6') + assert.strictEqual(server._connectionKey, `6::::${address.port}`); + else + assert.strictEqual(server._connectionKey, `4:0.0.0.0:${address.port}`); + + server.close(); + }, 100); +} + +// Callback to listen() +{ + const server = net.createServer(common.mustNotCall()); + + server.listen(common.PORT + 1, common.mustCall(function() { + assert.strictEqual(server.address().port, common.PORT + 1); + server.close(); + })); +} + +// Backlog argument +{ + const server = net.createServer(common.mustNotCall()); + + server.listen(common.PORT + 2, '0.0.0.0', 127, common.mustCall(function() { + assert.strictEqual(server.address().port, common.PORT + 2); + server.close(); + })); +} + +// Backlog argument without host argument +{ + const server = net.createServer(common.mustNotCall()); + + server.listen(common.PORT + 3, 127, common.mustCall(function() { + assert.strictEqual(server.address().port, common.PORT + 3); + server.close(); + })); +} diff --git a/tests/node_compat/test/sequential/test-tls-lookup.js b/tests/node_compat/test/sequential/test-tls-lookup.js new file mode 100644 index 00000000000000..3801e3073ec2f2 --- /dev/null +++ b/tests/node_compat/test/sequential/test-tls-lookup.js @@ -0,0 +1,41 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const assert = require('assert'); +const tls = require('tls'); + +['foobar', 1, {}, []].forEach(function connectThrows(input) { + const opts = { + host: 'localhost', + port: common.PORT, + lookup: input + }; + + assert.throws(() => { + tls.connect(opts); + }, { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError' + }); +}); + +connectDoesNotThrow(common.mustCall()); + +function connectDoesNotThrow(input) { + const opts = { + host: 'localhost', + port: common.PORT, + lookup: input + }; + + tls.connect(opts); +} diff --git a/tests/node_compat/test/sequential/test-tls-psk-client.js b/tests/node_compat/test/sequential/test-tls-psk-client.js new file mode 100644 index 00000000000000..89b13301f0b393 --- /dev/null +++ b/tests/node_compat/test/sequential/test-tls-psk-client.js @@ -0,0 +1,117 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +'use strict'; +const common = require('../common'); + +if (!common.hasCrypto) + common.skip('missing crypto'); +if (!common.opensslCli) + common.skip('missing openssl cli'); + +const assert = require('assert'); +const tls = require('tls'); +const net = require('net'); +const { spawn } = require('child_process'); + +const CIPHERS = 'PSK+HIGH'; +const KEY = 'd731ef57be09e5204f0b205b60627028'; +const IDENTITY = 'Client_identity'; // Hardcoded by `openssl s_server` +const useIPv4 = !common.hasIPv6; + +const server = spawn(common.opensslCli, [ + 's_server', + '-accept', common.PORT, + '-cipher', CIPHERS, + '-psk', KEY, + '-psk_hint', IDENTITY, + '-nocert', + '-rev', + ...(useIPv4 ? ['-4'] : []), +], { encoding: 'utf8' }); +let serverErr = ''; +let serverOut = ''; +server.stderr.on('data', (data) => serverErr += data); +server.stdout.on('data', (data) => serverOut += data); +server.on('error', common.mustNotCall()); +server.on('exit', (code, signal) => { + // Server is expected to be terminated by cleanUp(). + assert.strictEqual(code, null, + `'${server.spawnfile} ${server.spawnargs.join(' ')}' unexpected exited with output:\n${serverOut}\n${serverErr}`); + assert.strictEqual(signal, 'SIGTERM'); +}); + +const cleanUp = (err) => { + clearTimeout(timeout); + if (err) + console.log('Failed:', err); + server.kill(); + process.exitCode = err ? 1 : 0; +}; + +const timeout = setTimeout(() => cleanUp('Timed out'), 5000); + +function waitForPort(port, cb) { + const socket = net.connect(common.PORT, () => { + socket.on('data', () => {}); + socket.end(); + socket.on('end', cb); + }); + socket.on('error', (e) => { + if (e.code === 'ENOENT' || e.code === 'ECONNREFUSED') { + setTimeout(() => waitForPort(port, cb), 1000); + } else { + cb(e); + } + }); +} + +waitForPort(common.PORT, common.mustCall((err) => { + if (err) { + cleanUp(err); + return; + } + + const message = 'hello'; + const reverse = message.split('').reverse().join(''); + runClient(message, common.mustCall((err, data) => { + try { + if (!err) assert.strictEqual(data.trim(), reverse); + } finally { + cleanUp(err); + } + })); +})); + +function runClient(message, cb) { + const s = tls.connect(common.PORT, { + ciphers: CIPHERS, + checkServerIdentity: () => {}, + pskCallback(hint) { + // 'hint' will be null in TLS1.3. + if (hint === null || hint === IDENTITY) { + return { + identity: IDENTITY, + psk: Buffer.from(KEY, 'hex') + }; + } + } + }); + s.on('secureConnect', common.mustCall(() => { + let data = ''; + s.on('data', common.mustCallAtLeast((d) => { + data += d; + })); + s.on('end', common.mustCall(() => { + cb(null, data); + })); + s.end(message); + })); + s.on('error', (e) => { + cb(e); + }); +} diff --git a/tests/node_compat/test/sequential/test-tls-securepair-client.js b/tests/node_compat/test/sequential/test-tls-securepair-client.js new file mode 100644 index 00000000000000..eed5b221c4ebc0 --- /dev/null +++ b/tests/node_compat/test/sequential/test-tls-securepair-client.js @@ -0,0 +1,193 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +const common = require('../common'); + +if (!common.opensslCli) + common.skip('node compiled without OpenSSL CLI.'); + +if (!common.hasCrypto) + common.skip('missing crypto'); + +if (common.isWindows) + common.skip('test does not work on Windows'); // ...but it should! + +const net = require('net'); +const assert = require('assert'); +const fixtures = require('../common/fixtures'); +const tls = require('tls'); +const spawn = require('child_process').spawn; + +const useIPv4 = !common.hasIPv6; + +test1(); + +// simple/test-tls-securepair-client +function test1() { + test('keys/rsa_private.pem', 'keys/rsa_cert.crt', null, test2); +} + +// simple/test-tls-ext-key-usage +function test2() { + function check(pair) { + // "TLS Web Client Authentication" + assert.strictEqual(pair.cleartext.getPeerCertificate().ext_key_usage.length, + 1); + assert.strictEqual(pair.cleartext.getPeerCertificate().ext_key_usage[0], + '1.3.6.1.5.5.7.3.2'); + } + test('keys/agent4-key.pem', 'keys/agent4-cert.pem', check); +} + +function test(keyPath, certPath, check, next) { + const key = fixtures.readSync(keyPath).toString(); + const cert = fixtures.readSync(certPath).toString(); + + const server = spawn(common.opensslCli, ['s_server', + '-accept', 0, + '-cert', fixtures.path(certPath), + '-key', fixtures.path(keyPath), + ...(useIPv4 ? ['-4'] : []), + ]); + server.stdout.pipe(process.stdout); + server.stderr.pipe(process.stdout); + + + let state = 'WAIT-ACCEPT'; + + let serverStdoutBuffer = ''; + server.stdout.setEncoding('utf8'); + server.stdout.on('data', function(s) { + serverStdoutBuffer += s; + console.log(state); + switch (state) { + case 'WAIT-ACCEPT': { + const matches = serverStdoutBuffer.match(/ACCEPT .*?:(\d+)/); + if (matches) { + const port = matches[1]; + state = 'WAIT-HELLO'; + startClient(port); + } + break; + } + case 'WAIT-HELLO': + if (/hello/.test(serverStdoutBuffer)) { + + // End the current SSL connection and exit. + // See s_server(1ssl). + server.stdin.write('Q'); + + state = 'WAIT-SERVER-CLOSE'; + } + break; + + default: + break; + } + }); + + + const timeout = setTimeout(function() { + server.kill(); + process.exit(1); + }, 5000); + + let gotWriteCallback = false; + let serverExitCode = -1; + + server.on('exit', function(code) { + serverExitCode = code; + clearTimeout(timeout); + if (next) next(); + }); + + + function startClient(port) { + const s = new net.Stream(); + + const sslcontext = tls.createSecureContext({ key, cert }); + sslcontext.context.setCiphers('RC4-SHA:AES128-SHA:AES256-SHA'); + + const pair = tls.createSecurePair(sslcontext, false); + + assert.ok(pair.encrypted.writable); + assert.ok(pair.cleartext.writable); + + pair.encrypted.pipe(s); + s.pipe(pair.encrypted); + + s.connect(port); + + s.on('connect', function() { + console.log('client connected'); + setTimeout(function() { + pair.cleartext.write('hello\r\n', function() { + gotWriteCallback = true; + }); + }, 500); + }); + + pair.on('secure', function() { + console.log('client: connected+secure!'); + console.log('client pair.cleartext.getPeerCertificate(): %j', + pair.cleartext.getPeerCertificate()); + console.log('client pair.cleartext.getCipher(): %j', + pair.cleartext.getCipher()); + if (check) check(pair); + }); + + pair.cleartext.on('data', function(d) { + console.log('cleartext: %s', d.toString()); + }); + + s.on('close', function() { + console.log('client close'); + }); + + pair.encrypted.on('error', function(err) { + console.log(`encrypted error: ${err}`); + }); + + s.on('error', function(err) { + console.log(`socket error: ${err}`); + }); + + pair.on('error', function(err) { + console.log(`secure error: ${err}`); + }); + } + + + process.on('exit', function() { + assert.strictEqual(serverExitCode, 0); + assert.strictEqual(state, 'WAIT-SERVER-CLOSE'); + assert.ok(gotWriteCallback); + }); +} diff --git a/tests/node_compat/test/sequential/test-tls-session-timeout.js b/tests/node_compat/test/sequential/test-tls-session-timeout.js new file mode 100644 index 00000000000000..b8d03c17ae6872 --- /dev/null +++ b/tests/node_compat/test/sequential/test-tls-session-timeout.js @@ -0,0 +1,140 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file + +// Copyright Joyent and Node contributors. All rights reserved. MIT license. +// Taken from Node 20.11.1 +// This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; +const common = require('../common'); + +if (!common.opensslCli) + common.skip('node compiled without OpenSSL CLI.'); + +if (!common.hasCrypto) + common.skip('missing crypto'); + +const tmpdir = require('../common/tmpdir'); +tmpdir.refresh(); + +doTest(); + +// This test consists of three TLS requests -- +// * The first one should result in a new connection because we don't have +// a valid session ticket. +// * The second one should result in connection resumption because we used +// the session ticket we saved from the first connection. +// * The third one should result in a new connection because the ticket +// that we used has expired by now. + +function doTest() { + const assert = require('assert'); + const tls = require('tls'); + const fs = require('fs'); + const fixtures = require('../common/fixtures'); + const spawn = require('child_process').spawn; + + const SESSION_TIMEOUT = 1; + + const key = fixtures.readKey('rsa_private.pem'); + const cert = fixtures.readKey('rsa_cert.crt'); + const options = { + key: key, + cert: cert, + ca: [cert], + sessionTimeout: SESSION_TIMEOUT, + maxVersion: 'TLSv1.2', + }; + + // We need to store a sample session ticket in the fixtures directory because + // `s_client` behaves incorrectly if we do not pass in both the `-sess_in` + // and the `-sess_out` flags, and the `-sess_in` argument must point to a + // file containing a proper serialization of a session ticket. + // To avoid a source control diff, we copy the ticket to a temporary file. + + const sessionFileName = (function() { + const ticketFileName = 'tls-session-ticket.txt'; + const tmpPath = tmpdir.resolve(ticketFileName); + fs.writeFileSync(tmpPath, fixtures.readSync(ticketFileName)); + return tmpPath; + }()); + + // Expects a callback -- cb(connectionType : enum ['New'|'Reused']) + + function Client(cb) { + const flags = [ + 's_client', + '-connect', `localhost:${common.PORT}`, + '-sess_in', sessionFileName, + '-sess_out', sessionFileName, + ]; + const client = spawn(common.opensslCli, flags, { + stdio: ['ignore', 'pipe', 'ignore'] + }); + + let clientOutput = ''; + client.stdout.on('data', (data) => { + clientOutput += data.toString(); + }); + client.on('exit', (code) => { + let connectionType; + const grepConnectionType = (line) => { + const matches = line.match(/(New|Reused), /); + if (matches) { + connectionType = matches[1]; + return true; + } + }; + const lines = clientOutput.split('\n'); + if (!lines.some(grepConnectionType)) { + throw new Error('unexpected output from openssl client'); + } + assert.strictEqual(code, 0); + cb(connectionType); + }); + } + + const server = tls.createServer(options, (cleartext) => { + cleartext.on('error', (er) => { + if (er.code !== 'ECONNRESET') + throw er; + }); + cleartext.end(); + }); + + server.listen(common.PORT, () => { + Client((connectionType) => { + assert.strictEqual(connectionType, 'New'); + Client((connectionType) => { + assert.strictEqual(connectionType, 'Reused'); + setTimeout(() => { + Client((connectionType) => { + assert.strictEqual(connectionType, 'New'); + server.close(); + }); + }, (SESSION_TIMEOUT + 1) * 1000); + }); + }); + }); +} diff --git a/tests/node_compat/test_runner.rs b/tests/node_compat/test_runner.rs index 15749ca7fd0dc2..150b632b90e7ac 100644 --- a/tests/node_compat/test_runner.rs +++ b/tests/node_compat/test_runner.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use test_util as util; use util::deno_config_path; diff --git a/tests/registry/jsr/@deno/otel/0.0.2/deno.json b/tests/registry/jsr/@deno/otel/0.0.2/deno.json new file mode 100644 index 00000000000000..cfa44a7d079222 --- /dev/null +++ b/tests/registry/jsr/@deno/otel/0.0.2/deno.json @@ -0,0 +1,14 @@ +{ + "name": "@deno/otel", + "version": "0.0.2", + "exports": { + ".": "./src/index.ts", + "./register": "./src/register.ts" + }, + "tasks": { + "check:license": "deno run -A tools/check_license.ts", + "check:docs": "deno doc --lint src/index.ts", + "check": "deno task check:license --check", + "ok": "deno fmt --check && deno lint && deno task check" + } +} diff --git a/tests/registry/jsr/@deno/otel/0.0.2/src/index.ts b/tests/registry/jsr/@deno/otel/0.0.2/src/index.ts new file mode 100644 index 00000000000000..9c4445783278c6 --- /dev/null +++ b/tests/registry/jsr/@deno/otel/0.0.2/src/index.ts @@ -0,0 +1,38 @@ +// Copyright 2024-2024 the Deno authors. All rights reserved. MIT license. + +import { context } from "npm:@opentelemetry/api@1"; +import { + BasicTracerProvider, + SimpleSpanProcessor, +} from "npm:@opentelemetry/sdk-trace-base@1"; + +// @ts-ignore Deno.telemetry is not typed yet +const telemetry = Deno.telemetry ?? Deno.tracing; + +let COUNTER = 1; + +/** + * Register `Deno.telemetry` with the OpenTelemetry library. + */ +export function register() { + context.setGlobalContextManager( + new telemetry.ContextManager() ?? telemetry.ContextManager(), + ); + + const provider = new BasicTracerProvider({ + idGenerator: Deno.env.get("DENO_UNSTABLE_OTEL_DETERMINISTIC") === "1" ? { + generateSpanId() { + return "1" + String(COUNTER++).padStart(15, "0"); + }, + generateTraceId() { + return "1" + String(COUNTER++).padStart(31, "0"); + } + } : undefined + }); + + // @ts-ignore Deno.tracing is not typed yet + const exporter = new telemetry.SpanExporter(); + provider.addSpanProcessor(new SimpleSpanProcessor(exporter)); + + provider.register(); +} diff --git a/tests/registry/jsr/@deno/otel/0.0.2/src/register.ts b/tests/registry/jsr/@deno/otel/0.0.2/src/register.ts new file mode 100644 index 00000000000000..54437070761d92 --- /dev/null +++ b/tests/registry/jsr/@deno/otel/0.0.2/src/register.ts @@ -0,0 +1,5 @@ +// Copyright 2024-2024 the Deno authors. All rights reserved. MIT license. + +import { register } from "./index.ts"; + +register(); diff --git a/tests/registry/jsr/@deno/otel/0.0.2_meta.json b/tests/registry/jsr/@deno/otel/0.0.2_meta.json new file mode 100644 index 00000000000000..79c28d61d1556f --- /dev/null +++ b/tests/registry/jsr/@deno/otel/0.0.2_meta.json @@ -0,0 +1,6 @@ +{ + "exports": { + ".": "./src/index.ts", + "./register": "./src/register.ts" + } +} \ No newline at end of file diff --git a/tests/registry/jsr/@deno/otel/meta.json b/tests/registry/jsr/@deno/otel/meta.json new file mode 100644 index 00000000000000..1cb49741a18954 --- /dev/null +++ b/tests/registry/jsr/@deno/otel/meta.json @@ -0,0 +1,8 @@ +{ + "scope": "deno", + "name": "otel", + "latest": "0.0.2", + "versions": { + "0.0.2": {} + } +} \ No newline at end of file diff --git a/tests/registry/jsr/@denotest/add/0.2.1/mod.ts b/tests/registry/jsr/@denotest/add/0.2.1/mod.ts new file mode 100644 index 00000000000000..864e8dd321d82e --- /dev/null +++ b/tests/registry/jsr/@denotest/add/0.2.1/mod.ts @@ -0,0 +1,4 @@ +// This is renamed to `add()` in 1.0.0. +export function sum(a: number, b: number): number { + return a + b; +} diff --git a/tests/registry/jsr/@denotest/add/0.2.1_meta.json b/tests/registry/jsr/@denotest/add/0.2.1_meta.json new file mode 100644 index 00000000000000..6eebe219854055 --- /dev/null +++ b/tests/registry/jsr/@denotest/add/0.2.1_meta.json @@ -0,0 +1,8 @@ +{ + "exports": { + ".": "./mod.ts" + }, + "moduleGraph1": { + "/mod.ts": {} + } +} diff --git a/tests/registry/jsr/@denotest/add/meta.json b/tests/registry/jsr/@denotest/add/meta.json index 72aea80cc34536..f1a50109d8bc08 100644 --- a/tests/registry/jsr/@denotest/add/meta.json +++ b/tests/registry/jsr/@denotest/add/meta.json @@ -4,6 +4,7 @@ "yanked": true }, "1.0.0": {}, - "0.2.0": {} + "0.2.0": {}, + "0.2.1": {} } } diff --git a/tests/registry/jsr/@denotest/has-only-pre-release/2.0.0-beta.1/mod.ts b/tests/registry/jsr/@denotest/has-only-pre-release/2.0.0-beta.1/mod.ts new file mode 100644 index 00000000000000..6a8018af412120 --- /dev/null +++ b/tests/registry/jsr/@denotest/has-only-pre-release/2.0.0-beta.1/mod.ts @@ -0,0 +1 @@ +export const foo = 1; \ No newline at end of file diff --git a/tests/registry/jsr/@denotest/has-only-pre-release/2.0.0-beta.1_meta.json b/tests/registry/jsr/@denotest/has-only-pre-release/2.0.0-beta.1_meta.json new file mode 100644 index 00000000000000..6c213a9c0541bb --- /dev/null +++ b/tests/registry/jsr/@denotest/has-only-pre-release/2.0.0-beta.1_meta.json @@ -0,0 +1,5 @@ +{ + "exports": { + ".": "mod.ts" + } +} diff --git a/tests/registry/jsr/@denotest/has-only-pre-release/2.0.0-beta.2/mod.ts b/tests/registry/jsr/@denotest/has-only-pre-release/2.0.0-beta.2/mod.ts new file mode 100644 index 00000000000000..6a8018af412120 --- /dev/null +++ b/tests/registry/jsr/@denotest/has-only-pre-release/2.0.0-beta.2/mod.ts @@ -0,0 +1 @@ +export const foo = 1; \ No newline at end of file diff --git a/tests/registry/jsr/@denotest/has-only-pre-release/2.0.0-beta.2_meta.json b/tests/registry/jsr/@denotest/has-only-pre-release/2.0.0-beta.2_meta.json new file mode 100644 index 00000000000000..6c213a9c0541bb --- /dev/null +++ b/tests/registry/jsr/@denotest/has-only-pre-release/2.0.0-beta.2_meta.json @@ -0,0 +1,5 @@ +{ + "exports": { + ".": "mod.ts" + } +} diff --git a/tests/registry/jsr/@denotest/has-only-pre-release/meta.json b/tests/registry/jsr/@denotest/has-only-pre-release/meta.json new file mode 100644 index 00000000000000..cce8d0954f41e3 --- /dev/null +++ b/tests/registry/jsr/@denotest/has-only-pre-release/meta.json @@ -0,0 +1,6 @@ +{ + "versions": { + "2.0.0-beta.1": {}, + "2.0.0-beta.2": {} + } +} diff --git a/tests/registry/jsr/@denotest/has-pre-release/1.0.0/mod.ts b/tests/registry/jsr/@denotest/has-pre-release/1.0.0/mod.ts new file mode 100644 index 00000000000000..6a8018af412120 --- /dev/null +++ b/tests/registry/jsr/@denotest/has-pre-release/1.0.0/mod.ts @@ -0,0 +1 @@ +export const foo = 1; \ No newline at end of file diff --git a/tests/registry/jsr/@denotest/has-pre-release/1.0.0_meta.json b/tests/registry/jsr/@denotest/has-pre-release/1.0.0_meta.json new file mode 100644 index 00000000000000..c5807f588ce8f7 --- /dev/null +++ b/tests/registry/jsr/@denotest/has-pre-release/1.0.0_meta.json @@ -0,0 +1,3 @@ +{ + "exports": {} +} diff --git a/tests/registry/jsr/@denotest/has-pre-release/2.0.0-beta.1/mod.ts b/tests/registry/jsr/@denotest/has-pre-release/2.0.0-beta.1/mod.ts new file mode 100644 index 00000000000000..6a8018af412120 --- /dev/null +++ b/tests/registry/jsr/@denotest/has-pre-release/2.0.0-beta.1/mod.ts @@ -0,0 +1 @@ +export const foo = 1; \ No newline at end of file diff --git a/tests/registry/jsr/@denotest/has-pre-release/2.0.0-beta.1_meta.json b/tests/registry/jsr/@denotest/has-pre-release/2.0.0-beta.1_meta.json new file mode 100644 index 00000000000000..6c213a9c0541bb --- /dev/null +++ b/tests/registry/jsr/@denotest/has-pre-release/2.0.0-beta.1_meta.json @@ -0,0 +1,5 @@ +{ + "exports": { + ".": "mod.ts" + } +} diff --git a/tests/registry/jsr/@denotest/has-pre-release/2.0.0-beta.2/mod.ts b/tests/registry/jsr/@denotest/has-pre-release/2.0.0-beta.2/mod.ts new file mode 100644 index 00000000000000..6a8018af412120 --- /dev/null +++ b/tests/registry/jsr/@denotest/has-pre-release/2.0.0-beta.2/mod.ts @@ -0,0 +1 @@ +export const foo = 1; \ No newline at end of file diff --git a/tests/registry/jsr/@denotest/has-pre-release/2.0.0-beta.2_meta.json b/tests/registry/jsr/@denotest/has-pre-release/2.0.0-beta.2_meta.json new file mode 100644 index 00000000000000..6c213a9c0541bb --- /dev/null +++ b/tests/registry/jsr/@denotest/has-pre-release/2.0.0-beta.2_meta.json @@ -0,0 +1,5 @@ +{ + "exports": { + ".": "mod.ts" + } +} diff --git a/tests/registry/jsr/@denotest/has-pre-release/meta.json b/tests/registry/jsr/@denotest/has-pre-release/meta.json new file mode 100644 index 00000000000000..ba7bc452d7ca4e --- /dev/null +++ b/tests/registry/jsr/@denotest/has-pre-release/meta.json @@ -0,0 +1,7 @@ +{ + "versions": { + "1.0.0": {}, + "2.0.0-beta.1": {}, + "2.0.0-beta.2": {} + } +} diff --git a/tests/registry/jsr/@denotest/multiple-exports/0.2.0/add.ts b/tests/registry/jsr/@denotest/multiple-exports/0.2.0/add.ts new file mode 100644 index 00000000000000..de02f69024bf76 --- /dev/null +++ b/tests/registry/jsr/@denotest/multiple-exports/0.2.0/add.ts @@ -0,0 +1 @@ +export * from "jsr:@denotest/add@1"; diff --git a/tests/registry/jsr/@denotest/multiple-exports/0.2.0/data.json b/tests/registry/jsr/@denotest/multiple-exports/0.2.0/data.json new file mode 100644 index 00000000000000..885e71c6ccde35 --- /dev/null +++ b/tests/registry/jsr/@denotest/multiple-exports/0.2.0/data.json @@ -0,0 +1,3 @@ +{ + "a": 1 +} \ No newline at end of file diff --git a/tests/registry/jsr/@denotest/multiple-exports/0.2.0/subtract.ts b/tests/registry/jsr/@denotest/multiple-exports/0.2.0/subtract.ts new file mode 100644 index 00000000000000..215c42310d69bb --- /dev/null +++ b/tests/registry/jsr/@denotest/multiple-exports/0.2.0/subtract.ts @@ -0,0 +1 @@ +export * from "jsr:@denotest/subtract@1"; diff --git a/tests/registry/jsr/@denotest/multiple-exports/0.2.0_meta.json b/tests/registry/jsr/@denotest/multiple-exports/0.2.0_meta.json new file mode 100644 index 00000000000000..d9f58b9a61a03f --- /dev/null +++ b/tests/registry/jsr/@denotest/multiple-exports/0.2.0_meta.json @@ -0,0 +1,7 @@ +{ + "exports": { + "./add": "./add.ts", + "./subtract": "./subtract.ts", + "./data-json": "./data.json" + } +} diff --git a/tests/registry/jsr/@denotest/multiple-exports/0.5.0/add.ts b/tests/registry/jsr/@denotest/multiple-exports/0.5.0/add.ts new file mode 100644 index 00000000000000..de02f69024bf76 --- /dev/null +++ b/tests/registry/jsr/@denotest/multiple-exports/0.5.0/add.ts @@ -0,0 +1 @@ +export * from "jsr:@denotest/add@1"; diff --git a/tests/registry/jsr/@denotest/multiple-exports/0.5.0/data.json b/tests/registry/jsr/@denotest/multiple-exports/0.5.0/data.json new file mode 100644 index 00000000000000..885e71c6ccde35 --- /dev/null +++ b/tests/registry/jsr/@denotest/multiple-exports/0.5.0/data.json @@ -0,0 +1,3 @@ +{ + "a": 1 +} \ No newline at end of file diff --git a/tests/registry/jsr/@denotest/multiple-exports/0.5.0/subtract.ts b/tests/registry/jsr/@denotest/multiple-exports/0.5.0/subtract.ts new file mode 100644 index 00000000000000..215c42310d69bb --- /dev/null +++ b/tests/registry/jsr/@denotest/multiple-exports/0.5.0/subtract.ts @@ -0,0 +1 @@ +export * from "jsr:@denotest/subtract@1"; diff --git a/tests/registry/jsr/@denotest/multiple-exports/0.5.0_meta.json b/tests/registry/jsr/@denotest/multiple-exports/0.5.0_meta.json new file mode 100644 index 00000000000000..d9f58b9a61a03f --- /dev/null +++ b/tests/registry/jsr/@denotest/multiple-exports/0.5.0_meta.json @@ -0,0 +1,7 @@ +{ + "exports": { + "./add": "./add.ts", + "./subtract": "./subtract.ts", + "./data-json": "./data.json" + } +} diff --git a/tests/registry/jsr/@denotest/multiple-exports/0.7.0/add.ts b/tests/registry/jsr/@denotest/multiple-exports/0.7.0/add.ts new file mode 100644 index 00000000000000..de02f69024bf76 --- /dev/null +++ b/tests/registry/jsr/@denotest/multiple-exports/0.7.0/add.ts @@ -0,0 +1 @@ +export * from "jsr:@denotest/add@1"; diff --git a/tests/registry/jsr/@denotest/multiple-exports/0.7.0/data.json b/tests/registry/jsr/@denotest/multiple-exports/0.7.0/data.json new file mode 100644 index 00000000000000..885e71c6ccde35 --- /dev/null +++ b/tests/registry/jsr/@denotest/multiple-exports/0.7.0/data.json @@ -0,0 +1,3 @@ +{ + "a": 1 +} \ No newline at end of file diff --git a/tests/registry/jsr/@denotest/multiple-exports/0.7.0/subtract.ts b/tests/registry/jsr/@denotest/multiple-exports/0.7.0/subtract.ts new file mode 100644 index 00000000000000..215c42310d69bb --- /dev/null +++ b/tests/registry/jsr/@denotest/multiple-exports/0.7.0/subtract.ts @@ -0,0 +1 @@ +export * from "jsr:@denotest/subtract@1"; diff --git a/tests/registry/jsr/@denotest/multiple-exports/0.7.0_meta.json b/tests/registry/jsr/@denotest/multiple-exports/0.7.0_meta.json new file mode 100644 index 00000000000000..d9f58b9a61a03f --- /dev/null +++ b/tests/registry/jsr/@denotest/multiple-exports/0.7.0_meta.json @@ -0,0 +1,7 @@ +{ + "exports": { + "./add": "./add.ts", + "./subtract": "./subtract.ts", + "./data-json": "./data.json" + } +} diff --git a/tests/registry/jsr/@denotest/multiple-exports/0.7.1/add.ts b/tests/registry/jsr/@denotest/multiple-exports/0.7.1/add.ts new file mode 100644 index 00000000000000..de02f69024bf76 --- /dev/null +++ b/tests/registry/jsr/@denotest/multiple-exports/0.7.1/add.ts @@ -0,0 +1 @@ +export * from "jsr:@denotest/add@1"; diff --git a/tests/registry/jsr/@denotest/multiple-exports/0.7.1/data.json b/tests/registry/jsr/@denotest/multiple-exports/0.7.1/data.json new file mode 100644 index 00000000000000..885e71c6ccde35 --- /dev/null +++ b/tests/registry/jsr/@denotest/multiple-exports/0.7.1/data.json @@ -0,0 +1,3 @@ +{ + "a": 1 +} \ No newline at end of file diff --git a/tests/registry/jsr/@denotest/multiple-exports/0.7.1/multiply.ts b/tests/registry/jsr/@denotest/multiple-exports/0.7.1/multiply.ts new file mode 100644 index 00000000000000..ce87b38fc819e0 --- /dev/null +++ b/tests/registry/jsr/@denotest/multiple-exports/0.7.1/multiply.ts @@ -0,0 +1,3 @@ +export function multiply(a: number, b: number): number { + return a * b; +} \ No newline at end of file diff --git a/tests/registry/jsr/@denotest/multiple-exports/0.7.1/subtract.ts b/tests/registry/jsr/@denotest/multiple-exports/0.7.1/subtract.ts new file mode 100644 index 00000000000000..215c42310d69bb --- /dev/null +++ b/tests/registry/jsr/@denotest/multiple-exports/0.7.1/subtract.ts @@ -0,0 +1 @@ +export * from "jsr:@denotest/subtract@1"; diff --git a/tests/registry/jsr/@denotest/multiple-exports/0.7.1_meta.json b/tests/registry/jsr/@denotest/multiple-exports/0.7.1_meta.json new file mode 100644 index 00000000000000..2897812168c311 --- /dev/null +++ b/tests/registry/jsr/@denotest/multiple-exports/0.7.1_meta.json @@ -0,0 +1,8 @@ +{ + "exports": { + "./add": "./add.ts", + "./subtract": "./subtract.ts", + "./data-json": "./data.json", + "./multiply": "./multiply.ts" + } +} diff --git a/tests/registry/jsr/@denotest/multiple-exports/meta.json b/tests/registry/jsr/@denotest/multiple-exports/meta.json index 02601e4d0d5188..c545ae8f461723 100644 --- a/tests/registry/jsr/@denotest/multiple-exports/meta.json +++ b/tests/registry/jsr/@denotest/multiple-exports/meta.json @@ -1,5 +1,9 @@ { "versions": { - "1.0.0": {} + "1.0.0": {}, + "0.7.1": {}, + "0.7.0": {}, + "0.5.0": {}, + "0.2.0": {} } } diff --git a/tests/registry/jsr/@denotest/subtract/0.2.0/mod.ts b/tests/registry/jsr/@denotest/subtract/0.2.0/mod.ts new file mode 100644 index 00000000000000..74e49ea6fa9601 --- /dev/null +++ b/tests/registry/jsr/@denotest/subtract/0.2.0/mod.ts @@ -0,0 +1,3 @@ +export function sub(a: number, b: number): number { + return a - b; +} diff --git a/tests/registry/jsr/@denotest/subtract/0.2.0_meta.json b/tests/registry/jsr/@denotest/subtract/0.2.0_meta.json new file mode 100644 index 00000000000000..6eebe219854055 --- /dev/null +++ b/tests/registry/jsr/@denotest/subtract/0.2.0_meta.json @@ -0,0 +1,8 @@ +{ + "exports": { + ".": "./mod.ts" + }, + "moduleGraph1": { + "/mod.ts": {} + } +} diff --git a/tests/registry/jsr/@denotest/subtract/meta.json b/tests/registry/jsr/@denotest/subtract/meta.json index 02601e4d0d5188..2f4cee59dfe7f8 100644 --- a/tests/registry/jsr/@denotest/subtract/meta.json +++ b/tests/registry/jsr/@denotest/subtract/meta.json @@ -1,5 +1,7 @@ { + "latest": "1.0.0", "versions": { - "1.0.0": {} + "1.0.0": {}, + "0.2.0": {} } } diff --git a/tests/registry/jsr/@std/assert/0.220.1/mod.ts b/tests/registry/jsr/@std/assert/0.220.1/mod.ts index fdcb56c8cf4b37..44aa962030f145 100644 --- a/tests/registry/jsr/@std/assert/0.220.1/mod.ts +++ b/tests/registry/jsr/@std/assert/0.220.1/mod.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /** A library of assertion functions. * If the assertion is false an `AssertionError` will be thrown which will diff --git a/tests/registry/jsr/@std/assert/1.0.0/mod.ts b/tests/registry/jsr/@std/assert/1.0.0/mod.ts index fdcb56c8cf4b37..44aa962030f145 100644 --- a/tests/registry/jsr/@std/assert/1.0.0/mod.ts +++ b/tests/registry/jsr/@std/assert/1.0.0/mod.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /** A library of assertion functions. * If the assertion is false an `AssertionError` will be thrown which will diff --git a/tests/registry/jsr/@std/http/1.0.0/mod.ts b/tests/registry/jsr/@std/http/1.0.0/mod.ts index 0a0e82847f3799..991765213a73df 100644 --- a/tests/registry/jsr/@std/http/1.0.0/mod.ts +++ b/tests/registry/jsr/@std/http/1.0.0/mod.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /** * Request handler for {@linkcode Route}. diff --git a/tests/registry/jsr/@std/path/0.220.1/_common/assert_path.ts b/tests/registry/jsr/@std/path/0.220.1/_common/assert_path.ts index 7033edcd1a79b5..2d7f7f1b92f508 100644 --- a/tests/registry/jsr/@std/path/0.220.1/_common/assert_path.ts +++ b/tests/registry/jsr/@std/path/0.220.1/_common/assert_path.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright the Browserify authors. MIT License. export function assertPath(path?: string) { diff --git a/tests/registry/jsr/@std/path/0.220.1/_common/constants.ts b/tests/registry/jsr/@std/path/0.220.1/_common/constants.ts index 9bfd411b668de0..2dae0df89f2273 100644 --- a/tests/registry/jsr/@std/path/0.220.1/_common/constants.ts +++ b/tests/registry/jsr/@std/path/0.220.1/_common/constants.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright the Browserify authors. MIT License. // Ported from https://github.com/browserify/path-browserify/ // This module is browser compatible. diff --git a/tests/registry/jsr/@std/path/0.220.1/_common/normalize.ts b/tests/registry/jsr/@std/path/0.220.1/_common/normalize.ts index 3a1a1628453f5b..a3d0a0caeeb0eb 100644 --- a/tests/registry/jsr/@std/path/0.220.1/_common/normalize.ts +++ b/tests/registry/jsr/@std/path/0.220.1/_common/normalize.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // This module is browser compatible. import { assertPath } from "./assert_path.ts"; diff --git a/tests/registry/jsr/@std/path/0.220.1/_common/normalize_string.ts b/tests/registry/jsr/@std/path/0.220.1/_common/normalize_string.ts index d8f0e090a6ed29..dbcf59029bc33f 100644 --- a/tests/registry/jsr/@std/path/0.220.1/_common/normalize_string.ts +++ b/tests/registry/jsr/@std/path/0.220.1/_common/normalize_string.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright the Browserify authors. MIT License. // Ported from https://github.com/browserify/path-browserify/ // This module is browser compatible. diff --git a/tests/registry/jsr/@std/path/0.220.1/posix/_util.ts b/tests/registry/jsr/@std/path/0.220.1/posix/_util.ts index b446155df5b3fc..ff4f87c2aa8e59 100644 --- a/tests/registry/jsr/@std/path/0.220.1/posix/_util.ts +++ b/tests/registry/jsr/@std/path/0.220.1/posix/_util.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright the Browserify authors. MIT License. // Ported from https://github.com/browserify/path-browserify/ // This module is browser compatible. diff --git a/tests/registry/jsr/@std/path/0.220.1/posix/join.ts b/tests/registry/jsr/@std/path/0.220.1/posix/join.ts index 625762ab97ace5..85bfb637944ada 100644 --- a/tests/registry/jsr/@std/path/0.220.1/posix/join.ts +++ b/tests/registry/jsr/@std/path/0.220.1/posix/join.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // This module is browser compatible. import { assertPath } from "../_common/assert_path.ts"; diff --git a/tests/registry/jsr/@std/path/0.220.1/posix/normalize.ts b/tests/registry/jsr/@std/path/0.220.1/posix/normalize.ts index 8e88ad254b036c..40ccc59412bc39 100644 --- a/tests/registry/jsr/@std/path/0.220.1/posix/normalize.ts +++ b/tests/registry/jsr/@std/path/0.220.1/posix/normalize.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // This module is browser compatible. import { assertArg } from "../_common/normalize.ts"; diff --git a/tests/registry/jsr/@std/url/0.220.1/join.ts b/tests/registry/jsr/@std/url/0.220.1/join.ts index b9c8f19d31a648..b1f42a0a97d738 100644 --- a/tests/registry/jsr/@std/url/0.220.1/join.ts +++ b/tests/registry/jsr/@std/url/0.220.1/join.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // This module is browser compatible. import { join as posixJoin } from "jsr:@std/path@^0.220.1/posix/join"; diff --git a/tests/registry/jsr/@std/url/0.220.1/normalize.ts b/tests/registry/jsr/@std/url/0.220.1/normalize.ts index e8d728435bb8ff..f9d89dd8f98bdd 100644 --- a/tests/registry/jsr/@std/url/0.220.1/normalize.ts +++ b/tests/registry/jsr/@std/url/0.220.1/normalize.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // This module is browser compatible. import { normalize as posixNormalize } from "jsr:@std/path@^0.220.1/posix/normalize"; diff --git a/tests/registry/npm/@denotest/has-patch-versions/0.1.0/package.json b/tests/registry/npm/@denotest/has-patch-versions/0.1.0/package.json new file mode 100644 index 00000000000000..45684d4f5265a9 --- /dev/null +++ b/tests/registry/npm/@denotest/has-patch-versions/0.1.0/package.json @@ -0,0 +1,5 @@ +{ + "name": "@denotest/has-patch-versions", + "version": "0.1.0" + +} \ No newline at end of file diff --git a/tests/registry/npm/@denotest/has-patch-versions/0.1.1/package.json b/tests/registry/npm/@denotest/has-patch-versions/0.1.1/package.json new file mode 100644 index 00000000000000..4483df34e58e21 --- /dev/null +++ b/tests/registry/npm/@denotest/has-patch-versions/0.1.1/package.json @@ -0,0 +1,5 @@ +{ + "name": "@denotest/has-patch-versions", + "version": "0.1.1" + +} \ No newline at end of file diff --git a/tests/registry/npm/@denotest/has-patch-versions/0.2.0/package.json b/tests/registry/npm/@denotest/has-patch-versions/0.2.0/package.json new file mode 100644 index 00000000000000..55efaaa3263f48 --- /dev/null +++ b/tests/registry/npm/@denotest/has-patch-versions/0.2.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@denotest/has-patch-versions", + "version": "0.2.0" +} \ No newline at end of file diff --git a/tests/registry/npm/@denotest/has-pre-release/1.0.0/package.json b/tests/registry/npm/@denotest/has-pre-release/1.0.0/package.json new file mode 100644 index 00000000000000..027b783d547318 --- /dev/null +++ b/tests/registry/npm/@denotest/has-pre-release/1.0.0/package.json @@ -0,0 +1,7 @@ +{ + "name": "@denotest/has-pre-release", + "version": "1.0.0", + "publishConfig": { + "tag": "latest" + } +} \ No newline at end of file diff --git a/tests/registry/npm/@denotest/has-pre-release/2.0.0-beta.1/package.json b/tests/registry/npm/@denotest/has-pre-release/2.0.0-beta.1/package.json new file mode 100644 index 00000000000000..b3d3b3e6346f6e --- /dev/null +++ b/tests/registry/npm/@denotest/has-pre-release/2.0.0-beta.1/package.json @@ -0,0 +1,4 @@ +{ + "name": "@denotest/has-pre-release", + "version": "2.0.0-beta.1" +} \ No newline at end of file diff --git a/tests/registry/npm/@denotest/has-pre-release/2.0.0-beta.2/package.json b/tests/registry/npm/@denotest/has-pre-release/2.0.0-beta.2/package.json new file mode 100644 index 00000000000000..b6f8ea4c761779 --- /dev/null +++ b/tests/registry/npm/@denotest/has-pre-release/2.0.0-beta.2/package.json @@ -0,0 +1,4 @@ +{ + "name": "@denotest/has-pre-release", + "version": "2.0.0-beta.2" +} \ No newline at end of file diff --git a/tests/registry/npm/@denotest/specifier-two-slashes/1.0.0/index.js b/tests/registry/npm/@denotest/specifier-two-slashes/1.0.0/index.js new file mode 100644 index 00000000000000..aca5ca1b8efbbd --- /dev/null +++ b/tests/registry/npm/@denotest/specifier-two-slashes/1.0.0/index.js @@ -0,0 +1,2 @@ +// node.js will resolve this as ./other.js +export * from ".//other.js"; \ No newline at end of file diff --git a/tests/registry/npm/@denotest/specifier-two-slashes/1.0.0/other.js b/tests/registry/npm/@denotest/specifier-two-slashes/1.0.0/other.js new file mode 100644 index 00000000000000..7d658310b0d95f --- /dev/null +++ b/tests/registry/npm/@denotest/specifier-two-slashes/1.0.0/other.js @@ -0,0 +1,3 @@ +export function add(a, b) { + return a + b; +} diff --git a/tests/registry/npm/@denotest/specifier-two-slashes/1.0.0/package.json b/tests/registry/npm/@denotest/specifier-two-slashes/1.0.0/package.json new file mode 100644 index 00000000000000..55e46b2fd1dc94 --- /dev/null +++ b/tests/registry/npm/@denotest/specifier-two-slashes/1.0.0/package.json @@ -0,0 +1,6 @@ +{ + "name": "@denotest/specifier-two-slashes", + "version": "1.0.0", + "type": "module", + "main": "index.js" +} \ No newline at end of file diff --git a/tests/registry/npm/@opentelemetry/api/registry.json b/tests/registry/npm/@opentelemetry/api/registry.json new file mode 100644 index 00000000000000..de811bf209696c --- /dev/null +++ b/tests/registry/npm/@opentelemetry/api/registry.json @@ -0,0 +1 @@ +{"_id":"@opentelemetry/api","_rev":"85-64e171afc119bdc7344f39430efa3542","name":"@opentelemetry/api","description":"Public API for OpenTelemetry","dist-tags":{"canary":"0.17.1-alpha.21","rc":"1.0.0-rc.1","next":"1.3.0","latest":"1.9.0"},"versions":{"0.4.0":{"name":"@opentelemetry/api","version":"0.4.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.4.0","maintainers":[{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"b430325c9f0b460600abbd4040b73feef878c123","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.4.0.tgz","fileCount":83,"integrity":"sha512-SWT1dx/fHMVmQpMmlHGrAHnpHeNqCC+e/MudmuF0lwqZVdF8u/8Fj8ZJSG3WJaq7OgGboJZEw7c0f5bnl/KqCA==","signatures":[{"sig":"MEYCIQD3bqsOJILmnEows9bwuMXD4vUXuyM7vczNC14nsMlX4gIhAM2jiS6fIH1zDQt7DLCzv6udB6CfoDZ5kNhVwufUsVZR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":136876,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeO0mVCRA9TVsSAnZWagAAowYQAJi1qg+NCoAPlaqfAmhX\nKGGbUdST4wa2TwxRewNUjib3AMHOA/KrkF5VQ8VeO8lVtU3ly4DhAcvqnHzX\nonYaanLvP8cvVTFeJzqQFnEEhHRGhoOeStYOA/zc32KE0euB5/PMcYC91tek\nbIP7ynYTbnIVf042cndkIuNAAjZbJ8ZSKqF+YCu7w6x7QcTkbE6p0Zp4LVf1\niQ/r9sgKaMmERyy+pvr1d0DNyq6jw+pVlW8SZV2xBIJlCZ+NDSq50EBiaVwG\nkZ1hVlOQ6czCFJLPbxwGyD8jdGjWyNpap8Aa+LVS0wmJIaUHaOTZnOM0EoeA\nFy+qFY6bfImZTL1J3OswP7E8YtQuiJ2vyjFvr31L4VnssDNEEDPYOeNfkS+w\n3WtA5E9mmC3uxp8zvoUrdbUnWhYFNo6hWjW7gBHXrfz7mz6Tj8ZXANicZ3iY\ngUxy7SFXuMdazk+POSyxD+XcQr9FJC9iF+AmH/1IJi9XbF4cpM4sWLQyprPE\ny6OhzP/QB5JLDHKpbq272+rKxYp/TZpcJsHr8VCuNGULg8QHO+b/eZzdxa3l\nwoykZbtACapB5h8w44g0zBrBpOYjyb5sf+PLTlMOpgNtSogxLCLG9ilEtZpO\nLvhlTXAU1eMlwERFcm33Q0ARaWQlNGxjdnYi7xGwk4w7f1OhRWahhWplsilJ\nTiTi\r\n=6Rey\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"scripts":{"fix":"gts fix","docs":"typedoc --tsconfig tsconfig.json","test":"nyc ts-mocha -p tsconfig.json test/**/*.ts","build":"npm run compile","check":"gts check","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","docs-test":"linkinator docs/out --silent --skip david-dm.org --skip https://open-telemetry.github.io/opentelemetry-js/classes/.+api.html --skip https://www.npmjs.com/package/@opentelemetry/api","precompile":"tsc --version","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"mayurkale22","email":"mayurkale22@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.4.1","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"10.15.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.1.0","nyc":"^14.1.1","karma":"^4.4.1","mocha":"^6.1.0","codecov":"^3.6.1","typedoc":"^0.15.0","webpack":"^4.35.2","ts-mocha":"^6.0.0","ts-loader":"^6.0.4","linkinator":"^1.5.0","typescript":"3.7.2","@types/node":"^12.6.8","karma-mocha":"^1.3.0","@types/mocha":"^5.2.7","karma-webpack":"^4.0.2","@types/webpack-env":"1.13.9","karma-spec-reporter":"^0.0.32","karma-chrome-launcher":"^3.1.0","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.16.0","istanbul-instrumenter-loader":"^3.0.1","karma-coverage-istanbul-reporter":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/api_0.4.0_1580943765244_0.9482075107831929","host":"s3://npm-registry-packages"}},"0.5.0":{"name":"@opentelemetry/api","version":"0.5.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.5.0","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"faa750adb813ff6a9acdcdca697aa499894195e1","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.5.0.tgz","fileCount":87,"integrity":"sha512-lji+cZsWRtiuL54uilOa2EMVNM19bfgX8t3lfishjEaKgfHm1ZsJvks8rWtItKTYEYtg2UXkDj9cjqpLdNWNVw==","signatures":[{"sig":"MEUCIQDDoMNmODa05ejHqx3iXtLmBw8ulj5bvVR92AAgeJmNNAIgOuu52BJcrvdbkrbC8XVjRE1xYNj7s1XrERnvXdlc+tI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":150386,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeb/dmCRA9TVsSAnZWagAAcukP/0c3EmwyKDdtudAc+aKE\nRAS/6vmiaP6Wkc2gzsMG4l8eXRZRdjjWyLDx0BViFOu4SOzvs+Ars7rmu5xv\n2N4ZPUbLhrHU4t12SDXNVeTBniZ2sm/eGtNIvh06HNEjrsQRyuT+JcQo3YHZ\n7VCTXvLtWuA0P+Yie8/a1SmPjnGvo6HEGyhDl9tUMz5/wr53YTMVcLOh5A4a\n4WdWEmqF/MAQ2jOL2t000EFiZVvX8t+yX4enMZfaBOt8x6lyvA6AMNKg5Ow1\n74yg63Gj8PZwhPhiIdbzLM1GKeDnBXSudgQQGujvRHgpER0BVg8mWZOFYLs0\npaiHSJ/lMTC7YRaPRi9lfll24QaAYkpTmXpP2wmRoXdAEh3BmHFgUT9b6M1f\nINOZmlMhxywfiY+tb1JBIctqzNXQX5EiI81+0A3WcXE81+sbnT3moX6oki/r\nEn86/JlKieVCOD/FtK+bpPBO/7zaGZviGEoSKkdqne30KRymNvD+wGMtLShx\nNedOCJsFIr9QIXavMGHEOzz1p7+qlRsn6Zp2qf0CPbxfd38lUA9UhiC0ZRvs\nRJ24CRbq5mzh1urnxoIUGqcz9TXqzFecnjURfgW7HnbSNRV7xO2w6WA3CEPr\n9GzrSSKI8OuD0EBAgBvnBh5B7C/HLdTMqxn2P5VB6Ky+aUnvbrWz6OpcdE45\nH5s7\r\n=bWUX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"scripts":{"docs":"typedoc --tsconfig tsconfig.json --exclude test/**/*.ts","lint":"gts check","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"gts fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","precompile":"tsc --version","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"mayurkale22","email":"mayurkale22@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.4.1","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"10.15.1","dependencies":{"@opentelemetry/context-base":"^0.5.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.1.0","nyc":"^14.1.1","karma":"^4.4.1","mocha":"^6.1.0","codecov":"^3.6.1","typedoc":"^0.15.0","webpack":"^4.35.2","ts-mocha":"^6.0.0","ts-loader":"^6.0.4","linkinator":"^2.0.3","typescript":"3.7.2","@types/node":"^12.6.8","karma-mocha":"^1.3.0","@types/mocha":"^5.2.7","karma-webpack":"^4.0.2","@types/webpack-env":"1.13.9","karma-spec-reporter":"^0.0.32","karma-chrome-launcher":"^3.1.0","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.16.0","istanbul-instrumenter-loader":"^3.0.1","karma-coverage-istanbul-reporter":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/api_0.5.0_1584396133895_0.5248032846555832","host":"s3://npm-registry-packages"}},"0.5.1":{"name":"@opentelemetry/api","version":"0.5.1","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.5.1","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"0adda4e8cd008994dbcf7162f6999d977f2c80b3","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.5.1.tgz","fileCount":83,"integrity":"sha512-7l57iZ2qdnEzAvORZZjKZ3m8eHqOfjd+DFTG5IEr2+WzPX3BqM142233trRro8smiKN9t5JXYjEM9q8edwEa5Q==","signatures":[{"sig":"MEYCIQDhXWqnZxPni4YZOM516XjWzcE7Yua2WmQnDMzVyT7KoQIhAI1It9Q3Ljaqk3M3hVE0tOu+gk7VQChpYTWKs7UFNSnH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":144893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedBGGCRA9TVsSAnZWagAAJT0P/2pTVPo88FItUCkCfUkk\nFSgfEmO/DZfYw334lj8u5E1RwM2vtOeYcwjBKaKIJW9GWUxYLDnKY7aXVFwn\nQsFpZhqtag+yAn21jKZVrYT8v4RgazYfkbA+4kN6J8dWMQlq1xSWODUE6AsX\nqo/VGtKZLjVFugz6Sr9ou1Q5yBrw3bjlb7+0iiwGC8gYa3IwxQAiN454p0t9\n2si5ekiHTn1Sa5J628b9h4ScylFlncbrjmcXYtsw/R4GxZORDygQIMwVssNF\nDdjM+kcOZRd8cIqT/5DH2HV2mMs37GD+Rzfno5BUmBisjleYQvlaj4GbmZHC\noWpC/W5eOMuUrGM3suZXFWzeWgN8+bEbh5D3Gn+9hT0nWgq0BG/cvwdoishZ\nEwbwMf2a/4zI4zuuUdTL82BjBsCmH6HSPvVxtaPteq67oaeE9CwTiCCuQVHB\nKDi6UQMabiuN5VT1wm19Vc/hBf1gZUj3+YwLVLvu7V6OfBa89M3eDma5ugVH\nBM1hhxjnz4zUybuCH3hcTNFSI6Mayt/wLhxquUc/5PpidX3mdO2dilXg8Myx\nwVMTsEAVT8BpBQWR75Fttn0Rb5J67ZvX8wPpxVoRmlFqK+lsqM+cX8m0Dolt\nFL5a2YUEKzGMzOl7JIwP/jscfHn2nrsTAi6Oab5UAXtDeNkCje+jeyNjxEWP\ngAGY\r\n=NMJv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"scripts":{"docs":"typedoc --tsconfig tsconfig.json --exclude test/**/*.ts","lint":"gts check","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"gts fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","precompile":"tsc --version","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.14.1","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"12.14.1","dependencies":{"@opentelemetry/context-base":"^0.5.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.1.0","nyc":"^14.1.1","karma":"^4.4.1","mocha":"^6.1.0","codecov":"^3.6.1","typedoc":"^0.15.0","webpack":"^4.35.2","ts-mocha":"^6.0.0","ts-loader":"^6.0.4","linkinator":"^2.0.3","typescript":"3.7.2","@types/node":"^12.6.8","karma-mocha":"^1.3.0","@types/mocha":"^5.2.7","karma-webpack":"^4.0.2","@types/webpack-env":"1.13.9","karma-spec-reporter":"^0.0.32","karma-chrome-launcher":"^3.1.0","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.16.0","istanbul-instrumenter-loader":"^3.0.1","karma-coverage-istanbul-reporter":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/api_0.5.1_1584664965764_0.017873719460831605","host":"s3://npm-registry-packages"}},"0.5.2":{"name":"@opentelemetry/api","version":"0.5.2","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.5.2","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"b36c45a0f2bca74ac551d52d4ae8c29f074b211c","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.5.2.tgz","fileCount":83,"integrity":"sha512-SLahDSBn08zxz+zd0kq3XXn29HyUegWX/EUD79RuF7qBoXfMlwnCOx8eIzLsIRUDY4S9Qq7BYGOHdKz2p8oeeQ==","signatures":[{"sig":"MEUCIQCE4D9x6wLU4LE/fvdS1iBZThuA5Dapa3/0hWI5jO4rzwIgL0iVuOsg3VyalbUaNHlU+UHcFEVYIENIXiw+eonLqOs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":144698,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefkAJCRA9TVsSAnZWagAAW4UP/i4+EPq7rxe31X4ZREHG\nYH8eiSaJZQzQ+IMVhnf2Py44jV4E+SZgqUZyF7Vp+RUuFVvmiublrs03Syif\nFKL6akE7ThrH4Fwl2mV6v/INKxnd+S98JCp/9oVtrjtdqwJz8GSE2Bw6Q9Wl\noYvFne62bLXCWrMsiuWmo5VPEHjNcVOzdUtxyAa0RWsI72Qen1x5N43DTOXe\nPRdd90lq/VqBWtclILHTgwSgtUUx3rbxW7GYemeXgwjRQVSQ7lH6IAZWIYh8\nM+UzSfEjEMKxyiTcxHnF78TMpGSuIT18OgTN6unO+QKz59qDeet7+t1BAe44\nWRWp5eLiVeflDrcllETCtdvG0qaWrWkc75wUcsjo5X3+I6yQZWx/vgUA+hPA\nJHmE5Bbtkq8OrRQjaMHrczxIHZtIcXq45N80gFTCCDWVv5XlJMilbttZ1PE6\nGrMHkG1mdEFsdedPT/DjRod3SaEl6Wlwsulr5PPDpVlqIY9tTuBlPyflC+4t\nc+TwY1NbvriX9/djN3ccL3UxAe8gbnOXkvHJhaPkFfLaMLs8IX4tE78iqe/G\nNkYgGyohTdNrhzjp6LExnEXtaImKLOO3fX8Fc9OcnAk+LojaRooHnJ6WppnX\nfnrg3uh27uJavEmIYr2OebwurqW4yg5vTvOtlAxTH9EHnQ6sVXER7y7xqRNs\n8SqE\r\n=6d1D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"scripts":{"docs":"typedoc --tsconfig tsconfig.json --exclude test/**/*.ts","lint":"gts check","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"gts fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","precompile":"tsc --version","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.14.1","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"12.14.1","dependencies":{"@opentelemetry/context-base":"^0.5.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.1.0","nyc":"^14.1.1","karma":"^4.4.1","mocha":"^6.1.0","codecov":"^3.6.1","typedoc":"^0.15.0","webpack":"^4.35.2","ts-mocha":"^6.0.0","ts-loader":"^6.0.4","linkinator":"^2.0.3","typescript":"3.7.2","@types/node":"^12.6.8","karma-mocha":"^1.3.0","@types/mocha":"^5.2.7","karma-webpack":"^4.0.2","@types/webpack-env":"1.13.9","karma-spec-reporter":"^0.0.32","karma-chrome-launcher":"^3.1.0","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.16.0","istanbul-instrumenter-loader":"^3.0.1","karma-coverage-istanbul-reporter":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/api_0.5.2_1585332233547_0.14772137772167837","host":"s3://npm-registry-packages"}},"0.6.0":{"name":"@opentelemetry/api","version":"0.6.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.6.0","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"f23bca57b9ae15741a52047ec7ea9c8b0c69b501","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.6.0.tgz","fileCount":83,"integrity":"sha512-Y3rEz7E1O40bKQMRfPIvQr9WiQQ2ieuIrDYz1kHSiBhQqVcu60Pon1NVWjXVMv2jj3DNKskFQDDGdliWZLx5/g==","signatures":[{"sig":"MEYCIQCxTMZv4CtVE/hmA2sy5IBY6WaWnrHPltsSJ+oYDDyyjgIhAMH0hdIR3gnP37eGlv+W3gAIxQI/2yg2n+6LFNU99SVr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":143961,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehh/rCRA9TVsSAnZWagAAtR4P/R6zPPqnIbTyJ/jtyquL\npH1MGt3ZxVHXRtmBq5URig0LTqcM3k097ZY6cpT4tGFhuY0duIqxm4dBJYtU\nXFy1/PF+sgx6+g/zdcFClWYgNtDRjIUBizEU5iI5bKwGKbd2NNFyZqaFwp3I\n1SHajav6xhhvip5x48jbiUcM7IO20ALkWql+9915MFOnyol79J2l4ABc+l5u\nUGdvXpx5IP+POkJvO3mu+X0W9pNae+P+4Sg+SUqEdt7NX+RABdpvY9rSKbOj\nDR1k2ZFpsE6rPD/BMIN9WsTR3gXwD3qo+/n4ktCsDttHt+C5CmQmaU3015PF\n8aWlAm90bj2klFP/1CY/OHZbncVO2rHLC8EUuaPKiwJ9whoJuHze41PY5WAS\nxh4z8Kkai7oPSoEP4c17wM9jW1ucueNU+tDq2m8fmGcSCCe+QsCl3mOrumd1\nKH7mHNEe2kyQECBuSvAVmgJ/fbkwYFNgopRMu4phL/NPL3pinfW+wRlxaHrx\n5yp5tUUK1ivTOrPEfhs7e0fa2VHVjuobG9frtPjfgzgivWtvvYjRZXWfoTCD\nGBnYWcackROX8TqZreMfLL0Z/CSShMZDDzalMMTz0IOjpwISCl4wDYhJrt9G\njFzwCcZ44NmfwwRMlQUrOqhNUOfp16tdCbdNIlPChX4PGaZmNiL8uE+8xQ+f\n8mwK\r\n=wSwS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"scripts":{"docs":"typedoc --tsconfig tsconfig.json --exclude test/**/*.ts","lint":"gts check","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"gts fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","precompile":"tsc --version","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"mayurkale22","email":"mayurkale22@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.4.1","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"10.15.1","dependencies":{"@opentelemetry/context-base":"^0.6.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.1.0","nyc":"^15.0.0","karma":"^4.4.1","mocha":"^6.1.0","codecov":"^3.6.1","typedoc":"^0.15.0","webpack":"^4.35.2","ts-mocha":"^6.0.0","ts-loader":"^6.0.4","linkinator":"^2.0.3","typescript":"3.7.2","@types/node":"^12.6.8","karma-mocha":"^1.3.0","@types/mocha":"^5.2.7","karma-webpack":"^4.0.2","@types/webpack-env":"1.13.9","karma-spec-reporter":"^0.0.32","karma-chrome-launcher":"^3.1.0","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.16.0","istanbul-instrumenter-loader":"^3.0.1","karma-coverage-istanbul-reporter":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/api_0.6.0_1585848298539_0.4120334110309982","host":"s3://npm-registry-packages"}},"0.6.1":{"name":"@opentelemetry/api","version":"0.6.1","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.6.1","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"a00b504801f408230b9ad719716fe91ad888c642","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.6.1.tgz","fileCount":83,"integrity":"sha512-wpufGZa7tTxw7eAsjXJtiyIQ42IWQdX9iUQp7ACJcKo1hCtuhLU+K2Nv1U6oRwT1oAlZTE6m4CgWKZBhOiau3Q==","signatures":[{"sig":"MEYCIQC+pqEB2svUaHFj1vBr2fFPQSwbZ3uVB0LueXL1GVsItAIhAIBMc//A+30EikQLFBu2HT3ERaj08Su1+w2+ygtq01aR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":143965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejhnmCRA9TVsSAnZWagAAKk0P/Ai/p0Rr8Soj6+TIP9EQ\noYdlsaY12Qmoo+WbHnJYYqQwwIIrfkHQfPSkOJHrCABLWLtQZX+kaXFSpSF5\nIu8X1PZxcWQ9ar3DOEXY4zoWESiUxwPNMiJ40YbdBAmQGMQUhbhOELwHJ3u0\nwVhLwY5q2zdvGAUGPUvLT8h+I3VStD+uTotqhuyvZyJHBjtkC6KbDL6m908C\nAvbaU0QzfTtnorG/n4TasUGv+Ayqr6O84qFpjhaNa5VIOtxxjvsqLwNAdRyz\nJE4D9NJEEbiDzqvlGtRzySRaNQNe2FhV6RN6eLxZ1Gr+1N5zj2n0whtGPSoF\nHKMhjluzQTPxY+Q5WOtHJ+x8nu/2E3zJSJBn5w0zCQP8Lla1V2rBJLeHh5VL\neLTSF3oC27W5RiAQOptUJC+fa0WWbEJbyEMYsUudN82n9PwRvnqwGvcTaXV6\nYq05z5tTiZfHrWtjON4ki1VXiNLHIOwIguZAR6vny6fqJLj8G6o7F/hVS2rk\nlTO++Ih2U/xFH9T6kRASfeiA+iLgZiyvoIXCes2FfjEEDUAFHjc7TD+bT8Fi\ncF2GB86tT2SUzSWzaqdaovJmisLv8bg6FAAzIDkY5FndzHbOKa6m1oXroPfH\nfadQRR5aMqoYemlAymsqbDU/R0X3T2n37uFzGH/WdWabn56tYs32j7t5LU1D\nySdw\r\n=5Jw8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"scripts":{"docs":"typedoc --tsconfig tsconfig.json --exclude test/**/*.ts","lint":"gts check","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"gts fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","precompile":"tsc --version","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.14.1","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"12.14.1","dependencies":{"@opentelemetry/context-base":"^0.6.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.1.0","nyc":"^15.0.0","karma":"^4.4.1","mocha":"^6.1.0","codecov":"^3.6.1","typedoc":"^0.15.0","webpack":"^4.35.2","ts-mocha":"^6.0.0","ts-loader":"^6.0.4","linkinator":"^2.0.3","typescript":"3.7.2","@types/node":"^12.6.8","karma-mocha":"^1.3.0","@types/mocha":"^7.0.0","karma-webpack":"^4.0.2","@types/webpack-env":"1.13.9","karma-spec-reporter":"^0.0.32","karma-chrome-launcher":"^3.1.0","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.16.0","istanbul-instrumenter-loader":"^3.0.1","karma-coverage-istanbul-reporter":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/api_0.6.1_1586371045572_0.9899006818100518","host":"s3://npm-registry-packages"}},"0.7.0":{"name":"@opentelemetry/api","version":"0.7.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.7.0","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"99be9ae3aa64c0e73077ac7c093ea81303aa609d","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.7.0.tgz","fileCount":85,"integrity":"sha512-h4wdvfZ7y3Md3gRr0zycv6oFuqHjWdZ5oJGSoDGoyG6vQSPdIJorWH4SSalif8yW9l9T+bsAkHAt2VVG/BiW8g==","signatures":[{"sig":"MEUCIC5eb+AQG2b1UTMoRsZVXZMgbXvXGwNwbD5vNVHYoT/6AiEA/g13XKUQ73C5CSwAyHQKfEm44jKFtwDn6EjeGMdWvnI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":145885,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeoyxoCRA9TVsSAnZWagAAN7QP/3MoW0foS/+pPsZzAAEH\ntGXNLncM2v3F0aIGeayRu4PlNJfmCPQBdihjshonEL71WG4TTMkodPTWU72O\nQQRaaBkvQwV9k0emZgBHmhxC0S/V19R0kOP1BY2iZ80U+MdZlHf5rMzNz4Ii\nf7fVfmOk/ZXs1r0kMCK0viVFANztZPJNHpjmt4sDRalR9HExOYK1KuF1Gp/5\nuP8LuRk+Z9OO8Ldhd27oWsfT84Yg83cLXdWvntK/XDhwTs9L8XUcG7n6uYk7\n7C1FqyRaquwaOfPAap5AbLOG9pQre7EfY5p1h0ASGa6WUDFtY8Ejh1sMvaOO\nPDouQnS7Pn3TQfzW/VJLLT5GnoskfZgbZG/qce6Q8qQ1C1QaIZqAXHx53SZ1\nWE0c58TdThLB6l6GwxPpPhmCL3T3EIsbyj65VzpdWpTnw1SIBgk/St+Om03/\nO84ib7TDQwUG/WRmiuFcEzl9IbQlwmrElhhyiCeHidfHTegL1axHzhxwDET2\nP//75PaWF+Gq/WCeDDNO51CbJ7GRF+UMtrSVjjvP9XDZPtMaFPZdQY00FlMi\nfSHTXK16+4JeLr1FiK2/W8VplEGjGooXzgQb8UAqWdqnCDbQyG3Vqs79Ytnp\nYiWD5O7mHrAH3RtkTppjrTwv6L9mbF4L5RhbS3BtTnxyLxo3wogoITkwKILP\nB3vU\r\n=AfyL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"scripts":{"docs":"typedoc --tsconfig tsconfig.json --exclude test/**/*.ts","lint":"gts check","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"gts fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","precompile":"tsc --version","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"mayurkale22","email":"mayurkale22@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.4.1","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"10.15.1","dependencies":{"@opentelemetry/context-base":"^0.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.1.0","nyc":"^15.0.0","karma":"^4.4.1","mocha":"^6.1.0","codecov":"^3.6.1","typedoc":"^0.15.0","webpack":"^4.35.2","ts-mocha":"^6.0.0","ts-loader":"^6.0.4","linkinator":"^2.0.3","typescript":"3.7.2","@types/node":"^12.6.8","karma-mocha":"^1.3.0","@types/mocha":"^7.0.0","karma-webpack":"^4.0.2","@types/webpack-env":"1.13.9","karma-spec-reporter":"^0.0.32","karma-chrome-launcher":"^3.1.0","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.16.0","istanbul-instrumenter-loader":"^3.0.1","karma-coverage-istanbul-reporter":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/api_0.7.0_1587752039689_0.8114466727729208","host":"s3://npm-registry-packages"}},"0.8.0":{"name":"@opentelemetry/api","version":"0.8.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.8.0","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"3f7c49375649ebc09981d528efcad95a0efc85e9","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.8.0.tgz","fileCount":87,"integrity":"sha512-P7+9cdg55aBQxUPj/hst9uu3aPmbIxlqB9//pwa3XPDXtFsKEDH517Rq/TEZQob3255KDyE2JoTIpWDb2isYhg==","signatures":[{"sig":"MEUCIFMzehJLIWFQlEs6xP7ICHST/2EIsk/V0rLaxHAFYq+QAiEA8mq+2c2p9EzWbJaesw/LHp6QB6tosiKdoL7FXUGiKW8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155783,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeutBsCRA9TVsSAnZWagAAQbsP/R0HGNiR1eVDbyz8mG5N\nz69ecbeFVmHZZpZBO8PMMYC78Q05XSfOkXo0L/KtkvIx3GWAKdLdaAUT6gd/\nWcQ140nUQLrp2qI73nYFWf9nmi8TmLBfMBKCSRUyKoadHjNNZeIb0o36s4Ch\nRMALkAcv9e0KGh5IawwGeX1/V3CILa4KlVbvTm8SsfBcl0hraKSDLb9zW70R\n3JZ18kKSVk79zgXQRuXZQGL1fhcK7Bh2e3BgmgdVLKfFzcM1Tshacr9ueGkN\nv1diZUy/+shIwhemF/cDwcbuXT+AfGfqwkoYjmiltA8keQVFmXIcinC7Jo3j\ney/Kkqxgd4jFLwCgLWxn/i33QvwEjLn9HiXJ8OT6PkcjnT7+Afw+ZWkZhUH5\nGuxakGWkVP+dTMVnW47MSmSrVoK1Kl3EiMhI+l4f+ckZufxhCX5AemrqHzM4\nyMIXOpKJkrOAuNK7dAl3wv58mOAUHBhDnDPBCYCuWCZr7Fi6L2dwAa8wWyHY\nhZsbLqWYh0NQaU9yOvxzZzctdkP9MCsAB/OGJpK+SCN0hHMiPwmPxkPsRWgV\n814z+o4vfRo6pWI0VEcsc534WNGHTFu/IvEJruMtyRlTtJpjjmM2+nCZVY4n\nxaRxara67/EFbMfXUeenuBk/F/OqvgfqHGrP46g/KntQymHl26h9r0C+qIHq\n5gZi\r\n=SQ9/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"scripts":{"docs":"typedoc --tsconfig tsconfig.json --exclude test/**/*.ts","lint":"gts check","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"gts fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","precompile":"tsc --version","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"mayurkale22","email":"mayurkale22@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.4.1","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"10.15.1","dependencies":{"@opentelemetry/context-base":"^0.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.1.0","nyc":"^15.0.0","karma":"^4.4.1","mocha":"^6.1.0","codecov":"^3.6.1","typedoc":"^0.15.0","webpack":"^4.35.2","ts-mocha":"^6.0.0","ts-loader":"^6.0.4","linkinator":"^2.0.3","typescript":"3.7.2","@types/node":"^12.6.8","karma-mocha":"^1.3.0","@types/mocha":"^7.0.0","karma-webpack":"^4.0.2","@types/webpack-env":"1.13.9","karma-spec-reporter":"^0.0.32","karma-chrome-launcher":"^3.1.0","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.16.0","istanbul-instrumenter-loader":"^3.0.1","karma-coverage-istanbul-reporter":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/api_0.8.0_1589301355963_0.1757731128490918","host":"s3://npm-registry-packages"}},"0.8.1":{"name":"@opentelemetry/api","version":"0.8.1","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.8.1","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"ae71a1452b21aeca19aae5c9405d04f0c66ad21f","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.8.1.tgz","fileCount":87,"integrity":"sha512-fb2mLSjLUYf2hs6Brg1uGENOSvrM5Gt56AvnHfKer2zMmGZJAPSJbCJBVrP+aeJLTI143CnME8X9v88Go8QAxQ==","signatures":[{"sig":"MEUCIHoZQXwLswiDXuxEjw0c/rf5eJskaRF38ouIH9ir9QEXAiEA46mLz0RGb3QjUPXXvGVXT+XIXuTy7VEwubiuXrMAaEE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155785,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJewuP3CRA9TVsSAnZWagAAMqIP/3VUIecWi/u4FdctyrR4\nHMNQk1fsD1/cXTlGhnclsuK9pcoDQZ+1G8IrdANM+KqFleXJ2whvEC3LGMZy\nVZyjQPTy9WV3k2VnrGTsEuzLw8ACLg+jL2Tghyi5SIRDxugN5v5KvunZQfd/\nSxHKu1oNeo3NjMwtvxFsHObEkK8AUqjzG8FszOk56HdqSE4IXKVdCoH5fbJ9\n0HvJl546ukpOSxzvlFmufNlWYo7sjT1V7UC7QhK6WKs/299rWvi6st9sjFd9\nmktlP8X/Hjj2/CEBM4HWb+rCT5eXHdCmrQTT/1Q4pAY0dV+6PalY670Pdrgk\nFnAk1+4hwwIOEU3FQ6zhnTYV1r50eC6MuOHKEKR4alvnObMGDyrlcmgDqdFj\nQ4vZ/wa1iOynZ6bMpz3boF5pf++4+JdxD9tQsHWcX0wFZ8LYA1/K78LwwMUX\n+AIWbQl9pbjCRcZ+0g23rh71VcGRtWU8rhv+y59mRBPsykE5k9ONZI+DA+FT\n6z6C3tTrvYS9nY3jF8xfwmDOSdc9Xaha/Gy7IJXuw77RQrHnO+DMnFSIX1E5\nuzoNMTUp9/T2LSkC2xEEcwRmHqF7JPq/VuaNf9Ma791HYz/1js3kuJGuDWKH\nAlqIZIjzxmPSMAswyxc3telHeuBcNjXE6z5j0Exlh4ICLoa6xFICpWe3YPhH\nnoiR\r\n=5gD0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"scripts":{"docs":"typedoc --tsconfig tsconfig.json --exclude test/**/*.ts","lint":"gts check","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"gts fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","precompile":"tsc --version","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.14.4","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"12.14.1","dependencies":{"@opentelemetry/context-base":"^0.8.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.1.0","nyc":"^15.0.0","karma":"^5.0.5","mocha":"^7.1.2","codecov":"^3.6.1","typedoc":"^0.15.0","webpack":"^4.35.2","ts-mocha":"^7.0.0","ts-loader":"^6.0.4","linkinator":"^2.0.3","typescript":"3.7.2","@types/node":"^12.6.8","karma-mocha":"^2.0.1","@types/mocha":"^7.0.0","karma-webpack":"^4.0.2","@types/webpack-env":"1.13.9","karma-spec-reporter":"^0.0.32","karma-chrome-launcher":"^3.1.0","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.16.0","istanbul-instrumenter-loader":"^3.0.1","karma-coverage-istanbul-reporter":"^3.0.2"},"_npmOperationalInternal":{"tmp":"tmp/api_0.8.1_1589830647098_0.3755800297149312","host":"s3://npm-registry-packages"}},"0.8.2":{"name":"@opentelemetry/api","version":"0.8.2","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.8.2","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"2bfb666db95052823a427621f6ee35102c70e3c8","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.8.2.tgz","fileCount":97,"integrity":"sha512-+BwodLiysWWcqLeGmO7LoGsFViPRb4pH1VbRJmZJIU0v19mm97SXCQTScgjx4U5kQjoUGuBOTeqz2QoGjNhFGQ==","signatures":[{"sig":"MEUCIQCq0JmsaLaljnxcSTsHAKGO1A1bB1JFb325c7VneqKyqAIgRk2DQkUxy1vEJbEBIJM4MbidIp5I3CUE1Kb5v2egpEg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":163291,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJextasCRA9TVsSAnZWagAAXQEQAIeRGPi4w0x8ewz+zIhz\nqVy2sfE+5fx9Ptyc4tB6BPwpwCUJWESMvfcTafZG8PIfvbEFmhfGlINIpqrz\nU3JZXsuVjVKc+twoNlXIKHrT5QbECU9N1D8i58qq9aZF/m7qdnv5lZN/DrIH\n9OJmjEoE1GPRPiCDD06FzD98uw4lvF43MtVOjT6EuIOmwPwUfG0pthCwOIxr\nK8/7E2FrcgBILnWyx3mh/f3KA3JjsFmeVPMWL58dCgoBd7Aar7aJ7JdWmX3Z\n0uy6aK82d1RaVx7TjHlm7XUp1utt21LHZsdGVgLAQLUNbkgx6BtsCuTa+cbG\nEXjUepWrS0z2UMH+9IclAeU1GuL6db+JwBCiJUX81ahSzosUI1nBVHeWi8sb\nRebrKYlXW9slC6gDr+RqXaYII9sYDTcyMPC1DjxZT4KP0+k5tcRclLZK3LRs\nDU//qQYjvX/WEmxJgDG41gmFSuflid9cqQAqfm6y09B8iDpRG0C+se7SqBIo\n10ah2hw60npr7v3DjtwVmGd//54zJsmp7hvp+kdQy+ZtoJvsabBRexMuUgnu\nxJijzKxOWrqOIq6eLtOhnR3i1IGbr1X47u7A52pzWVvFIUioqrltijhzTDSN\nA87GNR0PWf8XTQtSwS1HucAwQ9tyrsmKcxplIxzJObzqTuvtugWLVbVqBVVT\nSYAU\r\n=Fd5j\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"scripts":{"docs":"typedoc --tsconfig tsconfig.json --exclude test/**/*.ts","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","precompile":"tsc --version","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.14.4","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"12.14.1","dependencies":{"@opentelemetry/context-base":"^0.8.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^2.0.0","nyc":"^15.0.0","karma":"^5.0.5","mocha":"^7.1.2","codecov":"^3.6.1","typedoc":"^0.15.0","webpack":"^4.35.2","ts-mocha":"^7.0.0","ts-loader":"^6.0.4","linkinator":"^2.0.3","typescript":"3.7.2","@types/node":"^12.6.8","karma-mocha":"^2.0.1","@types/mocha":"^7.0.0","karma-webpack":"^4.0.2","@types/webpack-env":"1.13.9","karma-spec-reporter":"^0.0.32","karma-chrome-launcher":"^3.1.0","istanbul-instrumenter-loader":"^3.0.1","karma-coverage-istanbul-reporter":"^3.0.2"},"_npmOperationalInternal":{"tmp":"tmp/api_0.8.2_1590089388024_0.363528352160863","host":"s3://npm-registry-packages"}},"0.8.3":{"name":"@opentelemetry/api","version":"0.8.3","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.8.3","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"6048f17e5ab565d1325092c4eed2ee4c6d24aec0","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.8.3.tgz","fileCount":97,"integrity":"sha512-CRd8kKrMN1yisbw2zc2IiXM31zdS8mvQ4sivxPFgWS/eQEW9XuNxMVtSWv5k/tDcqbcLzUHcX6JW0SpVNA5h+g==","signatures":[{"sig":"MEUCIGpFb13C3Q0+x/+etvzUthavZ5fAOV9YCJl0p6SBZaGfAiEAs/WAGKhVvIfHVgLezZ5ztaIx8lrCTqoBeql3naNPAhM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":166325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe0BzOCRA9TVsSAnZWagAAHJQP/iYT+Rx8nSu6Bs2TeZ7S\njVsG0jlOF08AesfGv3pDH2Ku800DZ4sIvqAWDrKcD2Dpt2+S2eS0cSoYPdYb\nzbc7HuotEepyHDvmA370WlN4YyivMRVE2FkSb9514kx/5Y9NhAREGimnwBER\nLhF9Oq1YuEXZpi1tdWnBPEHn9qOSsgTxT6ntuA9DB9Ds9Xg2MIzfiFckDfib\na7L+WkPVYw13XYFWeicMU1BWjccveMNlUKLFTf7NUkZrvTETSmsZA6mFjmCH\nYXRg9utEg/5WD446wqD2eI8mLiIU9n3XoNkDhPwyyJ9LkVyKQkDEW5JYe7Wg\nDQf7Q6SQR0DWEgHYLCjobdjIBe/rSVLgHf4wRK5nfm4NKKmmvpztZXCgqSSv\nYgXx2jo5CxbgUxgKebivLAi6KWiaq94WpWNvp4lv732b/cSz75DEp+b+vUJM\nISSlKTpIleQ79Oy4tNRhjJbWtMZ9aWD/ac6GUdeLvk5/P0aunm5JOi3VYf11\nLfQjZXXbj3rgML0Ng00QSY2uQNB9VrKF2nVRHN+97K4yhSsStyVZ47DSYe0Q\nc3b1wQmpZ/3WppZVFjO5DJNQOAPz62PQ7jMcY6WTmxbsubXDIwhdgFfLSTZG\n75Lgl1gvq73jk01Mo91Pw62bZyFmIzW0USieegAMVyeEFR48I2STNMWqqm/q\nEtyM\r\n=s+o2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"scripts":{"docs":"typedoc --tsconfig tsconfig.json --exclude test/**/*.ts","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","precompile":"tsc --version","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.14.4","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"12.14.1","dependencies":{"@opentelemetry/context-base":"^0.8.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^2.0.0","nyc":"^15.0.0","karma":"^5.0.5","mocha":"^7.1.2","codecov":"^3.6.1","typedoc":"^0.15.0","webpack":"^4.35.2","ts-mocha":"^7.0.0","ts-loader":"^6.0.4","linkinator":"^2.0.3","typescript":"3.7.2","@types/node":"^14.0.5","karma-mocha":"^2.0.1","@types/mocha":"^7.0.0","karma-webpack":"^4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"^0.0.32","karma-chrome-launcher":"^3.1.0","istanbul-instrumenter-loader":"^3.0.1","karma-coverage-istanbul-reporter":"^3.0.2"},"_npmOperationalInternal":{"tmp":"tmp/api_0.8.3_1590697166118_0.29885821269445323","host":"s3://npm-registry-packages"}},"0.9.0":{"name":"@opentelemetry/api","version":"0.9.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.9.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"23dc68851f98eabfb981f0b0cc5b1c34d715fdcb","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.9.0.tgz","fileCount":99,"integrity":"sha512-fJ0CzUf4favXihuD6dDUh4U6GPfEjswUy9w+N4SrIrX3wFi43bGb3BXPSctaWx3PQaRC3Rjsw12HWR+oRl9pRQ==","signatures":[{"sig":"MEUCIB5G4+HCQsd7avIyzigwMww95DCyv9hryHcXW1FjUm4gAiEA5xLWTS10etJ3KezelE+XeXvE/cTCF1d34UDXKLRKaAg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":142863,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe69skCRA9TVsSAnZWagAAsWcQAI9yQkxaomSPu75W4Lva\nIafkSFnPziMdasaTDGQVYFMDdAcdhQA8bBAVFYzjgWyCbT6N0UZEUjLDR3UG\nT+wq06B8PlUbI45XjIyigOwyMaI4+6P3nlY4o7OZyEChXjZ/Me3gM3aWDk7p\nPDz+89zofsxuOH1sDjqaP7z3erHMyHl7oeH7HgPdS0469t5y93N9Ttlo+qvZ\n/0dR6YQ3ERPRqFWCuHsMfG6cm6mnYsQuK87dMGqvP862m9OcwOnTxZrrptjE\n5K9NX6ZsnS7bh4PkETXBMAlebefoNCs5NJiYKrFfy6PXXz7TTZF7Fg4t1+bH\nJ6Ca1W+UM8PRgIJ4BXkE9qczc3Yhi8JMCYnBNQBc9RLpXZMtwdgphs+1+rPf\n1NQzw2b5WKmYQ9AMjyBkk8mFGYxp6JlXohEAUWthY3Bh1NgIuDX8sYssmtxZ\nHMheTZof7vxUHCEi7bBhdKB63a4DQW2++bUF9Sp6LfvFSDA/apwSoSFVdASB\nmai6GQ+1rp4TjiF4GyuUaCUvTqBUBdbMrI2lzVIANgu/25NQI9JCQeHZKkB9\n7l5iU/CHxwkx4wOjzvRs43EjDArqE5tmH1ImvT2sOArAExfSmZnkDyXfb7JP\n6w/7IhB9gbT0pymYKAdl5yLuOMFB1/gMuzR8pSHbEZG5ISiHk21CHWxqNnc+\nZca1\r\n=9o5l\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"scripts":{"docs":"typedoc --tsconfig tsconfig.json --exclude test/**/*.ts","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","precompile":"tsc --version","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"mayurkale22","email":"mayurkale22@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.4.1","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"10.15.1","dependencies":{"@opentelemetry/context-base":"^0.9.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.0","mocha":"7.2.0","codecov":"3.7.0","typedoc":"0.17.7","webpack":"4.43.0","ts-mocha":"7.0.0","ts-loader":"7.0.5","linkinator":"2.1.1","typescript":"3.9.5","@types/node":"14.0.13","karma-mocha":"2.0.1","@types/mocha":"7.0.2","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.9.0_1592515364181_0.2550123533834585","host":"s3://npm-registry-packages"}},"0.10.0":{"name":"@opentelemetry/api","version":"0.10.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.10.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"275cb729e7979df89df12636d3131984c7582b43","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.10.0.tgz","fileCount":150,"integrity":"sha512-gK0Ydjqa19WoHjUCh22kEAV45/xS4vgKZKXDEYxWL9EBO4VRe4TjwS64LOwsQQMIT+zTWH1Bt1OuZPtDCiBa9w==","signatures":[{"sig":"MEQCIB7IC4Ovl5le/FFbHex3CQizX2ak+9PWYb5rwUPlfcaxAiAYTc9LYLUX5cK8FEFUJ2R/e4j+/eTazKoTzJaV4Kttmg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":166863,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfH0AVCRA9TVsSAnZWagAA6w8P/j/pa12ROP5yrVFZXl46\nSK9R7XOHp16ZjgtmCTFu1QX+SekjLYEkL1TWsAiHAc4djHXSEjvZiLrvTLBr\nFOO784XxRBicMGUy3pyjqrlOiVxul2ysrTxV5XxTHUe/78GDbKUpp+lkZo/t\nUlphZsmNfvbFqZiVw3Ap7d8hpOIvzTUHNdopqZjmcQExnbTpIOwKO7+41g5r\nMCGl/Kq34D0PWEdzPrGnkfndQ9LaQoxsGztX1h0ql4ga0RAEzOGXrLqwQ6Bd\nqiJAFXG64SjX+ElqyKUQbcvFnHxUDCHv71dwqwn7uVDvjgjEfaJSMFRzUT/0\n4V+xzqUt5CdNxSAzW/zwKqA9N6CmaXl6sJxPVSBitX3MUx/QUQho3xjOrcU1\nPiauvDEoV+75KIfRIJ5y9QDA+9AZYWqjVRoMG0WD+Tf9DMQgJD2xyiFw+VgI\nkQvQgzwU1mMljRqtaBO9XuQRImrY4I0jsG7prHGyxK7AkqaclOYiMa1PSEfG\nh6tsHwP8Jl8ggF/DCkrEMIsw1uhlXPwmbuRtYVLqEupbKDBUF0C49jJ9UXyF\nQ6UdsRHdD7Yks2VSFjvp3xYiHcZJzAyXW1w6Dnonf31v15+G83JSxvY9E7cY\nGGBTdraYvqlnwEiUD3/qfaFOBqpDVOFm6Se2Zymj3EU9PehqBL0IEQZ9hOkF\nac81\r\n=YcBb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"ab62a4d69b99b3a8c9c26100c04f3226af7859df","scripts":{"docs":"typedoc --tsconfig tsconfig.json --exclude test/**/*.ts","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","precompile":"tsc --version","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v12.14.1+x64 (darwin)","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"12.14.1","dependencies":{"@opentelemetry/context-base":"^0.10.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.0","mocha":"7.2.0","codecov":"3.7.2","typedoc":"0.17.8","webpack":"4.44.0","ts-mocha":"7.0.0","ts-loader":"8.0.1","linkinator":"2.1.1","typescript":"3.9.7","@types/node":"14.0.25","karma-mocha":"2.0.1","@types/mocha":"8.0.0","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.10.0_1595883541028_0.4184840866578965","host":"s3://npm-registry-packages"}},"0.10.1":{"name":"@opentelemetry/api","version":"0.10.1","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.10.1","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"da0a6adad7f388b4e722e6f286390a2eb0485ac8","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.10.1.tgz","fileCount":150,"integrity":"sha512-t1Oc5lJdrV4HOv+wbCaui/cUrSstCD42JJG6qQnhJkENzmHeV7RT8gp1Q5TuTM4HRgHR07q696qXtvCjmC9FLQ==","signatures":[{"sig":"MEUCIDYM5hzO49pyV4Ihe5TtPeUOaZuBEmSwbRxE0slYkkunAiEAyH6/zCZN38d3XtPAQoT6vCC6fC1sNSGV9zWFvDUHRhU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":166863,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIEBaCRA9TVsSAnZWagAAxvUP/3qInBlUzBSMnEwpNe8n\nWBTj8pjSO6lKZOG2eXSBmTGH8Ot/aHNa0v/a8KpEC0G0zf53/Ku9FD8cAWzw\nShHBGKXFVYLx4gD4G/NAc2v3e7FdmRaP/3/dapSwrz4Ud6gR8f9JKc1TuEku\nS021JUk9SPzjGClhIO/sgFjIChZePJsbGdjL9CJJnAsfrSI0VyQerYYqhBd9\nNheBxzzpmv9cI/TWPbrGHNBCHUbBGGNpOIiLJlKlz0qe8DxYXf2i0RhIVDg1\niKdguBR6p4PuRfmfoIxb45h5IdH+6OlgFohQy0XTh8EDk/P89CH8PYykxl3G\nEaO7nJzi3tjXoYA1i3xhkD2Fo0qR8Hr35zwT8YxePgVdmvZcv4VvmZXOq+Ax\nQJ/9WcWixGUTuYoTkchXo8fPiIU/NqDl/FG31t0FxnBmvmMTOw1ZuHivqdHQ\nbypHc5eKydT0HokN+gFc/iQ7ODd/EiOmdmz3eNvYR1GIHGNh0fEzDmTHL8Dq\nm0LPWaEQj8FnpRf6aTKU/CDCRieIei2qXTflbSHRMpJPS/ZiR19vzC3jL5mC\nkbNTjlvhX/CP32pxEacNwHeEoUWxQsNw9AcYUwnsaqqmyQAQ33on99tonxTf\n92xQWhMEb8ZfPS24X3fmVKucCmuxlZ1wFwh/qpysyY6rXMRJBZrgU+r1nPmS\nbLvK\r\n=fLWL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"03981e4299282d0611d1255ab0076368d5830753","scripts":{"docs":"typedoc --tsconfig tsconfig.json --exclude test/**/*.ts","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","precompile":"tsc --version","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v12.14.1+x64 (darwin)","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"12.14.1","dependencies":{"@opentelemetry/context-base":"^0.10.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.0","mocha":"7.2.0","codecov":"3.7.2","typedoc":"0.17.8","webpack":"4.44.0","ts-mocha":"7.0.0","ts-loader":"8.0.1","linkinator":"2.1.1","typescript":"3.9.7","@types/node":"14.0.25","karma-mocha":"2.0.1","@types/mocha":"8.0.0","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.10.1_1595949146030_0.4512127188607109","host":"s3://npm-registry-packages"}},"0.10.2":{"name":"@opentelemetry/api","version":"0.10.2","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.10.2","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"9647b881f3e1654089ff7ea59d587b2d35060654","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.10.2.tgz","fileCount":150,"integrity":"sha512-GtpMGd6vkzDMYcpu2t9LlhEgMy/SzBwRnz48EejlRArYqZzqSzAsKmegUK7zHgl+EOIaK9mKHhnRaQu3qw20cA==","signatures":[{"sig":"MEQCICOpdgY8CqGl5XhhRhTAy6aRYnFfnA/wfBfm7MUTcS6JAiByvtg0zkpJmorPhvhkUSUEM90gePuInD02BXT24czqog==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":172537,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKJzrCRA9TVsSAnZWagAAkiIP/Rz7Q60L1j/d+WVByy+K\n2LnN5uVRzLc5juqQghLuZAeiekq6GhkOZVVDLCJP2kcwHGQs9lwCdVbEAxMd\nsiol14HHGQ7ifpbVgSrrQi99YcuhcuCm79PC4in5RC0WJ6vH6E9W4B3SEbF7\nxN3EmAi2YZD6YBvKITO4nquVV+8tTCnrVgY4sN08QEdeLuvtuuxq/+s2R3qJ\nsvVvVcvzayjtv9ME+5ieZxHwmH7YOWo8fDQNoe8AFumTjPfhDyYkB1m230tt\nK/I/mzk7KC9n/ceRdQisJQgRDY+ZwPGYCIABVCOXWaHsSa+6njUY9QHWgvd1\nhXKFmPgAK+rm5eN4eaBKbrXKOG6/WujRy6gD2f69Av9SIUA3ggoP7pi93LiA\nfc8+JL0b/DEruOILUsOAz/AEv2J109XVPFTiFTAp8iYDqUQvK8u5g6j/Y2Mh\n3WZcuToOA6KB614N/89wrvJXxWVZhnfKsVkKTIyoGN2bUsjL8AANkFwn4EER\n1pA8J4VIHGntIuNLi5aC8RIyPCyj9Y/Gpss3zPJgDRBxxf+pPcpjlO2iQMVR\nvBJ1r9MyYwoxhyJXGU2HrCfi1ZfFxkAhuKY6JRYqjKS+7xTklngVq5J2/qFJ\nuSd0RxPsOod2dZFiNfQ4IUzz6+u7Lng2BI0uvpoHs2nQrdQQKlUXEqPRlhlI\neL3h\r\n=85jB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"b247e69034a7888a842fe75e0a5ff06f8bea44a8","scripts":{"docs":"typedoc --tsconfig tsconfig.json --exclude test/**/*.ts","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","precompile":"tsc --version","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v12.14.1+x64 (darwin)","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"12.14.1","dependencies":{"@opentelemetry/context-base":"^0.10.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.1","mocha":"7.2.0","codecov":"3.7.2","typedoc":"0.17.8","webpack":"4.44.1","ts-mocha":"7.0.0","ts-loader":"8.0.1","linkinator":"2.1.1","typescript":"3.9.7","@types/node":"14.0.27","karma-mocha":"2.0.1","@types/mocha":"8.0.0","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.10.2_1596497131197_0.5464949590761854","host":"s3://npm-registry-packages"}},"0.10.3-canary.0":{"name":"@opentelemetry/api","version":"0.10.3-canary.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.10.3-canary.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"9bb26ff3281d639281d3e9df053c8688640fbd10","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.10.3-canary.0.tgz","fileCount":150,"integrity":"sha512-Oq3YI4gnhU/FnNSR6EN/9HRtNhBd/iUbAaJNcAGYgAYRzGltMsiYHmUjOzfMOutfHd/+qhUM7TszYNohxm1iew==","signatures":[{"sig":"MEUCIQCHi3ytGkmFVl/GK7BKQWud3taCc4WmK9o9KcUUJf9v+AIgHPoq3GLIXCqieGKUWgCwp0FbL9Oind+YfUeJ1SGkEW8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":172607,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLYWQCRA9TVsSAnZWagAAFBQP/3uHgKbllN4DajFVFG3c\ndhzaPcvX/sYMcyOMjikyIhPK/z7kwTr+uvoIC/acSYCEENp9QFuhBqsrtnXl\nGl/efbvFCC4InybSVHB7oZBTclBxCz1/LJA4ugz+Tnmfgdnh43T5k64DdICt\nivo30AvKppGjqVoCgP6Jr+BfDUhm5oaxVZGSxDg7PE0v7wLR5QjibRF+4S+I\ni2kr4PxNHepXZMixIBqZmLpCNv9nwY1DxrLHIxPItdzg6dcZqdyRHrw4hdAi\nkzUOeeRluGGrebifidkArPDsr/SYNO1ks9EXNkE2nn7DRNtycmWLEmhR507p\nzi0VRlUgSGdqVm2QBZKwB5KzJ/fx3jOBNBlYxW61hPTs1ALQyVSiCvcHZAIR\n8ROFReqA6dV+FlEDQMT/HbLJPHR841adgBwnbmJp66q8Yb4wQDFB8IryhhIv\nzofHk7fm5KWhNHrKBNXK+AAMvDBbyXv70nm0hPDUL5rhlWobz/XOpv2Xmxa1\n3tl/lKieJKbEbkJhqC6REsORcT+BCp5n0Q0k5ckcu/0zGT/Aj+uwIQG7rwox\nGeV6F/jVf2fpNeKLSoxQzHZQBt0fR5NKed7EXe/SFIcZiEGEbz9pmtYWwG1c\njO9gKU9YhXfy01ECNlOjxee+3Qofi+q4lmAveiUEnuPhyDaJgAft4tGRa9qG\nQvia\r\n=7T4b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","readme":"# OpenTelemetry API for JavaScript\n\n[![Gitter chat][gitter-image]][gitter-url]\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nThis package provides everything needed to interact with the OpenTelemetry API, including all TypeScript interfaces, enums, and no-op implementations. It is intended for use both on the server and in the browser.\n\n## Quick Start\n\nTo get started you need to install the SDK and plugins, create a TracerProvider and/or MeterProvider, and register it with the API.\n\n### Install Dependencies\n\n```sh\n$ # Install tracing dependencies\n$ npm install \\\n @opentelemetry/api \\\n @opentelemetry/core \\\n @opentelemetry/node \\\n @opentelemetry/tracing \\\n @opentelemetry/exporter-jaeger \\ # add exporters as needed\n @opentelemetry/plugin-http # add plugins as needed\n\n$ # Install metrics dependencies\n$ npm install \\\n @opentelemetry/metrics \\\n @opentelemetry/exporter-prometheus # add exporters as needed\n```\n\n> Note: this example is for node.js. See [examples/tracer-web](https://github.com/open-telemetry/opentelemetry-js/tree/master/examples/tracer-web) for a browser example.\n\n### Initialize the SDK\n\nBefore any other module in your application is loaded, you must initialize the global tracer and meter providers. If you fail to initialize a provider, no-op implementations will be provided to any library which acquires them from the API.\n\nTo collect traces and metrics, you will have to tell the SDK where to export telemetry data to. This example uses Jaeger and Prometheus, but exporters exist for [other tracing backends][other-tracing-backends]. If you're not sure if there is an exporter for your tracing backend, contact your tracing provider.\n\n#### Tracing\n\n```javascript\nconst { NodeTracerProvider } = require(\"@opentelemetry/node\");\nconst { SimpleSpanProcessor } = require(\"@opentelemetry/tracing\");\nconst { JaegerExporter } = require(\"@opentelemetry/exporter-jaeger\");\n\nconst tracerProvider = new NodeTracerProvider();\n\n/**\n * The SimpleSpanProcessor does no batching and exports spans\n * immediately when they end. For most production use cases,\n * OpenTelemetry recommends use of the BatchSpanProcessor.\n */\ntracerProvider.addSpanProcessor(\n new SimpleSpanProcessor(\n new JaegerExporter({\n serviceName: 'my-service'\n })\n )\n);\n\n/**\n * Registering the provider with the API allows it to be discovered\n * and used by instrumentation libraries. The OpenTelemetry API provides\n * methods to set global SDK implementations, but the default SDK provides\n * a convenience method named `register` which registers same defaults\n * for you.\n *\n * By default the NodeTracerProvider uses Trace Context for propagation\n * and AsyncHooksScopeManager for context management. To learn about\n * customizing this behavior, see API Registration Options below.\n */\ntracerProvider.register();\n```\n\n#### Metrics\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\nconst { MeterProvider } = require(\"@opentelemetry/metrics\");\nconst { PrometheusExporter } = require(\"@opentelemetry/exporter-prometheus\");\n\nconst meterProvider = new MeterProvider({\n // The Prometheus exporter runs an HTTP server which\n // the Prometheus backend scrapes to collect metrics.\n exporter: new PrometheusExporter({ startServer: true }),\n interval: 1000,\n});\n\n/**\n * Registering the provider with the API allows it to be discovered\n * and used by instrumentation libraries.\n */\napi.metrics.setGlobalMeterProvider(meterProvider);\n```\n\n## Version Compatibility\n\nBecause the npm installer and node module resolution algorithm could potentially allow two or more copies of any given package to exist within the same `node_modules` structure, the OpenTelemetry API takes advantage of a variable on the `global` object to store the global API. When an API method in the API package is called, it checks if this `global` API exists and proxies calls to it if and only if it is a compatible API version. This means if a package has a dependency on an OpenTelemetry API version which is not compatible with the API used by the end user, the package will receive a no-op implementation of the API.\n\n## Advanced Use\n\n### API Registration Options\n\nIf you prefer to choose your own propagator or context manager, you may pass an options object into the `tracerProvider.register()` method. Omitted or `undefined` options will be replaced by a default value and `null` values will be skipped.\n\n```javascript\nconst { B3Propagator } = require(\"@opentelemetry/core\");\n\ntracerProvider.register({\n // Use B3 Propagation\n propagator: new B3Propagator(),\n\n // Skip registering a default context manager\n contextManager: null,\n});\n```\n\n### API Methods\n\nIf you are writing an instrumentation library, or prefer to call the API methods directly rather than using the `register` method on the Tracer/Meter Provider, OpenTelemetry provides direct access to the underlying API methods through the `@opentelemetry/api` package. API entry points are defined as global singleton objects `trace`, `metrics`, `propagation`, and `context` which contain methods used to initialize SDK implementations and acquire resources from the API.\n\n- [Trace API Documentation][trace-api-docs]\n- [Metrics API Documentation][metrics-api-docs]\n- [Propagation API Documentation][propagation-api-docs]\n- [Context API Documentation][context-api-docs]\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\n/* Initialize TracerProvider */\napi.trace.setGlobalTracerProvider(tracerProvider);\n/* returns tracerProvider (no-op if a working provider has not been initialized) */\napi.trace.getTracerProvider();\n/* returns a tracer from the registered global tracer provider (no-op if a working provider has not been initialized) */\napi.trace.getTracer(name, version);\n\n/* Initialize MeterProvider */\napi.metrics.setGlobalMeterProvider(meterProvider);\n/* returns meterProvider (no-op if a working provider has not been initialized) */\napi.metrics.getMeterProvider();\n/* returns a meter from the registered global meter provider (no-op if a working provider has not been initialized) */\napi.metrics.getMeter(name, version);\n\n/* Initialize Propagator */\napi.propagation.setGlobalPropagator(httpTraceContextPropagator);\n\n/* Initialize Context Manager */\napi.context.setGlobalContextManager(asyncHooksContextManager);\n```\n\n### Library Authors\n\nLibrary authors need only to depend on the `@opentelemetry/api` package and trust that the application owners which use their library will initialize an appropriate SDK.\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\nconst tracer = api.trace.getTracer(\"my-library-name\", \"0.2.3\");\n\nasync function doSomething() {\n const span = tracer.startSpan(\"doSomething\", { parent: tracer.getCurrentSpan() });\n try {\n const result = await doSomethingElse();\n span.end();\n return result;\n } catch (err) {\n span.setStatus({\n // use an appropriate status code here\n code: api.CanonicalCode.INTERNAL,\n message: err.message,\n });\n span.end();\n return null;\n }\n}\n```\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: \n- For more about OpenTelemetry JavaScript: \n- For help or feedback on this project, join us on [gitter][gitter-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[gitter-image]: https://badges.gitter.im/open-telemetry/opentelemetry-js.svg\n[gitter-url]: https://gitter.im/open-telemetry/opentelemetry-node?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/master/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/status.svg?path=packages/opentelemetry-api\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api\n[devDependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/dev-status.svg?path=packages/opentelemetry-api\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/api\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fapi.svg\n\n[trace-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/traceapi.html\n[metrics-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/metricsapi.html\n[propagation-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/propagationapi.html\n[context-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/contextapi.html\n\n[web]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-web\n[tracing]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-tracing\n[node]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-node\n[metrics]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-metrics\n\n[other-tracing-backends]: https://github.com/open-telemetry/opentelemetry-js#trace-exporters\n","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"f4f2f84bc087389b3206a2e17837b7b0b95fb2f2","scripts":{"docs":"typedoc --tsconfig tsconfig.json --exclude test/**/*.ts","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","precompile":"tsc --version","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.7.0+x64 (linux)","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.7.0","dependencies":{"@opentelemetry/context-base":"^0.10.3-canary.0+f4f2f84"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.1","mocha":"7.2.0","codecov":"3.7.2","typedoc":"0.17.8","webpack":"4.44.1","ts-mocha":"7.0.0","ts-loader":"8.0.1","linkinator":"2.1.1","typescript":"3.9.7","@types/node":"14.0.27","karma-mocha":"2.0.1","@types/mocha":"8.0.0","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.10.3-canary.0_1596818832482_0.74528530915083","host":"s3://npm-registry-packages"}},"0.10.3-alpha.34":{"name":"@opentelemetry/api","version":"0.10.3-alpha.34","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.10.3-alpha.34","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"58b2aaee9a8a1a02be4b183529ccc35e8b0c561e","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.10.3-alpha.34.tgz","fileCount":150,"integrity":"sha512-vVyMG0YKUaUjYqhicQtBHV3KZOVdlQNGEppeOVKnl65u9kNLKB2EKj/UvjXm/bMDr8wY39PvfdLX984Ot+iYEg==","signatures":[{"sig":"MEYCIQDWmdpquZs+lWv57oQuKouffyVkxUBtD51nCtm/T4zkeQIhAIzmUYzcK4s/vg0A7zxepCCF9/hnRmA21XDQrXxMs2xB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":172581,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfQ+5iCRA9TVsSAnZWagAAMRwP/3BlXoNJSMH1+zr6tt92\nr/fzuOHP/I7/NETsInbcol6NWysSV1azjY+0w1TUydntFGvtJepUIl6n0xS9\nUC6/AQ6YQZyv3+b8RoE67J9TQ6FWV0aoMH3y3H4+X//PC5eNBuBhwt1IEQVj\nxG62NCPFEBHed1u4eH3rKyqXdNuyMibkeky0W/eF6pMjDqr3QIYw4XeRmHbe\nEZNmTLcMWnWvXXQ78HXcV7rF8xejYu3PKpXWBpwflIh+q/Em/rAgNVG/5Ve6\n++cgmTqiFnWcYKxtxP9qpLk9q6iyHgGoNFskhWvquNMk/MSpB3d2bHpTHPEk\neVxwpDAlLMhoWXIvV208xY0S6lKp7cqCnzWX9tTBk0ddyCTQw6C42dZMahd9\nF9eOqR+hsu6tgnFrcixV6K5aJUKpe4KJHrtZWaGMsxtp4QpBpcGcPp+MZ1BI\ni8LHqGWewYtnZveDeY9528L2RDsStkCc35574Ac6nTAYp7pr9DRllWtkNhma\n899BY2CpN919b5oTTBLb4DkkbujqoCIZgDAvoexRR3/hcr7h0Tn9wI/gqKRb\nYvvLavN19CDNcZ3UBZhpHYuHT+ecyyePV/7wKHfJrePGpLbd2GkgmfgpleBI\nsihmOvnDM62NkwWUmvJeY6KKVqjTWrJrs3JGW92Miwtk34BFsguyV6VMlb/Z\nVrdV\r\n=vTWT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","readme":"# OpenTelemetry API for JavaScript\n\n[![Gitter chat][gitter-image]][gitter-url]\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nThis package provides everything needed to interact with the OpenTelemetry API, including all TypeScript interfaces, enums, and no-op implementations. It is intended for use both on the server and in the browser.\n\n## Quick Start\n\nTo get started you need to install the SDK and plugins, create a TracerProvider and/or MeterProvider, and register it with the API.\n\n### Install Dependencies\n\n```sh\n$ # Install tracing dependencies\n$ npm install \\\n @opentelemetry/api \\\n @opentelemetry/core \\\n @opentelemetry/node \\\n @opentelemetry/tracing \\\n @opentelemetry/exporter-jaeger \\ # add exporters as needed\n @opentelemetry/plugin-http # add plugins as needed\n\n$ # Install metrics dependencies\n$ npm install \\\n @opentelemetry/metrics \\\n @opentelemetry/exporter-prometheus # add exporters as needed\n```\n\n> Note: this example is for node.js. See [examples/tracer-web](https://github.com/open-telemetry/opentelemetry-js/tree/master/examples/tracer-web) for a browser example.\n\n### Initialize the SDK\n\nBefore any other module in your application is loaded, you must initialize the global tracer and meter providers. If you fail to initialize a provider, no-op implementations will be provided to any library which acquires them from the API.\n\nTo collect traces and metrics, you will have to tell the SDK where to export telemetry data to. This example uses Jaeger and Prometheus, but exporters exist for [other tracing backends][other-tracing-backends]. If you're not sure if there is an exporter for your tracing backend, contact your tracing provider.\n\n#### Tracing\n\n```javascript\nconst { NodeTracerProvider } = require(\"@opentelemetry/node\");\nconst { SimpleSpanProcessor } = require(\"@opentelemetry/tracing\");\nconst { JaegerExporter } = require(\"@opentelemetry/exporter-jaeger\");\n\nconst tracerProvider = new NodeTracerProvider();\n\n/**\n * The SimpleSpanProcessor does no batching and exports spans\n * immediately when they end. For most production use cases,\n * OpenTelemetry recommends use of the BatchSpanProcessor.\n */\ntracerProvider.addSpanProcessor(\n new SimpleSpanProcessor(\n new JaegerExporter({\n serviceName: 'my-service'\n })\n )\n);\n\n/**\n * Registering the provider with the API allows it to be discovered\n * and used by instrumentation libraries. The OpenTelemetry API provides\n * methods to set global SDK implementations, but the default SDK provides\n * a convenience method named `register` which registers same defaults\n * for you.\n *\n * By default the NodeTracerProvider uses Trace Context for propagation\n * and AsyncHooksScopeManager for context management. To learn about\n * customizing this behavior, see API Registration Options below.\n */\ntracerProvider.register();\n```\n\n#### Metrics\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\nconst { MeterProvider } = require(\"@opentelemetry/metrics\");\nconst { PrometheusExporter } = require(\"@opentelemetry/exporter-prometheus\");\n\nconst meterProvider = new MeterProvider({\n // The Prometheus exporter runs an HTTP server which\n // the Prometheus backend scrapes to collect metrics.\n exporter: new PrometheusExporter({ startServer: true }),\n interval: 1000,\n});\n\n/**\n * Registering the provider with the API allows it to be discovered\n * and used by instrumentation libraries.\n */\napi.metrics.setGlobalMeterProvider(meterProvider);\n```\n\n## Version Compatibility\n\nBecause the npm installer and node module resolution algorithm could potentially allow two or more copies of any given package to exist within the same `node_modules` structure, the OpenTelemetry API takes advantage of a variable on the `global` object to store the global API. When an API method in the API package is called, it checks if this `global` API exists and proxies calls to it if and only if it is a compatible API version. This means if a package has a dependency on an OpenTelemetry API version which is not compatible with the API used by the end user, the package will receive a no-op implementation of the API.\n\n## Advanced Use\n\n### API Registration Options\n\nIf you prefer to choose your own propagator or context manager, you may pass an options object into the `tracerProvider.register()` method. Omitted or `undefined` options will be replaced by a default value and `null` values will be skipped.\n\n```javascript\nconst { B3Propagator } = require(\"@opentelemetry/core\");\n\ntracerProvider.register({\n // Use B3 Propagation\n propagator: new B3Propagator(),\n\n // Skip registering a default context manager\n contextManager: null,\n});\n```\n\n### API Methods\n\nIf you are writing an instrumentation library, or prefer to call the API methods directly rather than using the `register` method on the Tracer/Meter Provider, OpenTelemetry provides direct access to the underlying API methods through the `@opentelemetry/api` package. API entry points are defined as global singleton objects `trace`, `metrics`, `propagation`, and `context` which contain methods used to initialize SDK implementations and acquire resources from the API.\n\n- [Trace API Documentation][trace-api-docs]\n- [Metrics API Documentation][metrics-api-docs]\n- [Propagation API Documentation][propagation-api-docs]\n- [Context API Documentation][context-api-docs]\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\n/* Initialize TracerProvider */\napi.trace.setGlobalTracerProvider(tracerProvider);\n/* returns tracerProvider (no-op if a working provider has not been initialized) */\napi.trace.getTracerProvider();\n/* returns a tracer from the registered global tracer provider (no-op if a working provider has not been initialized) */\napi.trace.getTracer(name, version);\n\n/* Initialize MeterProvider */\napi.metrics.setGlobalMeterProvider(meterProvider);\n/* returns meterProvider (no-op if a working provider has not been initialized) */\napi.metrics.getMeterProvider();\n/* returns a meter from the registered global meter provider (no-op if a working provider has not been initialized) */\napi.metrics.getMeter(name, version);\n\n/* Initialize Propagator */\napi.propagation.setGlobalPropagator(httpTraceContextPropagator);\n\n/* Initialize Context Manager */\napi.context.setGlobalContextManager(asyncHooksContextManager);\n```\n\n### Library Authors\n\nLibrary authors need only to depend on the `@opentelemetry/api` package and trust that the application owners which use their library will initialize an appropriate SDK.\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\nconst tracer = api.trace.getTracer(\"my-library-name\", \"0.2.3\");\n\nasync function doSomething() {\n const span = tracer.startSpan(\"doSomething\", { parent: tracer.getCurrentSpan() });\n try {\n const result = await doSomethingElse();\n span.end();\n return result;\n } catch (err) {\n span.setStatus({\n // use an appropriate status code here\n code: api.CanonicalCode.INTERNAL,\n message: err.message,\n });\n span.end();\n return null;\n }\n}\n```\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: \n- For more about OpenTelemetry JavaScript: \n- For help or feedback on this project, join us on [gitter][gitter-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[gitter-image]: https://badges.gitter.im/open-telemetry/opentelemetry-js.svg\n[gitter-url]: https://gitter.im/open-telemetry/opentelemetry-node?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/master/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/status.svg?path=packages/opentelemetry-api\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api\n[devDependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/dev-status.svg?path=packages/opentelemetry-api\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/api\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fapi.svg\n\n[trace-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/traceapi.html\n[metrics-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/metricsapi.html\n[propagation-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/propagationapi.html\n[context-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/contextapi.html\n\n[web]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-web\n[tracing]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-tracing\n[node]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-node\n[metrics]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-metrics\n\n[other-tracing-backends]: https://github.com/open-telemetry/opentelemetry-js#trace-exporters\n","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"fb06b5bb1142286acf5b326925f3af3353aa9d90","scripts":{"docs":"typedoc --tsconfig tsconfig.json --exclude test/**/*.ts","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","precompile":"tsc --version","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (linux)","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.8.0","dependencies":{"@opentelemetry/context-base":"^0.10.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.1","mocha":"7.2.0","codecov":"3.7.2","typedoc":"0.18.0","webpack":"4.44.1","ts-mocha":"7.0.0","ts-loader":"8.0.2","linkinator":"2.1.1","typescript":"3.9.7","@types/node":"14.0.27","karma-mocha":"2.0.1","@types/mocha":"8.0.2","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.10.3-alpha.34_1598287458272_0.783326051893291","host":"s3://npm-registry-packages"}},"0.10.3-alpha.35":{"name":"@opentelemetry/api","version":"0.10.3-alpha.35","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.10.3-alpha.35","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"39744208f794b4cffdeb38e439426cd2ba50a3f4","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.10.3-alpha.35.tgz","fileCount":153,"integrity":"sha512-nedx1cSst4i4Mp9n0L3LAVf2Z1O2nJA9sfdo9Wl8V1U3220fDC8rNxyTWipTyYs8gCgPBa6mC04Io/dWn34HeQ==","signatures":[{"sig":"MEUCICkiPfXOwLW1vQtIF70JkZLV3TVTemkF1GZj2mew907IAiEApmqEjBcuGl9C9mqAzEC+EI3cBgd8JBoFx/lsQqM3tJc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":174797,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfREL4CRA9TVsSAnZWagAAivcP/RJNmORoh8vL6bk7qABI\njxEbO5amd2D4ZVM2x9w4iKvckOja3KCT+zVo2aJxP7D+Kz+qjtYjrF7lUqJB\nYbAyZTrDqzV9Q7V1/L9S+/Z5dtG0CBGPp/p81Jws9qXeHzBAz3wVczDILBbo\n5w57QN9nAynyz8+K2bsJpwhc2KKkyApYCoO/hNxO2KSIzc4QM5Acfyywh/A0\n0+iqr9HpcTadzRq+N2CN0YL4EzW4tx0VOaRdJkO7xgWFfhJwfgX4i7mbGOqs\nxSZrpqB+2MRSyQysa5m1tFlJG5gOf4CfPeQK8WY33/kA3nuq5MpuFEd7esDu\nJ5OmS9YUyh5UvTDhol9N9nK0BTF+qPXNsOrHHLpU7hUTQ3mt+Zq1G+tYa+L+\nT95qo9c1zI95GrfZGmk5vJKHC44JHeygOaazc+r3Vf9BZN+/xZHKddCgYZ3c\nu7c8Ump2P3VK7uq+PhCjzjPnu+ZPIDBtib94AfBnNFDSLmtHIaSnoizkSrIy\nwTzaDc8xIp+BlntGi8Pnrml448AiGNelaVhK5qsa9ie6i1ebQHHt6QNOfFKd\nuuyfOgJUB3YS6SPm+gfLYYAgZEAQwAzBTaOugpXojQhNOHavM/8SGOC6MNt+\nRNOZrRGpyFZHP9+q3GMg+2wI367caEfDy4KRmgurw/Qeatp29InVvwXWhXQC\noF6A\r\n=X3P0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","readme":"# OpenTelemetry API for JavaScript\n\n[![Gitter chat][gitter-image]][gitter-url]\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nThis package provides everything needed to interact with the OpenTelemetry API, including all TypeScript interfaces, enums, and no-op implementations. It is intended for use both on the server and in the browser.\n\n## Quick Start\n\nTo get started you need to install the SDK and plugins, create a TracerProvider and/or MeterProvider, and register it with the API.\n\n### Install Dependencies\n\n```sh\n$ # Install tracing dependencies\n$ npm install \\\n @opentelemetry/api \\\n @opentelemetry/core \\\n @opentelemetry/node \\\n @opentelemetry/tracing \\\n @opentelemetry/exporter-jaeger \\ # add exporters as needed\n @opentelemetry/plugin-http # add plugins as needed\n\n$ # Install metrics dependencies\n$ npm install \\\n @opentelemetry/metrics \\\n @opentelemetry/exporter-prometheus # add exporters as needed\n```\n\n> Note: this example is for node.js. See [examples/tracer-web](https://github.com/open-telemetry/opentelemetry-js/tree/master/examples/tracer-web) for a browser example.\n\n### Initialize the SDK\n\nBefore any other module in your application is loaded, you must initialize the global tracer and meter providers. If you fail to initialize a provider, no-op implementations will be provided to any library which acquires them from the API.\n\nTo collect traces and metrics, you will have to tell the SDK where to export telemetry data to. This example uses Jaeger and Prometheus, but exporters exist for [other tracing backends][other-tracing-backends]. If you're not sure if there is an exporter for your tracing backend, contact your tracing provider.\n\n#### Tracing\n\n```javascript\nconst { NodeTracerProvider } = require(\"@opentelemetry/node\");\nconst { SimpleSpanProcessor } = require(\"@opentelemetry/tracing\");\nconst { JaegerExporter } = require(\"@opentelemetry/exporter-jaeger\");\n\nconst tracerProvider = new NodeTracerProvider();\n\n/**\n * The SimpleSpanProcessor does no batching and exports spans\n * immediately when they end. For most production use cases,\n * OpenTelemetry recommends use of the BatchSpanProcessor.\n */\ntracerProvider.addSpanProcessor(\n new SimpleSpanProcessor(\n new JaegerExporter({\n serviceName: 'my-service'\n })\n )\n);\n\n/**\n * Registering the provider with the API allows it to be discovered\n * and used by instrumentation libraries. The OpenTelemetry API provides\n * methods to set global SDK implementations, but the default SDK provides\n * a convenience method named `register` which registers same defaults\n * for you.\n *\n * By default the NodeTracerProvider uses Trace Context for propagation\n * and AsyncHooksScopeManager for context management. To learn about\n * customizing this behavior, see API Registration Options below.\n */\ntracerProvider.register();\n```\n\n#### Metrics\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\nconst { MeterProvider } = require(\"@opentelemetry/metrics\");\nconst { PrometheusExporter } = require(\"@opentelemetry/exporter-prometheus\");\n\nconst meterProvider = new MeterProvider({\n // The Prometheus exporter runs an HTTP server which\n // the Prometheus backend scrapes to collect metrics.\n exporter: new PrometheusExporter({ startServer: true }),\n interval: 1000,\n});\n\n/**\n * Registering the provider with the API allows it to be discovered\n * and used by instrumentation libraries.\n */\napi.metrics.setGlobalMeterProvider(meterProvider);\n```\n\n## Version Compatibility\n\nBecause the npm installer and node module resolution algorithm could potentially allow two or more copies of any given package to exist within the same `node_modules` structure, the OpenTelemetry API takes advantage of a variable on the `global` object to store the global API. When an API method in the API package is called, it checks if this `global` API exists and proxies calls to it if and only if it is a compatible API version. This means if a package has a dependency on an OpenTelemetry API version which is not compatible with the API used by the end user, the package will receive a no-op implementation of the API.\n\n## Advanced Use\n\n### API Registration Options\n\nIf you prefer to choose your own propagator or context manager, you may pass an options object into the `tracerProvider.register()` method. Omitted or `undefined` options will be replaced by a default value and `null` values will be skipped.\n\n```javascript\nconst { B3Propagator } = require(\"@opentelemetry/core\");\n\ntracerProvider.register({\n // Use B3 Propagation\n propagator: new B3Propagator(),\n\n // Skip registering a default context manager\n contextManager: null,\n});\n```\n\n### API Methods\n\nIf you are writing an instrumentation library, or prefer to call the API methods directly rather than using the `register` method on the Tracer/Meter Provider, OpenTelemetry provides direct access to the underlying API methods through the `@opentelemetry/api` package. API entry points are defined as global singleton objects `trace`, `metrics`, `propagation`, and `context` which contain methods used to initialize SDK implementations and acquire resources from the API.\n\n- [Trace API Documentation][trace-api-docs]\n- [Metrics API Documentation][metrics-api-docs]\n- [Propagation API Documentation][propagation-api-docs]\n- [Context API Documentation][context-api-docs]\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\n/* Initialize TracerProvider */\napi.trace.setGlobalTracerProvider(tracerProvider);\n/* returns tracerProvider (no-op if a working provider has not been initialized) */\napi.trace.getTracerProvider();\n/* returns a tracer from the registered global tracer provider (no-op if a working provider has not been initialized) */\napi.trace.getTracer(name, version);\n\n/* Initialize MeterProvider */\napi.metrics.setGlobalMeterProvider(meterProvider);\n/* returns meterProvider (no-op if a working provider has not been initialized) */\napi.metrics.getMeterProvider();\n/* returns a meter from the registered global meter provider (no-op if a working provider has not been initialized) */\napi.metrics.getMeter(name, version);\n\n/* Initialize Propagator */\napi.propagation.setGlobalPropagator(httpTraceContextPropagator);\n\n/* Initialize Context Manager */\napi.context.setGlobalContextManager(asyncHooksContextManager);\n```\n\n### Library Authors\n\nLibrary authors need only to depend on the `@opentelemetry/api` package and trust that the application owners which use their library will initialize an appropriate SDK.\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\nconst tracer = api.trace.getTracer(\"my-library-name\", \"0.2.3\");\n\nasync function doSomething() {\n const span = tracer.startSpan(\"doSomething\", { parent: tracer.getCurrentSpan() });\n try {\n const result = await doSomethingElse();\n span.end();\n return result;\n } catch (err) {\n span.setStatus({\n // use an appropriate status code here\n code: api.CanonicalCode.INTERNAL,\n message: err.message,\n });\n span.end();\n return null;\n }\n}\n```\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: \n- For more about OpenTelemetry JavaScript: \n- For help or feedback on this project, join us on [gitter][gitter-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[gitter-image]: https://badges.gitter.im/open-telemetry/opentelemetry-js.svg\n[gitter-url]: https://gitter.im/open-telemetry/opentelemetry-node?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/master/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/status.svg?path=packages/opentelemetry-api\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api\n[devDependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/dev-status.svg?path=packages/opentelemetry-api\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/api\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fapi.svg\n\n[trace-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/traceapi.html\n[metrics-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/metricsapi.html\n[propagation-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/propagationapi.html\n[context-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/contextapi.html\n\n[web]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-web\n[tracing]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-tracing\n[node]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-node\n[metrics]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-metrics\n\n[other-tracing-backends]: https://github.com/open-telemetry/opentelemetry-js#trace-exporters\n","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"2ee9f1aaf7b61c4b4ae6b748f0a07f8fc708f07e","scripts":{"docs":"typedoc --tsconfig tsconfig.json --exclude test/**/*.ts","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","precompile":"tsc --version","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (linux)","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.8.0","dependencies":{"@opentelemetry/context-base":"^0.10.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.1","mocha":"7.2.0","codecov":"3.7.2","typedoc":"0.18.0","webpack":"4.44.1","ts-mocha":"7.0.0","ts-loader":"8.0.2","linkinator":"2.1.1","typescript":"3.9.7","@types/node":"14.0.27","karma-mocha":"2.0.1","@types/mocha":"8.0.2","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.10.3-alpha.35_1598309112196_0.05350171660972647","host":"s3://npm-registry-packages"}},"0.10.3-alpha.41":{"name":"@opentelemetry/api","version":"0.10.3-alpha.41","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.10.3-alpha.41","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"893d10e5758be3a9be96bd308edf0a08b3016413","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.10.3-alpha.41.tgz","fileCount":159,"integrity":"sha512-RvEiQ1gDcgsi8kf3gk8jggLtRAV+Btme976tfzFYYJ2BKtftQEuFb80W+pUs7bu7Nw2yfMCsWeItc4/9suDgrA==","signatures":[{"sig":"MEYCIQDa+jsok3Lmnm+7TeeYk/Ak8R+G5aRXtrgW50lh/2ZL+gIhAKvWuqKX6sR7W4cbvhC4gn80sM/kxccExf4s9GTdqjIe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":183533,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfR9p+CRA9TVsSAnZWagAAcH8QAJr5JSUWJSHqsAol0r/V\n1QjmTSAjZn0CshzcrBblkiUXIUGFLpML8Ey0e0RtEiKk6Z66OdkWvI86S6FF\n1cktoDg94C7QzzAtdt5i19ViUskEqA3/RHNiQ/nkj7D8jcWK+Fk6n7p6o4ty\nlqxLAeBe9AM3y22GZJ0uwoy9a40yhSHEtYyhMwx0UWON9U0T43zzH6cvSnhj\nuxppTXmmTVBA41d/DFyjm0aUneykqnDFk+ggZktRHqiMS42HsUllqgzPtlJ+\n1Gqihwd7rPzuK8gj4v4HsORtSSvMVCpWy7ju7UuclugABpO9gGnfVrVokneh\nmbDjzSbLcj/HNWVs6A+/6y6dWG7mz5hbKE3xlJH2FkKbsgksw08c+xbVh1E+\nw8N6pkKhb5xIk0kdafPfu1Fp+aR8UGbsx4VbFo2my2mQbjk3QAGV0ZOuPh5K\n+mbMARrUDmv2GFPFFNTa5NGIN3z2AHaBPksaxKVkDshBVD6+s2j4xNmkomU+\nuaRWpA/zDWg3rAjGObPtzXUCeiQdWfgTzIdMbBqgKxg5dpCnrVROlEavLi/B\nWHKuOB3AeznBYH0XUkV2NevCRpTW1+aKdBP7Y6iWmHOwPQs0Abyl8hw9hOAM\n8LT4MFXYRC/9lrmqRI/SuOM8//frz1oXyGDJfLNr9KtMzPP5i9EuPlca/dkZ\n9IHW\r\n=Bct9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","readme":"# OpenTelemetry API for JavaScript\n\n[![Gitter chat][gitter-image]][gitter-url]\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nThis package provides everything needed to interact with the OpenTelemetry API, including all TypeScript interfaces, enums, and no-op implementations. It is intended for use both on the server and in the browser.\n\n## Quick Start\n\nTo get started you need to install the SDK and plugins, create a TracerProvider and/or MeterProvider, and register it with the API.\n\n### Install Dependencies\n\n```sh\n$ # Install tracing dependencies\n$ npm install \\\n @opentelemetry/api \\\n @opentelemetry/core \\\n @opentelemetry/node \\\n @opentelemetry/tracing \\\n @opentelemetry/exporter-jaeger \\ # add exporters as needed\n @opentelemetry/plugin-http # add plugins as needed\n\n$ # Install metrics dependencies\n$ npm install \\\n @opentelemetry/metrics \\\n @opentelemetry/exporter-prometheus # add exporters as needed\n```\n\n> Note: this example is for node.js. See [examples/tracer-web](https://github.com/open-telemetry/opentelemetry-js/tree/master/examples/tracer-web) for a browser example.\n\n### Initialize the SDK\n\nBefore any other module in your application is loaded, you must initialize the global tracer and meter providers. If you fail to initialize a provider, no-op implementations will be provided to any library which acquires them from the API.\n\nTo collect traces and metrics, you will have to tell the SDK where to export telemetry data to. This example uses Jaeger and Prometheus, but exporters exist for [other tracing backends][other-tracing-backends]. If you're not sure if there is an exporter for your tracing backend, contact your tracing provider.\n\n#### Tracing\n\n```javascript\nconst { NodeTracerProvider } = require(\"@opentelemetry/node\");\nconst { SimpleSpanProcessor } = require(\"@opentelemetry/tracing\");\nconst { JaegerExporter } = require(\"@opentelemetry/exporter-jaeger\");\n\nconst tracerProvider = new NodeTracerProvider();\n\n/**\n * The SimpleSpanProcessor does no batching and exports spans\n * immediately when they end. For most production use cases,\n * OpenTelemetry recommends use of the BatchSpanProcessor.\n */\ntracerProvider.addSpanProcessor(\n new SimpleSpanProcessor(\n new JaegerExporter({\n serviceName: 'my-service'\n })\n )\n);\n\n/**\n * Registering the provider with the API allows it to be discovered\n * and used by instrumentation libraries. The OpenTelemetry API provides\n * methods to set global SDK implementations, but the default SDK provides\n * a convenience method named `register` which registers same defaults\n * for you.\n *\n * By default the NodeTracerProvider uses Trace Context for propagation\n * and AsyncHooksScopeManager for context management. To learn about\n * customizing this behavior, see API Registration Options below.\n */\ntracerProvider.register();\n```\n\n#### Metrics\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\nconst { MeterProvider } = require(\"@opentelemetry/metrics\");\nconst { PrometheusExporter } = require(\"@opentelemetry/exporter-prometheus\");\n\nconst meterProvider = new MeterProvider({\n // The Prometheus exporter runs an HTTP server which\n // the Prometheus backend scrapes to collect metrics.\n exporter: new PrometheusExporter({ startServer: true }),\n interval: 1000,\n});\n\n/**\n * Registering the provider with the API allows it to be discovered\n * and used by instrumentation libraries.\n */\napi.metrics.setGlobalMeterProvider(meterProvider);\n```\n\n## Version Compatibility\n\nBecause the npm installer and node module resolution algorithm could potentially allow two or more copies of any given package to exist within the same `node_modules` structure, the OpenTelemetry API takes advantage of a variable on the `global` object to store the global API. When an API method in the API package is called, it checks if this `global` API exists and proxies calls to it if and only if it is a compatible API version. This means if a package has a dependency on an OpenTelemetry API version which is not compatible with the API used by the end user, the package will receive a no-op implementation of the API.\n\n## Advanced Use\n\n### API Registration Options\n\nIf you prefer to choose your own propagator or context manager, you may pass an options object into the `tracerProvider.register()` method. Omitted or `undefined` options will be replaced by a default value and `null` values will be skipped.\n\n```javascript\nconst { B3Propagator } = require(\"@opentelemetry/core\");\n\ntracerProvider.register({\n // Use B3 Propagation\n propagator: new B3Propagator(),\n\n // Skip registering a default context manager\n contextManager: null,\n});\n```\n\n### API Methods\n\nIf you are writing an instrumentation library, or prefer to call the API methods directly rather than using the `register` method on the Tracer/Meter Provider, OpenTelemetry provides direct access to the underlying API methods through the `@opentelemetry/api` package. API entry points are defined as global singleton objects `trace`, `metrics`, `propagation`, and `context` which contain methods used to initialize SDK implementations and acquire resources from the API.\n\n- [Trace API Documentation][trace-api-docs]\n- [Metrics API Documentation][metrics-api-docs]\n- [Propagation API Documentation][propagation-api-docs]\n- [Context API Documentation][context-api-docs]\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\n/* Initialize TracerProvider */\napi.trace.setGlobalTracerProvider(tracerProvider);\n/* returns tracerProvider (no-op if a working provider has not been initialized) */\napi.trace.getTracerProvider();\n/* returns a tracer from the registered global tracer provider (no-op if a working provider has not been initialized) */\napi.trace.getTracer(name, version);\n\n/* Initialize MeterProvider */\napi.metrics.setGlobalMeterProvider(meterProvider);\n/* returns meterProvider (no-op if a working provider has not been initialized) */\napi.metrics.getMeterProvider();\n/* returns a meter from the registered global meter provider (no-op if a working provider has not been initialized) */\napi.metrics.getMeter(name, version);\n\n/* Initialize Propagator */\napi.propagation.setGlobalPropagator(httpTraceContextPropagator);\n\n/* Initialize Context Manager */\napi.context.setGlobalContextManager(asyncHooksContextManager);\n```\n\n### Library Authors\n\nLibrary authors need only to depend on the `@opentelemetry/api` package and trust that the application owners which use their library will initialize an appropriate SDK.\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\nconst tracer = api.trace.getTracer(\"my-library-name\", \"0.2.3\");\n\nasync function doSomething() {\n const span = tracer.startSpan(\"doSomething\", { parent: tracer.getCurrentSpan() });\n try {\n const result = await doSomethingElse();\n span.end();\n return result;\n } catch (err) {\n span.setStatus({\n // use an appropriate status code here\n code: api.CanonicalCode.INTERNAL,\n message: err.message,\n });\n span.end();\n return null;\n }\n}\n```\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: \n- For more about OpenTelemetry JavaScript: \n- For help or feedback on this project, join us on [gitter][gitter-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[gitter-image]: https://badges.gitter.im/open-telemetry/opentelemetry-js.svg\n[gitter-url]: https://gitter.im/open-telemetry/opentelemetry-node?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/master/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/status.svg?path=packages/opentelemetry-api\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api\n[devDependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/dev-status.svg?path=packages/opentelemetry-api\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/api\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fapi.svg\n\n[trace-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/traceapi.html\n[metrics-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/metricsapi.html\n[propagation-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/propagationapi.html\n[context-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/contextapi.html\n\n[web]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-web\n[tracing]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-tracing\n[node]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-node\n[metrics]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-metrics\n\n[other-tracing-backends]: https://github.com/open-telemetry/opentelemetry-js#trace-exporters\n","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"5c7753fe6534a34f0f4eaf653d53f8c002ee299d","scripts":{"docs":"typedoc --tsconfig tsconfig.json --exclude test/**/*.ts","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","precompile":"tsc --version","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (linux)","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.8.0","dependencies":{"@opentelemetry/context-base":"^0.10.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.1","mocha":"7.2.0","sinon":"9.0.3","codecov":"3.7.2","typedoc":"0.18.0","webpack":"4.44.1","ts-mocha":"7.0.0","ts-loader":"8.0.2","linkinator":"2.1.1","typescript":"3.9.7","@types/node":"14.0.27","karma-mocha":"2.0.1","@types/mocha":"8.0.2","@types/sinon":"4.3.1","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.10.3-alpha.41_1598544509600_0.23851191948259376","host":"s3://npm-registry-packages"}},"0.11.1-alpha.48":{"name":"@opentelemetry/api","version":"0.11.1-alpha.48","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.11.1-alpha.48","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"76374b1722453a5bb43e57d5b56dffbcffc9304a","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.11.1-alpha.48.tgz","fileCount":162,"integrity":"sha512-x04Dsjoc8mWXhLUumggyfEMWhFFPnBEF1MV8w491kXKhkJ1DPRL72fU3H77ztk7At8i1J74ovf7wx8YKSdxbvg==","signatures":[{"sig":"MEQCID9sHdgwbR9P+zCoP7GUA8ev/m8IFHG5+ijac8xSGccRAiBtjCYgCH6P/eS9ck43zOwbXzXs/+SwnXy8OY1gORS3fg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":184995,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTp/YCRA9TVsSAnZWagAAOOkQAKFl3c+wGWHUJ27hAvAz\nj4cWH39UEiuj55JzXjw2Ccm9NDn9OeILq4ktfDdKO39yMh1CBiDFk1oN/+5u\nguOhDCWop6ZeNkhdmlrNd994+s8Wq0LIx7LZG8lR5pBcCDGmM73Al4OMMe0Y\n4K7nXXlqkF9T42uoRthMyq6NxGqF/4U4i8SQcbeUKsXLALNb62utFxKQCpJD\nBH8iYYp2MCAzDg88KjLh70Q4FzmPX4SAOcVFPvEXE2D1xEqojYZEl75/PnGd\nmwF9buDFILa3HIVOHrOGL8fs4AVU7CF1x4w+rsdvK/ts0mj5JJV2NKEn7LZ8\nN617u2evfVVizkA68o+JFjhi1y1aGy7k04nR4ApcuSDiHN+AKFT4qoiKqiXH\nAJtVf4DN8gSGHUkdX3grmHXM0V4HnEgluH8meZgZCK+1cOKnrikzbKBHXo0w\n7SEebl9CN7k5S5w6XgvcHrZakD18XtbSkzen8YZhl8D89RasuRdI3q/oaNE7\noHOZdo+kaAPHaXIB/jLTygvdX8XED/OtwlOhXTRhdToMYa0pE5PHv8v9P2EF\nl4ZOgVZYNGBbQEnsH7O2xxw9v8f8z4dv8z+vo1pkl3RYuRRaJl5bpd9ZicjX\nTNHq0SmhLJ4zBmcG4ePk2WR3fWBBQqH4lNux47Vravu1Py0bw7bsIDcqfvtQ\nOWRj\r\n=jfip\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","readme":"# OpenTelemetry API for JavaScript\n\n[![Gitter chat][gitter-image]][gitter-url]\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nThis package provides everything needed to interact with the OpenTelemetry API, including all TypeScript interfaces, enums, and no-op implementations. It is intended for use both on the server and in the browser.\n\n## Quick Start\n\nTo get started you need to install the SDK and plugins, create a TracerProvider and/or MeterProvider, and register it with the API.\n\n### Install Dependencies\n\n```sh\n$ # Install tracing dependencies\n$ npm install \\\n @opentelemetry/api \\\n @opentelemetry/core \\\n @opentelemetry/node \\\n @opentelemetry/tracing \\\n @opentelemetry/exporter-jaeger \\ # add exporters as needed\n @opentelemetry/plugin-http # add plugins as needed\n\n$ # Install metrics dependencies\n$ npm install \\\n @opentelemetry/metrics \\\n @opentelemetry/exporter-prometheus # add exporters as needed\n```\n\n> Note: this example is for node.js. See [examples/tracer-web](https://github.com/open-telemetry/opentelemetry-js/tree/master/examples/tracer-web) for a browser example.\n\n### Initialize the SDK\n\nBefore any other module in your application is loaded, you must initialize the global tracer and meter providers. If you fail to initialize a provider, no-op implementations will be provided to any library which acquires them from the API.\n\nTo collect traces and metrics, you will have to tell the SDK where to export telemetry data to. This example uses Jaeger and Prometheus, but exporters exist for [other tracing backends][other-tracing-backends]. If you're not sure if there is an exporter for your tracing backend, contact your tracing provider.\n\n#### Tracing\n\n```javascript\nconst { NodeTracerProvider } = require(\"@opentelemetry/node\");\nconst { SimpleSpanProcessor } = require(\"@opentelemetry/tracing\");\nconst { JaegerExporter } = require(\"@opentelemetry/exporter-jaeger\");\n\nconst tracerProvider = new NodeTracerProvider();\n\n/**\n * The SimpleSpanProcessor does no batching and exports spans\n * immediately when they end. For most production use cases,\n * OpenTelemetry recommends use of the BatchSpanProcessor.\n */\ntracerProvider.addSpanProcessor(\n new SimpleSpanProcessor(\n new JaegerExporter({\n serviceName: 'my-service'\n })\n )\n);\n\n/**\n * Registering the provider with the API allows it to be discovered\n * and used by instrumentation libraries. The OpenTelemetry API provides\n * methods to set global SDK implementations, but the default SDK provides\n * a convenience method named `register` which registers same defaults\n * for you.\n *\n * By default the NodeTracerProvider uses Trace Context for propagation\n * and AsyncHooksScopeManager for context management. To learn about\n * customizing this behavior, see API Registration Options below.\n */\ntracerProvider.register();\n```\n\n#### Metrics\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\nconst { MeterProvider } = require(\"@opentelemetry/metrics\");\nconst { PrometheusExporter } = require(\"@opentelemetry/exporter-prometheus\");\n\nconst meterProvider = new MeterProvider({\n // The Prometheus exporter runs an HTTP server which\n // the Prometheus backend scrapes to collect metrics.\n exporter: new PrometheusExporter({ startServer: true }),\n interval: 1000,\n});\n\n/**\n * Registering the provider with the API allows it to be discovered\n * and used by instrumentation libraries.\n */\napi.metrics.setGlobalMeterProvider(meterProvider);\n```\n\n## Version Compatibility\n\nBecause the npm installer and node module resolution algorithm could potentially allow two or more copies of any given package to exist within the same `node_modules` structure, the OpenTelemetry API takes advantage of a variable on the `global` object to store the global API. When an API method in the API package is called, it checks if this `global` API exists and proxies calls to it if and only if it is a compatible API version. This means if a package has a dependency on an OpenTelemetry API version which is not compatible with the API used by the end user, the package will receive a no-op implementation of the API.\n\n## Advanced Use\n\n### API Registration Options\n\nIf you prefer to choose your own propagator or context manager, you may pass an options object into the `tracerProvider.register()` method. Omitted or `undefined` options will be replaced by a default value and `null` values will be skipped.\n\n```javascript\nconst { B3Propagator } = require(\"@opentelemetry/core\");\n\ntracerProvider.register({\n // Use B3 Propagation\n propagator: new B3Propagator(),\n\n // Skip registering a default context manager\n contextManager: null,\n});\n```\n\n### API Methods\n\nIf you are writing an instrumentation library, or prefer to call the API methods directly rather than using the `register` method on the Tracer/Meter Provider, OpenTelemetry provides direct access to the underlying API methods through the `@opentelemetry/api` package. API entry points are defined as global singleton objects `trace`, `metrics`, `propagation`, and `context` which contain methods used to initialize SDK implementations and acquire resources from the API.\n\n- [Trace API Documentation][trace-api-docs]\n- [Metrics API Documentation][metrics-api-docs]\n- [Propagation API Documentation][propagation-api-docs]\n- [Context API Documentation][context-api-docs]\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\n/* Initialize TracerProvider */\napi.trace.setGlobalTracerProvider(tracerProvider);\n/* returns tracerProvider (no-op if a working provider has not been initialized) */\napi.trace.getTracerProvider();\n/* returns a tracer from the registered global tracer provider (no-op if a working provider has not been initialized) */\napi.trace.getTracer(name, version);\n\n/* Initialize MeterProvider */\napi.metrics.setGlobalMeterProvider(meterProvider);\n/* returns meterProvider (no-op if a working provider has not been initialized) */\napi.metrics.getMeterProvider();\n/* returns a meter from the registered global meter provider (no-op if a working provider has not been initialized) */\napi.metrics.getMeter(name, version);\n\n/* Initialize Propagator */\napi.propagation.setGlobalPropagator(httpTraceContextPropagator);\n\n/* Initialize Context Manager */\napi.context.setGlobalContextManager(asyncHooksContextManager);\n```\n\n### Library Authors\n\nLibrary authors need only to depend on the `@opentelemetry/api` package and trust that the application owners which use their library will initialize an appropriate SDK.\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\nconst tracer = api.trace.getTracer(\"my-library-name\", \"0.2.3\");\n\nasync function doSomething() {\n const span = tracer.startSpan(\"doSomething\", { parent: tracer.getCurrentSpan() });\n try {\n const result = await doSomethingElse();\n span.end();\n return result;\n } catch (err) {\n span.setStatus({\n // use an appropriate status code here\n code: api.CanonicalCode.INTERNAL,\n message: err.message,\n });\n span.end();\n return null;\n }\n}\n```\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: \n- For more about OpenTelemetry JavaScript: \n- For help or feedback on this project, join us on [gitter][gitter-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[gitter-image]: https://badges.gitter.im/open-telemetry/opentelemetry-js.svg\n[gitter-url]: https://gitter.im/open-telemetry/opentelemetry-node?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/master/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/status.svg?path=packages/opentelemetry-api\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api\n[devDependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/dev-status.svg?path=packages/opentelemetry-api\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/api\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fapi.svg\n\n[trace-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/traceapi.html\n[metrics-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/metricsapi.html\n[propagation-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/propagationapi.html\n[context-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/contextapi.html\n\n[web]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-web\n[tracing]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-tracing\n[node]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-node\n[metrics]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-metrics\n\n[other-tracing-backends]: https://github.com/open-telemetry/opentelemetry-js#trace-exporters\n","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"15174c6647ab9863dfc1424412fa60f2fddb3351","scripts":{"docs":"typedoc --tsconfig tsconfig.json --exclude test/**/*.ts","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","precompile":"tsc --version","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (linux)","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.8.0","dependencies":{"@opentelemetry/context-base":"^0.11.1-alpha.48+15174c6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.1","mocha":"7.2.0","sinon":"9.0.3","codecov":"3.7.2","typedoc":"0.18.0","webpack":"4.44.1","ts-mocha":"7.0.0","ts-loader":"8.0.2","linkinator":"2.1.1","typescript":"3.9.7","@types/node":"14.0.27","karma-mocha":"2.0.1","@types/mocha":"8.0.2","@types/sinon":"4.3.1","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.11.1-alpha.48_1598988248346_0.10477424023506265","host":"s3://npm-registry-packages"}},"0.11.0":{"name":"@opentelemetry/api","version":"0.11.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.11.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"e0f6d96b3754306e55fe6154d81ee048c7529fd6","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.11.0.tgz","fileCount":171,"integrity":"sha512-K+1ADLMxduhsXoZ0GRfi9Pw162FvzBQLDQlHru1lg86rpIU+4XqdJkSGo6y3Kg+GmOWq1HNHOA/ydw/rzHQkRg==","signatures":[{"sig":"MEYCIQC8xyoQ0GcgcyaT8NO1DdVC+Ruyq4k4xtTdLjhKXleRhwIhAIzigV4u3oocErRvlJwkr1pbmRWkxAU9pj5jayjunLh6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":191178,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTqG9CRA9TVsSAnZWagAASKUP/iimhDzk2iH+iIA3UUiV\ni+FZkNP2mkOw/PDAyWN9ZkH06I0opH6H5gcDTa3IrlFqSvyngKukhwttnE4E\nkk7FGXsQ5HyemCzjnunZbmwGea5E+1GSdMieYC9sH9sFVCFAR+gp+0cMX1gu\n97Dtjjq3ghn5Lk4+LoDBiAgDxY6/08au8LEqpF7+om+XTpZLfh3X9LTgPnz1\n+xGXzBx/wY/1hfNTXctZz6WAlmTAFZ2bjJUodKbkd1iELk5ht9sHEN5ZVJ8i\nxHZ9V0KbLLwm6fCQd6YDUxauXKz5i+aK9E6bRIkFgoxKHJPFVKh3YuhtzKgt\nmWh/jabLBI50u0T2IVsMbWJSWTnsBVEpZ+e2hxgb9vB43aP6RAwmn7Uiqwpc\naKLvbnBSs578/sgK+szf1dQs7s62ObGCczJ0NoQNGTfOmMe01knKRxgx3CgD\nEcYL5vNWdURiVvpA4lmHjvMSQaYPfDJvRBkFh3SDI2k0T5QStXKA2RRuqDP9\n7p9rZCnjofh8FA73xU00axkgbKoquzUAGkG5Wve22oi157mlwLPY23bJ5v9l\n6ok44P7xR/IjuCk5/NKaiJScPyMXmgOZfg46BNUmNL6OuonERxSLqxd6NKpi\nGDSIZg3U4BQel5XBiM4AnnBGRu6Im1Tgdh2wR0iGpp0CGcmqwDyZFH0skW/c\n1qXz\r\n=DIsD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"15174c6647ab9863dfc1424412fa60f2fddb3351","scripts":{"docs":"typedoc --tsconfig tsconfig.json --exclude test/**/*.ts","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","precompile":"tsc --version","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"obecny","email":"bobecny@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.4.0+x64 (darwin)","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.4.0","dependencies":{"@opentelemetry/context-base":"^0.11.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.1","mocha":"7.2.0","sinon":"9.0.3","codecov":"3.7.2","typedoc":"0.18.0","webpack":"4.44.1","ts-mocha":"7.0.0","ts-loader":"8.0.2","linkinator":"2.1.1","typescript":"3.9.7","@types/node":"14.0.27","karma-mocha":"2.0.1","@types/mocha":"8.0.2","@types/sinon":"4.3.1","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.11.0_1598988732934_0.14482583409325978","host":"s3://npm-registry-packages"}},"0.11.1-alpha.15":{"name":"@opentelemetry/api","version":"0.11.1-alpha.15","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.11.1-alpha.15","maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"72d0ec099544ed216043bb91e9681034813829c8","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.11.1-alpha.15.tgz","fileCount":162,"integrity":"sha512-7g3KV6pqZdYkq9goryv/UDptfv1S80GHt8OVeoZ8HO14AuLqQE9N9mpzDh4N+MwmsrUPFNfcbwwOtMr4W3Lzeg==","signatures":[{"sig":"MEUCIGgvNfr/l8cCJ77wrckylWzqldn9NwdeKEqlWaQSqRA0AiEAsnHBSrXO2Fm6om3y/U0L8wyra8+8rEsgiUrjRgJhaTc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":184978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaB4sCRA9TVsSAnZWagAA33IP/iFFEy2zEGFVfgO9K7CL\nrRTky8biwNa5UKvIJftaePxVp9VHO8LyaX+V+xrMl2JP5bQFEyGD/A+2UjQP\nQZswGYSPrDO/j8ayzFgAstLrSxmM8Cvi9JZuxPranMEZ3BL1yszAr7nTk7dc\nbTinmihm/ZJb3S1rRf2QrhsbnT7Dd65PtvXq/qd/OAxaGAxiKz/cgk4XbZwn\nf1jyz3laG/6ufeKzwdMSR0JuRHMBIbkJ35xbSqBrDHaQhbT72e36tuPU08lf\nOV87iWc5kQYYQ6qW8vFZo4/OjadGk93Fg50hXZyaBVWXu/X6ooiluE/pSM0X\n5OrP10dntwqMUv6wrNz6kSkkAOl7G/7ufUfhhsJNra1K3BnOgR9CiTwQgYtO\n7rpXB2xgApocvH6k3bpidDs+Je9z+g2XAVR0ktKrTigeYSjiqHrKTlXuzNmr\nZkywduJWl+fg8xYTCHIX5xy7y9PNLei9IOKBcCNNmQ+1WlZrWVUNtqTvd5WF\nfvXZ+V5YyTcxJZTM/lTcbCujKVDFmtvlbiyRfJwk06tqvDGFjbz+YglASf7t\nTsESKkrnZTY+D3sj95gDcZlZ4LSrZ8qmLq505cZjPRkc8Yj/cqW1fBjGMXZl\n4mpu+Kp1B7pgQW1ngEuTiPMQU2ZfYNJpve+dZbsjOu4H0w7zLER/A4Z5ZaVd\nVtcu\r\n=A+1U\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","readme":"# OpenTelemetry API for JavaScript\n\n[![Gitter chat][gitter-image]][gitter-url]\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nThis package provides everything needed to interact with the OpenTelemetry API, including all TypeScript interfaces, enums, and no-op implementations. It is intended for use both on the server and in the browser.\n\n## Quick Start\n\nTo get started you need to install the SDK and plugins, create a TracerProvider and/or MeterProvider, and register it with the API.\n\n### Install Dependencies\n\n```sh\n$ # Install tracing dependencies\n$ npm install \\\n @opentelemetry/api \\\n @opentelemetry/core \\\n @opentelemetry/node \\\n @opentelemetry/tracing \\\n @opentelemetry/exporter-jaeger \\ # add exporters as needed\n @opentelemetry/plugin-http # add plugins as needed\n\n$ # Install metrics dependencies\n$ npm install \\\n @opentelemetry/metrics \\\n @opentelemetry/exporter-prometheus # add exporters as needed\n```\n\n> Note: this example is for node.js. See [examples/tracer-web](https://github.com/open-telemetry/opentelemetry-js/tree/master/examples/tracer-web) for a browser example.\n\n### Initialize the SDK\n\nBefore any other module in your application is loaded, you must initialize the global tracer and meter providers. If you fail to initialize a provider, no-op implementations will be provided to any library which acquires them from the API.\n\nTo collect traces and metrics, you will have to tell the SDK where to export telemetry data to. This example uses Jaeger and Prometheus, but exporters exist for [other tracing backends][other-tracing-backends]. If you're not sure if there is an exporter for your tracing backend, contact your tracing provider.\n\n#### Tracing\n\n```javascript\nconst { NodeTracerProvider } = require(\"@opentelemetry/node\");\nconst { SimpleSpanProcessor } = require(\"@opentelemetry/tracing\");\nconst { JaegerExporter } = require(\"@opentelemetry/exporter-jaeger\");\n\nconst tracerProvider = new NodeTracerProvider();\n\n/**\n * The SimpleSpanProcessor does no batching and exports spans\n * immediately when they end. For most production use cases,\n * OpenTelemetry recommends use of the BatchSpanProcessor.\n */\ntracerProvider.addSpanProcessor(\n new SimpleSpanProcessor(\n new JaegerExporter({\n serviceName: 'my-service'\n })\n )\n);\n\n/**\n * Registering the provider with the API allows it to be discovered\n * and used by instrumentation libraries. The OpenTelemetry API provides\n * methods to set global SDK implementations, but the default SDK provides\n * a convenience method named `register` which registers same defaults\n * for you.\n *\n * By default the NodeTracerProvider uses Trace Context for propagation\n * and AsyncHooksScopeManager for context management. To learn about\n * customizing this behavior, see API Registration Options below.\n */\ntracerProvider.register();\n```\n\n#### Metrics\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\nconst { MeterProvider } = require(\"@opentelemetry/metrics\");\nconst { PrometheusExporter } = require(\"@opentelemetry/exporter-prometheus\");\n\nconst meterProvider = new MeterProvider({\n // The Prometheus exporter runs an HTTP server which\n // the Prometheus backend scrapes to collect metrics.\n exporter: new PrometheusExporter({ startServer: true }),\n interval: 1000,\n});\n\n/**\n * Registering the provider with the API allows it to be discovered\n * and used by instrumentation libraries.\n */\napi.metrics.setGlobalMeterProvider(meterProvider);\n```\n\n## Version Compatibility\n\nBecause the npm installer and node module resolution algorithm could potentially allow two or more copies of any given package to exist within the same `node_modules` structure, the OpenTelemetry API takes advantage of a variable on the `global` object to store the global API. When an API method in the API package is called, it checks if this `global` API exists and proxies calls to it if and only if it is a compatible API version. This means if a package has a dependency on an OpenTelemetry API version which is not compatible with the API used by the end user, the package will receive a no-op implementation of the API.\n\n## Advanced Use\n\n### API Registration Options\n\nIf you prefer to choose your own propagator or context manager, you may pass an options object into the `tracerProvider.register()` method. Omitted or `undefined` options will be replaced by a default value and `null` values will be skipped.\n\n```javascript\nconst { B3Propagator } = require(\"@opentelemetry/core\");\n\ntracerProvider.register({\n // Use B3 Propagation\n propagator: new B3Propagator(),\n\n // Skip registering a default context manager\n contextManager: null,\n});\n```\n\n### API Methods\n\nIf you are writing an instrumentation library, or prefer to call the API methods directly rather than using the `register` method on the Tracer/Meter Provider, OpenTelemetry provides direct access to the underlying API methods through the `@opentelemetry/api` package. API entry points are defined as global singleton objects `trace`, `metrics`, `propagation`, and `context` which contain methods used to initialize SDK implementations and acquire resources from the API.\n\n- [Trace API Documentation][trace-api-docs]\n- [Metrics API Documentation][metrics-api-docs]\n- [Propagation API Documentation][propagation-api-docs]\n- [Context API Documentation][context-api-docs]\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\n/* Initialize TracerProvider */\napi.trace.setGlobalTracerProvider(tracerProvider);\n/* returns tracerProvider (no-op if a working provider has not been initialized) */\napi.trace.getTracerProvider();\n/* returns a tracer from the registered global tracer provider (no-op if a working provider has not been initialized) */\napi.trace.getTracer(name, version);\n\n/* Initialize MeterProvider */\napi.metrics.setGlobalMeterProvider(meterProvider);\n/* returns meterProvider (no-op if a working provider has not been initialized) */\napi.metrics.getMeterProvider();\n/* returns a meter from the registered global meter provider (no-op if a working provider has not been initialized) */\napi.metrics.getMeter(name, version);\n\n/* Initialize Propagator */\napi.propagation.setGlobalPropagator(httpTraceContextPropagator);\n\n/* Initialize Context Manager */\napi.context.setGlobalContextManager(asyncHooksContextManager);\n```\n\n### Library Authors\n\nLibrary authors need only to depend on the `@opentelemetry/api` package and trust that the application owners which use their library will initialize an appropriate SDK.\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\nconst tracer = api.trace.getTracer(\"my-library-name\", \"0.2.3\");\n\nasync function doSomething() {\n const span = tracer.startSpan(\"doSomething\", { parent: tracer.getCurrentSpan() });\n try {\n const result = await doSomethingElse();\n span.end();\n return result;\n } catch (err) {\n span.setStatus({\n // use an appropriate status code here\n code: api.CanonicalCode.INTERNAL,\n message: err.message,\n });\n span.end();\n return null;\n }\n}\n```\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: \n- For more about OpenTelemetry JavaScript: \n- For help or feedback on this project, join us on [gitter][gitter-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[gitter-image]: https://badges.gitter.im/open-telemetry/opentelemetry-js.svg\n[gitter-url]: https://gitter.im/open-telemetry/opentelemetry-node?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/master/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/status.svg?path=packages/opentelemetry-api\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api\n[devDependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/dev-status.svg?path=packages/opentelemetry-api\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/api\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fapi.svg\n\n[trace-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/traceapi.html\n[metrics-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/metricsapi.html\n[propagation-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/propagationapi.html\n[context-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/contextapi.html\n\n[web]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-web\n[tracing]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-tracing\n[node]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-node\n[metrics]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-metrics\n\n[other-tracing-backends]: https://github.com/open-telemetry/opentelemetry-js#trace-exporters\n","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"e170039015e8a1a7419bb835a00659b2a734b8a6","scripts":{"docs":"typedoc --tsconfig tsconfig.json --exclude test/**/*.ts","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","precompile":"tsc --version","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.10.1+x64 (linux)","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.10.1","dependencies":{"@opentelemetry/context-base":"^0.11.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.1","mocha":"7.2.0","sinon":"9.0.3","codecov":"3.7.2","typedoc":"0.18.0","webpack":"4.44.1","ts-mocha":"7.0.0","ts-loader":"8.0.2","linkinator":"2.1.1","typescript":"3.9.7","@types/node":"14.0.27","karma-mocha":"2.0.1","@types/mocha":"8.0.2","@types/sinon":"9.0.5","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.11.1-alpha.15_1600658988294_0.8542708145011673","host":"s3://npm-registry-packages"}},"0.11.1-alpha.35":{"name":"@opentelemetry/api","version":"0.11.1-alpha.35","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.11.1-alpha.35","maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"a9839f60b2ffd0eeb760b182d92b7c6e7cc65a9c","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.11.1-alpha.35.tgz","fileCount":165,"integrity":"sha512-ds9XbRpYHiL7nq3AZBj6VjgOXqqhpL7YGwb/H2s7vxn0REQHSlgZEzpmKbCfk1OBpfzHu/kAhb9QTH5QkWo6pw==","signatures":[{"sig":"MEUCIQC8gQ0cyKThUjBldSDefnU4sOthmo94bmtgYcVtJ6NFfQIgCBwkaJ2qJoABLjJa7bj31cGWNrbVAZIrjPSOB5JKL0I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":188995,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdHhqCRA9TVsSAnZWagAAttYQAKFeg+0UaTItu4V4oqvK\nPbwAESsLrY1PUfaXL7wqKpqX3zk5l5hv6LzxqQUSvhhMFW08PA/iRbaq+KZc\nrXGdKYZszsxUN8whbzfiZcblIC59TLXyJOLUO/2ntnOKISnCOL3FfVEZ/VOA\nY6Y3H4bWbkwne2zq+vV55OdHfN5gSAf23xu4EgMpN4G0vSaLDH1R01DCm3c5\nyoWDpUNMqeex0EA3/SfYP45q2DTdkiv6Bve0rrKy6XabbGwIDuJcjWf39iUE\n1RDB99f7fc0DgjOVDT3zwAtzzpnH4YlTTIXUB/dssKF5/g8XLTlQUeyyuVXm\nML7VBMKXnTSG6CNfK6U5puyRhvruhoEZscpkfJw9EIzkbw1PQYbIlwxH0OcQ\ni/g1DMw37BFnEuuUhd43eda5fRTcv5ldLod2Xvhd3ifXsvxhCXKlt+qVdMTK\naChAV12hC9gFEZs3EHiS7gKA7Ddn4pXwE3Z5n5+Vyw8NXukih2epSPjGBRwU\nMORtcS6Vex7xpVNouAA6vynabRAS3feQIJEyvEO9Fpi4uFpqnTddwIISd1va\nd5pL7whnz+Vim836KfOfqDBYfw4UVzTOhl9HN10HgXX9tQr1DUjIT5+wipmO\nARat1W7z1HvHG9c9CIwatBklSowAj99oWYR5X93Fuz5CZz46XKukAjQLwIpn\nFay0\r\n=Jy9x\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","readme":"# OpenTelemetry API for JavaScript\n\n[![Gitter chat][gitter-image]][gitter-url]\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nThis package provides everything needed to interact with the OpenTelemetry API, including all TypeScript interfaces, enums, and no-op implementations. It is intended for use both on the server and in the browser.\n\n## Quick Start\n\nTo get started you need to install the SDK and plugins, create a TracerProvider and/or MeterProvider, and register it with the API.\n\n### Install Dependencies\n\n```sh\n$ # Install tracing dependencies\n$ npm install \\\n @opentelemetry/api \\\n @opentelemetry/core \\\n @opentelemetry/node \\\n @opentelemetry/tracing \\\n @opentelemetry/exporter-jaeger \\ # add exporters as needed\n @opentelemetry/plugin-http # add plugins as needed\n\n$ # Install metrics dependencies\n$ npm install \\\n @opentelemetry/metrics \\\n @opentelemetry/exporter-prometheus # add exporters as needed\n```\n\n> Note: this example is for node.js. See [examples/tracer-web](https://github.com/open-telemetry/opentelemetry-js/tree/master/examples/tracer-web) for a browser example.\n\n### Initialize the SDK\n\nBefore any other module in your application is loaded, you must initialize the global tracer and meter providers. If you fail to initialize a provider, no-op implementations will be provided to any library which acquires them from the API.\n\nTo collect traces and metrics, you will have to tell the SDK where to export telemetry data to. This example uses Jaeger and Prometheus, but exporters exist for [other tracing backends][other-tracing-backends]. If you're not sure if there is an exporter for your tracing backend, contact your tracing provider.\n\n#### Tracing\n\n```javascript\nconst { NodeTracerProvider } = require(\"@opentelemetry/node\");\nconst { SimpleSpanProcessor } = require(\"@opentelemetry/tracing\");\nconst { JaegerExporter } = require(\"@opentelemetry/exporter-jaeger\");\n\nconst tracerProvider = new NodeTracerProvider();\n\n/**\n * The SimpleSpanProcessor does no batching and exports spans\n * immediately when they end. For most production use cases,\n * OpenTelemetry recommends use of the BatchSpanProcessor.\n */\ntracerProvider.addSpanProcessor(\n new SimpleSpanProcessor(\n new JaegerExporter({\n serviceName: 'my-service'\n })\n )\n);\n\n/**\n * Registering the provider with the API allows it to be discovered\n * and used by instrumentation libraries. The OpenTelemetry API provides\n * methods to set global SDK implementations, but the default SDK provides\n * a convenience method named `register` which registers same defaults\n * for you.\n *\n * By default the NodeTracerProvider uses Trace Context for propagation\n * and AsyncHooksScopeManager for context management. To learn about\n * customizing this behavior, see API Registration Options below.\n */\ntracerProvider.register();\n```\n\n#### Metrics\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\nconst { MeterProvider } = require(\"@opentelemetry/metrics\");\nconst { PrometheusExporter } = require(\"@opentelemetry/exporter-prometheus\");\n\nconst meterProvider = new MeterProvider({\n // The Prometheus exporter runs an HTTP server which\n // the Prometheus backend scrapes to collect metrics.\n exporter: new PrometheusExporter({ startServer: true }),\n interval: 1000,\n});\n\n/**\n * Registering the provider with the API allows it to be discovered\n * and used by instrumentation libraries.\n */\napi.metrics.setGlobalMeterProvider(meterProvider);\n```\n\n## Version Compatibility\n\nBecause the npm installer and node module resolution algorithm could potentially allow two or more copies of any given package to exist within the same `node_modules` structure, the OpenTelemetry API takes advantage of a variable on the `global` object to store the global API. When an API method in the API package is called, it checks if this `global` API exists and proxies calls to it if and only if it is a compatible API version. This means if a package has a dependency on an OpenTelemetry API version which is not compatible with the API used by the end user, the package will receive a no-op implementation of the API.\n\n## Advanced Use\n\n### API Registration Options\n\nIf you prefer to choose your own propagator or context manager, you may pass an options object into the `tracerProvider.register()` method. Omitted or `undefined` options will be replaced by a default value and `null` values will be skipped.\n\n```javascript\nconst { B3Propagator } = require(\"@opentelemetry/core\");\n\ntracerProvider.register({\n // Use B3 Propagation\n propagator: new B3Propagator(),\n\n // Skip registering a default context manager\n contextManager: null,\n});\n```\n\n### API Methods\n\nIf you are writing an instrumentation library, or prefer to call the API methods directly rather than using the `register` method on the Tracer/Meter Provider, OpenTelemetry provides direct access to the underlying API methods through the `@opentelemetry/api` package. API entry points are defined as global singleton objects `trace`, `metrics`, `propagation`, and `context` which contain methods used to initialize SDK implementations and acquire resources from the API.\n\n- [Trace API Documentation][trace-api-docs]\n- [Metrics API Documentation][metrics-api-docs]\n- [Propagation API Documentation][propagation-api-docs]\n- [Context API Documentation][context-api-docs]\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\n/* Initialize TracerProvider */\napi.trace.setGlobalTracerProvider(tracerProvider);\n/* returns tracerProvider (no-op if a working provider has not been initialized) */\napi.trace.getTracerProvider();\n/* returns a tracer from the registered global tracer provider (no-op if a working provider has not been initialized) */\napi.trace.getTracer(name, version);\n\n/* Initialize MeterProvider */\napi.metrics.setGlobalMeterProvider(meterProvider);\n/* returns meterProvider (no-op if a working provider has not been initialized) */\napi.metrics.getMeterProvider();\n/* returns a meter from the registered global meter provider (no-op if a working provider has not been initialized) */\napi.metrics.getMeter(name, version);\n\n/* Initialize Propagator */\napi.propagation.setGlobalPropagator(httpTraceContextPropagator);\n\n/* Initialize Context Manager */\napi.context.setGlobalContextManager(asyncHooksContextManager);\n```\n\n### Library Authors\n\nLibrary authors need only to depend on the `@opentelemetry/api` package and trust that the application owners which use their library will initialize an appropriate SDK.\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\nconst tracer = api.trace.getTracer(\"my-library-name\", \"0.2.3\");\n\nasync function doSomething() {\n const span = tracer.startSpan(\"doSomething\", { parent: tracer.getCurrentSpan() });\n try {\n const result = await doSomethingElse();\n span.end();\n return result;\n } catch (err) {\n span.setStatus({\n // use an appropriate status code here\n code: api.CanonicalCode.INTERNAL,\n message: err.message,\n });\n span.end();\n return null;\n }\n}\n```\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: \n- For more about OpenTelemetry JavaScript: \n- For help or feedback on this project, join us on [gitter][gitter-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[gitter-image]: https://badges.gitter.im/open-telemetry/opentelemetry-js.svg\n[gitter-url]: https://gitter.im/open-telemetry/opentelemetry-node?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/master/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/status.svg?path=packages/opentelemetry-api\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api\n[devDependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/dev-status.svg?path=packages/opentelemetry-api\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/api\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fapi.svg\n\n[trace-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/traceapi.html\n[metrics-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/metricsapi.html\n[propagation-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/propagationapi.html\n[context-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/contextapi.html\n\n[web]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-web\n[tracing]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-tracing\n[node]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-node\n[metrics]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-metrics\n\n[other-tracing-backends]: https://github.com/open-telemetry/opentelemetry-js#trace-exporters\n","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"c6c993bb16c58ba907337a5667da01b3c248e350","scripts":{"docs":"typedoc --tsconfig tsconfig.json --exclude test/**/*.ts","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","precompile":"tsc --version","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.11.0+x64 (linux)","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.11.0","dependencies":{"@opentelemetry/context-base":"^0.11.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.1","mocha":"7.2.0","sinon":"9.0.3","codecov":"3.7.2","typedoc":"0.18.0","webpack":"4.44.1","ts-mocha":"7.0.0","ts-loader":"8.0.2","linkinator":"2.1.1","typescript":"3.9.7","@types/node":"14.0.27","karma-mocha":"2.0.1","@types/mocha":"8.0.2","@types/sinon":"9.0.5","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.11.1-alpha.35_1601468521822_0.5126426545069165","host":"s3://npm-registry-packages"}},"0.11.1-alpha.36":{"name":"@opentelemetry/api","version":"0.11.1-alpha.36","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.11.1-alpha.36","maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"b5f30d856baa4b4f7e1cf0e445e3c0d69bf4e251","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.11.1-alpha.36.tgz","fileCount":165,"integrity":"sha512-G656LtExbORnrukNFlHlISsMU3NNdfFKcUXYSz24amoLFvyi72PhU9nQ9zT42OZ+o1Id7JGMjz3pnUjbd+zSCQ==","signatures":[{"sig":"MEUCIByqyh+1NmmgcRVEA4qgKGKcP+3RZm2T1kffZHwDMtK7AiEA0x3rBqnavdBVWC+7BUmRZWVaiaVO/EFjfJfl6GHVHVw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":189013,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdHxGCRA9TVsSAnZWagAAJT8P/3nUOkNlD91vCqx36hTd\niSZWW0FQ+dAL5tQNop40gcy8tB9Jcdely0QDMdD+DgCYESDBkHldb2dF70C3\nHsStkZSaYBmvgy5S5SyJcVkQL4OJKrxsuyO4dApm/2Hf6DlWs5cQOWTz+tI3\naXdp3Mn2BHD0rzpXNPv3W+vQHhBqhXRBwhqM6NTCZtmtiswGMZonDCBV0l6I\ndbs6X5a43J1uLJHvobvM7PvWx+2g6JbTuanlwIRIeAvgr2ADP2vPeXyQLIc8\nwlVbC7PaCf0TsxLZVG9TpO2lukmH9kFY8uj37UJ664EW6Yuuw34PuYCwjF3q\nxvxuJRf1PTYt7KWbMtwAW4JXpaZB6V8U0VBTYuqJ0wBcvtIgLJy+2/pIijGg\nF3LEEVYIZqLV4xQ1puhyfjK2z4/edH3Fmrx+WV5HrxdO9q+1ERrNaRqgIt7b\nTyeMrClher7vBSjY8TKm3qXs9lb3en0nbP1wSJZxTfDJQm8mxM79urWyHXpm\nMfBw9A+2BHaGP/FwwRyTaV9pXuPw8ZZiD2VNC65nhRYK3oqsO5CUCdHaqNZX\njlssHQju/9CP6t/TfDlm5sgz5oxhTBqOXNrWXPV022WmNM1tBJypQaExiZ85\nmxt+BkHuAEz/A4hj0XJ3KgPpFpMj082DQR5TrKEpyyKcahpxsoOZFRsysjsQ\nq2Aj\r\n=P3zM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","readme":"# OpenTelemetry API for JavaScript\n\n[![Gitter chat][gitter-image]][gitter-url]\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nThis package provides everything needed to interact with the OpenTelemetry API, including all TypeScript interfaces, enums, and no-op implementations. It is intended for use both on the server and in the browser.\n\n## Quick Start\n\nTo get started you need to install the SDK and plugins, create a TracerProvider and/or MeterProvider, and register it with the API.\n\n### Install Dependencies\n\n```sh\n$ # Install tracing dependencies\n$ npm install \\\n @opentelemetry/api \\\n @opentelemetry/core \\\n @opentelemetry/node \\\n @opentelemetry/tracing \\\n @opentelemetry/exporter-jaeger \\ # add exporters as needed\n @opentelemetry/plugin-http # add plugins as needed\n\n$ # Install metrics dependencies\n$ npm install \\\n @opentelemetry/metrics \\\n @opentelemetry/exporter-prometheus # add exporters as needed\n```\n\n> Note: this example is for node.js. See [examples/tracer-web](https://github.com/open-telemetry/opentelemetry-js/tree/master/examples/tracer-web) for a browser example.\n\n### Initialize the SDK\n\nBefore any other module in your application is loaded, you must initialize the global tracer and meter providers. If you fail to initialize a provider, no-op implementations will be provided to any library which acquires them from the API.\n\nTo collect traces and metrics, you will have to tell the SDK where to export telemetry data to. This example uses Jaeger and Prometheus, but exporters exist for [other tracing backends][other-tracing-backends]. If you're not sure if there is an exporter for your tracing backend, contact your tracing provider.\n\n#### Tracing\n\n```javascript\nconst { NodeTracerProvider } = require(\"@opentelemetry/node\");\nconst { SimpleSpanProcessor } = require(\"@opentelemetry/tracing\");\nconst { JaegerExporter } = require(\"@opentelemetry/exporter-jaeger\");\n\nconst tracerProvider = new NodeTracerProvider();\n\n/**\n * The SimpleSpanProcessor does no batching and exports spans\n * immediately when they end. For most production use cases,\n * OpenTelemetry recommends use of the BatchSpanProcessor.\n */\ntracerProvider.addSpanProcessor(\n new SimpleSpanProcessor(\n new JaegerExporter({\n serviceName: 'my-service'\n })\n )\n);\n\n/**\n * Registering the provider with the API allows it to be discovered\n * and used by instrumentation libraries. The OpenTelemetry API provides\n * methods to set global SDK implementations, but the default SDK provides\n * a convenience method named `register` which registers same defaults\n * for you.\n *\n * By default the NodeTracerProvider uses Trace Context for propagation\n * and AsyncHooksScopeManager for context management. To learn about\n * customizing this behavior, see API Registration Options below.\n */\ntracerProvider.register();\n```\n\n#### Metrics\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\nconst { MeterProvider } = require(\"@opentelemetry/metrics\");\nconst { PrometheusExporter } = require(\"@opentelemetry/exporter-prometheus\");\n\nconst meterProvider = new MeterProvider({\n // The Prometheus exporter runs an HTTP server which\n // the Prometheus backend scrapes to collect metrics.\n exporter: new PrometheusExporter({ startServer: true }),\n interval: 1000,\n});\n\n/**\n * Registering the provider with the API allows it to be discovered\n * and used by instrumentation libraries.\n */\napi.metrics.setGlobalMeterProvider(meterProvider);\n```\n\n## Version Compatibility\n\nBecause the npm installer and node module resolution algorithm could potentially allow two or more copies of any given package to exist within the same `node_modules` structure, the OpenTelemetry API takes advantage of a variable on the `global` object to store the global API. When an API method in the API package is called, it checks if this `global` API exists and proxies calls to it if and only if it is a compatible API version. This means if a package has a dependency on an OpenTelemetry API version which is not compatible with the API used by the end user, the package will receive a no-op implementation of the API.\n\n## Advanced Use\n\n### API Registration Options\n\nIf you prefer to choose your own propagator or context manager, you may pass an options object into the `tracerProvider.register()` method. Omitted or `undefined` options will be replaced by a default value and `null` values will be skipped.\n\n```javascript\nconst { B3Propagator } = require(\"@opentelemetry/core\");\n\ntracerProvider.register({\n // Use B3 Propagation\n propagator: new B3Propagator(),\n\n // Skip registering a default context manager\n contextManager: null,\n});\n```\n\n### API Methods\n\nIf you are writing an instrumentation library, or prefer to call the API methods directly rather than using the `register` method on the Tracer/Meter Provider, OpenTelemetry provides direct access to the underlying API methods through the `@opentelemetry/api` package. API entry points are defined as global singleton objects `trace`, `metrics`, `propagation`, and `context` which contain methods used to initialize SDK implementations and acquire resources from the API.\n\n- [Trace API Documentation][trace-api-docs]\n- [Metrics API Documentation][metrics-api-docs]\n- [Propagation API Documentation][propagation-api-docs]\n- [Context API Documentation][context-api-docs]\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\n/* Initialize TracerProvider */\napi.trace.setGlobalTracerProvider(tracerProvider);\n/* returns tracerProvider (no-op if a working provider has not been initialized) */\napi.trace.getTracerProvider();\n/* returns a tracer from the registered global tracer provider (no-op if a working provider has not been initialized) */\napi.trace.getTracer(name, version);\n\n/* Initialize MeterProvider */\napi.metrics.setGlobalMeterProvider(meterProvider);\n/* returns meterProvider (no-op if a working provider has not been initialized) */\napi.metrics.getMeterProvider();\n/* returns a meter from the registered global meter provider (no-op if a working provider has not been initialized) */\napi.metrics.getMeter(name, version);\n\n/* Initialize Propagator */\napi.propagation.setGlobalPropagator(httpTraceContextPropagator);\n\n/* Initialize Context Manager */\napi.context.setGlobalContextManager(asyncHooksContextManager);\n```\n\n### Library Authors\n\nLibrary authors need only to depend on the `@opentelemetry/api` package and trust that the application owners which use their library will initialize an appropriate SDK.\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\nconst tracer = api.trace.getTracer(\"my-library-name\", \"0.2.3\");\n\nasync function doSomething() {\n const span = tracer.startSpan(\"doSomething\", { parent: tracer.getCurrentSpan() });\n try {\n const result = await doSomethingElse();\n span.end();\n return result;\n } catch (err) {\n span.setStatus({\n // use an appropriate status code here\n code: api.CanonicalCode.INTERNAL,\n message: err.message,\n });\n span.end();\n return null;\n }\n}\n```\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: \n- For more about OpenTelemetry JavaScript: \n- For help or feedback on this project, join us on [gitter][gitter-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[gitter-image]: https://badges.gitter.im/open-telemetry/opentelemetry-js.svg\n[gitter-url]: https://gitter.im/open-telemetry/opentelemetry-node?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/master/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/status.svg?path=packages/opentelemetry-api\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api\n[devDependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/dev-status.svg?path=packages/opentelemetry-api\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/api\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fapi.svg\n\n[trace-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/traceapi.html\n[metrics-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/metricsapi.html\n[propagation-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/propagationapi.html\n[context-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/contextapi.html\n\n[web]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-web\n[tracing]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-tracing\n[node]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-node\n[metrics]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-metrics\n\n[other-tracing-backends]: https://github.com/open-telemetry/opentelemetry-js#trace-exporters\n","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"6eb157c66925fe84b4960f247a86678441f3cb60","scripts":{"docs":"typedoc --tsconfig tsconfig.json --exclude test/**/*.ts","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","precompile":"tsc --version","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.11.0+x64 (linux)","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.11.0","dependencies":{"@opentelemetry/context-base":"^0.11.1-alpha.36+6eb157c6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.1","mocha":"7.2.0","sinon":"9.0.3","codecov":"3.7.2","typedoc":"0.18.0","webpack":"4.44.1","ts-mocha":"7.0.0","ts-loader":"8.0.2","linkinator":"2.1.1","typescript":"3.9.7","@types/node":"14.0.27","karma-mocha":"2.0.1","@types/mocha":"8.0.2","@types/sinon":"9.0.5","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.11.1-alpha.36_1601469510286_0.8353505615644046","host":"s3://npm-registry-packages"}},"0.11.1-alpha.44":{"name":"@opentelemetry/api","version":"0.11.1-alpha.44","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.11.1-alpha.44","maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"9c569ef630396472649f225d0b687bf0b5f398e6","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.11.1-alpha.44.tgz","fileCount":168,"integrity":"sha512-pDRj8lX39Chbu+1gpqHBwhhCm06s+Yr+N1d2qCGKMVg4tQ/6ikSM/1TkSACbPB9RzIrQtBZ5s72tv1Q/f+TlvA==","signatures":[{"sig":"MEQCIEPzVqX/Qt6X1bXWz0YHwQgU0mhN0RfmDf0nLWPxrxQdAiAnIpoKlAxzs3gHej5Eh3NcX117k7+lfLy+sVw7S/WGNg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":198250,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffh0LCRA9TVsSAnZWagAAaNkP/2wDWa6PHGWctP+rqLK1\nQq568fzCgCNngsO3Gg/0DFZn0aWZ4itby4KBCD/6fECKTiiVQUJY/ijyUapt\n7U4Pj1wqXLotKEZO8icgw1/Ix1ZaRulzvPBx8D3gqnL8mdO/yCRSjI48u2CY\nAp+1QNvhOmnpu/Av/821apq7zFmGlYHICPrwMCPPkof9J6To1/HWxlL9HcA6\nExiWp+QInayMEpN24XfbnoXS3VpYkDXPvmfw8Mkjmm0wIGb2TiF93WxJ+qyX\n1TqYEaF7BU30ZwTL8uxE7SIIYY9kx0/vMFQtmWcuDgIp8sKSqNFuGvXxyIpa\n8xkRWPtBcR87lDOymqhfJ9gOYE1HO+Vuv+Ju/G2SCZafYei8vMo/ewkSqpry\nWbkA2mVL24BlrBSc2U8ik4u8qixWdgARFO5N7rdlzJ5L+t/imZMs4JitATcr\n3sexAxlPBNrIVJwJT1JMIpP299DO0mJ1AoqFsO0T79Wo2V0qt48zUyVTKsVV\n6hdxXJZ0/ZMbzvjC5QvLy8afdAF/yOVbqyh1Lk6r3XJjTwkKtRDb06oeM20d\n470lRjm7u6AF+mo7bniAkWjC2T6LDKrqMIpqukxGnZVsgtRlJ3MkSDV5d1ZP\nB9B1cU5UeF41b8W/ZLllikTkTCe9h67uSs8zFda1iL1yAkTR5TZd+Uahl6mf\nOSmj\r\n=SHra\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","readme":"# OpenTelemetry API for JavaScript\n\n[![Gitter chat][gitter-image]][gitter-url]\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nThis package provides everything needed to interact with the OpenTelemetry API, including all TypeScript interfaces, enums, and no-op implementations. It is intended for use both on the server and in the browser.\n\n## Quick Start\n\nTo get started you need to install the SDK and plugins, create a TracerProvider and/or MeterProvider, and register it with the API.\n\n### Install Dependencies\n\n```sh\n$ # Install tracing dependencies\n$ npm install \\\n @opentelemetry/api \\\n @opentelemetry/core \\\n @opentelemetry/node \\\n @opentelemetry/tracing \\\n @opentelemetry/exporter-jaeger \\ # add exporters as needed\n @opentelemetry/plugin-http # add plugins as needed\n\n$ # Install metrics dependencies\n$ npm install \\\n @opentelemetry/metrics \\\n @opentelemetry/exporter-prometheus # add exporters as needed\n```\n\n> Note: this example is for node.js. See [examples/tracer-web](https://github.com/open-telemetry/opentelemetry-js/tree/master/examples/tracer-web) for a browser example.\n\n### Initialize the SDK\n\nBefore any other module in your application is loaded, you must initialize the global tracer and meter providers. If you fail to initialize a provider, no-op implementations will be provided to any library which acquires them from the API.\n\nTo collect traces and metrics, you will have to tell the SDK where to export telemetry data to. This example uses Jaeger and Prometheus, but exporters exist for [other tracing backends][other-tracing-backends]. If you're not sure if there is an exporter for your tracing backend, contact your tracing provider.\n\n#### Tracing\n\n```javascript\nconst { NodeTracerProvider } = require(\"@opentelemetry/node\");\nconst { SimpleSpanProcessor } = require(\"@opentelemetry/tracing\");\nconst { JaegerExporter } = require(\"@opentelemetry/exporter-jaeger\");\n\nconst tracerProvider = new NodeTracerProvider();\n\n/**\n * The SimpleSpanProcessor does no batching and exports spans\n * immediately when they end. For most production use cases,\n * OpenTelemetry recommends use of the BatchSpanProcessor.\n */\ntracerProvider.addSpanProcessor(\n new SimpleSpanProcessor(\n new JaegerExporter({\n serviceName: 'my-service'\n })\n )\n);\n\n/**\n * Registering the provider with the API allows it to be discovered\n * and used by instrumentation libraries. The OpenTelemetry API provides\n * methods to set global SDK implementations, but the default SDK provides\n * a convenience method named `register` which registers same defaults\n * for you.\n *\n * By default the NodeTracerProvider uses Trace Context for propagation\n * and AsyncHooksScopeManager for context management. To learn about\n * customizing this behavior, see API Registration Options below.\n */\ntracerProvider.register();\n```\n\n#### Metrics\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\nconst { MeterProvider } = require(\"@opentelemetry/metrics\");\nconst { PrometheusExporter } = require(\"@opentelemetry/exporter-prometheus\");\n\nconst meterProvider = new MeterProvider({\n // The Prometheus exporter runs an HTTP server which\n // the Prometheus backend scrapes to collect metrics.\n exporter: new PrometheusExporter({ startServer: true }),\n interval: 1000,\n});\n\n/**\n * Registering the provider with the API allows it to be discovered\n * and used by instrumentation libraries.\n */\napi.metrics.setGlobalMeterProvider(meterProvider);\n```\n\n## Version Compatibility\n\nBecause the npm installer and node module resolution algorithm could potentially allow two or more copies of any given package to exist within the same `node_modules` structure, the OpenTelemetry API takes advantage of a variable on the `global` object to store the global API. When an API method in the API package is called, it checks if this `global` API exists and proxies calls to it if and only if it is a compatible API version. This means if a package has a dependency on an OpenTelemetry API version which is not compatible with the API used by the end user, the package will receive a no-op implementation of the API.\n\n## Advanced Use\n\n### API Registration Options\n\nIf you prefer to choose your own propagator or context manager, you may pass an options object into the `tracerProvider.register()` method. Omitted or `undefined` options will be replaced by a default value and `null` values will be skipped.\n\n```javascript\nconst { B3Propagator } = require(\"@opentelemetry/core\");\n\ntracerProvider.register({\n // Use B3 Propagation\n propagator: new B3Propagator(),\n\n // Skip registering a default context manager\n contextManager: null,\n});\n```\n\n### API Methods\n\nIf you are writing an instrumentation library, or prefer to call the API methods directly rather than using the `register` method on the Tracer/Meter Provider, OpenTelemetry provides direct access to the underlying API methods through the `@opentelemetry/api` package. API entry points are defined as global singleton objects `trace`, `metrics`, `propagation`, and `context` which contain methods used to initialize SDK implementations and acquire resources from the API.\n\n- [Trace API Documentation][trace-api-docs]\n- [Metrics API Documentation][metrics-api-docs]\n- [Propagation API Documentation][propagation-api-docs]\n- [Context API Documentation][context-api-docs]\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\n/* Initialize TracerProvider */\napi.trace.setGlobalTracerProvider(tracerProvider);\n/* returns tracerProvider (no-op if a working provider has not been initialized) */\napi.trace.getTracerProvider();\n/* returns a tracer from the registered global tracer provider (no-op if a working provider has not been initialized) */\napi.trace.getTracer(name, version);\n\n/* Initialize MeterProvider */\napi.metrics.setGlobalMeterProvider(meterProvider);\n/* returns meterProvider (no-op if a working provider has not been initialized) */\napi.metrics.getMeterProvider();\n/* returns a meter from the registered global meter provider (no-op if a working provider has not been initialized) */\napi.metrics.getMeter(name, version);\n\n/* Initialize Propagator */\napi.propagation.setGlobalPropagator(httpTraceContextPropagator);\n\n/* Initialize Context Manager */\napi.context.setGlobalContextManager(asyncHooksContextManager);\n```\n\n### Library Authors\n\nLibrary authors need only to depend on the `@opentelemetry/api` package and trust that the application owners which use their library will initialize an appropriate SDK.\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\nconst tracer = api.trace.getTracer(\"my-library-name\", \"0.2.3\");\n\nasync function doSomething() {\n const span = tracer.startSpan(\"doSomething\", { parent: tracer.getCurrentSpan() });\n try {\n const result = await doSomethingElse();\n span.end();\n return result;\n } catch (err) {\n span.setStatus({\n // use an appropriate status code here\n code: api.CanonicalCode.INTERNAL,\n message: err.message,\n });\n span.end();\n return null;\n }\n}\n```\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: \n- For more about OpenTelemetry JavaScript: \n- For help or feedback on this project, join us on [gitter][gitter-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[gitter-image]: https://badges.gitter.im/open-telemetry/opentelemetry-js.svg\n[gitter-url]: https://gitter.im/open-telemetry/opentelemetry-node?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/master/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/status.svg?path=packages/opentelemetry-api\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api\n[devDependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/dev-status.svg?path=packages/opentelemetry-api\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/api\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fapi.svg\n\n[trace-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/traceapi.html\n[metrics-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/metricsapi.html\n[propagation-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/propagationapi.html\n[context-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/contextapi.html\n\n[web]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-web\n[tracing]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-tracing\n[node]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-node\n[metrics]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-metrics\n\n[other-tracing-backends]: https://github.com/open-telemetry/opentelemetry-js#trace-exporters\n","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"240f852cc41707c751f28811b7ce3d243382e3dd","scripts":{"docs":"typedoc --tsconfig tsconfig.json --exclude test/**/*.ts","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","precompile":"tsc --version","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.11.0+x64 (linux)","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.11.0","dependencies":{"@opentelemetry/context-base":"^0.11.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.1","mocha":"7.2.0","sinon":"9.0.3","codecov":"3.7.2","typedoc":"0.18.0","webpack":"4.44.1","ts-mocha":"7.0.0","ts-loader":"8.0.2","linkinator":"2.1.1","typescript":"3.9.7","@types/node":"14.0.27","karma-mocha":"2.0.1","@types/mocha":"8.0.2","@types/sinon":"9.0.5","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.11.1-alpha.44_1602100491043_0.2372839598261729","host":"s3://npm-registry-packages"}},"0.11.1-alpha.53":{"name":"@opentelemetry/api","version":"0.11.1-alpha.53","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.11.1-alpha.53","maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"348fbe8e127edf9590d53ec73381066baf3f61ae","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.11.1-alpha.53.tgz","fileCount":168,"integrity":"sha512-u6UpV5JKF/K98TK/he8WqxhYK8+8y9huiVgQlOFNAjTlL3cck4yY1RMStn22IIyvM808UtS4m/rP39V6nw+JBg==","signatures":[{"sig":"MEUCIDjcb42Q1KXgFgygzgJiKDmFc4mmcE5HJzFF54FWPYn1AiEAwV6ZkEEhf0IZqP+0PHOLS7nwiTdx7lXfYYdCWly3Mv8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":198187,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjXzwCRA9TVsSAnZWagAAxHEP/2pFusJe3545oZfAJdLJ\nUOi5veYOU91K1XLwuRGzHTSwDVSFRSf1Dhnii6oqlWQi884VcPeiFY/0HQLj\n8jY9XmLWm6VZlrvraIQKKbChRTl14zmmehSEImVllFHSGpUJ9mToISy8sDAX\nulbSvGSe2zyyWQR0YLnf0OfV4Hl7+EWF1qjfpgXVVviq5Q5vm59gMQrjk5VA\nM1DqlQuJAYaSHY6vL/CNRgMq7fsP3jXXrnPPENcEqIABXthqKAzZUrHVogZw\nTb8et7P3or6VO4cMh0auwRnuAgvUqFkImyK82CRkDCFjZLP9oRKkl2Zq6WBR\nYa4mGrQBBCapv+5lOJkBnCya9Yi1CASZeby57MSCGMMyxxJQ0B8hXNf+7qnn\nJbl6CJ1MGhmmYcSX4sNc337bA6MWqbJHLaU6Rw8C5xFX1W2E+I+dIwNCJ4o8\ngEablR9itVetafylS8QY1wNLe8UIw8A3rSfZ8+uRa5sDsQ9vflhPGh8n5OvT\ndCrrmXhmqCkONkEiCBzzDx4TOmuX2FLR5OlBSNNTRdeWoi3M26gnVi+2yAhC\najx0nZqKk7cw0YpUcZSVoB0CGsBGftcJ0JIHwOPElYIGQV+bVsbeFAiA7UV/\naBjI2bgrZQpvGLoFwjhRx4RWXi1NbDwOHcmZF6eQ+GjGD3abzjoGyUhsEK4Y\nwCEk\r\n=F/V+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","readme":"# OpenTelemetry API for JavaScript\n\n[![Gitter chat][gitter-image]][gitter-url]\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nThis package provides everything needed to interact with the OpenTelemetry API, including all TypeScript interfaces, enums, and no-op implementations. It is intended for use both on the server and in the browser.\n\n## Quick Start\n\nTo get started you need to install the SDK and plugins, create a TracerProvider and/or MeterProvider, and register it with the API.\n\n### Install Dependencies\n\n```sh\n$ # Install tracing dependencies\n$ npm install \\\n @opentelemetry/api \\\n @opentelemetry/core \\\n @opentelemetry/node \\\n @opentelemetry/tracing \\\n @opentelemetry/exporter-jaeger \\ # add exporters as needed\n @opentelemetry/plugin-http # add plugins as needed\n\n$ # Install metrics dependencies\n$ npm install \\\n @opentelemetry/metrics \\\n @opentelemetry/exporter-prometheus # add exporters as needed\n```\n\n> Note: this example is for node.js. See [examples/tracer-web](https://github.com/open-telemetry/opentelemetry-js/tree/master/examples/tracer-web) for a browser example.\n\n### Initialize the SDK\n\nBefore any other module in your application is loaded, you must initialize the global tracer and meter providers. If you fail to initialize a provider, no-op implementations will be provided to any library which acquires them from the API.\n\nTo collect traces and metrics, you will have to tell the SDK where to export telemetry data to. This example uses Jaeger and Prometheus, but exporters exist for [other tracing backends][other-tracing-backends]. If you're not sure if there is an exporter for your tracing backend, contact your tracing provider.\n\n#### Tracing\n\n```javascript\nconst { NodeTracerProvider } = require(\"@opentelemetry/node\");\nconst { SimpleSpanProcessor } = require(\"@opentelemetry/tracing\");\nconst { JaegerExporter } = require(\"@opentelemetry/exporter-jaeger\");\n\nconst tracerProvider = new NodeTracerProvider();\n\n/**\n * The SimpleSpanProcessor does no batching and exports spans\n * immediately when they end. For most production use cases,\n * OpenTelemetry recommends use of the BatchSpanProcessor.\n */\ntracerProvider.addSpanProcessor(\n new SimpleSpanProcessor(\n new JaegerExporter({\n serviceName: 'my-service'\n })\n )\n);\n\n/**\n * Registering the provider with the API allows it to be discovered\n * and used by instrumentation libraries. The OpenTelemetry API provides\n * methods to set global SDK implementations, but the default SDK provides\n * a convenience method named `register` which registers same defaults\n * for you.\n *\n * By default the NodeTracerProvider uses Trace Context for propagation\n * and AsyncHooksScopeManager for context management. To learn about\n * customizing this behavior, see API Registration Options below.\n */\ntracerProvider.register();\n```\n\n#### Metrics\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\nconst { MeterProvider } = require(\"@opentelemetry/metrics\");\nconst { PrometheusExporter } = require(\"@opentelemetry/exporter-prometheus\");\n\nconst meterProvider = new MeterProvider({\n // The Prometheus exporter runs an HTTP server which\n // the Prometheus backend scrapes to collect metrics.\n exporter: new PrometheusExporter({ startServer: true }),\n interval: 1000,\n});\n\n/**\n * Registering the provider with the API allows it to be discovered\n * and used by instrumentation libraries.\n */\napi.metrics.setGlobalMeterProvider(meterProvider);\n```\n\n## Version Compatibility\n\nBecause the npm installer and node module resolution algorithm could potentially allow two or more copies of any given package to exist within the same `node_modules` structure, the OpenTelemetry API takes advantage of a variable on the `global` object to store the global API. When an API method in the API package is called, it checks if this `global` API exists and proxies calls to it if and only if it is a compatible API version. This means if a package has a dependency on an OpenTelemetry API version which is not compatible with the API used by the end user, the package will receive a no-op implementation of the API.\n\n## Advanced Use\n\n### API Registration Options\n\nIf you prefer to choose your own propagator or context manager, you may pass an options object into the `tracerProvider.register()` method. Omitted or `undefined` options will be replaced by a default value and `null` values will be skipped.\n\n```javascript\nconst { B3Propagator } = require(\"@opentelemetry/core\");\n\ntracerProvider.register({\n // Use B3 Propagation\n propagator: new B3Propagator(),\n\n // Skip registering a default context manager\n contextManager: null,\n});\n```\n\n### API Methods\n\nIf you are writing an instrumentation library, or prefer to call the API methods directly rather than using the `register` method on the Tracer/Meter Provider, OpenTelemetry provides direct access to the underlying API methods through the `@opentelemetry/api` package. API entry points are defined as global singleton objects `trace`, `metrics`, `propagation`, and `context` which contain methods used to initialize SDK implementations and acquire resources from the API.\n\n- [Trace API Documentation][trace-api-docs]\n- [Metrics API Documentation][metrics-api-docs]\n- [Propagation API Documentation][propagation-api-docs]\n- [Context API Documentation][context-api-docs]\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\n/* Initialize TracerProvider */\napi.trace.setGlobalTracerProvider(tracerProvider);\n/* returns tracerProvider (no-op if a working provider has not been initialized) */\napi.trace.getTracerProvider();\n/* returns a tracer from the registered global tracer provider (no-op if a working provider has not been initialized) */\napi.trace.getTracer(name, version);\n\n/* Initialize MeterProvider */\napi.metrics.setGlobalMeterProvider(meterProvider);\n/* returns meterProvider (no-op if a working provider has not been initialized) */\napi.metrics.getMeterProvider();\n/* returns a meter from the registered global meter provider (no-op if a working provider has not been initialized) */\napi.metrics.getMeter(name, version);\n\n/* Initialize Propagator */\napi.propagation.setGlobalPropagator(httpTraceContextPropagator);\n\n/* Initialize Context Manager */\napi.context.setGlobalContextManager(asyncHooksContextManager);\n```\n\n### Library Authors\n\nLibrary authors need only to depend on the `@opentelemetry/api` package and trust that the application owners which use their library will initialize an appropriate SDK.\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\nconst tracer = api.trace.getTracer(\"my-library-name\", \"0.2.3\");\n\nasync function doSomething() {\n const span = tracer.startSpan(\"doSomething\", { parent: tracer.getCurrentSpan() });\n try {\n const result = await doSomethingElse();\n span.end();\n return result;\n } catch (err) {\n span.setStatus({\n // use an appropriate status code here\n code: api.CanonicalCode.INTERNAL,\n message: err.message,\n });\n span.end();\n return null;\n }\n}\n```\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: \n- For more about OpenTelemetry JavaScript: \n- For help or feedback on this project, join us on [gitter][gitter-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[gitter-image]: https://badges.gitter.im/open-telemetry/opentelemetry-js.svg\n[gitter-url]: https://gitter.im/open-telemetry/opentelemetry-node?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/master/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/status.svg?path=packages/opentelemetry-api\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api\n[devDependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/dev-status.svg?path=packages/opentelemetry-api\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/api\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fapi.svg\n\n[trace-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/traceapi.html\n[metrics-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/metricsapi.html\n[propagation-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/propagationapi.html\n[context-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/contextapi.html\n\n[web]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-web\n[tracing]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-tracing\n[node]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-node\n[metrics]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-metrics\n\n[other-tracing-backends]: https://github.com/open-telemetry/opentelemetry-js#trace-exporters\n","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"00a8ce7f982ea24bcd4bc398477112894078ab29","scripts":{"docs":"typedoc --tsconfig tsconfig.json --exclude test/**/*.ts","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","precompile":"tsc --version","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.13.1+x64 (linux)","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.13.1","dependencies":{"@opentelemetry/context-base":"^0.11.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.1","mocha":"7.2.0","sinon":"9.0.3","codecov":"3.7.2","typedoc":"0.18.0","webpack":"4.44.1","ts-mocha":"7.0.0","ts-loader":"8.0.2","linkinator":"2.1.1","typescript":"3.9.7","@types/node":"14.0.27","karma-mocha":"2.0.1","@types/mocha":"8.0.2","@types/sinon":"9.0.5","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.11.1-alpha.53_1603108079792_0.8408903798519265","host":"s3://npm-registry-packages"}},"0.12.1-alpha.54":{"name":"@opentelemetry/api","version":"0.12.1-alpha.54","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.12.1-alpha.54","maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"8ac76c043be872fe9d3cbb861ced8b2f74bc37a1","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.12.1-alpha.54.tgz","fileCount":168,"integrity":"sha512-sOOa8zJNQNQZl1mQt5Jirf7GiEun7njjyre3I6nsCk1AZpZmDXQq+Yq2UI/3h13D7bYGFjbKWT3FQZIeeCYcMA==","signatures":[{"sig":"MEYCIQDigDhfJDvPEJYY2av2K8u9kjwP1F0qzOUg0cNukpt1BQIhAIpHd5Q9atBvZ9DSxikcw5XB3zAlPw/sJFQ4rS48CzOe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":198205,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjYtrCRA9TVsSAnZWagAAosYP/RmpKzCVcAM9jf1vdauL\nmYhjujZolP7zXQrGK+tgUGiTtHFsxdFE5F3sgnw600vjVvF3mcd8w+4vLf2c\nbfTNAsluU6ZDd9ESR3yU2opcUg4ZYME02yhZcbUj8Er5m5IRN0zi8QCmfnxn\n1wdPUCiKZm6O1S95hrxSDdWg569fTWbAr5D6OUljPVQ/LeK2FYQKTjwnUF2u\nA5Ho28CmqK+jeoVihx4E89BpbnFfqFSlSuLG/wrmEgqUunMOpsut7U6WqLk5\nzuZA4b7IarysBfbt3iLbFaah09tUCwgsxslKHdeSLQV3vV+hc4aGRyP996je\nZKEUhytIuMPgND6Z7o9WcTbYEMdf00+CHY4mbsX2N/OrEwhcnp46Sl/KbEqQ\nJrRibQDQ6ZU0mI984x/dM8OOw0P4weGFkAwWUS85sLPXytNdggI7LwO3kcP/\npDhEKyKJZc7xCAOvH4NBcxmZqQI6BBVTVECMFlUNdA4o34+x0RutK4eplzKh\nhSQtrU8wdmcjz8KPVRpuksL9MHITgxuR94xy01AnPfLtJyIs+AosEu9YU68G\nJiEz8oYL0LUp8lNlhnOEdyyx/a3qukBLGX4D4D44hmFxaBfzjRdOamY8q67x\nlKXGORK10w6JwnCREx8m6wcQz1TfU+8Ldgc/iz/GkWyKMIzqXpEoYzIbaEC5\nFU5L\r\n=f483\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","readme":"# OpenTelemetry API for JavaScript\n\n[![Gitter chat][gitter-image]][gitter-url]\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nThis package provides everything needed to interact with the OpenTelemetry API, including all TypeScript interfaces, enums, and no-op implementations. It is intended for use both on the server and in the browser.\n\n## Quick Start\n\nTo get started you need to install the SDK and plugins, create a TracerProvider and/or MeterProvider, and register it with the API.\n\n### Install Dependencies\n\n```sh\n$ # Install tracing dependencies\n$ npm install \\\n @opentelemetry/api \\\n @opentelemetry/core \\\n @opentelemetry/node \\\n @opentelemetry/tracing \\\n @opentelemetry/exporter-jaeger \\ # add exporters as needed\n @opentelemetry/plugin-http # add plugins as needed\n\n$ # Install metrics dependencies\n$ npm install \\\n @opentelemetry/metrics \\\n @opentelemetry/exporter-prometheus # add exporters as needed\n```\n\n> Note: this example is for node.js. See [examples/tracer-web](https://github.com/open-telemetry/opentelemetry-js/tree/master/examples/tracer-web) for a browser example.\n\n### Initialize the SDK\n\nBefore any other module in your application is loaded, you must initialize the global tracer and meter providers. If you fail to initialize a provider, no-op implementations will be provided to any library which acquires them from the API.\n\nTo collect traces and metrics, you will have to tell the SDK where to export telemetry data to. This example uses Jaeger and Prometheus, but exporters exist for [other tracing backends][other-tracing-backends]. If you're not sure if there is an exporter for your tracing backend, contact your tracing provider.\n\n#### Tracing\n\n```javascript\nconst { NodeTracerProvider } = require(\"@opentelemetry/node\");\nconst { SimpleSpanProcessor } = require(\"@opentelemetry/tracing\");\nconst { JaegerExporter } = require(\"@opentelemetry/exporter-jaeger\");\n\nconst tracerProvider = new NodeTracerProvider();\n\n/**\n * The SimpleSpanProcessor does no batching and exports spans\n * immediately when they end. For most production use cases,\n * OpenTelemetry recommends use of the BatchSpanProcessor.\n */\ntracerProvider.addSpanProcessor(\n new SimpleSpanProcessor(\n new JaegerExporter({\n serviceName: 'my-service'\n })\n )\n);\n\n/**\n * Registering the provider with the API allows it to be discovered\n * and used by instrumentation libraries. The OpenTelemetry API provides\n * methods to set global SDK implementations, but the default SDK provides\n * a convenience method named `register` which registers same defaults\n * for you.\n *\n * By default the NodeTracerProvider uses Trace Context for propagation\n * and AsyncHooksScopeManager for context management. To learn about\n * customizing this behavior, see API Registration Options below.\n */\ntracerProvider.register();\n```\n\n#### Metrics\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\nconst { MeterProvider } = require(\"@opentelemetry/metrics\");\nconst { PrometheusExporter } = require(\"@opentelemetry/exporter-prometheus\");\n\nconst meterProvider = new MeterProvider({\n // The Prometheus exporter runs an HTTP server which\n // the Prometheus backend scrapes to collect metrics.\n exporter: new PrometheusExporter({ startServer: true }),\n interval: 1000,\n});\n\n/**\n * Registering the provider with the API allows it to be discovered\n * and used by instrumentation libraries.\n */\napi.metrics.setGlobalMeterProvider(meterProvider);\n```\n\n## Version Compatibility\n\nBecause the npm installer and node module resolution algorithm could potentially allow two or more copies of any given package to exist within the same `node_modules` structure, the OpenTelemetry API takes advantage of a variable on the `global` object to store the global API. When an API method in the API package is called, it checks if this `global` API exists and proxies calls to it if and only if it is a compatible API version. This means if a package has a dependency on an OpenTelemetry API version which is not compatible with the API used by the end user, the package will receive a no-op implementation of the API.\n\n## Advanced Use\n\n### API Registration Options\n\nIf you prefer to choose your own propagator or context manager, you may pass an options object into the `tracerProvider.register()` method. Omitted or `undefined` options will be replaced by a default value and `null` values will be skipped.\n\n```javascript\nconst { B3Propagator } = require(\"@opentelemetry/core\");\n\ntracerProvider.register({\n // Use B3 Propagation\n propagator: new B3Propagator(),\n\n // Skip registering a default context manager\n contextManager: null,\n});\n```\n\n### API Methods\n\nIf you are writing an instrumentation library, or prefer to call the API methods directly rather than using the `register` method on the Tracer/Meter Provider, OpenTelemetry provides direct access to the underlying API methods through the `@opentelemetry/api` package. API entry points are defined as global singleton objects `trace`, `metrics`, `propagation`, and `context` which contain methods used to initialize SDK implementations and acquire resources from the API.\n\n- [Trace API Documentation][trace-api-docs]\n- [Metrics API Documentation][metrics-api-docs]\n- [Propagation API Documentation][propagation-api-docs]\n- [Context API Documentation][context-api-docs]\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\n/* Initialize TracerProvider */\napi.trace.setGlobalTracerProvider(tracerProvider);\n/* returns tracerProvider (no-op if a working provider has not been initialized) */\napi.trace.getTracerProvider();\n/* returns a tracer from the registered global tracer provider (no-op if a working provider has not been initialized) */\napi.trace.getTracer(name, version);\n\n/* Initialize MeterProvider */\napi.metrics.setGlobalMeterProvider(meterProvider);\n/* returns meterProvider (no-op if a working provider has not been initialized) */\napi.metrics.getMeterProvider();\n/* returns a meter from the registered global meter provider (no-op if a working provider has not been initialized) */\napi.metrics.getMeter(name, version);\n\n/* Initialize Propagator */\napi.propagation.setGlobalPropagator(httpTraceContextPropagator);\n\n/* Initialize Context Manager */\napi.context.setGlobalContextManager(asyncHooksContextManager);\n```\n\n### Library Authors\n\nLibrary authors need only to depend on the `@opentelemetry/api` package and trust that the application owners which use their library will initialize an appropriate SDK.\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\nconst tracer = api.trace.getTracer(\"my-library-name\", \"0.2.3\");\n\nasync function doSomething() {\n const span = tracer.startSpan(\"doSomething\", { parent: tracer.getCurrentSpan() });\n try {\n const result = await doSomethingElse();\n span.end();\n return result;\n } catch (err) {\n span.setStatus({\n // use an appropriate status code here\n code: api.CanonicalCode.INTERNAL,\n message: err.message,\n });\n span.end();\n return null;\n }\n}\n```\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: \n- For more about OpenTelemetry JavaScript: \n- For help or feedback on this project, join us on [gitter][gitter-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[gitter-image]: https://badges.gitter.im/open-telemetry/opentelemetry-js.svg\n[gitter-url]: https://gitter.im/open-telemetry/opentelemetry-node?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/master/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/status.svg?path=packages/opentelemetry-api\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api\n[devDependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/dev-status.svg?path=packages/opentelemetry-api\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/api\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fapi.svg\n\n[trace-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/traceapi.html\n[metrics-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/metricsapi.html\n[propagation-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/propagationapi.html\n[context-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/contextapi.html\n\n[web]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-web\n[tracing]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-tracing\n[node]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-node\n[metrics]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-metrics\n\n[other-tracing-backends]: https://github.com/open-telemetry/opentelemetry-js#trace-exporters\n","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"3f72613a36b6f97555a0fa7481755cf8b6cce1a7","scripts":{"docs":"typedoc --tsconfig tsconfig.json --exclude test/**/*.ts","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","precompile":"tsc --version","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.13.1+x64 (linux)","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.13.1","dependencies":{"@opentelemetry/context-base":"^0.12.1-alpha.54+3f72613a"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.1","mocha":"7.2.0","sinon":"9.0.3","codecov":"3.7.2","typedoc":"0.18.0","webpack":"4.44.1","ts-mocha":"7.0.0","ts-loader":"8.0.2","linkinator":"2.1.1","typescript":"3.9.7","@types/node":"14.0.27","karma-mocha":"2.0.1","@types/mocha":"8.0.2","@types/sinon":"9.0.5","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.12.1-alpha.54_1603111786869_0.5074131318945263","host":"s3://npm-registry-packages"}},"0.12.0":{"name":"@opentelemetry/api","version":"0.12.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.12.0","maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"0359c3926e8f16fdcd8c78f196bd1e9fc4e66777","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.12.0.tgz","fileCount":183,"integrity":"sha512-Dn4vU5GlaBrIWzLpsM6xbJwKHdlpwBQ4Bd+cL9ofJP3hKT8jBXpBpribmyaqAzrajzzl2Yt8uTa9rFVLfjDAvw==","signatures":[{"sig":"MEQCIFE3DJG+GQXBhh/4bk8Wa9+7qr3HGJAoE2V7JpB1SWftAiBj9I08sf3O4ruKz0RUHcuZI8z93544aktRpKwlvMupHg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":210312,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjYxTCRA9TVsSAnZWagAAXOoP/Rki9m3viNx9etJBtSyz\n3/vsdR+EjxKiL0Zd9qc2sneAN5IdhEhaKuYx0Z+1ffvtOh5MK+GboS6TlJ3I\nbGC7WIqSbbeOzq/psDI2usVfhXlrSS2vjxEnw3AitFtpLsosnxP7867XlrJS\nB0dHOKFYSntBdlplBARHMo6dP5hNdOWh4AXTQLmPU4cdqFq7xPgV7sFh3Ggq\nVQbelVT4X4X/vdMm9hSsnZ8tk5/EgHMcN0w/85hseNdu2RaiKqiLAuv6V3Bw\n0XRNZ4/4v+EcBYN3Ye7hKYOdYoOn8dChmjke2+eG3/DAdSY+Tqf469zm7RYB\nyntDymoYVQ13di16jcwPM6tsqgVqzTxs0wVr6BA6eUu7gFRmE4XzJLF2OWlW\nea/f45L+w/imgT7DrroLLV4nM5xLNt6DaIb8dHv/wgsgVxWNxT/VtrPByLxd\nsC/+9lCNDYbxLZa7UWtvoSqd7WXOYpKbJPP3Acrv4Mj7fNSZ9+lGPNecfXu7\nn1QG+g+xRSEnJnpSRqsJllEhQKetTb7kSsvY8oo8ntRBupSZD0lM2z+tpJ4k\nqfTrdjoJkWuxSGSTt/PbY006ksT/m1TdccwjmMRbdrKAvLW+aycieOz9fB71\ncZqOcjHEfDp6jayBo2FUBclG42wSPYPPC7kQl6XQlkB5QzvDdb7HP47bGqR0\nzfRL\r\n=L5+6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"3f72613a36b6f97555a0fa7481755cf8b6cce1a7","scripts":{"docs":"typedoc --tsconfig tsconfig.json --exclude test/**/*.ts","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","precompile":"tsc --version","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"obecny","email":"bobecny@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.4.0+x64 (darwin)","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.4.0","dependencies":{"@opentelemetry/context-base":"^0.12.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.1","mocha":"7.2.0","sinon":"9.0.3","codecov":"3.7.2","typedoc":"0.18.0","webpack":"4.44.1","ts-mocha":"7.0.0","ts-loader":"8.0.2","linkinator":"2.1.1","typescript":"3.9.7","@types/node":"14.0.27","karma-mocha":"2.0.1","@types/mocha":"8.0.2","@types/sinon":"9.0.5","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.12.0_1603112018695_0.0034870778909865674","host":"s3://npm-registry-packages"}},"0.12.1-alpha.7":{"name":"@opentelemetry/api","version":"0.12.1-alpha.7","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.12.1-alpha.7","maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"357b13ec909015d3392e7bb2c7ffc3533f30b385","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.12.1-alpha.7.tgz","fileCount":162,"integrity":"sha512-xLFhhKagU/3t80ge6CRGqazi0RbOdiJwENcHuh3X/v1ukZtE/NHTxf6lo9C4kO5PZxuaZu37oojRbIDz+NH1nQ==","signatures":[{"sig":"MEUCIGh9J8PPWWsN60IEDKNzCr1zE3iQ4thJxMWUmcKl2J/YAiEAs5UQWUv7/fz0e6kStMgjAu6QdxxLFMFAeIjSX01sxd4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":197511,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJflzuaCRA9TVsSAnZWagAA2OIP/RRdd8O8wwg7pTsCOUKB\nwgpxUDlS/+ATiPCYVX0pSMmuIOsQzn6xW+e3QRFM7d66beBCOMI6c2Wqc+tD\nUgGxcPhB0dblMTB9uihJFAawGEFILFszw1Mv1EMejGoVNbS/ek3R1wg7hqE2\nFLtTLd6jkG7f3NEa9JPUthhzb+ZsP+QR50WFyCNvgIPRgkTl56GWph8z/ICB\nFGT8yMlhS7gKyEUcjbYEDnrYCqKHVg8LsnzS98xyvaojUK/xTHcurwOlA7LW\nawowtxjAMklq6EB/Y3LOUq1mLh8U74U20mf0wSViLhx/0zJ1CQO+3SSBG+8B\nKZ+cjYS9ItwPZ8ke1xhRHIcoycfRfvNnYqZf6bkei/ePpwtKlf5jDmUJ9Epr\nSSbCzNoB9/478wvdSIZGD66aHvUzVkeL3jcM+x2viNhbv2WR/qG9UN7nrXkQ\nL5/hEFxiEvOHqdv+jMFYKWabcPHZ2Xp0wlW09gOCpZoRcplWeR6fG2gcjGT2\nsP5hcqDCZ8gv0QK18XP2HlbmzFvOaMqNDm7zaOGj3Q0j3HQX/nkM+pjPEF1R\nAtfWSYZ148xFW5PjGUbqqdJOAP4XLEANxawcFJAtCspx+sIb//wkfeekxWtS\nVYWtn6ROjQ/9YhL0pMjdmpU23hhCS8Im+ENBbUXBZEFLyC93rYHEzokim96e\n5hKl\r\n=mIt1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","readme":"# OpenTelemetry API for JavaScript\n\n[![Gitter chat][gitter-image]][gitter-url]\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nThis package provides everything needed to interact with the OpenTelemetry API, including all TypeScript interfaces, enums, and no-op implementations. It is intended for use both on the server and in the browser.\n\n## Quick Start\n\nTo get started you need to install the SDK and plugins, create a TracerProvider and/or MeterProvider, and register it with the API.\n\n### Install Dependencies\n\n```sh\n$ # Install tracing dependencies\n$ npm install \\\n @opentelemetry/api \\\n @opentelemetry/core \\\n @opentelemetry/node \\\n @opentelemetry/tracing \\\n @opentelemetry/exporter-jaeger \\ # add exporters as needed\n @opentelemetry/plugin-http # add plugins as needed\n\n$ # Install metrics dependencies\n$ npm install \\\n @opentelemetry/metrics \\\n @opentelemetry/exporter-prometheus # add exporters as needed\n```\n\n> Note: this example is for node.js. See [examples/tracer-web](https://github.com/open-telemetry/opentelemetry-js/tree/master/examples/tracer-web) for a browser example.\n\n### Initialize the SDK\n\nBefore any other module in your application is loaded, you must initialize the global tracer and meter providers. If you fail to initialize a provider, no-op implementations will be provided to any library which acquires them from the API.\n\nTo collect traces and metrics, you will have to tell the SDK where to export telemetry data to. This example uses Jaeger and Prometheus, but exporters exist for [other tracing backends][other-tracing-backends]. If you're not sure if there is an exporter for your tracing backend, contact your tracing provider.\n\n#### Tracing\n\n```javascript\nconst { NodeTracerProvider } = require(\"@opentelemetry/node\");\nconst { SimpleSpanProcessor } = require(\"@opentelemetry/tracing\");\nconst { JaegerExporter } = require(\"@opentelemetry/exporter-jaeger\");\n\nconst tracerProvider = new NodeTracerProvider();\n\n/**\n * The SimpleSpanProcessor does no batching and exports spans\n * immediately when they end. For most production use cases,\n * OpenTelemetry recommends use of the BatchSpanProcessor.\n */\ntracerProvider.addSpanProcessor(\n new SimpleSpanProcessor(\n new JaegerExporter({\n serviceName: 'my-service'\n })\n )\n);\n\n/**\n * Registering the provider with the API allows it to be discovered\n * and used by instrumentation libraries. The OpenTelemetry API provides\n * methods to set global SDK implementations, but the default SDK provides\n * a convenience method named `register` which registers same defaults\n * for you.\n *\n * By default the NodeTracerProvider uses Trace Context for propagation\n * and AsyncHooksScopeManager for context management. To learn about\n * customizing this behavior, see API Registration Options below.\n */\ntracerProvider.register();\n```\n\n#### Metrics\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\nconst { MeterProvider } = require(\"@opentelemetry/metrics\");\nconst { PrometheusExporter } = require(\"@opentelemetry/exporter-prometheus\");\n\nconst meterProvider = new MeterProvider({\n // The Prometheus exporter runs an HTTP server which\n // the Prometheus backend scrapes to collect metrics.\n exporter: new PrometheusExporter({ startServer: true }),\n interval: 1000,\n});\n\n/**\n * Registering the provider with the API allows it to be discovered\n * and used by instrumentation libraries.\n */\napi.metrics.setGlobalMeterProvider(meterProvider);\n```\n\n## Version Compatibility\n\nBecause the npm installer and node module resolution algorithm could potentially allow two or more copies of any given package to exist within the same `node_modules` structure, the OpenTelemetry API takes advantage of a variable on the `global` object to store the global API. When an API method in the API package is called, it checks if this `global` API exists and proxies calls to it if and only if it is a compatible API version. This means if a package has a dependency on an OpenTelemetry API version which is not compatible with the API used by the end user, the package will receive a no-op implementation of the API.\n\n## Advanced Use\n\n### API Registration Options\n\nIf you prefer to choose your own propagator or context manager, you may pass an options object into the `tracerProvider.register()` method. Omitted or `undefined` options will be replaced by a default value and `null` values will be skipped.\n\n```javascript\nconst { B3Propagator } = require(\"@opentelemetry/propagator-b3\");\n\ntracerProvider.register({\n // Use B3 Propagation\n propagator: new B3Propagator(),\n\n // Skip registering a default context manager\n contextManager: null,\n});\n```\n\n### API Methods\n\nIf you are writing an instrumentation library, or prefer to call the API methods directly rather than using the `register` method on the Tracer/Meter Provider, OpenTelemetry provides direct access to the underlying API methods through the `@opentelemetry/api` package. API entry points are defined as global singleton objects `trace`, `metrics`, `propagation`, and `context` which contain methods used to initialize SDK implementations and acquire resources from the API.\n\n- [Trace API Documentation][trace-api-docs]\n- [Metrics API Documentation][metrics-api-docs]\n- [Propagation API Documentation][propagation-api-docs]\n- [Context API Documentation][context-api-docs]\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\n/* Initialize TracerProvider */\napi.trace.setGlobalTracerProvider(tracerProvider);\n/* returns tracerProvider (no-op if a working provider has not been initialized) */\napi.trace.getTracerProvider();\n/* returns a tracer from the registered global tracer provider (no-op if a working provider has not been initialized) */\napi.trace.getTracer(name, version);\n\n/* Initialize MeterProvider */\napi.metrics.setGlobalMeterProvider(meterProvider);\n/* returns meterProvider (no-op if a working provider has not been initialized) */\napi.metrics.getMeterProvider();\n/* returns a meter from the registered global meter provider (no-op if a working provider has not been initialized) */\napi.metrics.getMeter(name, version);\n\n/* Initialize Propagator */\napi.propagation.setGlobalPropagator(httpTraceContextPropagator);\n\n/* Initialize Context Manager */\napi.context.setGlobalContextManager(asyncHooksContextManager);\n```\n\n### Library Authors\n\nLibrary authors need only to depend on the `@opentelemetry/api` package and trust that the application owners which use their library will initialize an appropriate SDK.\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\nconst tracer = api.trace.getTracer(\"my-library-name\", \"0.2.3\");\n\nasync function doSomething() {\n const span = tracer.startSpan(\"doSomething\", { parent: tracer.getCurrentSpan() });\n try {\n const result = await doSomethingElse();\n span.end();\n return result;\n } catch (err) {\n span.setStatus({\n // use an appropriate status code here\n code: api.CanonicalCode.INTERNAL,\n message: err.message,\n });\n span.end();\n return null;\n }\n}\n```\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: \n- For more about OpenTelemetry JavaScript: \n- For help or feedback on this project, join us on [gitter][gitter-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[gitter-image]: https://badges.gitter.im/open-telemetry/opentelemetry-js.svg\n[gitter-url]: https://gitter.im/open-telemetry/opentelemetry-node?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/master/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/status.svg?path=packages/opentelemetry-api\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api\n[devDependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/dev-status.svg?path=packages/opentelemetry-api\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/api\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fapi.svg\n\n[trace-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/traceapi.html\n[metrics-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/metricsapi.html\n[propagation-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/propagationapi.html\n[context-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/contextapi.html\n\n[web]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-web\n[tracing]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-tracing\n[node]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-node\n[metrics]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-metrics\n\n[other-tracing-backends]: https://github.com/open-telemetry/opentelemetry-js#trace-exporters\n","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"46f31dd2285d55d239195032528c3dab1bf0e15c","scripts":{"docs":"typedoc --tsconfig tsconfig.json --exclude test/**/*.ts","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","precompile":"tsc --version","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.13.1+x64 (linux)","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.13.1","dependencies":{"@opentelemetry/context-base":"^0.12.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.1","mocha":"7.2.0","sinon":"9.0.3","codecov":"3.7.2","typedoc":"0.18.0","webpack":"4.44.1","ts-mocha":"7.0.0","ts-loader":"8.0.2","linkinator":"2.1.1","typescript":"3.9.7","@types/node":"14.0.27","karma-mocha":"2.0.1","@types/mocha":"8.0.2","@types/sinon":"9.0.5","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.12.1-alpha.7_1603746714071_0.8105941440020468","host":"s3://npm-registry-packages"}},"0.13.0":{"name":"@opentelemetry/api","version":"0.13.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.13.0","maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"aa240199e9a1e5dabc55f4de877fb5203a8b6ad6","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.13.0.tgz","fileCount":162,"integrity":"sha512-3F5zuMBhL1cQIGTFGuuGofS9/2bfhoJxT9sWLfHtx7A/vN6HSA6YiotPjWFK/aTiLjZA4YYnIjeA3di151xJrw==","signatures":[{"sig":"MEUCIQDR2kfW0fEWmm3qrGNbFB3NK+MJw7s9mfOHaq8EvV5qggIgU6tUQBm2iTk+zzwPU4n4FAiw1TPyaK0huN4FxHBCFIs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":188647,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyql2CRA9TVsSAnZWagAA+PgP/1g9a75+CinziQ9JtgHE\nbo5RjDvMv2P6eneUU9y20G2+TQlj2sfKzY/obWojGYqIju3YUol5Jsz852iA\n1Am0b+Vqr4Ug1UTyHEg61wpT/4UwqdpK0PabfJrdSrl139JFai8HCSqV3zpg\nWcslVc5VMxhSv6aCXHq+FZsRf0MJBI5lqegtWzXgDGTJljIV35RIMcvSkSBH\n48STeP2rHTsVFq52qgsWkPSfNqGYeAz6/UDdB5f3dFjog7EbagadrvguhSb2\nviqfDK5/Ymmm9I89ZDj+kcf+bWqUmjl2sgBrCpH7wtsQ7pJcBDGlUzAwfhPk\nhWM89JFQe0TOKqEzg08IK7je8azzCuocnS51H94uLMLwODQ5e0kZ4TuZYkbM\nYONuAqcZYk9uhkYZRh3HDsb+d8KP5rlZz8ICikOvCfnGl5Nm7/Jn+r7nZrge\n4HyYYKQmvVA/csNTCUpFRby1VT0SuQ9cZXRSJ6i6bIDZAH0frOt3+XRl+Twc\nA7CcBCaxw2TImfu4r4PA66k4yyrEOJiCWXjIHQYXMWLyL8xkWk/p1MjbXldH\n+j07rSB+qCt1RD4JFfaxoBUCmvnuMcCaGWa5hvQPS3GdRmvcl5ZjF1soOTtw\nwiOZoDgQD2vWok0Ya+PF3bx5PVqtYrTjgTtOT6gcdf+BaUTVnPfDKAvNNMou\nbIv/\r\n=q6eL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"86cbd6798f9318c5920f9d9055f289a1c3f26500","scripts":{"docs":"typedoc --tsconfig tsconfig.json --exclude test/**/*.ts","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","precompile":"tsc --version","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.8.0","dependencies":{"@opentelemetry/context-base":"^0.13.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.1","codecov":"3.8.1","typedoc":"0.19.2","webpack":"4.44.2","ts-mocha":"8.0.0","ts-loader":"8.0.11","linkinator":"2.4.0","typescript":"3.9.7","@types/node":"14.14.10","karma-mocha":"2.0.1","@types/mocha":"8.0.4","@types/sinon":"9.0.9","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.13.0_1607117173429_0.8794372073775254","host":"s3://npm-registry-packages"}},"0.14.0":{"name":"@opentelemetry/api","version":"0.14.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.14.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"4e17d8d2f1da72b19374efa7b6526aa001267cae","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.14.0.tgz","fileCount":159,"integrity":"sha512-L7RMuZr5LzMmZiQSQDy9O1jo0q+DaLy6XpYJfIGfYSfoJA5qzYwUP3sP1uMIQ549DvxAgM3ng85EaPTM/hUHwQ==","signatures":[{"sig":"MEUCIAo3GkQRDwbll5hETnOF/PA1LVPI8tQuE0syReKfNu8/AiEAkL7A1vC8KJsx/8Fu0KnoPTov6aGQPYvfMnIoUtSoA5Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":185200,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf28UdCRA9TVsSAnZWagAAb80P/jr1fTQ/NvU78kO7nX/c\nzyItXc1bWPusKj8IDJ5VB+5Gz++BCLdJSSZvTyPsQxpgdWRrVFTh974MwLDL\nWqRLHZl+oW0qt70QiezoyU/91dnBxmvVqfoLHwlbRFGfJaJn8fRu5VQbTp2Y\n/jfV5/WMiego43UxU72JuqgUADjP/hABrKSK/f3eYlrkMGohg/zHAxbRzXdm\njEpwsTl0Fo0NZOvjZcmtOw8xZJAhYgqK0xT8lVdXdrps3qrFFoFD8+oObmE9\ntzIUxNFDRC6FbPZdqPbEQCw26OuuhqgN6k1Y061fWIVv+fWmz4EsiSHDocvR\nzgU90YeZjQek9OmAnLdopTYNT6Vx7mU8WR+aUcVV/YcB3PcIm/1PORjsU0Kk\nC/E601zMppQ0sQd2YzoYWInlQM4Qz/c3Te8Se2UDsHBmm3XKh3qqFzkqH319\nPGgOsvkYkYFuvOA34CuHk2GE6aH7NEdg8V0qTcbGGR8DTn3/TM1qmZH+w1An\ndTZa5PcWBfmR8hvttr5FkyOITPyVvdUN6N5PskDz6eg3CIQn04hXsBizzXPc\n+sN5tat6BlmNbJMVY77NBPox5Fnr8OfWC7yrXrYbYHeNaodCzIepHq8CoSyG\n5COOJIAKvsOKuzWtQ0ifvKt95yPWO8JKIqxsvanu29NzC+atg4mJwYyAAqdi\n6P2i\r\n=WDpF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"27a8d4530c56257c191468b073669909bf8892a1","scripts":{"docs":"typedoc --tsconfig tsconfig.json --exclude test/**/*.ts","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","precompile":"tsc --version","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.8.0","dependencies":{"@opentelemetry/context-base":"^0.14.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.2","codecov":"3.8.1","typedoc":"0.19.2","webpack":"4.44.2","ts-mocha":"8.0.0","ts-loader":"8.0.12","linkinator":"2.8.0","typescript":"3.9.7","@types/node":"14.14.12","karma-mocha":"2.0.1","@types/mocha":"8.2.0","@types/sinon":"9.0.9","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.14.0_1608238365366_0.4980243247449234","host":"s3://npm-registry-packages"}},"0.15.0":{"name":"@opentelemetry/api","version":"0.15.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.15.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"0324a96e70e7a8122dc6ec814ce796535c8d9123","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.15.0.tgz","fileCount":129,"integrity":"sha512-tPyzyO8P33wWUlUdo8+NawX2qnn8HyVUAilANWLxrT9C6g4JbN6eatSQrx3G0NzohnobT3fiwrbVFNeacWS9gg==","signatures":[{"sig":"MEQCIDI4yV2H9JgDXeT8oKaBZmpdpo3bM6ZZtOK0f71NW8nRAiBMG2NNSSOCeLshNDRd57TqQcMB198MQMjms1kcW/OKMw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":139828,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCf4JCRA9TVsSAnZWagAA3h8P/A23XXCCrMBM298yDeEW\nvi1Qjiu0rJqmzPo9AJuhufFr5VTDmb6kgM8rXeF11sdo9EI4T8NkNFc0IByz\nhwErBFwr7Nx4Y12FwAzStZ194Vq+bc61A5R4EP7UyUMJR775CBFmoghDeN5X\nIJ8yuZeS4eW9maZ5W5Ws/6jaXk6Cr9czW6aIs96IGv3vhcawTILU9WiD+UOh\n+g/EqRk+aN/+NNpX6Vr6sM4eHSJUBeXTJ1uOTVAI4OKvsE3aGs0Cbo3MOcia\nN/kTjguEJ0UHVkYs2khGfnngkItN7er6BAprBJRoWL/O6sCruIu/jZthZNcZ\nL5OGiE7/j3in9d4ckuwdBDBvyEGse1n4PuVX+yPk2T4u+RrsCYwLSz1ARLWI\nj2qrrzXtShVJprB14rtGou3x8DxG7B6sTupuU4kuKb1xzne8Uxobk1PgXUFs\nWS71PsmKKCjkQJPdfHo8vWnEEhInz5Se+kqCdJ4cJjjITelngs4um0URNLed\noYClgjHJBiRTqL9fJ6/ZXXTE9oWntI5uefZCBnBLQi31e7qnc6QDfXH0IlCG\nljgZhyYglP9raLW4y5qjv9RoBXBDsbmCZztYQXtJq4x0Zxr5HPdUKSszFx3W\nNlDfOueE2o9fng/ERGvwU75lATmtqpeB0uc30jiXyZQa/yagDOD3BRvZRhm9\nz2Q/\r\n=YR28\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"960b868f5b7686eabbf49190071b8463551e5d8f","scripts":{"docs":"typedoc --tsconfig tsconfig.docs.json","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.8.0","dependencies":{"@opentelemetry/context-base":"^0.15.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.3","codecov":"3.8.1","typedoc":"0.20.14","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.14","linkinator":"2.13.1","typescript":"3.9.7","@types/node":"14.14.20","karma-mocha":"2.0.1","@types/mocha":"8.2.0","@types/sinon":"9.0.10","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.15.0_1611267593175_0.22205822190881386","host":"s3://npm-registry-packages"}},"0.16.0":{"name":"@opentelemetry/api","version":"0.16.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.16.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"bd89460626013fc2cc7702e51ebd537ee84350e9","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.16.0.tgz","fileCount":159,"integrity":"sha512-y5mNFAiktm7Zyf0GrQ6kjsRqace/WCXk9gMo/sOOna4TtMW8NaZgJceKrsQZl3qiPY9Upu8O9VvdlETXDx4U5A==","signatures":[{"sig":"MEUCIAnfPzforrvanJnpPbpgIEQr7lWiELI5RtGiltDkCIeDAiEAjq+T2JKS3n5N2ImZXCtdCUCyHe1OyUrx0QLFW/7ILQQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":179147,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGIGsCRA9TVsSAnZWagAA3QsQAKCkC6PFt8+gZZxrFufu\nafrvEa4a5bunq6n1NAYdQFjTE7ftA/oSpZ9xsXIIH37IoyRTKMFy01h5IBJ1\n8tySzAfLLH3CI/uXHXBJhe1HD0TwDN6PnGrkfoLt/MVEVzWuoWJnIcscqlUL\nI3RWJQLV1bX8ZyDUni/j5/LNisutO65nST+iNMzjCq5yXMRlVg50jBwaJ9NK\ngIRbK35PRmtpABdR+tX/dnURbzknpaP6CbFKC+taZO63jIublvvc08u+z8h8\npZ84PVGdow+QLQ430MrFUThFQpLqGgo3yGAvbnbH2W6H0DN+2byQx3pmzpWr\nB9QnOJOuFhvD9kzL7+a5Zqsf983ZAhm6HvKWWuKZC5g1WffeUSHuOKhuuJqw\n6rHk3aR6CnflcbnyR06hvWRoVNtqSs1KzWjZqV728ItcwAooiAilYiXAFRpj\nMjAo504ZkiDsMJXANdh+zIgUxoRnTUqu7yTDi0uCYTTJ8nGQ1r5XHfQSEozL\nf7yZZO0OVePO9xWMBbtsTS46fs6zYf6PwAbGlFac1rgrRKY5nARD1MDGNw4q\nsL9GeqL14GMInx/fAsBJWvwA8/HcEH04tqf+ZQWUAKfEI9t/urPSPTvEVdry\nzrG46z9Lhu7FZmemesTJ+aLqPPxRMWP4LW0NRp17JUhWtixQRrB23lcr2IsV\nFDOD\r\n=KbLu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"e68863f8e63854b08ad13fb54677294ac6d6b681","scripts":{"docs":"typedoc --tsconfig tsconfig.docs.json","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"obecny","email":"bobecny@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"12.19.0","dependencies":{"@opentelemetry/context-base":"^0.16.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.3","codecov":"3.8.1","typedoc":"0.20.14","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.14","linkinator":"2.13.1","typescript":"3.9.7","@types/node":"14.14.20","karma-mocha":"2.0.1","@types/mocha":"8.2.0","@types/sinon":"9.0.10","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.16.0_1612218795886_0.14795342189967542","host":"s3://npm-registry-packages"}},"0.16.1-alpha.11":{"name":"@opentelemetry/api","version":"0.16.1-alpha.11","keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.16.1-alpha.11","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"e116412ec8d045bf801a96a9c79a4c4afe0352ce","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.16.1-alpha.11.tgz","fileCount":138,"integrity":"sha512-u/p/eO+YsDxBSWTMEywSDYGcs95tRfhr6gI0HEfyJPUA0LIv6bImDuoKiyrslPkslh+AM+GrPPho2BXovkZWvg==","signatures":[{"sig":"MEUCIFky5+tX1bSHtiGYShIUn9w+BtSboEumMhaTVbDm3kSZAiEAqkhDgFidNsF6P6zn0wCyu0NFCDrqJSL2PE+6cuo0fC4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":150875,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIWQnCRA9TVsSAnZWagAARjcP/ijH1s2SL+zIXkbU8H4n\nwNqcNJLs/Vh7Qs549nnhHjpibMvKG12IuyCdTVEnmWjKG6YA89f229nJ1tsM\n5s9ZI+Jy6wMZUB1uZ925E+KObbiThEuAPLH61yjYoNHpm6hAS7TyKapvDV3L\nETM4AbM52eGpBha/PmWKcNW802Iuak9K9QCOKI/zYwE+whLpR1wPbb6nMwsV\nVnDe3KPmmnkvFsyLaZzEMr6P3N/lnPkxnbDh52jpCQ8lZhTHx8AVCVMEoOf8\neqNeRZbUX44qd/Emei2FAL349j9ugEciqYmPmEmWfwgQQtJcznYNnA88rWJ1\nLBtElJ68iqronCvsFsBVEHgfxuRgeUvSpUZe3nqyVyegz6UAh0WrAEmpqbs+\nIaK0htmnoP3ChlzUOcb++hhUYLiMUlgH9ChaJtL3do0fUoRP2ha07OV/5YnK\n677uxzB2iL0NvyWjaAiliphIzwDpuMxrrb32oiaslGhp0C/buHTRSJ2p4lYj\nHW/AZ8eTuNZwzipCX0JShL3In+gvBCKQl3VdQi7dW4wXh/CN5KFr1ooTo83c\nVjPe5fzjtcTphriJSxxvOxdHxXdoN9GQ5M2mNZj1D29GVDUUlxMQOzmT5KY6\nbjOWScoCnLf9ISsh1EchnYZnp2YHka/vMGHPEvX8bcTe0lT827PXb2u93E0x\nDuC9\r\n=dNXg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","readme":"# OpenTelemetry API for JavaScript\n\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nThis package provides everything needed to interact with the OpenTelemetry API, including all TypeScript interfaces, enums, and no-op implementations. It is intended for use both on the server and in the browser.\n\n## Quick Start\n\nTo get started you need to install the SDK and plugins, create a TracerProvider, and register it with the API.\n\n### Install Dependencies\n\n```sh\n$ # Install tracing dependencies\n$ npm install \\\n @opentelemetry/api \\\n @opentelemetry/core \\\n @opentelemetry/node \\\n @opentelemetry/tracing \\\n @opentelemetry/exporter-jaeger \\ # add exporters as needed\n @opentelemetry/plugin-http # add plugins as needed\n```\n\n> Note: this example is for node.js. See [examples/tracer-web](https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/tracer-web) for a browser example.\n\n### Initialize the SDK\n\nBefore any other module in your application is loaded, you must initialize the global tracer and meter providers. If you fail to initialize a provider, no-op implementations will be provided to any library which acquires them from the API.\n\nTo collect traces and metrics, you will have to tell the SDK where to export telemetry data to. This example uses Jaeger and Prometheus, but exporters exist for [other tracing backends][other-tracing-backends]. If you're not sure if there is an exporter for your tracing backend, contact your tracing provider.\n\n#### Tracing\n\n```javascript\nconst { NodeTracerProvider } = require(\"@opentelemetry/node\");\nconst { SimpleSpanProcessor } = require(\"@opentelemetry/tracing\");\nconst { JaegerExporter } = require(\"@opentelemetry/exporter-jaeger\");\n\nconst tracerProvider = new NodeTracerProvider();\n\n/**\n * The SimpleSpanProcessor does no batching and exports spans\n * immediately when they end. For most production use cases,\n * OpenTelemetry recommends use of the BatchSpanProcessor.\n */\ntracerProvider.addSpanProcessor(\n new SimpleSpanProcessor(\n new JaegerExporter({\n serviceName: 'my-service'\n })\n )\n);\n\n/**\n * Registering the provider with the API allows it to be discovered\n * and used by instrumentation libraries. The OpenTelemetry API provides\n * methods to set global SDK implementations, but the default SDK provides\n * a convenience method named `register` which registers same defaults\n * for you.\n *\n * By default the NodeTracerProvider uses Trace Context for propagation\n * and AsyncHooksScopeManager for context management. To learn about\n * customizing this behavior, see API Registration Options below.\n */\ntracerProvider.register();\n```\n\n## Version Compatibility\n\nBecause the npm installer and node module resolution algorithm could potentially allow two or more copies of any given package to exist within the same `node_modules` structure, the OpenTelemetry API takes advantage of a variable on the `global` object to store the global API. When an API method in the API package is called, it checks if this `global` API exists and proxies calls to it if and only if it is a compatible API version. This means if a package has a dependency on an OpenTelemetry API version which is not compatible with the API used by the end user, the package will receive a no-op implementation of the API.\n\n## Advanced Use\n\n### API Registration Options\n\nIf you prefer to choose your own propagator or context manager, you may pass an options object into the `tracerProvider.register()` method. Omitted or `undefined` options will be replaced by a default value and `null` values will be skipped.\n\n```javascript\nconst { B3Propagator } = require(\"@opentelemetry/propagator-b3\");\n\ntracerProvider.register({\n // Use B3 Propagation\n propagator: new B3Propagator(),\n\n // Skip registering a default context manager\n contextManager: null,\n});\n```\n\n### API Methods\n\nIf you are writing an instrumentation library, or prefer to call the API methods directly rather than using the `register` method on the Tracer/Meter Provider, OpenTelemetry provides direct access to the underlying API methods through the `@opentelemetry/api` package. API entry points are defined as global singleton objects `trace`, `metrics`, `propagation`, and `context` which contain methods used to initialize SDK implementations and acquire resources from the API.\n\n- [Trace API Documentation][trace-api-docs]\n- [Propagation API Documentation][propagation-api-docs]\n- [Context API Documentation][context-api-docs]\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\n/* Initialize TracerProvider */\napi.trace.setGlobalTracerProvider(tracerProvider);\n/* returns tracerProvider (no-op if a working provider has not been initialized) */\napi.trace.getTracerProvider();\n/* returns a tracer from the registered global tracer provider (no-op if a working provider has not been initialized) */\napi.trace.getTracer(name, version);\n\n/* Initialize Propagator */\napi.propagation.setGlobalPropagator(httpTraceContextPropagator);\n\n/* Initialize Context Manager */\napi.context.setGlobalContextManager(asyncHooksContextManager);\n```\n\n### Library Authors\n\nLibrary authors need only to depend on the `@opentelemetry/api` package and trust that the application owners which use their library will initialize an appropriate SDK.\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\nconst tracer = api.trace.getTracer(\"my-library-name\", \"0.2.3\");\n\nasync function doSomething() {\n const span = tracer.startSpan(\"doSomething\");\n try {\n const result = await doSomethingElse();\n span.end();\n return result;\n } catch (err) {\n span.setStatus({\n // use an appropriate status code here\n code: api.SpanStatusCode.ERROR,\n message: err.message,\n });\n span.end();\n return null;\n }\n}\n```\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: \n- For more about OpenTelemetry JavaScript: \n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/status.svg?path=packages/opentelemetry-api\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api\n[devDependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/dev-status.svg?path=packages/opentelemetry-api\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/api\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fapi.svg\n\n[trace-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/traceapi.html\n[metrics-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/metricsapi.html\n[propagation-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/propagationapi.html\n[context-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/contextapi.html\n\n[web]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-web\n[tracing]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-tracing\n[node]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-node\n[metrics]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-metrics\n\n[other-tracing-backends]: https://github.com/open-telemetry/opentelemetry-js#trace-exporters\n","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"70a128ff5dca16060ca7c2cff943369ae9999c34","scripts":{"docs":"typedoc --tsconfig tsconfig.docs.json","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (linux)","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.15.4","dependencies":{"@opentelemetry/context-base":"^0.16.1-alpha.11+70a128ff"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.3","codecov":"3.8.1","typedoc":"0.20.14","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.14","linkinator":"2.13.1","typescript":"4.1.3","@types/node":"14.14.20","karma-mocha":"2.0.1","@types/mocha":"8.2.0","@types/sinon":"9.0.10","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.16.1-alpha.11_1612801062958_0.7690074916494376","host":"s3://npm-registry-packages"}},"0.16.1-alpha.14":{"name":"@opentelemetry/api","version":"0.16.1-alpha.14","keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.16.1-alpha.14","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"d8e1c859d1180d18f9212f8a77674d81fcf4f0fe","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.16.1-alpha.14.tgz","fileCount":138,"integrity":"sha512-l3ep4BREUC9/cfsEMSiVknlTvDsWjDmVgJYQu0jOmwiWVP0OP79qeTNCPY+R4DCqaYR+7mWVuz2VeeWEkIdUIg==","signatures":[{"sig":"MEQCIE+RR3wXvSbjTZNn1uQG/UW5jA4LNTraoFFhsPdioWA8AiA+3EACYktCPeIYOmU03YKcVW4ybGbBr+ILUS9fjhHNww==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":150678,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJARaCRA9TVsSAnZWagAA//UP/jykii1ZFoCmxKUeR3+b\nbAQhVPYT/9lzb/R+27+zpmnLk0g23uotQSAC3V8VVCDVCGe8LiBUXerkhmgt\nxjR5E0HhzZ7VGVvGlJ2fQ4kZtbUuLw2aM/LyoYIaj0IN6dq9PXuAwOkHqh0i\n9N9Ruo9BOc+/8giyUoxk50UX6WxqvdOGNZs/UWlL+diKu9jwzuG0utVVdzhQ\nKdFySF53Ro81Pa0d9ZNC7B1tC//LguxkyKl0e5qyghypLBwHPD44ADHYOxE4\nA1pj/vLjQogEmiRywY26YSsENZY22xflRNoSAE4AcaLgqHtNq0QHGkwNDg6W\ntk58VYYYXYQvbJ2gWITAmHbCnrO/DyXQj0hfijTM87edmHw0aJ67NeeYXBYI\nCVY5vC7yP68mei6BReBhsY4YyghnGh4P7W5t0YFRtx0635w33AQWt58eH50u\nq7fHjJN6/KixhDEkqAQviduHMzec7/hldAJGT+P4r6dguf6CnDkeE2zXxHVV\nfWxqRI5ztBWRQQBZZOEgaDVYRjs5o5cbv6/icWKnnbMUiM5lycODev5otgLk\nJyKQVbFba/PnhzNbMz3I0X578HHDJnk1XChMeum2WTGQkTqGGAhztQ/Qq9FL\nHACRoMBWKhgbKPJVchqBsW6njg/73ezmsFqAvgBMaKfBWoJCPHkW/6LOvB1T\ndr08\r\n=06sS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","readme":"# OpenTelemetry API for JavaScript\n\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nThis package provides everything needed to interact with the OpenTelemetry API, including all TypeScript interfaces, enums, and no-op implementations. It is intended for use both on the server and in the browser.\n\n## Quick Start\n\nTo get started you need to install the SDK and plugins, create a TracerProvider, and register it with the API.\n\n### Install Dependencies\n\n```sh\n$ # Install tracing dependencies\n$ npm install \\\n @opentelemetry/api \\\n @opentelemetry/core \\\n @opentelemetry/node \\\n @opentelemetry/tracing \\\n @opentelemetry/exporter-jaeger \\ # add exporters as needed\n @opentelemetry/plugin-http # add plugins as needed\n```\n\n> Note: this example is for node.js. See [examples/tracer-web](https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/tracer-web) for a browser example.\n\n### Initialize the SDK\n\nBefore any other module in your application is loaded, you must initialize the global tracer and meter providers. If you fail to initialize a provider, no-op implementations will be provided to any library which acquires them from the API.\n\nTo collect traces and metrics, you will have to tell the SDK where to export telemetry data to. This example uses Jaeger and Prometheus, but exporters exist for [other tracing backends][other-tracing-backends]. If you're not sure if there is an exporter for your tracing backend, contact your tracing provider.\n\n#### Tracing\n\n```javascript\nconst { NodeTracerProvider } = require(\"@opentelemetry/node\");\nconst { SimpleSpanProcessor } = require(\"@opentelemetry/tracing\");\nconst { JaegerExporter } = require(\"@opentelemetry/exporter-jaeger\");\n\nconst tracerProvider = new NodeTracerProvider();\n\n/**\n * The SimpleSpanProcessor does no batching and exports spans\n * immediately when they end. For most production use cases,\n * OpenTelemetry recommends use of the BatchSpanProcessor.\n */\ntracerProvider.addSpanProcessor(\n new SimpleSpanProcessor(\n new JaegerExporter({\n serviceName: 'my-service'\n })\n )\n);\n\n/**\n * Registering the provider with the API allows it to be discovered\n * and used by instrumentation libraries. The OpenTelemetry API provides\n * methods to set global SDK implementations, but the default SDK provides\n * a convenience method named `register` which registers same defaults\n * for you.\n *\n * By default the NodeTracerProvider uses Trace Context for propagation\n * and AsyncHooksScopeManager for context management. To learn about\n * customizing this behavior, see API Registration Options below.\n */\ntracerProvider.register();\n```\n\n## Version Compatibility\n\nBecause the npm installer and node module resolution algorithm could potentially allow two or more copies of any given package to exist within the same `node_modules` structure, the OpenTelemetry API takes advantage of a variable on the `global` object to store the global API. When an API method in the API package is called, it checks if this `global` API exists and proxies calls to it if and only if it is a compatible API version. This means if a package has a dependency on an OpenTelemetry API version which is not compatible with the API used by the end user, the package will receive a no-op implementation of the API.\n\n## Advanced Use\n\n### API Registration Options\n\nIf you prefer to choose your own propagator or context manager, you may pass an options object into the `tracerProvider.register()` method. Omitted or `undefined` options will be replaced by a default value and `null` values will be skipped.\n\n```javascript\nconst { B3Propagator } = require(\"@opentelemetry/propagator-b3\");\n\ntracerProvider.register({\n // Use B3 Propagation\n propagator: new B3Propagator(),\n\n // Skip registering a default context manager\n contextManager: null,\n});\n```\n\n### API Methods\n\nIf you are writing an instrumentation library, or prefer to call the API methods directly rather than using the `register` method on the Tracer/Meter Provider, OpenTelemetry provides direct access to the underlying API methods through the `@opentelemetry/api` package. API entry points are defined as global singleton objects `trace`, `metrics`, `propagation`, and `context` which contain methods used to initialize SDK implementations and acquire resources from the API.\n\n- [Trace API Documentation][trace-api-docs]\n- [Propagation API Documentation][propagation-api-docs]\n- [Context API Documentation][context-api-docs]\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\n/* Initialize TracerProvider */\napi.trace.setGlobalTracerProvider(tracerProvider);\n/* returns tracerProvider (no-op if a working provider has not been initialized) */\napi.trace.getTracerProvider();\n/* returns a tracer from the registered global tracer provider (no-op if a working provider has not been initialized) */\napi.trace.getTracer(name, version);\n\n/* Initialize Propagator */\napi.propagation.setGlobalPropagator(httpTraceContextPropagator);\n\n/* Initialize Context Manager */\napi.context.setGlobalContextManager(asyncHooksContextManager);\n```\n\n### Library Authors\n\nLibrary authors need only to depend on the `@opentelemetry/api` package and trust that the application owners which use their library will initialize an appropriate SDK.\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\nconst tracer = api.trace.getTracer(\"my-library-name\", \"0.2.3\");\n\nasync function doSomething() {\n const span = tracer.startSpan(\"doSomething\");\n try {\n const result = await doSomethingElse();\n span.end();\n return result;\n } catch (err) {\n span.setStatus({\n // use an appropriate status code here\n code: api.SpanStatusCode.ERROR,\n message: err.message,\n });\n span.end();\n return null;\n }\n}\n```\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: \n- For more about OpenTelemetry JavaScript: \n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/status.svg?path=packages/opentelemetry-api\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api\n[devDependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/dev-status.svg?path=packages/opentelemetry-api\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/api\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fapi.svg\n\n[trace-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/traceapi.html\n[metrics-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/metricsapi.html\n[propagation-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/propagationapi.html\n[context-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/contextapi.html\n\n[web]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-web\n[tracing]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-tracing\n[node]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-node\n[metrics]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-metrics\n\n[other-tracing-backends]: https://github.com/open-telemetry/opentelemetry-js#trace-exporters\n","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"000a8ac099a3848a9a3c66f4bdd4826b4cff987a","scripts":{"docs":"typedoc --tsconfig tsconfig.docs.json","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (linux)","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.15.4","dependencies":{"@opentelemetry/context-base":"^0.16.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.3","codecov":"3.8.1","typedoc":"0.20.14","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.14","linkinator":"2.13.1","typescript":"4.1.3","@types/node":"14.14.20","karma-mocha":"2.0.1","@types/mocha":"8.2.0","@types/sinon":"9.0.10","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.16.1-alpha.14_1612973146062_0.07723915647786939","host":"s3://npm-registry-packages"}},"0.16.1-alpha.15":{"name":"@opentelemetry/api","version":"0.16.1-alpha.15","keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.16.1-alpha.15","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"817efd61296c2d4c1d7050c496826a99524166f7","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.16.1-alpha.15.tgz","fileCount":150,"integrity":"sha512-Hl0wWKQDGyAcZBPsyVwh2MA2cUTQifrZtaEzw/ba+wA7/eys5ZwtPA3Un8EIWaS69zOfUPM2TP56PnGbLLvWyg==","signatures":[{"sig":"MEYCIQCt0YVMMuUKbcwW5ZR0TIlSt3YAsLS1fM+ro8ZjOtKaHgIhAOjOtVNvOPJoUHb2pMnSphTUv2f4CQum32iS6Olqg95w","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":182639,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJFuSCRA9TVsSAnZWagAAZjQP/0cfkwd+5UnoBHOjwxuc\nDph7bPNFeiqjGv29Ai+pVTrR6GT7ZRyQNTPoVTEqm3h+ImbZbYUcBsYgK7DJ\nergYfn+fVe7yByeHGXcyRd4xJqRrINaOyH3DqhXMU8dpAYjLzl+VoKrUjPiE\nyBjiGmsurJ5ZSiGdruloL8fd/+YYX9j84toub92LssqW1h1mFO3m2GKCKx6o\nwS3ALftArk+JBQfuxJFh0chAYbKdhKt31KIX4nTQdAxOwjSQmbC/b5r/QZkP\noOWd61xbfMGXZQ/tGBtQH5ICLjZHTRhi23JSIzFedG9G64PcZf+N54wuEiqC\naPLAvfhb3HDVY8LtsJTlbP5KyImOaBbfJm0IL6PyyyimRJSYTaYb6sscmb6+\n0kdJM07FbarCLLSK+TQkogFhfVXBptDA+gbBXLTn4JPV5S+5yvgCEAMpL2IU\n8HQRCxtge0nWItz3h0zQ/Fbfc8g3Wsf1WSIBgvegptT2i9DLJAjHTHaQkfuX\n5RmyzHeZs3CcuXP7T743tFKzho9n30M2IxoFkWgxwZmoso69TkYLrgUb0Uen\nk6WQVi1ZEW9fe8zIopbubPa0qxrKUAA0yAPelKyrlhrEcioBrrt0XEQGCpET\ne7Jox5Jc2uooGS4eosGnkgff74Ge5TLVipUlgkCtAW7NU5tQ8v+Ly9WOJAtG\nIQZx\r\n=/hDr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","readme":"# OpenTelemetry API for JavaScript\n\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nThis package provides everything needed to interact with the OpenTelemetry API, including all TypeScript interfaces, enums, and no-op implementations. It is intended for use both on the server and in the browser.\n\n## Quick Start\n\nTo get started you need to install the SDK and plugins, create a TracerProvider, and register it with the API.\n\n### Install Dependencies\n\n```sh\n$ # Install tracing dependencies\n$ npm install \\\n @opentelemetry/api \\\n @opentelemetry/core \\\n @opentelemetry/node \\\n @opentelemetry/tracing \\\n @opentelemetry/exporter-jaeger \\ # add exporters as needed\n @opentelemetry/plugin-http # add plugins as needed\n```\n\n> Note: this example is for node.js. See [examples/tracer-web](https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/tracer-web) for a browser example.\n\n### Initialize the SDK\n\nBefore any other module in your application is loaded, you must initialize the global tracer and meter providers. If you fail to initialize a provider, no-op implementations will be provided to any library which acquires them from the API.\n\nTo collect traces and metrics, you will have to tell the SDK where to export telemetry data to. This example uses Jaeger and Prometheus, but exporters exist for [other tracing backends][other-tracing-backends]. If you're not sure if there is an exporter for your tracing backend, contact your tracing provider.\n\n#### Tracing\n\n```javascript\nconst { NodeTracerProvider } = require(\"@opentelemetry/node\");\nconst { SimpleSpanProcessor } = require(\"@opentelemetry/tracing\");\nconst { JaegerExporter } = require(\"@opentelemetry/exporter-jaeger\");\n\nconst tracerProvider = new NodeTracerProvider();\n\n/**\n * The SimpleSpanProcessor does no batching and exports spans\n * immediately when they end. For most production use cases,\n * OpenTelemetry recommends use of the BatchSpanProcessor.\n */\ntracerProvider.addSpanProcessor(\n new SimpleSpanProcessor(\n new JaegerExporter({\n serviceName: 'my-service'\n })\n )\n);\n\n/**\n * Registering the provider with the API allows it to be discovered\n * and used by instrumentation libraries. The OpenTelemetry API provides\n * methods to set global SDK implementations, but the default SDK provides\n * a convenience method named `register` which registers same defaults\n * for you.\n *\n * By default the NodeTracerProvider uses Trace Context for propagation\n * and AsyncHooksScopeManager for context management. To learn about\n * customizing this behavior, see API Registration Options below.\n */\ntracerProvider.register();\n```\n\n## Version Compatibility\n\nBecause the npm installer and node module resolution algorithm could potentially allow two or more copies of any given package to exist within the same `node_modules` structure, the OpenTelemetry API takes advantage of a variable on the `global` object to store the global API. When an API method in the API package is called, it checks if this `global` API exists and proxies calls to it if and only if it is a compatible API version. This means if a package has a dependency on an OpenTelemetry API version which is not compatible with the API used by the end user, the package will receive a no-op implementation of the API.\n\n## Advanced Use\n\n### API Registration Options\n\nIf you prefer to choose your own propagator or context manager, you may pass an options object into the `tracerProvider.register()` method. Omitted or `undefined` options will be replaced by a default value and `null` values will be skipped.\n\n```javascript\nconst { B3Propagator } = require(\"@opentelemetry/propagator-b3\");\n\ntracerProvider.register({\n // Use B3 Propagation\n propagator: new B3Propagator(),\n\n // Skip registering a default context manager\n contextManager: null,\n});\n```\n\n### API Methods\n\nIf you are writing an instrumentation library, or prefer to call the API methods directly rather than using the `register` method on the Tracer/Meter Provider, OpenTelemetry provides direct access to the underlying API methods through the `@opentelemetry/api` package. API entry points are defined as global singleton objects `trace`, `metrics`, `propagation`, and `context` which contain methods used to initialize SDK implementations and acquire resources from the API.\n\n- [Trace API Documentation][trace-api-docs]\n- [Propagation API Documentation][propagation-api-docs]\n- [Context API Documentation][context-api-docs]\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\n/* Initialize TracerProvider */\napi.trace.setGlobalTracerProvider(tracerProvider);\n/* returns tracerProvider (no-op if a working provider has not been initialized) */\napi.trace.getTracerProvider();\n/* returns a tracer from the registered global tracer provider (no-op if a working provider has not been initialized) */\napi.trace.getTracer(name, version);\n\n/* Initialize Propagator */\napi.propagation.setGlobalPropagator(httpTraceContextPropagator);\n\n/* Initialize Context Manager */\napi.context.setGlobalContextManager(asyncHooksContextManager);\n```\n\n### Library Authors\n\nLibrary authors need only to depend on the `@opentelemetry/api` package and trust that the application owners which use their library will initialize an appropriate SDK.\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\nconst tracer = api.trace.getTracer(\"my-library-name\", \"0.2.3\");\n\nasync function doSomething() {\n const span = tracer.startSpan(\"doSomething\");\n try {\n const result = await doSomethingElse();\n span.end();\n return result;\n } catch (err) {\n span.setStatus({\n // use an appropriate status code here\n code: api.SpanStatusCode.ERROR,\n message: err.message,\n });\n span.end();\n return null;\n }\n}\n```\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: \n- For more about OpenTelemetry JavaScript: \n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/status.svg?path=packages/opentelemetry-api\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api\n[devDependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/dev-status.svg?path=packages/opentelemetry-api\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/api\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fapi.svg\n\n[trace-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/traceapi.html\n[metrics-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/metricsapi.html\n[propagation-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/propagationapi.html\n[context-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/contextapi.html\n\n[web]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-web\n[tracing]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-tracing\n[node]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-node\n[metrics]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-metrics\n\n[other-tracing-backends]: https://github.com/open-telemetry/opentelemetry-js#trace-exporters\n","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"1d682c2f75f9d11265cfc1692fa822174594d4b0","scripts":{"docs":"typedoc --tsconfig tsconfig.docs.json","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (linux)","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.15.4","dependencies":{"@opentelemetry/context-base":"^0.16.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.3","codecov":"3.8.1","typedoc":"0.20.14","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.14","linkinator":"2.13.1","typescript":"4.1.3","@types/node":"14.14.20","karma-mocha":"2.0.1","@types/mocha":"8.2.0","@types/sinon":"9.0.10","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.16.1-alpha.15_1612995473924_0.09648780192353335","host":"s3://npm-registry-packages"}},"0.16.1-alpha.20":{"name":"@opentelemetry/api","version":"0.16.1-alpha.20","keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.16.1-alpha.20","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"7de64c09b619c5dd753a0ac48dfb6910b3460279","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.16.1-alpha.20.tgz","fileCount":144,"integrity":"sha512-VidmfATgIAXt30adASH+ohydkGh6pR/9QnxKsNb65W8rPkDExTk3RBZySYHlHeKfH0+fkRCaSBLYnv+J2AG9ow==","signatures":[{"sig":"MEUCIHldBCQulIAJb9E4AOMCuJu/1C8GPVN5wr7WxB/tYnBkAiEAm+uNx2WR/OyRksZWicjbsPjVmU28FrXtddGiwbe8ftg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":173191,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLYHdCRA9TVsSAnZWagAARz8P/iZqYc2kuDxS63UbpV9f\nU/1EsJBKZ4YJqZkyDW0xqYCcwgGt4VeRkHdVGuLwaDbI142MEhc+/PP+sOxg\nXPlpVKhsxI/29iNpkyF319kbqnIXBs2hyonNd6c+AwuVW9CVPosFM2i+smkA\nC/jvTZHpJPIUn+OuWewwkSsyvcS2B3YlEajOWYCntZv5gxzOckRHxdbQHEli\nl3TjaZw/YyiP1Ww+J8yU/WOhLHO2iPSqRJhyp2dEzSTMab/Rt5RJfisTfTO0\ngXauVazV+QpMo6CE5rVhLvgAoh8h0TrvEZlGMZTJIt5evR9kOCPXx5fTEogp\nYxgXbw8MV4PTAjOoHNKd0UmMeBHie6YEATgEB1d6CTs0wrJFCs3d1e+xNiA3\njyMJHvQP/+dWVcSsyzmvAP55hcOh/ZrmUJtQ7YYy2s10JH4wlj0BG7fMvRLc\nR3jxHl3p4Wd1W2tCjGphR+1zWEZSCptNX/tZDWGL1wjpUUl8nBJ+yZOoWz/X\ncCaXI9va+JIKElRBPFwQrJXLUMamWrfmaCnI73SSlptlr6m4YL5WEOqMapfm\nPmRSd24q8ZW7T0uqMhuHGOk/5wfOgUEIYtnXwlgKYB3F/kLD7drfsi5SnxyS\nYwnyNB6i5BhNzFnYzIhr2DRbsul5pG84vwIGxpyg3/5I16XoPdyLUnjBrMh+\nQVQo\r\n=UN9O\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","readme":"# OpenTelemetry API for JavaScript\n\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nThis package provides everything needed to interact with the OpenTelemetry API, including all TypeScript interfaces, enums, and no-op implementations. It is intended for use both on the server and in the browser.\n\n## Quick Start\n\nTo get started you need to install the SDK and plugins, create a TracerProvider, and register it with the API.\n\n### Install Dependencies\n\n```sh\n$ # Install tracing dependencies\n$ npm install \\\n @opentelemetry/api \\\n @opentelemetry/core \\\n @opentelemetry/node \\\n @opentelemetry/tracing \\\n @opentelemetry/exporter-jaeger \\ # add exporters as needed\n @opentelemetry/plugin-http # add plugins as needed\n```\n\n> Note: this example is for node.js. See [examples/tracer-web](https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/tracer-web) for a browser example.\n\n### Initialize the SDK\n\nBefore any other module in your application is loaded, you must initialize the global tracer and meter providers. If you fail to initialize a provider, no-op implementations will be provided to any library which acquires them from the API.\n\nTo collect traces and metrics, you will have to tell the SDK where to export telemetry data to. This example uses Jaeger and Prometheus, but exporters exist for [other tracing backends][other-tracing-backends]. If you're not sure if there is an exporter for your tracing backend, contact your tracing provider.\n\n#### Tracing\n\n```javascript\nconst { NodeTracerProvider } = require(\"@opentelemetry/node\");\nconst { SimpleSpanProcessor } = require(\"@opentelemetry/tracing\");\nconst { JaegerExporter } = require(\"@opentelemetry/exporter-jaeger\");\n\nconst tracerProvider = new NodeTracerProvider();\n\n/**\n * The SimpleSpanProcessor does no batching and exports spans\n * immediately when they end. For most production use cases,\n * OpenTelemetry recommends use of the BatchSpanProcessor.\n */\ntracerProvider.addSpanProcessor(\n new SimpleSpanProcessor(\n new JaegerExporter({\n serviceName: 'my-service'\n })\n )\n);\n\n/**\n * Registering the provider with the API allows it to be discovered\n * and used by instrumentation libraries. The OpenTelemetry API provides\n * methods to set global SDK implementations, but the default SDK provides\n * a convenience method named `register` which registers same defaults\n * for you.\n *\n * By default the NodeTracerProvider uses Trace Context for propagation\n * and AsyncHooksScopeManager for context management. To learn about\n * customizing this behavior, see API Registration Options below.\n */\ntracerProvider.register();\n```\n\n## Version Compatibility\n\nBecause the npm installer and node module resolution algorithm could potentially allow two or more copies of any given package to exist within the same `node_modules` structure, the OpenTelemetry API takes advantage of a variable on the `global` object to store the global API. When an API method in the API package is called, it checks if this `global` API exists and proxies calls to it if and only if it is a compatible API version. This means if a package has a dependency on an OpenTelemetry API version which is not compatible with the API used by the end user, the package will receive a no-op implementation of the API.\n\n## Advanced Use\n\n### API Registration Options\n\nIf you prefer to choose your own propagator or context manager, you may pass an options object into the `tracerProvider.register()` method. Omitted or `undefined` options will be replaced by a default value and `null` values will be skipped.\n\n```javascript\nconst { B3Propagator } = require(\"@opentelemetry/propagator-b3\");\n\ntracerProvider.register({\n // Use B3 Propagation\n propagator: new B3Propagator(),\n\n // Skip registering a default context manager\n contextManager: null,\n});\n```\n\n### API Methods\n\nIf you are writing an instrumentation library, or prefer to call the API methods directly rather than using the `register` method on the Tracer/Meter Provider, OpenTelemetry provides direct access to the underlying API methods through the `@opentelemetry/api` package. API entry points are defined as global singleton objects `trace`, `metrics`, `propagation`, and `context` which contain methods used to initialize SDK implementations and acquire resources from the API.\n\n- [Trace API Documentation][trace-api-docs]\n- [Propagation API Documentation][propagation-api-docs]\n- [Context API Documentation][context-api-docs]\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\n/* Initialize TracerProvider */\napi.trace.setGlobalTracerProvider(tracerProvider);\n/* returns tracerProvider (no-op if a working provider has not been initialized) */\napi.trace.getTracerProvider();\n/* returns a tracer from the registered global tracer provider (no-op if a working provider has not been initialized) */\napi.trace.getTracer(name, version);\n\n/* Initialize Propagator */\napi.propagation.setGlobalPropagator(httpTraceContextPropagator);\n\n/* Initialize Context Manager */\napi.context.setGlobalContextManager(asyncHooksContextManager);\n```\n\n### Library Authors\n\nLibrary authors need only to depend on the `@opentelemetry/api` package and trust that the application owners which use their library will initialize an appropriate SDK.\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\nconst tracer = api.trace.getTracer(\"my-library-name\", \"0.2.3\");\n\nasync function doSomething() {\n const span = tracer.startSpan(\"doSomething\");\n try {\n const result = await doSomethingElse();\n span.end();\n return result;\n } catch (err) {\n span.setStatus({\n // use an appropriate status code here\n code: api.SpanStatusCode.ERROR,\n message: err.message,\n });\n span.end();\n return null;\n }\n}\n```\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: \n- For more about OpenTelemetry JavaScript: \n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/status.svg?path=packages/opentelemetry-api\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api\n[devDependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/dev-status.svg?path=packages/opentelemetry-api\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/api\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fapi.svg\n\n[trace-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/traceapi.html\n[metrics-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/metricsapi.html\n[propagation-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/propagationapi.html\n[context-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/contextapi.html\n\n[web]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-web\n[tracing]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-tracing\n[node]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-node\n[metrics]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-metrics\n\n[other-tracing-backends]: https://github.com/open-telemetry/opentelemetry-js#trace-exporters\n","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"62f8695d3fe5309c62418a1043bc6e8a176bc11f","scripts":{"docs":"typedoc --tsconfig tsconfig.docs.json","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (linux)","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.15.4","dependencies":{"@opentelemetry/context-base":"^0.16.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.3","codecov":"3.8.1","typedoc":"0.20.14","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.14","linkinator":"2.13.1","typescript":"4.1.3","@types/node":"14.14.20","karma-mocha":"2.0.1","@types/mocha":"8.2.0","@types/sinon":"9.0.10","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.16.1-alpha.20_1613595101280_0.06562596146073907","host":"s3://npm-registry-packages"}},"0.17.0":{"name":"@opentelemetry/api","version":"0.17.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.17.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"c90e24acad7c67a26d2b8c86bed5b56785787a98","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.17.0.tgz","fileCount":144,"integrity":"sha512-Rr5NklomjXd7BqfGRs8lD78MvDM+tPeUdHNXilyRIgsUu3gKEKpl3ZgJMiI7gx5r94OqvNc5MukkwKK6xjWYfA==","signatures":[{"sig":"MEQCIDqckXBgAtmCKbAqF9saw2wBcMEGpi5i+gjpU7YJ+unxAiBgVaxPWnn34RGxCQ/EmTpXutSZaLEXelSznbVOhdcghg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":173173,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLYeNCRA9TVsSAnZWagAA6ZYP/3iZTTV/NSeuKDv26aOf\nOgo6vIirk82KvPw84wXe95WBP6b0Bz8Y2h8TIEuQR6/40EFaoNTdIhGs2UBK\nErsDEOfNq10XGEzp7EWzPHKEozGluxuD7VmEo5P4loMFLcwqvsIsrMJzeL+0\n5ItIb5hmGkd71+XX7UBjJ3Jn0mK3vU+b1Mpoi06kqdP8HehJqEryunPd9WB/\n7yEsL5jYQZ4FomukOa3IBvj8O6MdjG8sRsG55U1eQCc7mcc2OA26Te1aiY45\nSMSNws/QHQj9GuFOBSqLRuC4+/5IZJ2esrcAmfuWaTzjU2KQWbz0XYv7LCle\nJTSD2OFsn4nNyKSEEcGYasgn+pvXaeYKbDqXNPqFgaoy2g0XUJrUgdlw6cFJ\nJ0ANiyjABpX33hK15PjXveEVZlAYB9DVCtFwYmsH+26wfKbWHWnjLBNqh2kR\nmjxiYjcNwiQj6AdrCJJD9qPoG1qQ27NylbDhp3XuCnwt83P4KB+pXiL4/Vb8\ny2ACTt3N4USc9Te00J7cFnnfnQUOH7wfQniaQHyf0AahlKYd6BXPhJ+Eu57i\n8VaH4bkk1lXSqW32zjPncbpFvNkHuksql5hsy1gSJlblHLxXTrFBcZYHOPrX\nxh0yjju309V+SITWdCJVACueK/7pqFKlhKe/ux79JkcuzMikyU8+aK2GWa+1\nTCAx\r\n=/C8K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"a91ea7617f288af632934334d0c8ecece318ce73","scripts":{"docs":"typedoc --tsconfig tsconfig.docs.json","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.8.0","dependencies":{"@opentelemetry/context-base":"^0.17.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.3","codecov":"3.8.1","typedoc":"0.20.14","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.14","linkinator":"2.13.1","typescript":"4.1.3","@types/node":"14.14.20","karma-mocha":"2.0.1","@types/mocha":"8.2.0","@types/sinon":"9.0.10","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.17.0_1613596556995_0.04943939578351464","host":"s3://npm-registry-packages"}},"0.17.1-alpha.21":{"name":"@opentelemetry/api","version":"0.17.1-alpha.21","keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.17.1-alpha.21","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"9355b48b2ed4fce91c7e00d6abc27ce43f2f78fd","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.17.1-alpha.21.tgz","fileCount":144,"integrity":"sha512-HXgmeF5oaFLwV2bTex6QjFiQtaC4qdS4cUxGDDdd2a2WIw4EpkAP0qwSdpz+dNnsIBMTTnMpQoZSR11FImJ1/Q==","signatures":[{"sig":"MEUCIEl2ZK2wAaEtjiSe3HRo1sG6gEZrP+AuQ5/26UAcVpuNAiEA6y7o+OZFvjSzIGa9euXCU3nepiMmdYY7UrY4JaySV7o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":173209,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLYexCRA9TVsSAnZWagAABW8P/0VYYK2J36DvW+ecHVpy\nwrR3WQJiqB6FXR7ngXHL10LvZ+KNR6IwRDVsHJNfGWj/q/NzTEXQZBPr9bbi\nAewmtldzzB3HkJZ0pID+ltoG338FKg0SNzLnahyWRrLLZwFprErNGn6iTngU\n2x6QTctpFydBMc0P65c8Oo/2tTm76QAlEvKpM9m3bTJfaaXeXQFUEPtPCH6o\nCrBJ+B4LsM1gfVLzhc7l/SlbhqGrbJXyb84ocp1CCgBL4IrbBTT+dMXyhz4H\nWgnrRZgLxRx20o5aZ6R6SlNlFzmoNqqVwPRE6gWUEpFBhjWKWSSa2Ngz1gwT\nX7afVtuAezHGSdEIbQcMwbk2iN2iq6x43LOh9Cwb48lUWscGuPTu0AfuN6kK\nxufmde+ujPxsQMZ0xGHhGtRrHje7gA897Nq9nqbXTuLJGiZvxIVzwbhI1Sx0\nU2Tpgf3hKu56NZOgnvCt5q91ONjJ8UIuy1wNxXU+2S+VJ4LU3ZnbJ9cNHTpb\nzbL+q4Zn0Q0KZ/nwb5AdniRXPJRSgIZt50ZKJQU9XOe6jbfDnKtb7v95yNyL\n62dXx+hpklF7zITj4OYkvox8uA2AaMPuBFuI49j3IYeKiG0ewmpm7ym3O1W2\nbkQPHw1gXRDQHNpHYTJsec1BKfkp0s6q8v4qNHLKcFxhR8/xwDLZVdbY2mQ4\n9g46\r\n=OxXK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","readme":"# OpenTelemetry API for JavaScript\n\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n[![Apache License][license-image]][license-image]\n\nThis package provides everything needed to interact with the OpenTelemetry API, including all TypeScript interfaces, enums, and no-op implementations. It is intended for use both on the server and in the browser.\n\n## Quick Start\n\nTo get started you need to install the SDK and plugins, create a TracerProvider, and register it with the API.\n\n### Install Dependencies\n\n```sh\n$ # Install tracing dependencies\n$ npm install \\\n @opentelemetry/api \\\n @opentelemetry/core \\\n @opentelemetry/node \\\n @opentelemetry/tracing \\\n @opentelemetry/exporter-jaeger \\ # add exporters as needed\n @opentelemetry/plugin-http # add plugins as needed\n```\n\n> Note: this example is for node.js. See [examples/tracer-web](https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/tracer-web) for a browser example.\n\n### Initialize the SDK\n\nBefore any other module in your application is loaded, you must initialize the global tracer and meter providers. If you fail to initialize a provider, no-op implementations will be provided to any library which acquires them from the API.\n\nTo collect traces and metrics, you will have to tell the SDK where to export telemetry data to. This example uses Jaeger and Prometheus, but exporters exist for [other tracing backends][other-tracing-backends]. If you're not sure if there is an exporter for your tracing backend, contact your tracing provider.\n\n#### Tracing\n\n```javascript\nconst { NodeTracerProvider } = require(\"@opentelemetry/node\");\nconst { SimpleSpanProcessor } = require(\"@opentelemetry/tracing\");\nconst { JaegerExporter } = require(\"@opentelemetry/exporter-jaeger\");\n\nconst tracerProvider = new NodeTracerProvider();\n\n/**\n * The SimpleSpanProcessor does no batching and exports spans\n * immediately when they end. For most production use cases,\n * OpenTelemetry recommends use of the BatchSpanProcessor.\n */\ntracerProvider.addSpanProcessor(\n new SimpleSpanProcessor(\n new JaegerExporter({\n serviceName: 'my-service'\n })\n )\n);\n\n/**\n * Registering the provider with the API allows it to be discovered\n * and used by instrumentation libraries. The OpenTelemetry API provides\n * methods to set global SDK implementations, but the default SDK provides\n * a convenience method named `register` which registers same defaults\n * for you.\n *\n * By default the NodeTracerProvider uses Trace Context for propagation\n * and AsyncHooksScopeManager for context management. To learn about\n * customizing this behavior, see API Registration Options below.\n */\ntracerProvider.register();\n```\n\n## Version Compatibility\n\nBecause the npm installer and node module resolution algorithm could potentially allow two or more copies of any given package to exist within the same `node_modules` structure, the OpenTelemetry API takes advantage of a variable on the `global` object to store the global API. When an API method in the API package is called, it checks if this `global` API exists and proxies calls to it if and only if it is a compatible API version. This means if a package has a dependency on an OpenTelemetry API version which is not compatible with the API used by the end user, the package will receive a no-op implementation of the API.\n\n## Advanced Use\n\n### API Registration Options\n\nIf you prefer to choose your own propagator or context manager, you may pass an options object into the `tracerProvider.register()` method. Omitted or `undefined` options will be replaced by a default value and `null` values will be skipped.\n\n```javascript\nconst { B3Propagator } = require(\"@opentelemetry/propagator-b3\");\n\ntracerProvider.register({\n // Use B3 Propagation\n propagator: new B3Propagator(),\n\n // Skip registering a default context manager\n contextManager: null,\n});\n```\n\n### API Methods\n\nIf you are writing an instrumentation library, or prefer to call the API methods directly rather than using the `register` method on the Tracer/Meter Provider, OpenTelemetry provides direct access to the underlying API methods through the `@opentelemetry/api` package. API entry points are defined as global singleton objects `trace`, `metrics`, `propagation`, and `context` which contain methods used to initialize SDK implementations and acquire resources from the API.\n\n- [Trace API Documentation][trace-api-docs]\n- [Propagation API Documentation][propagation-api-docs]\n- [Context API Documentation][context-api-docs]\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\n/* Initialize TracerProvider */\napi.trace.setGlobalTracerProvider(tracerProvider);\n/* returns tracerProvider (no-op if a working provider has not been initialized) */\napi.trace.getTracerProvider();\n/* returns a tracer from the registered global tracer provider (no-op if a working provider has not been initialized) */\napi.trace.getTracer(name, version);\n\n/* Initialize Propagator */\napi.propagation.setGlobalPropagator(httpTraceContextPropagator);\n\n/* Initialize Context Manager */\napi.context.setGlobalContextManager(asyncHooksContextManager);\n```\n\n### Library Authors\n\nLibrary authors need only to depend on the `@opentelemetry/api` package and trust that the application owners which use their library will initialize an appropriate SDK.\n\n```javascript\nconst api = require(\"@opentelemetry/api\");\n\nconst tracer = api.trace.getTracer(\"my-library-name\", \"0.2.3\");\n\nasync function doSomething() {\n const span = tracer.startSpan(\"doSomething\");\n try {\n const result = await doSomethingElse();\n span.end();\n return result;\n } catch (err) {\n span.setStatus({\n // use an appropriate status code here\n code: api.SpanStatusCode.ERROR,\n message: err.message,\n });\n span.end();\n return null;\n }\n}\n```\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: \n- For more about OpenTelemetry JavaScript: \n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/status.svg?path=packages/opentelemetry-api\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api\n[devDependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/dev-status.svg?path=packages/opentelemetry-api\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api&type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/api\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fapi.svg\n\n[trace-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/traceapi.html\n[metrics-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/metricsapi.html\n[propagation-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/propagationapi.html\n[context-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/contextapi.html\n\n[web]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-web\n[tracing]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-tracing\n[node]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-node\n[metrics]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-metrics\n\n[other-tracing-backends]: https://github.com/open-telemetry/opentelemetry-js#trace-exporters\n","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"a91ea7617f288af632934334d0c8ecece318ce73","scripts":{"docs":"typedoc --tsconfig tsconfig.docs.json","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (linux)","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.15.4","dependencies":{"@opentelemetry/context-base":"^0.17.1-alpha.21+a91ea761"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.3","codecov":"3.8.1","typedoc":"0.20.14","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.14","linkinator":"2.13.1","typescript":"4.1.3","@types/node":"14.14.20","karma-mocha":"2.0.1","@types/mocha":"8.2.0","@types/sinon":"9.0.10","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.17.1-alpha.21_1613596592759_0.8115436125437374","host":"s3://npm-registry-packages"}},"0.18.0":{"name":"@opentelemetry/api","version":"0.18.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.18.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js-api#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-api/issues"},"dist":{"shasum":"4641879f16de9784bb00023ab0de5ca219ced765","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.18.0.tgz","fileCount":160,"integrity":"sha512-KczG0mtyH2UQLeFDYC+atGXfS/MfttynmHblJUsOnIgfI0Ohn0nJOgNjKwJlHk6/9Q61CBTxzSs/268TDaopVw==","signatures":[{"sig":"MEUCIQCBHh2QpSU72QU6Dc/OnP3LaS9jpNTOtMF5lUMC6jQmNAIgF5m8Qwkpso/nvIii7FUmp/SNV1JhAeJ8FnXB4yBV3fw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":184161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgOWCgCRA9TVsSAnZWagAA5K8P/RZfTjZFUJnuQ0Uhu8w9\nCj+LteElcQosrqEHCNktqIvKhKbeKZks9UKyBHbov0WmCZOpuSO3N5fie1Iy\nR5afP1g0wFBUIszyV8IFc7PXgd/ebm23NKJAY96i3XTTiY0ksmxzymeZBg33\nTUDrhqaV0RRhBtdHF55ZE9nBfqgIv8NGNJJvTk4dUX5h1ztm+woSXLqeD7Q3\n4IvZwwqXhf1HF4d+VpdTWxnoIZXAC3BGD+OjL+3+0WkPWwBKcyk6GUVPEBb7\nWxmGKI8iqeR6Bo5gAjjljpU1sgOjWF+AYmUPXRzN7iLwH87jHY8gIJV9InKM\naWjulwyokUn9PZxaLLC+U7mMXhuStesUuSt33vCdOAJ0BSpfYDkUYb3ibKcI\nzCx4Z65AD0xgP9+bLAblF7PTP4cZ+wwEzLK67lUWD5o+X6WvARuFWV/M3iEG\ngzkdhu+WKzw1/ZJjzJUCKcv2mS6ed08fvDmqTMx6eG0NQ4Zsxx6RmpQjwzqd\nOhQZjXvu3hQq+DhIOzAgj105/n6NyCeIQRTThvUb8H840hHgTVKFdFKcszPF\n3zaw4crvJ7bw+vAhDCTDn/w3IhwNtG8phRdNkX1pJA0rxeKU9hVisOrxZEQz\nL7JCqcveQMxI4L5lh7XNNQx+vObjSYpCMtBNwnP0Zp03f0pgp5gN12u8ioz3\nGaai\r\n=PK0u\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"493daa12235a3e2d4d6d263104b2bde4b59282b1","scripts":{"docs":"typedoc","lint":"eslint src test --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p .","compile":"tsc --build","version":"node scripts/version-update.js","lint:fix":"eslint src test --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ."},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js-api.git","type":"git"},"_npmVersion":"6.14.11","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.4","eslint":"7.20.0","codecov":"3.8.1","typedoc":"0.20.25","webpack":"4.46.0","gh-pages":"3.1.0","ts-mocha":"8.0.0","ts-loader":"8.0.17","linkinator":"2.13.5","typescript":"4.1.5","@types/node":"14.14.28","karma-mocha":"2.0.1","@types/mocha":"8.2.1","@types/sinon":"9.0.10","karma-webpack":"4.0.2","lerna-changelog":"^1.0.1","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","eslint-plugin-header":"3.1.1","eslint-plugin-import":"2.22.1","karma-chrome-launcher":"3.1.0","@typescript-eslint/parser":"4.15.1","istanbul-instrumenter-loader":"3.0.1","@typescript-eslint/eslint-plugin":"4.15.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.18.0_1614373023795_0.9158498902086578","host":"s3://npm-registry-packages"}},"0.18.1":{"name":"@opentelemetry/api","version":"0.18.1","keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.18.1","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js-api#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-api/issues"},"dist":{"shasum":"fb499e07afa1f55acffc47b2469eb218dcdee2a2","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.18.1.tgz","fileCount":160,"integrity":"sha512-pKNxHe3AJ5T2N5G3AlT9gx6FyF5K2FS9ZNc+FipC+f1CpVF/EY+JHTJ749dnM2kWIgZTbDJFiGMuc0FYjNSCOg==","signatures":[{"sig":"MEUCIF7N7P76pgDCWPlKWDkinBzu2tK8lW2uE/nOnUmQWVHuAiEAxP/+PutxJjZBZbvigPZb0dnZV/5QOMLHEce787TUbw0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":186205,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQpYpCRA9TVsSAnZWagAAMfIP/089kpQA0nqG1bDWe4bc\n6TmZBDHXXHD2rdoYP8Qz9zCrgIR8y0ovf2cMykBIhp6MSYCwwih4/gakodQs\n3zBXcH8x4f7AymFTIfQ5UYy+Rjmj7o6LtKPI8ggXOhbwVMBFFTKWBFRnMCmA\nc6u3s6Oo0TIMVANzrspCufPZ+uiJZdYeO5YEkRl4WzWJ9s61OVmukDdVIzm6\nRd0V9vdq99nZKDdo7xDkiu4LTwN/LVBmkQwNzR/dysOENnKbnYuz+bgaTvr7\nvFY8E+EePBBRBSS3zhB4MzMr5fzfW/KTuAWk+4fTJl/vmO3RtJlBav7yrBK0\nKWdCRfXpr9TjeYGwsBZmvlk+qw8Lr9BcytCKBiQIdi/wSurAHVv3zm4MBb6N\nnuHaIr2nzMPyby9m8w5SVjkR3n6FQ6iUNLFthBRpAujUWtnFNShv67CX0x0z\nK1lzMFFERiFJZMfM48zS5KouAUkPPcD6Lv0IVfMlTaCRkSH/7vhQKrtHgHRa\nWoWohAczo7k7gCDphvVsY2yIyp4Z5nlBCa5HHb8FWZfjDm+u+bpraA4SuRPl\nyvtb5Hq3bZFngaeytB5Ckr9O2JYT5YNfW9NA3q9+/ZFtYJayGu+1AcoNy7Tw\nPJ+QAXOD/pU2Ax/jz6vuNV4+KPN8fuqJiMjI7WzgVYOl72FQGgcabpsc/rRM\nsYSS\r\n=cnRG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"0c5a41e13b0979bf9e76d3a2ab83e339faab4808","scripts":{"docs":"typedoc","lint":"eslint src test --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p .","compile":"tsc --build","version":"node scripts/version-update.js","lint:fix":"eslint src test --ext .ts --fix","docs-test":"linkinator docs/out --silent --skip david-dm.org","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ."},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js-api.git","type":"git"},"_npmVersion":"6.14.11","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.4","eslint":"7.20.0","codecov":"3.8.1","typedoc":"0.20.25","webpack":"4.46.0","gh-pages":"3.1.0","ts-mocha":"8.0.0","ts-loader":"8.0.17","linkinator":"2.13.5","typescript":"4.1.5","@types/node":"14.14.28","karma-mocha":"2.0.1","@types/mocha":"8.2.1","@types/sinon":"9.0.10","karma-webpack":"4.0.2","lerna-changelog":"^1.0.1","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","eslint-plugin-header":"3.1.1","eslint-plugin-import":"2.22.1","karma-chrome-launcher":"3.1.0","@typescript-eslint/parser":"4.15.1","istanbul-instrumenter-loader":"3.0.1","@typescript-eslint/eslint-plugin":"4.15.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.18.1_1614976552566_0.41474010906993297","host":"s3://npm-registry-packages"}},"1.0.0-rc.0":{"name":"@opentelemetry/api","version":"1.0.0-rc.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@1.0.0-rc.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js-api#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-api/issues"},"dist":{"shasum":"0c7c3f5e1285f99cedb563d74ad1adb9822b5144","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-1.0.0-rc.0.tgz","fileCount":160,"integrity":"sha512-iXKByCMfrlO5S6Oh97BuM56tM2cIBB0XsL/vWF/AtJrJEKx4MC/Xdu0xDsGXMGcNWpqF7ujMsjjnp0+UHBwnDQ==","signatures":[{"sig":"MEUCIAriqSwPzWmU6+ET9hzHgiimIPX0Pn7Uk8Un1S3S/oYxAiEAzG8Q4hLyOJqsh4bpM23IE3HRD7D/NAS1k0qKFFXhbKs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":183887,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgS6E6CRA9TVsSAnZWagAAxqIP+wV+iKm3K4US7a27D5+o\n3YdqJRElgdCYq3pW5JoGP4ZTCYNs4o8hUaJ2P2AZQnwHNJjlUb6DBkEJaXqQ\nOT0bXY8RU9O4rzZX3l93mguxu9U7z/jTW/J06CpjHbAYlQ1HJ6++rYT+kj78\nM2ZYr+5nUPxKmn9Y7SBhr4MkObUx0GT0CmBtZ80/zddVi3WZYsAr3cl4V3ac\n0qzRhSHC+kbguXOVvLGLdU87uneEfL9p2OOiJ1AIfSmY3F8JUDX+kl98UXlQ\n6tJYZ3rXnXBOXci7YyLa2VjjRJSDc8q5vYf5sYTOTSDMsYfkg4mYBPNFb7GG\nKgsIbH04xTWWB3dJVH+eyzXlV1h4awRERu8G586b6A75x6cXRsLUeRaHf4O3\nMEOW5Wc+TcukUyci532D8La5JeQ5ZvZ5e3RGjjKmpqRMT9IpjHdaSqLIX5qE\na6af8gGD46jS+G19Ml+tzlkw9hivk74ye9daBEQiiGYuZLJLKzz5EXQEXnT+\nO6bsHkiL/leBVPm4iLhMHy8bAARFFl2reYLMmvutK/cCSqWYb5u8K4a67Mwf\nC5/w5T7SzQGNTb6IhGyVNLYs2Hs+qm/F4ZJj8iLT3BElezGShfP/4dxHCxir\nZv4i17e2evKWoXsRLvFyuvkEfmdhCiLGYUgakV6xEVwjObWCi9CofpH9hCnD\noqRK\r\n=IzTM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"504041a8aa8442987a95f675af0a402084678682","scripts":{"docs":"typedoc","lint":"eslint src test --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p .","compile":"tsc --build","version":"node scripts/version-update.js","lint:fix":"eslint src test --ext .ts --fix","docs:test":"linkinator docs/out --silent --skip david-dm.org","docs:deploy":"gh-pages --dist docs/out","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ."},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js-api.git","type":"git"},"_npmVersion":"6.14.11","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.4","eslint":"7.20.0","codecov":"3.8.1","typedoc":"0.20.25","webpack":"4.46.0","gh-pages":"3.1.0","ts-mocha":"8.0.0","ts-loader":"8.0.17","linkinator":"2.13.5","typescript":"4.1.5","@types/node":"14.14.28","karma-mocha":"2.0.1","@types/mocha":"8.2.1","@types/sinon":"9.0.10","karma-webpack":"4.0.2","lerna-changelog":"^1.0.1","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","eslint-plugin-header":"3.1.1","eslint-plugin-import":"2.22.1","karma-chrome-launcher":"3.1.0","@typescript-eslint/parser":"4.15.1","istanbul-instrumenter-loader":"3.0.1","@typescript-eslint/eslint-plugin":"4.15.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_1.0.0-rc.0_1615569209615_0.9333898318169607","host":"s3://npm-registry-packages"}},"1.0.0-rc.1":{"name":"@opentelemetry/api","version":"1.0.0-rc.1","keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@1.0.0-rc.1","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js-api#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-api/issues"},"dist":{"shasum":"ad68cf20e361523d9a6fcd3589add8695ea10343","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-1.0.0-rc.1.tgz","fileCount":310,"integrity":"sha512-bCPRNOSgqmeDY36Q4J5ylbBtvHfQ0vzPmRaQ1JQ04MwTJclE8/By5jgDtMe9Kh4tMxDUKHIDAzJi2Bo7uxlSnw==","signatures":[{"sig":"MEQCIH/ThtfwBP/2dv6whobqi46Klxcmwi2YeS+c7JCnsBSkAiAbnTCP9KrWb9Oa7y9WrVuwOcGmvCVVmeXrDbExZqF/JQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":358580,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpA/TCRA9TVsSAnZWagAAfxwP/1F5o/ZpNi+Ws4wTvJXj\ntMUKE7PJ9X+KVD5VXoO1ai0iLkKpMvKSQvJ5Wwol+t7QbP+1Q7J+52MMiYZh\nZL65wmP3ywJquWEYkToHDx3VaAoeistXOiyr24SEQ34O6PQFkD5YC7pXF8if\niO4T9HnVkdJ5Gd5X2Tl4QRCpkhlnxG5TdSE0SCLn8fOnPaoF0EGMVf+qkgp2\nvRw/ZfwDkmkGCy1EDRAGJs5QhEnckY341wiO9+5HxdR46RP9xuYr3mabTZ5w\ncm50tczroEfctwegJQjMgystXcyubPn9djjy44OQpqqAJ6Oj1a2dMBP2H1kc\nqqpDn5dvU1Eu3cMxf1jODjGkbCsFJY6po6I6ti7335vhPocoZq9yf6BE99YG\n+lbMwZ9Hr36co27h/sS2u0YvhLD29HpG8vIuLj1a5g4+ezn6o0Tg6UCLQRnJ\n4Dha00bvGs5CAZzIIMf3otITNcDvyxVBxOGg7m3KPS1M8nugr8VSby6HAI8P\n0R0OR8bPVP7QL+n0JdYawqJjOdOvfGGbrnTim08/pwf9R8gObauBuLyboVmn\nVkHN8AZH2RxhX4IihtDA8x6T/rAYxljqDwGGZA49Ec5F6Y10WN5Ya4IQe23P\nMmFyyqEMN3nPotok9/QMKvQ5ueGxNeU+gqnGrITVKM3+O9+U2VCUBTwhTWy+\na+z3\r\n=OAv8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","readme":"\n---\n\n\n

\n \n \"GitHub\n \n \n \"Codecov\n \n \n \"license\"\n \n
\n \n \"Build\n \n \n \"Build\n \n

\n\n---\n\n# OpenTelemetry API for JavaScript\n\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n\nThis package provides everything needed to interact with the OpenTelemetry API, including all TypeScript interfaces, enums, and no-op implementations. It is intended for use both on the server and in the browser.\n\nThe methods in this package perform no operations by default. This means they can be safely called by a library or end-user application whether there is an SDK registered or not. In order to generate and export telemetry data, you will also need an SDK such as the [OpenTelemetry JS SDK][opentelemetry-js].\n\n## Tracing Quick Start\n\n### You Will Need\n\n- An application you wish to instrument\n- [OpenTelemetry JS SDK][opentelemetry-js]\n- Node.js >=8.5.0 (14+ is preferred) or an ECMAScript 5+ compatible browser\n\n**Note:** ECMAScript 5+ compatibility is for this package only. Please refer to the documentation for the SDK you are using to determine its minimum ECMAScript version.\n\n**Note for library authors:** Only your end users will need an OpenTelemetry SDK. If you wish to support OpenTelemetry in your library, you only need to use the OpenTelemetry API. For more information, please read the [tracing documentation][docs-tracing].\n\n### Install Dependencies\n\n```sh\nnpm install @opentelemetry/api @opentelemetry/tracing\n```\n\n### Trace Your Application\n\nIn order to get started with tracing, you will need to first register an SDK. The SDK you are using may provide a convenience method which calls the registration methods for you, but if you would like to call them directly they are documented here: [sdk registration methods][docs-sdk-registration].\n\nOnce you have registered an SDK, you can start and end spans. A simple example of basic SDK registration and tracing a simple operation is below. The example should export spans to the console once per second. For more information, see the [tracing documentation][docs-tracing].\n\n```javascript\nconst { trace } = require(\"@opentelemetry/api\");\nconst { BasicTracerProvider, ConsoleSpanExporter, SimpleSpanProcessor } = require(\"@opentelemetry/tracing\");\n\n// Create and register an SDK\nconst provider = new BasicTracerProvider();\nprovider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter()));\ntrace.setGlobalTracerProvider(provider);\n\n// Acquire a tracer from the global tracer provider which will be used to trace the application\nconst name = 'my-application-name';\nconst version = '0.1.0';\nconst tracer = trace.getTracer(name, version);\n\n// Trace your application by creating spans\nasync function operation() {\n const span = tracer.startSpan(\"do operation\");\n\n // mock some work by sleeping 1 second\n await new Promise((resolve, reject) => {\n setTimeout(resolve, 1000);\n })\n\n span.end();\n return output;\n}\n\nasync function main() {\n while (true) {\n await operation();\n }\n}\n\nmain();\n```\n\n## Version Compatibility\n\nBecause the npm installer and node module resolution algorithm could potentially allow two or more copies of any given package to exist within the same `node_modules` structure, the OpenTelemetry API takes advantage of a variable on the `global` object to store the global API. When an API method in the API package is called, it checks if this `global` API exists and proxies calls to it if and only if it is a compatible API version. This means if a package has a dependency on an OpenTelemetry API version which is not compatible with the API used by the end user, the package will receive a no-op implementation of the API.\n\n## Upgrade Guidelines\n\n### 1.0.0-rc.1 to x\n\n### 1.0.0-rc.0 to 1.0.0-rc.1\n\n- Removing `TimedEvent` which was not part of spec\n- `HttpBaggage` renamed to `HttpBaggagePropagator`\n- [#45](https://github.com/open-telemetry/opentelemetry-js-api/pull/45) `Span#context` renamed to `Span#spanContext`\n- [#47](https://github.com/open-telemetry/opentelemetry-js-api/pull/47) `getSpan`/`setSpan`/`getSpanContext`/`setSpanContext` moved to `trace` namespace\n- [#55](https://github.com/open-telemetry/opentelemetry-js-api/pull/55) `getBaggage`/`setBaggage`/`createBaggage` moved to `propagation` namespace\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: \n- For more about OpenTelemetry JavaScript: \n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[opentelemetry-js]: https://github.com/open-telemetry/opentelemetry-js\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js-api/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js-api.svg\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js-api\n[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js-api.svg?type=dev\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js-api?type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/api\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fapi.svg\n[docs-tracing]: https://github.com/open-telemetry/opentelemetry-js-api/blob/main/docs/tracing.md\n[docs-sdk-registration]: https://github.com/open-telemetry/opentelemetry-js-api/blob/main/docs/sdk-registration.md\n","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"da597304cb6b0b944514efd3df6b93c9e5043d7e","scripts":{"docs":"typedoc","lint":"eslint src test --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p .","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node scripts/version-update.js","lint:fix":"eslint src test --ext .ts --fix","docs:test":"linkinator docs/out --silent --skip david-dm.org","docs:deploy":"gh-pages --dist docs/out","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ."},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"deprecated":"Contained changes incompatible with 1.0.0-rc.0. Please update to 1.0.0-rc.2 to revert. New versions will be released as 0.x.y","repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js-api.git","type":"git"},"_npmVersion":"6.14.11","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","eslint":"7.25.0","codecov":"3.8.1","typedoc":"0.20.36","webpack":"4.46.0","gh-pages":"3.1.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","linkinator":"2.13.6","typescript":"4.2.4","@types/node":"14.14.42","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"10.0.0","karma-webpack":"4.0.2","lerna-changelog":"1.0.1","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","eslint-plugin-header":"3.1.1","eslint-plugin-import":"2.22.1","karma-chrome-launcher":"3.1.0","@typescript-eslint/parser":"4.22.0","istanbul-instrumenter-loader":"3.0.1","@typescript-eslint/eslint-plugin":"4.22.0","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_1.0.0-rc.1_1621364691162_0.9387718191369825","host":"s3://npm-registry-packages"}},"1.0.0-rc.2":{"name":"@opentelemetry/api","version":"1.0.0-rc.2","keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@1.0.0-rc.2","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js-api#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-api/issues"},"dist":{"shasum":"f63c845621f1e7a68ce024842e0bb6b63d982473","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-1.0.0-rc.2.tgz","fileCount":4,"integrity":"sha512-xXKfllRoe2qFsJVVm4XgmhUNbRE9OWkmHaznGLRLOcMEPSMP6UfF6l+pU0HpxpHSwAlZJXNo2ebswDqHxqELNA==","signatures":[{"sig":"MEQCIELo4EfNVLRIfWt8KjNdxBu1FLxr21oYB+nmbLmIHvOlAiAv1RC2Iv9+IOdze7hv8NL0dPovs+9SegW+87P1lJgxvw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21244,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpQHtCRA9TVsSAnZWagAATDoQAJkaKoK9OxA+EDL+R9zR\nfKwIfbujS1NKUqdqOPLaAhdK14ylN6IkVxBIO/pS3v5lQdenovJznfg0a3Sc\nzWq36vb8lOHSnW93daSmkbwcEI0cJ1utQPvKB16FS1Ckd1IVsA36I4eUbTeB\n6JYtpv52E4nYx62tHl0vVrsbnTdmXiJzpxKCs+ROayq3x69WYwn3Gb0czvT5\nNZ7bHjOIzWpWe+TXL1FaLL5Jc9XoH4AQMGK2isdepWU7PBhlYDHB/iD6JcCd\n3oiiXo4nyusoSsOAq8f85DQYxMR/kvpALxrF4Im5Wh8bJ8YqDNVjfCZt/1i9\nH0e1ClSi4TAbuQcZj+dtxZr5uSIdVzvoKAJ3c7yirKhptiIoLuvIc7TG/oon\nlK5latDvVIiaXvLSag+L6Bx8GtzN5qMKEUEdP/41T1mKlWXCUFhHsTKsx6WZ\n6i3mzMS4V4GYhVeC/Pux6myv9tHcjpWN5qC0j+cinnAK1Ssfd25vvn+QtS5c\nXVlRUvOx/xvZSHwim58MfoC2fI8fneI9Teb8pqRbvhhKGRzV2Zmq6V0a6ISG\neLal4cOvIU6rNgAPtJV8VBe4ga/kPlErKjpvBs7kcl4abA/Y3nBZQZmpedNo\n+en41L5FtIsOO7wz61tDkTTcLW/9PpTMojThQFj9FFPgmmty+v3AMJZxuR0J\nenoZ\r\n=HIpa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"ea37cfecdbff6598558a3545cccec8e13dd25a91","scripts":{"docs":"typedoc","lint":"eslint src test --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p .","compile":"tsc --build","version":"node scripts/version-update.js","lint:fix":"eslint src test --ext .ts --fix","docs:test":"linkinator docs/out --silent --skip david-dm.org","docs:deploy":"gh-pages --dist docs/out","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ."},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"deprecated":"Missing files in the distribution package. Please update to 1.0.0-rc.3.","repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js-api.git","type":"git"},"_npmVersion":"6.14.11","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.4","eslint":"7.20.0","codecov":"3.8.1","typedoc":"0.20.25","webpack":"4.46.0","gh-pages":"3.1.0","ts-mocha":"8.0.0","ts-loader":"8.0.17","linkinator":"2.13.5","typescript":"4.1.5","@types/node":"14.14.28","karma-mocha":"2.0.1","@types/mocha":"8.2.1","@types/sinon":"9.0.10","karma-webpack":"4.0.2","lerna-changelog":"^1.0.1","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","eslint-plugin-header":"3.1.1","eslint-plugin-import":"2.22.1","karma-chrome-launcher":"3.1.0","@typescript-eslint/parser":"4.15.1","istanbul-instrumenter-loader":"3.0.1","@typescript-eslint/eslint-plugin":"4.15.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_1.0.0-rc.2_1621426669490_0.652050118574828","host":"s3://npm-registry-packages"}},"1.0.0-rc.3":{"name":"@opentelemetry/api","version":"1.0.0-rc.3","keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@1.0.0-rc.3","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js-api#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-api/issues"},"dist":{"shasum":"903ef6dddf04410d09072d43a060b87ccc162545","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-1.0.0-rc.3.tgz","fileCount":160,"integrity":"sha512-3PlJD9uN5iZrKmX054vOifGxZ/iH24+UFD5eW8Vyz08GUU7SdW8PNu4VSpTixWeuWo+Q6TELfSv7vVu43t+tbA==","signatures":[{"sig":"MEUCIQCW4A/yySfXGE/gob7foWtZun0q+VJ176u0tjhYw8c4CwIgczmGeZE3c0U5ANhPO6tr1z2lFXb9QFfsoke1F6bdV7Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":183887,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpRUICRA9TVsSAnZWagAA2gkP/3leRMPBuXGxeoIoB3YW\n87wskQYq+pXq0IKa33BD8aHU0sQkaVSeRdcDJfLEgOh+FsbrioR9+vE32m+E\nsyGAuH7Mz+th7MK3IvraqPD+U270GXsL70ptLKe8GAHMq6/16fyeer7SFOmQ\n8zIgmqT7TkQn89jXvXZDzcPs0o8GZ0ufyJ8mhXkW1FlOFcxal7hFMWweW8QY\nX5f7r4VtoXBgq1c6iy5s+JF6ItDAVgeo8qKV7lv58cvJfQdTralZKhec97wQ\nNos6JeQKwd8Sz+MvkZ4O1LgESqAInPOi9EW7xqL9d7AwFm3pgKYEIUyN+Ayy\nKn4LwU1/oYhsDk0VI2vY18s7vm+RjidhGLiriSvVCUnsX17f80M2iKujyml9\nY7oJqGl46LBkWZDiabX9y3/6pp4zgftkXybNu1oM+fhNKmnkWlS7hdEVzdwe\n6TDy1O/erdDwwakoqPHLLO8tYqdzXrjIUAR55BMEaC8wHVreNvKWHPN2yK+t\nDJ3bSLpollxgJ2V41lzFI6PATWLZxFB/POKDCZ0ylKi8s980D9WVQOHwr8Z4\nieChUxVM1DeNb8TX3g1oP0lxxZZeigqrFJTPq9pJQN4u+ZOw1qo4e1u1W25A\ngIldY7cviKLo5l9rjWNG95PF0hZxu0q8zAhdssihv0ERA/HH9iq1rbPr0dgl\nj4or\r\n=mvVX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"791e9f7f9e9ee339c5cd57a2245891f85e8e5147","scripts":{"docs":"typedoc","lint":"eslint src test --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p .","compile":"tsc --build","version":"node scripts/version-update.js","lint:fix":"eslint src test --ext .ts --fix","docs:test":"linkinator docs/out --silent --skip david-dm.org","docs:deploy":"gh-pages --dist docs/out","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ."},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js-api.git","type":"git"},"_npmVersion":"6.14.11","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.4","eslint":"7.20.0","codecov":"3.8.1","typedoc":"0.20.25","webpack":"4.46.0","gh-pages":"3.1.0","ts-mocha":"8.0.0","ts-loader":"8.0.17","linkinator":"2.13.5","typescript":"4.1.5","@types/node":"14.14.28","karma-mocha":"2.0.1","@types/mocha":"8.2.1","@types/sinon":"9.0.10","karma-webpack":"4.0.2","lerna-changelog":"^1.0.1","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","eslint-plugin-header":"3.1.1","eslint-plugin-import":"2.22.1","karma-chrome-launcher":"3.1.0","@typescript-eslint/parser":"4.15.1","istanbul-instrumenter-loader":"3.0.1","@typescript-eslint/eslint-plugin":"4.15.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_1.0.0-rc.3_1621431559180_0.18345750516195514","host":"s3://npm-registry-packages"}},"0.19.0":{"name":"@opentelemetry/api","version":"0.19.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.19.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js-api#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-api/issues"},"dist":{"shasum":"d2997338c106ad8b00d4c9105fcbcadf1dac4ed5","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.19.0.tgz","fileCount":310,"integrity":"sha512-v+6ZPQZMKKRVCwLMdjfkrUhBNIQMPrbyMo2R07LdLpCKmq3KlEeyua2LsI19WgTWIj9R9QgqfD8EcUgyxUiw+A==","signatures":[{"sig":"MEMCHzZj5aK44IQBbQoUgAxszs+eQBO1j4gBWMi1qCocCNoCIBQT2NnLMvePePbOSgvu8v2DVOQAF8gLPWFmWLR7Fq7E","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":358560,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpRyJCRA9TVsSAnZWagAAGm4P+QF+kErLH85247nHP9D4\nfrxWBVfMv4J/F8oPeEZIXq2bRikSOguiJwQlva27a+6n38gUWYDL1H29N+Vz\nPar9maxGzcIBVJDtje7G7jZ979HyuVfNe8kRpS8i1gIz16ZS0jlIC+U+6v6y\n1spTKlZw/EITJXBlkvR1LCWGwTIrZgeFuvw12QVoOWgK6/OTOIl8Rn23KUY1\nGNbOEDVNs7tSui0D0M2jiM63RjSSne6J775Oqj+2ECk8Y1YI/xH3GxLljcax\nDZVQp2vbpjKMwR4ZmQ3QSQYFULMHN9Jz4MYmCP6W32ppvXkccnDCq/ZnKIuG\ndLooHnkQG9WI+CEiljWo4h6QlCFhEMFkAgY07ha6AtthgyxLoAEW6zysIL73\ns9TtQ32JwjP7zHUl98tMKgGvbbhCd48gbhkmshEl/XPMSrGETm8u2pwbXTcR\nhO/67009Q10D6F8gdN6caK/ico27LYIj38oWjgnpFTmeci7hvWs4DSkTML+2\nj3LctYvSrUGV6qpsrinqQM2udHn2+2oU2Zewua8ZHbaT4gfklzrhEafY1VCi\nZR8t3N5GMNx/7FgtIyuPbgpS0aofRKHb0i6q6ivws5Eg1zpgJTauCg3AkcJf\nc3Vu2MwY0CJ001p+UvoYh6eOadezz3EFDJbYsMG6dSLkCXGjgQVjMJI8O9RC\nCgKU\r\n=/RN3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"8bd1c6e5d2cbff86851016f2c1948a01f02a5105","scripts":{"docs":"typedoc","lint":"eslint src test --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p .","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node scripts/version-update.js","lint:fix":"eslint src test --ext .ts --fix","docs:test":"linkinator docs/out --silent --skip david-dm.org","docs:deploy":"gh-pages --dist docs/out","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ."},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js-api.git","type":"git"},"_npmVersion":"6.14.11","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","eslint":"7.25.0","codecov":"3.8.1","typedoc":"0.20.36","webpack":"4.46.0","gh-pages":"3.1.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","linkinator":"2.13.6","typescript":"4.2.4","@types/node":"14.14.42","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"10.0.0","karma-webpack":"4.0.2","lerna-changelog":"1.0.1","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","eslint-plugin-header":"3.1.1","eslint-plugin-import":"2.22.1","karma-chrome-launcher":"3.1.0","@typescript-eslint/parser":"4.22.0","istanbul-instrumenter-loader":"3.0.1","@typescript-eslint/eslint-plugin":"4.22.0","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.19.0_1621433480608_0.251099208329693","host":"s3://npm-registry-packages"}},"0.20.0":{"name":"@opentelemetry/api","version":"0.20.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.20.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js-api#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-api/issues"},"dist":{"shasum":"d4e26d30dc0c5da697d1ff51434ad8f0cf30e565","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.20.0.tgz","fileCount":310,"integrity":"sha512-n06MtDYEc2H07S/NTvGMlxF2Ijp0YbNrI/rBgLcxpEh3hxOkPZA12gxlUoZkBHWCZYau2j3b/uL+QFpiQKOjSw==","signatures":[{"sig":"MEQCIAkPLgmwkLht59P9eRvrKLiiidy9RMBcItAHJvlJXbcOAiA52yYvt+TW+iSe+pXCzxIueO2Q3opf081rrfspZINb3A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":361954,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgq5ZWCRA9TVsSAnZWagAAhwoP/jewlq93T98q9h2r+N6X\nWFlSBc9ktOA8gmzhgV9vFfvvWTJO3MJ7+IoqrBuMLEZsuPChEabHEYqidZHg\nVdGsSDBOxUvb75bZBul4AZvUPwW0INsXAY7yT85kwRTZR4suHbOQMh5lPy0f\nV9mNISLHb8bs4NsNpkcvekIXMPgaM+sCRq/SmBdcOZEK2im7p2w+/1lbraTh\nKBr06RM+M6rRcPk7OYUzR4flfB//tba6sbsqqri22UeYEsFCy19/zv36qnN1\n55SZgO5bxn/mOaE0EDjmFFqPXHPxxUqnnOlumROG6nDK0MTB48G8LkCTJlop\nUbJMh0q+P+mPmTWZS+p7ts+kIxXgSGHYQOFwEQo0fGd6mYeRxB+YY+VZB6wx\nPH8przx77AaoOy6Ncp+p9bjjPFqMT9AdSUv1fV/AQIoN7YRyezS8QLQpalPM\nO6cENEchWt4YGBtJY8r7va3SYmp78FdzqbPWgsi7DoqZ34+hHZVpMNdot3Wn\nUlkic+n/HoLWqp7kLd1MjMJrm9irFU4aGe4gNXJD7KIRo8T2vBbUN/EAlC6g\n8POSemWhO5v8S8BY+rzjtl0huuyXbLWzcOFbvs4442MHhcUfO+v8KBre9lY6\nrsP3UFX3SDixllkm6wrXM8QcOzjIMn6/qT1yFNtyybsuacKNS6It6WFCg0Sq\n6dbd\r\n=C1Uq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"f6673258c06ec80f03dbac102c2ebc32a1e05d31","scripts":{"docs":"typedoc","lint":"eslint src test --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p .","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node scripts/version-update.js","lint:fix":"eslint src test --ext .ts --fix","docs:test":"linkinator docs/out --silent --skip david-dm.org","docs:deploy":"gh-pages --dist docs/out","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ."},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js-api.git","type":"git"},"_npmVersion":"6.14.11","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","eslint":"7.25.0","codecov":"3.8.1","typedoc":"0.20.36","webpack":"4.46.0","gh-pages":"3.1.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","linkinator":"2.13.6","typescript":"4.2.4","@types/node":"14.14.42","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"10.0.0","karma-webpack":"4.0.2","lerna-changelog":"1.0.1","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","eslint-plugin-header":"3.1.1","eslint-plugin-import":"2.22.1","karma-chrome-launcher":"3.1.0","@typescript-eslint/parser":"4.22.0","istanbul-instrumenter-loader":"3.0.1","@typescript-eslint/eslint-plugin":"4.22.0","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.20.0_1621857877721_0.06068974397357141","host":"s3://npm-registry-packages"}},"0.21.0":{"name":"@opentelemetry/api","version":"0.21.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@0.21.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js-api#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-api/issues"},"dist":{"shasum":"aa360bf840ec70a7a056c6685aeed47af408cacb","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-0.21.0.tgz","fileCount":310,"integrity":"sha512-Q7hHb3nidPgnBS2fi+y3K64F3EV48d9v09/6EtigIgVF43NFNhw/dboDKC7gECEkbTwuvFeLCbwKs9JaC8LDEw==","signatures":[{"sig":"MEYCIQCdpdB2Nj5P5LHQ/QAD+NjjxksA3FHFI0mYpllSnJGgBAIhAKrsWMXLKRc0NlXn7/E9s0CZrCTkUIE/Mr9eWV/me54F","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":363649,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgul6rCRA9TVsSAnZWagAAUEQQAItjJXDma1vnrYxzepmd\njKX+xL0Ep8uz/lqqirnj3M4qUN/PVF6+kr+H96heVRanXTi4ccqxe5YTdz7I\nTT1Rgv0+yifLLZhNYRLQ75UsLAmZjLPbnVZC0Nb/9kA6oW6zlTauQlCV+6TE\ngkR8jHyUmFzjN9sqbagBP0VBUzT0pc7RQZZygOp4DxCM06NQbGJqxpcUSEx1\nW9qXQLHUkWWBOCj5GQwmt0qvDVFyo8qGi7Ily5JUWGqjdQzAKigWJhfkIs2H\nxd81pLR/TykvrUvbp8uFmZ+51A/aE/yEEp2P6X/qpMjs+9eN+F3z/0MELX4B\ncNN5yrANXRt7bWuIwNGk3SVEYfG1nwmxzxyoJQWrEnsj2D4HfoVddNNwnLp9\n7XBCv7JTnJM6h40Icmtv72KvBfzZYZanbiE/LFFh03JckG1VY68xJZRvi01e\nfDtwAjOCqZLQo0TeWz9MIQtQqFfYaFkeENxLPhdOojPmjpYD1bU5BTLkbS3m\n9Vzkp8dD7Uhvy63qphDk9vc9t2cc5dta+Ukrp8W+s9pdUZ4+o7iP9fDpytOK\niM0NmI0YB7RFGUan710b1E0U9TOvitjqVo2nuafnkAu2pVThNscOKCu6o6O0\n6E9G8ovHzaUHXvQgIypgXxPW9lp+HH1pd4zPm9sGHmq5nFrwysZuePOPnNJs\n/Kej\r\n=nNBi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","readme":"\n---\n

\n \n API Documentation\n   •  \n Getting In Touch (GitHub Discussions)\n \n

\n\n

\n \n \"GitHub\n \n \n \"Codecov\n \n \n \"license\"\n \n
\n \n \"Build\n \n \n \"Build\n \n

\n\n---\n\n# OpenTelemetry API for JavaScript\n\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n\nThis package provides everything needed to interact with the OpenTelemetry API, including all TypeScript interfaces, enums, and no-op implementations. It is intended for use both on the server and in the browser.\n\nThe methods in this package perform no operations by default. This means they can be safely called by a library or end-user application whether there is an SDK registered or not. In order to generate and export telemetry data, you will also need an SDK such as the [OpenTelemetry JS SDK][opentelemetry-js].\n\n## Tracing Quick Start\n\n### You Will Need\n\n- An application you wish to instrument\n- [OpenTelemetry JS SDK][opentelemetry-js]\n- Node.js >=8.5.0 (14+ is preferred) or an ECMAScript 5+ compatible browser\n\n**Note:** ECMAScript 5+ compatibility is for this package only. Please refer to the documentation for the SDK you are using to determine its minimum ECMAScript version.\n\n**Note for library authors:** Only your end users will need an OpenTelemetry SDK. If you wish to support OpenTelemetry in your library, you only need to use the OpenTelemetry API. For more information, please read the [tracing documentation][docs-tracing].\n\n### Install Dependencies\n\n```sh\nnpm install @opentelemetry/api @opentelemetry/tracing\n```\n\n### Trace Your Application\n\nIn order to get started with tracing, you will need to first register an SDK. The SDK you are using may provide a convenience method which calls the registration methods for you, but if you would like to call them directly they are documented here: [sdk registration methods][docs-sdk-registration].\n\nOnce you have registered an SDK, you can start and end spans. A simple example of basic SDK registration and tracing a simple operation is below. The example should export spans to the console once per second. For more information, see the [tracing documentation][docs-tracing].\n\n```javascript\nconst { trace } = require(\"@opentelemetry/api\");\nconst { BasicTracerProvider, ConsoleSpanExporter, SimpleSpanProcessor } = require(\"@opentelemetry/tracing\");\n\n// Create and register an SDK\nconst provider = new BasicTracerProvider();\nprovider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter()));\ntrace.setGlobalTracerProvider(provider);\n\n// Acquire a tracer from the global tracer provider which will be used to trace the application\nconst name = 'my-application-name';\nconst version = '0.1.0';\nconst tracer = trace.getTracer(name, version);\n\n// Trace your application by creating spans\nasync function operation() {\n const span = tracer.startSpan(\"do operation\");\n\n // mock some work by sleeping 1 second\n await new Promise((resolve, reject) => {\n setTimeout(resolve, 1000);\n })\n\n span.end();\n return output;\n}\n\nasync function main() {\n while (true) {\n await operation();\n }\n}\n\nmain();\n```\n\n## Version Compatibility\n\nBecause the npm installer and node module resolution algorithm could potentially allow two or more copies of any given package to exist within the same `node_modules` structure, the OpenTelemetry API takes advantage of a variable on the `global` object to store the global API. When an API method in the API package is called, it checks if this `global` API exists and proxies calls to it if and only if it is a compatible API version. This means if a package has a dependency on an OpenTelemetry API version which is not compatible with the API used by the end user, the package will receive a no-op implementation of the API.\n\n## Upgrade Guidelines\n\n### 1.0.0-rc.1 to x\n\n### 1.0.0-rc.0 to 1.0.0-rc.1\n\n- Removing `TimedEvent` which was not part of spec\n- `HttpBaggage` renamed to `HttpBaggagePropagator`\n- [#45](https://github.com/open-telemetry/opentelemetry-js-api/pull/45) `Span#context` renamed to `Span#spanContext`\n- [#47](https://github.com/open-telemetry/opentelemetry-js-api/pull/47) `getSpan`/`setSpan`/`getSpanContext`/`setSpanContext` moved to `trace` namespace\n- [#55](https://github.com/open-telemetry/opentelemetry-js-api/pull/55) `getBaggage`/`setBaggage`/`createBaggage` moved to `propagation` namespace\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: \n- For more about OpenTelemetry JavaScript: \n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[opentelemetry-js]: https://github.com/open-telemetry/opentelemetry-js\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js-api/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js-api.svg\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js-api\n[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js-api.svg?type=dev\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js-api?type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/api\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fapi.svg\n[docs-tracing]: https://github.com/open-telemetry/opentelemetry-js-api/blob/main/docs/tracing.md\n[docs-sdk-registration]: https://github.com/open-telemetry/opentelemetry-js-api/blob/main/docs/sdk-registration.md\n","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"726fd827eedf4d3442293dc690313674af38d4ae","scripts":{"docs":"typedoc","lint":"eslint src test --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p .","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node scripts/version-update.js","lint:fix":"eslint src test --ext .ts --fix","docs:test":"linkinator docs/out --silent --skip david-dm.org","docs:deploy":"gh-pages --dist docs/out","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ."},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js-api.git","type":"git"},"_npmVersion":"6.14.11","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","eslint":"7.25.0","codecov":"3.8.1","typedoc":"0.20.36","webpack":"4.46.0","gh-pages":"3.1.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","linkinator":"2.13.6","typescript":"4.2.4","@types/node":"14.14.42","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"10.0.0","karma-webpack":"4.0.2","lerna-changelog":"1.0.1","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","eslint-plugin-header":"3.1.1","eslint-plugin-import":"2.22.1","karma-chrome-launcher":"3.1.0","@typescript-eslint/parser":"4.22.0","istanbul-instrumenter-loader":"3.0.1","@typescript-eslint/eslint-plugin":"4.22.0","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_0.21.0_1622826667360_0.1272796368276481","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@opentelemetry/api","version":"1.0.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@1.0.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js-api#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-api/issues"},"dist":{"shasum":"cc7712009095697f8a9492ee375daa08588ba263","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-1.0.0.tgz","fileCount":310,"integrity":"sha512-TcdhrGy+ehLIFs79/TcWiHiPujishrhSgQ7wxvWvk8WY2YT8Np/pYXmRP94voG3N8GJ/5nIVyzacfViwhN50AQ==","signatures":[{"sig":"MEUCIQDj5mzfWanWIIGVc06eDFm9HlSOId5Z4yLEKMcIHOFu3wIgVTVbTs2RDC1F/A5zvXTjgMCUr9H8z7xDZXM3FVdimwk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":364607,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwjVICRA9TVsSAnZWagAA4xUP/R2b+02H4/0BwmyMgHIE\nsq49hJbr4WF6nxFxXWf77yjrIH+WdfWpmeq8UIHgiBhEZSeSfCje/d56tvAl\nSW//GeKFGc1eS2GC0rTPyTO9MC6zhGRaY5LhBzkMfiiiXasiJv/BLQaKOkeJ\n0hcApkt0Ir0oSx6q4sfLSRevdNGjOYKAQv4eYBHeGEU7qGtx9cXTgyk+JPEv\nl3WnqhszhHnLx8BL0Llzjwft5K8OoCkDpSYf7a0zFvlB6neh4/mLA5Sx4l3e\n2k6JOKy9Mvow/xDwO1jW6W4ucW0pKQ5m3R5AOUcJSvUB0g47ZXCECN74hVlJ\n8AVZqkZzHylb3Is5Vi7SNywpdufUPONm/OC6gZl8rETtuqJOaVwHY4h6kNtr\n6eLLbgEhXJUxo9E1tG3I/5UoJ/LmwIyHCpc6uc/xLmZs4HC22frnaU8O1Yqd\nPvL7NBlUGL8ukxSfqbJNq4Qbs5KeUNA7Lneg+cQt0UKKsQ9eMfysFfvbhoKm\n1dl6FqSa4SgxPToViQYbohS/YPn62SCGx83TbdUVK9L0avvqdt+UorEHpXsH\nwC/pkoQ43R0PqgcfVMjIi8mPmydTsDH64APLr767zoy/LhVjAMIngUcvVmqZ\nY/YfPuEW6JDDZ9s/YidPCFMn/EJ8sx89Zk6vWwQxq/e0voFXzuh3YZZDH+6B\nKmF9\r\n=sjDC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","readme":"\n---\n

\n \n API Documentation\n   •  \n Getting In Touch (GitHub Discussions)\n \n

\n\n

\n \n \"GitHub\n \n \n \"Codecov\n \n \n \"license\"\n \n
\n \n \"Build\n \n \n \"Build\n \n

\n\n---\n\n# OpenTelemetry API for JavaScript\n\n[![NPM Published Version][npm-img]][npm-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devDependencies][devDependencies-image]][devDependencies-url]\n\nThis package provides everything needed to interact with the OpenTelemetry API, including all TypeScript interfaces, enums, and no-op implementations. It is intended for use both on the server and in the browser.\n\nThe methods in this package perform no operations by default. This means they can be safely called by a library or end-user application whether there is an SDK registered or not. In order to generate and export telemetry data, you will also need an SDK such as the [OpenTelemetry JS SDK][opentelemetry-js].\n\n## Tracing Quick Start\n\n### You Will Need\n\n- An application you wish to instrument\n- [OpenTelemetry JS SDK][opentelemetry-js]\n- Node.js >=8.5.0 (14+ is preferred) or an ECMAScript 5+ compatible browser\n\n**Note:** ECMAScript 5+ compatibility is for this package only. Please refer to the documentation for the SDK you are using to determine its minimum ECMAScript version.\n\n**Note for library authors:** Only your end users will need an OpenTelemetry SDK. If you wish to support OpenTelemetry in your library, you only need to use the OpenTelemetry API. For more information, please read the [tracing documentation][docs-tracing].\n\n### Install Dependencies\n\n```sh\nnpm install @opentelemetry/api @opentelemetry/tracing\n```\n\n### Trace Your Application\n\nIn order to get started with tracing, you will need to first register an SDK. The SDK you are using may provide a convenience method which calls the registration methods for you, but if you would like to call them directly they are documented here: [sdk registration methods][docs-sdk-registration].\n\nOnce you have registered an SDK, you can start and end spans. A simple example of basic SDK registration and tracing a simple operation is below. The example should export spans to the console once per second. For more information, see the [tracing documentation][docs-tracing].\n\n```javascript\nconst { trace } = require(\"@opentelemetry/api\");\nconst { BasicTracerProvider, ConsoleSpanExporter, SimpleSpanProcessor } = require(\"@opentelemetry/tracing\");\n\n// Create and register an SDK\nconst provider = new BasicTracerProvider();\nprovider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter()));\ntrace.setGlobalTracerProvider(provider);\n\n// Acquire a tracer from the global tracer provider which will be used to trace the application\nconst name = 'my-application-name';\nconst version = '0.1.0';\nconst tracer = trace.getTracer(name, version);\n\n// Trace your application by creating spans\nasync function operation() {\n const span = tracer.startSpan(\"do operation\");\n\n // mock some work by sleeping 1 second\n await new Promise((resolve, reject) => {\n setTimeout(resolve, 1000);\n })\n\n span.end();\n return output;\n}\n\nasync function main() {\n while (true) {\n await operation();\n }\n}\n\nmain();\n```\n\n## Version Compatibility\n\nBecause the npm installer and node module resolution algorithm could potentially allow two or more copies of any given package to exist within the same `node_modules` structure, the OpenTelemetry API takes advantage of a variable on the `global` object to store the global API. When an API method in the API package is called, it checks if this `global` API exists and proxies calls to it if and only if it is a compatible API version. This means if a package has a dependency on an OpenTelemetry API version which is not compatible with the API used by the end user, the package will receive a no-op implementation of the API.\n\n## Upgrade Guidelines\n\n### 0.21.0 to 1.0.0\n\nNo breaking changes\n\n### 0.20.0 to 0.21.0\n\n- [#78](https://github.com/open-telemetry/opentelemetry-js-api/issues/78) `api.context.bind` arguments reversed and `context` is now a required argument.\n- [#46](https://github.com/open-telemetry/opentelemetry-js-api/issues/46) Noop classes and singletons are no longer exported. To create a noop span it is recommended to use `api.trace.wrapSpanContext` with `INVALID_SPAN_CONTEXT` instead of using the `NOOP_TRACER`.\n\n### 1.0.0-rc.3 to 0.20.0\n\n- Removing `TimedEvent` which was not part of spec\n- `HttpBaggage` renamed to `HttpBaggagePropagator`\n- [#45](https://github.com/open-telemetry/opentelemetry-js-api/pull/45) `Span#context` renamed to `Span#spanContext`\n- [#47](https://github.com/open-telemetry/opentelemetry-js-api/pull/47) `getSpan`/`setSpan`/`getSpanContext`/`setSpanContext` moved to `trace` namespace\n- [#55](https://github.com/open-telemetry/opentelemetry-js-api/pull/55) `getBaggage`/`setBaggage`/`createBaggage` moved to `propagation` namespace\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: \n- For more about OpenTelemetry JavaScript: \n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[opentelemetry-js]: https://github.com/open-telemetry/opentelemetry-js\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js-api/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js-api.svg\n[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js-api\n[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js-api.svg?type=dev\n[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js-api?type=dev\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/api\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fapi.svg\n[docs-tracing]: https://github.com/open-telemetry/opentelemetry-js-api/blob/main/docs/tracing.md\n[docs-sdk-registration]: https://github.com/open-telemetry/opentelemetry-js-api/blob/main/docs/sdk-registration.md\n","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"25cf8a4f3fb97af933190e0557b281293a168816","scripts":{"docs":"typedoc","lint":"eslint src test --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p .","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node scripts/version-update.js","lint:fix":"eslint src test --ext .ts --fix","docs:test":"linkinator docs/out --silent --skip david-dm.org","docs:deploy":"gh-pages --dist docs/out","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ."},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js-api.git","type":"git"},"_npmVersion":"6.14.11","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.1","eslint":"7.28.0","codecov":"3.8.2","typedoc":"0.21.0-beta.1","webpack":"4.46.0","gh-pages":"3.2.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","linkinator":"2.13.6","typescript":"4.3.2","@types/node":"14.17.1","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"10.0.2","karma-webpack":"4.0.2","lerna-changelog":"1.0.1","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","eslint-plugin-header":"3.1.1","eslint-plugin-import":"2.23.4","karma-chrome-launcher":"3.1.0","@typescript-eslint/parser":"4.26.0","istanbul-instrumenter-loader":"3.0.1","@typescript-eslint/eslint-plugin":"4.26.0","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_1.0.0_1623340359892_0.34908205000666737","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@opentelemetry/api","version":"1.0.1","keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@1.0.1","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js-api#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-api/issues"},"dist":{"shasum":"03c72f548431da5820a0c8864d1401e348e7e79f","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-1.0.1.tgz","fileCount":310,"integrity":"sha512-H5Djcc2txGAINgf3TNaq4yFofYSIK3722PM89S/3R8FuI/eqi1UscajlXk7EBkG9s2pxss/q6SHlpturaavXaw==","signatures":[{"sig":"MEUCIExr2UkFiHum2r7Sf1xBePqGgHbFOeXQAPgjcpt2nIwbAiEAxv5O6YEqG4m13Jj+rTo0WNGUqpEmZCzYVaSpeBihBtw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":365959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1j8gCRA9TVsSAnZWagAAfZMP/37ApqByTwlCdwmFTK7V\nhprSQM3Ks7IT819U+stsM7axM2wFokD1vEd6u5yhbSQ3TB2f/2VRtA8Ita31\nPWFWRUjpIlpDA+LYlJjClFzO9BqhhK55Zn8U2IESWqyoTKo9S1F95u4oTaCd\nJd+uT0eq59BDmGuQD6o4IotmrSyAUCqQVIa97VZtiA2HO/lEIS38HgJ0X7ad\nj4UgQZsbimRMtFBn/bKvPcJHVq+idJd6EoqSjrWWOW2NcUuxYQNNfUivPfFV\nrYdeOtZHOry0WLLtO4Z2DkfyS45cQaU/eNKsJy0c3w7bX/9sOuui6FHzWr3y\nz+v5IbHXzWG+569yINlpK6TPlcksOmEN5/kYw4l9h+vgIULPf6W1mbI8DUZo\nYWDyv/SFAVAO5oynlEMMuGEDqiXu1rA6THHAzXEBTZmFGp3gQAmjHwHWFFfW\nOf48qYG1cKnycWdEixTbejVX8Ei03jl90x/RBpcc9rb4G0UN95tCamInl76v\nd1Zl1Go2xcaT9ZU+6ljDAsxgQMNIG0oXCSz1cYeoio+3scOgcnelJgdlZRXJ\nebE7vvmPXGRoiIEh34U/K/frsZakBm6pwy4gjcd/sbSSqHCvo/AbNWsfbAwf\n2GEYfEI0nTIOocH3hNMigvCMM8oqYmxubACFX8KWOhybji+QzdvB6m27rlmR\nsXvW\r\n=IDIa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"821a007a713ca1840b77e76f92a443191c780431","scripts":{"docs":"typedoc","lint":"eslint src test --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p .","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node scripts/version-update.js","lint:fix":"eslint src test --ext .ts --fix","docs:test":"linkinator docs/out --silent --skip david-dm.org","docs:deploy":"gh-pages --dist docs/out","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ."},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js-api.git","type":"git"},"_npmVersion":"6.14.11","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.1","eslint":"7.28.0","codecov":"3.8.2","typedoc":"0.21.0-beta.1","webpack":"4.46.0","gh-pages":"3.2.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","linkinator":"2.13.6","typescript":"4.3.2","@types/node":"14.17.1","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"10.0.2","karma-webpack":"4.0.2","lerna-changelog":"1.0.1","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","eslint-plugin-header":"3.1.1","eslint-plugin-import":"2.23.4","karma-chrome-launcher":"3.1.0","@typescript-eslint/parser":"4.26.0","istanbul-instrumenter-loader":"3.0.1","@typescript-eslint/eslint-plugin":"4.26.0","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_1.0.1_1624653599673_0.3700085723088007","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@opentelemetry/api","version":"1.0.2","keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@1.0.2","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js-api#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-api/issues"},"dist":{"shasum":"921e1f2b2484b762d77225a8a25074482d93fccf","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-1.0.2.tgz","fileCount":310,"integrity":"sha512-DCF9oC89ao8/EJUqrp/beBlDR8Bp2R43jqtzayqCoomIvkwTuPfLcHdVhIGRR69GFlkykFjcDW+V92t0AS7Tww==","signatures":[{"sig":"MEQCIDRNn5fvxNWbs+lgXuaSR/PVKiAfgRnMBMw2bumqMDwBAiBM8i8XGWyDVBccbhhZJjR8j3x2WJWJMzjNKxZJ3cwYZA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":369470,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAqHfCRA9TVsSAnZWagAAaxMP/joxepRMYi+dAMfJ6Z5h\nCU/z1LcxwHToXe9qeLdZjzxaA70NSMx4qvuTsfJhRvtOGqWG8csNuhJF97kw\n/w9fKcS9H6YxeWIKTy3RgFSpG1URBrhk1zDQeHxiCE6CK4PaKOwIHBSXZDb1\nH+WQqGw+a62GN4HNzWcRfk4xt6Tnh/B4Ae0u+k9Q9+0tqc52psfOyujY/CGq\nf868DPFgBuKSOnz28AGm/hbD5m3Y9f6XmT4CujEj0JVnvi2Zjo66xDk697Vu\nTKjY7C5jU1C0AcNPAnO61QBD2y/TVswc9FbFmM0A3vbfGENbEz70xECtRSBf\nMLC7KHkLE5UPawi48HpqRVyDPXBP2YjcIbwmd1sR+ZzC1izH8Cx4qAaHJv5k\nx6jsvXXHUJSteTkqsXbhjdH19eAQPj1wSVBbk3nDIkg+4beEn+UmA1WY1YNa\nhRteYs9Nv7xSrtwhUY9BFP+UYMt+AbWeatiRhcpo6hBmKe1ZU0NScyguKXwH\nSE/aNFqX0+rdZKVUMnhkkCVvtXmrqS3dVyiAptQkft9ujSAUhUhx7REibK9K\nTftjUNiqV44kfJSzP86+OLAlkSFNRMBZw+qL0eP92fYTfghLziZEJ6BylgpO\nrwDJRE0TIDJJbvN/f62/38rh171YFjjC68OifxxsBgwIBeq2BZXrHlgF3BSI\nwV34\r\n=dBFD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"5f45865d36ee9b0a7d9a66bef87c571869df8242","scripts":{"docs":"typedoc","lint":"eslint src test --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","build":"npm run compile","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p .","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node scripts/version-update.js","lint:fix":"eslint src test --ext .ts --fix","docs:test":"linkinator docs/out --silent --skip david-dm.org","docs:deploy":"gh-pages --dist docs/out","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ."},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js-api.git","type":"git"},"_npmVersion":"6.14.11","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.1","eslint":"7.30.0","codecov":"3.8.2","typedoc":"0.21.2","webpack":"4.46.0","gh-pages":"3.2.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","linkinator":"2.13.6","typescript":"4.3.5","@types/node":"14.17.4","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"10.0.2","karma-webpack":"4.0.2","lerna-changelog":"1.0.1","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","eslint-plugin-header":"3.1.1","eslint-plugin-import":"2.23.4","karma-chrome-launcher":"3.1.0","@typescript-eslint/parser":"4.28.1","istanbul-instrumenter-loader":"3.0.1","@typescript-eslint/eslint-plugin":"4.28.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_1.0.2_1627562463049_0.48723097483601063","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@opentelemetry/api","version":"1.0.3","keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@1.0.3","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js-api#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-api/issues"},"dist":{"shasum":"13a12ae9e05c2a782f7b5e84c3cbfda4225eaf80","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-1.0.3.tgz","fileCount":316,"integrity":"sha512-puWxACExDe9nxbBB3lOymQFrLYml2dVOrd7USiVRnSbgXE+KwBu+HxFvxrzfqsiSda9IWsXJG1ef7C1O2/GmKQ==","signatures":[{"sig":"MEQCIBTY1S2E0m18p5kfloB5aJrYDRRoJoA+Zut8BgA7cOlQAiBlYKNZyds8D07zoJVmF5DkMN14yv8+8vjSF2gNgZboqw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":372854,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLhmoCRA9TVsSAnZWagAAwkkQAJt/SSZ4STjocJfu6m+o\nkNx8KGJXWXrOHeiaQkZtP8hh/09D0UaL8fwgAeUw4jHrsb3GrZ9y/mdDVMIg\n4xqxDukEL5xHRjF89aa3656tZ3AdEaE1XQOilINSBXOwl5DFu22ilHenJ4UY\n1MtzRcX+Q8z1Tuua8ribztDkE19SzVHMaq+s91hU7p5SMGYP4qmfA1UMpBSX\nRlKxGFCjlJXa4SlDg6IQw/7yXlLo4+yb483iAR3tXRs3n/usb4R05vjpI/8+\n/MFE7oaJ5UbUAcQzVsMpuxwcBdBU3Z1gR3wyo3sMYtkq/FNrqCHx3Od8nIxr\n8d3vkiZVMjIpS1I/96CVLGMVPDuQ2egI3Of43gwY4G47pdAZehD332tRD0b6\nDqHUhGd6inNCMZU1gU7ChmN4PDwsCw3SzkRWF859lT5J//BMLKE3Gx0TzTSh\nbMiTnIo7KIxiGHHulG2vfvuE8ZX+lJ3kyKoAh5BP1YZSbcpcvew5jbcShvyl\njoa9ckcCbkEOK55uA+BxjI2uzfiAEQavrg4jmIwH60DW6ceUV3ZnlTbqalhD\nBFfhaAGe1wOu9fhoEK31fMDT9gfgTjtKM0fL0muh6snAi7yhCSqv3RPywUjf\nDXuOu0WgIdDVpYj2lO0Jb2vYLz5hkR+FeMG2mFT1tQDcM06OSv5FNXNuGFcg\nZEVR\r\n=ZL31\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"a752e7f814e7b335e50705d281cb2c6e1bd38a35","scripts":{"docs":"typedoc","lint":"eslint src test --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p .","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node scripts/version-update.js","lint:fix":"eslint src test --ext .ts --fix","prewatch":"npm run version","docs:test":"linkinator docs/out --silent --skip david-dm.org","precompile":"npm run version","cycle-check":"dpdm --exit-code circular:1 src/index.ts","docs:deploy":"gh-pages --dist docs/out","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ."},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js-api.git","type":"git"},"_npmVersion":"6.14.14","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.17.5","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"3.1.0","nyc":"15.1.0","dpdm":"3.7.1","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.1","eslint":"7.30.0","codecov":"3.8.2","typedoc":"0.21.2","webpack":"4.46.0","gh-pages":"3.2.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","linkinator":"2.13.6","typescript":"4.3.5","@types/node":"14.17.4","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"10.0.2","karma-webpack":"4.0.2","lerna-changelog":"1.0.1","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","eslint-plugin-header":"3.1.1","eslint-plugin-import":"2.23.4","karma-chrome-launcher":"3.1.0","@typescript-eslint/parser":"4.28.1","istanbul-instrumenter-loader":"3.0.1","@typescript-eslint/eslint-plugin":"4.28.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_1.0.3_1630411176029_0.8446706895073408","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"@opentelemetry/api","version":"1.0.4","keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@1.0.4","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js-api#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-api/issues"},"dist":{"shasum":"a167e46c10d05a07ab299fc518793b0cff8f6924","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-1.0.4.tgz","fileCount":316,"integrity":"sha512-BuJuXRSJNQ3QoKA6GWWDyuLpOUck+9hAXNMCnrloc1aWVoy6Xq6t9PUV08aBZ4Lutqq2LEHM486bpZqoViScog==","signatures":[{"sig":"MEUCIQCRimh8L2mpIo9AEMX8Q5Ta6tDGhRWknQ1pjlVi4LWv9gIgOl0I5lmexee5+MaZ9he0JFMPBGcJwki9vqaKMouk7ts=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":595555,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhw0xICRA9TVsSAnZWagAAEHkP/3+Z6lJz2bLgX4Qb5EjI\nN4frfiBqx/DZqTFicACTNNIeho2j2gDCvtNSFKrvdH12h9RCVwPfwbJpHtIN\nc36pn2JZhhaRP9T08GWQLEI6zavF7s9T8eXzbS77VCTdVEL3MmvCFMEif99B\nwdR+8DG95DtiKi5FQRrY7wDpeBkkR1JidtXCDGfsF83rBQG8d3FAAmJEmEpc\n0mrY0KowAIOP3C+qXyrtwXF0V+5lwgB09YDjnda6QDtDyizLuMIyjOhx+Aet\nRKYJEKdaU855r84X0y1wJaXi2TApbuxI+q3pfVlczA8Ip+rpQzlXhHsgEoj9\naMzYUyOD1iuUQljbWu3oistnbUDHE0E59BXE/KqDfjb7zClaWzUJXwmbctdE\nixMRHPmqx/r+rO88mCWL9B2/G1zJGL/0T2pXd0ERJ4FoXM8DmMe3C3Lwr9zI\nv6tv+Yfm6fhKgUOPd/Fuq0oYXdciQVmalOKOGTMJL72JpvOopKVoLQYMkC6Q\n3ZqOPs8m1CMe6yNTDDg39a8ce1FbKL++1AcAnASoc3HSRjqIeO0wHcOyuh1d\nH7K867t/DfmQgcI6dA3QfEuOx6/jQGTflhMiXD7SOXlak5dwodKQD5BZO16m\nGXtt7hhoOM9eCtll98r9lv4EOQxg+coFFkrpbtFUepxnlzbtKzJBx5GJJf3Q\ndJbb\r\n=PlAq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"51b958e8de7c98e61c84f840c688de1d016f9310","scripts":{"docs":"typedoc","lint":"eslint src test --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p .","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node scripts/version-update.js","lint:fix":"eslint src test --ext .ts --fix","prewatch":"npm run version","docs:test":"linkinator docs/out --silent && linkinator docs/*.md *.md --markdown --silent","precompile":"npm run version","cycle-check":"dpdm --exit-code circular:1 src/index.ts","docs:deploy":"gh-pages --dist docs/out","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ."},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js-api.git","type":"git"},"_npmVersion":"6.14.15","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.18.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","dpdm":"3.7.1","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.1","eslint":"7.32.0","codecov":"3.8.2","typedoc":"0.21.2","webpack":"4.46.0","gh-pages":"3.2.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","linkinator":"2.13.6","typescript":"4.3.5","@types/node":"14.17.4","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"10.0.2","karma-webpack":"4.0.2","lerna-changelog":"1.0.1","@types/webpack-env":"1.16.0","eslint-plugin-node":"11.1.0","karma-spec-reporter":"0.0.32","eslint-plugin-header":"3.1.1","karma-chrome-launcher":"3.1.0","@typescript-eslint/parser":"5.0.0","istanbul-instrumenter-loader":"3.0.1","@typescript-eslint/eslint-plugin":"5.0.0","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_1.0.4_1640189000362_0.8159627187702121","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@opentelemetry/api","version":"1.1.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@1.1.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js-api#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-api/issues"},"dist":{"shasum":"563539048255bbe1a5f4f586a4a10a1bb737f44a","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-1.1.0.tgz","fileCount":346,"integrity":"sha512-hf+3bwuBwtXsugA2ULBc95qxrOqP2pOekLz34BJhcAKawt94vfeNyUKpYc0lZQ/3sCP6LqRa7UAdHA7i5UODzQ==","signatures":[{"sig":"MEUCICzcWlT926QWEdH1gPyxwituL+9telvQ7dGU07Mh6sXJAiEAvlCbrWhUmFgEAM++gp8BCvT0gU/ZZNhVwT4tlo4N01g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":646983,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8sghCRA9TVsSAnZWagAAOZ0P/1Dsy0/JLjaXALUQyDVB\nioNO73OqFyxUx27JTNSOhpF0PtTogR6BYGyH3ATkr1IXfcGQtQpYAkE6oad0\nsuk/Lta50g4Aav9H9Rsg6616d81Ea8LvHhFL8ZgXRgVzD2BY2rf1aFOEb/JQ\n3iWsRkP+vOY3t+F6eQJ4mQBdHChZjWRure/h7NTewSqPowFPrH7oR5bXFbTC\nN2BAyIObFpJeIRkpxt9MAnhvw5U3heMfHu1nwixenAteESVMqFC+OQam8Djr\np7IkKpQLnjHlr65Z8acLa8Nj1XCMnq3e3/GBZ+mTUpt6cXfX6viG5eM4+U4k\nbATVe0sd+wvOkdPKAIMeDUXSHbu2vGevk5vKg9O1FKbncs/M6ezB8bVYaWXB\nLu6C9rpbd+jw/LfMrpybJ8HY2iSmcMOHEBumXzCRh1VsZKbI2K3RBz45u1yp\nqyIVLAb+h//m02s4GSw3v/A4xFd61WCLfhn2MoyMf5kzN0QI9uwG7+iJLy8U\nUXtYz49Y5ejO4Ovv4A4zwoMA3h4BeAu0+r2PNuyfstvQYNbW5FWQ5FzYTy2m\n0ELy+PMAFl/C1aDqDf5HgBVnT1mhLwWA7PMOgntYFOIICk+i5UpqN3MVHpGD\njtW2y1RMbqsCVvQ9XRu5b8iCRJJlt+vYHrh/Gzb8FCpoNjwXnHVMWLzgM6zf\nNFis\r\n=yG8N\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"24f1cb8471249f0bc10e41a3f07e6728a137682b","scripts":{"docs":"typedoc","lint":"eslint src test --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p .","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node scripts/version-update.js","lint:fix":"eslint src test --ext .ts --fix","prewatch":"npm run version","docs:test":"linkinator docs/out --silent && linkinator docs/*.md *.md --markdown --silent","precompile":"npm run version","cycle-check":"dpdm --exit-code circular:1 src/index.ts","docs:deploy":"gh-pages --dist docs/out","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ."},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js-api.git","type":"git"},"_npmVersion":"6.14.15","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.18.3","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","dpdm":"3.7.1","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.1","eslint":"7.32.0","codecov":"3.8.2","typedoc":"0.21.2","webpack":"4.46.0","gh-pages":"3.2.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","linkinator":"2.13.6","typescript":"4.3.5","@types/node":"14.17.4","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"10.0.2","karma-webpack":"4.0.2","lerna-changelog":"1.0.1","@types/webpack-env":"1.16.0","eslint-plugin-node":"11.1.0","karma-spec-reporter":"0.0.32","eslint-plugin-header":"3.1.1","karma-chrome-launcher":"3.1.0","@typescript-eslint/parser":"5.0.0","istanbul-instrumenter-loader":"3.0.1","@typescript-eslint/eslint-plugin":"5.0.0","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_1.1.0_1643300897048_0.701795531041127","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"@opentelemetry/api","version":"1.2.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@1.2.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js-api#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js-api/issues"},"dist":{"shasum":"89ef99401cde6208cff98760b67663726ef26686","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-1.2.0.tgz","fileCount":346,"integrity":"sha512-0nBr+VZNKm9tvNDZFstI3Pq1fCTEDK5OZTnVKNvBNAKgd0yIvmwsP4m61rEv7ZP+tOUjWJhROpxK5MsnlF911g==","signatures":[{"sig":"MEUCIQDCrM7FtetADSEPCNwo006CB9vCsxiQXJCDG0VfqKqWZAIgOR2cxI7GoCSplvigzpcRDE+fffv6SqA1nf9wmWV8jsw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":650533,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/o9mACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo7LQ/+JLkcjBaKEBrlmOMsddIRLdgRG9Rldxr1/imcsjrisvICz3p0\r\nonimOV8rYw3wOJ/6Mj3X00bNXkspd/u+QCefMc7puNxhhQMrdF/GQ8l7MGZ+\r\n/go/ABmJaZ553aHrcWQy/HpWv//vMRJ6oCwjXshHChA5wYTaQbHaiolodeqX\r\n5aEKr4zRmApMrZVcJolj0xW9QdyWgSKTvp6rdaI0neCreuoKqSE9cN5lHnaA\r\nNWUW2HNmYb1ul3ZpLVCJlAw8hhxTWFaO3cZWsxa0xOEbafRk6wcRKDX7EbOi\r\n1vnS0cINdXF29T+u/wnrUG8CTv73iWKbnd2XtvPolOIUdOlEqEBpLcV5tcOr\r\nvZamYQOK0+GALG9hfi+Y4nLucnjV/OyZ77acBSiWWcIJs91VgrvlzLTYsHgl\r\nTsvX1Vy8Zdyly/n+c1O8bVayLHp2f7QHgX/1Ej6jCzdnx4Nlp6QPqk44RGHS\r\n4PHmZ8RQAvLzoylrSEF7gkAB8L5vYOnVB2Ga2ijahro3BVGZ+4fhoVtq+A0/\r\nwux7qmXobe/EwQ+ja/3h/pN+f8KlDTgm0091SDlK2fkF4U3Ubx2F2tllCyqp\r\nmGFU7Pih86R1i7y7xzLo76LJqCwW7YwEpdTGeZqrCRaJWuUb3mwyvFSTrval\r\nYyvxMBGmrB+3HjrZ87V4Z4VaxBSAqT8zy9o=\r\n=2JVf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"d2fb7061a87c48dc68acc384dc68821174323a32","scripts":{"docs":"typedoc","lint":"eslint src test --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p .","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node scripts/version-update.js","lint:fix":"eslint src test --ext .ts --fix","prewatch":"npm run version","docs:test":"linkinator docs/out --silent && linkinator docs/*.md *.md --markdown --silent","precompile":"npm run version","cycle-check":"dpdm --exit-code circular:1 src/index.ts","docs:deploy":"gh-pages --dist docs/out","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ."},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js-api.git","type":"git"},"_npmVersion":"6.14.17","description":"Public API for OpenTelemetry","directories":{},"_nodeVersion":"14.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","dpdm":"3.7.1","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.1","eslint":"7.32.0","codecov":"3.8.2","typedoc":"0.21.2","webpack":"4.46.0","gh-pages":"3.2.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","linkinator":"2.13.6","typescript":"4.3.5","@types/node":"14.17.4","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"10.0.2","karma-webpack":"4.0.2","lerna-changelog":"1.0.1","@types/webpack-env":"1.16.0","eslint-plugin-node":"11.1.0","karma-spec-reporter":"0.0.32","eslint-plugin-header":"3.1.1","karma-chrome-launcher":"3.1.0","@typescript-eslint/parser":"5.0.0","istanbul-instrumenter-loader":"3.0.1","@typescript-eslint/eslint-plugin":"5.0.0","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_1.2.0_1660850021932_0.3542051796664316","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"@opentelemetry/api","version":"1.3.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@1.3.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/api","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"27c6f776ac3c1c616651e506a89f438a0ed6a055","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-1.3.0.tgz","fileCount":411,"integrity":"sha512-YveTnGNsFFixTKJz09Oi4zYkiLT5af3WpZDu4aIUM7xX+2bHAkOJayFTVQd6zB8kkWPpbua4Ha6Ql00grdLlJQ==","signatures":[{"sig":"MEYCIQD8CUdBXgBkidMYp8gO+zbiJh81FHln8Wr5ltsbK1u8gQIhAJmJMrNmi/q6kmuoM2G0CP+j8RGXvPNVQaHUBB+ypkov","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":773758,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJja/LuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqz9w//exrZU19kw9PBP/k+dBsXNwRRwWvCHv+pJ7QaRPpQ9HdXJOX2\r\nNmbEcSKGGL9DBuK5gCq4jTxpAPDi+zzSIFOb6QPaKZXYF1SiQb6HmtpKyy0p\r\nj8TdTSENkF+vOK1vvFte9TVwdQ30fgtinJffuKipu/SdUBOsnXYhmWg8j2bK\r\nVghv0U7Dxf/C8gYQOdvdfE6fAWw5KikhR58JYviM3DZsY755II9cKqI5NkBb\r\nB4UTvKiNsVDDJIyqgQbspVWr38KNo72SkXsQTSsDqdafqMKLr2JW4SINSbGO\r\nVNqpVUK5yX2AUegXZ59wRARMVEiBx+WTSaiOO/SwkV9Gbge+ZAE2Y7vAyyRp\r\nAhCCnKN1vq9juXoAXQUsCurEvNpquTbnj17t8ANvkcMctBBKyja+0Yg/SI85\r\nFzEEMvO5GK61N4+wJTQadEmkI1HwfqeRESBXh2pawZFtLa56ryxg1kf5r6hE\r\nYhw19nu4mm1tlTVMzThXejsw+5s64VYyd+i7NR+BNInb8TMOHOYHlDrLj6DG\r\n25jSP3aa68BpoMm5mDY3m4evo5IElRZS4zWvG3ja6WIl1TecNH7m517Yp8Mp\r\nUtddN/jNO+0EsgCqXKeRkbe+THPyJT9itN9oizNYi8FCavZ39j7PM3eRz8pO\r\nheYkwpR+S3hw6yj3jQcur9mwtTc5Fh1aU8I=\r\n=a6Kw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","readme":"\n---\n

\n \n API Documentation\n   •  \n Getting In Touch (GitHub Discussions)\n \n

\n\n

\n \n \"GitHub\n \n \n \"Codecov\n \n \n \"license\"\n \n
\n \n \"Build\n \n \n \"Build\n \n

\n\n---\n\n# OpenTelemetry API for JavaScript\n\n[![NPM Published Version][npm-img]][npm-url]\n\nThis package provides everything needed to interact with the OpenTelemetry API, including all TypeScript interfaces, enums, and no-op implementations. It is intended for use both on the server and in the browser.\n\nThe methods in this package perform no operations by default. This means they can be safely called by a library or end-user application whether there is an SDK registered or not. In order to generate and export telemetry data, you will also need an SDK such as the [OpenTelemetry JS SDK][opentelemetry-js].\n\n## Tracing Quick Start\n\n### You Will Need\n\n- An application you wish to instrument\n- [OpenTelemetry JS SDK][opentelemetry-js]\n- Node.js >=8.5.0 (14+ is preferred) or an ECMAScript 5+ compatible browser\n\n**Note:** ECMAScript 5+ compatibility is for this package only. Please refer to the documentation for the SDK you are using to determine its minimum ECMAScript version.\n\n**Note for library authors:** Only your end users will need an OpenTelemetry SDK. If you wish to support OpenTelemetry in your library, you only need to use the OpenTelemetry API. For more information, please read the [tracing documentation][docs-tracing].\n\n### Install Dependencies\n\n```sh\nnpm install @opentelemetry/api @opentelemetry/sdk-trace-base\n```\n\n### Trace Your Application\n\nIn order to get started with tracing, you will need to first register an SDK. The SDK you are using may provide a convenience method which calls the registration methods for you, but if you would like to call them directly they are documented here: [sdk registration methods][docs-sdk-registration].\n\nOnce you have registered an SDK, you can start and end spans. A simple example of basic SDK registration and tracing a simple operation is below. The example should export spans to the console once per second. For more information, see the [tracing documentation][docs-tracing].\n\n```javascript\nconst { trace } = require(\"@opentelemetry/api\");\nconst { BasicTracerProvider, ConsoleSpanExporter, SimpleSpanProcessor } = require(\"@opentelemetry/sdk-trace-base\");\n\n// Create and register an SDK\nconst provider = new BasicTracerProvider();\nprovider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter()));\ntrace.setGlobalTracerProvider(provider);\n\n// Acquire a tracer from the global tracer provider which will be used to trace the application\nconst name = 'my-application-name';\nconst version = '0.1.0';\nconst tracer = trace.getTracer(name, version);\n\n// Trace your application by creating spans\nasync function operation() {\n const span = tracer.startSpan(\"do operation\");\n\n // mock some work by sleeping 1 second\n await new Promise((resolve, reject) => {\n setTimeout(resolve, 1000);\n })\n\n span.end();\n}\n\nasync function main() {\n while (true) {\n await operation();\n }\n}\n\nmain();\n```\n\n## Version Compatibility\n\nBecause the npm installer and node module resolution algorithm could potentially allow two or more copies of any given package to exist within the same `node_modules` structure, the OpenTelemetry API takes advantage of a variable on the `global` object to store the global API. When an API method in the API package is called, it checks if this `global` API exists and proxies calls to it if and only if it is a compatible API version. This means if a package has a dependency on an OpenTelemetry API version which is not compatible with the API used by the end user, the package will receive a no-op implementation of the API.\n\n## Upgrade Guidelines\n\n### 0.21.0 to 1.0.0\n\nNo breaking changes\n\n### 0.20.0 to 0.21.0\n\n- [#78](https://github.com/open-telemetry/opentelemetry-js-api/issues/78) `api.context.bind` arguments reversed and `context` is now a required argument.\n- [#46](https://github.com/open-telemetry/opentelemetry-js-api/issues/46) Noop classes and singletons are no longer exported. To create a noop span it is recommended to use `api.trace.wrapSpanContext` with `INVALID_SPAN_CONTEXT` instead of using the `NOOP_TRACER`.\n\n### 1.0.0-rc.3 to 0.20.0\n\n- Removing `TimedEvent` which was not part of spec\n- `HttpBaggage` renamed to `HttpBaggagePropagator`\n- [#45](https://github.com/open-telemetry/opentelemetry-js-api/pull/45) `Span#context` renamed to `Span#spanContext`\n- [#47](https://github.com/open-telemetry/opentelemetry-js-api/pull/47) `getSpan`/`setSpan`/`getSpanContext`/`setSpanContext` moved to `trace` namespace\n- [#55](https://github.com/open-telemetry/opentelemetry-js-api/pull/55) `getBaggage`/`setBaggage`/`createBaggage` moved to `propagation` namespace\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: \n- For more about OpenTelemetry JavaScript: \n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[opentelemetry-js]: https://github.com/open-telemetry/opentelemetry-js\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/api/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/api\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fapi.svg\n[docs-tracing]: https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/tracing.md\n[docs-sdk-registration]: https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/sdk-registration.md\n","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"27c4f762948c9b8d693d5ce1c2df5aaa5b0e92ee","scripts":{"docs":"typedoc","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","docs:test":"linkinator docs/out --silent && linkinator docs/*.md *.md --markdown --silent","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","cycle-check":"dpdm --exit-code circular:1 src/index.ts","docs:deploy":"gh-pages --dist docs/out","test:browser":"nyc karma start --single-run","peer-api-check":"node ../scripts/peer-api-check.js","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"8.1.2","description":"Public API for OpenTelemetry","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","dpdm":"3.10.0","karma":"6.3.16","memfs":"3.4.9","mocha":"10.0.0","sinon":"14.0.0","codecov":"3.8.3","unionfs":"4.4.0","webpack":"4.46.0","ts-mocha":"10.0.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@types/webpack":"4.41.26","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_1.3.0_1668018926306_0.6542671449937483","host":"s3://npm-registry-packages"}},"1.4.0":{"name":"@opentelemetry/api","version":"1.4.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@1.4.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/api","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"2c91791a9ba6ca0a0f4aaac5e45d58df13639ac8","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-1.4.0.tgz","fileCount":411,"integrity":"sha512-IgMK9i3sFGNUqPMbjABm0G26g0QCKCUBfglhQ7rQq6WcxbKfEHRcmwsoER4hZcuYqJgkYn2OeuoJIv7Jsftp7g==","signatures":[{"sig":"MEUCIQDzaltzlePvwfUMmb5B/niIOf8gficyyY1jK6Ryi5LHhgIgCI09A2uiKcTDL4sPwiODox7eNceH9hYVII/kwNEY9jA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":777562,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvy4iACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpxVA/9G6yhWyPFHrp5F7e5PG1Wzg9OLbW3eB/TBxSNCZkPkfRF7gE1\r\nqgv/mNYEjx21AKWN02FqhJ2ogF066NrLy2DWivBe51xj23bQjBbytPTFlRP/\r\nbRpyJtGZLnH9URmOKgDCW2yTLWECjY4wOoPK+jTlUdyY4xsa6pg0Pa5SPWem\r\n7ZVk4RsjWK/DnRI4BqWHSGXXEG2in5maWJxxPzFLq67EEt81+Gxiwj6xzWAr\r\nXRBvioNz7DjduykYPGkcvnOxKUJtJNBH+nMKNJqqZ+2tgNBtjL+XAc+nfAWx\r\nsn8RKHjaquiRVOgWraCcjlocu8tQ+hr7Eu/xE61uze6yUent/1BaNtrIon96\r\nXNonHYblW6XaSiPw1Q3zxcZEfa+yuvncOmBdFL8QA1Z5gm48piBStgyT9XH5\r\nMmG+s3CeLHSwE2l/zKgDFxv1tHVh4crP7AXa7LRPgbBv/ITnUpLC+fBxjJXD\r\n3yyrs+DbrggH0PZX9b7qVPxPlakcScf8tK36yovR5NqVP2PIxu9dxbk3FViw\r\n5swpDUYZ5wbyvUerR+I8Fj559bbAxVISHXGfiDi0vTWpU+c0xJoAOZRvwLCc\r\n/e+bhh8fSx1aHePpQsaN4Q0MnZgOJ9A0m0sW42/SUH1LOh6Ng1wFgq+k3dvI\r\nhAP7fvZsT8k8TxPf54RRw83ctxIKFRexXzQ=\r\n=EXfN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"08f597f3a3d71a4852b0afbba120af15ca038121","scripts":{"docs":"typedoc","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","docs:test":"linkinator docs/out --silent && linkinator docs/*.md *.md --markdown --silent","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","cycle-check":"dpdm --exit-code circular:1 src/index.ts","docs:deploy":"gh-pages --dist docs/out","test:browser":"nyc karma start --single-run","peer-api-check":"node ../scripts/peer-api-check.js","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"Public API for OpenTelemetry","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","dpdm":"3.10.0","karma":"6.3.16","memfs":"3.4.9","mocha":"10.0.0","sinon":"15.0.0","codecov":"3.8.3","unionfs":"4.4.0","webpack":"4.46.0","ts-mocha":"10.0.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@types/webpack":"4.41.26","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_1.4.0_1673473570251_0.04609694096080963","host":"s3://npm-registry-packages"}},"1.4.1":{"name":"@opentelemetry/api","version":"1.4.1","keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@1.4.1","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/api","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"ff22eb2e5d476fbc2450a196e40dd243cc20c28f","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-1.4.1.tgz","fileCount":411,"integrity":"sha512-O2yRJce1GOc6PAy3QxFM4NzFiWzvScDC1/5ihYBL6BUEVdq0XMWN01sppE+H6bBXbaFYipjwFLEWLg5PaSOThA==","signatures":[{"sig":"MEQCIGT5pnxH/gHoj4lSFF/LYoK5dpTtksbtDAAemi+bpOECAiAhxBThmaYqEv3rTBze2JWhZjD+TPkokIBqHf/LalWt5A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":780322,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkD0b7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp9Pw//bgiXhyvN22UV4wtA3hk6syJD5/SM/0OqmJIs8zy2OtvtdAt4\r\nWtS82IKN7efWXUYHuFggizBTKoP7RvO/urzQ4W9eNNy75O30aCmNxjhYvtPD\r\ns8szpUwbOaFqoIlQlJdfagkJGOArdikUVf8eDw4MQ0E4cpYsBJ/XCb34vEis\r\nzQLb8bjKxe6LUdHoX+uPaHS5+uNqXrUOJl0S3n6yf4qHa+uDLAZEbPboj4ow\r\n+CZxkRpfgsBqeQWkBCMam/8HORTdP/pnzTtd2D7dFxnw6d0eZLZ81NSMBTZG\r\nYfKr955fobrjDYDtdR5tiGEhQHePJPrBc/5pQNEItXGPfQ7Ha5V38I8FJ8YN\r\no0JOAlalfRdDFOQl+hZML9hNsZg5tP5v1uipSRWu8fgdSd9LVSQrAHrw6oPP\r\nlL0cmJ5eSXzA0rOHHSmvtZmZ410ZR9x0mtE9K2reHJFCyqNs2XueoFyXmqgJ\r\nWSW95OyO+wPSaZeVBF1NmyfICgcAeo6xowmXzOX3GClkxxAESFWzaFSsPLZm\r\nikt3rQolfBK8Y0ygAcFRpERAkR16qitIswe/1MLnX7PTb+c/iVQ3u46EVrpx\r\nvTZcAV009eF8C+aPJS7WSizcUADDXEY3hPlWfKhWtPqH2o2TCiiPE03lA3oD\r\n5PIT9eVFkC/wk/AhQjcHUxEXqDMMXlHL9C4=\r\n=7zw7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"56e6b1bb890f844b8963a146780d0b9cfa8abd0d","scripts":{"docs":"typedoc","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","docs:test":"linkinator docs/out --silent && linkinator docs/*.md *.md --markdown --silent","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","cycle-check":"dpdm --exit-code circular:1 src/index.ts","docs:deploy":"gh-pages --dist docs/out","test:browser":"nyc karma start --single-run","peer-api-check":"node ../scripts/peer-api-check.js","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"Public API for OpenTelemetry","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","dpdm":"3.10.0","karma":"6.3.16","memfs":"3.4.9","mocha":"10.0.0","sinon":"15.0.0","codecov":"3.8.3","unionfs":"4.4.0","webpack":"4.46.0","ts-mocha":"10.0.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@types/webpack":"4.41.26","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/api_1.4.1_1678722811286_0.7216115275740891","host":"s3://npm-registry-packages"}},"1.5.0":{"name":"@opentelemetry/api","version":"1.5.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@1.5.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/api","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"4ff2709035a9896ec1aa8f5353ba2277737cae5d","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-1.5.0.tgz","fileCount":411,"integrity":"sha512-636km3y3pVyJldKGp9qM+lPvxuOvhThUED9cHNPsERkp+APbdtCtj0sALW+mZsbQqnqQkNRHqoGw/Uc82UP6fQ==","signatures":[{"sig":"MEYCIQDxDkiDAocHnmMuctR3QhqFxZlJ1HnrZYy/kztPaTsSNAIhALrZw8K0AeJjLLwTsrERbt926cTC5h8txyLJY1fbiMNt","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":782488},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"5fcd8cf136e2235903dde3df9ba03ced594f0e95","scripts":{"docs":"typedoc","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","test:eol":"ts-mocha -p tsconfig.json 'test/**/*.test.ts'","docs:test":"linkinator docs/out --silent && linkinator docs/*.md *.md --markdown --silent","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","cycle-check":"dpdm --exit-code circular:1 src/index.ts","docs:deploy":"gh-pages --dist docs/out","test:browser":"karma start --single-run","peer-api-check":"node ../scripts/peer-api-check.js","test:webworker":"karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"deprecated":"Version 1.5.0 of @opentelemetry/api mistakenly contained a breaking change for some users. Please update to 1.6.0 or later.","repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.5/node@v18.12.1+x64 (linux)","description":"Public API for OpenTelemetry","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","dpdm":"3.13.1","karma":"6.4.2","lerna":"7.1.5","memfs":"3.5.3","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","unionfs":"4.5.1","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.1","@types/sinon":"10.0.16","karma-webpack":"4.0.2","@types/webpack":"4.41.33","karma-coverage":"2.2.1","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/api_1.5.0_1694434462548_0.5315848607176739","host":"s3://npm-registry-packages"}},"1.6.0":{"name":"@opentelemetry/api","version":"1.6.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@1.6.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/api","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"de2c6823203d6f319511898bb5de7e70f5267e19","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-1.6.0.tgz","fileCount":411,"integrity":"sha512-OWlrQAnWn9577PhVgqjUvMr1pg57Bc4jv0iL4w0PRuOSRvq67rvHW9Ie/dZVMvCzhSCB+UxhcY/PmCmFj33Q+g==","signatures":[{"sig":"MEUCIQCO9WnTvxA6MQjm3TXCujesARChZYWOdfcGpAXmfl6xNQIgJln63Qa/062urWUpgGiBATq39nrzYlEVpBHfpcDx354=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":780443},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"faf939c77591f709afbc23fadbe629c9d3607ef6","scripts":{"docs":"typedoc","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","test:eol":"ts-mocha -p tsconfig.json 'test/**/*.test.ts'","docs:test":"linkinator docs/out --silent && linkinator docs/*.md *.md --markdown --silent","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","cycle-check":"dpdm --exit-code circular:1 src/index.ts","docs:deploy":"gh-pages --dist docs/out","test:browser":"karma start --single-run","peer-api-check":"node ../scripts/peer-api-check.js","test:webworker":"karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.5/node@v18.12.1+x64 (linux)","description":"Public API for OpenTelemetry","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","dpdm":"3.13.1","karma":"6.4.2","lerna":"7.1.5","memfs":"3.5.3","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","unionfs":"4.5.1","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.1","@types/sinon":"10.0.16","karma-webpack":"4.0.2","@types/webpack":"4.41.33","karma-coverage":"2.2.1","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/api_1.6.0_1694524345231_0.5100705712274942","host":"s3://npm-registry-packages"}},"1.7.0":{"name":"@opentelemetry/api","version":"1.7.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@1.7.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/api","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"b139c81999c23e3c8d3c0a7234480e945920fc40","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-1.7.0.tgz","fileCount":615,"integrity":"sha512-AdY5wvN0P2vXBi3b29hxZgSFvdhdxPB9+f0B6s//P9Q8nibRWeA3cHm8UmLpio9ABigkVHJ5NMPk+Mz8VCCyrw==","signatures":[{"sig":"MEUCIFWqxhqKSeEezKywFrho/r93NXg8myaF1+B4xQHQsUymAiEA8zPBvQG5638UKzLCh/tacBb7wYVxSCdVX1jm7HXB9hc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1146473},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"73b446688f10fd8dc4cf403a085f0a39070df7b4","scripts":{"docs":"typedoc","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","test:eol":"ts-mocha -p tsconfig.json 'test/**/*.test.ts'","docs:test":"linkinator docs/out --silent && linkinator docs/*.md *.md --markdown --silent","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","cycle-check":"dpdm --exit-code circular:1 src/index.ts","docs:deploy":"gh-pages --dist docs/out","test:browser":"karma start --single-run","peer-api-check":"node ../scripts/peer-api-check.js","test:webworker":"karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.18.2+x64 (linux)","description":"Public API for OpenTelemetry","directories":{},"sideEffects":false,"_nodeVersion":"18.18.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","dpdm":"3.13.1","karma":"6.4.2","lerna":"6.6.2","memfs":"3.5.3","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","unionfs":"4.5.1","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.3","@types/sinon":"10.0.20","karma-webpack":"4.0.2","@types/webpack":"4.41.35","karma-coverage":"2.2.1","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/api_1.7.0_1699353880416_0.3872071570298008","host":"s3://npm-registry-packages"}},"1.8.0":{"name":"@opentelemetry/api","version":"1.8.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/api@1.8.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/api","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"5aa7abb48f23f693068ed2999ae627d2f7d902ec","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-1.8.0.tgz","fileCount":642,"integrity":"sha512-I/s6F7yKUDdtMsoBWXJe8Qz40Tui5vsuKCWJEWVL+5q9sSWRzzx6v2KeNsOBEwd94j0eWkpWCH4yB6rZg9Mf0w==","signatures":[{"sig":"MEQCIBWUxegCVK8RYSQyADGNtLgr761+qLVha4WzG5CugornAiB4xtg6ge+jo7cCJSjJl5IaQ+3MaQWogD/iOVZTLeC3Lg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1206276},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"exports":{".":{"types":"./build/src/index.d.ts","esnext":"./build/esnext/index.js","module":"./build/esm/index.js","default":"./build/src/index.js"},"./experimental":{"types":"./build/src/experimental/index.d.ts","esnext":"./build/esnext/experimental/index.js","module":"./build/esm/experimental/index.js","default":"./build/src/experimental/index.js"}},"gitHead":"7be35c7845e206b27b682e8ce1cee850b09cec04","scripts":{"docs":"typedoc","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","test:eol":"ts-mocha -p tsconfig.json 'test/**/*.test.ts'","docs:test":"linkinator docs/out --silent && linkinator docs/*.md *.md --markdown --silent","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","cycle-check":"dpdm --exit-code circular:1 src/index.ts","docs:deploy":"gh-pages --dist docs/out","test:browser":"karma start --single-run","peer-api-check":"node ../scripts/peer-api-check.js","test:webworker":"karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"Public API for OpenTelemetry","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","dpdm":"3.13.1","karma":"6.4.2","lerna":"6.6.2","memfs":"3.5.3","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","unionfs":"4.5.1","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.6","@types/sinon":"10.0.20","karma-webpack":"4.0.2","@types/webpack":"5.28.5","karma-coverage":"2.2.1","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/api_1.8.0_1709198284897_0.4745281152459706","host":"s3://npm-registry-packages"}},"1.9.0":{"name":"@opentelemetry/api","version":"1.9.0","description":"Public API for OpenTelemetry","main":"build/src/index.js","module":"build/esm/index.js","esnext":"build/esnext/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"exports":{".":{"module":"./build/esm/index.js","esnext":"./build/esnext/index.js","types":"./build/src/index.d.ts","default":"./build/src/index.js"},"./experimental":{"module":"./build/esm/experimental/index.js","esnext":"./build/esnext/experimental/index.js","types":"./build/src/experimental/index.d.ts","default":"./build/src/experimental/index.js"}},"repository":{"type":"git","url":"git+https://github.com/open-telemetry/opentelemetry-js.git"},"scripts":{"clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","docs":"typedoc","docs:deploy":"gh-pages --dist docs/out","docs:test":"linkinator docs/out --silent && linkinator docs/*.md *.md --markdown --silent","lint:fix":"eslint . --ext .ts --fix","lint":"eslint . --ext .ts","test:browser":"karma start --single-run","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","test:eol":"ts-mocha -p tsconfig.json 'test/**/*.test.ts'","test:webworker":"karma start karma.worker.js --single-run","cycle-check":"dpdm --exit-code circular:1 src/index.ts","version":"node ../scripts/version-update.js","prewatch":"npm run precompile","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","peer-api-check":"node ../scripts/peer-api-check.js"},"keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","engines":{"node":">=8.0.0"},"publishConfig":{"access":"public"},"devDependencies":{"@types/mocha":"10.0.6","@types/node":"18.6.5","@types/sinon":"17.0.3","@types/webpack":"5.28.5","@types/webpack-env":"1.16.3","babel-plugin-istanbul":"6.1.1","codecov":"3.8.3","cross-var":"1.1.0","dpdm":"3.13.1","karma":"6.4.3","karma-chrome-launcher":"3.1.0","karma-coverage":"2.2.1","karma-mocha":"2.0.1","karma-mocha-webworker":"1.3.0","karma-spec-reporter":"0.0.36","karma-webpack":"5.0.1","lerna":"6.6.2","memfs":"3.5.3","mocha":"10.2.0","nyc":"15.1.0","sinon":"15.1.2","ts-loader":"9.5.1","ts-mocha":"10.0.0","typescript":"4.4.4","unionfs":"4.5.4","webpack":"5.89.0"},"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/api","sideEffects":false,"gitHead":"c4d3351b6b3f5593c8d7cbfec97b45cea9fe1511","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"_id":"@opentelemetry/api@1.9.0","_nodeVersion":"18.19.0","_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","dist":{"integrity":"sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==","shasum":"d03eba68273dc0f7509e2a3d5cba21eae10379fe","tarball":"https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz","fileCount":642,"unpackedSize":1218213,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD5JhjunJ5QH3ifhIkfIf7mUTMZo59URC45qn9JaWvmawIhAJtiHfG88EtN6LBF70xACXxS71Sw7cISXhK9JYrMVLGi"}]},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"directories":{},"maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/api_1.9.0_1717607724827_0.8780155939505339"},"_hasShrinkwrap":false}},"time":{"created":"2020-02-05T23:02:44.976Z","modified":"2024-06-05T17:15:25.222Z","0.4.0":"2020-02-05T23:02:45.340Z","0.5.0":"2020-03-16T22:02:14.091Z","0.5.1":"2020-03-20T00:42:45.891Z","0.5.2":"2020-03-27T18:03:53.660Z","0.6.0":"2020-04-02T17:24:58.636Z","0.6.1":"2020-04-08T18:37:25.733Z","0.7.0":"2020-04-24T18:13:59.797Z","0.8.0":"2020-05-12T16:35:56.062Z","0.8.1":"2020-05-18T19:37:27.242Z","0.8.2":"2020-05-21T19:29:48.190Z","0.8.3":"2020-05-28T20:19:26.388Z","0.9.0":"2020-06-18T21:22:44.283Z","0.10.0":"2020-07-27T20:59:01.199Z","0.10.1":"2020-07-28T15:12:26.157Z","0.10.2":"2020-08-03T23:25:31.312Z","0.10.3-canary.0":"2020-08-07T16:47:12.678Z","0.10.3-alpha.34":"2020-08-24T16:44:18.427Z","0.10.3-alpha.35":"2020-08-24T22:45:12.368Z","0.10.3-alpha.41":"2020-08-27T16:08:29.919Z","0.11.1-alpha.48":"2020-09-01T19:24:08.534Z","0.11.0":"2020-09-01T19:32:13.111Z","0.11.1-alpha.15":"2020-09-21T03:29:48.431Z","0.11.1-alpha.35":"2020-09-30T12:22:02.007Z","0.11.1-alpha.36":"2020-09-30T12:38:30.482Z","0.11.1-alpha.44":"2020-10-07T19:54:51.348Z","0.11.1-alpha.53":"2020-10-19T11:48:00.073Z","0.12.1-alpha.54":"2020-10-19T12:49:47.053Z","0.12.0":"2020-10-19T12:53:38.822Z","0.12.1-alpha.7":"2020-10-26T21:11:54.261Z","0.13.0":"2020-12-04T21:26:13.852Z","0.14.0":"2020-12-17T20:52:45.526Z","0.15.0":"2021-01-21T22:19:53.305Z","0.16.0":"2021-02-01T22:33:16.096Z","0.16.1-alpha.11":"2021-02-08T16:17:43.097Z","0.16.1-alpha.14":"2021-02-10T16:05:46.188Z","0.16.1-alpha.15":"2021-02-10T22:17:54.101Z","0.16.1-alpha.20":"2021-02-17T20:51:41.455Z","0.17.0":"2021-02-17T21:15:57.208Z","0.17.1-alpha.21":"2021-02-17T21:16:33.009Z","0.18.0":"2021-02-26T20:57:03.958Z","0.18.1":"2021-03-05T20:35:52.779Z","1.0.0-rc.0":"2021-03-12T17:13:29.772Z","1.0.0-rc.1":"2021-05-18T19:04:51.277Z","1.0.0-rc.2":"2021-05-19T12:17:49.656Z","1.0.0-rc.3":"2021-05-19T13:39:19.389Z","0.19.0":"2021-05-19T14:11:20.752Z","0.20.0":"2021-05-24T12:04:37.904Z","0.21.0":"2021-06-04T17:11:07.532Z","1.0.0":"2021-06-10T15:52:40.045Z","1.0.1":"2021-06-25T20:39:59.941Z","1.0.2":"2021-07-29T12:41:03.206Z","1.0.3":"2021-08-31T11:59:36.249Z","1.0.4":"2021-12-22T16:03:20.539Z","1.1.0":"2022-01-27T16:28:17.262Z","1.2.0":"2022-08-18T19:13:42.093Z","1.3.0":"2022-11-09T18:35:26.526Z","1.4.0":"2023-01-11T21:46:10.460Z","1.4.1":"2023-03-13T15:53:31.460Z","1.5.0":"2023-09-11T12:14:22.702Z","1.6.0":"2023-09-12T13:12:25.750Z","1.7.0":"2023-11-07T10:44:40.760Z","1.8.0":"2024-02-29T09:18:05.040Z","1.9.0":"2024-06-05T17:15:25.003Z"},"maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"author":{"name":"OpenTelemetry Authors"},"repository":{"type":"git","url":"git+https://github.com/open-telemetry/opentelemetry-js.git"},"keywords":["opentelemetry","nodejs","browser","tracing","profiling","stats","monitoring"],"license":"Apache-2.0","homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/api","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"readme":"# OpenTelemetry API for JavaScript\n\n

\n\nAPI Reference\n  •  \nDocumentation\n
\n\n \"NPM\n \n
\n

\n\nThis package provides everything needed to interact with the OpenTelemetry API, including all TypeScript interfaces, enums, and no-op implementations. It is intended for use both on the server and in the browser.\n\nThe methods in this package perform no operations by default. This means they can be safely called by a library or end-user application whether there is an SDK registered or not. In order to generate and export telemetry data, you will also need an SDK such as the [OpenTelemetry JS SDK][opentelemetry-js].\n\n## Tracing Quick Start\n\n### You Will Need\n\n- An application you wish to instrument\n- [OpenTelemetry JS SDK][opentelemetry-js]\n- Node.js >=8.5.0 (14+ is preferred) or an ECMAScript 5+ compatible browser\n\n**Note:** ECMAScript 5+ compatibility is for this package only. Please refer to the documentation for the SDK you are using to determine its minimum ECMAScript version.\n\n**Note for library authors:** Only your end users will need an OpenTelemetry SDK. If you wish to support OpenTelemetry in your library, you only need to use the OpenTelemetry API. For more information, please read the [tracing documentation][docs-tracing].\n\n### Install Dependencies\n\n```sh\nnpm install @opentelemetry/api @opentelemetry/sdk-trace-base\n```\n\n### Trace Your Application\n\nIn order to get started with tracing, you will need to first register an SDK. The SDK you are using may provide a convenience method which calls the registration methods for you, but if you would like to call them directly they are documented here: [SDK registration methods][docs-sdk-registration].\n\nOnce you have registered an SDK, you can start and end spans. A simple example of basic SDK registration and tracing a simple operation is below. The example should export spans to the console once per second. For more information, see the [tracing documentation][docs-tracing].\n\n```javascript\nconst { trace } = require(\"@opentelemetry/api\");\nconst { BasicTracerProvider, ConsoleSpanExporter, SimpleSpanProcessor } = require(\"@opentelemetry/sdk-trace-base\");\n\n// Create and register an SDK\nconst provider = new BasicTracerProvider();\nprovider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter()));\ntrace.setGlobalTracerProvider(provider);\n\n// Acquire a tracer from the global tracer provider which will be used to trace the application\nconst name = 'my-application-name';\nconst version = '0.1.0';\nconst tracer = trace.getTracer(name, version);\n\n// Trace your application by creating spans\nasync function operation() {\n const span = tracer.startSpan(\"do operation\");\n\n // mock some work by sleeping 1 second\n await new Promise((resolve, reject) => {\n setTimeout(resolve, 1000);\n })\n\n span.end();\n}\n\nasync function main() {\n while (true) {\n await operation();\n }\n}\n\nmain();\n```\n\n## Version Compatibility\n\nBecause the npm installer and node module resolution algorithm could potentially allow two or more copies of any given package to exist within the same `node_modules` structure, the OpenTelemetry API takes advantage of a variable on the `global` object to store the global API. When an API method in the API package is called, it checks if this `global` API exists and proxies calls to it if and only if it is a compatible API version. This means if a package has a dependency on an OpenTelemetry API version which is not compatible with the API used by the end user, the package will receive a no-op implementation of the API.\n\n## Upgrade Guidelines\n\n### 0.21.0 to 1.0.0\n\nNo breaking changes\n\n### 0.20.0 to 0.21.0\n\n- [#78](https://github.com/open-telemetry/opentelemetry-js-api/issues/78) `api.context.bind` arguments reversed and `context` is now a required argument.\n- [#46](https://github.com/open-telemetry/opentelemetry-js-api/issues/46) Noop classes and singletons are no longer exported. To create a noop span it is recommended to use `api.trace.wrapSpanContext` with `INVALID_SPAN_CONTEXT` instead of using the `NOOP_TRACER`.\n\n### 1.0.0-rc.3 to 0.20.0\n\n- Removing `TimedEvent` which was not part of spec\n- `HttpBaggage` renamed to `HttpBaggagePropagator`\n- [#45](https://github.com/open-telemetry/opentelemetry-js-api/pull/45) `Span#context` renamed to `Span#spanContext`\n- [#47](https://github.com/open-telemetry/opentelemetry-js-api/pull/47) `getSpan`/`setSpan`/`getSpanContext`/`setSpanContext` moved to `trace` namespace\n- [#55](https://github.com/open-telemetry/opentelemetry-js-api/pull/55) `getBaggage`/`setBaggage`/`createBaggage` moved to `propagation` namespace\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: \n- For more about OpenTelemetry JavaScript: \n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[opentelemetry-js]: https://github.com/open-telemetry/opentelemetry-js\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/api/LICENSE\n[docs-tracing]: https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/tracing.md\n[docs-sdk-registration]: https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/sdk-registration.md\n","readmeFilename":"README.md"} \ No newline at end of file diff --git a/tests/registry/npm/@opentelemetry/core/registry.json b/tests/registry/npm/@opentelemetry/core/registry.json new file mode 100644 index 00000000000000..6f45d257e01c54 --- /dev/null +++ b/tests/registry/npm/@opentelemetry/core/registry.json @@ -0,0 +1 @@ +{"_id":"@opentelemetry/core","_rev":"193-a2644088a0343addd0da273fa09aa457","name":"@opentelemetry/core","dist-tags":{"canary":"0.25.1-alpha.23","next":"1.8.0","latest":"1.28.0"},"versions":{"0.1.0":{"name":"@opentelemetry/core","version":"0.1.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.1.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"1a87cf78a847a6b05b38eba43ac8bc9b100431dd","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.1.0.tgz","fileCount":3,"integrity":"sha512-eiWpXphOhTmxzpVzdsRm+nZqpzkMA4dsgrSXHhIydI288c+I2puH1pCngjIOI0TbXGBLSW6zCgV0PPqA9Zn8zQ==","signatures":[{"sig":"MEUCIQCyki1TlTWnRC2OfPfN75yav9JJJYDohDbMMh5EQoRqEQIgeVx/KEx9FX0W8/zl7MUEBX9iNutqPAUXy98+2uoC3S0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14908,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnRF2CRA9TVsSAnZWagAA2EEP+wSitVLFGnFPuH58mwb9\ndPUsL6zsqZTag0ZvVVOdA2dH+8JuoheGOI9cf+paDfwf6iPxHSFWFKlqAE0z\nMWBGCXRfuyR64lof8Gp0/47B01x2MWZh6mUebBrTQvRLuJbs6oskIAeww1xc\nuACdNzfo9JFXBC9p7hJh7KWyHAa3umc4HvKYVirJ+a+AglqR36xknHRRq49z\nixAYUpKVOus/AsqA2clj4KIN2Gx8QwnEqqOQ9gw2I51bC0iXq06V36kPkN+a\nf2x5lX6HRwxGvI0chMiCD9dQPa4yqefRs+bzP78OJ39DqpG+CLBfdQQJbjs3\n1l7b2jkVuzkH5i/Yaiy59hFAcRNZELxL7zkS5Bib/8MsJXf9ke3XE/CvqewW\nN7DzUK9EXj3GeB6GMxxRn/CBfkmFubWedZ080zEiASkKkZyO/KJR/VXfU9MD\nun9AAn1KEbtWRUgNNpGBrtkAL4TteElY23g459x3K2ZrS8ZF0Tgxdd+CAjpY\n6yqH2nAFsbmj6SRTJ3I+eSifTsBmx7fvkKMI39q/r7f/P34Lm1r7njjycLRa\ntUEp1eO5/u+VRWnl6dQPgrL9UYMfm8Fqb3Hp8+2LvjH07170eChEJlKbeDCf\nyy15nHCgMHxT9wzlHbQHTe8fdQVOkn8M2D5h8Y2fD52s7weELKEyOtxO4IF1\nZh5M\r\n=DwnP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"scripts":{"fix":"gts fix","tdd":"yarn tdd:node","test":"nyc ts-mocha -p tsconfig.json test/**/*.ts","check":"gts check","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc -p .","tdd:node":"yarn test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"karma start --single-run"},"_npmUser":{"name":"mayurkale22","email":"mayurkale22@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.4.1","description":"OpenTelemetry Core","directories":{},"_nodeVersion":"10.15.1","dependencies":{"@opentelemetry/types":"^0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.0.0","nyc":"^14.1.1","karma":"^4.1.0","mocha":"^6.1.0","sinon":"^7.3.2","rimraf":"^3.0.0","codecov":"^3.1.0","ts-node":"^8.0.0","webpack":"^4.35.2","ts-mocha":"^6.0.0","ts-loader":"^6.0.4","typescript":"^3.6.3","@types/node":"^12.6.8","karma-mocha":"^1.3.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","karma-webpack":"^4.0.2","@types/webpack-env":"1.13.9","karma-spec-reporter":"^0.0.32","karma-chrome-launcher":"^3.1.0","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.15.1"},"_npmOperationalInternal":{"tmp":"tmp/core_0.1.0_1570574709493_0.27126380746414736","host":"s3://npm-registry-packages"}},"0.1.1":{"name":"@opentelemetry/core","version":"0.1.1","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.1.1","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"a7411ebbefa5798fc069c239ec51c5f79d91dc73","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.1.1.tgz","fileCount":63,"integrity":"sha512-BegDWh2230/9fufGoPehFd1cljYcewH4q014unsSnzFxldbwRujOrglB5T9i8ovvEhO3WtiXXLmK7jo/vEs6VQ==","signatures":[{"sig":"MEUCIQCMIxS6Cb64CXMn2Zce1To0/LYBc7Aq5kEfStHof2lbrwIgYuZhUAKu9imx5B7lm3dznvtRl3qhwsujX9UaqKF9IoI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":102376,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdplqGCRA9TVsSAnZWagAAokcP/iQK+Ok1qtUrrPSJo79V\nZU9RVR1QVl/unks9tyIlXSMyn/MLoJZOHz+EIE50QLQF7YmA/sYPRbmRz2vk\ndPiJsYQIvBxy1I4f73hb+VTlLbSVGV4uRV3OU7VS+NEImyoEgG49Sly88RhI\n8ktOgFu83A0p+BcQhB5updryIsSf9b5odhI5NOVVVPOriCImy63fqBOJhW69\nJ+0q0vw6SQC6uN09raKUhw9ERNaxCUgfd7QJHrcIuUh2bSjRd/iIx/p1bgO7\ngYfJDRgEtFmZmVa7dq8mUgM4t5L8s5HqOLVzOsEO9ZhNL9vVpnCE3BXPaiux\n7hDio5wNYcn3J992Tm8x175sp3q9aZLdz+tsAqqJ6gaaBcs2LjviXzQ3RJ9H\ns326nxtMECuUsowTmDECbDwdP+OZoycd6By9V0/1R1icKb2bLhZM31Yz4MNS\nyopf6a0zBhxnI9Bl0Q4gkRNRXMXY1pt24djqoSRdOiqymrx63PmMYJEtXg8z\n8ezMUHCIvjSSbltKKKVvV9O54ZU3h1FlgoMK+I5VzKXTlCWrtrrGdsFl15lP\nQUfx5Aa/aLFTrjnES/QqqCoXpUw9fU5bayNOSCIb1+cm+5mzdLHGRbw0qVaC\nWJN5IRRq9eQGE+810zLV0K7Wq3qtf374kkY4gzi6ieP3uCrl1OpDbNmLti6X\noXqs\r\n=WvCi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"scripts":{"fix":"gts fix","tdd":"yarn tdd:node","test":"nyc ts-mocha -p tsconfig.json test/**/*.ts","check":"gts check","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc -p .","prepare":"npm run compile","tdd:node":"yarn test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"karma start --single-run"},"_npmUser":{"name":"mayurkale22","email":"mayurkale22@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.4.1","description":"OpenTelemetry Core","directories":{},"_nodeVersion":"10.15.1","dependencies":{"@opentelemetry/types":"^0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.0.0","nyc":"^14.1.1","karma":"^4.1.0","mocha":"^6.1.0","sinon":"^7.3.2","rimraf":"^3.0.0","codecov":"^3.1.0","ts-node":"^8.0.0","webpack":"^4.35.2","ts-mocha":"^6.0.0","ts-loader":"^6.0.4","typescript":"^3.6.3","@types/node":"^12.6.8","karma-mocha":"^1.3.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","karma-webpack":"^4.0.2","@types/webpack-env":"1.13.9","karma-spec-reporter":"^0.0.32","karma-chrome-launcher":"^3.1.0","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.15.1"},"_npmOperationalInternal":{"tmp":"tmp/core_0.1.1_1571183238194_0.6649760642188605","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"@opentelemetry/core","version":"0.2.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.2.0","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"cccc84399566fed20c84a44adf7127f9b117bf97","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.2.0.tgz","fileCount":63,"integrity":"sha512-YPsx+NhOX9MMGuSLvNEYwp5oAr5ZcZtAoQXErp3rpe7iddKuVYXvwTtIxr/Eg7RWy45WvA1O7ZEbepE7tSMX2Q==","signatures":[{"sig":"MEUCIBsSBGZGv0K8Qzz3TPOwcVYomJtS00cd2gDi6spEaG8aAiEA6V+bxjNfWDiiZ9M474mLfNgNkqn/hbYjyKyRqnelqms=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":103866,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwIdTCRA9TVsSAnZWagAAvRQP/2r2R1VVW14nbjhp+KxJ\n+yoMAqlN6tPWUeymOEREY3XcJhhK56Aei6ULnpwjGbzCAHzCNcr36fcgFfuQ\nyRiVHGbgqkRa/nE1Y5H9552/PzOP7qT1GiT1hEmNfQd0Q6TnHAfN+1xuhVZE\nrluld2aCsImTxdeQ0oMBU6DqBGWskE8Vj1BpgM4BAsim0IxHO89Ixe/ueejm\n9JoASgtxjyU0Mj4bThSC4nfKO/VLUgXka41mOdYYJ0oIa8ghkfa4Kme6azjI\nfoAZgpWUPX2D/GTPafzL/7jzYp8XZTNbmtRbw31oKAVQbdAF6f3xImBMYySQ\nDLPiHaSYFneHXzXR6ORLxP5rwX0b406OLWTksJ5i1PngLeWEcMFihkkDhibs\nyoFYy3xnZovksc73IJEf6/1X5UU6HmUg4PeVySjVV5zVYGjBCq6fgbdpLuLs\nswtGXANs67Rn+GGhJutO1U+wb2hZ6MsP3ScOVPTbUJQHZFxqV7UIHxgzeBKU\nmq/1zVdqEFutBuTAl0uE0gO/cWk+8aesA/HIXnwHbSyshpl3Ajnj92xkKU4D\n7U7iG7zOxhLGfVkREA3q/3G3huMcEcwSAbpcISJhsjHOBVEP+L6oKTJC2qpE\ntIiEyCbOFCtJR0b1axTcO+c1xEndSwsh2a1eDL4vcXvNnsZMPciU1dCwnzAm\n1ihq\r\n=u03I\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"scripts":{"fix":"gts fix","tdd":"yarn tdd:node","test":"nyc ts-mocha -p tsconfig.json test/**/*.ts","check":"gts check","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc -p .","prepare":"npm run compile","tdd:node":"yarn test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"mayurkale22","email":"mayurkale22@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.4.1","description":"OpenTelemetry Core","directories":{},"_nodeVersion":"10.15.1","dependencies":{"semver":"^6.3.0","@opentelemetry/types":"^0.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.0.0","nyc":"^14.1.1","karma":"^4.4.1","mocha":"^6.1.0","sinon":"^7.5.0","rimraf":"^3.0.0","codecov":"^3.1.0","ts-node":"^8.0.0","webpack":"^4.35.2","ts-mocha":"^6.0.0","ts-loader":"^6.0.4","typescript":"^3.6.3","@types/node":"^12.6.8","karma-mocha":"^1.3.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","karma-webpack":"^4.0.2","@types/webpack-env":"1.13.9","karma-spec-reporter":"^0.0.32","karma-chrome-launcher":"^3.1.0","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.16.0","istanbul-instrumenter-loader":"^3.0.1","karma-coverage-istanbul-reporter":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.2.0_1572898642459_0.26707944253000404","host":"s3://npm-registry-packages"}},"0.3.0":{"name":"@opentelemetry/core","version":"0.3.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.3.0","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"836f81adf5f0b9a0f441a247c84306469adbcedc","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.3.0.tgz","fileCount":69,"integrity":"sha512-77NbqaUOUcVk+0ei/Jn7hxorlCCTI8594ohs+wkOzzGsft0IkvOKxDXdMuG0BUGEFeIk0BHQ9IVNicpwXtbUoQ==","signatures":[{"sig":"MEUCIQCJ4ocW/VU+aecmRZcwpAjkcOlBWkuOLs1fVt+GimWcnQIgfTQo9lgQpQK+j8qBqfSvI2WpoiCNJxxgGI1IFeXN/mc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":114240,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd8+hMCRA9TVsSAnZWagAAbUYP/izAr1YOQ6ho/YFpgChr\n6yMd/MltQq4l4Al2vLiErr/HO3MjQ1XJjW+VLtBQIZk9Zt13hjJBkZzvr72H\n9uJU35g7iVlquxex8N/nU4x1DfFvw1bkOvI/Q9walgtrIr8wzjqYRsFel8G8\nm0cM67CqNYszGAwvkX4lMK5TB1W3b3rvPHbJJCdZSL/+X/wCZebZhTF0DsVn\n5uK4F/NG3m1Y9BPObBO/6qVgW2y2Iv7BQhxYolCvI105p6YQ60pQrUClMVPR\n2Yg9Vlcfyz+Q478WjdjaChx5Wfz/51TFdDdyDSu8I5rGjZWOqxLEydnE4FHu\nkJsnvk4bMfggNXGrtw31rpVKHC4OLyujLsqVGcLyOp9CJ301K04RdgXyVfCv\nhh+QAmF/viUViLba57qPrejomG81Mgama6HA/hDo4xUEfGL+Q/2UxcaNL4Fo\niyYh5DAB9gVtl1cUei0CudZU4HErVaYLzZaPvkhmDAxLkHfJ31MLaM9WiNoo\nyb1vPvHjUXFqZpDqMttJgCTbRjCsPjgv8z6fv6nBtL+RxsCEiAr130ckLdM3\nJBIdBaP5sNQYrjdhPJcIlENkBgWnXAVE6iKTeOf3g/isatS5HwhKUnN1QhuC\nJGeLrL8l6m2umvewNlt/awwcfaScwRddoiu7rKTH6h42R92tmBvz4Nkk6IDm\n9xMn\r\n=n6WE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"scripts":{"fix":"gts fix","tdd":"yarn tdd:node","test":"nyc ts-mocha -p tsconfig.json test/**/*.ts","check":"gts check","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","tdd:node":"yarn test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"mayurkale22","email":"mayurkale22@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.4.1","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"10.15.1","dependencies":{"semver":"^6.3.0","@opentelemetry/types":"^0.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.1.0","nyc":"^14.1.1","karma":"^4.4.1","mocha":"^6.1.0","sinon":"^7.5.0","rimraf":"^3.0.0","codecov":"^3.6.1","ts-node":"^8.0.0","webpack":"^4.35.2","ts-mocha":"^6.0.0","ts-loader":"^6.0.4","typescript":"3.7.2","@types/node":"^12.6.8","karma-mocha":"^1.3.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/semver":"^6.2.0","karma-webpack":"^4.0.2","@types/webpack-env":"1.13.9","karma-spec-reporter":"^0.0.32","karma-chrome-launcher":"^3.1.0","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.16.0","istanbul-instrumenter-loader":"^3.0.1","karma-coverage-istanbul-reporter":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.3.0_1576265804375_0.07693236937968173","host":"s3://npm-registry-packages"}},"0.3.1":{"name":"@opentelemetry/core","version":"0.3.1","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.3.1","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"9cee72df3511425b5a2406eaf4478f72df4c024b","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.3.1.tgz","fileCount":73,"integrity":"sha512-311ErLTUu0V9PUdgiiZEcVrWcJhPoOaBQ10QXGRBb1BXAw6MuT0t31xO0+ou50ArCttyBIx4tsqus+uJEcE+hw==","signatures":[{"sig":"MEYCIQDZjHTzFPcUbCwxThder6Xb+PefQPU7zweb/CJryKpHxAIhANalJg5p2gfUmXuq3meurvyMwBxXHF3gzDWmg2CPlQ6m","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":118816,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd/WCcCRA9TVsSAnZWagAAMqoP/ikwNNf7gw/B+m0cb9m4\nEXywlhgaJiU6eA+iPVde689Fli91Lflib3QGWUY9Ts8jviKeM7HCSEUJqmGw\nD6Oat4IR5LYbAxsVZ48zrGA+stqSZu4VReuPr1LtPSk50PHagNz261z/UB0u\nUCAu6cDK7sjDDpOfKqipJfgi9PqEh3GrEDmMEP5Cf2IBlJlQnkhzbxri28vu\ntPY21aADvDzih92fVUvVfd4umouY7HPrycnrCCo+UtA+IXK59Dk8+Z8RLNF/\n+Tqy7OW8+f6YDSWV2shRu7h/j/WN/y5m6VxvBxHCx9zc+LtjAyJYtUA8uWBo\nS9mwgt3hJsyCJOClPI2d4clCDRMSagF0ne0GnivETgHMTgyLjKD85pr3ed8M\nFIlTARECKbHlz338V3kgj3OXkgBarWPeWADjsh97NMOhWGyOwkIOglK33nZQ\nIu8Y2c+Bu4sOZc4JaI1p9N+n7eVoKWgD0ChXugn1P/Q5uXEmwPKq1EgoXri7\nxcOONxKeaZljGCYiQWcDVXBue7n+w6uWbBt0q4BUjWAcp6Za+lP05fr9lGJa\nlUQ5y8w2eYpL6QoS4ztF4HQ1k0imvP8hljHZ1x9xMpQ1DzsYVyHJsDewlCFP\n482VaWdyGbAdPAWhloeaopZWWkV1nmccVHnWH/M1S9HKV0w3tPVyqUrMoGNS\njhEh\r\n=fTCK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"scripts":{"fix":"gts fix","tdd":"yarn tdd:node","test":"nyc ts-mocha -p tsconfig.json test/**/*.ts","check":"gts check","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","tdd:node":"yarn test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"mayurkale22","email":"mayurkale22@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.4.1","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"10.15.1","dependencies":{"semver":"^6.3.0","@opentelemetry/types":"^0.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.1.0","nyc":"^14.1.1","karma":"^4.4.1","mocha":"^6.1.0","sinon":"^7.5.0","rimraf":"^3.0.0","codecov":"^3.6.1","ts-node":"^8.0.0","webpack":"^4.35.2","ts-mocha":"^6.0.0","ts-loader":"^6.0.4","typescript":"3.7.2","@types/node":"^12.6.8","karma-mocha":"^1.3.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/semver":"^6.2.0","karma-webpack":"^4.0.2","@types/webpack-env":"1.13.9","karma-spec-reporter":"^0.0.32","karma-chrome-launcher":"^3.1.0","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.16.0","istanbul-instrumenter-loader":"^3.0.1","karma-coverage-istanbul-reporter":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.3.1_1576886428056_0.326875652082949","host":"s3://npm-registry-packages"}},"0.3.2":{"name":"@opentelemetry/core","version":"0.3.2","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.3.2","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"958a111ace6e405c4d4607e846082c3c849f45eb","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.3.2.tgz","fileCount":75,"integrity":"sha512-HXY4BTkBR4ss9kdPwca1Dpb3KOizuGoSrXHfqdGdS1h6mzGd7zpia7z89w7yRhj4tZiHQcl9rcw/V+qdroCGkg==","signatures":[{"sig":"MEYCIQCVaIolni6qDQcW1zRt5IvTASiv8NAwIKT1B0nArq1C3AIhAOCvOwnVcg/iN2ngQhXk1SWkEpHa7nUMdns7jn/0Sip6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":120284,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeD7ihCRA9TVsSAnZWagAABzAP/ja4WqcTh+SDnpCblL1J\n2y9c+lQDSeikXbL4B89o0rWiyA0hj/dkkEE9VGbD4ihmhKK6PBuWFg9Ws62/\nsr8F3vPiHt56JSVgfhIyLUy5PCtwOeuICKRxFmwEqg984jn0lY72yQ6LJ4Mt\nkxd5y+KM9quw2Vkge6SoAQKa1Pr2LHr8YRmsFaHy4cMKB2LNU94HrJEEWR4d\nPgh7OICHetBHJkCH05x0YBtk/H62eb899HxV5aCfm43iZqXLVuAbpE/M1+j0\nvp7FSsIHvd71CrCA4wZrVAc6mOlIPFb7Hj+Ej2qXDuEEnL0hD6H4L6HnxYNo\no32zIKIZkl37GldEqZZmPOsdnnIB7XdCm8F0jSMtl6IGWvB6HoUmGLZMXUsl\nVCeZyxYRyYFymicBTkRd/zKj/4D1MxiI9O0OYh4kZu1hny1jxaxbLK7WtDcw\nUu2zQr7CipkCZHMTTJgDgGiV09NPeRXPszCYgzabCPCPAECrpb/Fvj0MM5YN\nigH8GqjZWzYlwO+la+iNw9S2lC6tgsBbL5RZgYgVMIbtgmj7oCogCiM5Rqbt\nddudtJTRNvhDEeeqVDtGiMD9juy+nJXj3pL9FGAxfEx0H3CEpmDK/bMPoIv9\nqpvlBWdih/9uMiZql0F2xAQVjaaFKbiOkRSLZSwu3mBtoDtDhO1HskhNv1wz\nBXfp\r\n=LWNX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"scripts":{"fix":"gts fix","tdd":"yarn tdd:node","test":"nyc ts-mocha -p tsconfig.json test/**/*.ts","check":"gts check","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","tdd:node":"yarn test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"mayurkale22","email":"mayurkale22@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.4.1","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"10.15.1","dependencies":{"semver":"^6.3.0","@opentelemetry/types":"^0.3.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.1.0","nyc":"^14.1.1","karma":"^4.4.1","mocha":"^6.1.0","sinon":"^7.5.0","rimraf":"^3.0.0","codecov":"^3.6.1","ts-node":"^8.0.0","webpack":"^4.35.2","ts-mocha":"^6.0.0","ts-loader":"^6.0.4","typescript":"3.7.2","@types/node":"^12.6.8","karma-mocha":"^1.3.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/semver":"^6.2.0","karma-webpack":"^4.0.2","@types/webpack-env":"1.13.9","karma-spec-reporter":"^0.0.32","karma-chrome-launcher":"^3.1.0","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.16.0","istanbul-instrumenter-loader":"^3.0.1","karma-coverage-istanbul-reporter":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.3.2_1578088608627_0.5188007964676522","host":"s3://npm-registry-packages"}},"0.3.3":{"name":"@opentelemetry/core","version":"0.3.3","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.3.3","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"a8e9fd5beaa14a66e89305383e7f4e81557e1d8b","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.3.3.tgz","fileCount":79,"integrity":"sha512-cG+Q0y59HMZaKisUBge8nsk0OavmVXoOeiSjBbSNzvcbFF94y85dsXNYKI3UfNeQjWy5OAE6U3m9PBqbmK5aGw==","signatures":[{"sig":"MEYCIQDo83+Ecp2JmTm0IxpYZKlKtmU6RtKKehcEluPIj4+pHwIhAOvSVoL6+CuzxOyiwDwUwPX96GiDbyDPgxDk4RuApCi5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":124661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeKNEhCRA9TVsSAnZWagAAdWIP/1vK+cBnW/eJq+grg1D9\nFg7jpkS5LgbsTvYbCs634ww6rhHWJndAG3eR7HqBiqytVGd98zIwFShRu9Y9\nzcZQAV6zMwfHOK3NKnJmSXqZqOexpi3KKwIPMLm8provVZdX+Pip+aiGzbBS\n/bveSBxAkrM1Z17qmoWBHWdINttxCD7wLk5DOLcvkAHlpYoxR5fRhzHaZ89V\nJ7MHL1Fo1xlC95BHdtjBB7gzcQ3x8o1gia2tRvHq9R00vM0fy0oNEl73o0+5\nohGAi3VPqibgTowqFVnKUgFPDwrl1kxGietu3uHKUNdRnJ0IHVYi2mrgE+D6\n+2ROqs3JKxb+25WefFK/Jl9mcw2rVVDR64qHPDj7b0YRYReLfphSSVc2o7cQ\nvxToJOAb5pXd2KH8T5RIu2KOu+BUWSMRahk/tTI7JVips13/6zoz/OngYOlo\nS5gc/uh5tn94tiHOaILU65Wh5NBG0nB02khYfIe2USqWSwRkZrFY3VmQadJQ\n7O8pY4bEPeZLfPnAdcduLeSdXomn5mlMQmXmwmaWT+OlJGeeWIe7lrQL4uQ5\nrAK8o2ivZpvF9VkUkK1ngWJyWNOnIhqbz3MOgM1lUoTib6/OMFtIgQR6nu6q\nvKFXUVHXzdWB+W+TNq46IUXVSKDRuhr/mzPMhU+20D8zIaQIWL1gVfnzIDfR\nboCk\r\n=sL3P\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"scripts":{"fix":"gts fix","tdd":"yarn tdd:node","test":"nyc ts-mocha -p tsconfig.json test/**/*.ts","check":"gts check","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","tdd:node":"yarn test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"mayurkale22","email":"mayurkale22@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.4.1","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"10.15.1","dependencies":{"semver":"^6.3.0","@opentelemetry/types":"^0.3.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.1.0","nyc":"^14.1.1","karma":"^4.4.1","mocha":"^6.1.0","sinon":"^7.5.0","rimraf":"^3.0.0","codecov":"^3.6.1","ts-node":"^8.6.2","webpack":"^4.35.2","ts-mocha":"^6.0.0","ts-loader":"^6.0.4","typescript":"3.7.2","@types/node":"^12.6.8","karma-mocha":"^1.3.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/semver":"^6.2.0","karma-webpack":"^4.0.2","@types/webpack-env":"1.13.9","karma-spec-reporter":"^0.0.32","karma-chrome-launcher":"^3.1.0","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.16.0","istanbul-instrumenter-loader":"^3.0.1","karma-coverage-istanbul-reporter":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.3.3_1579733281053_0.13547402955117982","host":"s3://npm-registry-packages"}},"0.4.0":{"name":"@opentelemetry/core","version":"0.4.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.4.0","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"d6f07d1a61a7a3c8faeb98aa3072f3af138a966a","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.4.0.tgz","fileCount":81,"integrity":"sha512-VrnP0tCVZqOW5iM+sGRMHd+pRgkKMvORGCB6sdy6ftwZcoo8pokvC1KUFF2Eah/TlKDcMJOwFWEWYCPV+jIvLg==","signatures":[{"sig":"MEUCIANo9Gq772fNoVb0kstQfP37vs3P12L4jTgi4aIv4oDjAiEAnbblqQmgdmU/nHgBbkto4ODBZR90mTsjjZQ7Gn5jS7o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":126169,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeO0mjCRA9TVsSAnZWagAApxIP/1Y0TNlRR4G3cowd9RrD\ns3xAhCue+ZVdRDwU6D2Z9OcpLcsZrZhuburQaLnWIwJGZtIsk5XHW/LjVwfM\n6418vrz+O5+X/P0Hiy+N9JIYFwkys8NGs4p5VUoPnQC7PIvQF/dx97nBuCug\n2Tn6djOWvPfKlNQM9AHMszGA9dnu+jbi4B1lO+Zh4C83lQ+Zd39ewSbyJk7Y\n/FLs4KyH60iwSnrm4yVJdORUOfXEyAMi+1Z82B2iJU5c+ZKV+It06MX3E4r3\nKdId6rDjdGy2KnMtfbU+ZPRmUUr9YnmuwbhqT2U9GdrHpdAMLZwvX16/04/Z\nz11PegF/jVKBF1A/fOUy95/6QwHMCVWSsbTkd3QYhsA0wd2nxjB+7pidYQwx\nqwSgIfIudLtAZrOBHRFhWmzzTLe/1LwU+xuDfli+zEJC+5M8E2c+sdB6b8kM\nX4iLkymnMGGQwKgiYGFEbnCLv4plqLScTexhCdkf9NB3S7xOuESOx/owBuTW\nj+35HjqpqDNPxHxjB/manNftoXOOSDxyQmxesBjzzplC4+S57RUX/6czWoPT\nrj0mW+0Uxq6uyvNOdyH2nkmA5x3vV6sl92gEE/jJ0/XOT/QmWrPE6FSY+ZB9\nSig4kxvx/+aOoWYKh/ra3dJIGaPyxlJg7qCfJ8Mzr6ScGloikaVnDZZdREyC\nQ3lJ\r\n=rQnJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"scripts":{"fix":"gts fix","tdd":"npm run tdd:node","test":"nyc ts-mocha -p tsconfig.json test/**/*.ts","check":"gts check","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"mayurkale22","email":"mayurkale22@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.4.1","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"10.15.1","dependencies":{"semver":"^6.3.0","@opentelemetry/api":"^0.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.1.0","nyc":"^14.1.1","karma":"^4.4.1","mocha":"^6.1.0","sinon":"^7.5.0","rimraf":"^3.0.0","codecov":"^3.6.1","ts-node":"^8.6.2","webpack":"^4.35.2","ts-mocha":"^6.0.0","ts-loader":"^6.0.4","typescript":"3.7.2","@types/node":"^12.6.8","karma-mocha":"^1.3.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/semver":"^6.2.0","karma-webpack":"^4.0.2","@types/webpack-env":"1.13.9","karma-spec-reporter":"^0.0.32","karma-chrome-launcher":"^3.1.0","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.16.0","istanbul-instrumenter-loader":"^3.0.1","karma-coverage-istanbul-reporter":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.4.0_1580943778388_0.9682686848527735","host":"s3://npm-registry-packages"}},"0.5.0":{"name":"@opentelemetry/core","version":"0.5.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.5.0","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"b5e6ebdd304796f0fb27a3e03d31c80fdf4e8d54","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.5.0.tgz","fileCount":65,"integrity":"sha512-dh4gNuPkdRgPCRCIm0tgXiOajhens+saWXHCCMHfKqsCWvKJAfgw5Bi0FMqUIgE24dGGYuu/PJy3L6QLJvTebQ==","signatures":[{"sig":"MEUCIQCRvmOkE04hHSduLx++cPAmzlDnAwI0FuWczRNRMH9emgIgVMF86PY4254ZQBXjKze54cbNP/DcXO6cI+aj0yIp9So=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":108166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeb/emCRA9TVsSAnZWagAAWjIQAJql22D6zaxCnU/hdGrv\nYMhbTdObKVPVfdW+nHhf9sJOIIpBxV/qaaxPV/OOGlRNvmQMstCq1dsr2ecY\nJ4Z8pYcpvjJtuPegjeTZvj9z82BESFMMINHwzl/tOccHUZ7KHEYDpkDvyQ+1\niHbtmSvKQrrh0HYjf8fhuNiKbo5vpTMw27HosZfxpF058s8G2jqdZifbscIB\nW8z1+3NdGX1JvI/QJM9GHLVpGfwUKijwMGSASvXq5m4Z0cIy7WyK9dCwkoTB\ng/WKyTmcBvbc77EXDrRv8Dh4COSAxR6eEpRfVkyKU3nHyBonUt0bcX5Ap4D0\nF6F74LNuYd9UC2b3i+QPa1nOibHRYPt/x7Muejknz4HZa23lQAKqZEAzS0CG\nUHXdOucl1wDc267jSJS837x8ohDoUc5M4Ze22pzhBBJGpjDgOhi4zLxR3Tkt\nL1+Mfx62+grnENZQ7m+OlzO0TxX6F9mHBNZM9Vm29R89rCZy1bhWPTh2Nw4Z\nKdHo9KfM555XqdSb05aDtLADFHqCi9a8VcfmQJ6LR+hNdmdux225DTwZ/rkf\nMRdPlkdEV2tMNFpAUJnVm2/BKPZt6h6Zq8tQQQscAk9vjlEo/GILHcDPvyrI\nsIGRYZL9pK8P38FXivnXcXsy/WZPfvXNL0WVKB2HX7YWNm8pYamlZGmAq1D/\noqox\r\n=dcQK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"scripts":{"tdd":"npm run tdd:node","lint":"gts check","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"gts fix","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"mayurkale22","email":"mayurkale22@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.4.1","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"10.15.1","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.5.0","@opentelemetry/context-base":"^0.5.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.1.0","nyc":"^14.1.1","karma":"^4.4.1","mocha":"^6.1.0","sinon":"^7.5.0","rimraf":"^3.0.0","codecov":"^3.6.1","ts-node":"^8.6.2","webpack":"^4.35.2","ts-mocha":"^6.0.0","ts-loader":"^6.0.4","typescript":"3.7.2","@types/node":"^12.6.8","karma-mocha":"^1.3.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/semver":"^6.2.0","karma-webpack":"^4.0.2","@types/webpack-env":"1.13.9","karma-spec-reporter":"^0.0.32","karma-chrome-launcher":"^3.1.0","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.16.0","istanbul-instrumenter-loader":"^3.0.1","karma-coverage-istanbul-reporter":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.5.0_1584396197509_0.035453989035695965","host":"s3://npm-registry-packages"}},"0.5.1":{"name":"@opentelemetry/core","version":"0.5.1","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.5.1","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"e9ebdcf356be848864113a1d024ba3a1a4150102","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.5.1.tgz","fileCount":63,"integrity":"sha512-oBnyq+NI4Tk8zxAO9MGt1v2RcRUqoz8UTxPhKBbJm+6u0I/HCDqW2YlL/nQVX/gc2D+CszWBvf4ywazYTVZOtw==","signatures":[{"sig":"MEUCIEtgAuTn0CrabJ2pdC5GgfDO9YCwJF/iN35YPbyojlafAiEAuOB3hpr34tN542pcIRS/8EwYL8u+xmFIiqza6ggO2ms=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":103840,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedBGLCRA9TVsSAnZWagAAN6UQAIb5nK9Xt2ETKk4VD2n9\ncf6vZPfWRkDBxMnyhtCmnxAteZNLyzxlABH9DaDCGTTTynKA/zZO/LlpgTNr\n29GOfEnFs/gTPqr3WkwnbFRABbvdX8TP5uZWiy3p+NwOZ+uoPbkL/jLBiKHP\nCmEVvZgPpFhTOL+Ycr1Sx8IUSXKIZtMqY6bpvICLYqMfSzH0cnr7029KvA/H\n0SkbnQcot1OhKwi2L2wtX61mDv5G4sxRQjDEsCWjE2RHA8pfnptJLDQu9u+5\nt+fUX0pyO+ZKB41rmyRYRI9iHLEsOjGMg7G4hdHe6e/g6GAHc4V7MXVfqw3r\nVF4QSTpkkNZ5IyelqvippeaxckJvmfsPqdo8CiAE7rmTWW9ahJ3ELVzj9FMN\nvXfpFfkpEWfSzJgGfoHGtlNp4+DnNcdVrnEhPBu8YthWVLmvFq5NUkuas6LA\nhN2A8aSeoQwvOSsyobLX3KXbLP9Qco4DFydZMNfTiCWPbz5kBnLFeAFJvztZ\n7+6SfUixWG6f6GIXbTRsjrtDb09CGDxa3qMucd9Xi32KfKtkQckCHgec7cUY\n8NDdyvbtL6vD6OR2jkdyJuvlMj9NnsAEfYI2O+74NrLtBXY9Biq3coFhXvjX\n3hxOGShGNj+EBX84PsUnyuCwTJJN9yr4bb1kxv2wum2YEV8QzV40Dueu7QLu\nKHYj\r\n=fGvb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"scripts":{"tdd":"npm run tdd:node","lint":"gts check","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"gts fix","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.14.1","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"12.14.1","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.5.1","@opentelemetry/context-base":"^0.5.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.1.0","nyc":"^14.1.1","karma":"^4.4.1","mocha":"^6.1.0","sinon":"^7.5.0","rimraf":"^3.0.0","codecov":"^3.6.1","ts-node":"^8.6.2","webpack":"^4.35.2","ts-mocha":"^6.0.0","ts-loader":"^6.0.4","typescript":"3.7.2","@types/node":"^12.6.8","karma-mocha":"^1.3.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/semver":"^6.2.0","karma-webpack":"^4.0.2","@types/webpack-env":"1.13.9","karma-spec-reporter":"^0.0.32","karma-chrome-launcher":"^3.1.0","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.16.0","istanbul-instrumenter-loader":"^3.0.1","karma-coverage-istanbul-reporter":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.5.1_1584664971483_0.7254004628966708","host":"s3://npm-registry-packages"}},"0.5.2":{"name":"@opentelemetry/core","version":"0.5.2","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.5.2","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"841a71948d612d4ceb1a1d74744fb5cfd3a9b0cd","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.5.2.tgz","fileCount":63,"integrity":"sha512-bwUVXqWpUujce8XZTbsZSRwXz1HyqGYafwCx3a8wKt1erDKBwhxwTAagYk0D0gg/r3BrYwlZ89Qy3vnLGCqQEw==","signatures":[{"sig":"MEYCIQC2h9uVadCAU/X7WC7mjLu8Fh0FD9I/7VYHou2l3XY0+wIhAM1ojwGtb6euPLUHj+yizH4uRGjyrt76DKUgYWH9qC/p","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":104087,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefkARCRA9TVsSAnZWagAA+SYQAJG6IWFu2qeL2+GTvkQR\n5bIqdILnJtWFNErqiqQrHrk6xV6WA3jByH5nWB64SAaweOJ9nVTAL1Mp9zY/\nLYLVHV26eEmfG2/gfpm1COhD7E2qCpACXLLOyz9qGCEQ4wRl01XFY7tsxUig\nJifT6nycGIdDnnDma7Qopej7ECTCI/UYBNPlu2xhSyBFWptMuttlChUugSK2\nmvcHL7SUBfEHTtPoIjEs8xLFl1pAElkbyKEl/4+iUMNueJo+faqhvUJIoVFz\nsDR36+LpIW3P7+H+9+NL6ULjOECAyl7TkwxsJEtuYAyQUmur0V0esOw4XPwA\nucykOD2qvFNj2b0Edh5zN/qfmJ7qYmaDGXf7KJpaL2/ng2x4yynKUxkQ+o0L\nk8wdHLvtfwJttxQ7m8xvuxAGTnR2YPeW3YpHjLOBi4jUWHYfi2fsochhzr2c\nrvLYdK9KIs3OV7JjqEW82qRl7HljyOe5rlUGkAj7MydxtbPUPfRgGPWY3P0O\nlW568BzHvf0m6UfUnyr1thh/IWTQGXgC+JSxh46sWS7+NzcgDJaHEYKM2j1A\n5yb81yYoFunEQlMLk8poqWzMbbI1uHivOYwyDi5j3BcmWMs9RvF15sD3gSjz\nrlt22ylaO9uIOKgjwGzOILIGOZUyoI5qgGnw6Rf3yac7fmmidybMZtV5EdgL\nH9Hf\r\n=s+Ap\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"scripts":{"tdd":"npm run tdd:node","lint":"gts check","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"gts fix","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.14.1","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"12.14.1","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.5.2","@opentelemetry/context-base":"^0.5.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.1.0","nyc":"^14.1.1","karma":"^4.4.1","mocha":"^6.1.0","sinon":"^7.5.0","rimraf":"^3.0.0","codecov":"^3.6.1","ts-node":"^8.6.2","webpack":"^4.35.2","ts-mocha":"^6.0.0","ts-loader":"^6.0.4","typescript":"3.7.2","@types/node":"^12.6.8","karma-mocha":"^1.3.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/semver":"^6.2.0","karma-webpack":"^4.0.2","@types/webpack-env":"1.13.9","karma-spec-reporter":"^0.0.32","karma-chrome-launcher":"^3.1.0","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.16.0","istanbul-instrumenter-loader":"^3.0.1","karma-coverage-istanbul-reporter":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.5.2_1585332241367_0.4864436355030759","host":"s3://npm-registry-packages"}},"0.6.0":{"name":"@opentelemetry/core","version":"0.6.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.6.0","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"aef1f2fd57fe70bb2671630e4433f424ebd69f16","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.6.0.tgz","fileCount":63,"integrity":"sha512-f2I5MaidkSSznSr5qg7xSU9o+Bkvn2BlHoYMo2NlhMQsg9BWEWTKSyFlunnIf5yG2g923VYifoqJ9tfNkAaOKw==","signatures":[{"sig":"MEYCIQDDEEemA7/0PNl3X80Vr8DFVp3bgWUigG7xTI2KYv7MtgIhAIQoMOtu/FjU4jgXmqB/qng+1c+UL7uf6D0gn6rYCB6u","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":104087,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehiC2CRA9TVsSAnZWagAAVzcQAKCCP9gUGVKp2HdnjPmK\n8NuxtFZ/fuvcSXTkEw8Cdfcv0MyuAn5SmZHTXAMmVKm/LLit7tu7HtGfoeKs\nWOS1REp/CVGkCSqBzS9WAshkhx+JQz59RO8YtcQukMUSxiA6E3nilviqb0MS\nUTJzzc3zolQK9WrRucAQu/GYZibk1G4L1F7rxCAi9i71La652i0SbhPtPjJ7\nUjC8U4CA8nHJtXTnCDIOQyw/MT7SbwCDX4qKqMo4rlZeuWPmloSLwzj7fdVD\n16HuIMicWNfGSGsrPHYM0wATPZSn1Nfyw/5icBM7192636jsY/5N64y+QtfZ\nitS992kW8aF9i0nWmeXa433ySJJEV6a8nRUoGE54Y2KhHHnaokThhjU9Ha4w\ncGyHBcBNnIlopwFfnK04u79y2AiTGdUenVI/azcNuse71RkxldBQVw3tlOvl\nMJPJmvBRfmHEG6PZtM59d26mQMzc0VP9OAAHEOtbeFRk5XUFV3UfttCpGzBa\n8CsSPQANhsH4otSye0kcwr1gkHbnbfI8VV6NE+9yyE6SeWME42Ivn0026u8y\nVUlpoGu2qU21fR2emVSC2dqPI3z72/Mh0PhlOXioVSwatgyRZlfWuGTgQRPG\n9r0ZbkwBps3F5HwH5DU57YpiIJHYi8hmwAeIyS3qHKY7z8IlICcGc9BCMMoM\nOxDg\r\n=fNTk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"scripts":{"tdd":"npm run tdd:node","lint":"gts check","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"gts fix","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"mayurkale22","email":"mayurkale22@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.4.1","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"10.15.1","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.6.0","@opentelemetry/context-base":"^0.6.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.1.0","nyc":"^15.0.0","karma":"^4.4.1","mocha":"^6.1.0","sinon":"^7.5.0","rimraf":"^3.0.0","codecov":"^3.6.1","ts-node":"^8.6.2","webpack":"^4.35.2","ts-mocha":"^6.0.0","ts-loader":"^6.0.4","typescript":"3.7.2","@types/node":"^12.6.8","karma-mocha":"^1.3.0","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","@types/semver":"^6.2.0","karma-webpack":"^4.0.2","@types/webpack-env":"1.13.9","karma-spec-reporter":"^0.0.32","karma-chrome-launcher":"^3.1.0","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.16.0","istanbul-instrumenter-loader":"^3.0.1","karma-coverage-istanbul-reporter":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.6.0_1585848501855_0.255208249372459","host":"s3://npm-registry-packages"}},"0.6.1":{"name":"@opentelemetry/core","version":"0.6.1","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.6.1","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"0cf78e49ae5c52a8ae674e9009e47cd834d24b6e","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.6.1.tgz","fileCount":63,"integrity":"sha512-4EtUcPljz+X62A9FKnyQrpaYCkUr747WwwP5txHFTgDwpDuLRrbfkcg2YkDORxF2SdSVeOuwiPhDflQA/nNFRg==","signatures":[{"sig":"MEQCICO3/fwgy0ly9184qRp+ujsmeVmME3PnAxoFnPAZ0Wx9AiAcdKOJSlW/5Dl0ZscG2PEbHuYic8hcoT+fYLUer10+HQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":104087,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejhntCRA9TVsSAnZWagAAgecQAIk1dLgVtrxJ/Bmd0pfM\nnE86AxezaV6AGgxKhqhsTgCqS1MHjKS0bNKYdBKeks35BBte37Ev2D0NItBa\n1T/MMa1VP5Sd942wzowmN/UjFPtuJ9e3EfpqTmh39L3pf4SifD5i7PVsRrZ/\nkT461rL0k3+wYHtHeEzDozjGer/6ALnn+xhdxJb4ffNeZaofa8rgiYGVxCdG\nrIjwEXZTyiuGTQxsrIhmHkOLvjew4gJV3LdpgjBxVIs7heY/Rk8bFysvU6b+\nNteAqPKAWjHHqCAqgAyLIouf3HNXYDdt2HLRwlFd6XfjeClZn1z1ZuD07W8h\ntUZqbyW/8KfHkH93dLZC5KBsJiJvjjQAa+7WGsIOe6hZK0Cuc17rxY60wqTd\ng3IYEvhfq8yrkg7kgBJB+dRyuIchMUh8+O38yRSGx3I1irR59H/Wflb0mKre\ng/fyalaRxU5XZhetqUf0ehyHrHtB/+hNxe5DythsioftymnwySJvFyd1ktIq\nWbsHcTY3kf2mzSmCTZarlouHG2jjlBkX76lTY+BmZdGCqUfDzZRR4FxqaEgs\nr0AUtnHWj/NUZiWr+UdaE0EQh64v5pb8x/GEbujh0Yp2P7R1b5M7vd9MV/6O\nDvg9q4Kl2NSrX9R0Nrdtp2GTXI+msugmu4+WjCfmMcLDGjEDf4bu+cz//7sd\nPX3N\r\n=IykK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"scripts":{"tdd":"npm run tdd:node","lint":"gts check","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"gts fix","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.14.1","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"12.14.1","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.6.1","@opentelemetry/context-base":"^0.6.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.1.0","nyc":"^15.0.0","karma":"^4.4.1","mocha":"^6.1.0","sinon":"^7.5.0","rimraf":"^3.0.0","codecov":"^3.6.1","ts-node":"^8.6.2","webpack":"^4.35.2","ts-mocha":"^6.0.0","ts-loader":"^6.0.4","typescript":"3.7.2","@types/node":"^12.6.8","karma-mocha":"^1.3.0","@types/mocha":"^7.0.0","@types/sinon":"^7.0.13","@types/semver":"^6.2.0","karma-webpack":"^4.0.2","@types/webpack-env":"1.13.9","karma-spec-reporter":"^0.0.32","karma-chrome-launcher":"^3.1.0","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.16.0","istanbul-instrumenter-loader":"^3.0.1","karma-coverage-istanbul-reporter":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.6.1_1586371052554_0.8112940430400202","host":"s3://npm-registry-packages"}},"0.7.0":{"name":"@opentelemetry/core","version":"0.7.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.7.0","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"26cf1fb34af5a58b80a123d3303afb33df6e2f0e","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.7.0.tgz","fileCount":63,"integrity":"sha512-QcS+5+R3JmUTQEyOtt5dn7mhoQMrN5fEZo7aVxOvjMMLqHDsy8S7esldsyAzHC+KsRTlLGFVY3ONF0Y/0ovgnQ==","signatures":[{"sig":"MEUCIHZc5G743+kUZHfAsQGoLhwz+fITdM6OOprHJMdaqPR2AiEAo+6z3KVy9J7nhED+aLi/asBZ9GGH8Kl80UhMVvFYBEY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":104189,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeoyyUCRA9TVsSAnZWagAAIFsP/2ac5wKHrxCwCciEx4wN\nAAYmyuWE5VX+GoRAN614/VEFHUpXgzrtJ71oBE9pZ8huXNn3Kbb+JZs8mkfr\ngy1j0g4cua/W4kjQWxSzs26ptnAy7goj8Gdgg79QLhv08VLDNSwHHaM3lcSO\nQNNmrTICegoB2HkHLHMa2ihxiVelr0DMfWd6g3C4YAgYLVYxVAOLI6jVDb8r\nKUGeMiTArcuMhkDruQoWUgoTe7Y76ow2JL2y80xtANW4h2ZsNJ9T/QExc19f\nM9OqfZANmMkK55f4FbgSC21vqfch/PUJ+B6Syf9mY0Mti0KV/6ieJWI/vON5\nyKRTKJABFiFaCFV3hZIuxv5GvO49ocZEzoVTf164gE/e4hp0/YQHNkjynQzO\n29tuMichRlmVVOcbhfiwNX46dxUdIQJUe3kyiclB1fbfkfEZfud+6GlqP03D\nybBUNOkqM9JlvfzVZiKjjWxclYzzKidfUgrB7AOlRNTpP9RrYgeSAu6tAAre\nApuESbkRz+vd9GQnNWvTqPZ5y1YvsEjo810H5z/m3ADh6+wfbkjvRMBNR6ak\nFyC/r7aApVoSZmlt6C/31ECkJzMIqlJligmPXiPcD1ARgyb0SuaN+S/wG4Pl\nr6QqtPz5Pg15v08AuHhyHHjNmvPfUkz17SG8bn7O1DEmVCYQd6yEL2jjtcbu\nh4Ap\r\n=XPRt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"scripts":{"tdd":"npm run tdd:node","lint":"gts check","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"gts fix","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"mayurkale22","email":"mayurkale22@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.4.1","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"10.15.1","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.7.0","@opentelemetry/context-base":"^0.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.1.0","nyc":"^15.0.0","karma":"^4.4.1","mocha":"^6.1.0","sinon":"^7.5.0","rimraf":"^3.0.0","codecov":"^3.6.1","ts-node":"^8.6.2","webpack":"^4.35.2","ts-mocha":"^6.0.0","ts-loader":"^6.0.4","typescript":"3.7.2","@types/node":"^12.6.8","karma-mocha":"^1.3.0","@types/mocha":"^7.0.0","@types/sinon":"^7.0.13","@types/semver":"^6.2.0","karma-webpack":"^4.0.2","@types/webpack-env":"1.13.9","karma-spec-reporter":"^0.0.32","karma-chrome-launcher":"^3.1.0","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.16.0","istanbul-instrumenter-loader":"^3.0.1","karma-coverage-istanbul-reporter":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.7.0_1587752084222_0.6528130546987163","host":"s3://npm-registry-packages"}},"0.8.0":{"name":"@opentelemetry/core","version":"0.8.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.8.0","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"6ef2af9fbc23c9f16d014038af07240fc7a556cf","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.8.0.tgz","fileCount":75,"integrity":"sha512-YKB+/OrLRsHYPzEMIK7QI+mBuyIjqeNLec3KcsAQQ3BEkd6aZzkjF2L/OG+nu2OV3yHDcs1/HOPz91zwYA4TVw==","signatures":[{"sig":"MEUCIDyTy3YMyB5H+7UMHqVXdv11JyCDaIL9uUbFOS3DQNSGAiEA6kQTGxCuosQ91v6yTF2N8k9pbXjpNuZRUuG7rgAiX7E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":121556,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeutCRCRA9TVsSAnZWagAAMcoP/1gdcDdnqpKZMHNj/PH9\nO0nijy8T3X08CBee1V7sP8lJx5vPyV5fxZeqce5TrYTGjNV4msRIEllP/4gA\n5QLzbdzi5Sx6CoPXNNyLfYo/3DLyteFt1cI2R7jj8+FIONMQBjpIIYz/9Z0B\neP3+rgdJN0QaN8yvIpZu0B8O8KuGu9MdSadLQkQLcAaiTQqWFHnJKGHQEWf8\nqh4teo4dWD1/iEuluyxnN8imCr5DtrHlGTTQwCLPO7J+TtzLze++u7zw5mDO\narsAq2TzfQRtUnhirOExJC/Ldc5j4ddk/KGVLSKBVgjH4R5zHNM57tBDuF4h\nMMG5jbMzu4M5A7+m432wnCUM6YZ/Kl8CdDlahfsXtZFoahcvdWza2Baho/kE\n63dmj2wTzrcj3nnKt4xGmkMBqL83yHPKyITdf15nTov415+lT54+g2V5TqHn\niWF5TyoTzqS6TlKisDvpo1LzR8ot6x0EIjNODSUKgzvGUttMP1b7F+g5hlGS\nbnBl8BIxopQwcanV0DfZZzZs7IpMCOfKhlsqUaMYV0A2Uo4K6a9GbEyBRYub\nlkrboNQu2famD7kzeEN4Jf/rf1Ya7SOytmTytSQHTaLvEg/Vx3CKtfNfolWg\nSc0/+18IouMlfcDXb4Ai2FzKFx860poGiA0vZanf1UNv9MmYewgyrT+Qy3D8\n4pNy\r\n=/zaY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"scripts":{"tdd":"npm run tdd:node","lint":"gts check","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"gts fix","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"mayurkale22","email":"mayurkale22@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.4.1","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"10.15.1","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.8.0","@opentelemetry/context-base":"^0.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.1.0","nyc":"^15.0.0","karma":"^4.4.1","mocha":"^6.1.0","sinon":"^7.5.0","rimraf":"^3.0.0","codecov":"^3.6.1","ts-node":"^8.6.2","webpack":"^4.35.2","ts-mocha":"^6.0.0","ts-loader":"^6.0.4","typescript":"3.7.2","@types/node":"^12.6.8","karma-mocha":"^1.3.0","@types/mocha":"^7.0.0","@types/sinon":"^7.0.13","@types/semver":"^6.2.0","karma-webpack":"^4.0.2","@types/webpack-env":"1.13.9","karma-spec-reporter":"^0.0.32","karma-chrome-launcher":"^3.1.0","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.16.0","istanbul-instrumenter-loader":"^3.0.1","karma-coverage-istanbul-reporter":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.8.0_1589301392973_0.8795013876198314","host":"s3://npm-registry-packages"}},"0.8.1":{"name":"@opentelemetry/core","version":"0.8.1","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.8.1","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"8a783f612fa3dad45b70810550127f7806bb8093","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.8.1.tgz","fileCount":73,"integrity":"sha512-RpWta/kg3LuJ2YxX02wVidXb++203OMa/m9JAfDG//BcbPPmuYguIDuEPn82OnCtBHzSXeYK7HT+YpOIefpk8w==","signatures":[{"sig":"MEQCIE2iuiGbpmYF9ef5G2SpD4y7ZBv1R2N7kIOSCuPNzZe0AiAXIzzEAISIivrhDCCsaqblakVBxDHxvtG4SnQ1YR0TtQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115500,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJewuP/CRA9TVsSAnZWagAA37sQAIGn+MyO6y7nUKGb68vM\nkA855rkfLjRdOpdg2DexcDXRRZxHlJ+m2qL88e1TMN7TWRgfU5BjEg6D0rzH\ngjI8JDIuGlsjluwUDfBYsKSYxTI22YK8mJinsfVeHWFb8VZJQ85dzeVJDyie\nbw++hPUrXVYmHFilyLS4oj7EWYHyZVrKdQWMcNOVoFyVlPb7gpcpGYRgqas8\nZYrJ+8ItS4HH14D6gR4ei+1Qq6BAkn4kAkUphTnw1gdGwoAqP0I+0iq8+KON\nYFoTTkzDtXStlVlmsW2ert8Y8gc2Tmm7XcmigpoPInfK012Y4Vwk6AQ6pq65\nomy7AFRHLpdQn+7k105dFcifPs+DBHUoETfOTOwXoh7VP60bqHsYNfb3W9Qv\ncjb+RQB9nDORtrSxyquPfZZFklzGLKeNQBjJmjB6tjpQEFe4PgEC6pIi5t0g\nJfXtr6H9svnDBVLtO2Q6MsVlay2b1WXiE1iC+yU5t0W8LVrPq6bYDybPsp0R\n/yE/7D1u9Zhop8Ru4OwalKHbq66w18pdaClbZ4pdn+cmu6siGnB5c0W+i479\n0twLTpi+2G3YJT0p/CrLfObA8mjJK27mlE655O4HLG/kiUOL+DbwW3A5SCQ4\nqjvEoWiE+O0bvTBmCINBCw8omTOVxigxpRnbJo/OHziNm1/YxNJRuTwMhv7Q\nan/s\r\n=a3XD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"scripts":{"tdd":"npm run tdd:node","lint":"gts check","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"gts fix","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.14.4","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"12.14.1","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.8.1","@opentelemetry/context-base":"^0.8.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.1.0","nyc":"^15.0.0","karma":"^5.0.5","mocha":"^7.1.2","sinon":"^7.5.0","rimraf":"^3.0.0","codecov":"^3.6.1","ts-node":"^8.6.2","webpack":"^4.35.2","ts-mocha":"^7.0.0","ts-loader":"^6.0.4","typescript":"3.7.2","@types/node":"^12.6.8","karma-mocha":"^2.0.1","@types/mocha":"^7.0.0","@types/sinon":"^7.0.13","@types/semver":"^6.2.0","karma-webpack":"^4.0.2","@types/webpack-env":"1.13.9","karma-spec-reporter":"^0.0.32","karma-chrome-launcher":"^3.1.0","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.16.0","istanbul-instrumenter-loader":"^3.0.1","karma-coverage-istanbul-reporter":"^3.0.2"},"_npmOperationalInternal":{"tmp":"tmp/core_0.8.1_1589830654443_0.9177760856355242","host":"s3://npm-registry-packages"}},"0.8.2":{"name":"@opentelemetry/core","version":"0.8.2","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.8.2","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"044c2d9aeb834bcdf71a08dea9f86465dc8605fb","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.8.2.tgz","fileCount":77,"integrity":"sha512-/tS7WcrYLiqe0HqDvwhjO92sywqMTNVLV5LNOP8gg8UKlCuZ24rn5MWmzpfi8reXG1WKZtaANAXdqtRPkg77Bw==","signatures":[{"sig":"MEQCIH0svaqhcUCGdyrAl5QALZK0eYm+QCiQRhb34Zho2JH8AiBRyekj6GTQM5vKS+jjlgzl0dmfk2A8mgP365Vl4uo4dw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":123545,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexta1CRA9TVsSAnZWagAARuQP/jeHpC+8sonu3dNHSxR6\ngeEYlty5i35aSjGrqk6gWUSWmv4s6z1ZfGi61ujKbANC6a13S+nYZdeND66P\nXaf/z5ruYGgRAonWLYoqaEJ+g22mllgtlmXW+pieNeQjWMtk0RIAkAXmTwQ+\n/7reKtI5+anKL9h/Eu1vQixTMsCAsm5nCO6bHABVo6szT16JcliHPnDg23fD\n6g0t1PvyG0pfv6tvLKRx1aXUMQr/MDILypng852283qYTzvHWqMxZqC688SO\nhpPrwoPJlIL0bV+9YIgyBCBewwII69/MsupwOH5OY1BCP952W5R2DAAFKZnW\neBEcNe/HEOJc+B/BsuK3dhqIVkmWA4mS2ldvcPF/jAesZqxWIBwAClOPocnM\nUdF9nW98eCJuhwM0NalGGwMs8lzKuLJkXskI12S9jhswf3TUgnQmxCvZoIMQ\n7FPB8cLrlkCmQd55kVxGiupya+vu/ufNTLz6vGtkpO8YJKc+awJnxw75t8pR\no5YMj391FHD5j1cU9iYnaRdRbPg4vcFcyUnO86MiskTikzbAo6nTFPo/ORbt\n9mbbwLTWQY01O6Jp+qvd/IK8ENVcQZIUalcQS9PtzR1yYEWagtFGlkKxu7eV\nQaftVIttoGJoo3wkoHMr0iw4IBhDaEWks/GnkSKEHn5T4IGiXLWOnE6jJMoK\nDzi+\r\n=40PC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.14.4","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"12.14.1","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.8.2","@opentelemetry/context-base":"^0.8.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^2.0.0","nyc":"^15.0.0","karma":"^5.0.5","mocha":"^7.1.2","sinon":"^7.5.0","rimraf":"^3.0.0","codecov":"^3.6.1","ts-node":"^8.6.2","webpack":"^4.35.2","ts-mocha":"^7.0.0","ts-loader":"^6.0.4","typescript":"3.7.2","@types/node":"^12.6.8","karma-mocha":"^2.0.1","@types/mocha":"^7.0.0","@types/sinon":"^7.0.13","@types/semver":"^6.2.0","karma-webpack":"^4.0.2","@types/webpack-env":"1.13.9","karma-spec-reporter":"^0.0.32","karma-chrome-launcher":"^3.1.0","istanbul-instrumenter-loader":"^3.0.1","karma-coverage-istanbul-reporter":"^3.0.2"},"_npmOperationalInternal":{"tmp":"tmp/core_0.8.2_1590089397348_0.22284983598692554","host":"s3://npm-registry-packages"}},"0.8.3":{"name":"@opentelemetry/core","version":"0.8.3","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.8.3","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"cbedef0cc40af9e9a96204671be1b9de76aec2e6","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.8.3.tgz","fileCount":77,"integrity":"sha512-3MSnQlFWj6ikZU5QLtiZseL25HzCi0XpTvMMKMW8x/PlOsqBBD/52eN7JC4587R008ZUbx+7afB0yewBTseY0w==","signatures":[{"sig":"MEYCIQD9aheChBYqChU+cTZ+NUkfWrbO7X07a+3aaYEbP+0LCQIhAOwguLFi8z4pZ2A4F58AFylk141RdPTwzIfRl2MFsj3H","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":123545,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe0BzWCRA9TVsSAnZWagAA1B8P/2fD+MkLYF1qc9t8saHj\nJVtD/+yWKyTvnpH2UivDmge5VONKqSAiQYzkdoPRxjKJEZUXBnOsCW882cYs\nyP6Y3nQmqnlm9DMpO5yvsCCZ0sSK/JxX6h/2Qjunz3Rw/rWEagPmylDg8xEH\nLwBroNGWhNRe5eyjzOb90D4b2g/GXT9gYRr0QFPAPhMC/FN2Qdd1Qm6gvhNG\nrfC+dembHvtz2qM1J8sP/BEZUEU3cnRKcxTaSKt11VrO9UerY7e9gC79hSur\nB3d2SXUT+D/Z4WNflJft5s6sie14ILBghQhLK94JCHz8Bu7W33YO77DHV/xs\ncunPuF8gLojbyd2D3ADog9DVjUm0n/Qv9ZwiSmzpFDnR+FC2Os6wh1RNnsJh\nnStIDqsuWr3fA7awNs/Fu50OA0tHgZd3NRSg7evsh2aGT1OLqUvFUEu05T0n\n3C+TJ4TXSW+KHOQwlfqV46sbFYPm8vd709j5yQBRY0kXUOuwCxLFFjqSVjK1\n4beO4zmAQUwaxAKzMrWjhWd+qfndQLenH9Hm3OvpzUahgyYeNXupEouPv6xa\nL4YqE65QSQJ6CdhY1w/15IZV+DhHtr5aUXSO0YSa7xM2KgHsA2jwhohkhXva\nXrl8SUj5WvelA1HB2tuJrcKywPsh9gY52iXgHik5J5su60R39WzA/o45LiWr\nkLA/\r\n=X782\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.14.4","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"12.14.1","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.8.3","@opentelemetry/context-base":"^0.8.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^2.0.0","nyc":"^15.0.0","karma":"^5.0.5","mocha":"^7.1.2","sinon":"^7.5.0","rimraf":"^3.0.0","codecov":"^3.6.1","ts-node":"^8.6.2","webpack":"^4.35.2","ts-mocha":"^7.0.0","ts-loader":"^6.0.4","typescript":"3.7.2","@types/node":"^14.0.5","karma-mocha":"^2.0.1","@types/mocha":"^7.0.0","@types/sinon":"^7.0.13","@types/semver":"^6.2.0","karma-webpack":"^4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"^0.0.32","karma-chrome-launcher":"^3.1.0","istanbul-instrumenter-loader":"^3.0.1","karma-coverage-istanbul-reporter":"^3.0.2"},"_npmOperationalInternal":{"tmp":"tmp/core_0.8.3_1590697173750_0.6800951396210098","host":"s3://npm-registry-packages"}},"0.9.0":{"name":"@opentelemetry/core","version":"0.9.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.9.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"bd140ff017094150239430847fc7e2929dd91d6f","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.9.0.tgz","fileCount":77,"integrity":"sha512-OU4qmYbDTilvdNgr9rXIGgBh1GENPbQrkyAzob5l/4/blqTDi75a5S/ZfkNjweyVvufVbp81rpvSxu9oN9tg2g==","signatures":[{"sig":"MEUCIQCtrw6VF2Zx42BJGjz5Ud74PW0c9yAMXCgBgNvesitamQIgGsNHiCUmauTU1VSnhI0UyJZA78B+mV876PS1tDfgdM4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":104817,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe69tTCRA9TVsSAnZWagAAvRQP/jOfJRYXnw50uiqA2KjI\nluZIdux3R3sXy4yWIsZtI7ExV2apbgpBVSUaxML6Cytx+ThqwG0TJIoVKQ4e\n0He/gYqHtZ/oiAFmNlPvjUiFDCSVNMrit4BMSFoh9rtJdVuYNJrRuuJIdVPB\n7nB8UIGJbXaap70t2WzwKVzrlk4VgxEpbKFjZna8TyE7OOOrOI20wUXUhxzY\ngpknbiDWgaheCT6VeXOaYePK5FOzJUkfALcCozkhtwqPyEv/pvzN6SVY8EZf\nQzIVMURuVFfizVZA0ELxCjSrNMLO0yPXVOIUXBVFFzop4N2J/37NW0l5ckxY\nYApyd9VwTXA9tNUUpU2dKIriI/qPrpf6cG+87eR/hH24ptB8TpSzVEp3Ixl2\nEbP4E+t0DhGnUSPAsKldNQDNX4iRbgfgFEZnaW3xR2PkFu8kKEAXgRX/bGdm\nfjvB8W2aXbEJ7rzVd/JtxnLaUQFumImBBu0wl8IJL6shv4PC/GfFeOkKukU4\n967Q/RdI8ZjQFN17Ch47UgmB1+LWnXoVZZG7UEvat0+vuZfgyafGZvmda6mW\n1SPtXR8/aFr4Nwdw+osk7rueh4do4a2+8UE7Mtwd5yXMJAkhGXNoOmnnL2cG\nQA8u6x+O9kzV2vqguWCjnrS9YfImdWrGw0aCK9irh6GYA5BjnDkGUEfi21uB\nXMPv\r\n=p2bg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"mayurkale22","email":"mayurkale22@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.4.1","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"10.15.1","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.9.0","@opentelemetry/context-base":"^0.9.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.0","mocha":"7.2.0","sinon":"9.0.2","rimraf":"3.0.2","codecov":"3.7.0","ts-node":"8.10.2","webpack":"4.43.0","ts-mocha":"7.0.0","ts-loader":"7.0.5","typescript":"3.9.5","@types/node":"14.0.13","karma-mocha":"2.0.1","@types/mocha":"7.0.2","@types/sinon":"9.0.4","@types/semver":"7.2.0","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.9.0_1592515410507_0.750206273799493","host":"s3://npm-registry-packages"}},"0.10.0":{"name":"@opentelemetry/core","version":"0.10.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.10.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"9fd2ea1ca305c8bbf81292a4e2f9229075a1f392","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.10.0.tgz","fileCount":132,"integrity":"sha512-DmuoQHAFgrGXOtry4rGOjcmPXJtsnigstklis71eNccIzJmFXnXv27Tzud6Puaabvd7iqSThJmQASTLwJJQ8hQ==","signatures":[{"sig":"MEUCIQD7WugFvCQ43imbaOC9KeptbMViJpXhXfuL/QKZLUynRQIgSdaDR+9ysnsQcH7kmFS+m8I8VXLAG/NQgfZsikhAamI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":151988,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfH0AeCRA9TVsSAnZWagAAvJoQAIHZ9xDPpOJI6GwlQZBN\nlKkXzN6NTTae5L28EKyQqDFyiYKyeSTYS1g9pFMYdS6hh3uEhLV/C/C4kaYG\nAProGwBThn7g+Nqt/8lxxWlRrGdT0/qjUTwj0d/TxuvIr+vSC+4izF1E2adS\nW6hdk5rPlfUVmPp2QkRwxVLcSb9rxjFAyYeiQZbDqdwQbLSXgEwedfdFMl4q\nBxGkvPIcZFvtRn40lyTiF7sQryrT8qThepPMwkozjfYm98Dq/QXedWdRJhsL\ndTgGCfZypLQHCHsT5Y4PwCFUcv/2UDtd1vreND+a7sY9MV7iCy0xMzSS7Qqy\nF00lnOLqOqmUNDpVAB0mh98YC6lP94diIkNnKpaiT9Es8VvVfo6JGc3/N5/p\nBoJ9S3dApcYtwWtMfX1JQ7PSOkO9P5jLwTZb6rfg+uFSUeBecxi323ZR8qjH\nDZDKBa8Zc0fbgG8VTp/lW76+z2FqccL0KvRmOdcu8D0dtkDtSzna4ewMgtDz\nRF4Zohpj8wHIhfnxZcy/FoPncqXT1/tnUIJc6ct3xe8FvMsHGWp6T50BBbKG\n46dDdGUYt/2YqoM9yU9+PihACXAq938hRI5keAdvdOW5oZDS3wVT3WaQlQVi\n38aPld+s7M/m4v7puu70uScRqbd6UxW5q8WvtEhX6LvLbZxQJ6sPMUz8gp6S\nZHUx\r\n=dxqZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"ab62a4d69b99b3a8c9c26100c04f3226af7859df","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v12.14.1+x64 (darwin)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"12.14.1","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.10.0","@opentelemetry/context-base":"^0.10.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.0","mocha":"7.2.0","sinon":"9.0.2","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","webpack":"4.44.0","ts-mocha":"7.0.0","ts-loader":"8.0.1","typescript":"3.9.7","@types/node":"14.0.25","karma-mocha":"2.0.1","@types/mocha":"8.0.0","@types/sinon":"9.0.4","@types/semver":"7.3.1","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.10.0_1595883550419_0.6377104376618019","host":"s3://npm-registry-packages"}},"0.10.1":{"name":"@opentelemetry/core","version":"0.10.1","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.10.1","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"03f5fa8d924d681e3d7d6508cca6f529eb686e97","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.10.1.tgz","fileCount":132,"integrity":"sha512-OiCsZl3BS12iBEQyOZHJnh6BsJ0QiOl4B8bYVFpaqdRfPZSpD4o6hUWti5Fwco0CXOBI+NUN9UYiZeNZY4AelA==","signatures":[{"sig":"MEYCIQC9HOvarOxaOTFzMnrdlOhsi0ZOFpgj7umQ8WUvkNj0AQIhAO907ZD7kPV6yXu8tl/Q4P5zWq8FRYD/S8sA204H2tV6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":151988,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIEBfCRA9TVsSAnZWagAAXBUQAIJ/anPSlRCEUBeKLMOs\nT8Z6sLgBLiM4Dw2jnglRvI+mhYUrpy4P6japrgwuoxfO4iEztUJcwO3mI/FA\nmQbYwNzLOfUnXJC3aEWci3cOoSdnO/RAWujnLbSgDDhyFe+zR43ATKqltL11\nwbQ0nqQhL2Iw+8p50bQDCX0uUUH6du0Oah+sT3ThV2kRLr4gPz30w3fcXPKG\nz840t1ud857ZmrgW2SltaD8fVTvAqolO69BOoSeO8Yhu1qDNB3BeQqavr8yw\nrwA2gzefGHsWvALOmKdIOq7BIFqCcjDHpj+7TL+8Y3v3Pi0Wuc/ma99VjPDA\ngbC+/uXJRISP09Zkk7BrXsaeZDE9REFHhd5fxG2sVethoXPcCFPZl4D6qycO\n3OZpE1i/nxNmmeNPowxMIgHGUbjpqFYGOYyUkw4dauD1bkdKP/4gl/PEePRH\ncz91z4rajz3QQohpmyD4al1h9kTwWmuHh7shUsP4HUAwclRhznV8z4WuBG0Z\nz/zz1DT6iKMvA1LShRHc7p4x7c5urmM9NlK2I43Xh+ZQ/QAlYkqcxeJKgb+H\nvnC88+BQgXA+iqFWjJQ/qOanpRmiFvlekKwkqq17hon8Z9l5Zt6vjKA40aHr\n1NpYltGe2lrfuM9MTSXt8gYZLBlP3e2KkRCnzgHWTk49hc/J9URmjfKjdzAG\n3Go6\r\n=cHvu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"03981e4299282d0611d1255ab0076368d5830753","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v12.14.1+x64 (darwin)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"12.14.1","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.10.1","@opentelemetry/context-base":"^0.10.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.0","mocha":"7.2.0","sinon":"9.0.2","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","webpack":"4.44.0","ts-mocha":"7.0.0","ts-loader":"8.0.1","typescript":"3.9.7","@types/node":"14.0.25","karma-mocha":"2.0.1","@types/mocha":"8.0.0","@types/sinon":"9.0.4","@types/semver":"7.3.1","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.10.1_1595949150752_0.37596087245173226","host":"s3://npm-registry-packages"}},"0.10.2":{"name":"@opentelemetry/core","version":"0.10.2","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.10.2","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"86b9e94bbcaf8e07bb86e8205aa1d53af854e7de","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.10.2.tgz","fileCount":135,"integrity":"sha512-DhkiTp5eje2zTGd+HAIKWpGE6IR6lq7tUpYt4nnkhOi6Hq9WQAANVDCWEZEbYOw57LkdXbE50FZ/kMvHDm450Q==","signatures":[{"sig":"MEYCIQCJhnyg20w1iCz84/0q35iHFsDKUUOD7NQa9wuBsVPvgAIhAN89EdmtsTsqD207mJf6w8siQJOvWzgqThZ7i1+K1SBg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":154190,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKJzuCRA9TVsSAnZWagAAa5EP/R63gy06JuAUC7rfTOEM\nsn2lCsh4yvANzfHIsG8OSOacTNk9anAWD29wcP+AkqP8Y+RBAzitDfNdoNLc\nMaNzmE9uJAT4QSSzMznMxP7s5hWGEBb2HhJgyF+UNxyEdbPs1J5a2AxkIX2Y\nLBthInJyaIDwLdLkwx+amOTKtCWyE3cViaCkH70y02syCpuU9me3Faus8/Tb\nJaHQ5s86wQ0csNibvVVVd+pBQgK/Lik5zWN1cOX4p2jB4QVDctD0FN/HdhKn\nAcg/dtRwnzURDnmFEj5ixo5FZ1nMehYV69Q5qZgJuV8Y+Oq4N3D5NDTxD1XA\nWV5dS40Xvys2moR8shj3jRz6oS2CwZJfNGOSjRz0VWSbTo+VHxsaMtdLVa+U\nDhtLoeAa+Xq08QDJeVVA2TCr+v5T6imQGlT4rYoLtyct9XHAVSMn0YjbJ0hx\nc+0YWqjMYt1OjBPqA4rMdU4K04VjKbDgGocYwMhEej4dirq5fI/ZKK7XWDzH\ntQZEYUKidco0T37X2fZPAhjQ+175lrP5p8h83YYMzVFv1XWeAdx8AiXqTsWj\njBGh2XsEsrdTlDbc6gS28KHxs9pZcfvwcCUEp6Lx01H7P/ZUERhQqNy35Kw2\nrj8dyh6E15Xc9O4tV4ZWuZe4qvOHyvKYCxZBZgc2OcnNSW2pOhQlzVJZnRuv\nDb7C\r\n=xNMg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"b247e69034a7888a842fe75e0a5ff06f8bea44a8","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v12.14.1+x64 (darwin)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"12.14.1","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.10.2","@opentelemetry/context-base":"^0.10.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.1","mocha":"7.2.0","sinon":"9.0.2","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","webpack":"4.44.1","ts-mocha":"7.0.0","ts-loader":"8.0.1","typescript":"3.9.7","@types/node":"14.0.27","karma-mocha":"2.0.1","@types/mocha":"8.0.0","@types/sinon":"9.0.4","@types/semver":"7.3.1","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.10.2_1596497134283_0.33114896641461433","host":"s3://npm-registry-packages"}},"0.10.3-canary.0":{"name":"@opentelemetry/core","version":"0.10.3-canary.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.10.3-canary.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"257f5ce9485325b846e2897869babe3318e006de","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.10.3-canary.0.tgz","fileCount":135,"integrity":"sha512-LWFvtLUXVVs4vaTJZhsoq0G76BVcBLj3bj1uB9ayu1ZqbhGMZloTKsTLGxr8hu/y7mjRn4dsQhV7rx+mXm1rdg==","signatures":[{"sig":"MEYCIQCLZDXVwf3HqD3VgWZHlLiXgJdsSRAE5tlmVoXxRGJ3ZwIhAOeaR0wvDBSiiC7p8kOQOw5ss2uZY/xby049P06jfKh0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":159155,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLYWXCRA9TVsSAnZWagAAEUkP/RDubIHvFSfvBAQurySL\nZKYToSxWiGgkoo9Anb0Pn471r0EonQYNAXDAB6EgFtCfPABa1AhtQsILq+R9\nRL05oJkh9Zb8yiB75kxGLZ4gvNQm+1P3czXVRwDq7L7Fgw4n/TxPYnifqPj1\nvOamPRBF1WZio7MT6Jz0HvnLPPIimK0VA9qctjYicgV+wDwv2eKeP9o6yQ1C\nRoFxJkMPol1DixyE232jFkjk+TcNUlWYS8BFLk9Bs18CeVzEDLNMrhWPTdH7\nRYUArKqARzY0XWnr3OqY6ISMHKkxLl+l4mLtbsVKy9EMiyqgKyjJeCi4xirx\nVgsyTZcP3kgHDH64ieKu9vr3UJygKKm+h0GxK+IbypuOT44J8U04fXfov0mG\nyFmY+j5oj5V2ZBs1cDr/kgfLttL28xfO7vCHrSdqv9YXzL32u+NIwRkfrHYZ\nHMPsthHxNJ+EN1x5zvFHKdM3p9PEWknh7zLn/ua+cBiVQ+esVGamcapyBWNC\nKXYgr75IO9drayHHRavGHj1bugODt97M+Uz3W6Rqicd5KhM4XCE9vDmi1c0a\n0D3R8ro7F5TPLKT9nzckqm/8uDwe8upQXKJ6Zxg90yltfWJlurJKhWsWbBBL\nRRO4aOfda/4QkEclC1EPpo3SnBRL+uJHkV2m2VXYY9ZjowSAlBKxwoGlBXXP\nQFdE\r\n=Fehc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"f4f2f84bc087389b3206a2e17837b7b0b95fb2f2","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.7.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.7.0","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.10.3-canary.0+f4f2f84","@opentelemetry/context-base":"^0.10.3-canary.0+f4f2f84"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.1","mocha":"7.2.0","sinon":"9.0.2","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","webpack":"4.44.1","ts-mocha":"7.0.0","ts-loader":"8.0.1","typescript":"3.9.7","@types/node":"14.0.27","karma-mocha":"2.0.1","@types/mocha":"8.0.0","@types/sinon":"9.0.4","@types/semver":"7.3.1","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.10.3-canary.0_1596818838873_0.23312838143124281","host":"s3://npm-registry-packages"}},"0.10.3-alpha.34":{"name":"@opentelemetry/core","version":"0.10.3-alpha.34","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.10.3-alpha.34","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"bc7d74da0c4f8df16ab8c86d23c47fdb387ed231","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.10.3-alpha.34.tgz","fileCount":141,"integrity":"sha512-5zJvnIsUAg5ihzvwkqaiUIfRXcXzcE4NWJ0pKtiWZ6yQyijuqd8AQDDFa6fSmeGJSsiuIaB7WhOgne9hTNbcaA==","signatures":[{"sig":"MEYCIQCHdpmhamEKt4VTQ0akG6pXL/Mheom0XhsCI4vby1cI1wIhAJEsOcpHK/+LUNFukFPujveJtwBOjIvHWxFZF3l/d8NH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":165473,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfQ+5mCRA9TVsSAnZWagAATbUQAIdNvpWbS48R4ECUiRZh\nvaKRNlVu+Dtm+QsSTKtoSmVMWpx3cCQWKUa+FjWJ4bjfobinKEQTPZ6RHW0i\nJ8N4MIWSDlt6/CRvWsNdWQ7S1M0HSoZP+63Duhrb8+4bUDL0MROUUV8Q/bxI\nkp5MZRTdV5KteJ3KBUXu3C01HCwnp55fEK7HcbZIXHLF4WImpG7RvG2/0UXT\nGpI4o8MwFhAMX8p7oRFcM1ZyZv4jC7iSVuNyUt8WUQ4nP5G+6YEp4EvzRagc\nC9MYE8RyyEtNI8LwhuKCJzIB+KHfxMVR/plYyPDmUkxCEWoY+Spyee+5XYh9\npCoX5Dg5V3q1NMoWuc3V6yoZy/xWnNYXWi76qaDbOK+MmnAcMtNq/O8zDCrC\ndjDWchRmvdX45GVCRosVMQ73vxt2pERx/ks/2Yz4F4gRpE6ypNOqTXhzrXny\n4r0JWSvYzkYojBni4kSniacBn9G/1PSZPkbtuFi/7paYDuHH6MKJCqULMB+E\nXFLUeNX/618PtN0aS4xzQGn09iOgZ1CLeErY1VKD/5ylAKuYGx6spbnmY3ZV\nM4o8hpR7vLH6HKlQrpCSDmn8bpB4LQnq9jYUD9lkXjQizixyksp2wY2hddiz\nTs453T6KJ3ukYxDHUAG2/DgP2Fm+ckwsPJfX256QA4I8xK3IR4W/jbLWEN8T\nh0Jg\r\n=Uz3d\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"fb06b5bb1142286acf5b326925f3af3353aa9d90","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.8.0","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.10.3-alpha.34+fb06b5b","@opentelemetry/context-base":"^0.10.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.1","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","webpack":"4.44.1","ts-mocha":"7.0.0","ts-loader":"8.0.2","typescript":"3.9.7","@types/node":"14.0.27","karma-mocha":"2.0.1","@types/mocha":"8.0.2","@types/sinon":"9.0.4","@types/semver":"7.3.2","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.10.3-alpha.34_1598287461608_0.8371412348277365","host":"s3://npm-registry-packages"}},"0.10.3-alpha.35":{"name":"@opentelemetry/core","version":"0.10.3-alpha.35","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.10.3-alpha.35","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"91f534955359f7144e42a108b7780c22fe8fafc8","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.10.3-alpha.35.tgz","fileCount":141,"integrity":"sha512-Bl48Cv9Yy9Bnq5jW397UmEWPJlv9UvpBQCmgD8xafjH3t+mp7BWTjOOhKcnzB+j91T61wbWCQ4a1ZAlCP0m+OA==","signatures":[{"sig":"MEYCIQDOM11iFKWopRpBVIhQGdtbNNnuFlxFbaHsGQyVHmtHngIhAPKWkl/Zch7HIB6UJl/EXVVMGh/dOsIoooHdspbnyZcG","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":165473,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfREL7CRA9TVsSAnZWagAAlAMQAKBTriKI//ejrJLaLYo7\nQbQf5xLUq+Fgg5u5vY7xfqkoxwUljikUH59Jr28ln5cJ5ZCR4yZZ5vqCg5Wn\nBEGGSGQryDOouxALGGOjG15uq/UpKWVkyuxOw4CUMjtQAD6yOfHszWQUezLi\nNlN7vxnFHsPm44AqQ1WpPqkQaw3mAXNfBd6XEd53gDYwgttRMYJt7z0PXZm0\n/1OBwd8/c+EbWUFllkIUOdifiqgvmF5/xyIXrItri6hM73bmbFghUFAWJntq\nx93Lpnh5nlmq6ffaeaD4V9iPkgpwH4WFeHE5Riyh/eos4sHAO7Kh1o0d99+u\nrQ6JADrjktJmfwozREpT7M50qP8lQ2Uz8pwvXU7B7KwgR1gcPfWxQv0eoZGS\n3BMMKK/IEh71b5HP99uZu+aIBHlhcJgj3qJi0DUR2Y7zX5FUTIjHwi5iTVi+\nz4Vc+TSo1bVJ+OCrHEXFnbOWs5LGNCyKy85iLaZuye2t8euulIM0qjJlbY79\nmGuX/an9co9zAKJSW5N8pjHmzIUBFZ6RNFmQsZjJbvVNMGgcYNJM5suL5a8M\nsbk+qABaYuSQEpSezR3NyPafWYQuxdPz/XAvItFYY2Lto8BOamL8QsTMuYYv\nRpSlod7dj9Y78XHgiHGgh7BcaIIX5CMJzVZy2bo30XhwDPEimXIuvPU0Hv21\nKnZR\r\n=YPtJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"2ee9f1aaf7b61c4b4ae6b748f0a07f8fc708f07e","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.8.0","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.10.3-alpha.35+2ee9f1a","@opentelemetry/context-base":"^0.10.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.1","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","webpack":"4.44.1","ts-mocha":"7.0.0","ts-loader":"8.0.2","typescript":"3.9.7","@types/node":"14.0.27","karma-mocha":"2.0.1","@types/mocha":"8.0.2","@types/sinon":"9.0.4","@types/semver":"7.3.2","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.10.3-alpha.35_1598309115474_0.09150559681239878","host":"s3://npm-registry-packages"}},"0.10.3-alpha.40":{"name":"@opentelemetry/core","version":"0.10.3-alpha.40","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.10.3-alpha.40","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"675cbef390ba2f89c923f5aed2e9e1af249e85bf","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.10.3-alpha.40.tgz","fileCount":141,"integrity":"sha512-feJX2/9Jc4VLRx/N74GnkUlb+oquBm0jYN2BemA90cu61IAcBJxQEzBvmnjxo2ulhd4MdBEfCRtiYHreMuZI+A==","signatures":[{"sig":"MEUCIQDHnsEx6NmVCgq6WCUbjSVQtbG21EcCElbVE6TJAVQoVQIgGHYUPgk7DOqGkM1abKi1daeu3OSD6/Axype4lrxELBE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":168361,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfR8HSCRA9TVsSAnZWagAAqYwQAJpcmrTzULubJFMGNx6A\nSvhMHwk0pbQJ27mfG71NcGXK+N4TKrb6gXiZW6g7Kfn0j367XBuOBIhye5Yn\niVh/Vrb2Phu3t1fONKBnHgufmLU1p/gyqFwzQnQJzDlCvsJCRwc7H5LYfgp0\nlTykcbJVV1DY7zuOtIr+9KqhjjeFflkU5zv6dcGr9r7xN9b/y07Uvg65XrqU\nVLtvdMPVTptuh+Gpe94zcs5e3K3iyfnlnWtiui2oEyJ4hHZpE3qrUvQ6Tb0t\nJq2+tZajGHCUav/oZiHstzzl9/1XBAv6haQupLOh5Eefxp7/xQvknDrxBuiO\nBk2zugGiEeeIjo3mRsFlIHJJ5qAnDlzFpac4xVnWWc81nSPbrz6tclpa1HYV\nKNlzT0mBpT7jc/b6Z7CD9pwSIumdHct++117gJvUXqPmrstYzF0EKyqw59qA\nD2VNLANrrPFUnkYbjfYzZ/H8NyPIdH4Ct2sziarFdIReCfJC0iYqs1z/iltx\n+l6C1bm41+Q/gnpNjXCp2Vk77f7BPhLfmcia5zG2C+stKNLzi/dCnqKkwEq0\ne28Pd/haUb5/TSWhk0qn147j2qtp7IDVMco82oq4SmommQKd14s+PKExWlSo\nLvd1gFnDyi11VqL+jCNbD6IElblOsnW6GhNbh//nQpa2UzWdDMrbmcPrgMYP\nlhLN\r\n=gwAK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"2052a245bce0d7a6ddc273cb3657bed5d3d21dc4","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.8.0","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.10.2","@opentelemetry/context-base":"^0.10.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.1","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","webpack":"4.44.1","ts-mocha":"7.0.0","ts-loader":"8.0.2","typescript":"3.9.7","@types/node":"14.0.27","karma-mocha":"2.0.1","@types/mocha":"8.0.2","@types/sinon":"9.0.4","@types/semver":"7.3.2","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.10.3-alpha.40_1598538193616_0.9025083332269366","host":"s3://npm-registry-packages"}},"0.10.3-alpha.41":{"name":"@opentelemetry/core","version":"0.10.3-alpha.41","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.10.3-alpha.41","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"2aa2ab74434cba0ca09909f08ac26bc167209e4f","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.10.3-alpha.41.tgz","fileCount":141,"integrity":"sha512-tRy52acWWZft51YieJernHfbU9h4sTFQfuPwkGkhA45xClHbIDTrCIT4geAFcycajxxOI9EVxY1UcGVVjIeC2Q==","signatures":[{"sig":"MEUCIQDBmksS5Btd7rV6npmPQpMzwvJvf4U/eubl2b0pCs/XvgIgLISYMNd+AsHIcISYFifkKPgvCEuKtn7fFdbsLgODGxU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":168378,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfR9qCCRA9TVsSAnZWagAAUNUP/15Fx+fj1SjZ4XJZ/r5Y\nndYuAYYLETkXo8OHLhBZu/+goxJu/mI+gdz/aw8VnDa2k3Vvnj/vuVjeCCSL\nVPhsmoL6e+CtV5F3Z1E+WntpHVB0zRp91XQHSGxd/uPl4cusiBHMUVHwbyp1\nInVZol/z0UcNhtPAgV4JOSgn0+KSECNqbO61IP53vAG+csCS0YRfN5d4kur1\nLMI8wWdbUW/dibrlNKlQdDuPVFgei047ND/YArvrea3a+Y/6QTdGWn7zCGb/\nycJXMOfBOaN2NB27YhzTKVJCPK6lWPM48I37gTzu0I1GltDfdTi+O/U3a/sm\nzFbZHSFJsb95g9QBoaIuZAafig3it7xDq2TEhUP1ovZAOJd52oSyZ5PG1Njm\nVjuSodcv6gUChO0Qw2JrtGYjCAoqSsjEpouBRTGoXZvo0Ovtuw/z+qx01Fgz\npi51QHjWHcZqsvzZoi9tAS9HUxMpSHC3wD2jPtIQdfHaU7+X9sYP3xQvF+LZ\nLgO3JZi+7UsB9HhaXCQBffVDanmrYGZ5701L+J6+qqVytvU5ypCJ8VTLjJwT\nl/i8qcR4zxQHQIfyrZvL1mnANPg7/mbUFNKoyogttbnQO29JUR4NorXCh0fm\nlrLCWoLeMbAqvG+TxP3PezGkDAdtFG7ANFadpiNNU1F4z/Sl0ACabn1/32fX\nWX56\r\n=0Kf1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"5c7753fe6534a34f0f4eaf653d53f8c002ee299d","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.8.0","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.10.3-alpha.41+5c7753f","@opentelemetry/context-base":"^0.10.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.1","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","webpack":"4.44.1","ts-mocha":"7.0.0","ts-loader":"8.0.2","typescript":"3.9.7","@types/node":"14.0.27","karma-mocha":"2.0.1","@types/mocha":"8.0.2","@types/sinon":"9.0.4","@types/semver":"7.3.2","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.10.3-alpha.41_1598544514090_0.2988205037230296","host":"s3://npm-registry-packages"}},"0.11.1-alpha.48":{"name":"@opentelemetry/core","version":"0.11.1-alpha.48","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.11.1-alpha.48","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"fcd2e4be193a0ac2ceb5715fb18d023be9f44815","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.11.1-alpha.48.tgz","fileCount":138,"integrity":"sha512-o5sbH5ujO9bda8cy3vsHVbiRTlUMFcs/4Esz0MD0TghJFDaHh6Eu9tJ9vGzBJclOTlKtwB7dAf0Z9788GryGog==","signatures":[{"sig":"MEQCIDlsPmBkdS2/pEQN93y7WkRlBdKRagBW2xM9OFaePlYbAiB8s9Pjgu02yvFsD+52+ZvQJwtEPWgurE7VVnk+Duh0Gg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":165880,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTp/cCRA9TVsSAnZWagAAg00P/j6YJ57D51N/R0p0pWHh\nug9Yli8OGGk8hbcA1UKLpevuRb0FzhiAej0igJWuT8vGfEnmI9R0RCT5SRU0\nq1WzycEFo7FTVCvBx01Uo64HU5a5Ik08YoXhJTXXNMvdQ469GPyr7smEwnrM\nj6hKPbHLibUd3819EhSD8l8eYWNxs9KpWXus4zVef/KjEfjYs6wNg/j4nF+n\nAYhAtHlE/rA4CgTMTrUTM6FRKJb1QpFY+E3rQgQAold5ilcXY/V2F3xAuMu4\ncBqBufJ+a9s2/r/E2wC5dAZLrEHzFZ4L8gXIhP6BKD9I3XhY6zuVbfRx0hOH\n5D1LjyCCbyGaclk2E7Er27xrrLknE1VV1HQsc5jv31fuvns2nv84e6fcYEaJ\nQIPjII2d34ywrM+sS2nMC8Ae2RAyKRwjnFuOkEtnDoWVKM13Dyy1f/9kKapQ\nx+gMuWpkE5mSNdKLhjfWwrEEIQS/GZxuaEXOINXAcFFd30W55eLZPv9kLSQK\nsb/6XNAt4ROyLy4kQt7v9NcumfFufK7xZ2tyMy19yuBQCYrjWMYlSVDLf0jG\nNzaAKNsHccdvZnggYFkUAi9zEHMEIIW5X2aG1n6RKmbCOPR6oa/GqWIO0mmr\nTmZs9Tj5Obajp88ZB41HLef3+YEI768q8kS+5WeUIo5VToaSSmj1xJk60kIc\nxspU\r\n=9HPF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"15174c6647ab9863dfc1424412fa60f2fddb3351","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.8.0","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.11.1-alpha.48+15174c6","@opentelemetry/context-base":"^0.11.1-alpha.48+15174c6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.1","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","webpack":"4.44.1","ts-mocha":"7.0.0","ts-loader":"8.0.2","typescript":"3.9.7","@types/node":"14.0.27","karma-mocha":"2.0.1","@types/mocha":"8.0.2","@types/sinon":"9.0.4","@types/semver":"7.3.2","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.11.1-alpha.48_1598988251616_0.38278051460402396","host":"s3://npm-registry-packages"}},"0.11.0":{"name":"@opentelemetry/core","version":"0.11.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.11.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"4f1aacc825fa25bc1b0977a9983713f814e27f98","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.11.0.tgz","fileCount":138,"integrity":"sha512-ZEKjBXeDGBqzouz0uJmrbEKNExEsQOhsZ3tJDCLcz5dUNoVw642oIn2LYWdQK2YdIfZbEmltiF65/csGsaBtFA==","signatures":[{"sig":"MEUCIQCfYm2QMB/2HGoDkys0G4Dj2aoXJ8fjKoPAhlDSIzpClwIgSW0dm/Oz5tx198zSc9LqzTrrulT2dkYevJl1TSsjc9E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":165793,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTqHBCRA9TVsSAnZWagAAvykP/RNmLFQ9UfSDmqAgggJC\nPADUwm6rRirZ5jRVzFBOA4FbtMZ1qJqEr790MdJo1auPXH3d75xvykpSDHpU\n+kn1OokN0Hfj2ylmV2MMjci0v+5OBdHzFc3AxFQiPXNOwVrgRSqiemiYtWZG\n1wunVKOf2WmVLoZWya7633hEzwhGNHN39VlQoVjm7q7bCtNgLyQsJ5yyyIjI\n0yoMqrgxwqSefp7583B3IOAIPBxnqvzjlCIBFR1dCD9qD3CN1eLRFaAHFr0q\n+Up2DK4i1cCTS7Wfp1tig0pDcEeCSJQqYjzVpQYY+8ZJWuO06ThHJVudFi5W\n88CHbI4DO23xKY9/3+YGx2VCNGBchWlayHOZ3++/Wy/3HY8j3scZcNwFmfuh\nj8KYv9QuVZf5gUbWQ6uB03GhuJbTGoufJvkRBRCuRt/4kvIW4qdTtfeX1Imm\nlpB1cxZo/1m7gc2WPHYfDRjPNFnJWaNiDcYF4tfdo3Ty4YeFDXRKRsZHgHcQ\nBS2RRw1xluFDvzsMBa6exQ2ASTI2ZSVv14yrLoEurguIw/kHbkmD8RL/sE8E\nNnuM32PReO/tdurcW6SVoCIgiJgO078EeergF2JiTarBh2tnSBxI2vQ0hX5E\nMUJzEbnrzlJ8Kw3Xaf9oF92lQGIVFFih77sND6hbcNuMQslLY3O8oVGoRLGc\n79YA\r\n=8MMW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"15174c6647ab9863dfc1424412fa60f2fddb3351","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"obecny","email":"bobecny@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.4.0+x64 (darwin)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.4.0","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.11.0","@opentelemetry/context-base":"^0.11.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.1","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","webpack":"4.44.1","ts-mocha":"7.0.0","ts-loader":"8.0.2","typescript":"3.9.7","@types/node":"14.0.27","karma-mocha":"2.0.1","@types/mocha":"8.0.2","@types/sinon":"9.0.4","@types/semver":"7.3.2","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.11.0_1598988736286_0.14085343664303807","host":"s3://npm-registry-packages"}},"0.11.1-alpha.15":{"name":"@opentelemetry/core","version":"0.11.1-alpha.15","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.11.1-alpha.15","maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"b110f84ca5a08950624ca355d31966e89369e2dd","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.11.1-alpha.15.tgz","fileCount":138,"integrity":"sha512-VCnf1TwRDI9SThtdGcoo19GEXH416t3dTNd6Yq0gLYSKBRev9pBQmhKpppTrL36TGMQUPXC8SuCtwQYLTCa28Q==","signatures":[{"sig":"MEUCIARGH8SV/jTymOeAIOAUbnhIa6kuE8AQnABZ8mMVmnr4AiEA2ocqJUbpwB5Eq3gFPtCJFtTYpdyPHnKJLa52+tCCPm4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":165863,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaB4xCRA9TVsSAnZWagAAwU4P/3ChyoQ6psd9HppRJW9M\nmmPJNJI8+M7aP11aYdbuMHY2VRKRmLBi8ojn/1gVSd3VHVDIk1gKcA51XFVA\nryW5hEeVflpVnwMhC+ZTjV78HT+NDjgkdsTxoLOTtQo/t8kYs/gGV6DGIsGK\nBMdYjWZ5+31+FSAwlpOZVhraOCElCB5V0uD7JX4WFg8IW+TQpk/apdfHf9m0\nbq9V8p9e5FEybDmGrlnVj3eG1ZjnelpEE3klU/Y8r4TLjd1WN3xP2h64bAop\nGd6SpVAxIrFrGJy2oQY8QIApKm98QZxA+hgkXs9InqbcJ88+UkR4UAEqVzYy\nPEn17CPd9UD4Nq20XArrp0ryf/ruf43cJQjuACJX4waHQFG4yACKPK3dcOP/\nqOhmmowW6rqk1K6yFD0SHpmJjCwXY2af7hRtiFAnFLL4m+ynhG1cIZyTlTRZ\nTuyjCtoPSIInkRgkPtyz5N9JowcCFqjcRbjkaK6GMJU5twWk7f16eGMUH0AE\nK/uRbIayj95HoxHvqFG+mASTWTXxMslL21nDI+SlZvn2b5uLdKXXsT2NFnQ1\nYBCoDOlbqWfa0CNqCy4rImJ+lyEk1Ym+fEeRtzhhBJNVfay+5xJ/6tYD2dHr\nN42zp2IQhBg0sKozsHBNs/D52hsj1aWOSSzG9ZlkTx2z06O60R+ECZ51cYfK\nWQwk\r\n=aFNf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"e170039015e8a1a7419bb835a00659b2a734b8a6","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.10.1+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.10.1","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.11.1-alpha.15+e170039","@opentelemetry/context-base":"^0.11.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.1","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","webpack":"4.44.1","ts-mocha":"7.0.0","ts-loader":"8.0.2","typescript":"3.9.7","@types/node":"14.0.27","karma-mocha":"2.0.1","@types/mocha":"8.0.2","@types/sinon":"9.0.4","@types/semver":"7.3.2","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.11.1-alpha.15_1600658992803_0.19452482814379257","host":"s3://npm-registry-packages"}},"0.11.1-alpha.35":{"name":"@opentelemetry/core","version":"0.11.1-alpha.35","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.11.1-alpha.35","maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"879f52f79afe8c95e935cd55ecfb343bb252bfc6","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.11.1-alpha.35.tgz","fileCount":138,"integrity":"sha512-l4KizAwtcSQzc4fHPDKr6bJPSjo7wx85cqBbi6quIWkU9KLB4PJz54t2TLvDi41L2w5t8RqV7OZlzAnZ6w1j5w==","signatures":[{"sig":"MEQCIHPYvX8qGq47Zp2kR7azSPokMUnWdu5T/Osdj+QmH+P1AiBqTltB4WLSPClmgfdDKXu4IegOoJGJMKiamvRVTNpuEQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":168344,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdHhtCRA9TVsSAnZWagAAikIP/RMqlNV/hiIvxq+5739D\nyO3BRtDV5esgXMYY0dDvrA6wlBXx9ABaR0EVWeJbg5pFf+YYZtJDoCmeUsIW\nU7UTEiIcpYkmoc6gl529kh96P0Xt/n+LgsY+CyKTdKSQiUq2zgD7Ee/GD/5g\nrJnw2l82v0ytuJrlQzmfn5Tnd8DFi5MbsdHRY4YgE+kfLJnHLJUzZqZzXbBj\n7l3hW/R2QQOWDIQfGxvIN8rUS2i4jv6g+I1ijk+Vd9eD8cGZWtvGTr7OFYXo\ntakhUQGW6dplDwKetGZI0DeJBa7nq+6ANLPVyk7/HtCE9EwRhnSAKN9wZyXm\nLU+y2LQUawlZWpfVGWp0n8xXietYlInw1pMlY7QHvQ2ZQEJ43UytO4WqcKZ4\nfU8HEDBhF5kRepTRwCwgPArNHhfPibSWSZgJ4vpRaCWEmvH4TtJ6q7+Mwikg\nKjFcpOhcUpc1+Y9wu97hW82SZWtF7gc0hXdQhIJg8WT8zF5iU8drfAB+VzI6\nC7vTZgB0ge8S56ijbK26Lf5rO16jgvPcwHDTGsaDd9VvocF/8WTHleBfWM9/\n4r7NAOIgmEO11xIq3Yx+6myHvMDGo0EbNtyi7zOwz+J18xQhF2MecQuDLcct\nJ9QjPkIJCwZUcF7rYK8HxyxQ/Bar2E7G22o3lCF+u2DjKwS9GBIQ0cntKWP/\nyoeP\r\n=Rzah\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"c6c993bb16c58ba907337a5667da01b3c248e350","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.11.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.11.0","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.11.1-alpha.35+c6c993bb","@opentelemetry/context-base":"^0.11.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.1","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","webpack":"4.44.1","ts-mocha":"7.0.0","ts-loader":"8.0.2","typescript":"3.9.7","@types/node":"14.0.27","karma-mocha":"2.0.1","@types/mocha":"8.0.2","@types/sinon":"9.0.4","@types/semver":"7.3.2","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.11.1-alpha.35_1601468525331_0.47403870374857693","host":"s3://npm-registry-packages"}},"0.11.1-alpha.36":{"name":"@opentelemetry/core","version":"0.11.1-alpha.36","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.11.1-alpha.36","maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"da72db2cac80b7e8be0bed1292c82509b3a568b2","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.11.1-alpha.36.tgz","fileCount":138,"integrity":"sha512-0Skf/8YStUKq1MaER1GH7AdErFSjLyzpYvvLRHodTwf9Au+dIM/VUl23+1X5e91TKGqLnTPDIvF7daBxQX0jyQ==","signatures":[{"sig":"MEQCIB5s5834Lma7Uj8kXbAMbuO1BO5x6mjZgAbXxqSfiiaCAiAOmnruSIwDS3519eOdNV+arIfDt2lOzfpiu7IyaYke4A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":168361,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdHxPCRA9TVsSAnZWagAAIKMP/18M6faxgYsoTF29LpzQ\ntTFP7yRy7wRcVpzJw2aiJGsKjumm/4m+JdUOd/pFVANnnZx/d3qWvkHHiReN\nYSF/UHwYEoZy0RMsvT2kRr8ckY2eAs09S4jHBqaNkBUMvzF1a3xCUOXfzKyK\n1wqkeGt/62JGUg7T1A75gPVz3va9l6ss5hjwbR+pZB+kRJ6yPjWMApTK/OXL\nmAUveGoWiQXbAbZRD0Ny5taVT9lXpSRxvRNvxvCCXyfeuezpYsyGvJX7PcA+\neinjbhQHr+Sp2G8xF8cQK6dX4t0d/Fz7dQZ04tbUf8fusZPWIuFqwWgr4kYh\nrdK214w7tHHNIMhvyU3ND8SBpJ7/j4L6x6Od/deygDOnBDtApTX8kOeMpeFM\nMNa0w5aXuKgkn+53UA+IbbYIWJ2GQo4pp+nw+Y2DYAkXxUH3BSeK4BPE5AZJ\nOSasmhCsYVEuddkqUt24iq+97BI7/6hKm1lkzvAFCGEvOrkulrGGZNFRZ3ex\nrl3Ac8PJo4EEai0f/ck2eE0Lks8QQhOeU6XOD9cs1nYaTDJXtVh8WyRPftS8\nN/TtFe707sDQAT8qYnx77FuUjGQ03E+ix8kstS10sydboCxLlq4Y+ksBt6K1\nvjt75OlYYXtlg9SW9DUz16RVqQIBFEOfO9iza/kv3nbZ/+5YucThu52KVFzA\n6eFx\r\n=LUVB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"6eb157c66925fe84b4960f247a86678441f3cb60","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.11.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.11.0","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.11.1-alpha.36+6eb157c6","@opentelemetry/context-base":"^0.11.1-alpha.36+6eb157c6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.1","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"9.0.0","webpack":"4.44.1","ts-mocha":"7.0.0","ts-loader":"8.0.2","typescript":"3.9.7","@types/node":"14.0.27","karma-mocha":"2.0.1","@types/mocha":"8.0.2","@types/sinon":"9.0.4","@types/semver":"7.3.2","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.11.1-alpha.36_1601469518803_0.08287400135137313","host":"s3://npm-registry-packages"}},"0.11.1-alpha.44":{"name":"@opentelemetry/core","version":"0.11.1-alpha.44","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.11.1-alpha.44","maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"1dee0f54c8587f702b1ed11e4d21887820b57a9d","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.11.1-alpha.44.tgz","fileCount":141,"integrity":"sha512-GOnUE8f0jdA04Ur6gyQE0UOR1bFcGhIp2e8d/gLTBeUw3s3OghBtw3rURRooP/BYTCf8IFmTp4PS1omgjtCq0g==","signatures":[{"sig":"MEUCIHJ+HkQ3MAUXdG2r01BzaArAIeiMl94wf+xZV1QfYpPmAiEAumW2hdqHcnFLoXXDRRJv1xW6EkGZ7UMq6TZ6CnLap0c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":166599,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffh0QCRA9TVsSAnZWagAAtQYP/2tMQKHhAhWngaBMm2jM\nkG+LqTD+9R/82c95YRtwhHNhZOfmZAhuKSkPwAI1o+ahxXP2nr79Q5szKmbj\nDYTxVO4z6TzHsgCEjqRvFBY3aqEjvM+eRAfWxd1aVXrEBZugZrky7nYIxYNM\n3ZVUkESfLvH2MsR1tnfLmqLVqITZTdiYdTlbaIUdUiBbP16dDVryl1I400L7\nvqSB6uCz/rErv2B60/75OYZdkDQfwVLQ42gfaROt6aItiawOTJ+LSk840RQ2\nd+nnehQRxBFLz5e8oxXZ739Nm1RgmVw1nDZmtjtXJNkeIPwbojy5qDyiFjic\n0+VZoYwaoMbKkurR3e3EETeuskREH+91+1TOwX/AU/4p90I0hAAiq4Nzw2A+\nYMgL4hAAMn9xe261gZfvY4D8culpqAt0+5p5g9627L0QVK2U+WS5OzY/bg2z\ncGboPblNRE4Zuffk+Vm3UwzqfhF6DNlshcC/YroRoIYj7Y9eTugKQOfD4YH/\nWqBn7Caz1i0aBx201+LuGzwXhw+Tth6afFmb2uerrxf0jw7KOQKKkAYvQrMU\nXgfDGxJwRTD60VURhxS4xHD77L2BT2+831/52Q7K/1vZz3CoIf91/rGkMBb5\nYZGDUrPSONe8+Z75/284qnfG4PirB5JDb5gMbZ8MPXL6RWBmVXk7AQXHPPhC\nuuLT\r\n=eep+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"240f852cc41707c751f28811b7ce3d243382e3dd","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.11.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.11.0","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.11.1-alpha.44+240f852c","@opentelemetry/context-base":"^0.11.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.1","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"9.0.0","webpack":"4.44.1","ts-mocha":"7.0.0","ts-loader":"8.0.2","typescript":"3.9.7","@types/node":"14.0.27","karma-mocha":"2.0.1","@types/mocha":"8.0.2","@types/sinon":"9.0.4","@types/semver":"7.3.2","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.11.1-alpha.44_1602100495843_0.7210955939015289","host":"s3://npm-registry-packages"}},"0.11.1-alpha.53":{"name":"@opentelemetry/core","version":"0.11.1-alpha.53","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.11.1-alpha.53","maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"78e96b9630a00f23069e69af590851f03d1c9e91","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.11.1-alpha.53.tgz","fileCount":150,"integrity":"sha512-cvg8/s9MsEwgIrBUzuwDrT08S1cMZK63WVsavfV6P2mtFWSbSU3RmhrJz1kC5r5WR67P2h9pwcFeWZoid0c74g==","signatures":[{"sig":"MEUCIFREH89bBeiUJwxxvsDOAkP/of1VVnqJnlrU+1o+Gm/fAiEAtUl8wV5FM5cdu5EGbDiP8j71YkhzRqEmI71B6IAX/OM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":181189,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjXz2CRA9TVsSAnZWagAADJUP/jbvAuWPVQmLThLpimaW\nvC4h2mK5qRQg/Nq6f7V8zT2/Cx94+qQ0uyufmRB7JkvKL4ARKkkKcqSn9fme\nj9l+BVXMxjaiMDY/xP9BLvZlQvyGuP+f5t2BFOOeszVHQyQX+SdBrb1CpMFC\nRjPmGZ4plIwyyX45uvsRbbfchNGl73JDuofM4NclVIuR8T2asxLXM4gujjiw\nfCfuqcDgtp875QDkmRQqxEwUhJjXxq7ARtRg1qna8Qeyuyh6dV/WUBxMVTDp\nnlemBnMRacdE5GxvoIfahCuGzBtZFnmUelykoN1frpIp4pO6bHJF9O8DxPV8\nc3pk782mCksOVcgPIn0rB7KSNN7f3gHuhuPYajki9pbm+IHZBdiE1RnM0LVq\nRsqxfLaoHK7jV+WSq3DTtMjHJSKillFgTxAAig8BNWX3EL91hEJHq9miJeNp\nETTs6CEnhZbt/nNpFKOLJCUIrhg1pUYIdyUBMmWkfAjaxZ0Xwkx37JlD2j9Z\nz6mUbHy3y6TUOEnCrPVzSY3aAN1Diao5CXiNF1E9kKPK9p6TOZwsFhhU7zxY\nEvp5nrWNaeS2Stj7O19IOyskWYR+Gpf87zSFJgZPWoZYtdYP7rWwcyvdxQ5F\ncuvHEEaX8CtuayEWJXSjTOHmzLv9rKg2x6qEx5G9RTZrjCMdIX4zLrSFDq/0\ncm6L\r\n=RfeY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"00a8ce7f982ea24bcd4bc398477112894078ab29","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.13.1+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.13.1","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.11.1-alpha.53+00a8ce7f","@opentelemetry/context-base":"^0.11.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.1","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"9.0.0","webpack":"4.44.1","ts-mocha":"7.0.0","ts-loader":"8.0.2","typescript":"3.9.7","@types/node":"14.0.27","karma-mocha":"2.0.1","@types/mocha":"8.0.2","@types/sinon":"9.0.4","@types/semver":"7.3.2","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.11.1-alpha.53_1603108085821_0.406648513012418","host":"s3://npm-registry-packages"}},"0.12.1-alpha.54":{"name":"@opentelemetry/core","version":"0.12.1-alpha.54","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.12.1-alpha.54","maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"470eb2743baaad727d728e5e79ff9a878d40572f","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.12.1-alpha.54.tgz","fileCount":150,"integrity":"sha512-lj9caZqTLb2IJYfStKHehLfZ/4v595dDOtSYU6eBqDSruPyjXfM46U/6Q+DIGFfcWw8H8e1VpR6dWtJeLioUXA==","signatures":[{"sig":"MEQCIGogF2gfkurZqh7zOCgxscSucJUxomApdCB1fN4aOkn0AiAmtu6FUE3Oa3sY6hpLtLtMb96feCGqxY6/Uxl6nsty/A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":181207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjYtxCRA9TVsSAnZWagAAqY0QAIIYY0m6DW10I7HA8oAw\n0Y+nPqAU8UUxnwLForJn5tmwhBgXmOyDo0eVhP9OgCau4CbO3AuWV/w0M+V4\nBiwzs6xYChnpsmapkKRXzWEub7cU68b8IFcxBS7vH/UNJo+WNGMTE3hOG2Bf\nikgnReM18SvtyYWsoUHGLxus5he4xFSnqK9hY/ok5ZpCDPsWvqR6nup6VI/i\n3rUNkRa/S0VeoAyap+/7PDBMtuoTBgJBwz/82rpm+fqtqFJy209tEFXEPKat\nya6FRLVy03QO8C1NdBuPDgke+HBqSud02hZQjHLdUF4w0nm6kw+zudx+zoJn\nwOyFkfGWgH4bgvimBnRVYJWAbkrZAXYto+B179SIR5n9BFfQdwVZwm9uFC/T\naRFb0CEc/L8sBDs4Ll3mr7iXA1m2JCfKxrSWglrwZ/0RoIcZW+1SnYVv+Nsg\nvtxO3xV0O9lXZCv4bcMKXoBbJ/YMWejqDBRp0ldWIZy9bSYXojqJ3KaPkYUz\nJWueEmwpe3eCPZkxoIdsnerVhttzLr7t6iIfdhmqGXGT5z9kPhXMvkqkyy2J\nWTbri/gSdRaR6Go6MBIgqVwpvvtYjxuG/bkrTa7FKyptQ+3gMVqjvEJYewMa\nOlXsk03V/Fd5l+PoUXu35efVVl2GWTsu2386Eag3zW42KXL9RV/oiC8Nmhzo\nNluC\r\n=tUvH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"3f72613a36b6f97555a0fa7481755cf8b6cce1a7","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.13.1+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.13.1","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.12.1-alpha.54+3f72613a","@opentelemetry/context-base":"^0.12.1-alpha.54+3f72613a"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.1","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"9.0.0","webpack":"4.44.1","ts-mocha":"7.0.0","ts-loader":"8.0.2","typescript":"3.9.7","@types/node":"14.0.27","karma-mocha":"2.0.1","@types/mocha":"8.0.2","@types/sinon":"9.0.4","@types/semver":"7.3.2","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.12.1-alpha.54_1603111792912_0.0668266023616726","host":"s3://npm-registry-packages"}},"0.12.0":{"name":"@opentelemetry/core","version":"0.12.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.12.0","maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"a888badc9a408fa1f13976a574e69d14be32488e","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.12.0.tgz","fileCount":150,"integrity":"sha512-oLZIkmTNWTJXzo1eA4dGu/S7wOVtylsgnEsCmhSJGhrJVDXm1eW/aGuNs3DVBeuxp0ZvQLAul3/PThsC3YrnzA==","signatures":[{"sig":"MEQCIFiqngEMbyF57cnfCe6rCv7MFetpPbjEF4VxkwW32h4VAiB2lPvKB56u1ykQe0EGZnkQKrCc1vMn+9I8SAf2zk1Wog==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":181115,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjYxcCRA9TVsSAnZWagAAvd4P/1mVDNxZCE6l3dC+Zbgo\nvXixBU01QhrtDYyNVM8q39dRFHYE8Y9mEtJ8t2/XmlCFvPKKfypCvla55Axi\nLyfxZypzHdoQgmq30SZnk4/7fEegaN5cOlrZi2AzKiXEfjj/Cj9x4lA4QL5c\nQ94B89JgrMEDBs2yqvJjAIgzJ508IPw3iSTC2qRWAnEXQm3R/GCbqYDSlArj\nYn3pXV5W+lLTP339hujEH5c8GqBpkvadw3r/MAOzgbqIiBeq/JEkIvw8s/d9\n68R6sgLrpVmJfahfBI7m1+vcJk9CW/llxaXoU2Lj3uxf5657F6NA1QH8lbAG\nrOqAevmHgkUxazZPnRr9cj0GTvzIwbqY0eL9IVgpKr6Y1kcnDy4NIiblPaw9\n+eJ3X9X8wwcbr/cJz/LMDjjziziWVTgBBBD2tPypkvzny2tMUE7CBhRhFLpY\n/pYnr9a6EgAyKTeZkWnKUor7xhfc4CV0ApB2clv4VeUYDrYRkJu6EQglhDdG\niX2neEsyRJzI8u0uO2vdE8n5mC++ZJcS3S1O1YMNNCwvTw7e1wYGW65lBcDv\n6K4ndI+YF3+FXUudHr/z2mbsPcNXcq6Ne7eF7MSxO+J4ftfquQBBOEXryVLl\nYzCO2qkKtpGq+N0SJ42Me5pTvhFNbZONsPaS09aa7Bk0Ost13fDr2uWzYkEp\nqJ56\r\n=3++j\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"3f72613a36b6f97555a0fa7481755cf8b6cce1a7","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"obecny","email":"bobecny@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.4.0+x64 (darwin)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.4.0","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.12.0","@opentelemetry/context-base":"^0.12.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.1","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"9.0.0","webpack":"4.44.1","ts-mocha":"7.0.0","ts-loader":"8.0.2","typescript":"3.9.7","@types/node":"14.0.27","karma-mocha":"2.0.1","@types/mocha":"8.0.2","@types/sinon":"9.0.4","@types/semver":"7.3.2","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.12.0_1603112027751_0.743892469273457","host":"s3://npm-registry-packages"}},"0.12.1-alpha.7":{"name":"@opentelemetry/core","version":"0.12.1-alpha.7","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.12.1-alpha.7","maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"5d9100faeb17fdcabf97ca671677fc0431792a2f","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.12.1-alpha.7.tgz","fileCount":138,"integrity":"sha512-OVikUQ/4kJVkPbOb0TYMH8FKjJzHc4b+9QucOL3xPoe1OthxtyCSbhs60T5pBvcmylsB6Lh+P9rkZTbXoSOGWw==","signatures":[{"sig":"MEUCIQCKSRdAIJeLnfzn4kpJLQpAniV+R3gzl/r15YECkOG6HwIgf0k3beycXGrdrl2Isks1ZOoK2NDehJXoXhMfGpJ2wQ4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160599,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJflzufCRA9TVsSAnZWagAALmoP/14nxH/b9i6QsDj5xGL/\nOY1NU3pQIQ6pZiAswgVd9n7MoBceDYVwttkYVmNlbODmGoxkrW5TqYNheVCg\n1NWsZHv0DO/9Cc/jZ3uheLs2TnWtzuEK7MD2zriJ2F/YdFirYuZtIG3t4r+v\n1N8tKEKz1QzINXQs1gMCDs5MvzDYI9PJMvWieEOS3ztHmLuvPu1RS+IJYRup\nSZYF9z2PEB4aTOriibUZ5qfe4w3zvla/mL1LAnH0G94k84siGoNFmfXLwRRv\nLyyCB3rGV43x8q6Ikstn7xBIZWxBCgeRfQpbN2+PdjluAbAyt+hLdVQfkpAt\nbO5+17lRU3MSiuCJSkYHO7lnWr3uNialJxLgC6kT1Axc8puAmZowJXuvXVOe\nskJ34yFj0Pyr+TnB3Dg1ghFsu0xI4PTm0xNkwsSuYUV4/oZswtvVRSMtuHDi\n3PLT1tzfFVtR+q7BVwa2uEvYN0pkEtjg3U1aXvJT22Aijz4M8/t9ukxj+vlU\n3X3Wqbfe4d6rG2wJYviGcRGM8En4cVEA2KaCFnz6VUpKJWc4CU07k0W6MrVG\nlpvFUAWKiH3S9gQ2f7abDqODHAjValSgK3aUb3rttgHMHAr9YsVe+klCv8aX\nLfWMtPdNIwE00HI+RGm7xU0mrX7ymSamxlhap3fahOIUP2fGqdJB7xf61iiH\nANwg\r\n=3H7a\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"46f31dd2285d55d239195032528c3dab1bf0e15c","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.13.1+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.13.1","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.12.1-alpha.7+46f31dd2","@opentelemetry/context-base":"^0.12.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.1.1","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"9.0.0","webpack":"4.44.1","ts-mocha":"7.0.0","ts-loader":"8.0.2","typescript":"3.9.7","@types/node":"14.0.27","karma-mocha":"2.0.1","@types/mocha":"8.0.2","@types/sinon":"9.0.4","@types/semver":"7.3.2","karma-webpack":"4.0.2","@types/webpack-env":"1.15.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.12.1-alpha.7+46f31dd2","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.12.1-alpha.7_1603746717516_0.22270207657211483","host":"s3://npm-registry-packages"}},"0.13.0":{"name":"@opentelemetry/core","version":"0.13.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.13.0","maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"59567ccfa5a8eb0fefb9cd37bd20821d6f196e33","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.13.0.tgz","fileCount":138,"integrity":"sha512-SFHr4uRnSSWqTLu1J1hadn92aGoGVb2WrPHvOgNIttSKYkUXNVyABO1pdtUN2AHE4/YBmk9eLwTUqwmFjVfZWQ==","signatures":[{"sig":"MEYCIQCC6lrKVEXWQTxLTl5XvpBkUY+Xb/SRS/y8OVFvunzcLgIhAK2BGhZ7qwrbJ5iOcDLGFq/Imqs+b7faNb8oLtLdiGor","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":162501,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyql5CRA9TVsSAnZWagAA6TIP/3F5efRyVn9yIYWF08jL\n83rg8eUGY04zBX08CKxRkWbOh9UMnwrYkAsqMYChoe7qev+UcZyYxpuEAFm6\nmBUw6PGXyTsewMWg3sNHvaFi8FmmMV11Kat+T8Enn6TPNzMntq+sgTUI0G44\nG7cCXyXeSg2Vh5TnpiMwVxD4UPA0pkvfxxANUg14BT1MkTckd+wTgiyXUmH5\nKnmvvBt8TgjurB/+n9GNHA46CXPVQPtq+Y5QN4hH+Wn9DwnmN+ACej4gvnXl\ncRVPwXFf8eRmGFLpNXXKADOxn0vfhVQvEi8+pjzKgZMwnhLfubclmeAKT886\nqCzIK0P2ygtYj4+yOSh7OQ+9nzWH0GIeFxVJeGlA0xYvFnRqRs1AgyO6lUsI\nHOIzVFpih9Sb66sKwPdNiZmIXuTSvi/EelFc9IhSr9tkAWaNK0LoxSHN31fV\naVF73dni0QJApK1HkmRi0ftgkcwcfckc4CctYIH2ud0ydZx1J2n8tfRtkj6b\nzu6dX07mmy+n5+jhiJj+8gaiO72JSDseuZNGmJHK1b9m1DFVQGaeG1IGqfZl\n+SYuEHCHKW4ThNzyP/l6AV3mRjJ6gDVJwdIAMrFUmE9klHiyKFy5r4I3eB3s\nu3gcDWffoYftVHrMrZZl2UzT3Ejanv87KZhfNn8fZ+v49OeBOh4io63vKGgV\n8Xyo\r\n=Zv6q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"86cbd6798f9318c5920f9d9055f289a1c3f26500","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.8.0","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.13.0","@opentelemetry/context-base":"^0.13.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.1","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.0.0","webpack":"4.44.2","ts-mocha":"8.0.0","ts-loader":"8.0.11","typescript":"3.9.7","@types/node":"14.14.10","karma-mocha":"2.0.1","@types/mocha":"8.0.4","@types/sinon":"9.0.9","@types/semver":"7.3.4","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.13.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.13.0_1607117177288_0.8921612415291631","host":"s3://npm-registry-packages"}},"0.14.0":{"name":"@opentelemetry/core","version":"0.14.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.14.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"35870e58e3d084dfc4dea99c973f3cf7479b3c6a","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.14.0.tgz","fileCount":138,"integrity":"sha512-HJ4VM0cV6c5qjdW7C7koB2IT4ADunCOehxnKFRslQkbDqAEA1w42AZ9679siYALpWYxNqcJyqF2jxCNtfNHa6Q==","signatures":[{"sig":"MEYCIQDUSKaH76UMBy7ZyoFVmBS7CCMXlbIWyfrwHSQcdayy+wIhAJGcwBofjHgmlhhY6F5EYB3uX/nijDZK4Z+UPT2kjcjl","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":162543,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf28UlCRA9TVsSAnZWagAAOgQP/0mw0YfWro8Jx18xUpvf\ntA1Kw43nRA8V4iMu6oKBZG/x+CRYHgDYfIUauipMQVx0HCOCp9xDPNkG7+rk\nrqVOPl+qTwZeoe+p7QTibiKYRf9lA+1my8DOLnYLthezzxVQY3g+UdHWGZBG\n3pQ6PRKk93g4aQ4BKK41AmoOoaQPcf5ZKV0fq6BXBH/rs7KoDRibiWjND/rO\nnLWfi1QMEAtIKAUbSMpWiroB0zhkfp13gzvs7VhPYiId7R9XU5oE1WBsGL5r\nXrGs24CnQ5AkIXRIPndtpJEo2EcFkl2GwSIs21S1WVeaXJCV1Q2QHAI9PFrh\nlwpJGJ3sp8iHJ+47QBhqM1f2qaVUC7xQ7yhY8QlNycA88ZG8yAu/9B2O3158\nEwNndreVDUquAqGDIvy/kc7U8EeC0lUFdlL3RA5XSOLYKXBqqjm8wPu0KS69\nvj2uU8G/NF5x3Lj4phVLgYQvwAzsCyMghm/oTLOhgvD2TvLm4iOW47m9zw8G\nCLs7MLkKO0yaQ/61QlfFAAzi2d5bPYjdfZy/zGxnqNKbGEohE7jStettg+hE\nK2kKxrWochXbkQdAT4nhko/Abvo8BIOgMM+EqkqbIMfe1jgfxmahRYpvDjgo\nHdGlTbC5lv7SXxJky+A2ETWSblyoj6ye8q1ySX4+m4lCbtUSTjf40Eozg00P\nqHvX\r\n=vkg/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"27a8d4530c56257c191468b073669909bf8892a1","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"rimraf build/*","watch":"tsc -w","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"tsc --version","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","version:update":"node ../../scripts/version-update.js","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.8.0","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.14.0","@opentelemetry/context-base":"^0.14.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.2","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.44.2","ts-mocha":"8.0.0","ts-loader":"8.0.12","typescript":"3.9.7","@types/node":"14.14.12","karma-mocha":"2.0.1","@types/mocha":"8.2.0","@types/sinon":"9.0.9","@types/semver":"7.3.4","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.14.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.14.0_1608238373276_0.9768934595910987","host":"s3://npm-registry-packages"}},"0.15.0":{"name":"@opentelemetry/core","version":"0.15.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.15.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"d86ebc316f1f847de6d9b003cc4bb4cd1c130e7b","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.15.0.tgz","fileCount":132,"integrity":"sha512-4LLBoayeT0L+BpO+RYzoDsLByn1FMDqpQLto7M8P2DXOtxI//TWSo13KCMbv+pprOyweMWcsxL8jj+qv9ktSAg==","signatures":[{"sig":"MEUCIGWwqSrGz2RzpFzwrBKCPR5u2CJeITTg7xAtFOEMOcjnAiEA8LrQoe0VGrJFQQ12XXjQJ1uOogHj4sm9aV3y4LxKj2k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":159847,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCf4OCRA9TVsSAnZWagAAAfEP/Rs4IOYBN+u23nPYzioB\ngOiJSrj4yZLFwBNkvTG908KaXn2uVycKOEQH8rrJblFhSpryFCVMFbqZN164\n/IDzxfZ9RK54AL80wLZMDsD9q0WI7vjG363gQF7/RwqHDvhU3rk6T4q9AsJL\nfkAuGnviYgL52qmEmxCwTosYOlUR+JAja0kosyAP5EAC8TD6M3GND4rYXShI\nnhymR++p3rdwfiYyz6z+eRMOkK74FZLKr3L8MPuaA4EiOfa6SobGPldvnzbO\nZ3vv6opnS4U36I538vOtwCRS67iIfHcJAiE0iWKhE2+LbTDM0bZPwBJWoqey\nJ3FpUkhpYi3S6EwIGi8bg9ZwM72eIKJKO5MF3ep1YWu664LQOF1ul9TJZYiG\nh3TZ9iLiWls8ckaJRUmZyk4K7z3vkHPr3d0gM92tzH5ALCxBTS6ujDDlgHue\n8LETQQeh4PFouVaOqAOpViE3PSockHxvh4eNIN7hvdcf5+bdABk9LvaHZ5XI\n8n4aMlOGfe89Y5oFx7OfE8TVm+8nNZcFwulQO2J8D7LZawKWoPpLo+rb6t4C\nA14UifMYN6TQ/JePPNuDCxpOID+RkJFQpe9HAocQrugOiV0VZKHVfNWLxi6Y\nQGf2KgHzQSPXLUTFAE76pgNd7otjy8hSTdXZ7eZBXWInIMVj4/kh3a+0d5Bo\nvr/M\r\n=5GOJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"960b868f5b7686eabbf49190071b8463551e5d8f","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.8.0","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.15.0","@opentelemetry/context-base":"^0.15.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.14","typescript":"3.9.7","@types/node":"14.14.20","karma-mocha":"2.0.1","@types/mocha":"8.2.0","@types/sinon":"9.0.10","@types/semver":"7.3.4","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.15.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.15.0_1611267598073_0.27935884048096016","host":"s3://npm-registry-packages"}},"0.16.0":{"name":"@opentelemetry/core","version":"0.16.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.16.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"8423eb9a828b76653137447ddcd00641f1beffc1","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.16.0.tgz","fileCount":135,"integrity":"sha512-NFZwEW5TeFIAUlNty9al0KU9AQzpEiBowem/33d3ftxYHZ7dG1JklFnyKLTVb+pAZFm/peTziVddfHoTsIY4Rg==","signatures":[{"sig":"MEUCIQCviVFfI+LL95mALKYsrAaRgk8FQZQy1oXitI/DugnMBQIgYUw9818brjwZuy5xKTKKVrSOCKUVCAGIJFpXgNK4hGk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":163083,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGIGyCRA9TVsSAnZWagAA3wwP/0+UP/Rp9SctpK91CPjl\nLGSSOdDvL8hp904vs/0m2IIOj3m25I8PVy0zxxNWx6sXmNpWUByTrpEB0toh\nhxu6jGHCky4Wr1wUYzZ4XQ6hyExLXGhBjQW6iRLIImhZL0glt/NEdhSeFINs\nmP6rGP+jCHeKx3yOClApDB8LjzBJvm5hTOAmgF4AkQ2qrmxqMAoEIMvxw9V8\n8UWNc5BUModL5xn8+MO+N5ox3CCEGThRVqekU2rOtv3wbITO510pHck9urhY\nYvpdVEI/sP1Ya5wDqQ6/QLbiFnvbIrAsXbL+UvRVO0dvg1hNSepn/jA49HvE\netv10f6Y1+jYr9xtbHmjn31jjwo02/7IXD7bTiQMRQ36TqUDl53R98tHH4MB\n4MTKL/gHdxqapHjMqJy2BoZwdzJZY8WLNkGS7GJwh8IuKx17q2TauATvOhpe\n0TEQNe9HdvOwgvnokTJQa3OOkfHuXE/cmjs47eVLYwjIA/ZlC51ZlDtg7112\nMHaNbSsqER5e3jQS2dvenQRov52C9234sj3a0GIiz900KvLt/sRAvEtx7zTy\nJGZwx0a4bty9e900jUzcX+telULNbVxhz1it+tlgxNy8xe9ZCqI+WxFH7lov\nmDElwAXNuqFBdzgHuMtIsDqijV7XkEL62RRjYNFdIi5sUsxI9fKvW5f6X6Mr\nqRUZ\r\n=wItl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"e68863f8e63854b08ad13fb54677294ac6d6b681","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"obecny","email":"bobecny@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"12.19.0","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.16.0","@opentelemetry/context-base":"^0.16.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.14","typescript":"3.9.7","@types/node":"14.14.20","karma-mocha":"2.0.1","@types/mocha":"8.2.0","@types/sinon":"9.0.10","@types/semver":"7.3.4","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.16.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.16.0_1612218802413_0.6741948219160583","host":"s3://npm-registry-packages"}},"0.16.1-alpha.10":{"name":"@opentelemetry/core","version":"0.16.1-alpha.10","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.16.1-alpha.10","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"ab9c8617e36e3835d534abf4649de86cceeb80ee","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.16.1-alpha.10.tgz","fileCount":129,"integrity":"sha512-TdzTzlMroVnAKiVJinp9HcRQXSLWC7V/WjYAKlG09o8qlmPIxwzxJiLXbhQ14FBfbKe5TaUVHzAuQy+1YWj3KQ==","signatures":[{"sig":"MEUCIQCXnLR005CNhQyKF9J0+a7o+3DF8yHqucEEZe3heYqbHAIgZJb6DVsNf4ZK3MKdQu2S+XSbe09Cx3aAfTlm8W9dE8g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":157756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIV2qCRA9TVsSAnZWagAA0YcQAKTSL5p/CIw63Y5IhB/2\nJ62TSEZvjlSMzBmKDwaqeuElKF1t2yZlTCvAzunYqwMnb/zh322WkOg7Gzey\ny7d46TawN6B6DVhWFffax3+MYB01Nn2HVE3IMjILrvaXvuc47l9KK/1LwVye\n6+Ph7es1Wwot84HjSrzJLVrkX/MMrhxq2fdihnnB+QNq6WiFCnoWzYFWmy5b\nHChz29uBAVt7iITPIcIWJFeJfUDXf9yK41AZNMTlN3ApBseemu+yG3g72FpV\n1gv7pLgPR4FGD9eSfFYihlTfqH+1xFmJNy/oildgsI0ozAhj3ZR5j1hHTFDJ\nr8xIVaLvL9iAGqfL5p03S3HgrTI+Y3ayZsvHXjC3qsXY/RlczS9jqY5LPCja\n1qWoLwF7S4KyWz2tC/m9CbDrcA6I1XDNH5+NkpklOK7eCeaQOylz2P7LaVbc\nwyH19GzBCh3Yu5X4qFjPkuZ0tM2IOkCbQSjaf5wu8zRKu0sjMQo3w+At4DjU\n3IIQFtTHsdxYicMZvrdgH++Dj0UqyACEdPAThCD+Vxl7SiSppMCPNI6ZUPQr\nlaKaEtFuPXXgodKuQhaBBEdbyvzxQPwHjvbQ2zxWE7qr1dKpzwGZLO/UHtDU\nNxj8oVv8bc0c08XDlk8nUG/xu8kOQARd9If1xoYqajQq8ELDFvyEzIY59Cis\nvAHU\r\n=4AAD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"cacbbdca0e89d31e2e0b10a8ff5fb86d7a714906","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.15.4","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.16.0","@opentelemetry/context-base":"^0.16.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.14","typescript":"4.1.3","@types/node":"14.14.20","karma-mocha":"2.0.1","@types/mocha":"8.2.0","@types/sinon":"9.0.10","@types/semver":"7.3.4","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.16.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.16.1-alpha.10_1612799401621_0.48499788606855176","host":"s3://npm-registry-packages"}},"0.16.1-alpha.11":{"name":"@opentelemetry/core","version":"0.16.1-alpha.11","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.16.1-alpha.11","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"2b06863bbf992fb34e6e163796a57cbcff158de1","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.16.1-alpha.11.tgz","fileCount":129,"integrity":"sha512-YHd4bHQXw+vDerfhKnGff3OfsHte/ugHCRgCGGTUF/4k6eMTp1g/ED3DnVWzpdTezjzzhALRRwFAruZsC0mfNw==","signatures":[{"sig":"MEYCIQDYo9nFHda1lXZ3tPzFRzaX+I4g/nFsw9ZJRgIlzVCaBwIhANGC9LaCWL3SfACD079jt4UPTvNaujaEHPsWjfwQI8hM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":157810,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIWQvCRA9TVsSAnZWagAAHQUP/jdcJkrlYChW4ffUSt0g\n0E4i+rYp0vTKinMdB9SNVElZVzTIy/mrJ/EE7jiuInxIyFmzLtu6qOMMNdX5\nTx5uh+9sv9xJhSWVXTzxCDr6cSFtIK+PY3m0uuFv7xzMelXmFSp0S0nZHiwL\npCcxZREN6gVLo0qf1DrLd2DnqcWkUJ9X1fXTira4v6MSy78qkH5QFtrymmEP\nbLU2vzCt5RLA6ZXnPvRmPO1VlNTfLwXnJ6bBsnC3h4bHr5pt8ToVgh/0Nkcw\nIrlZRnmXX4kln37XIdxLMMmSEU3yDgqs03Rny7mejxmGOX1OXSpd+TGPk3qP\n5lb8A74aKJp63m/uFKqGySumPoERD1jwoAdhyzPjWdPs6CqEedk+Q+nZXypn\njfevsv+AlQFFxt5GHQUvwa137jBaJvDRPHwcQcNvcZRZnVRIDcmbzhRQBd8g\nODZQtUdaSkXWaav3ek8D9EpPSzBlD+Vg8I7jBvemiWohI0PBgweQKIMdYH0n\nv5j/OTL2YyEIeArVoXlrzSUXnwzqpfMauIvZEXZruNRE6AJrNNjotKslWry0\nmwvPKu0Ef0NGNFBCwqY3Jz+l/2YCo7f4PPtpn0AsBVWUSnzcL+GpM8SDUKOm\nXQRmZ+S4r6ino0SBDxfiScMboVmZ2ymccATGnag+x+hN4gKA2147lnyO276M\n59VT\r\n=C50b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"70a128ff5dca16060ca7c2cff943369ae9999c34","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.15.4","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.16.1-alpha.11+70a128ff","@opentelemetry/context-base":"^0.16.1-alpha.11+70a128ff"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.14","typescript":"4.1.3","@types/node":"14.14.20","karma-mocha":"2.0.1","@types/mocha":"8.2.0","@types/sinon":"9.0.10","@types/semver":"7.3.4","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.16.1-alpha.11+70a128ff","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.16.1-alpha.11_1612801071156_0.7776706712203303","host":"s3://npm-registry-packages"}},"0.16.1-alpha.14":{"name":"@opentelemetry/core","version":"0.16.1-alpha.14","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.16.1-alpha.14","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"ccce497a9d6fa772227735e45ba5c342e99f4961","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.16.1-alpha.14.tgz","fileCount":129,"integrity":"sha512-Iog5/94J9hH3h+8A5n78ippxiTXkBAYO6BKNgwhsiHImL85dJ7DqNBMy3LFGwNCf8N0H/6eWBaLApNmgv6Zj3w==","signatures":[{"sig":"MEUCIHY12YL5M9EyOp99yF43dMaVUoli6jrdiUI5Eq9O5+dyAiEAoXF2YHU7O+P5ix9NzwKKBac7ytxpXZkn7UZoGzX2SqQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":157792,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJARhCRA9TVsSAnZWagAAN98P/0L+EWxgZzPst2gPpMmv\n9DJbeTm4yLBAyzvPw3mxC7SFT4hGHmGclmpFXi9avb0pYWugVyECPswaChXB\noy4grqDt+s43PrhcPF43+la0qasJrJaCcHyTdVFxHT7y6SrQJm92qrxSec8i\ndRNiuEnU5EBmeINcHonEF1cS/Vza3tDtC7SdnZbCPkBcsvSq4JMjj/T+pyGU\n4o7xCnAF6LmQ1ZF2GNWcDzUoslervenyWKiIWi8sySWomFCxwJFedEQt8uMl\ngPyYJGdp0yIbsgKTbRAUsqqF/HPOBgamjmvM7ebBj43xkMnHStOFNmpYxsKL\ncC3y1SWE/tcmmX71yV7aU/+bGSpLAsbusk6UImO0YT7s6k++K9TqhQYjpqlT\ngE54GmtrezrjkkB8yi1ZyLlbYFdhB2tVtyr4dZ9uRnLZc5RNDkdH8YlHDyzE\nnIlP3N+VPtuL79hJ8akOoKLHRlawReOCw7r+owVlf8Tlbw/gfFmO6fEboG0j\n+K409MnAXtY4NYxIwxZEweXE7SJ7z3IyDvyOWh7r1EM8ySAYTsRYfn/wIBZC\n0lpNDS+JwjcwjEJzQWMeHZwJbXe4C9ZK/UBN3fgNkEoEgDourasIs9S0ITMU\nYzbsA3R1V6Lvx1ISTqYdGTGzhBtUAN0gZuGn8Wbp/2eMWUaz660P5kzh/LNs\ng7DG\r\n=3rNK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"000a8ac099a3848a9a3c66f4bdd4826b4cff987a","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.15.4","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.16.1-alpha.14+000a8ac0","@opentelemetry/context-base":"^0.16.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.14","typescript":"4.1.3","@types/node":"14.14.20","karma-mocha":"2.0.1","@types/mocha":"8.2.0","@types/sinon":"9.0.10","@types/semver":"7.3.4","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.16.1-alpha.14+000a8ac0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.16.1-alpha.14_1612973153046_0.527261788864771","host":"s3://npm-registry-packages"}},"0.16.1-alpha.15":{"name":"@opentelemetry/core","version":"0.16.1-alpha.15","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.16.1-alpha.15","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"39253b8236b27da7014f459e6e66502ca7513ead","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.16.1-alpha.15.tgz","fileCount":129,"integrity":"sha512-0bzMU0CUZEi6r1mkOz1VW1ssNxGe19Jl3v2al9gN9AlRfTJJ84P4a7fY4M+RXhq8nAm/N7GDUSLeFhgO6+s3ww==","signatures":[{"sig":"MEQCICmQdmcNleicoJ8m72YfSKjqNL4AOFH9/9edZOokOe3jAiARcQ4nTmvfkwPcL7prhiVYRe0qkZbffG6qFiQobmshCw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":158479,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJFuWCRA9TVsSAnZWagAAu3cP/RtoKTGeqlK4Ug7MpodX\nyAdtwh+3u5Z+o8v0be80GklBL9Km7pfBrtAjoRvejTf4lQnK8tYXh++0vMFm\nRpZ/y0riQTPxnmj/16WDjEke7sv+k9d/5uAF4w7RS6lAR8bUXYVq8tfSLY6i\n5Rx2++RqkG2XfOMuz42XRcgaM33RM/mffeJDN2jlD0j2783BunE/vOd92GZv\ndSyMq3nyGwiBhN6EBNAd7P6xO9pr7xH16cOlzUOsG5OLyfOK82Z3bOXTxhuy\nY8DIQUuNDiBzQD5gvu+JKrGCOXoavfA84P9zZ08uYZWojLPU+DK3I/CvYBdS\naZkGhIMmLOHKL4uP9OElrSzOtqSsLT8AKgfS3uP6u3lJoDJdYkLGiqsauaih\nbULLJ0Gu/k+RBlzpGEobFrQr1U6oZiRloFdHDb1pKQbLACxeDmlmc5r2n3YX\nHv1feBTjb33IZjH3q/ALv4X6z5eBsDQDUGQNL6TymGq8opnEB3L9RDCLcfAy\njFsQqYYCZ2TYGX0+wKsBXPr/p31cEf0AfbXApgFf2uVts8GV6Rnj2EBHTzRi\nkOfYcRt6bZuPwzHSdqEmktvYeNpgKrYBsWbk2fPXN4sUKjOhDLhNkJmmnmaq\nXbBqcZlaZFPRgFKvLcF2k5X7iIgaDtKJu/vxgETC5ABpR79DSwI02uj9BA+W\n1ac7\r\n=NxcI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"1d682c2f75f9d11265cfc1692fa822174594d4b0","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.15.4","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.16.1-alpha.15+1d682c2f","@opentelemetry/context-base":"^0.16.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.14","typescript":"4.1.3","@types/node":"14.14.20","karma-mocha":"2.0.1","@types/mocha":"8.2.0","@types/sinon":"9.0.10","@types/semver":"7.3.4","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.16.1-alpha.15+1d682c2f","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.16.1-alpha.15_1612995477518_0.19550078003035165","host":"s3://npm-registry-packages"}},"0.16.1-alpha.18":{"name":"@opentelemetry/core","version":"0.16.1-alpha.18","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.16.1-alpha.18","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"986255a1ae3399314e6235624f70f121066a793e","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.16.1-alpha.18.tgz","fileCount":129,"integrity":"sha512-wOImJVgOUPuy2+owPha9FO9fdT7LPg8xmTixyzpI0Gj52miPRAWkca+FB53iZXrGomNnsJvH7PWQlKes0x5pRg==","signatures":[{"sig":"MEUCIQCM0KW26PRpDfyHij/SYDTNWCgUN7RIYdcjo/xr6IMqDwIgRD1AawCS2/zHWpsXtCiQsuRNCTRP2z3BswAdKyzBrgc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":158702,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKWgGCRA9TVsSAnZWagAAANUP/35HL37+kefM687AsiVX\nInHgPG2FuntoOvNLCG8jJR5jq3EE5o02ny+fKqxxfhMz/JddQvSDSDChx3HZ\nCFlF7gREH6tPEEU7Qa8lxe3GZTBGtlNX1FkBSWoLVZG6OTOrTlDfYFAoThBg\nQSuOK1sJw/sfJ+ayeG6m4+kIWR0Ll9u4mbH2FBwRqJqxEZHmF77vdvwZLIGN\nltUyJikohUK5r0on1S63EMzMaRX3aQv7++BOFMDhYzi8TTxMWucaeytQIobK\nXw6/LLFGdVj/JaxLrqpS8+EJ51hQZOhupvNsrrTZWMly9VhXMq6NXLYyz8Yg\nDuH6zIxQtd65uK8jPF7b1ip9f8jKLhtLhKoCHQgCnAIP1u8A162waHnCmmKu\n0Flci5X3+HFKDXEoeSa3cXlY/jlVaQCIut0MReqsaX47olq3YQVlW3EB4K2n\n6OSYwE/AenpQXF0ZIJq4CDUXq6fMqbwgYVLZKCyAPTrTzDz9JBO1qt91Nw2H\nptAagaaraP6qwZDvQGIh2Tuw9ViI5keAuJrWflKkIg1xD+6ASKMmgnHzLwkS\nDQq+3QXovtkUQ3CxN2dn8C4pHnc0oyx6K5MwdAItpusU2NdpGArxGTsuZWIR\nQ/TWR+UDJisNNgbuYtL3Mq4+VjbkdLtgp94QrI4Pt9HS6qibmqIQgj01viGi\nZROI\r\n=fXa0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"9f965b0c749108df00bbe44eeab84d79b04bb0a4","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.15.4","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.16.0","@opentelemetry/context-base":"^0.16.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.14","typescript":"4.1.3","@types/node":"14.14.20","karma-mocha":"2.0.1","@types/mocha":"8.2.0","@types/sinon":"9.0.10","@types/semver":"7.3.4","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.16.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.16.1-alpha.18_1613326342412_0.6085053985615765","host":"s3://npm-registry-packages"}},"0.16.1-alpha.20":{"name":"@opentelemetry/core","version":"0.16.1-alpha.20","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.16.1-alpha.20","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"a5ba9c1b6271d86e1c24424989550e28b0bc48e4","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.16.1-alpha.20.tgz","fileCount":126,"integrity":"sha512-zJZ3tBPOawQ+XxJ3VTDqHqDsSXg8/oXN/v+OhhkU/d1OROG39HRugpGKPM28d3LwqeO7HKdJTJtYo4TYOoiNCg==","signatures":[{"sig":"MEUCIQDLUM5BGT8y9AakHmxDm0F/p7ifcFrEe/iwzHV0+k6bRgIgclqD6iNP2K/P5QT+GHPHtMP2RDjRu0OT7iXnxNuXmQM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153005,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLYHkCRA9TVsSAnZWagAAvpIP/2ybAvwcKVctff/4VzPc\nCtBYrXQoGAvOTtszxETjDNUr0jb4qHQF1DaFSbXanxAFQZS0HQxiC/MndfbU\ntWJ0AhMPHIBhXH34Ga48yQ2enT5vR/0nXlqChgDDtIvCVLylJ6kyZCzOuwyD\nRG9cGtq6dMpwAV6ytmJb1wj/km0PS1nOd2eW8/kIaQQ07U5pj/rGU66jeIuz\nxtzAzlO/ir1e2d2/GCpLg0DOwLBUQ4yxP4phlXKq2pcdvtnNkhpBj5KuhK0i\nCU49Mq3Irf7GAZxTspwHqJETTaKs9Zy1ObFppdq8uoVzEbeUO/+nwMYtHH8S\nipTP0DBV0hWkezHtw4+zW/d38VEuYaqwply75nc5c+2coapOMkAWGo/j+Y+l\na/1TYB+6LKE/Sg/TgI8/yJHjA2uuKTUth62kwmyTZt1U2hN09ymm7QuDAvWU\nZxnOnOwmF6DulJJu8hkACkgrd1D7l1qf/CTGn2HSnWwNesF1r0BUSlopjMxh\nWoQ2tlx3k+htNeGUn5zihySFjdPeFd9ivR1LdMrcFKKPoGWStF2QwrNfmtjb\ntSavWx3+xb9iqpTB6w2fhe8m5SPICkgbiMQCRltdIO/F1COY7NXFC0bdg/Yo\nQGzvRcDax/xFYQbHULYEFmhWp6koySBJWEO1aul+aopDNIU33e8WEbGi+z5V\nZOOj\r\n=e/Lh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"62f8695d3fe5309c62418a1043bc6e8a176bc11f","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.15.4","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.16.1-alpha.20+62f8695d","@opentelemetry/context-base":"^0.16.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.14","typescript":"4.1.3","@types/node":"14.14.20","karma-mocha":"2.0.1","@types/mocha":"8.2.0","@types/sinon":"9.0.10","@types/semver":"7.3.4","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.16.1-alpha.20+62f8695d","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.16.1-alpha.20_1613595107598_0.6434237939482284","host":"s3://npm-registry-packages"}},"0.17.0":{"name":"@opentelemetry/core","version":"0.17.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.17.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"3e57a3bfd45fe8634ede81a90266ff415f39e24e","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.17.0.tgz","fileCount":126,"integrity":"sha512-jRM0Ydcb98a1ejrShqJIhnc2qqPJI2SJfHDRsFeWCj/q6LIlPo7yRl9msIndUQjRTHHvLdIKBGclNvqoXRyXTA==","signatures":[{"sig":"MEUCIQDuT0yOafdbVVpe1ENlY2mEqS5Gg04rM1ezBhWHMK8hTAIgDKZexo3JduKcBg+XmQTUlGshXCMTi52Hl8V2PnJYoIU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":152951,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLYeRCRA9TVsSAnZWagAApcsP/ionssaSrSI9rB2htH4V\nFllXSu2YTeOgnCPAQaX9ss5gQJ+LJAy6MBbbuNHm4ZkJ0WWsDv52tfKFpNqO\no0wmJeIOExttMuT5JHhXeqnKYSm8X5TdNtv/0QOF6HFaMx03BmLp2Zdb+7f6\nAF7ITRfyjpc2UzBlUiIgXk5s+w8aW/cc4tOs1Vj2YoRDnUpMTBYC7OKCRJHi\nZE1+AEx8E7OlNp+fr4ldcWoj1wiVhJWLh0zuSQ++cERfqrAs9o3B8AoPpexK\ncVbZQ8pXsTCQ28eAoEUYNbaiaq7LnTQT2zruWa4QK7xfsnKeExu+WjaCadQf\ntV72YLF+tyoiY6+kvxWX99o2umvBFh0fwQD1z2ZnnFCsVljtJCgvQqiaVYK5\nJoNWcapx/nkmMzmIQqGBdXDmjnrW5UPrLlgeWo7NyD3XNEeJlGhXIVelnPkm\nleADw7gAd3rxEyvKFh9NtAtzMInkB3j+J06g2+v32gipC2vNa1LDTdj6GkbV\ndOmLusCZNG605RZ/KCjxsRLrter/Wr03C0UWKMToxhkhObZHbpWX4RGpDLc3\nOGke4lWb3eo1hAcEh7ofCoxQv9wJedN4YUdav6MITwo8lQ8d5Xx4vNPVcCuz\nZuaq605APSzJrEy1OxCDnon/nn8A/S+k1eRH71FtX0Pcr8PD8gFPboQxM/ry\nRNqK\r\n=l1aO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"a91ea7617f288af632934334d0c8ecece318ce73","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.8.0","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.17.0","@opentelemetry/context-base":"^0.17.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.14","typescript":"4.1.3","@types/node":"14.14.20","karma-mocha":"2.0.1","@types/mocha":"8.2.0","@types/sinon":"9.0.10","@types/semver":"7.3.4","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.17.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.17.0_1613596561000_0.293854136614361","host":"s3://npm-registry-packages"}},"0.17.1-alpha.21":{"name":"@opentelemetry/core","version":"0.17.1-alpha.21","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.17.1-alpha.21","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"c9c23a2026de0319e2ad3356908846ccd5327301","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.17.1-alpha.21.tgz","fileCount":126,"integrity":"sha512-KZaTdqeSLQfM2Inz8MpCyTJul+CMqKoXrsLeMXsPJzL6+hkPwgp3a3u2ehOr1l5EmCf5SJmnjVWZAdqK4oBktA==","signatures":[{"sig":"MEQCIFyrgIUZu6IdLlyK0eW7or1AYZzoOFNhhx0Yzj+gd/98AiAa3EcX8O4lCcBJ/NKAO6bAsoDlhf70Nv+QzpOJJ5xKAg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153023,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLYe5CRA9TVsSAnZWagAA3csP/3w531Gd5LL1XoZLumzh\n+KnoeZs7jZg0slqW6LAQL+982CaD3hLRMDi4pkDzG+1DnYxFYekRodkbbPgK\n6AiV4m7KuiANP2PE0jbhgqyiMu6FL3GRO8rLiYpEizPgGugtpNenNHOljEPK\nWgbftk4uLSy5BQSVWV5WNEjcEahgClUxS+m3WXdTLoqLRFAz6SeY9nzmPUGg\nVX0Zu4Of0UCUwfgt6qHNrwEEXy38GHr6koqGEvsf6PFmVds2/HgGb+i1apL4\nx3ZV4/hJe+gBPWH9gcW9rutFKMEle6qZpF4L54wUX/LmhCrlFzVr4m/j1PVs\nWzpZV4rU2e45WhRs4UbxbflAOtZ4fz6ZXBvYUD/xawKTWqMng6yl+Rha/b+c\n8JtWwEUBboWosWzuYUPm9KUnrHdcuICoAq2jZNoSCxW+nl3BsO9HMd00e8v+\nZwnLkKOyHZNqqrN+VCDCjmu29IRGFcExfcvvbmJldINedeQDQG74tbhlBwM2\nVHIGfDkH1lgHs+SiPcWfM3Ym2KNHIXTT+n0VKxSprcVYsnicT+ofak8+jsym\nBZJA+VqTC1cQ0o/0fODzh1LF1SXU+tSL1qpZoPzXIWuIO1wjsFHRkWUIb/L6\nTRogtCDQ/aKySHlfC5lPopIJY6ynjMMlEgoxsQ05/PgyPDv+Tlsv6m0uP0bD\n4BK4\r\n=2ITY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"a91ea7617f288af632934334d0c8ecece318ce73","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.15.4","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.17.1-alpha.21+a91ea761","@opentelemetry/context-base":"^0.17.1-alpha.21+a91ea761"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.14","typescript":"4.1.3","@types/node":"14.14.20","karma-mocha":"2.0.1","@types/mocha":"8.2.0","@types/sinon":"9.0.10","@types/semver":"7.3.4","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.17.1-alpha.21+a91ea761","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.17.1-alpha.21_1613596601338_0.26239820767252997","host":"s3://npm-registry-packages"}},"0.17.1-alpha.2":{"name":"@opentelemetry/core","version":"0.17.1-alpha.2","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.17.1-alpha.2","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"5ee035b78355271b8b5dbab9604da7da0dc7753d","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.17.1-alpha.2.tgz","fileCount":126,"integrity":"sha512-Nab1L9PugKW0CxYbAUS7bmBhcnBJYVCOf/YQXoOwHunAXWTB8P7S0hzTc41PCB0vI8zs6AN0Cs5D9ImU5MCw0A==","signatures":[{"sig":"MEQCIDkn8wwcVQBCUMVktxAWqRaFL1O8Wf/Pbnr/vobG6AG/AiAzJYMOl/dui8aHz+l0PZ7pN/lIRT+6KA6kxKXFUQ1JNQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":152989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMUjNCRA9TVsSAnZWagAAFdUP/2jsh4aUYOuYqY7skCdq\nSWCQV7LzsZxp5EXZTaK0aNKqvIw9ac4VDosn7oX9jP1hIltg0wL53oUijokx\nED8tlLa3mWgQw5s2R2F3gwlZQ74CCOIbwsiCx/B5NQNYVQ4x4/ivRAtc7/tU\neePMSafQpTUAh0+Q+EL6zNqZICPOdhWJ0Ts+m4/5qcsmQYJN8k0WWfdpgTg0\nb/4oic5z1+hAZSFChhFnV9ZhfmgSLIvCdzHRUdih70fzCDmsCBswW0zIL1Mz\n/Juck8n/rouIE88TmnRANjlu0nd5wyUHwpILeCTv/sTnOSw3WGGxwq8SbLJT\nSdfiOlIvkBZwq1VBrzwGoOec6rEiEF1NaPPLDZa6rn3AHmPULo4W9F29030c\nQgkYpGszH4Fz9JfPdJRa7t6zHl9kV7H8yXJElcM4JkGnp1Q0u8cJNsni309Q\nc2mHWCQbfuH9Mh1lNcoTBrq9O0CIFHQcmEtOO9jnnxMomivGOkarXbhwjicv\n0MizT1H3PYqbU11D8PLRPJ3ktDqEhynNK4hdk+ldi3yjux7NoeokDWRUrl0b\nTIC0b10bBWY8yax4LWmfj8xCYYQqoueoYdgNy/X/hWwUXrzaeUSE54l7OvSO\nkgmB8kB93BTUOX7nnHqhSgp2ErQd+g0acuh/EygKKSCv7y2envJ+EVcotxEC\n3LU+\r\n=I5k2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"38d1ee2552bbdda0a151734ba0d50ee7448e68e1","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.5+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.15.5","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.17.0","@opentelemetry/context-base":"^0.17.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.14","typescript":"4.1.3","@types/node":"14.14.20","karma-mocha":"2.0.1","@types/mocha":"8.2.0","@types/sinon":"9.0.10","@types/semver":"7.3.4","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.17.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.17.1-alpha.2_1613842636858_0.593916444468962","host":"s3://npm-registry-packages"}},"0.17.1-alpha.5":{"name":"@opentelemetry/core","version":"0.17.1-alpha.5","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.17.1-alpha.5","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"af22e561c0965122d6abebf10461576fe676891e","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.17.1-alpha.5.tgz","fileCount":126,"integrity":"sha512-9ce58/JNlgmeUrn8/jWUWCJRhGK2PWgmZP5t5InOCxrSWwPCnN17MYSbtVeenmzEZ9CIjdMoefIe2cNnOGTwnA==","signatures":[{"sig":"MEYCIQCLr2gAwSi/Iq9rF9asuHj3JyjPaVFA3twKIzuWCa4z8wIhAIcFGlyqFRn9Wu0guyu27vcdc+hoTdsm+anZq8xYB57f","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153006,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNoqhCRA9TVsSAnZWagAApoIP/1ayg5KtTkgL8NCkbyt7\nMAEaxWJDTMz1DWv3pKE4ri1Jg3RJr9IV7U6riPS4V+aDSiiJHwxlvcx8JjMW\nPFk2VUJCmyPvbc6TRGeS6k3csL456x6qYVTw28rjniselRTKFDcC81F/diQm\nD7rWl6zTKUYC/H4lX5eKrMTht6FoaLG1/QDhyLL23xcjRJMaH8CP/dksCPit\nLKWxVpTxKvmDslU9P3oJTmofLjtiqorTr5y73Xze9CrUdEQrwpA09NR7+VJc\ndPr5h2/fKR6gpc/jo2Jc2xWe4Ls+GaJivBMUsmqeWvUP18MLK82Ic4p8lvWJ\n9DWMfx33ZMjdiTk+S12CodusEQ7Kaosnx9qow2rXW3aerh6ekQ2gJ1gF4fod\nm8R1fkzo0FtzsWU/OY5xbiKb/m2nTDQjH9emopqZFtePo6d1joTkERy1OqE3\ntlsuYFWFUOD3dfGQEssm6v9lsYf83XzrFDOoAE8iT/5hVIqqW3AAtgaMLm0x\nO+XUqNSn9zTAZDrVFnCWG2MKMW8FjFnD/YqQanWxVsBenxHMOie5eBNznl2Q\n8is+zeJh0MKr/MySywfY6qdK9fzWUxIxAK2Ixzey1WrEsBbVPJk6SNS8VW2m\ngQOZpwExT2xLc2cC8NO4ak+HP8IaJfU4ldrnYdNgvAtTHLQR6nhdgeunBDqf\nlbq5\r\n=u28W\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"36ae1bd89abc2e2cc7f64e4a35a94d7e75a81d0d","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.5+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.15.5","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.17.0","@opentelemetry/context-base":"^0.17.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.14","typescript":"4.1.3","@types/node":"14.14.20","karma-mocha":"2.0.1","@types/mocha":"8.2.0","@types/sinon":"9.0.10","@types/semver":"7.3.4","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.17.1-alpha.5+36ae1bd8","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.17.1-alpha.5_1614187169179_0.16781398199382225","host":"s3://npm-registry-packages"}},"0.17.1-alpha.8":{"name":"@opentelemetry/core","version":"0.17.1-alpha.8","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.17.1-alpha.8","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"09dd15b2031f3453b097dcaefd1ea9536365167c","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.17.1-alpha.8.tgz","fileCount":126,"integrity":"sha512-kM6z8njxRLRDTipErwTriF0XFJ4uCuO25uOaMHAcWdke9brrRWFA/NNTZSEUCJ8ZpDIl9W6qQ6PCqw+/L7UknQ==","signatures":[{"sig":"MEQCIF3kKlwMN50Dz4EtUd76x09iCT3jEe6w/Qx/cR9CuUxZAiAqsyRwySXQ9u4YnZ1mXEJ3kq7mnGiMnHQyOV3KfJ6gTg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":152960,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPO48CRA9TVsSAnZWagAArWMQAKOWCK8/T34/kymTkuto\nfAlormCCaguevUPplVm6lazpw5okDK7bHQwA/UcZqJxkO9XJnuMIg1XLd/yF\nbtZi4lxVkPNfE/rUwwtWYfw16yZsE+g+Z3lZzT/pLkZcOWAvUI/LsmOQpcq/\nEzYFmgCkWKP4TETHvbOgH0TMjdzmS+wZgL4LCOjGwSKNjXua85XeR3SVcO3E\n16e5WcXhNZoOqOiRIojcTAP3AOuaem4zNwF1zG+Ok8IPbTvcCruqokOBG51i\n1RtJMyYQXDniZlNbKmqikkd5Vxt+5jjGcN6U1Pjq56BGgQkPxuXLd1aWLCaq\nCj4VQ5HVRzQ/GOCHcHC7Gfak9/3YHD+OBB8M8oCjMXVPU5SCmfPQu5rulsZm\nrlTv71D5EDqeHI10Dkh3Bs4mOgfGRZIQACBf4EbuExHMVmFP5TN0FZoZkqjP\n0HG/BS28GxJ2QJBVMkERUkUPaftBWHLUYp+CWlZsm8FEhCxolYdgFwMieaQg\nyf0a80CIS+XoFXreQj4UB2kDuI4IlcJFR/smDL7HC5K8yowV6tyUO7jD5J9m\nwsQUyA3lxryi0ylmcNhOufm5ksUtdsAsQ+AfKvcvdQ8OagjYhY8hILYJDgN0\nqx4scoZ1wmk73x/ZmIi2B24OXgV3YL++kPG2N/bPZnajo8QwMC+feu3lLzoi\nmJt5\r\n=rs4X\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"67f7e70a3de005484d3e110b06f6bbee75b6f8a6","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.5+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.15.5","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.18.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.14","typescript":"4.1.3","@types/node":"14.14.20","karma-mocha":"2.0.1","@types/mocha":"8.2.0","@types/sinon":"9.0.10","@types/semver":"7.3.4","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.17.1-alpha.8+67f7e70a","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.17.1-alpha.8_1614605884080_0.06720247428086235","host":"s3://npm-registry-packages"}},"0.18.1-alpha.12":{"name":"@opentelemetry/core","version":"0.18.1-alpha.12","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.18.1-alpha.12","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"2fbab44bdbe03c593a409eb21fc07d80890d55f1","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.18.1-alpha.12.tgz","fileCount":126,"integrity":"sha512-jF6NOuNvq4ZE4PWZrbb0mH1yYkiI4fDpZHJGTy4OQtj62z71Ydaw0JdFNxSFwhVrADh9uDkA2eoRAZ0JFFxwDA==","signatures":[{"sig":"MEUCIQCpu2MNxDioesdZhgXMQWQDEIpI5VCY8DTrEWhcBNwvRwIgBzhoNmzkRjMaVgNGK5uRXmzPpNlCxtBsOM+YizkQMPo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":152962,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPkNnCRA9TVsSAnZWagAAI+IP/A9IpLZEVI1NEirFwuoJ\nvt86X5sSN25TUfPz9FGJboeWJaOWi3TCyAj8azdQerIfP+sRVztVHZEHmmeN\n5xhQqzTFX5mhdH0uesLiKJ19XKm5/+3CxTWDgw1mO7wZC1Fx8hFTAQScqTvs\n8gZfzjUlP0Gg5eGZSa2Z0QcWyf01IKlCRJIzDvQuXn4wo9LuCZR8/9F2azxB\n+cFGBVtwMmPLZVoadlYc5c9V5WuXS/Hxwb3qEmI///ypDujthW5ixtPnb9LS\nDYvmwWWmfkESzzWxCaZ6ITB9Va55SQsDfeocaO0C5i37C6dvOcK0OKM/ijW8\nLkp1hC7ygH70Dh5N2ebNKE8hDJpimk/hCIv2IyHkmyRUHWJ7ndidsuEv2LhB\n5ggVlYK8GP93cerEu7JrKMk6nUUNyUu6QS08IkzNHmk6/Ah1jBO4KxwQ6MAc\ndoiBRVkCbM5QrzBgGQhntWJBypzgU+qjJOj7yL40iJXUEtpWVjEwc5b9ZEnr\nsGDD9+f7RkGE+djqyXI+0KFRn7P7okdeuYdO++kox/v4BNSqQtqC3AIRLdeA\nVk5Eb4TtJI/tTPAzt54VmPbSKRxHPiMP601ifMn9sJgTJf7O7W8mEvur+6Sk\npClIXoqmgPV8vNScq883QRClUKEc2KwV1OQ1SpEZ7BzsVXfXS0l/jvjSHoQl\nzGJw\r\n=iOfM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"6540b54a8bd49746e164ab730269188237f89b1c","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.5+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.15.5","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.18.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.14","typescript":"4.1.3","@types/node":"14.14.20","karma-mocha":"2.0.1","@types/mocha":"8.2.0","@types/sinon":"9.0.10","@types/semver":"7.3.4","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.18.1-alpha.12+6540b54a","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.18.1-alpha.12_1614693222583_0.561387173690908","host":"s3://npm-registry-packages"}},"0.18.0":{"name":"@opentelemetry/core","version":"0.18.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.18.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"51f1cea441c163e53eee2a454134ee0bc6451177","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.18.0.tgz","fileCount":126,"integrity":"sha512-Kg+LBIAPK70tEtpIAdZomkUmbABK+EwfnjFfvJ1rVZ8e0NApDx14Sq92RbGDIf67TK5mBgIvvY27W+ic354UZQ==","signatures":[{"sig":"MEUCIQCKRRXZ12M9Bg9HMPZfRScdpzk10hiS4z2bvOFe0lIDMwIgIyS8AyZH4Noh70hXs/h/yUI0Z8kyUP6q3EpBYxt86+0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":152926,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPkUaCRA9TVsSAnZWagAAMr4QAJoaC0ADUaq9kuZBQ+j5\nZK9sinh3xYgugnKFpLQ1N439adx8Hl6HSIb2vAE4Xh8yzn26FcPjB9iUG+dq\n6B4+JbrMxGvcHK+7PJ0oRLNf+ZXcXxp02NnCfYA3n0V1uHwJvyLFiRzFmmIV\ntG7uBn0TAq00Qs+7/JY5yvlLwo0vrkgdgwLz4Nngz59lNowaU52BOE1y5TkG\n5YOIW/c6dq/EsO7GJV/1aaLa7DCijASPixt4DA1+y4rSQzBT+Qiu3B1oKIz7\nap90Qjv253Genh+Ayv6pYKRJ3DwqRIxok8M70UUbKLyq9Xl8i4M+4Eqyt/zH\nbNLVNBTD2JpEtBhDZ34qV2rk1S+JyrXzMzOiBuRbljPq711PQgrn9bTHt/Xr\n7pCuqdPq1ffe/AsR1rzgmfiyQVUmHL/EV7TmvUx0IqSew8gF7KwjDVxAiFWh\nTOwbC98QkvcdDEMK2lF+BgKDvwJXMPNVgBmw0BxvyhheIbGgERN3DJ2VVhnY\nE303+QduNUvcDtT2fDvGppwNZw52dxaMq59nV7Z+zSTWFuWanoIyHUGpDn4e\nsdHjizM3kqPinrLvIxBJGHO0hfPcYhd0D53hPwojQAu/r3/J3UTH1oRY0hTJ\nu5D6voyDxj0bCCbx1SKovxCegyIsNHaunny8TwfnLh33MjXiZ818zy1JW/ub\n5BDM\r\n=jlsc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"6540b54a8bd49746e164ab730269188237f89b1c","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.8.0","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.18.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.14","typescript":"4.1.3","@types/node":"14.14.20","karma-mocha":"2.0.1","@types/mocha":"8.2.0","@types/sinon":"9.0.10","@types/semver":"7.3.4","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.18.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.18.0_1614693658547_0.6435067942727279","host":"s3://npm-registry-packages"}},"0.18.1-alpha.3":{"name":"@opentelemetry/core","version":"0.18.1-alpha.3","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.18.1-alpha.3","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"3396cdbf597291e3c5d38be7ef1076718bea29e3","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.18.1-alpha.3.tgz","fileCount":126,"integrity":"sha512-IvlnV9Mnh9bQuUoaxNiCSGN6MvUN9yKGYAE84vIWXwYnN7NxKcLzlIoKq/ClmPvMyJYG58vyveWUk+jCoUUvxA==","signatures":[{"sig":"MEQCIFyxRa+cGsz1dFeVD2Uc+ybRtGcMVxrCAOSxJg6pSkdwAiBmJlMcaZQDkZX1ObHh6qD+9XeEliqCZPomo1MSpe8adw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":152959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPo1eCRA9TVsSAnZWagAAC9oP/jVxo9SeSjVRGnoISlEr\n8c7sYmDTQm9MrsPeSOjUby2dx2y4ItDHIMneKH21TYgjoerCzhgx12xCcOE9\nIdovXLE8mxh2+nQR4gGzatUXieMp5+MWVr5bgVFo1rLAjBhiQzKpRzVmgESm\neqHyEmyl5wJOxaRjmSjmLvwgMF9XmlBKwLIsHZUmUXUmXkK2FVg/lUibrCY6\nKihJz5IaUMfC41L3ygRsCi7WZ9S49mJXewG9buh50QfPgiKPpunu+pMzNl8l\n+TabxVspAABCJqU7mwVz9L9m5+9t87pbRKGGUAV8L2oy37DvZIuGXffV57J4\nHrinvK4ugGBvnOkL4ld3uJxsu93lKB0+TKd77r1pWnMPmvOjeN5DEjNycUbG\n4HyE4D/tuimYEPB0YliC3GPRxn1lrmIKGflJjt4WT/O1Yl2jf3idf8hvrtyg\nnTAVRR5imJ+eax2LGrU6f+y3pudkpRL+8h/riiao2S5xVJXg5w+BCP9t0YhY\n/JyfAOKBBfVW/cJn63ZEB3B43bjGzSpzBExEkXamKoCEpAWzbyadsQrpb5O0\nDvEwhVr8O2+Ry8awbdSk6ohv6Rwsz2Cnu+ztC8yCRVlKaoLCiRDkLYPB95cW\nJhk1G+w0dCeIQ4abTa7DSvlJt0CfL3FjUnwOjYCO+bffQq8APdd22/NhZwAq\nVz64\r\n=Ov7L\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"0643642f61de5e2bfb8942ce7b5dadea643cb295","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.5+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.15.5","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.18.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.14","typescript":"4.1.3","@types/node":"14.14.20","karma-mocha":"2.0.1","@types/mocha":"8.2.0","@types/sinon":"9.0.10","@types/semver":"7.3.4","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.18.1-alpha.3+0643642f","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.18.1-alpha.3_1614712158232_0.34969044336906263","host":"s3://npm-registry-packages"}},"0.18.1-alpha.20":{"name":"@opentelemetry/core","version":"0.18.1-alpha.20","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.18.1-alpha.20","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"51fa146a717c9343a43be56df2989ea43398c53f","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.18.1-alpha.20.tgz","fileCount":126,"integrity":"sha512-eIRaHbb66gz1S3ZiIb37qOHV1znGwD+u9qDSvAvEiuyPcvaPyYcENRLW51aviV2sYngN1poFhKseUDYQ99NdhA==","signatures":[{"sig":"MEQCIGSJ1AG4QqyMj6OtAuJ8Z+0OXiVDjk5rJeI0IyZA7FbLAiAw8K4eDRQzVyg1Bcc1v9VsMUdPbMNX4kI7GIK2WDFn0Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153135,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWzpRCRA9TVsSAnZWagAAOhsQAJGQnWvcHQL2j6pijDM1\nT2Wb2EnA01eoFLBuwk8/+DPduK00thll6k24cp5m7TBDxrlcQGm1BM4t15yB\nlo80Vx20vBeI+YCJDyMNPvsd6RzfYdeMiSXtgbnZnkohI6359X1K6bwsNT83\nRrsqQvNcgoWTcQxNkZK4S/rjgKA5d33wMMukEeIPiuqNrHohT+hv6c3YG6qa\nEokkX/nw4Ph4GcyBIVM3KNxQdbVVsqEWOl4/RQzMLTVlFWGZPBFU30nTCgDp\n4uOti9G1uDLg8tqeGCQocMu01w6zd/hl4tvb6j+MItmp4onMQsq6Fq6H2LwG\n/gxj8NVCcNcFcOZx/v7vF1eiw1ug4epohQeQuJChK7u1ok9Afpm+BCmievbW\nxw5ZAYS7pQOAUbxEhzo8owYiNrl/+vycfZ/SzYXDLD2kMXNe5IwFXom00rBF\nw/geHzlDEKYmWtxK+qIJjmgDwUwmXC/niBnX6nr1w/S6JIwVC2V8sX4X+eB7\nGncI5kLour0zIP0v1ycPBKL1YdzwNESiqEFlT1XNvsd4kdRiZ12i6MuYBP67\n8RmPdEeYUkUbLecErILvu9Vj+A232Ynud66OCY1w/OO9jutPNIXCdqNzrF+x\nbxVgPOce5xLQhmjRroQDC27F2OZERS0K4ICH+tPtlD2Qsr5/09nOnXcV2CeU\nTMp6\r\n=9BYU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"24bcfe82340e02e605c5c722b0f955da50bf82cf","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.0","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.18.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.18","typescript":"4.2.3","@types/node":"14.14.35","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.4","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.18.1-alpha.20+24bcfe82","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.18.1-alpha.20_1616591441211_0.22006755141525725","host":"s3://npm-registry-packages"}},"0.18.1-alpha.21":{"name":"@opentelemetry/core","version":"0.18.1-alpha.21","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.18.1-alpha.21","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"939562ccc2dd9a84f2fa46fff39aa180ec353d3b","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.18.1-alpha.21.tgz","fileCount":126,"integrity":"sha512-ygP0968LwoG7vGNsF1Kz6f1EHDWrso+jCJjtvV/h260NaWBzhJUQZJG8mINy8aVlDH7mgYC7UHaTjeNp9ZzdVA==","signatures":[{"sig":"MEQCID1jUbtA8FsTsnmG7I/hc4xPBhe9efaiMsMQLHWeJwtUAiASJ642Ter9C3LBoEDP6rSlt8/e0xunP6ai4DxWm70FJA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153139,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgW0jVCRA9TVsSAnZWagAAhrYP/A1DhLMRRPTX8ArYDAh3\nIQs4o8mPCbOJ+yyQpeRAV5+oLovG/3RAB0XMYRq2oZrW+Ejyk13IW0aeS+cQ\nDSDpmDDcfXoxYiX7UIu4Cih4fXNQAak9wBqZT0lq4JTWmW51GSNTw8/ZM1B3\nk38NzVEKczlwW77IdYxbdQwhH8v1zggcxJrl8A5ngVglNwY+UvQ/n10KIRqm\nKSXx8xC3SACwQ9LAbVWdia6BspY6R9janzb8erg/ptxuLeYwbpdEhzkVBLFh\nJmMDoV2PmCO/Svfpngs02m2K7LcNQX0lJdS5m9JXD9K4hppogDWBcetIj4B3\nSH7MDZPsU26WtuiqKfARwtrPHuLVdpe1gmKGic7FEeZM2sq3p66KbbhL+RrQ\ntr4fsvqkUNsOmPPVV37YGRztBJbXQ0eEYGLDwXJj8Gm6K+R5cj4iOCUfu5SX\nBtLFhyeZhIZkODd/7Oy5UGrDdU5mynwl0Wp96TxbGEv5MGmLQFFNPo1Vktl6\ncv0aAwR6Y8km00ichPQcU9fTzawZGXcU9sXr3W6l7dSxk7MPhBHu+gwHGJUR\nLFqMSfw6o+TcP07pRUQJT4lUEMm9IlWtgkC7feCemnAfhCXYHNxv8NyLXE0P\nHcULzDACkgl33jVORbJsEzQjIlkwbaRSnPpEKxb3jFl/ORfqgd3eUFYasZkt\niKIh\r\n=mMn1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"8010ac2fcd0c658c0a4184cb0f5d8108db3632e5","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.0","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^1.0.0-rc.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.18","typescript":"4.2.3","@types/node":"14.14.35","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.4","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.18.1-alpha.21+8010ac2f","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.18.1-alpha.21_1616595156834_0.9662544388011254","host":"s3://npm-registry-packages"}},"0.18.1-alpha.24":{"name":"@opentelemetry/core","version":"0.18.1-alpha.24","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.18.1-alpha.24","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"0c338a0d86cbe4c8c3030a5644b4a127432fe9cb","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.18.1-alpha.24.tgz","fileCount":126,"integrity":"sha512-X9w0NNbe97pMrpWNC4AKu28DkzXHYR+ft/6G6o8nzBCJ5vBN0ZmUHTPrO6gVFk7xYvnROamVstY7xAJ60AZkvw==","signatures":[{"sig":"MEQCIGyaCbcDlb5ChzVP5cbeW5au8+7030PlTilpAb+uUtfBAiBjU+zuzcATNCLxSXN1ERUIUNy0eW2llUXaawSwSR3c/w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153154,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgW5U0CRA9TVsSAnZWagAASgUP/RsQG+yG7ngwz/HwAPYA\nJDRAtOh6+m0lUGCb54Sb5IcFOPuqFwN5NuyQNuWBzXj3wpOSq6cO5mJiTxUR\nF7ImFFsd5pevrbeWGExU0vYE++P3H1UrruBOWZ55+HKKer7xzJibLKldUlch\ndy4HmaAS1Y4fn/oPW1HeV+tMIubH7w0zD8SB++h3KohXvXFdDzH9RNQEQvoa\nrnjgHcF1b5ja3WD4tSRi6f1Us9HpO7nm79zuGq7ZEG+BkcOi6dL9dVCvry7Z\nprrOsxUdQcxn+ZqU/4bb1K3IKygMhoVMPpmzTs571Z1CZuj/Hp9p1GUObiaD\n06pcpYjsNfAM9nFsp4w8XTDaHWhozeEQbs2w/nS5CTRlKJ2YSA2JYG0/kCsk\ni7A1IGCfUh9pqCe4UseejAOPihT3evYHxS15Y9zVihabO644I35MxifLvS4i\nw+CQTQ+qeCccle3G+YRhRbh1V3RABp701iPObmVcSAlNp3seTT0bt2sh4mKT\nAYY31kvjEFecaZmJw5NP4V9HqLgkUU9wkLeIvAI8kV2B4f41IK0bkoDnJfLe\nmb6M0zCsuVOJSE2fyAINBLpNIk4A3pGdSxIUvNc2hkchaMexRJHzgXTYURy9\n0xfXtjgNb4ksqEf3S+3v6BfoqbzlUXNxDELAfKr1Q+4SHwV62V5dT63S8MU6\nuhav\r\n=DYIu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"69f2d3c264497bfdefa2126d0865ca56ad5f22a3","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.0","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^1.0.0-rc.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.18","typescript":"4.2.3","@types/node":"14.14.35","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.4","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.18.1-alpha.24+69f2d3c2","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.18.1-alpha.24_1616614707538_0.5395444519839057","host":"s3://npm-registry-packages"}},"0.18.1-alpha.26":{"name":"@opentelemetry/core","version":"0.18.1-alpha.26","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.18.1-alpha.26","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"ea5c791992674d544daf67e9f0914054b6cbbf85","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.18.1-alpha.26.tgz","fileCount":126,"integrity":"sha512-bBv79sB0uVLyZ6307NExbC3jz1o0xa3hpobB9wdnup4U34Tov0FC11QJVV2ZlcxbEWdU4HxNB3YwO4RNaV9ebA==","signatures":[{"sig":"MEUCIQDKroDLKq7DfK3zYicXvoCBxh8iE7tDM2+54moZJ9rUNgIgTj7VFQdreKGYd/c0nSX+L/+nAJyDewUkkcVo4IkrkMM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153706,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgW5xRCRA9TVsSAnZWagAAkiQP/0DTiNptycGXDwcztbrk\nnT77Z50mitbV9anGvFgQ9tGDjJVmHTj8BkmmAW/JxpPirTYzIN3OPgzcz/mM\n3ggnPhsFzuaoMTNj5lqFJM7dxRKOSNUHABWCa8D1YWxfYGalPV9q4K1D7XQi\nscWaQhT5+GP72M3IXjZSrcQAij39ZqJ/vFmUEyrwj9xE2HXRBnpuSeo6PQJF\nGjSBF3oz0fjq7XzJ7dTOxG5Rk8unQU18rqjieWrZmyrwVdWuMIymIAyjvfBN\nS2UoHuEOXpDlZLDA4CCWROKoOA/khturfDRWha0W+gKzMbXyLV3T5+CwbuOj\nySY+tjMx7LYjANTPln+HeCJz7t+0SVXwfP+vvlzvlefhlEIBZroUwzMriaM0\nhgMk1fieV3sVzQ1y1XzZbkml76cXAWGstsfMHJ9XNoittCWLqYLQ5R4XPgi2\nKdKYPzJaTHsa1VgemP/BEcqpmnMpAOpf4Q4X6WjAkf4yJV1wcIHMsVOFEmvG\nmZlazZA8Mzxf9dUc2e/uIobhNyF6kBXO43z5CiIbj06MGVwmNG+xsAiErD97\n2DMS3V9QgpC6EDvlpQQAothd3Y/U4TGN4REXjX88/jRdhVzn3MF89a7C6QUF\nhvuZsFCtK+yqJfbrqqiiauS1/J+tHjFAaIxEatTuR/debH3l+Vlc8NrAqqEH\nMAmi\r\n=7o16\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"91483873ae3e3e8a686dbe3b7711a233167efba5","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.0","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^1.0.0-rc.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.18","typescript":"4.2.3","@types/node":"14.14.35","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.4","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.18.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.18.1-alpha.26_1616616529427_0.24991903137222593","host":"s3://npm-registry-packages"}},"0.18.2-alpha.81":{"name":"@opentelemetry/core","version":"0.18.2-alpha.81","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.18.2-alpha.81","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"81e0450cea29ffa3947c8e45df45dbf83001c621","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.18.2-alpha.81.tgz","fileCount":126,"integrity":"sha512-YnEdfQo+1uxwS5FQX4OAqA1t76Yp6rwXbYpnLwv4GuXqROKHIMLHVMzgqBqSEocJMwTgox64aNA/c60cfjg+OQ==","signatures":[{"sig":"MEUCIQDXi9CS/n0Ejv8wJhaBGrmRjf9F5eqic9Ej//AvbrhWMwIgBLHELH742MLI06BFH2vZqjHMVmKwaS3hQxcYL/dQS+E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153724,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYi/SCRA9TVsSAnZWagAAzbUP/1MEylfE3gQng2g/Pv0I\nW7sbkdSvfujn3IE7talhAfZLZEeo+JN21UqF/wZ+dcnXgJ7Leen++bxQDMIh\nAI+U3bn/MFYUgzNFpKbVULKneOxeiEGbhPjlw05/UU+BY6HbjXG/5P1KfIfm\nK3LByzMk3po5CS4F/3wHI2SdMI1MdNdDN3QKWhSDUFXqdmxyZ6dJB5ruv7nW\nTZ6Bz5GTUchNLQ6LllCdfi4RxvV2+P6TCMyt4Zswt8AFMyVI7jS9oBPz8box\nCK7Nx91OTM5URgOJOF/KAbUqngRa16DOk4EVnqWKYzPeYLFo00s8KHCQaj+v\nVSmuVrEwhZmOdxi0HxCSF8QivUDGjaBwwtLKh2PO0XYDgXabNJYTtfjQtQjw\nmcfZBAUiSaxqavjp9QbJhwVNmH2DNTCyJ2DavqsXfQFEpOR7iAS5CkUwmTwr\nFbP+MP2uXKWCSlfCT91Cc4PlWTjcJ6dBcOMjGqHqiA8HxF1MXxa0XpTu3P+m\neO/yxM8cSLASF17bWQYfqXyLFhGCjbBJG6TWl0L5jXEwhWL6u6a4YbM6jx6c\nZDT9Hj8CMOPD1AUvtwm8aAVrjLjZt5/M2Ur+AHENbWPoolADw6AO6EtxigBD\n6NCNbo/ClnJl6hKCxPzEVSllCFdiT9ucm9Q2UiQR03rjc5f3vsXbYtv6K232\nZKe7\r\n=wxkF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"e369035cd228a5c8781069a99322c5b938061d20","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.0","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^1.0.0-rc.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.18","typescript":"4.2.3","@types/node":"14.14.35","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.4","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.18.2-alpha.81+e369035c","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.18.2-alpha.81_1617047505537_0.3112270561740247","host":"s3://npm-registry-packages"}},"0.18.1":{"name":"@opentelemetry/core","version":"0.18.1","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.18.1","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"6caf3e1bd472c4658a6fbc09800d6ee12f5e8c52","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.18.1.tgz","fileCount":126,"integrity":"sha512-a3/jbLvO2iM7HWQrTmsWIs7ijrAqsVEDrC5Ar44VDYv1xaznWAfendA+9O8QgnEJcyILkSEzp6MYNdbkemBc7g==","signatures":[{"sig":"MEQCIGlylMjHdbtGSoYQ8f3AgaNBiCj6DSIPmSugSJPnT9EzAiBcI2GwcsIyV+ihTbztm9Xy8k0r8LflvzgQfVk+0Tm6iQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153688,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYjKnCRA9TVsSAnZWagAA16UP/A4JFT/oIIlegEJUX4/m\nYjhy+aF3hx/fjfa89ZOtZcjYCPUXk6Hzi5F5P78UYgJPYgUA7fB27EKirRrb\nc4PZQzgSblnVBmf7NAqtXHy/jMMOiCTrfrD4GvQgffCCyiXuU8aGwx9drzUC\n0HtmfvtkbAekWi8uHAfuJuj2r6fjlP6UY5cLYCKviEs6X//NMiBkqdQiaT53\n0OBrN5KkMTL44qLwpN+9R9FNK+/n76mFRWNkYjPE8JuAm+9ADn9Tlpf3xiI0\ncBG/kpbEjyntlohCswIHm7xnEv6Ca3d/phNTGePNvzm8E+/3YJA+aSMoGh8j\nb8QTY7S4fKdfxXWojE2ySZVER0zGNR2o0q4VWwHgurY3VHyJs/IgSbhKSnWr\nB1cLY/qcUSJi92zrmHfclvCw1w/sc/1NVpZG6ha32VP55j8YErOLojpKES9u\nJXeWKeZJEKExAJbfW/dYPkhSYgh6KLLfD6rbdFelVNJ+ZlZcdbgV3bl0fHt0\nfmmJUCwn7U3LGLha4oE+hdu85XD9zsxNVMUa1/KC0jIn3bWa8qk+oxOrekgZ\nZYKSEH2kIcRRx01P9e7nw4DmkSmxBs8elsQ1yGl71Q11DMqV/+biPtmopR8F\ndyYZ/1UcP53H26r21yKiCSZIsJNCBq4CvBBZsG8lMPzEicr3Dn0gBLPtLPrm\n0ktj\r\n=WcEW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"e369035cd228a5c8781069a99322c5b938061d20","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.8.0","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^1.0.0-rc.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.18","typescript":"4.2.3","@types/node":"14.14.35","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.4","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.18.1","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.18.1_1617048231188_0.02085525568341029","host":"s3://npm-registry-packages"}},"0.18.2-alpha.1":{"name":"@opentelemetry/core","version":"0.18.2-alpha.1","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.18.2-alpha.1","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"0d9cc1e7ce771f6ff3e50629ee5ca50e2ee0a49e","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.18.2-alpha.1.tgz","fileCount":126,"integrity":"sha512-HmFY7gzob2SPFPyufmw5E1KStxgcdXDzURqnFjpVD/4NozuvQoxxItUjAtXg9qfLpLLY/q85WnjPURPFvchDHQ==","signatures":[{"sig":"MEUCIQD0onf+slyFLw0Rn4OpE5mOlrPwRfQdp1f85Q1TJHGiXAIgTwKv5/a0DxTtQhCqvJ26IbwAhP1BWUyFDne+15kiR+E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153718,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYyIzCRA9TVsSAnZWagAA78QP/RKl5jtpgPISmcElW2NI\ny6tK35kNz9qt+gdmVmLTPj/vDfDRT+eA+n5t2i46nrBr3OkTEjUxfjIwDFLa\nL3b+C2ZzaY3YWiZI5VKRt/YFGy5zCIcZ8sH/oSTDjFnoS14ddj476kuc62U8\nSdAveKNsV4W8dVp3b/OVe22q5Vd43gG4lXSUTusyAMx7Rg1kK7Rw7lgnMDyC\n7Dg2NV5l9OEblCttZs1dvJb1hQ0HQlW+tK5hEGYdQ36pooA7JGV8iwvlH6sV\ng/BZrc+amTdyWkNPU97oQCgQkPuvurdvWEbT/i45jKKHwpWqhduoNE3kLRrr\ndcSIhFDUctpATOcsCodpmc+Xwq0etecgBEAQjN3lrkGJ/XKnhnxFgwWPSOZy\nGQlhwPQ9euWob9xhlv06OKuPZipsujBH7E1QH8pVbul5PLehfQm51+me5oxv\n+nWUNXTqatG1KWV4HPJyR59ld0JslC1x+i5Rqu3teUcIporOh2H2LhJQyzTJ\n5sSdLA6PUhPX8fM0Ba5RNG1IGCud5kClcElqg6Y7zFq3tuWRJVWdC6ADsRQ1\nHyIihysyWgu1cGYDna02gMi030/ICcsQtn9A4TzlUkxbIFXkQPN2U5ldAfq5\nKVSP+58ljQNHN89tFzxquHC//ay/pEVByKrMJbF9WEnhONUzeLM/Gmymv2Ph\nZGxD\r\n=4POA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"54857c012414c05bc83b4a8da224492c98abfd46","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.0","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.18.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.18","typescript":"4.2.3","@types/node":"14.14.35","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.4","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.18.2-alpha.1+54857c01","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.18.2-alpha.1_1617109555027_0.8152746552793557","host":"s3://npm-registry-packages"}},"0.18.3-alpha.2":{"name":"@opentelemetry/core","version":"0.18.3-alpha.2","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.18.3-alpha.2","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"797cb29c6740fc5ba3c60369c14fa7e9932e47d3","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.18.3-alpha.2.tgz","fileCount":126,"integrity":"sha512-mxnbdAY6sFqrnPWSAnSAEdAgYdnMYz41ZLeoob2ikSyUU4+7tm2g/JVny4pVme4cSzbSt7sByRnQNUrbhJjP5Q==","signatures":[{"sig":"MEYCIQD8gvhUk1PWFfSk53vntTVpoKJk38r98V8NcaewxHgmzQIhAMJlZ6WMMJWFtkp+B0dsKbR3w2Puq4zruuO8lMwS4O2W","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153718,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgY0M8CRA9TVsSAnZWagAAawoP/Rpi/R58zw8eQzB0LWTk\nqSahw5fg9vLo0WPN6KDTd9Cuj3Km4nSTi9KgvCFer8qXT3PLkYq8FEh2FZrq\nU7gLOIqZ9lmaH7sR6gkQGtV2K23JxKEAb4MV3PG0dv1QLMRAmzi8Jk7f6IHt\nYgw/ehM/lWXr8FH+4d9B7qBCcLqskON3uortLnrkVSYXm06RQ7dxA16mPnuO\nQDxMOiFkT17hIYJbfSPaqB/7LmlRZZlGsCr93Yvawmd7p1QKZnyqNBBap42a\nrzM5D2pzHpyGMbjFlo54vjzGzeWFLNKlEh96DDD0VKbQgmQryudilQd4oea5\nmLfmytt0+GXS8Q8xJWCSWqcAeihjW4Bmj3DXE0JEk6kNuN7Jyx4EHNw25cPj\n2XPK1Yy6qEX2poiqFZaVRdlIzflTE4eXANk1+LvA+s3cB1ruVw4Yn6JxxOMY\n9uzVdt+vde13Ln31Y3q9i7NsTBMuyoP5KrFQAABwFYFCgQG4Cm+NTse9M/IP\n7Lrpe9symfBh/x9n+gOVyPYET8I3r7lDPeV894pVSjsp3Z8NRHStVnvrwl5h\nd6BfF5Egc1+h5cPrI2xPXWke6jzoJp3UAOymknYBpo7fWTA5b4hZWfZnIJvW\nsXoQ476D5SsZ8G74JcPUN112XoHyHJ01MNrlYu1lVi0n89fHvPqLJkynxGKp\newvK\r\n=Erx3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"2409f1cdddd92c23548c18c055a6a36efe36349f","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.0","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.18.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.18","typescript":"4.2.3","@types/node":"14.14.35","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.4","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.18.3-alpha.2+2409f1cd","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.18.3-alpha.2_1617118012077_0.06590145748362186","host":"s3://npm-registry-packages"}},"0.18.2":{"name":"@opentelemetry/core","version":"0.18.2","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.18.2","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"3f8f54e250416b50730551f73e42fca9808cafd3","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.18.2.tgz","fileCount":126,"integrity":"sha512-WG8veOEd8xZHuBaOHddzWQg5yj794lrEPAe6W1qI0YkV7pyqYXvhJdCxOU5Lyo1SWzTAjI5xrCUQ9J2WlrqzYA==","signatures":[{"sig":"MEUCIBb999udluViDe+tv+5OnJuzq6B5Zo4vKwKTFZzknfpJAiEAz5Hlz+JToxE5d24hCWp7CZBlIWAWdsrm7J6RqnuFi5Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153684,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgY06tCRA9TVsSAnZWagAASo8QAJBchdKRAezhkJyx6xXv\ne59rmwRPr7RggyaZoKPw0/CgBlsFksgvI68Yy/RCKJBb/0JY729eXXMfi4I7\nz6frT0rUztoxZvvekwK/2bNnXLwBKxejvIej/2Q5zLFTvEIJ2lii23cVKcj3\nmJABzkjPilKUVmvGVklJHppmLTpK8+LK0lQbYvmYkwZdYwGCbA6n0cFSjD7c\nQ9IICBphbchveLrOm9FjZUExX+AbQ1KP828Rvk0cDQ8pn7lYeLGUeZknj0FL\njRBJBJm5O3W64bM2mwVIuvgDxkWjln6p7xabc2bkTpoHNpRHTRm1/P7Cf6jw\n1oi5j/fq6QRQz9tF6DNnJg982o8hPhGaQX3gtpESRHaGwzxqvg5DG/Z3e3ay\neWqH+xbZB99DK2Mkh+UkHFuY0dJ8fmbOtVh7dz8lZWyiwwLlUf4d/3HnyZ1f\nBg8AWTmzOTebVm9KvtdykrwZTASJCKwZKjVasENXOVJEcI5BamcblLU+USTS\n2JSvtxtRwHqwbSBZU1L/5KlP04KcJKiyGayhr3aX1H0bAIf4jEYJi3FyTzz1\nwtWWpsJX4O8rYgOTZIfme/u6eiw4b6q57U4xIANh4Jq0N0X8g3DHLJfmrEee\n/TSX2/CdPuT+tlqYWXMB/7KyhcLVrI2enJk7HOwMyYtJa0bg1CtFfFGs3imM\njPCW\r\n=fUyb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"2409f1cdddd92c23548c18c055a6a36efe36349f","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.8.0","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.18.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.0.18","typescript":"4.2.3","@types/node":"14.14.35","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.4","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.18.2","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.18.2_1617120941317_0.014520835732853898","host":"s3://npm-registry-packages"}},"0.18.3-alpha.1":{"name":"@opentelemetry/core","version":"0.18.3-alpha.1","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.18.3-alpha.1","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"2c513ac27c5b5b5f25e1358f64f81c7a7f129bd4","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.18.3-alpha.1.tgz","fileCount":126,"integrity":"sha512-CpR/19wUZGjc4qX3yY9oONYodwGO94eq+NUFiBgOKAN2QMdo+o/POO2RImuEqDKKaTY2UoJeTnzUdceBS+44hA==","signatures":[{"sig":"MEUCIQCgtGtEyLR57QNqKMMAXt7coKw6NXH3xDsSw2pVtUIPzgIgJA3P6qmm8TeFOagsUa9WO7oGLl+bcwJxF7XEi7nNN9A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153717,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgY1/wCRA9TVsSAnZWagAA/MMQAI0Ks1tMOXk4Yl/rMQMx\nwd7sXWQHsVrHPq6RVCBdf+CKsnNG2QvBS9/Jg8unOz2i2axwaI5vBVPntUEB\nDEUXwVNgUMkkD/KfRjQEbnt14jXMxN0SRfLkB232z2qJWFckRMNi7xsQw0Ff\nWx9/aMgvM4hhgyEe5tRvOuyXroBJMYhSaC5Daiv82xz3XuSLMOd0EAdd8a+H\nZGjFdFNfLq/LO9QErn7MYy1Yy1Gk28wMqSPQXYMpd9FqOd7wN+RMZZA08U2E\n75OaYmgu29tRGCmKiTHe+qVVZ7X/+vbV9xIc5YKujHtXmuuBnRAnuG2EotXc\n7BD13XZSZAMycrvUjgm7pfDzaW8wmVSLmobPBi20bpK1paktAM/lWihDZ9F3\ngtn3/OZVBCUTeSIQo6RFbpDdPTYU8Tq3D+lzfH2Tdo4iDE6rCdxl50ze5qZt\nm6QOrO0RtOlrjMSgietWhVZtlvWpOknuYnbYKWMlg8EudPYYfYUpzvLqCo7M\nbl6I78h2ovPmBJSDIZbuDqmqDKKGqywFv7m3KPtWSKJG/04gniBJo/JNNKUK\ne8RrC7XSfcA8x8rI2J58wF5yfeE5LLlDKhaAMgW/Teu9ngD8qLalXMoUaghz\ny4RldOTIGkEBMzHHUVwOiKolJsQKnbuV1hf9FND+pQ1wKpWta6Z4MDB/yJfZ\nkRpA\r\n=QUXL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"cabf8630cf2e295ac2e7e5f44d6efd1ae911cbe4","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.0","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.18.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.1.0","typescript":"4.2.3","@types/node":"14.14.37","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.4","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.18.3-alpha.1+cabf8630","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.18.3-alpha.1_1617125360308_0.8484044149894256","host":"s3://npm-registry-packages"}},"0.18.3-alpha.3":{"name":"@opentelemetry/core","version":"0.18.3-alpha.3","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.18.3-alpha.3","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"b029155ae25702df7510ff19a63031a85d0eaab9","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.18.3-alpha.3.tgz","fileCount":126,"integrity":"sha512-lj7JYavLYq5lRySwHURi1+GE0ZcRB+eZEuyd11ZG2MOxKmVyFOUzdnOMYVsQlnhRJzj4ZXSI8U+DaZciB7q0JQ==","signatures":[{"sig":"MEYCIQDzRqsAP8IP8kAASpE2Vp1qzbXrJTfGMjKbF1oRreKvLwIhAOR0sFviMzi7qrkLzdQHBbv9JNGPrTeoUK5pF3x06tFJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153717,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZCbSCRA9TVsSAnZWagAAwFsP/A/0THTd7GoFSLUStkqw\n1w0osP56LbfzCs1caBjqQv8cFm85kZc4SoRo141gS1OxiU/i5YU8n60Ovea2\n4XxO/Psco/tF/Wpa0fJKttQpXmDTxOUHnwtxl9FaatyU8Q7RZ8IZbpqEUwZc\nFomYXRKe+T5u3j41W+3j8h4kI/qFmgh7jENqlEslS5uHksENm02sYtSZA3HG\n/Vq67pPq0xTgRrSsNX3Uk2v+6LU38eG7gHdowl6TgAILLYXB3TfhtJktKPib\nmdaBbLN96XXTd8YqHBFfcRnYP6u0yxSE27IHN3705XGf8YuVnXUBmPTXrKb5\nm6JwfwYdS5WEr7Tu3sslknJID/EgxugGzZW5dD/bykAsCiqH0P4nM/+4r+fZ\nh/nl7Co8VdsRWX9S8EHD5bDonFsbksOqmhlJ598ERQbhjYFJE36euKbLiADj\nPm+nJMFnKbzBbFsC3QwQYLk696w2SliJkBtRh9t3Ei78vWWHKbxt/ETUH1RD\n12eTpNpS/lkRIHx2ItMZfTPef64nTt6TtxDTUz+et4Kkm2CJ9PMMPuXxb/oH\nFYoTUsP7EXfZ1kgOWqpYDsGwKpUpKv0ZgoSAtOflDp6w5jAI+on6reJWiQ0e\nJFHJbykLKTkgQcR6AHlMt55FgPyEGmqFnk7wKYkl0yqUKfN5SFT0IJSMHWj9\nrQYt\r\n=Tfqb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"853fcb94cd96cea0bd1af18cddb355345f76adad","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.0","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^0.18.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.1.0","typescript":"4.2.3","@types/node":"14.14.37","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.4","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.18.3-alpha.3+853fcb94","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.18.3-alpha.3_1617176273538_0.42691748806393726","host":"s3://npm-registry-packages"}},"0.18.3-alpha.4":{"name":"@opentelemetry/core","version":"0.18.3-alpha.4","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.18.3-alpha.4","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"53f8a5225c09c8a0d5b8f150476c4feda579aa69","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.18.3-alpha.4.tgz","fileCount":126,"integrity":"sha512-6+QFC02I+NrzOm/LztveVabRmTQ846AbXK4DmcqACui9KqGDwHWVIkiL1KnsImRteFkSx9eIB+AcVhr3J5nKsA==","signatures":[{"sig":"MEYCIQDFMLB0iHvweB3HSK8Ej7vBwJmicoWWvShkqlpy3l/xDwIhAOepYcDF/lZaT3wcuFiYBEHEn8TKkZD6YVa3+mB9b23F","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153721,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgazzRCRA9TVsSAnZWagAAEboQAKIhgl+tuSC2ZTSyvKnz\nQ2HQjVzEkPQ3R2eXDNZgltONGOtP91SQGzF16XDEbRoFdsYwDv8fJRoyuXKY\n0O18do2djWxlFo+5pA4nbqHonau3hEtfjGrw04uaQsT5AG0RVMvQGIzh83is\nRaGqOwuQYLt6vUTl0wfnpl6kgu0Ws3uVsSJyBhuclwadyVouxLqnNyqF5qmV\nBkNhHw8uNcmVX3qGmlPksiLHqd8F5VQ9ZBScIPuaVSmek1Zey6WHVlKReuGI\n7b3nc9iPmNDFtpksjcPEW6cCgePL+6fzapf7ywT5gzL2aT9IyJkYzF8hdwbl\nFn4VqA1270oBrf71wdqsi79LTeAd2ABvM9A6p2oWPQ+rhLdaHQ+xUkrrDPN+\nbLc4s6NEbd+QGql6VxdRPlk8hAbgTU5yOi99jC20GwF+6prIREAdarXJ4+96\noXC5o+xi7hh2mw2OQE59HWYxb5s1dxuRn7lxY3AkDmlwPY+U5w9yaVjBM/Lp\n0fEN7LAUYr+0zM6EUfm47mMwiei6D08YzvqfEIxjUPlmX2VvjInXu1hm26fR\nwlN63fwauHhCQ8BAxfLJHC3+pWWVAgydahKwtQ3WQlrA/W6pcYJJH0jhZDfI\n8NW0eRoe3KxTb4VlVdlsjEwqxZucH0jI87/DRjzjoLGxxlLlk3K8qFmHVtvf\n99f9\r\n=d2/n\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"02175dfafde72898d7ab40d8078b0e1b6576e82a","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.0","dependencies":{"semver":"^7.1.3","@opentelemetry/api":"^1.0.0-rc.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.1.0","typescript":"4.2.3","@types/node":"14.14.37","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.4","karma-webpack":"4.0.2","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.18.3-alpha.4+02175dfa","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.18.3-alpha.4_1617640657119_0.16839925348791418","host":"s3://npm-registry-packages"}},"0.18.3-alpha.5":{"name":"@opentelemetry/core","version":"0.18.3-alpha.5","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.18.3-alpha.5","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"763f26e8e2d79ab150dcce4392b384ef4e9240fb","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.18.3-alpha.5.tgz","fileCount":126,"integrity":"sha512-948TEaJ/1M1RnyZqxtQ7WlDQquzhwi9afxMX1aA888GCUeCbGanxTEcHruPYtiZKD0KfMwAJ+FprBeCo3Hpsfg==","signatures":[{"sig":"MEUCIQCBxREjsBiByTvadzs9QK9wYjKT+kQniKbC28l7wmB5ZwIgfTu6RIGWb6QPDjf4zFQxS/EpBRE9KGzRg+nzfnpaHpg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153790,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJga07JCRA9TVsSAnZWagAAk0QP/1FsIQnwcqb+k+5pQ428\nXax5gxzRBLt+317gOdgJKVq7uI67hy2zk/jIlkgoAqKcHT6Da9ud892DtPzm\nwZRnbYbeSoHLSEaLcaIKJgGhprv4/Baf8l9qAkHi3w1N/siNmd2u2bo4Q1FQ\neUkWfWh50ipeJb6DjO3qxIE0tPeuGNXFQ3T2rz9aiXZ247UTfkT5Els7gN51\nIWHYB68xsIoZez/M4Vnu2eGYr93HRKJTIihPyU55v2IeyznhRdz3316cfuN0\npwEZVLNX4hQeyDjkKJdf5+H8PL2LxlVmntM7O1AXZLbiEzaPhlxGZcxlAQs9\n/TTkcSg0KtW2Rnr5u278zp+EbqbDkpLWx7vd7MS9MaEGrj/qjMbhHa+s1M15\nlxl+sBpdN31yxR3lNYYUd3rNuurwqz/M3ywTz8WJ9RABzSUlLacPSihGpyNU\njgScy+rN35hAPNfgp0D5fqpx0aN5yVpa4sL5it7hL8fMlutrDKVZXMaYdl7Q\nzm4StqaxBxd7RCVAhtaoUjVf7SNunpAZ2oB+rEpLFYGtmY8aQhu+zBAMLImm\nOkaU4Nm2Ito0uY5oN9cd1VJgjrnJdLp1MKEtfnNn7nZVmJkmJbBiRFADfxW+\nFnWgTl/YQrjFrbJInH5BHBHWw6dN3vnQT/QIJsXxT0d7zJsHeXE8wMW4+lZ1\ndZwe\r\n=wzxc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"8e2e2a9653bdb648849a0ac64df55cbe3ff0c503","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.0","dependencies":{"semver":"^7.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.1.0","typescript":"4.2.3","@types/node":"14.14.37","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.4","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.0-rc.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.18.3-alpha.5+8e2e2a96","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.18.3-alpha.5_1617645256953_0.1236281351247408","host":"s3://npm-registry-packages"}},"0.18.3-alpha.7":{"name":"@opentelemetry/core","version":"0.18.3-alpha.7","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.18.3-alpha.7","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"f7a7e682807a8c1c5d9f51016720811059b9ee33","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.18.3-alpha.7.tgz","fileCount":126,"integrity":"sha512-dpNPDPSoYIpewNWMV8VS0LGxPpQsTMN7aONIL2PCPvNx31cIAfrd/6ia9FfS1lVOl42ebt8o7YSl8KrkuMs1Sw==","signatures":[{"sig":"MEYCIQCzkak291PZpQsgRCYQDkiEdjfKzGiiRAVK8h+TrI7JrwIhAKBDFAsg2qgnBRbOSiJd22IS5qtOUl4SWrrDfeTqTGUT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153773,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbdnZCRA9TVsSAnZWagAAoscP+wS+buW2X4R5PL6JMpeX\nnuZ7Zt7/I8TgDHENSy03auz+0iR3q1B/baSQczYYd4ZZO/IB6p87GUIbM8Ck\nN6jCOqc0RNpJ4tTLGz9bGCljnPuPVy2j9H/RGePhAz1E3vF9ZXXueWd+u3wm\ng1YXAy7r3bIAeZlr7dCKpg7nFsgQM5kzCJ6lq2Ov2SJCufOQyytW0yVGZooN\n8tGDLwUHtkbsQDy/EjEZTNTaz/erNuCfityxQ+qgAQ3CPy3fzaL76iyyij2J\nZPFcYFRr5hl626QTXPhFaa6kzbYYCo0tuzYloUiE6xiKMYnZvAQ9T6nQ/qxn\npDEKhsDy72OC40xwkCsItt6cMIqttYuiGxMUau3tvaz+s3Cl4j1M37IpAgvV\n8Bo8dD3jwbY7JzR2w97QRLNo+jCwKmJWdFxJZLTftnIhgWyTYZSsWrOxT2bn\nrpKz3ZJo8qK7UwKViddAfFI+ZlToFpmhAqabIDcY2lQ8hr9BWm+2e+UxT2Zx\nUjMbKUgqcxLFQjPE6yWmpd9EEB55xoMmI0IzNSlXvxjltpitqmK0XVe4nmFz\nT3zN2HI1oe+1q047NQh0Ip3sfE7MsZxnQC88h46bAZpjgZJxrVZn5Cwl7wPG\naehnLuYR7EnLvjFxqSNQoo7YeLZUNjYBT1I5R+A4V1lwYOTnfAOLVeo+pbJy\nVv+n\r\n=LcZ+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"897c35f497363ee3f3ea4c1e5ad1628e09ec9041","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.0","dependencies":{"semver":"^7.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.1.0","typescript":"4.2.3","@types/node":"14.14.37","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.4","karma-webpack":"5.0.0","@opentelemetry/api":"^1.0.0-rc.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.18.2","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.18.3-alpha.7_1617811928982_0.9056040155830474","host":"s3://npm-registry-packages"}},"0.18.3-alpha.10":{"name":"@opentelemetry/core","version":"0.18.3-alpha.10","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.18.3-alpha.10","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"65a5eb7d7a927420dd8dd3fac087a2a9c4da4e17","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.18.3-alpha.10.tgz","fileCount":126,"integrity":"sha512-QUKUR3Ut9D0H0EUKuAas9Ab+UQGz4K4C4KTvK3EKhQ9bfWUoeHGq2OWTQucEjlVWZKw1IYYqUKBOOy2yjdUqcQ==","signatures":[{"sig":"MEUCIAYAcvgvWtR1KWk0iukLc+XFpFib9JFexuLzScEzDPjtAiEA/GpQ38z71ruV4SsbxzVfG/JCcES1gWYVUB6veQUWJzY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbxJNCRA9TVsSAnZWagAAqhsQAIRO0TVg1MFdaqbho+E6\nmrgkMkO7NtWmEFRje7q4iGTEblv0yHgaPwWb0A4J+SPRXH+6/6d0sDHiJmmP\nn0Wx1JDTNugBUm/RBpkBim48xusZjMQCzez2qhE7b60soMfNqT0CaPkFEwlf\n6OKdWSyj58sjKhO/0Dqdu60uWur0ObO4IlEFGvKuiRrqK7g9uf0BeTrNqZv1\nYRdWg7mx5gBNv5sfEcw3OzdKMB6a/lAtqTUVbjJjwv2msouk0uGx9rS0GhsF\nhAjslCW2T6XMXlnS7vGIjK4d/rrB2x5FUEFYgHHq9tbajwepgBJscU7H2mei\nLi5RVnrgtipP/I17Pl7ph7/OKXKY4gdQwEb94MsJdL/7Jk9dl5nVEL/xL2Xb\nfzEr95mwy4iW6D8GKtMz1K1GyU/dUAgmK/F33zvFWS4MxXzFVWYNGlfSwQso\nM9Vj1Pg7LArqAiLSZgUbNR01Q3hQhdeLGDvPTthc0r2MDN2WMxrWUFnJHlc5\nhx04CIJfhnoF5zKpgwf6KseIIayRb20Qo6igAtr4srG61DF1ythAsHkR7JNd\ndOic4/lq3BDOes+kRUGwY5Ge+f0MS/UmkGKK4E5+7qyRj5eqxeNtZX30VMFB\n2ZsBPffHA1n0y+Ff1ysOdw7aHQx6NmpyYoWyj3OgfByRDknJEnUAXTXYjlKY\nYWx7\r\n=V6NG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"80ff5e2af390ed8bf97c4bfcd1221d2a855b50a1","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.0","dependencies":{"semver":"^7.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.1.0","typescript":"4.2.3","@types/node":"14.14.37","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.4","karma-webpack":"5.0.0","@opentelemetry/api":"^1.0.0-rc.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.18.2","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.18.3-alpha.10_1617891917361_0.10246831094179143","host":"s3://npm-registry-packages"}},"0.18.3-alpha.11":{"name":"@opentelemetry/core","version":"0.18.3-alpha.11","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.18.3-alpha.11","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"91d0d1a87383b6b17e37ad1fccbda2a875dd393e","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.18.3-alpha.11.tgz","fileCount":126,"integrity":"sha512-PSe6I9y1XJJkxUpszInFwwhM1l0W8UBorgaJruAniHYl4E/nxYs1KwR1qhI7VMomzXq17THfHZ9oSqgAmtK+mQ==","signatures":[{"sig":"MEYCIQD6nMeRs6e5L2yHJNWcwoxF9aDM/Ejksk70JCOfPp8n/QIhAKDHTlvKZw2gYfygx0deUTznhZqbLXiLYen0Ds2NFfk6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":154037,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgb2XZCRA9TVsSAnZWagAAm6IP/2azo2m6dW1B322hsTNq\nQ/aVRuX0g9eEKbXmfIwB0pv31HVZn3iLTtFESKljpzGbUqCrkGXotC5E8G42\nKmXwYSAUTI0q2UparkXUMk0zh+rUv3eDHc6+x7iOnxzu/rbRzUDgyPQ0ubx8\nXKzNpXzCW+/1AvFR9gf91r30mOiBy3LFlIekrS8yIi03UD8vLaTUoG5azy+K\nL+1+nWLNDIiaZzXKHc+3/KVSdBdC5mXhg40wimrtbCq7HbujMxlEBlZOar53\nBenxAaNCljQH9DUrRvMRzHnbrWEjo0io5REEqwOectXAaSh8XaADSzdBd4v0\noJ8b2MzR6nEhSJxkmKgrXQjDC+AMTbtpWEZGQsEHO5t8LbIg9X08TE2hgrB2\nvzg0l4Y9T5Ea3j/FFzdGGDHmwXDqq+ZsOdoMI1DehXZ2/ZJiRrbZMe6SOPBg\n05NF/WCupuV5y1EELQLJPuipBsBRwDgYt0UBWPrRB2YFBDLu2o+0tah3pygN\nFi+GqoxbBI1n03XK3k41vLR79pXc3rEWamPbOiABPHnunBfuwvFyDjXk1Diq\nb5isUNoClYSQBsmlIb6H3ZasKK3171p1+U3J3g9EjgRAfh6OcvM0Q8cdz2wt\n5lsZ0LGMeo++kql/W97qyOt8upjN5FuRBPrmZFGm8kvJpDrZw3fZE1I+j+xe\nL4Gl\r\n=Aokb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"64c8ef57a9fe3b8468f2388ff78687b927ef8965","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.0","dependencies":{"semver":"^7.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.1.0","typescript":"4.2.3","@types/node":"14.14.37","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.4","karma-webpack":"5.0.0","@opentelemetry/api":"^1.0.0-rc.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.18.3-alpha.11+64c8ef57","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.18.3-alpha.11_1617913302493_0.39194048086486144","host":"s3://npm-registry-packages"}},"0.18.3-alpha.14":{"name":"@opentelemetry/core","version":"0.18.3-alpha.14","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.18.3-alpha.14","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"3f806c1cdc04409fc261aac5ff9be5d1ad9d32cd","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.18.3-alpha.14.tgz","fileCount":114,"integrity":"sha512-dvzMu6W9dh5XtAwwMA3MXSHmRvdGPTw0Y+rM9TmnjMDVwDhsP2Uy5PfTm1MKKf7ZMsu0Ciql8Kxts5YWnDU4TQ==","signatures":[{"sig":"MEQCIBgXd1TIzdNG4zHAxOKXfPkb96+tglM7HEqL7XuQor4oAiA1HMP2Rzc7vXrLtzig4qUfvRD/jLemFni4D4Gv4NxjCA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":138446,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcBo6CRA9TVsSAnZWagAAJPkP/2bmGGcw9/uoK3jAMPkd\ntqBd6lNH81VsOu373l9Zw/HsG44vJhU4zoede1/IJzEbxkzlSXvSwn+2cvq3\ncwlbchqm3TR8GhrT4l7U/EqKvv1pRNm0DYi4n/VTU5WL0pwklVZrDJVvlApJ\nEc7iYwtHcQAQEepxAkMARpEfnyX9o/6kxqc/fzJCQESHiCNr35BGboQuEFoq\nzepGnNbjjZsq7BOqG29xDMhYhH+oE8+fXdpBPFyg1Jazbl0Wy7S6pUMqyh7h\nmzDUvWAC6zT1wp/GvBRqta2BRhWK1KNudemnemS9Vewv+fhHV8Lj7teW4N8J\ngiAc5LbXA0FwQYipDMq/WcaY40UQz9NPBZIxBBt3QXm6NhTXpWH3CTjGxsOx\nNjBErxQvT36uNoZYmiJtbn0ru0Mtbeb8EIPtEqAnb1pvv7pEZQJusXPZg2gV\njGKMUOlSbOuiPqwMoIoFNctE3qaMYyn5zwTk9b9+ALiEiZW2xLuwRjkQfIrF\nYZJ5JgwqC6ZTlQiu31zU14DGzeQqYjkKFkByy8PW/pzW8mO6oSb1zL/h+7KU\ni/9JJQrdvyVWXL6P02kr9DfkXEXZO1x7X8ScV8n48m4xK7AQOvHgzbJSbh3W\nKgiKNfS4zPKpQFikJ37KNIT2p4dKN6MlHhegJjYF09KO24Ykm3zqKQSxGne1\nmLHF\r\n=WXb6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"4a3fd1f4d86499e4485c1f1af0f5589de993b0dd","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.0","dependencies":{"semver":"^7.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.1.0","typescript":"4.2.3","@types/node":"14.14.37","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.4","karma-webpack":"5.0.0","@opentelemetry/api":"^1.0.0-rc.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.18.2","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.18.3-alpha.14_1617959481575_0.9589861164068558","host":"s3://npm-registry-packages"}},"0.18.3-alpha.16":{"name":"@opentelemetry/core","version":"0.18.3-alpha.16","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.18.3-alpha.16","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"c1dce9d9dc6435b9146ec85a4e823edd273c6109","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.18.3-alpha.16.tgz","fileCount":114,"integrity":"sha512-2ZGFpVNnJwP3fVJ9kkg8UB9aR2g89r/EoP68FIG93kH5WcwXg23NxwB78LhhWTNyOt5znkW9CabLQB0KjA8MIA==","signatures":[{"sig":"MEQCIBo3q1Ip9oDG1pO8rNO7zrqDR/5DMn7bLUckqnIdoyTJAiBwBY65UVRlWcBVHsXtM6gid0ymgn0IVhyLzom4COeAoA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":138447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcLQICRA9TVsSAnZWagAACg0P/38rZMfR+hsuiznaiCKP\ntO11H1/kH9l7/kdcml8JuCPckxgYZrR5wEjI5shN1AgbT6gDICCJS9PnfGef\nfF+XS9o/5s+AUQIUBvnEJOEz1WsczaWqarWyNpeOx/ZuuOHVbRJ/A4IHNftx\nwH4Vnp2kEOZCQBQsfq/e2mo0+qsdhkZTOGSnhmoIAJygOdREqMBaqQbDQSqh\nbU6IWfY2hNuEvvEH4fjYNGdd8szd7oAKb8lTnpMcv5NGyaFbXwKxYpSoCaXO\n9KBZVbM+Sz5OfUr0vl4Ouv6FX4Oc1sOdUMj+Q20ivf10UZcrFDKFuNH+WK83\nXLbfNIcADfshB+YobmwpQamY8AvV3KRplDQgQnv8wYi1nNJbxc3bwd3ShT5T\nL3w8T7gXQxHCxDZtQ2Vpx7fdVW1inDnUJp96V0OrK+Zlio4TBZk08azsRHk1\nts5rTEMYVn66PyCKS0DZFYMA4JErk6beiQ7VMTSdlahtFAmeYvfIhrW+bpvT\nZGF66xsWh9TZ1Lm3EBFSWQs502inO2s6pE0fLNaApBPYWG0zFLS5Vl5ETpS+\n0JG5rBgwLUZgOly0o08+Fvd2DCVA/S16BnzCOG3DKyttv6TOUvLVKsFEGs3C\nwJy84aoriBRlN9zNPEytm7uVeqdWm3ygAt3Wyeel2PrAX1RDJyNAugJZeIhN\nUuRQ\r\n=V/g1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"7f7afa7bb88edf4a4d46da8b252116d92b578b79","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.0","dependencies":{"semver":"^7.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.1.0","typescript":"4.2.3","@types/node":"14.14.37","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.4","karma-webpack":"5.0.0","@opentelemetry/api":"^1.0.0-rc.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.18.2","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.18.3-alpha.16_1617998856209_0.6382919601797654","host":"s3://npm-registry-packages"}},"0.18.3-alpha.18":{"name":"@opentelemetry/core","version":"0.18.3-alpha.18","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.18.3-alpha.18","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"67cd933f4e9fbf2027f00a886a9621959500eafa","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.18.3-alpha.18.tgz","fileCount":114,"integrity":"sha512-TE4gV9BE8x3lxfODPVcf9JRyUVcxEfYNMR0gmC95ZzhFu64bOlz8CcS+3v4mJYewyOBNHJUlSA8nIGRI9eN39A==","signatures":[{"sig":"MEUCIQD2y0Bf4YhUKLemOTkq+HctECy+unMTqhpG7TRba9cwOwIgTYOp2ZBHZ+rGpMLOMLIXx5xcFmZzR1VRM4kp+mWG1tk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":138619,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcfXdCRA9TVsSAnZWagAAME4P/ioZ1Q+U7lpLBxxRhfrP\nefJcZEEfDuwzAzwdJ1VAdt86yTwBoZadeXVs00YO43sCSKteCP0+aIJwYF/O\nFuzg9AxJAdEeJr2PEalVLXTOGvyaPszcE81WOplAuBeFWAIT7OtK6eM89crw\n8fPvSj/k2vec4KWUd+VTG/H2SmGrDIyQ4Hp/Kx3wsBbtBXk8/uMEeWUYYtNJ\n5J//qe5s9BsvcuNqFkwagpVcPwhZsftk+/86Xhhc0eirtxol9M77HU7oPFyl\nV4DL/CQZw6C6+i+XKLxnEftfdZ7qTc6QUNeVLROIMwo215U8IVclG+jTlOUP\nSVZkKelrwY3gt2LDZbL20eXu3UnLwOmB8LRLe08dYaBQ/9/WOkk+N22g6z9r\nO3u01OHfl6gdv6c7S7NxFviDI4siUsVx55O/fNGdLdQKw/y9BUcPl8xjQ/i/\nNOr0H9V1mfNKrAmdHxag+rl75kZlOf7HV1FLwN9Ouwu3cGrJ9vYahPlVFU97\nmcdoptXqXOET9LZWkpjFZxib5kAeP2Nr3WWpALL1aYNDnXXLSx1SFVH//FGB\n7xJ1ZsF8cgD266Iowd/hWab5uFEsyurWUpYtpiPJ74LTinbM+OtIrRyRxKXr\nY6f5Kc3DxZiW0MLTcFiKz2fJE3gSVjbyoqvxznCRr7NFgqSbdnq4b+c8cPtn\nZa8O\r\n=0o1M\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"9fc1b109e7997b054c7182cc6db4d71d7ce9e5af","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.0","dependencies":{"semver":"^7.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.1.0","typescript":"4.2.3","@types/node":"14.14.37","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.4","karma-webpack":"5.0.0","@opentelemetry/api":"^1.0.0-rc.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.18.2","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.18.3-alpha.18_1618081244987_0.011518460994211832","host":"s3://npm-registry-packages"}},"0.18.3-alpha.20":{"name":"@opentelemetry/core","version":"0.18.3-alpha.20","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.18.3-alpha.20","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"24e76cb982b2ad43d168ffa549c00c8f5a9b098c","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.18.3-alpha.20.tgz","fileCount":114,"integrity":"sha512-1KvG14Mk0o+DPRtDa4wRoP37KxDw5OWII0dOpau7pN6V8a3KeIWZJarRgrsayza872QzvUG9i4gUQzx0Ipl5JA==","signatures":[{"sig":"MEYCIQC6weOk3LTrvOdmHoTEI/M1r2f2osH2owGemPJ33tLOugIhANA7gcxVg7c9wm4sfe6Zk4zzf9kjKkur/ryr0gwiRr3x","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":138619,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdGJtCRA9TVsSAnZWagAAzTwP/iaixfManMZh6nGxZ1le\nXLYb2fh8Ts7/w+ksD7IG5EDGFS/TP/60Voen2YvMCgpJqdX2Wsx8Lyj31/U5\nB8aJ6bJY1N4TfjI2Vwav1x8Ol4fTfQUao/gOqA3AIqlydXK0SmeyscKcO4y7\nL2fgVkloLj/pyg21wQqGv966O5i5ZyBxBAikeqcqUUN7ZqT0Tlvy/oYuSczP\nqm8M2pbiQPHTc9bkprs6Bl8mA3+/mQAyFfshTbXKC6AoBgH4Qo7qUNNKzZE9\nLLW1G9oGHOYlyEA1sx6UVb6xiFm5iqGve97MBDMA9OQLrOP2s0SjkArvH9Le\nZVBykOsRY7ZwrVZUOcMH/KtnnHLqS9yjhn9SIZba7mlIhjmhAwZZUduAmZRD\nyVWRP9uq6yS7fmaindX2HbOvEBsVH640RfGVGIoU11WjhWB/73TfQggq7JgO\nr6Jp1R6qTHlYF6tPrF5l3PrF6n4zmMPAAZ3aoGtf3vyL7dzECoA01qxpSVYA\nhZ6psVHm/xuOSOBLPVVcLKi8ijP0SzYNpVN7p4yF3P/ROAkkDYOfXtu8xfz4\nsiD3Zh3E1OpThafQ870FoQ5EZ1FJohUk/Jhyn6kCR9Zsz6Q4Js4iyTfnO3ad\nSdAnCVaC2Lj1TPihrS/+bVnzGZHdf48PstjlvNTMWClG7lx71xXLpINGNTtz\nPnqX\r\n=EBda\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"b6dfd978513eb400a706928e604b625961ea7062","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.0","dependencies":{"semver":"^7.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.1.0","typescript":"4.2.3","@types/node":"14.14.37","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.4","karma-webpack":"5.0.0","@opentelemetry/api":"^1.0.0-rc.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.18.2","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.18.3-alpha.20_1618240108577_0.07292686756410927","host":"s3://npm-registry-packages"}},"0.18.3-alpha.23":{"name":"@opentelemetry/core","version":"0.18.3-alpha.23","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.18.3-alpha.23","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"2bf25858a75e17899e0bd3086a51ffd4b0eae684","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.18.3-alpha.23.tgz","fileCount":114,"integrity":"sha512-I0AIp3YH2oRrOX7eBLHssopHwl1AypG75FqhjU7xqEBU8NeIlmllR6tGpaokU5pEz9LWfe0HHb1LJF7PIPML7A==","signatures":[{"sig":"MEYCIQDeAh5AOnBby3wMvkf/mxggTiC5CrOrDxT4GvXnnGzhUgIhAJUJD/9ppJ8NVr8v721b+eiUs/lm61ilyLfQdhbQcxf+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":138616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdI2bCRA9TVsSAnZWagAAyMgP/jH5Sg4MFJL296sYk9Jq\nA+jAW1hIRxuFQDoYzkvjGT6dfazyOTCGiv02ruFqzoRj6KQh3fTnXo9OuzxJ\nYMOflDa7tfbl+NXbA+TFC/lkmXe7Ggr7NJraeUG230eQxD7Ih34A5H2TBmdr\nBmupDka87AdfkKPtEpoAB331C7mpufxn+io74etzJmtT2aP04FprmVsf85Ee\nRKG1yhAaZMqPyZ2YfM3XC4m0wyKoPXiw65+gH4sKQvJJMm4WKj0fJyPaO3Vn\nFOpgWCSPDvivDipyGHOI4iDxrds+1ij+GFOAFIu9fwfIb/dErD25Uvk1xN6N\nBoqX4QPnGwexq/5emm1eoO1BjnalRnbD9j/qHxstuQGZKEtCmDfBHN0aW6Sk\n+leKMHr3ydYVQH1evAiRGHlkX+tjvu4rRDUs+M7sMYrH6uy/jwYtDYsd7ZF+\nTJoz/tl/Clm4GclX3zOGJ8v36h3PrlOXoBO7s6UiPZNdC37U5KIvC2JEs3wn\n45jGQWJuIox6kqJJw3BNFZ1hPWuMeuen9mgfnS15dbRQHjDT+y5p5O5bj10o\n0Y01Cj43QtQ80Y2eH72S6t2huYuiGS7ypw4gkJX0eQteHCdsxs/+LHh/r0Cw\nz1gKfp10yzJgW4PFXBgsZuhyQKcrhaV6OC2C8q0Wbwtt+9Hhzp9TxDQSUZ+f\nRbh+\r\n=gSzt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"2260dd6594bd007f886e7985bbedba1d655a6d3f","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.0","dependencies":{"semver":"^7.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.1.0","typescript":"4.2.3","@types/node":"14.14.37","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.4","karma-webpack":"5.0.0","@opentelemetry/api":"^1.0.0-rc.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.18.2","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.18.3-alpha.23_1618251163061_0.06775925701200403","host":"s3://npm-registry-packages"}},"0.18.3-alpha.25":{"name":"@opentelemetry/core","version":"0.18.3-alpha.25","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.18.3-alpha.25","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"f6a4eee1b472be14b44070da44f98d3d305a7894","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.18.3-alpha.25.tgz","fileCount":114,"integrity":"sha512-ymRth6fygFytrY1t60YXpqlN5pUWJNhnEhGWqCPOxC6i2h6EyYbFzFPqzqniMnmuRdcp5H9BuQ8LuFEWJXdhwg==","signatures":[{"sig":"MEQCIE7o64LvuSnPhZJBa721/mIPkAbfvDemEASqbGaC7chkAiB6RIpWCkz+z95LgyoBzeOCWFbgRrLic70ljAOgaHW8bA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":138634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdKKbCRA9TVsSAnZWagAAkwAP/i+nuaD4rp4E5KXX4meR\nBcOfn7BjmmIVHo6RfF+l0Kg/NgmbfQAt0OPQz7YRFG3qmtL9euLLG0lSbOM8\ntFRf+snmM/6qxmNA8kORi25UllTpGmwMLLUowdhNJAD/rhbMxZkfrVI/zwBA\ndxB9XO32GuWGvsFi4kQCF3MmE6ayT7W6sWglEh2wRueniBBVfoC2FATdxtLz\ndnskkGHaxIF1ruRLJas5FjAxq7oiApXoxgikWMKaj19S82dLXl4S07LHcs2f\nsyfno2kwuKYWUDchOiT0Kx9Y7gsdcYQmdIwLvbzH2v2WhQrcnPqCnNlX7K6F\nezyl2sWWF1T27uUUGd0bDHF8++ZmGw2O6qimx/Pw9jgBm9ElsKWZTuqqCt/n\nrm1rvWOflYs1nyAFlG4oKgDgh1WKkFNj5R6eRBTY+3PxGyWN4wvj2P8MwxiS\nvf0RoGlMaus+i/7PqfEBEm0/UfpWv+oUcwx5RVQD+zkJFMIy6/VGGSX4af96\nsguUILAHaTzXHDHxgakURdIUzE0YABApmR+rqIeIdw/juM8U0RsGAneMpOOI\nFAWpdOpkqt1jeDWmoua69j0lrp18BP0Vg8j82CSAflBY/uYm6gtlMG2QxkAr\nA5DeTcAhNVuro0xgUPS5m58J2Nvc5mfLsIxemY4l/7icZ9NUVP1MNAd6wqkn\n0YBv\r\n=vp5j\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"4ef22cae74b9c976f969151ebcc3ae3d931cf9c6","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.0","dependencies":{"semver":"^7.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.1.0","typescript":"4.2.4","@types/node":"14.14.37","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.4","karma-webpack":"5.0.0","@opentelemetry/api":"^1.0.0-rc.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.18.3-alpha.25+4ef22cae","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.18.3-alpha.25_1618256539409_0.09334776609851847","host":"s3://npm-registry-packages"}},"0.18.3-alpha.28":{"name":"@opentelemetry/core","version":"0.18.3-alpha.28","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.18.3-alpha.28","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"45bbaacbe3f34e54c1331acfdd9991a5a5b7baa1","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.18.3-alpha.28.tgz","fileCount":114,"integrity":"sha512-EWa8o7tctDBTf5Tqz7ac60PQrYPhIyhT4b1uMJ8v3IoG/1cffagiMs+GiwZBuQED740jCKzgoFnMz5lj0JZQBw==","signatures":[{"sig":"MEUCIQDSuDCPr6QuOb+yL3Kq4U4jD0yAmxnVyX2/ySDTewJ4AgIgK99eyfumEAeipTJWlwFGhd0Bj6lH2z5EuM1Mm2q1qGw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":138758,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdp8ICRA9TVsSAnZWagAAJuoQAKIW84UBVyX1wB+GDKEG\nDdl17POc1cUh/C6VfkpnVUUL2vv6KvGKN2QU5rjwP0RrxknnCcnQxk4CpyOs\n55GxrGtedJdVtXhPJty2SHtLTWrf9sUbVzqreZkLo92rKjEbnlWyhseTVxOc\n34/hAKWYUjB6A+Vy6zSsW2AMlGB60pjSWEPT/O+zXRDEJl02ZLYnPwL7xzX8\nRoJF32MxmIVcxNPqHmmrmITyPwPk9UdVekblf1g9Cto+rrm1/lIIv/qO2fDx\nW/0Ld27127LFR87QFTKLMlm8uVtgQYwwiIgm1uJoSKMHAZEGycVxmUvnjukb\nkqUwyBWL1bfUszyFCTVjSWQAdDkYQtGO2zHGsnfeQ1OSImjiIfQDodT38US7\ndyxo1zc5nhGXvO68d9J9ftmFZ2kvwANQGwzNVkdT6BOfMNvpGqhQhhqKYqe0\nHRrKv1COeNMBAJpF7WR+pHNwz9h0CjYS830/y7aCzGFGTgZpyxz4ZvWwuHt4\nTL8aoWjmqFS+gRvApzELMnJli7I/bWGATRdUy3tC9Ej/Ig945/mgq8po1OQc\nKVWNAI3HlJLCb2aVqaCsYLDXAqL6JTLntUwVar5vcX5lnM1vfgECfKNpv3cp\n9gCJlt/szEArziQDONBOC0UNAqlt9ZufU+V4D/HIC9Ku9Fq7yk/yFHWsUxri\nEdUw\r\n=W84T\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"181f11ecc761b75a2702ecf4a6b017f5fb9a8445","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.0","dependencies":{"semver":"^7.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.1.0","typescript":"4.2.4","@types/node":"14.14.37","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.4","karma-webpack":"5.0.0","@opentelemetry/api":"^1.0.0-rc.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.18.2","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.18.3-alpha.28_1618386695928_0.7370230737374548","host":"s3://npm-registry-packages"}},"0.18.3-alpha.31":{"name":"@opentelemetry/core","version":"0.18.3-alpha.31","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.18.3-alpha.31","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"ca2408cf78e736062d6c1799991e78be6717e35e","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.18.3-alpha.31.tgz","fileCount":117,"integrity":"sha512-qzG63ix08fu6ZeEdoF5R0dRwkRjrhK8sLwxvYya9wle29qE7XQ9SqnXANcAMyT/yVhBj6PY4k54GmgaH1ZZ85A==","signatures":[{"sig":"MEQCIA4cEzVAtWHYAUeDYtosppqve7RfRHnH5z+qLN3NOlsbAiAg9T9dRUKgq23Odf8Udqi02LzrkNOxxqLGL++gkI8sBw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":140770,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfvfVCRA9TVsSAnZWagAA9QoP/24GSKxLB1WshO8ymxH1\nu7LuhWXOSGP1dFZnv/TQxmNyNC9zGaRQA2WOWg5zuxEeZxFOekpnkGzwPjUy\nxZIHcuDUfUdyj4YcHCD3Vecx1LYqy7rnaE/lSqLT8+5SPT451fQzusIvjbLN\n1Peep7MzJEBWFUf9QGV5oUhwS2mn+H/FLJV13UrSjxdJZtH1opa+lC11BA5+\nDSXedvdfS2Ldq8Hlum7717rE5OVb/ylK3nNIWT8VAjxDQ9omaxSYrekQfyec\ndvo097XHiOwzpP5v/egvkuqoMQ15SBtVdEEBdoINxpleFh7vsEP+lvli8J5U\n9Rk0YfbsaL4xS7TR1pzXR2qcAfb5ERN+m5X2xSDmk2oBPUSep62uXWU4aJ9U\nvAAlLxPLFKVKuPY8zI55cJa1w8G9xvk2u2FL1vfQE50c7nZUi3ql2DQsPa9+\nq8hplxMmVxnECQdM4m47HKWQPkb56PXNRGUkEqtwNCiDYHzQddwVDlOVc4vn\nrFrIy106qS1NxNphS+hkE+O84NjNZKpKo6H9gpD0q6F3KseXll/2rzf42z3Q\nhR1P9dwLQL+wHSJGv6ABYvdJiURSeMTXmfu6QVdr7fycMvjr1oglh2A9dFK2\nZjYYwiugc7EbnkRQXsMgunyfCs2OEGTyhjxUfIl/U5u+kOira09plwPUlgVe\no31Y\r\n=EBSh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"d268bc6a8af633ed6803626096b124a269f7b24b","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.1","dependencies":{"semver":"^7.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.1.0","typescript":"4.2.4","@types/node":"14.14.37","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.4","karma-webpack":"5.0.0","@opentelemetry/api":"^1.0.0-rc.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.18.2","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.18.3-alpha.31_1618933717110_0.3223465484401806","host":"s3://npm-registry-packages"}},"0.19.1-alpha.36":{"name":"@opentelemetry/core","version":"0.19.1-alpha.36","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.19.1-alpha.36","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"99c50a6eb702092718629cca53959ef4dcf97cc7","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.19.1-alpha.36.tgz","fileCount":117,"integrity":"sha512-wwqkyTxngXvE8g/2B/Ib0cU30umLSy84qrQFMjR+L8spCce8/lZdCa7Dwpcb99NoPf94o2dcP11MgdaEXRjNjw==","signatures":[{"sig":"MEUCIC0yChJG/+XzgWEFrdOdz00/8fm5nA9TxT0Q0SRx4uThAiEAw8h4xoholptH3t4G/kAsMHCtcPJ4V5Qza9EBjCglOGo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":140788,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggWnYCRA9TVsSAnZWagAATMoP/A13aOXQV03kiEHh4Eg7\nUml8M5WGjmt0fX5/ijkfi25WLkVSGGkywBjGBn/cuHdCWmsDx3YtLSDVT3zq\n99j1dSWNeb8u9GDWpOKLqPa2BYuyiKIgSSkjVM17giSyriO/S4ER7b3GGp/R\nC5mJlbghQIzRczkhs3otyW8vk06h5OZTTWD202pBqxm4SICUI1ixFxjEkHHZ\n+2EeCNDmtrcZuXFmdWOi7h3NCQp/mFn0+TEBeBfPxiI7mUZ5KgeSwJO0q9OS\nPIui4IqBxWAE0XCwaetlUwZ8hZgdahSammAwS89N7oobFc3ML/8W6Ara01BL\nOxWSegVu7rLWw9iEjXRd7Xxk8u4BPHlVdsye4vshS2yyxxo7AhSJo3S3LnD0\nQ8cu1B2pPVVkNMyplAn9caY4S//tDdXz3eYqYmiM0wcsGeBxp6JD7E34L5yf\nz2XfjACzUtWAGSRYN+nWesERAO8Wsx3h7eyEIVJ3GblXrEYxib1pGZCypa+R\nlNBgi0UXkG/7m1/Fsq1a5S0pgkzDuig8nYGlCwlMbvT0HgFMFj7KAknh7jKA\nKFp6NNDB/ARH/lgM3ZmJuznCPZMGdUE3xbOwPECp+uf92XxNtmowayiYcQd8\nhCdIm9QC6C8NTbrDgGx0OPPg6YWW6rG5+u39mKgNN8BzBIA0lZALclmXBtlz\n+Rzh\r\n=F+cb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"0c15999dccd377294a03cf7d36085216d6e8c5c1","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.1","dependencies":{"semver":"^7.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.1.0","typescript":"4.2.4","@types/node":"14.14.37","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.4","karma-webpack":"5.0.0","@opentelemetry/api":"^1.0.0-rc.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.19.1-alpha.36+0c15999d","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.19.1-alpha.36_1619093975934_0.22948290350465794","host":"s3://npm-registry-packages"}},"0.19.0":{"name":"@opentelemetry/core","version":"0.19.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.19.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"5018e16d1d3081da0657476e58d9c2dce7c511a2","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.19.0.tgz","fileCount":117,"integrity":"sha512-t83FleVbHH6SWdUegclZbsnHn0OaHjq17Hd1zsJIRMM6WNuVzbXWA+3V6LCKXqUYyu3qwtZ/w45u/Nqfr5mEeQ==","signatures":[{"sig":"MEUCIQDfgHRDrwwv8/wOMIlqassTdfdYwwdFRnHaXECME6Z2IwIgQtO4V7Gg9VW6IiQit52ADMh7Gr6dnKAVTaYtvpKdwBY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":140751,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggWv5CRA9TVsSAnZWagAArSkQAJNg/pBD2m8zpbPt0OZq\nZPigpeWiVW0IAtEdIa5TrX9Wq8LTnNQcVhwsLbjo8Mp/M9vh5mN6FtWy3yNC\nCl2/uH9/JR+cWjeR+iuczLQkMKhWJ4mFucybXfOJevFOLpj5Rw+Krt48DCkq\nRcpjixeIqh/ImcE+wjoenilhyFlAlVmPf2jMeh2dtNWL8nLslXqVSTnCAbP0\n0le0Uh8w7oCB0aCIPFF61KwZ+LjQrdYxMvNKBRnP5AAEidmaQQPnaoRyan4w\n2tWDiH24PSfAB8DOCAMeWGpj96Cgm6NyMMSwHIMJqka5Diaage0lJYQftMiC\nerBY1PCNZwIICFk7VuF6t94n9EHu6kvZm0SDxqwEICNVou4sAF3Q6GQITESb\nzbEIeyBdpadHpQ+W2LEvPwt6YuH8h3lcozuyNLvj/XVQrz2hm6S0DP/6W5mi\nBo7rIHWPB2CJOefGUxhyuvX+brBvp3C2MzrFxfkRPnTBhHxTJsjxVpA3fnH0\nmtAL/iECdgoOIdQFygRhensPKoVcTDPL5FBbt4ip1OjTmA39SyXYT0FxPMAd\nqV46CbJ8cZ8X0sUIAsC3WrbPtGMUdfc7Tkn5IBauzw0hoDfQl04eFKJLU94S\nUFcDanUWdtpOFlj6NEsq584Fbs3B7QfcmG4SF9soq6pcWxCF2LKnBbuybb5k\n5JgI\r\n=KOE/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"0c15999dccd377294a03cf7d36085216d6e8c5c1","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.8.0","dependencies":{"semver":"^7.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.1.0","typescript":"4.2.4","@types/node":"14.14.37","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.4","karma-webpack":"5.0.0","@opentelemetry/api":"^1.0.0-rc.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"0.19.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.19.0_1619094521188_0.6437134581685529","host":"s3://npm-registry-packages"}},"0.19.1-alpha.37":{"name":"@opentelemetry/core","version":"0.19.1-alpha.37","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.19.1-alpha.37","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"d87c0becacab99fe7c058e3737acf622f387785c","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.19.1-alpha.37.tgz","fileCount":117,"integrity":"sha512-hg+D0qlr3oQelonn0FksHcU72YulKSEtta+6Awey3aUr9i2+ZwuFcPk3abnVhhD83dehv0wUdfbid4ZWiOB6dg==","signatures":[{"sig":"MEUCIQDahTZLX5N/YNWNtx4TnCdFRqOvJ9JZrHdDpvgoaw40xAIgXmDDTqZ7tFERujwJ99wP5dm/mT4tL44OKxjeQRICey0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":140788,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggb1OCRA9TVsSAnZWagAAOxQP/R4OFuPs+wqC95h35HhB\n4+rXcWnXPRhEpne4DNL3VAdLZ+mqExJ768SMm2KmA9bd6ORvK1rwKK3O5EHM\ny0g2NjcsTvRFw1m/SlnTJcj4hK8I5ZnDWvtA5iwTx+scaBvqFzUnp0kddrWc\nP3cMnXCPG12cf/HudoRG1yPOPlgrYcex2UYb2wgDvsY2IfK064LAgu3ULUR4\n7W6vCCOdx4zyFLptj6Jaz1kW2eyjKDrDRRrja0Y5WXPEvND2Th0zphaL7kng\nF1EP73uZG/jyDwbcyY5OfUQS62ybOJKIFDxZ8WbL2G9KlyhhsSN1qmWDowJZ\nJb2C8lNNhi28m0mLEHocq4XmBd4/MtREahkq5GcOZnaNLo8Uw+JoD7Ld1y+o\nEcSa5MCcL7Y6+xjPflSFla+etRrBkWVuWKFrbnyx66ZH2ZJihzIBpuftepK4\nKgK3KDmcWy69MRDvtW+3nZKHpnrYzgqbdqw9a6o7ImW/AGAuz55nOdUs8Uer\nbgDIAZTfDLIbQDNU0NKShR1ma2G/b4YqCC/HdYnN7F1x3R57xeitSlrioGCo\nZQFuq1usPtGNFIdkCpWAZvGAGEsq99USakPCUvg5g1oGpUSt+40TBr0NO/Hv\nzi4XcrxKKmzt668UF4t3iByCXzmdGsx7M01UaREpo2BSx5AGQqkAkS/ECo6Z\nn1MB\r\n=Aw8C\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"a0385c45376a86d396cb364feda2b4afebd836d1","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.1","dependencies":{"semver":"^7.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.1.0","typescript":"4.2.4","@types/node":"14.14.41","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.4","karma-webpack":"5.0.0","@opentelemetry/api":"^1.0.0-rc.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.19.1-alpha.37+a0385c45","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.19.1-alpha.37_1619115341934_0.48010496402970526","host":"s3://npm-registry-packages"}},"0.19.1-alpha.39":{"name":"@opentelemetry/core","version":"0.19.1-alpha.39","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.19.1-alpha.39","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"ba2b4df61d6b506067c34c5a6eb8447573fa6dba","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.19.1-alpha.39.tgz","fileCount":231,"integrity":"sha512-cGuvnHDUd5aIhAvuKGfZqmSUvORI1EQ2C6y4CoaJhiO4YKuX3uK1ienkhztZsszR3k2Bz9uyYyE61ZsbmPDtVw==","signatures":[{"sig":"MEQCIGgl08eACsBBmsr8aSAG9hFk/SI6ea0cj/7ByzIGxtRXAiAFTB4xuTHdEjJIQHVdon3fTnzzXWQMuE9wXltHWLIvDg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":256655,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggcQlCRA9TVsSAnZWagAA7/sP/ifvuBS4PrHDpXgGisja\nYfDNgu7pzu4Q5oNCCadeDqj5U3jZq1Egg/TVgbtzyoNs2so04R6mPa8z+34o\nOW/MvTocGtNK66RAs8asvHyuu3zUVntmC0vM1XIw2XCmToiadoqDWBS5h+UN\n/Cpe7G9EY3rR5qskSjA97HPnQsU9j/hsuc/fkD7rgawCaJprcUerwzzm9VPH\nvJ8ZhnET+mXxp1F7QVG67j0ldBGHPOYpW8H/BeuTPLJxP7CSd0ckx1CYrI0F\nAeRi3pIV7lqfAYjMg0t7Ue8Z70In++8AhsJ3zpurwTGCLIt/z32Vi+sMrihY\n5ZDk+m+q/ZNqJXcexcX38gg2yxASN7M6VZBn20M2AWfeMoyZ9PUbn5fKK84o\nlFDNirhHT3mrq81Mlip2zSjyByp8SiFzhODQhYQVLt2a8XRdRgg7qzkSjDWL\nKBy81FcAyaDxG8PnetzyMgG6i290YzqFpq1nytuhVAEKdAf1b3fb0gKU8tjM\nFscs2VFFGxRDASEobNrF2VJWZ4xd+MOgjQOJzweZZDDmAtdWB2CRbFWqJFjD\n7ZlCZByDXKE28OESXnpNw2e2P7elOpV+C9FJ49xrmO9iKYlkX6hxRPsx44Gf\nxg/eDoJRbnxufcEfIZYsd7gHk1hMi07FkZcQ1lNIgqBJSw/lKEsFGJYJIo2I\nMagh\r\n=B7ml\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"23ba4bfdc77c8bf594bf0c817320a31f59ca0bd4","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.1","dependencies":{"semver":"^7.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.1.0","typescript":"4.2.4","@types/node":"14.14.41","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.4","karma-webpack":"5.0.0","@opentelemetry/api":"^1.0.0-rc.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.19.1-alpha.39+23ba4bfd","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.19.1-alpha.39_1619117092971_0.4560344206426612","host":"s3://npm-registry-packages"}},"0.19.1-alpha.7":{"name":"@opentelemetry/core","version":"0.19.1-alpha.7","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.19.1-alpha.7","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"b926b8af51fae5f23207ce0a2ace05bbde9815bc","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.19.1-alpha.7.tgz","fileCount":231,"integrity":"sha512-7nmli5ccWf/aOUnyXn/Y2uv6LkMyLYl4MabjSd1cFPgOcWVN7HpdfhIrFdJ1VM4J0wT9DFgCsUhR5Flj2ElmIw==","signatures":[{"sig":"MEUCIBILCbZYKwT8pU+HExZD7LUV4FQZiqTlpa0OjNMFakwVAiEAkBTow68iLrzwFwMOf7dO/IH8Lji3BtzeB04cpOJMsCA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":256815,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiYm1CRA9TVsSAnZWagAA2jcP/R0fSS0fFGF97Zma6Tnd\nxQkzZuHFMpwe5jG1n+dzZKyzDMsPknOqkLDR2HjmkQpfmg8XpcchrBfA/skJ\nVY9AtBrV4GtDSCCde3unzCho4eTYEmqq+2kgPzgA43IuE2197CMBnCoqw734\n11/T6BLOdgqCA2LfoR9ZzrcDUXL2sxDW9nO/hcTCimBytu8etcOKXEOV/wXb\nDNvVsUNo90XzGBcQZW/An2aUaRK2GORWKeyAJE8keHgwBoKnBmsRaLIqF9Fb\n5vTXf3kJitBNjkMNtz/yFnOkAbbtlO5ePpUR9vH4qXb04W4rBORXAgGmeOiI\nL08hooz9yCcUk0NWEsHaGBZz0IFhYa+qCmL0Bem7rjXzzRZZHLxps2d/bIX5\n6Z9hTtY09p855f5QN5BL6y3TMRqmWHPA4ERF8OmehE51pO0fgP92i2LZPWcq\n7lLagIl2iJn+hDQQwLfuQQCmO0Fl2XfPtzXwXJMxYXmhF1bqej+0tljNCEz2\nk3G7Hywjk/Bv4hhsZmbdOUYo7Gll13oNBOD18ZfDexQCklqKi6RSRGGKzAT6\neNwlRqMypfWK/QL1/wKaRL2qlxPS4RLO2lNIcqm+O3DJn9xjQBTMmftGSmzs\n/F8t3IdRg14GaU5EpmsMhqxMHXyngwfy5A+1FKqqYlWJXQyPVHhWSbnlWqrI\nDrF2\r\n=Hk8a\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"c4341c39dfcdaaa65a5d6ad8eb745b656d865177","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.1","dependencies":{"semver":"^7.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.1.0","typescript":"4.2.4","@types/node":"14.14.41","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.4","karma-webpack":"5.0.0","@opentelemetry/api":"^1.0.0-rc.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.19.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.19.1-alpha.7_1619626420797_0.3412456397331822","host":"s3://npm-registry-packages"}},"0.19.1-alpha.9":{"name":"@opentelemetry/core","version":"0.19.1-alpha.9","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.19.1-alpha.9","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"298052298ea5ce89d57b82c53644b5980b885175","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.19.1-alpha.9.tgz","fileCount":225,"integrity":"sha512-vPHTT5eFBeKwvxoNLFRy2rYM1KABwTLrwQ8l/dYk4/V8HfUIB1uiMp9vWh3j7uR0bLr0YIFUmuFnDd2a0pS4mw==","signatures":[{"sig":"MEYCIQCaZInVuAvHpj1+58sTo4RIOGHd7hyJr5bmh5yyGLetmAIhANxRFie1VLoYOjYDuID1fCizR74Z/YUzoecT+mKm9AqH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254454,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgimuUCRA9TVsSAnZWagAA3Y8P/24Irgt2OWcp6PjuZ9wO\nxMoUrDeoPsN5tRCtvBXeZq2Bn62g0cB0pVoftiATsA7I2sttzLjpnTUIMWx9\nobVuqsBWKBSU6F98LoYujdUwxHuN7kumPptWV67VT41t+vXlxk9a3PQkdEtZ\n/+JMOOBSf2adu2cvRYL4q9olF4rjp5dxLjmoRZvMC/vPcOUrsY0vW32TIvt0\nbfE7nhXtZZWix3h7LymXfnbQl3skhcUhre0R7MhbH28zVkna7jSTcWdt9CIB\n8dkSzZJJIgBHTIcIH2kdtXyzMSFOukCRD97P6HMPPyjxt8c4bTHi1jfLubYy\nDLW0tJCihyLn3RNHF6exIzgfOnskq9FDDUupLZX5iEFIMpa3aAc2/ykJnhmV\nEIC+T4wzyCb4nfefXhSGFBHaSYYoX+oS6Nfplaauv1SWtbX693Q4lfqMvWmW\nUJuekOMXky9QUTISR9YJv5ofraobqN3fybvTYbV9zab61dRpUqrxCAf0yH/d\nXsrEAjFKrqdqICrEhUmlQ3Qe487No6sNZE8UPXMnYHIqa3kdehiXQb0OkghM\n9hOqJftMnNeS2L+oQiZR485nq3+n7+X5FyPzXxrh1rHWBj9ZIPRRrs247JKz\nhVZzcu6Ke+wPDnF+5pYMQG/VbwT3GIrqY8C6b797DOSUp2Q7g34gi03ikGNy\nJzI/\r\n=+Yqb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"677727b2da55ad1decf399f3584ef92dd5fea239","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.1","dependencies":{"semver":"^7.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.1.0","typescript":"4.2.4","@types/node":"14.14.41","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.4","karma-webpack":"5.0.0","@opentelemetry/api":"^1.0.0-rc.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.19.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.19.1-alpha.9_1619684244463_0.24340234913740177","host":"s3://npm-registry-packages"}},"0.19.1-alpha.11":{"name":"@opentelemetry/core","version":"0.19.1-alpha.11","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.19.1-alpha.11","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"fc9197f31890508d4cf8e3adfd0304e18da5902c","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.19.1-alpha.11.tgz","fileCount":225,"integrity":"sha512-xTpusXgoah/gMKuggGDjXTvscGuaz/oJbJj2fcmsDm1XurKOA29nOJvbAWizZFTzHkvtRjBHLXMI3uZIbfkKyQ==","signatures":[{"sig":"MEUCIC5zTOqHzeOIbW4MJHUvtp3HUxA+YcLshUA6k+WMq0/bAiEAsfF18BgRh8Rqey2XDN7uOMIEw6zZTlkKbd/CYlqfUnI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254473,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgix/wCRA9TVsSAnZWagAAzhIQAIwlQlbyZgSFVKKsQ0lZ\nrqu/5kx/jb8/S9pRfywgvYHOv4tdCXQiOm/FVyT8WCSKzr4Lc8otPab9iuyH\ncrmfLfjuRQ3DJJ8hL/gU1dVx99VgxPgVAr6pznMnAppfBn50dJSMMTWYtL+C\nYQhOzfi0sRTP7jw2saRoA/rPWNBQ8p4jc1hY2wbwcergUZ6Nx50yQg/X2WvJ\nE3nO/Oia73rOKQDVZiWkKtr8rOzSSNAIJRfH9U//FbViFKolyp2a2Rf1rmO0\nd6DRh7GT5aYw+XREJT7TqB6JQ8h52FF+sgifQq9Vcrt1ESk7QxZRXoI1XQGq\nTsSJSjIibgDK4w4C+3le4d6DyGANRAeSxPqduHQa/3TrrMCt7nKEQe46RoFi\n5BlENNYcEOW9UKTYAFmwBGk7L6fRvesGxhTiHA4jiJPQV0XNGXR66ZNMhjJZ\n3CCdzyI27XySW/F6aymZ94cpOw3FxmuuFt/8UHHJ/plKyUVH+C++V16dsGw3\nHQCP128my+Kkin8je8xGZLPBNjE6queyXkVmYuG3gwuZAFkScuKHBaV4R4OF\n4/uhTFc2suuGBpEabPTtIQOHa9p9k8aZ15EBS9drPNMtBXEYzIF6+v0GZ/c0\nU3dhRCPwk822+TjsMkdet4i5/O1BIFZlRmCdCSG0nRHqmiNyxl8r7mvXMKzg\nZS6I\r\n=4fBM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"2afcc7c90d93bac4fa9180f4fd312ed01370b2b5","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.1","dependencies":{"semver":"^7.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","typescript":"4.2.4","@types/node":"14.14.43","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.5","karma-webpack":"5.0.0","@opentelemetry/api":"^1.0.0-rc.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.19.1-alpha.11+2afcc7c9","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.19.1-alpha.11_1619730416436_0.2454264405174058","host":"s3://npm-registry-packages"}},"0.19.1-alpha.12":{"name":"@opentelemetry/core","version":"0.19.1-alpha.12","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.19.1-alpha.12","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"756aa8a65ef88ff8ec0f4bf07757049ac20066b9","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.19.1-alpha.12.tgz","fileCount":225,"integrity":"sha512-4pri+wfgZ4W3SH95j/vi+iK1obY1c7359B7xXxg50X33ecs9Ct9gYceNLNPl0dwHeqxNTO1VixP6tiRwdMc+ww==","signatures":[{"sig":"MEUCIQC7QMVyGipEGqwT+/WzPfj9mGPiARd90gnX0C9MhICbOwIgCG53jrYVGMJK42P2qF4vxHKVg/g/xywRhdnfzu58huU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255047,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjG1lCRA9TVsSAnZWagAA+G0P/0kPZaBhO0E1olrE68+r\nLyajEJnXg1DC4Lkf8aS23yhulGx870V5VoNs1WV+7WpnKqxiAdJdMs+3/4UL\ndoZqjuJslpWC4oKR3F2QKFEcjOkFeXqVCJ9bnfD55wDAUr2ZX5pvJYMydvua\nvQNXhU9AJLEloGSy6LaaFmkSW+4OocrKL0FN8N8SXXsO+3HPYU7jx28W96Z6\n2kbEU0Bb7suDbkajUxbtvRWn+nvHOauRcLwyKGK3Q6jCQLY7GoLMXvyijZ/M\nsxmpocnQOxIgWIgXV6UvjO5tBJhQcopZxl0JwXhUCRUDQNsAyzLUJ2ptyyL0\ndI+aTGGS5ZaK1Kyl8zQDNjnU64JOAWibLzw95MwR6XCNHX88ANY5EifZ7d41\nRThrSxNJQQinTHadTVGr4kYmmzFd7d1HuahQIWAr3gOJlotO2tE/nCEET5Zb\nhzD+2Sqiq+cdsBbLmg6vKMRUL8eJXVOdOJQScLtP6xVROKz2tdjBAr8TPexX\nZfPnEd4SzrahtIoJ9yjLyK/rrQlsRUIFwiSTy5k41GISiC77c9xPTcsQXehV\npCJVpKnF21oPaXyVJec9S8YZT5iOKrOjX7gq2bkHjhLyrUNR70CMnkVmpmei\naeIPUovAb80AnA2DmWyreE8ZQCb/wi3drp155yrAMFJvACrnPyL8J2h/HXEk\n5wE2\r\n=ZToj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"25c205aaffb6707d4275be6bade3e078e50e2df3","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.1","dependencies":{"semver":"^7.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","typescript":"4.2.4","@types/node":"14.14.43","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.5","karma-webpack":"5.0.0","@opentelemetry/api":"^1.0.0-rc.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.19.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.19.1-alpha.12_1619815780664_0.05053526589844881","host":"s3://npm-registry-packages"}},"0.19.1-alpha.19":{"name":"@opentelemetry/core","version":"0.19.1-alpha.19","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.19.1-alpha.19","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"e1bad893b86283b5f27461a870110c5ff5ffe2cb","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.19.1-alpha.19.tgz","fileCount":225,"integrity":"sha512-NXAP+hP4mCiZs4vbpTF5fMMJMpKEchE6H3ooh42gC60VCkWI8ZmGq8E+IgYNBKi8gJrRUAe1CX8dy+RDdzu95A==","signatures":[{"sig":"MEQCICWyzsibknIFvipmzUAjW8TILPFco9umXJYlApPsSrQYAiBzA7vppXIp8xrww3E0Q75AeBbpha9EiSH2Mp+skVuGyg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":256723,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglkOKCRA9TVsSAnZWagAAetwP+QAJemv9PA6AWPNjwRO0\nqJdGIYeWGZ6p/qfoW/JLZdyuvf5Nv1G2BTsNeEm027VZftm/kHHB75Cnz8nx\nYCYparUH4EC3Yx+xxu6RAmZsJwBou+aM+dXyHlmShzbXwfxcfUYw0qxG0paR\nYVdjLc3dTVymjse7tqd74DfZIjsm8ou4YNAHX2iqgmz1hwOtzs/s8QUBkmtQ\nOZ83j1HMaU7mzD1w0aIlBuVvGdzvLQxvmMCWZ56v4MdgZZJrlalTcX5pF6ir\nIBZco++BUXmQyPYGQ6mOzAUo01Dhxm8WMVWuxzXnhlOYEIW6A13wN2pSo4tW\nQSP4LTOXQZtmm/lhoqAxW8YTYWKfd2Hr7cgWt7nQRJAfkd7KebnJ/mp7Yrre\n3guIMhLsRGxfe/5OnTl2YayxtNH9H+oalh32c2isqNoxH2x7+MIz86VGDl4g\nB9WerYtJPgYAHisJhKP+qMMO1Lo1LT5LC3EiYgFP3IfhEQiFwr4IdhXYM0zD\nxW/pzXvfXo8xE1zQ3jw/sMQ/Ou4aqBm6Io6qxLcgCp/sHe8wNNgR45uXbwFG\nNRrf5A6wvrd5pevOujnjkdaNDMiwupvNzC21Sz+igCx06m+CGwLUuTwg2FQ+\nx8nUUrOwOB9yOLiP/wDKtLaypfdLTcPF4gSLTNtnWhK9bAQ75jqiCE7Yx9w9\noOjw\r\n=u1R/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"9ce9eea7cad32cbc57bd80830f21e4f366ecf929","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.1","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.19.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","typescript":"4.2.4","@types/node":"14.14.43","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.5","karma-webpack":"5.0.0","@opentelemetry/api":"^1.0.0-rc.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.19.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.19.1-alpha.19_1620460426033_0.8004145879899109","host":"s3://npm-registry-packages"}},"0.19.1-alpha.21":{"name":"@opentelemetry/core","version":"0.19.1-alpha.21","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.19.1-alpha.21","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"70da761bb6b0e31056b13f3a9c3d471e33b47452","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.19.1-alpha.21.tgz","fileCount":225,"integrity":"sha512-v3GndDbgfd3l9X0Ba9vZZhynbahm5/IWGPN0kgT4MOS3l9sOVeQYaq2tP8GMRlEg9CY+aqsQGz9NTsLCGki4Ig==","signatures":[{"sig":"MEUCIFrUFi4TG/IkCgXLMNStmtetO8SRE1WW1a46orMRZkVzAiEAyJwBqo1UDTBPCfyFPRvXth+prln4NCjWcuL0HyC6M+w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":256925,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmtHUCRA9TVsSAnZWagAAFNAP/ApEpLK4YnfDNoGSKC3A\ngn/wCp4EPaPhpT+RJ7eItxaZ9jA6wOVOQuUeWvINsi5MKtHx5Jnkn8ZeYnsN\nZLy9HyHfVjjK/XxW4RWEHtEKwmTCE+ZRcyo6rLf8pDm8mxG3k8vCLsLMiWiP\nwAmB2dfbWCx6qhwPSTc3rBazwwJ70QWLpJTlcxmcnGWRTlspcCCVIfiV8dXk\n2ymBEe0Pnvz9lbpo4sraroa9bh37hIHXUO7xiwo2+0BNKsiL+VLRVpBzMQcf\nAjAcdR86J7RGwf26W9SXnstChaX0UjlquQHslex1gBu8V55Jg1u89bfGDmrm\nB/dyjnd5rdkqUHXgkXGTtUhA0JNHhyW6rfnQl7ilH/cTlXFpu+JWrRfsyrQF\nA/5jo85Z/0QoYgqIxIClVtHZJz7PYNhyPiE8nIWyY+lKpIinrJxNz60GDEo4\nHw/rWjJR7emfcU3YFfZJCI/DEccHLkjpk8y+kfxWJozUMOI5rty3QsDGPk77\n38B5fH5kfTRcwP4zRjCBtzVENufG0H6xOlPTpo84X3b+E43RdLwG6mklevC6\ngwUkeUYjc7Z3XB571MIGwoiT3aBO/sQd20OKbCXWy3G+U5vYehvXzCVvlO3D\nmtEajeMMKuP4B70Z1VSnlzkW/lwHrElFwTzFfQ0FO9pqQOBXuzyEMO6bmta9\nrFJM\r\n=x1c+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"5cd02aa12e0bf08a9736f11f09ebaaad582eed27","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.1","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.19.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","typescript":"4.2.4","@types/node":"14.14.43","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.5","karma-webpack":"5.0.0","@opentelemetry/api":"^1.0.0-rc.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.19.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.19.1-alpha.21_1620758995871_0.0006028602907084402","host":"s3://npm-registry-packages"}},"0.19.1-alpha.25":{"name":"@opentelemetry/core","version":"0.19.1-alpha.25","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.19.1-alpha.25","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"c88d62d94076bbe3ea44e49a5eb969d031033683","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.19.1-alpha.25.tgz","fileCount":237,"integrity":"sha512-Nw465CM19c4wL+mHKoBitCpxqaHcrEytMFeqX0RXOJIFaT/eRmIHuMnr2sSnTTLqTt9hPmoyxq3POdhPniUy0g==","signatures":[{"sig":"MEUCIQDuaMFVmILAY6K4skiCZ6sKxdARZkXTsL+yzjv/8RmJ6gIgPwgA/JnfLpVWXO6zVLSjPyVurAvM1vc4Euj45Z5N2pU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267524,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgm/oICRA9TVsSAnZWagAAZNYP/1RAPSP9hmAVn2t6x47E\nVzrJvdX/SSHOKLKLTTrm+SQfM7xfcDQ3YfL5r30DMoTbGOh7iO5GzfLBlYxE\nOk2t1qBipd8tFCBXnIM3lj5ROOmSirkgE1WXH/C685amn1aasqZKP7mpK9XN\nNuomIAlmjOmN30xcUrKx5bF15n0tKDvohjqqsh3lCAKfdfJYLG2tEr8vOGak\nnpRCHPt0FCG+TTfZ1e/gXe50qhRI2zKLoQmFriN+PTnpeVsiWOAj+mOVsfsB\nU5cgfQ80hpIfYgML0HdhX/3lqIsXIK/bThof7BYF9OwcdsEGb8ijl4JDRa6K\nnnwtqAyk/5wgvE8Ax+DBsQJCGpLnLlBZAeRHtCWSX1N0AjeyxNPD0ySWTwqA\nGROLdcX6nzodPPulq3fC2FoH8vInWaNjWrJW8pHHwLG10sWNoIltNT7YPozP\nIvWy4Q01JpiJZetjdJUPgfp8spajOEUjtx+u/QsyHLVkX/lPIYENCNNN1H4+\n/G6e7SBl+zqAK/2J97Ievm5XLBUPnLKm9NyVrP5UIpXT75Kz3QXnmym1ALrS\n7c/5fagDd0i0gYXzTYRbbNx2JZw7DNbXrcIoe3b2IT1ZRkSjLo0O7eAZoZFT\nAerCvnU5m6CFfTE/TJlJR8Ru7FFTjTSQEhgUSpC25GGlBJKFpZeCh+VJGGnP\nNDHC\r\n=aj6a\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"02239b52557fe5b4c5ae6eba742340428b856492","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.1","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.19.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","typescript":"4.2.4","@types/node":"14.14.43","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.5","karma-webpack":"5.0.0","@opentelemetry/api":"^1.0.0-rc.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.19.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.19.1-alpha.25_1620834824064_0.7625196581551936","host":"s3://npm-registry-packages"}},"0.19.1-alpha.26":{"name":"@opentelemetry/core","version":"0.19.1-alpha.26","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.19.1-alpha.26","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"e85278dfa90eeb4e7bd0e6b14ee14b720c3aa163","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.19.1-alpha.26.tgz","fileCount":237,"integrity":"sha512-PtTebXMqmyrnaD57/irhG0edJRiAQAVZ9OeoG2DE8EnoNXnyzkKmZNN9VtdFKFsfD37U0uMp/Xfs6XuhsDU4dA==","signatures":[{"sig":"MEUCID6YpjwcKU1HhEICbxO32uCivZ+oKbb9AwNPq7k4f/MNAiEAxMpWGEJkkxSC1sc83BozdkdntT+ZEd+5P2XRNT3Ay4Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267708,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgm/0RCRA9TVsSAnZWagAAchoP/1gJghCrjszIq42aKS6I\nY06MJ0uwETiv8c/Vrk5Fkp33fm8pcMukfmK1nm46GiihVHViBM5Mu+X9Cp6l\n23ZZA8PK4d7y1Fvz28acLtynlxOvFC5Alb9fgKRHvQ84p580SASB2M5BNMrD\nXb0/14MVuMOfZhlnPULS7t9YXGPHgAHRHgnf1gf+QYjxz5mem61Ppyy046b5\nErEtypJeHbjPtJkWHwMi51bhzb8Uke/OIR3toHfH5X91ng+O+qnUbg+IuJD6\ndtNbELqg+HZ88Jx+5NSKMGcSx3nel6xcDtf+rw+yaAWShLgfxOVQhziP1VQW\nZhuVHctFRwrryewv6Chg0WkR9aUqpGlrPDFx3IY8C7MZqK+NLcIa5PWKBqhm\n9+Fh/UoeGTt1uKZGjRjMVOISDM6MMiJFmdySa7gOeAvAGBzih6XWG5/fron1\nin3eab43SDh74ADaK8g729AClOSRJoBZKGmQcy47amETY035ZZqkbMybblUQ\nHjQflV8bjR25RARJwUmGDCgcsDdDijj1FyuIoO5DzFYqrLx+zWH2XzSloga9\nGR0kjtJsVEYCZzDKaq5B79/fEIa0MEwlKUndMilhSaUn7zPbkYjQRf+iI6c2\nSTCs0RVqPqCBfZ9NeSt6YcttfMCkYSnDUeS3soFCKn2snxBQOywcZky5124U\nDY9M\r\n=L28N\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"1758fa6e84333c9c43cc468c5e99dd3646f7e3c7","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.1","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.19.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","typescript":"4.2.4","@types/node":"14.14.43","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.5","karma-webpack":"5.0.0","@opentelemetry/api":"^1.0.0-rc.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.19.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.19.1-alpha.26_1620835601429_0.29160671167647245","host":"s3://npm-registry-packages"}},"0.19.1-alpha.31":{"name":"@opentelemetry/core","version":"0.19.1-alpha.31","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.19.1-alpha.31","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"30daa6c9860001ec182d7c6859a51334f2adfdcc","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.19.1-alpha.31.tgz","fileCount":237,"integrity":"sha512-XHQEfUD+wRSWF8SCU4288D6Rw8dnhl1t/tPyBsZJ73tj9S2cfkbQEBqNJ1oVWU5JEt4ubTaIw/212bycDNRQVg==","signatures":[{"sig":"MEYCIQCdrJe/zQ3f9TL4PyG72dsf3SFwElEeK/QqRhnZFGKoUwIhAO6OYrzYRxRI7gWaTq05otDCkeoUEuMMcX/9JA/scoE0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267724,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpVO8CRA9TVsSAnZWagAAZkYP/RKhzAfq3kY/upt7E5Bf\n87FaW3bhyGAPPx/J+vSw/5A0T8pFOvs1PjDwaA1g/ZZghtqNo4NHTwNdjAUu\nvT4oUpPbKwycPfmnk6MUyeSF0+GMY57oTWKN755CfzV+1k9qD5rZy93q0kcH\ngTT9PcFz5AMPPbTQJrIhqPBwTa1hknUVEqZkw6qIggtME9lDAl0k8Sfg0ffi\nV/QRBNjGac1dz5LMHCr4+MlH5Is6Wdb//MiimAmw8RFiNC6SvZ6dL6BvkweW\na49Gk+ZToWmy5raGDwIgFPXNi8ZhjPgwTL1MI0YMw76RnOdvGp3KZWO7DpQ4\nzGXHG6Oy+LBAM/dOrXvQykFnimHIZeS0Z20Qx5l4WfvWPNbdJNLUN+cdc0MC\nPRGCleY63kNmXfsoslLSJKzB9l7dFrmpCs/qIOPGoy0STuBIES2RqLQU9SEp\nZC5HD3R3Cbtj6lBSb3v8yaWPQMmYMFCDdID9e16KWkcg64OcktXhHnf1Jnan\niIoH3lwGSxpnuzfWpqMgdR1zbyI4R4Ecs9pa1U3UBfiV7RfsvGhaIitowmg2\nUNhP61N3ejZ7RVwqmt+6ccBgUtvAds/HE8cciKT/I8/bp/yivfguluWutwEK\ne352pcDW2LsDR5d+JM+PpPx8qQd0cfGVhySPnd1ZoQOYBGI1QasoFH1o9BeM\nHqzh\r\n=K8Ts\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"24adbd61062759f9d9d57420fd97e50f4d8c3b16","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.16.1","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.19.1-alpha.31+24adbd61"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","typescript":"4.2.4","@types/node":"14.14.43","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.5","karma-webpack":"5.0.0","@opentelemetry/api":"^1.0.0-rc.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","@opentelemetry/propagator-b3":"^0.19.1-alpha.31+24adbd61","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.19.1-alpha.31_1621447611662_0.31472377486642555","host":"s3://npm-registry-packages"}},"0.19.1-alpha.33":{"name":"@opentelemetry/core","version":"0.19.1-alpha.33","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.19.1-alpha.33","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"a58546389ac7737cbeac624610fb4a0ceeef4426","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.19.1-alpha.33.tgz","fileCount":243,"integrity":"sha512-SVoVeNbfEsnrRX5nUCqBK83hu031WDAXdAw0duUx60wMpWVPUykThNk9P/iM35M3kdb5cROEnskoc38fK2Sz5A==","signatures":[{"sig":"MEUCIEWxggmBX104/gSwxOr0Q40TTYlGJL4cqrYfwS+h9TuSAiEA6/T+MRV5LtZdLDkk9hLa46qfCUJs4jIVAkvFik1zANY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":272348,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgplILCRA9TVsSAnZWagAAnG8P/R250oJfs1sGW5Vk9OuD\nyRr2a9ORPZIyOqc1wZtLKSACCzwXpdfiOWVaz8fZ9yADUROQ6KZ6a+WG+p9r\nto18jUHFDARSd4YN5CIvZJZGWdJdZOHClOPB6GHHgonk72TI6Mb4RxJkypeZ\nsB9zuidoyXqqVy5zR/V4HmxcqeKOAqLkrBDHRahtemUqugO4QSsw4aO3L+wf\nThxrEIJT182bP5cBYX0o6SGPF3FICLsGtR43lXs5aq6o/tHGrc9hKQS42vrN\nZuFPE/855zC6BZA904rF8spkVQ/QGAJSBDBPizmPbYl5yTRWZX9FCIpcO9RA\nHSDWRlQVUd2vrPs3CFV4sqbYhc9Q7/4ZYIc22HeEkSYQaXAGD9MK/xbnZ4nK\nf4nNKCQLz6WOh+Vl7biZcAL5h8f/SXhcuCpEH0cgnkp5ixImb6kMUqL7Tx5J\nBUvAkAwWpBObYWks8h7S6t7bzuWGfFbvKGFOoiQk2HD2tP5Vi/bNLtAdzjGQ\nFV3r1aqy4PMgxwmUYQH8FVZqYMYljXi5ufJglNema766W+9EqSjX3zquWqC6\nitbvSYI6WPqj8SRJIXNtUwYu4qnTCG386beBZkWcO1eym+53ztJ0h/abjasu\nwL2/g4E3U1bH+sklhKjix6TmRdGuWC2j/xfpadaFrel0UPKyW7DIRS564bnp\nO4N2\r\n=M/e6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"c85fbe6682b9a8fd52e4b99bdbb079833b04e845","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.0","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.19.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","typescript":"4.2.4","@types/node":"14.14.43","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.5","karma-webpack":"5.0.0","@opentelemetry/api":"^1.0.0-rc.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.19.1-alpha.33_1621512714827_0.12927777239466942","host":"s3://npm-registry-packages"}},"0.19.1-alpha.38":{"name":"@opentelemetry/core","version":"0.19.1-alpha.38","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.19.1-alpha.38","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"02654c52d364ab0739d6b747307d7c67b2f1e8a8","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.19.1-alpha.38.tgz","fileCount":249,"integrity":"sha512-kKwB4Vc3jtzmWsN/SeA3alYqY2XtF3tJLl2xL5vyUS+SNSaWzRSOS1nMVH5pfLLjgG4vcvhfrfl1ZmuBhebsSA==","signatures":[{"sig":"MEUCIQDqRLIyFChP7okrbYhji8s8+s4hIgbF4zdYZufL7F8puQIgBVLPT5Q64s/Ij+ZRXA+ZIedWQvuQ0LHIGaqvRrzOJVs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":277831,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrmMWCRA9TVsSAnZWagAAi7EP/2cnZt6t2Sf6tO8/zpim\naAb90NqdX5RAgALo/Ecd/kuRGODJcsENhskq3wNjZay02ncwPMtDaeLpANU7\njCc55Qy+kaWxV/etVDoRwHQxPeb6u2GCJkg5WTnD3W565COZZlp3SPvB4Ixi\nDdlem9L6qSooiZZhpFja+d6N1lhPRm2ZYwfCnBt7NWgGqohs9VrA4m4XoKTX\ne4K+4TMHn53y5/G9NFZ64s7jn97ByJW8+hfuN3ORm2r3IPUIKVK6k8Vfg05S\nSkqj2xDW4rvqUpszu1sSW92uLhkpU9vrdzBoJYDI0r16xIbkVD2QeBNwWO8l\nDPXA87eiXq5JuGIPR3KRoqerJVin/CJY7GtqGr3EUw4BbaMyd7c7tp68mjQJ\nNRsfhCgUZTI7hJcE3F/OeTUfq6ptUH3HvKRedEoCj1InzlWEh56VtafO8cw3\nS62IfnA/mE7w8U0zfHdNYb6KEnFaJRc6fB9HM0Q3BjGy2yfFYtnXZwCe+Ahk\np5Q4Izvho6+1IUgUs1aew0KrdVkf9xexqaqCAKfDTJCdDiTabkF/7noojhLS\nH1hwjOWR8BSrsJANvpFYphgRTcz0DOQgFCl2sRo3TMbmJTC+XgQ5zEt77skc\n9fi62UeeiV1k90pZGq4/3fRklrvMYHQ0oCtfnvz9KoXirny+Cqp04vCaWn1N\n/BMG\r\n=XZd9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"8e5c8a0965c2dc7517dd9f2084aebe56f678be89","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.0","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.19.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","typescript":"4.2.4","@types/node":"14.14.43","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.5","karma-webpack":"5.0.0","@opentelemetry/api":"^0.20.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^0.20.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.19.1-alpha.38_1622041366221_0.8176037618187952","host":"s3://npm-registry-packages"}},"0.19.1-alpha.42":{"name":"@opentelemetry/core","version":"0.19.1-alpha.42","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.19.1-alpha.42","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"44515b08f2c3647df98fbf0e622b39812e2f1dce","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.19.1-alpha.42.tgz","fileCount":249,"integrity":"sha512-X8QOSEe2VDKO9haPyv9eAM6u3V34OwRvurDdePnGhbLqNmlUbbuDaS7xIDaEtxHwIFudzrmvMnFvj3L3j4zczg==","signatures":[{"sig":"MEYCIQDNvbCKwAxDOZu56T3qMyFhVKhgmU/fJbv4dCBCg7r0IQIhAMocEZffLQnF7MSzWfysCYbg7Zj1YQJZk2c048Apx5TM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":277995,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtoaUCRA9TVsSAnZWagAA1Y8P/Rs3+lnXNFL8EnYfFBic\nN0kg8VSfDw75uFngZUyH4QANqM1Zz+X46jcRRKND3M0MQcOXUqqUNnDppNKU\nqvcdI+eWcEb7fmnEFrj9u0VsfO1vme5xq3zdk9AbgiihUIRxOmpAVIDaWoWR\nEKbPURxQQrjfk3OmZ6YJCQsceKPv68wM8FfPHqPLEHnM0BZjwtKMS0T6Qzpy\nMKAAA6SFZSVVmmi0sem48anFWrRsA16SiO3PTVbO1cQPyTUi+C0IsfeTZTTD\nn7iZ+o6ZD9VZ7h6+emN1ZME+xcnpZ2S2SKfD9QTgO+e+DfaHQZm5cerKcVi+\n8K/pMGONcqdi9sbYcwqvJNKSTtk9oxftiSX74BnZDgHxdscZlh1X+ezwH9aH\nf53NLKTdxQWkZDKFsI+FiWRbEtVcUHnEh7nzNPzpAbWzQDZQxBlF8Tq2M8qv\npawJOoby1B9pAWbtT28bcv5ko4ancVHV3FYUMqypfGiVz3KOfw5alAAppQPY\n0QdE6aZ+ouSgGrkjIcajouJXrF82xIwk10ebgsGqtSQ7PfVGRw668J8yfhxc\nPVUACBXDUtY6GDQzfMRUdqY68gSp5KQFaX/ockZbWN6an6ztztCwvTpzDKPV\n8WHAbnGHWm2yb+v0UB2uOqUcTAWvc+LKyU8qXiKOF2Gxv2B4KNM5hht5F2YE\n+wO9\r\n=lw55\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"56c032ec71c0baa0120a5cc841c015a290fad654","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.0","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.19.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","typescript":"4.2.4","@types/node":"14.14.43","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.5","karma-webpack":"4.0.2","@opentelemetry/api":"^0.20.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^0.20.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.19.1-alpha.42_1622574739932_0.6108074646498134","host":"s3://npm-registry-packages"}},"0.19.1-alpha.43":{"name":"@opentelemetry/core","version":"0.19.1-alpha.43","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.19.1-alpha.43","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"ea8fb1e06aeb27d56381879aefed0c75022da3e6","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.19.1-alpha.43.tgz","fileCount":249,"integrity":"sha512-waJnQkvkTEJeJvV3Qy1XtS8WnIX1rbst1WFYJumqqwS3fAFU0O4svaRZCA53IKETJKSPyOLVz2Otinb/DCciFg==","signatures":[{"sig":"MEQCIB2zX6p84fZaQ9xXiVyzKnM2mlMLhTGcW+z9qjXjaLK0AiBOebfBZt+GiSSAU/8hR13jg5kNOrC2SxQP0ujFXrGMaA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":278013,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgto5sCRA9TVsSAnZWagAAhQ4P+QHHrNnf9HmtFj2FIhso\nsQMYia/IzT9zFSILHk/5xWaEqyp24gs6wUxJWxT4JtSlnGn+WDTcqaFTQHcJ\nB2g6Lwgs2Tj0/PX/kbQt7jZP01D9lNY8erCHCnrbmni24zd6Duvwipbn/MqJ\nM/+EmiYkqXRY/6H+8j2RZcbkAQpEhLpnGRLuMaNb+LLRv9pCOGlkP4p+b1iy\nBmf6Zft/tgVips+gnt+lYBXOsAVP1vfl1AYaybEtHtWGDC/hufdZ1rtnZ/3j\nN4mcTs4Djwli/yWW22Hz4sMxU41aeDDFDbJBL2MGGSUHJ1PIVQ95kInABjoi\npiusacVsrj4GUdrQdyKgcNG9HH2ggAXpa4DI97Qx4jMlxEcRFiA6c5C3PNkL\neIFeA9dbtr+4ZiQHoJeTBRzQcDEH0dRcvUjFYw/5f6DqG4MeDj2C7jZ38/7F\npluqziA+DB7UHcjdDPQD9Mnq9xP74ZCGW/oJMfRiUjImtIgZgeBwiZpuVQc8\n9hGRHH1xc40ACyS/DcfmnUG9U0h17ZclZ3gNYolqDVH/BeZeVcb/wz6fI91y\niqRFVVcRLpO+DALY+GP0yLgJ7JG4B8ZDTlhZl4/fBp3pHVUb7uqgwD636Dvs\nw8ZV7e+LvMQcEShGS2wGwM5yJNI/xRphP2APi+FKgHciHnubFyTm03bn4xAK\n2MrV\r\n=BAcu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"d5517812b31d9206131bf1df4f8a3b5183ab07fb","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.0","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.19.1-alpha.43+d5517812"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","typescript":"4.3.2","@types/node":"14.14.43","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.5","karma-webpack":"4.0.2","@opentelemetry/api":"^0.20.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^0.20.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.19.1-alpha.43_1622576747966_0.24945939678750872","host":"s3://npm-registry-packages"}},"0.20.1-alpha.49":{"name":"@opentelemetry/core","version":"0.20.1-alpha.49","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.20.1-alpha.49","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"4c9affc71a31a08c1c3de7ce5d26f5692442a444","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.20.1-alpha.49.tgz","fileCount":249,"integrity":"sha512-h9sits7KHlBjEKnHIR7LDuDxlTDgeiGp3oF5zXxr7B0wuEuPzWg4kS5E7y/f7Fo675nlYc3B5yFFzzucnUABIw==","signatures":[{"sig":"MEQCIFyORnxtO06l+gHjhDzxaZvvIuYW8xTC0ppAlZ2fRM93AiB+dojOPmW/3/5LzRs9HocR0g2ZmmwZ7VidF7O1PKcITQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":278013,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguQzbCRA9TVsSAnZWagAA92QP/jxMH3HB4pss121mZsiP\ny27pw8CV3lvcVzcsedh+waLv6/dzug01dkI2VM285sq6HftJjXDpozb9GwFv\nQ2txVEwXUHR27/3iU8qhtyvK1UCU7O5M4Hzmtz4nUxwdNkwwv7mcJIUdvfs9\nehnP7Jn9267HQjwHsu+qwCC7C8yXlA9HY7jOf3eXH1kkTT66HItIt8fIjxsk\nQkCxFtr6SB8LzpomSV5JWTpHDczrejWMUbrFSDg+0rjNmtTBem9zZdRsNvmR\nIt5U1PIB1Jd46YXoVLbt3HdRGRrNWhTDkBxDdS9f29nnypF+wdrjKNQfGax1\nVRhao+LCPB40lpYxBCAsCgGyXVel4vTdctLR5g+HaKjK65+tNCha8DepUnKF\nWtZlZcIN9lOGqwbkgZiHvr2IGE2wD4FlZSCvRobrSdUa4tpNNtgLLSl7YPhB\nXIgOLlOvVCj3D6tbxq/thgv2RkLI3Cr7X1itIOu9dFLO671ivboFt6wERHqJ\n7PtZygcRfAWc3d28zEY2cl6cgs6bmHfAFQZeS2HPSM5E5ZtNTafVW2kSXwAl\nXY6ou3/rQTCa2gLPo+w731CqFbSqtLNFL8Z03u54CQZ/nvPerfHj4ol+tErt\nYAQ7PU0LX+1Q4KCu6Lo4BhTjT7DkuS+MpuWmGosj1QxLtKyqXlOpMgVGybVd\nX0UF\r\n=b8c7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"f79aef422b53f1314cb0b031651875658fc17008","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.0","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.20.1-alpha.49+f79aef42"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","typescript":"4.3.2","@types/node":"14.14.43","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.5","karma-webpack":"4.0.2","@opentelemetry/api":"^0.20.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^0.20.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.20.1-alpha.49_1622740186964_0.5634461118981346","host":"s3://npm-registry-packages"}},"0.20.0":{"name":"@opentelemetry/core","version":"0.20.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.20.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"2fc9619fa225c7ea7a6169ac578f89c9894b5900","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.20.0.tgz","fileCount":249,"integrity":"sha512-09zQqB4vp2jcyBnglA/TFklDQoVgWrFKtr9pDm0q3Oa1bD2Hwpq+JapBAw18YdMQsLNQM/qsXhFlS3gFDVEy4A==","signatures":[{"sig":"MEQCIDpLmYfKC+KMigg26omhWe5tTQBIPZTkgsIrepp/UzeEAiB2DFEsMjO1vj2IxPTdxYI3cI3X/UW0ihHzWMFpUsKkfA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":277976,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguR9MCRA9TVsSAnZWagAAEsoP/2GMeEJiuIAtUtVRKHXB\n47ubv4w9vRFsZOeK+gYZ5F8l0f0uvHtRFm1BjUBrsLdd1gbv7zOMV67BsqbS\nc3CtQJU8tNh7wdURoWjzrK5YYEj528BfKl95G1Wcwgx809KFlRiLAhiHe4aQ\n/BFKbIWrvRV23I+BADf8iODG0JIe7+26Inh9W4C/YejraljxQab3310wlhso\n3562GD3gOerF5uvpYA7C5pOEoX/NvSHJiJuQb3f/+4JiSE7IPAv/vzXQWnYr\n3A6Yw3i2fYPC08eBpF+0UZd0NXCbIUIrB5jMifoN+lCJfjOBSjxpsLOzplcd\nLSGH9hKtgj4glVwOjWNnz4xL1VpukV7ebFsIuKRhqK2gyRElriuzDAcd1t+5\nH8UiNl459/TwuwLgx2/8Vim0r4ZwRwn5m2Vv8AFw8Qw9TsYOTogZEGkLeI4X\nfGdt4mmsjy9BgK61Kl7o++GxL2iZBqa3AaT5q4dkV7vIjMJ1NatohlTJZRq2\n4fiPLU1zGiyNVVcfAK5UyOxjkD74UcTZjB0kNmAALw4zziXSCs4yGn6LGS5X\n6DUidTolHNGDNpSUJlk2Fy549zXJzH1zyDw2klCn4La7Hsbx/O5/nSpfDQyT\nnboIZias8tnChOXNgEILxs8tv2gZuoKtgdZooXUj0egU+JlQySbyQ77ixsoh\nFjoS\r\n=DY1Y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"f79aef422b53f1314cb0b031651875658fc17008","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.8.0","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"0.20.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","typescript":"4.3.2","@types/node":"14.14.43","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.5","karma-webpack":"4.0.2","@opentelemetry/api":"^0.20.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^0.20.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.20.0_1622744908516_0.19918286157734477","host":"s3://npm-registry-packages"}},"0.20.1-alpha.3":{"name":"@opentelemetry/core","version":"0.20.1-alpha.3","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.20.1-alpha.3","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"6c21a3315aa503a2a96f661a700a3ec7f0cbc2b8","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.20.1-alpha.3.tgz","fileCount":249,"integrity":"sha512-Cw794oNeaKdQwNWJpcgPfvclNNczGSy0CMDJz6gPNOVqNqETbGdQ07YxgTKXjLMGjyNAcieRIYwfEhKrk581cw==","signatures":[{"sig":"MEUCIQDgMqfynFWNjIozenZcxAFQZEtUNH/9t8TRsJwEsw3cxAIgRNTAXOC9DSheAhUvXpXMju6Y8dJnRjw9tlenf1ljpO8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":277994,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguzXCCRA9TVsSAnZWagAAffYP/A0mKz40sU8+sIksyAxg\nrKatonwceKTyUz7K90EdMETORXLd2ACsAGHo8R9vHussn0kvmwWDyU/TnqOU\nuNB+m2s7mkcNRcAJTcpN6xiak7yq2CZUIvqE06PC0flGUbzEZWjJNAomBFD5\nRfBnFcgyqKNlSs6qwk+ofNi7Yq3Cg7gdWzFIfRf/kaa4zIP1jxkBPA1RP+Ir\nKT2Hi8io4HfwbdokmFyxe5u4tNbm9VMO/3o/Wbp0NEYTfcs/YIykU6/yCHwe\nMwzB9cz2QQByRsfGkFN/McAqtGW7hKMBsOYXTn0DcJMOxD/R1SGm6wwOgGjh\ndZXkvNYShV5q9lLEmKlzHmJU/SX7bS0hOQkLDLZs8M3rEJgfa7BbA32ee4tV\nVMqJklnqPLaAT5rCoJ7xq231LCYO0n6NLmPKvypPGI8JUoyiavoDPLQr0xAx\nfDcDwOtz1T/tA1NUQlDHGJ5Uy4C6AE1kgDAR6cpH7HryIRaWTiqbxX2jKrAO\nyKUGG5lzNlG77CUqfy7rkWe6rMTborIZAOGWWGB30g9o1Z24dnaxp3MTyr9Q\n8AkMDeRI3Ik7No7d0pKBqfsRyCMwgYi105hE8p2ihhVe6ol6r+sHOIGvybvt\nnV3ATsb22NctqSGbWxhHRRMdO/gLECr/HntRJJaVFeEoVqxfjWbDNMuqh8ie\nOKCt\r\n=nhue\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"d4df2f7ebaaaf433bd84b568c482e2788103ab71","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.0","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.20.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","typescript":"4.3.2","@types/node":"14.14.43","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.5","karma-webpack":"4.0.2","@opentelemetry/api":"^0.21.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^0.21.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.20.1-alpha.3_1622881730728_0.48271590060363834","host":"s3://npm-registry-packages"}},"0.20.1-alpha.4":{"name":"@opentelemetry/core","version":"0.20.1-alpha.4","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.20.1-alpha.4","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"d2e8b40dd19a6810ce4a0ed08d19426acb717503","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.20.1-alpha.4.tgz","fileCount":249,"integrity":"sha512-QBbIgzeqdrjvItoEk0+dStfQb32tDcSFDokE9Xk1dfZ2Rt3Ifv0pPih4osziRnWy/KYPVn1tf1FI0FfNHNTJJQ==","signatures":[{"sig":"MEUCIEkTpJCoJl5XRIQojgogJOCoGw7w2rqwkP+uo8KpnJNsAiEA4rtknmMRCFQh8sntoISTnDuWwXI5RURr4sAz85bxY7s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":278011,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgv3BNCRA9TVsSAnZWagAAUeoP/i0eN/DLJRpGxPkv/4lf\nY4x/QiMRvdOzxRFyzUyIRCAXx7DuspSRdm3cMZAbxDj93Gkcp/m66vzii9K5\nWbqfahDiHFAYiPeu4mcCq9lhQgki3464fZxFco+sXDRxJXsw6jYovYTnHMmx\nFxG9DHvLqFLmH6ltXox0EEEBWbBIpo/NUBkB8swXb1KAM3nDFg+jzNLnO/BY\n8fPBUjpBn2keK/F2kK4G7PJaYSp5szjun7q60nYNpqu+U4uhGAFb5VgUb8kf\nPGoPno18CbywbMNqD2z9Ix0Rn1oXteS3zUN3bOlue7+MDFe30MhnGEJPEUfG\nxbevhFuJI7nn0N1PFK35w2Iv5ufN/VEH7M+j4v3PtS3aq4/0TAsXoq1dIKNh\nQQtJgU3hLEj//DwukW6bVkhlc/CgDyPX6WB8tG1w51d0WhT90tUkbslwfiZZ\nDnKoTnyiPWXJqV3sG20OZq8LAVKtjKmAurh8Hil090a5b7BX8tmbFKneFtiS\nt/MJWuSmWl0NxD2yTi+wBJR961hY5G2sgOPR5sjVjpnYec8VipRnIO3tQVbH\nCpsxXDrDVzjIainPJXrEHfTKOThVi3+hYQa/GYbOmduHot5YzaIpFhctFOin\n27lmdXSxKoF1w3+jKsVd9F4ZXh5ytVYCdqKot8+E6Pw+M2AKF2ESbi+EhfVF\nneg3\r\n=HnFV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"3d98420cf530968e6a85bc4b9c2b1bb78b730b3c","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.0","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.20.1-alpha.4+3d98420c"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","typescript":"4.3.2","@types/node":"14.14.43","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.5","karma-webpack":"4.0.2","@opentelemetry/api":"^0.21.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^0.21.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.20.1-alpha.4_1623158861129_0.35412462100032616","host":"s3://npm-registry-packages"}},"0.21.1-alpha.7":{"name":"@opentelemetry/core","version":"0.21.1-alpha.7","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.21.1-alpha.7","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"bed09af65c8c923feb8af2e8521908650fa7a697","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.21.1-alpha.7.tgz","fileCount":249,"integrity":"sha512-Z6XJgCo/HGlKZ67vOaCV9hsafVBVI+3IoY0L5FkB53+TTEAegkjuqMAFqfoCcslRnI3o16OIeEmD4UAgDiCT5w==","signatures":[{"sig":"MEUCIQC+Ax4i4U61fYOyMdx5UJtRna1JHXAlA6vTEkxNx3SYmwIgRRN3vxTcyeF+kJTUTqKT9ggzJHA4TcKZC/sBm4AwQV0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":278011,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwksoCRA9TVsSAnZWagAAybUP/1fPuXf2E6F35UU3j9Qj\niCRVzCjiTRZ2Vx1fksxtIvDweu9PHBw5Di965NeqoFMm6BI3jS5LSDvRN5FV\nUO9csxkR+fd8JhzMjiYQCg2bwEyruG3VIO/lp6VKoIzKzHK2TCiRoxB0OaKm\nlQUa9LrTWVLeA5XCkBJ0v7Rw/qOUd0uPyu0usFpRst+JObQY8nK6EkmoROyb\nBbEme6lkyMAoPObwyo8O3vKKgZ4eamHsrZTjxQvqttYKM96hzQ3psyfEfkcK\nYgvzwKyNI9ylggRXy+7iS6FXubjp3p5H7v9hecTE/1ZYCgJn2z7KnlcSynn3\ndvn5y+K/eCbvDdulWOEWidFD8U1hf9QcIxcwc6RdfLhJQg5s75zV7+QmGFU3\n96IWxEjf66pdJEpmOUN+5gQzSQ6/7+GLa1KOiEXIZ28jpczjlutjO8BVjCXc\ncIo1Gd5HR9m/MMxR5xkL0YdDkuhHNKtYiRXEiCsKgjZXC3zwzPwwAZgemGYE\nWuZ7hvTBISiApHJen51GxhaZMsBVwZWtyOsYKIPDW+fO/L2g/sQHNdaD36rr\ndQNRnpXZH85raw4uSXNHHvitNyCts1s30/6p5bSf6eyg56lBk0bumF+t5W/+\nzNdXyYIm5Yaaz1y/y+H9cDsOU+q8zxk6r689iOWivK4LvH39kndwubwyPXow\nAQQu\r\n=kZor\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"7750282034ee58bdd257446c2970f01307d7522a","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.0","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.21.1-alpha.7+77502820"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","typescript":"4.3.2","@types/node":"14.14.43","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.5","karma-webpack":"4.0.2","@opentelemetry/api":"^0.21.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^0.21.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.21.1-alpha.7_1623345960060_0.9070972370846897","host":"s3://npm-registry-packages"}},"0.21.0":{"name":"@opentelemetry/core","version":"0.21.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.21.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"51bf0d93ea3779537209f6fd1ff2df499e1b9d84","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.21.0.tgz","fileCount":249,"integrity":"sha512-sZZQThBuqhCdBPgzPq4y9L4dhnpXXCCEqNsR6IUmMc/kQ8Bcw3lmI5fymLlliSt+lnTc26xJPVKZlwoQfwhThg==","signatures":[{"sig":"MEUCIQDvcjPGgAY/KQg9GzNp5XIVH6RGHca9ToBkWI9zlLHSmwIgPmYJOeECyl9CjzGjj3vrSNLMqDp9DtMleCGP39GNuJA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":277976,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwloYCRA9TVsSAnZWagAAzcIP/03DGEnYOGnYC+2zYyd7\n5CJKflOxl85+8D4K+vUyYuljmdtrc6NxFc6vjAHkwsGKxPFyvYiCflNgmvrd\n4z26GaWH7uxiNbemFPf4ZmyEtgxxjb0QX8TAbB0WH8X61IAcl2nhpNn9ZdNM\nnHk5KZFCZ8LWTz7PjMr9BYVCObBSUPoHPAcmtP5qEdm4jWlNXsX+oDVVj8i4\nPQ8lkNSa2swSsmF1obUNIlIYljczZK1iYjV2M4PND/dCeqIAslAGlCfXkfg6\nKLz4lVzTleurBiL7nMnhMibO3qXFJ5lgFO+r+6w3aaFtCMJY3TFrTW6h4N2G\nqMK/mdXja0XdHxls2aBcFqKJmpCoOuVQtmVrVSDpdyuk9SAfSbX6krNiJ0P1\n+HhWKwZsMUaOHYxwd6tshXCoO69s5ImTl0x3uyFH3RO/3UC1WNlwQXmytmh1\ni8ZTXeqoExFmulNBRhFmKvKwVcxrXAWN96MNWDHkKlKUBfVtCXCPCTfukAjh\nqep1/c9OnP47HId+ZiwpbCnTJV17fkegedZ7x3eTaadDIwstdrPLekOpjxWu\n6WWnaMqjF8gan2BYZ7gPWMGNHrXRD01UCfSVweQlHd+OTieAklmQ4gB2UZm2\nwKU76Rqfnbo3VDwBeUNnMfxmUCklAFHepuXWzN9cn4TeHYAguz9hEZ1J0olG\nW8lx\r\n=CvFX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"7750282034ee58bdd257446c2970f01307d7522a","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.8.0","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"0.21.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","typescript":"4.3.2","@types/node":"14.14.43","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.5","karma-webpack":"4.0.2","@opentelemetry/api":"^0.21.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^0.21.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.21.0_1623349784623_0.25184096906558073","host":"s3://npm-registry-packages"}},"0.21.1-alpha.1":{"name":"@opentelemetry/core","version":"0.21.1-alpha.1","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.21.1-alpha.1","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"76145e1aef241123e51f4f069fbe3f429c50ce82","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.21.1-alpha.1.tgz","fileCount":249,"integrity":"sha512-fEKS3OjsyL+rPt+oMWg9m7BgKgsi4YJiuqMGBk/BieiUzTLZigBm85f6I7PprYRGlwDno3lNQrmyI4Vo6T/JhQ==","signatures":[{"sig":"MEUCICktXKiFpix9ccFzL5QlpAj8ZWdrY4LGo77c0wUiuzvEAiEAsCAXmMOxWWjPJfAjHRLjC8fkZ723A3kxNT9asvtUpOo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":277992,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgxG84CRA9TVsSAnZWagAATKYP/iPCce8/yXDVopeHgnZq\nvLwucmwuMdgFBtij4i6MjAyxbfxEZYB48thYx5wrSeOZEIA6WQp86U+vKY0d\n7kgs+OexnSkF4kndUmYXl2Uj1Wwdm59z4QaGNDrxnmD6rLsgEs+vvvw7VkzV\nOnp20TZk5GNn9YF2GwBI7xjaJ5zlRDXjtSQ8g78kYPrWaZHDKMywnLlwP7yp\nqSdKsIrBsbVia9zEHYvzAgMT7Rilh5D+I37enPOKiVJbqAohynh8IqI2i1uS\nGzdO3b5WtyhyBuX1h1wHY3uVHS2gOx8NwKnl+4kx7K/UGUBZX2NlHhvATzlV\nb6teIk4fA6TH003+Vnd/CDpfarJMkkEqtuLNBeWt8dBcWGtltFirTqfVaBCW\n5sRm8z+xI6yfT+2TeoRgmKeXMFAhdY0aUCqnuuxyGxUQnO7KVwEK52TpNp8p\neOEgDkib0zPiy7F0IVGj8bybA0Bguvc9ooX0w9xjAe40G2JKfTpKnisM68y9\nG+OWsJea9z/ERejTj4PrYNZfQUqZsboFGT03Tjd6wwQJfJgmyDO1FOSOh9OS\nEVPIWxnAE3GsXnQgG5b5DO7h8cU3y/YEpAPiNReGKUOCQThggQ6Qjuu4SdZr\nWVl0AgCskmUBdfYIZXsr1dvx2RjFbkjl+LjR/mSW7fjCMnKoo3AXT70MMo/j\nlbmt\r\n=icWY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"5b6573eeff537ab49d8d8d42217e5cc794f9ad70","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.0","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.21.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","typescript":"4.3.2","@types/node":"14.14.43","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.5","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.21.1-alpha.1_1623486264006_0.45390487354760745","host":"s3://npm-registry-packages"}},"0.21.1-alpha.2":{"name":"@opentelemetry/core","version":"0.21.1-alpha.2","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.21.1-alpha.2","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"c8bf2ab58b1ab2e89d0097595b23c3f2b7caabf9","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.21.1-alpha.2.tgz","fileCount":249,"integrity":"sha512-iZy75orf1epfCEwU5tQoN1Hmk5jWYuOtXGru/pu7kV10PQOcdDIrDdNXQpnhqs9esjGb8Mk+gWopyq0eBKmpmQ==","signatures":[{"sig":"MEYCIQDUjJFSSEHpekRtAEeYBHdk9HCpLnuZ+G1tFr0uF8O5AgIhAMb/mD24W6qS/8nvZloMVFuYwnnJp7nU90IIm6FBvqsw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":278009,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgxHG+CRA9TVsSAnZWagAALMAP/3XXdWWkNpIqUlX4z8vC\nPX2o8H1PFJ8jZl/KAx965Tl9D1MkG22ls6ZrxG3UaJ1vyGRWRempU+AlG5wX\nMFICb+PQmgWTgiV/1XTyLrigtSfk9BP1utpnHnaXJxHlYiXEi/l8yUPHf1Xb\nR+1qjxmUROVMC97PnHBzYAd534d2FnfsgL74+NBvNOYFOtUyMRVh0T+Ow2dk\nsveurbRe1NgiDKry1UkP4tMg5hlPbTJWCoOwaW9KQvL3exwdzsp4VEqU9rxu\nQbT7QKRxs9q9hfguDTcBigwn/DqHTSdeqyi/WzyRQS5sUNKCyWE0iM0SGVFh\nUuhxWO51/KUSOB9WsLTV+8zmUwX0Vb7JsQc5Wc7+h+q5meVesGKocga63UgH\nyD3oC5vycTeohcqeiqqTt+tWeYf+eID5jlZheaU2RTHSa9OXjxDReQMr33E5\nHssil77M5AUXcpuwCAbTU95dAJRXmQq3mIp8/C8WskKLJx5A2qkmQXAByypt\n42r8lMkR8ChfchYXfRcA3lfffYliweNvBW4tpVQnnRteKxAUm8cXnCujHr26\nVI4DKLMAxWuhN2GzZPxMr2ThyiDCkm8ssEhEMzFgtAQ57pwUDr9I2nRkG+Lx\ncuow9v4CAPLlZX1wdzhCfg+S1upbJaKsRnX93PCnATgoRX0FRnz7Mm+dfIVH\nB3XA\r\n=PZtN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"a3b77387012a5f53c193efdefcbf5f6272876e4d","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.0","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.21.1-alpha.2+a3b77387"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","typescript":"4.3.2","@types/node":"14.14.43","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.5","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.21.1-alpha.2_1623486910551_0.784182766645231","host":"s3://npm-registry-packages"}},"0.22.1-alpha.5":{"name":"@opentelemetry/core","version":"0.22.1-alpha.5","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.22.1-alpha.5","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"1f3cb075d1cc6909065413aadaae0151a067e076","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.22.1-alpha.5.tgz","fileCount":249,"integrity":"sha512-g67E/HTMWCHmAwaDIhW0BxCFGqxcBOWRer4YF9PFvJvVbnGMiPkOydILcVq6LTje3dPLTzS2cC0pu8qyaeX7Xg==","signatures":[{"sig":"MEUCIDOssOY9pn7POxGYfUkqjvH8KZsmt8gJi1hWueWLtfM1AiEAmihoJi0jk1YIujg2mAawi7m+U8M+xeyoSjsEKa7ahLc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":278009,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgy4DACRA9TVsSAnZWagAA3jMP/0QhyVBORdIdgpJ2l49+\n0EraN6l5qEdiEXyjN5pLo0ETrDbV0ZVMf7bVe6sVZr1Kd5zqGC/hJaBYQGb1\nh34EnkianqEG8YFSCMKBwsfhpQSH1zQeWX+4biMIoNjVp8p+nS9Us3FaUDHC\nHbyVOTxsHnFvVpLBSVodWmk/ZaTCb7xv+8a0xkO7KDy5b/WLNQzvN6w2JWiR\nP3ZtqNllN1HLsx1NEPk3mFAUTv3ipypcDXTyF6PrIwQzEavkeI9LRezaDDSx\n9/IfdOnFOucfDCgtW8qNr9k42ZwHPbm7iuzmvqNWT62HUVxfGSEjbse6GnVY\nfZJN+6Pz4/dnrLB5F8/mjWeiu46KNPhHpqcHl+pBudtfn8NdqLuGUI1ix94d\nvLGckyhm13uIXIRSlGXeRp0REaVVt55kOzloDEaU82O1rM85WiIyi0gDYrpM\njWy5b4LAg+PwRyr07Ohsca134reyufdO8Qzav1QIyEaxS8bmWyk9j9cJFTkj\n0lT4dKfss1fNcjVUDyrktVhDDcVLikDZeGv98MjC4kR73ENSkLaBrv3RnG6s\nfhmhE4yApdPFDqggHcRJyPKDgCg4qbjL60XFLqHmzZqiRIDcM0NesAw9uitB\nGs+j1/dB7rFCVuOD1l/buWNxd5gXbRdfBZXYilC20btunQyXAROt6S0QOQZH\nwDHt\r\n=tw9S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"7860344eca83449170bafd03fd288e1a3deebacf","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.0","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.22.1-alpha.5+7860344e"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","typescript":"4.3.2","@types/node":"14.14.43","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.5","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.22.1-alpha.5_1623949503852_0.8379862471001329","host":"s3://npm-registry-packages"}},"0.22.0":{"name":"@opentelemetry/core","version":"0.22.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.22.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"9281cb76a828f0347dcec7925a11ad2e9debf922","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.22.0.tgz","fileCount":249,"integrity":"sha512-x6JxuQ4rY2x39GEXJSqMgyf8XZPNNiZrGcCMhZSrtypq/WXlsJuxMNnUAl2hj2rpSGGukhhWn5cMpCmMJJz1hw==","signatures":[{"sig":"MEUCIQCK5uPal+8UFoO5Gt79r8T6bFi4bHt3KoYf0tdSli4I8AIgXC0CM9Zl5ppSH9+8R+s4oQL1CM52v2Lfsf+nIUsZtV4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":277974,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgy41JCRA9TVsSAnZWagAARXgQAIKE53QkcrREYuQmInWG\nnOrEvegJWrUVpyzmPDN5NAxgb6lnH7mowZWzGHMlL39JykkMo0sEvHx4FChl\nTPTgva/1wJthR1FsTMB3OGwU9INNlkShB4o42GRy0I7LXP9qJ0Lr5Wkbu5S/\nirEexT2xuQAuWahYgx4fWEWD0IFZ1uJt8ZLcvUs4SmO7BvvLo/RMl6fnBJu5\nEWc9oDvpwt0yCQ0HCENIQBDwEd1VF3kAokgXohoJ/v7O3nR5uMshehHtb0zY\neuN1jS0g7l2w0XEyDYax1Nzk3hnxS5oA4MdLHOlVUEQvxVGLCFJIvnOsnRJV\nWjtRIUHbAD+cmTlrQZzXYRgic+12kuzEpSuUfDZ5KPsg8WU+R3KJJYSsA7dA\nrXBdcMqEwNsENEDdqLLn8rrN8QCXh5vlj8s4MIYKEL16Mf8P7Nf5bb8ZqjY3\n13nF4zRqrgb7sOO0jY3TQNdizOzRbYrMnoH6YD43SN1N2zNmAX8tD8j4pyu5\nFjHWatxRvRfMlwQXE82OXjW2AvPCHUjk50s06JHzaL4Vf2VdQSkmhVa4gYmd\ndeVhdYZmSOo9MqlNeQeSigSieVAWyfXhW09sDd6DUt2h+l3bJVP39FpxLcd1\n7EFzQAwaTcpjYZVsiSIIJohfXUYIoVbecIIBxdNu8BHOjaQCw8GGYUBy+SfK\n/RyU\r\n=H873\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"7860344eca83449170bafd03fd288e1a3deebacf","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.8.0","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"0.22.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","typescript":"4.3.2","@types/node":"14.14.43","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.5","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.22.0_1623952713353_0.932063000058025","host":"s3://npm-registry-packages"}},"0.22.1-alpha.3":{"name":"@opentelemetry/core","version":"0.22.1-alpha.3","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.22.1-alpha.3","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"dcfb160f01722f632590cabb70af7dcbd7017af9","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.22.1-alpha.3.tgz","fileCount":249,"integrity":"sha512-dFXCFToaEPfH+Lo4t4s/p5aLPZNiLauLcx2h8NaAYGC642x+soTf6I5O/s8b/2JciPsk1vnO8RR8Msi6D8KtcQ==","signatures":[{"sig":"MEYCIQDtrx6xFXHF4ik5Sls9lA6qeM1vxY54qCikM8HizLtXPAIhAJlHCH309mKGYBbveQombFwrpfFbY8KLe8HE5OcljANr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":277966,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg01uhCRA9TVsSAnZWagAAuD0P/1o1N1iqiJdkUxq971g1\nt5ycnAm9h3XqzVcyGI8iJ8sP0os9z5M80XkWVpS9gutYhU1opE+5RwzxVJ1b\n9kq1iF86H8RrI0RP/C3sXXQqzW0re/SyxGKM6oHxpcj15pq1A2XPqsX0GUmY\n6H/kYSvaRbSrRHw2LelGlihkli0yLdL10rwJBRDJyvfwDh957cGVoIjvlFAX\nlZESRt0OICGL3HWsHLXLJxdn6WU7bAk7cjiduR6Qra4mUgv8TButISrjdQU/\nzJP8ZusXf7EG9bsu5eCB2be9+MjE/ZMVIfq6Yb6qp9x/5sDUp2nFJ8dWKRRQ\n/xYkeLEhSs5AL797Z6BC6hB3S2g2KieIWTGkhvJqfJ9lPuUxzDad4vLZQlGs\nD9MH/mPleeibPSQiwEu8OdxxZZ8r/ienNRclsELT+QSyFnCm1KOHwley7f/p\navXLtJyIuzkQ13DZQ/SG5MLT0RTXJmhl/2RWSUnf3DCpGm/cDtE3I7Nl0kkd\nhBfMquyKYUe5c6oFx+pOZf5C5xIfrZqyRErr541kg5jHf/a0JnTDdZtI9Fs1\nG326Ox4WHAJMX7KEyJe4+48z9NazfQWCqjy9L+6uz9B0eIeuh8/auO0Et0x/\nMy9/+EL1CLQb4QruaJrTZrZxoP27owXLbxH3H/nRprQjiVUtVszLh7WLrHYg\nOWYa\r\n=TKBl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"6fb4fd1712babdbb5de216c26e1283a94f7159ea","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.0","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.22.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.2.0","typescript":"4.3.2","@types/node":"14.14.43","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.5","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.0","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.22.1-alpha.3_1624464289060_0.15713412411927208","host":"s3://npm-registry-packages"}},"0.22.1-alpha.13":{"name":"@opentelemetry/core","version":"0.22.1-alpha.13","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.22.1-alpha.13","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"cda6ac3446e69e49c8a38fc5c39585475b03eff5","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.22.1-alpha.13.tgz","fileCount":249,"integrity":"sha512-4OnKbf+4SaGs58Y0iT0F8C5+hKkeloDo4HU37Q6l2mI/c8E4t4HWbVb5JxpaBFVHyEK3VdVozb5staHhk0Vn3Q==","signatures":[{"sig":"MEUCIA/XVXOu4UupEmdE7BAV05kWsL3FmzbRmDKUzq9MSDIVAiEA10IQ/YBuRQFvThUBZS4leTD8sRei4FrLeAwZGSbynDo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":277984,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3LqWCRA9TVsSAnZWagAA9DkP/RWrgwJdgf5OPTPDBadl\ncBS/E/YxISOgYSaiygAdoplb3AtE7JnQz+uDC6tRMq5KjTBjjbAENCQ1DxvF\nUxdXLtbE0EXTJO2oKlyJNM9JxMv9K/GItnJVPINxVuBTfEm6ckcBTFWiXF3I\n9kgAaBL0Hg7rr9rf+QEAWmicqYFW4kr4/Iu9ATGv6LFoMB/kB7hFtqd15vOr\nXkxltZcS7GeX/9r4u4zlhXSjfP39oWw+09LUnttmTzQQsuu+neWTJvRxFjcL\ny/dZ/o4HrUN/o7Xlm5lMBAOn72ryaX6XU94OAlMxxn3BpW/4JGrXZF17LTiy\nKeRIJ5EffX1q9fFQRVudYAuvhLTxzjhKfnS3/f7b+kWSkTGGv2wgdqKrKv9o\njzxiku6zoN/vvFHJ0RnVj42SSR6QA5rCkCgysrfmE2rRXBVi4nrg3K7qxBzc\nc7tlyl7XbVFoXWuAOmqiyR1VO016ZZo9Ymh+h7aGB+gfFqBz5U6ARfNSJ0eY\nwBMXLtTSC/vuYHQ+dQAvHhKaddEBoeeQF241D5Yey17DPslhinQZnWl5xAfv\nxNGdIJj8k7G58puma2VB0rBpU2Ye8T+V6tcFM81Y9LS4hPiTol6yYXv+o5G+\nvKXlyE5QKKGy0Uw/tKUwr6ayhafahL6wLeOc0hiBaUYP4qsCJsWcQBB/fIHm\nzlAr\r\n=JI2d\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"01418978e5cc15b5ec4d5283ec48910799fe2f06","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.1+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.1","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.22.1-alpha.13+01418978"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.4","@types/node":"14.17.4","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@types/semver":"7.3.6","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.1","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/core_0.22.1-alpha.13_1625078421697_0.804350202516247","host":"s3://npm-registry-packages"}},"0.22.1-alpha.15":{"name":"@opentelemetry/core","version":"0.22.1-alpha.15","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.22.1-alpha.15","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"6a90d12e49b3df84605eb9d45a512655c0ee2d43","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.22.1-alpha.15.tgz","fileCount":249,"integrity":"sha512-8C6LPWQjDW2P7Z5eBTORFWZWLs5qoCmlrPctj2SGfeXuSwy5Q8CXsUal1TnxJcW6kj+wRA/btlnvG1scOBVKGQ==","signatures":[{"sig":"MEUCIQDSQ0kjEoq3bdwrp+ZqddvyvlsADUtPoh9zXXrDLqoiowIgXJiOx2eQN3jAztZNOB+y/r/ggcDzhiaRA4GBfLdEBsY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":277984,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3ME2CRA9TVsSAnZWagAAlcIP+wXIp8T0hj1hIwoZfMGR\nsM8ivJoEtyohzO3zdKtruhyrXeS/k17oQMHKPSrf11GQRW6EzOgSWUEAaJtT\nfGso2n/U4+g77UmGzXWQTgVCA5RQPktlSEbMVR4vKXXmDrFs8SHKc5wfAYxm\naS9dHGw84IISxF/qZVvKrBOuiM30oWpqLgNFfza/2rFs37b/zvUToYcoKo8E\nDF3Ja9eF/Uk4lYVx+N/bn74iz8IUg5ndDxuk3O6MLxhlFtajI6N7LNPfjrIP\nu2iDp7sxUqWzxpeIlp//qcfW8MjGdBhfJq3d7u2sgXLRKHkPyWyS+laVgRX6\nASUdAP1VZeVvGforab80KN9y+jdwqNJCy32DC/jo66l3LuLOdLzQ8ZNm4QZb\nNXDkes2erBR6AVenqy2TDp+im7G4yJvE4ry4cd7yFuC4D81S6nvDD/MkhnId\nvv6Ag3zjKj4YlP9zELTf2QiNqdjymCHecU3NAtl8dE7UOO6o5mVp0/x72wvF\n6L72otnlx9QtmStHiAJmFgJ/XG3xN3nGq4luKO/Yr8EuG6u8g2aUJ2DtDKPi\nIs8Hf2tEhz66wIFhmygpvE9WzNtXWLSkTQg1OHFNQ3o+VznodpizHUY5C2ja\nIfg+uXIetXSStsAiSKOPBhwF35Vd0XJ3m77hOjuf2KG2eybw35M1zmtU7duO\nXJBM\r\n=1l9S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"c3ff9d1a6b599f01634ed2479183aca2c6d57337","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.1+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.1","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.22.1-alpha.15+c3ff9d1a"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"9.1.1","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.4","@types/node":"14.17.4","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"10.0.2","@types/semver":"7.3.6","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.1","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/core_0.22.1-alpha.15_1625080118117_0.6914968693008645","host":"s3://npm-registry-packages"}},"0.22.1-alpha.16":{"name":"@opentelemetry/core","version":"0.22.1-alpha.16","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.22.1-alpha.16","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"9e1cca46ce4f401417bd4834c1d6c6299a6347ed","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.22.1-alpha.16.tgz","fileCount":249,"integrity":"sha512-UI4OOydvnwzJyNhvIjVdKJ6qUQbOEygbCYW/Eumv0JSghPci6aFvrjeht5rV/obXSNA7cZKz9uDc3r8x6/5pyw==","signatures":[{"sig":"MEYCIQCwRKRmZF9ME+iMFEqFF0KUKOBP/x4H64tVoeAVoapnyAIhAKF7+89ohwKCjdFST7qj7hh8iji6dQNSFfkS4ee18jaI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":277985,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3MqaCRA9TVsSAnZWagAAJnkQAKIBXWe0hHc2KUC60HDf\n3fhFv/zl4rdbPtEizujrrpVkBUluDmXv0ZwyAV3azI+sAdRmozfOOOw0iB51\noqkw4rU7IaSNMsU2X343qBumehGx/qZcYmhYKCqi+7ter6S7t3DsqqfSw8wv\njL9bTFCfYFtkyiEn3ukaWCIIhDUx56N1hU8wV3AxcVu6a2snqqzVGPV6NbMp\nNDLLnDKnb0tdTy6ovJNomutXZHhF+phk2IxJrgi/ZHBK+Dant/6Bv1Z6HGBY\nvZHsFJ559b/9llNcmvTBX84aEdt9/YtFBBHgWrHral8vaRt+drmAHCfbSVfW\n4JbXuLwVIScqI5ax+isBgDV2ewmVx+rGQ7uiCVeiixICrByw1t/7+OX7AEY7\nO46raVMxORCkGeihRRa4cxVJacT/rmB1IVDV+HwGAumi2miMIM9vV58EcHAD\nimtOpPVR/EKAxn0buFLCN1qSW1dugKcOKEYqR+5KRfggmexJsQcGCW5QRh+c\nYUyWZv+YdlpDUZfQBEe87JeATGgCJVDnn9aIjsUI4p4i68I0G1ZeWm7dZiGV\n7vlmH6H05G6nzMSf3E4HTdtJcFPxfd+Ukc/Y7W77MLvWmbArJkhac2NIkK6S\nofYRIBofoYAFcBGkhCYCVvnCnk37W87mkXa5BGN/AWJncRveU6qyJWmLBktv\nUjqS\r\n=Sy6V\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"5af147b159c9dfad8d00a20a3b140d55736f1919","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.1+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.1","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.22.1-alpha.16+5af147b1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"10.0.0","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.4","@types/node":"14.17.4","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"10.0.2","@types/semver":"7.3.6","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.1","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/core_0.22.1-alpha.16_1625082521453_0.7838841391541913","host":"s3://npm-registry-packages"}},"0.23.1-alpha.17":{"name":"@opentelemetry/core","version":"0.23.1-alpha.17","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.23.1-alpha.17","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"1bb9d9b14c40620c9e52263bfa99947f07cf39ed","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.23.1-alpha.17.tgz","fileCount":249,"integrity":"sha512-cJ974oxFJTbF27rRTp6VxwIjNM/YXvZjI6h/LR4S8sQm8DFLb1s+ufEFWfjH3bxq4dQyeZeFGYUGMShdB3TTDA==","signatures":[{"sig":"MEUCIQDONnVBzehKZusv6x1DQD6kCaiySt8FD+HIvlJtw7ZMywIgK7/KiJBsSB4jJpCuXT+dBNR434Hwf5TMhIkVtvYKnKI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":277985,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3M8DCRA9TVsSAnZWagAAidEQAJ9SQoxhALvNgJ73jwmx\nFwQAHyqHEUyiBS2O1M+v/vparrMqaFmIFslcXa3L/Kbj/rfI7OT6GAX98qAf\nNdlTSJES1HkjNxniNG6yVuwW4aPQ+jEaejEuO7buDBtYdU9pprucV7S3n4AV\nP2QDHlfSwpHrUWsnuRLLcNcesgOJ6WQQTsabaOj3ZPtEcqmz3/LrIjhZsMcb\ncpey3iTdRGApAHmOwbZmxF958c1//Cd9s0JFxakgY4uXhR2NcQP+jNrGL5IH\nuO/2mCCzq+aeeSynPN1kWddXXm3MXECRjU2VGeglPx77UAFO3r7J5kn0KvsL\nOdHI92/BTwTt2MYkw8K4ZaN5us302+5y4HtIZ08umtIb25OSgmKiX00ikfiB\n7fCI+V06nLKaltxXL6scJ0mEGD8+9x23JoRgkarS5n2Mcil645RtzbYV4W0R\nhsVXi7AsDwH7JWOih2JSn+656NCGXvd9yCjTy+9ha8rt9TjG17I7VdHpQzXt\nMrsQAAK/LJ0v/1R1+NMTq/xcULtbWEfUm2uR7esBjZkfesih80dl5jwESagu\nMEupK6gPflTfVNfRrNrXkBg3DFFGOIBwE4X8RLvg77fooZ86RCL5HjFwsUFu\nYF+Pzbs6TVaT8iG2ImchXrYYaoZ7wsIJNsr/oXnk15HLKEGGKqvR65bvkd4N\n9qkB\r\n=jzy3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"f2a958dfeead4f6ae20901ab3fac04e4fc424a3f","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.1+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.1","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.23.1-alpha.17+f2a958df"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"10.0.0","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.4","@types/node":"14.17.4","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"10.0.2","@types/semver":"7.3.6","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.1","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/core_0.23.1-alpha.17_1625083651075_0.26889805173027304","host":"s3://npm-registry-packages"}},"0.23.0":{"name":"@opentelemetry/core","version":"0.23.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.23.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"611a39255ac8296a79fbc6548a6d3b1bc87ee17e","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.23.0.tgz","fileCount":249,"integrity":"sha512-7COVsnGEW96ITjc0waWYo/R27sFqjPUg4SCoP8XL48zAGr9zjzeuJoQe/xVchs7op//qOeeEEeBxiBvXy2QS0Q==","signatures":[{"sig":"MEUCIE0m6LGDVZbBFpKgiNsXC2hpnF/vC68CKMJWVCkRu9FOAiEAgNM+US07+Z4lZFXRQxlq3ORGoYyZ9CMDyWY1+bL9xms=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":277948,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3NC4CRA9TVsSAnZWagAAUDYP/3fG1Yg+CmVxJSbmneFh\nv5lGxMzbO9HR04Ki98lhB3UM/h5rYSdyKYTxvz2O77IZJj1YD7TFyn4Um9pA\nxDCfY1xVu/cgAmZmGK0nl+IS165jqZ+UZvoa9utWEYqxmMNKPTFQheHiExxT\ng7j4zegrBa4nZaJvsRU7PWE3EhdNefwjOrU2eHpPv3xb+hkAhDqDj1RnFf2C\nBq9Y3BAtTpscX5t6fGgbTfVESozXmiVG1lc+FFTnUwVFV2rvochmQ1GmMRWD\nyVZjlL7FJ3eM6DSnXVUlSVNO182lbEg5ErSCmRl6hI9uAUHV8Cw3YgX2TVaC\nZ+oRi/gJovOG/raFoMbtTh19I8ptZAbKRc263bWEr7+x1tX/NRZb2mGo/o4e\nS4OCH8ifi8As2z0VDFJzqZwFdPghDtrtS5up4/JmCILk2AqoZlgtQztXnXJF\nRokocLsqPWaADs4xx/qmRSgFCNW24ZzMkn3rKFArWHB9QN3zKp/CSsCOX9B0\nkwbbalRc3pTtmQR+TK1qZDLCNwTr93Sk+eD2nVcaGR1iNVnQFOxk+tVpXCt6\nSfJnBifeAthVswEAqHHNgRBouKx1bDWw4JTdswCm/mFvjtx2YuzoLIctBhOc\nbJLfP4Zpnm1JXp/8f9oN9ZboY737uK/14A1G3/HZcHHFaFSvm21tjhdhKzFI\nd7ii\r\n=6plm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"f2a958dfeead4f6ae20901ab3fac04e4fc424a3f","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.8.0","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"0.23.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"10.0.0","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.4","@types/node":"14.17.4","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"10.0.2","@types/semver":"7.3.6","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.1","@types/webpack-env":"1.16.0","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/core_0.23.0_1625084087656_0.0663944390811606","host":"s3://npm-registry-packages"}},"0.23.1-alpha.18":{"name":"@opentelemetry/core","version":"0.23.1-alpha.18","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.23.1-alpha.18","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"cffab476250a7dc5602a55f84f2ee08f9353155c","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.23.1-alpha.18.tgz","fileCount":249,"integrity":"sha512-nNmC+PPLbGDEj/VENJ9PP3dvFYNttVCBsqUcWMaYKC2emcRtsosJ3ZEuxhXrZ/3ARW55Wmqrq1aGhAkIaBVBtA==","signatures":[{"sig":"MEQCIBqL3v7LUyacJtWxXFVvDFBbYI8T8NGgsc4O+oMqu/KQAiAbfalC3JzoGtzw387SipgrX3V7CnrvxRvLHBfD8zpSyg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":277985,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3yTJCRA9TVsSAnZWagAAJLwP/3xwXA4tPD8tOwzW1J7h\nmm2XbnXps6uDc4rN/8V7iVvrzZnIn1sCaJjrcGIE98EIFSben1jxnOamRXjK\n0W8I/YwecwWJR212o819aQM2Ll0VJocH+qRDa5thkRGdYGbMsMxjj/Z9J7nT\nVCYU2sGVLYUZS7PRz3ixT/b3dWahuqXUtp3h13Ui4khmK9oyLBxTNo5vEFGc\nfzEeyvlWCE2lxJNkiB39L0ZyScntjEmOSpD1GTIHx9ka/VKQm/HwZlVHdH38\nGh0RZB2ii7rqmYqW2ERdlKQgiw310G0F2bin+PpPWKAkvh+Y2T8mdlTmXAib\nDCFuAl2p1tCXWYiSiCE0QQR6wMGb9qsp8qe3g9qYFgfVWCjxYFpiNSJX1Nf9\nbQivESN0f0kYrRhvgN8gavSBj5L2BLHx1U3IXxxzuqXwMHhHRJrnZdZOKvks\nV4Vs4eQJsk80SMgzdB/EebbJtu8nS6zByq2XmG7k1yTOv8ToacZ24Ra+34zl\njKS3J0uAKq79DRGg/IcIyxyiaJNLc+sJf+cqKVXTqOxj6AOVTJoz3ukkAdL1\n3QSvScsoQ7B6zRi1oTPwxUcFclDOsXhSi7AyRI82hml1GibwpvolP/6MgPV6\nWbRwWjbX8chUzVFPkIRqw+vfsIlIv8Knr0nuKmrYtIWx5PDDxcAkA/mmvaKf\ne8G5\r\n=JTu7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"4b3425dd09f0a7087c9d741d25c7a9a0be42770c","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.1+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.1","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.23.1-alpha.18+4b3425dd"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"10.0.0","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.4","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"10.0.2","@types/semver":"7.3.6","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.1","@types/webpack-env":"1.16.1","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/core_0.23.1-alpha.18_1625236680530_0.6742213097892524","host":"s3://npm-registry-packages"}},"0.23.1-alpha.3":{"name":"@opentelemetry/core","version":"0.23.1-alpha.3","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.23.1-alpha.3","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"62fbe0158a6e1fbdf42444cc9c695d3a60872000","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.23.1-alpha.3.tgz","fileCount":249,"integrity":"sha512-b1wd6aj8xX5pvKhxhAcYCn24bdDXH2Qwfls4/8nBVagTU0H1hybTMRL+ieKruWCtQ6vJCE52kVZalpYMX8OvGA==","signatures":[{"sig":"MEUCIGIfA5SvKcM5xn6enKxd5TFkge9v7gElPfUSs+++loPyAiEAnnCeB786gqJ3YtjuDQ4otUMDSsy/2LRla4MQCCXRv80=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":277958,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg44dKCRA9TVsSAnZWagAA1WsP/iEHkuBIOdkKWRrBJ6qB\n5m5bbu/ktRS0FlkcthJeQxB8paPz+CbRwRkTO3QszsG8rFEC2msbPP+iLYiw\nRkDYkB/WEAkRuepisjGxKuU8R5dN1wXjhDB2FEze5pyHd5ft00VuVD3Y0KGN\ngbpCYdGgvkv6OauY1hDatvKKQMf/XiuN9a0xMN382RaZC6ZjS7k9zMq0axPO\n+O8QT+iNgQJa9lyCKPdsMhSPXzie4wdcSNgeRCS1ecjgc1ezfta1dBqfDPSG\nQIEKxFxKhUbknnu+Sj79KZPAiZYEPuZ3gUtzrWu67vHnIpebFlaEKhHGzl0n\neQVJ7PZr/E07HlH1C4RzVbkgX4kfznPSD83gAeU5TryaqYVqfLa7Y1Fw6OJr\nWwY5M+Wx/ejAuZJDoUCrMIQVzsiA6LIjibik2OMUTpkNGBv6dRjO3Bl7//B8\nBmX4Za5khvySdlqoBwQ9hxjRGnAP6YMoR+J/Ygfa1bbhj8l0sl7e5cIHlJpj\n+JiY4XSYcVpRtOgQb3lsvISa51SL/+V7qvD+a3Yjr/C02t8X4wTXGpdhp6cS\n/NGm19NK2upES4lDtCwW4uBPjfPO1WqYjFQn3pwgRSWRclFAm1Cc5GJ546Cw\nfjA6Gsysm3CHL+9HHmQXXs3hg6uuZ6HqbC69KLgVEgvCK69E07aZsC8Cj31X\ncVXp\r\n=mxSH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"6ed8d92559df68ef1fd3273598a1860ee5197e53","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.1+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.1","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.23.1-alpha.3+6ed8d925"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.4","karma-mocha":"2.0.1","@types/mocha":"8.2.2","@types/sinon":"10.0.2","@types/semver":"7.3.6","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.1","@types/webpack-env":"1.16.1","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/core_0.23.1-alpha.3_1625524042306_0.46543966264651804","host":"s3://npm-registry-packages"}},"0.23.1-alpha.15":{"name":"@opentelemetry/core","version":"0.23.1-alpha.15","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.23.1-alpha.15","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"193150b3d3f451e5581648f5749aea2c32a1b753","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.23.1-alpha.15.tgz","fileCount":249,"integrity":"sha512-RU+ZJ2QulH9iZNcGdcLimFfPcQkGFPLn+z9AvVyk8h3BSULBNNfl6uuPGXUI9M33WIc2qHPWTMSrvtlbjuTPOA==","signatures":[{"sig":"MEQCICk6zs0Tp1aKpnkRQmAWOy+opu/soP4paG3sGXWlvZYYAiANX5+sWiIG1Hd6u6ZXGP4Oteumy/WzdEPnBL2cdbK6OQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":277960,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8qBKCRA9TVsSAnZWagAA7NwP/jbHRecT80hYav+j2Trk\nHvllU6+EHUjNUsniJPyNqRhraq6hjwk6u4o3AAinyxHJRdvZbDgvRa1j7W/e\nbR6jbuBoeHmRvVNhkJngFRFSKv7UBaDgNQ+o21l2ZWIg82InaNkkPEq6k8Kg\nRNr75NMcUUPAskkYpXe2jIoIwPiTWZeW1ER1zJB2Txmqt46KAMQ+j7rHWdyC\n+dxsQsmAigjHcy3l6rMKJmyzq+Vx8etTQ5uHDplst8S0iRRplbYtf0bxau0Z\nd0fV0l6+x8DQN2tNCu88486oBaAxFmrrwhHREDXgnvaaGgyuVpModG2OXko1\nfMVYMg6LJvdpkTRVQPAzeDmSQ88k85btDFwVeVsMG7RTemqGrHj7NlxxLoiE\no/vrqzevmK77bsY7kAfGfdoG21eWdhXCuQlkLl+kE7SvNPVwIS9AV1L3AbU5\n4wwk8mQ9w/lVzxHmBOfvwgO+yGyE7NOTxXZhQRl4Fj1Xq8e407/tXjLGfrMs\nIAmcivGuIFq1LGU5xixc3TmfhogkG3hhP/f5SIUQmnQixsztRdfqEFlE/jmp\noFBiPIvl/JZnLOveqd3vHtdJEYLeF6rs71DIeMreB34yAlHQTAshIDaQCmdv\nzieXROaMEnr6uVhghz9QZov5q6UQXEWdTPIg6BfOGM5jTu6V8AVDMBFdg0D7\n6uTC\r\n=+QQU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"b67ca0568c333e5d841c9b614ed40b3e107682e9","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.3","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.23.1-alpha.15+b67ca056"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.5","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@types/semver":"7.3.7","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.1","@types/webpack-env":"1.16.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/core_0.23.1-alpha.15_1626513481972_0.648469247946371","host":"s3://npm-registry-packages"}},"0.23.1-alpha.23":{"name":"@opentelemetry/core","version":"0.23.1-alpha.23","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.23.1-alpha.23","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"960e4c5d69d492acba3e2b43baf3dadd46971727","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.23.1-alpha.23.tgz","fileCount":249,"integrity":"sha512-5tZCnu1aqZt8Gy4HLQ7rH+Um/1LuyVqCgcml864j7aHq+THJbPqXK33r5ZbUlIG15HO32POTYZyZ3v6ZAzlhGg==","signatures":[{"sig":"MEUCICfnzFGgTS50B/+HtfxKlkm/CNprbkQVz1zxaoiZ6skfAiEA8390i5ZXPrZwHx2CdbUhAeSjdgF55AviaK6zb0JdVak=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":277960,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+wBhCRA9TVsSAnZWagAAutwQAJaO8fQCkrKXYzcXJmFP\n1a8yzdhZc+mhOl/eHF3m0jzibdXYqWjX5549M8mrM9QAh9Uf5BsHFpokfL9/\nHKIe6WMYNkLd4HFpi+8EVHA7RvGPSFy2G3zPse67/ZgQeqiICOtlv3XLmE9+\nXwZSVYHY/eN9ebsLoAh61Yj3hQTRr2DUiRlS/CFjhvCma9FJuqmQ3zT175Q/\nx61ntPlNxaCYkPEZv+OLCBk1VIk25so/6smoNupR624K63V3oElky2AmHr/e\njy0Qt6cNLPOp17yyZI6aRogW1dC02yezMPvyfSzoAA/3Vmn9OoMLLstLa560\n1qrav57+A4BgOXm6Ml6uU5H6AhmBtg+oGcv/I8M0fxR7tUWmT+4WDLPATzcl\nvCWxRMLmKZ0Tu+MxyQ2C6GIoWgnYGT5sJsiX1ZWzTvxVuSBwZveeaZO0gH+S\nh2L25vsdPdWr6fuc0Zv84hFXBJKQaBxLwKXKxbeGYUtw/6hQEX5Bdq+4vp7y\nYurIqgbVAIQaRWGQQrv25DbWQmBawaysXvOu1ATqRKklyxIaiN8tv32VaJeS\nbPNzYSqQfqwzrl4buVCXnEOnXz53E7BwzJv63PDVWO5ixzE3G3Vjo5xec4Ck\nYR7PFbXP9y62OSkBxm0Gt82jnHqdZcF+v0mdLxh7MJHJCrl1eiYxsZJ6Pnoi\nqruH\r\n=cx7r\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"884d20ab417bf0283ec84a72b9a0fae8ebcb82a1","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.3","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.23.1-alpha.23+884d20ab"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.5","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@types/semver":"7.3.7","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.1","@types/webpack-env":"1.16.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/core_0.23.1-alpha.23_1627062369347_0.7080244540562823","host":"s3://npm-registry-packages"}},"0.23.1-alpha.24":{"name":"@opentelemetry/core","version":"0.23.1-alpha.24","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.23.1-alpha.24","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"92407b6f4f833da0bda7fa0dc0e5c8346b684334","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.23.1-alpha.24.tgz","fileCount":249,"integrity":"sha512-khQlGnH8TMmdD8RAFmydZdPuzUBW7ZacxWJJWoefCO6P9s8fk2osrxu8R3np0AH+enUkmrHCxdxXMLyHKU767w==","signatures":[{"sig":"MEUCIElRVrXBvE/G3cReYoRiwcjPuSxjumKs0FUxEmaVAB/DAiEA3YH6Z6uf3g6U8/Rpho0DrTyL7nd8MhEk4zCWDSi6Gow=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":278104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/Qh2CRA9TVsSAnZWagAA7CIP/3qL2GbDfSV3/YXJEkvd\ngBoXRbTN5TiioknRys9goYojfBwLlk28tHEOdx9nmzW1fi6zO8Lq2YupNIkU\nL6ICFJxJ0SxYtOD2TFxosxu3DpO5YZvtIDCrVqM3WVd8NYxgBWAW0zhxu16I\ngUFm0aNiLXrFsSE4KNQsVrFybsgmN0O5EysMkS3QEPAfg6Cvd9CoPaTFBWHx\n9a7ItpsvaMJcPB2jdRdnuiTJn6YcRwNTDfO3NEPXHE+G/N7TgZlTn8JLLpO9\n0vF5f2yoq4MyBZCmi0iQ2iGWcOuPggm8Hd7pax5gNE2yYpd3CXt4+bt2U2Zz\nzuCYu3IL8R+gRBMuaWV6Dmz0nLhucqL9Z6rxtk9I30S63ER4houDJVGfD7ei\n46B4wmeeWoCEPF8p/rhkTzTbDU7/4wruSdtjcq2hBegPoIGQjkCX34i8TRDO\nBMX83P7OTTHDirycE4RE52ma6vILs3tmav1t9HjGqSdZN8U0jwLun6i9Yal2\nXH1v6IyesZGgFrpOcEJqVE9eaOnex0Nj/7TxIJY96Wx3kdk8ck9HD/hce5Al\nqdW5KOSd3z8R8YKDcCm4YCx2cQ7j9h1quSkJtZSAFOIgszbKK+DjQpT2Mk6y\nMOUo9uZX4c9TtNyE+uFI6Qiw63Nai10NLdCbKNPDfC+Qq1yU8o4cJ/GKeJGc\nqnuo\r\n=cL8J\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"3bc3452814e30274d7eea1f3c9da968b88b1a197","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.3","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.23.1-alpha.24+3bc34528"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.5","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@types/semver":"7.3.7","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.1","@types/webpack-env":"1.16.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/core_0.23.1-alpha.24_1627195509960_0.2678835692542416","host":"s3://npm-registry-packages"}},"0.23.1-alpha.28":{"name":"@opentelemetry/core","version":"0.23.1-alpha.28","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.23.1-alpha.28","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"a1273e81df8f01b8ee2ec74262fa16e67b6e7dba","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.23.1-alpha.28.tgz","fileCount":249,"integrity":"sha512-VeY+KivmqKbIB3ERFUhCyk+iw2GmW1Oaumuz6/iQJmlWnk8cd4CFya0CbiHkjSb5/cKjRDx0j0eEyzJXR1vXVA==","signatures":[{"sig":"MEUCIFMXtKAXD0Pmg9YBg0wMPqnYo8aHtedJYj7JtF6szGMiAiEAq8vYhXWUF7I6/qS+IrHh3zGjnrhVsYdzIwPko5lX7js=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":278104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAGIICRA9TVsSAnZWagAAwqAP+wU0kDk0jubXfJH/0bNy\nIiCtXyRv3hNtHi/BaXPax7ZzlKQROOFRiokqg5KByV1WK2cXj7KHsB8IVzRm\nEW5O+194Y23JfRoEJB/ZDTwn+IeqNi6jKLTEzng71WFRW6v+xKTbMg+2BpaI\nL4NMIv4vjIBHyBpVidC8Lx3v777IDFwCqlgGMaA/B2nEAbBQOH2Hd49T1/Sp\nwFC8nwiica9+3Ryk/qgu//86ldGJ27et+d8Mr0nqGyWlqf9n+kEwq0f5xPaD\njefwCn1VTMAmdjTtOQIjsaqBVTFJs3BQRAyL7YAf00rdHIq4keTPOeCwjtvb\n/BGoYpDbY3Vk8ArDgC4oZyjUjNxo5n0k3lVHgCcmwvVbe+vh57uyHFS0ojJB\nZYha6fTjOESQZcn3gtMNffmZsciMQBRRPhED0VPJzYcLFXL3GEi4wuUHNaAV\n5NkeJ6yb+M04BjRovuobP9r34HEUxmPv6/w9pdGjJG3Giamwua3CFmhYaLme\nHzZ//ez9ULdSNKREA0TYzIc68Y+cN1tSOtiJZtGKLaw/FF0UpzmNIzxTh6Ld\neokEQGqQudF8Ai609pWZ0WP0GX0hywhPoRulb/M++XXj1gCQJgJmLEGOtDYD\n1slp01N/0qZ7oapf+TfF/e7M0v1xxF1J2cawXuNqepTsQNGwxwuyhh63BvsH\nQynU\r\n=SE9J\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"d8fbeddacce3e27aab40b24c2ca3c271155e74ea","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.3","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.23.1-alpha.28+d8fbedda"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.5","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@types/semver":"7.3.7","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.1","@types/webpack-env":"1.16.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/core_0.23.1-alpha.28_1627415047908_0.030968274804864304","host":"s3://npm-registry-packages"}},"0.24.1-alpha.31":{"name":"@opentelemetry/core","version":"0.24.1-alpha.31","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.24.1-alpha.31","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"20f690fb27b2a4cc440dc6ff3ab764c5a4aa86f7","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.24.1-alpha.31.tgz","fileCount":249,"integrity":"sha512-ssPWP6c+jXRc+zaf3W/7pumBKNP/11EU5rjFKpBE3/5ZKNolZwX6e+UhhXAX8FhdpuFEvtwumUmqryiTKuYK6A==","signatures":[{"sig":"MEUCIQDU07to1AQ/1YYlTpVaw0jXN1+71nK8/3h41Wn1XRs48wIgSeFh0Moy1iUe170/0BxVVbYKENpqm7yCkuihuMtFczw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":278104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAWR6CRA9TVsSAnZWagAAorYP/3cF9VP14tfmGhc75Gu0\nXTu62Z3oGU8Q6wJ5Fb8vGyu0kwlt139IRb7k4yjJ/PNCf3b69fOcAV73U5ns\nNuTpfAUApW3ibpR1LBrARMhDWaGXrMYML0KHnmjoSwXfZvWIc9ms7Jrx7wa+\naAVXGHMUWdGFk/XYIBoKdcw/4sa0Dshaj4zDmYRyLPmNUl52Zp13cP4zVfSM\nph6xGUM7Y+gXWe1N3jFfyFJkN6lzecB9uPpyRm5yDVydBwMxKCbGKVud7k43\ncjFnk/LhdB/MHKLlz60U5ZxGmfYSfPwiCTwHJllm/ed4jjc0mG6E+SegJgCB\nsCxryzlz19xW7Iw9Vhvj0cOPQgRon7NTqudfK1RKNWyJGYexwzu4F1k9TVt+\nWXt3nNvW+kOTqByeRu0eBEMMRVmO7YXK9I4ydWXsie1LpDCWIPY0moZ/LMmb\nQoMiNjKWY4M5mNNDydbIQzLrGbof4Mn/ycRYarouMmfChZC5nsAvjfOqRIiq\nvxB7VXdcUTvxQbo3rBQivmn20BvzkPGJ0YL8KUwBQt74ePPIhTdXti5nvisn\ntqss8A6yBMOcGZbpUjj7u0GmAUNaUWGpWPytTU/cyX2GbyeuQOIMGBxSTgmQ\nG508I6IlXwqYVmAkX0Busxzpt+ZPYrtZ3mf11vxABRfbH2zf+exUwkHb7w9i\nGZ5z\r\n=1gsI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"fd2410cc9e8d43210b6ea44b8193fa70ee900499","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.3","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.24.1-alpha.31+fd2410cc"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.5","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@types/semver":"7.3.7","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.1","@types/webpack-env":"1.16.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/core_0.24.1-alpha.31_1627481210523_0.6561009262997808","host":"s3://npm-registry-packages"}},"0.24.0":{"name":"@opentelemetry/core","version":"0.24.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.24.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"94033ebab10fdf008f8dae19c9547dadef30a2b2","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.24.0.tgz","fileCount":249,"integrity":"sha512-KpsfxBbFTZT9zaB4Es/fFLbvSzVl9Io/8UUu/TYl4/HgqkmyVInNlWTgRiKyz9nsHzFpGP1kdZJj+YIut0IFsw==","signatures":[{"sig":"MEUCIQDQnrVf6iQzEdOpjr//1quElNRohEy3tlTzh3knrZ3k6wIgZhwLON4YblbwrTBsF5wtTws9WW5iVjyEA37Am1rcn08=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":278067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAWYkCRA9TVsSAnZWagAAUH4P/i1DQzAOqX6PgEqnop8f\nYYuRYbFzc+qvfvMWZIcsx+JMU4ciJMQrPZYCUKvu2AZDh8/m3m23igm5ekRY\n1Lf+freRoRKWSp/m/de3IfS2dAK+RC+PB0PUZ5hyn9gxRhhcuLP/+j3z7TgC\noqPdvLSZX/ZodSmoOhlWrUTnJS+7lW3q/G753H/tJnQn5WoUzcL/AAjuWfWY\ngQ7kEkp56+J9Ukbnj6VB4FJo+TEbeOfck2pw81sLfpfO1SaUOxjBAvmu0qP2\nbAhsgFPSyVH7Je9FfroJYzyxTTrQGAdXtNv5aR8fofBVx3w5UxMOS0+eYx/g\nJQWP9VOa8q9jf3Aa9Kjn6fF2u2Tp6zhVz4HasHy3AGxIqNvE+9GNbgaDKpnl\nV7NlmklUKt+K2sKfJrTu6w3Glm0XIg1W360LmNtuCHZPZqgvikrj4ab+L1Qa\nUctKvG0/LxxbSxK9I95Yhem3qpljODo5tVgJCzfGRC2uKnGQODjYsYjXQnzj\nu2SSpQBsPeLAgx3Lbi6bce1B/lZrWQ92i676jDRx+hayci+y2S3yZ3b+l01A\nbKMQiE+ExbYnbLMgAEuKXmXo3HHVTm1pkVURdBw7YQTex0xl8U9lkL1E2sVc\nXQrhbYjdsjBN2RHIWlKH9XkJqrS7pCKdxN/Et14QqAo5cG+SY7XiE0r8jnhr\n31Uy\r\n=vueY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"fd2410cc9e8d43210b6ea44b8193fa70ee900499","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.8.0","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"0.24.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.5","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@types/semver":"7.3.7","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.1","@types/webpack-env":"1.16.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/core_0.24.0_1627481636225_0.35947866555167374","host":"s3://npm-registry-packages"}},"0.24.1-alpha.1":{"name":"@opentelemetry/core","version":"0.24.1-alpha.1","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.24.1-alpha.1","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"b158c4da9becc75aa609ab3536dc2b967ef0002e","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.24.1-alpha.1.tgz","fileCount":249,"integrity":"sha512-RnSfl95OWZqo828ci7ot14vsxmBnDEzsX68tAA0dP0iYLP0FGjryPXrROS3ihijFKCgWmUssIVupUspBQFLwwQ==","signatures":[{"sig":"MEUCIC0h7RHUORbFeKLaUFuoqaDYdd/M8HJGkEjstpuoy0EcAiEAvAMgUfB1Y93fbr8vrnXmo/1QekSRXpbO6Iz+ouW+BwA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":278102,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhBFYjCRA9TVsSAnZWagAAoRMP/AqCSHdb5i1Bg+1fnC7k\nuqgEXm8r8VPI6zpbaO74/ObT0sI3D5mLMl+OWabjK1kN24rvZtawRcxBqMAV\nkyItFRQNUgsnxU7835o4PmXBPlZEvBva1XdURPCZQ0CxcrkAuL3bYP0sXtd3\njU+9nzhb4gi+vVNNCiQjPt6OTmScMtPjdGMwlQrmWI6fNokA9IOhH031Bvaa\n0n+JimtUBz9imObZvgOV70VAdBURNTqmbyRAOMwojdFGNAFk0X80Bw1XVXQi\nt1moIZrUjSFX6uL3q95kEnermMiR/SoVvGFrWl26vxgiKFnE/zcIZGTxGiur\n3FXJUYwlUm195TI4AMNMhktYAOkcn9ub03NdR5cmrY5vVXghy+SI1Gy0IGBq\nbU4RfdBJmghgsDdjvJSHlMzGI9b+KXWn6a9Dpz6Jf0oJORkbI+LmXs3cuyD7\nM43XCJWnQNGQZa2rPYm1dVOUp0Xyjqw5dXoBLquvaeh6VxSZFr9wtxgxSdR2\n721yZRxb/cDrYDFHPT2+WhGVYS5nPRrphoWuq9cwxX+yJDi8jxFMJeXEKFxM\nab5trfhs63OO2jkbMKCDIiQktD2WaQKxN/KIVwVoKar3CKn+qpIDoMsnJ78V\nSJRxBmb/LZbdvWo9h5GaYzmxfHWF2vbA2dp2EZO4n8AjRT7ncsfk4fhrWwfi\n3o2M\r\n=VGS6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"3b9cd16a8eeed7a262bdfea4c93098861b4c1ba0","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.3","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.24.1-alpha.1+3b9cd16a"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.6","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@types/semver":"7.3.8","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/core_0.24.1-alpha.1_1627674147588_0.3761671263529687","host":"s3://npm-registry-packages"}},"0.24.1-alpha.4":{"name":"@opentelemetry/core","version":"0.24.1-alpha.4","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.24.1-alpha.4","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"20a8173417739eb4f4d855bc649d29e66efe5f21","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.24.1-alpha.4.tgz","fileCount":249,"integrity":"sha512-Quf/ztiT+KYrvjAKMwI3VwJnmJb+LR2XXF06RZxMENYaU4zvaUaje0SmnEeKrnI91viEU5IfH0SGiyaRt8FWcg==","signatures":[{"sig":"MEUCIFMSxA3hazwpfvxtWdHEJAeCv7Gj08e0LhL1tSO+s1N6AiEAz7MdVRC4+id2CAfMZUvx27EhNo6kA5B16Yn2dCwy6go=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":278125,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDDvBCRA9TVsSAnZWagAAeugP/3J5I7iS1H6wKsep1xaP\nNsdG3vRzQgthHsdT5wdwA8YnaegRC7Y8+QUzdN4TVCBzmSozXFCqpp15Nhau\nN5OSmROdBgndHJhNoQb+sIyXs08FcwECnL1K0wNXiwU3GTaWu5vHQsxlGliZ\nfoM41Ms553Vy2UUdFKYfRtSnmcg+xFI5lMQ5KeHcHOHi643hg3h3HqShagC1\nGv4gVBC2W2wTmyt15Oyk2r7tEborx1mtF8+Zux79GbWFM0F4iPkZcnBPrZNr\nrQIG+Y65YjzQrOWrRN1ErljpGWx6K55hyNY1uDzmRBjn/T6bfwb9TqtAKrRf\nu5EAPoEHiuCFi+C5VqxH8hSK675cRP5Wzh7gc/U+686Io0nenVC/ZFsWYWus\nixIV3JZ2teS6mA0UQ9qooBfZwUAmq0VsPk1czKjxntzHbRj7igJmAD64obM6\nzxZQfjFqwW5DwCQ8EQCSyHbKAsH0ndEoi6PGpnrRNL/GQRbC8pA6tfdCnp7p\n7eyf7V68PD/5T11sBxArwcjfLl/NNOJpGvCVmH+wj2s2iGKNuMOY9+ct3HiX\nJBtbFx324TPU6zs69by+HBDNIntT5lSCSBllOv6i0j+sPyBEBUKXm6IL+J30\nME/I9dBPIiWnZ/SJa//MFOUrFqoVrImEt0NFv4ZonZaRXNsmqq0uyNeJA+zM\nAhB5\r\n=6ikj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"a8d39317b5daad727f2116ca314db0d1420ec488","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.4","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.24.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.6","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@types/semver":"7.3.8","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/core_0.24.1-alpha.4_1628191681504_0.9524828443614137","host":"s3://npm-registry-packages"}},"0.24.1-alpha.5":{"name":"@opentelemetry/core","version":"0.24.1-alpha.5","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.24.1-alpha.5","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"8a9bccabdb5f22bf2879875fb7d8095e56c9a8cf","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.24.1-alpha.5.tgz","fileCount":249,"integrity":"sha512-6LFcVpB9p9M0pVBSabqydU0nqURf3UgHWkEj3Cim2niYk4602J52hJ0kW2GI0HCk8NdxV7c1qxQ3xXrLBahueQ==","signatures":[{"sig":"MEUCIQDibzRoqLw89XUq8ZMOPl1nVxQ8kmejg2KgA3Ix46zQ4QIgaAXFFwujudTX2snLyjVHmLdrYmir0ogYCCJR6fgYhNw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":278142,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDR2ICRA9TVsSAnZWagAApgIP/2e2/cEwtJumesN1KWl3\nbQmNiJ/o/Snv0j8MPmq1JDkJomjRyjtdyTPEZzIDnjQvstU2IZ4jMdw6lrdj\nPjGc5i0C2mHc35qJh4N1XA7mWW2D3XHz/9NZxoS64v4YcZ8ej8EdgGfpPEoV\n/QE3yyI18DiWIhB8kcn8Vv5N2tf43j4HO0UiGVJNM6QbiE5gkTKpyKzgWDmM\nHhLoMRSjnoDn65IhkMofVsYzy0dYqQbtHfp0CzqwC+mZ0TALFk3VH7GL4LAy\nhF0X20erQoCapzvmwHmWWswZakrcgAbPKiv54Up156fKDWyqrC01iZerKPFJ\nDVfb117vW3gdfd2bybiYd8Fp3rvOEybUCjtdlG2SjP0t7Te6iqOz3no/CpMn\nM8JzaXb5cqUgZUBGoMQiEWXaT4KVYOg6Sz4nQuOyoPpNufR9CbQS8Mg9Wmle\nunawZjezBU4T7mcZPMST257Zg1/GTaCytMxxwjIntLXR9oZwBnflXewMjC7j\n8r1RRxGU2xOuFZ5LYMY9j5gcGfPee471Lu/GU5HAZaR4m1cmKUHZReA9TkYW\ntA5Qzw613uae+osQk6EwZQhV/4ZS7oX3kfwuR3ahu5wjOg8trc3bWchKRWtH\njsY1BnbNBkI8rEG5LS/VDFNoRIAKt+ZC0/lTphWiMOa2dqtYbie6btu7pXwY\nUXji\r\n=n7e7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"b69ff35e90a33d20a0154dcd326f1467dfd39e2a","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.4","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.24.1-alpha.5+b69ff35e"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.9","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@types/semver":"7.3.8","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/core_0.24.1-alpha.5_1628249480072_0.9204601130207191","host":"s3://npm-registry-packages"}},"0.24.1-alpha.7":{"name":"@opentelemetry/core","version":"0.24.1-alpha.7","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.24.1-alpha.7","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"2c0b04b47c3017bb44d853c716da5eb6052f04e3","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.24.1-alpha.7.tgz","fileCount":249,"integrity":"sha512-r/ZETvXomy9GARPr2rP5e10/4Q/ONfZkDilqwgIZUeeZpui8WGWeOqbD/m/1tDbsx7f1NS5R4YyGRrGZdddnCA==","signatures":[{"sig":"MEYCIQDy/cs5UWI6+keDYhAzdaSTqDT+bSEUe1KxL4BsS5AgTAIhAI1PGKg3qFK8bmXaX+IRtcwY+nQfAcD0DIWnMjWvjApd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":278142,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDot+CRA9TVsSAnZWagAATWIP/j6jB7Sy5c/NoAFYTLIe\ngN4rjj4GManHfx+EkP3MX7AeWQvIMMLf4zCm1VonmmUcpDzbkbFJUsbDreJX\ncxamxHOJ7GSVy3JfJBe8XSMpTazy+JY5JRSQy24vE+MNIZLd/Qj8zPabT3zi\nid5EDkIncrMV7b73aj/sKCqzjyqV1/3dqonmRmBH1CYY/WRS3RGsY03aKOTq\ni+zM0L1Iz9oFIyQgE7UNjaNt6um2NJSafFtr8sXDS4cmTTRIG7CWhle49T4h\n+nPGIqQI5WJBDOCFMdRBsolGkYVocFP0V/5KGKVGrufY96T18Kn39TwV1uuY\nECuWqhSF0auTwWU1K9KqMtACsDQkMHRhiAfrgK9uc0+/an3fsIUeSi4sVc84\nr4Rh1CnuOG2PCXL/rIEsBDoKwu+fg19/1FP8cP8LXDS/jbcXi4ZriR0Cn36u\nEdBnUwJz48wbpnQbDn0OSY9oWz/cl7afynxfoXWxclpa3jKXnmfdDjHzbFV2\nfd1/+EbJRva8RhwePKPrv5OxiPpaSO2riZq4qEAS4+AZnmlb4J7NydHck0b1\nFQn0Q1mRfrsarpO+ZRHWfoXOIHhCLs1mfAG3jDsC00HK9JLvMHDJfeXmoP9r\nUEH1aZcLNyOhn3TGCDI3sCmwA6fNSVLSPm/cF11ujZIbT6eI6A2zsFUvErRl\nizpJ\r\n=rp9a\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"365d502eaa0ba1f9799998f050d36073e943032e","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.4","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.24.1-alpha.7+365d502e"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.9","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@types/semver":"7.3.8","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/core_0.24.1-alpha.7_1628343166605_0.6809359456559705","host":"s3://npm-registry-packages"}},"0.24.1-alpha.14":{"name":"@opentelemetry/core","version":"0.24.1-alpha.14","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.24.1-alpha.14","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"d4abc159d0b8cc338ccca4087f9bb03fa52169b9","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.24.1-alpha.14.tgz","fileCount":249,"integrity":"sha512-dOI3rhczMgAvx/L15sEKjECei12P5Nul7SrAstzlFeVmrP2LuYCeazywkt2qO4YtGZINCooFb6E5oM1l/Ya0rQ==","signatures":[{"sig":"MEQCIF/jbmZ0R06PyPMVfWiMbXlDUOLsnVOiTrUF1+43H1zyAiANa5N1JPHph6P+lp0mrzQ92zdFZpVAkFKr4A44U/uC0A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":278416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhE+PBCRA9TVsSAnZWagAAo8oP/1X2eUQDeA1MpxNEoW1b\nlEu7YS1i3b2hfxV50siX6pae4+aekY3dL37S1pbFoor2UqohbfqK7j/eySZK\n09SgOFynFdBtEKtqkohBVAEuAKl3xEwrOovvlTLRXL8KwhyCqilWe2FDKFH3\nl11JkvKzTp35tGMUdHrd85QAaanLC5d+1MobWYghpVzPkYFOPT2G/0zOqjzo\n1SykuOCUY5Doj44HJpdTScFwUjxxi31jv3hvaM7ZtDOQFChf5sKRPxKiGxHw\nYqYpRSvtG7TaPS4eVJKTEoRWhp7F1mwsC932Wvmwz9+6kHRCqLy/sfkyUNkg\nnVL0HFYbgg8yRBiUTHcTNsU8v5JNaaKUut1nFc3oyYRddDxiCgcU6laIjHac\nwHxzT+nArbiNRQEFgaPq80xSqkf9eBqG30369hxjKAxHrtzZMy1xHDsbteHa\nlEqubfBV+lXFfJg0JOdyGdCoof+TcE5F8Ch4tjEZsQb5EzpQIyjnRmejiR2P\nT57a17GrV4rMSvtf6hs9Fgwj1krohSu1arlbE1jqLF/WhPjJpGIEwFj/MFyY\no9LpGxpPprqpmyoR5pyOHJbesGedXFjZXiCZl0eVH9TTXZhINHlajn3UoXpB\nWFF4pM6uP/T/7JbcrAIzrX3ckLZKVjHVIjJUUYr1+lHcu/yJhSSexfoJ0pD/\niBcn\r\n=dL62\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"4553b29d4a04b5b7e4bf87cad64dc2fc8c740d8e","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.4","dependencies":{"semver":"^7.1.3","@opentelemetry/semantic-conventions":"^0.24.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.9","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@types/semver":"7.3.8","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/core_0.24.1-alpha.14_1628693441009_0.3435884751468248","host":"s3://npm-registry-packages"}},"0.24.1-alpha.20":{"name":"@opentelemetry/core","version":"0.24.1-alpha.20","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.24.1-alpha.20","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"5da8097be3c101088033efc4b83d6f2bf2c9555c","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.24.1-alpha.20.tgz","fileCount":249,"integrity":"sha512-F5upYCidrDm989q7TQksHneXEX5tH3QVE/P4CIAKp4CD43jMIwPb1yjcWw8VBbRYeHHw+SbsUZSSOagyPhAG6A==","signatures":[{"sig":"MEQCIHlKSLTHnhkLTZsijzqyER7OHLBFXZeL/4yuatdyX8PnAiB5F+xx00LvX8BezspYr35hMVFf8Zwkx1UAEZ5Mcsci6g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":278416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHCTuCRA9TVsSAnZWagAAzw4P/0D/VBMOtYuTa0ti1ddq\n/jqr9F70JWNsKKwPeVxZiV2sHDyykCuDEtZu33pbl4Nm1h4ULHkEf24FZWx1\n1a1uwvMKsdSmlexvIHy4bxDymqnjLxr0rJry725Z+nGLhZ+kOKOdOkaxRNXE\nreo2MWMvVE/76SbBJSxjLu83ovE3m9M5slot/SXY5qH/UAMa6OsI4BCGIKgR\n7FpK8nYRlTX2IuuJ/bSWKLwWlc+5cJkdedz0O1Ckq3FAX8/iug3MbD/vZilH\nkxiJ95+Tp/zSEoursOtkDYkgVJBbXei+8Mmb4nrK5PnBvFv0VT1i30D4yEPM\nwncsndvZC2N/pJ+rnSyE2rM7Tosp+Ds/IsOD7IZLpZKeLKlg/kQQz+lkxxQS\n1uE7Wr+DwglLrA3oHxfIUAX0aGRVWGNfeZuq8snn8ecVTTpYDoNALN9exT0W\n+46IuIQAmf8qun/+SLt61y3Qq6nlX2rw/q6vQQ2S/dZGB/F/+bMxSZDkSXm1\nJd4AzSYT874dk/WwWlaahBkxXJt2no/gJLT8pUj7GDzEevwPbGIl0elB9Ext\n/wqs23PENfwopt1PGzlYTtttzgk5jYRqWrg5qHpttL+k71cMq1q5De+Lkxze\nG/K0Sh/nhCk83JS7cW4Ba+DAbb+LMHRHoOxnCWsLkhE7lhE1vnvZpzkBmNtj\nslOT\r\n=n/mR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"f12913899ff5c588e10830e5ba7183d9115c3442","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.4","dependencies":{"semver":"^7.3.5","@opentelemetry/semantic-conventions":"^0.24.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.9","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@types/semver":"7.3.8","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/core_0.24.1-alpha.20_1629234413907_0.8521627902056683","host":"s3://npm-registry-packages"}},"0.25.1-alpha.21":{"name":"@opentelemetry/core","version":"0.25.1-alpha.21","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.25.1-alpha.21","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"3964bf84cc9175cbaa6804c05212f3978d11f7bc","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.25.1-alpha.21.tgz","fileCount":249,"integrity":"sha512-vQH2DLeLxu9t/jXXE8m3qZPsGkoO9CXzfjnMqhxbH88mkCXd8zMrY+cSOh4XTVUOXsgBDQfkDDhxevJ3Lqqy0g==","signatures":[{"sig":"MEYCIQCkRa4A6WToKYkaPPr5KJN1hvNpzck0gFUNU4J9R7/07wIhAJr+cw+09Gt53Pz8FIrSEJtLHIIOWMXnXfnqPPqPVhwR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":278434,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHWqdCRA9TVsSAnZWagAAaV0P/0tdYqE9uW6b5Q7vtYBW\nlfnviO4Mr2IHsvqNCoowjh403DQK9QBAOrkzfJxneGcFOGUH1Ow+C6xDuPJd\n/VjggcAcYoOp271C+7VJjAw59vY5RdAXwdfP8HcEQoXrulfiLAAmLOnuB89K\n0LC40HfzqaxFnprKD8oXMJYon8uWQ7nA4Vwr8yxdTbyjR/8PI+H3PbRs9a3l\nayGUHSsdzWZZ0N/jfv7KkPgsE1Zr6sRy6v5d8Wtknc949R2ARy0/YM79Snin\nPZi1NFDOR+wAHY5zopOtPKCdRIjMfjxHaljpVy0FLo1pvpvyyw/fTzc/isZv\n9G2n70lY9lV2JYc/uN/M8JR+HfRVIJJGxiMqQOV/+Yn2yOvTiKkDBAyMyBnY\nbRBrbUh/BqrakMdAmxXr7YHag3gFiaQp/DT3eSNSTJnGDvzl62kbTicJTbjm\nVnQ4fSJKGFA/ZS3OK97oQuw2EtCg3Ze8uof+5i44iQOrbXpDigWIqHwsLM3x\nSopx58kXrOmSy91OwetCaCVZ4YhzvT1rQt46ocVypm8yGy8jtWQWtbeZgxHx\nQVV8L1OI+YpSv/srHRdZku8Gajn3jeDGW3phwOpruCVV45geIT/El1H2LmgV\nQKqwD6EGgeIHnX90A9LzqDHYKK1Alcgo3iC3N5rvLT+ymxN/Ty5/05N7vREh\nBFVS\r\n=et8m\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"0ef1fc28d366b74d98b73b5d6334ffdc75342fe2","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.4","dependencies":{"semver":"^7.3.5","@opentelemetry/semantic-conventions":"^0.25.1-alpha.21+0ef1fc28"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.9","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@types/semver":"7.3.8","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/core_0.25.1-alpha.21_1629317789158_0.3132947703025293","host":"s3://npm-registry-packages"}},"0.25.0":{"name":"@opentelemetry/core","version":"0.25.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.25.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"44fae79865483be5dacdf72f99db9f1a603c4bae","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.25.0.tgz","fileCount":249,"integrity":"sha512-8OTWF4vfCENU112XB5ElLqf0eq/FhsY0SBvvY65vB3+fbZ2Oi+CPsRASrUZWGtC9MJ5rK2lBlY+/jI4a/NPPBg==","signatures":[{"sig":"MEUCIQDiAdei/6EAvQ2kKsuAzxhkGLvSWz46t4wTVZBRX5Rt3QIgaQEaQt8+rumNVdBtXUq9ybMpdpt4AtkQN9FVyymJqZI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":278397,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHXi3CRA9TVsSAnZWagAAJzoP/3xEvrnYf1hSPeNvYnxP\ndvJUWqtpZEA12mh4gqyF/oSbt5XLQrPO8pzYvdu36s/ds7CRI6UAF5vP+df5\nCtVbDfnu/wg9EWzK8RxHOc3F6oIgiQIOzVt7RA3GnF89fiZjWwDDKzKjScP5\nfxEnuhJ1WfFSAQSXsdcTu+tgzVO1598VHGtoCvI/yjkY08rRO14n5gCT4tuI\nWT0KP8VD4rVVW4uQsU2LoxxowUSKQAxzg3zv6hui65dTX0j6AlSfn+VdOp3h\n3/fFyRo4Jt0jIIkVvneCSzEZXGyXXKJg8gb2pB3wLTNJL7EFG1MggVOaKe3i\n72ao+wlPW+U50weGLURdPBarzpoM0mKfcflshwyzg4AMobqsQEPDxo7AsItm\n7EKfGtZDs7BNli0GsgIFHUsP9c2NqM8q0wHEJISMIcBC0eQ5G7vjhD4o0pfk\nkJHKVvkMbJTMotpsGzEDi3kSPdJiRX8274FQr/Qqw7NBw3gtCbeWc0cS/00o\nLmWUVn6KqFk9+rnezOACPY+qZTpRe+/s+Cg9nltLp84wZWofpDDZCYrBnkVM\nGJbgWzo8liBFDYmjL2WWeIAGrgn36IdC4+zFpxkLtFtY4g71ZPyzEZoxns73\nSWMXPJZc4ozacCOT0nSnpwg4FcRPoL+P/RFuHp5TR6ZryioxXIzVxzF3L7PT\nG1nf\r\n=h/nc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"0ef1fc28d366b74d98b73b5d6334ffdc75342fe2","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.8.0","dependencies":{"semver":"^7.3.5","@opentelemetry/semantic-conventions":"0.25.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.9","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@types/semver":"7.3.8","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/core_0.25.0_1629321399688_0.048165180120773865","host":"s3://npm-registry-packages"}},"0.25.1-alpha.2":{"name":"@opentelemetry/core","version":"0.25.1-alpha.2","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.25.1-alpha.2","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"09debb5ed505cffb3928d8e7feebb37e1522885d","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.25.1-alpha.2.tgz","fileCount":249,"integrity":"sha512-ZiGvRiA7gs5EHNH2bKWzQ0OVQcKCBVL0hzAWL+VDL889C29xnr7+1nRP+OMiu7YEJpdgGRhzpxbd14y57MHQQQ==","signatures":[{"sig":"MEQCIHFvmED8zhZCikp34UygYlYBxghnsHe/U7NJSC/xsASOAiBnNXGp7RYWOHXqUrNIiX1bZV9VVWjiGad9MEfy5ipnOg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":278771,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJBXpCRA9TVsSAnZWagAA2FwP/jbk8b5Ky2d10Ti4cmnh\n2+nyABPMH+bFnPLZh5kQEmolDUEi4ipIKA3WNXyEnTarIlmvjj4Sw8lLIIjX\n+kSyza1PpuLTsHlj6VyzjMo2nSChE8RtbeyrriNopeOQP7tbWNUfJaJeMB6z\nP3psCSRiwLzJ+7qPQVgpYsEqTZpC0BHRZDYUi8M68E2Kq6Vjlm4r6CCwvE+O\n/WoyeCRaAIp1b3W3lFYozDV/duRNg+7HZxrpZSVEaxyO8kSmpcSrHaMojT4c\nls6m99/72zeMANjSsWfFleYklzgF0Yi9TBazSZGVZmUQ+SRb3hZmP5gElJn0\nAjkGhpR3CRwVvbfUMofMAIe+FawmSOMwO9L1by+/zMSMqB4t9W4IKWsxeiGK\nodTpIYT+sr6ApmRPR4TVNpiaF1EMTa+Fqw60wgdys8G59H0uKdKQ2GefQnpe\nLdaEzoBltzKApLRalcpXHeVesNoIcuFHYbmCZnsHl8N3GNSWiG++tsiXRyui\nUBJpAl/zn8TQU0zhrbwWEiJBSWUNmnpRX9AHnSbVEMg3Av0itQ6NqtVunfx4\nP6jTJRvB6VbTUfSwbPMri7uJrBkfXnNi/EOVXH+75kWd48f6Zi3d27+vVeKX\nOCGpI66T8hWShcGioATj8jDUmrK3iRJD51dfzxLIiZMekFmbqt2z8BxTyYRV\nNNAT\r\n=JxIa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"78a78c093c2df24b66c47af4e037da9a6098fedb","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.5","dependencies":{"semver":"^7.3.5","@opentelemetry/semantic-conventions":"^0.25.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.9","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@types/semver":"7.3.8","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/core_0.25.1-alpha.2_1629754857843_0.5889530293850438","host":"s3://npm-registry-packages"}},"0.25.1-alpha.4":{"name":"@opentelemetry/core","version":"0.25.1-alpha.4","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.25.1-alpha.4","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"5c6316a64bd7b2420531edffed21c1d6db0ea3a3","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.25.1-alpha.4.tgz","fileCount":249,"integrity":"sha512-21sN7WrLwY2CEHczCOwL5s6mwNyEoxLiIiXlYS8PoYMT1a7Ta6vfYzIyBbktDf3g/oDOCwlmZcL6J1OxPb+XfQ==","signatures":[{"sig":"MEUCIQCvZ1D8+kRoZREHkkuTlLjLbpz2cd/xoyA/bnOc8LJsDQIgMphcbyTI5cDIfzjq9QJaOoh6NiN9wmcddj0ZTFdie2s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":278789,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJUltCRA9TVsSAnZWagAA4zQP/0tSFGDbCUBj5998Cyfn\nhNu71d+ecYJBqjB685luwZqT1Xc12JZecrHeDyEYcw6Oi9S/33v3vyQlVKet\nmVdfOAg5uaDffXQUHQbhuZ5V8j2twl35Uu46bEFxwdH9wBR3kOHnkPhIVArf\nN2JMIonpDNMgzCJnDV974hrOPfHD3u4qoqxR6cRW+PppL6rT1kDr3TMzZV9U\nJvXsi/Lru5eqnJeKcgxXt0eIYbLlrbzxtgP/eSjAuV8/yP/HVw9ztEAg56/R\nv5u16LtkQt+I49y+v+eqWR9uBCeS6mfiyNndLYQ+y+N795bFAa5pW6FOuy8L\nRLN0NHhRQP5R80bKKupt/Xwv9NsmA7GE96ltFLeq+p1NIxkVolhztFrDqz5D\nDO1vDLMIbpQmuvm8radruSh3pAMpsPS94Zgpz2/GovpvgoV4qohvYgf9NjxI\nVmxd3mPUmyxaRDQ2NloDld+8ag6ENN/ltrSS5P1wGDQdbGjAyAnNmaLWT+H5\nr/Lmr9eUNutKc/iuPbwKNJoCHMidiGAKCJBFhGsEtpVBUWskxKJ1AmLnFVV/\nBuKQ0VTPmPDS4rXZZwyq7q1/18QVTE/ikLDcbwZS+I6ItsjojagQx9WIknoK\nvo8vDQCX5hMZfjaM6JkSRZ3Vs0oQS9s9qGXlnblRG3fSCvZQYbpMqcbhDboq\n0n52\r\n=Xwkp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"3cbd530f2ee5c06376210402eb87ec9e362853c5","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.5","dependencies":{"semver":"^7.3.5","@opentelemetry/semantic-conventions":"^0.25.1-alpha.4+3cbd530f"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.11","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@types/semver":"7.3.8","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/core_0.25.1-alpha.4_1629833581153_0.12507090923596298","host":"s3://npm-registry-packages"}},"0.25.1-alpha.12":{"name":"@opentelemetry/core","version":"0.25.1-alpha.12","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.25.1-alpha.12","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"32d5ba32704dceeace31725dee4cb5350b6f5563","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.25.1-alpha.12.tgz","fileCount":249,"integrity":"sha512-0IF5G/46MFxkfpelj++ff2s0niHQa4zyTTLSann+PfB+uVxh5RNka2xg3E4tpDqfPGLWPUBmtazXk7TYYW6Fuw==","signatures":[{"sig":"MEQCICqm779lrykSO4XoUnAfgoAyxaJxnm9+bcxG3UGLGuI5AiBdXx1eWurci6pyPVvdQF35iNsuCuZHVziVO1aGar0XCw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":278717,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLT3lCRA9TVsSAnZWagAA1pIP/R9UOClbtC2df/EjjalG\nokktycuIW4q17HEDRbuQj3mzH36v2f9nUjpFkXYDfZAuLoNrtj3U9S1Ff3OL\n3bWruQynGhQzgEsA/+i95Z9gicnD5zQwkpaf60LeYpGek7xTcndvYLgu8V3i\nV4TzYQwOGD4EARubaGd9Yz/BVfyKu2d1yLTdx2RcZlYzZQrPWXXxFK7auKKa\nXufpQ/WoZjHoV8W+00jT2S14fJk1pB9G1vNG73HcPX/8/I2WXMeSNwF7m2J+\n1+WtUNvljjhxbtPvWvqRAIfXiIAD+lyWEO9femsLRaP1M7QmIHdcSNN0ERBM\n0nRokXFesF9MmvQlAnSf/N8Z51ltXDlEIUXpj4c0cqSI8+rsuJpC+hkOzqYl\nlWTvJKKYsOp4VaIWMtQekS1eLSY9rPdJ0jW3YLws6g875KQiw8il5U/TlsVj\nUfBYmQMOirc7OeEv70Jb2Ja/DnDsVyB9ig59k6Pe23s5kn2YjpaCEq0DYQoG\nMPW6lFcblCyrqP7BwDqKLPaUrfhyddTQa67Z+C2HoXAryiNZwniyvXnKucoJ\nTqF+/LFJ/M0/5waCmZ4IcPd9sAHHzt0DjzkdvHpydtwUPIDMxcFrS675hWrV\nyHdrSr/EFKL8nwwEQshHh1iIGpcHByAliWaeVH0oJQCjCl78GcUzKklnsstB\nugG5\r\n=7Ekk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"7d2c4aaeb08e6c680f8b46cefcdfe955d7abe4b2","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.5","dependencies":{"semver":"^7.3.5","@opentelemetry/semantic-conventions":"^0.25.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.11","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@types/semver":"7.3.8","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/core_0.25.1-alpha.12_1630354916883_0.6798805583608047","host":"s3://npm-registry-packages"}},"0.25.1-alpha.13":{"name":"@opentelemetry/core","version":"0.25.1-alpha.13","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.25.1-alpha.13","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"227db88297d700e3dc097dd186d7144b47b19aeb","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.25.1-alpha.13.tgz","fileCount":249,"integrity":"sha512-Ylw/84+IuDTqcOMb0pZeuD78edrgbrh/e96LQvZIyYC5dJ+muXYgFZupnA0mm9GTlQR65t9AysMNupT6IGyRBg==","signatures":[{"sig":"MEUCIAFblqzq9TV1mWru2bpfvgOrExyvRRSbSbkYthNBAZhBAiEA6d84pGZlFy8eeDj0mcDcsQB75qI6GYcZfsv2tUFQxpQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":278872,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLUJsCRA9TVsSAnZWagAAYsAP/3Xgbb00VjXCLOmXmTqQ\ni/Z7lHnipACzFhnpDt8nF3Ivsg7ySR/aitLsQHs+T/lZazFpLP+Vef9sVd/T\nqsFgLVzK5EOltFUVe0VD2hWoEUHITaryvt2dKxQgo9eE+aXe3XJF8GJktDW5\naFKVm3gKP3fsgc8Tn7IUiTsAR6/CjXHY4oO+Wddqlzldd6mrX28ymWrdiOTU\ni0i/r5HYS+lRKnZJ8ATxGvzccheiEkYmdKDovJI3hf+0rnaX68LV+74UDK/z\nZSS753yoScJjNhRMZsjyBE8teuH/U65nsvVFJHmRJ7m6hPQkRONL22RMlmc8\nEJqHC9SBzmg2kVmclbTowsyqspI3QdY+P1Ts4UF28Ayd3MNvCQ/XkeKTwfDi\nSA5DbOQDSoSbbEtpx9Aqo1Cr/dhB/U5nP0IU06CzP3cGDfEEtZtrlsn05AUU\nBW7mrhdD+NYYwMJD27VjZBufmhrdMWb6OK1sbc+DeKjq7ll/NSjzKGRsmEHq\nC8UNtua4/Iv4lZNWnx5UN1XEsRSmqqRUd3pYRYR5V6wWIHip6dwuAshSdcDs\nd50nHa+9JtYrUNC1BWYMzChiInLuC0lgK12QmluRvibpM0TsYzOs97rz0X9M\nwupjl6NeI0dZ2Pfico5lGec+FZk9fUhdKtxyBUxJc/02a8sR/3crSaMUR8RM\nG+gy\r\n=Ru+g\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"f0caa22ffcb26af2a2f05260f138a494e120a955","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-filtered-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.5","dependencies":{"semver":"^7.3.5","@opentelemetry/semantic-conventions":"^0.25.1-alpha.13+f0caa22f"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.11","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@types/semver":"7.3.8","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/core_0.25.1-alpha.13_1630356076272_0.19452269658121724","host":"s3://npm-registry-packages"}},"0.25.1-alpha.23":{"name":"@opentelemetry/core","version":"0.25.1-alpha.23","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.25.1-alpha.23","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"0b8df21ac6114ef0e91b5ad0304ab0b4481d441f","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.25.1-alpha.23.tgz","fileCount":249,"integrity":"sha512-NqnAJ6b63L+nzMhZl6AMY9H1KQcvNACnbev7j8wt34teDowHUUBBrDty8zgV5nd0Jl8yXhpFPQpQS7Gzf4NzMQ==","signatures":[{"sig":"MEUCIELhHNWxfSRJpYnTNoDfm6djL3x+3kZlQMPPHI8TAZoYAiEAib4bpw8eNFVegXDuex3AHi+20AooHdShz5kJNsjU0rs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":280417,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOTXkCRA9TVsSAnZWagAA6ggP/1k0dWNzpgeo5VNv0lTp\n/DwHl22jE77Joll5FC6jPmrnfC9ygVZFtsNLL+5/+xVzGtqf/o3wiTx+NeUK\nHBdx8ZpX60ZyPAFs7M/8A+zaJzyzWwYP4vrFI6wfU9HXvjXS106Lncwb1ytT\nq0yLmksJwEOKWh9FxtoQdR3DXrYf+AC51KHadg/l0fPsvdgmMyK0wgfR+ryn\nWbyEGTLOyOp4Hr9yuUK9csMA7SO1pz3FardOq9qfSG2LXloQVyuxZ2L5d6J5\nsrOnvv07v+dTG7CBS4OzReVdLEQXj2D9L0MYfMWTPicp6F7FRPEU1UjEzxYD\nHnEXA/5UH4kAlFIDmDfRmUCW84Ej6Qh5foplUgiMfBrR9cF9zRcJosuaMcp/\nVCb7jlErac2aW8Ov45wmabmWFF334NHkw9Pr9m+SrSWN0+3hqGH5nJOEhgA7\n1ZS6pJp5szgpu+aSd036typrQaez2kN2RgHlSL6aClqNzjX2r+zsFdg+kvk7\nqujZ77vYJ9RtXYuikVTRGyBc6f14iMmUh9TLRRq16IAEdZmF8SvxjSjRKoEk\n528GDX8uMj0ftzPjetz23Sg5zlpOEeLzmQ7BfCIhuxJXl9QidPBVceb33nuH\njyFBL+JzYRd/GduRna9lLOv7xsvli4aT5x8JRtnAwSA0m7cbXYi/fO0DfSIp\nQQZS\r\n=C0d5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"feea5167c15c41f0aeedc60959e36c18315c7ede","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-filtered-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (linux)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.17.6","dependencies":{"semver":"^7.3.5","@opentelemetry/semantic-conventions":"^0.25.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.11","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@types/semver":"7.3.8","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/core_0.25.1-alpha.23_1631139299775_0.9821525432799365","host":"s3://npm-registry-packages"}},"0.26.0":{"name":"@opentelemetry/core","version":"0.26.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@0.26.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"eb7e05dc5ca83a49c4f7f817dd38a3cafb7b210a","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-0.26.0.tgz","fileCount":249,"integrity":"sha512-nsHG5uIxqNKxZve6P8QtRFfymYgjE/rIDtEmxEfB9SMpToGEBIrCzgrWqEAT8lnpzB/l029pFl1TquuEb/cmcw==","signatures":[{"sig":"MEUCIFUfA0tpWcBQnxkzjrr0eNF91yq0xd83tmAomqhwnsEyAiEAiI8XaWAFDywZgvTPBX6fQYru4uxA1/YiF0MK49KGNtg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":280398},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"fa2e897587a2441205fd085772d80a0a225ee78e","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-filtered-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics","directories":{},"_nodeVersion":"14.8.0","dependencies":{"semver":"^7.3.5","@opentelemetry/semantic-conventions":"0.26.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.11","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@types/semver":"7.3.8","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/core_0.26.0_1633005327650_0.5857714959632765","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@opentelemetry/core","version":"1.0.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.0.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"517f4181a52312e74c2de8b5c63dfdefc7a924f0","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.0.0.tgz","fileCount":249,"integrity":"sha512-1+qvKilADnSFW4PiXy+f7D22pvfGVxepZ69GcbF8cTcbQTUt7w63xEBWn5f5j92x9I3c0sqbW1RUx5/a4wgzxA==","signatures":[{"sig":"MEUCIBORQ3BetxNJq1AFW4eBeQshSYxppTPSowFSWqmK6LZgAiEA97WZGcd8X7eMDi565EsI0zFoNOS7f7ZghrRGbRYZc0s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":280375},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"69b925d142a4405c7c6bec7deadd8b4e96c7d5d6","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-filtered-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"_nodeVersion":"14.8.0","dependencies":{"semver":"^7.3.5","@opentelemetry/semantic-conventions":"1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.11","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@types/semver":"7.3.8","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/core_1.0.0_1633035220911_0.17894683787361632","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@opentelemetry/core","version":"1.0.1","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.0.1","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"5e08cef21946fdea7952f544e8f667f6d2a0ded8","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.0.1.tgz","fileCount":273,"integrity":"sha512-90nQ2X6b/8X+xjcLDBYKooAcOsIlwLRYm+1VsxcX5cHl6V4CSVmDpBreQSDH/A21SqROzapk6813008SatmPpQ==","signatures":[{"sig":"MEQCIGBhxKVNhaG1eJrxLvnQXdfUmIzvnmAqj1vK5V+8GfVsAiBJKx/ZiLkS7HWrtedeEtqReYoSfgKvPGfL2CUaJ62TsA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":499844,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2UpBCRA9TVsSAnZWagAA2GIP/1InjmPaOFtbQ45aD1P2\nusABVo0YwMqw3IpwGwyFCQqYgRNZL5VepAVDIwMdHnyOE7m1QtTdC+kcJxDg\noWcFrbP9k9HZbm/Tm9N33SPUblvtEg5U25H/e5rDrfiyvamnNX3iKVVk2+IQ\nUZ5ZUa86CaxNpoWkBJK2wA9R3Lr7pKJansv9cKneaaeCR+xKUCSvfk+9KwQz\nXotgxYwLBjBLo3NMiAztaZiap+5htfXhitsuvTnqOa7MIh5jj5TuephrSgja\npCafqN4kUCrkABjCZ04GJ4LAOlgKNL8/GHYKHlOuvvUtQHbYF+D9Qh8jV9hU\npSvkkHkjc/TBoftnJzYnUAl1yyGiaYT6WGlI5ifwRhWcaZov8bKzQ06t2TDj\nT1xZH7sdLz3KzChrTKZcuUtgW9zrsA7rrbG3ZwMyNCF1TstRxfVQVQKdO+0G\n2jgMw3xGsw6yS3A8hWFWuNsgjxSO/7LMBCq4gYlZwGA2T8d1y5TIXTkDF+wn\naLWJks515a4c2iwRidsEZbEOeuI2anWfnKb+7HKAcTg2t7l6pP+h39g5nMAu\nGExPBjPtutOBmadCfbdUKfLWC5sJl0VNHzD1/0qYiBGEty1La/xFBmg7Iw2T\nqexvnnGspS6RIlLDxh8zOhjHufbhgNZ1CNSLr1BIYHwW3WhKH1BmqjvW/LJN\nF3D4\r\n=fTEg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"9cf402ee4231ee1446884b5f59958ceafc1b5188","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-filtered-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/semantic-conventions":"1.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.7","lerna":"3.22.1","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.11","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","karma-webpack":"4.0.2","@opentelemetry/api":"~1.0.3","@types/webpack-env":"1.16.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.0.1_1636642280795_0.21627689195286925","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@opentelemetry/core","version":"1.1.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.1.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"c1a7ae585b77abcaf08532e2b45c227ed241dec7","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.1.0.tgz","fileCount":144,"integrity":"sha512-Ln36HD3wvNPak066SPzp2LmhXM9TN+vxUhD82Ct/4Cw1DQ9Pu/wYngHE0dA+NGwST7ORE266tZQcNx5fwUnDBA==","signatures":[{"sig":"MEUCIQD4E+K2hfic6AhQWFTgFlKabB9J1gUKTMcvA2ERe9S9vQIgTh9Kn8B9g2fZbzvyMqutMCA17KBmmJPXWqmmLZ9Lmsg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":273258,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiND6TACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmobNA//az0JMqdQCpwbC7SxYXPATV8TbZD+C7aJd1CEZxlQyoU3DObD\r\ncPAwvjy0lcVSvNVdARD8Kx5aqZJ4DpsE9IcTQw09x4jTdBYJiyVLXPckrvjk\r\nXXOVUNwTpaiMjYsJ60YyQXqN+C/5SRO9zUA7jZOycRLo/6Wd79lBw6IOr+Gt\r\nF8waqAXyMhQx1HL9R4rM1Uq/1k3ES5UrIw+UY6hF1PhBAz9OGdhuXybNnSYv\r\njfsUPiwK118CEVpCbOhYqX0LpbdI3xNFplw3aQh9ML6ZRWUZSCYxCtXdIz35\r\nEIJc8vIsbn5SGoWNeHdMmMRi5CJEK236x1QqgcKug8q0ReNCe8X161Lc436v\r\nxt3BDoo8dlBgLz5Z8vv36ClghruQ8xEoRa17BQZDR+cDD8VmYNJ0+wzYnOUA\r\nhBDoit6OmvY7q/5Bam4UAJNzvVeoMzzp5N0+ZQwPHaq4WfittIvGQC8x0dDC\r\nrUUsuCkLw2f7LXh34muEx6N0Nb2wbpNkbIyxldjbYupka+AyA2CjaddBcGrO\r\n6J6E8XWA0PvS41nuQjsCokiLYo51ItumP44tE5MoqItRMgsXkzUEoRlC7Rlt\r\ng5ow/MU+spkDgFwKfSZZNel92rzw6+lrh8XIi8BpmA8g2Cllo+Vh1kwB6zbd\r\n/1PKZ04yOG2taMfMaaw2enW+zGkamTgGxho=\r\n=7H1+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"f384303ac469914d0dbafde0758ccdae473f336e","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/semantic-conventions":"1.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","lerna":"3.22.1","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.4.4","@types/node":"14.17.33","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.6","karma-webpack":"4.0.2","@opentelemetry/api":"~1.1.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.1.0_1647591058988_0.7650525480493755","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"@opentelemetry/core","version":"1.1.1","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.1.1","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"3d52eeb8ceeee3ca1870319b3e6e609fb1e9eadf","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.1.1.tgz","fileCount":426,"integrity":"sha512-rNYVBLzO+gXeYmNVcm4NfKw9x+nTy08Qp8SMpkmM5cqfdEwEtKw83vpSrFKzafy2aOIpmUkKGpi2k/m5kiDP9w==","signatures":[{"sig":"MEUCIF2FfYzf5Sui3BBbTW+5rLCxgU/GtzNkB61radKhJRzsAiEAuEllQTJ76Lw1r1XIhm+2gCGvatNJFIOmkOBtAK6wRIk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":767907,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiOij8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo3zRAAmdWVJQUfRp/khuKLczeieIqe3WASaEzmu+L+fQjuh3zFuxzg\r\nQEvNqXRaVZwM1HQZlj1oM3RsuZLhWGFbfN8mfea6n3phwXOYoIbfWuE44Bc1\r\nsyqHoQ/AEAHD5rzHNuguPebt1UULb0ZmjZ5OdnfDWghK0kwDba27HFWPFRLM\r\nchKaVE82/dgFqaYviUUijdLwjFULwUltYehNaCauJX/78dBzpMvikgExnaal\r\nfvLC4foJnYf9nOeKgsXKweSVswdIMXwNAQnJu30VQvgaqcFBdZDQxuxFSviW\r\n/KiK0nCcI7i3g8jhDfucMNkoHr3J/KZDZujjawdCEc0WvCY7jc3cpox6D5Q9\r\nfWsAdm9szsxQQW6VAEN4vTfhkU0NFtBaVB5sT5RCRO3Vc1uLOpKoTC48KGub\r\nnABl/b5TYVzr22C4ds86cDRoOmdj7IwNgj2hAnoueG5i7kXLb2vRv/FBVHUW\r\nx4r0d/voxKxdncBDuBWjlY5NKFLibDgNl+kl/iGSMbUw/rhLdhc2ZGBxH+YY\r\nnHz5IIYcwcOPiHczuIK2acdvP4JcU0WVVzOW7Qh7pOpHzlbAeXjYtmVfZ/XX\r\n40my+dEN1gIheDzmeiRBII6K/9HZWM5jsC6EI6RNWd2GOTjnW0eEHcA7g8fL\r\nyDm5Y8Hye6GMZxxbR2fU9E9gSIDpPdee4hI=\r\n=XLds\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=8.5.0"},"gitHead":"b0f8a2d36e6d1d3090c3d2380608d2102c826e0b","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/semantic-conventions":"1.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","lerna":"3.22.1","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.4.4","@types/node":"14.17.33","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.6","karma-webpack":"4.0.2","@opentelemetry/api":"~1.1.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.1.1_1647978748517_0.2889358868749834","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"@opentelemetry/core","version":"1.2.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.2.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"cc6dabb7bb2f317427135863ba6bebe22b0b475e","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.2.0.tgz","fileCount":426,"integrity":"sha512-QiKp8fBbT9ZhRTP+ZVVMyqH62tD/ZQa4gWPi+GnpNetvK1SWPO/8DmRpaSXHwAhu5FWUDJrbFgpLsrDd1zGPOw==","signatures":[{"sig":"MEQCIHCIgscwi1aC2Qg+BhTnWq3j0VQcuUyj9tYb4eEAWNm4AiBK8aT2FhP6IrNrDDIj+WTtlYzRpOyNvUR8DZM/yLlScw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":772290,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiYsI8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrfVw/+N7TUdyInYSCI5uE31rf2+sovjbqIfApVgoiiriY4hlrrz3R6\r\n+BPznHYLpu+vS2O9deLhEfL52ENG85CZL8ICwmdpZYpJQtm2hMpkfpH7/nBY\r\n9qcmmyVz9R19Hc325XjZ/hdamggMMYELUSwyfIpZ/XXewxGG8+mBMhhfhHRy\r\nPbDXEvLTYFADwe77Y8teuwpS1eYPOxX1wnx32Hd+0oYZdpA6rxVm0u2BpiyD\r\nW44rfemK59aBIVjoBm29+nw2DL2BzRXt9PizWwF4bg9jgFpksNLZbndYONSO\r\nckmqOVwLUPJVE5BA+wsy3tV8QAhksijfzguyBn0vxM9h2tcKVSQbznKRGRQo\r\n5zHI8glpRywmv4XEbHD3bhDIiLNJSxCu/M+IuyU6pxWN0+dcrTeBM1REoWpC\r\nWMP0Q3FFMtOunfyeRLU/opXDB+5HndFdNS/e/g/36ZLdOQbA6fqoI7bLeZeX\r\nuDShcTOkp/uX0Sq710rWl/tUBrq7tn4C+T2en/jXjivNL9oQfW5llIyFhOjy\r\nmZcvJyN+X2oRqAgffSQYg6sFwkNqxLs/+VKIuhjgI1gz/BHHkPmSqIgLOFv9\r\nzRyaaouUysTZQYtChEaBrHTg4ewjUrMp+n9q+ZLU6s91ELoyQpHvjoRw+dCO\r\nzEXyPSfqZXTjqk1RLicz/283gNFTuYm5Cs4=\r\n=Ubjh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=8.12.0"},"gitHead":"a0a670a03fd35b0799bee8cc466f79e93b5b6dd2","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/semantic-conventions":"1.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"6.3.16","lerna":"3.22.1","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.4.4","@types/node":"14.17.33","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.6","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.2.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.2.0_1650639420669_0.7415910500674556","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"@opentelemetry/core","version":"1.3.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.3.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"3a7cdf1d95ae26147d141a7fd58cc60759486aa9","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.3.0.tgz","fileCount":426,"integrity":"sha512-g/YNvUhSPn+9PBOnDZtFmvGZR3fDFzzLVSHLAnAQfOLrJwVlZovSZpAXNOv8OGhn+JA3j1gY93gfjbgBZtoR7Q==","signatures":[{"sig":"MEUCIQCDEc3OR5aU2E1jYnOm+SC73/JHa2BFjdJ202oygXPWZwIgT/Wbk2Xvb1+g68bSMWiyQUk4XaIjYY+01Pzi9kWLCOM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":784659,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJikSlhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo/9Q/9FubxEB7pyZwpp60Wh7yQb4c1Hxl6n3vbvL8kPbRh+BfOk9Fz\r\nv/msR4LTjYTauYqS4cR8tTdWPvXOhrvu9hC3Sm+gqJxwh9F5OwtFFC2wXbi1\r\nUXjymABOBzSqM99tUODVCwiQlpZG9SgqYbiv/XKvQ0oFUHBoHNhtLUt9ZKat\r\na7HTVggKnRUUYPBIZWpyIyjV397XQ6zwIYtDmHjLENO5TvO5JAFrxopLHe7L\r\ntwAhCtfAKf+mZ7Z1RGjxHToRRs18Pg0jHXdMI14epQB6XokUMMrQWgp+Xs2+\r\nq26TU9CkQ5/kJ6ZS5mvNM969Xs2EZD3ttMxaf9xD47MBTWgvNv5Ge5HnkZVL\r\nTI4ZPxw+g1bAeHHEegT0u8y3Sk+PYkAzdXXVu9KsBNsxv3hUTSSOegZR9A6C\r\n1PGJeYtvLC5/VmkROfeEgARQb2V5QwpOyrRHs5wrsY0UmAc3+ijtPYKn+FCl\r\nprViygao2hXVsNLeMoLEAIlqal6yF1AM9msbLGsQiNAzsEBGJmXDWE/fA7Xf\r\nyVMR2jtuR81X41mPtnAEh7fub4s9AiLG7BNyjrADmcapPN1fOYFWG/TJnmah\r\nncYjBakV/Gm/rfX8BvgKPKw64sm+nMCEiNlniIWJVQH3P4v/HugcHv4wxzYO\r\nDTzqJl+Gms++KlXihmQL33/PMgw0fTjUiZI=\r\n=2OHL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=8.12.0"},"gitHead":"eda0b092db484855ded8b4837ba7fc19a377c5a7","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/semantic-conventions":"1.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","lerna":"3.22.1","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"9.0.2","ts-loader":"8.3.0","typescript":"4.4.4","@types/node":"14.17.33","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.6","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.2.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.3.0_1653680480812_0.48747084033710264","host":"s3://npm-registry-packages"}},"1.3.1":{"name":"@opentelemetry/core","version":"1.3.1","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.3.1","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"6eef5c5efca9a4cd7daa0cd4c7ff28ca2317c8d7","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.3.1.tgz","fileCount":426,"integrity":"sha512-k7lOC86N7WIyUZsUuSKZfFIrUtINtlauMGQsC1r7jNmcr0vVJGqK1ROBvt7WWMxLbpMnt1q2pXJO8tKu0b9auA==","signatures":[{"sig":"MEUCIQD+TrINv0EwpTqv3ppjT89Fu85NfMzEYvVL39TstQtCMgIgdzulHpsAuqRbwsaOw+hxP9W3aeWsuEAXUNNIggOpKo0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":784659,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJinmLhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqxlg//Z46j7al27iLlx2pUfwt8pfykI+5am33DVubykQ4VBRAsoaUU\r\nxCUxxxuGUaRNc3W3dMkVJWlB/yDi+tAnQmLMSdZgeeG866VCc+V1+xlFLkuE\r\nLPEeL4dvaWUWkqCPJUero1iQyE3Q0rCriyAZVA6APWBxlpSQVpOl/NtdipxR\r\n/KBOC2paznSRXqYZE1ZAixeK3N0Lt2toA1Pk56Bt5Y2V0DXM06OLVwD2LFmX\r\nQdB1/FvXUSk3v8ZOGs80zXUjpDaIrBeMD5mxvkC1LTk03BEmmReHI2+1F0mw\r\nJuXVxyU5NBnaLZ68wLAnXHMfWgSpTvfFTpDzcyBbigFYGmlzcDAiRkdyQhIJ\r\nIhszzF+JLbF7Jox0jPreBd/IpPU4Mq9Qng/TKRNeBR66gEmXBz0Km9/Ezi/L\r\ni6Z4kZqwWb2znSd6QeU5uYS0aIRvTxi9vsTI2FsUiyCWlhc/Pzmx7bXIts62\r\nS38LXRo9euunEad1tpMkpUMNA6OQbdA5yxB7q6YbI+/VWBa3d8Q9Km5AYFKH\r\nz+ofEjJi+QoCNJdOvzkyDjsp7u7gq9/H4ZGQcL/upEvoo+5iY6c+/3cC1ERD\r\nenEcZzL1KAgoIrVtlBleSQXKK1JJlro6MNAFnmGhIcNMNmnvGBf5wwS/w1cL\r\n2Os7QtuqakgWNZdoGax72MgC8+LYd5sK254=\r\n=+GiX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=8.12.0"},"gitHead":"51afd54bd63e46d5d530266761144c7be2f6b3a7","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/semantic-conventions":"1.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","lerna":"3.22.1","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"9.0.2","ts-loader":"8.3.0","typescript":"4.4.4","@types/node":"14.17.33","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.6","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.2.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.3.1_1654547169480_0.8778583385763781","host":"s3://npm-registry-packages"}},"1.4.0":{"name":"@opentelemetry/core","version":"1.4.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.4.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"26839ab9e36583a174273a1e1c5b33336c163725","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.4.0.tgz","fileCount":426,"integrity":"sha512-faq50VFEdyC7ICAOlhSi+yYZ+peznnGjTJToha9R63i9fVopzpKrkZt7AIdXUmz2+L2OqXrcJs7EIdN/oDyr5w==","signatures":[{"sig":"MEUCIEWg00qGH3T1N539yqB02T2F/X55wjE7XBJyn6uMLzkGAiEAkpoEQR/T/RWznISn8iFbn306TkLf2x5LHZO8WRxyps8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":784655,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixe1mACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq/CQ//WZol4XPY9U4T9JAR192T6AnnIWFqb8JZd1KsnkFdwTJHE13M\r\nWSwQWvrwz3/RVyO22hsKBFjcQjViVQDHCbIdaYvQNwThl+GQh5hTCV3zUFPn\r\nmSczMOlcQW7ktzfUFl3mPgw7hCwSJNPZ0EekWJON6oUWQlwMRnXAs9TaOefs\r\nDgKYAcr0aaVpLmOxzOx8k1KjzYVpBzqtm0sl6Rbi75mbFK9dAi/5PF3k+Xkb\r\n8lsScxwgA6hs4SaUtRp/Fqr8bXosdjmzibxCDs5VOiBZwY6o0BJ5iUdk+2S8\r\nK5ro3bpZV27gK5RDIhC14AImB0LcmnucMJGFqphDN0UIWUwlKa6xgsLmevVH\r\n7BeTtcaJyR0hRLgY+XKnSJYH4U5TOaJbnv0O/D1AWSbvHjAuDEL8GStFf4se\r\nyXYGgBRdc98CMFiYUwM/1D3a/Yae/jjUwf3O/nC5WuCICHmlazfvXeb2LwYC\r\nVARENsdsLWiGVMswko5ghzaYH50v4b02HzYgRTiS20HGPnaPFpsWYBo7KAF2\r\nwVlPyYR5q/QgPlVaYnGMpzWte1gGaCm6b9bb1Ahah5PcJW/7UQIhigapvc6s\r\nXNnvu/9o07qtk3qEtEikkWpqoIL8vS4Ol7RkGuAcWVfVqOqkwgkO3y0u9361\r\nHXnIWxSdmrrst93N7h+PzmzFR5jep83CvIk=\r\n=763p\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"e39ab883b18636238ef0fd741df4ce5ed53e8d04","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/semantic-conventions":"1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","lerna":"3.22.1","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"9.0.2","ts-loader":"8.3.0","typescript":"4.4.4","@types/node":"14.17.33","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.6","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.2.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.4.0_1657138534608_0.9998986400043428","host":"s3://npm-registry-packages"}},"1.5.0":{"name":"@opentelemetry/core","version":"1.5.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.5.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"717bceee15d4c69d4c7321c1fe0f5a562b60eb81","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.5.0.tgz","fileCount":426,"integrity":"sha512-B3DIMkQN0DANrr7XrMLS4pR6d2o/jqT09x4nZJz6wSJ9SHr4eQIqeFBNeEUQG1I+AuOcH2UbJtgFm7fKxLqd+w==","signatures":[{"sig":"MEUCIFNqxY5DTTB2sVvHwUJBFDreRwY8soSuhE7TOZX/iqKzAiEAim49yr5G8CFMaO7Ejgx0+/WLAO8RWaZAuYG2hngbNrc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":784761,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi4FP7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpdjhAAluEBGkPpBExgrUODR+dtKP/US45NuHnAiByh0Y1vuckqfLJt\r\nm6m3dvW18MQ4BKyzeG0W53KD7+qnBARCTFyCzOax3JDMH/b7/iqXs7O3r4vv\r\nDM5eziWdzFJBEok6Hk138vDD3GeX3cVZ9cwrqS7b5CwK5gM7qesIvGTKt7t8\r\n5BSDezanOi2MMNX4xrg7DaHSNl9IslFYSuRrn1oKEjEYqaaV20nteUmXicM1\r\nKHUA6WR60p/iLPs9STrzuxNBTFoyl1VQxVMxGFHjcEkr2DAyknxp7Gb/JzBU\r\nyHNC54Ianecp9Di80B0hAv8eNtgRoHngH+A9EQLmtpYibcL02jNIGbSzvN+r\r\nrlYghp8hMXWpRjOMhg7eC8bfcGBziNkr3n9nRYKLJkPDo0LYMfRWx0IcHdEa\r\nLQ5JiXF5potBFAh9Qk4eNTDRYRCRlQ67hjZSauLuezwZA6mZBJcRJ+lsp/TA\r\nOq5U9fhftePJKEkbYDbUUOWn4ZsvoHlQZsMhaYKDpoaMDF+YlgFvd6yURmtu\r\n+8svoUCN5nwugCZbOgqbdJSFFfMINJM/0kc/ASC3KQATmqo1nAuyRwwUJDTJ\r\nXx0TQMLh9d8tDH9cMxO5B/iduortJvRqX3rqXrZR1vziMyVk/cwWwegr/j9R\r\n8fqN+/UyvSVO4Uej3LT8x/b7JstxpNTiIeE=\r\n=vdYp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"776656b6e0cd0fc49a52b734702bc77110e483f1","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/semantic-conventions":"1.5.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","lerna":"3.22.1","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"9.0.2","ts-loader":"8.3.0","typescript":"4.4.4","@types/node":"14.17.33","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.6","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.2.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.5.0_1658868731005_0.8204679134320054","host":"s3://npm-registry-packages"}},"1.6.0":{"name":"@opentelemetry/core","version":"1.6.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.6.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"c55f8ab7496acef7dbd8c4eedef6a4d4a0143c95","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.6.0.tgz","fileCount":426,"integrity":"sha512-MsEhsyCTfYme6frK8/AqEWwbS9SB3Ta5bjgz4jPQJjL7ijUM3JiLVvqh/kHo1UlUjbUbLmGG7jA5Nw4d7SMcLQ==","signatures":[{"sig":"MEUCIQCegTkvRZ4kKPYq6ernWAvjmAabQmFc4mmeC5E6b4zEaQIgE2fSjw0nP2YmkW4xY4Pak7xl0UWu2CgqxuBiydv+tDo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":793920,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjBmOAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpFow/7B2hE1wquU1i91wG9VdRpMMq5A/lBDj7U9UOdEK3ooWvxt/ju\r\nnHmue5ao+ebujoD5wXfx+IatY5+fjxXbxB37Gn1YQmvCRvB+BJlacWkwFczp\r\npiO4Hi1Gl1iZgbL9eiMHFGsRFTDsZo2g7KffQFmHaKmAoflVCE42j9ozn/FA\r\nQkJ/Yclj6OfQj+mkJ/+jYRDCsaLEwjGS7/VudNgW/7eLNmHL0tM5LWi+UE98\r\noV7EKn8kN2R/A2AoGFcpNV8nKeW5aMpa+1Gh0UHmgYkWFLxyViYxzWQ1lXMT\r\nvMBcJdMI+f2+eZNkgeYUlVtPK80AdZt4JOBF9wnCrOq48BhCj6cEbKHVJl27\r\nIf+Qi2i7WM1eajkXcLlJ2xt6xIXXi6zotYmHWlWUnBZ1AwLTjisRiw5srYa5\r\nM6vpEYLTOSWFWI0wwkT62B6BjLrlo4mvs4MfAxygjZmej9eC4xfaEocF5PNY\r\n9IhTcVuGwNqO5b19cItuejRq4YFHQum2yId/VjPZeAoZ109rioPX5d0edtQu\r\ncIf7V2wYnzt7qEXxN1x0EpIMHLu9qWtzOxLC/uuVrIAAfgqpAKWPUJtJwVQy\r\nP1MvglXv2sJeYLhBHH1m7C7WHQtH1avddVjE2oYfh/xk0eFT3qZ4Aso7Z89i\r\nH7FT8RRJjIFyaTzneuA1XCOrorD9ny+6Pt4=\r\n=hJ25\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"a5abee69119cc41d9d34f6beb5c1826eef1ac0dd","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/5.4.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/semantic-conventions":"1.6.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","lerna":"5.4.3","mocha":"10.0.0","sinon":"14.0.0","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"9.1.1","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.3.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.6.0_1661363072398_0.48965827390282124","host":"s3://npm-registry-packages"}},"1.7.0":{"name":"@opentelemetry/core","version":"1.7.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.7.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"83bdd1b7a4ceafcdffd6590420657caec5f7b34c","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.7.0.tgz","fileCount":435,"integrity":"sha512-AVqAi5uc8DrKJBimCTFUT4iFI+5eXpo4sYmGbQ0CypG0piOTHE2g9c5aSoTGYXu3CzOmJZf7pT6Xh+nwm5d6yQ==","signatures":[{"sig":"MEUCIQCBMA0+Ws4pw5RzVJM1nnLXFKOqgKG8iLBDIskf+5JFMAIgFZvYU06j/+1o/catDW412pjziWhVjqRld7LQH7YVoFs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":818317,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJGi/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrveQ//ZGxGFTrNZeBQwfLFvJUbQIve1rie4WALxFOrkowIaO8/cBiP\r\nw1HrZqMv76lKoPqnF08OWm0uDriiPyjJz3WCJeGtd/O2BuAJmu1OH3lj2mu5\r\nVbjiage6xhd7LOQQQo3MGu9nEC+KqcEP51v9jxSfSUTAXnkYTri3259p0IUz\r\nPm5OWhhCuBC0BTtY9MbetGxLUnQtt6KoMlQojD9RZB1WL3P6W/btXj0msnyb\r\n2mF/DTp3sAdro8SjaxVxCON6nD4R6KTvpDX30v8Fj/hiYZugAwn5/j964xF8\r\njvrMCTZyO+kj091RFCnVg/LdI90ssmhrt0U+QGr2/xfcRSitR/MTmlZ4dJuK\r\npXH3j5jMOnuF+L+HkUYExGjgTjSW/kGYXhopyNFd4mGAxZrtbifTgKm3m/Pk\r\ntgGJQUQXZCkejj6DSnP/uail5oTPVH9dpN5FGJMwkhwoonB5ifMq+EK1l5dm\r\nlGGZ7pI+/jlJtBs8YIJn2u/7ms7QG8g3KqK4nXU16kJCgAM7H95qxWNyFg/F\r\nY2YhVwI51g099wnq/hQRumerGSDuA3rIenltCs3fORFXmeQSYlq4HfJsBlor\r\n9BeKEKjWzItMNNCBnYrq554aICJXzibTCbiaNj3SJ6FIunydzzz+2kaM+mRj\r\n30jaDCr/QBdLb2JuVLF+ngxd8SbKgwquQlA=\r\n=cxCh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"ad88c3d9aa0100fe259b93f4b660e84417b757ac","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/5.4.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/semantic-conventions":"1.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","lerna":"5.4.3","mocha":"10.0.0","sinon":"14.0.0","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"9.1.1","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.3.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.7.0_1663330495221_0.5570015276594658","host":"s3://npm-registry-packages"}},"1.8.0":{"name":"@opentelemetry/core","version":"1.8.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.8.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"cca18594dd48ded6dc0d08c7e789c79af0315934","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.8.0.tgz","fileCount":444,"integrity":"sha512-6SDjwBML4Am0AQmy7z1j6HGrWDgeK8awBRUvl1PGw6HayViMk4QpnUXvv4HTHisecgVBy43NE/cstWprm8tIfw==","signatures":[{"sig":"MEYCIQCInH/Sj1Z4PxgKOganTrl76PT+v7idvZO7o10dU7cRZgIhAMzyn12OZRYdhfankFe6YbFRhrkb1YIVVAHpCTSFwCXf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":832930,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbANaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoMGhAAhAkJiecHXq5GijkJ1ac628ZQCMGp8KXdNVQKk0/XqruVxBNA\r\nayN8evaYLIaeD8XHm0p0hhDgGrOxJVPtyiU+2cxpnfhgGbn9Xf8POVcJqHBb\r\nvIf0HGVKQ5n9/PBe/QVdnkAw13o/TTtiOL44oJ/JlYCINQeeOqdIeCt77Dji\r\nrpbxp33J82ZS+aDt+iK5qEa7de12y7ETyS4ZjB9s+BH+KMcRNfncgJ0jOLz/\r\nxxeXMP8AUGr4fFckyjohpMkEW1GcAt4GL5l7wypvxGcrcipOi5ZRsyHF4QGm\r\n482BdFrHBG8bqZcovxxNg69cMKZYxgg2XiiIzbZ+WbuKhwVAfzB2PNMVBNB3\r\nRTMl+Le+VLMoVTP2u0Zob32w9+Kq841akpSMc6Ukts6Fcbf8Etjny8whje1K\r\nZ7VfwagiVmkonG07GZW78G1JidTTv31DZEFQiyBu5V7/cjN7o7YuOsierxeI\r\nDDFdg7K+ZZYiKDY6aKQ3mUJEb2G2tkomdV95oY3ZJkwvgawtXup8oHxX3Jsm\r\nxi6aZ6OKDLeNPtX5LnqY8wxEshQVapV4CzUHaKB56Xl8p9FZs7UlrJEEZ8qV\r\nG3A1ObBfNRGz7TJfk8/RbeC99p18iUyP0/v0jF+Ruw6t8PFsb/kE/ozEq75R\r\nByOQ0VGqP/CXjlcyBrT0206GAcghkw/JVBk=\r\n=6MD9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"7972edf6659fb6e0d5928a5cf7a35f26683e168f","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/5.4.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/semantic-conventions":"1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"6.3.16","lerna":"5.4.3","mocha":"10.0.0","sinon":"14.0.0","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.4.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.4.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.8.0_1668023129876_0.9986599370220579","host":"s3://npm-registry-packages"}},"1.9.0":{"name":"@opentelemetry/core","version":"1.9.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.9.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"5b1d87882a9a76cb3dd7703d6341f21a1ead9368","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.9.0.tgz","fileCount":444,"integrity":"sha512-Koy1ApRUp5DB5KpOqhDk0JjO9x6QeEkmcePl8qQDsXZGF4MuHUBShXibd+J2tRNckTsvgEHi1uEuUckDgN+c/A==","signatures":[{"sig":"MEYCIQCUeduN2A1ONNABRrEIziYgU22GItY/7eVLe/TWQCtsFAIhAKyme7IpOSWSKQx2XeILtG0GwqiTWeF+6d1YpgkALm3e","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":839321,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvy4kACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmom9g//eAQ1bj/6HZePTqnAOvaYQq0T/2hhmrd/33iZFyab+eJAKO8L\r\n9eH4VRWJ5pf/UhFml/QrAkm0WuRYKcZW8lOGsIpKkK44k1FOePCX2uMEwvOf\r\nnNyF7o0doAMaCCQCvJts6v6iuRKR2OebuNY4aIQUXccc0RaoSaViJrTym6DL\r\niuojk3zkDZMXnBSmnHtBpmoTCBSg3+kaEv0jzL2V6a0XVJIezOUlogudCq9B\r\nYXHGuVDPNkc9WKB2Dxra4rMOVf/BKQpzxgybJZ99oDG1WrbfJ7nJmcnykfOq\r\nFAycHKjR20MsXVxysGzfvwUS2OaC56TGJKQTv3zwjmg9t1WDO+FQzkKVN2Za\r\nEbDLdiu+Rz00AC3dixrjQnandDiZuxUTcb7iTkSusoDW3NdiSBTwfNkGfmBh\r\nrj5VVzkISuurydV3RjqMl4KXKojU6BZPjqlPBIZBZzPAf//qBjO/1DpseYB8\r\n5jwdXLHKY5yyQ34TRNipHBROcJfnQs6iOcrUhZYXyKXgCNQcwMsPD17s2hgw\r\nqN3jkFRt2mONfreVgWlcXp3XlQYle/xkhAGP1o2Gtfm/2u8/QoSomeXDH843\r\nXqTHj3soq5K0hDru7NzaBWmtDmvqyKppP1JY9c31QgS3hO8xq+3bFHn1z+NE\r\nM06JLqwHi0bGhedw7B4Jwt2Wyvrdma5eeac=\r\n=EBwS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"08f597f3a3d71a4852b0afbba120af15ca038121","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/semantic-conventions":"1.9.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","lerna":"6.0.3","mocha":"10.0.0","sinon":"15.0.0","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.9.0_1673473572435_0.0041613728052112275","host":"s3://npm-registry-packages"}},"1.9.1":{"name":"@opentelemetry/core","version":"1.9.1","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.9.1","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"e343337e1a7bf30e9a6aef3ef659b9b76379762a","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.9.1.tgz","fileCount":444,"integrity":"sha512-6/qon6tw2I8ZaJnHAQUUn4BqhTbTNRS0WP8/bA0ynaX+Uzp/DDbd0NS0Cq6TMlh8+mrlsyqDE7mO50nmv2Yvlg==","signatures":[{"sig":"MEYCIQCPr4FPXBsOBiPhKLEWqUgoVEMANvh5XI1iONYODi6viAIhAOsc3iQ0wRDksfDoSWf0k5pTniMp5iw3zw6J003K8G1I","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":839321,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj1+J+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpYdg/8C0ZGXe7/q1313R6deQSNSLi1cJd+PeBDCDfLGSYqaunb9V7y\r\nY5e/bSCVoFF2iI2l9zf9+bX+s10EaIdERA2PGb6fXyc/KvXHqQrQNOoA9Pkh\r\nLsrKOjhW9HCIAygDtXBgtBJnbxxBdA9TAgFdoPspMw3JFhkf94xSuEP/0ZYV\r\nkwtxBXRiDvRm6kBXDFEUXxvPu/+WGfW//pFfDHgmU//9fKV59+pxVEY12v1f\r\nhhLT5e8PzMCkclAyac3ui19/IDn4VCC5bGyAj6OPZ2NHgFxup4vSJQNEPvZp\r\nUgpM3XqhdjKWtJCgjMH8OW1HcVNYawWpI0fxt0tvPPzI9exiopOcUqL4x2Gv\r\nZoQjKnvpBjWM3GxQUE9mTCUuSe7fgw3+GHGhIOS8y/RrNxql1xUa60bmmTee\r\nlEN/wSXnSMyrunbmCJVyX7JeQRvaPFYDlzdPBnrovBcGxbX5sJC7DsKLyCC9\r\nhsgcJl5UIB/8qiWRPrLK4u6BdTTyOESuAYmUICfX1qWxUnxpMu1oYhPO5BG/\r\nlqSDOdxHDKYm5gWfv9k4BD3uNjguP7/3yXE0kjrmXZlssowEYynAcTq9soLy\r\nJyAaKEZ3wD9T95TmqlnEB+NQGZExq6d43dyiP6+PeuWWTASTrhZt0tdtEwu/\r\n7+N4PS9k1y1OEFzqi9xuU5+FPBsvWcqOJa8=\r\n=qH7L\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"279458e7ddf16f7ddca5fe60c78672e05fafce66","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/semantic-conventions":"1.9.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","lerna":"6.0.3","mocha":"10.0.0","sinon":"15.0.0","rimraf":"4.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.9.1_1675092606491_0.47935711982461693","host":"s3://npm-registry-packages"}},"1.10.0":{"name":"@opentelemetry/core","version":"1.10.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.10.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"12626d19287030a16ec1101f8efcacb5198a89bb","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.10.0.tgz","fileCount":444,"integrity":"sha512-H5/mfU3TsEBe/cnnLu3VCkzjqyRARmhxQGsT64KwafxjzkDh+c2Bk4n140Cg/xhgrjK2sFsxbJj6d0xZlVo/OQ==","signatures":[{"sig":"MEUCIBxV24AY+9jPyrgwfvJMp3jJQuUe1odgdGKezsQN09i/AiEAyn9TMcAskVH8b5xOtkjV7eaVV1IqNvvIUIrWaexdGtU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":843353,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkD0cBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqSPQ/+LoIasq/qjjvav5LYSwKOHTZJD2UMeEI2rGIOwKz+h3ZV2H/c\r\n86iJXe6VzUOPOK+xsegJ0e5XRDcQy1xGGgUQYqC10LEPV3MGneMrVqFABIx9\r\nK9931XBT7CNNp9DYm7KlXi1t22R9xUiEDa9ElbIDBZkRxQ/ONIYxEuqV+Zu9\r\n5Tj9/cpQwe7K5HTQjEJ3CtgwSIhkdfu6q+x19MhiGuKhDr3pbrmMp7bLeMCX\r\nsVarK1whsBpg2UZ9UuoMruLFkzL+uXwdKZd2/G9TQhZRHJm1lkrjklITGSHf\r\nkFNT+XgxIrow0WXESmPdqIUsOQk/I0/4OUrmbDPv/P01QtGgt8v7ozFiZOa3\r\njtMYa2DxhiUj13+kgA2uVT6bhwzKZtEJvsgJqPEP6i1Ouccwz8w5YXTPDxxi\r\njUqSMRk5GM6obyJlyoGZvKSH0qJSd++UzknSFyt4dwpow5aroz/iHQZYSZp8\r\nzC4M8xgAv/I7Qhf8HT8Kn1Sd7pkuybMS7W4kOx0aqne2MD8k/uIQdx2zHo9S\r\nVRm4fATnGAXL1D8BADSCvTjIPpcBRtIBUnF7HZe1Q/a0wr3vA3gpmB6yfkTC\r\noEGCzS0I6X4YtLTU1Pz+BlgSbAzohnxBX6vSB64xuijDkxgJJZ8ihjwDxH+o\r\nzs/0h77C1/LfedXz/gUGfIzR6BV1Ba8sg8w=\r\n=/66/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"56e6b1bb890f844b8963a146780d0b9cfa8abd0d","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/semantic-conventions":"1.10.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","lerna":"6.0.3","mocha":"10.0.0","sinon":"15.0.0","rimraf":"4.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.10.0_1678722817575_0.42449932905769017","host":"s3://npm-registry-packages"}},"1.10.1":{"name":"@opentelemetry/core","version":"1.10.1","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.10.1","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"057a621db13589bad5618b786bb4f0a643bd4323","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.10.1.tgz","fileCount":444,"integrity":"sha512-uBZs9poKMWX7WWHsRfaGHqvrn77D9EU5LwU8Ge3YKD/Su5Gy+T1v476l49nl1UOzEMNo4cISao3nIqQVsABB8g==","signatures":[{"sig":"MEYCIQDs2BPITQkcqXm8tyC4A7JDYrERmrZ6pe+3tUXh+NbgZQIhANQp/dIApUDRZ4B4or9rLxXxH0kjk6nGgUd4FL88O357","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":843353,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkGIV3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpIIw/+I0cX3NlYcaemAZrUteffFKZHhfBVRfoV4zmuiD4HZsX5URMz\r\ngWfoq/GgkEU8x2T1hF1AZYkT7LqCjNyEgc7utCxHDQklWJV1kAHsaAvKjZ/Q\r\npjGYMPhdiMYcbww+G+148oeWiGoPEY1IRmJoGANiHaoB/goxF4VkYVvD+Bv+\r\naaz+Nxdk+u2zAA3GOl+ttfthqvh8M6EjHXRn2fSzaH3NTxEOmCiurIUrxHg+\r\nYDlIrsQhi64/jsI68coYaomRQWCRiS5wOV8gMMsjHXWJkwt0CfLULY5lF/dP\r\n5QZkl8a1v6BlM41CJqGW7xaYJl+k9SfSmx6FDkWNRfg+MwhkRqPXK44IBlft\r\nSFwdasnrzK9ekWIX1oAn7DySSmb9FPTTOehrA9p+W4ZAP6KH5CT0Cwks7V2x\r\nfCcpA8sFFbItyqV6u22Iq5OpNB2wD+UpkJ/cAWeANbcnjJ1B0ZgQVxRymiXr\r\nj/dEp/F1ifWtmX0mt92Iz40yg6LYzWBStimyzjiHWkQ/HxWytc057pQ7KVXY\r\njZXkgmcFpHJmwr41OkuzgJp3d0/i2J5VFAYmhscZGnkjZPOtLW6KLAY4aD0U\r\nGEehg0zUUqpOhs313+PCwpZ+/cFE5fiittQaEUnlR/5QoDt74pPe/9/dUthW\r\nl3eh1DBXGoz2glqdSKkwrOxasnpG1VeNDbA=\r\n=BJj1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"486df99906958de9b8b666839785b00160a6a229","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/semantic-conventions":"1.10.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","lerna":"6.0.3","mocha":"10.0.0","sinon":"15.0.0","rimraf":"4.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.10.1_1679328630910_0.931070355512154","host":"s3://npm-registry-packages"}},"1.11.0":{"name":"@opentelemetry/core","version":"1.11.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.11.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"3141a0e96a9ade6ee2dcdd794fd0b014e1013dde","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.11.0.tgz","fileCount":444,"integrity":"sha512-aP1wHSb+YfU0pM63UAkizYPuS4lZxzavHHw5KJfFNN2oWQ79HSm6JR3CzwFKHwKhSzHN8RE9fgP1IdVJ8zmo1w==","signatures":[{"sig":"MEUCIQDp1PQ09eUmFWV92Z926LySdzwMPBQPwHe4sZYwyIgnGgIgYSzRTw+5Q5VBiTIPLiHAfxOb2zUL4eIW/jsYUCMUXjc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":843353,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkJassACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp4ew//SGHyILH6rg6vYb69pbcTZ822noVJEnvPBqZUWQiLyJLxNJ3D\r\n4a4Xkl/m5yK8VF7U2eC4o14ooho5DjSiswARuGUuUbXzYA/HfJNnvDRRkp2w\r\n8loPDJ44WreJNWSF/BhsIE4melB91PY6ZTQlUMB1M3635XOGce3ffZzdwFxi\r\nEIjIupkD53G7VaeqbdN4zxcEp9t7F6xFKMPzSE46cPSQLXpHkoNriw74e+7j\r\no4pKzcJm9MBm7JgjfhuKgyi1TvAvArEyNhaYg4EAjdA84ftvfuuDo3565XRr\r\neqHtaoU1/+wC/h6szD3qq339Z6eXzbbgh33VPJLyBfcj9360Wx9aB86GzCTU\r\n+8/80pehvZKcOkXFxLAv3OUBI1bkDa2QsNBclcbuC3uZOtmv3cof9QSYh7Bh\r\nTnPDSYHWupjLkNg1hFtwcXbrSuKj4Xq0K2RNmyAwGoDz/Bvzwl/z6AuvpXiv\r\noclnJLmw+8QkIGDVVsapM8ZVrTmpu30BhiBn84cKa7cYupZEFqzCgzeiz7lR\r\n8nBlkkldYxJaett1Okq8f0R4i61svQibjykhVM1OSemSPD6N4LKFrpxENi1O\r\nP/CONVNvjeyrsb7VuIxXoRX4I2pjYnbX5m4DYsTtH0ZskI2aFYRjLEva/6gJ\r\ni32KoPEKsrORhLLNl4h2e55h9mYQULZRDIA=\r\n=VMq4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"1328ee04ae78f9f6cf143af7050c00aaa6d2eb3b","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/semantic-conventions":"1.11.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","lerna":"6.0.3","mocha":"10.0.0","sinon":"15.0.0","rimraf":"4.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.11.0_1680190252375_0.42071987638372343","host":"s3://npm-registry-packages"}},"1.12.0":{"name":"@opentelemetry/core","version":"1.12.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.12.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"afa32341b794045c54c979d4561de2f8f00d0da9","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.12.0.tgz","fileCount":453,"integrity":"sha512-4DWYNb3dLs2mSCGl65jY3aEgbvPWSHVQV/dmDWiYeWUrMakZQFcymqZOSUNZO0uDrEJoxMu8O5tZktX6UKFwag==","signatures":[{"sig":"MEUCIQDJ5IsTlrio5D+gn+aby3j0YCQ8M8FWN0y8fh1BKK2okQIgQtjyRO/EiAVcrZkmooPd1YaWm9NsWqz8ikOiscQ+Rfc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":867127,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkOEYpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpaWw/+PWEY3Kje2KgwmORslJVyiC8v3FmRz7oBXQ5NDS86w0KpoXdG\r\n+QaohTtodHhXMueu1Mgwj8SPi5qt2wdUEcNNkipR38ilSCAx8k0aFkUsRmmk\r\nrnEyZ/9rT9z5ug/20+8pZUMABkSAwKpsgu6W5K3JInJDaeP+hHk2LPNIBFTI\r\nefK1TRdT+coVBiYufdaM4YehW78OHfWQIsMAXijUZOYn/NE9/kLCld7plwa+\r\nqWz7otH+ce+PtXe6CDu/IWrA44fQx2m+py2xb8QSv8NordJEdz4pBxQC15pP\r\nqjQ2uzVR0xTN19pnUHPsUxnTnhmI/Ofrd5rvHhVrNPZwVwIgwk/7hDecYQRo\r\n71FWGRxpZHiJqr192Fjpd7a9r2mPQXH14Lo1Zuys6Fia2KLHYgF5AA2oz1LV\r\nsjCZAgxTbHKQLFkFWOp41G3KIpJN6Y3fPbgml3aOGZdpXQwwEQ5r8MXqBd+7\r\nWyvG3MJp8xEb7UhjiqsmHnOmyYL+ncOiwQWetOAjJVBEtzDzj137ujbowwkw\r\nUFPEy0XksOHpIuA+eSFRLIBCIJtXFwxReXd+uEQFPDvtRDku4oxcYe+cI1iw\r\nsVedya6AJJML4yOktdXEl3C8+FfS5wyVIzKr4ST2kmv+vt7DrYLTASE1so3E\r\nQYkimymg5qtzzoyKVupMFaVZGvUlGxbgSxo=\r\n=YF45\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"a04090010ee18e17487b449984807cc2b7b6e3e6","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/semantic-conventions":"1.12.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","lerna":"6.0.3","mocha":"10.0.0","sinon":"15.0.0","rimraf":"4.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.12.0_1681409577275_0.41828643108453334","host":"s3://npm-registry-packages"}},"1.13.0":{"name":"@opentelemetry/core","version":"1.13.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.13.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"7cdcb4176d260d279b0aa31456c4ce2ba7f410aa","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.13.0.tgz","fileCount":453,"integrity":"sha512-2dBX3Sj99H96uwJKvc2w9NOiNgbvAO6mOFJFramNkKfS9O4Um+VWgpnlAazoYjT6kUJ1MP70KQ5ngD4ed+4NUw==","signatures":[{"sig":"MEUCIQCbZF0e/qPwjeUM747R8Z3n9tJURt8KQkm9t+9BAwBtzQIgWS0w8ncoexKTSHrSxdmOuHmFlHWK1SPj56mdOan1Vcw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":872867},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"8fc76896595aac912bf9e15d4f19c167317844c8","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v18.12.1+x64 (linux)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","dependencies":{"@opentelemetry/semantic-conventions":"1.13.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","lerna":"6.0.3","mocha":"10.0.0","sinon":"15.0.0","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.13.0_1683811802165_0.527891352412807","host":"s3://npm-registry-packages"}},"1.14.0":{"name":"@opentelemetry/core","version":"1.14.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.14.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"64e876b29cb736c984d54164cd47433f513eafd3","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.14.0.tgz","fileCount":453,"integrity":"sha512-MnMZ+sxsnlzloeuXL2nm5QcNczt/iO82UOeQQDHhV83F2fP3sgntW2evvtoxJki0MBLxEsh5ADD7PR/Hn5uzjw==","signatures":[{"sig":"MEUCIQDdr7MPTCytU1Qwf6YYvjZhrcJu/bPn25dlIqKnHICq3wIgGRuZ4F88Ed+3ulKfd3gcx6MlEiiSYNHy/QxscLdwiMg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":872867},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"edebbcc757535bc88f01340409dbbecc0bb6ccf8","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v18.12.1+x64 (linux)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","dependencies":{"@opentelemetry/semantic-conventions":"1.14.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","lerna":"6.0.3","mocha":"10.0.0","sinon":"15.0.0","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.14.0_1686031251581_0.2615786670239697","host":"s3://npm-registry-packages"}},"1.15.0":{"name":"@opentelemetry/core","version":"1.15.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.15.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"2ba928df0443732825a72a766c2edae9a7f9863f","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.15.0.tgz","fileCount":453,"integrity":"sha512-GGTS6BytfaN8OgbCUOnxg/a9WVsVUj0484zXHZuBzvIXx7V4Tmkb0IHnnhS7Q0cBLNLgjNuvrCpQaP8fIvO4bg==","signatures":[{"sig":"MEQCIE83D9joSwwiPel0cv9nhgU1NZ4HVVJhEkBFaZBOJH0XAiA1yMRTyxPX3gOsma4uJyNV+xRiBM4PWuL2vdS3KxHYPg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":867698},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"06e919d6c909e8cc8e28b6624d9843f401d9b059","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.1/node@v18.12.1+x64 (linux)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","dependencies":{"tslib":"^2.3.1","@opentelemetry/semantic-conventions":"1.15.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"7.1.1","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.1","@types/sinon":"10.0.15","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.15.0_1688642824984_0.5111917940611308","host":"s3://npm-registry-packages"}},"1.15.1":{"name":"@opentelemetry/core","version":"1.15.1","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.15.1","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"a580a547c1006cc411ae7aacd4991b52555b3f1d","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.15.1.tgz","fileCount":453,"integrity":"sha512-V6GoRTY6aANMDDOQ9CiHOiLWEK2b2b3OGZK+zk05Li5merb9jadFeV5ooTSGtjxfxVNMpQUaQERO1cdbdbeEGg==","signatures":[{"sig":"MEQCIGnhThPde1lvJLOkPWKaJXARLS8uNs/cHXcQuBWnUGD3AiBVp3zRnHuSwZVQNKAeQhnvHoTyb4mLsiGTRENG8DMJfQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":872907},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"9f71800fdc2a5ee5055684037a12498af71955f2","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.3/node@v18.4.0+x64 (darwin)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"sideEffects":false,"_nodeVersion":"18.4.0","dependencies":{"@opentelemetry/semantic-conventions":"1.15.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"7.1.3","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.1","@types/sinon":"10.0.15","karma-webpack":"4.0.2","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.15.1_1690209164255_0.559410177694484","host":"s3://npm-registry-packages"}},"1.15.2":{"name":"@opentelemetry/core","version":"1.15.2","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.15.2","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"5b170bf223a2333884bbc2d29d95812cdbda7c9f","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.15.2.tgz","fileCount":453,"integrity":"sha512-+gBv15ta96WqkHZaPpcDHiaz0utiiHZVfm2YOYSqFGrUaJpPkMoSuLBB58YFQGi6Rsb9EHos84X6X5+9JspmLw==","signatures":[{"sig":"MEYCIQCIHm4RQZtw6pIMgPNUwRdq5drbgWpR0fJ3a2fDktW3fQIhAKFWgjqDoZH/MrdR7dAi2BS9v9D4UKq8fowCC0Nju5Pj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":873183},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"48fb15862e801b742059a3e39dbcc8ef4c10b2e2","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.4/node@v18.12.1+x64 (linux)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","dependencies":{"@opentelemetry/semantic-conventions":"1.15.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"7.1.4","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.1","@types/sinon":"10.0.16","karma-webpack":"4.0.2","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.15.2_1691500863717_0.8949148368684461","host":"s3://npm-registry-packages"}},"1.16.0":{"name":"@opentelemetry/core","version":"1.16.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.16.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"ebfba199bb9b055bbfe0887fc84575432a84f97f","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.16.0.tgz","fileCount":453,"integrity":"sha512-JMxz7kzAqmIDUDEpoRrumHk257vrA9ZGVdHLB829gu6i/ryKlnjXIzJk86pgjhmxjLMX43BY6J0nbzOhy0QGtw==","signatures":[{"sig":"MEQCIB0EuYgaajWi4Hz/Ww99xG7zCx/8yJ/iVVinoYF955v6AiAbgU/Cua6hH79ivUQOixwF8UjdAdbPdrTCMR3mMnOtzg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":873219},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"5fcd8cf136e2235903dde3df9ba03ced594f0e95","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.5/node@v18.12.1+x64 (linux)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","dependencies":{"@opentelemetry/semantic-conventions":"1.16.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"7.1.5","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.1","@types/sinon":"10.0.16","karma-webpack":"4.0.2","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.6.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.6.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.16.0_1694434465313_0.9588681658335632","host":"s3://npm-registry-packages"}},"1.17.0":{"name":"@opentelemetry/core","version":"1.17.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.17.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"6a72425f5f953dc68b4c7c66d947c018173d30d2","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.17.0.tgz","fileCount":453,"integrity":"sha512-tfnl3h+UefCgx1aeN2xtrmr6BmdWGKXypk0pflQR0urFS40aE88trnkOMc2HTJZbMrqEEl4HsaBeFhwLVXsrJg==","signatures":[{"sig":"MEQCIHVj2b364hwFED/ASqYoGWaRAkHrWkHcTXzf1xbMC59RAiAHk6BWiwsS1TeVCS7ivGCB6iZfqFqvFc5fNYiQvwDRag==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":873219},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"faf939c77591f709afbc23fadbe629c9d3607ef6","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.5/node@v18.12.1+x64 (linux)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","dependencies":{"@opentelemetry/semantic-conventions":"1.17.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"7.1.5","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.1","@types/sinon":"10.0.16","karma-webpack":"4.0.2","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.7.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.7.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.17.0_1694524348110_0.7903063955116596","host":"s3://npm-registry-packages"}},"1.17.1":{"name":"@opentelemetry/core","version":"1.17.1","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.17.1","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"10c5e09c63aeb1836b34d80baf7113760fb19d96","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.17.1.tgz","fileCount":453,"integrity":"sha512-I6LrZvl1FF97FQXPR0iieWQmKnGxYtMbWA1GrAXnLUR+B1Hn2m8KqQNEIlZAucyv00GBgpWkpllmULmZfG8P3g==","signatures":[{"sig":"MEQCICZlHBxTzU7OYyqOOwCPLgT8EDIgURfVQdC0awe7VTv4AiBbSSm77GHXa4IOlaZK/qma67/XdLTjARpWl0fEKjU4KA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":873219},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"f8e187b473274cc2011e7385992f07d319d667dc","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.5/node@v18.12.1+x64 (linux)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","dependencies":{"@opentelemetry/semantic-conventions":"1.17.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"7.1.5","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.2","@types/sinon":"10.0.18","karma-webpack":"4.0.2","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.7.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.7.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.17.1_1696947491640_0.13319410566604262","host":"s3://npm-registry-packages"}},"1.18.0":{"name":"@opentelemetry/core","version":"1.18.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.18.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"18d14d35352d7900c7785a769dc7fecf33c76f9c","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.18.0.tgz","fileCount":453,"integrity":"sha512-PCW0UCIazJRw4Q8m3Z1A20kJqKTCB4Ob02bFjov3sHozspHGnY21O7T8Q20XKe168N4Px+n7Mt4dkcay3fy92Q==","signatures":[{"sig":"MEUCIFTKibCU9fmpbrsv6g+MNguUjU+5zvJduyxDXoT5AR2oAiEAu5OjOeQaoj4KhKM9LZdNYtlSC5xwUlqgjc+h+mXCRw0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":872900},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"73b446688f10fd8dc4cf403a085f0a39070df7b4","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.18.2+x64 (linux)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"sideEffects":false,"_nodeVersion":"18.18.2","dependencies":{"@opentelemetry/semantic-conventions":"1.18.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.3","@types/sinon":"10.0.20","karma-webpack":"4.0.2","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.8.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.8.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.18.0_1699353882470_0.21798738832454378","host":"s3://npm-registry-packages"}},"1.18.1":{"name":"@opentelemetry/core","version":"1.18.1","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.18.1","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"d2e45f6bd6be4f00d20d18d4f1b230ec33805ae9","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.18.1.tgz","fileCount":453,"integrity":"sha512-kvnUqezHMhsQvdsnhnqTNfAJs3ox/isB0SVrM1dhVFw7SsB7TstuVa6fgWnN2GdPyilIFLUvvbTZoVRmx6eiRg==","signatures":[{"sig":"MEYCIQD2oxFr5DnBMmUf5Id41py+E68KF+6ATRlf4I/08O9J8gIhAKxARt8bcqhQ86m3D6AwxHLqyPiThZBhFwpjdHLqaEqC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":872900},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"f665499096189390e691cf1a772e677fa67812d7","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.18.2+x64 (linux)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"sideEffects":false,"_nodeVersion":"18.18.2","dependencies":{"@opentelemetry/semantic-conventions":"1.18.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.3","@types/sinon":"10.0.20","karma-webpack":"4.0.2","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.8.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.8.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.18.1_1699466944009_0.27354506748361485","host":"s3://npm-registry-packages"}},"1.19.0":{"name":"@opentelemetry/core","version":"1.19.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.19.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"6563bb65465bf232d8435553b9a122d9351c0fbb","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.19.0.tgz","fileCount":453,"integrity":"sha512-w42AukJh3TP8R0IZZOVJVM/kMWu8g+lm4LzT70WtuKqhwq7KVhcDzZZuZinWZa6TtQCl7Smt2wolEYzpHabOgw==","signatures":[{"sig":"MEUCIQCueqzLaYLji34HCnF1eCBz1abuVreQHeVJfnprbyikBQIgK8yryHDRlEB6pJS4iQ7malvnpwQMctxWVLnOVJbNekg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":872900},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"d3c311aec24137084dc820805a2597e120335672","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.18.2+x64 (linux)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"sideEffects":false,"_nodeVersion":"18.18.2","dependencies":{"@opentelemetry/semantic-conventions":"1.19.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.6","@types/sinon":"10.0.20","karma-webpack":"4.0.2","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.8.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.8.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.19.0_1702557322886_0.6983079507691856","host":"s3://npm-registry-packages"}},"1.20.0":{"name":"@opentelemetry/core","version":"1.20.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.20.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"ab1a8204ed10cc11e17bb61db658da0f3686d4ac","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.20.0.tgz","fileCount":462,"integrity":"sha512-lSRvk5AIdD6CtgYJcJXh0wGibQ3S/8bC2qbqKs9wK8e0K1tsWV6YkGFOqVc+jIRlCbZoIBeZzDe5UI+vb94uvg==","signatures":[{"sig":"MEQCIF6CBAOTl+2rYMewo4iAqOOuwMARKhEWDeAI2DIZ1iP1AiAFmJbPTxZ4ds0rGpSIgnvWH8VNH2ROCpTSeHJa3HE3ZQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":876479},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"57008533aba7ccd51ea80f38ff4f29404d47eb9c","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"@opentelemetry/semantic-conventions":"1.20.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.6","@types/sinon":"10.0.20","karma-webpack":"4.0.2","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.8.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.8.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.20.0_1705313743036_0.8862623632958462","host":"s3://npm-registry-packages"}},"1.21.0":{"name":"@opentelemetry/core","version":"1.21.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.21.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"8c16faf16edf861b073c03c9d45977b3f4003ee1","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.21.0.tgz","fileCount":462,"integrity":"sha512-KP+OIweb3wYoP7qTYL/j5IpOlu52uxBv5M4+QhSmmUfLyTgu1OIS71msK3chFo1D6Y61BIH3wMiMYRCxJCQctA==","signatures":[{"sig":"MEUCIC2TydPJ42No0mzHybi5EmT6qZIWGtzwU4NAKFWUhxJjAiEA/AX0WW29kOwKBiePcxvFWp8EQgsNPV8m39sJQqE1aHw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":875836},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"828f2ed730e4d26d71f92e220f96b60a552a673a","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"@opentelemetry/semantic-conventions":"1.21.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.6","@types/sinon":"10.0.20","karma-webpack":"4.0.2","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.8.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.8.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.21.0_1706249465801_0.23491823652491228","host":"s3://npm-registry-packages"}},"1.22.0":{"name":"@opentelemetry/core","version":"1.22.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.22.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"a9f33689acd4703ac780c6595497374e2113c7e5","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.22.0.tgz","fileCount":462,"integrity":"sha512-0VoAlT6x+Xzik1v9goJ3pZ2ppi6+xd3aUfg4brfrLkDBHRIVjMP0eBHrKrhB+NKcDyMAg8fAbGL3Npg/F6AwWA==","signatures":[{"sig":"MEYCIQDzjAK5hC5iM/vqcNHnt+A7gKD5+XqpIu0NTR9N2pKr6wIhAJxNqv79IWP771G9nGoxovNYeA7zdSr63Whyfb8YMXBd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":876565},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"7be35c7845e206b27b682e8ce1cee850b09cec04","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"@opentelemetry/semantic-conventions":"1.22.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.6","@types/sinon":"10.0.20","karma-webpack":"4.0.2","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.9.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.9.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.22.0_1709198287933_0.0018574755392948283","host":"s3://npm-registry-packages"}},"1.23.0":{"name":"@opentelemetry/core","version":"1.23.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.23.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"f2e7ada7f35750f3c1674aef1e52c879005c0731","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.23.0.tgz","fileCount":462,"integrity":"sha512-hdQ/a9TMzMQF/BO8Cz1juA43/L5YGtCSiKoOHmrTEf7VMDAZgy8ucpWx3eQTnQ3gBloRcWtzvcrMZABC3PTSKQ==","signatures":[{"sig":"MEUCIFwQKCPi+D5c5UlVL193KLh6QP+SVLpBc0GIFe+eS592AiEAqsbVFRr8scoK2RuqzzJ+GTkb8Mnoyw25a+uKaAjSX1k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":876574},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"5231aa255047fbc6ee3d6a299f4423ab2f8a5fbc","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"@opentelemetry/semantic-conventions":"1.23.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.6","@types/sinon":"10.0.20","karma-webpack":"4.0.2","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.9.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.9.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.23.0_1712131801000_0.18584032010372686","host":"s3://npm-registry-packages"}},"1.24.0":{"name":"@opentelemetry/core","version":"1.24.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.24.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"5568b6c1328a6b9c94a77f9b2c7f872b852bba40","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.24.0.tgz","fileCount":462,"integrity":"sha512-FP2oN7mVPqcdxJDTTnKExj4mi91EH+DNuArKfHTjPuJWe2K1JfMIVXNfahw1h3onJxQnxS8K0stKkogX05s+Aw==","signatures":[{"sig":"MEYCIQDnSDpLeaSIEO1xDR9BTZD/oB8hG/unnKqNkTvHdvFfvwIhAM9p3R6EfBciQphgeoBfeilsY9hXAIG6H+GgiG4WAjyz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":876574},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"3ab4f765d8d696327b7d139ae6a45e7bd7edd924","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"@opentelemetry/semantic-conventions":"1.24.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.6","@types/sinon":"10.0.20","karma-webpack":"4.0.2","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.9.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.9.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.24.0_1713968897505_0.6084065679679229","host":"s3://npm-registry-packages"}},"1.24.1":{"name":"@opentelemetry/core","version":"1.24.1","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.24.1","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"35ab9d2ac9ca938e0ffbdfa40c49c169ac8ba80d","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.24.1.tgz","fileCount":462,"integrity":"sha512-wMSGfsdmibI88K9wB498zXY04yThPexo8jvwNNlm542HZB7XrrMRBbAyKJqG8qDRJwIBdBrPMi4V9ZPW/sqrcg==","signatures":[{"sig":"MEUCIQCcbQt91fxCzhLszbWNj11KRyev/6GQ7d3+LoxquFIbvwIgKOyNE84d8ozLyHqGEFYQKai25bXIJrJ0K7uVgnxJYQg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":876816},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"41c2626fe0ed03e2e83bd79ee43c9bdf0ffd80d8","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"@opentelemetry/semantic-conventions":"1.24.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.6","@types/sinon":"10.0.20","karma-webpack":"4.0.2","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.9.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.9.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.24.1_1715093554020_0.7142893600601368","host":"s3://npm-registry-packages"}},"1.25.0":{"name":"@opentelemetry/core","version":"1.25.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.25.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"ad034f5c2669f589bd703bfbbaa38b51f8504053","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.25.0.tgz","fileCount":462,"integrity":"sha512-n0B3s8rrqGrasTgNkXLKXzN0fXo+6IYP7M5b7AMsrZM33f/y6DS6kJ0Btd7SespASWq8bgL3taLo0oe0vB52IQ==","signatures":[{"sig":"MEUCIFEBfqbBcczub3WmGi+L4xr5G+a+5UKjlHxgTt21TmcSAiEA3rlCt2TQNHc18tMv9wcKC6zvQ3WbNcmoV3QmuhGtW0I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":877131},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"c4d3351b6b3f5593c8d7cbfec97b45cea9fe1511","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","align-api-deps":"node ../../scripts/align-api-deps.js","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"@opentelemetry/semantic-conventions":"1.25.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.3","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"9.5.1","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.6","@types/sinon":"17.0.3","karma-webpack":"5.0.1","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.10.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.10.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.25.0_1717607734445_0.5425212494871587","host":"s3://npm-registry-packages"}},"1.25.1":{"name":"@opentelemetry/core","version":"1.25.1","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.25.1","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"ff667d939d128adfc7c793edae2f6bca177f829d","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.25.1.tgz","fileCount":462,"integrity":"sha512-GeT/l6rBYWVQ4XArluLVB6WWQ8flHbdb6r2FCHC3smtdOAbrJBIv35tpV/yp9bmYUJf+xmZpu9DRTIeJVhFbEQ==","signatures":[{"sig":"MEUCICi19BiwHva23i39zqQGklR9ltkB8cWvr63wo3YPhDORAiEAyS+NynOecoaefXZVZ2e+Tka/swQ6Wya9N7jsxxF2IA4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":877131},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"0608f405573901e54db01e44c533009cf28be262","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","align-api-deps":"node ../../scripts/align-api-deps.js","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"@opentelemetry/semantic-conventions":"1.25.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.3","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"9.5.1","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.6","@types/sinon":"17.0.3","karma-webpack":"5.0.1","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.10.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.10.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.25.1_1718875149078_0.33184202871252877","host":"s3://npm-registry-packages"}},"1.26.0":{"name":"@opentelemetry/core","version":"1.26.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.26.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"7d84265aaa850ed0ca5813f97d831155be42b328","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.26.0.tgz","fileCount":462,"integrity":"sha512-1iKxXXE8415Cdv0yjG3G6hQnB5eVEsJce3QaawX8SjDn0mAS0ZM8fAbZZJD4ajvhC15cePvosSCut404KrIIvQ==","signatures":[{"sig":"MEUCIQCxMZt12wQPfPEMZAyDgiGfTpP1FC8A8Npxbj4wFLrfiwIgDGp649HhZKGPAyrzgPLT0BOh+00y9s8no28uepefu5Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":908101},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"720bc8c70d47029cb6b41a34ffdc3d25cbaa2f80","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc mocha test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","align-api-deps":"node ../../scripts/align-api-deps.js","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.20.4+x64 (linux)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"sideEffects":false,"_nodeVersion":"18.20.4","dependencies":{"@opentelemetry/semantic-conventions":"1.27.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.4","lerna":"6.6.2","mocha":"10.7.3","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","cross-var":"1.1.0","ts-loader":"9.5.1","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.7","@types/sinon":"17.0.3","karma-webpack":"5.0.1","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.10.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"7.0.0","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.10.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.26.0_1724836626112_0.32887955839862815","host":"s3://npm-registry-packages"}},"1.27.0":{"name":"@opentelemetry/core","version":"1.27.0","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/core@1.27.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"9f1701a654ab01abcebb12931b418f3393b94b75","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.27.0.tgz","fileCount":462,"integrity":"sha512-yQPKnK5e+76XuiqUH/gKyS8wv/7qITd5ln56QkBTf3uggr0VkXOXfcaAuG330UfdYu83wsyoBwqwxigpIG+Jkg==","signatures":[{"sig":"MEUCIQD5g87gqE5+W4/EX4K95Ud6Qq8EDfoOkjxvDIR7aS/eYAIgANcdr6IpUAPyj8SFUNeCX7ylEcTDIUzjnmX0PMtQKfs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@opentelemetry%2fcore@1.27.0","provenance":{"predicateType":"https://slsa.dev/provenance/v0.2"}},"unpackedSize":908565},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"eb3ca4fb07ee31c62093f5fcec56575573c902ce","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc mocha test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","align-api-deps":"node ../../scripts/align-api-deps.js","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.20.4+x64 (linux)","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","directories":{},"sideEffects":false,"_nodeVersion":"18.20.4","dependencies":{"@opentelemetry/semantic-conventions":"1.27.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.4","lerna":"6.6.2","mocha":"10.7.3","sinon":"15.1.2","webpack":"5.94.0","cross-var":"1.1.0","ts-loader":"9.5.1","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.8","@types/sinon":"17.0.3","karma-webpack":"5.0.1","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.10.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"7.0.0","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.10.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.27.0_1729695078367_0.07705641298199817","host":"s3://npm-registry-packages"}},"1.28.0":{"name":"@opentelemetry/core","version":"1.28.0","description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","main":"build/src/index.js","module":"build/esm/index.js","esnext":"build/esnext/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"types":"build/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/open-telemetry/opentelemetry-js.git"},"scripts":{"prepublishOnly":"npm run compile","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","test":"nyc mocha test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'","test:browser":"karma start --single-run","tdd":"npm run tdd:node","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","lint":"eslint . --ext .ts","lint:fix":"eslint . --ext .ts --fix","version":"node ../../scripts/version-update.js","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","prewatch":"npm run precompile","peer-api-check":"node ../../scripts/peer-api-check.js","align-api-deps":"node ../../scripts/align-api-deps.js"},"keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","engines":{"node":">=14"},"publishConfig":{"access":"public"},"devDependencies":{"@opentelemetry/api":">=1.0.0 <1.10.0","@types/mocha":"10.0.9","@types/node":"18.6.5","@types/sinon":"17.0.3","@types/webpack-env":"1.16.3","babel-plugin-istanbul":"7.0.0","cross-var":"1.1.0","karma":"6.4.4","karma-chrome-launcher":"3.1.0","karma-coverage":"2.2.1","karma-mocha":"2.0.1","karma-spec-reporter":"0.0.36","karma-webpack":"5.0.1","lerna":"6.6.2","mocha":"10.8.2","nyc":"15.1.0","sinon":"15.1.2","ts-loader":"9.5.1","typescript":"4.4.4","webpack":"5.96.1"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.10.0"},"dependencies":{"@opentelemetry/semantic-conventions":"1.27.0"},"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","sideEffects":false,"gitHead":"4b1ad3fda0cde58907e30fab25c3c767546708e5","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"_id":"@opentelemetry/core@1.28.0","_nodeVersion":"18.20.4","_npmVersion":"lerna/6.6.2/node@v18.20.4+x64 (linux)","dist":{"integrity":"sha512-ZLwRMV+fNDpVmF2WYUdBHlq0eOWtEaUJSusrzjGnBt7iSRvfjFE3RXYUZJrqou/wIDWV0DwQ5KIfYe9WXg9Xqw==","shasum":"e97290a3e36c59480ffb2287fe2713c66749274c","tarball":"https://registry.npmjs.org/@opentelemetry/core/-/core-1.28.0.tgz","fileCount":462,"unpackedSize":908565,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@opentelemetry%2fcore@1.28.0","provenance":{"predicateType":"https://slsa.dev/provenance/v0.2"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFc5D9+Q8KSFFqqmWLkorAdhpjNuRJkKGgCjg0cKOmHsAiBnr8cQEAMHc5EIu1VZdilXU30uBUR2yLnd9zGNFY+Vig=="}]},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"directories":{},"maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/core_1.28.0_1731926489921_0.4306860148532681"},"_hasShrinkwrap":false}},"time":{"created":"2019-10-08T22:45:09.283Z","modified":"2024-11-18T10:41:30.552Z","0.1.0":"2019-10-08T22:45:09.662Z","0.1.1":"2019-10-15T23:47:18.382Z","0.2.0":"2019-11-04T20:17:22.690Z","0.3.0":"2019-12-13T19:36:44.556Z","0.3.1":"2019-12-21T00:00:28.213Z","0.3.2":"2020-01-03T21:56:48.773Z","0.3.3":"2020-01-22T22:48:01.199Z","0.4.0":"2020-02-05T23:02:58.507Z","0.5.0":"2020-03-16T22:03:17.625Z","0.5.1":"2020-03-20T00:42:51.648Z","0.5.2":"2020-03-27T18:04:01.528Z","0.6.0":"2020-04-02T17:28:22.072Z","0.6.1":"2020-04-08T18:37:32.711Z","0.7.0":"2020-04-24T18:14:44.336Z","0.8.0":"2020-05-12T16:36:33.095Z","0.8.1":"2020-05-18T19:37:34.557Z","0.8.2":"2020-05-21T19:29:57.452Z","0.8.3":"2020-05-28T20:19:33.975Z","0.9.0":"2020-06-18T21:23:30.691Z","0.10.0":"2020-07-27T20:59:10.636Z","0.10.1":"2020-07-28T15:12:30.934Z","0.10.2":"2020-08-03T23:25:34.407Z","0.10.3-canary.0":"2020-08-07T16:47:19.184Z","0.10.3-alpha.34":"2020-08-24T16:44:21.720Z","0.10.3-alpha.35":"2020-08-24T22:45:15.647Z","0.10.3-alpha.40":"2020-08-27T14:23:13.785Z","0.10.3-alpha.41":"2020-08-27T16:08:34.256Z","0.11.1-alpha.48":"2020-09-01T19:24:11.753Z","0.11.0":"2020-09-01T19:32:16.516Z","0.11.1-alpha.15":"2020-09-21T03:29:52.965Z","0.11.1-alpha.35":"2020-09-30T12:22:05.611Z","0.11.1-alpha.36":"2020-09-30T12:38:38.999Z","0.11.1-alpha.44":"2020-10-07T19:54:55.988Z","0.11.1-alpha.53":"2020-10-19T11:48:06.017Z","0.12.1-alpha.54":"2020-10-19T12:49:53.075Z","0.12.0":"2020-10-19T12:53:47.871Z","0.12.1-alpha.7":"2020-10-26T21:11:57.725Z","0.13.0":"2020-12-04T21:26:17.508Z","0.14.0":"2020-12-17T20:52:53.448Z","0.15.0":"2021-01-21T22:19:58.263Z","0.16.0":"2021-02-01T22:33:22.702Z","0.16.1-alpha.10":"2021-02-08T15:50:01.764Z","0.16.1-alpha.11":"2021-02-08T16:17:51.373Z","0.16.1-alpha.14":"2021-02-10T16:05:53.197Z","0.16.1-alpha.15":"2021-02-10T22:17:57.777Z","0.16.1-alpha.18":"2021-02-14T18:12:22.613Z","0.16.1-alpha.20":"2021-02-17T20:51:47.748Z","0.17.0":"2021-02-17T21:16:01.491Z","0.17.1-alpha.21":"2021-02-17T21:16:41.497Z","0.17.1-alpha.2":"2021-02-20T17:37:17.058Z","0.17.1-alpha.5":"2021-02-24T17:19:29.390Z","0.17.1-alpha.8":"2021-03-01T13:38:04.226Z","0.18.1-alpha.12":"2021-03-02T13:53:42.795Z","0.18.0":"2021-03-02T14:00:58.711Z","0.18.1-alpha.3":"2021-03-02T19:09:18.396Z","0.18.1-alpha.20":"2021-03-24T13:10:41.430Z","0.18.1-alpha.21":"2021-03-24T14:12:37.018Z","0.18.1-alpha.24":"2021-03-24T19:38:27.755Z","0.18.1-alpha.26":"2021-03-24T20:08:49.654Z","0.18.2-alpha.81":"2021-03-29T19:51:45.852Z","0.18.1":"2021-03-29T20:03:51.356Z","0.18.2-alpha.1":"2021-03-30T13:05:55.237Z","0.18.3-alpha.2":"2021-03-30T15:26:52.187Z","0.18.2":"2021-03-30T16:15:41.499Z","0.18.3-alpha.1":"2021-03-30T17:29:20.478Z","0.18.3-alpha.3":"2021-03-31T07:37:53.838Z","0.18.3-alpha.4":"2021-04-05T16:37:37.394Z","0.18.3-alpha.5":"2021-04-05T17:54:17.158Z","0.18.3-alpha.7":"2021-04-07T16:12:09.108Z","0.18.3-alpha.10":"2021-04-08T14:25:17.539Z","0.18.3-alpha.11":"2021-04-08T20:21:42.748Z","0.18.3-alpha.14":"2021-04-09T09:11:21.734Z","0.18.3-alpha.16":"2021-04-09T20:07:36.387Z","0.18.3-alpha.18":"2021-04-10T19:00:45.129Z","0.18.3-alpha.20":"2021-04-12T15:08:28.747Z","0.18.3-alpha.23":"2021-04-12T18:12:43.180Z","0.18.3-alpha.25":"2021-04-12T19:42:19.600Z","0.18.3-alpha.28":"2021-04-14T07:51:36.118Z","0.18.3-alpha.31":"2021-04-20T15:48:37.243Z","0.19.1-alpha.36":"2021-04-22T12:19:36.084Z","0.19.0":"2021-04-22T12:28:41.304Z","0.19.1-alpha.37":"2021-04-22T18:15:42.127Z","0.19.1-alpha.39":"2021-04-22T18:44:53.226Z","0.19.1-alpha.7":"2021-04-28T16:13:40.944Z","0.19.1-alpha.9":"2021-04-29T08:17:24.626Z","0.19.1-alpha.11":"2021-04-29T21:06:56.576Z","0.19.1-alpha.12":"2021-04-30T20:49:40.788Z","0.19.1-alpha.19":"2021-05-08T07:53:46.174Z","0.19.1-alpha.21":"2021-05-11T18:49:56.077Z","0.19.1-alpha.25":"2021-05-12T15:53:44.277Z","0.19.1-alpha.26":"2021-05-12T16:06:41.618Z","0.19.1-alpha.31":"2021-05-19T18:06:51.835Z","0.19.1-alpha.33":"2021-05-20T12:11:55.020Z","0.19.1-alpha.38":"2021-05-26T15:02:46.368Z","0.19.1-alpha.42":"2021-06-01T19:12:20.081Z","0.19.1-alpha.43":"2021-06-01T19:45:48.141Z","0.20.1-alpha.49":"2021-06-03T17:09:47.086Z","0.20.0":"2021-06-03T18:28:28.620Z","0.20.1-alpha.3":"2021-06-05T08:28:50.913Z","0.20.1-alpha.4":"2021-06-08T13:27:41.307Z","0.21.1-alpha.7":"2021-06-10T17:26:00.166Z","0.21.0":"2021-06-10T18:29:44.800Z","0.21.1-alpha.1":"2021-06-12T08:24:24.129Z","0.21.1-alpha.2":"2021-06-12T08:35:10.708Z","0.22.1-alpha.5":"2021-06-17T17:05:04.034Z","0.22.0":"2021-06-17T17:58:33.469Z","0.22.1-alpha.3":"2021-06-23T16:04:49.186Z","0.22.1-alpha.13":"2021-06-30T18:40:21.857Z","0.22.1-alpha.15":"2021-06-30T19:08:38.326Z","0.22.1-alpha.16":"2021-06-30T19:48:41.701Z","0.23.1-alpha.17":"2021-06-30T20:07:31.347Z","0.23.0":"2021-06-30T20:14:47.828Z","0.23.1-alpha.18":"2021-07-02T14:38:00.741Z","0.23.1-alpha.3":"2021-07-05T22:27:22.465Z","0.23.1-alpha.15":"2021-07-17T09:18:02.142Z","0.23.1-alpha.23":"2021-07-23T17:46:09.568Z","0.23.1-alpha.24":"2021-07-25T06:45:10.177Z","0.23.1-alpha.28":"2021-07-27T19:44:08.106Z","0.24.1-alpha.31":"2021-07-28T14:06:50.684Z","0.24.0":"2021-07-28T14:13:56.397Z","0.24.1-alpha.1":"2021-07-30T19:42:27.764Z","0.24.1-alpha.4":"2021-08-05T19:28:01.739Z","0.24.1-alpha.5":"2021-08-06T11:31:20.268Z","0.24.1-alpha.7":"2021-08-07T13:32:46.727Z","0.24.1-alpha.14":"2021-08-11T14:50:41.233Z","0.24.1-alpha.20":"2021-08-17T21:06:54.153Z","0.25.1-alpha.21":"2021-08-18T20:16:29.342Z","0.25.0":"2021-08-18T21:16:39.934Z","0.25.1-alpha.2":"2021-08-23T21:40:57.999Z","0.25.1-alpha.4":"2021-08-24T19:33:01.302Z","0.25.1-alpha.12":"2021-08-30T20:21:57.050Z","0.25.1-alpha.13":"2021-08-30T20:41:16.456Z","0.25.1-alpha.23":"2021-09-08T22:15:00.004Z","0.26.0":"2021-09-30T12:35:27.848Z","1.0.0":"2021-09-30T20:53:41.108Z","1.0.1":"2021-11-11T14:51:21.030Z","1.1.0":"2022-03-18T08:10:59.187Z","1.1.1":"2022-03-22T19:52:28.677Z","1.2.0":"2022-04-22T14:57:00.782Z","1.3.0":"2022-05-27T19:41:21.005Z","1.3.1":"2022-06-06T20:26:09.655Z","1.4.0":"2022-07-06T20:15:34.856Z","1.5.0":"2022-07-26T20:52:11.237Z","1.6.0":"2022-08-24T17:44:32.564Z","1.7.0":"2022-09-16T12:14:55.472Z","1.8.0":"2022-11-09T19:45:30.311Z","1.9.0":"2023-01-11T21:46:12.689Z","1.9.1":"2023-01-30T15:30:06.719Z","1.10.0":"2023-03-13T15:53:37.715Z","1.10.1":"2023-03-20T16:10:31.107Z","1.11.0":"2023-03-30T15:30:52.619Z","1.12.0":"2023-04-13T18:12:57.484Z","1.13.0":"2023-05-11T13:30:02.830Z","1.14.0":"2023-06-06T06:00:51.778Z","1.15.0":"2023-07-06T11:27:05.148Z","1.15.1":"2023-07-24T14:32:44.418Z","1.15.2":"2023-08-08T13:21:04.540Z","1.16.0":"2023-09-11T12:14:25.585Z","1.17.0":"2023-09-12T13:12:28.480Z","1.17.1":"2023-10-10T14:18:11.846Z","1.18.0":"2023-11-07T10:44:42.737Z","1.18.1":"2023-11-08T18:09:04.280Z","1.19.0":"2023-12-14T12:35:23.074Z","1.20.0":"2024-01-15T10:15:43.196Z","1.21.0":"2024-01-26T06:11:06.025Z","1.22.0":"2024-02-29T09:18:08.192Z","1.23.0":"2024-04-03T08:10:01.177Z","1.24.0":"2024-04-24T14:28:17.735Z","1.24.1":"2024-05-07T14:52:34.198Z","1.25.0":"2024-06-05T17:15:34.619Z","1.25.1":"2024-06-20T09:19:09.299Z","1.26.0":"2024-08-28T09:17:06.301Z","1.27.0":"2024-10-23T14:51:18.573Z","1.28.0":"2024-11-18T10:41:30.093Z"},"bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core","keywords":["opentelemetry","nodejs","browser","tracing","profiling","metrics","stats"],"repository":{"type":"git","url":"git+https://github.com/open-telemetry/opentelemetry-js.git"},"description":"OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"readme":"# OpenTelemetry Core\n\n[![NPM Published Version][npm-img]][npm-url]\n[![Apache License][license-image]][license-image]\n\nThis package provides default implementations of the OpenTelemetry API for trace and metrics. It's intended for use both on the server and in the browser.\n\n## Built-in Implementations\n\n- [OpenTelemetry Core](#opentelemetry-core)\n - [Built-in Implementations](#built-in-implementations)\n - [Built-in Propagators](#built-in-propagators)\n - [W3CTraceContextPropagator Propagator](#w3ctracecontextpropagator-propagator)\n - [Composite Propagator](#composite-propagator)\n - [Baggage Propagator](#baggage-propagator)\n - [Useful links](#useful-links)\n - [License](#license)\n\n### Built-in Propagators\n\n#### W3CTraceContextPropagator Propagator\n\nOpenTelemetry provides a text-based approach to propagate context to remote services using the [W3C Trace Context](https://www.w3.org/TR/trace-context/) HTTP headers.\n\n```js\nconst api = require(\"@opentelemetry/api\");\nconst { W3CTraceContextPropagator } = require(\"@opentelemetry/core\");\n\n/* Set Global Propagator */\napi.propagation.setGlobalPropagator(new W3CTraceContextPropagator());\n```\n\n#### Composite Propagator\n\nCombines multiple propagators into a single propagator.\n\n> This is used as a default Propagator\n\n```js\nconst api = require(\"@opentelemetry/api\");\nconst { CompositePropagator } = require(\"@opentelemetry/core\");\n\n/* Set Global Propagator */\napi.propagation.setGlobalPropagator(new CompositePropagator());\n```\n\n#### Baggage Propagator\n\nProvides a text-based approach to propagate [baggage](https://w3c.github.io/baggage/) to remote services using the [OpenTelemetry Baggage Propagation](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/baggage/api.md#baggage-propagation) HTTP headers.\n\n```js\nconst api = require(\"@opentelemetry/api\");\nconst { W3CBaggagePropagator } = require(\"@opentelemetry/core\");\n\n/* Set Global Propagator */\napi.propagation.setGlobalPropagator(new W3CBaggagePropagator());\n```\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: \n- For more about OpenTelemetry JavaScript: \n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/core\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fcore.svg\n","readmeFilename":"README.md"} \ No newline at end of file diff --git a/tests/registry/npm/@opentelemetry/resources/registry.json b/tests/registry/npm/@opentelemetry/resources/registry.json new file mode 100644 index 00000000000000..c180460ce69b5e --- /dev/null +++ b/tests/registry/npm/@opentelemetry/resources/registry.json @@ -0,0 +1 @@ +{"_id":"@opentelemetry/resources","_rev":"184-b7abc59ea1cb96e1ba0a2e1184295628","name":"@opentelemetry/resources","dist-tags":{"canary":"0.25.1-alpha.23","next":"1.8.0","latest":"1.28.0"},"versions":{"0.5.0":{"name":"@opentelemetry/resources","version":"0.5.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.5.0","maintainers":[{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"d7d9a0968406c1a2e24036aae71fe0d31478439c","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.5.0.tgz","fileCount":10,"integrity":"sha512-vOlf3nzijuwI166stpsLrHiDUqA0XPn/AWGvqBZ0+trGt5iFeS+lt3LGwhmdeppahwWQkwrxBOfh2D68Hoit5Q==","signatures":[{"sig":"MEYCIQDK+qCcpbnAoXL4FdqFDE8un42lBX199JBLZItO66+acgIhAOYR51aEdlRZxU2zhdJof3bmCHhqwJYC3QPR2tIEGv13","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27945,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeb/htCRA9TVsSAnZWagAATXsQAJ0OZvoMECIFInsOW735\nUhYctAs4wqbUV8BfOq9ktEJUe/4EomoOW1OXa1IvE/eNL19izOze73eYuBMW\n9PZvCMWoKu+rle7qHTfXuOuE0O1rutW+IUCR3hqMIOMwcDh/VmW7Nl41Mc8R\n0zqfBdUfhfrv8m3pK9F+2nlSdcF60tkrCbJaMg1Snuvs9Qn8QlChxez4ct7h\nup55SL1GeGC9DsCqbsFgfiJqh1X3PVWyOCzZKkELRXgpU5YdPlnM2deMl0RX\n2sYeT+xYrLvBhUQSejOMCBYiZepNvxeEAfraNootDP1hLyOUmSck0Mhawckl\nFCKuzL6KeP9G1cvpDxema0qaB0upA1WerXv//ioNWeBKe7JTlpHDMWSXiQ1q\nb/H27tdAeZVsFnwHbyA8dQkaV/i/Djwuw1dP40yICyII+5HJD4h59EjkiUaW\nBp4vbqb2OTeYA2+l3pD0khfKxXCb9m0CO3OJFkpyXvMvFBC9tNyqnFktmytm\ny2FuExHc0kTBLwU0yWaBF64vScw9EyV2YV4ABMrecqRGux1oGEaB+OuMivZi\n0YMQnC+wmxJa+CaXcIeLtOupX11/Lkt/z1SLzerlP2Xzn+xPCrFOpSJA0WCv\n0LVT5nIbFtXRKzb5pUZsXVgxoxH3gJIGXpP5OjIuIBedWRvs0lyW0FgFGiOi\nfcN5\r\n=nGrA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"gts check","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"gts fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"mayurkale22","email":"mayurkale22@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.4.1","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"10.15.1","dependencies":{"@opentelemetry/api":"^0.5.0","@opentelemetry/base":"^0.5.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.1.0","nyc":"^14.1.1","mocha":"^6.2.0","rimraf":"^3.0.0","codecov":"^3.6.1","ts-node":"^8.6.2","ts-mocha":"^6.0.0","typescript":"3.7.2","@types/node":"^12.6.9","@types/mocha":"^5.2.7","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.16.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.5.0_1584396397217_0.8910905601362709","host":"s3://npm-registry-packages"}},"0.5.1":{"name":"@opentelemetry/resources","version":"0.5.1","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.5.1","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"5595c24c2838d9c699934a54afcaa529555e58d6","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.5.1.tgz","fileCount":10,"integrity":"sha512-Ap96j9pf125C0PthtyUBJ8wE2VOsMgQVfIy9dKLfR272itzFwmkJeVWmjbFT5yGhr3g0G4C4XPlHodDNYntcWg==","signatures":[{"sig":"MEUCIQDyQcoKVxQkL9I0jn8WoM3k4D/dFXpFVnBIYYAj9cU11wIgJqYnrQ732A/pgzqiup+dUVyaesq79JrbJ1j3iDkLxKY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27945,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedBGLCRA9TVsSAnZWagAALTwP/AwfqS/PqayjD7TOgTak\nE6HCQrKLRLL5GGysapOh9EQnc/b+553qy1sJezu3WacFF7eI72Lnmb6jbR9D\nwV21w4uW4jA5sDMKh4sWdJ3J1COchgmGSG2+vOIwafBirJt/22a/Zbj6W9+0\nRODb4cEjoGg+b9pd3jHYeqphC4KOCoDLcwLrj2X/V+XPvFMXrc8jr8TXWoQp\n3d/QcVwR4Ao9nWetU3jYS8I0CZfPfIF+ttWu94VtRGdjULsbII7DznQ1TIZ9\nEo3DCjfKWRNoquvrEDB2qGbKlpw1JdMNGjlarKb4ue2eH8PCLWOJz5PPoaFa\nyGaX9eZPx+TWS1HU0Mk667QCsK0JVKpwsMfZh27tyH2hzFSyVWUA2dLo4M+X\n3MkT3rmD8lX7K2jZhINi704dR3LYjY3dWbv7CDDfHb2ry9ClNnki2vw/MG1g\nNK235WqpvyltJDyjSYQpNEb2fUkV6cousb03TgzhnhujFJagkNgSEta6qxxI\n8q0oDQ+FxX5v6Wt5anndxu05IwKD91ZhEVyCjhX8UuBDD2bsFlyDq/GMbAxf\nsTO/4q6eGA/QlQkqrJOmE/wzdHFYfQ/QKKidKsAnLix+RrPxxXh0iC+1OBwV\nhAkUVzUzAHC02UoI1U/D4bkpq3rydHxI8rA6JVs9vYUqnOQaNEJ1213xW36B\n4Rg5\r\n=qtLC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"gts check","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"gts fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.14.1","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"12.14.1","dependencies":{"@opentelemetry/api":"^0.5.1","@opentelemetry/base":"^0.5.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.1.0","nyc":"^14.1.1","mocha":"^6.2.0","rimraf":"^3.0.0","codecov":"^3.6.1","ts-node":"^8.6.2","ts-mocha":"^6.0.0","typescript":"3.7.2","@types/node":"^12.6.9","@types/mocha":"^5.2.7","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.16.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.5.1_1584664971244_0.46385036184750383","host":"s3://npm-registry-packages"}},"0.5.2":{"name":"@opentelemetry/resources","version":"0.5.2","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.5.2","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"08bb6c6793c112fef2f769929bc6424cfbf7fdc7","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.5.2.tgz","fileCount":10,"integrity":"sha512-aMORsB2BR52Ks/kqLO3cn6p7yGa12rN/DOLCh+smS7A2q6sWhnS4asAf+w+OcHnMvYmCfnN+8Cd3tTjkJekOtA==","signatures":[{"sig":"MEYCIQCMJtsBoXia+2okwlKhfkQYunvF8Z6ac67f01CvmkxBKAIhAKa+90kgIT/v2q6kz18qrTDrTTyh1xsjL3wObX02VtMB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27945,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefkARCRA9TVsSAnZWagAApJIP/0KyTz6une8zQyzAISiC\nAPeIw4LgrfomVblm1cgggGecv/odObLRfqZS9tQCV5P9+SxVN+44EhRl6klZ\nFZwm1ibSPfs77rBa6FNJqf17TAKuChFWysufMQvrRVMui0UqAqO7kzuyvzNi\n+Ip6QjWe8B1woA0rgeaIHu9k0mlCf3VBM71g3E0NDEFdkGyG7Tfz8lBqtD7N\nkP13tqjHiTbQELpc+dB9jFuL6BUt8NZlmqKdNdYbVjqAh2DU98RYBo1yi58E\nRHE0EVtXRu6Sqy1c3yI0HuGgZjL1sTxIcPMUUqeBhYCTYBUM83hLElwpNU3R\nWpXFWpswLw7dtndVDOxQtqfGUHXQMqmH37FdhnDNTugQGT8KnJa9RgOm6NAr\nnZyTlZ40tGtM9h6utUL5d/9w9cC2ppprtxrl/YNT3cNzUIqZEFM3EeXWIGhk\nF4a2+bOykrk74A/BLH25fOFu7Ryjl71qrohBPYI0LULhsOB9a2IMPoK+XllV\nqGdef3VvJzQtdm/z9VJycrogP1Zj/JBbWwGClSmNKpCULBoz7B5GHzHQ+rE7\nN9jMb/rg+QcqOVoBwxqFGBdOUH41vHJQDp/l7pWhrWIagpcsev9uSYan7wrK\ncrJeoGXgTKqnCzRu/yq9wiDdnsrig6CBSzkXrecYux7/dc+/pIfoou0ASlSm\nmZR0\r\n=b5e2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"gts check","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"gts fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.14.1","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"12.14.1","dependencies":{"@opentelemetry/api":"^0.5.2","@opentelemetry/base":"^0.5.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.1.0","nyc":"^14.1.1","mocha":"^6.2.0","rimraf":"^3.0.0","codecov":"^3.6.1","ts-node":"^8.6.2","ts-mocha":"^6.0.0","typescript":"3.7.2","@types/node":"^12.6.9","@types/mocha":"^5.2.7","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.16.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.5.2_1585332240931_0.7560970088336871","host":"s3://npm-registry-packages"}},"0.6.0":{"name":"@opentelemetry/resources","version":"0.6.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.6.0","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"b57cdf923ba0a9960d4860f72c4927e01ab0226d","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.6.0.tgz","fileCount":10,"integrity":"sha512-Y30vN0/+3SHvhxOEyW173fmUPaLzbplvrQPxib85JtlYbrULYPauVtUT2t9XCUkYRyqWlOULe51aRs6jnG4awQ==","signatures":[{"sig":"MEUCIQDlmDZza9LwuasYasuDf0NMz6aQk5pnAk4SuwLk3o2z2QIgOAHgqgshxXliyAnkbOz6Yzq36I79hQyLrkYzX+J+QQQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27945,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehiIPCRA9TVsSAnZWagAAOv8P/0jkjVJeB9WRcTbWjW2X\nzDwFyWTO5sOZCb3fsX6hVhEE9mQiFvTR7BQYWkORIJfRUILQkZn+iQM8XRrO\naFTaeLStoZdcW2ATMKoGjn6Gyx0ihKYMdagvD41Okh5gpDoOwW1IsBfg3Jin\nhpkENVvHegx3w8487xJ0iGEIwDtYW1MTBopJ7zmbajLBfPKaBrVTmVOCH6UA\nXE1x543YsG97KRvuVWskV6G33ux5rWE3iStgOT6zNkjA7wzWO2vvSfZFu4Aq\nAObs26LFY1bbkOtJhByqqqAHFw1aQZfNW7PBc9o8Dgauwp7YVIwvyja5kb49\nvYgUX+WkzZ81xijNt5V+JtFb/V7VdhU2kGrLOJhSMub0a47eCj0u+6RD1YTT\nuxKE9CHTPJ13SjaNltZcmxehM7TaUALLjFfphxBERxU7vdfB1Z79afoxHJQ6\nE25/MpPHie6aIWL/zV+q5GpK/JxkHGVf5S6Xc8VleVnXGYZqxZCUbRIrKofO\nqWlSqaVsgQcT/dD4cmzAgLH3HuU2/NO6R4puAaJO7v2oujnFBRHqN+1kVi4l\nnL/0HTp992t3Us+MlYqhSMlO35KfgNTnD15ifGs84A2XK9SAfWjCbVGSBTMJ\nZvBSKJXnTkX4UEq1NL+xXvsA+BbugXvHXTPMa3PeC94llj/m7jr6qGrJFUex\nqLRu\r\n=EwHI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"gts check","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"gts fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"mayurkale22","email":"mayurkale22@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.4.1","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"10.15.1","dependencies":{"@opentelemetry/api":"^0.6.0","@opentelemetry/base":"^0.6.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.1.0","nyc":"^15.0.0","mocha":"^6.2.0","rimraf":"^3.0.0","codecov":"^3.6.1","ts-node":"^8.6.2","ts-mocha":"^6.0.0","typescript":"3.7.2","@types/node":"^12.6.9","@types/mocha":"^5.2.7","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.16.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.6.0_1585848847092_0.8421565921674956","host":"s3://npm-registry-packages"}},"0.6.1":{"name":"@opentelemetry/resources","version":"0.6.1","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.6.1","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"f89cb33606c351498dde8aa541f4bc4d4e990f99","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.6.1.tgz","fileCount":10,"integrity":"sha512-pAHVytrr08gGR3LJl9bcolELG0ELmhiyssr2FadSLDop30ghx2Na73nPyK3yTkdbnt5ztx/6RvTFSwYXUgBTdA==","signatures":[{"sig":"MEUCIQCgWJpHW3ODqK1jPCTqBqkecgGVBul/Z3y+Na7nP1TnEgIgFBS3Dtq2XDNIMyYzWhS2PTPzlTC3CushzgUhdnCvjBs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27945,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejhnsCRA9TVsSAnZWagAA8HgP/RpEBMJgN54f7p2whTjF\n9kf3t3lX+X9c+qIq+oksi60AA3cgTtLvc4K7D9F4jdyx26bJhiu9N5Fer1Ed\nZmcxU3qpITgJyYeBgBM0ZMJmg9aS10yr069+e8eJtjjl617zmZr499cNHxHO\niD1amXaj1wKvJNyj/s2Pzdb9kVRlEg1+EZMfhSuffDgSQvJCN2oi9tb73XWG\n5dobjB2b+9V3B3GR3PKE+nnk1wgUrLWlyRPqmd5DazrbJit5K+DCX0/vL5q6\n0HA2NOHU7PfpKzOR7SDS+j9nx/Ig/7bIM2qzpZsSeGddPHQerme7NEaBqWPY\nsLqkUbtA/gQO+Y1xPT5BYE6WwXV/sySiuAMOLaWh60A12FbqAcb0fXgDdlFo\nGeSNClvyo8g9ZiIBYGRqIKg4OzSfpqWTGbS54nCkk2dgd200kiz/ojprYZhL\nK24hRMzKIwc1Y5ISezEqeSDCPXAtP0pim4mEOK+O5QL0c7eCAQMc1dXF4jZi\nrQnBrQw+BuTC0+/i0GVjgTM2jOO4D2jqxBSgSae2LZrVFhx4MrL5Ql8e8mkW\n3rpaaCkh+3ySEWVFjFNf6yrgPK3jlZeyENRl13l5Y0C41iAAUki5V0KjM6hw\nyGtEypqoq+xcMTs0R8pvAr1uQzQVmqeJWr9+yLZKdHKTF7izkapTeWpRSU6G\n19MD\r\n=YHJF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"gts check","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"gts fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.14.1","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"12.14.1","dependencies":{"@opentelemetry/api":"^0.6.1","@opentelemetry/base":"^0.6.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.1.0","nyc":"^15.0.0","mocha":"^6.2.0","rimraf":"^3.0.0","codecov":"^3.6.1","ts-node":"^8.6.2","ts-mocha":"^6.0.0","typescript":"3.7.2","@types/node":"^12.6.9","@types/mocha":"^7.0.0","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.16.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.6.1_1586371051708_0.6417864431465292","host":"s3://npm-registry-packages"}},"0.7.0":{"name":"@opentelemetry/resources","version":"0.7.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.7.0","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"9045ceb44e203b4707600766d5f397bbb85018c9","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.7.0.tgz","fileCount":30,"integrity":"sha512-0pHfsSR9eSNeqI3mcaaawbHrf7TImdyJePL69A+wrULcYkLzb6M/MlpQzF0dvVMOUYL2bLIcUmkrcCt3ZV3gJQ==","signatures":[{"sig":"MEYCIQDhCKucHLwLUh9VMsixGvQR5DvkW9mh2az3MVx1MCYSLQIhAO4JsXucWdv3Z8KdJYmizJylEcatJ3tAGaxqyqjqR5zV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":58915,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeoyzmCRA9TVsSAnZWagAAyEgP+wXefZ9gYxetLM4Kfc+b\nysOuYE+1XDY9dw5Od3q3rSyMHhSXlrimkNPm3OYjSQf/P8siz+Z34G0tTTfY\nqy2TAm3y0C8db/iB+8QVOhWVIVUia/7iDKDrjLIPlnAPhC8RgSKHEtDjDcVB\nZqenbTSH42VILn3sJqBXQlywIsyl9YdAwym7OY+A2RSSkamR6MsVLO6+joP+\nuKKPdrnxJiSnUwHVpi9TRVcxVi48VW9sy+h2rXTzLLRd5Zy7GZYkVzq2wk7A\n/ArqObYei3JIAmuNA33FsahkzBtmAeBn9fAxKeWJVwOQz1aRHcd3Lvk2lYcy\nFzbS5zmdA/klnxSE/9OB7tUpLoZGEC58T1U5eXnDL2A+L0RapW60a0xJLEq+\nw65EyxWtOJ7eXEQ81GFeNVFt9biJQhFKRKX3VCecSbgTk21ID7r7UxyZttOt\n1GaZtaExaeER75HmE8KWbNRL4VCkGlYgPXsK5ZFjoo71Ks/Bl/ZuzoeeorTB\nQaGgFs5muHxsb4Zt515xVAhnq4WEjzDFdjx9VlcYX57aidCaKbFfcOOM0xOF\nPlChpwebB1rPIavG8Ab9Bo6aMPlNhYE4ACG1staL4FD1S9ZmbHm5M7t+Hk2O\nFblaW8FoKtBYPh0/zIpTEOGF8b472v/z9i4Snw04pS2TGvk+NPn+MJHAq1Tf\nAxVm\r\n=LfRz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"gts check","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"gts fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"mayurkale22","email":"mayurkale22@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.4.1","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"10.15.1","dependencies":{"gcp-metadata":"^3.5.0","@opentelemetry/api":"^0.7.0","@opentelemetry/base":"^0.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.1.0","nyc":"^15.0.0","nock":"^12.0.2","mocha":"^6.2.0","sinon":"^7.5.0","rimraf":"^3.0.0","codecov":"^3.6.1","ts-node":"^8.6.2","ts-mocha":"^6.0.0","typescript":"3.7.2","@types/node":"^12.6.9","@types/mocha":"^7.0.0","@types/sinon":"^7.0.13","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.16.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.7.0_1587752165838_0.8294568245552454","host":"s3://npm-registry-packages"}},"0.8.0":{"name":"@opentelemetry/resources","version":"0.8.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.8.0","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"147d718ffe0456cc1a992151ae11f52900f41ddc","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.8.0.tgz","fileCount":30,"integrity":"sha512-4mJFsZR7nAwl9UFLiy7Jy/GGfKsqGa49q0GL4r1F3eUzbClJBxZfgQAu9xIh7kiIy0R2xhAaJEyifOrYaQ2Jww==","signatures":[{"sig":"MEUCIGHPib2rvqaGtvgpUKZXua75DZrHJGh+ZOsf9HN4N5ebAiEA3PZs9AhPLVfE0VX4MOO40WySIDVVzuvQWu77ai3E02c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":59457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeutD7CRA9TVsSAnZWagAAnvYP/3hLluD7XCTWw8ry5+yQ\n62WVXHO/BNYYI2tr/RGbpz4oRqDcF17ZuUM3QnSUOspLVmwSEMzjSv4RLycw\ndtzczfeQc+rTsqUlKN+QN3eivQ5RLft55XzeICeTfdJ/bpbEsazGlJ0LMIMO\nVKoNBVYZie5uFlrtmlI8qjaMPdTYWTV6SOcvh5xrPkaH5SHcX4C08jWN0Djn\ntW1MIPtFK4ugpHgdJJLvcolyaZH64lmgQiqqdwoPFkEZGUn2KuUElltUrOnv\nWFClco01ImLZfIf9Uwi0dY2/ZeFMoO50Hic6aBWRikCQhlYgsWHr7iwkqnhR\nq4VB6sqUI96/ABtCeF7Mf+690UnSaXF8TrGRE1zC1hOXWNlPFF7IW1CdBH8i\nLfpTuoj2ZWylc3g+SYYjqlMsIFNpd6P6lyv4ptsHEUlU25hdremzuR3ZL2b0\nqSs1JzjoqcA93oylRjy8aH1f8MhoXRxfrYQb5yAOCdmDsUcQ+1VP01Bp9Vmr\nmyuQxLxpVR4+T9s59ORVLQ11co34DL75fvUVSNnCnbHjIHn1KPshheN5VxyJ\n1f62je+ejFovQT9bUwpeSS+NN4O7fUqbBgMyx0K3xCH1ud07sqcC3KGs2ZNX\n+86PS7fa3UFk/xnB8UX46yVA8hj7qhiI9Qxh4bafwpj0XYRGB3ABNyqmo5wf\nmKjV\r\n=y7eU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"gts check","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"gts fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"mayurkale22","email":"mayurkale22@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.4.1","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"10.15.1","dependencies":{"gcp-metadata":"^3.5.0","@opentelemetry/api":"^0.8.0","@opentelemetry/core":"^0.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.1.0","nyc":"^15.0.0","nock":"^12.0.2","mocha":"^6.2.0","sinon":"^7.5.0","rimraf":"^3.0.0","codecov":"^3.6.1","ts-node":"^8.6.2","ts-mocha":"^6.0.0","typescript":"3.7.2","@types/node":"^12.6.9","@types/mocha":"^7.0.0","@types/sinon":"^7.0.13","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.16.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.8.0_1589301499281_0.623450357566786","host":"s3://npm-registry-packages"}},"0.8.1":{"name":"@opentelemetry/resources","version":"0.8.1","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.8.1","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"7be6c071be30790fed92c6fdc0e85850a2ee83f6","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.8.1.tgz","fileCount":30,"integrity":"sha512-o0bw9EU8Gnt7oxsb2HaGVZc1oj+BwSZnz94Y9ZY19RBbaZ2HKDKLQvtJB29CIeF/Me6oQzObLyoyXPU7Ky2WTw==","signatures":[{"sig":"MEUCIQDRthwvFPuFrhdx2p8FpMml3ZxVGGf6anhIArufaK7qqAIgTHKnmI9sGxFgRGDEmzpuYw3bhwY4e7rnyZXCaNFnH7U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":59622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJewuQFCRA9TVsSAnZWagAAMncP/0sWg+7XSTLWzj58OYpb\ntfRzkrB5FS8Z774P3exoAuzROL04wWjiyiZLCh9O4ABgNKYNQ/J9rtEegBw/\n/QQ0l9YB7DMCVPYbekxKrcUt5Z+CwzVtVFwqfjIGUmokLdLgaxFWWZTX/p3a\nCnFaLMXZWrN3uTr8bKIoUsEUzyEIeYaS1wc/xN3UD+4CCDjWezigDNKVUS71\nmnQDmZl3HvJBkrTuwxWAgRNS7VJEwBCD0KhwGntComNsbHpPYyfWcgbORtu4\ncRYpaSbUOdDtnx+6fz4yr916WHITo65+TjDRBgXn9pw0vnzqVzVeXeqA67/z\nu4urh18V20OyCWdrP67YgMIGx2lsq1ot3g9RJhRyV+1sqYfOv6I9NeShtTpZ\naI4ZLlTX8v/fO76vN33p5PYChOXeDwxkFIfC85u0wES/sQIhetfMgHFo20+Q\nedN/7apsRkdBbwevWjqXl75Yl2BjVRIvZod3XFY1ugULl4fcSSMZbSLDRCJn\n7x9kyf2hYLln0LG5hoOIo52ASUSHiS89bQaDeSDfjAxogsq0s0/NRonfHcZI\nmKYu6w7O2g+iXeDzEPMiL+GhyVUbqCCKvF2UcGyqWMBQt3OFmIT6kead5e/A\nR0HCkaL9J0YYaeAQTCunapMVIW+al9bLgRsPiDwXoZyi2v2CpEJLU8KNlRmi\nrzhE\r\n=3Mf1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"gts check","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"gts fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.14.4","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"12.14.1","dependencies":{"gcp-metadata":"^3.5.0","@opentelemetry/api":"^0.8.1","@opentelemetry/core":"^0.8.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^1.1.0","nyc":"^15.0.0","nock":"^12.0.2","mocha":"^7.1.2","sinon":"^7.5.0","rimraf":"^3.0.0","codecov":"^3.6.1","ts-node":"^8.6.2","ts-mocha":"^7.0.0","typescript":"3.7.2","@types/node":"^12.6.9","@types/mocha":"^7.0.0","@types/sinon":"^7.0.13","tslint-microsoft-contrib":"^6.2.0","tslint-consistent-codestyle":"^1.16.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.8.1_1589830660655_0.953916362844039","host":"s3://npm-registry-packages"}},"0.8.2":{"name":"@opentelemetry/resources","version":"0.8.2","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.8.2","maintainers":[{"name":"bg451","email":"brandon.gonzalez.451@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dkhan","email":"daniel@khan.io"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"e5ec36c739d648287967363962e2a9e2abeff718","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.8.2.tgz","fileCount":30,"integrity":"sha512-V7V82eFE2fnIZSYgdrFYp2qZZYHC86pa7vNw/BFGKY3ujI0cAIPnS/dnlVp7dg4e4kXZPkLVURLQUcFFHo5KQw==","signatures":[{"sig":"MEUCIQCrDmt4I3tLh1IhtKx5VG3jDqYpNjhhrkiJLKLxkXc6WwIgf9Xx/4o7736IxLbeyTT+A8rLac2XP7lFdVpKGYTYXxo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":58899,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexta7CRA9TVsSAnZWagAASDQP/13JLwp9K9VQWinRyLRB\na2DdvGILdXazp8bz06jCEFcPi0wQtFLlZqNdnUmTlkbB8/fuApMiuwqW7VU/\nBNVjpJ1kK6eMop7A1EthfeUwf2RzUCCVwCgV7jRT/3nVTYj0O7mTNoum8W9o\nd8ehSAvSI0WajpgkheTxIgWwduwHdGeQXhGzvU8xgj8mrBCF0FvcABVO/3Mc\nT2Qb5fsEH/LHHQ9if1QuW8zXEDfuVrSea9LoygVIFyQFoB6PlSrR7mHbMj6P\nOfI5H3y3BMRpvF9OPxVYsvPzsOQog7zlOSTSX4GqrY+qCPV/luXzcLwdxov3\ncnwveCK/3HiB8eDQvadpwh2RQJU14taUNLCCZAGqbvQWAHUiCiO8VZQYjZtF\nMok6nPQjjKk/1WTkHXFNkAsDyaRk1924/Hs/7CtyiYWfdnAeAPisYYk/GsnK\ns1Rk3UPW2nS8UQQ4cCNEcgZ4loQIJAUiZuHJwopVxw0EsWrl5YXEhgpUQXhq\neMV6IL1dV16wy3lJlEbFVgu9snewu2OACm3W0wd7DtJQ/kw/7Jv/MbhwRnie\nz05wzdGC6CMMcHvsnaVInn8Ht3heu+KFmYD229p/s4PEUl9jHDYnGjRRu50W\nK3lTtXF0QwIXzCPpjz7vW1gsi0veC5m43fSOsKmgug5CALhpqHFszAPvglI1\njbS+\r\n=n49a\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.14.4","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"12.14.1","dependencies":{"gcp-metadata":"^3.5.0","@opentelemetry/api":"^0.8.2","@opentelemetry/core":"^0.8.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^2.0.0","nyc":"^15.0.0","nock":"^12.0.2","mocha":"^7.1.2","sinon":"^7.5.0","rimraf":"^3.0.0","codecov":"^3.6.1","ts-node":"^8.6.2","ts-mocha":"^7.0.0","typescript":"3.7.2","@types/node":"^12.6.9","@types/mocha":"^7.0.0","@types/sinon":"^7.0.13"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.8.2_1590089403194_0.029189884285889756","host":"s3://npm-registry-packages"}},"0.8.3":{"name":"@opentelemetry/resources","version":"0.8.3","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.8.3","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"d133682bf30b9fafa270e5ab8267e1e7559f607b","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.8.3.tgz","fileCount":30,"integrity":"sha512-CUdfCd1zz4n5HwZPZh9iLFDHTxLDQhoo6g01oDmRcP1uxdlCEtDJiLQ9MYcQYuxgYsIdDYWNLIOUmgjYCQh8vQ==","signatures":[{"sig":"MEUCIG62eokPUjtYt+zw04gJU4FdEQx+BUSRl0pt1jlrHCrlAiEAjjPSdc8NmRIgJaILQsqnHJcE2Iu306mIAR5RP5J/a7U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":58899,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe0BzbCRA9TVsSAnZWagAA+uIP/0V0G97bn9cfw5WzYcs8\ngLesLrVxd0A0NCMLk0iQLdxsz7kJcFz1baeTAdlzQNxJ56d2iFLtZ0enfg0z\nC0KrjSF4MuR5wtyF66ACko93Z78RJwNN2JbmImc8vKDS06sYyL/sRWT+yyDt\nKBdUeW7GOlIl+TdMZs4nV3nRST/Mhl0C2wCiO1fW1bz5nwDVq8Jmd2gL5krh\nZuHtioCRpAKPCb5imxkJjP5g06y6tqUCgi+Tdp+EZ78aDkUxa8Y1JgFg+i2f\npcdXT/1SZSbZIPmfVhcJpKJVRXi4h5EV1fOSeEHPvtOXP8+3bCvLnqAHzf/N\nnaUza/W/UZH1mWAH805Fwi6rToxnPivVuTwBbKelUzJWTR1VPBj0VA9AtzVj\nM1TzWLROG6AkwEala030e249R5Ce5UoxUK0wwVQXtOTf2FJgCiKc4fYuNBb9\nSGjoT8q+jBJX16VnAIMO+bsUqgwsSuapmC4D8q2Eq6ItXPczGnorKDAMRtFy\nbyhueNhcsn2gC8rSfb0H5MAH3dWD+EsfoSQ6h+F+bFEwGb5qNK4XndPOJDbP\nFDy6mPh/P19uHf6R5F6uRL2CfYZbwmhjkUTk7kHCRhT9SY2PlYO1r0/rRCiM\n5j6hYLqZ6vk6XIdyK9X9Y3lIZshb9px/GWq7dwN+DGm1ecEUcSvMwFxfLFut\nr5Yn\r\n=Jphx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.14.4","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"12.14.1","dependencies":{"gcp-metadata":"^3.5.0","@opentelemetry/api":"^0.8.3","@opentelemetry/core":"^0.8.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"^2.0.0","nyc":"^15.0.0","nock":"^12.0.2","mocha":"^7.1.2","sinon":"^7.5.0","rimraf":"^3.0.0","codecov":"^3.6.1","ts-node":"^8.6.2","ts-mocha":"^7.0.0","typescript":"3.7.2","@types/node":"^14.0.5","@types/mocha":"^7.0.0","@types/sinon":"^7.0.13"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.8.3_1590697179305_0.7060310787510562","host":"s3://npm-registry-packages"}},"0.9.0":{"name":"@opentelemetry/resources","version":"0.9.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.9.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"c1271446405920b480d2eae5eb9e10d36f0b579c","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.9.0.tgz","fileCount":31,"integrity":"sha512-+eIEBfWm1/qGBOK8fL6wdi+2HIyssL9fRSAyTmWVp0VrM9tnIplJj9Jzttf6NArwvF4P+UayLh0s4BgYNSmnig==","signatures":[{"sig":"MEUCIBXpme3DDKGkwHxpSxe3ZbLSh8T8U6tK9+HQYbdmL+o4AiEA3TaMrwO5EFejsKEcjTHArX1IL0TsqQ1sXISwfUeJNj0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":54875,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe69vHCRA9TVsSAnZWagAAKKoP/Ak+BfuQBU/Lx2YfbXoG\nopRMeTmFjndFkHsQRG5f3E7Z7lIUFTPcUoTqw6r47HYfgq/il6IQQA4C3Q8c\nts0HzC2LHsiBqDKzSiptMst7tYtCAH1wpakdSb3Mz13Q3EGIVFA6s26mRDBB\nHGORlCNdNlWdtwbNCaUA6ONxERU2sT9ojyaPdCvF+gG+73q+pMBGNwHlhKhl\nJ2xef5pxO0H4azuk3yhaU0rwspKIiV5Q1AYxmCRokiWVCpUmw4TUy6aBJ/Jz\nIpELeZpfgYWhzM+1AVSOI3AJhSpJamAij+uMPQnLYf34eauaxz6sFcMUvhhN\nc4vPmW0kgZclSqeLTEHxNQ+LUpg8kE7BSh0tiu749xkHAyBj/9FtTJPcTWO5\ntUMBQQAvYnqfsVNpyuq3jhQO+w9gHcTO4ZREhpGNNXBcpNokgt5+iKzQAToj\nSfYRq9g8vVP9zHAdPMDiAY1ePVjC8pdSdXVPZvgEGrnnMuh2BSHA0VEmY5Rx\no7v82F8HA54kkN8eMnQcJFb+azVoIHMUKddFbNgNDzQ2zqZEcZgIeZszqA/F\n9lMubylH/MASAIBTSrTZ0dfYh0qym3CuPDXql2zJAS6HYoH8pQe35PLFDTwC\nGPRBhuX78KnaEmKtrMRm6jEzKgwLQe61H+ZBHulhVkFpBLtKe1dj313lAT4h\nnJw1\r\n=cpfd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"mayurkale22","email":"mayurkale22@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.4.1","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"10.15.1","dependencies":{"gcp-metadata":"^3.5.0","@opentelemetry/api":"^0.9.0","@opentelemetry/core":"^0.9.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.0.2","rimraf":"3.0.2","codecov":"3.7.0","ts-node":"8.10.2","ts-mocha":"7.0.0","typescript":"3.9.5","@types/node":"14.0.13","@types/mocha":"7.0.2","@types/sinon":"9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.9.0_1592515527427_0.8807110625935559","host":"s3://npm-registry-packages"}},"0.10.0":{"name":"@opentelemetry/resources","version":"0.10.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.10.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"fcf8e078a2e9fd84d634c1227f2187244b9ba021","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.10.0.tgz","fileCount":48,"integrity":"sha512-J9Mnj5B4dDmoJOwg00rwUNo39LqCGsme5ipWzJhiAQyM4JOIKdSsF1+mSdo5kxG/z6yk5+a9TwtaTkz2qRwqDA==","signatures":[{"sig":"MEUCIFjAYS/aLAj8IBCMNA0WaP0l5qgCBGYT91Zo1na230idAiEAzqlru6u7BXy7FaGi/mq/zu+s+6BIZAtKtURKKM4h83Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":72031,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfH0AnCRA9TVsSAnZWagAAfncQAJQWPO1wGMz28Uch9LNI\nXI24kxa93osANRJd1yZy6KaSDwCIr/YjM/ABbjHTQdiYS1EfDB61MVEh0nsN\nqykU7WIzb3vTS6Y394G3ZUDAjMT9qrX+PyBhlSr8tLep0KfG658oebbppPD4\nIMC91CdiGe1UdeMc9uclba/9STdpKrE0N3apRDiF4fjiqeNf0yHth0wAu8eq\njsbqNhUSk9PfHPAztRhCkOwqpcgFI5UXN8Eam4eeoQTKAjkQCfGplCFKwaUl\nTUya8jjbA8q1APNulIa8b9stwf2KLmGBhRgObTJpb78mg7ZHSSizvR3vV20c\n+QXg/sACmgtujHSqD9/Q85cnP6YK28QZk58dLwTn6yfys9zRRXNl5wulw6QC\nSsf7DG7p8pJbkBSAUZTgvxyJmBRPy7Zgs/gbq1H0PmVHbpqbO2tWXlSjpZKC\nCvVDw5dlJgUpGU6UuokhJfV3xUKDpxzDrkAXFv5/7cq6133z7rSNeEOYaDQW\naXW0/1wR7HyT330ikP59ZQySTWllSFXr2tyC1g7QpyWU3CO15Wo+8j6aUsWg\n1dZVqZUhIeYJQTS4ExdhEj3pkpxqCqEN0LHclPx5+C6xY1fVraKQcW9kAJOe\nRDU9gBEgvisTJDHYHU3jnG/7L3th0jxG9TRWxhNeinTcUnQlNSIkSh8NLmgk\nDg/i\r\n=9maY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"ab62a4d69b99b3a8c9c26100c04f3226af7859df","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v12.14.1+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"12.14.1","dependencies":{"gcp-metadata":"^3.5.0","@opentelemetry/api":"^0.10.0","@opentelemetry/core":"^0.10.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.0.2","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","ts-mocha":"7.0.0","typescript":"3.9.7","@types/node":"14.0.25","@types/mocha":"8.0.0","@types/sinon":"9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.10.0_1595883559280_0.8769773787442476","host":"s3://npm-registry-packages"}},"0.10.1":{"name":"@opentelemetry/resources","version":"0.10.1","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.10.1","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"f8967030ef7e9b5e5abc079a0ea1b69df2cbc64e","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.10.1.tgz","fileCount":48,"integrity":"sha512-WKHUcURmKrm2HrQoaAlIYjoJB0HHaV/lEnkFZ7FA7XMapjv8Ug8dt4KQnONK5/TEUy7k4N+5Jn/6mFcbxNX0sA==","signatures":[{"sig":"MEUCIQCEnkH3be70scFLTrP5UaA5LEOK73bvEAnjkN3+UHnRnAIgNdRBOriQHcHrgwTx5jZs4KA0cyWNalj95uH2RXXC/Qk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":72031,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIEBoCRA9TVsSAnZWagAATRUP/0aiuJHRuePzyd86Kw7f\nV4ps6BJ81yt12961GYxdcDdhCNimvW+XVVJmmNlw27Y/bvKOrSXNIQ2WKByx\nu+zOktGIcW17tc2ZPjCLUweS5VRxEFGUDt4bIc3OMxKAtLTZldzQT982ugnf\nHaYuQVfJ9TQtN72/RiCiFlBtNY+MNMAOiMUq4z0roJogoa9KrYAFDHJttwQO\nWim3+L7uKWIVbuCs1zH38a0kKwpo8DVPV23aX9Di/cMU1KuDyTpYtcHaSNlQ\njg9gKD+MKmZGkgyqyuD3GMv6j5QcUssOGYyhjBmE5HndvqCYAPK/SmSUXVD8\nAQM0OGKo953PhzrPxwY+0FWF+4cu/w/Sne5+r9X2dfHd30yz2OZVpl7qQGNS\nhcmelm34qHY4cPfanwgXT3z562PwQ31GAHCHlnEBtFeaSK+eT0QmITuAY9Gr\nzEHaHvpXAYZD4qKx+tfIzzYgg8Wei5k01eHrLK5v9ATr1OG9Kx/TJ4JzuCDb\n6vP0O/vA09itVADbvzgr0k8xIb71Yk1lloYoBQw9LzXxa3yLP39ublUM+q1t\nBqSdOUEQqvEHu5Qs7ATCVfsdBXxtHBk94htiMj8s87051WmAZBpoODQwxb5y\nuMAMRFR/gWhV5CmNSIr6auB/FsyQ0NXarq0kSmI/sOp2RlKyl+lHooeysEYv\nMqzs\r\n=ghfy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"03981e4299282d0611d1255ab0076368d5830753","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v12.14.1+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"12.14.1","dependencies":{"gcp-metadata":"^3.5.0","@opentelemetry/api":"^0.10.1","@opentelemetry/core":"^0.10.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.0.2","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","ts-mocha":"7.0.0","typescript":"3.9.7","@types/node":"14.0.25","@types/mocha":"8.0.0","@types/sinon":"9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.10.1_1595949159549_0.5605558846643064","host":"s3://npm-registry-packages"}},"0.10.2":{"name":"@opentelemetry/resources","version":"0.10.2","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.10.2","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"6e291d525450359c615aac013fd977047f2c26d7","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.10.2.tgz","fileCount":48,"integrity":"sha512-5JGC2TPSAIHth615IURt+sSsTljY43zTfJD0JE9PHC6ipZPiQ0dpQDZOrLn8NAMfOHY1jeWwpIuLASjqbXUfuw==","signatures":[{"sig":"MEYCIQD2iDRazJ0Uioa8TUrDecRe5NISOnlYT6lQteC4nFrHNQIhAJGoJTAja53FLFUUW5JcPlZqCmHIZa8W660cZHh1RpyE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":72031,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKJz0CRA9TVsSAnZWagAAC0AQAKJ//LCvme3HcHyndEUd\nz8CeqT87c6SJaxY4uuRgYASXNkCZE8PYcUpLx3UiSjx+4Gi09TyFy3NIiRGb\nIaFbqr/4r3atU5KBylQryw8SrXICLYJPF5VrxvkxTEediC8DK+J7loPw+nGd\nh0J+ifOSpza9jjC0VykXLfOvBa21eSbKNnVK581BJlw3MB4lG2z14Rx6NZJP\nuFbG9+4xoTaxDx86wpEQcwGLUM18IpAcZINpX2KyTFE4f1jRiP42y5uo0Rmo\nllzpGCQkRsestCB86rulmon97z3bMUzxfXshzsduIc3W3wSzeupXYqHFI0pI\nds4T7JKiPf7vVtnqXaqokghmtKDw1qEcwbrKWXQqSoi87ah7SxKlfpcqBGyu\nx4kgllf3Q14Bf6cmLlev7H82tWEP98tjZ4Kqu2z2J7gvNGTI/MzFq+hdBNvq\nSmOSTTVX738YOP4rYVXNkMF9XDOo3ShfL9jNUTSrSqDuj6/KoOblEaLyf0jj\nRJz+twAfwXREsQVbqYudln6xuelIsMtqw77j4Ywn5BcHW6yEgBp6D7MFE1lP\nKoFpxqYWFgHyo7A4MtxTvbR2zKYnD8iUKiyDRTDoUMLBRV4mi+xLgKvkvVNU\n+2XchRMrDreny++PssGFjAl6ywxTVrOdibgZzE3zb5CxRd5CScwDBr8o5zZy\niino\r\n=49g5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"b247e69034a7888a842fe75e0a5ff06f8bea44a8","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v12.14.1+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"12.14.1","dependencies":{"gcp-metadata":"^3.5.0","@opentelemetry/api":"^0.10.2","@opentelemetry/core":"^0.10.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.0.2","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","ts-mocha":"7.0.0","typescript":"3.9.7","@types/node":"14.0.27","@types/mocha":"8.0.0","@types/sinon":"9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.10.2_1596497140203_0.418455637084892","host":"s3://npm-registry-packages"}},"0.10.3-canary.0":{"name":"@opentelemetry/resources","version":"0.10.3-canary.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.10.3-canary.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"70bf5b1599a32ad687df13292d649c84296731c1","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.10.3-canary.0.tgz","fileCount":48,"integrity":"sha512-dYoW3QG90MN/3m3/ShFYO9TDhnu20gZd7P8uSrizPzJyxisgY5SxY849aZKMzb7WUanKshCBBcIYywG698ncBA==","signatures":[{"sig":"MEUCIQCmCtpBTqnNq1pOmZHXoOqiCletyCw+Cs2/sk+rVKCjKgIgOEZGa9wATSCbVnJktFN+c/CACdosfYxJYB2HAFt5tww=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":72118,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLYWfCRA9TVsSAnZWagAALTsQAIpzjEkcEpn7fIV87Yy2\nj6FGdcpMf8kgDoYpTR5NtVBYlb0cqwsDoeptRJ78OJumWFqERv77w5tAfM1j\np+kI2NFLuiKAVUlDhv2aeL++inpnBiFCJHq0gt46TORo69XU935UTgTeaEMW\ncolUbFcPDdBs6fPjrulfuOZov2EBqbmujM6uGpE9qYPbWzLKp0mtbPl3A6ml\nv1UcswVWr6QK5q1QOGTxasom55M6oFYI1iEIaNqAwW5JJrDYlFntWc1hmYgu\ngnCD0nVyYtCYQiz/LVBvonW4v8F659OdOXtHIrepI9vXGs+APx4mIqqypMyV\nH8qeFylDfggHZgXtgauB5CqL0GKLI7OSKDegCkI112CdCMHFGWxGzoRz4jU8\nTP6vxr1o87J5h7do0PgzSTz88IBe3BWBT+godYbHRIiX7KeVHRs8wkILxAAo\n1W9tFqARoCjWtdv7csnOj3no5BfEtLx9nybCJV3aHnerj8+3hnWXU3MebwYS\n4WhwBUyS+YiI5Z6s33O/dUBbSqWdBiSaetmpV2EsL/1zJbZh3gxBA4TyX1XP\nb2imP2ROlgRMbotVYeViMUOxoKC5L3hSqcUp8L/Ktl8l+tPV24S8NoGnTKEr\ndL64CmxMp/3x4gRJMUqiTy94huViMr0rHrFmOdrIgPlj6qGOh09Fq/TyFOlD\nVCqt\r\n=sxo1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"f4f2f84bc087389b3206a2e17837b7b0b95fb2f2","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.7.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.7.0","dependencies":{"gcp-metadata":"^3.5.0","@opentelemetry/api":"^0.10.3-canary.0+f4f2f84","@opentelemetry/core":"^0.10.3-canary.0+f4f2f84"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.0.2","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","ts-mocha":"7.0.0","typescript":"3.9.7","@types/node":"14.0.27","@types/mocha":"8.0.0","@types/sinon":"9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.10.3-canary.0_1596818847081_0.37093174743576496","host":"s3://npm-registry-packages"}},"0.10.3-alpha.28":{"name":"@opentelemetry/resources","version":"0.10.3-alpha.28","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.10.3-alpha.28","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"10441c63d3009e33c3a425cd1fcee21bae3890b2","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.10.3-alpha.28.tgz","fileCount":42,"integrity":"sha512-aTHCliczwZoi3cSQzfGi2IVTY4sjnfd9WGsyMsB1hMKmqnVjpEg0tPjyJqDYbaiGzVsnhtsJWTzji9x6QldZJw==","signatures":[{"sig":"MEUCIQC2ek0cqbdm6+8WjTKgzOISbmf04BIodSxDq1SE6McQCgIgWmWPlsZq+rmsf6QIWo7Wek8VhrB+MkVU4/c2iLV4FCg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":56613,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPT9UCRA9TVsSAnZWagAAgDMP/iZDTzfp8CvQqCk3a8az\nJnFdNQuv1Wac22StVWf0O4R7P5/z9hALeZiu5KGHf/yiN3DZLbfybnUwFWnH\nKQ0DR2nG/vUlJJhvBkvvAkLT++yf0blAkbU7VprKA6J8Kjw/Ab1wwEUtHxDN\nHfQXStaCTd2p7/ZJPq8T0VNjlneJqvkQb/0IITCS8ulnhfCL+HmrZ2c1AyEO\nGCrN3G3UeQoqw9psr6wgsx4JTgwUYfIQNsWmksqv9qGPKxzs28UWCEWy5dRX\n4JxgwHhwkOB2VaHyYu4XgZGlsKSUPT1G1Fg0y1SChWpPA32Ndlxv8ZA8Npvw\n7vyxkCiTXXHu/KN9dILZ4HkaRPfUgScbStdAABWj2i+M0XAdmkfTpwg9gA0i\nc9s5rQmYxpeokGVqhMdAkLw4xniYZtuXgFfGwxRYtNNNsxAtsJ3cPwYGfqTx\n1Ux0OjVohJABaWVbDD6+2r6JXakIy5sBS/1puIlCwlbqO9Nxyki9Zdti6qkc\nvGwtAXEFAN9kecC19s0gsmA7tsNhFogNaBK6RPBdYuqUtRv8jG92ECCCokPU\nNZvET/5gj8/U1n4tW5MoWSzD02mp6K9+cLkddbVs0X5ulYCXoF6haxVeikev\nDnJv4Rwhatih59HRsGUJRGEAtHTm9buvCAOyCoekjGqvZ340pgbd0rXgq8XT\nedri\r\n=N/dV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"d68ff0fb7594f6a367cb7a5057cfb2875e8c082f","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.7.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.7.0","dependencies":{"@opentelemetry/api":"^0.10.2","@opentelemetry/core":"^0.10.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","ts-mocha":"7.0.0","typescript":"3.9.7","@types/node":"14.0.27","@types/mocha":"8.0.2","@types/sinon":"9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.10.3-alpha.28_1597849428404_0.11695363139503945","host":"s3://npm-registry-packages"}},"0.10.3-alpha.34":{"name":"@opentelemetry/resources","version":"0.10.3-alpha.34","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.10.3-alpha.34","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"8ef87d8858c0c49a8fcc16a785a30536ea98ead5","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.10.3-alpha.34.tgz","fileCount":42,"integrity":"sha512-Tlqr/3xeegZUoJ0Od1eZ5ihcoShlsk/409Wkm7a18nsfzZE7XI+OKbWacLrqPGcPu4t5IwnR0KvDczIyMf1EGQ==","signatures":[{"sig":"MEQCIGNBFeZV6mbAl6v38vn+8yWGsGNctALOyDpUw2gmdqcUAiAR2vxNz11G5l7gZ9Z2mIqAdEbVN26i3zYSgA+2uvi99g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":56647,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfQ+5tCRA9TVsSAnZWagAANWEP/2BXjCZphEVThOEUcPy9\n2vK/z5WMvn46Tzzjt+E1eXj6CH/K8cR/j3/X98KRyIzNrh2AsdtPM+tnN19C\nPw+Vv4J1mGZi6TMQLmu36US1JbmaG/Rn+X1dHwoBVsmwyc5R5x9qJ/5akX79\nQgQkZ2tLQCVpMcVzmZXrPSTI9dxiRfxMpHA0Ztex3FnQ5z+qaWZlczcKT42s\nDA9CxUVj5HR1R83Q4P4e756nHf9hJGRk/R+/THw3gTYyWi/E5TqkQ6IQ9NU5\nqYaEBut4Ycu9qzdl4AAfrsQ1fAJG8VhcSnYRRdh13qb1vBS97IKPysMZkK+O\nDUFnokl6k953HdmctuQsRebpQrOwSkLR5jdAkyzpkBtBUuZCl5wiZeFC+ews\n88L3dDJT1ntrLZq5yqYSh040M5ruJMvGOcW1dt4ufl7hCQWnVBIeKDT/CZro\nWRf3EXKO9LWGwYdieAIQeVz3IUTZCdY9PN9DnvBII1lPx6j+2KhwMDBGfXJo\nImITskv+NcjYL4rAeDMJxVfHbP0XQj1qTjijsMkqkMcyPQ2280j9ScSQiHOZ\nJrQQnrAdAqCLRUMM52nMlS0pU9LXHZYFQ7Krz3EqMUyNHyL9qm9mODJs4Wwh\nOU6oRT+QpMk5HKYWT0ArbrQwiIaRYMR9QiT8Vurm4PlWLAjNz9Esx+pwA14G\nD5h1\r\n=N3Ro\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"fb06b5bb1142286acf5b326925f3af3353aa9d90","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.8.0","dependencies":{"@opentelemetry/api":"^0.10.3-alpha.34+fb06b5b","@opentelemetry/core":"^0.10.3-alpha.34+fb06b5b"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","ts-mocha":"7.0.0","typescript":"3.9.7","@types/node":"14.0.27","@types/mocha":"8.0.2","@types/sinon":"9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.10.3-alpha.34_1598287469372_0.6749176434986528","host":"s3://npm-registry-packages"}},"0.10.3-alpha.35":{"name":"@opentelemetry/resources","version":"0.10.3-alpha.35","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.10.3-alpha.35","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"e4b79df9dc938a762f3661c00d19a9d123c59d5c","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.10.3-alpha.35.tgz","fileCount":42,"integrity":"sha512-hm5z4SANNJD/Ie9WnqSzr8jJ8CSF14KlsAySyieiS29uqsc4qIRktNr+8Z7rXbSdQmegDMW6sypF/qZ0BUmiZA==","signatures":[{"sig":"MEUCIQCFuBBYfLHzRGyzANGMhFo+aF2VXMQSsUOhxbALFRBb6QIgFWqs1qhoqrjvIFfBD6tcqD6wmzrFl9yg3H0igRQcmsc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":56647,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfREMCCRA9TVsSAnZWagAAdCwP+gPEoYf49N2U+YUROJ/G\nr+C4A0yR1iqxEnfXfkuX9t84zT/ZC8dIByEj26sFi3qp+pNgEyiAH45eCv4R\nObebmK4sxozbHLITcwFbDIPH9b2fVgbPYPc2D9NJdw2kGzzsflvhYJr2+RLm\nNauEEoTkBVICGMKulIvINVdlzkpNzi9iL9uKOd6Ie9P9mWP/10P9hNnZi/Pq\nMuFFOs34dMG3gPk1pdD0G1ICNnYia3Y7HAEd8HDFML0GMZtufBt4Z/RM8W7S\nNwQpLft3qXamWu/NnLeQqJHRMZ6LhappCXGs9TeCF16k6jSKnJPlqmJ4UyAr\nrdHfaFvsawmrjlAKT2Tg43GuIn++q//Eg12Ed/MXovN/3mxlSml6Bi3Qrv9s\nz58U09oFoxSyEkz6lO9T5H6pZ6gdQXayUd+hu26A08Cin0hTxMiF2rzIFlVV\ngrFWTqoO3l0dAzRmer85q2dFjZmzAM4GdzhmXaRl2X8s/NghzPFqVwJZK7V5\nQbakL7mZBeNKL1S2gp+pI02/bPYMnUz7oZcY2VeGdLg4G+f5GD99BUqDSKkz\n58jCmZ4FPkFz9/b78bmkiUv/+XyaMUgyQdWct8XqVsIbWE2/9e2K2XuggKPz\n+DZJo6rupVJYuxFxHT66E1oJlaRVWfnI2eCWwp0vtmGi84fxfK++yn+tUIlj\nAdZu\r\n=AiBv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"2ee9f1aaf7b61c4b4ae6b748f0a07f8fc708f07e","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.8.0","dependencies":{"@opentelemetry/api":"^0.10.3-alpha.35+2ee9f1a","@opentelemetry/core":"^0.10.3-alpha.35+2ee9f1a"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","ts-mocha":"7.0.0","typescript":"3.9.7","@types/node":"14.0.27","@types/mocha":"8.0.2","@types/sinon":"9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.10.3-alpha.35_1598309121784_0.6493460006836094","host":"s3://npm-registry-packages"}},"0.10.3-alpha.40":{"name":"@opentelemetry/resources","version":"0.10.3-alpha.40","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.10.3-alpha.40","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"988af20e7d6c1031f330d7218e58dd2c9cf4d9f2","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.10.3-alpha.40.tgz","fileCount":42,"integrity":"sha512-UiSreqB5iVVnS3ZRBNy6Rk1H9yeoHO4GhRPxuXpdtweD/BJEZa9lF4MzBjOXb5bq0J5mbpXHkn11tQ5J7LUMUw==","signatures":[{"sig":"MEYCIQDuSraUkQpbByksD6TgeqEhtxOXV5i/6t2b5Iq2/iLGuAIhANiE0cqATV+Vq5Kjzso+zHqcsenKRDBx9Oy2PPwJLwJN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":56630,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfR8HYCRA9TVsSAnZWagAAl8oP/38oICMjV5XlFwyDwPFz\ngllEySnYwz/Cpu+g2OLaL9VVQem8dSpSGFkDwNmmD15Jkr2u5Cav7lstiurE\nMxuFt639Ul9kli6g6UZDX88q8R20hiewbHw2qlF0xX/RAOjE4SRzbHLeQG5h\nifVBrIWUjhguMn2hhGi7CumyGDlOqp5lqF03WFCK9B3aPcvj1zNjox6q7iv0\n5nH6DVbQ72JKBDynqd9s8eT3IrIqpdkrHumtGqyvHqEORxVFD2IDJ6P005y1\nqu7zN9DOTQApSoAwomMXCR7qYL07tCqRtvS5fv2JG7jSKUt8FkIDr1s3ADZe\nULBudhsv0/9viDdsm1TrTLM0t9Lxk8oTITwo9j2phqrP5jJY8Xu1ZkZS5Gl0\nOmaOE6yjJB1/6aSjm6AiQDX2bGDBjl90df0Hd7aDmz8SMgz918clj/pDKlCV\n9zAS22kSsvAMGUMYX8Pc+tIZojwrL0ol8VwMTf8kmzVdYQOpce0MAXXgFvq6\nS4E6hR8Hhi5SHxjkMY9D/gNZGdmcphBLQZu0oKFUd1lPDHcTB1EC7MwDhyr3\nQyHXW3pIA4sqBQiNxt4uNAqEHp84nUDCe6I9rtEwmstFAs1M9xETFGkOUsKr\nBBEWH6kayzUi0rNReXcX6csXwf5Pqp4Cyeace7AigOuSG24xY69b7MGA+rEs\ncYY7\r\n=sDs6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"2052a245bce0d7a6ddc273cb3657bed5d3d21dc4","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.8.0","dependencies":{"@opentelemetry/api":"^0.10.2","@opentelemetry/core":"^0.10.3-alpha.40+2052a24"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","ts-mocha":"7.0.0","typescript":"3.9.7","@types/node":"14.0.27","@types/mocha":"8.0.2","@types/sinon":"9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.10.3-alpha.40_1598538200594_0.06541344857196263","host":"s3://npm-registry-packages"}},"0.10.3-alpha.41":{"name":"@opentelemetry/resources","version":"0.10.3-alpha.41","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.10.3-alpha.41","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"bacb242fecfa5f2a2bf1a8ca2ce9c5c8a62cebd3","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.10.3-alpha.41.tgz","fileCount":42,"integrity":"sha512-b2GGEsMrZukeTDz0QC9PA79GEYMLC28VoLF2idxTTJMNg+tqLTMz4AcpYta+++wgwCVRyaWIWUPFFaRotISCXA==","signatures":[{"sig":"MEYCIQDLOcgUV86eF9HrAHwtqUmJiNgzZX5EBjSR2lwPY4IJJgIhALQa0LZtypozYknw9pb+QHSILrhr87X0hu7Z27IQOjU1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":56647,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfR9qJCRA9TVsSAnZWagAAuicP/jmfXEdDfp2K7kCinJ0G\n8VL+4lRaGrUB4amKiJ8nIoXInbnSTgQYbVj8/OqTC5KRQ8OBwOWHNYgIIRHi\nC4vGGQnQYcx2ZN+q0ryhqaQZA8Z4ib9sztUk+kE2hEu7Quf1oSZkLG9I3B1z\n9SXv3n1gBSlylZj+C4eHLmwmmfPVzwVhRs0r0erPg2jRYrFu48Vy3vgtOq3e\ndQs0uG4R5mYru7A6+ANkCZB4dBTjxBoG3LwITUgjVPshSeQ6IUtzRBtknUdr\nmvz2MU0HO98G1ytpCad5X6uunrZRcwel44GSnUwFckBCdQ5GxZX98h186648\naD1nGP01WA946rnzOuASQs3rSL/M4v9vq4CKuNGofV57fOqP5SrnYHhqTxZH\nLQfzV3IaEina5gZ3NvPpZXi4WyPopZP7qHu3fLrXsWpQ2hOlbeTIYrSL+6PN\nEuLyoyvYd1ZObFIdNQxdWC0xz0Jw4T7ALYXWyFbl3BdOb8EGhUB7jE8gTgcM\nVTwwG3aaEjfcEEuBeRDNRT6XZoQRczYg9fNL1Bml5WIaYyujR1qB4bX4VTTo\nauSHA5X5htYQYCc00f/Ln0dAcAe1m3/PrL4n+dLjqpRiSbGgePVLfO+s0MvC\ni+LKwFJVZfD02towQm7CSb+A0bOJB7lgTwYNSWkfKBWnKjegNkdve3C9U8Bp\nf3rc\r\n=GhVz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"5c7753fe6534a34f0f4eaf653d53f8c002ee299d","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.8.0","dependencies":{"@opentelemetry/api":"^0.10.3-alpha.41+5c7753f","@opentelemetry/core":"^0.10.3-alpha.41+5c7753f"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","ts-mocha":"7.0.0","typescript":"3.9.7","@types/node":"14.0.27","@types/mocha":"8.0.2","@types/sinon":"9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.10.3-alpha.41_1598544521127_0.672631743703006","host":"s3://npm-registry-packages"}},"0.11.1-alpha.48":{"name":"@opentelemetry/resources","version":"0.11.1-alpha.48","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.11.1-alpha.48","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"ba4929618e577c460a578d3d3d80ab8747309b9a","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.11.1-alpha.48.tgz","fileCount":42,"integrity":"sha512-tbtn1c8T82iBKwtYwjnJbb8AaELVqZYNBIwwqnyvQgSDCso3s09gTp0mIRdzB9nmQ8gg96GwTAfMBs2ZGjoNlQ==","signatures":[{"sig":"MEUCIQCKDtk6ml1HsK5OhqHQUDO8HhxMcAh8uHFPjqPoV4NfeAIgLOUznQUQHxwqHOdOi8/FwJHZcQ2T9G2oMsObIoVuI8c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":56647,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTp/jCRA9TVsSAnZWagAACv8P/3Rn8nf7QIysCujG/EOf\nwbOOI9eSzzv2TQGvmRCffiu6NQim1hm0W/RYWvWXXNOB//RmYzE8Dy6SrAfZ\nyGf7PMulKy15uRzgMpD45KJmQLOD18jtCcoxngrhfZPMmmQxCaeg+efqZ3NY\npjFX+4wuDSJ4JdxAkGIKL4Q32it/HUuecQ3cJxqioG1FamVyhzZNmnUOCllf\nKQfsn7ChV0cGVFDDpiQk5CY3ptHjOjfHfQ5MdI1/pXk4yU+Kwc5L1Ow+V92v\nDSKa4pWPkNHkoyIvbpmLH0rTmc2G5oCE/9OIWWtepLQ0bnhtZ1uzNr4jlJsV\nDSUSdTsWl3aQALNGN8VFCzuV3Ep2gbc/sN/f2JUry1YKbMHt5UQBYQkGKYhc\nkuKmelzQc1nV4Yla6dGUUdU4yxNnUH1asmt8aOs93XYC/cScwtiI58/Fw/8r\nZvV7CRm58hynTkPafP20qoaMVeiqd4D85v2MU5L8esJ3I+/NJUv4NWvtuRKG\nHMBGQt9iZA/oNqFr4+H+CHLMJhUiXDS0NSdcf83tCp3nLKD9XHxcgmS83fK+\nID68zp5E3NyqmaWmyryOq/JKdM6fZJjT9ZAz2rf/2MJUeihx1JX9wRYshGHK\n1K4L3lPrCY8+6GOla2YtVUCEVATz2RnuhO5FxlYZ24IQHPYB3x8v6glCw12K\nZ8cZ\r\n=+Ww6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"15174c6647ab9863dfc1424412fa60f2fddb3351","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.8.0","dependencies":{"@opentelemetry/api":"^0.11.1-alpha.48+15174c6","@opentelemetry/core":"^0.11.1-alpha.48+15174c6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","ts-mocha":"7.0.0","typescript":"3.9.7","@types/node":"14.0.27","@types/mocha":"8.0.2","@types/sinon":"9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.11.1-alpha.48_1598988258735_0.15951725778999637","host":"s3://npm-registry-packages"}},"0.11.0":{"name":"@opentelemetry/resources","version":"0.11.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.11.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"e522354eb791c3bb3b20a06b7793259ad1cedf6c","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.11.0.tgz","fileCount":42,"integrity":"sha512-o7DwV1TcezqBtS5YW2AWBcn01nVpPptIbTr966PLlVBcS//w8LkjeOShiSZxQ0lmV4b2en0FiSouSDoXk/5qIQ==","signatures":[{"sig":"MEUCIQCf3hjN1Ozi0pTQgPJMGN/ZnfUVKfV01p1ajg/XGSEsTAIgcn9Bsncq7LDCJBrXh38hl1BjB3UzEIIJu+B6rpxYf0M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":56560,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTqHGCRA9TVsSAnZWagAAuNgP/2drlWzjZTRyz9NfHcxr\nD5CU4Jvfg7zN1u5WR16ujr2DieeILxnsIRbdBfbZ/tGwJgWnZJrqtmuuSC3D\nfn8PY0myOEXjNz6242JUfU4wuOrGNcLo5K4qXFHe2XdT1LkpuO9k7TKC0BSh\nzCdSeTKmRGv1mo31eOjLDlHtTRvXJinpAqIa20HsWBwAwWih/ULt0WjA+gJc\nNz9Zgy36SBW5Ho/0h8ij/r71WlzInom3lxdWCNMMvQhhZ+VJ1xXdF/926ALG\nlkyGI6wy1khr09l65K9P2h3K31e4szClAp73MX+jgDzOAoLXwNDbumxt44Eg\nClYZHmsw4alM5jJx8YgCpNu+9oDUycnxb+z+SpRYkQOheEMdw8zZP/e09lkI\nwQ7cVvJGH4GLdUd1uN3vfR7/ZLSAnD62z7ON0927jJUcj3UJoNDSHASX2iJs\nuUIBcco6DkstnhxEOm4VfEawI1oB414oPtF4+mOhy6PE+o+N8kzoM5jzdvbg\nF2wxsTpIurQ2BPsgQXRvek+TeVe6zWn4VwJflEj2XL1DA44jTwipnf9DmubK\nF/Ji88GMZG17OvJCqh2N0frqcrZXuftokiFiST4DmxVFSsaAbnM4Rs1xL8nz\nH6Cqz+AQBfI9gEjlEweMBtsFFMKvecCW5dGYTGfw4tZwtYkEzwsZq17kVmVB\nA2/u\r\n=gxBR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"15174c6647ab9863dfc1424412fa60f2fddb3351","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"obecny","email":"bobecny@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.4.0+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.4.0","dependencies":{"@opentelemetry/api":"^0.11.0","@opentelemetry/core":"^0.11.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","ts-mocha":"7.0.0","typescript":"3.9.7","@types/node":"14.0.27","@types/mocha":"8.0.2","@types/sinon":"9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.11.0_1598988741821_0.502177032233736","host":"s3://npm-registry-packages"}},"0.11.1-alpha.15":{"name":"@opentelemetry/resources","version":"0.11.1-alpha.15","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.11.1-alpha.15","maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"bb84be91324dd7ac416a6be4b4e526e98d63ffb6","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.11.1-alpha.15.tgz","fileCount":42,"integrity":"sha512-Gwend8GBkKPWWW0PHzCKDA9xJLSvlX8pm8n1k3EJXQSLh5zsGUXhRrTl6uM2Qw9W3Nt9lO0myRTuurH7tr7phw==","signatures":[{"sig":"MEUCIQCG+BwvOp3giRrO0PDTWFy9PKnbQk1ThOw6wPsOV6uBMgIgMwiY72TEv/CbApGabQkku87WNezu1LZxVU86wtQgwug=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":56647,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaB48CRA9TVsSAnZWagAAsXoQAJpacCLXee+b2L3Efstz\nXyU2qAXrPYZJedzcWK7R8uD4djcbDM6ItHDwTptarESSONLrjbmJ8KAoe91P\n/kF9dDheyEzvqdXqiSbtNPTcyFsuaPYwJ04Lnjqq1UgFWcaEdwmKv4YFqz1g\nJZHrYmvp6De89cHkcfzT/O78HHzSrcSEHqJ+BVaLEfayaU5wijj5iGPUxa2M\nkPswqBM2ASd1LtkrojwmTMgrpDoFRorxKcLaMDkfDZVEzw6cXmd+tJBUICdu\nqlTng14kTUbjZ5W7tjoseyFw1KjedO08FUq2Xk5yxw+ry4bfCOiCQtswpcEL\nuhUblUugxSSDcSf4gtSLX6U9sg390kOGNBQKC0LeE18tQQVCUBdcqOVYRUXH\naYLj09dohKXfkxYj/2lkpccdP21o4Pe8Ywf6JVg1H/+3BsE/ob/fJ+8YNcpC\nTOa+YKok4MyySlZ0YcSustXajm6AwkwKU3PQsUkzjPRpVWNcVGJt/Iup/PSB\nRNaKO72iMjLNuzxcZYqMJDJ0whKwfqESMC2jkLQ24Rbcwcb5JhS+n9cFRjRb\n78rae75Lp/SGKRG8y3CFmYXwG3c7Gkag2APCpFSTeXtC9J9IJkM4MY0fe+61\nmLIb8QW51NDtt6+Su0/2cd12+UIFQ/k9yYmbPvHKxL386/TPSdomrJsIeu4K\nhv95\r\n=CCOj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"e170039015e8a1a7419bb835a00659b2a734b8a6","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.10.1+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.10.1","dependencies":{"@opentelemetry/api":"^0.11.1-alpha.15+e170039","@opentelemetry/core":"^0.11.1-alpha.15+e170039"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","ts-mocha":"7.0.0","typescript":"3.9.7","@types/node":"14.0.27","@types/mocha":"8.0.2","@types/sinon":"9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.11.1-alpha.15_1600659003724_0.364116563137737","host":"s3://npm-registry-packages"}},"0.11.1-alpha.35":{"name":"@opentelemetry/resources","version":"0.11.1-alpha.35","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.11.1-alpha.35","maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"4c242a7d624de3a1fbfd82ab577bb52223978716","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.11.1-alpha.35.tgz","fileCount":45,"integrity":"sha512-ghPAtwsjzWuS+9KFXJVIw6aFbib5ku69MjRrNEF3RTSUwHY69m3SmJS3OTOD+5cSe2nr7BIx2voI9ulw0T0rwg==","signatures":[{"sig":"MEYCIQCyg7u5Gd5qI572MfCaC9ZufL7jDyR0ZeFXIpqgBUEasQIhAMBlGqHm5a5P7Ef4raME5trn5EpHvzgJ9gtfR/TzgGnI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":62535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdHh2CRA9TVsSAnZWagAAWE8P/jybmJMphOkjTaMxiNIT\n/QhViNHBAnsDyXTJpPOFV5/RrbH8KQaeGurBK9kYTsVLLC2IdSoL9gETgs9O\nyWhmno5wQeqMF46SqHG3kGXcW52iJQyIEyouVK9/Oh6uk2tY2dw+EIeMfNry\nk5rtdKD+sosnWVWrqvAblERdgtlvVDAm8TeLlbTYXoBZSTVAUV5rKf6NMLGz\ngmLE5M+8bFTQX8yntlD3ISzlI27yH0aUhSEFCNVEeaWz0X7FKPe8lxh/aqQr\nzbWn0puOAS27tcSVAGW/kn5Uqp+cMt0/ngDmzSp++mBC0H4EX0nNbAzwCLez\nOoCHKUwyJdQCC8NYYXG+AiFOH5pNapKICf4Wr8mzFQ30K3Z298TQM7WolP4U\nLeM2OjhhRrZoP2hsgaKaXEn/d12fwLdTg52JsLAlvyLNzkmjqeISdNStzTrV\nHOtglEYHK6eq0MXQ0uMShaYSqdZBWuOiHdqgNqY2+n0PlC5Zc3x28QaIqnFA\nDABiF7egG2pOYUA94+iJGESkrf7bsGCvC0G2kjRecwxzays7Y6h5v4zrjuDt\nyX+ggqr0RnoZlXrW/2LITPifUugyES0olfFe4euR5amEhs4TMtwsi7PzKxk1\n/W8xh8gbrPSncLbQIxfPKXyHCtcUyYX9CRS/EfOzdZZr9IAzzIRegA846gLL\nSUZ/\r\n=YIxI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"c6c993bb16c58ba907337a5667da01b3c248e350","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.11.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.11.0","dependencies":{"@opentelemetry/api":"^0.11.1-alpha.35+c6c993bb","@opentelemetry/core":"^0.11.1-alpha.35+c6c993bb"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","ts-mocha":"7.0.0","typescript":"3.9.7","@types/node":"14.0.27","@types/mocha":"8.0.2","@types/sinon":"9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.11.1-alpha.35_1601468533594_0.6777719470337134","host":"s3://npm-registry-packages"}},"0.11.1-alpha.36":{"name":"@opentelemetry/resources","version":"0.11.1-alpha.36","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.11.1-alpha.36","maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"f73180c8c78739ba2eb13bbdff1f79b8b7b070c8","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.11.1-alpha.36.tgz","fileCount":45,"integrity":"sha512-Q8Bl7BNipgbKnhf99O1+e/40wYRJRgfthLpAifWgJNEOBdH9wcuf/a+t4Fh0bv1AH8l302Dqrg/+/OnYKvP/mA==","signatures":[{"sig":"MEQCIAWYX3fAFuMy0m24xRIlcgizty0S2xAzftP8LdZZVnXuAiA3XMzFD9r3Uf9+NTAOZaH4Wl35ayAEEe6v+3vw5dwYkQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":62534,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdHxcCRA9TVsSAnZWagAAjv0P/iqgIWGpiNkBHWNeFwXo\nky3dc7QgBbpO2w5ZOxyfrxwCb7EIKZTAlqtoTSoIVSCAPYRJoG7zjSLkOLpH\nIf7pMBmYNOLDE+teZIrLRNkuiVKcfN62LJYu2mtG7RfjQrSmthC80l0GmPi4\nhkqVHqY0UzmbhGq17wvDlUOHU/1g+gK8zouaYZ8u8NjcA6VeDbDksrqfuC1Y\nodLU4oFPsGBuPiVKxAKTNxlmbVrpapdPDHWNqSHqG8SLhIn4cWeuFbTlRovk\nYKk79kxT2eba8nhPJxLQ4vpX+QvErl3gyaj4Lep7bsxW4y/j3ETRpFpHFW4q\nKdy+lvfZh5CDOK487+g+dGBJ4504D0fXUevuyJITzOgdzmoEaq7fFJFzHUvR\nSBmkOcFgLhiSV7lJKOz0kDxqz9x4XCZAG7k1CGgayDJuAp+UpnILfhJsuFGq\nMhiSI7Si5YY0B1H2oYwaihuIWbeIvyIAODhsklWO9LDTNeNtl7je5ciZbk2a\nVBf7/aOBFIj1D9X3NIR8lOceW6t21PoC9CqTQJGvppeXlQBrzS1O/DqWMFnl\nYXSeO63ZeGzgkuTREv3LAZ6hxGSNPXrqB/+VwK6x2J4EfyWU8r3MA4+8xiWq\nCqKR+Uvw0i+pWJBLbjkvG5ftBb8D+iVEGCySgEEfdui9FPinpbOmKIgtr50J\ngImL\r\n=JwKA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"6eb157c66925fe84b4960f247a86678441f3cb60","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.11.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.11.0","dependencies":{"@opentelemetry/api":"^0.11.1-alpha.36+6eb157c6","@opentelemetry/core":"^0.11.1-alpha.36+6eb157c6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"9.0.0","ts-mocha":"7.0.0","typescript":"3.9.7","@types/node":"14.0.27","@types/mocha":"8.0.2","@types/sinon":"9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.11.1-alpha.36_1601469532073_0.7617485987029977","host":"s3://npm-registry-packages"}},"0.11.1-alpha.44":{"name":"@opentelemetry/resources","version":"0.11.1-alpha.44","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.11.1-alpha.44","maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"d705d5c652dab148a2dab2d05e4b1c655ecd6fa3","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.11.1-alpha.44.tgz","fileCount":45,"integrity":"sha512-eEqFyIFxrlP2Akwkg1BM+lZQJjYIe8uDcOR36NmLnJQpeyYq2VJbv+NYYJW5jVnSrwtIZsq1JtbphItCPMQpmQ==","signatures":[{"sig":"MEUCIQCjvUzs955+yi9prbp5vchlzls4oCsVGVgHSrj6FoTZNQIgfLTkKPXUHNmtmdxVTFHHAtJAaUvbtgUC1G1HnTrB7sA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":62534,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffh0XCRA9TVsSAnZWagAAVBQP/1xtZu8DKkb2q7QSA0jZ\nBCKqy7+M7nJLR+LL/XyGyfst4Kvo2ZKjtVuCBm6wF561fLp36/5q1YI1MxHq\nddSXPWqoROQtK+b9bmMzpHrrK0KqnZYB48nvPpKwAKX9v4HYryENsw+/EU/V\nkwKjWSoZ4UuaPrDXhdJMlmlHqX/TzH2tKjVL7xQQprv0wJvHffsFe7Ky+MiG\nCLLJhLE2xWloCV3YuIjKIir0CDMmaN42J/4zby3uwNOKPQCb0xbaJwbjglya\nRfTGXeIbdbZLGChxTLu9+oN6l/TOpoRF78Wd/tscBxoWuYYEPdewRSS2g5ct\nh2P5wLXf41KI53D3z/JWRsF9Lj3R5B4SIlmX035ly8SfLLoqsXIQJP+ApqNo\nfzlG9K6VRQg1FQW6pTB2tfnZy36/DInzHN55gyVJP2H9SqNOYFNgfmIZKg07\naNZSRQbQP/XcGCKZ6Q9iKYSGNJSnNR9ne60z65cORsYclVnF6VzEEK/Rm3E5\nViqVuvpx/mnUNhesgbSf1H7fABIpQQWqGaP2AW+zgpCki1x7FAC5xkp36FKd\njMnaavq83skiDyMbToCfV50AGMHYMInA7TkohdCtBl9IQaCYSjzoIYCpuLpD\n/ZXpvGcG765DybXwvQBbmIp81smj1LGIKy1BLl8wfmRJRkYjuUrpCAn/NO4p\nuixe\r\n=RISL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"240f852cc41707c751f28811b7ce3d243382e3dd","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.11.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.11.0","dependencies":{"@opentelemetry/api":"^0.11.1-alpha.44+240f852c","@opentelemetry/core":"^0.11.1-alpha.44+240f852c"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"9.0.0","ts-mocha":"7.0.0","typescript":"3.9.7","@types/node":"14.0.27","@types/mocha":"8.0.2","@types/sinon":"9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.11.1-alpha.44_1602100503559_0.35968270960318516","host":"s3://npm-registry-packages"}},"0.11.1-alpha.53":{"name":"@opentelemetry/resources","version":"0.11.1-alpha.53","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.11.1-alpha.53","maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"7f4e9b78e07ba9faee4ae304b2bfd74c740a72d8","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.11.1-alpha.53.tgz","fileCount":45,"integrity":"sha512-/bgN526HMi/eL+hIR7SrFiJEncWNWdKSnzXa8fAih8+DcOH3/uCuBMKvd6oYBS/DH0RYplQSnBkG2VgAVlOU2A==","signatures":[{"sig":"MEYCIQDOvhkJmopopdj0yUmepRzFVMOawo1qqblxnqwbauC3lgIhAPxVoKuBgZZNdw6W0chWVaSBG3rDZz8oTcRmp7m6KaEe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":62210,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjX0DCRA9TVsSAnZWagAAWYwP/ijieAnfftYs1WEy5mbY\nvnYuEdPjBkYnCyUAeIToHycFFFaWu88l9QD/U+WD2kzh34yaaboA8c66DOBk\nyZL5HMWmt8Hv8dwyI/viCVM+9WsmdOrNsH4BWHcetPBM9Mf5ZkG3O892bIfB\nZujEaJQ+c9+EdSmeo4kOHvhD1O2r6SuT/LL8K4aYCy6JD9YiTxUc3KjEX6F3\nhO3zFXIwYUlCViaHbO/3JeFGCxWjstRuFLcrI36jqXfIiy7PRnl2BlURp5GB\nVRMo5UAiZ27KwTl7wrIOra34P6rfJBgFuhVecaBXikqWfc0WMAEyjreKbzSi\ndHJlIjW5ZbHleTDwTqpuTZY5MaBGio/d9XJWG/LlqlUPUNmFd7CSLuDojML0\nUH24xiwqqHr4e4NTQiyyh9ccF/CTZT5XtpPTnn1vnekUWfMw88PiLcobIfFM\nmULKp9b0mUMxEgwESpb4fD1QNU6zPWctRa5EqwZLHWu/0a5+kMJMKjZ2tTFy\n8CRop3pVpsebtcQA/PpJz1xFqHysFnFP4ONuF9uUloisjL4Z5gC5kjbdvNoz\nvvgLxm5QeE6yCfZGZC+n14KWbt0ZYZ1nzP4Qjhu4XYYzCjtl0WwYKG1F9ejN\n8g37OmZM3dnXw1Ya5bY9VR4bsH72odbaqTzi0C8Tq+0l9JfzQdBIjKSWtELV\nq6dI\r\n=IFOE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"00a8ce7f982ea24bcd4bc398477112894078ab29","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.13.1+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.13.1","dependencies":{"@opentelemetry/api":"^0.11.1-alpha.53+00a8ce7f","@opentelemetry/core":"^0.11.1-alpha.53+00a8ce7f"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"9.0.0","ts-mocha":"7.0.0","typescript":"3.9.7","@types/node":"14.0.27","@types/mocha":"8.0.2","@types/sinon":"9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.11.1-alpha.53_1603108099016_0.9086196309952237","host":"s3://npm-registry-packages"}},"0.12.1-alpha.54":{"name":"@opentelemetry/resources","version":"0.12.1-alpha.54","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.12.1-alpha.54","maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"f0594e71321393f951f4f12ba3572b6154bd82ac","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.12.1-alpha.54.tgz","fileCount":45,"integrity":"sha512-QSFLO9GicaT6lUgdw50e16Ecp5JBoNXRNwovvDjZ45d+HG1mKvSpQtJmm6Yt0O3EBVEhWBS3BsAPi4EVtMqthw==","signatures":[{"sig":"MEUCIQD26AlIwcFp9E4DO9/1QJNrFG4ROYtIlftSJMd4W5LRmgIgNMI0tngof/oHiw2RsHonPO0DKCCuKon8A6dq9Ga00ro=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":62210,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjYt+CRA9TVsSAnZWagAAIBsP/1OVyZB/8yY8scNuUS6i\nUvqRfCrJ3bdI3QVyR0wXN/ljytRDHyXneJCzlAjdCqOIRFo0vjsczE5R+rRm\ngfRPB0kEO01o8PB7DJISK/c0DO9rb+OqURS1si2wnMCrH3zWSsQh4ZqO/9r5\n5ubcKQmwuKdugAX9d9Ctnn9LVHEw+5P0Ny7pExFz0EPMrCcnIkWl9umKa+i+\n53Ne0NsiG1LGKW8zbk5wbGOQXBXBgqGHXUTAwL+A8hwbM9eu06at2vWJSEDS\n8Hnt9Mycsf+liIoA6Ojy9Yll2D8u2+b23W0+sodKofwaW4TBd7pWJQqcbbbH\nIjQAsfe5Gs4zd/4N9e6vOsjsnAX+CjGiQ53o3sWhfR97rHFi73FCWDqjOMl0\nOF2EY6VrIOzSI14RjEMFKA8zYZxRY7qIOylWsM7bDgQzgYAqN8eEFaL9h2fM\n2iZFoq9l6Tx8ecfc5INeXDCpDOfbNViYDbDLaUT8TRZ6ClpCTpEg87S8A4gI\n20Yd7hWAVARCWJEhhG2YKMscsxWqXtQvwsd7PCCFRBd0wCKOxLx9HRxLiE9C\ngRqLwu0hA7be7kPBZKog6wDvlrsBsdeKWsv0gf3x6YRDrgAyfz3m5EMV/2rt\nMPYt6ea2wJgMF4YkzddZ+CsX5KI5mUO0pkJD/I5vcS8e6eiaRoQBHZrmSD6f\nmbUz\r\n=9u8W\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"3f72613a36b6f97555a0fa7481755cf8b6cce1a7","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.13.1+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.13.1","dependencies":{"@opentelemetry/api":"^0.12.1-alpha.54+3f72613a","@opentelemetry/core":"^0.12.1-alpha.54+3f72613a"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"9.0.0","ts-mocha":"7.0.0","typescript":"3.9.7","@types/node":"14.0.27","@types/mocha":"8.0.2","@types/sinon":"9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.12.1-alpha.54_1603111805592_0.5072234412858905","host":"s3://npm-registry-packages"}},"0.12.0":{"name":"@opentelemetry/resources","version":"0.12.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.12.0","maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"5eb287c3032a2bebb2bb9f69b44bd160d2a7d591","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.12.0.tgz","fileCount":45,"integrity":"sha512-8cYvIKB68cyupc7D6SWzkLtt13mbjgxMahL4JKCM6hWPyiGSJlPFEAey4XFXI5LLpPZRYTPHLVoLqI/xwCFZZA==","signatures":[{"sig":"MEUCIEq+JuVHapw8yJYvrcuXUgatZM4g6nGK7ZZR1BbLNbbbAiEAwCfde/JwN/A8HZ2tXKdeBH7uecdlLlUpVZEkiWSmDJA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":62118,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjYxhCRA9TVsSAnZWagAAA9oQAJy402/DKzSqC8Ncisb+\nmTaLGb5le4MHvDrAXffKeMq+Qhl9GoEDYup7VKmgzlWUQgaXJHJ5rGZJ2ZCJ\nYMlg1vhKXf2bo6H0gumFmfb+jmmgGbEz4R4Wm97lCcbAW8mVXTnOHucle/n5\nJbN9BNkvMZEZNwFkPvuCrlULZTszxOIAFVvazzpIv3UvhulXJVck9UPvP0ij\nOcEujJp2XR2zZaTiXQxEgLHU95GHMPyeEqz0eOlNDEJq17SA+7KR0DXj2TT4\n1o121nlEUx0juP1dm+QSmkei424WzqfzgoPI2OUuyLjAJauZdziY89x4juyc\nkIOzsgxqXROYdpGotUwtOuGrJSJG5DgBhHzAWWN9lPFuO3jKswybOiuD3IoJ\n4Gheg0THNiahJSfXETbXFRaD+Y8hlF7kGAx531/V1190f4N7BsVoUr/05kG2\n1RI/jk9hB3nE9Mex8sd3muumV49GX5c1/wcPE6bsgXqYalBsvkuzdhjfE4Wf\nc9H7O3mQ6JRMAcnpJkTr7a5UtSQZvb44n+XPtPneb9hnGFXS2HWx1hZQF8OZ\nyNJ+m5lJdTJn00BOWxqH/lgXVs+XqbSkpoL0ogXzF8HIzj+sITILTCbrqjKG\nE962PFwh4Ena+HuaA1R1O1rsQHgPc+YBJ75iwi2OMVsvm7sODLOHwj+CSyWj\niW17\r\n=mj0l\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"3f72613a36b6f97555a0fa7481755cf8b6cce1a7","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"obecny","email":"bobecny@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.4.0+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.4.0","dependencies":{"@opentelemetry/api":"^0.12.0","@opentelemetry/core":"^0.12.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"9.0.0","ts-mocha":"7.0.0","typescript":"3.9.7","@types/node":"14.0.27","@types/mocha":"8.0.2","@types/sinon":"9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.12.0_1603112033336_0.2595458775499204","host":"s3://npm-registry-packages"}},"0.12.1-alpha.7":{"name":"@opentelemetry/resources","version":"0.12.1-alpha.7","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.12.1-alpha.7","maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"779ea41b81bcc4cd2cec6e4a6e2589706aa75b6c","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.12.1-alpha.7.tgz","fileCount":45,"integrity":"sha512-10kSTBAviKME8sqTYayaMqrDcdRMPvsoNMYtGvEK76CXmUStGFmVsL0LAvAWk4FDs5rQXaddgY+7NO+hsbuCkw==","signatures":[{"sig":"MEUCIEOEJNhun7kV8JsW5P+Cmdm/ofba3dUoKU5+nzQ7uioCAiEAyE1XbeHE+a91hz/cGrnXSf3NGlHbM3cc4V4xft/g1Lc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":62205,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJflzurCRA9TVsSAnZWagAAHDkP/RtRCeUXgOCQuFEb52Mr\niPmVDHIPMZwwPQ15WeUiMWd62yCNZOZ3fTzzTbIqTNgjWb8FhKA/QvppUwgf\n6d5yKLN8Phpwue/G1S8jsWCPX2SNgSRlRYK+rY/6eEjVC9O4TmTwu6t38gzI\nZjQoX6ZhFUofGAPQqT9bhFHxgzbRYDNzaq2e6R3txuy/jhGB2XML4Nw8tDRI\nEQPsjcVZgDX7k/tgBL9viSU86flmM/uaR/FAdy4Qle0l8yT80VeZzG1rnNP+\n5IKBocFS6cwEqT9iX5G0pmf8doO19ytXLVtTOOGE7d4o4215Rlm3V3Zm6BST\nJ2p5kTQ8SO9OiQZjNhLCwCm+0KLzIUyZGxFHYnZQjKGSFFhEFj0IL/BaSATZ\nNNXJ6+3tYFK8RNFAqZbMsqGxsLMbgUmrgvdfdyz0ylcuMD34NdwFTXxekhD2\n0imTBm8c+d4f5pwUsFGdVfffZIlidul/qyZ+y9Z60vNQbnWQdbubFZLEea82\n78b2/j1fmhquaB8KJfkLZ90BEArfi5nZQBkB9+PnHNCQwVZNmYjHbW5s/Br4\nV9K3JyZ9my9frXPBkSlPNkojuLoCRdGNgqNxUTu0ZlfDneDVBilpVan2vviQ\nxCHCKDWCXOzcplKomGNOybQuQrFbaAjbc/DFfFCc5Oh1I1JkDMAUTq9SNAFu\nTSVQ\r\n=QQTi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"46f31dd2285d55d239195032528c3dab1bf0e15c","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.13.1+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.13.1","dependencies":{"@opentelemetry/api":"^0.12.1-alpha.7+46f31dd2","@opentelemetry/core":"^0.12.1-alpha.7+46f31dd2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"9.0.0","ts-mocha":"7.0.0","typescript":"3.9.7","@types/node":"14.0.27","@types/mocha":"8.0.2","@types/sinon":"9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.12.1-alpha.7_1603746730665_0.41875103327090724","host":"s3://npm-registry-packages"}},"0.13.0":{"name":"@opentelemetry/resources","version":"0.13.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.13.0","maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"3f3f0647dc9cdfefba3bd09ebde190fc5d81611a","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.13.0.tgz","fileCount":45,"integrity":"sha512-3fkiwFKTkSCP2TA8OeBD2JYNY8PeYP3rKTR/m82rW1/bWcaGVgfl8FDgRQ1kw5qixSK17zWVwUjvFt6oQ0Ia9g==","signatures":[{"sig":"MEUCIQDibwMEY2A4YvdNAjELZ4To37ujzJQEebsoHn0K6dNoRgIgcW6kQj4E5uvU4Dbvz4LCaFdnN7WqBuxE48Pz97WDfVQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":62119,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyql/CRA9TVsSAnZWagAAV5AP/iq/7Wj7PWPy6kuTOzlt\nwBUPJppTcQ8z4iDiyiYp2Cvbx5zf6DEXmNnZ3StCnZQytVcr/WRAeTgxVJge\n2Zg87AkJJGVoXWxfGMQi31y+PzWzy99OZ4jwb4asAXks16oNI3U8yVnBTszu\nZ/KS7+rta/VQ/wysMX70qmNqcu9IDUvQYuq+Ho1eL2SrOjcE1tDjsuekH58w\n2X2qrUF7+DDlljlt+kO3iAYcjz9BP70oFBBOqfkNIJ4ulIntpbsR08wi3SbZ\nm0OHvBAA3w9ialrWi/7PhbEmpYJQRnb+FIt3y8tLDJTo4Ss670fnGo524EYV\nold8dcvi4N2fDTpXPtSxCsAfmHo+urpdQUmK7WPdQtGIJu3LyFVGWuvUbvcq\nGaZf+c/1HQDLZQFV+bUSzVyAlY4NNEB4QJr3YfURZhLk26MwQzeL3MzWLPwq\nvCuZ0HZv+TImRSNndF94FOpTeVKKDGBx5/BKdfEVUVr4Pp+0o8xIVYk7dYUC\nOFdYInSk91hzFGiJx+tMZpaNZgQ3FL5C/DMJKmpShecO+05hUor8FhJ7XAX3\nn7/GWudoj4gc5otXCs5cQs/HFVv724qgEzdkIsHU3t9t8zDs7C4yF64BPS0w\nctItrSC2AM/LVQmh0BbRSxg2J9nWrZduHV0RYxKWlGUUF/Q+FZrExj+F6bwy\ngbAn\r\n=aAVi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"86cbd6798f9318c5920f9d9055f289a1c3f26500","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.8.0","dependencies":{"@opentelemetry/api":"^0.13.0","@opentelemetry/core":"^0.13.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.1","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.0.0","ts-mocha":"8.0.0","typescript":"3.9.7","@types/node":"14.14.10","@types/mocha":"8.0.4","@types/sinon":"9.0.9"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.13.0_1607117182658_0.6413375169431181","host":"s3://npm-registry-packages"}},"0.14.0":{"name":"@opentelemetry/resources","version":"0.14.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.14.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"e89378931b4e02d4b6fb526d237d9594db2bb68a","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.14.0.tgz","fileCount":45,"integrity":"sha512-7XVML4HxvoH6kWY+x0mhMc5m0a2YBvPCTSX7yAqyp9XIGvFpdjzAE2ggJ40DZrL1sPv9f0QYAbnIKFDVLBTfGA==","signatures":[{"sig":"MEUCIFa4euKHj9dUK89xw7TDAkbkF7fgeY6PoZVHEec1A9yoAiEAgFU74D+cNi7P0WUXnl3RywL2AbWC6mhZRY1X8fow/C0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":62119,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf28UrCRA9TVsSAnZWagAAYRAP/iCsFY+rsKA9B8vNtw11\nsSLz15qGyZDxh9rZRrgwRJVwd0m5vHwWICAs/o+QEISbcFj/Qj0rzbdZBLp5\n40BwXIWY1EFlA3fZqf5qgQuKCQbRlZbEmsoajGTgYsR/TmO0LMM8GAvFNcA0\n9LWlx97GarAjeMQ2r8uf5FYTpFlRuQKcIEJ2jLSCsOPir4HdAW0E8n/xyT4U\nFI0k67Di/wguJOVQtHnmcgUq323AegolmNnJebNOfAqs2mNpI7CaNWcIz1Eg\nApHbwgCjRcIWtWxgmuH76MxFya6T3khMGTxfBV2gtDDmyCoL6/YKeqpmbFtC\ntZC80XrpHUhCtmQKysZw1ue+2ngWOTC6EMaGNpk9bvlfBeSXQBIv1S4iS2lZ\nD1YEXdRWBCp3uUucdywQWFUsSEWWrm3ZZ71hMEa6mripmUllR6E0BzQpntsl\nLXkZH5mUoc0Y2da3KzttNjOhD2rFRO0se5cC1DNN3AbKtpZu9RvSS2Mv7HQQ\nEE8NorFvu4AMPklezCsuB9dNxYak716A3qHzjAMxWTRj3e5/08UiiC4EJZCG\nJf6vMu+Xfyaapv3/8c4By6YKcwGFUbfwT596xo75VpviHGsKMihsMRa75i0P\nZSoTWeywzC1CDs0L8NwkJ5eH+LNa8vEWr9aio64VGPOjrj95AwnQQRj2iYkC\n9139\r\n=Grir\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"27a8d4530c56257c191468b073669909bf8892a1","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.8.0","dependencies":{"@opentelemetry/api":"^0.14.0","@opentelemetry/core":"^0.14.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.2","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"3.9.7","@types/node":"14.14.12","@types/mocha":"8.2.0","@types/sinon":"9.0.9"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.14.0_1608238379295_0.5588367451132641","host":"s3://npm-registry-packages"}},"0.15.0":{"name":"@opentelemetry/resources","version":"0.15.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.15.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"5a26ec1753d005470cdb31be524eaca7a8532ed2","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.15.0.tgz","fileCount":45,"integrity":"sha512-0PK6d6NEVwchfBXqjoMWMudRsP4z9IUdY6qSlBPXL9ikOcbLzLp8Ngc0rY2BrnZa58CttsRRceA1ul/1ipp+1w==","signatures":[{"sig":"MEQCIE/Iu2ATZd4rleh8ABbfHeb+sE4gq61OaBDNXRXpYc2xAiAhZ8JtB2yzv58B1WKZxlV7PnrRuNDKnkcKLIkmLXDKfg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":62082,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCf4SCRA9TVsSAnZWagAAyO0P/2D5WBpW47Ob55jcDBlC\nSWnFBfj4WbzM17rN2z4RsfnJiitdKXP2YzsJfSwcl9a2nfFFv3/Bd8bCCp8c\nVwQ6AgSpdYHhFngmHaCGkgVaXtygDN+k47xiNKtX+soHY72HjRg9/0V6SCwW\nNFeC8XMf++KdDjyjF7o+vjLL88JmeHvkO2kHAukxweXpTV1TBuyFeTs05Y8j\nW+YFARRLJ0c2RSByYRbIvpnCHKgPfvrUefk5btCQwooZh26t6PNvCSgSZvxO\nbkU5w8czNrEY0kVUPZh45u5Cqja/5qw/vHL2zWmtdeqyxWdEl4SvNToPFYko\n6/fO8ZUOO9gZMMzzmltnYGk9NeljIqWpLfFYe/tALSkWR3CoF4jo+u1xgHnb\nwz5M0XKf56EDChWlNBbzjASS1paDyVs64bp3HO18eZs5F7VO9eBAQFDlRpxz\nRVhLuHAgEqQldOoGetaS8MaKCmR6/pM5gWV1gnyXQXZq8qeSyVSecVfAkFgL\n6lj8XGyLIbBQ0VN/cPTIYZK+5brEzgNp2VKSfkGlaqwTz+cjqu0hQkKwPh2q\njJUgF9/RexNeIlUxWrJAcympQp6aVHtObIqKz47lxocPH+QQ/i/CVlmw8Yj1\n1jkVv68JJJzFtOZJ/Vzz8CEFE2pGUMnOtTgm96seqjdyEnlJMX4o7WaS0jYk\n+uPF\r\n=cBKw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"960b868f5b7686eabbf49190071b8463551e5d8f","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.8.0","dependencies":{"@opentelemetry/api":"^0.15.0","@opentelemetry/core":"^0.15.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"3.9.7","@types/node":"14.14.20","@types/mocha":"8.2.0","@types/sinon":"9.0.10"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.15.0_1611267602040_0.4641719074298778","host":"s3://npm-registry-packages"}},"0.16.0":{"name":"@opentelemetry/resources","version":"0.16.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.16.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"40d3737545e4cae8b9c46b42acac041711bda2bd","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.16.0.tgz","fileCount":45,"integrity":"sha512-HOAmcRnZGbEhcddsjqvz3Q/mEg75PyEoH/CZZ3YGqYmwTPimTiusm8iz5nXMxp1UpT8rkzlEGei/E21SQ/Zh9g==","signatures":[{"sig":"MEQCIALZiVNMCXNIXQvDLMGjF9R5mTkibwPfoyIBWHiqEfHKAiAKg0UgrNM6rVeLyJFPsgXQqcIEuCZ0xDmNp2ve4kpbnA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61919,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGIG3CRA9TVsSAnZWagAAhvUP/izWaT1tx66PJBN4GS8U\nrXJALeIHs1iGEumGPKETbZlKagoIoZxd7Y2F6RwgQ+xI9fl4flW5+ZJsVBuh\nBpTLJkySZSBGDfS80GzwZxjxsp12vdK524sx8nqp2MWu3ltvEqWi0gZ2KqF4\n4GtRYISwM9CyiyAsR2ev5zFI6THdCgj8b16n1imypIyMwYMMp7R4mGnOd4Ok\nCzNFpG1v95cGngwZW4/u/5YP/l6guhZprQ/m8T2fvPIlIYKvKyo60Ftg6oZV\n3EGrzmnyhpjqwmjyM3VNgp5W0FUnqAhAsTZ8lMjlrwksGKwq5r4MG9IXDtzU\npMGNheLUuADAguqVQxAH1qCGSLtX7MjZAtuexN40ZhViGnAiHJl+1BG5KyFC\ne/LUMKlltwKlq+6KBWtUCivO3mmDfvfVIFO7BUnLAy6+JoRJWyrRMp5p32kR\nhRoSd54k+0H4djeV29qrOW4JpWcALPLyoC7d4fwnLo/W8A75ZxVhi9jdEcDu\n+Of+KFbUiNTWL9qUoczaAX/QupBkIcbCX14z/ggPviOat1QltpYgpCjpZycn\niptWEa9ShodxGV4JZEngw+w/OxT/DHa0BHYMYc71NLddXXD7XxR4swmkYHqt\nSgtXn/fJmyaFPyWgqQik01Cz0+mWLRQN7WWjwtjMvpDAY0F2iczcREHg/Ia+\npgUi\r\n=ekue\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"e68863f8e63854b08ad13fb54677294ac6d6b681","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"obecny","email":"bobecny@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"12.19.0","dependencies":{"@opentelemetry/api":"^0.16.0","@opentelemetry/core":"^0.16.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"3.9.7","@types/node":"14.14.20","@types/mocha":"8.2.0","@types/sinon":"9.0.10"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.16.0_1612218807314_0.18260059808625706","host":"s3://npm-registry-packages"}},"0.16.1-alpha.10":{"name":"@opentelemetry/resources","version":"0.16.1-alpha.10","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.16.1-alpha.10","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"d9315e918f7d5b9753297e990b72ca9525a3862c","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.16.1-alpha.10.tgz","fileCount":45,"integrity":"sha512-/7wk8JwHO+lGmBgSRZBuKcIEqOI6pdvbJXwiR0tIN8q4L5ULmCkNMnbJ4h1DPjpgd8IinYWHWeqGGTYwat17lw==","signatures":[{"sig":"MEUCIQCGs2C649ojRgi40lW/8mtKzUqk64N+5m4WRWtkmUfcqQIgGXhvq2NbEx3EipZXupLuuqlkoS+SOtm1FzDLlcicloo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":62250,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIV23CRA9TVsSAnZWagAAG80P/35srKIYtHj+wvYjLWVi\nbREDAiMI/07Xtv+S3Kbh3xuGYKa1yuYlfS6Hcrs0MzUN0jTB6jGbnu2sNU9A\nLJm/ZvrWN+ta3crSup2pKoK/SoKKB59k3CktrQ+rjgg7BdgoeK1n+leab4MA\n9CkBNx2js7tvDAzBnt6JE70MH9Kgy29HgO9aos16fc1CgkmxitRKsMs7JQD8\n8Iv2MzqIiUW6qSH6X+aPRgSVq7l0PKzdKv7fYcjIJTaY2Swg8E8YFM6HOOYC\ncgu4btfB1EUrmgHf9YnP9BnD9I1+Ul/zgKYx76LVkQ3HQMXvrcZgXux4ZPey\nBqcTrZUPdWCAMma+BTrsh3iRDyRvGIFZ+N2DZmIhjxr2ljBIoLnwkm0NqH+d\nRuqZ0e/0yXL9oAoKSzxBUPES8ovK4zssV7LtGjNcobhelhdyuUrlO1GRso5W\nfqMW9+Pa5c8Ag1y/gxqNLcmV6FMDWglc7T2/5s7QDqRA1QxVrpYtl9ULgEvl\nJ2a9r3o02MJXR4B8vpPWwBMjXt/E+D/CtxCJKpIV9pFcxDXF/vfPF67sdCBb\nKFv/4/POsV4AUCcgwyC2oJeHYSDz633s4Z8OpMNy0XxEQDBe9qnSid1J/KlJ\n2AciPansVTnkeFFDnwo6bIwBPBOfK6nXBWrUO99tq5jy611p6+ZQt1kkQude\n+Lah\r\n=+m7G\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"cacbbdca0e89d31e2e0b10a8ff5fb86d7a714906","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.15.4","dependencies":{"@opentelemetry/api":"^0.16.0","@opentelemetry/core":"^0.16.1-alpha.10+cacbbdca"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.1.3","@types/node":"14.14.20","@types/mocha":"8.2.0","@types/sinon":"9.0.10"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.16.1-alpha.10_1612799415253_0.06711073559864977","host":"s3://npm-registry-packages"}},"0.16.1-alpha.11":{"name":"@opentelemetry/resources","version":"0.16.1-alpha.11","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.16.1-alpha.11","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"bd9b17fef545d946905ec949907407e5eded071e","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.16.1-alpha.11.tgz","fileCount":45,"integrity":"sha512-U8BaJqjmrunvXOhYwmYrLKvrMXMStwjH97F1TduERl/onlroKdYMiVmacF+Qgqh/tJVBOtRBOzagbFwhvHYERA==","signatures":[{"sig":"MEUCIQCBKHYcRVyN/BLH10izj5jokeCFGYmqMCBn5vUkADUBYQIgGnhODigO94/NmQuxT0wmMZ2GM7WyuobKZaukms78bAo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":62268,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIWQ8CRA9TVsSAnZWagAANigQAJSFEwrAHzezT15gnENd\nLTh9h5y6W8wADsrYRFOLTVC1IyKWFbsTpD6+7paUkb4M1EsTqt4DfiXgDRpb\nXxJbAUm9398NdBPhgAnvvvpucv0TSkPsJN/oA8Ega2K0ZvaQ/9NGsU/3QSHz\nN9a+8DsqL26ziP1cnz7KlY8B4yxc2b4i7o3WbqljAbmZoGihnYdgeLSjPYw3\ngW5vKmA22J4/jVrEzga8krMpZYloLjlMo5X47P5Z+/eEsFpMn2nRjWbnxdUG\nJgsWkB81fqnGBjSwtJA9xoKK0CQYuB6qdzmM3hV3Jx44qAPsUisJpx8u+K9l\nl12ubK5FgtRDqM3TOH4x4BkK2aH7ajG/7SeH5F6pZS5hd8yDiLhgv3Xr0lWu\nony923wVrerHlnNI9SSpHBmtUXlTDiz01V0+oQQANnbdxYXWnkVG5IVIGa9n\nwfIsJhvUFcAjkvwyzEIaP5LFKAMztXpUoHA2P+kVwUyLQrQRlUJ3fXfDBGK9\nWmur/TUYS4eRayoaKAOxDUDOF/Qe12xNhFn6b0bSRaCwgHC/o24drHJkXJ+5\npLfzGoBaira9CkPk8B0q1DdW1luCmMskzj2it2bi1xxRBoFpieGyfSSWH+f2\nijwEcEv8045W0a80jpUc34S+CMo5tREQiOrl61FF4baMtHF/Xus+RdS0w45w\nnpbG\r\n=AH0z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"70a128ff5dca16060ca7c2cff943369ae9999c34","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.15.4","dependencies":{"@opentelemetry/api":"^0.16.1-alpha.11+70a128ff","@opentelemetry/core":"^0.16.1-alpha.11+70a128ff"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.1.3","@types/node":"14.14.20","@types/mocha":"8.2.0","@types/sinon":"9.0.10"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.16.1-alpha.11_1612801084057_0.3310941407078343","host":"s3://npm-registry-packages"}},"0.16.1-alpha.14":{"name":"@opentelemetry/resources","version":"0.16.1-alpha.14","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.16.1-alpha.14","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"50175c5fc8fd224b5b0156a9fc038b11258b087c","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.16.1-alpha.14.tgz","fileCount":45,"integrity":"sha512-AxLkbl/KTuqtRsbP+p2ifwb4/Q3vxdA1x5qpGJ9A5HrCIHxggbcNYeiGZdw5wMnjQud7EaXpDg5nPFWAt3FlXw==","signatures":[{"sig":"MEUCIHIPJAwT4CErNKlH8GrEqe5i192H6/PNRuIeQDZ+VC3oAiEAzqa2LhnE1VByruzbJwK4ov+dutVheXv1bptkGDUWMJA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":62268,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJARyCRA9TVsSAnZWagAATgAP/AwHhCu4S+tEvFp/GntP\n9siznFA8wWkQvpwauQokyybtE5x6BMq9vVGVBDpvCLTEAPJaOFmpmdXcKqs2\ngRY9mQeQRn6Dha3Ia0NgyLeGbTWHLVz/pcrD+sZpfvEa+5wEnnF/abEnXmmM\nKOBfF29IyrLWjUyaGPFingFYR09/Q3bttkixVeMaJtZRlieEZHSnitmUXBX1\nLvlV1Md9vjPHYjy+Ys+M5FKBoTYEE+7tROwjIQb10PvdJBXYiXz3+2FduBKc\nWnxN0x7wnQ5+Mpu6qE+n/4/mrVuwdS4URiM8xyxNcZGsFOrJ7dm1zbAT0zuD\nCl5A4LhPKJL2EoqbXOtB1sp5PwJPH+gwh5XnudOwsS6H9p02Ks7lN9jUb8GX\nxzkBERr+QZMUiVHRvz/Wr8I2yh88aemahC3o9/3r6PUVlFtMTymET7J4P+FH\nPhrCJVQ7j+8gEi3GSc8jfHSrELSZYgFlrZRnp56BtX6c7Go89gjbecqJqP2c\nZktt6XRVyCRBFIkYD3//JZVaQE4FTI8vGl9QR5P9WDlaQMo/NXEjXC4AbmMp\n3E5EpB9eUrUHn4JzU1hpTv/G5c30+eW8MG1oVOBr0iC5wl+VlNH/vC7ZkG01\n/qnwGoP7xPpjWRdPuLczVtXl2DL4DshJoV/4LcsNsgmExIsALkavekX45v8F\ncDXn\r\n=i0oE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"000a8ac099a3848a9a3c66f4bdd4826b4cff987a","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.15.4","dependencies":{"@opentelemetry/api":"^0.16.1-alpha.14+000a8ac0","@opentelemetry/core":"^0.16.1-alpha.14+000a8ac0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.1.3","@types/node":"14.14.20","@types/mocha":"8.2.0","@types/sinon":"9.0.10"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.16.1-alpha.14_1612973170508_0.7793942042492619","host":"s3://npm-registry-packages"}},"0.16.1-alpha.15":{"name":"@opentelemetry/resources","version":"0.16.1-alpha.15","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.16.1-alpha.15","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"312abf72eb1cfefc3a1f2695b0dca5733386006c","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.16.1-alpha.15.tgz","fileCount":45,"integrity":"sha512-flcRUOK9fvoXjaypir5F1osG+r3sOfni67gEMvZ9QtH09KVnBzcrSEtVncNO+ImLDvn5stZKOjaIb3ztH+jmYA==","signatures":[{"sig":"MEUCIH18wc32EpXPtGkSwosLp9pIboPF4y4UQMWRVbFS55tYAiEA7iVtbapvj2a9ioPOdE+iIaPuvBDG4c4cDi5FyQSS0aI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":62268,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJFulCRA9TVsSAnZWagAAKr8P/0HB7n+Lu72NjP/1y92e\nfs2fr0PqVchfnLpgjj4HxA3EDm04cvfbkGbnZUd8A8CeKjMbtPrkKYy1gQn1\nr/fZvKjIltRsNDxy+yhvVu5XpNm77iO2SaNqsYbCT7Rt0M1LW8IkvQcwdzlL\n0SlaNFMuD4KzAJqJq2a7lyT+THD6l+lpWhsfy0FkJcmBIOZvnTPiZsZUJP+X\nCUlu/fsK4+SUHGyFCcegj7vKVWG+ijxuFOYulYHj5+XaW985G7IDF9qRodso\nusNIZxzHCQihXGF+/wWWjoCUtF+wHF1J1iDq4v0hayrUJUsmc66AV9aE1u6D\n6kbcyExUjGu6zMSDdTWqZW9ZXk8/8nfLqKURn34NRY/howWjcv/Amwq6J38F\nrPbvxcWlGuZbie7F+zlhm1x7bjXPwenJ26TIPARqxXb+bTXT9wkkPl7Vt1Nn\n0+ZF8aF4lsGDebhqdVETjSvW6e71tQ7M7O2Qa8AQuFuclaAkqGRNuZzBVrap\npk4HHUiHRwnOYCUXaoCIBfpEZunPl0BgERn5MgjaXzAkW7eaAtkV45e3blRE\nWiGxLUJbtJY2Hd4dvUDv0JWNmml78XTjAPrfvnYf5NqzPPOfpn84df7YKA9U\nEvPyVco8F2yGjXS278oo1krr+wqZ6tT45RYMzTkDn+r0xpBFbXQ75KnN8Y5r\nHGhq\r\n=aP1g\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"1d682c2f75f9d11265cfc1692fa822174594d4b0","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.15.4","dependencies":{"@opentelemetry/api":"^0.16.1-alpha.15+1d682c2f","@opentelemetry/core":"^0.16.1-alpha.15+1d682c2f"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.1.3","@types/node":"14.14.20","@types/mocha":"8.2.0","@types/sinon":"9.0.10"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.16.1-alpha.15_1612995493302_0.29556701817542774","host":"s3://npm-registry-packages"}},"0.16.1-alpha.18":{"name":"@opentelemetry/resources","version":"0.16.1-alpha.18","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.16.1-alpha.18","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"b7f1fbaaa4aeec1a03310c3fbbc3e355cfb6edfb","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.16.1-alpha.18.tgz","fileCount":45,"integrity":"sha512-PXKcBDm5oRs9KfEOc/8bcyHYWLle44PmahOArZB9RFaMciqX052rlcNN4WdEqsgAT915v6PaRWMa4j/Q8tR/Qw==","signatures":[{"sig":"MEUCICaKgGMzwLvnZAW8kymKOqvlNarUb65Gf6kDOIWjiP1LAiEA0NNYUoQSd/mVZeCToVWCbLYZcFN/lGSU8//2+7t0NKM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":62250,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKWgWCRA9TVsSAnZWagAAY8YQAKGDq8W9tOTwk7hEG/x5\nWAlfXQY2wdlMMdI2YvGNJHqEys/Dns6bIXPtMpMhv/pi3gVvNL3AsP5weCiz\nAO7+4beV4Vm+dJm8vGCcg9L1TH6iGrtdcj+1uEtuXIOYlYecDinJCvql2ur1\nNo4o+3iiICwg8glHuMUSzO+XsMkX8ylPw2aub4t2bmtVBo90YEbXF/y6WzpE\n9pEjXY0jABR9vEpgtHF878S26We53WIW7cmytwbF53k+ATaIt7AeY6Zec3ir\nM6wOX2RQOa2mvEi5uK4U7N3t75Y4pyXrxV3YLunTIk4lhJep7OqEG1cgyhqQ\nXYne6pk55dVv3eKjnMryd9/PnGLYU/vNPnC8gDRSvyVIMRGutOmJzxHzwJvQ\naCz7WlBXsZbqnkwy3wMR/tPuhTNZubCsS7ufLOMhYX2cu+M9QPZA/vQ+2yES\nf2uolKpss8PXl9S5QsOax0qlT0XZV/jtNJ0QnA5MUqY6VaNtZT7zo29uIXJW\nP/+RT6f6XZBY7sYhjXxiId3bcF2JaiIZ/YwfBFcrp6dzEbIvNfyuk+hSdn4h\nsC7Av8nZ0/6rwHKcEEZSwqToY1soHAb3yIijL52eDiNWkAS4G9/uW8wUfnXM\nx7pXpXkZrQC+rQJC/eC8L6C26hBHm/2GqM8afMyf4InKDBW68T3NC3NDZXdi\nHkBK\r\n=VWqq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"9f965b0c749108df00bbe44eeab84d79b04bb0a4","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.15.4","dependencies":{"@opentelemetry/api":"^0.16.0","@opentelemetry/core":"^0.16.1-alpha.18+9f965b0c"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.1.3","@types/node":"14.14.20","@types/mocha":"8.2.0","@types/sinon":"9.0.10"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.16.1-alpha.18_1613326357745_0.7738625393152132","host":"s3://npm-registry-packages"}},"0.16.1-alpha.20":{"name":"@opentelemetry/resources","version":"0.16.1-alpha.20","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.16.1-alpha.20","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"d41f64098cb6f87235a34f4ea5589d523a8fb3db","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.16.1-alpha.20.tgz","fileCount":45,"integrity":"sha512-8+AfZjZ/fKoMMx3nGKXhzth1t5cBIf5THRBUeAKUlfEAHUjX+0R8YMee12NbQxbJEWx42TKz4AjsgJMt+CvEjQ==","signatures":[{"sig":"MEYCIQD4tmCJIxRUWdbe7/0U5xBKAR9KfeB8yPsSUd8By3O3lwIhALJNCyL0YUlP3hYV7BUlyNWHoLzWTNMNI/0AOxzF45UN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61426,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLYHxCRA9TVsSAnZWagAA7nAP/3bd6o/M0qdmM9OtpMZ1\npBrtFDbSfkR9NHXFwDxGTZ+os58kvKOE54czSnMszw/DLRYLjcyeLliIzKwE\nEZXObUzXRS81lCBfPx7tNfeNiAUUIDGQkEgT0/g8g0JTwFFfOZd8+Mf1cXSP\nhqegL4/bFyLR2ttjhiryijndTvaepAmDDD6DDe+VLt506DN7SusHaQr8A/6q\nDd9hbihuUqNg1KrmZzNcVb/5ghphlYBZ6G49Gssvyu/mU92XkV5TjoUem9KY\ncfisQwCcus/KjVPbTGYMHqGY8W2cFT2tqaSYfBIcoggnYORwjKfH4lImInHq\nQmd/zYpJB0O7sMAQsvjhAKkl1K4cmw7Y/9VKfPaqr73Xi2y3PcKwrKp4OMMX\nQ/cFEjtRvww63N/f6mu9mwte6uuwyHib01qBqqx2kEC0jri/ztFrqty5WqAF\nGNc7wBYu3vm/n8y4dpRmkDGWk8fgBRZu+bSmIKkS3/YlCmcAhAEs81StF9tC\n6RAYngvkZRZruhHZ/rGGTcF3yH3exMGKYJenaUt/IehUEgpCjryqe1TiZngm\nLyZ7E2T3FgDlm2R4E9khm2aGMw7Rn6h/a4ZWkmkvdutrYmhIr9gRhRsWNejf\n67XFg+pNPpwSxgOE6oUKRYYSRRunmr+f9zdY5efbaWDAnJMxDmNCq7ZccUvX\n7LvI\r\n=WKIY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"62f8695d3fe5309c62418a1043bc6e8a176bc11f","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.15.4","dependencies":{"@opentelemetry/api":"^0.16.1-alpha.20+62f8695d","@opentelemetry/core":"^0.16.1-alpha.20+62f8695d"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.1.3","@types/node":"14.14.20","@types/mocha":"8.2.0","@types/sinon":"9.0.10"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.16.1-alpha.20_1613595120878_0.1455606870292936","host":"s3://npm-registry-packages"}},"0.17.0":{"name":"@opentelemetry/resources","version":"0.17.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.17.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"1087d12178c69fb13125767b363a313dc4e31621","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.17.0.tgz","fileCount":45,"integrity":"sha512-0f+RryxBh+m+8zrZ1x36CihK21KME/1pIFcPCH9095hDx9yHiAv1h3AGrR/knWpgA5j84Icr5ymlALarmpWSbg==","signatures":[{"sig":"MEUCIEHSS/vK2jARpoKu4dv1U6xQcEHGNYRCIqWApMeHMdhZAiEA4uf1eNvABQfhVIrYhCsZptRvKqNnp5JxPj2Ntx3ykUw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61372,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLYeYCRA9TVsSAnZWagAAOxMP/28xJohZomw5HUv0uScb\nzAuNBGtxfK6rqfTkTZPm+T7FlX0YIpSytgkTXTca+ek2fh/Q6A9koaNTVFtv\nPB+bc2KBFKWG04jCGIjqz5ccfybKXsBqfMEu7IfCtF4gUYq2sA8crS/34+SS\nOnCNLxFx2yaws982k8Qn9kLBvZa9TpRk/vW8/StW+Xj45EBLOVTZAQCjZh/D\nskswyQYfx6CG1Ms/+MR8DFb+KmQnpAqkgz0PzAf8uKKGFhC1QwEM/a5XlVW6\nYnCq5c3BnmJU435xc3pH4E9PRHb+ygPrztA4kjGRpQvNKZVBUQ2hMMOM2ZTr\nPoZg41TxLn0pPzxVUL3xQDC3kZqp2ZtB4A/oJYWI8e3MBLIQDpE1O2owk9TA\noh1pui/JppsZ1YqkxH1PW57VSfSxIC+u5Lnp6BJrnwS4XxPnGK72AkfrsF92\neb6GOnRVAHFyAN/YaxHD+LFcH75OsWf2H+hYxTSHlYtUhNu/5S5rGSC2Xwye\nOloAk5EXiMu1nWhZgBaSrADdri0225lzicwSwwbTbm/np4hA/qgF5jXQxVPI\nZtD5PJnihcllaQTmxM4NRHlAI8vF+bzVITfNK+kiNW1/+upqhCXi6lUoiwgX\nTdIPpfDDBKm1vcr2ROl8rO8JJArv6t4c3xnBDkEllWwVx8A7N+KlPzVKm91z\nobv8\r\n=ZP6s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"a91ea7617f288af632934334d0c8ecece318ce73","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.8.0","dependencies":{"@opentelemetry/api":"^0.17.0","@opentelemetry/core":"^0.17.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.1.3","@types/node":"14.14.20","@types/mocha":"8.2.0","@types/sinon":"9.0.10"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.17.0_1613596568010_0.7955386914400262","host":"s3://npm-registry-packages"}},"0.17.1-alpha.21":{"name":"@opentelemetry/resources","version":"0.17.1-alpha.21","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.17.1-alpha.21","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"16434846d6d36ac69057f67107fe303ff917018e","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.17.1-alpha.21.tgz","fileCount":45,"integrity":"sha512-Itd+V2M8QJkSWVGq1AhLiP0KjgmL9800FTuS9NK4Z4mb/Ld9tDtoq5E+YfdMIgWqsgEL13oFF/EJXRcqDtuLWg==","signatures":[{"sig":"MEYCIQDqAd5tGBuqq7ilRhtvLfpb9PKLQRIUJSU1kDOvh7leHQIhALpiWqlWcvxLpTJb64qdCCUqscVggp92lzdAUVw/htYZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61426,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLYfGCRA9TVsSAnZWagAAk1QP/AjGRP+Jqy7BzBVKHuxU\n3ziBFKuv/SFUs6jiLjiQEhVvzn5hfg27lQRdCDk4HjNntWED0Y7uLtlTP4Ep\nIsiMmHHFaMWOJj0pT0nhLnB+cO/t48ngQzHIgvrAaqm1g5+X7hClJrepH/Ct\n/mHXdFx2QVIRIkyBLSFrsQ+0j9W8Q4bnGtLxZlY0vrq3+OnCL/CR9r6zucau\n1DYiP9XnTIxathFkPOy/GYFINUxe22pylTK0ue03JMlAlocRsBI0Eu7Bm85L\nHzOD8CHzkIbQXWv+IvBP6/sBZ/tFtgiZ24Inpek/RXarca2iJdky1OF5OGrV\nICm3lLvcTmq5UVmnlPD8jSfIv6rBN1A7QSOhurH8iXR6X8CWsFXVHSC/K1Q1\nxdr2ahBXxDz8ObIzCwJ5pJ041BgYkIaFtc3tXSNSW7cNiDv8XqyqbXpPMnew\nItBZIOFocL9aDI2LgesCJKhXEPqQKdTA3zVEUcffm3dSgNlksCTF/oL0JhTc\nPi7oZgCNhoGiN/ao1PRgMYtRLqZngmd0o6RC7kP/XCRlELCmd5yC5ip1GzRS\nMcRvcCA2jHVOAo+Xw4DeNJXbmJexOJTCxMgBKxjaLu1knIfCVVH3Co8qL/jI\nYd06iIMABlzGoWvMetQ4G29GWpKBRNQx0wMwCvc6ItMxeU3/QYHicY2AB+ol\nt7B9\r\n=zMD6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"a91ea7617f288af632934334d0c8ecece318ce73","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.15.4","dependencies":{"@opentelemetry/api":"^0.17.1-alpha.21+a91ea761","@opentelemetry/core":"^0.17.1-alpha.21+a91ea761"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.1.3","@types/node":"14.14.20","@types/mocha":"8.2.0","@types/sinon":"9.0.10"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.17.1-alpha.21_1613596614381_0.1162112691999646","host":"s3://npm-registry-packages"}},"0.17.1-alpha.2":{"name":"@opentelemetry/resources","version":"0.17.1-alpha.2","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.17.1-alpha.2","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"62e29a2a2439858f8a8452aa2c0879e62fefce89","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.17.1-alpha.2.tgz","fileCount":45,"integrity":"sha512-BDxrmkzQdTgEkPrIMu9PA4cOlVJ8B4th1Giq80F/dqXarc+t6AiyMGndmRhPZs+a8DCxTYc++wa0+JKuL4yf+A==","signatures":[{"sig":"MEUCIAVve4kCixdHb7J77T/MbBbegeeGMI92lvcibImfrgllAiEAz/O31jrUlGVlc6jvzPTwH4xrvNHilX0XZJPgJ35WSXY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMUjbCRA9TVsSAnZWagAA/3UP/iN5BiW+yakgpxWfQ0B0\n8TNvj1ECTDHrhp5Egm0vcO1+dqzo2tJZhkgzo0W/Hs3FhAO5eTcDY4MJ0jZN\nfGe60HUZGgNL0+i9uWZ38gcRS7q1IELK3Gif26X5G/1aOagMIZVGXd5ryCYv\nMdfBS3gcZHcFZT2yG7lN+JZUV9iIBMTYb4Riq4vXmKSr4S641Ii6QQaEMrFe\nSFqolCHds79+fHTA5tVagB7c9ZUjXRPDBiLfG7dDPAati5aouKmNIek9QpZB\ntLMVK1LKjwH9h729o/5XQPnNdyRJuL4gJDbO16q6HXvHvaH4hLvKyS24i2lB\n2Lqj7AdcBs6cW3pQeBhBDx8/aCeWV0hzfwlmWlLswd2rD09sCQVV8byIN6rY\nl8tn1cN/7WUjq+MbHNfWHR+1d4adMHY8PI0643CHMqYrdGHS8AoyERHGqfdX\nzgDKpkQsdvQPyRagQiIygr7fhKRvv7+wZkmUNJJThIJt18xbih9N7ijVoJx4\nPuA5lCZP2b5XE2aJtgCbgV1huiv0SgN/CPQfRqd2+bVniZG8n3RP6W0hnEw/\nPReZEKul+bcjxVOEV5ywZqQim/xJgeDgekEjK1LuFB06wSDqBa2UsONJgJ4t\nbCiRmQRZNLTA+tbAC/5RgzkstvRHWY2sVt68V9HWPLfiDsBm5smmJA6vG36f\nALuK\r\n=HrbB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"38d1ee2552bbdda0a151734ba0d50ee7448e68e1","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.5+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.15.5","dependencies":{"@opentelemetry/api":"^0.17.0","@opentelemetry/core":"^0.17.1-alpha.2+38d1ee25"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.1.3","@types/node":"14.14.20","@types/mocha":"8.2.0","@types/sinon":"9.0.10"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.17.1-alpha.2_1613842650707_0.3028787398732038","host":"s3://npm-registry-packages"}},"0.17.1-alpha.5":{"name":"@opentelemetry/resources","version":"0.17.1-alpha.5","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.17.1-alpha.5","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"b607c70c641ea2054d2b499a2102c682730e5ac5","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.17.1-alpha.5.tgz","fileCount":45,"integrity":"sha512-nOSQXSVRyt5bLZ8FTef9pQG2GaRSNz0poptPNSqlQroIW81/RYaQydNhiq66G7dwXGbv74f3yuJzS+GVHtvwdg==","signatures":[{"sig":"MEUCIQCGmt3wyDe68SAzqbG8CkwcRG4jSLRFROvqIRo5rd+GRgIgcZoNbWD3XsogtaNozPA+xByrGMifz2KU8vsbITGMX5Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNoqvCRA9TVsSAnZWagAAf6sP/RihUHOdpqB9yflQ4usl\naTVZRiLJuo0gtn1h+cjb09enjMWB4+rkRR4/d+UrntnC/dNWRhL2pflRxhpQ\nUIv4vZZQ3wSKkRDvot+2WBxTrWZlXme6DCwCj1uOUw+Z5gNbtx7EQED2LMEn\nqLQnIycuAWtldr/5WmQwWeKSO5j7C/1lSDdHyT2bnKyY2/sJbECoYWYDk0XV\njWpOmhc3gzzgERWrJZSym4Lp9o5qSWNhgAnSAw5g1S1bJHOfH15okDDHcURS\nRL01IVviJ3iY83K1G3dlAtSR8l2UR1AaTkP8CGtuqDHtD+Mt+3FmFBy3V93H\nVOuAJp2618UjQg432xJF7lVkmc+eOLpbe+bbJrShmvRLOnF6V7kPx26szF/6\niUURB6CGk6dMUFxZr/tePbAw2EcybNzav0kXuc7odaXgVPXr6o6kOquAu/zq\nAfKIAeUjA1wQc+XKYF/vvrdICIJNajT4hVhlN9WRmDLIGyE49yCYjsn94Agj\nFqn92aSJqO7AlEwmNh3o3/DyLU0/YQliYLXD9RFwtoc5tFzKa3bd3PiYx8kn\nKvw4khro5BjijtElHQTq5/Eg6WmgKvR+CUFH1z2/soGn/Ivo8QOJvBDC9Qqv\nmYzGWX3HbIA/m/EieNnRQqbI0mxCd+w9l2QfmsbdtiVUwZTimUFocWoQtaP4\ntOHL\r\n=eHys\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"36ae1bd89abc2e2cc7f64e4a35a94d7e75a81d0d","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.5+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.15.5","dependencies":{"@opentelemetry/api":"^0.17.0","@opentelemetry/core":"^0.17.1-alpha.5+36ae1bd8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.1.3","@types/node":"14.14.20","@types/mocha":"8.2.0","@types/sinon":"9.0.10"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.17.1-alpha.5_1614187183176_0.7249522203235523","host":"s3://npm-registry-packages"}},"0.17.1-alpha.8":{"name":"@opentelemetry/resources","version":"0.17.1-alpha.8","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.17.1-alpha.8","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"3ee26c44de1f450a72b41443a830dcef21050042","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.17.1-alpha.8.tgz","fileCount":45,"integrity":"sha512-hWrh35/dKhnR0UQUFouZMXrBOp50e65udpyYFXKV+HOhOl7oz7NOtOU1nKBKf6ntJwVhHvJ3nKct86y3LjPqLw==","signatures":[{"sig":"MEQCIH1nS7q+sDhLM/2kV6a7E535VGKrXFc9/GJ5jL+2M9Z5AiB7lYoDGGLHukoo9+m+o3b6blMl5IZUPhhkTIZhG18MYg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPO5MCRA9TVsSAnZWagAAiukP+wdP5W2LpgQEzXS2rGED\nbmDfgkYTvIFlvuTrZ71zzKVzfKDE6TvTsHUUwsAn/2HwXp4qdLo9GjNtkA6d\n10uExEkzn8qZC6aJuUpszfWiKtl5VnMj3YsoIW/0sWieppilz6qQeoKzgHXJ\n2CuzUj2eK0UKW55XEUWEyxc/dZtQ36phgSO5i42Z/AQyCQTCuDsK20cWy1y9\nEQ6A2+93SaY6kWUif/ODrIlRRYiAAkleHuWgyqTQP91c0lX3aeYOVF0IbJm+\nYKozdc8Ta26Yxid4kBc1A183ml+aR1kjP6qx/5UEpvAJcFp13NHk3PlIX5Qx\nTbWDlQslbL2zOjCws1FHNxXEXu5g3Mj6uM7rYneer20LjaPMQPRdICXnPHxN\nVHAajPBx+Ty7AXG45rf3NeseewOjp1+3YIi8VL6hbqbYSvmC0IH7kA71N0al\n/2b6DVna4p6ywdhEzhhNrKTTFpxgVzCd5krC/lndzMBgs6HGEsdMUxh+eaj/\nOraQPeKZNBxZWsFP4JScr/lRYQqNbLmlaBClZhTdNdjp/dKCi7QXgdv+o4+r\nzXzDYH/KgaLU18v8lUcEUlRi7wFuLAtn42poF+E+nxrVA6nZpsUaBLkxRxLu\nrgynEGj7zMNzoKmsx+2TQfiC6YkvJJlDLPiJyYutPuUduAdT6cNTVBGcebKY\nvoZ5\r\n=W9ru\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"67f7e70a3de005484d3e110b06f6bbee75b6f8a6","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.5+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.15.5","dependencies":{"@opentelemetry/api":"^0.18.0","@opentelemetry/core":"^0.17.1-alpha.8+67f7e70a"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.1.3","@types/node":"14.14.20","@types/mocha":"8.2.0","@types/sinon":"9.0.10"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.17.1-alpha.8_1614605900236_0.6396749568087083","host":"s3://npm-registry-packages"}},"0.17.1-alpha.10":{"name":"@opentelemetry/resources","version":"0.17.1-alpha.10","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.17.1-alpha.10","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"d770f8942910de337e840528d8401c0fefd5ea98","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.17.1-alpha.10.tgz","fileCount":45,"integrity":"sha512-ZDI1oYMefegMU+xXvGhdu2sC2RR847eLt4BrmpavOWRhIbDXh1FLHpxzsGuRUN4PNEkgIENQ6vZhpCKZwch2Bw==","signatures":[{"sig":"MEYCIQDdS4Tiuy44+gWS817TbxM7oF3aXUEIHyk/S/f9NtZzWgIhAMgNLobuEATY+q8i94K/FayZJP9tdlIFZZ3iF3NYPqBa","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61385,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPjv/CRA9TVsSAnZWagAAfHYP/3Qy4uPE0D4n57yE6o76\nEz+T0fTuRn4S2ojMEFTM521OH14PFItTuOfIleOQPihRxMaHTIoPJMZWO3Oc\nk47ItAKvK/uOewxn8J/N6ir44svxM14wRnRPBI+4/l/37Ma4Q5evXLGzi8yq\n2+JGQAhzP768C/xdzW9Ci989bG1QHoFHyn1fPLNlykGFwsMIhWbfQwr79YkN\ndUdY0PbyZGoGlxOOb+V1ALHFl9AHSSWmdLgnCKX+UTfYojLuFEuLM31i8RPF\njGs15f/U/pPkf20buzk7RoWRn5TxQgnfA//ISmQwmQ5ctBS7tszeLvXjT9Im\niLfoxOO7T/12/dB7if9+ZhzIAeqav+MZrBAhq7vxgbkzf4QdX2rqidjr0Q59\nYI0frA22uq6JMB92wrsisMthwqKwbo0qo/fmBoR/dKMFJCSFVSxFT4ht+b1w\nI3BcqOH9CxFdu5xcchmxQa7spvCVdJ2to9m6RcFPwN7PPvAzWQBHHrnWhqJX\n7n8hjc6tZMPjhTIqsgRmNP7pLvCon6HIybHy6Z4I96PxKx5OzUWLM48gV9BT\nHY74FtSmKyxAtr0f4oYW9BhcwuF/RElaWWkpOaMKvkWJbTuB6w7CdMeYJqPr\nXP5NVJflEVEfU5B8zj8OO+aax7WKdjcc3QZCcfTYs5iH4pa8WaUOL7PTVrua\nBVr6\r\n=tqo6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"4c609aa13c899dd2b7a963d2e3e491bc35ffb742","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.5+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.15.5","dependencies":{"@opentelemetry/api":"^0.18.0","@opentelemetry/core":"^0.17.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.1.3","@types/node":"14.14.20","@types/mocha":"8.2.0","@types/sinon":"9.0.10"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.17.1-alpha.10_1614691326573_0.5257449777294001","host":"s3://npm-registry-packages"}},"0.18.1-alpha.12":{"name":"@opentelemetry/resources","version":"0.18.1-alpha.12","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.18.1-alpha.12","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"2c655e36b42388407e93dfba8824365ffdccd913","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.18.1-alpha.12.tgz","fileCount":45,"integrity":"sha512-0qLyL/MhqKaC9IiZKTBNrXYJ03YLzaF1oGoQHU76qVqPm6T6Trois3M8EqmUq69yGe5bP8Pp04DHIcRiHmVhgw==","signatures":[{"sig":"MEUCIH1GwGwUf1ct6rh5HuFFupDnh5hsM1eQnRP6/W8EVIKUAiEAp7ja0wurkLyBdljgM7iycxlSik+ToqHV6pgkXV44P1s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61403,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPkN1CRA9TVsSAnZWagAAhkkP+gOs3ulMtW3jp+/nfd8M\nA0AGV4cwnzbOZrwLz7BxgdeEA5+dN8yB/IGRj7DOr5KbFZHuvj6sD8sjbmis\nTK/RdjqIT725Nj1bIBntbdB7Hx1OnxVyF/1kr8iOipCCNxPslG6072LYhfCc\nWN9sh6K8s9lTfXAcVj4aoTwC3FrjSj43YDcAJG9qLEWUsfBfuygo2mP5C1dt\nVWMZcsqjlT3cx5fPqxDLS7+QsSZaxH8SjSTB2uzuLpJQcnGYkS+Y9iEPlZe1\npD83kJffcrhknb42AXBV6ZA3ZE7oKZOnFj+3Un17X+gKLaRCHo5KzMxFNVPW\n3FV9iuy9uJHJ54nzi+D61IVy6m82a/2NmwK6Us9cpcjMTxXkM96rLB8HYE3V\nCSeFHDX2BKg4qfmYAylgBueIlLuHD45TekHMVwpFrfkMK0NPbjewxBVhGYaB\nJucrcITLfJye9MLIyLdX9HDkKwQEPe5/tleTXmg5Atk4kJ/77KRNHYbV8i/J\nBfjr/dDZAFu42goAMrqgn2CVhl3qbT3McLfl7yTwHmumUTvDVZ6e5pbZW2JD\nXNHh62QITf+87erHebXGtKIPysC89V9TBeQ+4aPQMRlQSJ69lCSSGz4ioJAH\n591GbLjztHYFk5t19EytnTUU5ECX2suDrSptK66+vJwKhW10JlJrt+nRdrrw\nNIfr\r\n=xKxz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"6540b54a8bd49746e164ab730269188237f89b1c","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.5+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.15.5","dependencies":{"@opentelemetry/api":"^0.18.0","@opentelemetry/core":"^0.18.1-alpha.12+6540b54a"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.1.3","@types/node":"14.14.20","@types/mocha":"8.2.0","@types/sinon":"9.0.10"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.18.1-alpha.12_1614693236720_0.1501374086336833","host":"s3://npm-registry-packages"}},"0.18.0":{"name":"@opentelemetry/resources","version":"0.18.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.18.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"fa6caad38efbac1ace424145f276e57ca12228fe","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.18.0.tgz","fileCount":45,"integrity":"sha512-Mko4HpoI5cCYplhSyiCuMFi0QEG1Nw/YwHFyAK+A67r+sgmo1wVpM6Pengb+XlxJrrO8WgmLsDS3RHqoMWhWNQ==","signatures":[{"sig":"MEUCIENbn0xylz71NVeeekyFy1Wy0DBMLTu+oK92gV8h8+MYAiEApV41BtoEIp/ZtYB3TuVsDzrKQF4d01LdE/xRe9l/cI4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61367,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPkUiCRA9TVsSAnZWagAAhZEP/RLAZvnvV1qulPVMYxQ0\nnccGc0n8yoGaC6R8szMCcDUw4D7cXAy8TuoiFuomiliw0lpkmDycxScL0iTt\nFm6ietRPqtINDfVZLffRkr9a4QwBC9Bkb/JBFHXsi8zfIPMtYXx+lgkBpDrh\n89RKK0KOPaRwEUSdsrLsr2QqC9Cn6J9zjsPwwFYQbVYFrfQeM/KBYceb96xZ\nY5h8AMzO+gmYvi6RD0d77A8HZ0YHchLnbX+r/B0YHxwiztt3p20s20rGBswU\nj/4gili+bj0AIMF+dLImNdsyNTUpdSqOt7PH3NBAcbImwKhGOSwjlYS3XrIR\nrCTCetcUeU60hSgaBf8dcAdSfOJvxuTczPd2g+GooJx93fNIjtc+cN2833qw\nDlI1QzyCU3bA42KyZDCHUvr7mhACUOJbDRRNxQKfIWxSzz+OVXQISUBqD7Cj\n1PjbihALG2uZsnP/pfdS6vwnjiKvCE8yF1mIw+TEVgVo6mMiej2+V2plrAfV\noTnuS1djBL1WuRS//3/DguK/YtaY2ovwaaiXilTU8nIWMtrqrTl46W4fAZwS\nHvoJASi5Ma/qDjNhxRpzCEHNnGBpOpd4WAU2fuU2Ly2OodmsBVPJQbWISjyz\nWrskwiBJX9Uv9q4LW77uWqiKUyhPWAe6JAhDmGVCw3l7oPmVhN3Zc92uLXGx\nDTKo\r\n=ncSs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"6540b54a8bd49746e164ab730269188237f89b1c","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.8.0","dependencies":{"@opentelemetry/api":"^0.18.0","@opentelemetry/core":"^0.18.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.1.3","@types/node":"14.14.20","@types/mocha":"8.2.0","@types/sinon":"9.0.10"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.18.0_1614693666403_0.4527923379880714","host":"s3://npm-registry-packages"}},"0.18.1-alpha.3":{"name":"@opentelemetry/resources","version":"0.18.1-alpha.3","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.18.1-alpha.3","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"9e897db79470c42b505d922c0a279b79dec7f5ae","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.18.1-alpha.3.tgz","fileCount":45,"integrity":"sha512-r0LQHv26hpqmCjYDwJSy2RHLQ54uy7qeeAc2IMEk0hX5wO6yt1ElzZslNLv6y35rt3nFOqVK12bCieII+mvQJw==","signatures":[{"sig":"MEYCIQC3Z7py0kmFH/0ZH44+NN43X0fqvB+5OfrAsZ2jnoTvWAIhAOO5Atgoa+BNRi64pfs91a9mw+UcNCfxNImwjMsuqmAP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPo1rCRA9TVsSAnZWagAAav8P/AiM8DG4GbSwFd1Zws9n\ntZcCVSi0S1imarInkGJ/Mi6HtyOHVZO/S4QAtGXPa0S1XbsjHdet9sCHbWZ7\n+I3GCskz/KydPSZEoHoURnS6oOLD+5moaF3UBaexEOgkx1dbgHDPEbLozJO2\nAyNq0M9GaRaSB6iMGIvz2Swp9FhfHNtzVtqn+wCca+V2sArQagaiMm0Ipo/P\nPR5d9d2M+lkPrpRKGzudqjDmxb1HlXK2i716shNvkhV/V+OuJYnC7bfmzkAB\nwcHPdgHJHuqkr7w785Y84LYuWVPzSuewKVYpUN/opkUATEAC3lDPegcpK/Fr\n6I77j8Z47GK75IbFnHFHuOyBOtgU9H1CwBDClKEUnbA9/1Udphe7k/AQQxul\nYrjeqJBOUs8/cR8KcUx9YMOfld+SWI52ULFsMxfo84iamxHCEWnYxZXNrkyE\nCORj8yZ9JKrN1x6AQ+ThuUzoBc2YytyJh5sQr9ismlxMiA1IvaMyk1EKIH3R\n02TB9IEzuPzokMRsb3kAYAxpMUHsaoGmhfVqnpDpsNJfL566W+/7kTO6jkmL\neN02RuaCtbbmdy2yQw8C0hgJ8G0A8Qtg/JJMGRuiIKpQOOBlJ74V4BPV8SzR\nhpMHtIGOdOAE4ftrWyCLByDkktPz9IHBZ3RjfzYIOe/+JfibDfGhBfDb9UGF\nJoIS\r\n=90IR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"0643642f61de5e2bfb8942ce7b5dadea643cb295","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.5+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.15.5","dependencies":{"@opentelemetry/api":"^0.18.0","@opentelemetry/core":"^0.18.1-alpha.3+0643642f"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.1.3","@types/node":"14.14.20","@types/mocha":"8.2.0","@types/sinon":"9.0.10"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.18.1-alpha.3_1614712171221_0.4872483930994971","host":"s3://npm-registry-packages"}},"0.18.1-alpha.20":{"name":"@opentelemetry/resources","version":"0.18.1-alpha.20","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.18.1-alpha.20","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"b486eee8b52fb41a9ea1fbf525df88353ab5652e","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.18.1-alpha.20.tgz","fileCount":45,"integrity":"sha512-FzN6F1hY8sPM/mejj7VINYgvyhWkW6CtVjKt1SJsFc174QBsg7v7fsKNfKoHTJFWzJnxLCdQf37kcGyhI0F0sA==","signatures":[{"sig":"MEQCIBgZt/5onqVqHfnkqAGqhZiID5o4akG7TE2F9fGYv/PjAiAIXWLmzhuPD4mp1xGseqdO9OxKKVkuw3AWO+YVSt+p8Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61403,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWzpeCRA9TVsSAnZWagAAGvAP/0oSwitEuGdojzaA+i52\nbbLBEhTVbW4N+T1iequGoYOIFxfzRFqZkNkJGtQqLyAHPsTr5JVL+A+6czTU\nGEMnqYzK+wKZ39rxCyKqu87vGbdjhHp3G9ZmBtu+tfLzV5DIAJt8ztDbYltz\njV3B0w9VAV77RIuXra74T//PzfMlhRx28AQDGZX10Qsys84DFKCejxOuS8OU\nBPuKWFJsKa0bKa1u2OgfOj6DC52ecVbxxsPMPhRz9X6sYEpuvkt/5aOrLGzG\nr8tSyW2gXh215j5oLC8lheKEUI6WXsHUmwmaDd//p4Pk9U4rPw6VodwO5Cal\n5v0CYLZSSW2dBgqCc6PnrdO4NcVlkxBm2ltZ4qY7860EJ2C6bsqc/M4nl3+G\nQcTVEtTXFqHJ1TJMhUtYqw45+1f+DSi+yIanInbw0LZDSgulOJA8Tk0rLeE6\n9TQkuyd9rX7zfD4vfUG4RDu8si/rLunYgNQjSEV+rJyFu+nho9ku5xGMAgfk\nEWIoauNjX1aijOdKdMa+kYfjNRmS+zB7WXuy1FSzZBOE9NFrmWqkzJFeU/UD\nR9gjU8eAVlybE7H+5FXunLQwL8eAtXmxbxHYTrXSb0wzJA1z2VPsg3c6UBEy\ngw8sq9ksP3AfzVodroGDgGcbOGs1kva705pP5cxVQYWTc0vEfUZhF3sWTFho\n45sh\r\n=EM11\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"24bcfe82340e02e605c5c722b0f955da50bf82cf","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.0","dependencies":{"@opentelemetry/api":"^0.18.1","@opentelemetry/core":"^0.18.1-alpha.20+24bcfe82"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.3","@types/node":"14.14.35","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.18.1-alpha.20_1616591453968_0.6546071664972919","host":"s3://npm-registry-packages"}},"0.18.1-alpha.21":{"name":"@opentelemetry/resources","version":"0.18.1-alpha.21","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.18.1-alpha.21","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"7c21fbe6f4997044d0c52c9c6749a3250339fc07","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.18.1-alpha.21.tgz","fileCount":45,"integrity":"sha512-fZvZCltfiRDWStHkQCwfvPFSOdKAvMAjEouDXWoEA83vU6OJqhRVoRwhfLo4IB/jhtOiwcUAQFAnzTeNq9arGQ==","signatures":[{"sig":"MEQCIHFheMJBTdsiGZ04chI46UWFCkfRoRMB6Vf3TGvlTDN3AiAP96PgsB/HquzhM+NsuMOVs3ethgP8O/FgPM3fff3GeQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61407,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgW0jqCRA9TVsSAnZWagAA9JwP/3TKownKlbx8bD6LgphD\nkOjy5qPzQNWoWjSBp8RBhN1zgS2RFSQ6ShcOrvIYoMpYX5LyfGN3Am78ysUr\nlj3DMf5rkiinVcPON5WeTwYQQviz+3dqQi8USkSjMyDhs9CGqD5JSseqFAy2\nu9+bAhtEg1sXx0lh5vc680Jrumae6HJzmsplRIUU9TWTRCMxDBJKreWjJYwf\nQju8Gpxq+EvtfPNEwmpDyuTYzBnk6MdIS2CRWuQjWo+BHWoAUc5nAaxHZQag\nQnOWNY/50jQPMBYwmdTE4T8GjRjFSyMqowzBJEiGgdFn97OlKlwm93LiMF2t\nm+50GfAmm23gDiyLBxfzeI0DuE+N4dFzLcu7vYMIIzDoZr/CYk+E/Ay3ZTAq\nMqoWzlRRTJ/fifA/5r/UDLyLfMv+WrxBIJ9LEmK5TDCvEvrP+rMY3ATZyQgP\nVWSrjLdqqbkpsQDhCFntwsPy5+HUvvxNI6Tm0VeXjuEOwCU8Jm5bPO8UdaoS\nvTRFVL2IsaGXqDnMo+0ukFenpeNuMhE1hoHS9abw+B1BC3RUXEzBL2iBAa/p\nH6EvXvLETtsHbyVXfAQ483zP7M3/LVx5BICoOQOl30E4Ps4taznKFYaMW9Ob\nwOgowXb4oh5nS92SzMaH1ez/tA3/YLXNwwAtZTNPTyx6JDCBTesP/yeq63S8\nYExo\r\n=Hvju\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"8010ac2fcd0c658c0a4184cb0f5d8108db3632e5","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.0","dependencies":{"@opentelemetry/api":"^1.0.0-rc.0","@opentelemetry/core":"^0.18.1-alpha.21+8010ac2f"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.3","@types/node":"14.14.35","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.18.1-alpha.21_1616595178190_0.01635822980542545","host":"s3://npm-registry-packages"}},"0.18.1-alpha.23":{"name":"@opentelemetry/resources","version":"0.18.1-alpha.23","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.18.1-alpha.23","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"5414aeb3cd2f826fe923c00b9af081563e03919f","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.18.1-alpha.23.tgz","fileCount":45,"integrity":"sha512-02Je/uRHfgGF2WK0wkZibubV++aPvQmmHSKGOIL4keUEX/9gIFi6MckfYrOa/xZi0gxNz9DvFc9b8r40xPVIkA==","signatures":[{"sig":"MEQCIGllIx/K7c74/C7gmLzKSxj6r3BZCAHsRXq+Z/eoRzyRAiB0PlIwdoAGFuxSfYv9fGlZ8lBkB/+hMmSh0YTIjzGYpg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61729,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgW5A2CRA9TVsSAnZWagAAyQUP/38pMx8L3olOaFaPP4OA\ngsChtvmTQe5ttMxlEr6wGNeqrjlQFtFBqDLo0benddaEBA/LdAbC2O9pN4O1\nPgcaR6gZoZRDYOZgxJJCqKrgfWDX3UrsfGJ3orxMDCUxrQ+k+krw9+XKYMSD\nar/W6qL+ndUO4OADlZXBhhJRwcYXJw9PfTJpKRtJbYZCbfh8BlSGtXEeSs+8\nv8AjdcunneW7nbBThOpJn/9DxXboygsSbVMynIDMGTAQ4RVJlbewBoHdjWRq\norzVrXhUvaI6G8/AIetJAB0zZTCjMX1DSJQWYlRH2HRVm9oAQaLQCgPdQXJv\ncdNy9Z8/ZT8nPZWQr2cUTMI7OBefyoO3Y6z8z/5OPQEpEv4w5uozZkGuK/m0\nJMTnqY2NxJrPts9QShaUVgNuC37GoTE18xd23oZOuWgWe9ohEMGYmpjL/HdE\n9bQj+RDBGJ9ypJu4JF8kmNVbQYhC2chqqOa9HWbA07+hJozXCPyaVEz+vvxh\nqwI1jOJP1OeM+HbcYpyet7+ybd8KXSQ0oCJZ5vJ1LBu/AfpibobmHjMlAOcs\nL0lV/2JRRWmvOTlBZfTGtcR3RkNw0/qksVy2/ppkRuHQgqSDqkZorC4Nm/hk\nKrFEs7l7qXsmfkISWs5e0mtTsEoVT7DUYtlHXgh246KtbjboNOn2YhIyoDbr\nvKTg\r\n=3VbY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"41db733e60b5e4f981be94eaa56e4fca24b539d9","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.0","dependencies":{"@opentelemetry/api":"^1.0.0-rc.0","@opentelemetry/core":"^0.18.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.3","@types/node":"14.14.35","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.18.1-alpha.23_1616613429748_0.44277376873261565","host":"s3://npm-registry-packages"}},"0.18.1-alpha.24":{"name":"@opentelemetry/resources","version":"0.18.1-alpha.24","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.18.1-alpha.24","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"9b894cdd5a781fb1cf25f913a5b27da86dc438a9","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.18.1-alpha.24.tgz","fileCount":45,"integrity":"sha512-1Dhfyon2dEda4gvH2fM2o7HuEdBdNYBqCne4REQPFKJDD3LgRXeCeMRRrIOdthO6xy0U8WegffhR0GRCasghng==","signatures":[{"sig":"MEQCIE9ttF6IQ1sdTF96XnvJjcNL5v5a2QpRxNVzUBa/VrVmAiA9iqk5zs0Sj41ZZCwxGPzewRUrMiplbEcf4KQ3mR6x1A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61762,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgW5VACRA9TVsSAnZWagAA3nkP/jXNl2F9NtsII5or1fef\nZGgUic2Wt8UWWrvlNTy6hlUmKo1dTw7ck9bQRxt0ly2K7bnIX1VMcAbeAXBr\nOkW9J9uB3Y3a4il1FVWvDUeIxrFSQSMSM2ZtzDHuYL5k/Xxg98P0ApSgVmO2\nOErEmdgtJPw67KYHGHhxaaqZf/pViilxbhBRdRiKVeDSWES5RTKthHbLIWXB\nalzzJ0Y3w4OgVth0ZmIR+ve72q0/+8lA9GX5RtoJKaaxspDLNCI1KoBjuw8n\nXsH08rstXWs/PlUFukwSsbtQEaVkq15Q+NTCn78kajjA5NQ7wjsvxa1j+DLd\nAB7LTZnKGQPiEzZlEL/fCntVewYjzPdj4Xf4Xkm0kSWlloQy0Vgkz0S/jkUn\nVw6a5vh3lUNE6i/+jtqUlWFJkXzXvTbAbH46RMWOV/gqxcEBwRNgk5LbLfaQ\nolWjJA3MNLv0Aai/nAdfMlaTzq6Fk58vxNfKgCPJXbCovNJiANpPwTVtwy51\nAR4zz0BFpzMPLUeBTduUXj9WygNgOrS3HYjTnGOrr/6ODd1CXUVTJ4GUpwvX\nibkJ0ClCziGrwWTTWfJe7ab2gyFy4s2U76dvTfjfr6cv1HvtOEackcVkmdrc\nwRqoHwtlK7RP7ML0NYTqeM+ott85gHiz24AjChXBYrdE8tAdKBQ2ep68a5HR\n0FJx\r\n=KrMX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"69f2d3c264497bfdefa2126d0865ca56ad5f22a3","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.0","dependencies":{"@opentelemetry/api":"^1.0.0-rc.0","@opentelemetry/core":"^0.18.1-alpha.24+69f2d3c2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.3","@types/node":"14.14.35","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.18.1-alpha.24_1616614719607_0.93478343837367","host":"s3://npm-registry-packages"}},"0.18.1-alpha.26":{"name":"@opentelemetry/resources","version":"0.18.1-alpha.26","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.18.1-alpha.26","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"8af0fad030dc824c91333418c656ba38140ad12c","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.18.1-alpha.26.tgz","fileCount":45,"integrity":"sha512-/78T2bAZckAYdSin/H0jqmVIjXwpXKUHiiwitCbOXjMGwDYNFt7hgjli+2zkrOimeg5trmRDFBQ3mXY+lUbvsw==","signatures":[{"sig":"MEUCIQD9Gp5YYdlRoMt5nPGxCbn1CQttKmBK8hGrcKgiPzM5kwIgR6P/Y5AvbP0f72+mfbnDot/IHYRUIvRjLx8Y7GQWqsA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61762,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgW5xmCRA9TVsSAnZWagAAca4P/32mimsYreqkEQprHsAL\n1sDHoakeJ6Sszew69o0HBc/ASBYEB9K1L6HtQjGuFRY+EObtjcwUxa63JWLV\nFjBxBfN5882vK4M827bZDTztZ5PfE9xcaEOHqEq9G921U8IjSxG0U0QgKv/A\n18DrNyjSgiAru6BSjkLXgBiBza4/XAh/gM/QSlTCLW+NcMSewS7sVwn4wfHh\nyWGeMsbWmDCeOth6OkxB/ZiZaaO83FEBBDvAtY2W6P6Mh7h2N1t/q19kzq9T\nBXqU3RnBTcH1IhRd/b+arNp4T/T52smCJFA+kYuNb1iP0E9lq+YLuJdxGFSI\nE+JI00foML9zpj6uhibItPyqdqANJ+ZDg1AsKt6bwVD+1XYSOmOlxtJwbQPo\n3Sj2BkOgWgnLhhZYr/nC8Ll3Q6WisuA9rw6Rub+/5Fbc6XYl0rCmIs35A5Kt\nFTEs+WGKHkQ+vlZZZIq+hSpWvuW7QECNbP8fJmVLaj4PiWdPRvnMmO9Cx8+j\nilh9p6L4FcoIr3ISDzQGPN5jLsICAS/7fUHD/zY5DMS6xlT1Otjehlq9b3lx\n4dypQFS0Mu8lbm65SFslsSYg5O6KLdijToCOiFzmmj3xM47k/2WAdoT5XTYB\nPv/OkrCQIg1shKXxEmXLTn6v+AQf5LnC47LfAhNFM+HQmAm5iyaNVhD8lien\nRKps\r\n=cd3D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"91483873ae3e3e8a686dbe3b7711a233167efba5","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.0","dependencies":{"@opentelemetry/api":"^1.0.0-rc.0","@opentelemetry/core":"^0.18.1-alpha.26+91483873"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.3","@types/node":"14.14.35","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.18.1-alpha.26_1616616549634_0.8979420134355596","host":"s3://npm-registry-packages"}},"0.18.2-alpha.81":{"name":"@opentelemetry/resources","version":"0.18.2-alpha.81","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.18.2-alpha.81","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"c6ad3ad1224d4b11a2c3caa1a00536351db3ce2e","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.18.2-alpha.81.tgz","fileCount":45,"integrity":"sha512-2tCsUFksuxPtZtPKj8+bSdG/VH0vKwHQbWChWgwkBR9IdHNkzZUWcnJDGOWd24I+xb/EbfC9LSWo6SWlXp1qcA==","signatures":[{"sig":"MEUCIDea1dOOzJ1JyGyG5/o49GGLK4zPs0M5UtFxwYNzc/tJAiEA4c/non6B2vl1Kc8Z2LjKVgwriq1myHwikPYG6Kq4C/I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61762,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYi/qCRA9TVsSAnZWagAAZl0P/0zJim8aKjTn8E8fsYec\nAsJ1vgp1NT4abi4d8VgFMHUUf8/zxVkgO1VNJet13mh7de6o7y3CHFQyHDFT\nmHrdlvlhs/Xnf9cdLREkhXAI1PemF0kVj9ndzp33ajC2lQ6ao7QgLHnJqdA7\nFoZDYwPQO7uY8txCKeMh8Qh9LYS9Iw/w/vCvXAjiyZdwT/9BmR0QQeny0Ds/\nb4ah3zdfh6u/YNBlVK4EM1oZN4SeCEyFEaqSQfoTFWqw/zu2l2wdtdipcpqh\nOZ9wbwHWGYPVfsa6kxaJOxai/1V7u3VoB0XsHi1oOlH17kW3xlrVk1jzniAW\n5m/+HGhDDuPGpUUHanAiB94buTH7msp//rUHrXA+nE6bblC4pY+XOlkRT0TL\nmvpShMbAHbXqHfUAYIvEdW0CSV+I1TS2ApfmTTV8b7Qh507fQyFpWs7oXOQ3\nEg09ckruf+rUZ2dMHpaFmGe4d8UaAF/7Ysq33C8aOP+SmsUfOs7cwQe++KS0\nLjjAbmJzEJskO0yGS/yOyq2V81lpGWltxJgpkfWZhue6htcOYZMnkM4EK049\nJ4ipgnnWuGHN3VGKBIXF47TochcCEvMNXmTZ6tG02QElAhZrR0Es4IriGdsX\n0nQLP2eIinqY5hkVpgaKgC+YrhF7nbLCR7yijjICGutwi1fP4iIvn+0ov+Vo\n1xhG\r\n=fO7w\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"e369035cd228a5c8781069a99322c5b938061d20","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.0","dependencies":{"@opentelemetry/api":"^1.0.0-rc.0","@opentelemetry/core":"^0.18.2-alpha.81+e369035c"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.3","@types/node":"14.14.35","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.18.2-alpha.81_1617047529653_0.07050396473102372","host":"s3://npm-registry-packages"}},"0.18.1":{"name":"@opentelemetry/resources","version":"0.18.1","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.18.1","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"700065efc8b7e19f41ad19e27f7d47fb0ad7db18","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.18.1.tgz","fileCount":45,"integrity":"sha512-Eq6vF93oeZ+Cnz/FwzYl6H4tRv/nn7ZRMsMUNnzR/gGcvcUwFhBDyoG+Lx3XJ/4M2CRlY/67jyp3mJBH9aRWsQ==","signatures":[{"sig":"MEUCIGWLh8rFRhYH/h5lpX0+bm46TLktWdf2VNtxHjwptjiJAiEAn3WtwCqzGbB1DRPL7XLVjDV8fjS65EKUP3CLo8+bUPI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61726,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYjKtCRA9TVsSAnZWagAAF3AQAJ0Tr9IrYtCEDyUaqX3M\nZpCoi+TAP4NpE80L6FJcCFi+UTP9uPxjemErnQdw1snPThZ4vd1kJbIjwRpo\nOb186e8429pvk8PQO9cjFjCUhJlRb7vXsJMOvoSN3BPUosuftVufoL8Ww62x\nJDnrMw8Fmq00iLs9Wf/0D9tpLO7bcWpJPtjIZ4qwTiQGL/UlCHq73JUcofe4\nOfhb2cfk1xh1DNCW8D50dBAA9lDUbe6QqkAB00xcsDH7jplKwvniPuFGf7ID\n+YPdwxzYp3/1oZlyYFczujVeK6MAhPxa1/8tJdfwIhO7zoHMH/iwH3tQPw1P\ncMMwEXA9zB5QHwOLtpnbHUNaDdGU+ACnnUYQgYdx1YsCpE70sbSUJyMlhh+M\nfwyeaTtur/6U78bgJkEPyDPI7SFYdSPbyntcHbRtV55aHJccv+ZtaqDnlPxY\nsNUQ4hzRBgT8GNn5Mv2IYrW0E9cJ7wHuzPQlxn2NMvCsOjzXNQF9id24a2K1\nN6CiYZbETKpuNP25Ap+ExqffnGHN4mzwPXnJ+5cObEYvoYfCA1CJR3bUtSIJ\nO1oOlk2+X1Vy3m7wfXpZjLGMsMPnbip5Ob257iXKpf2+/UWRIcykl3mckz1U\nh+PuqMQVRAtlWuWJhUi9pYn0b+ht4AxZiRKNVOtPFpWuKMlGYVm5WGITZl65\nC+YG\r\n=og9s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"e369035cd228a5c8781069a99322c5b938061d20","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.8.0","dependencies":{"@opentelemetry/api":"^1.0.0-rc.0","@opentelemetry/core":"^0.18.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.3","@types/node":"14.14.35","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.18.1_1617048237055_0.5390151419391065","host":"s3://npm-registry-packages"}},"0.18.2-alpha.1":{"name":"@opentelemetry/resources","version":"0.18.2-alpha.1","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.18.2-alpha.1","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"10fccc68085c7447cf2e6ab0891f83ee956f5fa4","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.18.2-alpha.1.tgz","fileCount":45,"integrity":"sha512-AT/AiwKQQtSQ0q8feJLAeAvWqxXyV8xDsGJJXiOyv/WgGjid4EXDfPUdUFh4545JZWGqA/oiY+u4IfEtP0TD+g==","signatures":[{"sig":"MEYCIQD1TWizgrS8afGEJnM/4z00g/V1L2tUal+DVAolj24guAIhAIoTQKIA84k5h1YVRctOaUL/NctU6OwjJeWCoE2SXxG0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYyJGCRA9TVsSAnZWagAAEeMP/RBoUBLvSek6b3XONdEP\nsNvOS+KiFckJNzRIvX3XW38la+hfWYyQrXOrihXIIA/52kAIihUM2fFXJN5V\nbInBTxigdsM5af+vNa4DTkVnaMlDMxFJd0ApRkCj/up2PdWcQ3dcz03sGIh1\n4Zj3f5BFgAKY8DtajRm6/UbwTjL/wPhlWqLptSVYYVNgC+Lf24Geuc3dNT6/\nZVMZQBNGnJOWleHbjQPbXx/yEPVTEHh99YqJbIcjtHwUhCLNLmjyQqfaBIHL\nHevvPY+LLIaS8+E09eKYugH2dglwcpTEZq4C8uK7IXCZgiW2rjfMbNXtc0aj\ny2YcTHCylKzs6CmTASjCAdZ8RWXzRPrg4jUjRAAZVbi76sn0tWyrSf8UTD/Z\nKXutWR0PWef6leVvNnDZzQ+FvbdA37HGXD1CkGuDKHSzdFcXCYEDb4Q+Sebq\nipovLvsKKD7aU5ebxQQicUy5/4jlqz4xVKbF8Z4aVFj6XJuvMB6ZcH7DhT9h\nJq/v7JuyRiDmIxRdueMdH8S/zl9Y/ny4QnhrWKOxRejaP0srGbm7eEKglNxQ\nmLm2NmFNtDJd1l3T27qimaflTo2jzIPs8/0B/jX6cVmUEaFNlsyMdov2e0QK\nG3B7+UwAbMqJEo82LJOQ+IbpwVDzs+8CyHG89d45zhQ8XhJ+pCf00WRUYjg6\nMwUc\r\n=oZ9e\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"54857c012414c05bc83b4a8da224492c98abfd46","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.0","dependencies":{"@opentelemetry/api":"^0.18.1","@opentelemetry/core":"^0.18.2-alpha.1+54857c01"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.3","@types/node":"14.14.35","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.18.2-alpha.1_1617109573750_0.7215042050613902","host":"s3://npm-registry-packages"}},"0.18.3-alpha.2":{"name":"@opentelemetry/resources","version":"0.18.3-alpha.2","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.18.3-alpha.2","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"05af8b24e0e5f7d68367dd15587e0c7b22a07167","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.18.3-alpha.2.tgz","fileCount":45,"integrity":"sha512-ejGTAZR7z2BZPQjRAz4cYQkzhnp6L8ZEfeFxSqsRu5bWKGjlaW6dxwbcNs8p3sqcqejn/mJWD5krYEOoNMxYww==","signatures":[{"sig":"MEQCIEZYquHcZMgf8zbHNove/bX+p7262kx0tM8zfQoCSgoVAiA3hAWvZQe2A7xa/UhvSCywfVXj4g8TP5Z3N16GEOs34A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgY0NICRA9TVsSAnZWagAAhG0P/3P3OpCR3A0XrafPfPng\n8v2XDQNevDA9VZxPpJh18/2uJmnMaWxTWta64TSpkIXEf2jevtr0uiVO7Rkl\nBIr4TUgGM6OkAFARv6dRsqZth+RiYCBQRooP5/eZIPZa2TwkS8i7xZy3RSab\n4N+w95kOWQQ9PRZx/Q7P0stHKY5EchKSgBVxSSwAvbagP1Y03Zi9yfa5CYut\nlivFKQ8agB8+GdfzmnDsUciKOfEwjQWzhAW2r1PJR5B7Wa76xIfHvrM/ckto\nWUkQPzaR6YI1gh2jAqXOYwvRzC+eQPiq6gXNAOK0i2Rx7mr0bQtBn//cOSX+\nWPDyqhO2zSiA21gqB4A7D3B6jFTXdM8KXVtfJbPHPR6R8xWe4MdqmV45eDwt\nUJupW89w61QOSc5dy7NarmMRAzd/vNbvvAMBidkpdjL0ksfzZe281Cgdvlg+\n7JYYr4XbBK20Gz3qcap3RlM2L64Rb5b1+QsfcdZy5ff5lLWaS2bWinvDIlWA\nhxMqXipP15XNMiYBoBaFtSIjhgkMleoW/OCSt9QjmogC3EuD2H1Kzoka1KL1\nsw3LmGZULftCv5sd7KQCQ1Y4VZ94JG1EOIMr+agYl1dTsd0FZ2uYcAAUnxzH\n957yCFEWehGqdfuZehWoIWjI6U/ey+xwLHk7rG6BnqYOupM5oCMZ7t6mr5tv\nzEh+\r\n=ppDM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"2409f1cdddd92c23548c18c055a6a36efe36349f","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.0","dependencies":{"@opentelemetry/api":"^0.18.1","@opentelemetry/core":"^0.18.3-alpha.2+2409f1cd"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.3","@types/node":"14.14.35","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.18.3-alpha.2_1617118024438_0.6052533009442176","host":"s3://npm-registry-packages"}},"0.18.2":{"name":"@opentelemetry/resources","version":"0.18.2","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.18.2","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"9d671476a53385c5a75c6ef273a609c9f01d8142","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.18.2.tgz","fileCount":45,"integrity":"sha512-EBPqFsreXgFaqkMmWCE8vh6pFhbWExRHSO24qSeGhxFmM5SQP/D1jJqMp/jVUSmrF97fPkMS0aEH5z7NOWdxQA==","signatures":[{"sig":"MEYCIQCZkmaHImBrz3nZf33cxUMqhfyDItcB4roIfdSXWJlTbwIhAIhbLBhNsMoxGy97K39r5ETfxRNfGwAcOJHrcVo74Qix","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61722,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgY067CRA9TVsSAnZWagAArtIP/jK0wwB176nnt1FKr/FU\nm9N/d7e8BQ6sCj9HmD8GB+9Cbj79wv1gk0piKqz5d2qrYXetIBMhdRyTlJkD\n8iDOmlbmEFrP/E2nug6WfTCMD5YBN/QxMUw/6+QxLfN2tQKyv4Aj1bEFLoDQ\nS31exUa7OZdWiHntt8ofLINW392u4QGzoK+HtB7PnyrgdsC69SWYwcA5TL7+\nMr+4DxQbWpRJXOwB+THpKZYlTD6MfPhrXITalmJfDuwCGbEyQpXg3GajVkcE\nfas4wnEQsCAntKp2IHoTHj0tguHHyqUQQNiwLH3HDiJopv2QEkD+5Ahl4ZWN\nFnSkujKX/9HVCJ5jfTutd0aO0gduSGwj/HYIkI3Hzi7e/fQDwYRqji7oQBEE\nnBagM/Pe4/AW+Xl9QsCEXyu0hHm+32qR9e1H3lGMiBfResTAADjq3DiCOPil\noiBOn8lwvSY5YXo2MIFxtNS1fRMs8+yLmB0vkkFSpsSuYmPgp+V0YxhIjOg3\njXzUBDjkveKldnv3Wj14m7AC7mO0w3P90K7heeE42SY25RTSjyccGWsz/Xm+\n6BRkuYppIWYoLV+4fph9De9p58u8J3xZ45vbbx1cVmcuczK5N9xNPrZH+xxa\n5UsqDxDdTvKGsRF4vZkRVQ7yuD+44XErzxeZLf3OGhvGQWvlF/HV/7RrUbwG\nj3bh\r\n=tLna\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"2409f1cdddd92c23548c18c055a6a36efe36349f","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.8.0","dependencies":{"@opentelemetry/api":"^0.18.1","@opentelemetry/core":"^0.18.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.3","@types/node":"14.14.35","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.18.2_1617120955560_0.23900434234973034","host":"s3://npm-registry-packages"}},"0.18.3-alpha.1":{"name":"@opentelemetry/resources","version":"0.18.3-alpha.1","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.18.3-alpha.1","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"7d355e2d625702aa57c9cc6965081fcb2f5f7523","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.18.3-alpha.1.tgz","fileCount":45,"integrity":"sha512-xtqSRV2fjTOcGihw+hwdteTnN+9QYC0F0lv6yJBhDPy5lXDRiwnfa4rlPedbIY50t33tAMS57P8JIPjJxD+pIg==","signatures":[{"sig":"MEUCIDk3/IrMUuB+14znFZu8zhAuGagstRqcWNl+iT8D9EUfAiEA4p7y/6CxiCNtB5NvWaK7OTl8SJGmqR3Mc39UTkYcyI4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgY1/7CRA9TVsSAnZWagAALhEP+QEqrR/16m90puzlpCbg\nHbTGbc7WtPP9mDnj4wj0Qce5KrscEEbitp3tVZCLDi/FRbrpr/kEch5K3BDu\ns+1iesY5VRiXlcs/npFsPGA6h2tMW9z9NvyQcEy09oV/vBsXnfEWTbTezqLw\nq81FJWvwQ4Ln403AnbZRLtEw+H6NeBLaaB70sccmCXTYLzCafqQhPjLhfSy7\n1yc3kPjIubKN2a69yr6vOQASvVbpJQZ5ZCZvnlbK61VRVUMrCwvmfurZzmpw\nXQ7WJsGXk0kokzPzETbfQej3i9Ve6HQcbvp6iTjyCswhZ401ed2psUUwFBCH\n6WV35uPbOw559swt9FsB/rBeO4kk9B3WNA150CcajVNRpkQ9Wsdg1b2m+4xD\n/5biu8osQj4935Hum9trVmEpjV85N8ovK1MbIpLkAk4EfhMGXKZcjitjkQ56\nCr5Pma6RoBNs+R+d5e0ssAMO8yN+ct7ugHdYk2pkMYKQXY16+HUXYXTVBW4h\nXm/Lkz2BLRoEqW6zdokQBbyxLikcwyo5Zkwzuvv0uhfBhvw1Dx2UeR527+J6\nc5s820oVLqiY6veOOGz95IKsi4PZyv+WwRZ1B61aVDYmsH+o/944y7a1gOdZ\n2AUubWA47Y/7hsV1N7C0cPKoREfOZQ5Yw+OHI1j3qGKaiOOr00ukLysDJd9r\nDD05\r\n=Tarj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"cabf8630cf2e295ac2e7e5f44d6efd1ae911cbe4","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.0","dependencies":{"@opentelemetry/api":"^0.18.1","@opentelemetry/core":"^0.18.3-alpha.1+cabf8630"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.3","@types/node":"14.14.37","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.18.3-alpha.1_1617125370973_0.9276165778961876","host":"s3://npm-registry-packages"}},"0.18.3-alpha.3":{"name":"@opentelemetry/resources","version":"0.18.3-alpha.3","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.18.3-alpha.3","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"2caf53946e40534965a1ee023d9d974f5dad6c3e","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.18.3-alpha.3.tgz","fileCount":45,"integrity":"sha512-+/UE3K4xQR4qH89qfzhb6AAb5Er+b/J4Cd66b/R4zBWVqxTrpxaX4XS7pZ159CrFLcR0NhXKlE7g/GW8+nHzrQ==","signatures":[{"sig":"MEYCIQDjl/4zasMXyLQMPcjBelyTY8bKpCypLhfSHRKpvNYqngIhAMIOAW/ksJ8fRxGfV5uXiA6bgyDmpXdTC2q/nu5ZKHqK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZCbhCRA9TVsSAnZWagAAKC0P/2JnAegjxSnf8lJ/jFCt\nltO6V6XweLIGiVT5C1O3OhfANxK6Mkl68WTp5RHSEu4RCq7mbJNAWHObd6F2\nIMvuWZ/0fhME0mvW6uUK/E6d5lK47FxfRfnNwtjtDb4IhXHD/IoZSWowGUEx\nRn0aV3woU+muKZ0sEYEiUB4UwLgjvjk3IELpHAsGH4lgUzDi4EI+o5FFCSJP\n4rGiqP4N8Dgqq+CWSglB7msUThdyLbmb/+Yn19mmFrcoqRVyEUzUXMhfOFaB\niPN0Sonl3HGQXeKwoqDiqg5dA4PDwt9GzHVJEecLNsS0xjehpgxc7ZZFhR96\nU4fYOVbUfvsz1kjWuqppODG01EKcUdigFwMdai5cykvNHRoGa15nWHyw8uV0\nss/h9qFLaZif4dvZNwR3eTYwAMxmFsqqTkYSu7mvymT/CbtN8gIeVGcIcDEr\nTuOviXQSuZKYF5GEMzRjlfU8WXTI0StGV67XeAlCyLnf/lEda24kVWf15OHo\npvfTkauHcAr1N9Mpl52C8xR65t30HVevrtWuDKByGsL0YPBtH3huveTHrpAx\nfHNYlfrO+3MXey1Y7nUisa+jHUV0xWGd+8RLVhO8YSWTEf31Je7T831ZxJux\narl0jKUPOr6HLMNea9K4qz8LO8u2wixe+8x80KZ2ptAvWxDE4c7u+DOh84mb\nfvq0\r\n=Fc+f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"853fcb94cd96cea0bd1af18cddb355345f76adad","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.0","dependencies":{"@opentelemetry/api":"^0.18.1","@opentelemetry/core":"^0.18.3-alpha.3+853fcb94"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.3","@types/node":"14.14.37","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.18.3-alpha.3_1617176288725_0.32351161359879743","host":"s3://npm-registry-packages"}},"0.18.3-alpha.4":{"name":"@opentelemetry/resources","version":"0.18.3-alpha.4","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.18.3-alpha.4","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"a39cee4adc498d1b71658d154e16584625149ce9","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.18.3-alpha.4.tgz","fileCount":45,"integrity":"sha512-y2gGgsDNDaFJQgD62AtTgWbedUhgkdcAwzLK94szvg2l1vXALPq5VJHkMAcOeQ0iR5gaCwbYwUANnXNYflc7gg==","signatures":[{"sig":"MEYCIQDxYPumeTR/5bF2eulJEt0QHQOy5b9Lhk3tDx0QFpEyyAIhAJpuxX1LbvaHczCyCxahs5vmkGtavCOERGdUAw4Py65V","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61760,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgazzlCRA9TVsSAnZWagAAgxUP/0+oaATcqdgbKjgEte/Y\nq9QKX911pwLSSdFhUCYPRVrx5iC4OK/4Kr+DGK+XT5ay0eMbKcTZNvW18raL\ntY8sUZIaPVovQfWeVntGOXL10igdGdYBWhuhUGB+U1j1UpF7MYmqaY5XXpe8\n+vd04cdIncGd5nLz9pwkCjGcTCH6F9WhDQ5GIU1lXe9ZpLXSWwkT7jonRD7l\nIpCzWZDLPNiJNzQFkK1yeeKizBDycokauD3kH/NnncD2EHNpPh28Vj5LH10i\n4fx7/v6QZaeCVvCag9GyNi8gULQCbJ17LPFApJGfjQGOjrMQ4iTHDP6H4Pe2\n6YVSev0DM9TNEtsJSiWEn4WwF0kdGmUDVo72sT8SAOAO67SaJ+QjIfdKgOCW\nLd+Sw+AtFAxPt6v/eeJGrJA9QlRj3dCxWZk8FeizTwN4DRQ0lTj+2/7dNe2R\nC/sHHXAJDIioTVDypdHbvhHx1wNgG4LMddfmOn5aSusgfSqdvOL49W808eQz\nxTX0//h54tGfIPbqiPVZh/fAMDTucapDAsXJPR5GZb7jxjE3RyAGY3L4JKyu\nVBmRjn1MQQk9/S2c7v8RYFPUKFbTA4SRSDsE6Ko+ymGwizxbeljxO6j/bBZl\nZkJPhldls1+sfsicLLf3JASVqKcdf4Z95n4TftUr22XqWxjyp24sqatKh0dS\nKbq3\r\n=Lf0V\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"02175dfafde72898d7ab40d8078b0e1b6576e82a","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.0","dependencies":{"@opentelemetry/api":"^1.0.0-rc.0","@opentelemetry/core":"^0.18.3-alpha.4+02175dfa"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.3","@types/node":"14.14.37","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.18.3-alpha.4_1617640676931_0.6815246552840866","host":"s3://npm-registry-packages"}},"0.18.3-alpha.5":{"name":"@opentelemetry/resources","version":"0.18.3-alpha.5","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.18.3-alpha.5","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"cba22cf2fcd16f64ff9f67e7adf05cc56e2574fa","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.18.3-alpha.5.tgz","fileCount":45,"integrity":"sha512-d2/9f6FeFjTn9A6fl3uSvPqYuQkZ5hlUHHUaePVOaH8DyWDUxTwwVBb8aJ2M/j1itpLHNGYRc/adWSIzFS/JYQ==","signatures":[{"sig":"MEUCIQDmT1z0T84SueUK5NTWuh79yAhg6Gitz9ceaRwOGctKkwIgJ00kWJ7uvo9hV2fgR1YGf4fI797BDucISal+Tr/QI60=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61829,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJga07rCRA9TVsSAnZWagAAzvsP/AvQq6W+/I2FZENhRtPo\ndEEUQ5vEnFJg5BorYlga6vSreuTMtn2eJEByMI5dMwaBbDXImPBqpxseScIb\nE+FC0dDHfhjzsnkcIbEi0vPXmRqdoarCsJxF0MkNoPj/pQZYjQVMxBl1UreL\nedXjWRufuRFFnKmdh/2AtBAS0pifaJEcyREVFZpZn9WEFC4Ol51AK0ibEsih\nk5ICNitZO1f7xh6OlsTJZRzgCvguEIGLHR3Sc9dONCo3qFWNNx6pxe4BWoiF\nsLDvsmCxBoAkFvw/96n7ov7a0oVjNsVxhhcSP4xZWVVcyEVon47Xw9r3A2Mi\nf+3OpyW3byPQtr1cv9qMsox5LYvoJyI+xeduc+gvmnEM7FRBPDpqVSVzzh4Z\nD5GdYT3nhPG/EPfSjgxDtGRhL2IX92KKxNve5oqL+ObU5+d7pNnQdk4QF299\nC0STnwwcN3IbVPJsM4dYLlBpw2bCzvWFMMBKLal5WdTDKwmcwnz+XyRb3iP7\nLcp7amAiBANwZO7cZxypQoIuSpdwvoPzTIO6hXBbyKrSzez5zy5RfO2l24Sc\niwVaKctFbsolW31f0d0zHeD4kKOuTOe8mOSBGIwKvCY3aifPoBMoFJnDxOMH\ni7RqeOmSyIlqQxcLLxEALMpnm5xHoBc4+buU68RGxW96r1gZxyiu85VSpFzl\ntxnG\r\n=Dcwy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"8e2e2a9653bdb648849a0ac64df55cbe3ff0c503","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.0","dependencies":{"@opentelemetry/core":"^0.18.3-alpha.5+8e2e2a96"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.3","@types/node":"14.14.37","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0-rc.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.18.3-alpha.5_1617645291344_0.7675893410115859","host":"s3://npm-registry-packages"}},"0.18.3-alpha.7":{"name":"@opentelemetry/resources","version":"0.18.3-alpha.7","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.18.3-alpha.7","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"4ff1a09413a385856bde74d58ec5252a79bf4dd0","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.18.3-alpha.7.tgz","fileCount":45,"integrity":"sha512-Eh3PgZZcJFwRHYPMN8hvG+iew2c51LD3P+E9YbaUfbqjOsGmJdZNAwJIkbzrSW2LkZ1AqZGifopN3z9s20zN9w==","signatures":[{"sig":"MEQCIHh9zaddIBhOLVILv38bLXF+7ieTWcitSiooKKP0lfqmAiAsUH28UnwtW0ovXlXr5J5Ef4iKz895fXr93xe8EGdLKw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61829,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbdnnCRA9TVsSAnZWagAA+PoQAJlKDpBFE3rQlyW2wKsp\nMCf8Qz0hWBsYIO8RJHiNxXpnFAIx/iKTaRlrfPVLzMbaTbou+vnT5AkezQga\nYGACyBi56Ppax40gbNDbex53NJ4Sbp3E+Jl49uPynGsDCYKiHNw74ax0D2yD\nu/XUdA+XweNQAJk89tPgcEruNKqBKlqRXibI2T2z2Il7jcy9mLWh+9PKcIF7\nUXacBF1Su5g8reaPKJEOU3NrugitEPbtdI3LKrRaKqKHM4X2wo+bvVOl94MS\nKAJ3WGc1SPT6i2hsP9LyNQklBd35DHeBJ4SJmnxvsgMZ8XeiNWylYbts24Iy\nOJKUxopriePQrXDUl9KPLe9aMrvFV5Laqrt+v9QX/flx1S/kwSXiy3VvXWqI\nnhy66m07JtA3S0GZaLAqZqAfbwwnNWB1ZFMj3rIVqoLS+jElpTU2RFJK5igd\nsQ9Vv/oaBlg25sPjFBx5VoN+y52XplPq/HZwr3tl8QfCSCk26GtTP3WAeEtZ\nbAuvDMQb+2nWsaccoAcnpEmgmkX0HkLeUeqsIE6NWHhPJ3a/V2S/wnYrNKL7\nQizL4xgNwr9UVmG581CqlswZgp6fQYa9XlZo/t49CwAeedIwLPS71Dg7SZ4v\n5v96aeGV7cEPeDbmGcZvNLcJBbldBFvcUE1ZEP12KRObDHGDhryTsH2Lvxft\nojIv\r\n=tXMU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"897c35f497363ee3f3ea4c1e5ad1628e09ec9041","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.0","dependencies":{"@opentelemetry/core":"^0.18.3-alpha.7+897c35f4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.3","@types/node":"14.14.37","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0-rc.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.18.3-alpha.7_1617811943342_0.02095684168302192","host":"s3://npm-registry-packages"}},"0.18.3-alpha.10":{"name":"@opentelemetry/resources","version":"0.18.3-alpha.10","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.18.3-alpha.10","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"8d2313a2d91a5828650c3c490ae1f997e138f149","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.18.3-alpha.10.tgz","fileCount":45,"integrity":"sha512-nc23BT7pIkK+AMSCyX1iI4ylERXLYCI4WAseeAdQORc52PREtMTNpkL70CtzBHylJbliW8LSE5N12LcbxOR5gw==","signatures":[{"sig":"MEQCIGFpIebgOsAng+2jaTAuf8F7+VTjMH5OYDpVrTvnPYuOAiA1oU0DqjHvZVhQd5pzm2yKNH2PvE3Ovdp89xeVG0BSOg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61831,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbxJbCRA9TVsSAnZWagAApTAP/368JHViKYBxxkenKnTI\ngbV7Ssc/uY6aTTSsMzXKi5OEOBtUW4PdXoDRje4PmtG9uBPNc3e+HCV5+ZVY\nj1e4xKwSOk578cSX2avp6VsHr1fGrsmgfm565t58VZDoDmpeX5FTGd4Gb8J2\nt5r2c4uFTA7pU/4JfkfGKT3B+PnEJz1rr2WIsFEEvBX2sr1B8tVJ5TzRPztL\nzPX1t05FQCYZuxW5/67W39H0kJNqZSm1iJggwe7AyNt+W8nOcYiZt1RHlthO\njfbeVSa3KOjGCUz9hTpFKv/pWBqw1i72beclVeNYz/gdcrR+Gy3/6Bp4WLKm\nxXAAABCoOW+4hKW9XOlb2Jd7tDnbvwvgN4zwnKWDa/SlmGW0kivtccQ/455w\nIji6ehbCx2zCZBUAgDMwMuGG15CZbZMxiP2vWu0TGlAxtxZTCwL4ifhgY0Gg\nztWTMvMmsO+h9i0kpKUcusCZ9XhQUpdydKG+bgM4/aSR8bCA+1Si1PLdLHI2\nqNWWmYVSpR4gdV0DIqI7pB8cKeOmJieLkYf7aojngZ/Yl8e2vWJxcQOtJrkp\nmrB82Y5nKGMDqo/zuVkyqUeIfWEYMO9Rduqe2T80ydSgR4QhJAdrCeREHOsL\nXobvNQnx0FzIDEuBwAiZd89Vmt0ha6fgVa/Db2SRSqK18tQXGdc5gBsCpYVi\nhGU2\r\n=KP92\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"80ff5e2af390ed8bf97c4bfcd1221d2a855b50a1","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.0","dependencies":{"@opentelemetry/core":"^0.18.3-alpha.10+80ff5e2a"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.3","@types/node":"14.14.37","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0-rc.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.18.3-alpha.10_1617891931056_0.9756398483971325","host":"s3://npm-registry-packages"}},"0.18.3-alpha.11":{"name":"@opentelemetry/resources","version":"0.18.3-alpha.11","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.18.3-alpha.11","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"243e1d952b97d67427dab02fc8e067c4549763b8","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.18.3-alpha.11.tgz","fileCount":45,"integrity":"sha512-ybxtUgg5Rfn2EtUu6vDm6RJ4TSDh0beycpFG5RZyBVOACHJkOGGurupY6NjurijEcThFa4fimUUoXBA3jxjMMw==","signatures":[{"sig":"MEQCIHUICtfAMA4Ck0INusEOGOcTXK4KJvtblLo5lSi9QUwHAiBEpHXJEm+UNXR9S95O5KeDhsUtdbS5pNI1lL9qTzByTQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61831,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgb2XmCRA9TVsSAnZWagAAVfIP/iHYP9/YQ247DeZi0Amc\nNtMgRCsqBJL3jC6MSfXwl5hQYewaWf1CRLA/uJd3m5W9A4LW67F8QHr8GY2m\nR4VwpO8ATsiKw6PZl3fD3quGtOEdvTyMxB4lND64Jv9HIwL4T82AqYTYK4wr\nfKuwPH7cwZSAvBSEMy/c391HlMbblkH9BNa30NY0JmyA/8W8e6Ia4TK9Wxvu\nbCYa3tWU+KEum14K0kTmSoIOwvsY9MGJCztcim47I61n+jiPTeUSE7jwolk9\nJBwmf1cUWczqWpjWW3lbSlxtqEovIBDaTbmkgrx24eEnmcpZv5HFRN8pjntT\nb52IW6aIjPCTQfiaYiMdniuMB2E6D/N26UGbe1pM46uySdaA9vW9MkKpCLSG\nsmlbnKNZnFkoeQdMXhskN7g5yhnCMSir3dqsyqYabewnrl5iJziHxrza4mtk\nSFRigmHNG9YvqZFoydrduZWefwTRuLDqVS3Uw2EVZLtoLugI8BjX+n6w+T5G\nwGpQ72Zhqfsc3kIc0VU1cdKr2a5roxpmopAeHNBpQ+vQWGteREnNRIKOz4VT\nR5lSqbFkjGPTNPBw7uN6vCK9tvny3ZWQoswQL6AsIoq9ucys7aFaZp//L7Bo\nemOYlUKncSkn45ZN2DnxN4VMXh7D7jMS7cj0vDtOiunMhgW8cj6c2zDfOHR+\nuF3V\r\n=xSUd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"64c8ef57a9fe3b8468f2388ff78687b927ef8965","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.0","dependencies":{"@opentelemetry/core":"^0.18.3-alpha.11+64c8ef57"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.3","@types/node":"14.14.37","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0-rc.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.18.3-alpha.11_1617913317985_0.4301171827964656","host":"s3://npm-registry-packages"}},"0.18.3-alpha.14":{"name":"@opentelemetry/resources","version":"0.18.3-alpha.14","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.18.3-alpha.14","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"883dc9a31194175f3bc5ba16f555bb439e6f236b","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.18.3-alpha.14.tgz","fileCount":45,"integrity":"sha512-0zbXi0Y6B2um+8fqP7HMtAzTq5RGHRdaJP+oLQBLN2IC9unazLke1d31iGPoiZMdwXig2DL7bSTJHKTE4stirQ==","signatures":[{"sig":"MEUCIQDb12Lq33FkkNmOww2GueVIrKxJpqbBXCr1nHp75uvSowIgHZZVDVfOcfxewmDCdgnGhhsZkYwJuFWKUsSQX6KpFDU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61831,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcBpBCRA9TVsSAnZWagAA4D0P/18evq0DPA4YUl2ajaL2\njrSNC8MIz4Iq1JkxCzMcwnR+1XFLEALoFRS4C474Bi4ze9ez8MIzkknn5s9e\nxcj0rf3oX5sEm3IhVWiJA2SPA7NWGIuoHkF6W39RAK59oQ6G+VbKRy9Y0c5Z\noZTTuzENvAe5JFgHnub1XjSfl2TfMvjCIUhETeVDHIYMJ2BElEzB65BpOr97\ncdFC9IerVt5DJOu7Dnahjz0yxx5gXZ0j3npzmMagq/Qzr3I541eY8asdTfTe\nIhDNPUMoljHGc6EKtF9joRDmSQxZgN27hPOfXmLM0qabg0EOlP1PWK/k2q47\nymLlyRhg3kcr2i31w1ET3fAs3Me4WLO+lRu8zX+VhiPdAdkxGFblCERHsuqH\n0pqE2yurIt+a8xdMqq/9/BKeDf+Jd1qrNuCwAG9ied9C6awkfFfZmS+tvCQ/\nl4RZPsAKZDx7K1fwZgXnrxM1Jf/V2BrLBOKBN/x9+tZjBQG/E8/o9j85T5/K\n9XxHkXWJO6lv0Jy2QmzJU9FguxJR4casH/O4kQOGWTlrw1jcJaIqODFiPw2f\nyFn6CPwUNMXgx7FYix51qEgCh3F4lQeHw2R5rxsDhp4N2dRwuS5hhvDH71Fb\nDs36+fq+XTJfA+Bhw0rQko+qKjkSzMAX3ETQGiltbyZ5Hk+GHIfulJOOw8JF\nKLWd\r\n=3V8I\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"4a3fd1f4d86499e4485c1f1af0f5589de993b0dd","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.0","dependencies":{"@opentelemetry/core":"^0.18.3-alpha.14+4a3fd1f4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.3","@types/node":"14.14.37","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0-rc.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.18.3-alpha.14_1617959489241_0.17631252208774195","host":"s3://npm-registry-packages"}},"0.18.3-alpha.16":{"name":"@opentelemetry/resources","version":"0.18.3-alpha.16","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.18.3-alpha.16","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"3e8f80efd169764374e8487b16017d3532f7b186","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.18.3-alpha.16.tgz","fileCount":45,"integrity":"sha512-DlP/mH2uLXiTeSdVOQm5OyAy4AFnst+aVuvIEMf6q0gsSNUeB67P9Kl29VqWBhq4aRpyN7YTjp54r8Xe9lk8WA==","signatures":[{"sig":"MEYCIQC7j3eil/nkKKBMgm6u1hyb3mwIRNoXTrUby91PXfR+YgIhANgd10v4mzhen9cCby4kop95kMlmD/6t1Ay660KLMG2b","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61832,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcLQVCRA9TVsSAnZWagAA0ZgP/ida3fbEogKXb0W/wdw2\nSE7i3WzQOuYfcEVsuUr4S1618GemwRcICQ1iNUZnLDmrb1jo/6t+Jwb4BXQj\nMTskhjQ6QHdH6ZiLVegNJPRMpwe9qrpJ9BpGwnQsThSltu2eKSub1wuk8dkh\ntHCqdrLX6DLU2997NoRKzG30319iWCerdYIm1+AuKlVuYCF6qFMuzmFiat4e\nP5gMNzRQN6Pd5X4nE2ovhYmjsoE76deElB73H9jEKz2gE9sPkIRbU6Nh98CT\nVHMR8BpKQmDCQkUZWl9UEKclkUtTx8isIY0ePO6So66oJmsb9cTrquFL75Gt\nyys4j/eWtAwewvXNcCwR5ljZa4I5vm1kFb+FFLW9SNh9sfNLaAVLawphcHsU\nZO6h6pz74GiGoAL/NodB69A5ZxuNXN5fUib+sXmUtENzHDTo/Quf7tsMrywY\nVVjbYxLhNS/ebFJDZPxloCG0NcC0jDiE2u7TYtzZw+UMTqNY0q+yqcMRyTAn\nYY0bsQjbwtSbZmaWMQv9Lill9NGlI/3KMMQT/5Wyu8FFumUfnhFdZherBI2t\nHJkzZkz5wAhurh19CMiDvwp543q1PRWi4gqoJrMQJtuyz4aIhdYJl44fOXzb\nzrmIOPFEtKOI/2ENu9XzW2qkZbZSrSUo4ChcS0MwomibJzzhiCXjJDr5tn3c\n9wLe\r\n=DQ9M\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"7f7afa7bb88edf4a4d46da8b252116d92b578b79","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.0","dependencies":{"@opentelemetry/core":"^0.18.3-alpha.16+7f7afa7b"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.3","@types/node":"14.14.37","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0-rc.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.18.3-alpha.16_1617998868204_0.48395997852908224","host":"s3://npm-registry-packages"}},"0.18.3-alpha.18":{"name":"@opentelemetry/resources","version":"0.18.3-alpha.18","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.18.3-alpha.18","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"bbf4cbb8076e9e0b766217ab924ee65649fae577","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.18.3-alpha.18.tgz","fileCount":45,"integrity":"sha512-6fxh4bZhKFyIVhpUI0y3wKRFdr1CT1YeUrQaKzHtLeRjlZ8ZkWmbgNhHbabTB3eNH+w1FFtFgql/uV0oKyVsXQ==","signatures":[{"sig":"MEUCIQDIeP+qVHh1QbrtFDcZggib3Q4+3OuTrFasGk+3BwExpAIgXfZ9Xn3Y0DogI4s1gi/mUNYPBtGmh/xNSV3EnOMDa3A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61832,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcfXjCRA9TVsSAnZWagAA13AP/js/l3nesaha3FtC1jaI\nutfuOPkOpc2EgEGM144bYtZSlDst0VFl7LrAHt4iz2SZxfrd5C3xVY+dhl5K\naghDEgFSDQmlCzp/3YnrZ5i2sKMAWt/tp5LbdOyh9EbUwYiTbZjHGBUVL1je\nctXJgoOW8txBAjgIljqVimCDqvaqYJfz11kS3Kpw+BjYFvGot/EouWUMzXpn\naq4NRWUaK+4Ybfcp9XGvME5AI01pUCOM417cciyhpSrkGeo0ghojbrHu/1Xk\n1mKaYuvKVSynVXJonUyTtKl+mUBYipMRBMCqP2WVerPQ8If//aJVCEi7aH35\n3JL8XW2u49jm37wfpyGuNEfjTV/YaDNnj6rSROLukfPRY/oLo/ZTs9oFx6jN\nrJvPnmeoNaf9T001AeakHSXpKjBAkhlaNupiSyCqF2xxVE1jbsZksB/Llzhb\nzCmNRs7XDGOxZwE+tpsfIyuM985M35TTfgwc7h7YWvP4E0eiktrG84lGhxG8\nIjKoJCzuKiX7LKa2WRdTWgGZgcKd8ECO1/WZdrfoXiaochZvGM9jMye49OBv\ns696q4NyTINhnBa9+Q3iWboxKG+ZO7LFQ1JgAmitktrl/NzJqCMrrTPXgoB7\np5sVtYMT1Vw+5CMJ2+SM8CJRHsKZBIZhaZtygvpVr/uUZVQnJVqOllezoXmx\n/XRm\r\n=3+qF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"9fc1b109e7997b054c7182cc6db4d71d7ce9e5af","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.0","dependencies":{"@opentelemetry/core":"^0.18.3-alpha.18+9fc1b109"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.3","@types/node":"14.14.37","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0-rc.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.18.3-alpha.18_1618081251498_0.6120856675184263","host":"s3://npm-registry-packages"}},"0.18.3-alpha.20":{"name":"@opentelemetry/resources","version":"0.18.3-alpha.20","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.18.3-alpha.20","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"de928f9890c337f664225a51e50f0d2cca0231e2","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.18.3-alpha.20.tgz","fileCount":45,"integrity":"sha512-ehcQ9EZ2zSYXSRFbRu9/znqTq2z2v0QUjJJ4gsDJxFYRnQInuobg6iRtIwYY7HOnTH7xYJDXW0Lh3PBcCo2f/A==","signatures":[{"sig":"MEYCIQCrQ09sO4GZtOeivmWdsqXkI+Nc9JvW1lmDUIJSe2zG2gIhAPyy+iIKR6pMIdRdTclpyczVed5O3WNU5gKeQXPj4kd6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61832,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdGJ5CRA9TVsSAnZWagAAff0P/3w1yMuS968JLzyrNgcx\nQE3Iivm3zxZLJwy4PuNdjW1mvnBNFAjSQAC0X1oPzJjiYOjfXO6HTniMrdoE\nff67DXghlXUbMe9gZhVmtvIT1Dybfv3LmdTqfJbqPrHkSLZbpmDnbukPHExu\nNLx+/DNf3N1ou2KpTPKIEci7SwwM4PQg6+HT3F7iLM3rin0V0LB6loDJ3t2S\nUJ+n6Phq6IYXRxhhuijNdVISAfLg7vRcxDpIJKqqXrf147zBqXFTcsMwnyuC\nKaaLt8pW0XlL9AlKLNoyaSWRKapINj8XoEE5LBDy35CsSghtP18/fxXuRam3\nSXz26h5Whh4GDs7mHYBqliMEyyWtsWrIVwwn+HgfcueV+kIBXcSlgsbvcjNn\ngl9p5mGxB/p5X/xdQavMq0RP8pDeNMa5iExq+nQU+WODaBCc+QbrB+j7eZ8y\nZuS4D6us5w65434eN5KCM55mlC06new8hQi6BtOSw4AfQugem+d+Dgb5GiTH\neeNYPtKvwFeGuh5EDCN9s5a8vVSdYSVkB2xY2XrtvKqI4dtIkpGMI9dKNcpR\nGW2MhdmQvcFupPyXuasNnspqKvFDNLJ2d9mxf/IWSUpO8NnoN7Gn/SYHrw3u\nWN/J5SWgPjB7Exx5E4CciAIfyljD9EBhPs7+uxFxrRoD9RPXLlqpaT4d4y5W\n7bOz\r\n=KHcM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"b6dfd978513eb400a706928e604b625961ea7062","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.0","dependencies":{"@opentelemetry/core":"^0.18.3-alpha.20+b6dfd978"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.3","@types/node":"14.14.37","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0-rc.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.18.3-alpha.20_1618240120793_0.7209612410052595","host":"s3://npm-registry-packages"}},"0.18.3-alpha.23":{"name":"@opentelemetry/resources","version":"0.18.3-alpha.23","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.18.3-alpha.23","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"f58b17a845f64865d738d367368bbb6a6343f23c","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.18.3-alpha.23.tgz","fileCount":45,"integrity":"sha512-pc5oAc18e2L3bA+ZS15VNRVpZsOmiAqcshrZM/mZUih7+gYWjpGwoHtniL/Is5tp1HO8kNhjfGDBmvkL/h+k2g==","signatures":[{"sig":"MEUCIQDN21j8GrpV7kz3IDVwE6MtprVI8GM6mv9WDwnPxOOcHwIgK7hvU8Rn/iEUKXUoqbZ4lrFwR/4rRL8RRZIag+habpo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61832,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdI2hCRA9TVsSAnZWagAAT6cP+wYbJh8Xmbb0VV6tpABe\n0a60sUo258VyRTthAk9TcsqIv1jt3BsCdYuZZNpK2n9+KnO/lGrDTKBr6DtA\ncx3/0p3uJK3HaCoqa2HgoemmKYPxdvR2hmGbDY2YtEnWiqqHT+fMUJT6Jr0H\nDzpqXKSY6Z27DCPGUc2Jha9hFPPWV7/Pbs8LsYxtQGEee7JxPS70ab/zd4c1\nCoAn17cse0Q//wb169prdByBZBmVsYAmIUVRcgz1VpNzkK8qnCVp0VD7/koR\nqt1XwQxCJ4eeI2wP+dnTpNbsavbsQY+39XXp/N58FLeYzVABTyckhBPsafZy\nLd73FmPLIvI6d9ttUB15zXS+14QoYOGfGZm9oydReuGFNZIAi9FNwaEbVfm4\nZIfpocvIUsWQyJJowXenSIYgFwFOOObc5hv1R9y/4PdswSjZ9r2YZ7vm2UMM\nFXRSVpizlWHORbdbAnrq7dXkFsMjaZfPgiBfP5dc0RqRPlSRt5SiFq8u91OW\nwZ4bZlYlgXPWovtETfDKaJWbl9TTa7YTs8Yp0dm0tVfAsZ3rMa5VNb6MZ512\nKFh+Fa7NxQw4mM29mSq/WRN9FaT883q7majjYW/I6VLcDbMwerEttJW6Og3V\nHv2UkXV8tFJICrGTIWViUL7WpCR9+zNbLDFh943LDP11LJV7T4521x2drctf\n/5aP\r\n=kVTH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"2260dd6594bd007f886e7985bbedba1d655a6d3f","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.0","dependencies":{"@opentelemetry/core":"^0.18.3-alpha.23+2260dd65"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.3","@types/node":"14.14.37","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0-rc.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.18.3-alpha.23_1618251169426_0.44621695660028937","host":"s3://npm-registry-packages"}},"0.18.3-alpha.25":{"name":"@opentelemetry/resources","version":"0.18.3-alpha.25","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.18.3-alpha.25","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"afe9f2025b17667c4b045a4ea3710590c5e3849f","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.18.3-alpha.25.tgz","fileCount":45,"integrity":"sha512-+gyivlmAJFLpHH5swbDyDB6ZmE4lPy4JhMtPzCw3lTO/uapekFF3o0GDaU88y+uR3KKFKeSpDG7IBCJmqqj5/w==","signatures":[{"sig":"MEUCIAQXOx0iLhMZNow7DiGkW6YDy5FNY8JWC/raM9s6PQr8AiEA7clLoHnjqcwgWsGfjYGEv6WyuVNXERx/tnWMMKeVfaA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61832,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdKKlCRA9TVsSAnZWagAARLMQAIW0/XFsCS2ChTW2IxKz\ndjNUlz4SgnvbHd9NobIWZUzIM5lhN/boVxfqWhRknG1nmbeImUFGzJkO+cQa\nE3KETVll61SaSMrNDh1ES6PQ9hCf1sgW0+CoGP4C+46YWmQH+L98s4S76jzY\n4p+nEd/TJeZGVmE3Q9QJeQHcg0lf1h3pceszZYsjALjPzsn65bVVYHgUV2ne\ntEV0ZTWv/8zf3Ffo1gixfcGbyJyDFXYyK6ZFyuAC1tx7ZYedc+808Zd8Zw/b\neuuAZKBcR6F8itHkVYWexKOsCSM7INz/Ec9YOXyUXJNs6z9jr1st8Ng4M1uu\nVL1xgqvF50ELtYu3U1xqhXvieH+k8nS9xSmm9KIMuG29zTNKegGgQ9SKYVxd\nMy9yib9NJCuNF5lFWJbAmyQ2Peaf43Zo+xljOx+GwiMH012CzIo4z49yswpc\ndNlHF5AR3VFXZ7Wt79SzyGZ7Uuro6MeiFMMIiCzaLbz3g1DqHXIi4IwN9IAY\nYacxakKBd9jge7Q8h2cTLZUYQjUygi83XIwk8q6ru+y+4sh8Zj4pKh1Sv+yU\nzzCVjBdRWTeGcHAfHyUnjvBVy0WmuUkM+/FpCyi4gDKU3pMw4KnvR+MngiyB\nVI+szg6mia3jP+2D0s3VbmXhZ8WWZ4Ugfrii5Ee/FYFvHvWQlLBdn1kztrlO\noc7l\r\n=o/tb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"4ef22cae74b9c976f969151ebcc3ae3d931cf9c6","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.0","dependencies":{"@opentelemetry/core":"^0.18.3-alpha.25+4ef22cae"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.4","@types/node":"14.14.37","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0-rc.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.18.3-alpha.25_1618256549383_0.8505667574460722","host":"s3://npm-registry-packages"}},"0.18.3-alpha.28":{"name":"@opentelemetry/resources","version":"0.18.3-alpha.28","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.18.3-alpha.28","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"81ceed57a2b55b095bfa645a952870e04db3e216","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.18.3-alpha.28.tgz","fileCount":45,"integrity":"sha512-ebgDE2wdP2R3ub9wwOLm593WQ/u9PXlI2Hyiae5LwWEaWIVLMiFc7E2m7WMS+DBnTUFCEVNRSwUSAUBkf8Eh1w==","signatures":[{"sig":"MEUCIQDhaGQ/NgxQY/HgL3+ixkOPkWo7RqiKKQk6Jd0+kllV5wIgIfjhqyowwKoFBw1/dO3SGqHgSniySEnII5l4WUKxk04=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61832,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdp8OCRA9TVsSAnZWagAAjjoP/2jJyE0bXLdn/7lbJRBu\nI3KsiR21BMqUMp0yfaJlU5DUdz8vObM/9Vy+BKBtFuPWF9YGvhSTQ5LtBBI1\n9vToKPXlXIC6FyXyO3K7f2nbDuskzWyYOez+/eWrQO5LVP4xfh+SXxNkgFlx\nUlkD26FpRusUZUeypw0s84ARS3hEPZQTSGRAT1FijeeOoAI7MChhLIa/5WT5\ndW82VOt0o1Qx93ZquhiMqln7IyvdqlqKH3/ErXXMqoeCSSxwTUvjdcnKpsAL\njpvU+icMWjoZ3q41kJHq6g1UmjoAqP1UA790sa5v1d4JaQzcsAdQhmozxy+k\nbtHwzQW1/EVCMOOQwvShvsK0jxE4XQfAtOAYSiLPFQvBuKoy1JSFUhu11s5k\n1QHPW8dqluZglVqUronSBTdc7LteTyUjz7vle/lDMiukb3V3qKu6olE39wsB\nQ6abXjSYyef5SLbtogvWeZiH1ipT4sf9aY8x8iVfniarGnjw2NJdMrJ2Mdfa\nQpRzUlHdZ9Ewct9KZUh49ajhv6L1ZF9i+Lx2WEa+EJF+zo+wUbpjorEkW4qG\nUsNpQsZjyiONozFmx/MYNUtOgVazwJE6nhHeWxGBPnzNAKR0ZXoVA9oBoXcN\n2u+GojQe0EPvmPjnIGxLgmN+PLMHfGFoso435fyVbnV6W8KH4rWvSSJR5Uej\nAG55\r\n=z1Ux\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"181f11ecc761b75a2702ecf4a6b017f5fb9a8445","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.0","dependencies":{"@opentelemetry/core":"^0.18.3-alpha.28+181f11ec"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.4","@types/node":"14.14.37","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0-rc.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.18.3-alpha.28_1618386702495_0.09831075666319355","host":"s3://npm-registry-packages"}},"0.18.3-alpha.31":{"name":"@opentelemetry/resources","version":"0.18.3-alpha.31","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.18.3-alpha.31","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"a04ad703f4ae0aa2a27f14d4575f8c25dd3f2989","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.18.3-alpha.31.tgz","fileCount":45,"integrity":"sha512-oZXyHOJ55rtVJTIe2S0PC0RUcwnTcCLzKY8dNwvXoD4m266K+IpuAp4SFHTDwlTpFMMuEemo5vxu8bWxes4KtA==","signatures":[{"sig":"MEYCIQCoilMexc3WH7+9oec7e1CW3HIlalROCDl5pNi7w3VnjgIhAJcXTHBM3bRT3uLXIkfGoguXaS2BeUXVvpLNOkSHYXJm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61832,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfvfcCRA9TVsSAnZWagAAPd8P/Al0fCJeMacpy51fHCZN\nBv26GAinaKTAKSuBepRavzcFvcQ2QPYY/wtgeirIMdnm+za1SY08gXHZBMMI\naajtgTT8BWXC5NviXt3i6ldaIqwzT/nqohQbMndQpL4oAR4lYvh1qN2mo4zl\nj56J8wmLuua/HirE+F3mrNO/VrtnvGBgunStFAL+mGO/dx8p0lboE7iXxQDr\nU9ZHL0Rxs1m2noTagRE/EPcuwSLNFQrWP+g7RBam2Y3Y7UXHkwozd1n9S14N\nRe/q3M3kCYmFosaySWVTfMRiv1zVlXhlQKnSG+0IR6aAB8KRhxNNriH7bxRc\nATVHzYHrSH30nosOmeP5B5gYmwDLpdllz8u1g5XtCZYhYHBJazPfoM/xR6XL\nmfpOjCVkGvTaGyPvZHMET8HpfTFx7AdAOJsXMgsr+KuGyKM4jr43O+WpNHTg\nPDCyW36FSIb7zfuvequJ8MdQbd8mR17lwi0lRq80rmnpE8YUilzal6m7F7Ao\nPtuxJjxpB8Ky8ob3vWQPa3tyNYQXAYYm2Ct6fvY8J20f54zAw45IElRrGz7n\nVdHRM3glijylXSs9I4BvIzgzKO1vQdOUegDyFLof/A6Drbk0nXtAzh71Qiik\nj8AqZPC6FqMAVSCf/6fbxibEzseudmGClCdsGQ3hrQya8I/1GeqC9Z5lUu6O\nGifD\r\n=aclu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"d268bc6a8af633ed6803626096b124a269f7b24b","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.1","dependencies":{"@opentelemetry/core":"^0.18.3-alpha.31+d268bc6a"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.4","@types/node":"14.14.37","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0-rc.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.18.3-alpha.31_1618933723973_0.8999638336623343","host":"s3://npm-registry-packages"}},"0.19.1-alpha.36":{"name":"@opentelemetry/resources","version":"0.19.1-alpha.36","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.19.1-alpha.36","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"e69eda0e9594821978d7f143602cadc8e0404a10","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.19.1-alpha.36.tgz","fileCount":45,"integrity":"sha512-ZFHAcyehitvk1DxjVlc0pIBYyli/LiXetR5Wv9ltgCy3Rhtuq3Us4doQxS1WL0U6wBZnN6/PKdjnV5NUcd6agQ==","signatures":[{"sig":"MEUCIG/+bjtgmBHgpq4Rs45HE4pM0VJr/+a3dTh8O6W8UF8SAiEAqxQBbfFHFVRUihoc6NSW8DHDkqMK+CUmgkshSF7iip0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61832,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggWnjCRA9TVsSAnZWagAAOTAP/3E95zY9qIRLoxnRFWu/\nUpMqr4C9UbBFRXL+6iUaZc1kswrvBS0mTJ/BLGquVktRm5PcwKvq8guNxOWA\nAcY62NYwIBr5g/L7V2IGnLUosx9vvEQgwM0HEFFVl8xwuqH05XVw2VDGqnNG\nIZIP+7Ez3kQvyJApSv2KfLp0ZN0+9AjaHjUI2FrOGNx0BKf0rJgfRbR+KpOw\nFmzfV+Pw6dfUgfj3kaakK10KBPqCnLJ2yS1vwBKkgiA5ZP5eKmZKYlQVMceY\ns8BrExLqOZpBKazNwFTHTTBRmY6CcwhypZI32BnnYsCAuBUsm1Yvv3+OwLQQ\nr892t7hs43O71H4QF1TCO0iazUHepk18Aw1ESID68u2H7pVD4TmC1l6JhXy8\nCvGKZGJFAjrAnpIFcDCQOoSAa6TVI0Dc/VI+jESiQsVsdiEtFjNIE70HfdnK\nBdMVJWNaIGrIlT6wcsfFCgoNk57ZOkse6sLWP6HWcqG7ehnjoESopS6f36iT\nTPQo9Imqjp6+K5ORK6qm8HOXwr8RCq0HwEGtyk81DCcpZSQK9u47NoMuFQI7\ndVEKBLzldUfespcRR0UFoJ2l0CQIMIwFzDJizwd9L3/eB+gMK3p7O3g+wQVg\nNqLuefvVc2u8OEvL2XtiPfnCWyQ7M7omlSR8kB5xBtJSBD/p9F3Azy1y5jUS\n3uIx\r\n=lpaF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"0c15999dccd377294a03cf7d36085216d6e8c5c1","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.1","dependencies":{"@opentelemetry/core":"^0.19.1-alpha.36+0c15999d"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.4","@types/node":"14.14.37","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0-rc.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.19.1-alpha.36_1619093987559_0.9723533773779609","host":"s3://npm-registry-packages"}},"0.19.0":{"name":"@opentelemetry/resources","version":"0.19.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.19.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"3813610f8956a01a353fd961ac393c00995e6d3f","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.19.0.tgz","fileCount":45,"integrity":"sha512-wrgclhxBH4ZO86u6veSXRtH3hv9q2kaQ1/cfstWun2y6YqjajpqAdyEHrlFWYyjr3t1ze0R68GjYQxPVWYURzg==","signatures":[{"sig":"MEQCIDBrRK+Oh4IxFKQRJZ3ufChbu2Cp0mkGAshkOFI7je7ZAiB/aOCnd+A5lNQu0MdyrddV8w4Dy5Z2dvJ7t2jZZNBXKA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61795,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggWwACRA9TVsSAnZWagAA2+MP/A+ed70geBdCM6vzUEVQ\nxiurw1vjm3n2O2ASkbHcLM6ReA1UrvbHdjzI1WmAJWJlLLsmysMFN0y9A+e3\n2GC6O6zWTXR3rzrHizaeDR+vQGNshpzO020oCl42ZTF3OffdSvtyxSf6WWXS\nlDUJxSlBEE+qBG7FVGMSpx+zI7zwPMQZTqsHR3IRwll73ndr3HiBEDpMcryu\n/KsoMNhBbD8QNOWQTqYlQvUrLLrDHgdlruOyEVA1qjj5pycaSImdjjV13ddK\nSItj1ie6zJosKWNKNPZwJzxuwdKqXI7sbPnypLRM03s0FNC3A0BXhQm9kVaf\nRO/pHXU0E+0nQGpnZ++nUUtw8DmaGGWnb8sZgfEgSfpnxpre/41d8eOy/BWk\nTqKOhMR/ZLCouFZB+HuccCK4cGsNHveQfq56qVOKdYiUBD5JQlJ7R1HwnU+/\nWup+hVvHpxLCutR1QtMRZiuD4UcXeC8wZqTdH7zxGHDhcwcfn/k005ByZK+h\nRUQj/EDgR1VPfRguKtcCnMbh7V8eh+kFWIeJ6yW19QU7emdz0s4N27YIWDPB\n9i32uhRJmT5qijz4ef2DgIQkB1kFQpnOkmC8dvyhokryC5NEKCw9n2pQOFvM\nMg7iXd7zbBpvMwU5PuhAJE5pbjS7nxUXaV/7m8VPvf/J0QyuClolR4com9R0\nPufN\r\n=fPes\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"0c15999dccd377294a03cf7d36085216d6e8c5c1","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.8.0","dependencies":{"@opentelemetry/core":"0.19.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.4","@types/node":"14.14.37","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0-rc.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.19.0_1619094528133_0.19291835745354602","host":"s3://npm-registry-packages"}},"0.19.1-alpha.37":{"name":"@opentelemetry/resources","version":"0.19.1-alpha.37","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.19.1-alpha.37","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"736500ca3238af1a8fce4944fcfb2369ad9f5f43","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.19.1-alpha.37.tgz","fileCount":45,"integrity":"sha512-Xdue8k6QJtwS85AsgCO4kOJRu4cYoI4arcfu+tERvEmrn+l1HyLh2ISOEowRcMmoqng92NtYU36q30Zw6lkEwA==","signatures":[{"sig":"MEQCIH4osKz1wZnTaMB9wC9aabAvyT5byeAis/CAEHkQsJn5AiAH+xA+/w3CiaH2isiJK55M3jLaaxKHXIgtNbMDM8oQfw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61832,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggb1dCRA9TVsSAnZWagAAuXwP/1r4oEpE7QNxe/w3pqvO\nwb110C6oDMokUNr0xkD9OHmZtqd6HMruuNVatLKY/MwUuEApTdacqe1oEJCr\nxFF5WAkNM/CxsuwGHsqadOpsiixUMQWHzepzg+vDCy7yXuPDAZWK9t3n78gn\nBv1vvRk0KFas23M60lV4ZkBeaCDhZIRcvpjejf5vBfWnZUwlxERgle5ehXjd\nb6QwHF5FolvfB6dGVgX5HQP4HZJl9kM1t//BLWYJuE+SxhrhVAPlDgjrK/e7\nmoydDUqSTEut7azwATR26wZAFkJeAYPcUS18ukl98Qitw0pftiWl9jvKR5Xo\n8UWAY84c7BEzNisBkj26aS1vr7UB5SSj4vS65N2bQ15dsDwpJ2ZaQh+75hkT\nxwl8ojMPsVY7g+HivOwT6/ricssRATCKcT1BqTW/YWRz1E76c5n3ldg2QkFz\nj7zrF5s0U+Y0ZRYY+Il7Khs06qaD61MjX/fgiwgfZgImXGDo+0Qph0u6+cdx\ne2Gm+tT9I0q9bAFy9Nv+dslTG6JMDOvBKqnCx9s7yQA5wK0++I/vaMy+Ilcc\nnTEbrNhRTmEWvqOY6h9ud0ZYclzgUK3/RPzhaJts9rG6FW2n2unQNb+TqkAg\n+nKt/Q8iqnfbtB6gbKyzQq0ppJBi2KBGLG8nim0+Oq8WHyQmJm51LYEU1T5J\n059q\r\n=z34z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"a0385c45376a86d396cb364feda2b4afebd836d1","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.1","dependencies":{"@opentelemetry/core":"^0.19.1-alpha.37+a0385c45"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.4","@types/node":"14.14.41","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0-rc.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.19.1-alpha.37_1619115357025_0.586132890911718","host":"s3://npm-registry-packages"}},"0.19.1-alpha.39":{"name":"@opentelemetry/resources","version":"0.19.1-alpha.39","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.19.1-alpha.39","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"1e45c6756367641bf9924d25c70570db59acbb6a","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.19.1-alpha.39.tgz","fileCount":87,"integrity":"sha512-Ru1Vl60i2dcWu0onO9cZxHpUbmPImnb5DMC9cKu1R0qnII0FvsC3bDX7YvF+31Pn8+pmwEIRqOw5MXjGRDVChA==","signatures":[{"sig":"MEQCIB8XnMRzVlEm7yOsJVJ17RfSNQlX7ZRefpYQ6ZJOknFxAiAUWThdPHLvn7SMxnrhBMLHfL7DX1/tFnb2Y6i134tVTw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":117400,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggcQxCRA9TVsSAnZWagAAPGUP/1WCnUzWv3DnMz383hX3\nLnO5JHTa6kCjCdwgEPmEts/DUacS7RspeUn1XBVG/11viDUjtCEW02S1sFKY\n0Bb/aEyPJSArEsxSOQWz+d/hyEutYuUwhculADh+cwWCjelBftSrjHRM+n4/\nPrdKcMP9TDL7i07cC8pRj5ohCeSR55w/Y0WTza/3RUjlh6AAyJK4KHLN7obr\nSBDpXMgBdHNJLRH1u8i3eufTZcDJ+SlMqOY8ufMHRuZW7nfggJYbxw80kBbn\nUPXvv1A+Qg6eZs+s3VAgaEmGQAnz6pRwZyRGFuFJ2qoioEBI8Qh4PWAG5eC3\nfP+KmP7BjcF0ogRBmySSDg0nw7XiUeEz8GKjLVAogk+MVZY0qIEnmsP9fa5S\n2BNEoMCB/7CAh96edmt6NL5j3t2SNaRyo2h719C1tVRBfsIvNR5b/MAl7mNa\n4wpi7zAI7npZzbBaeloOyvkfI3V5nT1zqJSOtnT8NvQigy1lAaQn/krSK8KJ\nRR+R5/ZwjWnhUkrZ1dPEI94u+BJy0tTYnRb48MPjReOmDEmWSH0/+U1zx1Rp\nk5VpYPwxNjXxDUlGLvvHsF2ZJJq1+2Y/ZFQArEZmOj1faKFqoqHwBqIoee8S\nClz3EyUq+FrkJGM6BRVg0kPSGhvxxMBgjh6YwOXzNEz5/733jbMqt/LjjRMb\n5o8b\r\n=Tjmb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"23ba4bfdc77c8bf594bf0c817320a31f59ca0bd4","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.1","dependencies":{"@opentelemetry/core":"^0.19.1-alpha.39+23ba4bfd"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.4","@types/node":"14.14.41","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0-rc.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.19.1-alpha.39_1619117105003_0.5964009762930187","host":"s3://npm-registry-packages"}},"0.19.1-alpha.7":{"name":"@opentelemetry/resources","version":"0.19.1-alpha.7","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.19.1-alpha.7","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"81e68eb702ef1e8e90a6a5a5b9f39ed26b5cd6a4","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.19.1-alpha.7.tgz","fileCount":87,"integrity":"sha512-W8AVPGveFy4B43YIjBnh+O+S9m8JNLdpSgYtPz6hocuEUUxOqJhK1SSlmf42uPPJCopFeuVpEeB04x6xXuEwHQ==","signatures":[{"sig":"MEUCIQCTy6CbFUcVViVAxJvAFgYWw/tTmbFpHQqQbmIh/NV38gIgZdPDh5ikWA8yn8qT0AiEjfADS/YRXdgNzIp1e1f7DOc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":117398,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiYm9CRA9TVsSAnZWagAAeyUP/AvjRKiE1IwBZtk1jHR2\nj+RsxcDFUnjKNpreqFCDL7CSEf6uj6Mje7h7p/wF6limqEOx8gyUqcTXsMw1\nHxXsRMiHbNeL5OlXMByNRFfrto1DG27w/9HkdbxIsJ5Vll9IKjsbdqKnLE7N\n36rXKpa7Hj0awEnLMUAR11+57Po9UT9+4z+yFRUsjC1ntMFLDr5Ja31TL7VK\nC11xoDikPvCLpApKVkbtQHCGlLRs2C0Tdkr3YmKjPdwWxf6dRGjAsiw3adwU\nc17DPVdrbwNvPevN0V3jommU4WIEGBNBBMJpB9hpOR9EzOtm0cVhqGtNc1Vf\nb1yXcaFRtq95Mlu8oVuVs+7vSVR2XGYtsIGuy/AaQ8Oddznoz94tuaWse90c\nnSK8W65lfz8weILDJDpifLxqcAegHlbvse2kxKGyHgF6uymxc2Jc3YRW1wqK\nRT7w/bYICj3Paak2T3idRBpRXT2To6KEVQIzqkpdPSi51og26P1jtroScv8Z\nJ6jNpwXvDe4sMGfWZkKCcI1NxqrBfoBE5K6tej8A2WyWDR3H/lUldzM8Gbpf\nlaimSmLGjBxzV0JiT5RsOHA2+2Iq6F/+4pB31vYfe/sKJM+81s/zfF0jcF0f\n4m9CnxxQj12E+QtHYs3DYqsyWGYBVf1ICfZCFaLG49aHbpKOVap7f0srkfrb\nWkev\r\n=R0q5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"c4341c39dfcdaaa65a5d6ad8eb745b656d865177","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.1","dependencies":{"@opentelemetry/core":"^0.19.1-alpha.7+c4341c39"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.4","@types/node":"14.14.41","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0-rc.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.19.1-alpha.7_1619626429102_0.8488523183923391","host":"s3://npm-registry-packages"}},"0.19.1-alpha.9":{"name":"@opentelemetry/resources","version":"0.19.1-alpha.9","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.19.1-alpha.9","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"4a9ac47b3e6b3e06471a93cddc9de35a0c644ed1","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.19.1-alpha.9.tgz","fileCount":87,"integrity":"sha512-n9mWbcd0JaraMGf6wDseo3WDqHPPsJ+/h1BvUb17N09dwW/8wK0pcOXEwcHXyUoCXMK7xMtxFCqdIfi3eVLApw==","signatures":[{"sig":"MEYCIQCdbqBBr+yGq18pZUEC7oeNLjFSPT3EgZLUss2R4IYGIwIhAOAvmQRnu+95lh+laD+1F4TaaGxtUv5RWxldmnGyjHSH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":117398,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgimubCRA9TVsSAnZWagAAd8IP/3p7FjLwB73A0SkGqe1Y\nqMc3RqI9cIVOtmMzJo6l9OZh50TxjQzr5tJvGypmOOY4mLyI1aG52vRzwaW4\nMZCxnzw6yJaSKEBYS+1w1MVEJylJx5bW9D0OqNElUPqcT1QcA2VRnSX2QmFD\nnYxkTJkoL9xGLoG5Wz7vNLUUYWwuDenT3pbFJXNGq2eZUyBN+sv0A4+vs7Q9\n/krCNOjrS+AdyHyioznNh9DJuHxS/MAmZ/aruV2U3dSYHLWrwpDen51Pszpe\nPL9FuQS+DmeKnBb7WYaouEc7Y8PkIzUjD9nd+gMOSioOzLyEq42HY1PNzdl9\nzKCdBCZUt3+FGBLiR4h2KpN1Ojq/ngPVxzfS5wHyvnnuHDDe3sT6J1yyboQ0\nYJJDaAM+aZ3qdNnsEhms5POgVa7k5NMFrBpPvSgtPrA9rl7FDEG3T6UeT9aN\nDJR5IzAfE2h1mEbOyUoL5O/A/kF0DZYI/1gYsz/mUzb8z/5RjzUU4jOyXUpE\nyAPlctFre76tRrSVpM90jgIBFhQSgVIvouJyH6cMQtKHMzFRQ1qmM0GjBHiV\nOlLwAGi+rFx0lmDXMed4ivobc76IQcfDlvgA7nyTi2HFV/kwi5qYykZiLcEm\nSsjvnqdwQ6izUw1X2oluSWUEXJafd7OTpp/fofEOJDUIrkjzhDiYqaLDxsX1\nQQ9I\r\n=h2rK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"677727b2da55ad1decf399f3584ef92dd5fea239","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.1","dependencies":{"@opentelemetry/core":"^0.19.1-alpha.9+677727b2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.4","@types/node":"14.14.41","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0-rc.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.19.1-alpha.9_1619684251413_0.8672978383383982","host":"s3://npm-registry-packages"}},"0.19.1-alpha.11":{"name":"@opentelemetry/resources","version":"0.19.1-alpha.11","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.19.1-alpha.11","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"2685ffa33b2fad5789ddcb532077c490f3ca230e","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.19.1-alpha.11.tgz","fileCount":87,"integrity":"sha512-Cb8fxUEceRPFs0GLAZuDVZU0YOkTvrFzPUmxIgAdB/6KHUqrZ4EMhgMaj4L4Mi/mQJ6NbHJ2LGr0OpNIcgNbyA==","signatures":[{"sig":"MEUCICKRJjD82adQO9TWFixfVTk5avB9jvpbnKQ5FWdEzx8QAiEA+JWe0s+OGpOfvWX0aUCMoBKFiYIU00Ui92Xsz6zgV2k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":117400,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiyABCRA9TVsSAnZWagAAhmMP/0/FgMUREi2Er3/jy/qy\nuMLvNaTqCRgVFkXgsHD9AzYmBKvTGLoXuHG/LX6s74zbP11d1RGK12qMVzEf\nXOFaLhoLlySMveEYcrB9nwAtmhDGt9s/W3mvGXqw1NexwD5IzVPiSAm0lV01\nkNgNHrJTjkf4qE7QZgaBWs34Py9l7IblYbVeq8ycsuIwOmd5kQB4TBNeQl5a\n4A1+jFpNxUUBsUwmETZ5CtrHZACzMwZ7WtUMok6mmQ6M9G3gDM0qHz8NNDbj\nUqOiIPimC6a36FwAhlSUsg2fJxqJ0SlqViCy6PP6fG0c7AjqGq+6MMtlgaMw\nRptBzlTtEp7T/jeJpf6Z8hvDldsTa4U5pV4lKKRkdw5F4s6Bw+lL/0hypuOi\nO59A86oIKgZ0TuKHZKodjKRgog+c9LuiAM3TEOsCiYwN+vqbe/gszUr2gHhj\njQIH4ODp2jysH1q3U2kJdEN9Vt2YfJIabwh5RjIPjasJ8vfAtBtV5Ti7i/0o\ng47MdpEXD3bglpuaak5itVrD5RyvcCf05NQ1mseBHfl8OKHjwPynVCgXFSsM\nzjcLF3qiFcCIjOFJ/f4vv8iYd2HKGwZvEa9VS1GWr1fDhiDmIxuWwWkaOpXQ\nCE5jrdf3FG+eOFFMnNix7DdLjN2H4BfNrHLN/4S6Joeq1qPyLpoEFIaqcgyJ\nD+0h\r\n=xLij\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"2afcc7c90d93bac4fa9180f4fd312ed01370b2b5","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.1","dependencies":{"@opentelemetry/core":"^0.19.1-alpha.11+2afcc7c9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.4","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0-rc.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.19.1-alpha.11_1619730432952_0.19887797896395187","host":"s3://npm-registry-packages"}},"0.19.1-alpha.12":{"name":"@opentelemetry/resources","version":"0.19.1-alpha.12","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.19.1-alpha.12","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"6a93ead3082c21bbc4474088bdfa5c43a1097161","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.19.1-alpha.12.tgz","fileCount":87,"integrity":"sha512-VuzhEwrpfjxHrJBEcUQUdQTCsSvoxAgdt/jWct7vycm+xrLRIH5nJPnnCaAkX+f++p5tdOc2yfmlorHqmIEyow==","signatures":[{"sig":"MEQCIHp0n3FTWFWZ/zlJCWu62sBPp7X9pwuQ/ZjqN28LhBs0AiBZefVnueJ6uyuQWnLx6CKPVNDsAeo+Fx6VeDQkNFu9zQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":117400,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjG1rCRA9TVsSAnZWagAAifEP/i8uMLMCxMnlrHvC2736\nxyN4vDEtPA+iwjshOvm72aSmG10ysGrDY4p6l5/wcNZ8zgef+7j9aDR6GYcR\nf78dohlkAyOpGLHlhcZMb1nj6Oniq0pW8KzsCUegboSuRZFgpyoDICDWZczE\nA1l7l3pfB0yqPbkCKU1WIAS/XWW0LJH0GxGogaCTvAHpMDNCXsHiYZ/2HIJb\nhjXfT+2sYxceV9iIY4xNq9KipKmwkWzxYFbgnUrbw6bscl7TcolOiq7cY3K8\nqv5isCEz+8jE/d6UpQ4KCKxcLH3szSOSbAM6mMFZVHL/igoMKENZg6t7DKlp\nsF8XSNtTk/UEkH1Zz7vq+u+hOul8CVqhCG5FpgVUeLNkctEyTePmDocjKvg9\nP4BSjc+DQExWW8GNVwOsBG4JhaUFovGGkEP9gYrLoVAY3oYtB3fheBEKTIc+\nwOmLs9ooMlX1scIDbeFaWAAbnKcLMyUdcr54O+kKvYtrF9aYDWoKw0DGRyZ3\ni/rav0hctEVdSB7/bESyeS9zQ7Ax7bYm6HeeZRx//NDb6xxD+tjr4soSn39f\nZp1fbRGxww5s3Pv1yCrCuA9bvEO/60ZGx24GxVh/Og2wBnsG3BisXC9R3Wy8\n5yTVl46ISE/Pefyqmwq9w2TW7bOhzPaKJe1j+b1d7JkVJ3dc1zjPhL7j97hc\nwCdk\r\n=4xD4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"25c205aaffb6707d4275be6bade3e078e50e2df3","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.1","dependencies":{"@opentelemetry/core":"^0.19.1-alpha.12+25c205aa"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.4","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0-rc.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.19.1-alpha.12_1619815787170_0.4054179907946478","host":"s3://npm-registry-packages"}},"0.19.1-alpha.19":{"name":"@opentelemetry/resources","version":"0.19.1-alpha.19","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.19.1-alpha.19","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"0733b5f8f6360c66cb805f80a8f655db5fb13bfa","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.19.1-alpha.19.tgz","fileCount":81,"integrity":"sha512-28/o0dDoVo0z1hTpFJHqxQ39ivcXsfw3o+qLJP28NUicmJhHQSQFWoPjCF26Elryv+vWdYfyDAJYWyXh62996Q==","signatures":[{"sig":"MEQCIEmaZ64fNqmzrCwUztejpHq1wYcUPgZ2pKvkYX7ZmxG2AiAkvY7vzjPaCYnlSm9sd7iqhX11kqhJPne7UbeIAGlB2g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":100158,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglkOVCRA9TVsSAnZWagAABNwP/j5pacdYfbBt+dfiYK5z\n8tSzf/K8mhMdXeWFdTYlTgG7T6mQsSu7ARZEVYHcddHq1WTmfDwP3OWrceTe\n7UycBFo6rsypYmDDAEQdMm9W5hc92wSD5cKmgIJNyIyGvQv6OKEIgHtWmJuH\nkGilFN/h+ijFN7aLwZfcF9ZXRXCdV1bS/L7eKmp7x3X5V7+1fugxBFfRFsbQ\n5G0+3gkGs3SiVjIRSsKBcGN1RWqrF36sNSVF1XUBWlqmoFR49ftJZ9wfz8d4\njCUwjDNdNGm7U8ikO+eD492OSAZ7RUKjARIYkThl1lfAHj1KGKHKw5JWsmaj\n4ZIEDRoZwiXv+FoRGhWbT6Ar9EM9p7O+DNpYJaJk9itl3mxG5Dmzw3K1cQwl\noPSABuamFVCxrUk6GI55eLD4XBo7baiss/oIeQuk6eckleQVI+2Idbc20xSE\na/h/FgQhfU0FmciFVbzp2i+fp2TlMHTi9WbWw4pEkA169OP4bLCzq1MOcL5k\ntwJ0XwBE+bvnQ1NUhqxE4Z2Ce7x6OqHMZYLfahqjwWks71fq2olaLBneFZpw\nWihxle8uCrp+5/PwShIz6XuBYuGulCOwaT99wpQt/TZEWAeJPpnt5E4T4anN\nxY/XX2w8Tv2ZQGAdmmyRgl2dBpnOuC4HwouBq00htGDcnHJ4BXVafzq8fLK0\n7DLs\r\n=yOS1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"9ce9eea7cad32cbc57bd80830f21e4f366ecf929","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.1","dependencies":{"@opentelemetry/core":"^0.19.1-alpha.19+9ce9eea7","@opentelemetry/semantic-conventions":"^0.19.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.4","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0-rc.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.19.1-alpha.19_1620460436727_0.6583469832123823","host":"s3://npm-registry-packages"}},"0.19.1-alpha.21":{"name":"@opentelemetry/resources","version":"0.19.1-alpha.21","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.19.1-alpha.21","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"cc276b53771273b8b4499e1fc5c8ae13dc1ddbd9","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.19.1-alpha.21.tgz","fileCount":81,"integrity":"sha512-6u7W+7ztmsj6OBxm5qA+401ntK71WtUGbtnvdhLD4Y4ctpkHmZYeO6bmwf9+W422c19P0QCBVoJ99+b1eCNwUA==","signatures":[{"sig":"MEQCIDr7FdYJ4CaE+Ye6bA4Z4ECgAylwGWvXfDszzN/9VM6UAiBl5Z8AOG1boXpnz10ObHaljfeQjyMk5nBgsa70SnyL/g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":100158,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmtHbCRA9TVsSAnZWagAARbYQAJnRat+Ml9wbguL3o0AD\nK9JOHt6YtzodukWbcckk615bPzJyeUvf+aFX9OhLCVlVu3GYTxiKzGqB7/wQ\n75/pAeSHnUFheF2qwSEj8YcvtPtg3CyHq/OHnBNZLXNu2hD0e6bn5ZK4DCux\nCRzhpK+LTbkFyow9LRz+98dPjcZftiubyyfzAFe7eQa+sZqGVIPvf6PdDIkO\n2oUcub3gMwDnPsz26KHUavVF86XZM9de9vgnJIjt1g8L/Tv29s7XntEeVicn\ntc70WVZPeyQFenhSZxL5GzZ9UKeO+6jk+BsevLdCHGYPGJpytQkPnnZodRkT\nmqpe7epm0XijK1DOyr3JNgzfqTwrCqKV/zIzJ/rhAE+9IBU5wsaPFpkGv1KD\nimjO2mKgn1FnLxdtzNDcEQg8Uq6gZUC8BWKEQ+pbL+QQ+aqGwttPlLy6WFLk\nNRQlRLLX9f23swVDql5baeypJEoiidM0aKJmkYtwCEshobToqVf+GKLZTaUG\nQbfYvuKWVKKgfIcyZFIxWyik2W//wv+emZR2JeoQo71crU4tdCeaFePBWae/\nisiGXdl1R619KWI9YtcNXFVaq26cGADLYnQPF/Tzb5oL4V8C3m0BeooakUY6\nfR08OL1BgjLziCBKV7OYJetgjqMXcRM4UCihn7VeNbXv8nX+VnlbKL9yvbKO\nVwTr\r\n=Itt4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"5cd02aa12e0bf08a9736f11f09ebaaad582eed27","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.1","dependencies":{"@opentelemetry/core":"^0.19.1-alpha.21+5cd02aa1","@opentelemetry/semantic-conventions":"^0.19.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.4","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0-rc.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.19.1-alpha.21_1620759003326_0.6598899978093107","host":"s3://npm-registry-packages"}},"0.19.1-alpha.25":{"name":"@opentelemetry/resources","version":"0.19.1-alpha.25","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.19.1-alpha.25","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"8eb944ae4473165cabc06b10f2490acc9e93c6d0","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.19.1-alpha.25.tgz","fileCount":81,"integrity":"sha512-BBQ1/LIcL+mogWS0lls5g6lOLvXOi1j+vvvgAJ7lEz5cg0iWzolMU8bLilrXBoWNOL19YHswHn4GZ8GvL0EeCQ==","signatures":[{"sig":"MEQCIAughmntk2fonGIWjQ6nV0p2pj2SUFcs5Avz/cb8vxIfAiB/VjLtbO7NpsxR+vv1POEsI7rH3bwoG4mtjm8VDN7nxw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":100158,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgm/oPCRA9TVsSAnZWagAAJ8UP/0z3SH0x3tf34NwQK2k7\n1ROf6DQm2CdoDNYuKIOl6nPSoMLrpIt5xVEfIZZREfPMDSp+uPJ5MnjIIptI\nGFB2leqdzyvh2wbWLFh/8LtQ7LgSeAdAvRofk3yP66fTI9m+gNWl8Ajyay50\nYF5pxZ2m85+3VACDzVDW2q8sd2znYWpb59hy0pJMk5mz5JSm5S/DudGPz3kS\nrwa0gS4aC3n/PU6Vl2kdIWVnsiuOy/fPtfKxo9MAg1Qp4lxY7T1VroYrYIPa\n7hdtWgplKL3NXG+fjtYnGtI8+quQbj4PBJMNI+UmxSeK1fJqy0oTENd77v0w\n284c/UQis1Er3BZG/qceulWFeMQRG/AYujfFES4FKCmYZKaLTEM12ESNNSB1\njZuJssE8eUoItxArZsf8dHysqhz6KST8rBJPT592XMWZMLwNT9o/yPfRfbUG\nbaBgvGdCUMAYogpwRWy/mhk5l0eGw2dDMjCZZjQfXqphz2iT6Y8FETRzpX2F\nkZrOq8mVKEv3xnjJCL1FRFjg7O0cRh7GXsVEu+ZjCXb6ulmG6nCVOuZDdN7U\nnoiI0GYQkikVq6I59Hgk59Oo478nHxwJrcR1yz19a/k4hLgZ/ke/m86218aQ\nHNVY1THgllB9DmXNg6bNs1ccRpnxlAlNVSMvaDVlnqPvun37nPkaTq+d2zxm\nCya0\r\n=RXJN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"02239b52557fe5b4c5ae6eba742340428b856492","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.1","dependencies":{"@opentelemetry/core":"^0.19.1-alpha.25+02239b52","@opentelemetry/semantic-conventions":"^0.19.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.4","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0-rc.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.19.1-alpha.25_1620834831462_0.9127695134940446","host":"s3://npm-registry-packages"}},"0.19.1-alpha.26":{"name":"@opentelemetry/resources","version":"0.19.1-alpha.26","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.19.1-alpha.26","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"96616778238e3899b10b46ea15f5fbbfceefc864","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.19.1-alpha.26.tgz","fileCount":81,"integrity":"sha512-vd9mIoFkYXjIy2SGQNb2yVjt7KFGI1gpNuJquVR+ai4eOuNidgEfLYYZ2CGjm9QwBSFQCXmAWJN7Kxnx3tgPAQ==","signatures":[{"sig":"MEUCIQCawsMgPM1S+mynMsZWbq+mFtVCsuBWOhBR20OuC07LGQIgVnCu4VtQlriTkEjyPX1rKy7T07/LhahghD0/0YStRM4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":100158,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgm/0ZCRA9TVsSAnZWagAA1UsQAIijfS8D+Ywotv7YLix8\nxPQ9klVmfuuSCjiKhYR1/boTOGw8Ycf7kgzGfP2BvgbTIIE+33rIShkHlwja\nNsv3B83wgMZgxUfeQioDPBW2cFDM6RMjAcoZZ/nWpmRdiIY1k/TwPQ8szsVQ\nBe1TExkvO4P1MsHCjqGjr/ZduPHdUoXPpfrJvFzcCNPAgecK5rikQfwrKsQK\nWHYRLIBgGKtIXLWW/NgjwtJF/p9EhshrwOLS6Wpl5rRS2c7n98cIBEE2oTqa\nkDpp00zM5/wU8jwqSkq1XNdRnmV75r363CTVAB9xX+HKpjth0LcRB3E1CrIG\nPgbH89NJaAh/b0rFQ2i5GsP3QD1CyANYlKzQTq6nWw79Oo6GV2Wt3o+6/AxU\nQhC3Ja+DCVTb4voYOQirfIVkJEP54hVtpRWMekseiMHuxFjqq5YQHxFYgUk8\naq1aVDyC4uw/3J8wGHGEXyLmlgO/A/h87w7roJ4tCAbmRcR1FE1dl8YxKo1N\nzJUmu0vKP6lNHRqFxlB/6SFBqe6lMwm4GnfVjmiRDrdbD8oiDPjmxxYfTflb\nJtl+KC7LubOm9lFw0EyuemB1GkTqOzVNte+fmUQ8v0l8mAOfP6kHOT1eDtjO\nfdFQCkZDcGqjg6ZHVRtd1jteHstIo2BLTZp+Jb2IBne5IkOxyumb9dQ4A3mE\nrHS8\r\n=MTcg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"1758fa6e84333c9c43cc468c5e99dd3646f7e3c7","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.1","dependencies":{"@opentelemetry/core":"^0.19.1-alpha.26+1758fa6e","@opentelemetry/semantic-conventions":"^0.19.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.4","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0-rc.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.19.1-alpha.26_1620835608693_0.44066465167865365","host":"s3://npm-registry-packages"}},"0.19.1-alpha.31":{"name":"@opentelemetry/resources","version":"0.19.1-alpha.31","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.19.1-alpha.31","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"f48555ffc769342fea0a78ad3eacc0e249cb761b","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.19.1-alpha.31.tgz","fileCount":81,"integrity":"sha512-v7bgYevIabB6tsGY9k0SK4NVZrMZwEubNsxpxAyfvFT0EiYff9MxtA3Mg/S6xHsPEGAqEOTYrIsyZtR7KOo/Kg==","signatures":[{"sig":"MEQCICNil1+jFnu6Zl5B+f5agY2QC37YUF/vx7Q62LY/okxAAiBtkKT5CG0DliJtYOgI66A3A9bTAmRfpqoqusa2yBvuAw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":100156,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpVPDCRA9TVsSAnZWagAAiLwP+gLDZL7H0BB1UdP0aV4X\nj/1Q88W7MxE0ZvVUfpSpvD1zirqG7IIWFdOmQDlDZK7BosAb4nsAUjmRYYHG\n2oRtGVmg+dKHH7qXVP7dvRSyc4fHw56YyGToYBuBupnBQmPMD6v/FPEeG6Yl\nxQXiozKRMspX/4mgiprpZgVIV4wvl/Sp+oNUlY3apLT4CiZIf/doq1p2TzX2\nL5A/iZ/WPxSMCNJrfQFkEUIGsWRnR87s0NPkhu9dqMIFGmttenw+dEKHmlWW\ngax6TJPAkKp83v1Ce2okjeyFrKqR+/bvzuNqGMVjRKcL1BDD5so5c3kcwpaj\nMVPRUFoUqaQ1/eqjy/YHJqfr6d//nxU9yKpVEsAOh2/kiHg5tdROf7VRdyfj\nFRr0lPRvvcZTwOdo8tqOz5XpN4kwkt3EBUVGvGUvuGcdXCjMROGl6K7qBfAX\nEKg+QdcqEkpiEEdxmtKWFJjBJ8FUJ4gp3aVbNmP03DZKw5qf370is87nr4zg\nz30GDghwdRjqR/v8AyEeQllNkSb6uHQ/ubcWPIsu/Cw9OfOgFQkMefYPT/SA\ndMH4HDWsQJX2e4t4Q8e6FYMoC3Msfpuf9H0jYQBljujahfBtjnQd/1kgQa0K\nnR+mZvN2ZAIwa6hFzYI0rsYBFXpxlp9JAUrSWKz5PYU/cMJVuTqdpijJWYDn\noXOI\r\n=VarG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"24adbd61062759f9d9d57420fd97e50f4d8c3b16","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.16.1","dependencies":{"@opentelemetry/core":"^0.19.1-alpha.31+24adbd61","@opentelemetry/semantic-conventions":"^0.19.1-alpha.31+24adbd61"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.4","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0-rc.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.19.1-alpha.31_1621447619562_0.33286986831519605","host":"s3://npm-registry-packages"}},"0.19.1-alpha.33":{"name":"@opentelemetry/resources","version":"0.19.1-alpha.33","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.19.1-alpha.33","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"7124ce0014b0f267a1ff6749fe25d9ac20c9d49c","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.19.1-alpha.33.tgz","fileCount":81,"integrity":"sha512-wBFkNeG4rF0TqiW8obyS6KQhBSV9fa8KDNPQNgOooI1xUffwPV6z1WgD0QBnVmAk46fevOoJXpE1yxECulHO5g==","signatures":[{"sig":"MEQCIA6HovDQCelFDKKSV2PiiDEAEGCezDIwG/PfVVVL9uJHAiBakHi/+UiF9GCFQLg9lWQ2cWqcvWBystVa80F8lD/mJw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":100138,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgplIYCRA9TVsSAnZWagAALNIP/1pUFqjys1LTBGm132wf\nqJaNd6OrqMhwnmovFPDX10QjWjrox6vSBQ6j8YtYgqn77Ac6lYosApU9iyJ6\nROHDvxG4JNy+8yQ0GxZvxYs+2ENjZ1KpoJYjSN5tTl+rEhzPVS+4/n+YWptw\nozuKwFkEZFHYWglcEd2l/58serQ1xaFDNWPVy9/EkzL+XiIik2vCW8U5FE7r\nngm5JEBtsV5cqEK7xDDH+pGBB8GnCh1S6jpk/G+G5TF7k2416kjNy2/HZIvN\nXI39wyfdQZ67G03U6L6wE9Lf/iI+kjITtOUq+yHNNOzHEEYD63uy1HUNmepS\nqwFL1QAtMV/BqsEVyvCHbrtpBsO9NVWhLYIJfy/lzGg7bQ0KbilFDCfVZlkQ\nQX1IGPHw+eRR0CO3jbQiBCVePU7/vmOXH/CYb8mG/b+TI2mp+CgGlW+/7TEK\nS7dWT9sAwRjubRHOyLvurSr36JP1yEg+4yAxD1DtFfgO8wZp5WqdSoSv36RP\n0ktxOmAVX8zkd/sl1j6eDyjMeWcTNRfCsVJuT4eX6m3WWUqYDbDjMaNH/s8w\ngaU7l//P7Fz6hPGA59GEcaiinXPBsdaSd0KTN/d1CdxfarceDfH+pG8Adfd9\nOw/lOwYSf8y986T8zrE3qgUDOLnFB2J57KE6/3Gy1J/ldGxPvsUlIzSWnFZL\n/SRN\r\n=NU8i\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"c85fbe6682b9a8fd52e4b99bdbb079833b04e845","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.0","dependencies":{"@opentelemetry/core":"^0.19.1-alpha.33+c85fbe66","@opentelemetry/semantic-conventions":"^0.19.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.4","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0-rc.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.19.1-alpha.33_1621512727716_0.9884474585961194","host":"s3://npm-registry-packages"}},"0.19.1-alpha.38":{"name":"@opentelemetry/resources","version":"0.19.1-alpha.38","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.19.1-alpha.38","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"b21990cc17a467f973fd00869ad7b304929f37af","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.19.1-alpha.38.tgz","fileCount":81,"integrity":"sha512-YU74lR4lqBquXy6O70iwpAPRrpy5zZ4o2dcW3C5ha964ZXn/VD80usPQyG96wAvTuBzGYqtMskGj1zZxx+Nezg==","signatures":[{"sig":"MEYCIQCYOJaGt2LGF6ZHSstvh8faFeFGgaGMTR3bLT4ffms0OAIhALbwSsYv201aDdz3DV+hXMNnPcFBOzToycxBTUcQwT4+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":100130,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrmMfCRA9TVsSAnZWagAAoDYQAJRAS15v077sA00tJ1bx\no8bIP0ksn41inEdnm5c4HMQ4TRUj4gzEX5hGmsW2jCX6brVrFN3k+NCkkWn3\nTMs8JaD2HVJAfJCtoyL43yrEnbWyQ+uKt1u0XMHijvoxg5qY+Xz8/8NfVuk6\nIWrEIGhooLgSlzSLVmt8Hf5DW1lH/+OEHocElf4xTmbYi2z4EV3oZDluONjC\nNm85lCe8LuuVwbZhGmad2VFDTBJsNCdcRpsUdiV3yw4FBF/YBo/cz1iZdLn/\ne3sVzV3xgEGStAOfX36TNiX2PxmS31teDaMzPA5ALm4MhWh8l1pGlUasiB4C\nXSRdwdrJjTg/+SURk+OZhN3im1nSxMrLtMGx99QP89/ZsMeu11xcgoZdacFJ\nrk3H99utfw5XUgvhqBuuHBe6L73wyMjTxitgoSxvjs3QaYT9GYy1u/Oa0ZBb\nxHIJk6/9+/z0usL3xeR+NUfVYLuwp/YxHpR05kLembsEiCOVGecblez1m9hX\nNetlYaBPbg6fHYx1xmK6rENQmeR+tVvgk+d2fxCOVIa+uED0HgduzddjMnSg\nSVBoEu7sVD1eVgEWGEpbz6b48133AMtlASYUz8GDixFuE0j91J4MzDS5BBJ/\n+9EQE/je9pSDs5t0QKWZuT0qcUQHVBSKtobhzhOqHaMZ8iwnE9IHuGmzCT7Q\n/oTn\r\n=6ihp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"8e5c8a0965c2dc7517dd9f2084aebe56f678be89","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.0","dependencies":{"@opentelemetry/core":"^0.19.1-alpha.38+8e5c8a09","@opentelemetry/semantic-conventions":"^0.19.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.4","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^0.20.0"},"peerDependencies":{"@opentelemetry/api":"^0.20.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.19.1-alpha.38_1622041374055_0.3451194058354117","host":"s3://npm-registry-packages"}},"0.19.1-alpha.43":{"name":"@opentelemetry/resources","version":"0.19.1-alpha.43","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.19.1-alpha.43","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"8b96ee959d7d2fca27d06a6800a32d079e462b21","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.19.1-alpha.43.tgz","fileCount":93,"integrity":"sha512-Gpn41FsbwkZ0+W07tmC9plyvZjh3oIAoKo0cVbwyasBysBxdNW4UDWOFtgRx9Lfy4pFhXJA9pmY56KVDwnvYWw==","signatures":[{"sig":"MEQCIDYBj0NnMchHtN0JS52+QGe14/7S4u/lZhVPDU+a6XKUAiAVG9688/xCrJ/8cfanHytazfC9lzSycVbi6YDlSAhpRQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106156,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgto53CRA9TVsSAnZWagAAcR4QAIpxNfeSGUA95b/XBCGL\nAZC3e5AW6z1qRC/PAwIVsCScVKxTn23LAotturntCNqeuXrYH4BaSuy0pGl7\n5za3KE0wRiwmCrTJpXyOlhq0Qu/en1x4mHZhJA4ReacICuM9S4HrCFNzQ4Wo\nZ1dFK1T4DO1+ccUIEdjezm9+dZvMk5SlcKzo4xCPZ+azxG9UvEXKHZh2G4T2\nBcP/EEipdmVudA/byNdjFRzX31qh9xpmBMCYDUhfU4/HOqYdnZ4B7N566Rsw\ndR4bE5TPE+wEsQGZ1hqdiVtcMBWvA4cXe8uBCxgscZB01nFJFk14QIvI8Lmu\nBbmLVYndOmtgpnVEd5xCU5qk9EHxfau0nI3byqtXeHWnDgm2pynnW1UKULht\npzEs8b5DvfjIdFFaZK61XjrfmlyAIfdDAOFV6bBqU8upe+VmQi2vzE0OG6yR\nmNssC6B0BbatJsF3jDfR9s+SjGj2PWNhpLkCS2NrtKYogLzP+X4GiqHZtZd0\n5n2ZMG2zi1GA4GQg2oSGEjM1OTH6TJJP6Oa/jNvTPSuF9cob5GBi6ftA06Ij\nn5ciP/lEipiXkkl63yeWgIkw/W/WQ+siGplPo/BLtR+C2ymWt8Wr8//WqJbo\nj1Kf8EoN1Q4qqMZ/3H+zdS//pcaYujSAUpYZOto1q098jC86t2XgfRXauNew\nz4oG\r\n=rz0/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"d5517812b31d9206131bf1df4f8a3b5183ab07fb","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.0","dependencies":{"@opentelemetry/core":"^0.19.1-alpha.43+d5517812","@opentelemetry/semantic-conventions":"^0.19.1-alpha.43+d5517812"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.3.2","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^0.20.0"},"peerDependencies":{"@opentelemetry/api":"^0.20.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.19.1-alpha.43_1622576759556_0.619810894845092","host":"s3://npm-registry-packages"}},"0.20.1-alpha.49":{"name":"@opentelemetry/resources","version":"0.20.1-alpha.49","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.20.1-alpha.49","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"685a6b5132b8b52b7aed814b5d522a5b4141f6f5","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.20.1-alpha.49.tgz","fileCount":93,"integrity":"sha512-U+pgP+C5OB30cTS6gLzTCsURRNFEMBhpVn5/0yPxYQfJIgeO76BNBKi3oHk8VqjEi89sR32cAdv2mE8i3iaYXg==","signatures":[{"sig":"MEQCIEZPGRg2OZ9oEHWERobqc1LBqIOZGjBWBpde5+ZITSF6AiBqlS+8mTPNKak4vb3HOPepzPVt6PISWj4McmE4YBJOxg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106156,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguQzhCRA9TVsSAnZWagAAmvQP/0+vwMxvZh9+8zXV5W1Y\nMXitJyqCER7ZMX2XqTWkCRCcCFa2mzLYNuS8viixx8SHq7o43b3Znw0Po2m8\nNSXJFCiYTG9zBJZV1aGG1O/MEOR9y/aF/+SK4OKJ9Ji0hLY2GuMWy/o2saG2\nxUo2BG3pJHth2wY/N+JvXngw2zBYH2SxoyUr0YoOgRKyxCEnMAr3tfylwmvY\ngX6DZ1RBlvnNrBNEG8Rh4Mu9ZVgyqT0tv7HO6LDceb5Tr5p2hhU5Ll4B3sYR\nKAhSCbJoaNvPvb0XUZ5NLrQdt8iUw+pi5fy2Qm9lobvvT9CazOKnZk+bOnjo\nzMmALWZy9TScrCWfTdGMLjYFKKn7Kj3BUH9YNv9dgoqF3xHvD0T07qO8H0X9\nn747Zgga6DWkd0z8U93Q1Cl0RkI/iEAxlsjmGab4lY0C2NZtUHjx3Gppr/Ve\n6uaIUBhwo1KlMK7cADlUkMoP68kkBCnckfYrPAqfLRcog5MEHgowyie+euKw\nuXK5S2UghmLyQFGjO6RC9tqmvMB2oD4QBLNIoyTKYNcJKd9brwpRWgUIlNO0\njrr7bylTDftcUzWLKLjlPhzj0AjCH0g4jMWzEPvquEekIx+JGg3LIrScsS+x\nzRbFYiyNy2pX2AteKWgA3IFdfsVHt/JwfwosVqhaeG9mOeOXsRsfSbQQHwYy\nXvWf\r\n=UW5j\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"f79aef422b53f1314cb0b031651875658fc17008","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.0","dependencies":{"@opentelemetry/core":"^0.20.1-alpha.49+f79aef42","@opentelemetry/semantic-conventions":"^0.20.1-alpha.49+f79aef42"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.3.2","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^0.20.0"},"peerDependencies":{"@opentelemetry/api":"^0.20.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.20.1-alpha.49_1622740193577_0.21777307160266046","host":"s3://npm-registry-packages"}},"0.20.0":{"name":"@opentelemetry/resources","version":"0.20.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.20.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"038d985c610600cde146ee1e95b6a124f3ad4754","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.20.0.tgz","fileCount":93,"integrity":"sha512-nnd3vIM+A9ih6kOVBc2CF5NkTYmdNci5aQ+A5lQjf3HqjEptcGubpg1J1Q84LSFVoITvuH2O6+GhPBrdxYBt8g==","signatures":[{"sig":"MEUCIQCb21tqC6fu860KwSe3vAIjFK1v3qHBySa1UgtQML5v4QIgUQE79C2HtFSBO08QrKTs4somb44oR10uO2tTveX9SeA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106100,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguR9SCRA9TVsSAnZWagAA0XsP/1w4cytHgHP3azd7g8Lz\npMbUldkhgHlV9iNnXyIGuLPmLKjfg7B2wUXhCub0lIMFJCVDYJAWIl4N13Mh\nsY67CfGYaaYo7XN4SfvdPu9h4OUR5C3yg0Uh8nwv3PvxAVQqgGz/hcjyiZ9v\njQOcMwmATlTXImKm736Y2MGQD5zFPYUorEno1ViYiLrBGWrpFFdwfw3+1lA/\nXqxHfDTyOTAK3CgK+izz9P/cImdt0tOkxR9AIP1F5+UtuIMaXFl9MI+Oy8hz\nAEKMBLcZH6u9ZzOdGO9pTW62clKSoIRJj3CzfGQUZnOhTmyBRh9+VeXcb9ik\nVyLJ8NGZf+IdaaviCeoohwLIN4oH9PGWIxIJyqXyle3fIoYgTFlwTY7dr0Nr\nc8e3v4lpthxWfPvt70vxXWh6+I9/A7Na0xnW4IfiR46RhBeV8li10gbWDiCO\n7W+F339dWAhtLBoSu66Obqax+C7wWLyH0QoOnqabpqp0XS4/BPYyJ4t5Rxi0\naIxfCI/R8OmCcWD0k4lHibYqSdf2psEgybnu95k3QsfZX5o6i9DR5vO6ZlFQ\nhtC3pFl9joWxWE85GdGB+v9DSJT2Z0nI2iK2Xa/E1i982nTGL3clsaZ6zir7\npuW7t/4nCJaiKlGn4rt40axQ1ikY7S6xGBq916RoLnIWqdNXzJcdh4Npw0KP\nikJl\r\n=wRS0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"f79aef422b53f1314cb0b031651875658fc17008","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.8.0","dependencies":{"@opentelemetry/core":"0.20.0","@opentelemetry/semantic-conventions":"0.20.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.3.2","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^0.20.0"},"peerDependencies":{"@opentelemetry/api":"^0.20.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.20.0_1622744914395_0.9380637341423352","host":"s3://npm-registry-packages"}},"0.20.1-alpha.3":{"name":"@opentelemetry/resources","version":"0.20.1-alpha.3","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.20.1-alpha.3","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"283175622a8b2016d45c968ed69be9702f209a0a","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.20.1-alpha.3.tgz","fileCount":93,"integrity":"sha512-9TVUEQK5ibZZTQ9L2wkuW9SBoWe+bh7Om9sfSFJNlKx/vccOLSKLJYki1gGKbuDH/noMcIA9Z1yK9nHixAI6Qw==","signatures":[{"sig":"MEUCIQCVAnRvYi1A/uC7qOs8yvomfsFepaw1+KF3sg+74y+YMgIgWSqiueAEebmGVFxMkmQ3frFARt0TQUi3hCkJGnBZ5yI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106136,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguzXMCRA9TVsSAnZWagAANPQP/0N4nDorANC1fZsfZ+57\nioBVWh5lbjSh6x0Mj1OI+APIbgmW3mWJ6xMOSxjTt2CV0vDkH7vYmeRRvQMr\nj4IyzNG3YnQmSM4NxrkK75fpLVk74NOGO7Ks0MPxGs5S8jIXNXuU605QsJl/\nibpgfu01dzUjQul5X21XSCPMe5cVrSPA2QcIkIl5hmjB/E+Q85S00IujYDDo\nC27qIrUCy158ramXbXP+OoxXAjyNsTsAjp3VSCwlX74CAy+Hp/bwAVyN/NYq\nJeT6NUlyhztK08wmxpiMS56ZE9EY+QKeeW+IghN47UJtghp62Qoih/c0xf1q\ntP0+8qWR69xY9njcDE/7LxZZWklsORQBtKcF/VbJY6bKSPsE5u4Kmdb7WwiQ\nt1FSt8tal7KDsYEHdt9T6nDMUm4qiuD1x/iyKvARq3lw0vk/ObgnltoH0JHP\ndD9tHy87oQkaCFMyKqrvNYwIew9pBma/301KQb06girR3yUC9bY1kxkqiOMO\nlH81oWDB4FLu/aNAsNd8k2clctEqH0NdcQpjqUXYNzXhfr6lewyqmn9VXNZa\nBK9eB1bQtjeagPDd/XMDn/0r+G/svKuw4FRT2elxjNBiTKSC6kvrES182k46\ntoKnARsCZfDQ3nzH5Ju+gj4EO7Bo7oLvWE8aLe4ow1dyzVpBRpIStDBEZYux\nO5Tl\r\n=8f0u\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"d4df2f7ebaaaf433bd84b568c482e2788103ab71","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.0","dependencies":{"@opentelemetry/core":"^0.20.1-alpha.3+d4df2f7e","@opentelemetry/semantic-conventions":"^0.20.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.3.2","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^0.21.0"},"peerDependencies":{"@opentelemetry/api":"^0.21.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.20.1-alpha.3_1622881739853_0.5116257365417047","host":"s3://npm-registry-packages"}},"0.20.1-alpha.4":{"name":"@opentelemetry/resources","version":"0.20.1-alpha.4","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.20.1-alpha.4","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"54dfe98d004176bd5d70291eb09eb36f5c69dcb4","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.20.1-alpha.4.tgz","fileCount":93,"integrity":"sha512-YO/CnJLk+iPgdR43PyvhVbcUTq1hh12HCVh9SuU5zXmUHTZMvajZbgBJCehfUowtnRac8N8hMItFqOmpVrif5g==","signatures":[{"sig":"MEUCIQCJWfoDUlHj8MKq3nmFvdBb23veaKE9cHNWVVHB112+wgIgdLycWAlLHAKRZZm6rdFBRjpbXcatXPPHMJpHsLngOKY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106153,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgv3BaCRA9TVsSAnZWagAAUuoP/1SFGqhXDV8kVUgnuxRn\nH3RLL5B0iaAuCoWLlqWWYrfqgAy3JB6LFCFc34hIZBOLHlrOJYH+aOPJN3Dp\nst8NQ6xdIFmgUl5/0vxGYV8xwhLjCsC1KL0Jy5Mgub33T7eT8RsVvE/eRJPe\nXkNNW9Po3TPgF3d/i0klh5t9UN8n4ZBv2tPB9MNqUKDQnAD2RbDJenTAF4mN\n2WsN6nrJpxwTaXh562bGPcMgUUNY6mmE0WibaIqDMmRFgp985YqrAxlg/L81\nNPUFOgY3kPLwmDWOEXpYYkafx8rxomOxHj78zHHa0lQ02gypFf0EW8kq27uh\n1xdNxstAB2aM5n+pZiNldAfo0Rw6GOydXmckWyFPHFlHdxdrVDxLEYH0nfE5\nAPwAFqhCNFHjEDF72JEoCg7M5QYYsnYxbFBSzlFDiSvFCgBgjOhk7QbdgLU3\nrfF0ap8z9WMi0lcRnrSU8u4jGNg6oCr7AKrGPLzPPMPLQAunqTCFs6vd1N0D\nkahLz6nho9opCRpTBj7CaMLJN7lSVLz8Jf585se/9WVunWCXf3NRvOl/Xg2E\nlTLr7C9xPBLnd+bEbbs4eMs4dPzbaxZw9w/AsWr71HWPB197CyZYlCS+cV5i\nBFIBVn6ennniqEXNl1xijaGoa4UH8BM+/+gycOWIuQf/m1bHGsb+ULyLL1eC\n9lVz\r\n=4k+8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"3d98420cf530968e6a85bc4b9c2b1bb78b730b3c","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.0","dependencies":{"@opentelemetry/core":"^0.20.1-alpha.4+3d98420c","@opentelemetry/semantic-conventions":"^0.20.1-alpha.4+3d98420c"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.3.2","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^0.21.0"},"peerDependencies":{"@opentelemetry/api":"^0.21.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.20.1-alpha.4_1623158874209_0.6398461186550102","host":"s3://npm-registry-packages"}},"0.21.1-alpha.7":{"name":"@opentelemetry/resources","version":"0.21.1-alpha.7","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.21.1-alpha.7","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"ff188e8273f81b420ba596c7efbbb56881a79ddf","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.21.1-alpha.7.tgz","fileCount":93,"integrity":"sha512-zPbolRRtx2EB8DQmB8UXMomA0M59V8GFeJ+s5OVYtHwq/8N3C9e4+AIrxv1Fjeafbk5W8XJTnUCXNrL89Dn+Lw==","signatures":[{"sig":"MEUCIEoVPFg1gbLDx0R/Mca3OjDepF2sn7lVa0WLlMiLzji3AiEA2FP/jif0xQTCOeXoyxSqA2ucqZBzZVgSQrOKVsbIdvQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106153,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwkswCRA9TVsSAnZWagAARAoQAIVmKjdplwSMrHiiA115\nqN7XRtX+XTAUACwOLx8o3bFQr5t4Bl0rK7CKeGzJhXZgfIh7DnlMhH0d5hKB\nx288YkZ7TO50WTBDhf9qbFC85lkBZB07sPr4xFmvWSEQjkMWbV2Vz7nkVZ/W\n/GGzIngHsC81EqO4lxYj6ukLjNKW8gGLVsrwd6m5Mnf65FwlSNzqQLaOej6o\nH3zJLDVz4toE2g1scRTea0bWm/a2fBdFOALXdyoQuHKAAuCXoTT0poJ0fiXY\n4BAhfQQW2MQewkNApLbIrIgGMaUp38NXpGRXWxnefhNExj+Ak0vCb6cRFGBP\nkNny1I8ulnlUrKzMOwMjUurAnuCSOtg38AVjnqoykHbD4fV3eB4bgx+Rlnaz\nzQIKOQ2lrly+7gz6W0cf+78HrBEK2xtaz0O+SbzktBDPfLdhULs+7VS7Tgom\ntVjeUfARDubaoGvy1z3ra6dVe4GWLsqd5Ce4/GZLaXL6lk+ja6YdVJDBtScd\ng6Gvn67DTNH3dcYyGjvh7jBlDMoEpAZ28Hn/Dn7qsWZQRlTUy/2tQWf9ue/x\nxFtw4E2lvOeTDiy+eAAtn4AJ+E4n6CYHDUknxTLkvNkXhsa/DMGh2C/EHxUw\n41okT7QCUjr9RsLHp2TXDapPS6Q6WcqfXrKRpa/USYM6rmOdKYW7awFjDSNy\nwJF3\r\n=ah9e\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"7750282034ee58bdd257446c2970f01307d7522a","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.0","dependencies":{"@opentelemetry/core":"^0.21.1-alpha.7+77502820","@opentelemetry/semantic-conventions":"^0.21.1-alpha.7+77502820"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.3.2","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^0.21.0"},"peerDependencies":{"@opentelemetry/api":"^0.21.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.21.1-alpha.7_1623345968095_0.9738230477407426","host":"s3://npm-registry-packages"}},"0.21.0":{"name":"@opentelemetry/resources","version":"0.21.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.21.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"1b5fdd20d31bb0acc1104a689a3152d0d7335ad6","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.21.0.tgz","fileCount":93,"integrity":"sha512-xQUL2/2npP/isH8sbOSdynIRWmlM6p02L9Ex8x/BhUuSkGrMoxO2ezLPPYnfYam1py6ubaz8m1C54O2IRCmgQQ==","signatures":[{"sig":"MEYCIQDBkocSWFA1XgmNDl6rWtRYknQKQcAOkE824g+rCO3LNAIhAPxfsgcIX/XMFaR49OzF93qlyzoLkHe7ZXb9CldFeXFi","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106100,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwlocCRA9TVsSAnZWagAA9uYP/0H5IX9SpycZVdObJ0ju\nIOnIAtMWgn+mAzgIBtU+8AfZAVRR9qWsWiG8Ml7ahpMMVygM0ww43gjo40P/\nZM9F+lbw+ntKSn39E03o/uohI/a6uQWSE3RWondg9yoUMrl24LA8acbZFt4t\nBEiSkvwlNZDMXrJa7ikjnY4GDiebFILy891g6a2U5je9/Or0wXxE0vJSfrlZ\nRXyXk2AuEcx8jJ9O/y6lrPMDmecyGk1NDs9j63AMSPcZ1u7EA83HvxV+pMlB\n9rSzVaCIJIXUKUlIfUNheIAo94vt9ceu9oyKfl2i1TqjBm0JYP+980RgSOIq\ndCJZ35c0GkFeJNhOrEyTZuot6x3vu/WHG4jXRgYh4spyTNu1ViwwGjwSm2dj\nsUMGYlcW38fbK6d9+c1EugeQVgbU3dLZ+oHHjhF3s/MFHjabg2RjTXTIqE1m\nwZeqZv9FTcfE6MmLfvYqDkCgPxpEc+FI78v52GTKuaqcWBrKCuvsHhxKclq/\n73t8rCaDai98GCiljwBQrGmmEMqxMoxlra9U/FdZh8Sf4YKZoALO8JAsYr+b\nVuwdKEK+37Po7ECeGXX07m70OPQh6SU/uxdBd/HOPd9eOxZ/Otj1uxO4Ulp2\nVFH52CaTMERtEtVv83hFALTXiMgCXYGHqarrOTC+gP0eV1dyQPXMaWe4lg2X\nDriP\r\n=qCiM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"7750282034ee58bdd257446c2970f01307d7522a","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.8.0","dependencies":{"@opentelemetry/core":"0.21.0","@opentelemetry/semantic-conventions":"0.21.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.3.2","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^0.21.0"},"peerDependencies":{"@opentelemetry/api":"^0.21.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.21.0_1623349788600_0.14299741062600813","host":"s3://npm-registry-packages"}},"0.21.1-alpha.1":{"name":"@opentelemetry/resources","version":"0.21.1-alpha.1","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.21.1-alpha.1","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"18ec2f2051460c42cbc7bf9c2090061053f692fe","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.21.1-alpha.1.tgz","fileCount":93,"integrity":"sha512-tDGystnIQUf2gK2UykEn6aruMskO1VA0Y+Rwhi0cuaJBdWpCL/innBrVhIsQDnCs1lQV7puUrFkOzEWFd0F8BA==","signatures":[{"sig":"MEUCIQCzV+B/sjWwP5gDM0qdKN6tZ+RJ/ihI5imY4wCQkteB7gIgRG4PJUhWxeq2qoOLWAxX1aKE1499MvUhVAR87KfW0Xw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106134,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgxG9BCRA9TVsSAnZWagAAUTUP/3ou6SRygRsupCa5bTYZ\nbyotv1tPW3DMHVoC0elebXMPrc7+JJ+YTC2X+mZbumOzL31xuMvRkajS5HSM\n7Uqkiq9iVvkjC6ySkeY3oSuVLauPZlovS0PWTPTP5CsmN4AhoR8w+L8sKMIJ\n+2YySkzzBShgYmoc5L7BVpAQgUQ9HpicqyNzZD3Ugmsz1Zhv71pMIFfWsRCI\nx5eAUKOonRppiIdo8gYZlfWACMkVf4jBJyPJnJMwTidwEoOks5HBxd1bjuMu\nXBOayE/q8/QlHMtEM5nDInG00Ny7jS7jRvz99g7GnvzX8PIm9rG171r8HXgh\nLD2VHCvb+nXtWzGPm6c+OnTm5aIJXXwXGOn7n9xunLIOK5JQFvm7UICLRUoI\ncZPWrW+LEPGuBNib4Bm87aPn1jkaaYallgtAIWbSOHbLFtqdRmYOWU4Ep1EX\nYtNW9iHTvM8MztTpfBwhYDmJOGT+P0OPxV3ggGBNMDSjlu6nNJnSlx3zQZ7M\n1XsOoL91btMq2DrWMy17mYLtlZ3OSdHgwEfErFe/cEfWEe+qDtvTbTlOMPeS\nqU3zALPPZ6KHCje5NDJkP0QnVrj0+WzlpPwv1le3WYMdH+T6FR+sPDjFqqzL\nA4fnBITS1iUCBY8EAmg1VO4JbO/4TIBlPbRsYztu6yPStTNatTJ6lFw+1INp\nQxRl\r\n=F0Q2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"5b6573eeff537ab49d8d8d42217e5cc794f9ad70","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.0","dependencies":{"@opentelemetry/core":"^0.21.1-alpha.1+5b6573ee","@opentelemetry/semantic-conventions":"^0.21.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.3.2","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.21.1-alpha.1_1623486272893_0.18192027618272144","host":"s3://npm-registry-packages"}},"0.21.1-alpha.2":{"name":"@opentelemetry/resources","version":"0.21.1-alpha.2","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.21.1-alpha.2","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"13f20e084083bbb0a85a7e97c1004745548f021d","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.21.1-alpha.2.tgz","fileCount":93,"integrity":"sha512-Kwuk4qlqAv1USCQ5LNgLRLEmUpuHOuMCXB0YEL/iofYKv+8yF3voepsE/G2QfrhO949+lcZOHdajOrF5LBEE2Q==","signatures":[{"sig":"MEUCIBfZ7//cBGf8dtn42K+7DlSfRPBn69UtoT/+9/nMaPQyAiEAxLH1QXFcngKNFSuFW0TxJxrUqaTcZaC8ZIjr5nKvOB0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106151,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgxHHECRA9TVsSAnZWagAAsokQAKUX5jFtpG3QW+sFtKiz\nQWmbAxkpV66rFpx0zKNvgmgJ7iViXI7hTGmAKKBeX06CK+NCOMT5Ti2Ch5xq\ntiLpPE/MsknJ6/5AzGn9Zv+OGYDOpgCNmsSQUsCPGKHJM8rkn3u7r7ZD4Rqd\nb/jex/rTJmmCBv0Rrt0wYERkOyoDpSBjq1m4MsgszB3JqBU5Iq9yxLA31bs7\nbBqDBc24s+SFyA1f4qn1jgQSeu3uhJH7uGdnUG+X9nT36QiKgqc9sVBgNMR+\nbCqsZPtRLitwAT7hx4agSh0wpkrPssWmpDfiQ0SOReeoMTh4XkO8sx6F/gzc\ntXkjcG1J7vgMgkbCveGZWtCVRgJotTU8lodwTRTR9aljf21txWkHtGDwvM29\nLebWtW/IgXgtNatVHDxHq3XIbiq07mot+MijBOB4awSzMk110KJRmCCMRKn6\n2loHrZevcfFoXAidhl7PNmrpYayw/o/cLgUSq6oexVdu83f6WKhMbqO6r3M8\n+xNaHiUASaYkVzJXjNHLneAv6oPA04BKeBUOjwRyEWfNlFGRj2E+1tpPRmsY\nQ9xZOTSZm0Tz+mz2+D1JhEoNEtcBKyp+y8a4KHOWgm5H30wOFWM9qPkYzXun\nOnIawjPPYFxtzi60YcLtqxZqmbD2Fli0JdyJ6YfmBAalxQaeJrumKMzSUD5P\nB4aH\r\n=w3Hg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"a3b77387012a5f53c193efdefcbf5f6272876e4d","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.0","dependencies":{"@opentelemetry/core":"^0.21.1-alpha.2+a3b77387","@opentelemetry/semantic-conventions":"^0.21.1-alpha.2+a3b77387"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.3.2","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.21.1-alpha.2_1623486916842_0.8101785609300947","host":"s3://npm-registry-packages"}},"0.22.1-alpha.5":{"name":"@opentelemetry/resources","version":"0.22.1-alpha.5","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.22.1-alpha.5","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"9528eeb5876adb3b017828c23bd81fc09a30d61e","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.22.1-alpha.5.tgz","fileCount":93,"integrity":"sha512-vMpRRhKw6NJIdqTFHM9yiY1bopsjoDkIVRpP/pkn1ULOyQg+4o+0bKDtGccrS7lT+blgd6RQICA9xtYWCJIUlw==","signatures":[{"sig":"MEQCICNAUgnFW+U/k9nj9wOFafP6RAOUr0D7wxsKLGtyy4ElAiBTl1813KKfMomihnDuLFK35/VKSeOozsCHTwPNuIHYcQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106151,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgy4DLCRA9TVsSAnZWagAAWJ4P/1sc32lMqKbXrSbVE37H\nL3jwEYgP0+ztK6Oll0GIiMTvipMSoOcU10yFPAp8bK+k2mSCO413ZaqvCYlg\nMxB1+ltZoYpG0B56Rn4mv7rFnmRuOpojz7pPvz6nQUW2LocwA2N9Wqak75T1\nnZZ/A3O/YEsvIsRvqo04om1GsxoWybMj8ekG+JkyyW/r4aEjDl3WlhyW5eIs\n9hDr4pApBZe4bAAoUbHpDAlksTphKZZWNLbU3+HIu79Z6fSlDysj+AsPTvH2\nHrawBGW8OX8HZJJ2c6kN+ZjNXFlu10o36cUL/GDowx550tCzQyzesodYZ5NP\nGFqYJ4mYUREbA2UwikGcx5wsXI2pZnZM1Wprr9mhmpeO57qEmKjd3WqzRt0h\nHj/1mNXRJICLIY9w+KYJkSOgLVYfOIJEDYDuQbWCIglQgovvtcKPaYv6j6aC\nEVimp6H//TYZh8DomWLTx0HCEcy5fklpzCiMllgICY3vMbRu2pQBLzQaCl0T\n1bbZjpdT5fjco4xnT+ACH1cw/UfHvQJOg5swgt6wmPtzJ5TQdrB1Kf5pDAPm\n3pukEjgXRf9lbsEsg7LbztQlisWc9fsmJNFYlINnN6Y4DzEEfxGHdVoCSkhl\nMbwtENRGz1v3sYDP1ZWHY12hH7fhIk3nkzS13CTeDOqsDpydnrD521CHmIWX\nX4ra\r\n=zMxr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"7860344eca83449170bafd03fd288e1a3deebacf","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.0","dependencies":{"@opentelemetry/core":"^0.22.1-alpha.5+7860344e","@opentelemetry/semantic-conventions":"^0.22.1-alpha.5+7860344e"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.3.2","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.22.1-alpha.5_1623949514563_0.687422632983677","host":"s3://npm-registry-packages"}},"0.22.0":{"name":"@opentelemetry/resources","version":"0.22.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.22.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"a6be8fb80dfe978b90464d8a30d6ea285a6551ca","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.22.0.tgz","fileCount":93,"integrity":"sha512-LiX6/JyuD2eHi7Ewrq/PUP79azDqshd0r2oksNTJ+VwgbGfMlq79ykd4FhiEEk23fFbajGt+9ginadXoRk17dg==","signatures":[{"sig":"MEUCIQCVL8j10TlXLRR3Dzs87deWaTvAXOfJLpepZmQKK2nGbQIgAgzc0SyZfy707Wqb8zzMG3Zk4LGuQOP6VETdxZxatms=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106098,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgy41OCRA9TVsSAnZWagAA4jsP/0EfeO8MOhoX/zz/OgOY\nMS6tXxvAtDGZ1QDFc/xm5MVWiuyGtwvCm7+nm4aTT6bkls87RUJnxpgiOdVN\nrowLac0XvGpnUm9QN3WffN3xhPTKH+SIhV5VD11eFEUwhB/9cQJ/OI0rGXtX\nifNsI7+NsSdzZoiE06jVLx/GAmw2hchFtky3ZZZgpz5esOzbM5sWMcSU4TWg\nzCDT43TKXJ5hIEvcmRsRTRcVY/KNqT57Uxk5vjbGP26EeK7mktRQdz9cjgyJ\ngSKjjtsRLOpGJZXA1mr8NhfKjiQqesEGm9+1gbwQ8oS+7eJCcxvN62eTfZtc\nXkHSDxqpxmrMyt4DwdxAvPDgEpiTEs4L+Q/xh18aogfGXCbMpTvIlBZf+D7E\n71kRIPxsh22LtLPduURZwhg+p3FP4ojA4sfpYXQHM0ZOF9EYz+/KSbj8O1DZ\noNQsQbs3R8n7doXa3ehIyf2r9aZCzduNSdKTunvRRtmghY8PTNUnTuxgsilb\nO2Fkd4tvUu/KoTFe87qei0tEEyY8g3+ph+mLhwICwc+6O2PhwroxEsAKqPY6\nSi37L9S6mJLSX+Q2TQAkOfBRki77sj6UOwwebw11mGOXxiL5GORXDFyAmbGt\nfcAaI3pgQNwpOYxj3ML4mb+KwIyl9r7uqnjNYezKpA3otPIK5IhQ1AXeRM+l\n2ScI\r\n=kWuH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"7860344eca83449170bafd03fd288e1a3deebacf","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.8.0","dependencies":{"@opentelemetry/core":"0.22.0","@opentelemetry/semantic-conventions":"0.22.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.3.2","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.22.0_1623952717378_0.8822043278723382","host":"s3://npm-registry-packages"}},"0.22.1-alpha.2":{"name":"@opentelemetry/resources","version":"0.22.1-alpha.2","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.22.1-alpha.2","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"b4a20de9116ef6cc30d24a73f8cdc846398b61f9","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.22.1-alpha.2.tgz","fileCount":93,"integrity":"sha512-RyFJsE/9Kguln4bVmr3l8JmatLo3CVcFTH18oMTtqwZvLMqEaLHf4qh4dpEc/l+fl/RlivjyEjRC4I/er8wvSw==","signatures":[{"sig":"MEQCIBCTW3UAdhBT0PJipWXLrncAbet39KqXY0qizEcNLrlIAiB71e71qGyvWCI50icIDyfS9+4Mc8B0XLKX4eztMcEaOw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106355,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg01fpCRA9TVsSAnZWagAA9ecP/0kpYlBMThCqSh8vE8ru\nxKPrjmakjH4yEAogA9CW/lGXhEinrFVAKZrKn/CGficRVl+XzkWeHYv2UuVU\nVIfAAkRP7WAQi3Am7zpEy+qsK/mJL41nyfC2eDbKgxAkw/YUWr12LlaFa1yi\nhs1nHEJk0KVJBuhKYyBUzltplfio3k6Wzw9OjjEmWic+HMDWhGRGJV0XcnYG\nLz2skd/X+de9c8Q6TQUhVPjKRs6gj3r5L0CjpO+jU7lEkaFP/5y2rF0cn0CO\n5zBfq/SmyZtfptKHTf5BHvBMQKr6s30lgzh4sXI1j4hmJZy9UKfsbLKGYX2Z\nkpgAsUOgWRmz6ym3K67V4AaCs6KkGZsowP7tPr9SrS93rWNJ226TuNPf+zkJ\n8wPOWSCJhEcT0ILJn+3yg81ZoMyhQX7n8qAtxBT1p+sP6mzIzWk+k3ghtw/A\nLZqtBsfIQ0SvrGJfbkhAGPKrgGOBpd09YNIbq1K9/qf3cIpcUHXUtOyo4RKP\n6qdKe7NSgGOOZQZ/p/vW+DFJE8aEZBp1Fd1G2ibczlt4zXfNK26gCD5X0Gvx\nEIQ3sD9cAErJDK1S7DDJfr91Ah+tqkMv5bHOTP/QGc/qFS0gJ0ipzKGAks86\nRYk031gbUijTar6JBg4D4MsjFrV6PQR8d27m4rFfvDSosJYyaWuczb1waaYK\npsvs\r\n=CY3s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"bd2a005229ea7a0a64ca0ac7c2206ee40d19bfce","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.0","dependencies":{"@opentelemetry/core":"^0.22.0","@opentelemetry/semantic-conventions":"^0.22.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.3.2","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.22.1-alpha.2_1624463336561_0.5136039350924908","host":"s3://npm-registry-packages"}},"0.22.1-alpha.3":{"name":"@opentelemetry/resources","version":"0.22.1-alpha.3","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.22.1-alpha.3","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"3273ee4b9721c5d7bb5e97726c892b31fdda7b51","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.22.1-alpha.3.tgz","fileCount":93,"integrity":"sha512-yNcEhEJCLe3qmxuGpDmM9vZoiKfC0XpjCPqZU6bRlGKFAgD7PG1d1Kq5IAXJen35YDRSSpeaanRQ451RL+bkxg==","signatures":[{"sig":"MEUCIAJQSgoQCGlIfUm0ZNH3SZqsx7YQATdZZh73fp7Ytc8GAiEA3U06gHO6bvQozwjBcIOWC/cmu0TEbP8dki5Ja9bECOw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106372,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg01uqCRA9TVsSAnZWagAAR1QP/j4CXb3E9S2fRE0sGRMC\nQteNWc8FqgLS/vZq4QsLGN8d3+LKg+OBG7qij4nUse0nDncS9+agKlNIIj14\nf/6hnwnqB8/nI/THYXBXUlLcchm5TlR46fJdapeXbzjcBLuAy5ehSlSWGdPr\nlqtQemb757e67bEk9Hk9smxD66HGyi+1mdxKspguoQChijR1990Yqab19/Bw\nxo1iA6swNG539YGqLmTnQgrfBkhC2D1FXP5haA4Ox59w7+e8QVrFFAvxDCE2\nyoGikf10cxVYKYz+g7fT3IUCVcwZEJxVivOl8VuJ0ubEoqdEgZeDHNQrGwHO\nsXz5Gkp5MPZQqaK0aYvOckXHsq+SvUnQDl9sjGQ7SzAlVDyFb9Z3XMuqG7qZ\nX4zdiCgtE13DqBtgPgvrmlJl3MWAh4NbfFJiATKn4190nmC3j7+NyVjXj9iD\ncGh+Rmqt7uicC7Z80wPhFeucRZDRcP3oGw1VAIWc/LQVJVjVut0BKnxWmWqY\nDbltguC6rDvRCakwLVObYQvQa1KnDVjc7wE0hoATBdgwYM8jYBa34gMBwBn/\na//BBBf25mDovh/xxxNHSDJJZpMkA2YU6kN2jBHUZPfEG4YnAIMqc0IqAr4V\nw6wiNI2fWSllSmyX/TpuAty1qXHVRfPr0wsWAAJpoiZxfPvH0FsQdgRnNB0F\nDxJV\r\n=X36q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"6fb4fd1712babdbb5de216c26e1283a94f7159ea","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.0","dependencies":{"@opentelemetry/core":"^0.22.1-alpha.3+6fb4fd17","@opentelemetry/semantic-conventions":"^0.22.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.3.2","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.0"},"peerDependencies":{"@opentelemetry/api":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.22.1-alpha.3_1624464297950_0.6416147816836677","host":"s3://npm-registry-packages"}},"0.22.1-alpha.13":{"name":"@opentelemetry/resources","version":"0.22.1-alpha.13","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.22.1-alpha.13","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"fb937dc3cbec19f75c113d6991d9f0f69ee72f7e","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.22.1-alpha.13.tgz","fileCount":93,"integrity":"sha512-RY/obL5OEL1kQ/tc3jwRDBJhlAkoWb9DhG24u66D1vO489tFp1PlHQQFrMSW7r4d6CtJ1/hXC1/FJxgYWdjbjw==","signatures":[{"sig":"MEYCIQCU0a5kzzw7Htwje0W3dZIpHXgQizKaUZh4k5mG9o134wIhAO+9nZLh6QsTjwFw09D0ykZ1xlveo7bSBvVOdPc26ApL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106391,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3LqkCRA9TVsSAnZWagAApdoP+gNYOgJ2Nwcwk0yC9UOQ\nKpI18d00ypaVYFIN5ZC6ze+1WjhjOEWLTO436kYLfGuk/rJ97bSckdWWoCAG\nG6zXB3LV2OPtkA7c0XG0mkME31y9ux0BDASsm402imMUvaSp3BElWN1wK+st\nN7qtY74DiJFl1OdEyr3lNBlKXrGGGyTjgCQrScIOEmTkK95D1w5bURFpbn5w\n+8A6IL4d29igFBW2GfVPvw4ARtlIhrNcBz7V8WX8YIYxTqEHhyT5rkECfoGv\nMlcEfDS+ebtMUX85VllQ02YsGF085SVrksYt02Ey8Q7xjTFWAdHGW5irE3r9\nqSZJc3rGocvhjBioZIr3e486MwGpaS63Orn5e8SIvmFy+zTWUxktMWGVQtVj\nXoZ/MPcGoPi14jQuZKToPQvJQREurwoBuviSsCU7/f9Mq7cgo83TE4WVnejR\nzdk7yrqVY4K3Ag885F9fEEhBs5pSKrxZfXn2CD2yFg+krrqq++Lzbh9maHH3\nh+9xelig7cgrLOvux3zC32e8vMgTdmorYVMtHxUqY0myzqwwrcMCR2r+q/rx\n7e4A1WC0tGkXFW5yh4dHzep5Ry2+o1bP4n03/CSNz1AZkGh204icX0ZNvAmo\n7chhi983MaU7/hpnT67AJXF4Sxg7JAgC6JsKVlZatLyQMYBQYvvXLk5IB3PU\nvTpU\r\n=AMza\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"01418978e5cc15b5ec4d5283ec48910799fe2f06","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.1+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.1","dependencies":{"@opentelemetry/core":"^0.22.1-alpha.13+01418978","@opentelemetry/semantic-conventions":"^0.22.1-alpha.13+01418978"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.3.4","@types/node":"14.17.4","@types/mocha":"8.2.2","@types/sinon":"9.0.11","@opentelemetry/api":"^1.0.1"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.22.1-alpha.13_1625078435804_0.5905391832955602","host":"s3://npm-registry-packages"}},"0.22.1-alpha.15":{"name":"@opentelemetry/resources","version":"0.22.1-alpha.15","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.22.1-alpha.15","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"fce546242a1975ef286d0a9de519214508d96bf8","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.22.1-alpha.15.tgz","fileCount":93,"integrity":"sha512-jX+qD4pGTLBrc1mnaut7CsgC+20p5AG2QUljopLf1tLYGep23kjQimXIC9Qp3RlGGpFmTcmg3n2xV6rxQEOiNA==","signatures":[{"sig":"MEYCIQDCg+OYklll5LVD32LieH6Yu37rn41CsRcBERdUJR4qvgIhAJZdpX3Mj3B0/cHXY75/OyCW6IGz0B1yK4TM+wpAR2J/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106391,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3ME/CRA9TVsSAnZWagAAUXkP/2Ao67Qj1jzqS3+ItsEu\n0sYAX20cYJcV61KyiEqx/LKGUZbysv+Sma9gUc559pqGx7NuLXm5MDQF51og\nsFs+tcBjDF4J9yRMWfqzCu11ZwFAzS1jZ1HQIvHZpKCski7b+cY5iQNuVxWN\nQ9w+FNsNF2ThNW7o6gZOD6lsShaBXkG5A7kjYt0qcBV/x3M+ydst3n6jcTYz\n3/5jWvyh+0zNcH+hZ1eh5dXrwE024xNG9lzC860LT7Vlfg5ZiyF+O+Zr/cBZ\nTBFmc7fOe7AxUBZ2itP4FWsxWa+yOk8uT8RFp94eN/XbHKYqKomyEXONOMMh\nUPeV2zSMBL7AnL1k5p5tUSV4nD9aaLx3VKVC3hBbX/i0dFbJYYcQQWtuV9B1\npj9vw874OQEwC0w/JIbSVR7EAdCuW45V3dajabnPdysFuf0LMe2hOSBWmSVX\nVMTM+fcy4KaKI/9E3Fd4Q/CuAch957gon9LuZUBK9OzqwDQ5HZigfsnsKFjk\nqAsRdqZ98siT1flehPSNwhSEGMqeC7Il63cRsyijtYj0+gEvr8ndR6OjUyjR\nUeIerkZtm2AbUtA2dcFs+G/FPA9UPQV6AWKkujEv5n0TcOimdtrLWWTcwUsz\n7J2RnTs+PqPrfEV7zkaXZXUybYFQ7vjjM0jpVycnCdAb3KH9S6i+QBJWEYqF\nrLRY\r\n=mRjD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"c3ff9d1a6b599f01634ed2479183aca2c6d57337","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.1+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.1","dependencies":{"@opentelemetry/core":"^0.22.1-alpha.15+c3ff9d1a","@opentelemetry/semantic-conventions":"^0.22.1-alpha.15+c3ff9d1a"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.3.4","@types/node":"14.17.4","@types/mocha":"8.2.2","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.1"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.22.1-alpha.15_1625080126830_0.15422976986312542","host":"s3://npm-registry-packages"}},"0.22.1-alpha.16":{"name":"@opentelemetry/resources","version":"0.22.1-alpha.16","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.22.1-alpha.16","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"37abbf6aa06bc14f519814259e5d7782e19d0354","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.22.1-alpha.16.tgz","fileCount":93,"integrity":"sha512-rRi/PBru2RsH1n/NYIpmIwZxCdgJfkjsecCUAq8/D7OgfD+4HWN6AvnKhA2MGqx3wjTE5JzUOad2JLwj6BltOg==","signatures":[{"sig":"MEYCIQCvBrjprzNcGVot2RbxnFDYuEVcLMZepulTsN+eyvSINQIhALsQ4Ap1J0ruRjV1no2S6AcbE9vnb4+rOPiUdiEfGsWS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106392,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3MqjCRA9TVsSAnZWagAAboAQAJ10L6/R7s6ZnG23k+dD\nCwLVi47ZGkKghQpHxfNzuLicBjC04CGX9U2VDOC3zw2aFOTGLzAJOwWwnxln\n9xzvh4UtblEz5mqtwL1mmzl+h+Y9Agq9fZHqDS9XX6jc3L9fY29L2wOXI9w0\nNYanuRkEW5+cKYulSa3LS3xo/HdK0xmIAeD9o1RwL0+O8Ck/vNY23UhxHS2Y\n52m77Ou/VXmd8PsWDhrQaJV5C1C6nZjEOmuc80A+0llAmQER9XlRFhXEjJ15\n5bYojD+midFcHz4ouzbTDgEu/hBqc3e56/JZl/2rRmolG++VHZbTiJVgecA6\n2jEgLkZIiV4BMUfrY7UJe1te2JcNOtpU4tMjcadV563iAR/GhYffGiUyyVdK\nq78VXkFJuln1XpqRVnUivYQHWTcOyeYrLguB7vIVz6adJuDLQtMRZHlq1I8V\nU52JKX8GkW9Lr1QvRWthoS0PFo/T61ZGnDLIMfRwgXanxG4G8t2vBh9umZ+p\nrj3TO3pB+/JfmSS1h+CJhEDD3ozKRsulC9mphU6j9ZXPvAdZZ0BYbqkmqGzu\nL7Jt9a1irI0OTuxPAfWnLVaAMpderApKagKriAteOCnw2rlQx/Ln2W+OZFnX\nRHaNzmsKSSn+YmbCfIVimLuOGklDWT69qYvejpj36x+k+eJv7b0bchxvukuW\nks0/\r\n=DBlW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"5af147b159c9dfad8d00a20a3b140d55736f1919","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.1+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.1","dependencies":{"@opentelemetry/core":"^0.22.1-alpha.16+5af147b1","@opentelemetry/semantic-conventions":"^0.22.1-alpha.16+5af147b1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"10.0.0","ts-mocha":"8.0.0","typescript":"4.3.4","@types/node":"14.17.4","@types/mocha":"8.2.2","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.1"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.22.1-alpha.16_1625082530660_0.09174126653771864","host":"s3://npm-registry-packages"}},"0.23.1-alpha.17":{"name":"@opentelemetry/resources","version":"0.23.1-alpha.17","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.23.1-alpha.17","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"75b7dcb6374251af3e5964d9c77f21b3c2d58787","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.23.1-alpha.17.tgz","fileCount":93,"integrity":"sha512-+y7wctyMKpXQU4cOOpS/wpt0wsP+9KSqmZxDnpRBgo4VGrJrUycgOuyqm3BkerZJzZpxmHUbzNpAJzGmJ5S82A==","signatures":[{"sig":"MEQCIHT6WFQ5TUwyXjaldps3wDgXqqx2h4JelIWkoVWB9NMLAiAaWPTYFBOPIlxcmJi/oAVvD1N4gBl/DNOy5M1kYKZY/Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106392,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3M8NCRA9TVsSAnZWagAADnQP/1/ra6qlyjIVLsvusjyT\nlRvx7AIpMFfdqyvIALHXjhiZIMSkS2TdS6SxDzDsgpgNzSm8T4QK3cXJrvXD\nMzuDWbN0xDHn1pIWxbbpw4Fh4eAaB0W+YVk3lQ/vm1Vg/eSex3QdWB0c2QzW\nGzeYHI9PNqCUxIZ+CCppvI4ZljN8FBEuuzxghFL5nkWg0Wzpm0uUpBnnS/hP\nIB+0OAjvH/Usv4TUsbq7mgI6lwk3mvSxmCxA86MgeWX5lzMLV7sUgvrp3R4h\n/OC1TKDRHHa1jC3UHPSpzEZiqLrszriLJyEA5BRO4zue/8g4PwSTjSJXNQoR\nWEW//fy1HpfIMEpbew/0/TPKQV8CvBk3Ue2JzpDQeh/+JRygFcCTUlMhg6RK\ntWUiRII6Gp1b44qFwbU9rtwGBDNnI8qUJN3ZGP/STozWIfAnIK1DrWunl3pj\nUPqh2wMJEAd7Dq7BlJqelBIudWuSxpzujSIKXAd0JUT5rjkXNYIXRF2hYmN7\nbrLNstjcHXvR+L1e7NgJzwbYdnRvHxvGmNRRmQQL3UcEBzL0KhkeHV+/o7mg\n5NgEOGbkOKG/hW9AOnDT2k65HpVR20LnWzoJQHz/lRJ+RJvrhxXrAGgOyN3b\nemKvSUao0BzmkHh2ZDt4FC6fwBZN83TlwizUtsV0glBQaGMxJq56C1JNRQyR\nzHfh\r\n=tB6I\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"f2a958dfeead4f6ae20901ab3fac04e4fc424a3f","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.1+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.1","dependencies":{"@opentelemetry/core":"^0.23.1-alpha.17+f2a958df","@opentelemetry/semantic-conventions":"^0.23.1-alpha.17+f2a958df"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"10.0.0","ts-mocha":"8.0.0","typescript":"4.3.4","@types/node":"14.17.4","@types/mocha":"8.2.2","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.1"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.23.1-alpha.17_1625083660760_0.7349941751609983","host":"s3://npm-registry-packages"}},"0.23.0":{"name":"@opentelemetry/resources","version":"0.23.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.23.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"221c123306708ceac707599e3a201896b953f53b","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.23.0.tgz","fileCount":93,"integrity":"sha512-sAiaoQ0pOwjaaKySuwCUlvej/W9M5d+SxpcuBFUBUojqRlEAYDbx1FHClPnKtOysIb9rXJDQvM3xlH++7NQQzg==","signatures":[{"sig":"MEUCIFuTNVQFLA1vdbSBQ+zoYFhMBI/rRliT+xswSACL9S6YAiEArsDDAtp+xn0AziNVkdYs5qeLVoFYY6ZaO09mv0QwQ6c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106336,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3NC7CRA9TVsSAnZWagAAQ5MP/i/JM3l6T8iyad838/R4\nY+hZEn+laBatL5EFeuriahejDVj8yzVmu0wQwt+8pVuZqhGsyanLBAxyBlxq\nxUAdVK76Jr3HHmBzh4sIVsmIE3w+me6cq/jt2mTXlLRvr/rbJUawIqHuvhB+\nDpmZv1h0yonsQhLlzEx5mAWLmTmR4+6OZ820UHdGPEoeX1hnGY1sZymxQ1cI\nUvJO3Vr56/yxEmw7TtpiCdvIOLTCeQhNGmPJjoxQpXX/7yqH49C9xPXY3Fdo\nyaJHmzlU9+v6Ga+oPXya75jw5GhR9ycvI16PX4g+Em+j/QoPd6v37Chni7Up\nxNxnD6f5rgzKOyJVt6m+tFdMV9RvHnht04rJQ/NQ8Zk50mTMotXBiAQh+wAw\nmz+8Q+laT3SzqVN6N7+hHBWJ+arjLBt4UIRfU43COtWVykjXWwb0IqGf3+g8\nd/14sKApqsgANbeJS4gGRgIZrYnKcp3ucU3D6YK9xDk+pC++2qRDDyjrT9aD\n7/qqsCbbs3ELlSvmqZcOLLMGRM92+VLsqvjk6AodK77FRu7u78DYvYo5Xa11\nEaoVG5n7CDJncfUuxyD06f+u9Iz/jF9VCdsuNYkCMX7xbS5Cm+CLUt8zFTLr\nfb56lwD9YHKQDQthVRHQeA/eWdO2E1hz0aKBp8aCfjBjLQIyoIy+8neKrtBO\nMAdI\r\n=voKI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"f2a958dfeead4f6ae20901ab3fac04e4fc424a3f","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.8.0","dependencies":{"@opentelemetry/core":"0.23.0","@opentelemetry/semantic-conventions":"0.23.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"10.0.0","ts-mocha":"8.0.0","typescript":"4.3.4","@types/node":"14.17.4","@types/mocha":"8.2.2","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.1"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.23.0_1625084091014_0.02882627176348107","host":"s3://npm-registry-packages"}},"0.23.1-alpha.18":{"name":"@opentelemetry/resources","version":"0.23.1-alpha.18","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.23.1-alpha.18","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"05203a515636f3646f7cf3c6f091616faa12d241","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.23.1-alpha.18.tgz","fileCount":93,"integrity":"sha512-msTtQHMAdjtbX2IDhQ53PUBd2KkrNutU1nYXDyxdslsTK5coZEBFhNjld8StzEZRi6WNptzNJhRDjj430CeIxQ==","signatures":[{"sig":"MEQCIGfpH65SOFCowXNNl6w1jYa/k68QiiZiKMQRyXX5ptfzAiB20qj5s5CHabm2otU9BkaOt9HZHKet+3G9ahu2enk6OA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106392,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3yTRCRA9TVsSAnZWagAAxZAP/32rNgODjFPZMWerz2sG\nv8nG+y50xLztH4OjiC1sI71W6tKryxR2tYX8LYazNJKrjlsw1WOGG8O+GG0h\nLJbvSXb78hRqmysOpKHLmMPrlNarLchY5UAbthYh7MRbH1PCcr8VuTLoQKVI\n4CumSSS8Z58JOOi0jGqEMWAigzGPNit27Uyyt/6NlM++uThzj8i2l6el/g5T\n60QFxhumrCx0MYMRDzltagjQCGApVAesNdqaXYPwrIiqe5mNt9IJOn5tUkXs\ngdTKags3rfzWXiMP+nEwoDmaVXC0ZGrUGwbHbfoDYWPBSlkoDg3h4gnDZ98o\nDLIcdJHFToyCYdTkReZdJxvh8bdVVKfIxuw0325vVjwhzYX4EO6rp5GJmMIk\nynQIoQRErnKjmNdjI0Hm0rpCs9bQ8ptp5qUumO33/GuXuUAPyZfE3DUicJzA\nTDi+d8chB722DzrkYk2wB7gdLr/rloiD3twT7sQpFVtdL3vfxxR4gEEj/BfV\noPZbXXxxjWF3sEl4QEf0WlOmVz+7rsqQ/Ka9qgj8aUgbOab6sYtJFKL5k2gN\nM85mTat/HzvvXEXgXvQ1wzNhx6CZ6uYz8P1h0Z48EfrSaz4kxTu2ZiGC0HZq\nVzT8TJJ3oIKsG0x1/+c0e+uuNFnpHkXcyFrFNT718RoGtE77hiVLMXKpPWlJ\ngbmC\r\n=HJfS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"4b3425dd09f0a7087c9d741d25c7a9a0be42770c","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.1+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.1","dependencies":{"@opentelemetry/core":"^0.23.1-alpha.18+4b3425dd","@opentelemetry/semantic-conventions":"^0.23.1-alpha.18+4b3425dd"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"10.0.0","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.4","@types/mocha":"8.2.2","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.1"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.23.1-alpha.18_1625236689423_0.2101309582105586","host":"s3://npm-registry-packages"}},"0.23.1-alpha.3":{"name":"@opentelemetry/resources","version":"0.23.1-alpha.3","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.23.1-alpha.3","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"42cda818dce80363cf69f2d31e7c9e28e36106ec","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.23.1-alpha.3.tgz","fileCount":93,"integrity":"sha512-s9aB4YqPtqhOkHDjKafsdhQlMYQmm4RwqY45kTRBwOw9iCJhD704sgtm4MVGGSCCaSC7siIqvfW96Rh6jD+JTg==","signatures":[{"sig":"MEUCIBUObDKfYDPRpjm2C07jbFPguZCoRwsq325BIyylsPpvAiEAvvpAsnJv43IONdMLJk9yD6Ho8+FGDQc4E/wqGAFLXxI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106364,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg44dVCRA9TVsSAnZWagAAOQIP/0GsqOcPQG2Z5GqjJKsv\nD+rKdnIjaYDcae0SJIzzttKtdI/XvBxK9uIAIQ0piLQpeQBWqaqKUpddbH19\nBuccJdoRpHc+19TzP625G+l8ETsu/TpgS/ECNpkXJwoNwQTLwTUWuApIV04s\nKMHw8YTttWgbha3ke1ojGu5hCP6qIXFPWwDz6yMYbQk5cWlVmLDUulHLuzUG\n28ZYtjBkfGJfvZ9fwKXMtfVUXQx4vxIAkfsj4WEBp0zsAV1DwySePfYXqxCB\nJmeo9Wi+v5MzmAlh9Ks64YBb/czzRTKnrZ0fyRjeDBci1t8trdwestKDFzvF\nqPcO45wmdr0DID6yScqj8j3NFNS6Usz4WBY1WUQssi4TGj5SYsUH9MCTaSbj\nzBtZrtl8QQo8GqKfpk2crQYkLun5TSdOwjHU8H7lcOUB/unRiQLY/XxO5VXn\nl5cDIXv9KGZoIA+EeBMAbI5S/Pn1hWLmmcdQxBEEA+z22TKDZP2QltSWiNom\nxdfMfmIZGXpj2Nx9DRzN7G9NSEFsVDsvmRR9COZUcLF6mpgi6j/9xkGCkpw9\n9RhyD+1yHuGsSyVXio36L5MGvDr5b6eJ5dm8Ep4gXXfQ3sIR4mw5aCKWxzF7\nJUGRu5muy8NbEHc85PldGbRGJsWcNzxOa0nSSQFf8Tbife41QCPF7CZFqt/o\npih9\r\n=EDwo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"6ed8d92559df68ef1fd3273598a1860ee5197e53","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.1+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.1","dependencies":{"@opentelemetry/core":"^0.23.1-alpha.3+6ed8d925","@opentelemetry/semantic-conventions":"^0.23.1-alpha.3+6ed8d925"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.4","@types/mocha":"8.2.2","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.1"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.23.1-alpha.3_1625524053178_0.05454089875162671","host":"s3://npm-registry-packages"}},"0.23.1-alpha.15":{"name":"@opentelemetry/resources","version":"0.23.1-alpha.15","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.23.1-alpha.15","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"5d23f6e15ac4a0d6a90e69cc3d50091ac8094d8d","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.23.1-alpha.15.tgz","fileCount":93,"integrity":"sha512-eg0nzlHyKGklTRbux6MLCd/eEAynKoU4TYIWb9MC2viBeKgkOkym9Isisj4ujOLN8qda/KHTa2dKk5g/khtdsA==","signatures":[{"sig":"MEUCIQC0GinJpdY7qeDs1IeUEo9nYNsBrz444z68CJfnOiokxAIgFbF0P+s7dxYW60m3w5ihVUwQa9OkliGBEEPRfDJAs10=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106367,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8qBQCRA9TVsSAnZWagAAERwP/2KcqrNEx0ocywCNChmS\nfRBL5+hkjamxGos/jTXWsJDjhpgrf5nOJaX0Lor4R4mCtFtwDFWadQ5fQX2/\nq6bCXdeRkdtuYlsD596/ByxPOLPvZ62IhpLqMko8Gw6E6vK2Y5k7oMFKDcL7\nq1GzK1M6KM/PoHiwcQKAAdCgng1wDAJbweBk9WZFaZXFYLuFwFx4tij+T/HF\nJtNERgJBZzWvIHxgP4tDhz7ixZzJbCutzDwvZODjDQ2R1smgF8oMsq5dRVUH\nArk+58rWgGG0gZzUG8IJ2e4/mVliAVody5eDzXqkUuNDq2RZ1U/m1m4MQYTl\nNR35+iVuCt3RKA65OZ0LX5SI9/gG3655VgTJ93DJkjiodeg7P8u6UfdDt98M\n3dpEHstkBZGwPop+4638OOqsc5wGLIU2vrVkdOe1+8z4Tk8VAtFSrtUWyOCq\nW36wv7obqvvOTexro45zYBiN5M+hMoXojm1yD4gYQBLE/SyzF64F6ydOAHGf\nWdvaqWuw12CvDFhlNNFK6mYtfBh3oH5CTElBWkDmlrXRWQhchfxKeUMYyoyZ\ncm7IUe0TPOyP1Ne5VE2eEOtljIaiLT0N/IWKoUZUPAr7XVsnkZwyTZ1OKp8o\njiuaXXvCyccgCiYB5VMDidA6DKv+mg3kegRVkpZ1Q9KWS2pbgioHO7OU890j\n0Fl1\r\n=vbsg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"b67ca0568c333e5d841c9b614ed40b3e107682e9","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.3","dependencies":{"@opentelemetry/core":"^0.23.1-alpha.15+b67ca056","@opentelemetry/semantic-conventions":"^0.23.1-alpha.15+b67ca056"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.5","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.1"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.23.1-alpha.15_1626513488428_0.9364797365882735","host":"s3://npm-registry-packages"}},"0.23.1-alpha.23":{"name":"@opentelemetry/resources","version":"0.23.1-alpha.23","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.23.1-alpha.23","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"5f830114ab3b1867d85f92f1657f80c9d73185a2","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.23.1-alpha.23.tgz","fileCount":93,"integrity":"sha512-w1OcP9OduB9KVxlUteB+cu2u8MuD7BuhxLthYlJwYBrc6vCdxVGPvYF2BMcFoQFM6sj9O/b8OQ3vKihKTxhTPw==","signatures":[{"sig":"MEQCID5yGp1oYaSchCjlbyXoHTyUQxREq2czzYbsinMHcWniAiBPqC/gBuHMShATIK/bvbZY4xKMp9DDKH1qGZ5jWzW8VA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106367,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+wBoCRA9TVsSAnZWagAA+JsP/0Rybvu6figKhueKhiGk\ntY6R2pBQJPOrXatnPqEv+5a1nqZ0DUPuPA1XA7F4SpXPD/DSPH94UB6XT0l3\nOez1uCjdk44cLtm+Jo2Gdhea2zdAXYh5LFSmzBpb3CPrfWBz3GBrxYAjaMdI\n6EqD8lSxYUQyMLQRGmEdTQKwr987fUGwzdPaBJ2bOgaK7rH0HKSApu3/WXJ6\nYb1Sgyb5mPkLBwwoWQGiPYX3N8TEgBcbS8yzzOzhLtHAazUL2zrPCIiiyJ2F\ntNO7C9Cj+NJ+3FxaLJBW6kw+PSeRh2wA/WlrK653MlDb84iIgHf2JJC+hTQC\nfxLXv23ijgqYzRE4V+BUV2mi5HHLD57DeRH/esN+VVuvZZldIgf3U1eWqlSi\nAvEnzmBsIyP1S0oQPNCC/tyo7ln4Y6QdF5gYPYmsBW3VRej2bTAdAdm2Z7I3\n2nctYUq5R19C7lZbybslxpbrCAlQ7t/VXRLp2PFIcXO1cVUaH8eju99bzLFJ\nLVw0o0MFOErfq7ZZMRUTnh6uqwY1xiRTiQ+urvuC8Uzl5PxDcpjB38uIgHO0\nDdHpnNfy4N14rTgssuFaeuKUV3hSRcFbukCZmTJDCYaA0G6Qoh9lbqFMyWz2\nVY0sFHq6BYO14K8vrliwnFp7FFZeVvL5IVL1j7LHuaQvt0BTFdIS/lSYNPdZ\ncYtk\r\n=f/Gt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"884d20ab417bf0283ec84a72b9a0fae8ebcb82a1","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.3","dependencies":{"@opentelemetry/core":"^0.23.1-alpha.23+884d20ab","@opentelemetry/semantic-conventions":"^0.23.1-alpha.23+884d20ab"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.5","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.1"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.23.1-alpha.23_1627062375905_0.3307403734421859","host":"s3://npm-registry-packages"}},"0.23.1-alpha.24":{"name":"@opentelemetry/resources","version":"0.23.1-alpha.24","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.23.1-alpha.24","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"ae88d05ac911d2fe979b8cbfbc71d025969aab9a","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.23.1-alpha.24.tgz","fileCount":93,"integrity":"sha512-fvucthJuG+Fwl0YIT0962nKeG8nfIh+2tMqBC5VVtYXgIR4sps8cgDEPoIvgZmCcM+9yh4es4P2Jepb/DZtUgA==","signatures":[{"sig":"MEQCIFtnYJ0WfGtoQlDJRXLWER6FcUixDuGKX8bWbPC240gaAiA1/QbsIOsGt58ajbOcH7nzVHR3xl0CM7igJDQPg46lqQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/Qh+CRA9TVsSAnZWagAA2foQAJEcy5A3CRtLAnvOTlPo\n22XDQSa+ceo7kZ09+CPTx3OMaDPlKaHINnasPwRgWPOt+7emRlnnI1WrqsuF\ntstvyRjW4Yw6HdUsNa8uaOC6LnawM0aGJVzbWiVp4CT9DdY9S3E3miLGAQf8\nBnRvkhmKVglCku7TdvsNWn6nI6ht3tNx5zhv6Mnkv61ybeOcZbVVajMLHTWX\ncCSFGhtwyncraePm8gmxb8RtBtfTBucW3Zff6oiOpSYg7T5RdJTJ3+t12nS+\n/ezMFvbnOELcJqRQqf6ZGRLRmJkEtG1dqpDYU3aXBc9j3hpc4amxoe+B6Zoj\n1x0U0MmYj2mT0WypOjPMgv4LsoIkXS8YkVgA0dhUFN7ptB8YutbbK9t6EjeO\ndzDs938aHxpZ6PHtL0vEMZsvWmZkeZSuPdE6SD1yMGWG1Rg9Vuls46Pi/Bly\np9weQztND214ljF6uwz0ot9tYn0kkT2xPRy7lCk1w4Us/JHRwPsGuSp6fudU\nR7gx+Y9oe/6MNcN8QLNKm6n985Dh+pvL3bJYtUvgQKAT96G+3acyIiSOQhGj\n5VDDpc98U812r8REc3TpWcCj5ZhsXGD/nQjFraSx5yZsBJ0dhzbWwBeSZzBw\nwThBkYtJoGIqwGDJfWsPz6Bat5QDyK6cuSaeX1tt1+5bPQrgoNUmCCsPvSsx\nrpy0\r\n=SdMy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"3bc3452814e30274d7eea1f3c9da968b88b1a197","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.3","dependencies":{"@opentelemetry/core":"^0.23.1-alpha.24+3bc34528","@opentelemetry/semantic-conventions":"^0.23.1-alpha.24+3bc34528"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.5","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.1"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.23.1-alpha.24_1627195518160_0.8864144307387276","host":"s3://npm-registry-packages"}},"0.23.1-alpha.28":{"name":"@opentelemetry/resources","version":"0.23.1-alpha.28","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.23.1-alpha.28","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"36286a58d1dba2bc1fefefd60b54bbce56514368","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.23.1-alpha.28.tgz","fileCount":93,"integrity":"sha512-BklB7ZfA6jkEi/AIAiahQgC0oqIn4fzW6FM6VQRtC3DA8EXA664fkbIzCaeZ/50wbjqenYKNKGAICCDW4vd3ZA==","signatures":[{"sig":"MEQCIDA68/EcqEPjauT+wpdKh9oj1CHxb6H/1vKopazqEN0QAiAHLqOu/sjHx6gDPuZ7kToAcSDzhEHxEoidGImSu/Oqyg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAGIQCRA9TVsSAnZWagAA+Y8QAIj66JsNLBisJJRXkIlm\nQBncZmYLkv2wFafuOsKSkgMMBjuRnOUHMbYWxFPw5+g3SA4llN9qLChd2Jms\neik+wlHhh2sH1MBdIEk+FN4wB6kX7PB5zMVJQz9UgjDBGOjbZrl3iVSUXU95\nKgrUicWd72HL7UzbDWCeckG0sQcClSsk9Tr9wChBCWKzFfr5Gi8OQ5n0lgdP\nOr0QnWorzPtC4UB1hfcy3QGVJYfZQ3tjY8HwRJxCoaKL/0ID0t1GaG1+tatw\ndJ6UwFu265n5AVRYY6a15lgf2SedFsCJfp209jS9/CYRbcbpAZhiA0Anz85h\nVHF9lrmZEVndvXeWaeE/5kWu9S6LJx02rKwAI+6FH2SLPsChGNRQVIXdQTiL\nTWlgOjMPx0hXGQNDev59oTZprYyjYCO91o1CUJZ1/NGd3V+IfC6MZSnePAGR\nXHMUudzRD3QGA94Q7Y8KrG1h2t8TWXmnxfREOD4I0JGDEnKqwaRuXO1cI0ae\n12OIolO90XeIfY0lIrTJekWCZq62ze9oMjrMbGPOkPIxjXa/RUrwONU/gJyE\ndwv2Q8/vVN3+2/d1HlN6lYx1JUBGzo3pz/j3BEB6XsZl+GAYBIn95ThyxJra\nI/sy71vEwIq3DNezZOgKf0AV/TwaPG93jNH8aaKAL+M3z7EF6wNw2f6uuknu\nZLlX\r\n=npD0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"d8fbeddacce3e27aab40b24c2ca3c271155e74ea","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.3","dependencies":{"@opentelemetry/core":"^0.23.1-alpha.28+d8fbedda","@opentelemetry/semantic-conventions":"^0.23.1-alpha.28+d8fbedda"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.5","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.1"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.23.1-alpha.28_1627415055899_0.8010743031484759","host":"s3://npm-registry-packages"}},"0.24.1-alpha.31":{"name":"@opentelemetry/resources","version":"0.24.1-alpha.31","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.24.1-alpha.31","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"6941f30614bec76f806aa27081d83acd0653b4d3","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.24.1-alpha.31.tgz","fileCount":93,"integrity":"sha512-QtgoLy0xYXe/O9D8xcZajcrMI47L8tOC7+hbPAjtt7kSGYm0RJU+mupbLvOtxCDKDzsv+VcacxVg/bAbrOF2uA==","signatures":[{"sig":"MEUCIQCASVMcQRH4Xj3NprU0223raUACuaL/PM+rf4SQiw9HygIgHUaKVMjODwNV8I70snbuTJyxH5ESYQnuyT8TYCQgc+w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAWSCCRA9TVsSAnZWagAAYxUQAJDgF0g09dQmApmuNXMW\ngS+wknHIYHY9B60Ec328Rdys2Eqy0w0ONm0siAb6tVR+u8J684pohakzWcYI\nGarwH1B4289sKBJ4xl0e1mzwEEZSg1c1VVMQGiDGt+MGvh4MeRa24WxQEbFP\niqYOrAnJ8mGmhDKnyieWWQQPMAeznjFg/ziWzmS5a+Oi24niNiZgWwjxc52v\nJaUcPOgleKRTscn6z1B7DEdMHgVzD2AgZpokXYTWPiT8UIP4eR/C758M80lm\nfIw0Mz1QMGLZc2RyJVr3cZKo+BanD6bdbjlIyUiEUuPyaQHCDdM3L3V9VlpH\n3HfwsxAxiKtlqzJVtopayNXnaYU42MQaraMNw3E5B3i/ofhFpWhvz2pPhv4x\nXCTuJvot5hL5vSFccHGumjJkrP5qFKTc0erzAMw1JYWlG63rd2guXsTlXLSG\njyLD50dY/gIX4BIoBy/KTW6pIlQUtBbEzOwCqygUCaV77cLSFPYBWudy/lO8\nV+NJYTxrL8MBfeEp3kbMmcIx30GJ26d37z7OC46QSScZ65KgJMwe9jEnWvH4\nWAcVywMH/3PUSZ2Ufh4aoT0dqhxfq+kR2XGuZoDovGfdoaNBnZtkAc/f2sRi\nVppWiRuxYQUflBH3nMWGjGJalojgznGjXO1+XZISTLOIW0zNzf348H8RhWdR\nsbDj\r\n=ZGd/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"fd2410cc9e8d43210b6ea44b8193fa70ee900499","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.3","dependencies":{"@opentelemetry/core":"^0.24.1-alpha.31+fd2410cc","@opentelemetry/semantic-conventions":"^0.24.1-alpha.31+fd2410cc"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.5","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.1"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.24.1-alpha.31_1627481218723_0.7309829639434744","host":"s3://npm-registry-packages"}},"0.24.0":{"name":"@opentelemetry/resources","version":"0.24.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.24.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"834e5a4d0a64ed4de085add8308be203959c44b4","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.24.0.tgz","fileCount":93,"integrity":"sha512-uEr2m13IRkjQAjX6fsYqJ21aONCspRvuQunaCl8LbH1NS1Gj82TuRUHF6TM82ulBPK8pU+nrrqXKuky2cMcIzw==","signatures":[{"sig":"MEQCID7J3kgQ15Nm7juNIUCvTc2xCQon4faEowlIHM9JKJNGAiB2WAUB3ANd6ywm/t5Iu4OwGywzCcdjfm2RqbmWxEGHHQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106353,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAWYnCRA9TVsSAnZWagAAoo0P/12hT9fdWY+Oumz4GEeU\nHsL56DP1E02Tug5dsrjH/7MaOf4AYdTSqNMbsEEUl9BqVFJzHVOj48PccpTI\nWhUJXx+pnZQpxllpbxAr+diSwPs+lx+uXQHnVzytTZong76TpnubOc6w5V3s\nLO7/8RY9woJZSTRu9Y0q3S4hNJ4AMjEOh29+gkrOGEKjfKqf8Z/ex7HmEgDs\niwqn4+jD37QINOo/A0dGw6u3eUTG1kXfwzAVuIYGiZQItvLmqaxlL218h7Wb\nl2FHLeey+jMvKtw19X3d1hHGOflpayoGYmT5Hx7lZ5N2cUzMxlUWzLTjAGQ7\ncCgrqTPOy/ZZ1WGuMMvADsAMbcGA5vQAGCDDQdzliC8oj5DZ40Cb+zUJdAQA\nBsRc63o2U9wdsgb5hkefZ3FcNLVmshnoEMYT1/n7hB2CkEOpirmTXclQmSfC\n3E/W7OSqkzIFX8kmAYXzEj+htMwAlBgAwdRelJYfeZR0hCD+86axKgf5KnYL\ngTt5R77/WG4Gy52gTFjM5Qd91gA486+VT9o8/NsdnaSJ298w2PW41saLwIQW\nX6oq1Z78ArNLXJkX1iSYEjeHy+p0hdsbvl/tnHQ/i5kluzf00vWzuzprtC5c\nj+svyZfImV5GWABPIqyWcT8SmTi8abepk81DzdW4S1a6z+JUTeyXSnMbW8p3\nUCwM\r\n=I9qs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"fd2410cc9e8d43210b6ea44b8193fa70ee900499","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.8.0","dependencies":{"@opentelemetry/core":"0.24.0","@opentelemetry/semantic-conventions":"0.24.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.5","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.1"},"peerDependencies":{"@opentelemetry/api":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.24.0_1627481639245_0.45371128067930466","host":"s3://npm-registry-packages"}},"0.24.1-alpha.1":{"name":"@opentelemetry/resources","version":"0.24.1-alpha.1","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.24.1-alpha.1","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"2f7ddb6f1d80b87f4be72921faae84a045d9fe97","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.24.1-alpha.1.tgz","fileCount":93,"integrity":"sha512-MsS6enLUvQmCNsXdpXtdBcFOMe1QuIV5WV9r2JF5hI6mvS2x1l7LaktG3CuZm3kkjiRxfjgGmM1ywGvKV86NwA==","signatures":[{"sig":"MEUCIQDew4q0abJzMePA97e9WtNsXYR50xxOELN2Ykfb9xffCgIgYTJgFendiQaax27Fo5H0G28p0CaxHeNTXaV9OQHLSYM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhBFYpCRA9TVsSAnZWagAAks8P/35dFAKYcDzgQtmAhZZK\np7WT21jQpp+dFFETz/mnvZc7FkVhHvrc/EDzxThHGndwClVw6CDqM7jZl1mJ\ntN9NSKvmrR8S8RhrlJYR75/p+pRAsgtFfSeXwga9Y4RRVb4J4rcHY1OPjR/i\nUOYRt3ZqTjBeRuJ8k05s2cFUAea6ZxBDtc+BOxzGJ6Nwdol6Z6bevMzqxpqp\nmu9v0Nbk/BdzQh9E05b+3lvqoFozakaNnje71j++y51d3Nuhmiy7odLJM2tZ\n1PJchO8eXKEQd6JHV65+xuZjDDyD/LmUKwF69Sr0j20jMEgYWGPTqoOuNwp0\nHYKcuBrEyTDT9U+8PfTNpv9FU5YY7ctSpmbVKM9j9v+TGIh6Cb5yiTfudHPN\nVZqhdd46+Og8rBEPIIpmaH6IZ4gjt1Ztl8oF1hMS97s2/19kODAjz5jXiMQn\nA7RglLhYuFb3148At/Mk7ISYEDrsk3pHPyLRHDs2y8ADPHKYKlkodUBlJ60a\nahIYCfx8EAK8hiAEH7VRUoVhgkOkSbHHy3LhRyzZwXAaSrQDEGUnb4fIdTjD\n1VBiAQ0fpXqa+HgYCaEc0D/nEzwcRB5whCtE4ZnrB4uZ1bTIpGKa4HQkttAS\nlMdCEC8hW3ABh+El3Yon601UczvCSYYlJ6bTKp9xkbN1ZfUB4vi6VaKauCjt\nXfSW\r\n=SkRm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"3b9cd16a8eeed7a262bdfea4c93098861b4c1ba0","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.3","dependencies":{"@opentelemetry/core":"^0.24.1-alpha.1+3b9cd16a","@opentelemetry/semantic-conventions":"^0.24.1-alpha.1+3b9cd16a"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.6","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.2"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.24.1-alpha.1_1627674153773_0.4609118898766926","host":"s3://npm-registry-packages"}},"0.24.1-alpha.4":{"name":"@opentelemetry/resources","version":"0.24.1-alpha.4","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.24.1-alpha.4","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"2c5f6d7b8226017bc84eb84bc71f5008402cbb8f","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.24.1-alpha.4.tgz","fileCount":93,"integrity":"sha512-o2LzvKc2t+0r9IlGvcylkTAnNkbTbrTrv2zn91GyG43jJysir8ooD0FRjcWnRyNsdrMbDngRXc8TiVyBBRDpdg==","signatures":[{"sig":"MEUCIQCRU0NzOi8mCt5MJaracXGXDz4Ghlz1FBNSpJlyP2cqagIgTr8YiLD6hJC3JCcWz648evWBn+6DsqDFoaEBRQu2IQg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106389,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDDvICRA9TVsSAnZWagAAwQUP/ApVX2d0WxVIsmDyz8Nb\ncEEJQ27CLugO5db5Fam5w8VqES5CymRiL3XIxhCMztXWa7RcKc6ZYoCEGgg/\nHFxKJ0JL8ZLgq0p7vcJrzYwPr2te99PMbKml9o3lf18f6g3xwWzjjQGaAWcR\nCEixtPa6CL7G+O4UOq0oSembV1YUxl6FURHNlczMM6hwpFYDKWinqpiUdDRW\nz2hW+yYxbqEa7+W3BO/k3RukQQc70AlXvWZ/65xeWDcUOp7Gc9GcOsYKA0mA\npu0POLKqKXNrv+IQJVIqwlCUkWXE7Ol6P78YazEtHYDSMyGIgo3VfT6o/LR6\n0K+8osVsuXhidjRyUEjMbsRROm6jsDydFIaCI/x4Mgr1kPlAS2DEwnPWbfom\nebCSMGto1eqndxtS5S1LnGkzl8v44PLiXoibHxBnHB7npBefxLTFdTFMkC95\nVzYOv+4RKmStqCVrvomdZyxL5DlapWK3qHYGuXOZ6E2Qq34Qq9lQFObhXRt7\nB0fTu02HJaXWNaFPXudHLGxFlxRH+XpVBeWGmNWnvxRJKHZ5qPEdvZ6QITiN\n/u+JRMyTzJMIf6Zmp8duVfkEnwKvGCCHsWXkSCP7kYN9CJ3r7OKbEO0n1110\nyHXFUsdKStOpw0tg7iJaSM7P+W23kQ9mB/Fm81GIvP3TxcsOEK/OPpJmxU8E\naN9V\r\n=j3Fb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"a8d39317b5daad727f2116ca314db0d1420ec488","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.4","dependencies":{"@opentelemetry/core":"^0.24.1-alpha.4+a8d39317","@opentelemetry/semantic-conventions":"^0.24.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.6","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.2"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.24.1-alpha.4_1628191687911_0.8285305027152767","host":"s3://npm-registry-packages"}},"0.24.1-alpha.5":{"name":"@opentelemetry/resources","version":"0.24.1-alpha.5","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.24.1-alpha.5","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"3bf6dda6493dc048a0837440a251cd805b3f9f58","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.24.1-alpha.5.tgz","fileCount":93,"integrity":"sha512-s1oPoVuXLBK0GdyKS28Bu4GwMHcr+kDNidzP8vUGN/yIOvRvRwSPpCuaHX6+R8EGOGyECgMOCYq60Ws/jEBIsw==","signatures":[{"sig":"MEUCICgfzBotOu0XfXIdbcBkG3pCElDt04iTW3t8hgTFhrF9AiEAnzwGE/UWxUrfm9NqUMcbk9WJeyTBhqyuRcJ1nrzY+yg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDR2RCRA9TVsSAnZWagAAWswP/RDAqjptPX2iUEtdyxmH\nEYVrMLGHnSZZnpUqpyfn+87JV58qIur0PxlUgD0C9z6iF6hr4zURyT2fDNAW\npXBlOqn108BiMGTKkz5/zlyEpgA+g3yubTDjDNfh9QTVk15O7yTbjH2lCqmv\nfi39AkNXGCiTXLgpdCksAnuahehRPQXup/ocN+bgQRFi9LpQTqDq+WDGX6bH\nVFXE5vL8dGE7Q1UOBizNY7431f3RGBIugow5vHNvoYMmcj8BOg0ltC1Z0nTt\nOH4cmjw+ZG7vk3yjvj/y4lwqnzu1pOYERbNFwVRZyF1qTpCf63YNmkEDAaIo\nwTy6FD3srNfdaW5YphuoPicj90fRProZwrWL2M6HAU6Y0r2daX9dWEEBHDDb\n/lU4V00+elx2/uzw8WEoAGmuD4IXXcwWSfWMV28pSOSKeq4AZm25fnc5e/Ie\neZnHiN7/IjpnLcLjutNwFOWDeAX4eJKFsrOkatDpOk+yQz+gHpUPnNM2t8Fl\nwHl2HaoYHNxjxNp6QOljlDjSqTZTna1rREfT1WgvCiteU5nDtjWwbtXkm3o+\nWFLDtRDNC0vFHAg4BSH8Dc9vEmc1CtnRxarmzs7F6yy9AMJ0mu4M/BGUCbpp\n5VT0YfXJ9Icw1KE38e5KeEp8fzGb/OFRmxMTChmCvL+Tw1z/WG+fpZFomL9R\neItk\r\n=iF70\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"b69ff35e90a33d20a0154dcd326f1467dfd39e2a","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.4","dependencies":{"@opentelemetry/core":"^0.24.1-alpha.5+b69ff35e","@opentelemetry/semantic-conventions":"^0.24.1-alpha.5+b69ff35e"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.9","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.2"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.24.1-alpha.5_1628249488976_0.3177694633086745","host":"s3://npm-registry-packages"}},"0.24.1-alpha.7":{"name":"@opentelemetry/resources","version":"0.24.1-alpha.7","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.24.1-alpha.7","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"edabc237910a3fe2584cd397e18607f42c133086","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.24.1-alpha.7.tgz","fileCount":93,"integrity":"sha512-aJvqck7woShxeSrYvQ4Y9aDmvgV2oIlBvNvtzMoU4qAVkwfq8Bpw0Lx+RfxAgVdrlRu5U1DyGpYrxfX56/yvHA==","signatures":[{"sig":"MEYCIQCch4r0s3qEMz1/0U3jlAv8xqn3MtND6RnxwBNV7fvU9QIhAP7VMbP0xsoDvLCTlQCXUta2cNzdzQLTVJCnO0U5OmrO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106405,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDouFCRA9TVsSAnZWagAAa2UP/3J/08Y5nuAwOOMeO2Gl\nlax2Oo3iHqAFUUx0F3H//zHZKEhT7S1MUPwVhS1l245raZPG0+LuHQb5q3VN\nYmOreAH8M5mTSv/FcNuz8lGymrso44IamqZCuJjMK2/co/NwacZNlQsUHm/V\nYUexq812Tx73RVboCbmDcXkMDs/GAS54njWPkENIgny9Feg5/fdyVlFmYR9Z\nNOL0qW7hB9tEvQWkhMJZPp/BLbmxdSQyN84YoFLXk+ggMhqRLWzpYvMMIX1v\nlD4YsWqar8TfjxyKZT5yH2L5k7jF+29E0C2MP8UI4dhdbbOjwPBX4Cw6RDC1\n0NTAJDZLQZ+JWE54BNTn2w/xhbxZYxmLgi4agJysm9mnZOfRaBbPAs60OoY3\nJwDHqu9AMweE4MuZMFFxvml802B6UTQfNIFJW01tJ7A9M/CDdmOT4v0PIwNf\nx+Kz4B35Aq045Ia0dLAYk1NIt8CbYn80BAUwXUozCAu7s1z7J8lnMfEg9G/d\nxzqCxdMMh0vHU6A3OXaFgoBcR3RpKEOR3rHiB/ppNhjNBOajq+DrtNo4xV9q\nYFrQaQq5bh/Xpi5tIDHJzy34I+shSedaWGZd9U272VsILCS7xiGx/7lRWWGf\ngtKoDJP/mUV9YkpgPhyDYrPE7mOFP97UeoHufjNsToqyUoNjQCkJsXCrkuS5\n2xoT\r\n=6/1B\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"365d502eaa0ba1f9799998f050d36073e943032e","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.4","dependencies":{"@opentelemetry/core":"^0.24.1-alpha.7+365d502e","@opentelemetry/semantic-conventions":"^0.24.1-alpha.7+365d502e"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.9","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.2"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.24.1-alpha.7_1628343173342_0.9591325093033958","host":"s3://npm-registry-packages"}},"0.24.1-alpha.14":{"name":"@opentelemetry/resources","version":"0.24.1-alpha.14","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.24.1-alpha.14","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"40633c10340aba3086da1fff4fc1e28765691a3f","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.24.1-alpha.14.tgz","fileCount":93,"integrity":"sha512-uNpKnSNx1osMN6fmXpIafT4w8BNyzs2u/WozE188BENAJVs8JaHC4/idHmomVUH1b+kEg8uiYXYR2rK12eiWpg==","signatures":[{"sig":"MEUCIQDSWU+mpXtxBER3uJTp60e40Tr2Z6wImwGoUl3kQXKwtQIgAa13LTZgTFZs14Xr8sQ+CkKkEzH6h+W1YQubxgUZXIs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhE+PJCRA9TVsSAnZWagAA3pUP/2AsZ7FvPmhMY3XHc1ns\nmEEGRJEro2ktw79QVnnHK+SrNNe7bMmUH6VgqmUxuvDQO0KXMsuYVRGGrN0v\nzr3I8jFILCEsyvXPZdiSPsmcX3NG9OW7TP+6GT57UEG8fxITlEWJ233Begu7\nMJ/0AYk0dOwWHTKcE2Z7chhGGyWCTeyEID7utHH9q1xj0N+EypqOiIrZCpvu\nx4Mqm6v7eZiRt+4wjycT+ZYbqXIy+B32CYi3SYttELGuZxdPKIUlD3z0ajDj\n49ROpdfSN7K90SmqiD/O4N4gqRoM+CUnOKgYZil4klns9iJ8qPMdd/lJw7N6\n6mbKSfesoQIRLPbax+tAqOWOJfiFpZy/6RUvB8iykxkUXD343CMj6yYry945\nvUM5NSeu1V3h5YCVJz9DHws0F7HpwBApcBlshj/U8nETy/4HIUkFuS4qnhbL\nhLku6g2cW7s6lE/vYjFFrltwxJF0vlj7U60UqbEernon67h6mPwSBqZAnE8r\noFgNOmSw5n7Y6e+GgVawd8XNXLcF1xmtHZcDzBbKCKKvJxscXxdeyT0LM8Ke\nxnENhfjYeA4EW60+o+kWYJ7eBglwyA4dOBcK6COcI8gKPyKQFGQHEQKib5HW\nkqnp1ywlEm+Vqp0J9qaVqmOwZAXMKibBECLW0uocNlGacARK+KbuBfT9vysN\nEUw2\r\n=lxYI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"4553b29d4a04b5b7e4bf87cad64dc2fc8c740d8e","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.4","dependencies":{"@opentelemetry/core":"^0.24.1-alpha.14+4553b29d","@opentelemetry/semantic-conventions":"^0.24.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.9","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.2"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.24.1-alpha.14_1628693449554_0.06274831956090554","host":"s3://npm-registry-packages"}},"0.24.1-alpha.18":{"name":"@opentelemetry/resources","version":"0.24.1-alpha.18","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.24.1-alpha.18","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"2e7b2884a3bb78a3f3642da81098d7df1f44c193","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.24.1-alpha.18.tgz","fileCount":93,"integrity":"sha512-pA3/VoWMP0qKYZS5dwG2/cUCn7iyadrg9gHF4dsXIMWHqiIUjV1l3oxMOZxDL1UxxA/NyminhXLNhPauB1p6Zg==","signatures":[{"sig":"MEUCIH87DpGGgsnxYtQw/t49c0+BblT5erm1VPuGScYi/41oAiEA7ScRg1M1ej3Ky3J2WsCHzK4haNFeFCa/uDGIFAFYWCA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106372,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhF3vGCRA9TVsSAnZWagAAGkUQAJSRme81sHfVIUckQbrF\nWJW72kUe8/WAHtnoDrMLJCNb71sPWM8G87prLSR999EVK4sATGGF2o99jBlc\n7XPCGHT5vlr3KfkfPYAGZ7aI5h7fZgs1f5h10iiwdqVI2pqZWb39hLQwIkzi\nqvi0qUQQCaP83N9mNJcu3wGUrNaZJu4HM6qdCRbtfJl57N6uxR4N3qp2jLDI\nDbLpwYc0lB+zK4DPTJqRuMiuIsVftIE5u1bJwWqhu4QbLCa7NgYnkZxpl5t6\nwnV8VE0WvmDOHzOAlxaMTycsqX2n5O9i/CnD4OLDCMWqhtjzKtXp3X/ltzCY\nPfiYwNEyd0VnqQ9VwNWBOtFGzXpWeKNhmBXm/PtSDpqvu6XLiCdYmvFVSUG2\nCIM8j7QpKcbrm9c4Irpbnq9RbWbOunVXw3Zkymm3zFgeZ5l3Hxa2qZwzuRF8\nK+FGTsofQ3oULjd68o05CTK/YmdQz8eGaXJT5dpqzBHJbFAkulSEcnvJqZ8q\nA0jsRUWdo1xGgRLuJmGUi1sWqoEN1ljpQWqjtqhmUGEQcyAqVHFt0i0wzGiR\nfpgfqUkIEnVlBvqL0rIrlM9GQ5EeN6y3ydR/E4rkn0C1nNSBdvk4PISS7F7a\nnRMnsBXfGWDsQ3uFr8gG6pdvyoJOJcG/oPLjLl0AHrCFb97bSOaMfgYZS+DT\npb9Z\r\n=bilM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"bdb12daeb2e4ca3761d1411125f5d883471709ce","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.4","dependencies":{"@opentelemetry/core":"^0.24.0","@opentelemetry/semantic-conventions":"^0.24.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.9","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.2"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.24.1-alpha.18_1628928966627_0.24577899820022187","host":"s3://npm-registry-packages"}},"0.24.1-alpha.20":{"name":"@opentelemetry/resources","version":"0.24.1-alpha.20","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.24.1-alpha.20","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"2a51ce0352310e68bbb7c14e25e42cdb71ae94ee","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.24.1-alpha.20.tgz","fileCount":93,"integrity":"sha512-VBAk4q7+xBTqe9fqE7fKii2k2VFQRUn9vZmGWI0KFeuIo3dJHN04czeYdtcD/CmJTNQAWQaZkfpE4wT2tBh4jA==","signatures":[{"sig":"MEUCIG/XN8K79q8Fs5xpA+mpIrB806VAPtWlH5bQmrC7bwmHAiEAx3rFi7t+NlgyuVZor+4r3yiGTouPA5nVbs99gfBBhSk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHCT0CRA9TVsSAnZWagAADpwQAJbmWBb3+8tvYzOb4k1d\nZOTYlc9zL2CnJtmPHQJbE7CWRL1FnGDHnTYRqXuK2isChxM4atAD0reCnREA\nXoeVCUZ9kM9/2oCF5hNvgFvxTN85BV/ixdKs8h4NFU1AdF+LAS6rn/VfyJuA\nnOvMOC4OyUblGrRDG7aajFWNT9Qi+W6o9fjgyobyO11KktRPRc/+3dfkh/rY\nozED25VOkL21F7l+bJlC/gPgOI4fnbfkJr15GL2ZPIbED6/NXct5v26q7TMG\nBpNdi2Lj/nXlQ+O8utXcn+5WsIJrIKM78afLX5v/kVZOYe6qOwo+XgbpQUyY\nTQQdhZAPVzpZwYXeZFaH1thKnwpFnOrnfWJTuvwD9ApAM8U23DWDnd9Sij4D\nqpaGTWCHJzAhjxxCriNjKXrYUQngTXcKCsV942RZYw89M411ddTr/XQLgJGh\nQrI89a1406ESSqzrYWc3viY9+d9CHNaTCjWV5+GGUyj2QvGSFoR9W8UQ+gHT\ngpFkrbX8c8dlmch29ye05NMQhYUyvWa07ku3Ff156GrSxMY+NB+LgR30fyGh\nrknXpLUErjxJ7y7Zr2mEP9v+SUkTu2t/msdFTMVxEQslrKKJ/ft8pfiCfigY\nsRxXKNhlwp/fFwbeAiAL93TjEdOHl9CnIgHaa7wyEWbsoK1Fv9b4LjAYYPhm\nRT2z\r\n=O+2C\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"f12913899ff5c588e10830e5ba7183d9115c3442","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.4","dependencies":{"@opentelemetry/core":"^0.24.1-alpha.20+f1291389","@opentelemetry/semantic-conventions":"^0.24.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.9","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.2"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.24.1-alpha.20_1629234420593_0.5687243571904415","host":"s3://npm-registry-packages"}},"0.25.1-alpha.21":{"name":"@opentelemetry/resources","version":"0.25.1-alpha.21","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.25.1-alpha.21","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"65b8b3f354866cdaebde871f367a9b60c48ac063","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.25.1-alpha.21.tgz","fileCount":93,"integrity":"sha512-mFUvbNh9smpmYrCAiFpngO+LQk0/eTzcVyG8QJxWKI0cS5y12muZR7PgjNaCiMUlkqbS2FRc73my+V0b5h0I9A==","signatures":[{"sig":"MEYCIQCzSkTUhzIi5BDsPjqe90SkLEjG503/8ww7KirzGQ0IRAIhAOfkE8UHJTb9sYBF2FhJrygQZyc1kQKml1j1FCFxFn/J","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106408,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHWqlCRA9TVsSAnZWagAAW9AP/0xOzoBuOtVm7d70U9M7\nLWqxZLrzdftKqdu0UB5pX7sExDjmF9bU2nOA83l93b3MnVDFv5hZrWsW99Y1\n/pIAOKWywsogbqwSmkCmQc0QfVp+JVyKWivsOfEcOXpi4LoBaTzzrRETGk/B\nuSizjro89t150/DK/19s1HIDBri+vJlH4l38uVWxknwmHmsF7hYvbM78dLo0\nJBF2ZiV4yW9fAtreoVN9XsRIIdROyTGdzyaKSGILa4cR7gIdBexQ2ngBR0tz\nLU8fVc+ABwqkLikeKzG5yCSOKNRBJVo/pH41GehRM1OqERvfGYewJDguUz7Q\nPlVoirm6N73cvB1cIsJpsNcEKk9oHYqHiBbOGYb5ZRUutXa6Z7HLI+tTkRCs\nqxKs4b2/9Ir5oi25Hd7pkusPCReGNS74hVIcifJ4gifOq/QheOXaWHaD7BZ1\ne94Zm9SjJvIq5MnYDXo5GNtkHRShrChH4i+z8RFeILve4ie1lAP4bRvwdoW/\noRTOXSqrDj+B/WIxe7FDBJOYZ5xzETrz3tzeQ5lDnz1Kxf9gtECNUHowDhNL\n/HzXMSJDJRjCFNxAHjBQmnsQWdG2J0CKyTOnxlcwUr8b2dGWmECB0j1YwZGe\nzUZ/AQFHbv5lz2zVgNlwpcfjrLNIXycEMx1FS8hq5fstsVVTxx+ICNJH97lO\ngbHE\r\n=N6+m\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"0ef1fc28d366b74d98b73b5d6334ffdc75342fe2","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.4","dependencies":{"@opentelemetry/core":"^0.25.1-alpha.21+0ef1fc28","@opentelemetry/semantic-conventions":"^0.25.1-alpha.21+0ef1fc28"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.9","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.2"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.25.1-alpha.21_1629317796840_0.803376659663525","host":"s3://npm-registry-packages"}},"0.25.0":{"name":"@opentelemetry/resources","version":"0.25.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.25.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"a780ab536577359ca9ebe93ccc5d02ba8c3fb2ce","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.25.0.tgz","fileCount":93,"integrity":"sha512-O46u53vDBlxCML8O9dIjsRcCC2VT5ri1upwhp02ITobgJ16aVD/iScCo1lPl/x2E7yq9uwzMINENiiYZRFb6XA==","signatures":[{"sig":"MEUCICA6Lhfuimu5JB9cYeGR4+c/PvLGgh/vENH2qmBgfAeQAiEA7QAcgvpSJx6UnCLu+l23caBHZu2lMJ2F0cfANX8hJFc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106352,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHXi7CRA9TVsSAnZWagAA0jAQAJTCIIPuRu0c3ndVJVwg\nfPEpN2VvOgJiXT51EpRyJwvMtHEHGfiGmdVbL0Nd6T4Dl4G4mv6AksRCQyFm\nBNQzo5Hech81osop52gfVKwQlTQJmwsQasa3bwIHHoOEVHp2IC6Es/Z+oHku\nYQO+QUQxVTjVSFQ9vJgvKPxR/grRR92N5Mx8LNmTTVPoKKhCkzVlNYkKj1cE\ntnP3Zvij4gJLSTJgy9rvIhX7QdtBjDNJ6iipRy8c+5QKAh+zAM0oIadsUlqR\nCmev/EmToiCOXZB0RJzgHMkOLHeFqLgzKYit6LcF5IAF8b9kAm59La5hloYf\nbfdZxQ5CgTMQatL0VYSNkXXCQusJvGuGCs7A9XrftXcN/+BOO/7Z0AzhZ/VL\nvqAnWxanbrZM5OoPMQgkBc21Amxq9wuyUA7y418/++yoHgguuH8DuMn1Tc+j\n+8NyF6Gj5b7e7Z5Nlf5R0MWKz0RYf63WqhdL3jvV5j6fDCCj3Z9zjxIL4RSV\nkzWc1ESaBIO2e558eZbraOvBR3xJ2D30oS0shNQpobj+XLl5FmuND0G0hhTZ\n/5qHlxiRDkPSPeTkiNL0bnwV1JKW20HGoO/oETlDTnWtrdWHfg8whX8lqClS\n+fKUiO4T/YWEZzZT8G9f2WlpD+jr7WOj0xvZAh6x1sCENX4E/pcg+16GoXcC\n3jES\r\n=EdqN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"0ef1fc28d366b74d98b73b5d6334ffdc75342fe2","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.8.0","dependencies":{"@opentelemetry/core":"0.25.0","@opentelemetry/semantic-conventions":"0.25.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.9","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.2"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.25.0_1629321403357_0.2876885722400906","host":"s3://npm-registry-packages"}},"0.25.1-alpha.2":{"name":"@opentelemetry/resources","version":"0.25.1-alpha.2","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.25.1-alpha.2","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"b88363b13ad7c79056abff9b0079170dc920eba5","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.25.1-alpha.2.tgz","fileCount":93,"integrity":"sha512-kB+jrMAbaB9+pMsXuDhyaB8FqQsi3jbX1SRatgvL1nrmp5P/VwwYnH//Es+9P/Mch/xntJmHvrIAjlbCtrHR1Q==","signatures":[{"sig":"MEYCIQC4WJn118OYooPnUi7/kfXXQzsALQvoZT+yhA1q8bmlpAIhAIsBjuAeNCnQv+5tpIRO4WtF8evIJJ9fdTH4ZdJL8i/g","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106388,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJBXxCRA9TVsSAnZWagAA0BAP/087t137m5o+wQ3ZY36s\nQoThG76ox+boioU0KbaOx1L3WjsFujDuIGb5LKj/ZXgF8y06MgzNv38qanWA\n7WCJmvPq9LP5Hg+97hABGT64MhMC2fcA63zPUPffnK2oDV8GHEXcYOyiXe7R\nvwhcMbSDHBc5lZvQEBqNh0CRwpVszOAVe2aAzzHZbD0mB3xNE6nVfog0x90+\nKtMYXa1p/39HyCjW92cXFyrsVJxciaFvG49/rOCZhkAV0mo+YyFWkpsjJ62+\nmfdEStL9K7Ob4QilgEHg5xaGEw5NQZdXLcrN1V3RweiURdCKdPby1umY1ybf\nOJV1Jq+TJXjQZtTRCRI8VgA1NvSYswktRudfjLX8fZ3WKWVPiQnoDwm2QUKe\niQojWcugk8nX027ejQQ6SFiHa7eCnvVDlAZTbgwor6b/uAIOB6URRQew+n2b\ntX6dAZDufG32pNdSmI2CdUrlWFTQT1CWU9Ncj0j9m4Qwup1EywE/MD4eZHrP\n3Hiwbb8mAjD5YcZ9KtyVgzUxfC3kBNTq6WqoYt5iCFwsASBDlJ2Wn1iC8+u4\nW++mS160D+s9t3uP8+qBS359Rn2m5weBJcIb/GTKyn1cwVjXJFv3zZvLJPg0\n16xSY8VyjeQUbWFCy2o+b2giNnozBUXVn1aCcLdX1jShfDQelMzcZugpJTb4\nMCGD\r\n=wJl1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"78a78c093c2df24b66c47af4e037da9a6098fedb","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.5","dependencies":{"@opentelemetry/core":"^0.25.1-alpha.2+78a78c09","@opentelemetry/semantic-conventions":"^0.25.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.9","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.2"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.25.1-alpha.2_1629754865457_0.5122955146521735","host":"s3://npm-registry-packages"}},"0.25.1-alpha.4":{"name":"@opentelemetry/resources","version":"0.25.1-alpha.4","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.25.1-alpha.4","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"b4603f217ae0c5246f34a0ffc824b2e86abbc243","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.25.1-alpha.4.tgz","fileCount":93,"integrity":"sha512-23u++mwUTvUL2mBbr7udLQ8pZgVp+b276JWpp+GRe68vAxLrjH0qVI+OHVVsFZh3Lno1PBuQqtQ4QA3P3jeXhQ==","signatures":[{"sig":"MEQCIElzhvK4eiM7m5Laovf+ocN0V+6VZpJx3V8yqUiIOdlwAiAu0VwObuOA8EYbdHKXQOGZaxynU2Ss+NrfRcwJYxCEog==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJUl4CRA9TVsSAnZWagAAAesP/juHmloXxfv2YuoNqVL0\n0H6kqWw/xthMZ1xp2zmCCPZdPYfeA7r/90y1d0GY8qxMFuZp99sFnR8bkwBT\nJwtHzQkLhllK4yvR5Q8TJ2ECsOGkFMXQNKCdHtXMQGIqmFHSevKyuZU3FfVR\nP2n9hj3SJRFzA0qpnhUZI1NM1UTIVkALycw05SBOjTy2qZ9UG8ad6MejLzek\nWQq9N+qVewbsNuPhdISlnK+AJYYd8Zavr75fCOQr3PDo0zAWHaoydYiecD8t\nTl3XJZF0DL7B2ZZsKNTw8SG/H9KszW0PQx0vISYPxtlxMMtOf9VbXW09zbXn\naoVyu9akvpxHfzpMdggE4Yv3DKZcXiic6CfQaMhP9D3Y5gDM5B4Z8OverxD2\nYCX0Sm3cah009VhOjMOBIUyAhwsuHQDm7kG9K9OLV965RonAsYFj9KIr09dt\nWxg8qg4KUfEAym46poJUqVEH0R9FOQenJiqC/7rGvF3G+YoeqbMI44oOjcFP\nBERgNt1H2jfID80gZd75fmINgTMQOCvTEVYBu0eSWpKETCHGEZ7yoDmj87JG\nT+Dx9Hey90wiSu+ZXVVeP/ZGpEzzt03H4RVoXPd/I0HyjH5OmegvpkMI4KaJ\ns+tRxAuCiSFWL24ALLVxyBFmXAghMmCnfo6s3SuHgOrwAVdTZIG1wI9EaI4y\nUuGF\r\n=1/dA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"3cbd530f2ee5c06376210402eb87ec9e362853c5","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.5","dependencies":{"@opentelemetry/core":"^0.25.1-alpha.4+3cbd530f","@opentelemetry/semantic-conventions":"^0.25.1-alpha.4+3cbd530f"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.11","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.2"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.25.1-alpha.4_1629833591773_0.4742652694701468","host":"s3://npm-registry-packages"}},"0.25.1-alpha.12":{"name":"@opentelemetry/resources","version":"0.25.1-alpha.12","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.25.1-alpha.12","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"e4b8605bd66bebe96781f80e3a3464cd49a4eaf3","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.25.1-alpha.12.tgz","fileCount":93,"integrity":"sha512-K89s3hY28kACwituUUQ+61vJJd0ria0r7ciTPVjmPyODaWXmkg9YSc1wm+BvUiVjlIwGzzzR10buEn1O+8vRvQ==","signatures":[{"sig":"MEYCIQCscKHimzRMh7x0tEWjgNDG+DVT7JbUt9DI3nLUztBktQIhAKlJIcIV6fzoxplAnAYF97MvBf8jAMr0cGreRbmXRKEP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106391,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLT3rCRA9TVsSAnZWagAAvgcQAJagA0PaniMJLmPv95Rk\nastUpQoo4su7mIXHgh/plNCcKHVlqDNQMlS5sSMm8r1ebvdjdbAdqQ34M0eT\nOq2M+swh3tw6/G6s0P9J9VDVh9XHJ2bEzDjSMwaivZ2L1yGK68tJDA9gts3U\nttDCzUBKqF0421oVdMEbK4GJ0vkXBZcg6X3yi7GZBxPEkc20yXP26ecC41Xw\nvP8Qj3zWfYtecG8OuoTD011iCw/Wc6OIXy4nPCRWfvsoobYHGlX/36sJW8HY\nPA6uezzKPeEWZYSClVsGhBXb829N3PBJiCGShspWlB70Il5/VgMsaBs811zJ\nHbNBz6EaP24qux1Y2pxs2GXwgfWfWRXQGkH0p1cFqqHT+npjrF3Y8UHEJ8AT\nNUoJXN0WK6fl2539LXYfhdPZgdntCn7dMjbl650lOjZtXA4P9npBxQUPDoZg\n/5oHulezqJAs/Dvx4/MuvWmcU+rGeqVv0reNNJu1kl1otvOGTw5w94pr91tp\n/sLnnjfcWzZwrT255omz9sbaG0TmCVsXnbLVRjoTqDBcS0+vQGDOABSWb4M4\nkkFgA+jCKHYySdxYUrMHf43E967t6yknwZVYGYhxhxbBm4knkLnuVsAyok0+\nWJFuOvSKqL8nzEE4qD+XQ2ri1L6zxz+CNohCAq3Jn8pYwSXzEI6T9oDZ/3JJ\nQkIi\r\n=tLuM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"7d2c4aaeb08e6c680f8b46cefcdfe955d7abe4b2","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.5","dependencies":{"@opentelemetry/core":"^0.25.1-alpha.12+7d2c4aae","@opentelemetry/semantic-conventions":"^0.25.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.11","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.2"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.25.1-alpha.12_1630354922987_0.42259767733703346","host":"s3://npm-registry-packages"}},"0.25.1-alpha.13":{"name":"@opentelemetry/resources","version":"0.25.1-alpha.13","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.25.1-alpha.13","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"85e1fa53d193ecc0b2c5e15917b8a5d66774f30e","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.25.1-alpha.13.tgz","fileCount":93,"integrity":"sha512-PRuYOq81CoTutjm7qBWZEfI+SAly2ocTmVBLIhyVOkAbtaoToqG0zy/9v3XDyHus3ngrak9Bgr+wTczPLKZKaA==","signatures":[{"sig":"MEQCIAcPMZW4CMUFf/88Em9shQM/OpB/6AKblmvLAyZCXfhIAiA95WeyYuCkXU74HKKiNx8WduwTcmRhyLUFm9n5g5gfCA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106546,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLUJ0CRA9TVsSAnZWagAAlPIP/1BPZogZpCKJO5gNRmM7\nI1f0ywIFSPshU1GjcVLA1bjFTz1C5mc2NbxOW5p6HemIdoOLg/0QNxjswlOc\nFsIBQNtEt1iYzFWvPwBuX/Q55PXYMyVyKY7mL4pLrSBW8Kq8nRxUyKiZQ9hK\nT0obPt7AAWajG+r20zPCaJwA6Z1sX+VamjgxUfieP4xKTKM5u+nB7UAIAAoq\nv/ClWr1p7Qa41s0t/Z98lwO/n/tuY1G75odkznnTOwSPVEy0QCDAn8Ua4Ols\nyQaGKycjNKXOxMtctQ2xUcl998ZuZYhgVl7Kg+lGfrYsiyBh4im9KUpWwhrZ\njVMnI0L9dyBLH4eI/ApM43TrLbgeUrGV1rZyL2xaC/boVmnaQeqC2GJeTltl\nq7DBcFctTdlQIcHjikHTXH/jwNYnR4YfQvpMNyiCf+UucQ0Ebmtt+AJkInxE\nAVuhiEb8XOeNDWCxqJTYIjxKw/dduOHPINroO17a10hqw5X9/8BIC3dFVcqN\nEzwIiO3+GB58J5KgLgN342JXAHPYkM+bjU9RoJstVMA3uf0lDDnn6t1jULHm\nY6hABin6ISEstlFt3cHq84GfNDnmctbFym9kBAUAwiCVoQ3YFmSiUF8I5iNa\n19onYQrCp0QprnVGD67v6fCyH+a6EALpGuoRTN4JzvigNTi461SyPPHLcbY0\n8O91\r\n=ETtO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"f0caa22ffcb26af2a2f05260f138a494e120a955","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-filtered-dependencies"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.5","dependencies":{"@opentelemetry/core":"^0.25.1-alpha.13+f0caa22f","@opentelemetry/semantic-conventions":"^0.25.1-alpha.13+f0caa22f"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.11","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.2"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.25.1-alpha.13_1630356084050_0.036635511406662546","host":"s3://npm-registry-packages"}},"0.25.1-alpha.23":{"name":"@opentelemetry/resources","version":"0.25.1-alpha.23","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.25.1-alpha.23","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"2856afc143967b5a01dd79dfea79a2de4c95d54f","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.25.1-alpha.23.tgz","fileCount":93,"integrity":"sha512-b8hvijZwVZY9DCd36v+x7i5vyMvdXYYKgwmqhF7MRUfmOdYEMEEoQWS5jq+USTLPNg915pPi9U3QDi6zCH4/8A==","signatures":[{"sig":"MEUCIQCRefJd5zjIlstttz2NVRHeE44gkFSpP6Qk+XX3xJ55dAIgCvZuCudZp6Ml3zcH196051KmHMimyQkJ/xpIbe4eNSw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106528,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOTXqCRA9TVsSAnZWagAAEJsP/ijZUDUuqu3iyJ3mwxCD\nDAG0d5aHrBf7pG0bAXACFbeOB5ogSIOfb0+jV0bTPfl9rKKAgKQMVjI9LUO0\nv+E5c7rWfabhR0L8jEi1YsnEZNSRwsl3G9mGNh/S4Eol9bSKKrh6uaQCeY8T\ndw3VsUaCZ7IDGIIPeRewj/rToN3F7caoWTgwDvJPe5yP7TVRAhViok0d2kXq\nLdPNYjofi4VFTYIk+ciAqqfFGp0R6+Cf8BqUE/HztA/FGM8zoDeHYz2Jchnr\nVuAaQOBYbx09N/pGaxNr5GOd8uUm58ywGnA6XrnjCCaoetXxRfcw+un5LkHV\ngLIXZgEGp7GQULHDfQN3rZz6SDWpcGqDf1dKGoVasVLcnuD0Er0p+icvKjV3\nBFNNAdVqQjdmlTSPem03AWACtGsLCeAJzPYE49xQVmt995YWG8h99KSrCgx/\nOs86ezgrEpLUrl7Tj9CUYtg4VXeGCozNk2lci7oWb3sbOIOTpklMOVtVV6fY\nKgFxt+bUDDTvotuVxiCIFCGaz/lsYsneawu7XRZHk3uscmnEtVkSG0kU0qKe\nLSW4k/cvuUkq76w/3HGKuJiryTBzAPO/mSqp303gbSCGYihBS0ZpdKi7frD1\ns/RlTVWZxZ44vh7puu3mAlY4H5/w2/+F1VwhX24l2Q4CdcA1aoQKaHyuoGkG\nj/Oe\r\n=13XD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"feea5167c15c41f0aeedc60959e36c18315c7ede","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-filtered-dependencies"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.17.6","dependencies":{"@opentelemetry/core":"^0.25.1-alpha.23+feea5167","@opentelemetry/semantic-conventions":"^0.25.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.11","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.2"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.25.1-alpha.23_1631139306276_0.37643788411893464","host":"s3://npm-registry-packages"}},"0.26.0":{"name":"@opentelemetry/resources","version":"0.26.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@0.26.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"e6e9efb5317365001ff885333f4964712ca8184c","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.26.0.tgz","fileCount":93,"integrity":"sha512-s0iyFqmv5dAipXioS3PwIeD6c2TC5jzfcrwDzZXSsMz0LbDiFlhb149OPd0CngYMwcEWqQcAVzqu++3jzDvCsw==","signatures":[{"sig":"MEYCIQDLqNN8Gb9NsnlT4eaYngJtebURObC66ZXKKXFiXRk7swIhAPOy+tU78qPAR2ZKVh9VVDYQMEsv9bDpi2Ce9hLavwKC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106490},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"fa2e897587a2441205fd085772d80a0a225ee78e","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-filtered-dependencies"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.8.0","dependencies":{"@opentelemetry/core":"0.26.0","@opentelemetry/semantic-conventions":"0.26.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.11","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.2"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/resources_0.26.0_1633005329890_0.19280198775144286","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@opentelemetry/resources","version":"1.0.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.0.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"6fb83d39d8305ea75cb3e120583d125670b3d6ac","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.0.0.tgz","fileCount":93,"integrity":"sha512-ORP8F2LLcJEm5M3H24RmdlMdiDc70ySPushpkrAW34KZGdZXwkrFoFXZhhs5MUxPT+fLrTuBafXxZVr8eHtFuQ==","signatures":[{"sig":"MEQCIDCYIdJbVCfFAL/2iLLtZecPHABlY0KdA6OBUwemJ2WpAiBYj0r3BL4vWKJkH7Obj9A6eX95h5yhfyUIlh2zaV2dpg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106483},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"69b925d142a4405c7c6bec7deadd8b4e96c7d5d6","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-filtered-dependencies"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.8.0","dependencies":{"@opentelemetry/core":"1.0.0","@opentelemetry/semantic-conventions":"1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.11","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"^1.0.2"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.0.0_1633035222566_0.8841209556538232","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@opentelemetry/resources","version":"1.0.1","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.0.1","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"2d190e2e6e64327b436447a8dd799afc673b6e07","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.0.1.tgz","fileCount":93,"integrity":"sha512-p8DevOaAEepPucUtImR4cZKHOE2L1jgQAtkdZporV+XnxPA/HqCHPEESyUVuo4f5M0NUlL6k5Pba75KwNJlTRg==","signatures":[{"sig":"MEQCIGe/vdi1hw+Txt3i9kpB7MvIbLXPLkqFRsJtR/phCvbwAiBJFPM85fOfjhYTtvke6VXIKPX7klauLw2ViXYH277X0g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":150905,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2UqOCRA9TVsSAnZWagAAKMYP/RpDlX0+AxqZ6sxkkn/1\nwMs6m9jLySN2ccAMSLPRmVxYm9rWQUWsEoIOCSregMjdqcl4OOSzS8etehJU\nGS+8NFbG6fv4EDF0XsumICqrUSXJd5g10HlNG2TCYc5Vi/Yeq58rDuGCh1nQ\n9gAM+Ug/KM4CMMlIRI4KLAWjZweGLuAkuUCWpDnRIiKSyInPXUmPN0Wn1lpl\nx+MDL5bJbQK7yuW/Zl5c83VINhZ+dEqsmyHB6GOfQoVjYcs8lSwbfn8Bxi5g\nCI6aZ6qyMINRxJ/DtOhrZhwHHeDN5H0LX0k1KsxmR52fuz5b8LT6czo91wkE\nZLVeDapY8AlknXI2yTj1ErdM0KWAWyPyn2dDQ39o20hqq0faWLCVJ2TA77c9\nKyv2aReUoHcMnB46hOYTu9VVZJM1j4f4KpDS9DEJeUaaG4rHIucHbgZ+4ogj\nhlb8bi/tQ6EjvW4YKXqJ0vaj6iTCp44xCj0q1OjFrlzcrdA9KzCEMrzSwxKr\nj6Zyb6OefQSUXjTaEpdVQgOTZF1+8jUoOp6xByUpokO0SvDUCKyBBaAaIgJQ\nqKTqdmiXi9uoF9wfxbVXS0vRANavtI0T/oyE4tZQcI7ow2+ceRC85IoEpddS\n9353K77D5Kcc53Rqr135Rwp6nVSc02hOKYrnZCVtVgBT8XvDsJoMNlZiNo3e\npD6U\r\n=VUWf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"9cf402ee4231ee1446884b5f59958ceafc1b5188","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-filtered-dependencies"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.0.1","@opentelemetry/semantic-conventions":"1.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.11","@types/mocha":"8.2.3","@types/sinon":"10.0.2","@opentelemetry/api":"~1.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.0.1_1636642282621_0.3380290882509722","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@opentelemetry/resources","version":"1.1.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.1.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"c14b94052a28df157d313a4ddb65813566903d5d","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.1.0.tgz","fileCount":51,"integrity":"sha512-0BGdZum74lBXIw76ffDLSIpdwcfQAk4lDi0zLF/o+eeZ31JPvWBrRp2i0mr0DJ87wmGTjQEuzZ1hRjkLWaagHA==","signatures":[{"sig":"MEUCIQDqll44MXfetLwtjsWCgL0hYHvq6v/iEFmMG3wcmQ1HKgIgD9PZQ/W0tLK7EMlZ7ca1aydZNFpbvgB/9WwaWYk0i44=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":89255,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiND6UACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqKsA//QKxsEZ1AC2GpzA/3UXxwAe+UEXWVBNW0FVij+OyFdkE+ZjHy\r\nN4xwHg9nyaQPDnv2MOJCSxI+Jg01cB9ICdwgNI9ZmlkfTlPafmJaflG92WBu\r\nbmSEaNl9VJFG5UYNjadbzdANELC4C0Xi7PwoXbXYwjwVD8z24V49StANMeZt\r\niLo71sDSBY8bxWCMarD1y2YlrMJ8X9BFDkWoFD86wGSpUmuqrzFgzeXUaQjN\r\nzzVaTw2WmdC/t4zPtZmp/eeruCP/h+i11JPU7Vhg6Jl3R2cc87IT7HzK6dQF\r\nCPFg/IgvUccrGTg/blis+5BBPjDPs5jvw/kfhXxi8Nq3wRE5Gj8vsTSLbSbj\r\nNNXqIGARzLV3qWCHXOslHf0dxttgr6XUCzJJfFNuT5ctb7ees9blIqlYeZpr\r\n2kYms/xLxywsy/peaLajAVdNlnFFxHprL/p0H1Qpd6iJldJpDaPOCJsPTSGn\r\nWfoUXOwFrfVnuobJSyVVyGTNJrtX0hiUvcFunUY1aDOXzJvLqRPZ+R1VpLw+\r\neKlUIJlBUck0qDti+iMQtx3yv8JVmK9hxo9TJs4VuaT6+KhbRG7OSzs+LwOU\r\nXC5PtJT0vbAVCTBy95PFaxzshVEFp0XNM/VZ1qedROjjkyC5xjsFpdCj/dTl\r\nQKtktWqflZDeNw4Vx9zbeX/5BfB/ehun7xI=\r\n=xqMX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"f384303ac469914d0dbafde0758ccdae473f336e","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","test:browser":"nyc karma start --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.1.0","@opentelemetry/semantic-conventions":"1.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","karma":"6.3.16","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","typescript":"4.4.4","@types/node":"14.17.33","karma-mocha":"2.0.1","webpack-cli":"4.9.1","@types/mocha":"8.2.3","@types/sinon":"10.0.6","karma-webpack":"4.0.2","webpack-merge":"5.8.0","@opentelemetry/api":"~1.1.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.1.0_1647591060463_0.8778373249804783","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"@opentelemetry/resources","version":"1.1.1","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.1.1","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"3abe9957e9e670164aaac9051768d95f4538fe8a","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.1.1.tgz","fileCount":147,"integrity":"sha512-w0X65ufTaRevIumjylWzYhRquRNoM5T6e0ARNcE0o2YkYPkAxTr3PYkcXG8hUdWRAglqliZKG4IlMv03Q0wOXA==","signatures":[{"sig":"MEUCIDVVqR65c7gP4VPWd0MhHsCR1GZKhP7qUglHZpYb4kJeAiEA5LZinad0SMMJoYxW+9nqADrPn3sjJPMhJKWW73jyQz4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244951,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiOij9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpYcQ/+JFy0U+IkSCqrw0yD+dj5+W81TeeEGgwfwQIUpvzd3AedM/Jt\r\n8Kh5pCEILR0gHB1b0UcHSVom0FDCB5+5MfGR/bjBWh8QHkoEV7JeIVlIMxLd\r\n3kYsBCDGTRNn/2bLtjU4yB6jjUyUL2kGPhQlKQeNY/d7yvnJMpwbgwqMyq2u\r\nCOX2f/DFlyaFLCvmNVhEbswGD1JJYFDRy/5BepMITIPI8dLD7x2IBFs146eK\r\nJMTsMc44pGeYSlHJW4u/xf4bLt6v5V8mKstl+xgN/P0Q///AQp7Y5eEZ8TgZ\r\ncs/r0HzvM/I4vVvQ5FWPMCMBuP6cdNce0Zs7WbJZ9o7xO7CSrKiWMSMwuEqQ\r\nfDMaaLEJxaPuUdGcjl7aU42boNPabGhA55q0jCVa6I/UWATS4UECRnm7jnXi\r\n6z4+TVVImB6cZi2I2dhiUDcUVuZjKbpJeVe7R21dTJMPX1gqj4gKwGF6G4xh\r\nDGqm0eckTEHuVnyz0RkskrYjxZdVocyGwUqZEDS5Mejy/7+4CAmAHWn7JTSm\r\nOHals2tZ4clUV16EYWfsQul/k7hwDUf/9tURC8VxheC+OkbUj6QW09uB2bFi\r\nNS2aVbYS0T586SWSBR0nhs909bvN6hDFcahosQKzhlHdh8eXLnNerQGKiPcF\r\n7YfTpHcIN7S6q+5m6I4To2uScU7j5XXdRok=\r\n=WL5+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"b0f8a2d36e6d1d3090c3d2380608d2102c826e0b","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","test:browser":"nyc karma start --single-run","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.1.1","@opentelemetry/semantic-conventions":"1.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","karma":"6.3.16","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","typescript":"4.4.4","@types/node":"14.17.33","karma-mocha":"2.0.1","webpack-cli":"4.9.1","@types/mocha":"8.2.3","@types/sinon":"10.0.6","karma-webpack":"4.0.2","webpack-merge":"5.8.0","@opentelemetry/api":"~1.1.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.1.1_1647978749815_0.23098125187940854","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"@opentelemetry/resources","version":"1.2.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.2.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"5046d104d33839e58cca3184547c5dc26602f228","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.2.0.tgz","fileCount":147,"integrity":"sha512-S5ZlZa2JF+1qhiF7eb3tTtDfKmTODO//pvam9vEyZvr+/At45rIQ7cyznRdMWCppZbholwXWXnrKml29IIG9vQ==","signatures":[{"sig":"MEUCIQD6o2lVDbah6q4PZXp1j+DwfEKSWvvsQ2fiqZk5sBswjAIgezrqnlSCrXYrmUAVvpDEdVuNKssPZzJelMurbXAfLV0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245022,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiYsI+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrS+Q/+M/VGAVRAU+ViOmgtnODb9GPFU/l8PqJAMlbK+AJ3LhNPkAk5\r\nRSt00cIQ4QinAAK8Y05V9rxPXHPyUzhLa57rF6zzS1qAH2VZeyQxK+FBYpO7\r\nh5Nh0XJZOoWR53z08wmvCOnLNIShtnm+n8NsRLlIC/yJHhVpm65hF+Vjs2jT\r\nBzMABkNaKV/9vs1ZKEtcLuX0JLOyeWPqSs7sPRONtD2DiMRU5s8iMGEzSgHQ\r\nbg4rSo29BVPxx0voUZiwxJBjDGr8jCbU3I0Z5Biml6xx/qJy+FrzWia3TSjS\r\nXB2TVH6ScGcnRTPylIa+v55fq5FiQ/Xi5cdaNlIADxmrXIYSPKm+H53UY/D6\r\nw2XoA9eWNkiS5xTY1i8Wa+SMZO6jnN9SJG5zZKw9dt+JR5DZngyGeFpMFUXu\r\nZUQChmPjlkCf/efXrxBUlb5j4s2mrtP+gmt3h6EW4qTzPokWwbYywFW73GRJ\r\nHG+FrOg2HnxL3OQt2bcNd0QIxGoMErb5pXt2v38QqcnVepYHeL32L9mIRnnf\r\nqLmLgQaB/gjxQoq2uqphWLM6zsdvGi08hUbmTWLMUQviaBAgyD5Tvi03WJCJ\r\nfLO/sHiZ+pIY8EQn5ywiIbbjZ1snLyyxGbCftL1lehueOmmf9GiZxbHbM4+k\r\nSQzCOkqr+6uYUULn3o/hm/AZ2B/+RzzsW4g=\r\n=nYGZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=8.12.0"},"gitHead":"a0a670a03fd35b0799bee8cc466f79e93b5b6dd2","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.2.0","@opentelemetry/semantic-conventions":"1.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"13.0.11","karma":"6.3.16","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","typescript":"4.4.4","@types/node":"14.17.33","karma-mocha":"2.0.1","webpack-cli":"4.9.1","@types/mocha":"8.2.3","@types/sinon":"10.0.6","karma-webpack":"4.0.2","webpack-merge":"5.8.0","@opentelemetry/api":">=1.0.0 <1.2.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.2.0_1650639422165_0.7670335839730034","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"@opentelemetry/resources","version":"1.3.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.3.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"260043d32acc82c14a7766e4f8b88a76c6cb5d4a","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.3.0.tgz","fileCount":165,"integrity":"sha512-vSj4YIS8yHx8AEwYFV4l1mcCtDogSOhOymAMEg93LTWcnrhfz8hJ4Q7H21fVUKJx/6h+6cnfTYygzyqBjlilJw==","signatures":[{"sig":"MEUCIHKHLyw8SCnF9STlwBvLtRLIiwenJWUoLNIZpeDVt0/ZAiEAgy2Umlnf27J540hYoqBxKs5xdeqQlBcvhpY7CCOYHF0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":283299,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJikSljACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpB9w/8COl669IhMPLZC48a5zv98To2oRishRX/Qyq03WdarSFG16gc\r\ntaoWi+mdc89Ox+EPe0fZOhF6J0GXBY3OkXlbD6qhXBNybV88xlRh4d3CHwzV\r\naDqtSu5WtqS78UkOp3jdjj1msplVUxuoku4gihn8GVbV32Z5BV2LP/yQrrKE\r\nUtOrsUnpb/kjYHUT12G96kKFtlh/InNLCP2I4Kq4jjG48KTFrBDrE7TtoqNn\r\nPoWm6pFro3d4QfkK1tlHJfzrwRuQRIw96SBIFk1WaemhjULcq6DrOypVG9Vn\r\nlK2ktOq3a7pGSsoGgdrlgxT/i1gj9zMk21kPwxWR+nRGpZ5F1iFm7jXKA60f\r\nelnVIZPKzwR3jUEqUL/sn6R/cvkM2xjeDNaXigwjKWpjHRvgAAY0/n4PRZtU\r\nj+IgRNSAy1UxnicWWEp5uKkdPZ+T1owTGv2YVUgw3P3TOD0GqD7xGvTciY+r\r\nBvdAGudOUa+uM+nJv/cUcaztolMP9X5mAafvA8x5nYMKQT7ZMXfdYhDCtSJM\r\ndkbAW0wXc8/7TS5oB+6BFLYeEj2nmjXJK7Z3jZnD+iMWMBf2pAJMQxXIw61n\r\nMM4FJsPILN1NVvLQT50l//S8Qh+Gpi+iLixa48CLh2K6GIwrwcEAl6bJr8Lv\r\nYCcZF71LHGyq18Of7OSm0g7ZVIPLTC+e49o=\r\n=S/Sm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=8.12.0"},"gitHead":"eda0b092db484855ded8b4837ba7fc19a377c5a7","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.3.0","@opentelemetry/semantic-conventions":"1.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","karma":"6.3.16","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"9.0.2","typescript":"4.4.4","@types/node":"14.17.33","karma-mocha":"2.0.1","webpack-cli":"4.9.1","@types/mocha":"8.2.3","@types/sinon":"10.0.6","karma-webpack":"4.0.2","webpack-merge":"5.8.0","@opentelemetry/api":">=1.0.0 <1.2.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.3.0_1653680483334_0.7895401519325691","host":"s3://npm-registry-packages"}},"1.3.1":{"name":"@opentelemetry/resources","version":"1.3.1","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.3.1","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"9fd85ac4ffeefc35441404b384d5c1db8b243121","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.3.1.tgz","fileCount":192,"integrity":"sha512-X8bl3X0YjlsHWy0Iv0KUETtZuRUznX4yr1iScKCtfy8AoRfZFc2xxWKMDJ0TrqYwSapgeg4YwpmRzUKmmnrbeA==","signatures":[{"sig":"MEYCIQCFkckYMkri2EmKoHipB3UYoTLaxbVGWpX2Zc+gQLIwxAIhAM7sbVcqlYum4UwWchWP8i2S/m+Rs+Ee3qf82JgdgAKj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":305330,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJinmLjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr4Tw//acPHACqgavtoIjzqHa4FLlPCPxdSm+1RoG1q+iJNXb9CXFUs\r\nKjXOF/936ruXZeJ3AQW4vE7sLGjqqsscH3Rf0W+O4ApbdExlUfSIbXiYyppi\r\na4aL1gTKMr5ktBDYUaV2B7wGfhdyyffCHOIjkasK6EpNtybZET8jISGcERq3\r\n/YeTH2fdMoaiGDxKdEmB/5VV04qFuhr6BEwn8fdvJGMr4qj2Yi0vZQeYD1Ap\r\nfX+2tvPDVXSaAj0TEalu2NsMvcI/yVZG5cYDH/ftLHBbG6bElyolE37g0lsn\r\nvuQ4hnGHCJJSixriudfBNDbBi3CJ8P/RVZFuUjzDTSLm9SBJJV28w1tEudj6\r\nIsbeUy9gTO++NzuRZOfI0AOEhTGNiPEvTJBHitNhJ53Xl+yIEK8c4+3SjfLK\r\nZLDPc1CrUbBtbXxy+AyVAkB5Pd3hZwhsuSrZrP6ri8dD/cJtYz2uOIVOVoMt\r\nKUJkegylBM1C3zLrZXQm2roHScUpSO5WNDoUpgi/2xE2xd1j4yH1g8hXms+r\r\nIQ/uey6KGlF1x57ll5VbtmOP0IRnbG1biIPAIbD58/CoikD+qKBQgKb2e6tM\r\njxHjenps3/kb7bJ+eV41ReGHGnAL/RQe0IOt05+G5TzDkVfuUnKItXS4Cu+N\r\nAqiAZp9aY1C3aceVeaSSFJ41ABCBvI5iNDU=\r\n=c3M5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=8.12.0"},"gitHead":"51afd54bd63e46d5d530266761144c7be2f6b3a7","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.3.1","@opentelemetry/semantic-conventions":"1.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","karma":"6.3.16","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"9.0.2","typescript":"4.4.4","@types/node":"14.17.33","karma-mocha":"2.0.1","webpack-cli":"4.9.1","@types/mocha":"8.2.3","@types/sinon":"10.0.6","karma-webpack":"4.0.2","webpack-merge":"5.8.0","@opentelemetry/api":">=1.0.0 <1.2.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.3.1_1654547171517_0.7241857789800223","host":"s3://npm-registry-packages"}},"1.4.0":{"name":"@opentelemetry/resources","version":"1.4.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.4.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"5e23b0d7976158861059dec17e0ee36a35a5ab85","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.4.0.tgz","fileCount":192,"integrity":"sha512-Q3pI5+pCM+Ur7YwK9GbG89UBipwJbfmuzSPAXTw964ZHFzSrz+JAgrETC9rqsUOYdUlj/V7LbRMG5bo72xE0Xw==","signatures":[{"sig":"MEUCIQCQoDmqCZKiytt3HChvfrYR7ViCa9oXWUy8wJE6g1omuAIgA6MWJ7NrRwwzkfZUl4wujsPUFxhXJPe3KZEEPJdZYpA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":305326,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixe1oACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq8zA/+Ny5TWKuXcDu8ztFIpWkN9t9T/Mpu/X4ry+BwodHKHC8aSK4l\r\nbBqpLYtnnxDagzNHmDM/PDbw1ZTzQoEOD8Umgmjacv9qssI8Sg7O0mbkI9dw\r\nI1n4bptw+h08S6fbIS1fmk4I2m3n4V7H6EA0HnOTQnJxBnhEoa78cWs8/IUs\r\nGYxtvPI1WpipY2wa876tcPQD7tDvH4knbHQn87gMXvT2b7SAEH6m/bNxF/HB\r\nzqPLOnJRENlOoAbfQNkNzRHzNkK6CT6XDqree/lS45LpPNBx6u2l3eFqmzNa\r\n+CdsKRH1riSa+dwdP/u4DBntLYN1t76SGwy+dpkzJF8J4Hb3Vdpk+H+A/AHU\r\n7RgWQ9kFsabszEyRSnaIwRXE81obar5uLWO+K+Cwe+ciyIL1w/qi7t9pxbMI\r\nxsRt6ehATtDAWO8lXjXkIMAwztvSuyIgNWHFVYUg6vFviYZEYXzQ9+T7lCRT\r\nPj5zTam2INITmKu29tocx4FbYmL9ehiceveZdUTO41jctUE5XuXtcPAwGuUu\r\nRsrJrH2wWBtAC35ejy0yJDNPBW8V/kkZNe86jdZWYjsgVCAhU0MArlG3+IjC\r\njEbCKQGPKroxyGqNt4h9d+c3Ggwoc8CgHUZNGMDIVxboqFese6ax7vh1r3Gt\r\nftCoKL72KBJXgTh8b+gvKhPgRRLV+cnY7dM=\r\n=O6TM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"e39ab883b18636238ef0fd741df4ce5ed53e8d04","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.4.0","@opentelemetry/semantic-conventions":"1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","karma":"6.3.16","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"9.0.2","typescript":"4.4.4","@types/node":"14.17.33","karma-mocha":"2.0.1","webpack-cli":"4.9.1","@types/mocha":"8.2.3","@types/sinon":"10.0.6","karma-webpack":"4.0.2","webpack-merge":"5.8.0","@opentelemetry/api":">=1.0.0 <1.2.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.4.0_1657138536249_0.3126273598151854","host":"s3://npm-registry-packages"}},"1.5.0":{"name":"@opentelemetry/resources","version":"1.5.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.5.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"ce7fbdaec3494e41bc279ddbed3c478ee2570b03","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.5.0.tgz","fileCount":192,"integrity":"sha512-YeEfC6IY54U3xL3P2+UAiom+r50ZF2jM0J47RV5uTFGF19Xjd5zazSwDPgmxtAd6DwLX0/5S5iqrsH4nEXMYoA==","signatures":[{"sig":"MEUCIGA4jHdy/L6BFga/lbiR0XCZZsPPvGCpj0blHI73PFk1AiEArq+NfV+OwiodV+E3Hx6ovCcudVCVFmw3tVpMkj9rmX8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":305437,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi4FP9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoTag/8Dz3YPUNen8AC2/IWBYCzx21CojQGpSfJLfriKMeTgTmpY+34\r\n8ao/nhhfQox1++Uqc875Ec0h16t30JqagdNrDhQG+Nzl6jhSEQm6R5qNsDQD\r\nnlcuBToHGlDdCIQVav7FgI9zMHCyjjRDyWhKvajvdPZ6Twtq97UBpXgKj+yj\r\ng0/L2KDAgdPTLnMfrIW/BSgkydqjuSZaw6HIFOc8QxhvN6BdX3wQFrnBCt/O\r\n62CKQqtZoUwUx3OAJl8N+36u2zPmMr4iH0dCt1QwYD3/Hlyfelkz1Lpz9OVK\r\nPGGCR9MN0lwx/sUy1mn0SD86ksqmPrkC8ynNi7stiL9hCewImvhvkHHsOY+v\r\nYRa8z9PEVMAGJMd1I0bZWoQ8kjG18ItgSoENmvQV+9NGruaUQmKjd22E39vp\r\nrQ09AdHX4YvoXxbJoyIdCb+TOPqxSautQLhbPVb3OIR6bO0hacKZHfvz+ccG\r\nrdoxwuEhW0eG0G3sCEcmHgKEZDFNCJHCuWRIsEaz4/bspQvzAMtLznWbI4Ni\r\nrFIcEdHMXbycNMa7GrxAps9z/QiXkj6Sf7pfSdK2wgQiYBL3G5qyQQ9/ueso\r\nkH1r1iPkwvnoUN1yBpoFyR9ik8Dc4y/3IWDHUxyB5b+X2Vs8pSTiXwMP3PAH\r\nNS83u0qFvI3TVysJZqbkVMMaHrcmhQ+ua/w=\r\n=85Ua\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"776656b6e0cd0fc49a52b734702bc77110e483f1","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.5.0","@opentelemetry/semantic-conventions":"1.5.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","karma":"6.3.16","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"9.0.2","typescript":"4.4.4","@types/node":"14.17.33","karma-mocha":"2.0.1","webpack-cli":"4.9.1","@types/mocha":"8.2.3","@types/sinon":"10.0.6","karma-webpack":"4.0.2","webpack-merge":"5.8.0","@opentelemetry/api":">=1.0.0 <1.2.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.5.0_1658868732949_0.8406147357362332","host":"s3://npm-registry-packages"}},"1.6.0":{"name":"@opentelemetry/resources","version":"1.6.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.6.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"9756894131b9b0dfbcc0cecb5d4bd040d9c1b09d","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.6.0.tgz","fileCount":192,"integrity":"sha512-07GlHuq72r2rnJugYVdGumviQvfrl8kEPidkZSVoseLVfIjV7nzxxt5/vqs9pK7JItWOrvjRdr/jTBVayFBr/w==","signatures":[{"sig":"MEUCIEO7Q+DGu0WgCTKNKoMcb5pnYgMzzSmkb7q6Q4FlPGTYAiEAkCjD3Hvmjr9t111j/lMUFjqtihomzSIZtDnGwguz7Yo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":305438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjBmOCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrN7Q/9E+8uSM8tdSMeYYZEbzm+eZYS54PRhiAQLrJROkIhcN1lX4xd\r\nS7XMS/qkouV6yeqZUhEmbJzyMNzARJHrtIXI6fW9MJytlfL7flQIXBnsDOkz\r\nexJOxX5YeqxYzgtjhxUwpnodpEwLrjQD9zhPRxIOotlBK57fwyPzIiCk3sx1\r\nEX3v6LuHtQhxrFrBnQ+A7qKmh9C1fDRUSWP4ltN/qwkH9HDtr1qyW4Ka8nTj\r\nlx6BwvwjNzabyx0b19t94/tmAqNs39efiKEl1389CWEQB7Om9C9Z0vs+cf2M\r\nq9GSyQNhs0t9HpmLFXgrurRpfpc+gSDxbKfkZsDXG9oqiRxHOfaXn2wF+sgb\r\nGirl7md631yLDgGX4D50c7Dlvbm9u/HyEKNqb90p0j3m1sW1mPedkedAP8S0\r\ntKPiUo0xW7u+zJ+/x4S4i8HD9xPo25kPvidmLMKBNgWxqj4zTW4acpDURvSx\r\n4Hxg4hlar4pMxmrR3MQfhDY4zXDN0Yk3mhNdPzwJaZPy10fQoqu/S8qjrGqe\r\njEOcweOQcDyeBd5Pj3KBLPmrnqWBoWz7f4vqmSlsQF4ZoOAo2Km3/i1R/S6o\r\nsAWw1lOZgWWbFt3CTHOSjFsKqL6FC9AkLgKMLbXS9Q11VF42GYeMHbPc316s\r\nFTd6v8Y1kxYyvNDaQ+GR6TqXLdXno5glnIc=\r\n=tSwP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"a5abee69119cc41d9d34f6beb5c1826eef1ac0dd","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/5.4.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.6.0","@opentelemetry/semantic-conventions":"1.6.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","karma":"6.3.16","mocha":"10.0.0","sinon":"14.0.0","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"4.9.1","@types/mocha":"9.1.1","@types/sinon":"10.0.13","karma-webpack":"4.0.2","webpack-merge":"5.8.0","@opentelemetry/api":">=1.0.0 <1.3.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.6.0_1661363073934_0.24480969578795642","host":"s3://npm-registry-packages"}},"1.7.0":{"name":"@opentelemetry/resources","version":"1.7.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.7.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"90ccd3a6a86b4dfba4e833e73944bd64958d78c5","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.7.0.tgz","fileCount":192,"integrity":"sha512-u1M0yZotkjyKx8dj+46Sg5thwtOTBmtRieNXqdCRiWUp6SfFiIP0bI+1XK3LhuXqXkBXA1awJZaTqKduNMStRg==","signatures":[{"sig":"MEUCIC8sKQgBxLtHE1lYcnfSC8w6OfPL86SaUY1KwrHzPVXSAiEA/K4dACNLUk6cJa5Ik5NMAgHUFqIV7U7wd3lX05QFtlw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":305438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJGjAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqxCA//Xrbn7WkbfTyMilGEfMr8jwdqo6cbm89OnhTYmrXdIP8ndm+i\r\nq57Lv1Uwd0M1B5DXYYaRLWpScFa1qUZrNGFLVsRrhbUlyLswfnSowAtFEOM+\r\nilT/NPjtJPF4QAOzvqbtPYwyl1EJEfwf12g0FB2ZANzwtmRp3cQiguRkmxHl\r\ns+C0SsyKLQp3C3gl7+W+bvSu7w/Fff5YrYwMdmd8mz88jtZOryD2DSImrEtd\r\nzlaJtQRzjfgHVlOlU0dPi0BKR/UsW3IPr/OUYYgNwhAkfrP9GP/In7GRz05k\r\nbYFyHmHJIsO0iwMFAZc812lCa4wcPUjk/s5gy6roVX/vnh5sHacNqPw9JQoC\r\nqKCJEt3e3C7vw73lGSQlx7q8ecCnJFfRq4LKILF0iXywob4w2/D4fcSXWF2e\r\nMMrzpeDJirSgzIgQI8noyzs6dHr8cfwj+AiU7JyB7iwbriABTpG/UQ6QXt3V\r\n8FCm5XioH6YSPTj5iaI82iqATns6oR1IzNOYRzgkpWWS8HRdsr2E6DeurL4b\r\n6QfMsjzXxNKzleFVxu5eoNZJ2BRhYTeQkkyQkozIy78PFD81sVRjq+mdxU5j\r\nQrgM+50M7XLW6LuC5M8QgIZy+1xEWy4Ef3OJ8/lNa03QZTnzpB7ZuyDdSu0y\r\nvVvGkd4NAVgWRf1V17CD9aHr5wJiRZD3U2A=\r\n=15Uf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"ad88c3d9aa0100fe259b93f4b660e84417b757ac","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/5.4.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.7.0","@opentelemetry/semantic-conventions":"1.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","karma":"6.3.16","mocha":"10.0.0","sinon":"14.0.0","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"4.9.1","@types/mocha":"9.1.1","@types/sinon":"10.0.13","karma-webpack":"4.0.2","webpack-merge":"5.8.0","@opentelemetry/api":">=1.0.0 <1.3.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.7.0_1663330496718_0.23557685510973947","host":"s3://npm-registry-packages"}},"1.8.0":{"name":"@opentelemetry/resources","version":"1.8.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.8.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"260be9742cf7bceccc0db928d8ca8d64391acfe3","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.8.0.tgz","fileCount":192,"integrity":"sha512-KSyMH6Jvss/PFDy16z5qkCK0ERlpyqixb1xwb73wLMvVq+j7i89lobDjw3JkpCcd1Ws0J6jAI4fw28Zufj2ssg==","signatures":[{"sig":"MEYCIQDqdF4votRs/pjSiM5jPYLFGNqcakFhui7suTMGurZqGQIhAJ7d3TCyCxjvitcYmL9inJSYyIaY2yLE5cwJiQiQi5b1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":306459,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbANcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpjkg//QNVRJ7/lbP7b+HEg1cD2HaIT1RVfMkuJh3XpKM88XdYgvDyE\r\nXItp4Qb+mzULT4YDGDbaES1L8sALMROa9sC0a++8wRa2jqqJ6/17bKrQkneW\r\nwfx2Q17SH8mwgoeCtw4u4Oz3015ynZBDfpFibXlAelExfitI7+/vfKYbP2RB\r\n01BJgGVKc5RUWWVTFoApHZCNarktF4h6/0BrCMZt15EE+J3kDn4Vr+GB7Lkn\r\ni7Xblr+YM2GF5NGYsQLuTJKQkJZtI2gVyW6QyocMESOosUhDy2veKa3bWa3V\r\nFPFtrhIt4k4S+fD82zwicu7o8mTQkWz7Lay2vwv3po0RlCXRnHGqZdlqGi9V\r\nnmLAPUnKTNhtpxBAgUIhysPJJoxZW7TJQwsx4eHAU1wfyLNsEi1ODq8VuRBs\r\nBPGRIBJuFahN0UqvTLYRKylVlxrKfJ8TFi38p50pdBQw1mRIYQ/GFniQsqmK\r\nuMpSVPsvne/D5tjlSsUrH2PDbHnRSIB7HXqUpZxrSdHNXPrtecTNTKS1SR+p\r\n1eyXtRysC/mL+46dw19DExKxX4wu9SU2HZEja8QQK7+03dMTd9XqZz2nfgzB\r\nW/xqgE7KYZd9ircVoSpzpbcq7SdY6Azuj41DKbamgy/VEsvCXHhKEnYclWtn\r\nljI/en0npRSw5xJE258CaLEN9W4QXm/IeDw=\r\n=Wo/l\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"7972edf6659fb6e0d5928a5cf7a35f26683e168f","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/5.4.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.8.0","@opentelemetry/semantic-conventions":"1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"13.0.11","karma":"6.3.16","mocha":"10.0.0","sinon":"14.0.0","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"4.9.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","webpack-merge":"5.8.0","@opentelemetry/api":">=1.0.0 <1.4.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.4.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.8.0_1668023131960_0.11743601563218653","host":"s3://npm-registry-packages"}},"1.9.0":{"name":"@opentelemetry/resources","version":"1.9.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.9.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"0dc02fce606bdf322b779a01172eb65f1190835c","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.9.0.tgz","fileCount":192,"integrity":"sha512-zCyien0p3XWarU6zv72c/JZ6QlG5QW/hc61Nh5TSR1K9ndnljzAGrH55x4nfyQdubfoh9QxLNh9FXH0fWK6vcg==","signatures":[{"sig":"MEYCIQD15LcRDRo8xLLTp0Q59KcarvZFKKRDfeTVzXUmCfikcgIhAIA/UDhM3v016XanLmvabhMWipF5/vxAmjMdAk39vGgf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":306552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvy4pACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqrxRAAlWNfFqCsCv1i/8t8grYvguuePvlMmz7oRn8AewujX3eYDvSa\r\nhetsJo79U1JwI/w4MR68EUjHtXubPT0lpSbwOFlYiMa94OL3Q3jxgmR0ZpyS\r\nSnUPhBMY1nttgGWFW4bdHsHht2o7Hre7GkD8q/RrvdoLhaRgVbyDslPB8QQ7\r\nafHnISZsSvCFenOBP0ljdlFdtQEGQ3pKeMYquMBAaQnfuiduVocFAJbbNtWu\r\nK9i8ytPxHXaZMt8JqRcJHj5Q+wzDodnT1xUhJJl6b04WcKnG1nYXd3KeZyby\r\nXwJDvSk9Q9f4bM7tGN6aE8PELEw4a/o3DUkJd8qUlTcVqn5y9SVQ+SharYHT\r\neA8+BO76XQTEDLd/wTXG3Wtd/papCrqMbQnLVa8XOHFaUXP0NT+9TLm2Xtfp\r\nflUz2jWu2PhmZI0F7hxpwrtD5qF/lxsUsFHn0YI8+wsCqZ994Wtkulz1uGdC\r\nssCtaVP43URlcQHvM7aE5xb1DeI8Xj4hxrrf3jDcy3A4HsBj6TSzKEXEcIyb\r\nURwcUjT2slYdv21Pv4AgzNrxBFWSCTgrKTdGPD0Gtp20oDKF1+tK4wNIXlz0\r\n51CxKIEAYKrnOiJcMNZs2FnluVONmCg1Nq+Kh4km0q0CtlH52ts8GQx/YgiM\r\nk/mvQqEGBuEz21UJVHHh/oNz3k6FNKbQA5s=\r\n=hrlg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"08f597f3a3d71a4852b0afbba120af15ca038121","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.9.0","@opentelemetry/semantic-conventions":"1.9.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","karma":"6.3.16","mocha":"10.0.0","sinon":"15.0.0","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"4.9.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","webpack-merge":"5.8.0","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.9.0_1673473577313_0.28944530078949526","host":"s3://npm-registry-packages"}},"1.9.1":{"name":"@opentelemetry/resources","version":"1.9.1","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.9.1","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"5ad3d80ba968a3a0e56498ce4bc82a6a01f2682f","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.9.1.tgz","fileCount":192,"integrity":"sha512-VqBGbnAfubI+l+yrtYxeLyOoL358JK57btPMJDd3TCOV3mV5TNBmzvOfmesM4NeTyXuGJByd3XvOHvFezLn3rQ==","signatures":[{"sig":"MEQCIClrvEatB6dRMOGXoid1Ax3iqFITZLvKtEQcbwth4XZGAiB2NjUNez+c48ylWdqn/cFeDg7xPX/WO7eOdHobaunWtQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":306543,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj1+KAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrgLA/+N10lz54wVeiWKzSFCsV+jsGyEDhhd44+wK4HzxWQWTKUxBoJ\r\n0zKind29UBZzMwK/t7aCmbnoeBdOYyh3P8BMIzZcgXb4yjd8/0jtALeibt9v\r\nUX5Y7E0QIbfk+6I0eFXmDWUxt17liq6Lkdk6esBAz3481a4r/3zEhIqI3RSk\r\nyvZinK7gGVix7R8d/x0uRSaNi/ntM8uOxp1CoXDGgH7VtCefI2wfgSixnhki\r\nfnuRi/pYdZ8pBUZ29c88HNEMxR9BUk+pHBS4PB0tMmljdWO+NXkweWCtr9XH\r\ng31uMDs9OefPhi0vSExqMjNZv8OlAdV/U8dF8B6GWpGgwrfEtqdDDwMYQyDm\r\nk+tAuD6bbJf5YovD6MuENAnWTE0izinLG9C+gRK4pFzvFClHv+xTcowoSLqb\r\nc9KbNtNUp10hPqVXwWjqOqd8SiqXL7ww9pztvBj66VbaDf3+akU4Gr53OUof\r\n82f1MMlb8vY8GkQbSuP7SnxlaTuHjeIyPyq3etQ5ptYzB+otT+V4ZaSoqYbl\r\nT9SUwdC1eEAY01Jwh5OGAuZVe/qyB314V/5r1tN6GZZu3snfb+WZSSNcCIY8\r\n7PtdMEEnbC3LVIt03no4B/r0mYSn7kVdNAVu7b52lVhotEVoJ52SYJX2ZtmT\r\nALllVolVoU67wJbrp/sSFbtEnu6UV6QlxGk=\r\n=pRFJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"279458e7ddf16f7ddca5fe60c78672e05fafce66","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.9.1","@opentelemetry/semantic-conventions":"1.9.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","karma":"6.3.16","mocha":"10.0.0","sinon":"15.0.0","rimraf":"4.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"4.9.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","webpack-merge":"5.8.0","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.9.1_1675092608665_0.4312343763861617","host":"s3://npm-registry-packages"}},"1.10.0":{"name":"@opentelemetry/resources","version":"1.10.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.10.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"79e8388899a79e13a830b3bd776cc8489a107b9b","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.10.0.tgz","fileCount":345,"integrity":"sha512-bh4auHOdS0/cwSgviCPbkItLwLZRWCZKp/ns2soVwlWQMJH36FIHbcYJf7G9+Rthlc6u163VhUefho+eDrPVeA==","signatures":[{"sig":"MEQCIEa/8MDpeiDlRTSLd29ULyC4sMIar3h4LXZfeooTwYosAiAXMY19pivOXMQ7yOo5dLQlXcw9GmrlcO3G5BEe2IzeMw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":495265,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkD0cGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr/Vw//SyTdcl/ItktIoUmxXqUka5uTWzAl9XABnFQyNxCFsoY2dAhA\r\npVHuYIbFh39akM70QhVEAmGzDbZOiX4AMKlUA/u7EL4Jw/7YOrspPK6g2wTZ\r\nFk2y48pPciQtRZ1jqOzbpPeaPWwMWUDKM5slFCrxwcU7Lx5hLOwImOZUH6Bq\r\nsMe4HaF0v5acWkoFDitsSPw05D99NvRGiGk8/97lR0yasZlHf9bWYzbN3p82\r\nQhgUE713ey22p7LFuYb0S4BFjLIEWYkkabnM7/QYTfv3IASVnbIoezNhPTwl\r\nnckjG+dp8hEjzz0O8LrHCatm7XEEAJ4XGrPmHWKbHyurK728yMvneDHT/vXK\r\ngorSvAc7PkrkbCt+HpIeWeCGDfbUA2//IPKvXZKCNRPY4f52+WmlF+RZcxcR\r\nNAFz2jVBZQ5n2IOoK6WLE7NmUEF/2O81L+uglKQyUqAIdOFGk/csvKkuymt6\r\nYrNDLMew92+wVvH6WMhIYFLYtScwfwjdoSSpX8DlSjTr4w+NeD3vOIhlYCfN\r\n3nrZfZjxHFMVm7yPzxLVstuGk+iBOdsgV2ag1+I+6UHXnENPnYb1UIW93WN/\r\nt0uuUKu9T7iX8wOpfvBbYIsMCcp2UfdukP3v4WUIHiIGQfz2X75O7rMLqdNm\r\noc+Zkdj/Yc8ho5wEocaaCUcVMnKuHVTgSUs=\r\n=DrdG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"56e6b1bb890f844b8963a146780d0b9cfa8abd0d","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.10.0","@opentelemetry/semantic-conventions":"1.10.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","karma":"6.3.16","mocha":"10.0.0","sinon":"15.0.0","rimraf":"4.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"4.9.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","webpack-merge":"5.8.0","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.10.0_1678722822392_0.9835069313493581","host":"s3://npm-registry-packages"}},"1.10.1":{"name":"@opentelemetry/resources","version":"1.10.1","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.10.1","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"a2537ea241e09a63d5d1afd566f89e2ef5889370","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.10.1.tgz","fileCount":345,"integrity":"sha512-e+wwdyO44jZtsT1aqGiWMFOfN1XuP9Tv4+H0OYP3yQajBtGdsZjdSUn9UNjw46JsW0Mb+RaTxJwsb2uvfHar0g==","signatures":[{"sig":"MEYCIQCHt2ivWuF06SCd7BfgjGWkRJYyUHDmwv5jNs3CgfAZDQIhAKJB9n02IvxghyIpvjLJpdbj9kwH0OPJSON6h8JkCFxD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":495470,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkGIV5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp8sA//bxnWF+Ik8r6Q+qtFtug6oSpSqX7Mmn5YEaJElU/VUQMYAfPO\r\nDv42YtWolWTPWK1cukwbjuc6XPSRZySCM8LYoS5/JbIpQXaUdo+b2H+ngd54\r\nB1o7RCnOpDv48BdJcaJhbceC7lgLnUsLLt/u+FwJWyczHtD6tiPYUfXrh/xb\r\nha2Ghs3TjNiAR9iPwUs1JUMVf1qmkfyZXmbnYdvQNgkGlZuxA+i9aRrKLvtJ\r\nqOXDxgRNJy/hKUMz2B8gVSL9R0rdwaFBb8eFvcKm7hVarBHKJY2eWZfrX8qO\r\nWT3lqOEzxVqYSDHX2s90COp5wXn63QaxdZN+bYl5AtErXcrdK9PxdKxxAGVw\r\no11fZBtxhWAH/7QH2CUyMvsta5lkU1O5UUc0IbSuV40xE6XvGsfQjwG4TJOK\r\n87FHUOqeVW1KQo6WqSiXchwnv1glPOniUdlHaP3In8O+lM8otj8KB2jQEyA2\r\nLnfpafwS/tgUA1KLSTjcU1SS4nOgxtzTIlbReF9G8TLVFOugDzhs4PO2ze/1\r\n1swYzhzTRIOvexAJ1QoPfJfdXauy109yt+Yc3KipM/r0EQl9/tz992UxZyQO\r\nAz4sZEGo64ley9qHrwCwdYAb+xK2clxdacBJt38xXOU02Q94mPqaYGUadJdU\r\nEnlF6kPvUc+ki8Vdc3WlJwabn3qeLIcdu0E=\r\n=u82i\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"486df99906958de9b8b666839785b00160a6a229","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.10.1","@opentelemetry/semantic-conventions":"1.10.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","karma":"6.3.16","mocha":"10.0.0","sinon":"15.0.0","rimraf":"4.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"4.9.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","webpack-merge":"5.8.0","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.10.1_1679328633102_0.01337529128242787","host":"s3://npm-registry-packages"}},"1.11.0":{"name":"@opentelemetry/resources","version":"1.11.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.11.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"68e3ca399e63246a6b87bc495f819c5bd9f2c112","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.11.0.tgz","fileCount":363,"integrity":"sha512-y0z2YJTqk0ag+hGT4EXbxH/qPhDe8PfwltYb4tXIEsozgEFfut/bqW7H7pDvylmCjBRMG4NjtLp57V1Ev++brA==","signatures":[{"sig":"MEUCIDk7msj3ir4AUEMQ68ZMmP5s0mf7gq7QRkJBAaMwuk3BAiEAngUawS7p6refQ365CtHM+fxM/7wvM+ubjkIorL8mjyU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":502623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkJasuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqi5Q/+JGYSoinp1CwptHGEUDMCdeGWyuJegijByJhBr3qgyuVj6LQP\r\nVQ+iePVlzXLO6+xgFy7CMWNReIPVbcZ922D+53qp7Qs7HssuHQp9yHGsroT8\r\nF4OgJkuJgMfgqSVZbxEwYdxTdPZ0vA9HoLeTsXAvaS3Ldu7vwuRUaj7dezoD\r\ndaWeN5QslPJuVWXWrT3cUTWdvk1TP2pGugeG4y6a/s/WnxonjJ6pgHPUKnc/\r\nH92uiRNPuLaz2/bwoKIOp5Qxskl72biyUW+O6kqulWgFyOBoozmaZiKOdCG2\r\n4BzNDKDS96fAQFRnWZbVN/kkEe3XzoWNLC4c2U2JjDDxTA2bB0xYg5wDktwg\r\nwUUG91azOa7CIfZ6Ed/Y2VvIjoJH1O2MTmzLnOc8OvQwW9ylZrWLTZtsrvoS\r\nJBnlk5zZr2S/cGY60QtKABqglcf/1tgQaupe0K1O7nAN1eP/2qcx67m5xUQZ\r\nk7rU5ymskVu2LZC2gknO17ABvTQlCjnq99TQT99bmEeiiDxa6kYd2WwsS+rt\r\nKi7IaoaA1DVVkWKKo4Q2M56uJ6JB1Dx/p1N48gTtBNVIIfHk0ZOmBhQYKEc1\r\nal2iMVPy2yi6FaHL96hxxluBf4fLsYH5x2pZNhAlA3CQV8Q8v5fPRHb+kl/n\r\nazZDQ3I76BVaWJw+1RtOPn1cyboV/0+7qJU=\r\n=qs9t\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"1328ee04ae78f9f6cf143af7050c00aaa6d2eb3b","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.11.0","@opentelemetry/semantic-conventions":"1.11.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","karma":"6.3.16","mocha":"10.0.0","sinon":"15.0.0","rimraf":"4.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"4.9.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","webpack-merge":"5.8.0","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.11.0_1680190254108_0.7638439285162986","host":"s3://npm-registry-packages"}},"1.12.0":{"name":"@opentelemetry/resources","version":"1.12.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.12.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"895394c727dc3e7e51d1d2cc50907ec07a626dca","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.12.0.tgz","fileCount":363,"integrity":"sha512-gunMKXG0hJrR0LXrqh7BVbziA/+iJBL3ZbXCXO64uY+SrExkwoyJkpiq9l5ismkGF/A20mDEV7tGwh+KyPw00Q==","signatures":[{"sig":"MEYCIQCY8Pnwc47mHbB4rGLNR97tKZGzkoDkoZbOS4nO4DJJ4QIhANz+N9TzQ0pJy614IpZW3zqDAglEVOwhNLeqygvbBiT7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":502623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkOEYrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp0zw/8CYKbW6VQm64cSr83af6xQ1QHHwCVY8lVSc1/9utWN37MJ0i6\r\neVTfhuV7uB7J8rihrKRbqHTjIHUmKkegalJSAOtIO2jRrE923oyITHPTDzxV\r\nG/UUv5UJGB4Mfy3ITxhLAeoNbLZvD666Jl/7H8/YDp1umigDX8gNY30I+hy0\r\nsHtXnHQfjuPFOesdCy1cFx8aC7Jnsee+MwAT/t21NAnVAiO7E+YDDVeB4eIT\r\nDkb776nehAKnlDpPl+HAZ9pq3qYEcsdqbANl0TI+DN9fSkiW2H6O4wk4Rlpb\r\njoCQfKKtBVqXGqbClIZfetV1/dhdxk8PdWATsGHYsZemEJtFTox25guYMhpJ\r\nnUXlYKvEFvftkVRVqaSrKOE5N9nTck3UmoDSACFcH/+uXx8AIHE1v/AKfxWH\r\n120pL5ln+SFUurXPVFBi2kJb2AG6Jo+gY3uYOOe1HUoGDcMLPbeDlrXP1tXF\r\nOrFDSv47TME6fxRTz1ZX0wqVYfXtRsTeMGuIqyefzm3DBjrzk8CDcGuUicSv\r\nRgJiQVB3l5XBHMZmdcqbDRXsqszP/LEsUp50f3+ieJrdHcn+Pzsg7Obh5tAO\r\nq1tk0MET/480nXPhuL1c+bs0PwIN9nu6cECaFKZ+4vGAc7l3mGjNmGGfywZi\r\nPsArI71GIysDZ2H0UwBJsDz0jjwsk7LCOjY=\r\n=LXQ1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"a04090010ee18e17487b449984807cc2b7b6e3e6","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.12.0","@opentelemetry/semantic-conventions":"1.12.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","karma":"6.3.16","mocha":"10.0.0","sinon":"15.0.0","rimraf":"4.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"4.9.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","webpack-merge":"5.8.0","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.12.0_1681409578992_0.024387793584885964","host":"s3://npm-registry-packages"}},"1.13.0":{"name":"@opentelemetry/resources","version":"1.13.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.13.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"436b33ea950004e66fce6575f2776a05faca7f8e","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.13.0.tgz","fileCount":363,"integrity":"sha512-euqjOkiN6xhjE//0vQYGvbStxoD/WWQRhDiO0OTLlnLBO9Yw2Gd/VoSx2H+svsebjzYk5OxLuREBmcdw6rbUNg==","signatures":[{"sig":"MEYCIQDRiP1No4KTO6m3EjvKafOjNqdcgUj0M1RlaGud2NSZ6AIhAI6drpK351D4hFd4uFWmtjDGxKV/kWp/vav24N5iiT/t","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":502600},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"8fc76896595aac912bf9e15d4f19c167317844c8","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v18.12.1+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","dependencies":{"@opentelemetry/core":"1.13.0","@opentelemetry/semantic-conventions":"1.13.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","karma":"6.3.16","mocha":"10.0.0","sinon":"15.0.0","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"4.9.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","webpack-merge":"5.8.0","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.13.0_1683811804943_0.38179592440586596","host":"s3://npm-registry-packages"}},"1.14.0":{"name":"@opentelemetry/resources","version":"1.14.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.14.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"d6b0a4e71c2706d33c8c6ec7a7b8fea6ad27ddea","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.14.0.tgz","fileCount":363,"integrity":"sha512-qRfWIgBxxl3z47E036Aey0Lj2ZjlFb27Q7Xnj1y1z/P293RXJZGLtcfn/w8JF7v1Q2hs3SDGxz7Wb9Dko1YUQA==","signatures":[{"sig":"MEUCICtJm8wWBvsd8aQtbumFqsv6o0N/CbHohlYX5xkQNGhgAiEA9SiDo+BmXbgQd0rKSdOxBye98UrrU7OTnj8CeSsEgJY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":502600},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"edebbcc757535bc88f01340409dbbecc0bb6ccf8","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v18.12.1+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","dependencies":{"@opentelemetry/core":"1.14.0","@opentelemetry/semantic-conventions":"1.14.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","karma":"6.3.16","mocha":"10.0.0","sinon":"15.0.0","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"4.9.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","webpack-merge":"5.8.0","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.14.0_1686031253370_0.2118908303091651","host":"s3://npm-registry-packages"}},"1.15.0":{"name":"@opentelemetry/resources","version":"1.15.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.15.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"748a6ae9017636b8b30f5dee1fff3e166e51f63d","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.15.0.tgz","fileCount":363,"integrity":"sha512-Sb8A6ZXHXDlgHv32UNRE3y8McWE3vkb5dsSttYArYa5ZpwjiF5ge0vnnKUUnG7bY0AgF9VBIOORZE8gsrnD2WA==","signatures":[{"sig":"MEQCIHFBGxwIJQPuladr11Kit1QFzDw9CpOWYb1oGvGQU+oaAiBwjYhrdMtLTxJ3MYq1knmoeY277/pdGRxsTQLQ7kuu8Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":479882},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"06e919d6c909e8cc8e28b6624d9843f401d9b059","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.1/node@v18.12.1+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","dependencies":{"tslib":"^2.3.1","@opentelemetry/core":"1.15.0","@opentelemetry/semantic-conventions":"1.15.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.1","karma":"6.4.2","lerna":"7.1.1","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"4.10.0","@types/mocha":"10.0.1","@types/sinon":"10.0.15","karma-webpack":"4.0.2","webpack-merge":"5.9.0","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.15.0_1688642826926_0.3080158204688581","host":"s3://npm-registry-packages"}},"1.15.1":{"name":"@opentelemetry/resources","version":"1.15.1","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.15.1","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"6a0da2eb5d394d302701d428a1cbbb2cd924ac50","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.15.1.tgz","fileCount":363,"integrity":"sha512-15JcpyKZHhFYQ1uiC08vR02sRY/2seSnqSJ0tIUhcdYDzOhd0FrqPYpLj3WkLhVdQP6vgJ+pelAmSaOrCxCpKA==","signatures":[{"sig":"MEQCIHtDQnds/hiPxvA22iH+XJf0d86J6m+UHD0kMgw3dZ2IAiBHrL3uBJFvIKKTdc5pVQuOor9SB5yE8XyB/LhtYkqUDw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":502629},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"9f71800fdc2a5ee5055684037a12498af71955f2","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.3/node@v18.4.0+x64 (darwin)","description":"OpenTelemetry SDK resources","directories":{},"sideEffects":false,"_nodeVersion":"18.4.0","dependencies":{"@opentelemetry/core":"1.15.1","@opentelemetry/semantic-conventions":"1.15.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.2","karma":"6.4.2","lerna":"7.1.3","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"4.10.0","@types/mocha":"10.0.1","@types/sinon":"10.0.15","karma-webpack":"4.0.2","webpack-merge":"5.9.0","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.15.1_1690209166242_0.8420624976966544","host":"s3://npm-registry-packages"}},"1.15.2":{"name":"@opentelemetry/resources","version":"1.15.2","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.15.2","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"0c9e26cb65652a1402834a3c030cce6028d6dd9d","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.15.2.tgz","fileCount":363,"integrity":"sha512-xmMRLenT9CXmm5HMbzpZ1hWhaUowQf8UB4jMjFlAxx1QzQcsD3KFNAVX/CAWzFPtllTyTplrA4JrQ7sCH3qmYw==","signatures":[{"sig":"MEUCIFQGAqLvWpks+x2ogJ4pmUMDqGxROq5moF5yW7XCkez/AiEA+Yo4i99UlcdZfY8qm+dFGaHvnFW6RJbQml/iWwVWrbo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":502638},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"48fb15862e801b742059a3e39dbcc8ef4c10b2e2","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.4/node@v18.12.1+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","dependencies":{"@opentelemetry/core":"1.15.2","@opentelemetry/semantic-conventions":"1.15.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.2","karma":"6.4.2","lerna":"7.1.4","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"4.10.0","@types/mocha":"10.0.1","@types/sinon":"10.0.16","karma-webpack":"4.0.2","webpack-merge":"5.9.0","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.15.2_1691500875489_0.29015504543564474","host":"s3://npm-registry-packages"}},"1.16.0":{"name":"@opentelemetry/resources","version":"1.16.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.16.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"3ced9b1be049ea514ffa545d34924a3bea7101fe","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.16.0.tgz","fileCount":363,"integrity":"sha512-Z2LdmfbLDYtn1vMJrPDdbRozwj9+WX8G4dxnUeqIVIYjwolV3kLjV+fWgvxoo0N00kNZBCvor+iD81iXx3sDpA==","signatures":[{"sig":"MEUCIEcjkvWDB1CTTGjszSNwBJ7XcF6ZX6hb0dv8N9UUtRU3AiEAuM9PYCAu5MR9KtMc1u4nlOXnFnSQb5fIZxXBkNnjRgU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":502638},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"5fcd8cf136e2235903dde3df9ba03ced594f0e95","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.5/node@v18.12.1+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","dependencies":{"@opentelemetry/core":"1.16.0","@opentelemetry/semantic-conventions":"1.16.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.3","karma":"6.4.2","lerna":"7.1.5","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"4.10.0","@types/mocha":"10.0.1","@types/sinon":"10.0.16","karma-webpack":"4.0.2","webpack-merge":"5.9.0","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.6.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.6.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.16.0_1694434468339_0.6140737954855777","host":"s3://npm-registry-packages"}},"1.17.0":{"name":"@opentelemetry/resources","version":"1.17.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.17.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"ee29144cfd7d194c69698c8153dbadec7fe6819f","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.17.0.tgz","fileCount":363,"integrity":"sha512-+u0ciVnj8lhuL/qGRBPeVYvk7fL+H/vOddfvmOeJaA1KC+5/3UED1c9KoZQlRsNT5Kw1FaK8LkY2NVLYfOVZQw==","signatures":[{"sig":"MEUCIFv6HhsEJi7oi3gnQAJkUbdGUPVbgrGE4HHt0LWCPqTWAiEAoPz+o3xNYab1wHaHaml4qrMNttbwYesNMKWF9pGgAHA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":502638},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"faf939c77591f709afbc23fadbe629c9d3607ef6","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.5/node@v18.12.1+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","dependencies":{"@opentelemetry/core":"1.17.0","@opentelemetry/semantic-conventions":"1.17.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.3","karma":"6.4.2","lerna":"7.1.5","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"4.10.0","@types/mocha":"10.0.1","@types/sinon":"10.0.16","karma-webpack":"4.0.2","webpack-merge":"5.9.0","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.7.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.7.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.17.0_1694524351122_0.28054763472546496","host":"s3://npm-registry-packages"}},"1.17.1":{"name":"@opentelemetry/resources","version":"1.17.1","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.17.1","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"932f70f58c0e03fb1d38f0cba12672fd70804d99","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.17.1.tgz","fileCount":363,"integrity":"sha512-M2e5emqg5I7qRKqlzKx0ROkcPyF8PbcSaWEdsm72od9txP7Z/Pl8PDYOyu80xWvbHAWk5mDxOF6v3vNdifzclA==","signatures":[{"sig":"MEYCIQDPjMrxF0bDcJtGkRsrADLQaLiyJsrXYbjWJKulelOv+gIhAOboxs+xtt2RXHytrLrXGtRorNefafwx39Hjc9Kg5VHM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":502638},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"f8e187b473274cc2011e7385992f07d319d667dc","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.5/node@v18.12.1+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","dependencies":{"@opentelemetry/core":"1.17.1","@opentelemetry/semantic-conventions":"1.17.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.3","karma":"6.4.2","lerna":"7.1.5","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"4.10.0","@types/mocha":"10.0.2","@types/sinon":"10.0.18","karma-webpack":"4.0.2","webpack-merge":"5.9.0","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.7.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.7.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.17.1_1696947494334_0.2951668138307013","host":"s3://npm-registry-packages"}},"1.18.0":{"name":"@opentelemetry/resources","version":"1.18.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.18.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"49c02edfd3d16524ead448288e5ed3bb8fa11391","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.18.0.tgz","fileCount":363,"integrity":"sha512-QXdqtTQRl3fVAMu5PSxIev73iaukww/7fW4656pF607ZMAXueRHfdxOBIpGrTvfnv9mcKC3ZwGsIb366JZ2LSQ==","signatures":[{"sig":"MEUCIDMk+h8d6TTl0MAANlo/qviZwmJ6ty61U3P/l1oMnKViAiEA0VFQkDAyM+sIywQjYNVylrlIpbrkTK1f8CB8KQnOoN4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":502638},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"73b446688f10fd8dc4cf403a085f0a39070df7b4","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.18.2+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"sideEffects":false,"_nodeVersion":"18.18.2","dependencies":{"@opentelemetry/core":"1.18.0","@opentelemetry/semantic-conventions":"1.18.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.8","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"4.10.0","@types/mocha":"10.0.3","@types/sinon":"10.0.20","karma-webpack":"4.0.2","webpack-merge":"5.9.0","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.8.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.8.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.18.0_1699353884861_0.08771323619720572","host":"s3://npm-registry-packages"}},"1.18.1":{"name":"@opentelemetry/resources","version":"1.18.1","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.18.1","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"e27bdc4715bccc8cd4a72d4aca3995ad0a496fe7","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.18.1.tgz","fileCount":363,"integrity":"sha512-JjbcQLYMttXcIabflLRuaw5oof5gToYV9fuXbcsoOeQ0BlbwUn6DAZi++PNsSz2jjPeASfDls10iaO/8BRIPRA==","signatures":[{"sig":"MEUCIEaC72Oo/Yx3qeXgKOoMHDlnJXgehLYnmdHRLZBa2Oz2AiEAySfFtqqyLBfSaHAGUXrU2EGsBJ+GsI/JnTfA4EFbxFg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":502638},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"f665499096189390e691cf1a772e677fa67812d7","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.18.2+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"sideEffects":false,"_nodeVersion":"18.18.2","dependencies":{"@opentelemetry/core":"1.18.1","@opentelemetry/semantic-conventions":"1.18.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.8","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"4.10.0","@types/mocha":"10.0.3","@types/sinon":"10.0.20","karma-webpack":"4.0.2","webpack-merge":"5.9.0","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.8.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.8.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.18.1_1699466946471_0.43839867530071697","host":"s3://npm-registry-packages"}},"1.19.0":{"name":"@opentelemetry/resources","version":"1.19.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.19.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"2df9e0e8623cd390569243e2c9c15d7cce063c2f","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.19.0.tgz","fileCount":363,"integrity":"sha512-RgxvKuuMOf7nctOeOvpDjt2BpZvZGr9Y0vf7eGtY5XYZPkh2p7e2qub1S2IArdBMf9kEbz0SfycqCviOu9isqg==","signatures":[{"sig":"MEYCIQCTQXME3DyV9l55Q1CU3pFEmfxEoWBt2+oGfAyQmaKvxQIhAKHrmPTBtkVasdPy8FY9XAEtQ6QP0Pb/gz/8yj+/tRJV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":502638},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"d3c311aec24137084dc820805a2597e120335672","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.18.2+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"sideEffects":false,"_nodeVersion":"18.18.2","dependencies":{"@opentelemetry/core":"1.19.0","@opentelemetry/semantic-conventions":"1.19.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.8","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"5.1.4","@types/mocha":"10.0.6","@types/sinon":"10.0.20","karma-webpack":"4.0.2","webpack-merge":"5.10.0","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.8.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.8.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.19.0_1702557326196_0.17587246502583476","host":"s3://npm-registry-packages"}},"1.20.0":{"name":"@opentelemetry/resources","version":"1.20.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.20.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"7165c39837e6e41b695f0088e40d15a5793f1469","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.20.0.tgz","fileCount":363,"integrity":"sha512-nOpV0vGegSq+9ze2cEDvO3BMA5pGBhmhKZiAlj+xQZjiEjPmJtdHIuBLRvptu2ahcbFJw85gIB9BYHZOvZK1JQ==","signatures":[{"sig":"MEUCIHGCaN15ALy/n+1NXR0oW9TrG2JA/czaNVkrkgnerqhxAiEAmDjJ/MsR0cHBub4Z63btMpVeL1yGNqxltQ25+SExjNo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":502638},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"57008533aba7ccd51ea80f38ff4f29404d47eb9c","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"@opentelemetry/core":"1.20.0","@opentelemetry/semantic-conventions":"1.20.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.8","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"5.1.4","@types/mocha":"10.0.6","@types/sinon":"10.0.20","karma-webpack":"4.0.2","webpack-merge":"5.10.0","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.8.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.8.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.20.0_1705313745318_0.6520979674158891","host":"s3://npm-registry-packages"}},"1.21.0":{"name":"@opentelemetry/resources","version":"1.21.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.21.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"e773e918cc8ca26493a987dfbfc6b8a315a2ab45","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.21.0.tgz","fileCount":363,"integrity":"sha512-1Z86FUxPKL6zWVy2LdhueEGl9AHDJcx+bvHStxomruz6Whd02mE3lNUMjVJ+FGRoktx/xYQcxccYb03DiUP6Yw==","signatures":[{"sig":"MEUCIQCOFC/qtj0rNoezdDiyokGQXXMS6sQnI33cbnhNCBKh8QIgSQwjC0nekaD51745x1/Cgl4Ss3vp/PAQRQDm3HTB2HY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":502638},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"828f2ed730e4d26d71f92e220f96b60a552a673a","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"@opentelemetry/core":"1.21.0","@opentelemetry/semantic-conventions":"1.21.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.8","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"5.1.4","@types/mocha":"10.0.6","@types/sinon":"10.0.20","karma-webpack":"4.0.2","webpack-merge":"5.10.0","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.8.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.8.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.21.0_1706249467790_0.8191993238777382","host":"s3://npm-registry-packages"}},"1.22.0":{"name":"@opentelemetry/resources","version":"1.22.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.22.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"5b597cdf9fb6e1cd22d7891bd8e72e487929a813","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.22.0.tgz","fileCount":363,"integrity":"sha512-+vNeIFPH2hfcNL0AJk/ykJXoUCtR1YaDUZM+p3wZNU4Hq98gzq+7b43xbkXjadD9VhWIUQqEwXyY64q6msPj6A==","signatures":[{"sig":"MEYCIQDvA/dcVWziC7z4HEq+8UGmsR/xbVXPo5d/6/TeYOy6/AIhAJUilVKQ7zZAjQovrbZD6af75FQ8CGIwzf7mCbJPP8Gu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":502638},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"7be35c7845e206b27b682e8ce1cee850b09cec04","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"@opentelemetry/core":"1.22.0","@opentelemetry/semantic-conventions":"1.22.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.8","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"5.1.4","@types/mocha":"10.0.6","@types/sinon":"10.0.20","karma-webpack":"4.0.2","webpack-merge":"5.10.0","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.9.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.9.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.22.0_1709198291146_0.40793603850636173","host":"s3://npm-registry-packages"}},"1.23.0":{"name":"@opentelemetry/resources","version":"1.23.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.23.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"4c71430f3e20c4d88b67ef5629759fae108485e5","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.23.0.tgz","fileCount":363,"integrity":"sha512-iPRLfVfcEQynYGo7e4Di+ti+YQTAY0h5mQEUJcHlU9JOqpb4x965O6PZ+wMcwYVY63G96KtdS86YCM1BF1vQZg==","signatures":[{"sig":"MEQCIAhVzMBM4OSTV615l2azjOtRQ8eEVHcuA4fwPbVW45zoAiA3vh3BoM/uO3YyoE2wSrftILbIuMpaOiSEzdM7sTeUJQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":502629},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"5231aa255047fbc6ee3d6a299f4423ab2f8a5fbc","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"@opentelemetry/core":"1.23.0","@opentelemetry/semantic-conventions":"1.23.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.8","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"5.1.4","@types/mocha":"10.0.6","@types/sinon":"10.0.20","karma-webpack":"4.0.2","webpack-merge":"5.10.0","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.9.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.9.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.23.0_1712131803247_0.446980959134907","host":"s3://npm-registry-packages"}},"1.24.0":{"name":"@opentelemetry/resources","version":"1.24.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.24.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"f27911af0917986da5716775021eae0a872ba98e","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.24.0.tgz","fileCount":381,"integrity":"sha512-mxC7E7ocUS1tLzepnA7O9/G8G6ZTdjCH2pXme1DDDuCuk6n2/53GADX+GWBuyX0dfIxeMInIbJAdjlfN9GNr6A==","signatures":[{"sig":"MEQCIG0IWFaCzj+N2i4wQRuHX4qEodhlhj3nBZqorlTQ1WZ6AiBNMCCbvo3tizhVOe1fDyEHZ2G6DZ/IPXR3ek9P8MV30Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":524232},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"3ab4f765d8d696327b7d139ae6a45e7bd7edd924","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"@opentelemetry/core":"1.24.0","@opentelemetry/semantic-conventions":"1.24.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.8","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"5.1.4","@types/mocha":"10.0.6","@types/sinon":"10.0.20","karma-webpack":"4.0.2","webpack-merge":"5.10.0","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.9.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.9.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.24.0_1713968900937_0.8713089494362707","host":"s3://npm-registry-packages"}},"1.24.1":{"name":"@opentelemetry/resources","version":"1.24.1","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.24.1","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"5e2cb84814824f3b1e1017e6caeeee8402e0ad6e","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.24.1.tgz","fileCount":408,"integrity":"sha512-cyv0MwAaPF7O86x5hk3NNgenMObeejZFLJJDVuSeSMIsknlsj3oOZzRv3qSzlwYomXsICfBeFFlxwHQte5mGXQ==","signatures":[{"sig":"MEUCIQDCXeqnfi1FWwYz9wN0kljchdXzOxwxjRYi7iWTlMRiKAIgTDAogx3mOiyTqnZpXjjzg+f4oBv0BcWr625fXCvP9IA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":556637},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js","./src/detectors/platform/index.ts":"./src/detectors/platform/browser/index.ts","./build/esm/detectors/platform/index.js":"./build/esm/detectors/platform/browser/index.js","./build/src/detectors/platform/index.js":"./build/src/detectors/platform/browser/index.js","./build/esnext/detectors/platform/index.js":"./build/esnext/detectors/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"41c2626fe0ed03e2e83bd79ee43c9bdf0ffd80d8","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"@opentelemetry/core":"1.24.1","@opentelemetry/semantic-conventions":"1.24.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.8","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"5.1.4","@types/mocha":"10.0.6","@types/sinon":"10.0.20","karma-webpack":"4.0.2","webpack-merge":"5.10.0","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.9.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.9.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.24.1_1715093556403_0.3549194391605064","host":"s3://npm-registry-packages"}},"1.25.0":{"name":"@opentelemetry/resources","version":"1.25.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.25.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"84a1e70097e342aa2047aac97be114ad14966793","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.25.0.tgz","fileCount":408,"integrity":"sha512-iHjydPMYJ+Li1auveJCq2rp5U2h6Mhq8BidiyE0jfVlDTFyR1ny8AfJHfmFzJ/RAM8vT8L7T21kcmGybxZC7lQ==","signatures":[{"sig":"MEYCIQCMrzQpB9HDM0SjmQj4WMnTpQMN6DyLTgfvfdHbF4kzBAIhANzkcbiZ2kJFvHhRKE7AwjZJ/ETqhBF/UmR0FLBVnMPf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":557004},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js","./src/detectors/platform/index.ts":"./src/detectors/platform/browser/index.ts","./build/esm/detectors/platform/index.js":"./build/esm/detectors/platform/browser/index.js","./build/src/detectors/platform/index.js":"./build/src/detectors/platform/browser/index.js","./build/esnext/detectors/platform/index.js":"./build/esnext/detectors/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"c4d3351b6b3f5593c8d7cbfec97b45cea9fe1511","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:browser":"karma start --single-run","align-api-deps":"node ../../scripts/align-api-deps.js","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"@opentelemetry/core":"1.25.0","@opentelemetry/semantic-conventions":"1.25.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.8","karma":"6.4.3","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"5.1.4","@types/mocha":"10.0.6","@types/sinon":"17.0.3","karma-webpack":"5.0.1","webpack-merge":"5.10.0","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.10.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.10.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.25.0_1717607748062_0.15799729275727503","host":"s3://npm-registry-packages"}},"1.25.1":{"name":"@opentelemetry/resources","version":"1.25.1","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.25.1","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"bb9a674af25a1a6c30840b755bc69da2796fefbb","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.25.1.tgz","fileCount":408,"integrity":"sha512-pkZT+iFYIZsVn6+GzM0kSX+u3MSLCY9md+lIJOoKl/P+gJFfxJte/60Usdp8Ce4rOs8GduUpSPNe1ddGyDT1sQ==","signatures":[{"sig":"MEUCIQDiHgzdGd5XIFaAhRm9HLcKA0mc1E+RrtXHLc9rRhymPwIgXP8hisMRvzj0FJzHUvUv5NqxFweaWkPg/CJkRNreXYg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":557004},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js","./src/detectors/platform/index.ts":"./src/detectors/platform/browser/index.ts","./build/esm/detectors/platform/index.js":"./build/esm/detectors/platform/browser/index.js","./build/src/detectors/platform/index.js":"./build/src/detectors/platform/browser/index.js","./build/esnext/detectors/platform/index.js":"./build/esnext/detectors/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"0608f405573901e54db01e44c533009cf28be262","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:browser":"karma start --single-run","align-api-deps":"node ../../scripts/align-api-deps.js","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"@opentelemetry/core":"1.25.1","@opentelemetry/semantic-conventions":"1.25.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.8","karma":"6.4.3","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"5.1.4","@types/mocha":"10.0.6","@types/sinon":"17.0.3","karma-webpack":"5.0.1","webpack-merge":"5.10.0","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.10.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.10.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.25.1_1718875155275_0.767281532712762","host":"s3://npm-registry-packages"}},"1.26.0":{"name":"@opentelemetry/resources","version":"1.26.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.26.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"da4c7366018bd8add1f3aa9c91c6ac59fd503cef","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.26.0.tgz","fileCount":408,"integrity":"sha512-CPNYchBE7MBecCSVy0HKpUISEeJOniWqcHaAHpmasZ3j9o6V3AyBzhRc90jdmemq0HOxDr6ylhUbDhBqqPpeNw==","signatures":[{"sig":"MEQCIG3a/aI8admvWFtjRpVezGGYJFjvl2y43uIN6k81/qCnAiBXEbyQS5RzMfosqOqfWgL/FpOLs2cM/DeV89hmvbaZ5g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":556935},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js","./src/detectors/platform/index.ts":"./src/detectors/platform/browser/index.ts","./build/esm/detectors/platform/index.js":"./build/esm/detectors/platform/browser/index.js","./build/src/detectors/platform/index.js":"./build/src/detectors/platform/browser/index.js","./build/esnext/detectors/platform/index.js":"./build/esnext/detectors/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"720bc8c70d47029cb6b41a34ffdc3d25cbaa2f80","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc mocha 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:browser":"karma start --single-run","align-api-deps":"node ../../scripts/align-api-deps.js","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:browser":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.20.4+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"sideEffects":false,"_nodeVersion":"18.20.4","dependencies":{"@opentelemetry/core":"1.26.0","@opentelemetry/semantic-conventions":"1.27.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.8","karma":"6.4.4","lerna":"6.6.2","mocha":"10.7.3","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","cross-var":"1.1.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"5.1.4","@types/mocha":"10.0.7","@types/sinon":"17.0.3","karma-webpack":"5.0.1","webpack-merge":"5.10.0","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.10.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.10.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.26.0_1724836632306_0.9105562787305141","host":"s3://npm-registry-packages"}},"1.27.0":{"name":"@opentelemetry/resources","version":"1.27.0","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/resources@1.27.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"1f91c270eb95be32f3511e9e6624c1c0f993c4ac","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.27.0.tgz","fileCount":408,"integrity":"sha512-jOwt2VJ/lUD5BLc+PMNymDrUCpm5PKi1E9oSVYAvz01U/VdndGmrtV3DU1pG4AwlYhJRHbHfOUIlpBeXCPw6QQ==","signatures":[{"sig":"MEQCIGvfXgRKn//Zs5huf2JOcEwtP0ucuepjzuB+dAA26YOEAiA+cX4iexmtdT+xFccv1mZg+yj8qe/5CClmIDHuAVm/7A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@opentelemetry%2fresources@1.27.0","provenance":{"predicateType":"https://slsa.dev/provenance/v0.2"}},"unpackedSize":557674},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js","./src/detectors/platform/index.ts":"./src/detectors/platform/browser/index.ts","./build/esm/detectors/platform/index.js":"./build/esm/detectors/platform/browser/index.js","./build/src/detectors/platform/index.js":"./build/src/detectors/platform/browser/index.js","./build/esnext/detectors/platform/index.js":"./build/esnext/detectors/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"eb3ca4fb07ee31c62093f5fcec56575573c902ce","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc mocha 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:browser":"karma start --single-run","align-api-deps":"node ../../scripts/align-api-deps.js","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.20.4+x64 (linux)","description":"OpenTelemetry SDK resources","directories":{},"sideEffects":false,"_nodeVersion":"18.20.4","dependencies":{"@opentelemetry/core":"1.27.0","@opentelemetry/semantic-conventions":"1.27.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.8","karma":"6.4.4","lerna":"6.6.2","mocha":"10.7.3","sinon":"15.1.2","webpack":"5.94.0","cross-var":"1.1.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"5.1.4","@types/mocha":"10.0.8","@types/sinon":"17.0.3","karma-webpack":"5.0.1","webpack-merge":"5.10.0","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.10.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.10.0"},"_npmOperationalInternal":{"tmp":"tmp/resources_1.27.0_1729695092282_0.8455227863223398","host":"s3://npm-registry-packages"}},"1.28.0":{"name":"@opentelemetry/resources","version":"1.28.0","description":"OpenTelemetry SDK resources","main":"build/src/index.js","module":"build/esm/index.js","esnext":"build/esnext/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./src/detectors/platform/index.ts":"./src/detectors/platform/browser/index.ts","./build/esm/detectors/platform/index.js":"./build/esm/detectors/platform/browser/index.js","./build/esnext/detectors/platform/index.js":"./build/esnext/detectors/platform/browser/index.js","./build/src/detectors/platform/index.js":"./build/src/detectors/platform/browser/index.js"},"types":"build/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/open-telemetry/opentelemetry-js.git"},"scripts":{"prepublishOnly":"npm run compile","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","lint":"eslint . --ext .ts","lint:fix":"eslint . --ext .ts --fix","test":"nyc mocha 'test/**/*.test.ts'","test:browser":"karma start --single-run","test:webworker":"karma start karma.worker.js --single-run","tdd":"npm run test -- --watch-extensions ts --watch","version":"node ../../scripts/version-update.js","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","prewatch":"npm run precompile","peer-api-check":"node ../../scripts/peer-api-check.js","align-api-deps":"node ../../scripts/align-api-deps.js"},"keywords":["opentelemetry","nodejs","resources","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","engines":{"node":">=14"},"publishConfig":{"access":"public"},"devDependencies":{"@opentelemetry/api":">=1.0.0 <1.10.0","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0","@types/mocha":"10.0.9","@types/node":"18.6.5","@types/sinon":"17.0.3","@types/webpack-env":"1.16.3","cross-var":"1.1.0","karma":"6.4.4","karma-chrome-launcher":"3.1.0","karma-coverage":"2.2.1","karma-mocha":"2.0.1","karma-mocha-webworker":"1.3.0","karma-spec-reporter":"0.0.36","karma-webpack":"5.0.1","lerna":"6.6.2","mocha":"10.8.2","nock":"13.3.8","nyc":"15.1.0","sinon":"15.1.2","typescript":"4.4.4","webpack":"5.96.1","webpack-cli":"5.1.4","webpack-merge":"5.10.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.10.0"},"dependencies":{"@opentelemetry/core":"1.28.0","@opentelemetry/semantic-conventions":"1.27.0"},"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","sideEffects":false,"gitHead":"4b1ad3fda0cde58907e30fab25c3c767546708e5","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"_id":"@opentelemetry/resources@1.28.0","_nodeVersion":"18.20.4","_npmVersion":"lerna/6.6.2/node@v18.20.4+x64 (linux)","dist":{"integrity":"sha512-cIyXSVJjGeTICENN40YSvLDAq4Y2502hGK3iN7tfdynQLKWb3XWZQEkPc+eSx47kiy11YeFAlYkEfXwR1w8kfw==","shasum":"c8c27ae7559c817f9d117f1bf96d76f893fb29f5","tarball":"https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.28.0.tgz","fileCount":408,"unpackedSize":557674,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@opentelemetry%2fresources@1.28.0","provenance":{"predicateType":"https://slsa.dev/provenance/v0.2"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBEXZI6gKQ0rsdQ86lCYxijGK9y4oE1uwy1p6HZwwYRJAiEA89qWaD2sYUxsZRN3cygGhvOjjvowCDYVn6Q1rTge+1A="}]},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"directories":{},"maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/resources_1.28.0_1731926502831_0.673891587976174"},"_hasShrinkwrap":false}},"time":{"created":"2020-03-16T22:06:37.031Z","modified":"2024-11-18T10:41:43.409Z","0.5.0":"2020-03-16T22:06:37.331Z","0.5.1":"2020-03-20T00:42:51.352Z","0.5.2":"2020-03-27T18:04:01.156Z","0.6.0":"2020-04-02T17:34:07.250Z","0.6.1":"2020-04-08T18:37:31.858Z","0.7.0":"2020-04-24T18:16:06.029Z","0.8.0":"2020-05-12T16:38:19.408Z","0.8.1":"2020-05-18T19:37:40.756Z","0.8.2":"2020-05-21T19:30:03.314Z","0.8.3":"2020-05-28T20:19:39.433Z","0.9.0":"2020-06-18T21:25:27.628Z","0.10.0":"2020-07-27T20:59:19.449Z","0.10.1":"2020-07-28T15:12:39.730Z","0.10.2":"2020-08-03T23:25:40.326Z","0.10.3-canary.0":"2020-08-07T16:47:27.204Z","0.10.3-alpha.28":"2020-08-19T15:03:48.556Z","0.10.3-alpha.34":"2020-08-24T16:44:29.532Z","0.10.3-alpha.35":"2020-08-24T22:45:21.983Z","0.10.3-alpha.40":"2020-08-27T14:23:20.701Z","0.10.3-alpha.41":"2020-08-27T16:08:41.273Z","0.11.1-alpha.48":"2020-09-01T19:24:18.839Z","0.11.0":"2020-09-01T19:32:21.931Z","0.11.1-alpha.15":"2020-09-21T03:30:03.883Z","0.11.1-alpha.35":"2020-09-30T12:22:13.726Z","0.11.1-alpha.36":"2020-09-30T12:38:52.243Z","0.11.1-alpha.44":"2020-10-07T19:55:03.668Z","0.11.1-alpha.53":"2020-10-19T11:48:19.216Z","0.12.1-alpha.54":"2020-10-19T12:50:05.779Z","0.12.0":"2020-10-19T12:53:53.541Z","0.12.1-alpha.7":"2020-10-26T21:12:10.769Z","0.13.0":"2020-12-04T21:26:22.904Z","0.14.0":"2020-12-17T20:52:59.425Z","0.15.0":"2021-01-21T22:20:02.220Z","0.16.0":"2021-02-01T22:33:27.425Z","0.16.1-alpha.10":"2021-02-08T15:50:15.369Z","0.16.1-alpha.11":"2021-02-08T16:18:04.154Z","0.16.1-alpha.14":"2021-02-10T16:06:10.643Z","0.16.1-alpha.15":"2021-02-10T22:18:13.416Z","0.16.1-alpha.18":"2021-02-14T18:12:37.852Z","0.16.1-alpha.20":"2021-02-17T20:52:01.055Z","0.17.0":"2021-02-17T21:16:08.145Z","0.17.1-alpha.21":"2021-02-17T21:16:54.517Z","0.17.1-alpha.2":"2021-02-20T17:37:30.859Z","0.17.1-alpha.5":"2021-02-24T17:19:43.301Z","0.17.1-alpha.8":"2021-03-01T13:38:20.377Z","0.17.1-alpha.10":"2021-03-02T13:22:06.715Z","0.18.1-alpha.12":"2021-03-02T13:53:56.884Z","0.18.0":"2021-03-02T14:01:06.576Z","0.18.1-alpha.3":"2021-03-02T19:09:31.421Z","0.18.1-alpha.20":"2021-03-24T13:10:54.188Z","0.18.1-alpha.21":"2021-03-24T14:12:58.341Z","0.18.1-alpha.23":"2021-03-24T19:17:09.905Z","0.18.1-alpha.24":"2021-03-24T19:38:39.773Z","0.18.1-alpha.26":"2021-03-24T20:09:09.787Z","0.18.2-alpha.81":"2021-03-29T19:52:09.812Z","0.18.1":"2021-03-29T20:03:57.289Z","0.18.2-alpha.1":"2021-03-30T13:06:13.921Z","0.18.3-alpha.2":"2021-03-30T15:27:04.593Z","0.18.2":"2021-03-30T16:15:55.737Z","0.18.3-alpha.1":"2021-03-30T17:29:31.161Z","0.18.3-alpha.3":"2021-03-31T07:38:08.918Z","0.18.3-alpha.4":"2021-04-05T16:37:57.103Z","0.18.3-alpha.5":"2021-04-05T17:54:51.510Z","0.18.3-alpha.7":"2021-04-07T16:12:23.507Z","0.18.3-alpha.10":"2021-04-08T14:25:31.187Z","0.18.3-alpha.11":"2021-04-08T20:21:58.132Z","0.18.3-alpha.14":"2021-04-09T09:11:29.413Z","0.18.3-alpha.16":"2021-04-09T20:07:48.402Z","0.18.3-alpha.18":"2021-04-10T19:00:51.596Z","0.18.3-alpha.20":"2021-04-12T15:08:40.907Z","0.18.3-alpha.23":"2021-04-12T18:12:49.569Z","0.18.3-alpha.25":"2021-04-12T19:42:29.568Z","0.18.3-alpha.28":"2021-04-14T07:51:42.635Z","0.18.3-alpha.31":"2021-04-20T15:48:44.132Z","0.19.1-alpha.36":"2021-04-22T12:19:47.680Z","0.19.0":"2021-04-22T12:28:48.290Z","0.19.1-alpha.37":"2021-04-22T18:15:57.149Z","0.19.1-alpha.39":"2021-04-22T18:45:05.129Z","0.19.1-alpha.7":"2021-04-28T16:13:49.246Z","0.19.1-alpha.9":"2021-04-29T08:17:31.574Z","0.19.1-alpha.11":"2021-04-29T21:07:13.109Z","0.19.1-alpha.12":"2021-04-30T20:49:47.306Z","0.19.1-alpha.19":"2021-05-08T07:53:56.902Z","0.19.1-alpha.21":"2021-05-11T18:50:03.482Z","0.19.1-alpha.25":"2021-05-12T15:53:51.680Z","0.19.1-alpha.26":"2021-05-12T16:06:48.878Z","0.19.1-alpha.31":"2021-05-19T18:06:59.661Z","0.19.1-alpha.33":"2021-05-20T12:12:07.876Z","0.19.1-alpha.38":"2021-05-26T15:02:54.705Z","0.19.1-alpha.43":"2021-06-01T19:45:59.679Z","0.20.1-alpha.49":"2021-06-03T17:09:53.787Z","0.20.0":"2021-06-03T18:28:34.535Z","0.20.1-alpha.3":"2021-06-05T08:29:00.047Z","0.20.1-alpha.4":"2021-06-08T13:27:54.333Z","0.21.1-alpha.7":"2021-06-10T17:26:08.232Z","0.21.0":"2021-06-10T18:29:48.776Z","0.21.1-alpha.1":"2021-06-12T08:24:33.011Z","0.21.1-alpha.2":"2021-06-12T08:35:16.995Z","0.22.1-alpha.5":"2021-06-17T17:05:14.728Z","0.22.0":"2021-06-17T17:58:37.559Z","0.22.1-alpha.2":"2021-06-23T15:48:56.788Z","0.22.1-alpha.3":"2021-06-23T16:04:58.074Z","0.22.1-alpha.13":"2021-06-30T18:40:35.948Z","0.22.1-alpha.15":"2021-06-30T19:08:47.023Z","0.22.1-alpha.16":"2021-06-30T19:48:50.828Z","0.23.1-alpha.17":"2021-06-30T20:07:40.942Z","0.23.0":"2021-06-30T20:14:51.161Z","0.23.1-alpha.18":"2021-07-02T14:38:09.569Z","0.23.1-alpha.3":"2021-07-05T22:27:33.340Z","0.23.1-alpha.15":"2021-07-17T09:18:08.601Z","0.23.1-alpha.23":"2021-07-23T17:46:16.048Z","0.23.1-alpha.24":"2021-07-25T06:45:18.338Z","0.23.1-alpha.28":"2021-07-27T19:44:16.029Z","0.24.1-alpha.31":"2021-07-28T14:06:58.857Z","0.24.0":"2021-07-28T14:13:59.450Z","0.24.1-alpha.1":"2021-07-30T19:42:33.934Z","0.24.1-alpha.4":"2021-08-05T19:28:08.052Z","0.24.1-alpha.5":"2021-08-06T11:31:29.208Z","0.24.1-alpha.7":"2021-08-07T13:32:53.531Z","0.24.1-alpha.14":"2021-08-11T14:50:49.734Z","0.24.1-alpha.18":"2021-08-14T08:16:06.765Z","0.24.1-alpha.20":"2021-08-17T21:07:00.773Z","0.25.1-alpha.21":"2021-08-18T20:16:37.014Z","0.25.0":"2021-08-18T21:16:43.462Z","0.25.1-alpha.2":"2021-08-23T21:41:05.594Z","0.25.1-alpha.4":"2021-08-24T19:33:12.008Z","0.25.1-alpha.12":"2021-08-30T20:22:03.221Z","0.25.1-alpha.13":"2021-08-30T20:41:24.206Z","0.25.1-alpha.23":"2021-09-08T22:15:06.446Z","0.26.0":"2021-09-30T12:35:30.032Z","1.0.0":"2021-09-30T20:53:42.711Z","1.0.1":"2021-11-11T14:51:22.819Z","1.1.0":"2022-03-18T08:11:00.578Z","1.1.1":"2022-03-22T19:52:29.968Z","1.2.0":"2022-04-22T14:57:02.393Z","1.3.0":"2022-05-27T19:41:23.483Z","1.3.1":"2022-06-06T20:26:11.736Z","1.4.0":"2022-07-06T20:15:36.402Z","1.5.0":"2022-07-26T20:52:13.199Z","1.6.0":"2022-08-24T17:44:34.166Z","1.7.0":"2022-09-16T12:14:56.901Z","1.8.0":"2022-11-09T19:45:32.238Z","1.9.0":"2023-01-11T21:46:17.485Z","1.9.1":"2023-01-30T15:30:08.797Z","1.10.0":"2023-03-13T15:53:42.585Z","1.10.1":"2023-03-20T16:10:33.274Z","1.11.0":"2023-03-30T15:30:54.419Z","1.12.0":"2023-04-13T18:12:59.271Z","1.13.0":"2023-05-11T13:30:05.165Z","1.14.0":"2023-06-06T06:00:53.554Z","1.15.0":"2023-07-06T11:27:07.177Z","1.15.1":"2023-07-24T14:32:46.422Z","1.15.2":"2023-08-08T13:21:15.715Z","1.16.0":"2023-09-11T12:14:28.581Z","1.17.0":"2023-09-12T13:12:31.288Z","1.17.1":"2023-10-10T14:18:14.633Z","1.18.0":"2023-11-07T10:44:45.004Z","1.18.1":"2023-11-08T18:09:06.660Z","1.19.0":"2023-12-14T12:35:26.352Z","1.20.0":"2024-01-15T10:15:45.584Z","1.21.0":"2024-01-26T06:11:07.943Z","1.22.0":"2024-02-29T09:18:11.341Z","1.23.0":"2024-04-03T08:10:03.405Z","1.24.0":"2024-04-24T14:28:21.143Z","1.24.1":"2024-05-07T14:52:36.598Z","1.25.0":"2024-06-05T17:15:48.354Z","1.25.1":"2024-06-20T09:19:15.435Z","1.26.0":"2024-08-28T09:17:12.564Z","1.27.0":"2024-10-23T14:51:32.445Z","1.28.0":"2024-11-18T10:41:43.016Z"},"bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources","keywords":["opentelemetry","nodejs","resources","stats","profiling"],"repository":{"type":"git","url":"git+https://github.com/open-telemetry/opentelemetry-js.git"},"description":"OpenTelemetry SDK resources","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"readme":"# OpenTelemetry Resources Util\n\n[![NPM Published Version][npm-img]][npm-url]\n[![Apache License][license-image]][license-image]\n\nThe OpenTelemetry Resource is an immutable representation of the entity producing telemetry. For example, a process producing telemetry that is running in a container on Kubernetes has a Pod name, it is in a namespace and possibly is part of a Deployment which also has a name. All three of these attributes can be included in the `Resource`.\n\n[This document][resource-semantic_conventions] defines standard attributes for resources which are accessible via [`@opentelemetry/semantic-conventions`](https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions).\n\n## Installation\n\n```bash\nnpm install --save @opentelemetry/resources\n```\n\n## Usage\n\n```typescript\nimport { SEMRESATTRS_SERVICE_NAME } from '@opentelemetry/semantic-conventions';\nimport { Resource } from '@opentelemetry/resources';\n\nconst resource = new Resource({\n [SEMRESATTRS_SERVICE_NAME]: 'api-service',\n});\n\nconst anotherResource = new Resource({\n 'service.version': '2.0.0',\n 'service.group': 'instrumentation-group'\n});\nconst mergedResource = resource.merge(anotherResource);\n```\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: \n- For more about OpenTelemetry JavaScript: \n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/resources\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fresources.svg\n\n[resource-semantic_conventions]: https://github.com/open-telemetry/opentelemetry-specification/tree/master/specification/resource/semantic_conventions\n","readmeFilename":"README.md"} \ No newline at end of file diff --git a/tests/registry/npm/@opentelemetry/sdk-metrics/registry.json b/tests/registry/npm/@opentelemetry/sdk-metrics/registry.json new file mode 100644 index 00000000000000..1e55892f957935 --- /dev/null +++ b/tests/registry/npm/@opentelemetry/sdk-metrics/registry.json @@ -0,0 +1 @@ +{"_id":"@opentelemetry/sdk-metrics","_rev":"32-fd2f541de5aecbe413589147b6cc22fc","name":"@opentelemetry/sdk-metrics","dist-tags":{"next":"1.8.0","latest":"1.28.0"},"versions":{"0.32.0":{"name":"@opentelemetry/sdk-metrics","version":"0.32.0","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics@0.32.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-sdk-metrics","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"463cd3a2b267f044db9aaab85887a171710345a0","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-0.32.0.tgz","fileCount":480,"integrity":"sha512-zC9RCOIsXRqOHWmWfcxArtDHbip2/jaIH1yu/OKau/shDZYFluAxY6zAEYIb4YEAzKKEF+fpaoRgpodDWNGVGA==","signatures":[{"sig":"MEUCIHBrzbDjk66vVi3mOQOqt4aIRr90QWqLXe7z6pqSOS6GAiEAxRW5Nt/5Uo5aJhfbXMPZUZSd1f5UYsLkrC5WVFl9u0o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1364783,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjBmODACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqU5Q//X8u5PAiNpAJrFIXflu/338sR9oMsluNoiuoPba0zw6ikiPUv\r\nXCYlQMw1XBSE63X2CVpSDakAhG4WtkWXbsi2zRCfOLUze5CuQPf+TqikvwM/\r\nFOGeHl67KjYw20u1K0H0kxB1qAsBQNBV0lWIM8aF6Yty2J05kP7dACmT6o4v\r\nUn6n2+fjQFMlhRA0WeCrEk+6usmFQDBaZSieZofKGm9C3KCeasPZRfnAJZq3\r\nQvbINhGXDOfFdXrwQPNRqZEIDI5/9frr9dJuRsL+h59AEBizdkezofZGvJPr\r\n860MZqidZhyrzC8NBpodJK0sGxQutbssmSKDT2dptVEd9jjj7mj7iKhNPEFy\r\ntUQDgD/4ltCoLyqraDQi+twaE9gFDhol6EwwdRTIMV8pvazMXFuQ1ik6lsC8\r\nPMt4UDYjtOwDkOGqOjtK/AebAOkJWhoEOuz3znl4VAowL5+qPblVRUEOm7HY\r\nKM/I5DEJltVpWJymDlvRNyvN/ysah+p3b6QtAz5ZcXlipFBh/qFozY7GpemB\r\nIHNryYjSZiAvRCsbnWgHsNg2dIDHJQvN440q6cWfX49Hs03r1rYuKlJjkBpy\r\nFFxrzMAoUejzJ/4j9lVc0rfacQrIoUtQ+j4uLJVPCqy4BPk1LMTnyWY16zb4\r\nIvRTJJH4pe1bz0ucrcj7GawkrVRaoxvNO2U=\r\n=wJDK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"a5abee69119cc41d9d34f6beb5c1826eef1ac0dd","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../../","compile":"tsc --build tsconfig.all.json","version":"node ../../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../../scripts/version-update.js","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/5.4.3/node@v14.18.1+x64 (darwin)","description":"Work in progress OpenTelemetry metrics SDK","directories":{},"_nodeVersion":"14.18.1","dependencies":{"lodash.merge":"4.6.2","@opentelemetry/core":"1.6.0","@opentelemetry/resources":"1.6.0","@opentelemetry/api-metrics":"0.32.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"10.0.0","sinon":"14.0.0","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"9.1.1","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.0","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics_0.32.0_1661363075429_0.18961817621798693","host":"s3://npm-registry-packages"}},"0.33.0":{"name":"@opentelemetry/sdk-metrics","version":"0.33.0","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics@0.33.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-sdk-metrics","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"c4e51decc6e3bb0e1e97c7b081955d357e46c2fe","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-0.33.0.tgz","fileCount":489,"integrity":"sha512-ZXPixOlTd/FHLwpkmm5nTpJE7bZOPfmbSz8hBVFCEHkXE1aKEKaM38UFnZ+2xzOY1tDsDwyxEiiBiDX8y3039A==","signatures":[{"sig":"MEUCIBeHiozEczRdIpEbB1UwgCro3jj+tB2iGk+FQ+CZuc3LAiEA97t2teODixmkZuRZk4z+IPqaULq8SBNRrV8c3JVlTys=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1425603,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJGjCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrNERAAjSfh3/c433lR4GMa9u1DjMIVy7MYOZe0YftxnQ9VPGs2jgfa\r\nWC4r/3Qbantsq49xoVj8GjmiZnIrhzm833P8L7lNLes8LDtI8TEbv+6SPfsq\r\nRLBvUdPHww4UlbfShEo5hnGXVIC3qudVRlvGv2DKxFD9AF2QZszGKsrNQ+P8\r\nB5A/lWp4dqY+IhB0xMk3y7asdEggiF/isxMsCGhNFpDiyL8iHQWuW3ylt5pq\r\nZmPLY23ax1kWkTSvj7Us9X7tgIjGuGgzU+cBSf29WI0L2gyVu5TBBRk5NY5x\r\nryXCnzi1MoNdY669ToCEVcCxJoWb4DY9Mg2ihhJq2argdUPzwEBThC1EecAP\r\nJ/786fw+PKmQAzKGVGEXRmDZljF4+3Zk/KIujlHZK7RP6h1kaMCRAKYwnBLT\r\nR9v3W4ljHnbPgV0OmX+W0suV8oEoYtIJxe/7yyznWsLxcndndZq6WFqzcJQN\r\nVdPk6kxtXdSx7hzcnn1CXxckq+fiG0EdZX32ZRGEi1X4EXmTeNL8s2CMiVUl\r\ndGQm+vbP517Nj2oQvOcnO+YSf55XGNtv49cbusZ8JHVGQhHE26HXCK6A2ci1\r\nhEgPOMtjRH43f3kncjdQXW/vTsS/vMiacwyM94686CkEOaJJNnTv8R2DlV2s\r\nkvO54QGc0KDggcsxEqzpfo9OuQEFKWUe0lU=\r\n=fhUv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"ad88c3d9aa0100fe259b93f4b660e84417b757ac","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../../","compile":"tsc --build tsconfig.all.json","version":"node ../../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../../scripts/version-update.js","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/5.4.3/node@v14.18.1+x64 (darwin)","description":"Work in progress OpenTelemetry metrics SDK","directories":{},"_nodeVersion":"14.18.1","dependencies":{"lodash.merge":"4.6.2","@opentelemetry/core":"1.7.0","@opentelemetry/resources":"1.7.0","@opentelemetry/api-metrics":"0.33.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"10.0.0","sinon":"14.0.0","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"9.1.1","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.0","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics_0.33.0_1663330498049_0.15542963522751552","host":"s3://npm-registry-packages"}},"1.8.0":{"name":"@opentelemetry/sdk-metrics","version":"1.8.0","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics@1.8.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-sdk-metrics","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"d061060f03861ab3f345d0f924922bc1a6396157","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.8.0.tgz","fileCount":489,"integrity":"sha512-+KYb+uj0vHhl8xzJO+oChS4oP1e+/2Wl3SXoHoIdcEjd1TQfDV+lxOm4oqxWq6wykXvI35/JHyejxSoT+qxGmg==","signatures":[{"sig":"MEYCIQDsOqqaWHTqJVYLyeRb+ZNiGkJbd34UCyCqyHX6UgwbCAIhAMvGlF7I5klQng1omsJ/Nk8Nzz0TlqjJqpvJj76kcBV2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1416962,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbANeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqikQ/9EWJ03wBF//CwkzW46y4mBkSgukPe+k9sfS4+cd4/+nErVF2O\r\nMTKRhSpoDQcVLBdmTfeaObKRmgYg2p3PeOrGPphcfkEmZjrRv6342ubUWjRW\r\nm39DSPq8NmZp7J5hRf2hLYSg6tXKZnflCmj+T8upYC/KmW7kOKtx/B3tTy7c\r\nq6q1Kc6vBToqid7yNdFLsIYTjVHM8xSvtg0QVx84S6mtzR2iO8uAzL3ucu34\r\nfLXyN2MzbqJIO516Jt1vE0ix9q/xmt7TrbqCi5k5yZ8cIOianx1Yl7MFGOAX\r\nKwaGILDNoBnb7c8mQITWnP286rsO4NMNnBoXt7ZJCmIavKe8XlbxFZAwuM/q\r\nl0bC9nG8l4r+182xF5XKV2/wnRPQ3j8+uQyBx/8+7YGoIVbowgd4GvJEZGRm\r\n83hxM4/xGxmHiWbkngJlyspY7s86o1MTuwPgwns73cgAhNZsuti2SVgtdoFc\r\n4prfRtGRXUtHJkBQMItiPDEG+Mnfq9hBxHh2F1zuvDLzyN93nCs22gBY79jT\r\n33kticfFECGRLhuCIhZIuV+yzBu4ciYXk0fg9hMY6wagCqQ+tPRs4HPqO92f\r\nuVGhapMpKJPclhvOvlbY4d4Ixm4mo5rrnJx0BPkn445hV6JwJbUC3PAU9yPp\r\nJhIpEHNdZQc8ntThHRpYRCSBmecy8YkzSdo=\r\n=haC6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"7972edf6659fb6e0d5928a5cf7a35f26683e168f","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../scripts/version-update.js","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/5.4.3/node@v14.18.1+x64 (darwin)","description":"Work in progress OpenTelemetry metrics SDK","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"lodash.merge":"4.6.2","@opentelemetry/core":"1.8.0","@opentelemetry/resources":"1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"10.0.0","sinon":"14.0.0","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.3.0 <1.4.0","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.3.0 <1.4.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics_1.8.0_1668023134085_0.198580524230221","host":"s3://npm-registry-packages"}},"1.9.0":{"name":"@opentelemetry/sdk-metrics","version":"1.9.0","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics@1.9.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"1c3a51abeb7f45ea25b91daf7e05e43d25ddd20a","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.9.0.tgz","fileCount":489,"integrity":"sha512-fSlJWhp86kCan1zuxdH6LTyUBYlohQwDKnxep5qHMnRTNErkYmdjgsmjZvSMdAfUFtQqfZmTXe2Lap7a5AIf9Q==","signatures":[{"sig":"MEUCIGoaNR3oyipKjYbn2fxyiZ4BKdIFiSOmx699LRzKo0vWAiEAyTvGUxH0WbB1bXUpv9AlkibTlQ51uAHPzOa9yFD7L7A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1432686,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvy41ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrSjg//czBDsjkHKhMQ+UP70UHKKTG+xRRSxL0WB8vcvSu2U1VFJldP\r\nBiEOUKKfXMNMTlwB6fuo8mdBnwT/Pn6rmbYyW30mkRtc0n9rpakFtdvASSUg\r\nSsLAROHI+NpaNG3lygIpwXu6wLNGzh1ejL8/1/sfRFKBZIGlb/4l9eHtLj8z\r\nNEZ2r0IAOVOQ2JWnMon0gSM1yjplES4pF30tt5j+UeJbNqgbu9CxD8mUOt/E\r\nV4KT3XawHrjMB5VmPlUhZ66OwbF4P7dZF3ukETA/ezK2XBQeUBBNCiJbW6C0\r\np6WdlJZ/1chyseR9hKiBm8bOrx9XQlNcKyM8brOL9G0joCa/YDX12z0lK5xg\r\nlv/As+8IcQUBkcMsBnzl/BVZUnVQ/qacyWXsYpuMmSCfCOCcCAfLXP/kkVDG\r\nNtNpb3RWySMTuqhYBNxQ2wSBmu0TnXxc3y7ubWfqVNh8SJu9kLZQo8fRFyrM\r\nrVATAIjhFPpZAGBeDca3YHuElfFhXdxtklvHX4ATh3yN0DlVqaaWxQXp6W/I\r\n671fbqRQWCy29YlLoS7k4WR8CGkvNFPYedOgIPinE/g3Qv4oTF0z8vcFYI9G\r\nP2PyfHSre1bHm/5rTIiB9xWEK+XUb+9uV/33gGfTkZqz+6oGd4E0pg9q16cy\r\nEZrSABE83nfpxgpbmLMjACClgyQWshGNr4I=\r\n=qh/2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"08f597f3a3d71a4852b0afbba120af15ca038121","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../scripts/version-update.js","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry metrics SDK","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"lodash.merge":"4.6.2","@opentelemetry/core":"1.9.0","@opentelemetry/resources":"1.9.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"10.0.0","sinon":"15.0.0","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.3.0 <1.5.0","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.3.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics_1.9.0_1673473589677_0.62979083795101","host":"s3://npm-registry-packages"}},"1.9.1":{"name":"@opentelemetry/sdk-metrics","version":"1.9.1","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics@1.9.1","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"babc162a81df9884c16b1e67c2dd26ab478f3080","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.9.1.tgz","fileCount":543,"integrity":"sha512-AyhKDcA8NuV7o1+9KvzRMxNbATJ8AcrutKilJ6hWSo9R5utnzxgffV4y+Hp4mJn84iXxkv+CBb99GOJ2A5OMzA==","signatures":[{"sig":"MEYCIQCYUyFLpMVK/wDHg6lU87nZ3MQB9nQh8JvM/VryTCdksgIhAKZDK2iXOPbTaQ6GOK3qt6u560bXhXh+VmFjYH9uiaHo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1556782,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj1+KFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpp3w//cVciehkq5CKoOUjcEovwgleHJd+eCwOEc40/05fiVn6NmDuW\r\nHAs1UekoxG9cc+MHhvp/38o5o1WFK2sFGXO7ymvMluXheGXx7nI6U+qnqkb9\r\nWWvI53gNcfN5GUgJGarHX6kt+DoyV5+0ig0R/2U37hk6DWm89kZArd+X8xEI\r\nD+2GADx/m1uTUO/PJnaJ8LB1LLK2SJ2vQmViYTP8icykDzIJT5flZyBeb+hk\r\nRqgaFcx7Qa+XecZIjTUXfY5ZQCOc5IYf3JAVea/0kAosP63vSaK9TU+p4GG6\r\n4mYBEANc4Inn4ocav0UoYb5kDNntNo/wAusSI4gH/sByMaQhW/EGy9qmKTA+\r\nKpsIPqZO/FPXZEUJZsEUBOD7GxGp8rUB38JEvW3d3ACDFPfVl/AAuIJ4wipt\r\nM4cKsHtewTdDbDGrkO7o9EDG+OACTTBbvAQ/vxWoC8lDZ+vVWbc0pT+taLcs\r\nlimhIk0XDHJGZ+vxL/T7ib0nOCE1qgt6TL5F0Mmx/Juen4Go2NhOa9dbZG1Y\r\nSI6b/SXe5izJQR6vGhyx2mo3OOXrBQmQc/jjcJbwaRRzLshUY/GmZeqrsPLO\r\n91kJNQIUfFRZLhY0tLPlUaYoFjUY+HL4d0RHWKxLoenZ1POPTBwbrfTpwTRD\r\nOTqOB4P/zL3AutUyuX+FOPevSBguIKxq7wA=\r\n=AXfq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"279458e7ddf16f7ddca5fe60c78672e05fafce66","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../scripts/version-update.js","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry metrics SDK","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"lodash.merge":"4.6.2","@opentelemetry/core":"1.9.1","@opentelemetry/resources":"1.9.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"10.0.0","sinon":"15.0.0","rimraf":"4.1.2","codecov":"3.8.3","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.3.0 <1.5.0","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.3.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics_1.9.1_1675092613192_0.7361446399809115","host":"s3://npm-registry-packages"}},"1.10.0":{"name":"@opentelemetry/sdk-metrics","version":"1.10.0","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics@1.10.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"627f164036ad053551b3e75447adf9a902b066aa","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.10.0.tgz","fileCount":543,"integrity":"sha512-vOB3khvj894ppOwafNqKNavpChZYR2S2IZyy8PmL0DwNgFPGYwkWxZkv7YJduBNzcCd+Ao+ug93jdSFFhnpIhQ==","signatures":[{"sig":"MEUCIQDL/qHYi9VPBH3poMg/gvlnmTAxuK7zGkYo7FXRK1XAMgIgPAiYWDmawt1pshH1UtUsHcw9izgXdV8pWQMROlpkKEQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1571910,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkD0cTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpZ/w/9G8OISP56mEsFRcrjWT+zXdW4zgKR3RBzQcZ+RjfqhV2Gq51K\r\nkwhYJ/bIk/xXtSJkpZ+gHjQIy1lwNXU9ux62RcZXzO/EcDLEg1aDDBD+d7G4\r\naYN81H49JVfrstGQzxduGK1vamLm2EBg0PbQGK7r8oNiNkK/Rt+qRY0ZYi6f\r\neYFhc8Nvbh9MKquBU21z/En/IhrxlbUQyetJ0TKfoonVsoj9VK1F7BBf/7cD\r\nYirI9GZzNKfk+y3IPmQ3aalntJmoN+aWWGYFn3hbE2IIo48N1EOkv3ZPXLwm\r\nHIaEN4MbK1vIjbjaS0LHC6lWYDooa5GCvVEXSl1ZJimyIpdx3FV5z0mVgusJ\r\nyb2PuPPm2okM7FM4xg0sDOqajIBbTy253Q8F+dqEBiZah1ELX/HTXV+3TG8l\r\nUJjlP6oE1CQwW43F+o46Pmf9eF0qi3pPEPwFpuX6JQfnWgWrAgR4LAhAh1UA\r\nhbVTVTBixGvNCZFvMh8Irbj3DNz/6pj2h5akehMBbaENpKj8g8Ij/tFIH7ho\r\nVXKGbDTUrnJPAcm4q1lghjiuBOgvJ3mZxacCayI+5daZBpL1rzXp9TrMSZqq\r\nsk5NuYgpfwBunGAjyeH3J4BirEKMUQElOKUr0oPvGYz11Rz6cs2Xa3U679q6\r\nZ7ZlwIHa3hghQeF62mlagpDWNJ1MweZb3zU=\r\n=fjdK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"56e6b1bb890f844b8963a146780d0b9cfa8abd0d","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../scripts/version-update.js","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry metrics SDK","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"lodash.merge":"4.6.2","@opentelemetry/core":"1.10.0","@opentelemetry/resources":"1.10.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"10.0.0","sinon":"15.0.0","rimraf":"4.1.2","codecov":"3.8.3","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.3.0 <1.5.0","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.3.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics_1.10.0_1678722835367_0.34217119288271447","host":"s3://npm-registry-packages"}},"1.10.1":{"name":"@opentelemetry/sdk-metrics","version":"1.10.1","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics@1.10.1","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"1389a8524ba59dc2e1d9cf627d504119c111fca1","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.10.1.tgz","fileCount":543,"integrity":"sha512-ARAD4e6lZhLwstwW+1HG2Q3XuYFA/t8vn10KK/mA4em1pZYKFn64c45RJZJcntxWp4wOZRbp9iL1RXsg7zIjow==","signatures":[{"sig":"MEQCIF7l8lYSyGXYbwwaiNKB4rSrfukNeC9FI7PrmRetWSCaAiAEvWmV3Mebg7p+TvQxAN44ZzolcH3+uz+10I6dLs+2BA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1571910,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkGIV6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrjQg//V5N9A3eIarDzrRPXxYMuJ3TO2qYzZxGLjCSbFBab/UFBKK2g\r\n4KS7ImLvfoP7k9S5xKMEQlCgG+0dGWt3SFELbhpLmwjVPM7OUcfF+es8dfAE\r\nQC6aLfq5juKIz/hcNBUGPZfauUQqReb+KptJUlCfvIW1RUi12dCoXSLm89/r\r\nXOUbhsIo3v+Lj5HBvn4lIl/3iJ07SaB3ehaVtypnSmpcgl2sWyMv77USvagd\r\nENNV4IbUFYM9YRnMFCWgSxtZtFDKmkLypkvUyu9jepecvgbXT+J4Z8hl6zgo\r\nv2Sqbi5PjkY035ZgSHqQ09yHGg5azUwn8AN0Yecqq88Mrqt35As1kdJLvrXg\r\nDK5lDQaxPqtaMSzLAg34Ck/Cng8HANjiKGaRA5ITCuJhoVMRt9va+mHscMwv\r\ngdfkJHKyq3wlGPZAvroDkljKROic2cYZv35zSwHXAoQ1PxYgEvbtxYDxsxPk\r\nSv5azrVgUBpKBM33EE+MMQ3AeizxdjCHnl8mPgv5u4C26MfdEd5f8cOKt9BS\r\nlhvukjFyU9DjoyMypt+LZWjWz1WVxircRPkXwSQa7t2FIGSV5XHL5nHSrBt4\r\nam5WwdCTJntt5jdeiL5RHN0myvOBDPB10G9ZoaogPjGUIXJK/XERuVD4/e9w\r\nJMVSLW8zW0CgZaAGWoaA4KhhW2OYXC/OdUk=\r\n=O4i4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"486df99906958de9b8b666839785b00160a6a229","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../scripts/version-update.js","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry metrics SDK","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"lodash.merge":"4.6.2","@opentelemetry/core":"1.10.1","@opentelemetry/resources":"1.10.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"10.0.0","sinon":"15.0.0","rimraf":"4.1.2","codecov":"3.8.3","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.3.0 <1.5.0","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.3.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics_1.10.1_1679328634706_0.9289571491726534","host":"s3://npm-registry-packages"}},"1.11.0":{"name":"@opentelemetry/sdk-metrics","version":"1.11.0","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics@1.11.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"0fe347fb39a802ec270315cba0eba2e3ce64c4a2","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.11.0.tgz","fileCount":561,"integrity":"sha512-knuq3pwU0+46FEMdw9Ses+alXL9cbcLUUTdYBBBsaKkqKwoVMHfhBufW7u6YCu4i+47Wg6ZZTN/eGc4LbTbK5Q==","signatures":[{"sig":"MEUCICcPE7ow3GH80M4VwObQJPDkCO3SK4VTYmZkd1STJ+uZAiEA35ZtKgFt5GMZa3WnCxdCI7yWWkwAk9QYu88ktlLJYVk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1839857,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkJaswACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrzcg/9FdLBYGIFXRPNUEc+CsQRabaC90KOwOp+7HV39/LXozs0FSB1\r\niKe3uUkfFBCLhcRSCQns1EVifv+Xda02Wa/Y0r28uhKc1y/N7uGQWLFpR7Iu\r\ngVVKTxpLt2QPsTYyQuuj4a6XGpGk7frKzv+uss7ByMKXUsC7YmzMS1DUJt+4\r\nekB8LXK7MEMrsN1ze0pp9+r9KTPGMDQXT9I64a/AuWR7IhM4RuPqjpriq/7R\r\nV38kOjgp4I6uj1H4hAB3FQ1NwdVOSajrDQ2HHLUvT4lv22LKIABQr0TDtQsN\r\naJq9rK7IfWSAE5zj5q9t8VfpNkhph3pFPPgg/l1Mnryr+VYhvErInyIuuPcM\r\n6X3csId2wFKauJR4oSXTLDxE6IMfvPk1ln2aXe3u/bSDrjEkd8bJvAS45yhW\r\n8JxegGRcA3SMuTtJcy85S6mVc/rksLjDSGDGpBaL4eYnR1qQ1hGYLljdpbuy\r\nbDRNcL2ZERMu3CmmXsFEmDqfTdFaMIzGTXXN20+ti6HtcBL9WFsKgVudxD5O\r\nTU40gKMtkAc+kfQ7cheqj+WjbH6ED0dPA7BHCE8Mo7kQTuGCVR1pMZZHh50h\r\nb/CaOKc7PCzVltN0PRnNPouwHzSM00LFqU4O2dvfnDkM6yyNJ86Je01ls6Fu\r\nQooqG9QlA64TxWqtWwXfGRY/w5p7wZSrXrE=\r\n=KFj4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"1328ee04ae78f9f6cf143af7050c00aaa6d2eb3b","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../scripts/version-update.js","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry metrics SDK","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"lodash.merge":"4.6.2","@opentelemetry/core":"1.11.0","@opentelemetry/resources":"1.11.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"10.0.0","sinon":"15.0.0","rimraf":"4.1.2","codecov":"3.8.3","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.3.0 <1.5.0","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.3.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics_1.11.0_1680190255856_0.4488883258029981","host":"s3://npm-registry-packages"}},"1.12.0":{"name":"@opentelemetry/sdk-metrics","version":"1.12.0","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics@1.12.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"52c135b8ca6af677a3e93b6721bc866a74c98b4b","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.12.0.tgz","fileCount":561,"integrity":"sha512-zOy88Jfk88eTxqu+9ypHLs184dGydJocSWtvWMY10QKVVaxhC3SLKa0uxI/zBtD9S+x0LP65wxrTSfSoUNtCOA==","signatures":[{"sig":"MEQCIEAfZBHAMQVNInXN1E0ihfClv5NylKPFc0jrD34SRJMvAiBzpMnq2Iu5C00sNF1GPtmv10V2RrlKn7msJG8pBtnd5g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1839857,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkOEYtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmobXQ/6AsboU2mCpdhs/tPwnXUqcjmoBV3/aVWoXwM22/jxCszCX8vk\r\nRFoTQHvvMZOMjqOLOPW2S3U2sPumqm7tj7V2aT/tVoZ7En09afYCbKO1fClj\r\ndtm9zB4H/GeL9uT4j8E7mFzPGMkgl/Wo8xZzrifKGknDwoO5sITFwXYCb1XI\r\nVprJn7eNMQEeMuGNd8WG2SFiI+VwVDfRz9eCmaI6ozABBw+Xd/Ae2SzPRfqo\r\nlbV46b6MN47oJHPNNjvPDPpQ8PUu+usZ2CZZR0/DYvHryjJnsTEaBOEqefXl\r\nvL7ommVdZW6DNSzMEQ5k4DQIMIHrvYYL/j8Cwkl7UcpmzrXgWoHNfQLlP3zk\r\nOqHvW+AEAYeiAs1ZrLRwNId+SpdNdERohMR70BxyU1ZXXx6NcpzJv6V+a+4q\r\nrtfX4oazI7rldM1BHO3sJM3g0cCyUtllFGTb5Mg8EI1qXBZppQF33jLvj20n\r\n4Ulb6wpsteaDDlBOK1TmN0s8VftM4ekrz2b5+UvE5yYq7RX+FVRFWb8U5xiZ\r\nHRc/5H4txVGZXLFvmSCJm6WmzUy83njG0qSF3wS6dOetNRXlrJrhS0tnHBqM\r\nnC4RbTqtdrp4EDi4F521hcdm6uo2cAmCxHbVhwgL+3lM2me9VmAtxB/BJacp\r\nvupg+95/zDYgsEWSTaFE/0t7TGuFe0UJ9j4=\r\n=5rhT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"a04090010ee18e17487b449984807cc2b7b6e3e6","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../scripts/version-update.js","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry metrics SDK","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"lodash.merge":"4.6.2","@opentelemetry/core":"1.12.0","@opentelemetry/resources":"1.12.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"10.0.0","sinon":"15.0.0","rimraf":"4.1.2","codecov":"3.8.3","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.3.0 <1.5.0","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.3.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics_1.12.0_1681409581531_0.31698151736882196","host":"s3://npm-registry-packages"}},"1.13.0":{"name":"@opentelemetry/sdk-metrics","version":"1.13.0","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics@1.13.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"4e859107a7a4389bcda7b37d3952bc7dd34211d7","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.13.0.tgz","fileCount":561,"integrity":"sha512-MOjZX6AnSOqLliCcZUrb+DQKjAWXBiGeICGbHAGe5w0BB18PJIeIo995lO5JSaFfHpmUMgJButTPfJJD27W3Vg==","signatures":[{"sig":"MEYCIQCUeO+qPBpw+CVNlqlTfDO++08VfOb0W3UdO9pIYolUCAIhAJH6JOYZuj9SxAwhyK86XMhqrxGloVuk7E7pzmTPdjJr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1839834},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"8fc76896595aac912bf9e15d4f19c167317844c8","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../scripts/version-update.js","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v18.12.1+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","dependencies":{"lodash.merge":"4.6.2","@opentelemetry/core":"1.13.0","@opentelemetry/resources":"1.13.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"10.0.0","sinon":"15.0.0","codecov":"3.8.3","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.3.0 <1.5.0","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.3.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics_1.13.0_1683811806809_0.022001801192962578","host":"s3://npm-registry-packages"}},"1.14.0":{"name":"@opentelemetry/sdk-metrics","version":"1.14.0","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics@1.14.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"ee51d72eb32a74108e6632681ce2df46cddc0714","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.14.0.tgz","fileCount":561,"integrity":"sha512-F0JXmLqT4LmsaiaE28fl0qMtc5w0YuMWTHt1hnANTNX8hxW4IKSv9+wrYG7BZd61HEbPm032Re7fXyzzNA6nIw==","signatures":[{"sig":"MEUCIQDZy6AZC4gsrIqvrLyc0L21UL/+PakTzlDTNsuwjRpDhwIgMSf9ZJoCKDB8uD708TqJtggoPZ9cpVP/LIthheTWDWM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1839834},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"edebbcc757535bc88f01340409dbbecc0bb6ccf8","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../scripts/version-update.js","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v18.12.1+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","dependencies":{"lodash.merge":"4.6.2","@opentelemetry/core":"1.14.0","@opentelemetry/resources":"1.14.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"10.0.0","sinon":"15.0.0","codecov":"3.8.3","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.3.0 <1.5.0","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.3.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics_1.14.0_1686031255514_0.6205545095237606","host":"s3://npm-registry-packages"}},"1.15.0":{"name":"@opentelemetry/sdk-metrics","version":"1.15.0","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics@1.15.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"e47ad688882fc2daedcbbe3db16a5c110feb23e8","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.15.0.tgz","fileCount":561,"integrity":"sha512-fFUnAcPvlXO39nlIduGuaeCuiZyFtSLCn9gW/0djFRO5DFst4m4gcT6+llXvNWuUvtGB49s56NP10B9IZRN0Rw==","signatures":[{"sig":"MEQCIA6mPFnkdT47rCrHsCh4ePv+jy+q7abH27EHpIw2DKE0AiB9rZUo59MjzXY9Uih4EbPVSQZ5I/uFRmYTdzVsP7a68g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1803014},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"06e919d6c909e8cc8e28b6624d9843f401d9b059","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../scripts/version-update.js","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.1/node@v18.12.1+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","dependencies":{"tslib":"^2.3.1","lodash.merge":"^4.6.2","@opentelemetry/core":"1.15.0","@opentelemetry/resources":"1.15.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"7.1.1","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","ts-mocha":"10.0.0","cross-var":"1.1.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.1","@types/sinon":"10.0.15","karma-webpack":"4.0.2","@opentelemetry/api":">=1.3.0 <1.5.0","@types/lodash.merge":"4.6.7","karma-spec-reporter":"0.0.36","karma-chrome-launcher":"3.1.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.3.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics_1.15.0_1688642828881_0.612950022765163","host":"s3://npm-registry-packages"}},"1.15.1":{"name":"@opentelemetry/sdk-metrics","version":"1.15.1","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics@1.15.1","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"e0d2844191ecd7fce3fccf18ae50ed35389f0885","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.15.1.tgz","fileCount":561,"integrity":"sha512-ojcrzexOQfto83NvKfIvsJap4SHH3ZvLjsDGhQ04AfvWWGR7mPcqLSlLedoSkEdIe0k1H6uBEsHBtIprkMpTHA==","signatures":[{"sig":"MEYCIQCBwveTbaE79v4tJk8CdBffRh5H6Loc8hSu+ysnZzK1YAIhAMHsh5T/As5lzxnmYm6j7V704gjjvyvEm2CaH1bpx5cO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1841179},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"9f71800fdc2a5ee5055684037a12498af71955f2","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../scripts/version-update.js","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.3/node@v18.4.0+x64 (darwin)","description":"OpenTelemetry metrics SDK","directories":{},"sideEffects":false,"_nodeVersion":"18.4.0","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"1.15.1","@opentelemetry/resources":"1.15.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"7.1.3","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@babel/core":"7.22.9","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"4.10.0","@types/mocha":"10.0.1","@types/sinon":"10.0.15","karma-webpack":"4.0.2","webpack-merge":"5.9.0","karma-coverage":"2.2.1","@opentelemetry/api":">=1.3.0 <1.5.0","@types/lodash.merge":"4.6.7","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.3.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics_1.15.1_1690209168814_0.4696021233708716","host":"s3://npm-registry-packages"}},"1.15.2":{"name":"@opentelemetry/sdk-metrics","version":"1.15.2","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics@1.15.2","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"eadd0a049de9cd860e1e0d49eea01156469c4b60","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.15.2.tgz","fileCount":561,"integrity":"sha512-9aIlcX8GnhcsAHW/Wl8bzk4ZnWTpNlLtud+fxUfBtFATu6OZ6TrGrF4JkT9EVrnoxwtPIDtjHdEsSjOqisY/iA==","signatures":[{"sig":"MEUCIQCFKX9DaFzjXDXPu/N+lf5A+VZoJEIuX5BlwqR2YxqIPQIgTriFUfsIieNy4ajXosd23GlEnVapJ9nRDMUvRFJYIGk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1848194},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"48fb15862e801b742059a3e39dbcc8ef4c10b2e2","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../scripts/version-update.js","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.4/node@v18.12.1+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"1.15.2","@opentelemetry/resources":"1.15.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"7.1.4","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@babel/core":"7.22.10","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"4.10.0","@types/mocha":"10.0.1","@types/sinon":"10.0.16","karma-webpack":"4.0.2","webpack-merge":"5.9.0","karma-coverage":"2.2.1","@opentelemetry/api":">=1.3.0 <1.5.0","@types/lodash.merge":"4.6.7","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.3.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics_1.15.2_1691500878806_0.21964542929012487","host":"s3://npm-registry-packages"}},"1.16.0":{"name":"@opentelemetry/sdk-metrics","version":"1.16.0","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics@1.16.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"6c413c6abb1d68dbfe59984384d4031feeccbe1e","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.16.0.tgz","fileCount":561,"integrity":"sha512-58obaKzBY0CB6ZQS/sxcGvihqZk2zL2KDCQe734NofVfE7JpKMn/TtyzA8O4nw9sXIO2N9Wx2zzKRyGFXVGrcw==","signatures":[{"sig":"MEUCIGu4l4M/yMtx2D8TpJeVo1nvcoCzRr6o5+wZtJj2W23YAiEAzPdInj1ng6V1HXJhfyT/sRzxXuC3taYmiuKCASO4G2g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1872545},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"5fcd8cf136e2235903dde3df9ba03ced594f0e95","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../scripts/version-update.js","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.5/node@v18.12.1+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"1.16.0","@opentelemetry/resources":"1.16.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"7.1.5","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@babel/core":"7.22.17","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"4.10.0","@types/mocha":"10.0.1","@types/sinon":"10.0.16","karma-webpack":"4.0.2","webpack-merge":"5.9.0","karma-coverage":"2.2.1","@opentelemetry/api":">=1.3.0 <1.6.0","@types/lodash.merge":"4.6.7","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.3.0 <1.6.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics_1.16.0_1694434471320_0.42251452448444704","host":"s3://npm-registry-packages"}},"1.17.0":{"name":"@opentelemetry/sdk-metrics","version":"1.17.0","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics@1.17.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"e51d39e0bb749780d17f9b1df12f0490438dec1a","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.17.0.tgz","fileCount":561,"integrity":"sha512-HlWM27yGmYuwCoVRe3yg2PqKnIsq0kEF0HQgvkeDWz2NYkq9fFaSspR6kvjxUTbghAlZrabiqbgyKoYpYaXS3w==","signatures":[{"sig":"MEQCIEGFsgaNt88vPUiItoys14mI96KUmsfCU3V9/M9zEFrHAiAgibedup1xc0Uh7HFSGEe8a8IEZbYsRxYQhUM7mMJJmQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1872545},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"faf939c77591f709afbc23fadbe629c9d3607ef6","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../scripts/version-update.js","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.5/node@v18.12.1+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"1.17.0","@opentelemetry/resources":"1.17.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"7.1.5","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@babel/core":"7.22.17","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"4.10.0","@types/mocha":"10.0.1","@types/sinon":"10.0.16","karma-webpack":"4.0.2","webpack-merge":"5.9.0","karma-coverage":"2.2.1","@opentelemetry/api":">=1.3.0 <1.7.0","@types/lodash.merge":"4.6.7","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.3.0 <1.7.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics_1.17.0_1694524354547_0.27289065421627656","host":"s3://npm-registry-packages"}},"1.17.1":{"name":"@opentelemetry/sdk-metrics","version":"1.17.1","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics@1.17.1","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"9c4d13d845bcc82be8684050d9db7cce10f61580","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.17.1.tgz","fileCount":561,"integrity":"sha512-eHdpsMCKhKhwznxvEfls8Wv3y4ZBWkkXlD3m7vtHIiWBqsMHspWSfie1s07mM45i/bBCf6YBMgz17FUxIXwmZA==","signatures":[{"sig":"MEUCIQC6T+my/2xzI2vaedMangtbqdpdAHiTTnwC85I9zGxvdwIgJwgxV8Jz14/su/N16gkO8rU//itJPXSzxcx7YCPtM6U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1883659},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"f8e187b473274cc2011e7385992f07d319d667dc","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../scripts/version-update.js","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.5/node@v18.12.1+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"1.17.1","@opentelemetry/resources":"1.17.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"7.1.5","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@babel/core":"7.22.20","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"4.10.0","@types/mocha":"10.0.2","@types/sinon":"10.0.18","karma-webpack":"4.0.2","webpack-merge":"5.9.0","karma-coverage":"2.2.1","@opentelemetry/api":">=1.3.0 <1.7.0","@types/lodash.merge":"4.6.7","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.3.0 <1.7.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics_1.17.1_1696947498625_0.4798664177082872","host":"s3://npm-registry-packages"}},"1.18.0":{"name":"@opentelemetry/sdk-metrics","version":"1.18.0","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics@1.18.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"f84fffcabdb0e9504e3b219635c1099aabc9e207","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.18.0.tgz","fileCount":561,"integrity":"sha512-wK5zdNCo5cJvZog/lsqXCg9/Dt9UeNXQsskgqX8Yz+40t13Kb5CKFFkAMU8tNUxkvidHnD6G6sT6xeVCHQYe4A==","signatures":[{"sig":"MEUCIQCMiT/6j2k3CLJNS9PVe/gMQM/shgZfXDwNLg9l7E3QdgIgFnmCSIgxrXYgrtIppJgyKJkGNUzsbBET1HwAZBRXfG8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1890396},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"73b446688f10fd8dc4cf403a085f0a39070df7b4","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../scripts/version-update.js","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.18.2+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"sideEffects":false,"_nodeVersion":"18.18.2","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"1.18.0","@opentelemetry/resources":"1.18.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@babel/core":"7.22.20","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"4.10.0","@types/mocha":"10.0.3","@types/sinon":"10.0.20","karma-webpack":"4.0.2","webpack-merge":"5.9.0","karma-coverage":"2.2.1","@opentelemetry/api":">=1.3.0 <1.8.0","@types/lodash.merge":"4.6.8","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.3.0 <1.8.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics_1.18.0_1699353886784_0.2402177673494048","host":"s3://npm-registry-packages"}},"1.18.1":{"name":"@opentelemetry/sdk-metrics","version":"1.18.1","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics@1.18.1","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"1dd334744a1e5d2eec27e9e9765c73cd2f43aef3","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.18.1.tgz","fileCount":561,"integrity":"sha512-TEFgeNFhdULBYiCoHbz31Y4PDsfjjxRp8Wmdp6ybLQZPqMNEb+dRq+XN8Xw3ivIgTaf9gYsomgV5ensX99RuEQ==","signatures":[{"sig":"MEUCIQDZiuGHcrjzMGF/TJ452D+P3TvNuhbyNQDLJOkdYsDPFQIgKtcP2GNoTjs9raH1wfRgj93Kw4tqRy7FLSmt98YetyQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1892649},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"f665499096189390e691cf1a772e677fa67812d7","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../scripts/version-update.js","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.18.2+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"sideEffects":false,"_nodeVersion":"18.18.2","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"1.18.1","@opentelemetry/resources":"1.18.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@babel/core":"7.22.20","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"4.10.0","@types/mocha":"10.0.3","@types/sinon":"10.0.20","karma-webpack":"4.0.2","webpack-merge":"5.9.0","karma-coverage":"2.2.1","@opentelemetry/api":">=1.3.0 <1.8.0","@types/lodash.merge":"4.6.8","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.3.0 <1.8.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics_1.18.1_1699466949698_0.2731195093463463","host":"s3://npm-registry-packages"}},"1.19.0":{"name":"@opentelemetry/sdk-metrics","version":"1.19.0","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics@1.19.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"fe8029af29402563eb8dba75a85fc02006ea92c4","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.19.0.tgz","fileCount":561,"integrity":"sha512-FiMii40zr0Fmys4F1i8gmuCvbinBnBsDeGBr4FQemOf0iPCLytYQm5AZJ/nn4xSc71IgKBQwTFQRAGJI7JvZ4Q==","signatures":[{"sig":"MEUCIQCQbl3KfCIEDQc8lHtdKlCRprXMXq1iqFxWHzS7fhRAMQIgOOpi/ti3SCJMstM0WHGr81bNA0QPpltVs/+OuHKDlyw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1892648},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"d3c311aec24137084dc820805a2597e120335672","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../scripts/version-update.js","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.18.2+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"sideEffects":false,"_nodeVersion":"18.18.2","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"1.19.0","@opentelemetry/resources":"1.19.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@babel/core":"7.23.6","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"5.1.4","@types/mocha":"10.0.6","@types/sinon":"10.0.20","karma-webpack":"4.0.2","webpack-merge":"5.10.0","karma-coverage":"2.2.1","@opentelemetry/api":">=1.3.0 <1.8.0","@types/lodash.merge":"4.6.9","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.3.0 <1.8.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics_1.19.0_1702557329935_0.360745159718469","host":"s3://npm-registry-packages"}},"1.20.0":{"name":"@opentelemetry/sdk-metrics","version":"1.20.0","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics@1.20.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"472d723d986a0a0cc1ee1170ed086dc18269d7e0","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.20.0.tgz","fileCount":561,"integrity":"sha512-07bFOQUrpN/Q5biJ/cuBePztKwkc1VGkFblZxAcVkuvCLDAPJfsyr0NNWegWeYe0bpGt1jmXScpUWnVD+t8Q0w==","signatures":[{"sig":"MEUCIC3XY/+kezXMIGl3icXMEXdu0pKWhpKhJ7kpzNi6cW5lAiEAtKlujqgWTX99ep+IDoNQKi5a4BEjbPjw6yGUGzBa6hU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1892648},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"57008533aba7ccd51ea80f38ff4f29404d47eb9c","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../scripts/version-update.js","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"1.20.0","@opentelemetry/resources":"1.20.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@babel/core":"7.23.6","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"5.1.4","@types/mocha":"10.0.6","@types/sinon":"10.0.20","karma-webpack":"4.0.2","webpack-merge":"5.10.0","karma-coverage":"2.2.1","@opentelemetry/api":">=1.3.0 <1.8.0","@types/lodash.merge":"4.6.9","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.3.0 <1.8.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics_1.20.0_1705313747415_0.3264673460411951","host":"s3://npm-registry-packages"}},"1.21.0":{"name":"@opentelemetry/sdk-metrics","version":"1.21.0","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics@1.21.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"40d71aaec5b696e58743889ce6d5bf2593f9a23d","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.21.0.tgz","fileCount":561,"integrity":"sha512-on1jTzIHc5DyWhRP+xpf+zrgrREXcHBH4EDAfaB5mIG7TWpKxNXooQ1JCylaPsswZUv4wGnVTinr4HrBdGARAQ==","signatures":[{"sig":"MEQCIGpBDMhU8lTH5TE6aUTa3/f+ZAAJNZyvJR4W+y34uKgyAiA9nbAm4W2G9iFlp1OSXMtF3+Qs3M8RTAz9dMzR/gPTXA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1898573},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"828f2ed730e4d26d71f92e220f96b60a552a673a","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../scripts/version-update.js","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"1.21.0","@opentelemetry/resources":"1.21.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@babel/core":"7.23.6","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"5.1.4","@types/mocha":"10.0.6","@types/sinon":"10.0.20","karma-webpack":"4.0.2","webpack-merge":"5.10.0","karma-coverage":"2.2.1","@babel/preset-env":"7.22.20","@opentelemetry/api":">=1.3.0 <1.8.0","@types/lodash.merge":"4.6.9","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.3.0 <1.8.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics_1.21.0_1706249469816_0.2681154592027921","host":"s3://npm-registry-packages"}},"1.22.0":{"name":"@opentelemetry/sdk-metrics","version":"1.22.0","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics@1.22.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"b94c62403013e4c72b96dc747d71d786073efafc","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.22.0.tgz","fileCount":561,"integrity":"sha512-k6iIx6H3TZ+BVMr2z8M16ri2OxWaljg5h8ihGJxi/KQWcjign6FEaEzuigXt5bK9wVEhqAcWLCfarSftaNWkkg==","signatures":[{"sig":"MEUCIQDNXgVv9Uxbxg3/33/6F66wijwbwDd7GOiqKURWpli14gIgE4NQsN1CjuPkQcHMyQ25CAKybwbYPJODQxdspPHt3+E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1903538},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"7be35c7845e206b27b682e8ce1cee850b09cec04","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../scripts/version-update.js","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"1.22.0","@opentelemetry/resources":"1.22.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@babel/core":"7.23.6","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"5.1.4","@types/mocha":"10.0.6","@types/sinon":"10.0.20","karma-webpack":"4.0.2","webpack-merge":"5.10.0","karma-coverage":"2.2.1","@babel/preset-env":"7.22.20","@opentelemetry/api":">=1.3.0 <1.9.0","@types/lodash.merge":"4.6.9","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.3.0 <1.9.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics_1.22.0_1709198294535_0.21078722486314505","host":"s3://npm-registry-packages"}},"1.23.0":{"name":"@opentelemetry/sdk-metrics","version":"1.23.0","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics@1.23.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"b4cf3cc86b6dedf5c438c67c829df7399bf64be1","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.23.0.tgz","fileCount":561,"integrity":"sha512-4OkvW6+wST4h6LFG23rXSTf6nmTf201h9dzq7bE0z5R9ESEVLERZz6WXwE7PSgg1gdjlaznm1jLJf8GttypFDg==","signatures":[{"sig":"MEUCIQCRviOtBHY4cxAbFmlSe5/d1UlZwJANaHyzFmHvAstAfgIgcfcrCMSSgbzKnYncXB5RxmguAOFxcmRGxTgWETblVvM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1914895},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"5231aa255047fbc6ee3d6a299f4423ab2f8a5fbc","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../scripts/version-update.js","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"1.23.0","@opentelemetry/resources":"1.23.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@babel/core":"7.23.6","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"5.1.4","@types/mocha":"10.0.6","@types/sinon":"10.0.20","karma-webpack":"4.0.2","webpack-merge":"5.10.0","karma-coverage":"2.2.1","@babel/preset-env":"7.22.20","@opentelemetry/api":">=1.3.0 <1.9.0","@types/lodash.merge":"4.6.9","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.3.0 <1.9.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics_1.23.0_1712131805787_0.6556898049242013","host":"s3://npm-registry-packages"}},"1.24.0":{"name":"@opentelemetry/sdk-metrics","version":"1.24.0","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics@1.24.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"205c19b6d18e385039d0a261c784a203c644fc28","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.24.0.tgz","fileCount":561,"integrity":"sha512-4tJ+E6N019OZVB/nUW/LoK9xHxfeh88TCoaTqHeLBE9wLYfi6irWW6J9cphMav7J8Qk0D5b7/RM4VEY4dArWOA==","signatures":[{"sig":"MEUCIFw7C6N1PHTi2sUnPwYd6pb4MEYB0sdDPAfLyVHSEEL0AiEAhRBkWnU/RMsb1e2pd8JuT67Zi9eH87TbDc40JN74Plg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1914895},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"3ab4f765d8d696327b7d139ae6a45e7bd7edd924","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../scripts/version-update.js","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"1.24.0","@opentelemetry/resources":"1.24.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@babel/core":"7.23.6","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"5.1.4","@types/mocha":"10.0.6","@types/sinon":"10.0.20","karma-webpack":"4.0.2","webpack-merge":"5.10.0","karma-coverage":"2.2.1","@babel/preset-env":"7.22.20","@opentelemetry/api":">=1.3.0 <1.9.0","@types/lodash.merge":"4.6.9","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.3.0 <1.9.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics_1.24.0_1713969585182_0.37633556794494494","host":"s3://npm-registry-packages"}},"1.24.1":{"name":"@opentelemetry/sdk-metrics","version":"1.24.1","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics@1.24.1","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"82ee3069b2ca9bb7c1e91272ff81536dc2e9bc8d","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.24.1.tgz","fileCount":561,"integrity":"sha512-FrAqCbbGao9iKI+Mgh+OsC9+U2YMoXnlDHe06yH7dvavCKzE3S892dGtX54+WhSFVxHR/TMRVJiK/CV93GR0TQ==","signatures":[{"sig":"MEUCIQCTMSUw6bs+C6f+azmvQBAAOS2F2zkdYmTaUA0WsSSESgIgVgEsIIBcrrCeUZGl8a4ziCe01KmMiEcyeTk5/btVJww=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1914895},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"41c2626fe0ed03e2e83bd79ee43c9bdf0ffd80d8","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../scripts/version-update.js","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"1.24.1","@opentelemetry/resources":"1.24.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@babel/core":"7.23.6","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"5.1.4","@types/mocha":"10.0.6","@types/sinon":"10.0.20","karma-webpack":"4.0.2","webpack-merge":"5.10.0","karma-coverage":"2.2.1","@babel/preset-env":"7.22.20","@opentelemetry/api":">=1.3.0 <1.9.0","@types/lodash.merge":"4.6.9","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.3.0 <1.9.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics_1.24.1_1715093558847_0.03178144750682588","host":"s3://npm-registry-packages"}},"1.25.0":{"name":"@opentelemetry/sdk-metrics","version":"1.25.0","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics@1.25.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"0c954d580c17821ae4385d29447718df09e80b79","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.25.0.tgz","fileCount":561,"integrity":"sha512-IF+Sv4VHgBr/BPMKabl+GouJIhEqAOexCHgXVTISdz3q9P9H/uA8ScCF+22gitQ69aFtESbdYOV+Fen5+avQng==","signatures":[{"sig":"MEUCIQCTGV0/dFktbxE5zP6XFH0Eu0/cZ7CGkU7c5BAAq4CVjAIgG3QIuMsMnEWURsoo1SS0GKQqtBcHiCbSGaaBzrbsXaE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1914152},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"c4d3351b6b3f5593c8d7cbfec97b45cea9fe1511","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../scripts/version-update.js","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","align-api-deps":"node ../../scripts/align-api-deps.js","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"1.25.0","@opentelemetry/resources":"1.25.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.3","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"9.5.1","typescript":"4.4.4","@babel/core":"7.24.6","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"5.1.4","@types/mocha":"10.0.6","@types/sinon":"17.0.3","karma-webpack":"5.0.1","webpack-merge":"5.10.0","karma-coverage":"2.2.1","@babel/preset-env":"7.24.6","@opentelemetry/api":">=1.3.0 <1.10.0","@types/lodash.merge":"4.6.9","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.3.0 <1.10.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics_1.25.0_1717607758345_0.42159719696026543","host":"s3://npm-registry-packages"}},"1.25.1":{"name":"@opentelemetry/sdk-metrics","version":"1.25.1","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics@1.25.1","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"50c985ec15557a9654334e7fa1018dc47a8a56b7","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.25.1.tgz","fileCount":561,"integrity":"sha512-9Mb7q5ioFL4E4dDrc4wC/A3NTHDat44v4I3p2pLPSxRvqUbDIQyMVr9uK+EU69+HWhlET1VaSrRzwdckWqY15Q==","signatures":[{"sig":"MEUCIQCNZXU0MM/EDXNSq8ZV/6psCW97vGmYrurc/e/iYg7LOAIgS3/fl7W9LtXeIauAqM5ZL24hsmc39zaKuX+90I3Edn8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1914152},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"0608f405573901e54db01e44c533009cf28be262","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../scripts/version-update.js","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","align-api-deps":"node ../../scripts/align-api-deps.js","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"1.25.1","@opentelemetry/resources":"1.25.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.3","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"9.5.1","typescript":"4.4.4","@babel/core":"7.24.7","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"5.1.4","@types/mocha":"10.0.6","@types/sinon":"17.0.3","karma-webpack":"5.0.1","webpack-merge":"5.10.0","karma-coverage":"2.2.1","@babel/preset-env":"7.24.7","@opentelemetry/api":">=1.3.0 <1.10.0","@types/lodash.merge":"4.6.9","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.3.0 <1.10.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics_1.25.1_1718875163722_0.02638450999168529","host":"s3://npm-registry-packages"}},"1.26.0":{"name":"@opentelemetry/sdk-metrics","version":"1.26.0","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics@1.26.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"37bb0afb1d4447f50aab9cdd05db6f2d8b86103e","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.26.0.tgz","fileCount":561,"integrity":"sha512-0SvDXmou/JjzSDOjUmetAAvcKQW6ZrvosU0rkbDGpXvvZN+pQF6JbK/Kd4hNdK4q/22yeruqvukXEJyySTzyTQ==","signatures":[{"sig":"MEQCICUUc6/yySv2TiNLcq7AT6pbNR/Hi6zEZwTkoKabjKDXAiBJffQVgekh2F9ABx6OLgxEpstV/+ZyN55vBGwjKtK3bg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1922196},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"720bc8c70d47029cb6b41a34ffdc3d25cbaa2f80","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc mocha 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../scripts/version-update.js","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","align-api-deps":"node ../../scripts/align-api-deps.js","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.20.4+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"sideEffects":false,"_nodeVersion":"18.20.4","dependencies":{"@opentelemetry/core":"1.26.0","@opentelemetry/resources":"1.26.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.4","lerna":"6.6.2","mocha":"10.7.3","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","cross-var":"1.1.0","ts-loader":"9.5.1","typescript":"4.4.4","@babel/core":"7.25.2","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"5.1.4","@types/mocha":"10.0.7","@types/sinon":"17.0.3","karma-webpack":"5.0.1","webpack-merge":"5.10.0","karma-coverage":"2.2.1","@babel/preset-env":"7.25.3","@opentelemetry/api":">=1.3.0 <1.10.0","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"7.0.0","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.3.0 <1.10.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics_1.26.0_1724836642462_0.8363214110577704","host":"s3://npm-registry-packages"}},"1.27.0":{"name":"@opentelemetry/sdk-metrics","version":"1.27.0","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-metrics@1.27.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"fb4f55017dc95a95ee00260262952b18e3e7c25c","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.27.0.tgz","fileCount":561,"integrity":"sha512-JzWgzlutoXCydhHWIbLg+r76m+m3ncqvkCcsswXAQ4gqKS+LOHKhq+t6fx1zNytvLuaOUBur7EvWxECc4jPQKg==","signatures":[{"sig":"MEQCICee8j7NTKwwuMDYrj9aQl8y/q4kq6aAAzlgQtPxV3QOAiBvOudBQcJ+lEOSc3vaMLEPFzNp4YjETGVxdyID8KO5GQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@opentelemetry%2fsdk-metrics@1.27.0","provenance":{"predicateType":"https://slsa.dev/provenance/v0.2"}},"unpackedSize":1920417},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"eb3ca4fb07ee31c62093f5fcec56575573c902ce","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc mocha 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"node ../../scripts/version-update.js","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","align-api-deps":"node ../../scripts/align-api-deps.js","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.20.4+x64 (linux)","description":"OpenTelemetry metrics SDK","directories":{},"sideEffects":false,"_nodeVersion":"18.20.4","dependencies":{"@opentelemetry/core":"1.27.0","@opentelemetry/resources":"1.27.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.4","lerna":"6.6.2","mocha":"10.7.3","sinon":"15.1.2","webpack":"5.94.0","cross-var":"1.1.0","ts-loader":"9.5.1","typescript":"4.4.4","@babel/core":"7.25.2","@types/node":"18.6.5","karma-mocha":"2.0.1","webpack-cli":"5.1.4","@types/mocha":"10.0.8","@types/sinon":"17.0.3","karma-webpack":"5.0.1","webpack-merge":"5.10.0","karma-coverage":"2.2.1","@babel/preset-env":"7.25.4","@opentelemetry/api":">=1.3.0 <1.10.0","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"7.0.0","karma-chrome-launcher":"3.1.0"},"peerDependencies":{"@opentelemetry/api":">=1.3.0 <1.10.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-metrics_1.27.0_1729695104075_0.2954021766849051","host":"s3://npm-registry-packages"}},"1.28.0":{"name":"@opentelemetry/sdk-metrics","version":"1.28.0","description":"OpenTelemetry metrics SDK","main":"build/src/index.js","module":"build/esm/index.js","esnext":"build/esnext/index.js","types":"build/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/open-telemetry/opentelemetry-js.git"},"scripts":{"prepublishOnly":"npm run compile","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","test":"nyc mocha 'test/**/*.test.ts'","test:browser":"karma start --single-run","tdd":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","lint":"eslint . --ext .ts","lint:fix":"eslint . --ext .ts --fix","version":"node ../../scripts/version-update.js","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","prewatch":"node ../../scripts/version-update.js","peer-api-check":"node ../../scripts/peer-api-check.js","align-api-deps":"node ../../scripts/align-api-deps.js"},"keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","engines":{"node":">=14"},"publishConfig":{"access":"public"},"devDependencies":{"@babel/core":"7.26.0","@babel/preset-env":"7.26.0","@opentelemetry/api":">=1.3.0 <1.10.0","@types/mocha":"10.0.9","@types/node":"18.6.5","@types/sinon":"17.0.3","babel-plugin-istanbul":"7.0.0","cross-var":"1.1.0","karma":"6.4.4","karma-chrome-launcher":"3.1.0","karma-coverage":"2.2.1","karma-mocha":"2.0.1","karma-spec-reporter":"0.0.36","karma-webpack":"5.0.1","lerna":"6.6.2","mocha":"10.8.2","nyc":"15.1.0","sinon":"15.1.2","ts-loader":"9.5.1","typescript":"4.4.4","webpack":"5.96.1","webpack-cli":"5.1.4","webpack-merge":"5.10.0"},"peerDependencies":{"@opentelemetry/api":">=1.3.0 <1.10.0"},"dependencies":{"@opentelemetry/core":"1.28.0","@opentelemetry/resources":"1.28.0"},"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics","sideEffects":false,"gitHead":"4b1ad3fda0cde58907e30fab25c3c767546708e5","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"_id":"@opentelemetry/sdk-metrics@1.28.0","_nodeVersion":"18.20.4","_npmVersion":"lerna/6.6.2/node@v18.20.4+x64 (linux)","dist":{"integrity":"sha512-43tqMK/0BcKTyOvm15/WQ3HLr0Vu/ucAl/D84NO7iSlv6O4eOprxSHa3sUtmYkaZWHqdDJV0AHVz/R6u4JALVQ==","shasum":"257b5295bbe9de1ad31c5e8cb43a660c25911d20","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.28.0.tgz","fileCount":561,"unpackedSize":1922324,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@opentelemetry%2fsdk-metrics@1.28.0","provenance":{"predicateType":"https://slsa.dev/provenance/v0.2"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH/Z6d+HyDNtyNUtpuzVdAyqhlTCfvqGItbZ06UPzbGwAiEA1ZqqIIyQTA5ZM/DN/dHtZc0GZcZv5TtaAtdiIAF0eZI="}]},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"directories":{},"maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdk-metrics_1.28.0_1731926513320_0.5425586601271688"},"_hasShrinkwrap":false}},"time":{"created":"2022-08-24T17:44:35.369Z","modified":"2024-11-18T10:41:53.964Z","0.32.0":"2022-08-24T17:44:35.717Z","0.33.0":"2022-09-16T12:14:58.301Z","1.8.0":"2022-11-09T19:45:34.297Z","1.9.0":"2023-01-11T21:46:29.914Z","1.9.1":"2023-01-30T15:30:13.362Z","1.10.0":"2023-03-13T15:53:55.612Z","1.10.1":"2023-03-20T16:10:34.822Z","1.11.0":"2023-03-30T15:30:56.074Z","1.12.0":"2023-04-13T18:13:01.808Z","1.13.0":"2023-05-11T13:30:07.116Z","1.14.0":"2023-06-06T06:00:55.809Z","1.15.0":"2023-07-06T11:27:09.167Z","1.15.1":"2023-07-24T14:32:49.159Z","1.15.2":"2023-08-08T13:21:18.974Z","1.16.0":"2023-09-11T12:14:31.689Z","1.17.0":"2023-09-12T13:12:34.838Z","1.17.1":"2023-10-10T14:18:19.024Z","1.18.0":"2023-11-07T10:44:47.115Z","1.18.1":"2023-11-08T18:09:09.980Z","1.19.0":"2023-12-14T12:35:30.166Z","1.20.0":"2024-01-15T10:15:47.729Z","1.21.0":"2024-01-26T06:11:10.039Z","1.22.0":"2024-02-29T09:18:14.841Z","1.23.0":"2024-04-03T08:10:06.050Z","1.24.0":"2024-04-24T14:39:45.460Z","1.24.1":"2024-05-07T14:52:39.090Z","1.25.0":"2024-06-05T17:15:58.569Z","1.25.1":"2024-06-20T09:19:23.925Z","1.26.0":"2024-08-28T09:17:22.703Z","1.27.0":"2024-10-23T14:51:44.571Z","1.28.0":"2024-11-18T10:41:53.564Z"},"bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics","keywords":["opentelemetry","nodejs","metrics","stats","profiling"],"repository":{"type":"git","url":"git+https://github.com/open-telemetry/opentelemetry-js.git"},"description":"OpenTelemetry metrics SDK","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"readme":"# OpenTelemetry Metrics SDK\n\n[![NPM Published Version][npm-img]][npm-url]\n[![Apache License][license-image]][license-image]\n\nThis module contains the Metrics SDK of [opentelemetry-js](https://github.com/open-telemetry/opentelemetry-js).\n\nUsed standalone, this module provides methods for manual instrumentation of code, offering full control over recording metrics for client-side JavaScript (browser) and Node.js.\n\nIt does **not** provide automated instrumentation of known libraries or host environment metrics out-of-the-box.\n\n## Installation\n\n```bash\nnpm install --save @opentelemetry/api\nnpm install --save @opentelemetry/sdk-metrics\n```\n\n## Usage\n\nThe basic setup of the SDK can be seen as followings:\n\n```js\nconst opentelemetry = require('@opentelemetry/api');\nconst { MeterProvider } = require('@opentelemetry/sdk-metrics');\n\n// To create an instrument, you first need to initialize the Meter provider.\n// NOTE: The default OpenTelemetry meter provider does not record any metric instruments.\n// Registering a working meter provider allows the API methods to record instruments.\nopentelemetry.metrics.setGlobalMeterProvider(new MeterProvider());\n\n// To record a metric event, we used the global singleton meter to create an instrument.\nconst counter = opentelemetry.metrics.getMeter('default').createCounter('foo');\n\n// record a metric event.\ncounter.add(1, { attributeKey: 'attribute-value' });\n```\n\nIn conditions, we may need to setup an async instrument to observe costly events:\n\n```js\n// Creating an async instrument, similar to synchronous instruments\nconst observableCounter = opentelemetry.metrics.getMeter('default')\n .createObservableCounter('observable-counter');\n\n// Register a single-instrument callback to the async instrument.\nobservableCounter.addCallback(async (observableResult) => {\n // ... do async stuff\n observableResult.observe(1, { attributeKey: 'attribute-value' });\n});\n\n// Register a multi-instrument callback and associate it with a set of async instruments.\nopentelemetry.metrics.getMeter('default')\n .addBatchObservableCallback(batchObservableCallback, [ observableCounter ]);\nasync function batchObservableCallback(batchObservableResult) {\n // ... do async stuff\n batchObservableResult.observe(observableCounter, 1, { attributeKey: 'attribute-value' });\n}\n```\n\nViews can be registered when instantiating a `MeterProvider`:\n\n```js\nconst meterProvider = new MeterProvider({\n views: [\n // override the bucket boundaries on `my.histogram` to [0, 50, 100]\n new View({ aggregation: new ExplicitBucketHistogramAggregation([0, 50, 100]), instrumentName: 'my.histogram'}),\n // rename 'my.counter' to 'my.renamed.counter'\n new View({ name: 'my.renamed.counter', instrumentName: 'my.counter'})\n ]\n})\n```\n\n## Example\n\nSee [examples/prometheus](https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/examples/prometheus) for an end-to-end example, including exporting metrics.\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: \n- For more about OpenTelemetry JavaScript: \n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/sdk-metrics\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fsdk%2Dmetrics.svg\n","readmeFilename":"README.md"} \ No newline at end of file diff --git a/tests/registry/npm/@opentelemetry/sdk-trace-base/registry.json b/tests/registry/npm/@opentelemetry/sdk-trace-base/registry.json new file mode 100644 index 00000000000000..df5892a53b1d53 --- /dev/null +++ b/tests/registry/npm/@opentelemetry/sdk-trace-base/registry.json @@ -0,0 +1 @@ +{"_id":"@opentelemetry/sdk-trace-base","_rev":"65-20c7afee9d8d681944f1419799e365d9","name":"@opentelemetry/sdk-trace-base","dist-tags":{"canary":"0.25.1-alpha.23","next":"1.8.0","latest":"1.28.0"},"versions":{"0.24.1-alpha.4":{"name":"@opentelemetry/sdk-trace-base","version":"0.24.1-alpha.4","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@0.24.1-alpha.4","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"8ad47864d4fd534b5a24f3d9b36aa91b348586f1","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-0.24.1-alpha.4.tgz","fileCount":147,"integrity":"sha512-dRMAseFliUOYuKoHha+3/qdNsU0JyY8085xzrRyJP7TvXo6KQKzotRCtMTMvXgv3UOufeZTMHyO13J3cuB+eSg==","signatures":[{"sig":"MEQCIA7Tcl+88PcVrNMkgkaAbIhBNLaDuB6ol0YEz/lQu/SPAiB9VqTx7RX1pJT9c2zbFfw0RPOaHeljtad8c+NBp9C5HA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230456,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDDvUCRA9TVsSAnZWagAAwZMP/iLkavfZlJi3bwI7VOqY\n9dMwmFZXKZvBsrH2uGGD025BEAtA1p2NTARa1h2UTr+Zx5yI04ziJUkuZ7MH\n4t7QpMtHJCOAzavVzSFuy3WNFjG7qq8sK20loQL1NpmwVCC/Fz2+EohD5Wkj\nmxmizEdH+DkUNpKbsuLMlEYkPz3ZGW+h4b4nkeCt3MylOvuO0/1wW+NOvjk+\np8baQh3roC+JFZ445yQAQek90YylXzvtvhMuf4NYSedtfABAB3w08iy9I/sZ\nR+KlcC3px8zMsxUq2BdqV3EOiTwaqAZbCfaaPma1yjTSxHum1C2HuWjkUqMc\nxG/PctI398iEeAe0YtwKqK+BrjdV3RnlHNSS0rOZiRDqAqBKqPu8uvB43g5e\nhpEJW6QG34KGfO85mNgJwp8gMtrhQ30o5cetTJ6GBQBjySOgF5SUN4DCQmmb\nsZyR3UHNarAQIQWR5A2DTeqK60BTz2jjCKMIA+EGerhDbEm4kgc62Hml1O+a\nFzqycPereLxTLqRQybK0CSSe8IaZkdUQxir8FMH1UFkzM5jlQINpsa80u1fy\nDpVZ8QDFf2Yv74IqMmHjtOSrbh81IWx7GEAslvyNyvz8TxtpcVWpntd2Tveh\nzJwqF6xwYbFzc7kKYA7R9MpaPoQLeHvxFpPJjasjcswVDRxTEnonXXqBxHHu\nK/LE\r\n=dotJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"a8d39317b5daad727f2116ca314db0d1420ec488","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"_nodeVersion":"14.17.4","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"^0.24.1-alpha.4+a8d39317","@opentelemetry/resources":"^0.24.1-alpha.4+a8d39317","@opentelemetry/semantic-conventions":"^0.24.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.6","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_0.24.1-alpha.4_1628191700214_0.39586224494227173","host":"s3://npm-registry-packages"}},"0.24.1-alpha.5":{"name":"@opentelemetry/sdk-trace-base","version":"0.24.1-alpha.5","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@0.24.1-alpha.5","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"5801c08684013d9cd72ce6ca781f0fea2f5eb776","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-0.24.1-alpha.5.tgz","fileCount":147,"integrity":"sha512-V5N8VEc6IUQP9CH5NPOPjdwhnX94Bboe+AKje/aQLyageVYoHFxkqLklI3EfbeuDCAoDQ1cSRC2PuqEQJGlBBg==","signatures":[{"sig":"MEQCIGoA1de87lUaFgMYQO6M31GSBowdvSJUcfMWYmZjl9WbAiBz4e7nYoJs/y8Eg/7vOVFT5uf6fpzxdgjqPpswdYAcLA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230473,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDR2bCRA9TVsSAnZWagAAMmIP/iCQEezryq1P/10oM7l/\nQvh6jsYykBh9vZvXDvExS8TPKO49HZojjwFNBraqmJJSjQKgxIIB939N7EQw\n5Swfp9dUEMx71YaiigGF9r3pwQ15R+sN+HJPnTKEXIXvoTlutmTY1TDb1SGV\nhL+pviT97v9sUeT4NOphZ+eWkEzGepM/VM4No5O2w0KPFCsMu7cXFLC0UZPQ\n9DEHY+zAtpwJ9J0oSpQO4ci4cj7cp+6pKHGNxSzZPbkHwT9F8pCjM0CXx2O9\nnHs/HQhD99BIGyrmaQ45Q9lz2LOwIdFvtcPMZOfnfSYMM2yOvU7svHFugFCM\n3dbnPBp8U9gk7CMzDfR098vwQ+naW+1fovStECk/cLCzGPVTrJOMs6oknvnk\nuAHeyv/TI6THT+VyIphzlZu1R/NodGTkjV9oTOl4KodIfCIJ7nVm5mNlR2Ym\nlYvbKQWcLdrtbftq8Yzberd48DOYa3tgj7HKAZOZL/Op8jnElpK+M1gApkBa\nUOJ/TYyrAVhOXhPv4IItUKj9unTUn0ixT+zW41agKvOoEc0oNuj5SydsB5HZ\nUC88UQPNL+zWxtf3YEUYQh/cfgcFTzS0Oe3L9n1CeBYUi+j9JO9kvFMA49IC\no8a7MXMeANuxSynGSXQF8TH5VV7yLkiHEmbEadcal+GUpD0b/jhY6UjS1MAp\nwKmg\r\n=ogTt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"b69ff35e90a33d20a0154dcd326f1467dfd39e2a","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"_nodeVersion":"14.17.4","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"^0.24.1-alpha.5+b69ff35e","@opentelemetry/resources":"^0.24.1-alpha.5+b69ff35e","@opentelemetry/semantic-conventions":"^0.24.1-alpha.5+b69ff35e"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.9","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_0.24.1-alpha.5_1628249499147_0.1555991669652872","host":"s3://npm-registry-packages"}},"0.24.1-alpha.7":{"name":"@opentelemetry/sdk-trace-base","version":"0.24.1-alpha.7","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@0.24.1-alpha.7","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"e1a60e391fdfaeb647b83318319f15e6b80fac73","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-0.24.1-alpha.7.tgz","fileCount":147,"integrity":"sha512-tenqp2xjKQqTxoO4+1S/VEDmdIJYIoWlOnCskibN86Am6UaSxryDtEaXzv4yVAoQJHF6c7QA308dgV45rAU4Ng==","signatures":[{"sig":"MEYCIQC0BMKRFFm4Xntj28BRWnEKOrdJMTRwty3ypoxV3T45+gIhAOyfi84y+2/dZdPwkzS8/GRgattYPgeoW6DoBy83c3eE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230473,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDouQCRA9TVsSAnZWagAAKWEP/1nv1RMnwNq8l2paxhGt\nMg2271/nrnAfCYD/H6+HSo/5I9AbLrHZKzN+QL+BDRC16OHnpCSEpjRqzuy3\nW8Gw38fSwWV5f72l5hs9pzSfqEpXGwobGlHLONHsrEnLgd6GIGNZhwNp/UjQ\nSEJ8Z93Fg/Yp5WwbsTuAHpiSaJ8IEHIlmTA15d93OJAZ8O1qOcAW2BszacIV\ngrWOzFtnuD29o36rQtO4Q8FMyTseCMfoxGqDcTXM9UweXq26A42QbPD2mx9W\nCaPNd5gA5RcA9KWI0pEM9SBtngmbVUA3wPh/T67eZ+xV5wUIxxc3zkz0Z8/2\n0XQDEG9Hd6vYFe2x9Sybj1bWCievDMMmrwjNCIMoBKCZJsBVLd0RsFSwb7/P\nYCxq7MmZhKAFkt7c5W2aUL9wOQEVlAmT7sxez5m6kgxNtxbC3kZn7+vEfEp6\nXPekhMdVHnIdeADWLEn1l1KWXghpE1eK0jUIzs4FNJzCBGvIRHBRVmVaglvH\nn1krQ+6kga6APLro4T+IwbrneSNMTKmmiKSVxW9dZAY0ECz9OWaDPvib8d7B\nSY8q0BHDcZCysnfwhMdmqDoGr0s0GPV2tvdhUv1k0fiFjd627uLh60TgwcH9\nic0sNdBBd2blhygx2TEtBXFurcnjScvNprRQCQQtgS6D7YOUVcAdQaIwAmgD\n3o9l\r\n=JzYM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"365d502eaa0ba1f9799998f050d36073e943032e","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"_nodeVersion":"14.17.4","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"^0.24.1-alpha.7+365d502e","@opentelemetry/resources":"^0.24.1-alpha.7+365d502e","@opentelemetry/semantic-conventions":"^0.24.1-alpha.7+365d502e"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.9","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_0.24.1-alpha.7_1628343184139_0.5476851490956296","host":"s3://npm-registry-packages"}},"0.24.1-alpha.9":{"name":"@opentelemetry/sdk-trace-base","version":"0.24.1-alpha.9","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@0.24.1-alpha.9","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"40822431d49ba09e480715241ce32a600ebbd2b5","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-0.24.1-alpha.9.tgz","fileCount":147,"integrity":"sha512-yU1c7NvvJMbNxlzL59OZ2mf1PYPcqNkxXcAL5D4UD04PfmS6d/NIVfzYmAs/leGhZukMiTofHn/KKw2RTs2cdA==","signatures":[{"sig":"MEUCICM6jKq78kih88ikV05KI25KywAyHyO6jp3PBZGmFbIqAiEA9UFwNt6nOazWH8/ZCGq8gGixg6P9FFMRuG3B8XiE62Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231300,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDpQ/CRA9TVsSAnZWagAAdfcP/RBEDRX9XNfxwhOEx3Xc\nZyDOEW/F9iWRJ6IMmUPB6xjThi6h3I8pdAeXqgRTCDEJdBLuT6Ja0dXJd26X\niBanP3KBWQAZubTDzSGlR31BLg2oeFPZvcuKHmfEHXCB7hyLCnI76WO/71P1\nL3lj60b3jw8/F0y9HKg0bKVhJSnCoNSTKIt5KcH9hLbOrPusRvWc8t9CRCfX\nAaHDlGz81M+AgIIr2ibMH8z5OrRK1U9Bd5lUD1V4pgxujH+tjeq27KXI//JX\npHtJlv/SbELg/0pU0JrqZKQpS5TfwV/L2Z8qWXQmDYMnxdYcUa+tjDOwo/zs\nFLIs4OecNpFpZAyEVeVzGMgbgcGgTOAGixZOzDGBqL7ZbOqKHn/njvA3WX70\nG/nZKBThXAl29+Kl2OHk5i0FfO4BDUZWN6KqpFX7zVnUJIlpVj/5DCDo7gc9\nOGCp8pNpN/kSqocaD8XeQ8U4CAoWUqQ5g2/fnLl4Mui191Rngtp7q8RiswIf\n2qAaWf1AJvRVr3nDycfrhw2FPU2sMgMSTHnWEVpS30mfkPwPaR68rkYQvzYx\na+eH7qvwXwnIBtUfb1Dal3njr8g34NfOp7rBUONHs6JFV07Jq/4IVLvkoGWI\nmZ0GqVIn8iqrAkfHef2fTPUQr+i89L6ItXiFdfrPXL29qpNwPd9CfdIfx8Qm\nbi/V\r\n=h0kW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"46a42a18570da8a0b2ae027c80018ebfb6c8096f","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"_nodeVersion":"14.17.4","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"^0.24.0","@opentelemetry/resources":"^0.24.0","@opentelemetry/semantic-conventions":"^0.24.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.9","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_0.24.1-alpha.9_1628345406996_0.3167053382863443","host":"s3://npm-registry-packages"}},"0.24.1-alpha.14":{"name":"@opentelemetry/sdk-trace-base","version":"0.24.1-alpha.14","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@0.24.1-alpha.14","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"b670fd695883a066d7783c43af630c5e6b13d558","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-0.24.1-alpha.14.tgz","fileCount":147,"integrity":"sha512-98OBTMreg/uqFobh5u3A95fILVzaRDsixo4YR/QwIbjslLjyXt2+iJgUOtMN9W4O62tp4eeedrGqnINpOwfZPQ==","signatures":[{"sig":"MEUCIQC0zLhhndrpHsprXHc/NlLTppr59Plb6Uj3PNUl7lgN5gIgMwFK/IGoPqqcXjXWMAdWJqAA5OtrmqWa/MKWdnqdFwE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhE+POCRA9TVsSAnZWagAAgpUP+gKVAuimNG145WYxTnlQ\n2aMnt4P8TqAKtSToIaJtUZLCkQypCs+CM8EtQcJfbwh4xgQFLdqGxA6D4gPp\ntQ22hVMQlp4TyM56aepWk50Egh1niZaJJG8fzbIwHhEOiP54mD+2yP6wGE9S\nBZZO7ytJBOg6jlGum7KnGvgqVTF+h4h6kK+4rxmH+/HpyOwZLk+JGsABQLQl\nrnpglO6QzMocf0uuEkcK/BVHMd6cD8MLOaJ/ZSFD1UdvaVE+pyk3xuoK+3/u\nTtoUmgYZxObBRNBbHuhNfKzQCULFzMElnFpAZWk3dYo6AG/P5+N2ARpCjfZJ\n0jHyeeElYdK3j6lL0mjfTmYNYs+4DlFjU+Yz6jQevjLSJaGopWnXTaekVZwq\nSx010v3QPh2nOTfGci7eFwuILNrHQRy8MWq30rw99li55z2Uoa68kWIbDPsn\nfsmhTh8k4VWFVF3TSWDEZuLBbU/n+vVhVRkLk56bXsxWZ7xQOSYWAOQGbjJS\nmztmVq/5jC+4WGeZM9Z3geCbo/QlJrUampC6L5izl+3PIXanbuOw/PYISJ5b\nteE1wjWbdqTfA+8zABiI506kR6ssXZHi3w6TPJA4x3Jq80vIFfmv5h6rF9Oo\nEW4xBx0fyxpOruWeY6YZNOc0uGXOZpR6FXXiAzaSr6l256cJ/6rVGpPNRevn\n0vgT\r\n=lqQF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"4553b29d4a04b5b7e4bf87cad64dc2fc8c740d8e","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"_nodeVersion":"14.17.4","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"^0.24.1-alpha.14+4553b29d","@opentelemetry/resources":"^0.24.1-alpha.14+4553b29d","@opentelemetry/semantic-conventions":"^0.24.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.9","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_0.24.1-alpha.14_1628693454833_0.767569219106649","host":"s3://npm-registry-packages"}},"0.24.1-alpha.18":{"name":"@opentelemetry/sdk-trace-base","version":"0.24.1-alpha.18","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@0.24.1-alpha.18","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"d06ff14f49cea7c13b31bc3553c1315d9c434a9b","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-0.24.1-alpha.18.tgz","fileCount":147,"integrity":"sha512-QE0ZqebO4BJpm611b0165kvR40LkHvTfps406bv/wDO7SNz/nMXIv2sUKhJBqGSRK+2/jUG0vMvpOkBK7HxRZQ==","signatures":[{"sig":"MEUCIFToWHfCxokuNtSvaj4t8JR3GTRFdGOLf1iy8g33VW1vAiEAlSReugAeVdszYsfnrs+VI2Dd5XxVT4++YH7PJZnUMyU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231319,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhF3vJCRA9TVsSAnZWagAAiRwP/1YNDd+IH2bLR2ut+boE\n6PAa/4KiFKMpw4j4Go89kGpTfOBz5nTZWQu4+A9omScvVvBY7XBpQLqRTyRl\n1fmS3lSPELQtMv+102sIcGkz8zvnow5tVg2HNUBMG2xLXDSjR7LX9ruoMKgY\nAqMTCjSRxvTey6s+N0PBrpGZio+7oaQQocDqxKitiLkMX8EiHtcieY1zAskC\nElrtb2hg2najiDB3U1LKehREnNpbgjT3MWAiIJDWpyaL4SCG0zl127ERZfNO\ngv3y8m3S2ndB3MrKghC5bQ0xxfMYjBWGfVh5zPZAjiRwMAjXyXVeLgiHioH/\nwKWwQcWqEAcFOh3z/S0Xkx/MDNXZL+yQCXtE7WOzxvb+GT9errzYPFMzyBUq\nG+wShRLftqrEGzbo36fCHULYXGEaxfm2TF6HF/wTyR8JsNsNSzX2szdvUnG2\noWNE1owerG13zMQPqQqNk0H4qZbvLXE8F4MWPCVdsaWuyxX1Lhll9eknbBq4\nx5RQxfBQNGrI1Iw2sR8wGkMO7liZRqLBkAa/FlO0M0/n5ODxqT9QMBPk/I+2\nlT/fg1k6BuO7I3rgVAAYPDqv7nHLD1hCKbZ9dnkonZPssHxtY5ZLedoYk/G6\nfCSklauAiAjmvvZvVDzvxLtaYOfNnF0O+dyi5va77RMaaLu5AjHmG3Zv+9TR\nBNgS\r\n=gw2o\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"bdb12daeb2e4ca3761d1411125f5d883471709ce","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"_nodeVersion":"14.17.4","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"^0.24.0","@opentelemetry/resources":"^0.24.1-alpha.18+bdb12dae","@opentelemetry/semantic-conventions":"^0.24.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.9","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_0.24.1-alpha.18_1628928969813_0.9380634139248278","host":"s3://npm-registry-packages"}},"0.24.1-alpha.20":{"name":"@opentelemetry/sdk-trace-base","version":"0.24.1-alpha.20","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@0.24.1-alpha.20","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"de349f8b90e4987906b14f064680403eefd73f40","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-0.24.1-alpha.20.tgz","fileCount":147,"integrity":"sha512-T4JgUpq3fRoHqL8RI6vghZ0Rf8Yusm7y5j+ZeS4gKq31KedB2AzZBNK6jRWprJc22IJ5/YP+0HTBA17euvlkCg==","signatures":[{"sig":"MEYCIQCVUqO1X93DZhqXTmIXc+aU8CiF0cDSHzoHjXz/1VsyRwIhAKBtjWBbfY4bKko6tzQDg1dDWc6N9gZQ7wecvsRn4PAO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHCT7CRA9TVsSAnZWagAAL38P/RXZXrIkyb9DVgqFbcRH\nzNfnDhVtGTMNJbgXkZdVATXsWy4X6IAiKKZEc7rYIRjaYslOKdYyB5lgqTty\n8BL1J1LNRIXu2H/X/qviyGcV1P0+M1otFZ1v/edn8qCbO8iWjLHJ23Guweb8\nxQfkKeZEETeL13KzxZhm6Gy328e3o0Bd5fZBnyZ9jG0vWesS1HBkjHqBxLKd\ng0qADSfgPtSSlJxKweLGqrqQBKjHpZtBmOKJdXLgLHKEsSfPxgl8Si5tHRPa\nvLX8zYVDFCk8rryu5fqLpWe5d2o0RQRzWnVcw3FA56CZBxUpvNR3WlgFOgil\nWntcmJoGH1uUwWq3d6VqIPfVrapMiQknmGI3+HgzjzWFIphGaScawwnOjIVl\nWlXYR7CECUSrGqa1jwtspbfNO0SfIg922CBxWsC6iysJLsyfa6ziPyzwjJRB\nqnmc/bYyIpbEYiQ+4dOT1TJIK8ewtRJcTAVcDwl9/VSsn+GZ76/NdZldD+/p\n/tg8WZfPfp4cBjLhwBoBZ+a+rJ1naB64wc66J7aIfM2eRpUY0TexCGYx4USz\nzON5xTVvqlzpqvJKU+K+HctdzBsv0wxYs4/kQ4suR0NqfFVvpB2BZIe9KzH0\n/f4U9smqyocc0yHybZxG6HbF2HsbRR0vn+Yn1iQdieh8g16Wljk1vtq+QhDL\n6rYy\r\n=9wQp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"f12913899ff5c588e10830e5ba7183d9115c3442","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"_nodeVersion":"14.17.4","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"^0.24.1-alpha.20+f1291389","@opentelemetry/resources":"^0.24.1-alpha.20+f1291389","@opentelemetry/semantic-conventions":"^0.24.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.9","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_0.24.1-alpha.20_1629234427062_0.7964990125133731","host":"s3://npm-registry-packages"}},"0.25.1-alpha.21":{"name":"@opentelemetry/sdk-trace-base","version":"0.25.1-alpha.21","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@0.25.1-alpha.21","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"90130b88074239b003905ee68653a8a62aad8ca2","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-0.25.1-alpha.21.tgz","fileCount":147,"integrity":"sha512-W44WsBbrmkNKzHlbrjnoHlE8JLl419V5Vdhave+IJ6AmAdmsZQi7i99DgfcVVCyPiXDEXRGT1D6VI6d6MaRWHA==","signatures":[{"sig":"MEYCIQDNiLqpu8u+Cs1lTRYS6RSu8slzRafP58p5LM6Nx3wOzQIhAMhg8xKg2GTIQic/3j4xSjcKfJuZRhndoRhISTpOY7wh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231355,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHWqqCRA9TVsSAnZWagAAOAoP/R+kSqbk2lLBLgSfS4tM\nW3P+ESNSTUKhzNGPD7zvhtFXa6p4lzLLUk6q8AIviCtXfHg8FryZL/94r0Sg\n2o9+PEY2MoR8dOdMw95ywLXJa4UfaY1QUOFaMYCV5fGigEfhLZXlniauYVEW\n2LQb5dTdiTsXGW3FLdnqLYPAtsnE7NQ/aoaDrHGIAThtSMnv97VMpz5lKk/Z\nEeVWdzLQ/VZjxtxxbgrnk8VqcjYq0bz49PC2HdzqeSq1EOT7hShW9cZ/BIkf\nKkD5vZZA90fvgduG0as7yc+KwMVeqGTkTcecdykS/cflls0ptJ9UDOvTpYgZ\nrSggs9J5/TW6UE62HNYyiSzNbKFC94OX+SactQ0zRp72yJs74wpD4UpQut8c\nHoeqLsmrWh7Xtz5uvgwt4100uhW2FV15jkwinhMMK4IYcIV+iN0M9CiouKbt\nA9wD0dOMlvC3rifnF8fn5D0PYe69QkEli6gJxrsiRfzOAXoO52KutFcDsQPW\n12U6XfLNhdgoL9kahXgEa+g/8U8s4IUXVYztF3DqIKRMBkGhf1R8cOwL0lo1\nIGYp3BmpyF7NQ3IKmV4mn/4d/qjXu1AetYErAIjcktgs8tCgR2Uz0+6A0pCR\nh6Qc1ZOlinidoiuzlLem7VUIQsuP26zaD6xJgf8BWg1Oekjroy3+KuL2S/XT\nwnjN\r\n=ah+v\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"0ef1fc28d366b74d98b73b5d6334ffdc75342fe2","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"_nodeVersion":"14.17.4","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"^0.25.1-alpha.21+0ef1fc28","@opentelemetry/resources":"^0.25.1-alpha.21+0ef1fc28","@opentelemetry/semantic-conventions":"^0.25.1-alpha.21+0ef1fc28"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.9","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_0.25.1-alpha.21_1629317802400_0.8977428987171272","host":"s3://npm-registry-packages"}},"0.25.0":{"name":"@opentelemetry/sdk-trace-base","version":"0.25.0","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@0.25.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"4393903a7db8a5ae81a99c4a34121df67e4fdfbe","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-0.25.0.tgz","fileCount":147,"integrity":"sha512-TInkLSF/ThM3GNVM+9tgnCVjyNLnRxvAkG585Fhu0HNwaEtCTUwI0r7AvMRIREOreeRWttBG6kvT0LOKdo8yjw==","signatures":[{"sig":"MEYCIQCti4VKK/PEN3BO7Ga65nTpCQWZUAuemjlsTmlgLCCXYQIhANG5iAycgkYjQtzcEkRDDSLBlDon1b+0nKg68xzEpiov","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231280,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHXi+CRA9TVsSAnZWagAAZnQP/2uVRo0am5dw3Xuz6WG4\nQhlmd9qcn6htXQYGAPH7eJ6ctlEl0xtSXDbkCf0IL2RU62nAhac794wKLdfp\ned9yI5B9HghS5LdapNWxeOVJbUhlfHUo3GKMagps1CTkpuElW/bPbWPgK5JM\nuRbHCx9O0MdY1iSzQm6yMd38xjI8EzA6RSo8xg0Z4AkH8OwANCsNvblW28OG\n9UZe+iAWYKOo0bJbe0WB1zKb41YMAhKczKMvo+yoHFPfsuyZYErktOsfje10\nMHuO/LmcSClwrX49MyDmXT3OKb6p6/bKubCqNvYWWQx/jDTua4Hjmj8OgSXh\nziD8rNObdGCLAqltz/buPhb/B7N27f6jzjB5jNkm/LVmL9Ujfkvwth9vfqk5\nE9g/x/pjHvyTaAX42UtJov8hDy9iEaQUqKIaUoDa5URlgzpYXaV4Hz5Cahc7\n7JyUi7M5cDK535/rbEfXUErpstOmpvvv0ATPhZuqNBzAOkAViyuLRgjFEVqO\nSOLCL/DCmhwcO3KOIzJRH0Z0h5CojstFXbCKsA0E0uLNLAl1UnzgAPFEbt/2\nmlhjPRIThzYOFwJysMXAOaJNtjk4ZBSlXan0t1sxj2eQplG+1gxpin29yDfB\n8gEKMkW0V6IZ0PVMwN/b0PSHvcnuOPEg1A1WKvW09xe/h44ww6z+Tf2VfeAu\nV/HP\r\n=aFb+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"0ef1fc28d366b74d98b73b5d6334ffdc75342fe2","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry Tracing","directories":{},"_nodeVersion":"14.8.0","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"0.25.0","@opentelemetry/resources":"0.25.0","@opentelemetry/semantic-conventions":"0.25.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.9","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_0.25.0_1629321406548_0.048648051511765544","host":"s3://npm-registry-packages"}},"0.25.1-alpha.2":{"name":"@opentelemetry/sdk-trace-base","version":"0.25.1-alpha.2","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@0.25.1-alpha.2","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"4de3a67970ff6eadf12b06710f5ac77e6c407d89","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-0.25.1-alpha.2.tgz","fileCount":147,"integrity":"sha512-OhXgn/tsEtvxOVZ5SQXIAV3d6pFd5rMMTPRsUK8QTHsSBVSOsKALygTvcRwPQJlUdSdJkxGA6NfUg8pOx1OjHw==","signatures":[{"sig":"MEYCIQCR/JgLC31LcnbSaR3Sn6LRjqitnzJq1b7eT4nBZ/apcAIhANLoKitgEA5BztqHIcLVhrvML97Bk2baz8xORcry+cG/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJBX2CRA9TVsSAnZWagAAUUYP/1l0sLT+uC/JTj1TfINp\ndWHrPZhqeMMiEVARoPTILwDF2mZ6lWUn4OWe2m7waueZhQw1i9mlD6QKtNeA\nkps1z+L/WUHqlPzT2HKHG5JTi2OwkNfoO5lNoU9tpuvhd7t7/PWSg3O3S2rY\nBSPt+0pOne0mBD6uRi4yO9X4iasOS31QZJvNmkEdCBRy5K0yx2u1m7LzLzcA\nfrb49X5PJMsAywkJKEyExq0nbkcllod5fw36noniLe5uXiScWwrGohxWlnL2\nEzgRqYqcoWMZg6MRVoh3K/VwymhIyxfB/kailGv4dr6wU0dUpiBwVtBdADW8\nkoMx2LS/vDTva2sMp/W/4P5mt3Wqcy503X07N9V10vQolUvRR0hcoXV+OU41\neRbZVWdFWXo4Q5I4D3E5UTgIAloSlVNkanra66/p3nNWtTLakNcf9EfQRl/P\n34n5E8eTN3Wl0O8NiSimEVHexew26ac9aSEj74BuKBWEntPDQqGAWS5cg5/t\nzUCFSzDIjMNDlNRBH8bprcJKNWsG0V3ko9LsngyW8eA+CCwRhEOAcOqvdEwb\nfeBK3PC7TMNo4WuNufVgCm8ejH+yP9u7c3dTtU4Z60y/BGvvLdMZA9UMhABD\nFEUQ0lGoOVX2ALBNQh5KSMk/085WuGWj3dT5E83OKnVy1uD3mgslbdcNpj/Q\neOKC\r\n=tFMf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"78a78c093c2df24b66c47af4e037da9a6098fedb","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"_nodeVersion":"14.17.5","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"^0.25.1-alpha.2+78a78c09","@opentelemetry/resources":"^0.25.1-alpha.2+78a78c09","@opentelemetry/semantic-conventions":"^0.25.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.9","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_0.25.1-alpha.2_1629754870123_0.17987001772703892","host":"s3://npm-registry-packages"}},"0.25.1-alpha.4":{"name":"@opentelemetry/sdk-trace-base","version":"0.25.1-alpha.4","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@0.25.1-alpha.4","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"29ba973f0f357c64da5ece13e2565f2745500ef3","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-0.25.1-alpha.4.tgz","fileCount":147,"integrity":"sha512-xwUOlftFr1dN4Utp9Scu0+eDbQ9oEsQPJ5cUu6I5WW8wxURqV/d4f6UTL1bmTxm5x5FlS9ggQSVBiqHeWoAZEg==","signatures":[{"sig":"MEUCIDIO3X0Ip0Dqcxe7kAgyn4rie4xDhB062Pc/p6GnpywmAiEA0kK9ptzzM93v2jgnVtEt857r0cBWxnTxxDaE585k7vI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238837,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJUl9CRA9TVsSAnZWagAAsmQQAJp5bnBhFSjaYGNcLpjk\nB5rAh/7iqHO4cK/jNHYrlao+r6fp7rhFItt2PLoLrmuhl0TXEVAKbGp+GTIp\nf0Sz1A58zy+7dBlRK3X8VIYNpg+L0m+ujLNzk+DLbpSEHMLDXfhZ62DvYvpc\n0J6IPGhnTdrd/+HlHuhSzduClCAgmLsB/wZZo+GjR0nG52GKv2ZP/l5+ZAfN\n7FOiXgEp3xmYTyNrqfx6gRXpCXyjs4Ot4vAMf+DLsum0fkWtBvT8LyMJSuQs\nZHXEQGzbiBYCJELA7agamKBv5rxPIBYuELbDJXjDNwDL/pQDnB8xUTNoOjIL\nfG3B1m9bE2+6D8CZVI3ItfWmVZw9XhARocXZ6DYaQW9xuJ23ScSgN+CKUK2o\nyls8V5PwBadpJg59jQiAfOvWHCNPWSAGGttIXMbMfKTJ5v4iFv+sHHggS3h4\nvvmkvpUMPkBFHmlBMQLvQcqTuS+hffAylqelzHO445zEU3kDB7LfXy7v7Rx1\nH0zjn1cd0U1kkpGXrpIGW1czR5vChsVcDnUCmS8HzQmSU0+l42N8prjLPo73\nOHoHbGctUsX9j9IOhqIgc5GupPs6x4dJgzbYpQvtXygIra8kxl8bLlZLsJzy\n1CM+5GfaC8CeDreDh0/Y4fTutqMTV/s6ryMFupq43x+ONvyLU4Yf/e9O8bee\nn8f7\r\n=EjCd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"3cbd530f2ee5c06376210402eb87ec9e362853c5","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"_nodeVersion":"14.17.5","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"^0.25.1-alpha.4+3cbd530f","@opentelemetry/resources":"^0.25.1-alpha.4+3cbd530f","@opentelemetry/semantic-conventions":"^0.25.1-alpha.4+3cbd530f"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.11","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_0.25.1-alpha.4_1629833597428_0.24765430996019488","host":"s3://npm-registry-packages"}},"0.25.1-alpha.7":{"name":"@opentelemetry/sdk-trace-base","version":"0.25.1-alpha.7","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@0.25.1-alpha.7","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"2df18432d5a71f0e770a8f5bcc5c84eaf4c0c580","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-0.25.1-alpha.7.tgz","fileCount":147,"integrity":"sha512-3UrzA71WObun2L+NbrO6iJGQqSGnXqLKT04owUtWO1fVUVaYulTy45zu7caA4Y8GrO7BKiCglzICu8SfQ8bwxQ==","signatures":[{"sig":"MEUCIQCD4OSgZ7jj2n+j9BFZLCDxoe3drQp5qh+1CxEqKGC11QIgYQHLNxm/CR/1WEeJNhFs4v4oor/75XOXZdOmw0ln0oc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238786,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhKSzQCRA9TVsSAnZWagAAp5YP/jVVh5NPgHRzsGtznFca\no/xeMefN3jRoaXbhtbmQbLs14jL3/AuJ3yn0rSx2u62jFSchuEzGh9i13MBH\no4PrKBlzOwnvYtoDjlQ7ys1ACuusXh+ExTwiPO5X5bFnahDVXzfgTpjzK9GG\nb3bWA6O5DzmaX6UA/929snOdPssOBSFYCEBBWonwBmBBJ+IMEjSPy55RChHz\nw8GVt5A0IF5W2ZaLVdScdVuRCoPAZ6LRd8bpI/H5CnmFPxtfX1YW4zjZh89g\n3qWuXKGQM1wtsJT3oesgty/guyiCCrqmeS/fxbY0+L7F5FirWC6Aj0XsGy/j\n+iZYPl/Y41Oi4EixjREKMm/S4lckyMY0gv3EhBMrkg3jGBRZAYIMR3JKW9pN\n9VTGNpG3Fd32ZyViRXtDcfxMUr2P4+yaxHRm6ERFwtTeFuBTgEXWyHMsSWIc\nONmZ1iFb2gvRPh6E9UVpnf3mSjujXIBRzgyjAXNuStbeIXO9MZI+R57Q2PsN\n+vYY1qtHv2/ygw/2Wu985Ky1L0kqOKQwZ1HnX8hvvn0Dd5cPSUlHtA8Oi2HM\n+H+Jiz85aeXsHuFb2beINmoV3g4IO1HKsfrYXxRZOskLHD1BJ4SIZQ+ohhQV\ns+NIaNtRmCLgm81Kila2zo7sstnpVc/Dmv+EqS7KUjYFZFvqSk2RDvKexuIV\nHV7m\r\n=bXAb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"dfb597def863b15b37b24d965018e8c92d2ee70c","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"_nodeVersion":"14.17.5","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"^0.25.0","@opentelemetry/resources":"^0.25.0","@opentelemetry/semantic-conventions":"^0.25.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.11","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_0.25.1-alpha.7_1630088400146_0.9518154290635452","host":"s3://npm-registry-packages"}},"0.25.1-alpha.12":{"name":"@opentelemetry/sdk-trace-base","version":"0.25.1-alpha.12","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@0.25.1-alpha.12","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"690d9c2a6996aa8750fd0337ef74b5e30153e965","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-0.25.1-alpha.12.tgz","fileCount":147,"integrity":"sha512-L/bR58bGua4XoVFuBzOmh91UGrM5rhPF8n6LiWPe41EWJv4qyXAJGaCSAJvGjgM+QhKq10ovLIP3MBQnagZEcQ==","signatures":[{"sig":"MEUCIDcQU49VPQ2p1OxrCZnRJRihRmBNOGV76F9zIkvMPDmzAiEAnWJ1gaHQf3MPAi0itikgidfssSjLWuLlL6naPsd085s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238817,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLT3xCRA9TVsSAnZWagAAfm8P/iVFL3CAczgQ4gh3XANX\nxkvZ72MAb69BWMUzzZcUXgHg7h7mJtwFP6AiZtXjwqUt38mVicSTqAjkMxj3\n0v5KbSYCmj/TygAvdFjeGtUnohA+aTx+44GA4LGYMh7yCXwg05hM8kuL/Af1\nZO3PbVkW+zzM+BIoO2rrv2DR+gm8TMhQmT2842k1D8+IbgB98cKpBf7a5qVv\nmPM6fWCVa4WooTwOlJdBeMzfj44yNhhFdvEzOt8asaHtF+EiSzmm9fPi9woT\n1ALWnpy9V4fp21wcNNvbDzfoHqb7A/OTlu+MMntLFmEOzs18HPOL+AFJrpKu\nL+eP0trSPZJF+cMdlwmkxui3J/glPGAg6KEIjJnw2lz5H0w++6nbt91WXeWy\nPeof54TJ6zjjivE+Lukl1s/DcrHWh1oUaPbmvZesasB2AiEw2CeN9waFHSAt\nlSM0Z5W0d6PYzr0OxtTCzVgCQiEG3i5p9sWuBdDktdC/e1fYX8at9KB2amfw\nTHuadJ9LDZpsDPann/BpXw0KdYLPNMecKTwfLAoF91RXCoSJ9lRlGB+6LiX6\nrotDmt5uEpKWS9QkhfOaOZTnNErdWPKfbk8B+ZhdYQ/ACCbDBbHeB04iL7vZ\nNvAH0OQwIR0XmbPuxgaNSqgnuSyPDm2RVp9y86ZgliuEZu/Rv1bBUi/abbS8\nNuqF\r\n=egTX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"7d2c4aaeb08e6c680f8b46cefcdfe955d7abe4b2","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","test:browser":"nyc karma start --single-run"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"_nodeVersion":"14.17.5","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"^0.25.1-alpha.12+7d2c4aae","@opentelemetry/resources":"^0.25.1-alpha.12+7d2c4aae","@opentelemetry/semantic-conventions":"^0.25.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.11","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_0.25.1-alpha.12_1630354928769_0.21178081484243938","host":"s3://npm-registry-packages"}},"0.25.1-alpha.13":{"name":"@opentelemetry/sdk-trace-base","version":"0.25.1-alpha.13","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@0.25.1-alpha.13","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"df007e5f5653f164069be102c6bcdb5ced6669c1","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-0.25.1-alpha.13.tgz","fileCount":147,"integrity":"sha512-7PotUD3giX/eHFbNvp5UJaQ+YqZ0u3SyLneG7YKk9uyp3YYlU7UFfcBfh3x0z22FPdMArJBefZEHymbKTy3DRA==","signatures":[{"sig":"MEUCIQCpK5kc70OjUqwOaLJEQ20suyEP78oq1igPUb6imueg/wIgeJOCs8SP/YX3PR6BgVbVriWZkIC84r5jJDE1x7uWqN4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLUJ6CRA9TVsSAnZWagAAnOMP/RLKjP8Dx0ueknV/3Hx9\naaZtc6QtAxqzRoSLIp09C9EHhbXHEu/VdCFKYnfWmqdhraU90m+RDULLepmN\ntXFJr/sK3hSE6rhgjPxsaZ+mPhE/FxBvfF4K/TPRFOVrdprNasw0KM5CjVFW\n+oM0rbgasDZk9h/ir030Fw5XxzxMFdWFGhOFV7TITIngA2l3aMQwdRWmm5Zx\nP2jiYTBw+JDkBO2wrB3c4nfQmuheKlvHx7trAmmBDktgKluMLsMMYagYlwt9\nqf+AArAUBn+R8NEcBoT14rtl+h8kfKeatJ2BOzgidACkDcSEAiKG/UhU08nn\n6XyFbVLBqb4pfLWN8jeu2WR1CFPvOtfppmV0fOPDPfSnDhnyXP+FpKKo32Bf\nCk7yhyCqGHmSfYD9EDCMed+9UEjTHY5dDjPOPO7z5nJIFgo+Fs9ax5HtNh9U\nnQQOzpKQlwWmrVOheENybm9slkFaQLvGzziZNGZMG62/X/D+fvRUCK/V8vo5\nz94icTsRxCZ4pSbIIb9+Bj9lh4Bx23DuUO+UaMma0FhVImsOhjWY1aCEiV3B\n+hAtC13RON4qT7pqqtrG/5rIKEET53U0gdoggJaV6aiULeoQD5LNWv7SOiEE\nEnnBXPqScP2/n3TtwzoupT2PumMmTFBPKyqel6htr1JhhoJPW5gA/Itq1eTR\npQRk\r\n=wdjK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"f0caa22ffcb26af2a2f05260f138a494e120a955","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-filtered-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"_nodeVersion":"14.17.5","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"^0.25.1-alpha.13+f0caa22f","@opentelemetry/resources":"^0.25.1-alpha.13+f0caa22f","@opentelemetry/semantic-conventions":"^0.25.1-alpha.13+f0caa22f"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.11","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_0.25.1-alpha.13_1630356089912_0.49133518504216656","host":"s3://npm-registry-packages"}},"0.25.1-alpha.16":{"name":"@opentelemetry/sdk-trace-base","version":"0.25.1-alpha.16","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@0.25.1-alpha.16","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"3e59bd15213c7ed7a95407ac657190df9013f2bb","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-0.25.1-alpha.16.tgz","fileCount":147,"integrity":"sha512-xYPEm9jw1p9+Y7SPAHDcWIC6t4sewzOxfu5DqMxZE+Ze0MnQMatwCOvdO2EPMy3wkeFY7NJJjxlavVpzXCAVMw==","signatures":[{"sig":"MEUCIQDFwR8aIHNvMiRyvUYQQVlvKKFGnsfwCD+oVEztecBHbwIgFogvaGvTP+WztOJIkbiQukLk4FTcPJXQmxX1hSpbDNw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239036,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMyi2CRA9TVsSAnZWagAAVkoP/iuad8ncSZJBEpyUK+Sy\nKYe4lSKqs2mQNAW//AUNRGAWbY95PLIliKCZvserpg1TQlcNJGou2aVsNiaA\nARU5FnQXb3VNgrVBlYGcbyJWmlZ8kGwwxFigb/q9vV6TmLdKUtaOBD+9eGOD\nnz3+5LXPV62uLGGs9L1eX6WgqAlEJRab0IsVGoSN6hqLu+8GnO1cE0zzuc6j\nlDces+kFs6UuYbADMSjnRmac70xkMDuDYWYBycW8Vu/LttXVklSemCtERjgL\nwjU5SIEqyGLmGyp5+YMvO4R31FYThwG2Vxumj10HocJoWi2nEHys+Hhu6fSL\nr6imKBDFxzAXNPtKm8dWpAtPYbSYr7w5D3lPmln45PRdoPXqqD5lR25ywGYp\nXZMi1UaQP/eWZ6kXFsWHwy+VyZT2aX/51BOHFYxlqhtlEFX4aGb4qwEzzP3/\nFnKltC+lEHykB/hSGiMjuXBcnqo47PDpIPSBNKtqZ/K+vnuDr9jAh/lBFdgk\nzNaE1ut507pNckfk77+QVnqyTH+abHmQZkjBUqPEY7Ljuq6IzGiQvPXmR9yq\nM1acS9Kbj2qxlmN8TmXRm0MD+Ncy7Ymayk4E5bkw6CI/mwLF6Ao7LsLGNWbJ\nvk8tOt3HCBm0z12FzQiEAZSZQMcb7ylznYMfNOFE71N4F+OhCP9cbjG4jfNE\nMw6a\r\n=sEuG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"63f6701081e3e4a7eb964bb82cbd8cbc2eaad347","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-filtered-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"_nodeVersion":"14.17.6","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"^0.25.0","@opentelemetry/resources":"^0.25.0","@opentelemetry/semantic-conventions":"^0.25.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.11","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_0.25.1-alpha.16_1630742710731_0.6843385580327839","host":"s3://npm-registry-packages"}},"0.25.1-alpha.23":{"name":"@opentelemetry/sdk-trace-base","version":"0.25.1-alpha.23","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@0.25.1-alpha.23","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"678ad69cfe2826f4f497f1fe0484576db5d23e88","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-0.25.1-alpha.23.tgz","fileCount":147,"integrity":"sha512-+nwTWJZoNWoc+zAE4yS+U9q1+qGD3sJGP3qUW9CmObVVW15ySP1tl3BDHiBFcB7ILQAhx/ObeS+pWZN9CL5JTw==","signatures":[{"sig":"MEUCIQCOW2HsF3Q8kw7GWYO+2Xm8AjoSiyYLsaMgzRUUWwVPNwIgFKJkmK5rUEfZxZM+R7Xg991DAuwoJWytg4sPsNJE6iQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244906,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOTXwCRA9TVsSAnZWagAAt4gQAJ4KGXGYny0wx+AEs5o+\nhpOUqvkyxY0FZBmS/XlF6Rx1MnH3zubA4925uZcK2giaQOMn3Ap5k3UkeDjP\nxT+btSm5hZvjnEjFBhA1zAo4Z1Vz2hqdj6Bc85RU5mUCFDNV8w899h8Xj/F/\nhwSLJwuPEL/MnwptLXf9NEvy9S+nMNy02gt7sbf/fK5dogJXxHAuZXkoHQst\nRl5U0pYESJtFCStYitzP9/vdsxjIv3pbPohrFxym1ifRKi7Is/YZf7Ege81R\nTLGX9aMH70AQnR75LwvPq2ApxQ2F2xbwDOhE6gbVKH+8F8jLBm7S5OBMzEwp\n6/vepagI7gU9xQRu+4j6XbYurnJf2ZmnulOFmARz98hEyWAvtEd9zN0E8zVP\nMjPO89/UVixzYUbXJz5e9EUP60/CoT8ETl4eHF3mmX0/FXmde0xG6KNKEI+u\nd950FsxHQg+WBfcC02eaNsjyYvavO+zxtAIkehnFOfXe1Mgb1/KdTKUhsm6d\nkKR2loyRyLVYxPYCq1YEq/a/NJCJZPofYqJ7nJA/0Y6gpgwKG1rXzPN1kcNQ\n2bZYQDwSCmAsVmBYFCb1fRTzM6w7v3a8/vFKcv4Mf+fZoaW8YrKlxm58lXqL\nOsdPIpiiH6ACsk4JvHTPCxoI+CpDwxCPDl7uu59VdF9ZgIv2M8RJr6EwQFKR\nBa93\r\n=b4/p\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"feea5167c15c41f0aeedc60959e36c18315c7ede","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-filtered-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.6+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"_nodeVersion":"14.17.6","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"^0.25.1-alpha.23+feea5167","@opentelemetry/resources":"^0.25.1-alpha.23+feea5167","@opentelemetry/semantic-conventions":"^0.25.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.11","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_0.25.1-alpha.23_1631139312167_0.5525742629314336","host":"s3://npm-registry-packages"}},"0.26.0":{"name":"@opentelemetry/sdk-trace-base","version":"0.26.0","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@0.26.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"9f8a0b7e290d63eee67c5a5be921ed21d293c70c","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-0.26.0.tgz","fileCount":147,"integrity":"sha512-SqV5pccxJTekOXdE1jp5VWxZ7GYw8rrHy7g0LcxLzn+D8YJ9ZBhE481VrP9EsjyLlJRhicv+z2g1XFxpMkQdmA==","signatures":[{"sig":"MEYCIQDSU95sy8kG+hL60kiMOWHMrqvjMCzH1W9eKUABO3bf7wIhALdpLXNwZ59gj3Dz+YO1EUu6ZL6nTEr5VqN09jbTbkrV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244852},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"fa2e897587a2441205fd085772d80a0a225ee78e","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-filtered-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry Tracing","directories":{},"_nodeVersion":"14.8.0","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"0.26.0","@opentelemetry/resources":"0.26.0","@opentelemetry/semantic-conventions":"0.26.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.11","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_0.26.0_1633005332268_0.16476052719806322","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@opentelemetry/sdk-trace-base","version":"1.0.0","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.0.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"f025d517fa2386ed2ccd534dfafa894ae323dc2e","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.0.0.tgz","fileCount":147,"integrity":"sha512-/rXoyQlDlJTJ4SOVAbP0Gpj89B8oZ2hJApYG2Dq5klkgFAtDifN8271TIzwtM8/ET8HUhgx9eyoUJi42LhIesg==","signatures":[{"sig":"MEYCIQD0Zq61lp2goYcIDSNYrkSWaH2vcZkgym51d8Qv0RnyegIhAIP2T7OO8FtZ4nr9eNSN4CCmgB6oUCf+qdYOyzGHX0Cy","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244844},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"69b925d142a4405c7c6bec7deadd8b4e96c7d5d6","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-filtered-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry Tracing","directories":{},"_nodeVersion":"14.8.0","dependencies":{"lodash.merge":"^4.6.2","@opentelemetry/core":"1.0.0","@opentelemetry/resources":"1.0.0","@opentelemetry/semantic-conventions":"1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"5.2.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.11","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","karma-webpack":"4.0.2","@opentelemetry/api":"^1.0.2","@types/webpack-env":"1.16.2","@types/lodash.merge":"4.6.6","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.0.0_1633035223758_0.4156184977353712","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@opentelemetry/sdk-trace-base","version":"1.0.1","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.0.1","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"b88c72ac768eed58baab41552ce9070c57d5b7bf","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.0.1.tgz","fileCount":147,"integrity":"sha512-JVSAepTpW7dnqfV7XFN0zHj1jXGNd5OcvIGQl76buogqffdgJdgJWQNrOuUJaus56zrOtlzqFH+YtMA9RGEg8w==","signatures":[{"sig":"MEYCIQCC9fuVQZArSWRg+N89DDvJIHnMbymcyIIBAUzJymYEJAIhAKK+sjb0Wu3J5VvFZC39vqGlZ+/poFxV7Xoruc1qW6dd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":375519,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2UqlCRA9TVsSAnZWagAAatQP/iWXTWUBoGG4nIFmKkxS\n20Y1VIKi5N3udvMq+gwnTxYXD0sTjV01spACjY86atMx6ZHRn/0CfjaziMkU\nE4VdMnWOceoQlSzqWDLa9NNlAhmH6GV/+c36C9uhoVL8SDemHpX2wvIwv2cI\nyLCc5bdR82lnLePoFRAc34V/7jJHW3ryIbCe4eH/8Y23lNDaL1ofKXitYjfv\n1yOlvTK65xJsdQ+8CmBBQfdMqqpaw7ahrH6CxgXj//9Z3egZN7qiAhTjJWK9\n5midnB313D3jiaS2OKkb/MFrIfIuOpcL9Bd1TciKOTbDTlkFjgL/EpQ1MGSA\nAQJohsQeOYqvFIuouG+56qRqS094kMgvVYkQXLqTVHRvzxptc7Ai1H1YdKCh\nHEdWBIHzM/zdp/wKMDz1IjNrRefK24/yfWxv1YYPoCnPEQ2ZGHmfgMX4UiNH\nLiaVp8rVT6Lnl3hALEuJZrRP1Rxl0lbfPFb/ZxWv457LRJ2jsX58MsTrSScO\n0id/wDTYJcuzzX/auxRzTTfZy/vQtjQyy48tlAZbnJ8/EnTpNU+2whsWsSYR\nfUS8AeW4L5gXw1rfqJiz76QPND0ea7oa3eiiaXCqOHAvcalMzeYfdR/Eye8D\nCSky571jLOzqrHOaFsude/F9jvXgGEMUtqRbKafWNxmkjaFF6FXqyucYcLgh\nlZOZ\r\n=aKC/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"9cf402ee4231ee1446884b5f59958ceafc1b5188","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-filtered-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Tracing","directories":{},"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.0.1","@opentelemetry/resources":"1.0.1","@opentelemetry/semantic-conventions":"1.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.7","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.3.5","@types/node":"14.17.11","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.2","karma-webpack":"4.0.2","@opentelemetry/api":"~1.0.3","@types/webpack-env":"1.16.2","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.0.1_1636642284812_0.1678333829919234","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@opentelemetry/sdk-trace-base","version":"1.1.0","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.1.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"78833810991679a634f440aa3055b22fab9c033e","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.1.0.tgz","fileCount":75,"integrity":"sha512-L8WTUKVG+E3IVTTJ0FoDo5YwsEkSOGMFOCBJKFH8O7uV1bFny52ASyWaNrhhl5kRPGlkHtsUnWkgnQm9Ne3lRA==","signatures":[{"sig":"MEYCIQCxrsqZRfunV5YR0FGHmGWA6ok09L/bkBxVJhAyHioH2QIhAM4ZoSV///YZjO2/7AZIhJOQmcwMrLNQo/dE+EgbnRA9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":194582,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiND6VACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrXIQ/9FtTOkR2g4MFiDgnehThC4HE6EDI3YhK5hVSeDlu8a5kEC/Dr\r\nfaNCFDev7W7G07hhnRYf6OaYMXtZHAMSJ3mjIUIJ8HE/R898GPYZi5udmgxY\r\ngPzF0B3GIKNT6fFTnvKQ+auoQUxfa96V5teMUAXWgWvQkgAAcPgtETbG4BlS\r\nGwuXmfxovxsYyI61VvNz3yUNA9MybAGN49Sv7RW13aA95ENT8nnQwBVRHRc+\r\nEViVyVe7cDHJvxvDuGOPcmtqxGTP6Q9JRq81K4VI1P3GQsS8vCWEND0gEE1q\r\nUJkU6QNwO7QuEsOMFklhS/bLruc7kvUpwr2y9+2lp+fHpCVPF1zLzMzyV8+9\r\nzemMXzG/afyRFAjwpYk1VLhRXL+dbwL+hFn31TrwBI+NqkFvB4Bndm/D7IsM\r\n8xNJZm/CsguwKj4oq2fJcCWpGxKZPw1u0a2RoqXabWoF8OoRE+b8DM8e79w0\r\n+ol/VgyOfBL8B8td7RuxN/xzIwCepSMZ5A7RWdkmhDJmHtdOxhtH8xDcekqq\r\n/1PEhvJeqBnqEvV2H0S9zCAZrAHPoVjJSSwPaDSc9guJeeKYSIg6wWcOrQzU\r\nYXU1Thvv4hILbfUK0tc3mdp9MDVSrMxbHnyRjV0B3Yyh/YUYWUddZ6T/imBP\r\ndjQxrAeNtrmBbkWmtXsflLikHSPU30Mqzgo=\r\n=scwK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"f384303ac469914d0dbafde0758ccdae473f336e","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Tracing","directories":{},"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.1.0","@opentelemetry/resources":"1.1.0","@opentelemetry/semantic-conventions":"1.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.4.4","@types/node":"14.17.33","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.6","karma-webpack":"4.0.2","@opentelemetry/api":"~1.1.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.1.0 <1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.1.0_1647591061708_0.7080112200023543","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"@opentelemetry/sdk-trace-base","version":"1.1.1","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.1.1","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"2277e44a8b90815bb3c23515cae9de57ce902595","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.1.1.tgz","fileCount":219,"integrity":"sha512-nj5kFly/d6V2UXZNi3jCaRBw44/7Z91xH0PcemXJTO3B6gyMx8zIHXdnECxrTVR1pglDWYCGs84uXPavu5SULw==","signatures":[{"sig":"MEUCIQDXcQWtqYJJV5tMuOB7wmN/al1uzJBLOH5LbMyGcrtHPwIgMBptxEBJsLebjv3XbdtlJ1TDGW/M5LwieOF/Xd6rpUE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":552814,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiOij/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpaKA//T0QbIUoelYuNPxDaBDM0ieilM+eh5Nyy8dP3LRocnfOfGVo6\r\n1+zkp9C58SOO2k0uMNgJ8BcMgXxBd+zcS5W+/J33LCvbP2ZpCMBQrOGa6kny\r\ndV5FZRE73sUBCDkY+/81ehyOiXXLW46313zGCBgpX9p/HwivTjT16PNYrr6k\r\n3ZZiQmb9Tm68VnVLOENIqTspRHzjq7T8+9c3fmdLmiNdrhP6k3y0GE2vdg0P\r\noHNrGD2NQCARK1RLMJNF9a/8/hK6dNERoQKWydjV5y6fTV8HrIHsVLzrNvXs\r\n0YF1N8ZJgHUoqYsTdKQf92kr/j8sgMsUFxx3cku2t9qcQHffY5GxmPgn/fTE\r\n8bZZ7mPhmsf8aXih/F24cInMD/Eu8mKktpov+agemmD5RFEMTUWeDV481din\r\nFOUCRJUDTSserEa580XBRkUsdUr/Gb6dm9JB8mxGQwIWJ6ZUW2K+RqAb+FdR\r\nMCDShq+C8YSwhSIaTeCIJce8NX+ca9NtjUO1sIPqVNIuisyO6NOz0keeVKXH\r\nO0xRTz5l8Jog/Gehka1hwbtUtfcVswEyZg4SvVKWmcrb0HYVW+e4dClEBr1d\r\nAp2QgpnUaIhcVNwjuMkSrGqiTvA+ehBvWMPk6r2zi60fHImod/+0d462yI9D\r\n2rgR//laEPnSI8sHJx7q33Yi1s5qXMUqzaA=\r\n=2PCq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=8.0.0"},"gitHead":"b0f8a2d36e6d1d3090c3d2380608d2102c826e0b","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Tracing","directories":{},"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.1.1","@opentelemetry/resources":"1.1.1","@opentelemetry/semantic-conventions":"1.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.4.4","@types/node":"14.17.33","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.6","karma-webpack":"4.0.2","@opentelemetry/api":"~1.1.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.1.0 <1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.1.1_1647978750976_0.4451688237419007","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"@opentelemetry/sdk-trace-base","version":"1.2.0","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.2.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"aac5b79dbaced92a886fb2e348e54f5b681205ed","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.2.0.tgz","fileCount":219,"integrity":"sha512-eHrG9c9OhoDhUmMe63Qzgpcvlgxr2L7BFBbbj2DdZu3vGstayytTT6TDv6mz727lXBqR1HXMbqTGVafS07r3bg==","signatures":[{"sig":"MEQCIHxDeRJ1Y7SkEGT1p7MiTG4y2cOugUZZeZ+XhrikR+tTAiBWEgxMhwJy574hneXGgEi37Y37vhBQlNd/xvWTQr/SVw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":556102,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiYsI/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmonHBAAj44NYQVANyFTg3YLzIsIJhityCIuLvyhLfar3YpD7IkGrrhZ\r\nT9U/D2fN2wdSfoeD/Z7dGu89Y5/AmmPWWEEe1SV4aPY9u3mXwiS6E27zX5sg\r\nyLkIHYphlU1bDlq/FHYpp5v9ptK6SJa4epgNBFrBNfyQg2vT9EWyyB9W5jOH\r\nQ10w9oEg3DY9MtH06PPh+VLIJqslxHFFTaEC5nDIz/+yfqXjJb2F11G7TL2E\r\nSoisfBXai9rNnUebsTLc8r2J+mWwlcZWHThTZQkeBw0eAw7BWMPIaWWnbl6k\r\nzNS686ldebx1dhQjD2qkuUabqHh4EuJoMvl7KCCYgFjWmRhXv5q9zog5HpsL\r\nkDSCxnLVP4uEjnKcQ7tw2Vru6+7AejaanVDeUVkVmW9MCNCZgyFQrDvq/I6e\r\nnVLTjrh+nLY1b6ulsliiwi0uUglQl6rgX8ei3oe1C/+fKg0H5n4ysL0Wdkak\r\nlEnaryQ9b5Mu+HYOLC4leatb+Ob+Tzre+aspQ8E+I+TbFRPqEYwAk9qTC/27\r\nltLXlSNb3sCzJXIrPg/fRQXDmi3Mq+j5Et3Xr9XiifQLwq+odpd7bh7tJ468\r\nzEiU+7v17c4vB/sq1diy3DL4H+qIcwVTffl5PRDY2p2Mon66Nruumx7vgxnd\r\nCYcdeAhqcXuo2O6XPltblnFADHHs56BOMCo=\r\n=MSTB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=8.12.0"},"gitHead":"a0a670a03fd35b0799bee8cc466f79e93b5b6dd2","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Tracing","directories":{},"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.2.0","@opentelemetry/resources":"1.2.0","@opentelemetry/semantic-conventions":"1.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"8.0.0","ts-loader":"8.3.0","typescript":"4.4.4","@types/node":"14.17.33","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.6","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.2.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.2.0_1650639423630_0.5047606523204053","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"@opentelemetry/sdk-trace-base","version":"1.3.0","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.3.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"eebf6f553e49ceb309d346b8de7c9257686bbec3","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.3.0.tgz","fileCount":219,"integrity":"sha512-BkJEVdx46Boumgy0u6v+pm7spjOq7wCmClDFnHvQs8BS3xjmfwdiReoJFcSjo0cSlxkTJh6el8Or2l2nE3kArw==","signatures":[{"sig":"MEUCIGz/0H3rGWRaHX0jlcn+6uukc3qzgIuKUgwQEgJ/3hoqAiEAzMR9u54IyMmxnMYkD/aoKGBz0H1UhWhby2nzZXGtqFw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":556534,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJikSlkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpNxw/9HOqfRpUb4IKDqrn+hwiDh+sC4Nbwoz1NLjZVNN8lCqDA7Bt6\r\n7j+sgVk3xxbuTQAKxpIst+8vYkEbY3QiaYEU3Xs+inT92ky2J29s0NUE1u5j\r\n4G8g/vHIuAVb2q6KE1iWi+kTynYE+7LbO7Ao7nRfpqlorKVlMjIOQNCaiOAW\r\n6IwdU34TJXrT3Qya6Z/jWjFnC0e/gG+omiBOnv+UNemQqW5Psz60bRttRAQJ\r\nhY/9U7tgptiurrkCZbj4j5/DsBvLfJKuoXg0nE4jI1Nw5H0qIW0PP8ifZAtx\r\niyw9hoFAeOWb6eA6efQ/UJwXpXEBz/ViX5bIckA/QmDgZPIYrVT2/irowhYY\r\nR9/CAxkSu2UX6tz5lKmQZcYSCmpR2gIvtKV58MwAsH2g5SSkW2biqB0XdTtr\r\nAERTzqJtgrr/kKsSJXtGuBJQ6aRmIUSBGmQUHlU/mkfr+dMfCFxZvjGU5wwl\r\nTfIsifIGkVpytY4YUrQHDEiOA4FfbYNYIA5j8rQVhzcsXAe1kk3iL6+9wQsd\r\nDrI72fSs2KsxPjLhlEyu4LsLhJ51QPdDz9ml96zd2YzCuW1zUrYQ4cPiJuJU\r\nvN4LyaSB5VCMkgpgj9SmcIQsqB9X3JNBr/+2ajElF5HawwmI6NlzADfOQ4F9\r\nAozt+rNMEJKi4bnqab+pMfrux8B7nx3++Os=\r\n=7Hm/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=8.12.0"},"gitHead":"eda0b092db484855ded8b4837ba7fc19a377c5a7","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Tracing","directories":{},"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.3.0","@opentelemetry/resources":"1.3.0","@opentelemetry/semantic-conventions":"1.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"9.0.2","ts-loader":"8.3.0","typescript":"4.4.4","@types/node":"14.17.33","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.6","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.2.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.3.0_1653680484654_0.37952356793618636","host":"s3://npm-registry-packages"}},"1.3.1":{"name":"@opentelemetry/sdk-trace-base","version":"1.3.1","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.3.1","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"958083dbab928eefd17848959ac8810c787bec7f","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.3.1.tgz","fileCount":219,"integrity":"sha512-Or95QZ+9QyvAiwqj+K68z8bDDuyWF50c37w17D10GV1dWzg4Ezcectsu/GB61QcBxm3Y4br0EN5F5TpIFfFliQ==","signatures":[{"sig":"MEQCIALi65Rm/zKG8ZBolugN7azramCkJZwJFqjYpR2IuUmHAiAtSSXm3hpjXUpwcBWKdCGjLnayhLgb27nqMu3p74uF9Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":556534,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJinmLqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo1lhAAiUCOLc4qxk934XKQhQW8My+vNgqPeT/tMdJiJ63yEvtbTwQ+\r\n8elNZzkUfc9a2n04eOKZTpcZBdLmdz8kr/L7+SGXVA3pGGRmvOFp29YTVUQ3\r\nN+/Ub3SVTDyyA9vTIss7XlJYUXvWXp3mEDwfgS2i9VVj5gCYyC5zt/LjYP6s\r\ndnb3OlASri2XaZPDzh/QOhkT4HZUbqhnqGCSJc+8fU6IhyrL7mOnS+oX4o+U\r\nWG2Y0wvx9MlkDX4+QwJdrRlDcG7KZjdoSn6p3ORgy8/UJVAGGoUHI4yPDnFC\r\nu+tEpRgnuzKRvtsyywrWx0h0c+fBxV1cCIrHBxPsWK/TlypEv9WbuD17vdz+\r\n4Jm2ljTlDgZ+K4xnYqIV6GFTZosmUiRbhiX76cRGL0PWQAueUwaBBjHhkloY\r\n4lGbLKWxYFBQglSYwYk/QJg1Cn4hfeMspRY2BbG1MgEdCK8hkOVOhq3Cl7Ic\r\nLDBaZ/H5pH1RrWcK/OPRFuta0lqgt65FkEHl/Xkh55v+l4N5yIOJD28CxXvl\r\nsJFWeWX1xluXfMXmtat6qMBZleIvDjtmLpY4G1VzwR85IKWURJb3ePVg5bvy\r\naf/JYHg8yO4mYcfGx7PmvPIH/CJryVK/kIr+KJmH0M5DYDYPMJD6gQbrFPon\r\n2LSUFlqN+LkjbZPXM29ovaaeO24sXaCEvbI=\r\n=lwEL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=8.12.0"},"gitHead":"51afd54bd63e46d5d530266761144c7be2f6b3a7","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Tracing","directories":{},"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.3.1","@opentelemetry/resources":"1.3.1","@opentelemetry/semantic-conventions":"1.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"9.0.2","ts-loader":"8.3.0","typescript":"4.4.4","@types/node":"14.17.33","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.6","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.2.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.3.1_1654547177779_0.44314908261854846","host":"s3://npm-registry-packages"}},"1.4.0":{"name":"@opentelemetry/sdk-trace-base","version":"1.4.0","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.4.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"e54d09c1258cd53d3fe726053ed1cbda9d74f023","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.4.0.tgz","fileCount":219,"integrity":"sha512-l7EEjcOgYlKWK0hfxz4Jtkkk2DuGiqBDWmRZf7g2Is9RVneF1IgcrbYZTKGaVfBKA7lPuVtUiQ2qTv3R+dKJrw==","signatures":[{"sig":"MEYCIQCLqLk4sGs7ZlVm8eZVQO/gEw5B3TPiumDqB01dNJpsJgIhAI7a5bQFkGJly7Ar3CdIQul5vtwyWdO8IL4xekGMZz1g","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":557399,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixe1qACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpkJQ/9E4JUmYpvdZvT8BmFGBAigK7zC7aBNaV3+jZoUnZBtxnS5pv2\r\nqdydK5nhXffwCWeFMEqdI6Ab5vWmUQJsBWk3PsV2FqtVM1ivv3aWeWLlTFAO\r\nR1wmFQVk9kIBDGVz21klCFauyhbHbj0OdYYlFFCjfMPZ1pfOHjyqNbE3HMYr\r\ny9dxnK9yffCB0U4yfB5GnEj99xC1AvXSkBDm6UFQLfhfioW3iCMfUi4kWPKd\r\nEwrrRg2XgsrNi++xM2iK2tLu3cgcmRnAbo1CriwE40ffSqohVMs6nohicdi7\r\n4V/j+buJJO6gCm9sRnrdmhvvHy6cExNqaE+qF9nJn2phL7YS3bIzjtq1hQyg\r\nvpwIe4nE8mZ7a/2cDCsIGK9uIcvsvgwbkHbH93q1J/l5MasVu2xTTn30bVjX\r\n1T0L0TE8b7193vjf41eki3YGPDC8pgdjdyzE+fB1WQGyogOpcNacwVbz+AmI\r\nZ+9pyjvBhLcMrZByLl6oKtMjosiJi+IAuoUnDDHOQ7GSFOnGKshg9/trbv3r\r\nkQP98YJcnIwc7aKSBYF59C1lSjbLJenJ8Ni5koiipFUQbnz53NLrshMlXq2V\r\nD71MkIfw9MrK15S7W/1uHY46t1B09zkdUC7ILQXXk1/9hi23D4qAn0YwPqNb\r\nRv34ZtYPfb/XaA4b4W05tdN5FqAxmeMuUrY=\r\n=DRGf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"e39ab883b18636238ef0fd741df4ce5ed53e8d04","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Tracing","directories":{},"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.4.0","@opentelemetry/resources":"1.4.0","@opentelemetry/semantic-conventions":"1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"9.0.2","ts-loader":"8.3.0","typescript":"4.4.4","@types/node":"14.17.33","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.6","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.2.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.4.0_1657138538116_0.08054665516123172","host":"s3://npm-registry-packages"}},"1.5.0":{"name":"@opentelemetry/sdk-trace-base","version":"1.5.0","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.5.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"259439009fff5637e7a379ece7446ce5beb84b77","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.5.0.tgz","fileCount":219,"integrity":"sha512-6lx7YDf67HSQYuWnvq3XgSrWikDJLiGCbrpUP6UWJ5Z47HLcJvwZPRH+cQGJu1DFS3dT2cV3GpAR75/OofPNHQ==","signatures":[{"sig":"MEUCIQC1uiO4Uby5qJ5Q4RGt5KojX/NKiuQhrT6XzcGmN5YImAIgYNHGvd7qtO1rZ6/NgtNYF0j2DTITyPg1IWTufbasY3c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":561100,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi4FQAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrCfg//WNcotdRula30Z5YkzhkmwWHZyiBWnHIHOBEOgn36AolkGWE5\r\nM97A0rZ3cfW4DrbdCIjEaavWUjvHpAzER8ta+DiqigspFvT+ko8g5v0fMw2N\r\nbPOXkn0E0zVPCunYFPrcbiG8GEgETjvtPnOlofH6McdgXOyt5tUS/GEI4LwY\r\nObg5BzYs6hRc86X+aQvrLwCA9EroWzfLr4XbmeAkBE5ZEYq0bO/WTz3EujY8\r\nYxW8GnNaxJT70vYlczo5+6IGBASFg1bpALJyidUroNRHDRRQM/MQFZydXaKV\r\nWLEA/1fwTBEB6sfsKY+nzD0tMIRxpZzHvm+qqAO4wEnm8UVx5Y4Oe24baJaZ\r\nYw/Mpi3A8xj/5Glf4G6F0WAuKxEXfbNJ3/OUraE4IofrSKKvv/4JhNxOw+kA\r\nVKX+AnRCdBSPduR/xAyHMQke4Q3YCk50lwSLXYoZeo+VnEYPBe0/hgmFRqzK\r\ngXOsR9ZhxWJ65N3UuOiBYu69OlT31OTxlvDxDOd/SjSngpWeLFEbyq6NPxfF\r\nMkcsnYy6WSaythblJdUebz42u8CX//JSAfT40g2jidnniQgjE35EzrvgX6dp\r\nhB2UoTxrz44DD40jQLAivEMDxL9Sx+GZ1HafxBoxDnp5lgeRaj4r2IBNz4Lp\r\nhCXz5P1ZCR9Ut3YLnhqMRSfMZqvJDQnsD0E=\r\n=lvpO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"776656b6e0cd0fc49a52b734702bc77110e483f1","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Tracing","directories":{},"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.5.0","@opentelemetry/resources":"1.5.0","@opentelemetry/semantic-conventions":"1.5.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"9.0.2","ts-loader":"8.3.0","typescript":"4.4.4","@types/node":"14.17.33","karma-mocha":"2.0.1","@types/mocha":"8.2.3","@types/sinon":"10.0.6","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.2.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.5.0_1658868735873_0.36948937296896256","host":"s3://npm-registry-packages"}},"1.6.0":{"name":"@opentelemetry/sdk-trace-base","version":"1.6.0","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.6.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"8b1511c0b0f3e6015e345f5ed4a683adf03e3e3c","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.6.0.tgz","fileCount":291,"integrity":"sha512-yx/uuzHdT0QNRSEbCgXHc0GONk90uvaFcPGaNowIFSl85rTp4or4uIIMkG7R8ckj8xWjDSjsaztH6yQxoZrl5g==","signatures":[{"sig":"MEUCIFGZxkPPycUwga6941/1+5vsL0g57z0IOs9srY9QVTFgAiEA4/3DbZJ+xNNnMd1k9gRasfX+VKzueDJPWlXaDvb6TLY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":703237,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjBmODACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqCCA//UmDuN/9SBNkotpVIKMbNS/WfQYETlNXctdnZHBP88etrH+Ax\r\nQaM+cxOLvoO8VgneTZa2YcufJmZamgf0N5nnfUBABvNqOxDXfFlnXpgNR+S5\r\n6E1ldhx1sZ286kQqhQfrCSpENUdLxm3puzlJvnOzDrCUBqSAIL4vrE2pifuy\r\nngWrs2LCz+KBb0Oo9Zj+GvXOYKZaITZNVwR5y91aOzzyvhMj7aPumgWpwBOz\r\nnley7aO7CPXY8PyZ6FUUV/5YySSyLxtrGaUzTpwxkAmo8Rp9cB+xDyCKb5hd\r\n1XIZ53XH+XFUH9bK6LMW/NsANgcPvWT+gnXdK9OKg5orV3XEj7ftAWt/r9E4\r\nIWQsv1VO/k1aw4wikslDghIHd9DQGUq8f3qTbZDcIJhoSvfuUrIJWlE6zehv\r\nDWG4nGl9515eNnVvWFGuXLJUZPQPnZrCYS5ocD9viqOGj8Ix6Dp8yEkHA0vm\r\nNQttwwELXX03r0VeEQcFpxXwRzS7avmpRqDfedpl2TJrF/4Bo8TLBkBP1Ht6\r\nVFc408x3eSA3RvJ7gFdhvgqjqYLSLuVP1D/ps66pMi5SG7ykJ3Za05cBznbs\r\nJMp5L33qYYWHjAi2uOm/a0tVpmJMRO3QyLNF24Y4zbuV3apqsXk522MSWWPZ\r\nFsh1V6H5vRKAFEdP5XrBfq1qzaAkwPbw66k=\r\n=8qYD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"a5abee69119cc41d9d34f6beb5c1826eef1ac0dd","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/5.4.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Tracing","directories":{},"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.6.0","@opentelemetry/resources":"1.6.0","@opentelemetry/semantic-conventions":"1.6.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"10.0.0","sinon":"14.0.0","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"9.1.1","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.3.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.6.0_1661363075313_0.24925341140796742","host":"s3://npm-registry-packages"}},"1.7.0":{"name":"@opentelemetry/sdk-trace-base","version":"1.7.0","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.7.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"b498424e0c6340a9d80de63fd408c5c2130a60a5","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.7.0.tgz","fileCount":291,"integrity":"sha512-Iz84C+FVOskmauh9FNnj4+VrA+hG5o+tkMzXuoesvSfunVSioXib0syVFeNXwOm4+M5GdWCuW632LVjqEXStIg==","signatures":[{"sig":"MEQCICxQm5dNE2obRrewbmTbvDUPKjpEDqwe9DMSkjsL+ll7AiBBeL09XWESUAsZEFJqEb/czB9xRqxGSU7ZtYkIxFctxQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":710870,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJGjCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmprZg//eVXy8Y9itH7B5owMNIWDUAuuXFpw5t4j4E3Eqsa8PL4MlfLz\r\n3Q8FGv/gMVPNSxTK+Q5olSgI/Dp4d5KuWEzTBPtU2kSSZFQ2hgeMdeLR5zkG\r\n/R0kcPL8z+iFxMsA6eO7uImf5Y9frntttn/el5jfw87X+qjXjV2jwqKJmADa\r\ngQ0TtRLb34gP/LReTYaE6P9pZXAgldTSLku65ztF74lHvPE5Q7HvHs+75uw5\r\nsAKGbVsA5yedjXZ+v8eIE8WL7aQer9VvtkPRXVlFScvim0CCChn5+45seH7c\r\nU+PMzcc97Y4Rg7ntxFy/lcW3OKQaO5yl+gss/WEDx0o7xwlNkITbePhNH0Rv\r\npTBpdcMNeZk1ITbmG1ri8DgjHFJWL5O7pao4yfgyzuFkM4SUYujEZB/Thfek\r\n//fZv8H+t6Ms+MFMciOE++GJS+GVXVgyNXFUWIUWF1eMeO4Y285LygJv453J\r\nN7sld0hrMn4fItZW61Vmj/sRaQuIM8NLUjHTY1jkBFRE39nsrIkWxNJRqjcv\r\n9DQOlzhSAOFOY1EINpYJeW9EAIQkwZ/w0UOd+HPmVDm5bGbCnvqEpiyluj3c\r\nClZr/yjpFoMm9Mx+FwhLaZjW5IXJe1ek9QFDDP61tGWQviV6jNHq5RxjOwm9\r\nOJ2F819hWrl66GKa02rO+gqNugRkAJxpgjE=\r\n=3Nls\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"ad88c3d9aa0100fe259b93f4b660e84417b757ac","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/5.4.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Tracing","directories":{},"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.7.0","@opentelemetry/resources":"1.7.0","@opentelemetry/semantic-conventions":"1.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"10.0.0","sinon":"14.0.0","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"9.1.1","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.3.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.7.0_1663330497999_0.322341921882334","host":"s3://npm-registry-packages"}},"1.8.0":{"name":"@opentelemetry/sdk-trace-base","version":"1.8.0","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.8.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"70713aab90978a16dea188c8335209f857be7384","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.8.0.tgz","fileCount":291,"integrity":"sha512-iH41m0UTddnCKJzZx3M85vlhKzRcmT48pUeBbnzsGrq4nIay1oWVHKM5nhB5r8qRDGvd/n7f/YLCXClxwM0tvA==","signatures":[{"sig":"MEUCIGGgOVCWV9iMP+xpoW8qU84MMmAwLSfneZNUCzPnTNKKAiEAzWhHXdc3EDzlA7f34ajtUzAM95QQ/ampFalpD3c5vjw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":709861,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbANeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrSvw//ewghTwxojDN+0h1tzWihXLoVTgDtKteumUYoytRWe8RqPLl7\r\nKuzxG5g7KLwqsojCfHp250ofMUwTVR36RuHZTarjpaJ1z3gC/EbROPfsCy2K\r\nIdxiZJLS+5rycgn+P/rqH69Ghqy+O6E1qxAVWNZ3S4px3wGivliDbpj4YlaN\r\nBoTVTuk8THoeg6us5RmM4WMx2lJNIliMtbOF1spyFEL8jfWrhfQFcMGftFAQ\r\nXSSn5fJ0iFWYDkD7psF9MQ/iJW7nEG4Cn4ITjRt0cRgIMUtDRGPJKtY9IwUj\r\nAtZudNs7KQYrZiT3WvaerL4yq6d0iY6lbDXiTvtKof/bRt2xciCaF+5CG3M5\r\nV4JxKS0/YwilsMKebUF9Uz7m5Y/bKr20uMFNgdSSp0vDeReOlcbSOqm1JGf5\r\nH1G1PUnZ7rvuhuYA512plL6sieLNmyhTgktMSL3nMPP9+phj6BEIdWI0eLfV\r\n0xz97XYI+YgKqS2U35vh01qwgJMDcHy1v20e+IVEFi/f6bUUd9NwVJ8y0IXG\r\n3hUikhaCFADqQHDHzNp6mfdNRkJSGzc9zD4mNKBQ+Dg8xEWNQwDq2pjCiKfI\r\nSey6HSU4D39eLnxPV/sB7+NQ/wav1w0vtFUg2GWQl7yQmI/OOROiBfyKYBeW\r\neL4oPyD0Beldz9ejMY4gT8aX6Y+KGU6mc9g=\r\n=fY0q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"7972edf6659fb6e0d5928a5cf7a35f26683e168f","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/5.4.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Tracing","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.8.0","@opentelemetry/resources":"1.8.0","@opentelemetry/semantic-conventions":"1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"10.0.0","sinon":"14.0.0","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.4.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.4.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.8.0_1668023134059_0.3756471246154027","host":"s3://npm-registry-packages"}},"1.9.0":{"name":"@opentelemetry/sdk-trace-base","version":"1.9.0","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.9.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"07aad8d3b484f24e45ad6347f74a66d12d69bf00","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.9.0.tgz","fileCount":291,"integrity":"sha512-glNgtJjxAIrDku8DG5Xu3nBK25rT+hkyg7yuXh8RUurp/4BcsXjMyVqpyJvb2kg+lxAX73VJBhncRKGHn9t8QQ==","signatures":[{"sig":"MEUCIQCk148UUg3KdpJvI14wehqmYDos3NaYmQqsaz+40gEBvAIgbGW9IAjfLk1D9uLL1eXth9ZQpdSfqpmZsYm/mJOGug4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":720397,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvy41ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrHzw/+MRKqvOeTqf1fwQhfOP+OYxGNWn+/HFIV48ZraIw/eJnPNm9n\r\nrfPXgMjJwhMeRRR4veXg7NzMGhwDub7uMwjpxrFZzvWVLU5XHnuCu0boAGt1\r\nkWF4/KulBnxgOj/6hqJ/+M4/L4zoE+Pb4RlPe7lbqmIl56ZmfWhah28okgnC\r\nqNbR5vgAOAX1NEjrkA52kke1H/S+wTM+/D/IwaSTd9fReOauEEaGRX9M7eJf\r\ncMDSFpiwY3aqWgw8Qjc8XOOox0zi75avU56CjhN4P7SnlvLIQqCdiWa/INA2\r\nCYEFE8KFlwKBXai+WXUms6mTpXG/pSn16/mf44KHh2D0tmXG83FgsTRzex6O\r\nq0bKGX7+UnX1k6opShIWcZF1pekjU83nQwc8c5IKc+7NABXXCYy7bksVwsG3\r\nXW1w06RhJjQcLkydPwfXdSTD7P8zVHo7IlFrTrb9kc+biA2xqr0o7Jh+0nc+\r\n0cGsrohmazhmaRM9VIzhh22XdO+s9ajQgNNg6YEYPw8Tqtk1JIPE5Tj2VmA0\r\nduGpt2CQPeT3xrdnYtA4jJLBAVCCtNO+oBmhxvo9UWNcwf3BM+egVGZr2pDj\r\ng2BOlIUj96iuQ89lpGkrHTTsICxpiZo6XhKzvi0Pyz/kU7vLalYzOFX36Kp3\r\nfrVodW+vrNvDp2xCbRtezdDvCAVbM76VsO0=\r\n=rMZT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"08f597f3a3d71a4852b0afbba120af15ca038121","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Tracing","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.9.0","@opentelemetry/resources":"1.9.0","@opentelemetry/semantic-conventions":"1.9.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"10.0.0","sinon":"15.0.0","rimraf":"3.0.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.9.0_1673473589665_0.6742613306845624","host":"s3://npm-registry-packages"}},"1.9.1":{"name":"@opentelemetry/sdk-trace-base","version":"1.9.1","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.9.1","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"c349491b432a7e0ae7316f0b48b2d454d79d2b84","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.9.1.tgz","fileCount":291,"integrity":"sha512-Y9gC5M1efhDLYHeeo2MWcDDMmR40z6QpqcWnPCm4Dmh+RHAMf4dnEBBntIe1dDpor686kyU6JV1D29ih1lZpsQ==","signatures":[{"sig":"MEQCIDCpHT2SvFd7SvoiA/2qcUtYH9zFjwJCGPBPCaE/O0/XAiAg9ObFHTNytJHMrIs2fZSuBwq6zkrVyW0zuSXKRpu3Cw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":721180,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj1+KDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoLHRAAg2YSezWIehGO+yqyz36zRSewcUwKhipwLyD79qHVT8biD3OZ\r\n+LouyTG+pKoIfA0ht/AxcwP/KPKd4HfApZX//J2F5up8Y2HXg4ttHF3ez/MI\r\n59pdZYzIHwvcV24CdShaviNcw1wVF5+fGBdP/AqDDHu+TzTqSyb8p0SLTKnU\r\nm6dqBu0O7/30a7lRuEacaE/RTN10fpXpQzseVyq+yY4fxnihW5WJ4wmKKgz3\r\nN/WcKOla4/hdeEpeQaBMsud+VxN1VTNor8Co+RyB7+T6pHFSIWcuUY4ED0QW\r\n8D9oHXPND8P8AqQG2V3oh/3J7EOsdfqaAhzbURnX/DYPw5GPwvEXHL2xg9SM\r\nEVnwf/amUsxp+KaLbLmJnLdUebv+YSYzU4Cq0b7lgF2Y3ETt4UHzC2aKP1f+\r\n2Qq7VM3XWobSfVQATnb9G7mT3ceET6hhWwx/2bCk8bL8z2nr1A/VFIcGR1/Z\r\njTKUuuf0tWndCgQcAiMgBqsY9gVc5k49BXILciDslFi/VAFPzPNLdgXTJLoc\r\nygkcbFFC/qshloubv3yjTyxbb4sPC8JHaJy7z+JneWFYZIVG1phNiRbUqUNv\r\neasg3/aSyGvuSXZSyE2tEKTvAt0wtOUpnk/LelZoD8xO11whUPlWz5bk5le/\r\nxuTo6bdKcBCPUftxCcET15ohn56htRaQssg=\r\n=4lA/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"279458e7ddf16f7ddca5fe60c78672e05fafce66","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Tracing","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.9.1","@opentelemetry/resources":"1.9.1","@opentelemetry/semantic-conventions":"1.9.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"10.0.0","sinon":"15.0.0","rimraf":"4.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","istanbul-instrumenter-loader":"3.0.1","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.9.1_1675092611489_0.40379905656518345","host":"s3://npm-registry-packages"}},"1.10.0":{"name":"@opentelemetry/sdk-trace-base","version":"1.10.0","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.10.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"abbffa0ae39234f4c441357edc3f4da45dc73ef5","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.10.0.tgz","fileCount":291,"integrity":"sha512-X4rRShtVQ893LCU4GNKS1TKFua9nSjVmo0VJvigfSFSOmyyOLfiyTWmVL9MKV7Ws0HqLOIWJixJY0x28fw3Tzg==","signatures":[{"sig":"MEUCIQCfH/YhGxM8fNPGzqv85ZBEv+TXK2xG4B3l4BxNeprrcwIgNgdeMoB45zsX6FCHz9OKjjZgeiZpELL7Pl8Jj8iVfsU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":753566,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkD0cLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrtJxAAjO1H0f8JKNzc9enF2Gb4+9qh/KuB+N6QinsJR5uIKghmG04L\r\nTyyCyEBIlrt5+C8U19xXZRbrtSTfyHD+lv7WRrSeV/fL6tOEV5oHwn0BhijS\r\nJB+Ng65UWSGtPiv9fnsczZN+pluUwzWcpn1eKdM/ev/7j0jFnxbGFJf8XfLb\r\nep+rdVtn2PBZfe66YZP9LtE7nCaHVYCNFdqkXl8PKeyYisl7FJefVRcxejOw\r\nIK1m8uChlMYtjDlMCkg3IrIfiEqlFoAoQinp2gPTEuSM9Z8R6WIW+rc5B680\r\n8MFyMQVy8U44vhZjnLb0fwIAzHpCEzXrsjQ6kwXU9ZhOOw6k6zq/F90W545+\r\nxc0yDu+EQLPLFwSYgVAD8Iutc2OkRWYDBUn2+QLWIc49HSq/XfMyUV36qDpM\r\nNa9JwV5Hzh9sfEPgvnKFDXDz1t/kYP1Y5D2h1Z0vvPYIGfxfpwnhKOtI4jHC\r\nwnnwBxFlBWbyxQ4TUWjV3R8HeChsO3KZ7Dcocjjkhr+dGZbRQwx5j/ZcRgb2\r\n1WS/kKpbXELlv7F16k+myxXVMSughmSmyTBvQesOMODviXrG9QvZ/k6hQDzn\r\n0aIdj7QFVsBqQ8QfLScLcQoGdxaD7PAImPFAJo8IwRIApGUFGoJIMkTAxQnB\r\n3An0ctyqyIqewKwSMDQ/kQkCAZo7nNMKF/k=\r\n=4uMa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"56e6b1bb890f844b8963a146780d0b9cfa8abd0d","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Tracing","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.10.0","@opentelemetry/resources":"1.10.0","@opentelemetry/semantic-conventions":"1.10.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"10.0.0","sinon":"15.0.0","rimraf":"4.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","istanbul-instrumenter-loader":"3.0.1","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.10.0_1678722826858_0.7356588240446413","host":"s3://npm-registry-packages"}},"1.10.1":{"name":"@opentelemetry/sdk-trace-base","version":"1.10.1","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.10.1","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"fce06a810f9052d3c1b935d134979f4254bc8ae2","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.10.1.tgz","fileCount":291,"integrity":"sha512-jutSP5t22wrPKReJKzI5uKht4mJ4cQdF/mGFJkN+emFFsDXru9CuFv/NfUrD0jEqoaaiqjcZtPSyTzMgu9LXvw==","signatures":[{"sig":"MEUCIC5TkRQU4u6vAJo35V80QPiCUtJjFb/AQ6lMRRW3pWVXAiEAvM5UwlwBdiTS/miwGRjsCy4RwNj1Vmv0E44uh035k4s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":754653,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkGIV6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoD9Q/9HrqY+zXO5UB2Ajjrnffg1MgeYDLd+x0xsRVwooyC2HXp52/8\r\nmuP2SXq0JbSZOwbqQhSs6r/KqLt2avtTufh20YqFScGBvE0ajk+iPwdViznh\r\nBoWgA7m/cSTfazKwa/y01+rP7u/dHhMhUyp2VuX2Ml+6uytN3+ddvNgrPoB/\r\nV6V/V+G1StRlkrXj/yrI5kwtdbd2lDqsPErYhEWq/JnBamEckJYDUukJHftP\r\nOiYLvPEJGD8nDnZyFZM411BZzMi2c2eAXDTCgdBfczwdgHDq0hi2bBheMb84\r\nE9XDZO0roA+8qqwPOdII+ZhTM+Zy7AWVpgXYzYyn2H+zqt0kKYGAVum01B2P\r\nVwtG8UVJj/0/SXiKpzqaHNeRp1bG3Wwz/SgOdGWO078IoQVGOlQcldCbSc/9\r\nPU+OojbQ29jzwOOXRGq3Gr1S3CWshuDUM/V/gKPYJLQDL97VcP6qgmrGKYjw\r\n4phRWsFMpVtq4vLpciCThNZfdcCpIHKEW393pVNcpoYh8zyrucfR+UNt6gdB\r\nHOuK81d1sf67yI1lj6vuxYBL1Sg2PppgR+kuH8yat+XGV2PHdIp3g3gjaEx2\r\ndBp1tMLkrI8EW5TIgFusMyNuYq6+fH4VQ+6KL769f9zJi6wt5833VS1YjCK8\r\nh3pXzU0oMH3vOTOi+K+MgFdezKn399P7X3s=\r\n=ydap\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"486df99906958de9b8b666839785b00160a6a229","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Tracing","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.10.1","@opentelemetry/resources":"1.10.1","@opentelemetry/semantic-conventions":"1.10.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"10.0.0","sinon":"15.0.0","rimraf":"4.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","istanbul-instrumenter-loader":"3.0.1","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.10.1_1679328634722_0.677777763334195","host":"s3://npm-registry-packages"}},"1.11.0":{"name":"@opentelemetry/sdk-trace-base","version":"1.11.0","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.11.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"a962dbe74ae28442501ce804d4a270892e70d862","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.11.0.tgz","fileCount":291,"integrity":"sha512-DV8e5/Qo42V8FMBlQ0Y0Liv6Hl/Pp5bAZ73s7r1euX8w4bpRes1B7ACiA4yujADbWMJxBgSo4fGbi4yjmTMG2A==","signatures":[{"sig":"MEUCIATNLGlPj7nprM/PqoK7yebouzxOOVHabs3pLCi2zF81AiEAnpwJz0aXZGwAS8cwf5tUXbH3Z5M719jhlqJKLHhclE4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":754653,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkJaswACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoBlg//cAe3wMtepVB6AkYMsdLNGEQdJNykDrEO4K0w2cJORD1OoOSw\r\nRKY69x4MsneZ7DoTy1Yyvrro4nFZVaXcMR4W2I2/VyCM9zuMYdfXfeYW8Xn2\r\nxlBmjjIvotMn3FMLwxd44Xc7RRXgqOYp+F+oYPfxxyB4bLtIjg9UCRWIUkfs\r\nxeHvkfxXhlSE/Ffl+o4+6S5JR8bPRcLKltwfM3sBlySUZ619M2t/3RdgXuN4\r\nKpZM8cj/+8w47iRnPEC5u+mxMgsUiJOPRdMNV8MLR9gAVrt+aycAGs0DveJ+\r\nW800yX76KLskPzXMOhLjY40uAfTmf7ZSMLySPTmjHB86Ao7a+VRof3Lp7F7W\r\nAl53WeR8ktsMkUgol6bYBUxQ6gpaUBcup8OVTq3UvIV0tc1nW9xGift4uyqV\r\n3Zx71db8n7DWQLx5djFNVcGxo4LGBnoac6yID7sAXZmFPKO5wgik9jcSvaes\r\nMefz5zOjllRyaggfDu0qzMl/pV8rP4U/HDyFsUBFkbVrs0H1gq7p4MWOzvA5\r\no+TIwiRqhkNVieFqBguPz6wC6R+xmGDfuMT1OVlErJ37xulLctcFR97cVvo8\r\nNhs/zg+VzSlLA2ffRMZJY8j2xFIIknTNW2XbxO0ynIuw2Qac/ubMyv3L607p\r\njN2vgVxGOy4ijQ4VOX7QzQTJOW9eOnjw9UQ=\r\n=Bvyk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"1328ee04ae78f9f6cf143af7050c00aaa6d2eb3b","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Tracing","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.11.0","@opentelemetry/resources":"1.11.0","@opentelemetry/semantic-conventions":"1.11.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"10.0.0","sinon":"15.0.0","rimraf":"4.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","istanbul-instrumenter-loader":"3.0.1","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.11.0_1680190255784_0.000785890780287346","host":"s3://npm-registry-packages"}},"1.12.0":{"name":"@opentelemetry/sdk-trace-base","version":"1.12.0","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.12.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"62b895dbb5900048a85e4899c38fec5585447d4b","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.12.0.tgz","fileCount":291,"integrity":"sha512-pfCOB3tNDlYVoWuz4D7Ji+Jmy9MHnATWHVpkERdCEiwUGEZ+4IvNPXUcPc37wJVmMpjGLeaWgPPrie0KIpWf1A==","signatures":[{"sig":"MEUCIQDGQNlFDI4aeratpSD5OxDMShZWpHdYTVjWCBnYfpqT7wIgS20kS7BJXFaKBMCcL57pG64sBXgcstHOb/QvJJbZc4c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":755384,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkOEYtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr1VxAAgK9Cgr/apKKrJ/8l0FYhazkWFDVijdj6ImBxtPgDYEUJgRCa\r\nXWPxQDsQLJ/n+ZSKLJ9e115m+2mfaLCg0ECNePS29s0tCwNiC0pS+jC5EJxm\r\nDAfJgqHg58HDE1ZwEvK2ssIgz66oCTBS59WwTMARovA4kBn9TyViR9k6wRGU\r\ndJX5LqLpt8E/1MymOyqo9/2HoqCyb1EiKzB/Ur8VdDnp4a/6yKC0r18d0ju3\r\nG6FfNyvgBwrdqOoIbUcut1bwbomwjplJZ63sIKUbC4h/DThjsYOd1jeek4N/\r\nR88hh4GEpZCWW9yHYrQ5oTYiVRtc8DKo+FstoKULy49suV9998uh50vlS+rR\r\nfDvRBInZIi1weDqJvjZVRw2rC24uoTOECiPulSKmrYsIF+jAREqJ1MwOLPdx\r\nvhnPsAmPF0gmRlWpHoXeYxG8NhfCjGycXJM3XcXIjX6+6FgSxKxDPGxiYIP0\r\nFHA7TP6N26re/AcKB1BhbjblKq9znqYbJ4vVG6xfFUEPC6akKwDwBNkwTPN/\r\n3Nq9B5fhF4IB02jHCu2NSGAyWeEXICD349DITHgpeY+WXRK/0Ch/FvKsAiQ2\r\n8DLal2y8VAMn1rX+18wbiJeDgUP0x88y8joyR+SRLlRb0BGbOgZarJ5t6rKY\r\nU8gfYC/v0GR0zNX8sPSWtuZxdQRabqIODas=\r\n=D7K4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"a04090010ee18e17487b449984807cc2b7b6e3e6","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry Tracing","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"@opentelemetry/core":"1.12.0","@opentelemetry/resources":"1.12.0","@opentelemetry/semantic-conventions":"1.12.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"10.0.0","sinon":"15.0.0","rimraf":"4.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","istanbul-instrumenter-loader":"3.0.1","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.12.0_1681409581369_0.41803382504150455","host":"s3://npm-registry-packages"}},"1.13.0":{"name":"@opentelemetry/sdk-trace-base","version":"1.13.0","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.13.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"096cc2759430d880c5d886e009df2605097403dc","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.13.0.tgz","fileCount":291,"integrity":"sha512-moTiQtc0uPR1hQLt6gLDJH9IIkeBhgRb71OKjNHZPE1VF45fHtD6nBDi5J/DkTHTwYP5X3kBJLa3xN7ub6J4eg==","signatures":[{"sig":"MEUCIQCUuJ4B96xwpSLT8DFKAofaJDlGrXekNXcbsCsQRyYcBQIgdFAq/sIQjSsvEbReUkhFeNBdPC5uB4GXp48ocXDFpTU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":755361},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"8fc76896595aac912bf9e15d4f19c167317844c8","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v18.12.1+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","dependencies":{"@opentelemetry/core":"1.13.0","@opentelemetry/resources":"1.13.0","@opentelemetry/semantic-conventions":"1.13.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"10.0.0","sinon":"15.0.0","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","istanbul-instrumenter-loader":"3.0.1","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.13.0_1683811806724_0.20967276776702293","host":"s3://npm-registry-packages"}},"1.14.0":{"name":"@opentelemetry/sdk-trace-base","version":"1.14.0","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.14.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"831af08f002228a11e577ff860eb6059c8b80fb7","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.14.0.tgz","fileCount":291,"integrity":"sha512-NzRGt3PS+HPKfQYMb6Iy8YYc5OKA73qDwci/6ujOIvyW9vcqBJSWbjZ8FeLEAmuatUB5WrRhEKu9b0sIiIYTrQ==","signatures":[{"sig":"MEQCIGq2NLJF230csI91/HmEoC3vV+PDJAfR6T+ZfR1K5MhUAiBE0zHURoBg3oiLXEQFSYgZRPg4mT6sh7zOyIBPLwqTrQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759415},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"edebbcc757535bc88f01340409dbbecc0bb6ccf8","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v18.12.1+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","dependencies":{"@opentelemetry/core":"1.14.0","@opentelemetry/resources":"1.14.0","@opentelemetry/semantic-conventions":"1.14.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.3.16","mocha":"10.0.0","sinon":"15.0.0","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.0","@types/sinon":"10.0.13","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.32","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","istanbul-instrumenter-loader":"3.0.1","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.14.0_1686031254973_0.05353905101465628","host":"s3://npm-registry-packages"}},"1.15.0":{"name":"@opentelemetry/sdk-trace-base","version":"1.15.0","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.15.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"92340ded8f9fec1aaa63afb40c6e7e01769c2852","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.15.0.tgz","fileCount":291,"integrity":"sha512-udt1c9VHipbZwvCPIQR1VLg25Z4AMR/g0X8KmcInbFruGWQ/lptVPkz3yvWAsGSta5yHNQ3uoPwcyCygGnQ6Lg==","signatures":[{"sig":"MEQCICYANwEi+W0pUvfm1ry5U2W2dfO2D8QKOxJ6ASiMd9fAAiAJVx8yq45ynFVPddGZXUIDiB+f460P0lH8/PukjsJa9Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":751257},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"06e919d6c909e8cc8e28b6624d9843f401d9b059","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"nyc karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"nyc karma start karma.worker.js --single-run","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.1/node@v18.12.1+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","dependencies":{"tslib":"^2.3.1","@opentelemetry/core":"1.15.0","@opentelemetry/resources":"1.15.0","@opentelemetry/semantic-conventions":"1.15.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"7.1.1","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.1","@types/sinon":"10.0.15","karma-webpack":"4.0.2","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","istanbul-instrumenter-loader":"3.0.1","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0","karma-coverage-istanbul-reporter":"3.0.3"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.15.0_1688642828714_0.7763914571035175","host":"s3://npm-registry-packages"}},"1.15.1":{"name":"@opentelemetry/sdk-trace-base","version":"1.15.1","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.15.1","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"8eabc0827769d91ac86cde8a86ebf0bf2a7d22ad","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.15.1.tgz","fileCount":291,"integrity":"sha512-5hccBe2yXzzXyExJNkTsIzDe1AM7HK0al+y/D2yEpslJqS1HUzsUSuCMY7Z4+Sfz5Gf0kTa6KYEt1QUQppnoBA==","signatures":[{"sig":"MEQCIAMA9wUFC89WxydgdbzsPHJAC6CJZrcaOKd6WZiMyomlAiAmC3lL7KJpsgZkvBN+kvQdR+/QBXU5aH853Mw0xGsxpQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759437},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"9f71800fdc2a5ee5055684037a12498af71955f2","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.3/node@v18.4.0+x64 (darwin)","description":"OpenTelemetry Tracing","directories":{},"sideEffects":false,"_nodeVersion":"18.4.0","dependencies":{"@opentelemetry/core":"1.15.1","@opentelemetry/resources":"1.15.1","@opentelemetry/semantic-conventions":"1.15.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"7.1.3","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.1","@types/sinon":"10.0.15","karma-webpack":"4.0.2","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.15.1_1690209168495_0.9723185712242157","host":"s3://npm-registry-packages"}},"1.15.2":{"name":"@opentelemetry/sdk-trace-base","version":"1.15.2","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.15.2","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"4821f94033c55a6c8bbd35ae387b715b6108517a","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.15.2.tgz","fileCount":291,"integrity":"sha512-BEaxGZbWtvnSPchV98qqqqa96AOcb41pjgvhfzDij10tkBhIu9m0Jd6tZ1tJB5ZHfHbTffqYVYE0AOGobec/EQ==","signatures":[{"sig":"MEUCIEIHVFRfdpxnv3EMAJ4ftYQ+AlgYc1/cZ62e/gv8tkELAiEAnsGkf0w1TCg+Nh+zO9gX/GmMEANl7JYCnR3A8+/VUTY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759437},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"48fb15862e801b742059a3e39dbcc8ef4c10b2e2","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.4/node@v18.12.1+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","dependencies":{"@opentelemetry/core":"1.15.2","@opentelemetry/resources":"1.15.2","@opentelemetry/semantic-conventions":"1.15.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"7.1.4","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.1","@types/sinon":"10.0.16","karma-webpack":"4.0.2","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.5.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.15.2_1691500880621_0.5765565023863921","host":"s3://npm-registry-packages"}},"1.16.0":{"name":"@opentelemetry/sdk-trace-base","version":"1.16.0","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.16.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"243d69767d44646e1d16baa425c35dbabd959c4e","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.16.0.tgz","fileCount":291,"integrity":"sha512-UvV8v8cN0Bx5BI40IJ+sMWcbwWekPa9ngMHSOfCWtSAVKbzwFdDV4Jrs/ejC6uR/SI6CKFQB9ItHp/0nZzVbIQ==","signatures":[{"sig":"MEUCIE0CtdHOn5oxhEmmjk8QOgpa9uN1UcGaKdPZ4BPeSZHEAiEAxBrVmbuOmnEOtXfyBV6smxPj0Fzkzn/FiYy0SDpi+iI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":762780},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"5fcd8cf136e2235903dde3df9ba03ced594f0e95","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.5/node@v18.12.1+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","dependencies":{"@opentelemetry/core":"1.16.0","@opentelemetry/resources":"1.16.0","@opentelemetry/semantic-conventions":"1.16.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"7.1.5","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.1","@types/sinon":"10.0.16","karma-webpack":"4.0.2","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.6.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.6.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.16.0_1694434471110_0.20239220544943004","host":"s3://npm-registry-packages"}},"1.17.0":{"name":"@opentelemetry/sdk-trace-base","version":"1.17.0","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.17.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"05a21763c9efa72903c20b8930293cdde344b681","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.17.0.tgz","fileCount":291,"integrity":"sha512-2T5HA1/1iE36Q9eg6D4zYlC4Y4GcycI1J6NsHPKZY9oWfAxWsoYnRlkPfUqyY5XVtocCo/xHpnJvGNHwzT70oQ==","signatures":[{"sig":"MEUCIQDRl4V5Q9HD6NsW3DtOOe+96ou8MwSUKBYi1McLNudswwIgcqEqisIWT6U7qrLdIRH+kQFG05+JTW3HQaitOHqTY5A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759485},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"faf939c77591f709afbc23fadbe629c9d3607ef6","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.5/node@v18.12.1+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","dependencies":{"@opentelemetry/core":"1.17.0","@opentelemetry/resources":"1.17.0","@opentelemetry/semantic-conventions":"1.17.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"7.1.5","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.1","@types/sinon":"10.0.16","karma-webpack":"4.0.2","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.7.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.7.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.17.0_1694524353106_0.9941234111275701","host":"s3://npm-registry-packages"}},"1.17.1":{"name":"@opentelemetry/sdk-trace-base","version":"1.17.1","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.17.1","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"8ede213df8b0c957028a869c66964e535193a4fd","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.17.1.tgz","fileCount":291,"integrity":"sha512-pfSJJSjZj5jkCJUQZicSpzN8Iz9UKMryPWikZRGObPnJo6cUSoKkjZh6BM3j+D47G4olMBN+YZKYqkFM1L6zNA==","signatures":[{"sig":"MEQCICJ2bNHS5YUGFypz4AII9j8tSEQ9DlGT6kqLjtoOEsCGAiBvV/Vq4IZpDkaHq2O9HmyppmnPVxpIxrg+Jy1T5IiHDA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":763072},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"f8e187b473274cc2011e7385992f07d319d667dc","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:bench":"node test/performance/benchmark/index.js | tee .benchmark-results.txt","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.5/node@v18.12.1+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","dependencies":{"@opentelemetry/core":"1.17.1","@opentelemetry/resources":"1.17.1","@opentelemetry/semantic-conventions":"1.17.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"7.1.5","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.2","@types/sinon":"10.0.18","karma-webpack":"4.0.2","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.7.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0","@opentelemetry/resources_1.9.0":"npm:@opentelemetry/resources@1.9.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.7.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.17.1_1696947498602_0.8314715735448981","host":"s3://npm-registry-packages"}},"1.18.0":{"name":"@opentelemetry/sdk-trace-base","version":"1.18.0","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.18.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"09e420d24465aaee8e21a8a9a3c4fa2e6f0fd08e","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.18.0.tgz","fileCount":291,"integrity":"sha512-OThpwn8JeU4q7exo0e8kQqs5BZGKQ9NNkes66RCs7yhUKShHEKQIYl/A3+xnGzMrbrtgogcf84brH8XD4ahjMg==","signatures":[{"sig":"MEUCIFQOMg1gSyToxhdxU8T3AviTyjEEw2MbV3NIAaAUmbOCAiEA5XDBvAFEwa4c3eHldor7UtuSWc0QH6+9JPAUmc9laKE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":762996},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"73b446688f10fd8dc4cf403a085f0a39070df7b4","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:bench":"node test/performance/benchmark/index.js | tee .benchmark-results.txt","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.18.2+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"sideEffects":false,"_nodeVersion":"18.18.2","dependencies":{"@opentelemetry/core":"1.18.0","@opentelemetry/resources":"1.18.0","@opentelemetry/semantic-conventions":"1.18.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.3","@types/sinon":"10.0.20","karma-webpack":"4.0.2","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.8.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.8.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.18.0_1699353886594_0.7186034490338462","host":"s3://npm-registry-packages"}},"1.18.1":{"name":"@opentelemetry/sdk-trace-base","version":"1.18.1","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.18.1","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"256605d90b202002d5672305c66dbcf377132379","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.18.1.tgz","fileCount":291,"integrity":"sha512-tRHfDxN5dO+nop78EWJpzZwHsN1ewrZRVVwo03VJa3JQZxToRDH29/+MB24+yoa+IArerdr7INFJiX/iN4gjqg==","signatures":[{"sig":"MEUCIQDGgWjUUen2F48lorSLadmIOOAKIpssyEX1QX3AkPnEcgIgZ/6Bk9XnhJDqwrVWwaBzBowhdIMF0BlbAA4G9pfiu3s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":762996},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"f665499096189390e691cf1a772e677fa67812d7","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:bench":"node test/performance/benchmark/index.js | tee .benchmark-results.txt","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.18.2+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"sideEffects":false,"_nodeVersion":"18.18.2","dependencies":{"@opentelemetry/core":"1.18.1","@opentelemetry/resources":"1.18.1","@opentelemetry/semantic-conventions":"1.18.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"4.46.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.3","@types/sinon":"10.0.20","karma-webpack":"4.0.2","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.8.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.8.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.18.1_1699466949548_0.8982337926756658","host":"s3://npm-registry-packages"}},"1.19.0":{"name":"@opentelemetry/sdk-trace-base","version":"1.19.0","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.19.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"87e629e7080945d955d53c2c12352915f5797cd3","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.19.0.tgz","fileCount":291,"integrity":"sha512-+IRvUm+huJn2KqfFW3yW/cjvRwJ8Q7FzYHoUNx5Fr0Lws0LxjMJG1uVB8HDpLwm7mg5XXH2M5MF+0jj5cM8BpQ==","signatures":[{"sig":"MEUCIQCvZye8IyirUNdQZpWpKxno3ZitChFbue9awFFtHELllgIgNyloI4Qyzwns38NU8u3WC0Li1KHoH9j2JOpghwv/it0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":764145},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"d3c311aec24137084dc820805a2597e120335672","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:bench":"node test/performance/benchmark/index.js | tee .benchmark-results.txt","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.18.2+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"sideEffects":false,"_nodeVersion":"18.18.2","dependencies":{"@opentelemetry/core":"1.19.0","@opentelemetry/resources":"1.19.0","@opentelemetry/semantic-conventions":"1.19.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.6","@types/sinon":"10.0.20","karma-webpack":"4.0.2","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.8.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.8.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.19.0_1702557329886_0.8961281946707333","host":"s3://npm-registry-packages"}},"1.20.0":{"name":"@opentelemetry/sdk-trace-base","version":"1.20.0","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.20.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"1771bf7a214924fe1f27ef50395f763b65aae220","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.20.0.tgz","fileCount":291,"integrity":"sha512-BAIZ0hUgnhdb3OBQjn1FKGz/Iwie4l+uOMKklP7FGh7PTqEAbbzDNMJKaZQh6KepF7Fq+CZDRKslD3yrYy2Tzw==","signatures":[{"sig":"MEYCIQCHh3POrnMKj+uhqmw18P6kbzsRGC80c1E4qJMfjLsMDQIhAMGITPFwWQeaDCcCWHsASv07JnvLZjRORCDpN/OnUc8V","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":765977},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"57008533aba7ccd51ea80f38ff4f29404d47eb9c","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:bench":"node test/performance/benchmark/index.js | tee .benchmark-results.txt","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"@opentelemetry/core":"1.20.0","@opentelemetry/resources":"1.20.0","@opentelemetry/semantic-conventions":"1.20.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.6","@types/sinon":"10.0.20","karma-webpack":"4.0.2","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.8.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.8.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.20.0_1705313747279_0.982043777281284","host":"s3://npm-registry-packages"}},"1.21.0":{"name":"@opentelemetry/sdk-trace-base","version":"1.21.0","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.21.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"ffad912e453a92044fb220bd5d2f6743bf37bb8a","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.21.0.tgz","fileCount":291,"integrity":"sha512-yrElGX5Fv0umzp8Nxpta/XqU71+jCAyaLk34GmBzNcrW43nqbrqvdPs4gj4MVy/HcTjr6hifCDCYA3rMkajxxA==","signatures":[{"sig":"MEUCIQCqCEvDM0Ok1Pc+0BKmVi/qGM49XKfMGKMFwmzj72uEbQIgQj2iOSZQ1GktYTNsHsyb8mpoMElXqAgH4R2tc1TYjzg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":765995},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"828f2ed730e4d26d71f92e220f96b60a552a673a","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:bench":"node test/performance/benchmark/index.js | tee .benchmark-results.txt","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"@opentelemetry/core":"1.21.0","@opentelemetry/resources":"1.21.0","@opentelemetry/semantic-conventions":"1.21.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.6","@types/sinon":"10.0.20","karma-webpack":"4.0.2","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.8.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.8.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.21.0_1706249469569_0.5490245065158903","host":"s3://npm-registry-packages"}},"1.22.0":{"name":"@opentelemetry/sdk-trace-base","version":"1.22.0","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.22.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"7833bf2493a7b49461915ca32aa2884c87afd78c","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.22.0.tgz","fileCount":291,"integrity":"sha512-pfTuSIpCKONC6vkTpv6VmACxD+P1woZf4q0K46nSUvXFvOFqjBYKFaAMkKD3M1mlKUUh0Oajwj35qNjMl80m1Q==","signatures":[{"sig":"MEYCIQCIbs8fApIflGCI1DVtJx4Od7v+UAgxdvD1HYs3Knyn8wIhANZPfqD9CmErmsPHuf+xvLsoRdhkFg7m60o2ydsbiYlH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":765995},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"7be35c7845e206b27b682e8ce1cee850b09cec04","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:bench":"node test/performance/benchmark/index.js | tee .benchmark-results.txt","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"@opentelemetry/core":"1.22.0","@opentelemetry/resources":"1.22.0","@opentelemetry/semantic-conventions":"1.22.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.6","@types/sinon":"10.0.20","karma-webpack":"4.0.2","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.9.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.9.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.22.0_1709198294393_0.7751101530396496","host":"s3://npm-registry-packages"}},"1.23.0":{"name":"@opentelemetry/sdk-trace-base","version":"1.23.0","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.23.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"ff0a0f8ec47205e0b14b3b765ea2a34de1ad01dd","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.23.0.tgz","fileCount":291,"integrity":"sha512-PzBmZM8hBomUqvCddF/5Olyyviayka44O5nDWq673np3ctnvwMOvNrsUORZjKja1zJbwEuD9niAGbnVrz3jwRQ==","signatures":[{"sig":"MEYCIQCkDxxFrTKMnaGS3uSnxIeqIYW9GUKUsumBHH/5FiMIQQIhAJl43qgE1ESEcqc99k140Qw3ZUyhYy98yujb5J2vrPVz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":769572},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"5231aa255047fbc6ee3d6a299f4423ab2f8a5fbc","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:bench":"node test/performance/benchmark/index.js | tee .benchmark-results.txt","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"@opentelemetry/core":"1.23.0","@opentelemetry/resources":"1.23.0","@opentelemetry/semantic-conventions":"1.23.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.6","@types/sinon":"10.0.20","karma-webpack":"4.0.2","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.9.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.9.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.23.0_1712131805476_0.8181787837823578","host":"s3://npm-registry-packages"}},"1.24.0":{"name":"@opentelemetry/sdk-trace-base","version":"1.24.0","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.24.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"e2de869e33fd224f6d9f39bafa4172074d1086c8","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.24.0.tgz","fileCount":291,"integrity":"sha512-H9sLETZ4jw9UJ3totV8oM5R0m4CW0ZIOLfp4NV3g0CM8HD5zGZcaW88xqzWDgiYRpctFxd+WmHtGX/Upoa2vRg==","signatures":[{"sig":"MEUCIQC+rEv+MmjVPnMGlU3wd57V5QFFVnW9EfX1PXPig1UglQIgdXMUaQB3puehbvSfKE7sDFk+XhwNKT3dOTs+Pe7BQaA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":770265},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"3ab4f765d8d696327b7d139ae6a45e7bd7edd924","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:bench":"node test/performance/benchmark/index.js | tee .benchmark-results.txt","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"@opentelemetry/core":"1.24.0","@opentelemetry/resources":"1.24.0","@opentelemetry/semantic-conventions":"1.24.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.6","@types/sinon":"10.0.20","karma-webpack":"4.0.2","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.9.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.9.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.24.0_1713969581982_0.6686664599417391","host":"s3://npm-registry-packages"}},"1.24.1":{"name":"@opentelemetry/sdk-trace-base","version":"1.24.1","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.24.1","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"dc2ab89126e75e442913fb5af98803fde67b2536","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.24.1.tgz","fileCount":291,"integrity":"sha512-zz+N423IcySgjihl2NfjBf0qw1RWe11XIAWVrTNOSSI6dtSPJiVom2zipFB2AEEtJWpv0Iz6DY6+TjnyTV5pWg==","signatures":[{"sig":"MEUCIQDTLWH2gw+yHzMuSStW+CjV5Qls++vE6j4ZyXWI8kIlXAIgcZvxmlQmkjw5cG6QCa7MTuRX04iBX07fk3qYK4/O4W0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":770265},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"41c2626fe0ed03e2e83bd79ee43c9bdf0ffd80d8","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:bench":"node test/performance/benchmark/index.js | tee .benchmark-results.txt","tdd:browser":"karma start","test:browser":"karma start --single-run","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"@opentelemetry/core":"1.24.1","@opentelemetry/resources":"1.24.1","@opentelemetry/semantic-conventions":"1.24.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.2","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"8.4.0","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.6","@types/sinon":"10.0.20","karma-webpack":"4.0.2","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.9.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.9.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.24.1_1715093558704_0.0518702076931048","host":"s3://npm-registry-packages"}},"1.25.0":{"name":"@opentelemetry/sdk-trace-base","version":"1.25.0","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.25.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"263f9ce19001c5cd7a814d0eb40ebc6469ae763d","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.25.0.tgz","fileCount":291,"integrity":"sha512-6+g2fiRQUG39guCsKVeY8ToeuUf3YUnPkN6DXRA1qDmFLprlLvZm9cS6+chgbW70cZJ406FTtSCDnJwxDC5sGQ==","signatures":[{"sig":"MEQCIHH4reSQvuavsAESwWCOjKs3174GY97NApvIwo8zkZdnAiAkX4evqPLOZGIcO2364Kma0IOukWxk2s4rZ7Q1/KWdIA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":772352},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"c4d3351b6b3f5593c8d7cbfec97b45cea9fe1511","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:bench":"node test/performance/benchmark/index.js | tee .benchmark-results.txt","tdd:browser":"karma start","test:browser":"karma start --single-run","align-api-deps":"node ../../scripts/align-api-deps.js","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"@opentelemetry/core":"1.25.0","@opentelemetry/resources":"1.25.0","@opentelemetry/semantic-conventions":"1.25.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.3","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"9.5.1","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.6","@types/sinon":"17.0.3","karma-webpack":"5.0.1","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.10.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.10.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.25.0_1717607756250_0.3809624034816559","host":"s3://npm-registry-packages"}},"1.25.1":{"name":"@opentelemetry/sdk-trace-base","version":"1.25.1","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.25.1","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"cbc1e60af255655d2020aa14cde17b37bd13df37","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.25.1.tgz","fileCount":291,"integrity":"sha512-C8k4hnEbc5FamuZQ92nTOp8X/diCY56XUTnMiv9UTuJitCzaNNHAVsdm5+HLCdI8SLQsLWIrG38tddMxLVoftw==","signatures":[{"sig":"MEYCIQCTj2PAtWjS/RCNjK8Gf9jjrAGZC45q4Xe4UC7g9f7wQQIhAMVEucKOdO/kvVF98e1NxnacXHLACTuS62IDNJctBSeh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":774722},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"0608f405573901e54db01e44c533009cf28be262","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:bench":"node test/performance/benchmark/index.js | tee .benchmark-results.txt","tdd:browser":"karma start","test:browser":"karma start --single-run","align-api-deps":"node ../../scripts/align-api-deps.js","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","dependencies":{"@opentelemetry/core":"1.25.1","@opentelemetry/resources":"1.25.1","@opentelemetry/semantic-conventions":"1.25.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.3","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","ts-mocha":"10.0.0","cross-var":"1.1.0","ts-loader":"9.5.1","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.6","@types/sinon":"17.0.3","karma-webpack":"5.0.1","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.10.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"6.1.1","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.10.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.25.1_1718875161655_0.9029425309207557","host":"s3://npm-registry-packages"}},"1.26.0":{"name":"@opentelemetry/sdk-trace-base","version":"1.26.0","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.26.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"0c913bc6d2cfafd901de330e4540952269ae579c","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.26.0.tgz","fileCount":291,"integrity":"sha512-olWQldtvbK4v22ymrKLbIcBi9L2SpMO84sCPY54IVsJhP9fRsxJT194C/AVaAuJzLE30EdhhM1VmvVYR7az+cw==","signatures":[{"sig":"MEYCIQDBmAKg/eAuae/sOfGJddg2bp6XQnx7eLvjy23V8aEtGgIhAN8fMKmoqU5I46KS49TZSYtdGwxd/ucUS3lMOUNFbWO8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":782749},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"720bc8c70d47029cb6b41a34ffdc3d25cbaa2f80","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc mocha 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:bench":"node test/performance/benchmark/index.js | tee .benchmark-results.txt","tdd:browser":"karma start","test:browser":"karma start --single-run","align-api-deps":"node ../../scripts/align-api-deps.js","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run","codecov:webworker":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.20.4+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"sideEffects":false,"_nodeVersion":"18.20.4","dependencies":{"@opentelemetry/core":"1.26.0","@opentelemetry/resources":"1.26.0","@opentelemetry/semantic-conventions":"1.27.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.4","lerna":"6.6.2","mocha":"10.7.3","sinon":"15.1.2","codecov":"3.8.3","webpack":"5.89.0","cross-var":"1.1.0","ts-loader":"9.5.1","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.7","@types/sinon":"17.0.3","karma-webpack":"5.0.1","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.10.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"7.0.0","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.10.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.26.0_1724836639726_0.4881073465309367","host":"s3://npm-registry-packages"}},"1.27.0":{"name":"@opentelemetry/sdk-trace-base","version":"1.27.0","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/sdk-trace-base@1.27.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"2276e4cd0d701a8faba77382b2938853a0907b54","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.27.0.tgz","fileCount":291,"integrity":"sha512-btz6XTQzwsyJjombpeqCX6LhiMQYpzt2pIYNPnw0IPO/3AhT6yjnf8Mnv3ZC2A4eRYOjqrg+bfaXg9XHDRJDWQ==","signatures":[{"sig":"MEUCIEZDRp9Rw7P7jVlsdY/bPk1oroAOlQqBPxMQtoLYLwDRAiEAyNSVcrfK4Enpjkh9EGRl4Eggqu0GYDvo0upx7fyeD2o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@opentelemetry%2fsdk-trace-base@1.27.0","provenance":{"predicateType":"https://slsa.dev/provenance/v0.2"}},"unpackedSize":787865},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js"},"engines":{"node":">=14"},"gitHead":"eb3ca4fb07ee31c62093f5fcec56575573c902ce","scripts":{"tdd":"npm run tdd:node","lint":"eslint . --ext .ts","test":"nyc mocha 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","tdd:node":"npm run test -- --watch-extensions ts --watch","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","test:bench":"node test/performance/benchmark/index.js | tee .benchmark-results.txt","tdd:browser":"karma start","test:browser":"karma start --single-run","align-api-deps":"node ../../scripts/align-api-deps.js","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile","test:webworker":"karma start karma.worker.js --single-run"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.20.4+x64 (linux)","description":"OpenTelemetry Tracing","directories":{},"sideEffects":false,"_nodeVersion":"18.20.4","dependencies":{"@opentelemetry/core":"1.27.0","@opentelemetry/resources":"1.27.0","@opentelemetry/semantic-conventions":"1.27.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","karma":"6.4.4","lerna":"6.6.2","mocha":"10.7.3","sinon":"15.1.2","webpack":"5.94.0","cross-var":"1.1.0","ts-loader":"9.5.1","typescript":"4.4.4","@types/node":"18.6.5","karma-mocha":"2.0.1","@types/mocha":"10.0.8","@types/sinon":"17.0.3","karma-webpack":"5.0.1","karma-coverage":"2.2.1","@opentelemetry/api":">=1.0.0 <1.10.0","@types/webpack-env":"1.16.3","karma-spec-reporter":"0.0.36","babel-plugin-istanbul":"7.0.0","karma-chrome-launcher":"3.1.0","karma-mocha-webworker":"1.3.0"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.10.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-trace-base_1.27.0_1729695101194_0.8545382921292937","host":"s3://npm-registry-packages"}},"1.28.0":{"name":"@opentelemetry/sdk-trace-base","version":"1.28.0","description":"OpenTelemetry Tracing","main":"build/src/index.js","module":"build/esm/index.js","esnext":"build/esnext/index.js","browser":{"./src/platform/index.ts":"./src/platform/browser/index.ts","./build/esm/platform/index.js":"./build/esm/platform/browser/index.js","./build/esnext/platform/index.js":"./build/esnext/platform/browser/index.js","./build/src/platform/index.js":"./build/src/platform/browser/index.js"},"types":"build/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/open-telemetry/opentelemetry-js.git"},"scripts":{"prepublishOnly":"npm run compile","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","test":"nyc mocha 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'","test:browser":"karma start --single-run","test:webworker":"karma start karma.worker.js --single-run","test:bench":"node test/performance/benchmark/index.js | tee .benchmark-results.txt","tdd":"npm run tdd:node","tdd:node":"npm run test -- --watch-extensions ts --watch","tdd:browser":"karma start","lint":"eslint . --ext .ts","lint:fix":"eslint . --ext .ts --fix","version":"node ../../scripts/version-update.js","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","prewatch":"npm run precompile","peer-api-check":"node ../../scripts/peer-api-check.js","align-api-deps":"node ../../scripts/align-api-deps.js"},"keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","engines":{"node":">=14"},"publishConfig":{"access":"public"},"devDependencies":{"@opentelemetry/api":">=1.0.0 <1.10.0","@types/mocha":"10.0.9","@types/node":"18.6.5","@types/sinon":"17.0.3","@types/webpack-env":"1.16.3","babel-plugin-istanbul":"7.0.0","cross-var":"1.1.0","karma":"6.4.4","karma-chrome-launcher":"3.1.0","karma-coverage":"2.2.1","karma-mocha":"2.0.1","karma-mocha-webworker":"1.3.0","karma-spec-reporter":"0.0.36","karma-webpack":"5.0.1","lerna":"6.6.2","mocha":"10.8.2","nyc":"15.1.0","sinon":"15.1.2","ts-loader":"9.5.1","typescript":"4.4.4","webpack":"5.96.1"},"peerDependencies":{"@opentelemetry/api":">=1.0.0 <1.10.0"},"dependencies":{"@opentelemetry/core":"1.28.0","@opentelemetry/resources":"1.28.0","@opentelemetry/semantic-conventions":"1.27.0"},"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","sideEffects":false,"gitHead":"4b1ad3fda0cde58907e30fab25c3c767546708e5","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"_id":"@opentelemetry/sdk-trace-base@1.28.0","_nodeVersion":"18.20.4","_npmVersion":"lerna/6.6.2/node@v18.20.4+x64 (linux)","dist":{"integrity":"sha512-ceUVWuCpIao7Y5xE02Xs3nQi0tOGmMea17ecBdwtCvdo9ekmO+ijc9RFDgfifMl7XCBf41zne/1POM3LqSTZDA==","shasum":"6195dc8cd78bd74394cf54c67c5cbd8d1528516c","tarball":"https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.28.0.tgz","fileCount":291,"unpackedSize":796305,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@opentelemetry%2fsdk-trace-base@1.28.0","provenance":{"predicateType":"https://slsa.dev/provenance/v0.2"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEyv+TGfQvTgAsZnjL3L4p9Dh+f6tk6Ixvo16zD4UiDQAiEA5yYDGo+Hjd6DCfSj66EP/AB3HNzp6+ehs7BRV0DC9ws="}]},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"directories":{},"maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdk-trace-base_1.28.0_1731926510582_0.963577670721244"},"_hasShrinkwrap":false}},"time":{"created":"2021-08-05T19:28:20.129Z","modified":"2024-11-18T10:41:51.253Z","0.24.1-alpha.4":"2021-08-05T19:28:20.395Z","0.24.1-alpha.5":"2021-08-06T11:31:39.286Z","0.24.1-alpha.7":"2021-08-07T13:33:04.337Z","0.24.1-alpha.9":"2021-08-07T14:10:07.190Z","0.24.1-alpha.14":"2021-08-11T14:50:54.966Z","0.24.1-alpha.18":"2021-08-14T08:16:09.993Z","0.24.1-alpha.20":"2021-08-17T21:07:07.249Z","0.25.1-alpha.21":"2021-08-18T20:16:42.539Z","0.25.0":"2021-08-18T21:16:46.735Z","0.25.1-alpha.2":"2021-08-23T21:41:10.378Z","0.25.1-alpha.4":"2021-08-24T19:33:17.584Z","0.25.1-alpha.7":"2021-08-27T18:20:00.339Z","0.25.1-alpha.12":"2021-08-30T20:22:09.042Z","0.25.1-alpha.13":"2021-08-30T20:41:30.144Z","0.25.1-alpha.16":"2021-09-04T08:05:10.908Z","0.25.1-alpha.23":"2021-09-08T22:15:12.367Z","0.26.0":"2021-09-30T12:35:32.508Z","1.0.0":"2021-09-30T20:53:43.948Z","1.0.1":"2021-11-11T14:51:24.979Z","1.1.0":"2022-03-18T08:11:01.831Z","1.1.1":"2022-03-22T19:52:31.108Z","1.2.0":"2022-04-22T14:57:03.801Z","1.3.0":"2022-05-27T19:41:24.857Z","1.3.1":"2022-06-06T20:26:17.973Z","1.4.0":"2022-07-06T20:15:38.341Z","1.5.0":"2022-07-26T20:52:16.066Z","1.6.0":"2022-08-24T17:44:35.505Z","1.7.0":"2022-09-16T12:14:58.183Z","1.8.0":"2022-11-09T19:45:34.290Z","1.9.0":"2023-01-11T21:46:29.878Z","1.9.1":"2023-01-30T15:30:11.676Z","1.10.0":"2023-03-13T15:53:47.027Z","1.10.1":"2023-03-20T16:10:34.940Z","1.11.0":"2023-03-30T15:30:56.117Z","1.12.0":"2023-04-13T18:13:01.576Z","1.13.0":"2023-05-11T13:30:06.916Z","1.14.0":"2023-06-06T06:00:55.192Z","1.15.0":"2023-07-06T11:27:08.851Z","1.15.1":"2023-07-24T14:32:48.689Z","1.15.2":"2023-08-08T13:21:20.770Z","1.16.0":"2023-09-11T12:14:31.274Z","1.17.0":"2023-09-12T13:12:33.338Z","1.17.1":"2023-10-10T14:18:18.968Z","1.18.0":"2023-11-07T10:44:46.767Z","1.18.1":"2023-11-08T18:09:10.048Z","1.19.0":"2023-12-14T12:35:30.035Z","1.20.0":"2024-01-15T10:15:47.496Z","1.21.0":"2024-01-26T06:11:09.767Z","1.22.0":"2024-02-29T09:18:14.609Z","1.23.0":"2024-04-03T08:10:05.643Z","1.24.0":"2024-04-24T14:39:42.149Z","1.24.1":"2024-05-07T14:52:38.897Z","1.25.0":"2024-06-05T17:15:56.531Z","1.25.1":"2024-06-20T09:19:21.851Z","1.26.0":"2024-08-28T09:17:19.852Z","1.27.0":"2024-10-23T14:51:41.469Z","1.28.0":"2024-11-18T10:41:50.759Z"},"bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base","keywords":["opentelemetry","nodejs","tracing","profiling","metrics","stats"],"repository":{"type":"git","url":"git+https://github.com/open-telemetry/opentelemetry-js.git"},"description":"OpenTelemetry Tracing","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"readme":"# OpenTelemetry Tracing SDK\n\n[![NPM Published Version][npm-img]][npm-url]\n[![Apache License][license-image]][license-image]\n\nThe `tracing` module contains the foundation for all tracing SDKs of [opentelemetry-js](https://github.com/open-telemetry/opentelemetry-js).\n\nUsed standalone, this module provides methods for manual instrumentation of code, offering full control over span creation for client-side JavaScript (browser) and Node.js.\n\nIt does **not** provide automated instrumentation of known libraries, context propagation for asynchronous invocations or distributed-context out-of-the-box.\n\nFor automated instrumentation for Node.js, please see\n[@opentelemetry/sdk-trace-node](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node).\n\n## Installation\n\n```bash\nnpm install --save @opentelemetry/api\nnpm install --save @opentelemetry/sdk-trace-base\n```\n\n## Usage\n\n```js\nconst opentelemetry = require('@opentelemetry/api');\nconst { BasicTracerProvider } = require('@opentelemetry/sdk-trace-base');\n\n// To start a trace, you first need to initialize the Tracer provider.\n// NOTE: The default OpenTelemetry tracer provider does not record any tracing information.\n// Registering a working tracer provider allows the API methods to record traces.\nnew BasicTracerProvider().register();\n\n// To create a span in a trace, we used the global singleton tracer to start a new span.\nconst span = opentelemetry.trace.getTracer('default').startSpan('foo');\n\n// Set a span attribute\nspan.setAttribute('key', 'value');\n\n// We must end the spans so they become available for exporting.\nspan.end();\n```\n\n## Config\n\nTracing configuration is a merge of user supplied configuration with both the default\nconfiguration as specified in [config.ts](./src/config.ts) and an\nenvironmentally configurable sampling (via `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG`).\n\n## Built-in Samplers\n\nSampler is used to make decisions on `Span` sampling.\n\n### AlwaysOn Sampler\n\nSamples every trace regardless of upstream sampling decisions.\n\n> This is used as a default Sampler\n\n```js\nconst {\n AlwaysOnSampler,\n BasicTracerProvider,\n} = require(\"@opentelemetry/sdk-trace-base\");\n\nconst tracerProvider = new BasicTracerProvider({\n sampler: new AlwaysOnSampler()\n});\n```\n\n### AlwaysOff Sampler\n\nDoesn't sample any trace, regardless of upstream sampling decisions.\n\n```js\nconst {\n AlwaysOffSampler,\n BasicTracerProvider,\n} = require(\"@opentelemetry/sdk-trace-base\");\n\nconst tracerProvider = new BasicTracerProvider({\n sampler: new AlwaysOffSampler()\n});\n```\n\n### TraceIdRatioBased Sampler\n\nSamples some percentage of traces, calculated deterministically using the trace ID.\nAny trace that would be sampled at a given percentage will also be sampled at any higher percentage.\n\nThe `TraceIDRatioSampler` may be used with the `ParentBasedSampler` to respect the sampled flag of an incoming trace.\n\n```js\nconst {\n BasicTracerProvider,\n TraceIdRatioBasedSampler,\n} = require(\"@opentelemetry/sdk-trace-base\");\n\nconst tracerProvider = new BasicTracerProvider({\n // See details of ParentBasedSampler below\n sampler: new ParentBasedSampler({\n // Trace ID Ratio Sampler accepts a positional argument\n // which represents the percentage of traces which should\n // be sampled.\n root: new TraceIdRatioBasedSampler(0.5)\n });\n});\n```\n\n### ParentBased Sampler\n\n- This is a composite sampler. `ParentBased` helps distinguished between the\nfollowing cases:\n - No parent (root span).\n - Remote parent with `sampled` flag `true`\n - Remote parent with `sampled` flag `false`\n - Local parent with `sampled` flag `true`\n - Local parent with `sampled` flag `false`\n\nRequired parameters:\n\n- `root(Sampler)` - Sampler called for spans with no parent (root spans)\n\nOptional parameters:\n\n- `remoteParentSampled(Sampler)` (default: `AlwaysOn`)\n- `remoteParentNotSampled(Sampler)` (default: `AlwaysOff`)\n- `localParentSampled(Sampler)` (default: `AlwaysOn`)\n- `localParentNotSampled(Sampler)` (default: `AlwaysOff`)\n\n|Parent| parent.isRemote() | parent.isSampled()| Invoke sampler|\n|--|--|--|--|\n|absent| n/a | n/a |`root()`|\n|present|true|true|`remoteParentSampled()`|\n|present|true|false|`remoteParentNotSampled()`|\n|present|false|true|`localParentSampled()`|\n|present|false|false|`localParentNotSampled()`|\n\n```js\nconst {\n AlwaysOffSampler,\n BasicTracerProvider,\n ParentBasedSampler,\n TraceIdRatioBasedSampler,\n} = require(\"@opentelemetry/sdk-trace-base\");\n\nconst tracerProvider = new BasicTracerProvider({\n sampler: new ParentBasedSampler({\n // By default, the ParentBasedSampler will respect the parent span's sampling\n // decision. This is configurable by providing a different sampler to use\n // based on the situation. See configuration details above.\n //\n // This will delegate the sampling decision of all root traces (no parent)\n // to the TraceIdRatioBasedSampler.\n // See details of TraceIdRatioBasedSampler above.\n root: new TraceIdRatioBasedSampler(0.5)\n })\n});\n```\n\n## Example\n\nSee [examples/basic-tracer-node](https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/basic-tracer-node) for an end-to-end example, including exporting created spans.\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: \n- For more about OpenTelemetry JavaScript: \n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/sdk-trace-base\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fsdk-trace-base.svg\n","readmeFilename":"README.md"} \ No newline at end of file diff --git a/tests/registry/npm/@opentelemetry/semantic-conventions/registry.json b/tests/registry/npm/@opentelemetry/semantic-conventions/registry.json new file mode 100644 index 00000000000000..6a311014c5e892 --- /dev/null +++ b/tests/registry/npm/@opentelemetry/semantic-conventions/registry.json @@ -0,0 +1 @@ +{"_id":"@opentelemetry/semantic-conventions","_rev":"121-22cfab9a4dd7d7efe31a44c18844ed46","name":"@opentelemetry/semantic-conventions","dist-tags":{"canary":"0.25.1-alpha.13","next":"1.8.0","latest":"1.27.0"},"versions":{"0.9.0":{"name":"@opentelemetry/semantic-conventions","version":"0.9.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.9.0","maintainers":[{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"49f71eb9ea9ddd7250a8b326bcf2646d113f695c","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.9.0.tgz","fileCount":17,"integrity":"sha512-bq3ySf6BpHrqNehe5AlvxiY7tqDraCVDPMbIYfl2fPLdn7xMSuI6rZMrm+UthQxRKXWFgSmxWi7DiKpKbfc39A==","signatures":[{"sig":"MEUCIQDPfbZQp90wYBDEN4qwwC4Bb6eKXGnXdpnZ7ujqNiKipgIgQd/A9GBVABIWKP83Zr0/iMexXpTN9nEezgHv6PjFbOI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25451,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe69vUCRA9TVsSAnZWagAAkLMP/RQDEtqfFQk2brtaV7U7\npiPCKDt0jPZNM1LoHFs2ulrQ80qcVPhG+bqwTO0sBJ49yiYoOqASTXZ+skB7\nQ9YaW1tg71HsbB2mBsdh5kJJcS7SLMxT0uxEEpXCilD+Qmvfwlr/lVSEqKpC\n3GLe7XIr65bbqcXkBitfEJbxQcfNWlysC++8q3j/5so8ErUxjLCExQB9iyBf\nNR5TbLSZw8m3VrpDSQogQ65H0ezHHOE1gqjaj1ZgCIRlmwjZibi2NS+bg8vv\nUcV715Fh4NjgHBEg6iBSO4DtCi7BghfXMIi6s83XjncHkOQCDN31DM3/vZc4\nwj1jKAqFEyaFMO6Bpxh8rLlA+4ngmzCCQLNqaZWdMNEoqa9rMjEYQmQXBu+9\nJtwkPWxpDm+Pt/SDojVQVqvnJNVBoySYWDfcgcdqQWKezNlxNHefxAICJPh9\nLW/gjm/oTeJtrUist3Eu2ZEAjLkaFT3Dg8/mP2BNZnNkr6dbTpo55lUoOvMa\nybm1RZhxJPk1ZFQL7jvdf3kIihcXyU+lg9YOvkGHlUuCU6/xG4rJ9KAKxNMB\n9FsigEAq0WogwW2Qzf80LrRmRDoInK0mfTRHJxTl/I42ywY4qOIv5EP5Ry7g\nDs3uqTduWcgZiKpLZ8ZensMwAD2zoQ9d5LY5pVbKODrAxA/Ybjs1KYPQxflZ\npX73\r\n=PK5l\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"mayurkale22","email":"mayurkale22@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"6.4.1","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"10.15.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.0.2","rimraf":"3.0.2","codecov":"3.7.0","ts-node":"8.10.2","ts-mocha":"7.0.0","typescript":"3.9.5","@types/node":"14.0.13","@types/mocha":"7.0.2","@types/sinon":"9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.9.0_1592515539091_0.44542490113869837","host":"s3://npm-registry-packages"}},"0.10.0":{"name":"@opentelemetry/semantic-conventions","version":"0.10.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.10.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"c374bd7c50ba88d95e8c0d75898eb9272173a9cd","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.10.0.tgz","fileCount":24,"integrity":"sha512-aUEuxBXln9vg5TLLYCvOQ6Mz3vTxSXWVEV+0f4CJwlm4sSnFi5cXG8QTeFKNHn4r4KOGkaFBhUxNJtlD3TbA9Q==","signatures":[{"sig":"MEQCIC3wp0mxbtL/mXKRY0Alcznhy/6Wrxo/gOIl70nO3ShbAiBPIP9QSf9Y6/Q/2899hpshtZY3ClkPf31xCMtJi04Pag==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":36278,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfH0AOCRA9TVsSAnZWagAAwQMP/1RDXhyOCQ/LmCasjz0b\nwy2oNgEGcilJXj39/x6FiTWDwN/HoiBEXNwH3afkak5xpm4fqWJYLDDV7nDf\nsSIsA3m0NT1adi17iDLolEogrVUUZ9xiqKIwKQ4z1IlzeT+CIH80PE0KNNxP\n3+7xHUf8w/W5D3TrpKNbgpt0JjK8876J4mTJhKZCMcJCTfshCzL4fypvoduu\n8vw6VR8VNVmA9MXuxZsnpA/odeNdWRSzOABk21fNFZzz8pvZapzei9cOwJVM\njQAQN7ZTmmpQpVdRDnuzrs//1G0HxcX2t54pBJj4omy1K5srN4kPWwDEN4u9\n7pu+p6LjyyOqv4QpDJp6UAOlvFOYx0DpTUmXP/+27CpErUrLzOr2Dayz+bMh\n6f15DO6fEMY/jmyGti3/Sq/zOV0z/Kee6w51go4R8gICoCKFV7KnJQO95OVk\ngtjEAgSnWLBDmcBSpU7kQykaJiEDEEqo2KuWICvkwqile6RpqyCaza30GySc\nH2QtzegccRl6Zojl4mR/sE6r+3gBIBNVLRKCLAONm48G97SiJTcULWghwDMn\npKbHMeDCr1RSI5SLw10ZFkfjtxjkWcm8TKRtUWj3Nal/+ys+ObabamI63u/2\nrHqNFCQUTbjkqPAKLHh3h5V0Pa3oWYOShK7+GJDzbG6EV9PoAO2maA6uz4Ew\ncQlz\r\n=DgxQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"ab62a4d69b99b3a8c9c26100c04f3226af7859df","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v12.14.1+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"12.14.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.0.2","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","ts-mocha":"7.0.0","typescript":"3.9.7","@types/node":"14.0.25","@types/mocha":"8.0.0","@types/sinon":"9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.10.0_1595883534306_0.041745728096634016","host":"s3://npm-registry-packages"}},"0.10.1":{"name":"@opentelemetry/semantic-conventions","version":"0.10.1","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.10.1","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"22c0674ba7834ae647e2159783431ea90513d2f9","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.10.1.tgz","fileCount":24,"integrity":"sha512-a6VFFehJl9eOGmY2Q2ckZpYa8cWExCbyHqGft+TQy/ExF3DnuYut0E7d5zUdo8AgOqvWZAPPWGacl1/lfot38A==","signatures":[{"sig":"MEQCIGzkT/IeV6KqKuWgW93pgxlgtsaGSveF7TurRwL4dlbrAiA2mcyz2QolG/yZ+HjljVJxCIwsuoS1R9WR03/Qrllyww==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":36278,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIEBVCRA9TVsSAnZWagAA9QAQAKDoUZlOiaZtCAzZ1o0G\nZSpK8tcmhfnGhLmOdanzzFixUofCwvowzd1s4ULESgaBcIa8/Ae5RcYWfXGq\nfalYt4WQHl2RtSpYkYCJhy4AkKqH6nMo2nQ82PqknciDE7/ViA/VldkwTQ8T\nsKV0PQk9vIcl70YhKWLn+g1DsmCuTcP4leELeSX+Bv6nnUkZeGYLQyQhKqYT\nBc4ST5khSFEMUqDzZqA63d4x1bMTwWyVolyv0mxZisRiwjtkF8DwzIb5MSPi\nyryaMYPwmrqY/+mTbutBlYWvLqzxBZK1A/Ue1VWwVAIDHiVJ+vrN8umVycWM\nA/A81MAv9YXMxAv25mKPB0/aGZdIlmFaKURHocxfcNSuLabekIxluPlBUtra\n70/WmLNN97jNVHM8Aq+n/cEC/ktFZEG5yz4q+cibllpNo2WqESHJ5g4RoljD\nO2xeqK5w6K0VLMdBhh9vYm4jBOYouh1UpVKNPQuUbSH59GNudoiDStwikf0y\nxlcNQAWRRyYWwNz44aU75lyzrG9663pEnss2yBE5KbF2ep/lJ10W7voR+EKF\nqMimKUOExud+b8sfCrQTj3UjZBDQeHl725Lv2sJ/eaK/oQpejN9sOjfAa/d+\nqJh8aWD3GKq3Dj3cZKiHtuFkBqiXO/xtWXzDAtjrbEsWRZ0yzzZRYslsq7To\nAWhg\r\n=U9wM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"03981e4299282d0611d1255ab0076368d5830753","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v12.14.1+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"12.14.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.0.2","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","ts-mocha":"7.0.0","typescript":"3.9.7","@types/node":"14.0.25","@types/mocha":"8.0.0","@types/sinon":"9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.10.1_1595949140695_0.5170589365360347","host":"s3://npm-registry-packages"}},"0.10.2":{"name":"@opentelemetry/semantic-conventions","version":"0.10.2","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.10.2","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"a78c88609e04abc6ba3e652f51d7a83d13787b1e","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.10.2.tgz","fileCount":24,"integrity":"sha512-AaXFy0uR6JlQkDzkCKYiGeJDxEhdqnadAyqiiD0T9p77yjRkCGwydz6/HTp0G80ZdeBZp4w9jZ961yuD5E7lyw==","signatures":[{"sig":"MEYCIQDyw4dkOetEVl9trT7g+pqq+iIWKML1godcz7Bie2isjgIhAJ8HuWnCq3HXBr7w9nt8zHibdMRfnplq99oKU9svP8aa","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":36278,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKJzmCRA9TVsSAnZWagAAi84P/j3bCBnjqCnbQOx14/uX\nOGBa+EU2ZDy4imTtp4svAcHzfP3WEUmGlxwTxfMQvVjuDQvJB6emuk/fgEAI\nVi3Mo5Jh52o6P4LGBhx3dmTVku1p5PcaaEe6XqODbc10DWOjgn1JyDWryT1/\nnst115K+OBdTRm63ucZe5JrtVp0AkPkSh+sYJv+lCxVN3qN0HD7Txt5VciO3\nR+23UnuF91X/9Rupy2Y4/q1QZPYXkQdjPLcNQlUgEZO7GX82YijW20m69Gam\n8NT2TvmnLZmstNPdK5Wvfe5a5aXV4/oDn35rpZCUKw24NotDlE3THXJRPMWq\nhckfDZzKumMXiMnHw0z8IqCcV61O6n9wtvEYDavxygyzGKiniuZkDoPJyShH\nFavMK4r9IpmfXKWfbI+WPa3rgDnepHYhnEpOudXTm70ltTsFy6QN3qoWAIE2\npkTTKKY97ysQGpqNqetyrWn5WAXeUXJ6QJdZNrnzV8CL5RaiR8hNdqPCyP2e\nqXmX2P6QNAuXC1tdKcE+3J9orEWcVlDE4mgbl49fpIukyNUz+icjXDbLRJvK\njoLbNNTNWlHe5bdXpDSnkEBaQXgWRNvKsfF+HVPNAsfchgsjPH+2O8baU/IQ\nd87yeE0Qp87cQdBA+ikq/8wL5JXoMLJmAJ+3sBgZ4FAOs9nsaRZSJdXKutbP\nhjg0\r\n=c7qE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"b247e69034a7888a842fe75e0a5ff06f8bea44a8","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v12.14.1+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"12.14.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.0.2","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","ts-mocha":"7.0.0","typescript":"3.9.7","@types/node":"14.0.27","@types/mocha":"8.0.0","@types/sinon":"9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.10.2_1596497126141_0.5315110455188079","host":"s3://npm-registry-packages"}},"0.10.3-canary.0":{"name":"@opentelemetry/semantic-conventions","version":"0.10.3-canary.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.10.3-canary.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"040e7f582ef892c35541112b0c2230317a581ac0","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.10.3-canary.0.tgz","fileCount":24,"integrity":"sha512-9nXNtH9iUoGQJ6YlFEUG9+PNBu34F93FVGf54tGNqCoOExR4MUVHbLbJjQ+3Yqk0hpFAdA2Jw7/cJaN/cSi9Ew==","signatures":[{"sig":"MEQCIDOkJcSXByshZC4rVJjZrwKtzQ00CHItE2k6v2JnlpduAiB6cfjz8fW1vBC0KIVo/BiWsXA+o5veFgX7URe/A6qmKw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":36331,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLYWNCRA9TVsSAnZWagAA/HcP/0Hbs0PKKRNNYickJ0kD\ndbozzS7wmeE0/CAVU7z3P32hIz6C4orRVqiE8ZSBj3l1jmFi7LMOYqYvjvYB\nCU6RkYC6hAG/RcuyUsmLfqGDCx8KvSMBuuWT3xZkImQArgNt2/Z550C9NwjF\nuR0J8tTnog/6Wnl9lWMsF+Tc2HPNS+FsyksZlYPmaliidQ+SImG+n8q9vP67\nrjUalNapqbayKUq8KB6pzZEllfGCHYFD75aC9bpz/S8abngJh9jawADNNaWm\nO/m37yJyRMCIhJe90y1g8q91K7tdFC/nJy5Qd+Nc3c/+iHX3nRAySJUw71Ov\nZqwplAsynH4Pn9H8EYPqw4FXxke+Zt27Cs3MVuObfyFtB5GtjNyrs2J23ftp\nXYB0RbS5+5LkmnuaZKpxgSMS1jbOZj6wKTpgspKMiTdtqy1OTpGjrREa/Kx1\nC8NnmqKcqyDb2Jfict/J/s4Sdpl+fZnX6/U3ZFYwG3Z3YbcWcJr08qWPyEyR\n8eypViw7yvRetRhszu/r/AxL1P+oIEpyIa+FMxC5gZn2ytVo0YUXeIbGhJiF\n7Myx+togsAulSCaAFQTi+1rT6/0somr3vieKMAiFScQXIjEwC9Gm9+hDg6BO\nU+3zeyYcJpBsWWrcc5CNoTIetIIFW3UILJaGnEfiF8CKWEMjZQ4UcFQW0rh/\nqcoy\r\n=OuCR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"f4f2f84bc087389b3206a2e17837b7b0b95fb2f2","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","codecov":"nyc report --reporter=json && codecov -f coverage/*.json -p ../../","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.7.0+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.7.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.0.2","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","ts-mocha":"7.0.0","typescript":"3.9.7","@types/node":"14.0.27","@types/mocha":"8.0.0","@types/sinon":"9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.10.3-canary.0_1596818829270_0.44010568370877534","host":"s3://npm-registry-packages"}},"0.10.3-alpha.35":{"name":"@opentelemetry/semantic-conventions","version":"0.10.3-alpha.35","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.10.3-alpha.35","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"3d18d512b70c3b35ed6398df7cc8a487f35920cd","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.10.3-alpha.35.tgz","fileCount":30,"integrity":"sha512-dFW6vARWcXre+raTGPCHsDaNS5uDZQLjzWKztJk8wpzj5FEsvE5/ZtKYmrW0VO2aRcwdGlN+M1M5WqKH8dhmeA==","signatures":[{"sig":"MEUCIQDeH24K/oeVz0hZXL5AzR2CjN+dk11ReQRA1PqFyOFKeQIgDVC8cm1Ok3RmAxvhE8gV7OUl/3jYgKOJKCr7J5eEVRU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41946,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfREL4CRA9TVsSAnZWagAAYlcQAJUttvAiARUK285xTnHy\nGD21a5UL2zBStQxu6+UCmIU2ol3xXh4qR7wkrgJQjRLBp/AzQrdvjDq9kHPi\n8Zb32DhHGz/d0cQfkEwysCvcMXbYvw+F30oAjsizsPRpMS5VbAyV4Dyym2l4\niAKQFLqltPGoaaJULT17IBoYSsYqNPht64FfKW03xPfQ70r39kS3lpKHl8vz\nd3NRPYjFSb5kLhfT7Ax9OnDoIBRhgVm1nsQoyv+TWUzWhUwd9a0cRhcHibxb\nrIFuBzmuquqHm7MnxFPgLfbeiBgStX5xqZSQ6/h7H9E0I/KlltMEx+5d8L5P\n8G1/k8oZfjcCCPHoU3ypEEyrX4X/6j+blpcpsBqWfreno5JNSG4oImFZNPL1\nzN4icitWh9YdSQw2aLXM+xYyfsQBLWiyX+fbJ8r6G5sNRkWalsGexwciq8na\nQBe7egzA7bqWd4dPSXX0RdWDsWAYSA1+ryR0lMlkvyfH89cNfq5ID80G2VPU\n47xMK9MriMlw4s4tpU1CiSoL5Vvx4qFz/AYkB3zxpGRulddPlvDnNnEzNQC/\n9Bb0X2DIQUh5kLmSrCWy4J1+u27d8mUSJWVPY2qLbtzsRFVAuJGX/KlZmroi\nRFTv4KklvXFSwYvWUFTzTXJsT88MlG4J6o2zIqy/q3WLNwEuZHlBJ8HVpr+Z\nYVIC\r\n=i2jz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"2ee9f1aaf7b61c4b4ae6b748f0a07f8fc708f07e","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","watch":"tsc -w","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","ts-mocha":"7.0.0","typescript":"3.9.7","@types/node":"14.0.27","@types/mocha":"8.0.2","@types/sinon":"9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.10.3-alpha.35_1598309112134_0.12392498376622996","host":"s3://npm-registry-packages"}},"0.11.1-alpha.48":{"name":"@opentelemetry/semantic-conventions","version":"0.11.1-alpha.48","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.11.1-alpha.48","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"f161d22d6a6c72b778e2f5f8d6811db2e192992a","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.11.1-alpha.48.tgz","fileCount":30,"integrity":"sha512-cG3iq57LfT+Vvj46n0Rc28xYc8/YdbXqqTNaCR/S8ONPHoUmW49vA8Jpnu4xMIwa5l+QiRNI8zXc2QjYw1A/Xg==","signatures":[{"sig":"MEQCIE5i49aDSVRJAC4u3TK8harb+OFJ94I56e8FxdPScQ34AiAEoHdYv65Zibr6ybjJpe45WZ1dfRoXeA5ebqMt52D1JQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41946,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTp/VCRA9TVsSAnZWagAA8NYQAIPo5XbW2rAcnJpj+b7r\nN1u+P2q8s9NlIJZTwBvoAlPIIHeizN94vq1dBeMpNeMiUkWOP0UKkm6pxAF3\neMnFyx+R8uvl18fsZ5w49pOuofm3GQSepfc/EJ79gvAN/8joK4+QXuoOLdyP\nL7xgJcImvZAxBhSTJDAS1HKWhIsIfRXQ9qstxP0QA9QgHUf82yBywL7MRwQU\nQRVcwP/FFc87P6Y/2oJQruDOOJI9sgtZDeKmzWsvb0wXy/gh1JKqafcqPvvA\nGgQq5QNkF9Ym3wbWTSSlO0zhZ26s3DjyYGMxCCNIM2dVNICvCO4VARa6XUub\n0O1v+IkS/pPSOONGYWATzBHthfVSDE6ILomw98W5FN/rUgbst+wF5KzPiTgO\n6cu79xX2au60411yQsyFsWQ43Qz2CJfwK/xdsIWCKfVVOvTmNlq904hNYlFk\nvNbha5VDdAO9fpdEoT5wfc+une4tPnMBvk3On35k/0tYnzuY7m24HXYDYJbJ\nU9rz9R8xf188wGBgxhQqsMdap+dxYcb/3a6kuQ4J+vXSJjdO+/Sft2tu2y8V\n37JR6c+Dg4yokEA/8Pk0TWnx/Ud/LFMjsabE7MJ9Dlp95lTPeOQ1FZ37oEG8\nXualgsUMr+PXRawZJbHYo29GwJAFDJvQEodbp7wblcwVWCk+Is1b8JHaPEkC\nkcg9\r\n=PNiu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"15174c6647ab9863dfc1424412fa60f2fddb3351","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","watch":"tsc -w","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","ts-mocha":"7.0.0","typescript":"3.9.7","@types/node":"14.0.27","@types/mocha":"8.0.2","@types/sinon":"9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.11.1-alpha.48_1598988245275_0.680701800189436","host":"s3://npm-registry-packages"}},"0.11.0":{"name":"@opentelemetry/semantic-conventions","version":"0.11.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.11.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"9d2bb0d67620bb8c01c95174fbaaefc109189963","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.11.0.tgz","fileCount":30,"integrity":"sha512-xsthnI/J+Cx0YVDGgUzvrH0ZTtfNtl866M454NarYwDrc0JvC24sYw+XS5PJyk2KDzAHtb0vlrumUc1OAut/Fw==","signatures":[{"sig":"MEYCIQDRFdeODmnCmCS26BFG4xxJHaQB/QgxJUs9FmBfH9q+ygIhAM0LePdAvJkdEdXxDguSx7o0nDmS3XhUKtRlhiDUmgsC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTqG6CRA9TVsSAnZWagAA4xIP/1zwqLHGIePMRhq1V+wD\nDGM0ImUfcikmRUoKnnNNvUmUUYf4hxX2Wqb4wduqZYkk+MNu7EBap6mL9l2R\n3Co5YKJBUyDEsiQ4UpLHaMUHco/Gw9Bi8Q+PsKse+9QN6VKvsRdh4mcVo30V\nQtQ342T2zWCx9sHwrg/15A56Ay2vcLZexRg2+nIi3QiwVEZsxlQ7mEn3JooN\nfs6YV+AwxQFJWJtQGqZNpHhHhf3tfvDG1UUJTe/RIZMuA28ISFS3d3YhMicX\n1o9Vklhsu+DlgF4ze+JYORTxC0x8KK6PWMT3h524jRl3xKoQapFh5+muxBDa\nOELSvvKfdtwe8xHgvISG7Iah2jOZ94uZArxQrhLGouvf0Knpo+87UfVDxwLf\naFQ/aBSDNe1Vl8xcx0FcbpUWot/tSpKM4zB+FuB4tP47a5Lb9hY2O60xCb5m\nuadbf/ixJ2JcopDa/MaWrqo7flBlBBxGukL005RFJ0b3zQpLdBYKFRL8UdPS\nGzd/n21/s/cFCWuJlW0uuvhY4ymjplBsfh10Rj9MmCYt0Y5Kl6m2A9t1Dibx\nSqC1mg8WRXw4KA2udZ0aVcZlq3qlz6o3V1YeW6JXs0Aq/tBh5qzKxvWyJkyT\n95Jr3dO+7uyliObA/z5svUHd36S7PUyVcxQ2QS9DhpotnoEqdX2lUVhywjjH\n2fZs\r\n=WrfF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"15174c6647ab9863dfc1424412fa60f2fddb3351","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","watch":"tsc -w","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"obecny","email":"bobecny@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.4.0+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.4.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"8.10.2","ts-mocha":"7.0.0","typescript":"3.9.7","@types/node":"14.0.27","@types/mocha":"8.0.2","@types/sinon":"9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.11.0_1598988729749_0.16543346634288647","host":"s3://npm-registry-packages"}},"0.11.1-alpha.36":{"name":"@opentelemetry/semantic-conventions","version":"0.11.1-alpha.36","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.11.1-alpha.36","maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"26adc849538a0001165c7e0f2fab34c369c5e08f","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.11.1-alpha.36.tgz","fileCount":30,"integrity":"sha512-VLM1ZaOs60sn8lUnAm7yER1zfBhnvXzGZLz+DyHCi0bXHaJYeLG91kqmFBvAVFRGBg8djlUgUlIDSzn8iwXZTA==","signatures":[{"sig":"MEUCIQDgzgbicw5uHwcfuzQFoFqd3OP+JRwBD95ov/IrHJhmFQIgJml6Zczj7pqgVkVLbEpgjELdtUjvRG28gGzCgv/xrgI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41948,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdHxDCRA9TVsSAnZWagAAcxYP/1TbunFravY4EBHpSIRf\nFDzKTGhMXls0Rb1DH+CjhpnX55w10FMGJd6tymk+6dY/CzbcI8/Fzc2K6KE8\nZOaqE5R1mtmfrsLksubZYdip3AXzJ5+ck05QY57VO17CtAcaKYrjTFJg4OmM\nVXtRE30yjFRva7XsjxUxgLUfHAbIEnJ7mj9ybmcoE0JtLrMsojIxVaTQ6k0D\nkCwFNeHq9yCPfg/fx0b0x8/3FkYb7XCJn/rOK8f/18hBaJL7aTMld3WdR/K7\n7i4yb3+3SgYfpSWdPK40oZzTWcw/ynpnaQJo+mR5fYYtwp2Dtfd1NdcMg3qM\nV86+CJ88x7zyWaw2mSMOpWgpgdXUc0+dolKOs+69NDUIB+TAjDE9u3P+z+ZQ\nxBHrQDwhe3DoWuFzNSTEVppvtGcsKHKnHX/T/suBK1I2EIUnAX8kjI7PEfse\nvTCWMpNlJqopdJWCFCun6/ICjENfB4x5tsiznmaD74kfSlNWOvxHivzP/+aS\n9dlw2x47/hWv6dNoRkgLRkPs8PntoAH+zrDcMyHP3RLagqYMxhsszt3aeNLM\n4kbTyG5ezOFnoZ5q51fhFCMz3KIdVyXzs0eGNIOoBtkLB6mbq4Gec7Ke3B2Y\nhQhXkZAcxLTgml8sryNTfaMD163gBrcFPh0fBEVA/WRWIhZmrzRThHPD0s2A\nJEWk\r\n=fszB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"6eb157c66925fe84b4960f247a86678441f3cb60","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","watch":"tsc -w","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.11.0+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.11.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"9.0.0","ts-mocha":"7.0.0","typescript":"3.9.7","@types/node":"14.0.27","@types/mocha":"8.0.2","@types/sinon":"9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.11.1-alpha.36_1601469506960_0.02822095039317496","host":"s3://npm-registry-packages"}},"0.12.1-alpha.54":{"name":"@opentelemetry/semantic-conventions","version":"0.12.1-alpha.54","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.12.1-alpha.54","maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"5ff66b4396291fa1cc53a4160b777a83b8195802","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.12.1-alpha.54.tgz","fileCount":30,"integrity":"sha512-lVvlWfWjEf+YR41rKMF/IEdYAYZ/0+4xi373t7pDUwS0DdpEX7wZ0bQVcihRaULgpmT4uGi9MDoowqGiu+24DQ==","signatures":[{"sig":"MEUCIBPGGyOOfbneAYrUUucfS5Lm/MZpqHDfuci3KhshYFhKAiEAo+k78udXnx0mkIs61Lt3c7rnAZ4ucFgX5BK51Pzzjig=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41948,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjYtmCRA9TVsSAnZWagAA9W4P/1yiXCOpAeUU/V54+Vid\nEiUF7yyzsFZjAC3MqaU80kkc7RwNXzivKpJsKlZ23yZGF8TKxUUgut24TjOO\nJwnt2EeOP76My+TIAnmlq7iIV7vzXvFmIy96u8v3uXkDZvicf1srIDG5OQBk\nooLJtdBvzOmwMpbjqRFdHX0W+MO3TcDeWHynNI0pN/5/RzXMa4X8bYr7mi41\nr0mT0bGDuYN/AjoG/r5Tk28y0EHAnNNkHEbKuk4NjqYeAIwKRoDm2KsZCFud\nZC1JaQbsoIDSPq32CHnzB8auuWpH7HJeYQtS/9vS7/truiLW5n/iU14+1KkS\n9UKqV/KxeUpHsg1nptEL2vMHfjAKZDP+PTR7qIrTANJ5sQHDO6UJXl/0xZNG\nTh4DqlNnbaayqm+BxHJTVy/xbsly/abZ08wfa4McRuX1nVNhx7c+tb8TV5yt\n5z+pH4/jZS/4uaruN7lRwBNniK7swJPWWUJ1SDcKLuxUo9/BvLbGlogNjUrj\n/9SqioUKrp8ap+4RT3rZDKls1GgJqfTtdiiOauL6Nbdv6woo5oTDdWx/0TUg\nQISIe9uqTDHLsdnuvnd33HQFppwiL1P27cgtaALn5rG2xIy2jgfoCQ8kN6W6\nMpu/wgeaRcISHv/p4aP+6kh495N4j+tO/bNxKFYXzpCI+SXCOXS4hdg+cH9V\nH4JV\r\n=l4UC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"3f72613a36b6f97555a0fa7481755cf8b6cce1a7","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","watch":"tsc -w","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.13.1+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.13.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"9.0.0","ts-mocha":"7.0.0","typescript":"3.9.7","@types/node":"14.0.27","@types/mocha":"8.0.2","@types/sinon":"9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.12.1-alpha.54_1603111781716_0.7395246488938914","host":"s3://npm-registry-packages"}},"0.12.0":{"name":"@opentelemetry/semantic-conventions","version":"0.12.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.12.0","maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"7e392aecdbdbd5d737d3995998b120dc17589ab0","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.12.0.tgz","fileCount":30,"integrity":"sha512-BuCcDW0uLNYYTns0/LwXkJ8lp8aDm7kpS+WunEmPAPRSCe6ciOYRvzn5reqJfX93rf+6A3U2SgrBnCTH+0qoQQ==","signatures":[{"sig":"MEYCIQDsOmjWTuhhGW/H6k9SoX4S6q+ZxwDV0KPDr814reZ8uAIhAO4lojKCoZAGt33Am/tvo7Zotv0RDHS5g3ZJAC5nx+6u","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjYxNCRA9TVsSAnZWagAAu40P/13HclsbdYxvUzpPIby/\ncwaLwB/HYBF2uX4x8JBSIj52HfGukk9SzFF+tMI+kvbKaJ3J8V0CDk5YdUqO\n2wkBPRi3dTfDt7QWWcYZ5LJvThBdFSXDrxAKi2lW7vk+lplbnQOT9toihx6P\nK9gIcmKkM/+1UZ8JiNOFbpwW3lAkAv9KgM3JoRhQ6ndc6JcN+cj2U6XFoNCD\nEAXQk78gEanA4FSND+mhJyXbcKOY8eFEPm/0BGZ5Td7vWE4zZi/f6GpgUxLf\nmDg0ec+rCoQlpRSo01iwlEkotD3UzuZEeMWXDcdVBZuQfO1DEZNQmpH0VLwS\n/e/1mava3+2g5XHulQDBt129mriqPai2s5/kJhJk4ol3qbfSLHK4Bz5wLdT6\nFo/fvHiej9iu0efWc7TXAeNw4s12fAjKfugzqhGOBrkH6+FcbnEFmC02+lkI\n56HKjfFDHAKsYinpAbhEOQ9JJUDFs+IvhUd3KuNSnCjwPLZay2FbwSmEzNwa\nHMIGV3u+JmzCTT4u/9FG33jkcFGC0wuNTNW/MZqHO+XdA8OUkpul6N+N8roo\nV5wX0d3TNbvgJLl0F8GL/hLgkSz3a/ROn6Gwoep0bNiXVHNJ/KZnu6JNDkHl\nOgXBwj0c9HpobhO0u7ct7pGpydFEqi2554PdmDAVHWnOLqJaO0XaakBikbN4\nNbxW\r\n=kDCS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"3f72613a36b6f97555a0fa7481755cf8b6cce1a7","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","watch":"tsc -w","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"obecny","email":"bobecny@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.4.0+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.4.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.0.3","rimraf":"3.0.2","codecov":"3.7.2","ts-node":"9.0.0","ts-mocha":"7.0.0","typescript":"3.9.7","@types/node":"14.0.27","@types/mocha":"8.0.2","@types/sinon":"9.0.4"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.12.0_1603112013355_0.012556453559696479","host":"s3://npm-registry-packages"}},"0.13.0":{"name":"@opentelemetry/semantic-conventions","version":"0.13.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.13.0","maintainers":[{"name":"obecny","email":"bobecny@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"mayurkale22","email":"mayurkale22@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"12269a15f160ce36345bdfc0fb307ba0184bc52e","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.13.0.tgz","fileCount":33,"integrity":"sha512-alkZh6Bb4bCJeTb2js2WYSGmO0qrHynA2FcANyEohX4QqezCbO4t2z0V/KopjDj201WuCY1lWoefgeZ/qnkCQA==","signatures":[{"sig":"MEYCIQDve4nOFwKGsn156RWrQircNi6+6y3A4t38/I7qkmi9QwIhAK2oKh1Jss6Ysm5tfuXxVkL01ZiqzTVRrkVTfFuQb0Vd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51277,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyqlwCRA9TVsSAnZWagAAkuoP/inGzAzyKap/Ny1K8L/n\nNZR275KqEvYa4cPeZ82GAy+ztARTns2rUfHVs6Kr1jG/TuaRI1mjnrl2Tqqd\n3S0HorR0NMpmb3VgrzIVryTj/ybt1qGqwMHMHVQi2V66w6/efzGyS6CAmSVV\nkIPcGV0wWxm4L+Dx7iGorlKSXVsSkr89PnUKjSLUpRNQhmnEiCx2A29sC0Ef\nrwe9b1lHvgpEdsRwgUYpoWD5tW1PZQJVvOlY4ONiThiXMvd6v8g6szhk+GZp\nqpggkIl9m99K0hWawRETW9BhA0U9t1vxz2i8wqBr2g+/1B42YJ2AtMwG34jN\nYNk+tRSvxrLpQhhR/sCMEMudrmwyd/ZAZKr4l+AC9v0qZGdkx0fc2LgvqEKM\nZASXdqpWmOgfd2GHWT99QqdTsr80W3DcPEPf8Uw19GhB9hTfmf1J+Rqhs9K9\nM4J//FnM7WQnzHTNULsK5naQiHJCsfcnY+NyB6uqf/RQ9VB2rPCmc+hSjznV\nfqENHeyAFBTFyUVOAHUvSvfIwfMGWrvaJMqanrXNfyOkWG5jM32xyDSlcIZ2\nv1h1T6n0WhrgBjK1G6k9X1i4cNRSF6o+qQPvjc7vOfLh8VTtBdDZdc7XCQmh\ny5fwi8hlOWTt6pgfdhfpo4WZlIopfSVwfzRMbJ8WJdRT6SrEu0i/uhJYdORF\nTNCr\r\n=sx5b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"86cbd6798f9318c5920f9d9055f289a1c3f26500","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","watch":"tsc -w","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.1","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.0.0","ts-mocha":"8.0.0","typescript":"3.9.7","@types/node":"14.14.10","@types/mocha":"8.0.4","@types/sinon":"9.0.9"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.13.0_1607117168013_0.5474321269710216","host":"s3://npm-registry-packages"}},"0.14.0":{"name":"@opentelemetry/semantic-conventions","version":"0.14.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.14.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"7b48f4300709b34cef0beed8099b79e4a5907886","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.14.0.tgz","fileCount":36,"integrity":"sha512-iDGRLQwo+ka1ljlLo4KyuUmzsJwtPw+PyCjetQwn3m/pTXjdyWLGOTARBrpQGpkQp7k87RaCCg5AqZaKFU2G6g==","signatures":[{"sig":"MEUCIQCl9ISYLlUymJr/170Fq6ze/oxOtmX0tj6Wnyoo9GsrGwIgAalh5vIc99d4cedMwNzmfac4F4Y2PDmIQ2g3My+yWRs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":60877,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf28UZCRA9TVsSAnZWagAAsWYP/RR+KRrXwhbhAh8Ldkmp\nad3lsrVA0xxvvO0hT9/by6S642vEVJlhoRFpFGDi/QXtLI1iiqVE3IiKnj+X\nCknMuWiA+/IIWeHQMgaq5ZoKlzNLAk2VNOXZmtNv3a0J4FSwKNMeTiPO2md2\n6CRgY5w1Jy/+MrfBQp25MmI7zt4jfBrSbOV02mka5K/XN7McGWkGV8CxATSR\nfC2RndiUdKThtV0SrPOTyx1fKKgoRtpjzo6c9bKh1GW+BdR5dkAsKishxSLW\npxv3lFEtHye0hfdO4c6N1Tj2oqkF6K/gfbHKzMGQnPCcaQjicjrWIdfG48uh\n41FK6Zv4SGG0Lph+2sibas4y6jkS1ssU0h47W44nGRHoJcOI4hTXykzmN6AG\n9x6lx1dPF3Eyfa33wEVEpVmFW+rrtHxee87y/MHiozlIKN1GdHshh9qYpw6O\n82TdrNqataS698GbpXixAfeN8N49tNYJBkM6rarV/Oq6weMGPqri/685ufL5\n05zQLLN7PUEyuZJLrw0kZBZhmi/zOA3/ImMRgl7Be3ZpUynKrU4go4bPKDiN\nGwI9PrHrrbTbMUWAslJZdXomTHX4GOP2p/iSa/jDZHeAwbbI3MdM+xnxe2Ll\n3C7SWrpULf0bRvM4PQbWcE7rcCmczzFJvnB/ij/QpHuj0ptTay4fP3gek9Yv\nPDA2\r\n=PO0y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"27a8d4530c56257c191468b073669909bf8892a1","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"rimraf build/*","watch":"tsc -w","compile":"npm run version:update && tsc -p .","prepare":"npm run compile","lint:fix":"eslint . --ext .ts --fix","precompile":"tsc --version","version:update":"node ../../scripts/version-update.js"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.2","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"3.9.7","@types/node":"14.14.12","@types/mocha":"8.2.0","@types/sinon":"9.0.9"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.14.0_1608238354996_0.37016037637721433","host":"s3://npm-registry-packages"}},"0.15.0":{"name":"@opentelemetry/semantic-conventions","version":"0.15.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.15.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"1ab7cdd42412c12da6646415e1a08c8276a87a9c","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.15.0.tgz","fileCount":36,"integrity":"sha512-JYHR5zZv2+1bg//mx6YE6b/gQPs0zGqjD0/4dDwa9x1Jpo9T18h480izqMJIlu3JZbXwlGm9a7PQhMKsLis63Q==","signatures":[{"sig":"MEUCICnkKXeSZ9H6Tg6MbjpiO1+2rAtKmGHgnZ8Dpr5g3wkeAiEAgufydmt/lhW2b8/b4eho0FC73SkM+yd7TlJNQzSNmTo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":60797,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCf4FCRA9TVsSAnZWagAAQgAP/3CADWs/63Af++1PUKht\n9EbhUXsVYkXgVdzRzDfRkGK8ly9z1pm7qPr/XWiz5WiKCtVV14uqCPrX5HiE\na7oKCY5giujI4x13WFIVl1XSmQgvMDLshr/OIP6pKMYA2XWvflfMz3fedRvD\nw09S/Js6d+lZR2q4BiB24Brsb/2TNfWzxT+opCozYvX4kA8h4txxsp7V3HD4\nYFgy5q96J4kShavqv2zieIO/rLVO91d4nctgHcsAsoG/AqrJ6ur8kbKWE/23\nsfH41/DTMDVINbuU8K8NZHSrzKCjrbkaVS43mzlQCBwe8lxvJSl2+FxUpZss\nAFXjLtWb3h0voyLFvbcvtDOR5mmqiAeihmj+PwPstOxhMEPDsn4QMITyDrO6\nempRY4x7C+gOHXLg4EAgbKtVr2NsNsbU/1iy5+oH7RjcMlUjuC84QdkusGPD\ntnPJlhsv+RpHIaIOLUkoaKY24J6M5MO4mNc8D7IwVPf1J+6NAaWL2VkEZ9gn\nlx3PiF4mZbGx4VYIm8TK6NH7PMiONHBLUX3N3q6qSD013M+98OBwQR4rRyg/\neEUd0yqensOOnfPiy4ujNjLeoKgZ98LdnTm2fd18OO+CxWJB6wXLRNhkqXjB\n9olIwN3HdL5azR2rvf8jLpAotaFK/wxF8r9INeg7mAxowCzO+3rYUiTsTiZ2\n4l8n\r\n=icss\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"960b868f5b7686eabbf49190071b8463551e5d8f","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"3.9.7","@types/node":"14.14.20","@types/mocha":"8.2.0","@types/sinon":"9.0.10"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.15.0_1611267589214_0.022737145272430315","host":"s3://npm-registry-packages"}},"0.16.0":{"name":"@opentelemetry/semantic-conventions","version":"0.16.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.16.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"7a738bd4fa3e8371d133a819614b4b57bb66cce7","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.16.0.tgz","fileCount":36,"integrity":"sha512-RDYLf6lUtikIDTr6yVDehsUAlNb1U680eOV1QuDN0w6FDGubTnjbADlgpF41ByOow1Jp/WGmynFfOh19Ix4NWw==","signatures":[{"sig":"MEYCIQCL5jdUEnyhZ7HwV6zxZCI1qjybfPDpeLS4VMnD94bEMgIhAJ/ENyokNs6BIJR1Lqd/pliSiDvJF7lxp/Um/IWVZ5Ex","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":60634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGIGmCRA9TVsSAnZWagAALL4P/0SF8hodSfjMbRj91X3p\np6qcXZ1VLjY/E2d8Z+DOFWD0NhIuaa2K7JxMdYmxUQVaARjLKp0lXUg+nuaL\nPQHmCEi3fnczAYlvvJL0E3swh2baxi4MhzpY5/1Bf640mI7q4sbloot32yKT\nqJWcsBKTA1zezoA955gfEz0Co36aJsUfed8NOsj1ZrzqYbOxvJNvtqw7e16l\n6LL/ZzGRPg3YuXimFKyeT5AbvmZiijyck4YqQcfv8s+hQJ1mDwgFJXJ4+PRj\n6lfHgPxIob/TmiZWbegNtqQ11FJafmLCxO9byF+YYFuEc6STSDhO56cEpAi8\n5a+BZzckvFvlpIWo05BCTMuCnqxENI4IAqZGem+AhrMk3vkGH3VTYYwU1E3E\nagMVArepYaaHa7xJbBKKLpmAf6W8cuuq/7En9fcq6df6YGMMJBCF/Er92mTo\nSjX5pF2OK2qVxlwtYxiSfSs7r2ivVD/q5LCxgBCapRM3pDwa7P+DpwBZrLx8\nr7IuSGf9KpahJyF3NR7Ut16uLZ/SrXF10AVLCtmD+oV6YZrTd2GtCVBHhZh8\n80xf5C7fzXJA7WEsDRKJo4jw0e2q1mnaAwwCKaBjHYh20GyDcyuPDSYVUXEI\neo27Ljb96Liv96P43Y0HUHraqaFPoqGgp2yEtqfg4020jbpJct8HaOVYPPcX\nd4vC\r\n=t2LY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"e68863f8e63854b08ad13fb54677294ac6d6b681","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"obecny","email":"bobecny@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"12.19.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"2.0.2","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"3.9.7","@types/node":"14.14.20","@types/mocha":"8.2.0","@types/sinon":"9.0.10"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.16.0_1612218790210_0.46371443314416294","host":"s3://npm-registry-packages"}},"0.17.0":{"name":"@opentelemetry/semantic-conventions","version":"0.17.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.17.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"f4c0d5121c89a9638266b5f34790a60cb90e0152","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.17.0.tgz","fileCount":36,"integrity":"sha512-WtFcpOv1IHaI0kT2BaZcA6/+fkx6pWyJspUKBljA3HeNDIQgYGB2n6nL/6eaZzWNDvDBHzFEzOKULDJdIwGRlQ==","signatures":[{"sig":"MEUCIAO4bZyq0Z6aywxafK+sS1aG3ft9XT7sXpKj387CWJP1AiEAwaQdBq+Ue1KYda46poA+lNzKkknZPbNqn1z195pnr38=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":60680,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLYeICRA9TVsSAnZWagAAa+8QAImieoeIErT+EHuDvX76\n+PpKcZIcMx13tvs1JAfOxKM+IQqbbdCmqRyeNWPUKKK0hz0lzRBAILR66iWV\nnLM+iS2lg/ewrZ9Fu8M+yd8oV6r74AJHFcCI+ThiuCXIIWR8NKTsKLxOKhoq\ndMVUCKvhVUGEOGnVLVPV7IUsuYfbXMV9qQJaEtJU2FfhH6k6PoM8xnsZkDoY\nUvZaNbUPgrb16yubdjq+njYp1lOG8vH5uYExnpKz5pO7mMnxVwKxHBp8NP+h\nFkgkX/eDO2WGnCNvjCrU5IkwhvsrwugKiGYxFMv7gAKm/WZAFFM9M4qRrA+/\njwR7F4ae1lXyQsn+wf+45+NQmTjznBzvkHUzq4UL8wZDNmeziu43Vm+GQmIV\nqj95ZwwmXs78sFSe9d96CGxX1LDXRXHS5jXldNrvt2yaAgUut5WtZrah3c1s\nfeSd+s3/w4KCD22jx41VpNui1KrO6ur133+r3PRFafmROx5lYvABq+BbWCpR\nLkCNG1uuFlsDBz6HnA6DtIhZnwY4UdUQ6KTag31P7AwjWHw45q9R4MTT3+g7\nCFDItc7QVSroATdNkAYutlj0VHiWqfmaitYHNjDjmTDHX0tSRTCBI7ltZNWR\n3QyokIXByxs2isUtToDVV3X58ZlUxyAU+TfMNtJOsc8LrwzXniX2K+CiVwWh\nmJFy\r\n=z/0s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"a91ea7617f288af632934334d0c8ecece318ce73","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.1.3","@types/node":"14.14.20","@types/mocha":"8.2.0","@types/sinon":"9.0.10"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.17.0_1613596551840_0.0444643244435452","host":"s3://npm-registry-packages"}},"0.17.1-alpha.21":{"name":"@opentelemetry/semantic-conventions","version":"0.17.1-alpha.21","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.17.1-alpha.21","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"a9b86d4f012e0c74a5a02bfc3c966a3bc721244a","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.17.1-alpha.21.tgz","fileCount":36,"integrity":"sha512-Nk3WGmAJXm0MNtK0jGshw4SgA6jl4YvoJoqCtUvVB8j+8hZAyp8au/R+XunpCYKQuQkeVJNntWLO5WjnCJHkzA==","signatures":[{"sig":"MEUCIGTQ1O1zT0SpV5A4pzi7krIxDAuyrcAtHTVosdf57qjyAiEAhRalQtIvQcCmvhGoq1pVR1nNb6/R14f54kaeyLRZv3o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":60698,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLYerCRA9TVsSAnZWagAARr4P/2QQ7UeG5votzxdbedWC\nvJS0svklpkYSlmhFAtCcLH1UuSmBTZdq0dHWR7DKG6dHiGu9KzGBxTtxRdbe\ne3lnimKbwhHH+Mut/zpTsCFd9HCt2B65M4g120/KESxVGSxvnwAay+4WyIQy\nOnUhd/5fdqBdHtqfuhnyjm6tZoS97h6eDJ+Smcynwr1+1Iorrz2WE2hp6fv7\npfuv5ob3R+g+IC3J8GsiYPml8WvebgaEN2c1MQuBJZHi5GdrRlYPE1L4BVoh\nPCxlKN3FjxYo7l8gW+X2mNRxh/ii8m9fwALlAYZOvzv+kJ7auXFtXJnmgVzv\nhTq5VkoNeWEhP1Tkaf5vzk+lmkJ7gpOxZjcoRhiPRIyxXioWG5PKsvIatjq/\ncbERuX+g5/daQEPdCRALiDT3ANl76LQJTTSBhlh6W7qcH+g/FJh7uYo4VYNS\nYqgMd551kBJp6X3pV+gVpqSEw04n6ArHBuwanjqT/6I4bUym5oW4jiszY4XL\nXO9QZx0PVMBPICCQ6Wlrwymcu9tfFgh7utGz88RzBvwssxIC4Bai3GJVGoDO\nz25U+xjt3VC3ayiuw5nI6r11DWh4394OJNM/hCcVAlcu4PrmROwMsDXNhOBc\nfMrcM8Q7Io9C3kQPiYM7JKgYtlMVHJAPOhn2eROPPlmpOYkkjsfIoqaiz1B3\nACBA\r\n=qaUN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"a91ea7617f288af632934334d0c8ecece318ce73","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.4+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.15.4","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.1.3","@types/node":"14.14.20","@types/mocha":"8.2.0","@types/sinon":"9.0.10"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.17.1-alpha.21_1613596587531_0.4512703736820274","host":"s3://npm-registry-packages"}},"0.17.1-alpha.11":{"name":"@opentelemetry/semantic-conventions","version":"0.17.1-alpha.11","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.17.1-alpha.11","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"71a4e60578a16e0ced0725e9d23794d57ba6ced7","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.17.1-alpha.11.tgz","fileCount":36,"integrity":"sha512-Qys/DEP6Xd2oE4fYrtF+N9Es8f/tAVqBZa1nQt8/RFMHzAGXtSv2WiecmTTIVM6x6JyEQDiYBWn3YE3uVfVPRw==","signatures":[{"sig":"MEUCIG4+UaSRAjpxUeNduWcmc/MLDCFSkw2VE/oWNaD9QWsPAiEAtbKBZ9JYv9W2K5gnJBexs830V5V+MziKyq0NKD81zCk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61782,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPj46CRA9TVsSAnZWagAArUgQAIFKIn0XXRSEsGFgOhFb\n6ghzvNZVdKQQMckKgH7X/7Njbrlb50HmE/BFcNXTYk68bzW7o/eg22BVGleb\nGngdATceFSi8tcW4/7P40cX3ej8Hor3M4DV7divL+PnBIP2WDXfSZx+7l0Gg\nxWuim7fN68RJ6gZ11yEmO5QpYu7ZSbN0YwvT2G1wopVVCehEwf1XwzDZXKNP\nwDBHqEM6yFjpqYsNzmtdJc7Y3kgRVgi20lWQa9Whn/ZnXM/21jT+X7Ks/jN2\nXivYtyzacalUqrW6R1JS3gMZniSSH3VjU8jcy4nTh6KN0NNauxJ2b1QEwqYe\ncdXTrZOxLBYamb2KlBd2pdfwDwtG3TdnVLARvZs1nRRNo+1w0YxxPsAl5EoM\nAMqy/7Aaz+XHuFJpgCff8lCnHHYuUKFo4mPd3RZMMtZ5Ie4Y91/pW2mT3/Ib\nUJSoCKfaW5d4kvxkKChnLwCezp/POSqtXcCbJlwmsouZStZrdBBpjkzEXWuL\nPVL9QmqUn/6I4vyfP4oWTp0mgwvipmXmygKQW4GLpjhhEgwp38bKmWjBu+hT\nKoqWJYEyb4kEykOs+tPP4nemFJJCybIbuH+0YJ7FyYKSrf+KlmoMqQDgtZNu\nObJWBW8UQS/nMAL5gRo7w/A0EderZAl5vJF7yowGDyeWoHqAwhpA3ueZhgmU\nK6j9\r\n=BGuf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"41235a9e68b13050ad49b8d6abc5c868885a74fe","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.5+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.15.5","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.1.3","@types/node":"14.14.20","@types/mocha":"8.2.0","@types/sinon":"9.0.10"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.17.1-alpha.11_1614691898155_0.2059908909345083","host":"s3://npm-registry-packages"}},"0.18.1-alpha.12":{"name":"@opentelemetry/semantic-conventions","version":"0.18.1-alpha.12","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.18.1-alpha.12","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"d9f89122e5881058f2d251e21ed11f01dd3a8ce3","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.18.1-alpha.12.tgz","fileCount":36,"integrity":"sha512-8aBXooo/PDDPni94VaZE+xrtEyS1hTeMFUxeQU2+ggG4+Yld0U8n4PF2qX5W29f+jcZwyK5QzJZKBMqQGufVjg==","signatures":[{"sig":"MEYCIQChp2lYMDH3iPqLcoDsQbgD0tT6lziSITBRSk7qTVL7iAIhAOV+fEM7gf81vjM/QRHI0LUdo2A3sqvIkDgQKZCOmklN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61782,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPkNsCRA9TVsSAnZWagAADCUQAJsGIUlDLHdMxsbEKYiB\nQXhkBdi6rl6QXwGI81Ugy+z5fpay4IbiLYqxCdzEv3tHMMadwXsIxqN0Ae7Q\nuad2+VdyiKVfLO/2+sCl11HB8COADevxRy6ZXZyKzyYTgxl35weY9AjiW6EM\nru5jxAfsgcT2bzvaioeY7gvX55XYJkf6SOhekE4hZRFw7+/5PMk4aIBFW6UB\nHZ7IJbEag5nmK46A+EpbnmjRdolugYFgTnEkY5kyyWFnZKkL6ri10EA3w0Vv\ngLDwopNbBlWLGICskbDYaXKcN9xE+Nr/bGOleIXvxTXXMCnZUWxD/KuX6yH6\nKb8LeKtfnILydw9qXxQq558wDRzzTlBRlVA2KfOrR82W0qkiIkd091BY4p1T\niZ73UuoUe0xrvh8U2dVIRXRawyEH3+dlbAQcxVXmnYDFQtPSwm3jPzooaV1X\n7mZzBaFp/6WQqFnsgnpsfBEKEFgOwE+D3BqSeOqe63ql99i9Fxee5i/XJRWF\n3xYLc5ZyNSI3nrtG9E8hEF9Znl0fpkbOIC0j5wdDaMEUIIY5ywUL6wbnFwMR\n+H5eOiiFFnAPVHuolPZMAA8a3VKKKsn05klskxkNA4oihjR8TTFNOkQT4uHq\npd+PWxaeaiQmp85Pw7XXD/nS8B5xVbVMGouicSq2TFvamw9V2zSMgs0JvAHv\nH8xa\r\n=kL82\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"6540b54a8bd49746e164ab730269188237f89b1c","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.15.5+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.15.5","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.1.3","@types/node":"14.14.20","@types/mocha":"8.2.0","@types/sinon":"9.0.10"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.18.1-alpha.12_1614693227971_0.7227346629756775","host":"s3://npm-registry-packages"}},"0.18.0":{"name":"@opentelemetry/semantic-conventions","version":"0.18.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.18.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"169d05965dfbe75636bde2ea888cf9be2a404e36","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.18.0.tgz","fileCount":36,"integrity":"sha512-02Wi/zFq+RWfY4llRicMashGhyZvUtMfXu9UlfXMJiDbGOgkdua4AeOCv9lDqv1GIz11xr5qS4tFjLp7WnlU+Q==","signatures":[{"sig":"MEUCIC5Flob0tKVXWwnCJEO2td90twmRt4h7CnMcVOI1IhTaAiEA7hGxnkmUvG8DQdjhj516wBPOYzPo7VGJS/xNkzbeS9w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61764,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPkUaCRA9TVsSAnZWagAASY0P/RIlaZ7DgPkC6AQiV95P\nIwafxrzDMsQR9D21xt85Qg4bdCdYtSy0vd8l2OWMUPEFUigmZoLLosAT6zj7\nqcvXjCEQklyHCbTiYfJxbe9rN8Wevxlyy6KnQkkUlUBzfFRgnDFlVvTuWaxO\ndd+GpF3vJ0BF7sc2GgCMvTPiuJRgcf70IqufJ0D/Ys2CNNHRR6GhDEu8iSOJ\nk+rul9d5GvPWyibIcQOHPAv/f1QLny8vV8so4QHxeBNIl5RnBqtiwhflqpGc\nj3mRyjpVS62ijp0FJEwC2HXFDoYn1UhuKdS4tkyLU68DBZZy9RWWIkViCIro\ns0eHuzwrYhanpNtNUwjxIHFoOnpXldMjuWhcRIuofiQMq8C4I2BN1FUBJDlu\nw5IN3YfGkN2ZfeOFo7gjTDZ2q+DhO8iFyTigZrgcmu1RKGcP0ErfycV3NakT\nhFhFq5iQtocAZSR2Vlw1WicrfkP8nAnMlpVVK4NpCY3ShTq4Kf83IuAFtm8r\nkYqxR9hKhNNZBl1tCOfRHKOuEpo/HJNlzO0HQW7jDyt6Tzhnw5hC5C/y/kRW\nZJqdli2FuiriYY7f+M5UqVgesX5nsXMhQb65Cq4vYbDVQP+AWOTgnXqCGv7J\nzE3U9ZblLja/mbfpCZ7zzbB+AXjBujUrlmd253A6XJHB7DJPnZVTptqJWoew\nSie4\r\n=073i\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"6540b54a8bd49746e164ab730269188237f89b1c","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.1.3","@types/node":"14.14.20","@types/mocha":"8.2.0","@types/sinon":"9.0.10"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.18.0_1614693658411_0.6614189413186446","host":"s3://npm-registry-packages"}},"0.18.1-alpha.13":{"name":"@opentelemetry/semantic-conventions","version":"0.18.1-alpha.13","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.18.1-alpha.13","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"baa5d2e9a8516d332d259f53ff2eaff1436870f2","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.18.1-alpha.13.tgz","fileCount":36,"integrity":"sha512-F69Vi616ejiplcs6zIVqP4hjiB88JS6GDLGIzmEsWh4zwBJZPc+vh/2+RhX0mF6og6XN2qTAxz50zlnUXN4hgg==","signatures":[{"sig":"MEUCIQCr3CivUfSUYORUWUL1Bs0m+vzI826SbQOPWw4bVd4LOAIgJ/wqZbl+/GplyZl4DjUgo3n1q5TGt0riOG+2IQmpK/I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61894,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgU38LCRA9TVsSAnZWagAA0UQP/RC7j814/PSmtVJEH84q\nB4qRGAyuQv1SRZltYDJpy1lVEU4nAI7XhdTtfAOYnGtFQIs8vUDtZBr4DTNV\nwk9/FIKZ7wTIIM07JBjBXC62JYUO3Rz8QtlMP9lpq1ZyHFJnoudJOnmRdo5Y\n6wu60RLmSxuI/gvj2aI4SrRg8IextJJsdiz1wF1C+b2yksNqxKlcYu5Ajy6B\ndRmn9XgXY+ZFrLuVOHlHJhcb7z7Ic0UDnsHs5Zohz0w+l4i9pLcBua17FOVL\nEJWHdYzrVey0G4dZEQC/edioDP65YlKSWiMZ0MUK8TAGGW62ce/i0qbTM53I\nFqx7mhbHjsjA6XX1WwY+njHOH031j6i4lmEKKiNxaBN5DLB5Y3puGAwAL36X\nyLImI1twrjimJSv7D4krA2Ih9QuiamWHnbT7XuC7UJOqtWTLuUU99Dn0AO5x\nmzj0mtrPXgCHCSizRt5n8x9NiQl3Op2DciP9SXcHjj19ix1tsX8w+FzhMKdt\npC8JR5hfo/Rw4YyozSOJZFjpsT8j5bSqtnXVfmo8mGyNF/2aBHNVi45s9AKg\nHzDY4r8UmrSswiu+QgY0ZpEny+E/OviqOUNtmSv3qr4ssnISiAApGOix8yeK\nPw45fmuej95iQ5Lb1o1ytQRuZC0WtT+gwxbEotVcCNhkTmluH725+PUVo4GE\n9LXb\r\n=kzM6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"445c39fcd54675d455115e22605b6cf3434eb071","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.3","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.1.3","@types/node":"14.14.20","@types/mocha":"8.2.0","@types/sinon":"9.0.10"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.18.1-alpha.13_1616084746589_0.2934524292951346","host":"s3://npm-registry-packages"}},"0.18.1-alpha.20":{"name":"@opentelemetry/semantic-conventions","version":"0.18.1-alpha.20","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.18.1-alpha.20","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"93730db51b1d6c4b3b49d99c289c5ab1f6fcc15d","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.18.1-alpha.20.tgz","fileCount":36,"integrity":"sha512-29Z6xmt2EKKmCFI434kVBCPFtISB15sDxCVOJDv7EYHK7XDNuKHt448Zwe7ysY1uapFlXsKjfn8LDMbKSKediA==","signatures":[{"sig":"MEQCIHu3v5Od/Ww/DrBEoIvYNKgQC/gVcNqfWwHFaq6SRz7TAiARnjSg125HBNx5VwrDmxPKBuRPYwkCOmiKI0uKSkJsBw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61894,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWzpVCRA9TVsSAnZWagAA6iUQAIzt7ZjWz3wN8fsWTLFM\nRsQVWxYhczq2f1op3JivL2n5pqqKmKiKsTaX3ck/v/aLJ0cf8bIo4Sj39pDe\nlo0wt0ObIPlYr/tSpPLA2B09kg+bsaK9cZMqcR7f3BAndWSOBGFpeLEED5zN\nWdNKXQWcNmnGJtOl1qTnAG0O60IK1Q51UNs4mkhD1lkulg1y1/OOdD9KoOjh\nbjT/alhVqz8D88dcHLZTONbuKR1CFbgaqYIo5Ab8KpUCBPSSlg2lLklf5xkg\nTQWE3yRdzGWsCK2eNicdYZ7duQfz5JnfDRNHVJdyENG2GBOboBYTr22XKv8T\nYdm6oJ3BuOpxfP+X/jjXpFKBee3yj1VgwUt1RKEYiV8vr14+IRXs6iI6fJid\n9s4+ijSdlwLIyZA2C/MbA2KWGwmSMRRKieZt3NMtpEZ8xreMWP8sORlNi/en\nbipAfdKT/IhEtS1efV+XlxBZzvAbC9RpP/+iD0w33m4S+3sFCvzW8TYk9IQm\nUaxqbxjSDoskd7HludcGsMhe9zfcdmlsOIJMvls126VLex7licV1DgwgWfoP\nsPoXroiqyeEYfhinz0uBeSzid/3lXAC6wkK6iHP6nIoqLfH3buIpCnzvpXSV\nTD/aU7oXcKJfJO2YZDI22eqwz9mO1ZVzqVaMXRN/uTa9iE7w3N+RS7lC1ZzV\nFWkT\r\n=tn/N\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"24bcfe82340e02e605c5c722b0f955da50bf82cf","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.3","@types/node":"14.14.35","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.18.1-alpha.20_1616591444680_0.8987200612915478","host":"s3://npm-registry-packages"}},"0.18.1-alpha.24":{"name":"@opentelemetry/semantic-conventions","version":"0.18.1-alpha.24","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.18.1-alpha.24","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"8fb62e9343e276956702c4b4c8d555fe6ee66935","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.18.1-alpha.24.tgz","fileCount":36,"integrity":"sha512-R76ggHWiGDhtjakyiHJ84mqnC8X1zGgxePHv3UCnGK4uLpnsXqzJkj3pM2dl9DkGSF3Eszn1KsZZAsQuz1tBxw==","signatures":[{"sig":"MEUCIQDHNlmE60+74EXxo5xUaqAsZD1snwSsBuEL2iB47jUUfAIgM/3IlpACNgElNseU2x3sWgRO/JsMyxL9ztMnC5Uoecw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61911,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgW5U4CRA9TVsSAnZWagAACDsP/0X5ztFPN/xzwQTBWm38\nNaQvmIJ/1WkQOCcA2tYlGtb36Opq38BW5gBV1Y52wTFlEub+JmcsIewkc9Zm\nmMGD/eg6/a4HbqiwgnkxuuILRDpwQLaZxR9LOlfroVqpgUMjImcqjXaVvfx7\nK7v7r9zgJF+ADY0FK7K2s9HEWcYGxbvrwc7l3s2puOBDJDnDqHpXB81A/8Uo\nbPQcI6h4+fZHvM3TIhefeNzEJYRdrwxQYHYyQoA5eY5Twk6EgZhEktUmTI5v\nFLlii7dCTXKO4LzXgPYICy5GVNFJVazERvVLwWsbk1yyngwKmxNadoaVOb00\npSAzK6SSnqi4UwVUMT8uaezNRDt+WSid3ey2hZPYXalg+DSax9kjCc/+oQrU\nZjsKE/YXIN4rnsMxEBl1/7I69r+NyJcijh0Ta6ra0A18ndBCFVNQjJ6GlXmg\nJPtz4ZRcwUQiSFy9bCB+MEP3qxK4HL+IJ62hZZc7tP3/wu5DzFMulYPAIxRD\nHpwZc7ApX/0yeS4R65mrmCAn+QKuQQuyS30uM6xjA/nBTkNvxe99YCMhtKUN\nnru+2rSxbPcEipNYJFXEUAIzmhdZGyujRn2dyJ/VmNCoaERePDQ0XEU62vkH\nFzPZk62MhgPotwmbrgOJXXpxtS1EP1Ce+t2PkHMy8nQNuUf7hQKBMKp/tw5v\nHhCB\r\n=kmxc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"69f2d3c264497bfdefa2126d0865ca56ad5f22a3","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.3","@types/node":"14.14.35","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.18.1-alpha.24_1616614711597_0.8890282196855515","host":"s3://npm-registry-packages"}},"0.18.2-alpha.81":{"name":"@opentelemetry/semantic-conventions","version":"0.18.2-alpha.81","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.18.2-alpha.81","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"27fb7259a59017a81fefc445ba9df156367e7632","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.18.2-alpha.81.tgz","fileCount":36,"integrity":"sha512-d2dTI35+eTMAvl6+BZlNmsMDSDNZq/vGH19ooDm/uDyN4ZLSPRoJAPlEhiUnPHRCor1AXWoOjML1IyDjYTlVuw==","signatures":[{"sig":"MEQCIGlbAOkTPWCgl3qklVHbn0w0E52GXlnUtHkCydy+/j2hAiBocUcnPfI6qWL783tTaRAPO0ULT5I0Gl+THnMCQv8SzQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61911,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYi/ZCRA9TVsSAnZWagAAhJkP/0UcEMEloAvn9nMWWVgN\nH5jEhU4SmFSP9EEABDmOEspfCVwssjTDgzJJpAcLt4PzljPDBObM6SRLHPOu\nW48xQoOmiwdD1OUvsjLeer//Mmv+OQVRV1ncKPNWxN7Sx2wu9rtWPUhdBFLp\nAJcn4/Ae15nnHcFw6i5VQiMHDtMBcqCGsAzHBNuijFkbrV75jbgAvHsMv48Q\nd2tawiWgB43X853G2CtjItCoveHWSOrXGCmad/4Fee+7UmF3Hh4nFlr39IGP\nhGFdpzwEaI9E29XnTNFz6qLwdDT8FI2e8NHe3XtU1LzEaZeOV0Pcxgb5IJ1O\ntutfPTT9mXps5drGQRo7BcgFrBty0E1MienZvJulY0NS/rqsXdr+nTKbuxDc\n2C+Hq+M282Xi4E+KVPnxThwSXvqCDYAhOseu+aqdZQ313qple1YOARxGyikq\nzC71vfezWCZiTfp/Mp0QrSGAWHUXTp68MsQxxt6Py4TpOltGQDmr7oGeRILQ\nQcGBrGdtnar+3/lgYz4YNmuKHOpklduFl2nufsjFaGa9heiWivDZS4FmrQ+E\nWHGtNcogKQ8cj7RAQlCDnMK9Qx+84X7yfyXTPhOufMtZw8MiXw3bLIXxW1gJ\nxV1AMPshhLLOT+weETgaGglwWIT16wYFzzHo8+HeDBRcr1mQVCGaaisayLTi\n91Vt\r\n=lYcd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"e369035cd228a5c8781069a99322c5b938061d20","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.3","@types/node":"14.14.35","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.18.2-alpha.81_1617047512687_0.6536732029295189","host":"s3://npm-registry-packages"}},"0.18.1":{"name":"@opentelemetry/semantic-conventions","version":"0.18.1","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.18.1","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"6dcd3eb90e472aa946fc8939d5c96133b180ad4a","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.18.1.tgz","fileCount":36,"integrity":"sha512-OylKMcnDh6yTpFc8bGkHyAEMwWKpr37H/AMEbwnu6p0ZQ8wdlFxg8BjsulG3ztcdRUuidFf+DIDoBtKACnxwuQ==","signatures":[{"sig":"MEYCIQDFHJ+i1Zu+YV4VVtVPQY4SqqHEP1Iw2yTM1veKKUMh+QIhAMvoEPXPaJNQuUWlzPuqd0SkX9YoSd6Fi8ZkbYOUf67A","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYjKnCRA9TVsSAnZWagAAJTEP/RDIhiSqz6IIDvoHfSI6\nUuuE2l/wVfwig8jMyruhYfNdJMtcaX1iOdC0n0tsZhMjDwXWrkVnq5xIzNSw\nVw9nt13KQNs/Nl9rlt4oi7SDK0SbWMfLc3K86J0dXLuA9Gk+bRkmTUDiRJRW\nILE9vRA932tKBXubgXbAGydVEiHuVmJUHcGLM6sWVo0ON3u+Ds08Tni1X1tr\n5o9zI0ke9GK4gOtsL+QHoxpgt1NgeicDuJKjlfBsqQeBUOlg4aeAxQHacJGG\n1vt84/ESVlw7X35ie5ZIY79l2IaDcSMXyTNl2GShSm+CVZ3+6CKYkIWOmcMn\n/vCBnH1pInkYguz5b/Z1xlygbTIXLUldPIoigqX/7mMJsGw1SkSRo1vVpolH\nrCVNSm1Kji0qq/oNr73RcvU+xnwHi0+vPAn8/76ZBVSPCkq2rnTU1g2HxEIv\njfqTuHUQRNowu8lNoO1N9bvBgIKPv9D61Rowi8wIBkzfMB8fbjupL8ny8ORS\nJbUuefmEqeXuv4r8mjElMM3miP8/tMu1H7EJzrwKWsn/2IqV4dSZJHwLB9Yb\n0RYiiDMVt5ybMYvJL9plsxBkuwWHentV2rPqQRhl95Mz/f7wq852y+igMRSo\nqLQV9ruETmFXLWPSRSFy1GbElur8TGSdKx8/j7hDYQUFOuR6Tu2hu1/TpZZH\nQah0\r\n=hhGa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"e369035cd228a5c8781069a99322c5b938061d20","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.3","@types/node":"14.14.35","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.18.1_1617048230960_0.6097678870950254","host":"s3://npm-registry-packages"}},"0.18.3-alpha.2":{"name":"@opentelemetry/semantic-conventions","version":"0.18.3-alpha.2","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.18.3-alpha.2","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"021e090e88ff45c7c776dadc8dba5284eb83f6fa","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.18.3-alpha.2.tgz","fileCount":36,"integrity":"sha512-66VCIuTYuc3xysQipl1ScrzwqwPR7TteLaMg/2ZNy/B2cfEcK+NAeZI7shL/J+kDwxe3UuTWpIX7rblxJp458A==","signatures":[{"sig":"MEUCIQDwP7EKWQr6aDYLBsufvVjDSELlzWUFQ1i6WygAbKthBAIgcHO6pS2s+IZQU/MZhKDTTmqTP3iRIgUlN+5n/1H9KuI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61910,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgY0M/CRA9TVsSAnZWagAA278P/AlBNAw57tjQU/z0k39Q\ntATnNAPnukv/wegctRH/dHc+hifZwMLNPbwrFpQ6wYQVf476OtslMw6Wbv44\nneN0iib9lWG1fe2qvvEvdQtGxKH3HJ2LgxpV7LtGSq9S4LRVTbWZZoOZdyRp\neBZnaccvb54EsORh2y9yIfGUkIV8GukMTmo3JtY4admi9lV9hR0AA7qOjTny\nEn7jA0j/Sy/kblnDNtU59uxEedw69gGmLZaZpbsSG7N+eX47dWWohEPzZp4t\n9Qm+6Js7gy2tV+YuIcHsGBb+ni09TcVDiyjDmTCJrjxGub2lF+GxQguj2yt8\nhh+pNgz2uV55z3QIqs4u6Qd4rrbLUwTQxl5gmYYdSG9a9z/V/KoqqmOxs+OM\ntsxDh66wdkDLDZ1Qi7Muz00J3lUnDQJWT0S4wnj+jmW5BzShGgXITGA3IJSf\n9GAcGjzmr33fc+W6Bzasce6Y481E7mdG3Aeu70pGSDaZ4SCg0wZt6E8/j5QB\nOjRWw3hL07P4wpdGtWgV/E3VCSMptePSBs3LN6SWeLgXkK2iMQagx5qk/jL/\nehLvQEljlORlOfCRoAguhT3tkdt10y+aMV1B6Q7hv1AHTISLzW5adrOuEaEE\nxf9GBJeI+kXYPuTTOn/gB1vphDdm0PKBq3x5w2oZ4TmMWQ35gl79cfXKoKH6\naVkS\r\n=XHox\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"2409f1cdddd92c23548c18c055a6a36efe36349f","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.3","@types/node":"14.14.35","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.18.3-alpha.2_1617118015329_0.45762901798604894","host":"s3://npm-registry-packages"}},"0.18.2":{"name":"@opentelemetry/semantic-conventions","version":"0.18.2","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.18.2","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"a0f15d2ef752567713c1f59f69c6742edb03030c","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.18.2.tgz","fileCount":36,"integrity":"sha512-+0P+PrP9qSFVaayNdek4P1OAGE+PEl2SsufuHDRmUpOY25Wzjo7Atyar56Trjc32jkNy4lID6ZFT6BahsR9P9A==","signatures":[{"sig":"MEQCIEzSGTEC7QwPOwHarcRlouV0IRMzcCyt6UW7Upok+LyGAiBHI+yC8GQMTVsfcJAp5BaS8qwgaVwZgfPb+L8lToGt/A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgY06tCRA9TVsSAnZWagAAvPMP/1ntclARrc6i+u+PjnvM\nsCyKnlgcP0/F1cTQ3KSkC0DkqV0l3dajWXzdnPviYjL7dLxlEQCVxyTuzwTv\nLiDHIPpeZLGc6/iYU+o65ZiGjjkH6kQIn5WX2mnbCb4iKxxD11SXzIGVamUt\nwj1KkFmd6T6YI8bVA7196p9mse316EvfhDL4jB8SlPZwk3AuhyaRRoUJ4Z1B\nqcRtBrrEFTkO1MU//owzc98qAlRTCRzpIzD+ZeNg7Jm81WJkOHnNjvTwAKtB\nA25KUJ9PqaZ2JkdFMtsim6P4Xj6FXMM1CHPeuzVLog7qP8kmwLzaj/p+QxZs\ndN0wmo4jU5e1B5ksjrkg+M4BGAZeVq2o8J2uWipFB/hNricyToYKxZ6+DTgD\nKw7uHHjESBnYUe1iee/HeMv26QfJT4SaUIRUZkrWpbLY9PDxAvj1HTZQfz82\nO2XU3msgjy1hnF04AqMjabNqRZRg4EIM2hje/pQBk5Kzoi6YwM0RFhB1bGJ/\nWwdNGNyFYyO/d2OKE6RrOY9FGj8IyWXVjwvo3ZbqokqnkOTl39CYjU2V44ep\n0vvddIFEvPJCtr1PDUteRMs1ZdDoKX4cD5VrhOJinb1ALHpYDMulOEtSZlCM\n2kHcIkbMdngcep4r53AeC5+C5XNmEvb4/H1OuXkEq21na57v8bqRb8muPyXJ\nGNqh\r\n=/rSh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"2409f1cdddd92c23548c18c055a6a36efe36349f","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.3","@types/node":"14.14.35","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.18.2_1617120941358_0.6208372854340631","host":"s3://npm-registry-packages"}},"0.18.3-alpha.1":{"name":"@opentelemetry/semantic-conventions","version":"0.18.3-alpha.1","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.18.3-alpha.1","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"1487b1e59a3ef9d3983d934137f708946523d0d2","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.18.3-alpha.1.tgz","fileCount":36,"integrity":"sha512-ggdca82ieMRmP4CupKWzs2cCWOpZXGLRzXkocT9K0raQrPN7uBmjJ8wRSmpqI/LJlUFj4ie3SD2sQ4NuC9Kj+w==","signatures":[{"sig":"MEQCIA74pK4BjVvfZmlLZ3qcHBDAeL/PY+lk6ab24MuZHj4DAiBjrvT3263Dqi116pOutk9D7DVrJi58LtfI4JtSy16DkQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61910,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgY1/1CRA9TVsSAnZWagAAzV0P/jGUFyUFzAPP6n2ulLEX\nA9GQhA/cQsnbn3++hFaIrxYG3UIiL5UXimonZ7A4IwFzovias8Xj0BL5pomD\ntCTXTGV3J/L7fUTVpoaw57a3WzzXr3D0qVRSswKYlOFJg7lJcYktHq/LzJnW\niswNLd89HvsQqVGhPW8z8rff4ePz/8iMZAyQi11eW5SWrIJ50Y3DC3QJo1vU\n3E8YqlGBSUSv9fAui1CroztyKfyiDzeDIJkejplYeQrQyoyYO1TDy9SnxBYQ\nLiVWjOg9y8CapDvmCegw6fWYKsPqgBP4lUzNKPt8K7Ce/zn1gxSPaJhPUx9R\nh2BJqDCWPDrw8O4RSoGzd2d7soGHtzgAyOIS8j05hp2LUOGtxeW3z5BAQy05\nk7LtjSq75JwjwdwqVIcjFVgyb2nrjVuCbpJ3YxcmzV3MRomqIycu2OFi/Cfv\n5/HOuhy+rrLjgk0dx0HaYRO2TdojHW2cYKQqKI8D43MO4rfmaYrNQXaPvcyM\nDNos+GrBZIH0vg1tBqvYTjCwdqyxNfZChfa+NgditorQThfDkqyMQl70otca\n7STHmAx/z2GJk9WYj4x5Z+MhANp4Wo6KRe1ZX0Pb47LdCka/qvZejSda1Jhg\nqkox6CPt2JGANEdnr6IoJxC6aWvSGo/ov6ZgzTWwTnruNo5SdDYZubMJDxkr\ncMiG\r\n=+r7X\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"cabf8630cf2e295ac2e7e5f44d6efd1ae911cbe4","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"9.2.4","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.3","@types/node":"14.14.37","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.18.3-alpha.1_1617125364721_0.9367449303447888","host":"s3://npm-registry-packages"}},"0.18.3-alpha.16":{"name":"@opentelemetry/semantic-conventions","version":"0.18.3-alpha.16","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.18.3-alpha.16","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"c00448e177b9d1b1fa547f76c8d5f92e7c9a582e","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.18.3-alpha.16.tgz","fileCount":36,"integrity":"sha512-2n+Ot98bqRWVBccQp5TszOqGlG8EBhqV2xIDm3TXQqj947jjIjo2SXn4mTf7yA+eXL7aPhOlwiqmJgKgUzLY0A==","signatures":[{"sig":"MEUCIFtEeuJC2j/pcPMfapSI33WECngBdh6bam0lETOLi+ZQAiEAxuWv7cZNDwG/aV+yEQeTlu1aDihsvwZ0NrwrzSqEGD4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61912,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcLQMCRA9TVsSAnZWagAAAWcP/i6dZpBmdURGmJc9La9a\nUhuag01Y9x9cv5HdcAis67MNmDGcj4PtEoVuaF5tzNKtlDms1sYPNQWYg2IN\nNX/JMpnXvNnoNRYaZ4i1eqVBE3Eit5Ig/zC+gktqYoce2tgRN/GbtQAX+5lA\nmzlodJ/hy4OLghDXs6AMJfaITm0Yi1btx5XI2eknri/SLR2tFskKQ7xB1x5u\n03k9zMMPQ8siOAen+Z7bqqKwYYZx3yHtTWafImcJrY663ypHRWlIEt+Yth7/\nYqbD+XH+CFp0IZ4beFqFixz97+dOBbGifeEAGSyN9AsjfUKYoAhEbvYju7mF\nQXRZHUL+681GzfWfiTi6wM9eK4XF75OunRDFQyri5O2w9l5hnj3KasybQQYG\nwmxgxuUjjiNvEH+h1XrxqOyauAijrfbVeBuNDloE8XF0FpT9qYApQCwgv27V\nEZK1QAtrDWu8mvOJX2xDdyPdpyaSdd3Bc3M2i0B0JCOj5Ph/SAAA2Oj5PZ+K\nblLE3E+3n/rJJL+g/cjncBTlhiVMc+UgNGzOCL5T1ASchO7Y4u1xqUrUS8pl\nktd4Euvi9sMBdCCSW50iIqoIcX2PUgkl1Xjyd4vQManurVbAsbm9Uv7DbfMx\nZ1ZzF/Dv/IAJ/TAxpYrlWE0W0USMuMc5hqyARDoRIXVGOaXwm97qmurOmIWU\nn/Hk\r\n=DPcJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"7f7afa7bb88edf4a4d46da8b252116d92b578b79","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.3","@types/node":"14.14.37","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.18.3-alpha.16_1617998859859_0.639419545565489","host":"s3://npm-registry-packages"}},"0.18.3-alpha.17":{"name":"@opentelemetry/semantic-conventions","version":"0.18.3-alpha.17","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.18.3-alpha.17","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"d3f29fd0ec923e261fbee8d80766020e3c77cad2","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.18.3-alpha.17.tgz","fileCount":21,"integrity":"sha512-f/oqbENzMZf9TtXltRFw7tC+aE9ADNeNx3p8YNwC0nKuWbRT0yVAHzLo4RTuiSh1AGf7pnVDNFq/ROjoJ3FXLA==","signatures":[{"sig":"MEQCIHjgOSDobpF9Fm1l8awSetXKxFuD+IZUcqaDD3IcvpKPAiBJ+Hex72+rh+btnRc9rM82SxkbmzsWCqrg2UiXnoXYcw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":122632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcXDwCRA9TVsSAnZWagAASoEP/0VqWUOjfcsWQ7UiA1uq\n3Sz4aQYP2gRYolEXCJerV7Xhz54wetc8QzpX3mQSUb/wS11Ewo98gbWb1bdm\ngsDiakA4yeOuJZN8JKc7Rd5fIgjjJJQOylZtiPjDJZNARc9tE1U/QhAECMZ0\n2C37dlh4mrM5hXCk4mYa70l0khN77vnOr8KVnY6Ci5yfCl7dNNHHUTjr0oIQ\nci/qni4PlBxE7WiB2kMaVmBT2A0TTUVHtAb/oGa9PpKAuWCTbDS3Pq+u8Y9K\n/bxLwje7tvqJkryWz6q+7m0U8rwh0ZiR8188HkhiM4mso16ZhWXl5dgVATNN\nwsEOkbgre+s0bZOE5Y2DafCrRM7g3mzpKt44rCzXVRP1yfhm/wtKlUpuyMPb\ng/cE7f6iPA2Tzk0UYKTPvVmU42bT9WvoTy0I9nUCr42zymzuuhUi4KNw+QVJ\nvxB/vU24Zbr6qohgDE4GEesWco2hlFvBxOlw33kfq9ePtuSa67YjCtsLEVVW\n4iNJWrPPOxdzcR2TX6EgMmyjlJVp2THJE2o4mUCnQaf4a1PfydBwTSzqh/ig\n+gs9Tz0o48drBi7aGjG9pG8F5OFpy6KesY615fw1D3+bBQpHqlrmG/S1fMfv\nbooUDRJdF96EoOzG4K05GlJW0tYntVby4xp4eBjXy6AALxtqZbmD8Sq0CFWy\nQx01\r\n=vIMP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"031b0f4286f18a1d08523c87e419803fd1b0c9c2","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.3","@types/node":"14.14.37","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.18.3-alpha.17_1618047215917_0.5222574957561932","host":"s3://npm-registry-packages"}},"0.18.3-alpha.25":{"name":"@opentelemetry/semantic-conventions","version":"0.18.3-alpha.25","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.18.3-alpha.25","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"ff472e3ed557b12aec938d18aff2dbcb19df4be9","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.18.3-alpha.25.tgz","fileCount":21,"integrity":"sha512-l/pKt3hczMb7jgm14U+ned43CqjWn1k7q/YF5vN38VaRn5ed6ZUjck3FqodGmzzI+PkLUQE87SzqcOU+15NTHg==","signatures":[{"sig":"MEYCIQDOiFhKUrXuFevKHdevvS1bEphTIUOt+SdXTyn6952GGwIhALVTO4QY9v9DohN2c5kXYFr3/YtAgv52R2IBjs70BvXI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":122632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdKKfCRA9TVsSAnZWagAAmUQQAKGcdpoMvsWbxJgCjBVm\nsELczPPhnnMemoI+xuSajTV7q56u80OmDdrz5jF2Q9uiM0X7psw0p/lDPAdx\nlQqaryCkKyvu3QPGnyObmTk+zbVd7fnqKF0Pf+8x+GE5qjrZtf6Sjel5liPn\nIbto3BiGURFrLYqQIzYAQ2NKviRoH/LKl4CF2qlsgaXeJLzSVfM9FeJWnhcB\nTD9aqwq3rc390yDOqsgEwGd3QKtaIrbo0avmrgq1Uf46VTzEZCorCVDJ+j+D\nSBZUsKx+jFhgvJdgb830FHm4P/c3aqKR1fuY9ZOVNKpetefAv2OXEH+bvuuC\nmrGrzaGshSv3GBxqTsaaIDeJTD22CdSfSuiXUtfmMLNZLi3ETKpjJS5nRyop\nct0AjOHklcNZUnm+j6es7/1GIOGBxRXiQnwLJKMGx+W8WfYTxKxO6E3LrqJr\nBngh36R7dTQHUFa70/LfptQeMFOvpXIg/LfBTHe8LjLVm0n7D+mXL16opLbd\nfbdG/VZ0mJvyYooKCfnF7iaDlE681m5g6N1FzzQjzR4ZjRNOE0MX0GUKctYP\nA0Tey39IWFZ6Dgxohgwb1LSTf6wbF/QYCOFZy0xxPhyvXY6d0deStEvGL2e5\nS4lDahwgLUF1bCyC870xQbWfoAeJZEIne+6jVDa2NbmdbVRdHxQB8vxqZXVJ\n8XqV\r\n=OrmI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"4ef22cae74b9c976f969151ebcc3ae3d931cf9c6","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.4","@types/node":"14.14.37","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.18.3-alpha.25_1618256542927_0.1340824144578192","host":"s3://npm-registry-packages"}},"0.18.3-alpha.30":{"name":"@opentelemetry/semantic-conventions","version":"0.18.3-alpha.30","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.18.3-alpha.30","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"be23eb12270d8e5d032cc5251c29b5d235392e02","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.18.3-alpha.30.tgz","fileCount":21,"integrity":"sha512-8tLrXFrlnOlyZz7NOyz8S8KpEeVxbGW1MLk5aAfBFiJb997F42LH6hQ4GavOsRSQYzz3PGLzc+WVzvVvSnhYyg==","signatures":[{"sig":"MEYCIQD032sSR/+23RwYkl0nIBXaDvQQVvQodG51r0GAEQBQmgIhAJU+UcLKr1YyKJSU1FMev+0Zcdoko6NUIhxcNCEiDEav","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":129805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfbdpCRA9TVsSAnZWagAAFAsP/Alb3StwlubKcv4x32MY\nWpbGbq9yQXWGk6WVCK1Cl9IqRhgeVR9jWX1gBVki7yvP3WbsMoE3EertMXSU\nr3kGe4q1P5kVo/OSQQabh+tmgeCA6PO1QtBxuNN8yCOFn8P07x6OznUSS3ya\nwcy64uRii2GZACTRx3z2U3Gl+b22ksoYfhiqUeDBsBdoUWt9OEj8oohywiQg\nvsyhmdVP+qIUrrvrcAOQPg/lFSQqs0NMhcCxP8UHu/N/bqPcLw2hnfrzH3Cg\njBQ6eas8rpwGP30D4vgDcKzdBc+OJU6rqH0dVlY9++P+nIzfHFp93v5elhTy\nx+fhKAGzka9RmvYLH2u3Jv93PVVVqmSotY1OYrADayj/5PyPArHa/tEyfN95\nug0daY94srWZqlJjB73KWdRtv5DABaAXt1aqGPt58+2V9//GFI9z/iQOj8zf\nD6upZIsw7ObBb4L419gFmfr8zKCZ2otzHQPPCqE4NHOTasJJJgsOGcIaJfea\ngkBnfkzDCONJEsM0w4qYpxxtqG2EGDPkQmdnczNEzqcR3zG71KKPxWqvfbfL\n4mmHkV6sxdow6aPaIPF+DMeUWM9SED817SDYSeqI1tKhTwNwxPS4UIhECn18\nLMhfxeHrUROkpYt8l/nZSOVhaZLm4CxHb6VR52MZ/TGcGkLw6oS7ZLiLB9Wc\nOruP\r\n=X5K3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"09c2aa757fe107613f3601a2a9c23d05011f755d","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.16.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.4","@types/node":"14.14.37","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.18.3-alpha.30_1618851688558_0.7476049415004584","host":"s3://npm-registry-packages"}},"0.19.1-alpha.36":{"name":"@opentelemetry/semantic-conventions","version":"0.19.1-alpha.36","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.19.1-alpha.36","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"da5658966b0bf394e8a1aff80b403dbe1e76009c","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.19.1-alpha.36.tgz","fileCount":21,"integrity":"sha512-r5bhZPoqPWhpn8O/SoP1ryAOoqzM8JkcOhxQr5Et+9BkUdYj7O++OjEqqyXtKKbutYDacPaVm58ltZlH+LxI5g==","signatures":[{"sig":"MEYCIQCSa2ydGaJ+/QXP54K37BJV36j3iCUnTFxPuXCx54Xz5gIhAIWOUMXHjbZFxF57PE48aWCNVvUT82j0NzVY+4kQk13F","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":129805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggWnbCRA9TVsSAnZWagAAzFEP/RpY6spq3OBF0GCUA4ZS\n2s6u8Bf/t2N6kGb7nDW3FC6T8NSVIl1MJBaumw3/ajyPwnc4Xq5Klan0vxyn\nqf1HAysSFfOudbe0eDl8p9gojBZvYlUG9t51KH1qKiIIm/EHy78p7vXKnBea\nwtc+S6zmVuysRzBjCJB0PQwB/R4FNar3rlGwh3b2UzE1qBMYCFF7U6Zf0ums\n5BDbbnHwrJgSgXjelXD2li0psrJdjusWnF9NbmAerKq8DIxriFUNulzj9M2v\nGkwGB8TZqvvaU6QeN9KVATpOz4ZfbJgBCjDOK2LIoFPKgV8S/eSMZTF1ua8V\nWgw3ay2Z2qUvMNcdPC36ux2n9joyzYOEb1KWT9NOEKqtkF/Ceazls36eoE1p\nzZJDvt0HksswS1jK2jqT2YKq11p3mERNz2yQEKghPIECSIUvSpW+udQraIqg\n3z9cX8ccVDGL0Bxkcq8usZFP/rDnqObtB1oKf2LXtfERyDSKLD0lqDUCUJKS\nuhKUae8544L5oW8wvkepm+tEqofq0T7PbC3Grq54C0r1PqqtcVeYHAIcSQ4X\nHD98fFuOvds+tLWt0hBbnfYUMP18T+w0PaDHttqPUDOHrQZp+weJoQOYjIHW\nOtRIxZhFuTIuNM+CIszuAswMRQUUgkTisRJbutnLEpck8XHE4dr4hk6dfZ/B\nSm/f\r\n=00L5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"0c15999dccd377294a03cf7d36085216d6e8c5c1","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.16.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.4","@types/node":"14.14.37","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.19.1-alpha.36_1619093979595_0.7065537032701594","host":"s3://npm-registry-packages"}},"0.19.0":{"name":"@opentelemetry/semantic-conventions","version":"0.19.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.19.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"3e49b45b52426c62740a24fcf5818cb690b446ef","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.19.0.tgz","fileCount":21,"integrity":"sha512-MMXhYEvNakvXC+oa5muX8KS2z+rsXLXwabjuzXcbJPH+rvo5XFNQ1c7svxb0B1xPpm4KT7fnH2DVfYqQzsCteQ==","signatures":[{"sig":"MEUCIQC67BDPBcVoWMcaD7qqA5/gHU9nIj8GYTZpPLI+7c2iggIgMJfZrSi4f7R6cJHgzOeZWh9KZUsnCuYbgTi+3K07WAg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":129787,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggWv5CRA9TVsSAnZWagAAsNMP/j9aU7iwOvZmWDPbC+6V\ny6m1E5e1ovNvOW9oOtpbm/a5gL+0zcA8ZlI5DXHsJVHvPz/j0l4bW6zKzyAO\n42EmWrGtkFWtNUJF3wlsFoJbVLO6G1WH/hN6UcQ8S5ZA57/R1QV6oFQYtrRg\nto7FO6rnhOVk5R2mcfTtEic+xDwdI9eS58FXe9Z98xHQkeQEmJb6U9ibVK//\njwfCmHkmAIcmWjFaWbHObkwMllipsIgh4ZbMcMMwC69sXkzmfjmyc1Q+XS1K\njgmZRZmezNbTT2Gs+wLF/euEW8i1j5htLUJw7ldMgQhLU6GIu/xoRlnGFb6v\nrJosd3lrB4QmlXLeDconbTqfP941OTFwmXA6+588X62gGTT54Hh8w6PtTWss\n12MJBNNWdrR411GBuoSYPInz1TLnzsjs6vUvns6dkbOHqol486DTTlHPS/nN\nog1hijhDAwbOTimSx+eA3TlH/NfLVTfxCIgtCLsdIArzmuTlx5u1twI4X2DG\nlzCXPGIcT7DL2b6D6FE8bxiGWOiNfDxv7DJ3baqVkrSG5x9iKy0J/ZLDgrUZ\nBg83W0ks6OFZVIum9KElanXfLP/iyRKyWpMz5hzzWFms2SxGpaLiUFjiMxs8\n1tYMnugGVOjqZceQD/lBJk6kLgxS4iT8r8SX8hoKyJLLJFHKBRJxGRSnGkCF\n/9IZ\r\n=3eu6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"0c15999dccd377294a03cf7d36085216d6e8c5c1","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.4","@types/node":"14.14.37","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.19.0_1619094521100_0.7103911585153693","host":"s3://npm-registry-packages"}},"0.19.1-alpha.37":{"name":"@opentelemetry/semantic-conventions","version":"0.19.1-alpha.37","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.19.1-alpha.37","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"eb53dd68169c8ebda1af6828372550d9037fba91","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.19.1-alpha.37.tgz","fileCount":21,"integrity":"sha512-2kpCE3u6qTNoUe/rC9FZITmW+hNXdrVO7CWHHq4YWZdAwILE691wpcuTJchiHjwI7YYh1U4Wf/ZFeciKM/k4Xw==","signatures":[{"sig":"MEYCIQCSbJdVo7YrhX2TRAij6XXe5CtRdjMfltUHZplpyVg7+AIhAJjqZDaCyseN0emZHs6j33gD71xy166tqfrfrs4md3DK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":129805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggb1TCRA9TVsSAnZWagAABQQQAIN2443QZ8yAfiMRJlJy\nBnqDl/vg9vSjJJqLDC3QmV7gKI7ng8qMbuc1NV7m1pxAcyNGHpZx0cra6ZeV\nqyKDmS46VM6Q5wMP2Q8sd2qVZVZM4Hv8qCUhLFkeYgiuQeEORJBLxuv/MaP6\n4IUUJRE3XdjXdGj+gH48SULKhZrahHhc/Z0kveqe+W7YIdGPAItValeYDFj9\n0npmk3IuukN2GJdxUmcXytvMi1Ry4ShPp9k6a90LeX0SQnCSUyzZFEZoRIdp\nGTFnhBgm0OLPDEc5ehfHIIavKoc46SjbltY82M8D/50HBr/HG8dTeJc+TdIB\nAhqwFGXJ/YGkxU5Wqhz5qbyH9PqEMFUXa95iWfGZu7NDVynRMk6qMZpUqTUD\n8LUg6mZLV1W3bk672KZ/Kr0gV3HAPRopife8Heu3n7dsLcFrogQI30AP1lEo\nBo1Ls6O17dpOhhxWV5oWhWPeLWxD8d6VMESwjwrPh9FR3G9YmHfZQ1o0FKJT\neFz8IIM/fA/ksdMYuMajEUHgCobI1GNjGczf5iOlERQoPiFhXOlYP1YvgZFG\nkybNyEtVBkxifEsaP8RiRhWbaH2sDUq0Rq8LtkXa4yQVb489UzN1ftI/mEbF\n1E+umGopYY67kx7Nme9HThIansoxYhLW36zyiSmWg+RHoZCEEU4q2t9aMGvb\n6JqO\r\n=G/wy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","engines":{"node":">=8.0.0"},"gitHead":"a0385c45376a86d396cb364feda2b4afebd836d1","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean","watch":"tsc --build --watch","compile":"tsc --build","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.16.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.4","@types/node":"14.14.41","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.19.1-alpha.37_1619115346544_0.664293995585062","host":"s3://npm-registry-packages"}},"0.19.1-alpha.39":{"name":"@opentelemetry/semantic-conventions","version":"0.19.1-alpha.39","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.19.1-alpha.39","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"eab5c678b0451667000b9a4b0f20f691d044eca0","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.19.1-alpha.39.tgz","fileCount":21,"integrity":"sha512-tQ1moRVb2oaHONkD8sEngRq+KVru1mewNgUXy0QpoHNcQm4RvcaMWAn6z9dFdMV0uztOlxC3zU8q7OjFsPKBUA==","signatures":[{"sig":"MEQCICeBawEnfGacPi1azBhFaZHnViRChtQHUHLn7NtR3jPXAiAvwO7jaFkW8gOtnDf7sAmxmQdxMwWksI3T1BhonXxCbg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":129935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggcQqCRA9TVsSAnZWagAAlXcQAIJ5Q/0y9hHWBxil5Qx/\nVfLCj2ksO8nVzdbxeeQnjcGyGMO9EzZJu3C0agTXstxvjwih/T4FrXrDbX/V\nPLYIuFA+nx464N478NGiuHBsgSna31pc2I9ukBJgaPF2XeH7ACytBdEiD/9d\ntKuuqM3b5D9tqF0tJifFmVUX55a5qe4+aO7g6pF38loFFowCasedv1Nc7dZ7\n+OPVh7GtdHBzTlmnqWDQmIapyTfudUBKCJWYSGw+FkzjAJN7RvMoe7f1Y+GO\nls2GxeVS0hXsKbOiycRhxLoJQ9wccKC1iojbRWCAul4SyHHqbqc/hP/C/SWn\nxjOKf6E77dcRE1piBWpZpjr6B1AVI/N0mFqAumo2LUgLxLwHq9oO40e7ohMO\nj5S0NW2yQNLGMUBDR5Ip5EHzCGXnYHA+UNjm6nNjJpZZdMM8Rxv0Z8Pbr+RB\nDxNWVJ6TK6EuBWE7GNCQZ5lOem014tWGLWIwpHkeNynmWKznce8xx0BZCP6p\nHRBeCiIn8tG3SMoaxWXVDXRVxuvsUmHhskmdxsmTm4Tl0iAyE6eeKnR+8Cfs\nCZ+ySWUk4PiRTXgZson4GT7RlcEzguR3wHRhmiLM3abK8xuryhwGZGCSv8AJ\nxAWaIHLAifZqaydB6ChzoSfFooNd6mEj0wLc1QHFOPzMR4TldFGTXwHHq0Ww\nfFUG\r\n=Uh+q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"23ba4bfdc77c8bf594bf0c817320a31f59ca0bd4","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.16.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.4","@types/node":"14.14.41","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.19.1-alpha.39_1619117098118_0.00574563366802594","host":"s3://npm-registry-packages"}},"0.19.1-alpha.11":{"name":"@opentelemetry/semantic-conventions","version":"0.19.1-alpha.11","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.19.1-alpha.11","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"ab0ff0fcb3153855b3cd91898b2b37a7ed25f682","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.19.1-alpha.11.tgz","fileCount":21,"integrity":"sha512-HuVFMAhl65Ji14PQj+IC1nZSn2Prfx7i87gSRYoHDJtXiRBFG2Bqu8aS16eL2ckVFjRk4V8U9IqgbjPaoubBCA==","signatures":[{"sig":"MEQCIAuJKxj4faTpEWYIoFgMC7O2K90yQHnuoYdBOZ/PQj3MAiBNtj8NmhL+XkX+p7RdVsI1s8P5avmA3J2tMztm+vnKOQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":129935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgix/0CRA9TVsSAnZWagAAsB0P/0WbHchTbwdNwepzm3w1\nb9dC5SNoE5QQ2rN4O5osi1go2mkXIVgDYTwpqJwkokJnymQzScm+paT7PFxp\nXMfcjqO8UVPlGcBzYDC+/c6V2UENQosmq9rAyotDNhO5LKxdLHEwhTmp6Hiu\nJp/hD6UFYZ+teUJNrKiXj1jfAbFprY5gsomcdZWZkNcmDXoK+MyNDfosT3mx\nf/lVqKBLgKrbHSuUl7rjgVuglB+HErfe1liV3tZxM+5tWyxzavRv5hbmXXkq\nXleVCRP8obqnDGMfJ6aO0ztU8zAoUncpdKgvtcqOvytYLG0CmI1XSOcDsFn/\nJDlflqIFtpSetY+k9MHUjxQUrQWtTZJuhOYMotxuOTGntAO5f6CBtfnW4iLU\n+Ap557/oCqaq2pxT96C+bgLKa6DYHYrkpsDsMHB9JtT+MO+uzJZEnXYJM3aZ\n2YNgKIQ8A5keK4q3B3rnWCUa42Oqteb55U1h35dSE+PzcSXgB6dga/3ehi94\ndNIrrLQ+7Rij3fqD9gmtbHocfrq01/ZrYqnWHA4pYYF8JgYK1y8P7p35lwa/\nhHvsxLJLaqoRZB+FaddNhvIGpLH0osKzJ1HXKQir2yrTBu2Qz9SQkWQScb7m\nP0mtqzGAGU4KTS4QeY9je/XzoXhDFA8GOf1e59isCnGHSArcuFqRUlXFwaCW\ngAXR\r\n=qMth\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"2afcc7c90d93bac4fa9180f4fd312ed01370b2b5","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.16.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.4","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.19.1-alpha.11_1619730419871_0.6191835490532778","host":"s3://npm-registry-packages"}},"0.19.1-alpha.14":{"name":"@opentelemetry/semantic-conventions","version":"0.19.1-alpha.14","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.19.1-alpha.14","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"5081a56a9e563ccc41eff8c1a610dd0aa3f28442","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.19.1-alpha.14.tgz","fileCount":39,"integrity":"sha512-0q0gWnneY1epRaTOhopyq4HVPJuQIRTPuKb532SS6GvP5t1MfqSZ+0uHwGXbxlwCUmXNSj6T6Z6G2FEZbxL9ig==","signatures":[{"sig":"MEUCIQCuWqg0dbuxYTIWiLHOrStAGcYMlSW0PhLhjUaQBKDbwgIgcd7lWhbsBD8Am4uLfHlWshj3MerOIWYzOX3R7UT+BcI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241575,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjQVSCRA9TVsSAnZWagAAqtgP/20mj4Ak3TzA6ekX0e26\ndH5PAu7QpA8X0NLoguWKTQWz0/NJ/zIbQ9HCZW7rGN/zI0M/H4EnUmQY0lFO\nZvOSD10yBKRkrnwptywx7CskMjNfscaU44XAiTKT08qri47jujpN+txWLctD\noIsczhL1nwn5RAbB4GdEWcUnUEixUXf7aUJdROKCT2wshFQWAopBo1N8pCkt\nVDeWWV/FLts4M+dAnYXI9B61Pcs7rN110D44VdphxrDLfadhwRgGOeFbjDVa\nv8bx3K7Xdobo0pX+bkZIk+4WdwvV8pXu6jRlVb4KP/vWD69exa05dpZZ3UJu\nJYlgC44Qd8W7xgldvB7NO78zCPla4LeCXzGRqfavG0lKUBojJOGv6vIxny60\njIClC4RZF19AEiOzlvFZR3kmcRLglfXRRnTcA0wJ+e5KX6z23DTNokyy+Qs5\nkTR2Ig6fJkGCPz4410wkYB+afDf9kBgn8ZXsigvbQI4p7UDjKvw9BJ0q/SDd\nK7TwYERHpP6XM8h08dSrjyqBmXSHkhP49Rq8bKY55J0upBwOxCT6QxL1M72i\nioKAq75tEFWKLHWaLfGiQ5rvZWU+xhbxn3fky2om5SfIFplnAkrmtIRPUe4b\n1IOA41UrcwdR1fgqcskLAEP/8Y+AAS2pXOH8SJ436AHWAdNEKvWh/oOaJl+Y\nlQW6\r\n=EFKS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"e1e79ef11c3cc190805c3d870cd82060903d6e15","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.16.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gts":"3.1.0","nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.4","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.19.1-alpha.14_1619854674122_0.8732291218686055","host":"s3://npm-registry-packages"}},"0.19.1-alpha.31":{"name":"@opentelemetry/semantic-conventions","version":"0.19.1-alpha.31","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.19.1-alpha.31","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"54110ff5862b530405b0770d2c782ede9c9dfab7","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.19.1-alpha.31.tgz","fileCount":39,"integrity":"sha512-AWz1QHQnxDuLi2YBoCNDNyPLVw4UMlSM+lNJqd4a0N6EVC1qvKWII7r6ZF5SmJZfIGWbQx7rO1016HfNYEC43Q==","signatures":[{"sig":"MEUCIAobGMQ1MkqtCz7Qr98KC+p25LpoT42IQSR834ATetZCAiEA2riPYX8FxjdGUdlHtXDbtn8nB8E4aptgzkmHcUbls6k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241555,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpVO4CRA9TVsSAnZWagAAUnIP+gOgEa+uNbaY9Trp3nWq\nEZEILN3PeB7QEONpPzGEhf+VzaerE15DMhi2eyizBlF/54YSwKjN32Z0InOG\nQH9q46shKWcheaTTl5tztlMh12dHGzTpJ99cfPFDLHae2Bg68BkvvWvJdtc9\nYd3hyBgxGZx/96BlOAU61N96pOOCbqi98Ln3ErX0gQg2Ue5Iwl/WIoCFNxK3\n6jdFjUox/WwiklVDibHrLPRXBFCCbbHWN+gQYPhwMg5pFJXIU0aEm7y9REFF\nS64NMIZw2sYHoKxqnvg5z+1lFKXrraIhEk5kXW7YRkh8+j6aiI/K9w0Flaea\nQs2yXj6EKQqoUHswrFDT9lRRp4CUR0wRQfl2SAH3lKBbvbmCh4sGlqqY26uT\n8EwQ7WNVsUJW+pRGbrpuzY2rwAhtZAHoEMk/YDYIs/YRjVWlS78tPi7fCpvR\n7VttD8tmNOnjU6oOzwsCq7c3Op4JEfQ2yTL2nez4/mZvrkvUEU8f2Mtbjh2/\nq255kUvAbs1lIt4wRqjGgKlm7qwK3f881tWQtY2avsfVi4fVOX0XV63YFV0u\nTtGpX7CroG2dkDy4Ma9Y4eVw/2niEnm0OwS3VzkjwaeokCRZ1QtwGr77n3CV\nh7G69BTzuNVESYaDkD5pTJLs4yeNH7fyigZKQdQdneX2ylVr0YW61HQY9QIH\n6u0R\r\n=7v4m\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"24adbd61062759f9d9d57420fd97e50f4d8c3b16","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.1+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.16.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.2.4","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.19.1-alpha.31_1621447608062_0.6135706743080445","host":"s3://npm-registry-packages"}},"0.19.1-alpha.43":{"name":"@opentelemetry/semantic-conventions","version":"0.19.1-alpha.43","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.19.1-alpha.43","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"321ef58ec91d57906b39ae7f333949907888a1a1","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.19.1-alpha.43.tgz","fileCount":39,"integrity":"sha512-GRmSnSYjNC/oi/MbqQbpOF27MeCPIwGrGyQtNAjTtdOo4a3aYvjxhkLumig1Kr+N4iTH0q1StzD0by5pNXdBdA==","signatures":[{"sig":"MEUCIDIvdi5w6FogEIliB69dJFjRG/4HAFVx+qa54rGiUk9fAiEAjlNrP/z2qMZHC/cQP1nxD/kxC9MuvJh+kSPpbNaNFdM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241555,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgto5lCRA9TVsSAnZWagAAzskP/1dr0+oOxGGWEnVBoazj\ni3kIeELL5JOa1qcMcWIh5DYBMRt6DwkWOlnOUpqjQ7bWyu407qDEvBNRgjsy\ns94fMIZfE3KydFdI/H46ozFAB2onyGqHxC64F1RPUxiqeAQC5qpASgnQI5yo\nyP3h8Toz2hW2B10vT6BSDLdzNczgjXl3o6GEhlevw67spe5RuGd26asCsk3z\nMuxieEFpNFw3mYjU1DXAuEor+osWbC7VUFIWb4yK7q9wsPHb63HhJwSSv136\nZ2FA5f/N6PcgogGQlQQ45b+1h0/2a+MNDNTDsTxbeJn9oav7U2GcGV2CDotK\nY4sdxGfHgpIpFvvHloFHNVXAzFKyYOuAe6+nyWAOCV7ZvOe1NkFaOhbgUzi9\nsGdCA02i7hz8nITfdbkEvCwYtEI+yfu6gqetD0dU3PQcubre90FaBpJAcWYH\ngRXzXrpTOc9gQSRh1phAmAMjHaZhGUaVn4mzkmzAs544VYavZT8n7zgoXaiE\n4KrLG45xoIuOEwAv2DU+IBEbWS8xGdnlBBUzIcBzYVzICEHRhnQUNgOz/yPc\nk+LIPBvO2oJZaVGU8QcQhzuIggrUOVL7eIgk15hgqyCzjh0Ap63WiTRkoyDu\nUsVh6oL5xhJDVon1f58GxPl2tIiyhUz8e1J7VZ0QOygaJwPZF6sOGA/g0XEP\nzrRO\r\n=FI7y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"d5517812b31d9206131bf1df4f8a3b5183ab07fb","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.17.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.3.2","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.19.1-alpha.43_1622576741464_0.30320944448814124","host":"s3://npm-registry-packages"}},"0.20.1-alpha.49":{"name":"@opentelemetry/semantic-conventions","version":"0.20.1-alpha.49","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.20.1-alpha.49","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"4690bc8c3a04953c709461c0596b99c4b44c3389","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.20.1-alpha.49.tgz","fileCount":39,"integrity":"sha512-y77eTw8K+dkJQ+FxkXzs93qgi8YOf5sYOY5siE8w621CPThHz0IGkIiaZFv8UrbytlbawyT+hlk6y5R5J2XALg==","signatures":[{"sig":"MEUCIDt+2BYkYAtaxi/FrwVzMM8eabucJsjRTlMzMMzoNa5bAiEAi5ZMf8pEXD+iYlh50Y3ujn63XPjQqlHzGKMC09ySbxE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241555,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguQzVCRA9TVsSAnZWagAA8u8P/0BkqJthckL5bJVHCADK\nCHexbPIJkW1BZ4N34ZS3wDKxQdnodvDBnjCKnwjQ0h1CKy12YKcRwbF9TmxF\npVfrQJt0q37k1gByClDph/j8rvnhiXP+c+qKrM2kWL8vGn1SoLZxNb8AuDL9\nokH1SHEUOksQg8P8YJuQPpzN9vMDnxZeGbNU9r5dxGopMH2NFzqeifXL3JUF\nOrncIS8y1RcElMAeNMn8xDmDu8xCSAWE30EAKYGx7yRer2JMdjvYMD69bObF\nSjHCBzEKuwu5KrV4Bcn9xMoAcUIK3txRVCFBnqVZp7+U+jdiHk9bXuA/gSl6\nVb/RYC9Mz1Zog6zEvW+gwehClFbGFMXXcXPduYuPIL8dm4oaKtROCsW1DL7V\nrtn4sFOpNLIG5aDxwXOdSJQDh5p2bZXU8+X1hV6PhEy6CkVO14/NAJEDx8dM\nYd6xRf3EpTeTJNb+tp37vJfwXX/QSilV+OTjG9fUUy7y6fb6p514yWn7mS/z\nJ6hqUQB5Q6/eTI7JRglT1pdGXfzWJaKBRtiHgkf2/XdzUjpX2HmN4B1upgp9\nUpS06vE/PAMlfqGfYFHaibTWeLraUz1l1NRUfE4TT+eQO3dK6QcKpig4p/NY\nSklPM680zLT7fkMVEzIe6tW522kTDk66l1xr0dYPDlfjfJd2bJRuRh4S1PQR\nKCfb\r\n=zDp9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"f79aef422b53f1314cb0b031651875658fc17008","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.17.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.3.2","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.20.1-alpha.49_1622740180885_0.8039183227076245","host":"s3://npm-registry-packages"}},"0.20.0":{"name":"@opentelemetry/semantic-conventions","version":"0.20.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.20.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"adc7e391bba6db9bbaba04ae263c3e92b1703d44","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.20.0.tgz","fileCount":39,"integrity":"sha512-x40C3vQMttFlnNEfhFwO49jHrY6AoWnntL35TCem3LINr/aw1W0hGhdKY/zweC64CBJEyiHumaae480rqF8eOA==","signatures":[{"sig":"MEYCIQCjdmAdKBZT8rhhnjIm+0J874HrzmJin2ntOeLzNj+fPwIhALkfVcb+E4hXAOWZiZ4LbCDTCHZndbiIOb4vmvdbQdgc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241537,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguR9JCRA9TVsSAnZWagAA79oP/RZ3ASG+YkL893CNR6Q7\nIzafTHtiGSqq/V5MuCqB3WPLhEFzTeXhcfhLoEttEPD0zY9YDesrshU9G6cG\nC6Z4TgKhKcBzmzEDGxK39dtwqc3tsD7GwSfAoAWYNMy6h6bl9Rh191D51BVo\nlIDu1zsFkcBOw2R1BAQlwMImVxiX6pVTxSr0wMAb5nSTGSqBonFjCKDgsgmF\nFbM5QNrpFekfTCKs007bTCKM2mIfgjRMDCBJUhpRs/OG/u6SUHN4VabQNnSj\n8ZCGTr58jn1Ksvytt5VtSZQdkEv99S4rJ2V7Qm4BQ2RzQD5vCcMRc1zfpCbO\neYfFTlGk1+DdNd6FYjXnLVh30er2U60iALI7E6WFLK0eTRuFtFGX4u0ivcgs\nncJ7ltAjOBzGzziQjrSFNm5YBzejKPJW2+gIy8U+YBiZCM7pmvu2HQypoj+e\ne6SdW7QuR4Jjy6IQ1Jq4U3xmIdo8E//KHJ6jmN0DW0AyWfnQCLUD5C+SOSC9\nZwGL86NRo3uKkBZe9GHVJT2UIOk+eyOafZY8p9noniMvKNJw90QInCjmwfzw\nbrrQd/fh5hLWTz4qNzVludEG/5pMaOxa0LLBt9VHZyOQqNQlpFpSgfVMMI4B\nWPZwJroMvzmynrjRmG47cP6cBPJJIV7VhWw/FY8vf10PCf49DuBUiHdoQW+W\nUiZl\r\n=8qSw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"f79aef422b53f1314cb0b031651875658fc17008","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.1","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.3.2","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.20.0_1622744905290_0.9418432377864134","host":"s3://npm-registry-packages"}},"0.20.1-alpha.4":{"name":"@opentelemetry/semantic-conventions","version":"0.20.1-alpha.4","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.20.1-alpha.4","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"47da5d08c06d454d3bb2e716c17750258927d68e","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.20.1-alpha.4.tgz","fileCount":39,"integrity":"sha512-nM7OdPwCMPXzESDlqOpf6cZT7pqlNOM6MORztNKOzzRGczfAn0VdUhJEIfXw6HXDCECzF+Flg6gUv8yEGcdnMQ==","signatures":[{"sig":"MEQCIE0FErcD8W4yckUyEpBOfjSiO3VoHaogj/Uz8OypZq7JAiBpmGHRz/EW3MgMmgemcgH3Rz1OvUqHMXlTKkAZ0ZBw8A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241554,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgv3BJCRA9TVsSAnZWagAAiCoP/RuxzlLxa4w9XWJ7iCKg\n6T3HMeenWWIO8+QQdIL/NlnVBoAr+VSzCf45TWzHp78idceez6DkaHKDJnaF\nHEna6xOziMhHfRklVeKKC/ywIbiNnW5lGbH0dJBz6bfW3tQggiqrIOrJO7H/\nUjTKcGCn3S9M59viYQLiG9JmftBqMFZ9X10GB5r9wPvTiDwOw9dRSYhGen/k\nbPF1Rm8WZ6m6EKH60zFuemcKnC+RUfqc0+uGzghlPc1+mUKTjdiYVksdIQ9F\nBJTKrQAk2hc3TNIHsJFkSzf93HxUraI6Z+8Ypu9JKnPJ+IIhHvK6LWa8//lY\nymFc1XcEuXERpFoOGZLJhMNP5Zeo5kIGNe8lXL6USoh1R5da+iLj38lil78z\nE9Zd59Ihm+SVdFVRZ1T16BKHgRR3CRoDUSwkuc/6QdGnEB2JTviLPg1phUSo\nU64rxfbzlFq+6L5hnENVkDzsVJo5NP577XLrInqlncYIO/AyJTG8I2N47mjf\nn8ysWkp585xIHtTSW6upAACnOFbqNB6QI70SQMTI3jmx58Zh2YA51iygcKUf\nJe7/M4pH3/Cqb4doJskv9biHd+5fH6el5lezptogGkSi8QMl0SoCOTiyxGWl\npaAJgJ4hyt+gHUGk+1x1X283ZSYiB78F+HTQLs9GEhMk6GioKNtUG+6nJzjg\nbx/z\r\n=5BC3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"3d98420cf530968e6a85bc4b9c2b1bb78b730b3c","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.17.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.3.2","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.20.1-alpha.4_1623158857637_0.3973968284855802","host":"s3://npm-registry-packages"}},"0.21.1-alpha.7":{"name":"@opentelemetry/semantic-conventions","version":"0.21.1-alpha.7","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.21.1-alpha.7","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"ee59bc1effb77ba39548a8029635912fac4fbf1f","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.21.1-alpha.7.tgz","fileCount":39,"integrity":"sha512-DtlAEMe1oPi9nmH9jmE3PXm+u3nShfAQWED9/8NE33LdNviAl2iixw7YWGTa//VJbWbGjPTrxmdrlbLN3iU19w==","signatures":[{"sig":"MEYCIQDP1f8/B9ORVkTwoKMl+b+MamhyJa5w0K4rJe5E8lSsGgIhAOoJ4RlEtODz6+hLIfHpGr0mVEka2/U1B06N0Esiueoh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241554,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwksgCRA9TVsSAnZWagAAPEIQAJZFT/VSL1aVFvS4Anuc\n5CBLlPM9ShJax/Gvj9sevF2Ky4zqXfG6xLFW5vWHY3R2ssOobakipsm2Tixz\nXi+G+0fIZK59WthYBPUAsMW7aZcfbPlkdg1XdrcR8I+qkXWAmi39PtUwluMR\nL26eDr+sVUG8S5+Eha6/co2yp55Wv9PsTKWcQCRT5q99ceo0ai7sTFTuFkhf\nqgytzMdqx3pu3czELKyTFNHUrpq0exoueew1d+GmS7XBYbWU9M/obTNoBI2s\n1m1+wgvSVZsnhQUM/lGwVRPyR2lNvNhjrw9dMYnsQXQuo+bUFLVNLLRh97YN\nq+sCMsW3ZZGTp6vCTlbbJHTP7NBbAfRpzbROzGyxmbUv6ekR1aH+ShOD7FFb\n6avTxkerSrd9Z/Z87A2GAn+X10vTykitDBS4vDylaLMw2X9dDa2cjgbN+S7h\nBJHh8awtamwp9nboAiY638gXrWnMfIqhcD6/D6kCB/Y4aK91De41f/JNsbNR\nfOagu5TPu884PRQsnNkwzsLanldnwd7O0iaS9IjSQi1DyXeNFDRtQwSuyOjN\nSRsZRa4g37QyFik/o6vwJdMq6K/B3ZTn9nmMa8KgSZ+s309Q4XNq13JpfyJ9\nACVJvFiMr8YBw760kYfpxVVHCFMWqJ0lg3qXMWLiMIrHbNYiTU+/om13qLnH\nw5zH\r\n=/Ic3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"7750282034ee58bdd257446c2970f01307d7522a","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.17.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.3.2","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.21.1-alpha.7_1623345952288_0.26085935116136794","host":"s3://npm-registry-packages"}},"0.21.0":{"name":"@opentelemetry/semantic-conventions","version":"0.21.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.21.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"52fef0fd74437527394641f281a0353218fc2664","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.21.0.tgz","fileCount":39,"integrity":"sha512-qQtZJ8Q+bO/gemBELsZbz5s//tNnyc+mQD/0RHc77XhI6ZBb+tprU6KN/7l0fl5z29smmai0hcJ9UNILC/7nIw==","signatures":[{"sig":"MEUCICBa6rTTxgNBJ0BJR6f6Ak2jBt6DIViJ52XHF6jYucZwAiEAw/GTLARY2Dv+WBy/sKHVQ5rlfUO715lZhzxt7hk5yNY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241537,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwloTCRA9TVsSAnZWagAAuYgQAICyurfLF4Pepu2GCfMe\njMUomePCdxd+HjfGz8l/dgW/B2jKIP7tysx3faR36BB2/gqzBCL+VBVK2Hzz\nkmjHvBpR0b6JmNnOvvX1yjr+GFDQn1saidMywqWMohKd3UkBn+rv5XePh3Nt\nM/b6kPJ9Ov7wunC2dcizjutWR8Kz31h6Ksrubi6XVvAoEiyl1b/rVNYGoeMu\n15mo97BgE9eq1oYLTKax78tN75Z8iFit0F5HnReh3bAYyaN3s23BKq0P8Ai6\n+NvbT/D5L6l8RGOdFu1k4CUWFRomeH6YCz4BUC5zsrGY8fJnOBCwxqXRlr7G\nP2GwJ/RHbnNfOnY8cwGk26ws1dgWIaxupU5YoDZTlOlyFSkvu856/EsQXoO0\nleS+XBJooqVlDi2xKE0UDj1eh/EZTTPDQZIu6dtaFwjihyFMCb6eJT5wf1LK\n1CpU8OUN9CAZrb+K/aaZH8ey+H7gOLEy2nF55akGxKkImzGBFH4GQuz/ojsK\nUnUwoU4TtV17IOaqf79NRgMXzoMN6955xGAjA2c3m4nFiFm+VEGbwZ6OoPW5\nW9YbuBpoNfNSkY0HQXZ8ezD+vRbZ6WCcpgF7Qw/RyfjjcmHkFwo+AlqD+Hca\nhfAnlS5gwygZNGLKwP+DDbJKCXqRtbx/YKpg1ykmICQ2+ke6g2mvDdvgaTuq\nLohj\r\n=F0FX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"7750282034ee58bdd257446c2970f01307d7522a","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.3.2","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.21.0_1623349779350_0.39240670754646456","host":"s3://npm-registry-packages"}},"0.21.1-alpha.2":{"name":"@opentelemetry/semantic-conventions","version":"0.21.1-alpha.2","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.21.1-alpha.2","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"ee36cd6883071032f8e6c17615735353db5b229b","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.21.1-alpha.2.tgz","fileCount":39,"integrity":"sha512-0vNaVFYoHmZJ40eKtICHIf3bbiCOo/iUGYQfFVLpoWyDIXpgiTn/WGSHiztG9I2gLQYyNaBnmuddzDsoGkX/ag==","signatures":[{"sig":"MEYCIQChc1Am0xiZHIPqSA2Y8xwmolkw7zVlvEHEdUkRWVdqfQIhAL1OfBNVZzTTP4F6zqBl6/sIJQCrQ1QE82/uTPS7aCjy","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":252794,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgxHG7CRA9TVsSAnZWagAA8BkP/A10KouiRihxFDEu2Sym\nlmwl0fdhvN5+axF2awgXo+n3eC8ktEBRrZ9QfybVNtTfaceMErJHcE0UVZog\noDupOQLMXsaRPlkfMpBUjTbIw63ZtPJ2i8kLesh6IQx5Zf6cF/fLbRwHugDZ\nfhTzWl+2AfXEHLXCrkQYW8xEu+NkygWhIiqqVSf6ZJrsZjkNLOmBD1/S6CfQ\nrSOYseLe0AoXauqBU9Q6sKJlC+kk66pNKsXNeiG7uCbsNp5QLwjDkR4rlfIU\nK9FLItsiaMwoQtPexswhppoQhBqR0hQbCS5wgoDVZhY22KrythtvAdrlPS/S\nxUWjCVK44W+/ixuCL2MbNgHVoMdBDP0Xh7opYRqqe242UjxnspWkGLnyn6D8\nSqRE89jszG/O93bc9a9AkKEKobgyfWVKFonUPlAHdXeAsogH79oiIWAHmX2d\nBc5eVZzbHjCAgMq9Scnt78grZRzHsFp95jET0qGB/VaWpF16wwmSzxMVkRrz\nAktG2b+i8amcNaZNr2/ZKJFe50gabVKkMUaVvpF91aWGZCMjL2tsOiwzX0hi\nn+Ur8c2oqPqCN4yEKlj0GFLmmnXK1FgsqhJx5xH5+q7eloljsd6YYYl1BT7M\nc1hPVlQ9Q1+scbS3BxkJomubA17vqT2XSumYEIt0A0ijMoSiYgVySig9i2YZ\nXGt5\r\n=pUgE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"a3b77387012a5f53c193efdefcbf5f6272876e4d","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.17.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.3.2","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.21.1-alpha.2_1623486907471_0.6738711294630504","host":"s3://npm-registry-packages"}},"0.22.1-alpha.5":{"name":"@opentelemetry/semantic-conventions","version":"0.22.1-alpha.5","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.22.1-alpha.5","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"c13daea970e86c654f937caa41f98788a04f30dd","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.22.1-alpha.5.tgz","fileCount":39,"integrity":"sha512-/vk+zTLOnKvQMojMPoMvm1AyXT/Wk9H4Ekr0CR3QGBuQu0Z74VEoe4NmuDyr7xoksRN9rOoxJCxXw+q5ys/Sfw==","signatures":[{"sig":"MEUCIQDx8/J6lxuIadbNH2KhJ69BgHWTFx/XWQK+7qOxxTJu0AIgGG8YpUXYlvSzDk5ig7NwC2ThgCCMxepn4Vs2cWxcIKc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":252794,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgy4C8CRA9TVsSAnZWagAATP0P/RLtAnzZKfLX6jroZcu+\nh1+AGLtFUCcFjqoA9xPtTjeLhmKzimYiCUhRTdxh57+jgrGfngb6BLlgdBRc\nHVgXcViz/RP/CQnPSClahlk/lxABBFjXxWZkNGnFLAqUKZ7Yj//la5Vu3V4L\nDSlvobYMmZwScx0c85GNKnlRv9tEy7AjebRdo33Bm86wgFigS32pt1xUBbz/\np47dDEba7LLR11LV3BDj4PC9dO9tbAUpsOao5I8YPucRwsN4ZbeQkPYokhFt\nRbCpfclGoy4u/oQnafrDR2+OsJ9OXRnRLlpv72NraFhu8cPq31u68oslWgwo\nvI9/W4Ew0OB1BL0VsNV4Vuy6rVJoI1BrF/qIVw++ogjXQG5s9pgViOZT3arJ\nItG6rnSiNFJeIKGlQxtOw6ftaGxSn13MOIxlFiFlicKVs8AH+5qi+h+xsPL7\nLKFZsz7e5DlitNvcCZ5Cm0EDVvfXaURZ2luIlrUEzIFPsjz4f1koX1BNFJNk\nXeNybD4eKQhF01LG2gp77v/GfSV+ftY4hiI3AI56UAZNs7z5sXqunWJwp4gE\nyHnpvDjsTD8h85B53dFLYyhLOh9ReYie3ozZxGOQJIftAICVQEbh2HaqsN1t\nlJlE6UN4t5jIPG8FP1XAVKPfyKAmrJkI+6b+WPcaoj6FcUU64Jfl4CThDah4\nt/iF\r\n=C7hm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"7860344eca83449170bafd03fd288e1a3deebacf","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.0+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.17.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.3.2","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.22.1-alpha.5_1623949500146_0.4948666682388285","host":"s3://npm-registry-packages"}},"0.22.0":{"name":"@opentelemetry/semantic-conventions","version":"0.22.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.22.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"e91751bd2eb4f49344172bac62ba87c9390f93e9","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.22.0.tgz","fileCount":39,"integrity":"sha512-t4fKikazahwNKmwD+CE/icHyuZldWvNMupJhjxdk9T/KxHFx3zCGjHT3MKavwYP6abzgAAm5WwzD1oHlmj7dyg==","signatures":[{"sig":"MEUCICossl83CaepV92AvOiNnkde+XOdqoU/Ki/wnTArpbkLAiEAoEHJHlHyUZB15r6CVyvxcIfoDTmY2KhcwIuVFuQ76Go=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":252777,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgy41GCRA9TVsSAnZWagAAGrkP/3X4sVItW9R1DNGlLQFq\nuxvO0PEpqNf2W4epnXZoHyTF80IawK5fkdW6AMChLe4MaMJ9OwjCyOBFnYLg\nL2bG+4BR4Paj7HZhQZ5rymMUt7LPyp5Sau86R4euPajXXpO8KX6Y9d6CNDsH\naCy6ElQKGj+Dyq9kb1kHPlqqrvPxuaYMLn1eySMtDYKppWznlHAmsF0kC+QE\n2qWojct6zrz6skVA1Ot6Y4xer4qtGnP4/+ugcrbTGx4XEO4KjnXpET+su6iJ\nzJ1hjaNJWx/mgLVQsQZ3jt3uLp8kO/wHaSxd3ZkGPzP/DLwSgQjN1NKW4x7d\nA6qqc87w91SJFjaiQRYG1BxX5AggUZ5t8MXJLKW8j3UB1E9bnQZ2/a1EEXp8\nFzN3xxiRGKdSd3XUrGiuFJDy2wungU/FKxjjJo+N3O0oATZE0sT9Uw2m6hEz\nqZJuN4Y3t4laZx7ORaEqer5PlcfBIdBsruX5Y2SPeLzvDgUQ41Uy+yGhzYyS\naks5LgaPEbD1V7j1qH/Ws//6UCh0/vMVvJV7FCHZoAcbu0Z7FwQ7o8iNCTNk\nl7UyTzn2iS1DrIy+0gFoprsPeNtUAzviFKAYvPcQOfkPX6dmkdkBjBxa+On0\nybR6GEAk0kLvx+d3I2i0v37sPyhffgplr4NpaJf82A4w4PJtzGgLgLDM0Y5O\nLN6d\r\n=cl0Y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"7860344eca83449170bafd03fd288e1a3deebacf","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.3.2","@types/node":"14.14.43","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.22.0_1623952710086_0.7082446603241999","host":"s3://npm-registry-packages"}},"0.22.1-alpha.13":{"name":"@opentelemetry/semantic-conventions","version":"0.22.1-alpha.13","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.22.1-alpha.13","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"ff230d7ea317470fa8047f8c9c8eef3cc334ce21","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.22.1-alpha.13.tgz","fileCount":39,"integrity":"sha512-+R0ByDf17VorBR/XoYQ/ICMf8Si7DAc7fAa0G207ErLpn3n4IS4lDRz8/lUXNvBTZntUvYzabIg/OhlwKMijSg==","signatures":[{"sig":"MEUCIA/Fojy8BPmkQVM2Hi/akUMn1y3YyfL7dUeTpcZNWSg5AiEA0sj6w74riBgHqR0ANX2r7g1aABgThi+8hEoQXbpKkKk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":252794,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3LqOCRA9TVsSAnZWagAAbbcP+wT/+Eydd5tJZUxjBCfb\nEsoQPBQvhyeOTz/CTsQ3/V50a7cmOz8iSnogupYdBRLhl9WgeY57FJ4hn6qd\n5PB22c4Wxb36+FzLD6EJQ3Z63LDwM+dl4k0dvINptSxyKXc5KmIOfjy1z8Uf\nvuozDD4vGA7V6ih4FMlzuz/3N5Sd7RCUm6/b2kxpL351jaMcanriUaoWjcXV\nUoBN+mASfuwRZZrO7p54HmZFVVZbkCNkGAhgRrGuOys3RX1TyOXgVXgZ+jzc\ngkxCN3ezN9qv+D7e4WyctjbbCKXG6kvRYvjPsADbsYbzFhseDbj3adAxx/+E\nWjHiIi430OkQlUuus2yi+sIOyxGKwanmtGEFtkr5OwdqEuJm0gWhOlHv2k3q\n74ge6Ngw50MXmg+yCw5aQ4ducKJYNxaNqaoxKFoZvFrdveHvdVnOKWampJZp\nSrWoycczQck7btbVeZvBSzSFO6ffRc31Z3XXGnbYOesSNGBmmFnFcMH21jTb\n9ycwsrngq+t52kuT62kdGiGaFmKCZqEKtxXq7nAWmQjr9NK8oix1gdWeQrM5\nuQ3VIoxGMSCTQZ6PluO55p4uCxCYbW/6ue3cuy7UDVLaYrLLS/YQ7m97a87A\naa0SNOsgiZxJFSIm2NALdP9NQcVTCkoSlVJYj+o6Zn4aU5YDym4ZxheHjgDq\nX/hl\r\n=Tn2N\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"01418978e5cc15b5ec4d5283ec48910799fe2f06","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.1+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.17.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.3.4","@types/node":"14.17.4","@types/mocha":"8.2.2","@types/sinon":"9.0.11"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.22.1-alpha.13_1625078413575_0.49275408553265065","host":"s3://npm-registry-packages"}},"0.22.1-alpha.15":{"name":"@opentelemetry/semantic-conventions","version":"0.22.1-alpha.15","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.22.1-alpha.15","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"155c7a4d73691b48f659bb52cce68e1bd3cf0e90","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.22.1-alpha.15.tgz","fileCount":39,"integrity":"sha512-WWR9+RsRsI1oKPJ1sYiQBq+QYS9JfCWjjYyhNQkUd3C7dQh0zXpdoN4QBV8NhWd9JgVvqWuVr7OXZpnSLZ5ltw==","signatures":[{"sig":"MEUCIQDiZTEiAqzo6AwKkPRWkC2m0zLFn4tPda6qelbPUVdQTwIgB+SOTpQj+94ztdVyZgBCBuSWhevF0jzIYay0u3Kl1BU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":252794,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3MEzCRA9TVsSAnZWagAAatMP/3yNHVSPDq7ROa2Wow5k\nytvODlQteuvJY8xtCP7AukHhp7G5rWvsRtuDiADAPHPJde1KElA1g8cPQaVc\nwGiB7iQzpy3TjMr6f5OJ1CChUICuaHIqodUxf6QFiSnT1/SxJAhki2mKFAT5\nQgMgjruluJY4uD2lkzoqRJKd3X+oK78BoZx16CnExwJ96evTzbFFkIAra3sG\nlNqi4Jqkv+Lo1l8xKt7ztAvdt1XUVoGYGLAbhLc0SMrB5jvmsopsMxrDVjHh\nf8KU/Ro2s1M4+qNfP4eu8xARYfOqEk+yvgygh5xVV7Jg+J4flgQMynp3zzD5\nwBnzZbXGIz3OB+rOEUVXq+vlHIs5x0W8/P1O9UzrrEsHO3lrNtdn8YgEd5Hc\n1Ohhn5f6xJLMv3VKtv4T5G4rmrJ1ow7jR/9NMuk6OHuMTGpFQmO1O57xBRJq\nLDnXmUfYeqIrh6AgrvV7i5X+DBqj+4VEYzz7CWpkHUpwLA+39IKSgbuWvJWp\nhkZUP9jxYb18tne4RuLz5uk2hBaHe78kubOCTH7I1V/puwx4QjOZ8kFgo9fr\nfyf0TcjSbr+1ohtSFsWkyuVGkvqGqgfwJrkLfIr4B34hmkDQEvTKKKYpIZ35\nCbhgN/GFP10rhvRs8rYTO3v/MS/f6jxX/VBMKdx9ZdRsI6JSoTq84qaDz1OT\n4TNR\r\n=vViG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"c3ff9d1a6b599f01634ed2479183aca2c6d57337","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.1+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.17.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"9.1.1","ts-mocha":"8.0.0","typescript":"4.3.4","@types/node":"14.17.4","@types/mocha":"8.2.2","@types/sinon":"10.0.2"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.22.1-alpha.15_1625080114654_0.23134827564296012","host":"s3://npm-registry-packages"}},"0.22.1-alpha.16":{"name":"@opentelemetry/semantic-conventions","version":"0.22.1-alpha.16","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.22.1-alpha.16","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"3693164a78d991648584fa379e5174ff3a6bc945","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.22.1-alpha.16.tgz","fileCount":39,"integrity":"sha512-hxjHyquc/WymubE4RKhaa23+wbhGrGW+/s0SLXtpLr9D+CILcv/Bwyt1ikPSoxs+/H233EsOLqp3DgujoR1K6w==","signatures":[{"sig":"MEYCIQDr+6uRotv0TMktkndYIk97R6/BbET5KRZ2bgxq/2LjzwIhAO1Y5fwIE18M9eqOoTcitZPQFEtTWPoZPVqn9GlOKv+P","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":252795,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3MqVCRA9TVsSAnZWagAAg0cP/2xJKUBm5+8knlXh4b2S\n2ecEbHLezorlwZYebFwKBcsnBTWWx3bzF2C9EvIWvXBLKzO7arYoY/g65Bfe\n4RyMqRjjfK3+F/YftA0uPuuqppA/ZoEjry5GjD4CL4QKlslpMU2tYxgEXbLX\nN/FCk6rgYFuQgOaC7iS71NzUuebh1O6QvOn2zXpg3ya69xmf1QMONWf681zN\nRIG7jQhAhg/3RyB8PPZ+eYghFSxEHsP0QyFwOKwBMvssBseFYrC4ktXmTAaE\noXbQAv40q3tKHyZowp0o1uuh8MBnXoXs0A2Xuzhqio30FkgH3N5DPwCeHI26\nr3pZvMmJ5FAVVeRn/k10/5mOsPqF2laUHp+jvkc+JnIdoyoT3mqb6L+FpnVu\nM3VSD/s59M3WVVsMzLLu1DjU3Eypi/VMORj2Xfg3Jjlb6KkdP9x66WdcP1GG\nxze4LVah0R9gKYSrS/8QeG+9DJNAz5+Zhtm6o73eId4EbD8utKt6tTZ4UIwc\ntageYAGw3SKAhikjuxvziYkWl32CgOO7RBkyfnjY/4gCXVsmKdni8ruoKK13\npnpxZCWqD1TebGygfK+cv7jC7zvG5MWvGY8bAIiKYs23ryyA7y7rd0FS2EyU\nBDiT66uR9aecrozx0gsF7Po6fnpqYaVh7cC9mNl8nDkz2J3Vl8Sf53cjo6S2\n1E6a\r\n=VWHX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"5af147b159c9dfad8d00a20a3b140d55736f1919","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.1+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.17.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"10.0.0","ts-mocha":"8.0.0","typescript":"4.3.4","@types/node":"14.17.4","@types/mocha":"8.2.2","@types/sinon":"10.0.2"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.22.1-alpha.16_1625082517010_0.21881760114862603","host":"s3://npm-registry-packages"}},"0.23.1-alpha.17":{"name":"@opentelemetry/semantic-conventions","version":"0.23.1-alpha.17","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.23.1-alpha.17","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"f7e36ca3356ee53b417b11177f32e557aacb6cf3","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.23.1-alpha.17.tgz","fileCount":39,"integrity":"sha512-pq7Ca/aY7YbaDIebMl62bmY0H7XQO8eP9tmK1GnECq99jTUIfJO1gUd7d22266w81bk0VchXIaG8qXJC+KjlQg==","signatures":[{"sig":"MEYCIQCWwB7UYO9tLb2KzNJbOvu55Jkr2N6diw2b2to2X9tJVQIhALCMwfvbVHGW2RiP5BM2Q7Lh7DVqev+XQaTvIG1FwEsq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":252795,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3M7+CRA9TVsSAnZWagAAaqYP/10o5HpdHQNh1aFxCK8y\nAD0oQgPOGuwc8dREUumadpPzzGANkgS3qcCcO2o1deCUo+2Kk7Y7pHKbZRRe\nbpymSqSL6p8HPrMKIA8dZj+1MyOpsqTvec9SV8a6JPH1Uhyz51Pv1W0IuZYj\nZMypWTWGm3t56QXcu9RQfQi+ng4cluqcQCod6LXLWWkEFOFQ/YfpXXrsRlZh\nx3L+9DgKlynJ5L3k7eEgeXBaAqTk/L9FTSZY5pSgZyOlgMY3jif8Zo01we0E\nRU0rQv290f2/l1OPTkwtK/oDDn7AJuDKSlPIW8i7aCTCPriXG6nLXsthLXZR\nYVkeTNal63qVR29K3f4ghtI9E8B6zkUwAFPvPeKuk6sEwdsU2jmHQc75sqHC\n1pCecwg9w/FWfKZqHBql2Iv4SE2t2yOLqqdg3hqmrYzfBnK+957h+j/ZrWZ3\neugmP44+h3bWcuR4yMwroIEEszvoiYlNYG1+VcDjtC50rm4X6Od7yM2005/2\ntoxkHBFhf4vgo+4mwHu0duBF0va3U0wh4SUPaXCIJCg6PLblpFudkq+1wuiJ\nYrRlW7YUX3PBknBigoxu7rftiTjeSCuz/EAWDK0oP2r5H8FNO0i+sOMZHGxQ\ntOuxlGBdIxF0MCnEj3GuApYR3cVu82Sh2NwtuMIP2B1WfNeIb58njxNko/6n\naIMv\r\n=6/Xb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"f2a958dfeead4f6ae20901ab3fac04e4fc424a3f","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.1+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.17.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"10.0.0","ts-mocha":"8.0.0","typescript":"4.3.4","@types/node":"14.17.4","@types/mocha":"8.2.2","@types/sinon":"10.0.2"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.23.1-alpha.17_1625083645604_0.6341839144580665","host":"s3://npm-registry-packages"}},"0.23.0":{"name":"@opentelemetry/semantic-conventions","version":"0.23.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.23.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"ec1467fd71f6551628b60cd2107acc923b9b77cc","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.23.0.tgz","fileCount":39,"integrity":"sha512-Tzo+VGR1zlzLbjVI+7mlDJ2xuaUsue4scWvFlK+fzcUfn9siF4NWbxoC2X6Br2B/g4dsq1OAwAYsPVYIEoY2rQ==","signatures":[{"sig":"MEQCIFpOK++ToxvQPFRTCg8nmw0jlFXyiaIK9C2cTchHpalkAiAQibo3Z8NUaI+pIcAe3OXvM3yHu81cP/v7NRJOGBtsmA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":252777,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3NC0CRA9TVsSAnZWagAAV8cP/02qr1YU5HDYz3rut4d0\nAig0ZGTUWbmnRYOxDqmM3mNais6m8ZTOkAoQ6XDVrfMVqrd887oeaT0jwa5S\nHya9RY4iDAKmczBoykF14t76R/btY8HmYLXywkqDZCoa3dJnQGqMlCBkqg27\nyGRDGMqhN8IV30IRtsbb3jghHcZ8u6e67uLzwZV0DHGmDNG2ipzhS0xh6Se1\n48EuXOnU4iabecUljeqVZubE7iFXTdcLhetPr8UNf3EcXOCWGKuO4Cw3dgOV\nXsdTdqkWjctG3Wmhfwdhax12j9zt7zeb2rDf0HHVrCXXzUNloyLtRHWG/Rym\nQomEmbzeZG1BErTMA0ilgCBsQSjfbcmvrJEMFDvHMluL5xU7/P+l/fiZgQfm\n7AhVP/taBYZrpu6SnarVYQ2w28pEQpLzPYZDZePCQECb0bnHsDajRxANRy27\ntzxx9FyInQIPcrNOR4NXNju7UqrwAz5DU0lL3TmXfNJ94i71A3xnPwxeDD/t\n8GU36LSaQkcJolKSkKvw28SGByQoNn2ofIuv6yTClE1jyuckbPS3YVGji48S\n9CfRsW+JWM/nEHiJa1wUa8tvtewq+Cg8WbgeT2ffXZfXH/RcPzigvM6XRUkM\nzXxY6yi045fBUcpmqMTIRc2vxEEZc4IWnvUkAieBGOYabr4sfhP7Zg3syApl\nnEcY\r\n=d1dQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"f2a958dfeead4f6ae20901ab3fac04e4fc424a3f","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"10.0.0","ts-mocha":"8.0.0","typescript":"4.3.4","@types/node":"14.17.4","@types/mocha":"8.2.2","@types/sinon":"10.0.2"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.23.0_1625084084162_0.7341663002118268","host":"s3://npm-registry-packages"}},"0.23.1-alpha.18":{"name":"@opentelemetry/semantic-conventions","version":"0.23.1-alpha.18","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.23.1-alpha.18","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"7a84f49c29a629486a7ffdde0e13d72339fbad31","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.23.1-alpha.18.tgz","fileCount":39,"integrity":"sha512-cXLAzAZ8H/zYtiMtSpkbSbniIzY5mkdstM3oNWCYe9UZqaL2liLxcE5dc7CV9g1DmAPdbiPwYMkxFFBL+aBycA==","signatures":[{"sig":"MEUCIQDqxldEcatGf/ei1E5R7Cv1jH4d0hXydOqUsmIJWRdF8QIgWj4VclkIIrYZPPE/ispdd1arDprE2SlJdOSSz+/BTgA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":252795,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3yTCCRA9TVsSAnZWagAAS4cP/32mSRaxTf2pEf+2gvq7\ntZmE1moZxouXJ6VIjx1jkKdF8Qvq8I7kShHXKtqi/JbAHDGbqyHzn4tNJ6HC\nLkEPSVzE7VuQJsAhhFOC1bgQ1KZqy6CylSXMH3T6bvTltB+J/1jOnl7XciAV\nA5yKswCuK+7vm8M43CFK0Zn2NRiCd7N64ZKPNIWXykcPEYtGEn6T6xPJjRVn\nrsapuciwCisaCcQ8jEFnV1MRv1GD0XX3pLYXitZOL/u15UkJwhfuMPslYtpd\nFNeOakZBPRQ8WEAutGOlu/g06jDUucPMLG0oz/tIYYjjeeRgbtOE9CEpVFaU\nr4uALDY+xYzuzo4Cr/XAoPD86PntxJpB+0UEvzlPGXysrEcPgOUST4zGhy+3\njOZPclJJvO92auJTgZP9TpWgZ5THP50zcfAshAvOah6K2r+OoCk7PHwUDGxq\n522IyYyAPfu533ZDcZrGiH6Q+19UDGZgY6c9adZ9MP7bOjuzSkVqshF04bV0\nRKF3lTu5Yy8qzRu19EGVRpGoK4k6rMuIKW4f1R7hIb/hkc8PX1XEd/SyF251\nSeEFVZGflbMJj3ZqLTNnjU4sGizDggWiJDh/3f8VIJw4yB1/4fSSe9wKKCQC\nyPKTvISddkc9q0Ykni4ii07G+7T7HxsRnSgD/iRuQO+dv6evcnhfEciHz2Vr\nzMis\r\n=W427\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"4b3425dd09f0a7087c9d741d25c7a9a0be42770c","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.1+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.17.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-node":"10.0.0","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.4","@types/mocha":"8.2.2","@types/sinon":"10.0.2"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.23.1-alpha.18_1625236673919_0.5726549588934098","host":"s3://npm-registry-packages"}},"0.23.1-alpha.3":{"name":"@opentelemetry/semantic-conventions","version":"0.23.1-alpha.3","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.23.1-alpha.3","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"b78926b225698b076d027b8d464726f0702406fb","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.23.1-alpha.3.tgz","fileCount":39,"integrity":"sha512-B+Vo5rC9vXrGAECsU1AJfugLEwiyvUZe5wEPU7DQAxrhUYPWh5nTGwA4pA04SZTJgtxLveYB+420+itUrkEVJQ==","signatures":[{"sig":"MEUCIF6hfqiehpV5oZ6Hh1B8PIDe3KWlFb4z8RO8djWb0wYxAiEA4s//kiIcLtWpO4wcDj2ThZ92oz1BxfSUlL2nrSfqBTk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":252769,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg44dHCRA9TVsSAnZWagAAvtYP/1gzzT5yi8fE6lNToYYy\nkl23W7TvRIfe1B/goYAHeLqwglfMdsBX8BYbH/h84ee8DzhLTjznlOQYEQoL\nVui1rOhiqyVRutVhxs5sB+vf/oM1M5UIBU8fmNZjJfjnsgcw831+cS5vvGka\nC0zLTQ5DgspzjoifhC9OJXNpu0kx9KXo7A035mHqVdKlnU4FubRHMQB9wAiU\nbzYNwfxeQsQv29jx1ugOcZCLjmtnmyiA3F3atnqJXWe4ATgltKm7bdMPV00G\nhjQ4mprZmey3ush9VtKVoE7JKCC1sR6Hi/Bms6ggY966pwO0aoOKprzcpjdn\nEwRA+4fHDJZkI8SAe/terZctNnnfOG05wPanINELdJVFkn5RtJJDoXckj7M3\nouLcEszZBwS+VVnuAZsdwTRkfLElrsW+ayN1ERQxsEL8dYJy7qjhQMzeZmaL\nL+31WIyUBWm5+PTGE5Yq0IK1jAEZdmUNthuHBzxLrfBxRtXkpU1bIq5kZwwF\nYUc+vRhJ/AE4JlKL08nWsdIFfMT0HsLOYfqdghT+l3y255Zukxeaiwl/A8Zj\ndTN6OcFn33TcnT/w/Nyci7yyB6eIihja1XsyFFjYECdu3aGBy0LUasTxswKQ\n6Uw6LbWLI1BghotRaQ5XWvLEWf2kQZmVJtebii/onJK4EWSIhD6JotM6hegL\nVZLE\r\n=hv9T\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"6ed8d92559df68ef1fd3273598a1860ee5197e53","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.1+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.17.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.4","@types/mocha":"8.2.2","@types/sinon":"10.0.2"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.23.1-alpha.3_1625524038831_0.5744264108275918","host":"s3://npm-registry-packages"}},"0.23.1-alpha.15":{"name":"@opentelemetry/semantic-conventions","version":"0.23.1-alpha.15","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.23.1-alpha.15","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"4df2fe226eb77b3e2c14e5b0c5f61e811802b5d5","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.23.1-alpha.15.tgz","fileCount":39,"integrity":"sha512-F1Y3YF62RbsdU7og96G3xemdMuBwLE6mCcsQw5QnBPKu5/G3ueImS36A/B3Xba8zKp/KwRJEExk84KuactJflg==","signatures":[{"sig":"MEUCICH919yDXUJ2cj7vNJifRf7s7zmukiFaI6HyWrBHsb+oAiEApc2X9yDadptI0mEZ9C6szAjgKbxb9nEgio37qgDPGCw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":252770,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8qBCCRA9TVsSAnZWagAACwcP/RrFVqUKUXJz/pqyJXVD\n7S8IKq8xtho/RaZYSvr3C3wIH3D5QCwH1/9hvhRevebJnDpmLb3yCz+U8Pie\nEEwwIZ1/wJVAJqBaIXpw9K2PdXTtd6dqv4o4QRi1joO0UTTUGcpDsj8vF0/n\nBNARHI2HCAtpJsb/G49NoipCMNdnHjN1L75IrWcxdj+7SPgFh6WNRJLwb+gn\ntQP5yKHNFL7ktJZVcs1XBzoazdhU7NB2TqR7KV/g122XmC+R7xk4AjG6/kOv\nnuXGET7OBivCQdHGB2MaLWwJCKGPZ0KaNIILPtCz2gulqJ+EgAdJnrhGdLH/\nkSrHSC6ybs35/Y1EtOKxk1R5DVcyZolsv+ZhY9AJg48kfSt4I14d4Cgr+pTo\nVIoYMWQkSEOtJYliMFbkDDP4Uk7/RJrGb4f+EfHynN0ZvgDxLnym5JLhrsx2\nHz/dZqbteKK0hOMhXtn3+gOiUD2Z72mQ8LigSwT0YKRRR6AhAwfvruzj3K3T\nNziBHwRJQzaN+83dfxMssFYJJA4x1noPHMOT8/CboG2NEfW+lUzQcouPEG7P\nd/hidNjvoPLir9eQui1XkDXltjLoKr2nmqh8eWwJSEcpmlS868gRiD+6Bmvj\n5K7IoTeKgesZCpZrETPWh6Uvm9lIvzEdVtkhZBuTwGrG1JMe60bpk/vArEaJ\nU7jC\r\n=EZ7j\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"b67ca0568c333e5d841c9b614ed40b3e107682e9","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.17.3","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.2","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.5","@types/mocha":"8.2.3","@types/sinon":"10.0.2"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.23.1-alpha.15_1626513474569_0.5074668790201604","host":"s3://npm-registry-packages"}},"0.23.1-alpha.23":{"name":"@opentelemetry/semantic-conventions","version":"0.23.1-alpha.23","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.23.1-alpha.23","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"ebde8321134441a760f32ac236ff7d5dc0004ab8","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.23.1-alpha.23.tgz","fileCount":39,"integrity":"sha512-9DgA0yUgjVkV8PEZihQGBqFTcjYSbXHjMhRU1nn9Tdwj5TzCfciZpjOTwnDxLDnwn3QFEuNcyfN0YhjWZ0X5CQ==","signatures":[{"sig":"MEYCIQDSaJkd7Olpvm74TzWFszubXJZANZw5CYZDNiuS0yFnWgIhAKbd+Vbj+xn5xKbzlmvLk8iaNh78CD4GxF/a6Z4Sl++A","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":252770,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+wBXCRA9TVsSAnZWagAALkcP/1Pc/yGQpozoFJhlse0A\nmeT03btkBJ1QKY38tnx5E+CjwGjlOpxUlpohnK23c8u3BH1J7Y4bkSMjhs5p\n7p+pxV8iTKL05sNS+XcQt4HlkcA8uku3QF9IEbIj9UgeUJcJG5vezrcWGH/r\nczjp5vipgVtzuHzj/BO3NpfUJyduwUat96WcfgTMs35lp+VMOWbmTAI86ewT\nyb9UUp2GzQMfxZzZ+cOQm1G6hTqzCuCF8KaBTjj3v+sB17h1AZrA7WsQokwO\nbKi/4GGrdp7torj+lJGfuwjwSNhlTJfOZOS4VozD3rGXNAiNwVWt4ZlVxwtr\n2fuJH5e/OZazw+jHJ3L82qlvZfVhyjsijSM06qttuMwHlB9auzxOQw6KM8eI\nTcYRrtoIjZGq8zScW4INjqOAopxOL805Sbkgnv5ESWCyaQluhbz0RZ4w8mrd\nPgpSA32idkccCplgycCrQ1tpENWF6YnQaTbUYtfnvj+uTCOk3E+3T0oEXYHf\ng2N4CeNBlr+YesnHRioG8T4CXkPVCLgPDnAPpxA7R3lyk3OqIY90vtGhVyxK\nr6ZcX5NUb69umJGWgdVtItUJf0NaGsNU+KmPePq8z/BArx46fd3prLEv2FOq\nxAkywZD+ze5U+IpfF1PjGoGut0epaL2yYFL69GSZRBm2xwhtMOA9RWaMd4Lo\noZCc\r\n=SK1Z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"884d20ab417bf0283ec84a72b9a0fae8ebcb82a1","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.17.3","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.5","@types/mocha":"8.2.3","@types/sinon":"10.0.2"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.23.1-alpha.23_1627062359804_0.3736998766836106","host":"s3://npm-registry-packages"}},"0.23.1-alpha.24":{"name":"@opentelemetry/semantic-conventions","version":"0.23.1-alpha.24","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.23.1-alpha.24","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"a043d65cf7af7d851d4257f70b39b682c2f337ab","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.23.1-alpha.24.tgz","fileCount":39,"integrity":"sha512-BSWK6wYtgXW3TcgDiEnoYUg5AIPCi0kf4p5uo4DVg7qPgEHjU8MSpBwPE3lOivsMAyxTbiZYhtqY5y/QYE9WBg==","signatures":[{"sig":"MEUCIQDj5ojXjQvyCIuBnGEsCZdUwYZzaxqISUQ+XzGSUOQKTwIgTnH+5qt/PDSWJ6/MSYjJuxmsW4lGu1/Ko+01QxIZZgA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263274,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/QhzCRA9TVsSAnZWagAA3/QP/jMgLsRXiRP5c9ySVIBo\n2oD3FMpPx7iyx/mr6m/UDC3yfXFveUd4ghia8D/Aq9fN/+3Uu8mxDlRR6emo\nwtQPqPTK9BTt4G0C8Qce7BVay2+gQ4eOYi3RjPc6DF8mlJmajszWDbgKWEMk\nwpA5qAvz074XI2RAbUGZZZ5ByV05tTIB1WakcWdING/gCh6xART5e0lrnCo7\nq748ZdwUEV827bvl45lIM/+xHlRmzZK7XENk4E3a3s2KvsIrH2m5sxDxkX34\n2J+MJavXnuP7CAPeiXtOEEwjqNJasXfbLHa1oJ7Dw629DWUk33Wz2xT9Zi2S\n0yt9+nltzsMdQh5eo7rkiTpozwqGPldw8+5fSGF7R/K9MOdOqPawqqOEyTmP\nXv4hA/iFPMAPxXECWnNgzmGjrFL/D2SteXCfNrCROfOPROqibmVgAXNrLva+\nvlg6pu3AWQmkXVsEMnkEJ46OBsHXxCpjZ4HXwp/7z1XOKBCwJKnWj8LNoF8+\nCiB0I9YQ6YFm50SYy3muAyKRBPVAr02QuxVkNjmBQrBAJmmu7FrKqV8EIYrY\nyBOG0A3qhpxGNr2hvknfMci9Q1+wn95guTupN0a7AshsmuA1+7ifWEZZYsyZ\nU94LmeY5KRrdKpR9DYh4FR4sQu+KnpNNvw8cDXNTRmZBDMsNebdlqot9kz31\nSU4b\r\n=IxsD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"3bc3452814e30274d7eea1f3c9da968b88b1a197","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.17.3","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"10.0.0","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.5","@types/mocha":"8.2.3","@types/sinon":"10.0.2"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.23.1-alpha.24_1627195507135_0.398552862146101","host":"s3://npm-registry-packages"}},"0.23.1-alpha.28":{"name":"@opentelemetry/semantic-conventions","version":"0.23.1-alpha.28","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.23.1-alpha.28","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"dc12e94ce497f954c03dc7309b392917f01b338e","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.23.1-alpha.28.tgz","fileCount":39,"integrity":"sha512-OeHSC4R7FjIChfB1pVLxT8Mvrru8a+tQDv7RIyfur2TdWtymlIT6n7ojzw8U1u/bW0vs+OAhphhDS5H0jbgSWw==","signatures":[{"sig":"MEUCIQCQlIhYau+EZirdyfhkn8xzeIyFee8vocwrkpEqStRVDwIgMfVAkK6ZjkSQgzFXA/yNFPUhTf5A7B1FrqhxsTKXXsA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263274,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAGIFCRA9TVsSAnZWagAAKU4P+gIFCNvOuJ3TfkY/GfEq\nj1hfei4MZOsrAcSiMgbpllmg/TvZzxljHCaLEj6XNeTgfmcT1Eg91tqbyp9D\n/aAKochV9kK/zls6x2/+o5tHs8OB3SPjuuH3ComjATeno1OsUkiDybcJHK/J\nN4je2cdTogOjOpxPAqO51wJuVULyVB04+8p6LDv7cjHT62T7HOM/zUXO8dNa\nqTLpciEShVoS5eGSn55wNO7PoCDAqOef1Td4WnNkYlktwWCL1+XMZIZWX0Y4\nG4PfKmqkhRAk80I+lZsY+7T8T9UKK520ICbLz04+T89K7T1Y1awNQmUA1MMn\n2fQX+DVR8sEedwj503jzFsJnuVRWdmT8Uiitlorq6kfM2DKOQecvm1i17z5k\nXL+YHpKCdye/HwSJDEkfDe/J/ZSOVDNNJh5z78uhyRGU0b74ra98xwv3H7Xy\nXutF9jqX7SNAjEBUtp4aqAALQ+qtne+CChEBfWhBAIXlsLrsWDFzc88agN8K\ndHc+uP1TdnYWV/hIhZ4/KS10Lsc4QHftmLzgn066pJ6WrkOUTDj6K5nFq7LW\n63EqtF6si30v7Wg6FNnbaw4jCCbt7w3Rg3yumNgamFMrRo3j3vIacBgwuXgz\nVWy3WDATsjteisAhQQUqJ5eV43wjGkaF/CnnpMQHPFdKfx68IWSvTI0qZRv4\nG4NA\r\n=TEqV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"d8fbeddacce3e27aab40b24c2ca3c271155e74ea","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.17.3","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.5","@types/mocha":"8.2.3","@types/sinon":"10.0.2"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.23.1-alpha.28_1627415044861_0.19805459038910578","host":"s3://npm-registry-packages"}},"0.24.1-alpha.31":{"name":"@opentelemetry/semantic-conventions","version":"0.24.1-alpha.31","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.24.1-alpha.31","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"7a9a10da1b28aa24968bac90f4bd3e025c46530d","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.24.1-alpha.31.tgz","fileCount":39,"integrity":"sha512-kVdxTt4M+Fe5MwZ3QjAFDoHpiJ0MDh0IbvxQkHODb9EUiZxYICgDXKVUM25z/DDctaiXzlfTtVYOLDpPHGStPA==","signatures":[{"sig":"MEUCIQDc0vtgrTp60py7uHCWObAs0hghLAJGCPfBVQE8IRDIZwIgXeSctrN78Y4haUrlIMnsuMpM2D70wmGsHpALUPD3KK0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263274,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAWR3CRA9TVsSAnZWagAA1mMP/1cOqg2u+YVSywhhhuCQ\nthOc6aQPXERW2aDAzhCNhIscI4aLYwrdFaQd5hG2veSfhGitw6kYDNj3qcHu\ndjG+TR45WVESKvaqmz9wGpfSSbjK5dGFq32CRCle4SLj7cwazmzGF41rIpQR\n9bSdrlkbS0EZjLCJgXOWCrCSd9uf2w9sgdqRY4CUCNNxABq5gEj8HpWXzfmB\nvQNgDDsUwzXZHiqYoihGA+YOvCaerqxC4Ornv8XlBy70BTLlyaEjXkyz6Thr\nADiu5CnBtEbYvnXsaMO3n+AgY7kAvxWy7Wu4T3VFZ5h/Hakd3HC1qdCZS2T/\nqQ7H8cEVwmzPMFiOIZg/QAV58VzZw3FP0l4cRthZUzwljeCV07CpGeSvwlyc\nkjGA9o0yIif/6z68oblVLEGNNlkOLcMvSlo7ot/u9A83kZJUv7LIfGk+AraP\ngSKYzT20J7eNK46vZYHtwozPieelw76ZYWbFGxXKbqOOQXMz0tJ6vR5Gqmob\nbYVVsdnK2A28EeDs7uDlIOZd06iyULQcLQcyMZs8S5wSEPejgO0adlMDwvgW\nLKVPhz2DPNEqKq1MJwufXxBCMThkPkt3w8MMkFPkxC5udu2eHapdEuYXaA2i\nEolKbkrVA/vGgr6ouVgqcpWAGT5NQAtnq7+nihou+eS7p0yebf58mfOcizeg\nAekm\r\n=5cQ/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"fd2410cc9e8d43210b6ea44b8193fa70ee900499","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.17.3","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.5","@types/mocha":"8.2.3","@types/sinon":"10.0.2"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.24.1-alpha.31_1627481207497_0.2478579747989651","host":"s3://npm-registry-packages"}},"0.24.0":{"name":"@opentelemetry/semantic-conventions","version":"0.24.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.24.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"1028ef0e0923b24916158d80d2ddfd67ea8b6740","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.24.0.tgz","fileCount":45,"integrity":"sha512-a/szuMQV0Quy0/M7kKdglcbRSoorleyyOwbTNNJ32O+RBN766wbQlMTvdimImTmwYWGr+NJOni1EcC242WlRcA==","signatures":[{"sig":"MEUCIQC8TSe68oszT4eAtUNkwNTJLmVlV3l9TxGxC8HxDdmUqgIgJVJ+Y4GJPxeLiwFL/wHxzkYgBsel8RCApBRFJwGHlSA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":349338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAWYhCRA9TVsSAnZWagAAr6wP/3iSX+EIr+ujeSdF+YkP\n2CuRx/KjtQd0jkZeqK6y7+rxl+ySFizs4ylBsTG1VNcLb+LoMS81jYKALacT\na8n24QOb+Rje4dW/oEQj/DCAgLE7sTC4DlESdC6lZoq5r1onR8jM2c4D/Dtm\nzOh8dKhUnkpm/sy8Seb6bieLuXJ1rTOX9iOhgLOtYZTsiLUJZi1q78ugh3y7\ni7xYhsRrwa9YrHIFXLOZhiczj6KCE1XQsAJeguH9pY0xcUobaaGMo1x7B5ip\nwiBc/dQa4nB2tM1l9+akIJk1OI68sSDIUmCIiBS2Ua+SMABaXgyl2jbhkMEN\n3+YDlAZHlbpVove0MFppfM7nyRUn0e/wJX9tP2dSUa2wkNpVZWAMQ5c1nKiJ\n9qc6CHS6JCfA6OhN8duJMqt86G/qqp+AzFQ1MfRh3B0cb7bDHm3Jt37q6HtW\n2sEHbTmwb/Zv8CJ8u4LM528Fya59oSoBS2VEk1LBwNOF5pwhI3hPvvNaG4lm\nHaJP5UjcQTRImipW/9hzOb6fa1w1nGqioWUTg0tgY2e2ZeNoSqYpH0Xe7JvB\nTnKR5MAQKdrvPg7Mfg4/O3Az5sZS+bk85aCZNirs7nPZTklVISPJ4DvrsQW7\ntLb/FsrSUa9hui4FtVTC/upIKITseKIaW5fAi+639Jt6+bCCzEUMOeJJ8gpe\n9gv7\r\n=Zla8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"fd2410cc9e8d43210b6ea44b8193fa70ee900499","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.5","@types/mocha":"8.2.3","@types/sinon":"10.0.2"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.24.0_1627481633309_0.06732263313288778","host":"s3://npm-registry-packages"}},"0.24.1-alpha.1":{"name":"@opentelemetry/semantic-conventions","version":"0.24.1-alpha.1","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.24.1-alpha.1","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"3e7a2f1778496c330227aaa320be622ee491e7fc","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.24.1-alpha.1.tgz","fileCount":39,"integrity":"sha512-57n6Us8YNuM7qjf2ag5MgcLsxgf0CaVZyoAgGaMTBdX72fMpp5z/0kZ0BFUlC+6nJAbHg0VaFyQo8glSlMe64A==","signatures":[{"sig":"MEYCIQDy8hin+26MxCsZbk4M+NRihpYixHoc0dcvf1/cNacwfQIhALtZYMfhGCLLiDvnUtqWR1tkIpULzoD6zZXfZScz8M2O","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263273,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhBFYeCRA9TVsSAnZWagAALz8P/iT45B0Kif0C86866W4Y\n7OqRs9RJ45iBLO+33EipNDv4iPkc3VD0f4JoBa0OarIetOB1OruGFgld+6aH\ni1CUu5WgPlzp3BCpexHg2BiQje63Im2u5Y9Q4O6EERmEMSNm5/NEJnsyjgSe\nnehSXZ4sJpKOqWpe96CQlMiOhFwfvo8vk8zAAe3sL1odpfWSZqu8ATY4QmBb\nkoo7z3yWqrr5MDI4bQTco8rkSrk26a/et8udhHKHzNn4bvZ2Ub68EWymcNwT\n7vxkBxIJ+XbsmePeNbRhPD4vliWEunWlR/sc9h4sZ1HcJcXqWGkJdRMLXSYp\nYzkY8GEZhWGsk5FOAOFitx9QBtLnRd+Y2LJbUtKUw2CMp3wMzq7jZLad6tGW\ntaVoNwKLQGns25TI2sP4usK9v6kQlMfeKdFmDrtSVoC4nsEwXQIb66UmODyM\nTBsR9oXG9KeATA39pkNgSGwT3HojRd0so0Ty16ZuGLaqXNz+x9YBLbj7aW+Q\nc8w9NHNOwICE/e784fpP08nFzuO01kUSqtHgJlHIfLPrOKHmzUAX1FIpLVdP\ndGTV+KJY5EQfmbBB2GfW6o7AkajsJrPG+QnIq9KsPL07a0URTqSAb7VpSQw+\nGFgJ15c3STRddNRDKyY2Wk4MM5dwuJyO9tI2FfvH6TmLqAzzN6s4Lza4QUXj\nRak8\r\n=KjQa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"3b9cd16a8eeed7a262bdfea4c93098861b4c1ba0","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.3+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.17.3","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.6","@types/mocha":"8.2.3","@types/sinon":"10.0.2"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.24.1-alpha.1_1627674142124_0.8913889483973665","host":"s3://npm-registry-packages"}},"0.24.1-alpha.5":{"name":"@opentelemetry/semantic-conventions","version":"0.24.1-alpha.5","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.24.1-alpha.5","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"c2dbc244abe38e0a5367b43670b9e45d6df954fb","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.24.1-alpha.5.tgz","fileCount":39,"integrity":"sha512-QV6DBvkSWYb/0LonGPzcnw55BS3AF4nae42GFxzOTxDgBZOq97EV9XkRbn1LC0nVuCdGdj2xCU5A3gp+3f5X+A==","signatures":[{"sig":"MEUCICoWHAMS3sb0V2lzqsTiEZR2hBP2PVWfC84bQ9KpO7K1AiEAzSCBD3a+UkAvZEs2m9vSg9XzPvUZlScEy1mEpEoHAag=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263273,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDR2FCRA9TVsSAnZWagAAeawP/RcbuiQeNwsUFwEexedN\nCLYWPQGPPw3kAyWDRzjf0SR0jQehfChDSdgS+M5O6P3AOV3q7ka85INJF7W6\n6TSmQIexVMbZfIzk5TXcUsylpRddBojmWIqvb17BC4HLBxZpONHu7cWMTvR3\nkqnIDluJ17AMPSmIJhsTFM5KGhWfoYWFEHlzs7cqgPLY0fCF6/FDBqPw/XQi\nVTHLD6Coj/2f0DLiaHjcasZeEwQt+0Dyx4SIDoLvejYno2kAeqLNXwVSlaWP\novuPVI2+mEgr0kjP+jK0Ckx2ZRWe7KAl66yVNGFfsTTSPlkqSeYj4d6Ws2xg\nHFPBOR7zZHiC1XK2YVzy2A+9yI+yefnoQ4OkCpV+O6ImSHwRN+tw7L5ianxK\nWhtkVTQT46BHOuRu8uMtDC6TBkLXXnRHF8nwsfFNgPSlZb8iJ+8lSLyfbgkr\nLQhEO+JU91K9tx+wgeYqf0WuaxOeQaH8fZxr+q9IND3b4eCavscGsQZp+tpC\nLtjatXOttIRE0SoiDjm+Fq41WncbPmmGvZuiZFTP9Jh+lPP0xzs7NIef7q97\nqS+kHTTuSvV63cx/78iGp3ftriJgiE6AFbEgcRkQMwxOPwb5eyMNzAxvp73q\nr/woObo3mz+TfyLzL4bnBaApjtDgcEeAzKrnakdcTxctXQtlboMUHrdpSRuM\nPIhu\r\n=BlTR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"b69ff35e90a33d20a0154dcd326f1467dfd39e2a","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.17.4","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.9","@types/mocha":"8.2.3","@types/sinon":"10.0.2"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.24.1-alpha.5_1628249477133_0.5310870184826475","host":"s3://npm-registry-packages"}},"0.24.1-alpha.7":{"name":"@opentelemetry/semantic-conventions","version":"0.24.1-alpha.7","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.24.1-alpha.7","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"9b45471696523de0dcc151b5453b4b146eed0ae7","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.24.1-alpha.7.tgz","fileCount":39,"integrity":"sha512-ZzyoJqY6cIGntwUpVqgH7WHfuwnduRrEx8e+T4zko4HTq12fwj5a28fp3TRRfw9KxqGrC5ZI4wuzmDXiP52j/w==","signatures":[{"sig":"MEQCIE66g4xSb1Z78DaDcsjg5ZyJeXAYkE1H0N5RYGFAFvNyAiBE35rgX77ljlQmaeXfo1gdPhUdwqAhN/zAaWll10hdPQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263273,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDot7CRA9TVsSAnZWagAAjqoP/indTJ+J0JoTPVL5iRHx\nANpe9gKHYdBfB7FPim12EEBBpq0169PC1lZWvL0c0pTqSB0F1GN5vaW59yoC\nVGLMffOfMafX6rwqgz6TQlpvBUpCLjeHqzWmcnjw73g/J2ODcxwMr5b5kjad\nL5YTzkWy8VnE8HZX3fFDd9EVNsYifZmXsuh1ROXx3GHWtS16eMzcfZwDPoGQ\nXfKA72U40cxHlEItx90xTG9ge62vYycEi2SILQjE5BQcm5xUcoKr1YMINelv\nCkyDg+8iEaOcahCcsSFlVutIUU2BdW2er24oHOi94jNWF01sCeDGDjgma8p9\noe8mw50RQQjZ28UoOyi5kmr8lMNsMC30V0ThJBVvgZqZcx61GoYxT/98OuXn\n1LV/rm8B8rLpYPztbywNmeIFzJhq0o1YXkajy1cO3BSl9m3seAqgTGlqv+dC\nsLCcBFi77mWtS/oyeaspT0BZozd0pGVxbCnZz7QMIsMPF0YDfl6b1CHh/1sa\nq52uaeRi5vLB0v1F3CieXRwXFjgQ8tydTq4Qcbd0sYVBAT37Y2R7BGfbITvq\nE/rMiLQTVa+5OteiB3IMme/bfgv6I0inZNMjj6tV3aBTucva6to7BrGmNOIi\nxQuqv5i/stDUoDkCjvN7xZQ6tZ5COQfOMu+McJD74erj1hpOPBe4SuyEaghA\nfnNr\r\n=iOeQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"365d502eaa0ba1f9799998f050d36073e943032e","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.17.4","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.9","@types/mocha":"8.2.3","@types/sinon":"10.0.2"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.24.1-alpha.7_1628343163618_0.6578252594833227","host":"s3://npm-registry-packages"}},"0.25.1-alpha.21":{"name":"@opentelemetry/semantic-conventions","version":"0.25.1-alpha.21","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.25.1-alpha.21","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"b5621270ca5b05b1092d6d39947257488f0ebff2","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.25.1-alpha.21.tgz","fileCount":39,"integrity":"sha512-8PMq80sCMeIk6JnfBjf1bUYbXB3wLyugfOw4RGUO+eDxaHD1JkGfc1QHX6n8OrppxfWwcGcvRMYsJfX4b2bnrA==","signatures":[{"sig":"MEYCIQCSNjuGXsfSg3aEEh+hi1L9/GYttKLDXId0nS9/DdFYJQIhAMpJKONb035DaxLdhg1Ac2yOg+SHDhB70eifHL/GgCEu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263274,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHWqYCRA9TVsSAnZWagAASbUP/1eIWgf/L16aIrrXfDgb\nG66bf238Efbyty1SxOybAFyg8g+2eEavF9/LW7GFGexhpb+29SHvTMj2B4Ft\nsz/bP7cNExn5/M02fuksSE0NELEeSXC9xj+EVgi0dhchAKE5hnAesOW2FG65\nPwiUd2fAgC3gDfAVlT5Xv/503k1B9EsZIajBL0F1DYOv6jbUdv30TjYdOhJL\nwII8J6whfw4eJ/tFZxXFw4prTnIjoHWRdlWTdWRMPeGdWRNdCIu0I3RYt73f\n0NG8eANrNYApyV/dOtUMXY3M5oCLFftlpyY9T3nddCuM+iZeIbwLy6vrL+Vs\nVIUx3aEBOqB3Iw+juQgcrh2QmCGUwJWY/7eba58YX65WbQkjC8Bhci8LrjJa\nIT11dgc+ZJu6mCpxnAGp1t62m1SJf99p5FGBi5bYHKEJq407+HeZeUAcuIDy\nZjp0dA3SHcwgSFlEudjgRM/Ko/JyN7L8cTuaKxRKnTQIBAXkAnFJUXf/XyY4\nfdgztH8vkSY8UNwkxZ71BKwovYix8JVtRpVr4bR6D4QQntxmzCgOf7wWXWV+\nNzUMYfaOUvb04aaPcoHgfLJbz/0q41Qv5GcLI2igBdeToylH2eBfxd/4/ocr\nTGcp6jpgQtJT4Z6YD27fe73QHvzKWO7xWlkpCuWSq++M02zX8RKNR5JJGmMe\n/XU1\r\n=KV6L\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"0ef1fc28d366b74d98b73b5d6334ffdc75342fe2","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.4+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.17.4","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.9","@types/mocha":"8.2.3","@types/sinon":"10.0.2"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.25.1-alpha.21_1629317783816_0.9421911243055225","host":"s3://npm-registry-packages"}},"0.25.0":{"name":"@opentelemetry/semantic-conventions","version":"0.25.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.25.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"c100d146957949608c6b9614267ae044cdcb5315","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.25.0.tgz","fileCount":39,"integrity":"sha512-V3N+MDBiv0TUlorbgiSqk6CvcP876CYUk/41Tg6s8OIyvniTwprE6vPvFQayuABiVkGlHOxv1Mlvp0w4qNdnVg==","signatures":[{"sig":"MEUCIEv2SJM8mJwAqAC+lLegYmKAi9izZXZktf8hWVhvzqaKAiEAjRuKcb7GlS6FNNdGQhfX5AoyxBBY6AsayDGBx5pxIRU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263256,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHXi0CRA9TVsSAnZWagAAHLIQAJB9h517aStV4VMNXk1G\nRRAcBXNw++Aoe6Fxw/ATTRvEPH+2zWH1Cz0LI/9p/2qRUehFS74GO8zWe1ub\n7UvRdo1YpE+dCtHDbSHDDgwg8nDUn9Rl0tgknktsxkqb3qp3+FP7r8oTA0bY\n2xULpQRTKT9t+EVvAkZvryjNDsX7gcbUmy5ExqtrhboQe8btE6lTA+EVc6qK\noXTXCLbR+kdC6ejuBoaC6Epn9mN8WA6YHBHeGVRCtS7f6KVWThU7F1EYYx+l\nzJjz6+rkWx5QDDHnCGNonyTzGzih8kru2ri8+kebdBVkH595Uxw5hgcKnJzj\nlYQYDlLrGx4rDaNeYQ2ZQJVfYssVgms6dFmfoMb5vs/hInkQR+nIzpE+W2b2\nCXTLaFxAHiK+34cbBgWpV/JzyCiV4rJNS5uxjdvJi2mFrC3VPteKgIDMW67L\nPAUI5zBg6QUmQSe/cy6i1LmmHSkZYSsyNnrQJHA7OlMWown8GTaTJrQDkt/D\n4PUmlQ3CcrkUlt0hNfDhleT8EgLiWHLx5W4QeL68KXt1jh38hbqhHGXa3M/2\ngYV1dLQAeI4pfS1soYxr4vgK8LBCUITA05tBQpaFh04B0LIoYxcStFty9H8o\nT/9ek4e/k0bqhJ5LJlZWY48QSYIh5kh6EZhjaiGXP/i1Ceqg5MmKjKXsSDK6\nHIk8\r\n=j4SJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"0ef1fc28d366b74d98b73b5d6334ffdc75342fe2","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.9","@types/mocha":"8.2.3","@types/sinon":"10.0.2"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.25.0_1629321396734_0.4249537253322564","host":"s3://npm-registry-packages"}},"0.25.1-alpha.4":{"name":"@opentelemetry/semantic-conventions","version":"0.25.1-alpha.4","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.25.1-alpha.4","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"5a7a35986977a42a7bf0f7629417cae29a507c4a","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.25.1-alpha.4.tgz","fileCount":39,"integrity":"sha512-WIZV01jAgn8N+SxdKbAEB7NwI7QERrVGMsHtx9rDjTkI4lJMQHKHvGNy9fsrvKNjw2ZvOn6OBcTtLzzN3icvgQ==","signatures":[{"sig":"MEUCICV8tkuImrjHhSrFWuMF9HYkLa0UCsg4P5mAfY/gkbmEAiEAoehxECdXr+Cq9RuCVKGCEOjalulHxd+JZ4WOA+E/KDw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263274,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJUlqCRA9TVsSAnZWagAAkq4P/AsXgVSUbvrqzE8UoZ6j\nqESO31KC+jKue/F953JxsZGrUFH8ODE5B3X1eYnUWqj5ZDU9wnlYZ82s5JLz\n3+g1e/zJRvqOakrSwq3Kz6NIFoDqfyH4jwm+2IuHNHBeyrzz6/WEjcwops/e\nmEBFlc/1j/AK98sQVS/Kkf7zEAJ+cMye0zouMYSADsrH3slYtNo0MyjCHcPS\nhDF7k4WSreLiuFzbDZacueqq/NCmiwlK7I4cYfexKW931krWpYMQ22LHzIuU\nX21bSr4GI90pi1MevJ+4FV+ayAvGY5fyVdhtwb0da+Ltu1Y61N2xCSh+TlTM\nm1k281BQ1VYdOxsnA0zjxQsgdJRlEqfn4siTYKTyHt6Pl/M4jYBPyyebb/ys\n8Gn/MXQ5zTfdHN4RyMLWHXGtnRPh/JjTEWXS9DhEplz7BXZSQdyO7ApAlZjy\nwjoPSd6+ch2nbexOAgm7RAMDP72PQktMRwk6PCvvJIrg3IUY5flqgT4aMITu\nbTPCACLMu2XaeqW6q0XEYYLmO6BN07NyUrCSYeoUs+ooS1DxWiaIXG1QTbH6\nmPXSe42CdxbyUpdKD8Mv76wsBvBEWXh4lBbF+S+GiVY9WL18DjURvj0jgZ1T\nbdHDC0MEYCTFbgZS8xtMMAcglZP3w5J7VqY5fgORFxz8NEfw4MK052VIwO07\nH3uq\r\n=BlNZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"3cbd530f2ee5c06376210402eb87ec9e362853c5","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.17.5","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.11","@types/mocha":"8.2.3","@types/sinon":"10.0.2"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.25.1-alpha.4_1629833578307_0.9182366856666273","host":"s3://npm-registry-packages"}},"0.25.1-alpha.13":{"name":"@opentelemetry/semantic-conventions","version":"0.25.1-alpha.13","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.25.1-alpha.13","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"b7bfba1b8cad3a080cf65f185d959b76a92034e4","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.25.1-alpha.13.tgz","fileCount":39,"integrity":"sha512-z7bhdpr29oM0FK2+Yz7ChAqIH+R2ywkaQkUng6h0STxCxzr7kcjOtcUFUK4g9nw/fTvq8OVtwpmdKnPUQoB6BA==","signatures":[{"sig":"MEYCIQCAfJ+ejvtMQqtmXomfT+bk8a9Xe0Id/2hg2cMP55unSgIhAPYrwg1HURBOaljfjXwSD08h/HCCEwaFg1E26vHQVmxk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263412,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLUJoCRA9TVsSAnZWagAATjsP+QCYx7NmnBgJGOZT8dHs\nUSnRZy/LdZDbfkmboDaLl3ILPF20DwLg7bUOXw0OrA1NxYER2ERGZOP+YR1m\nkv+OZZEwCtwLYJq+dq/2aQXnoTnebG8bsdJxmHLvhiN+5Si0YMuImHMleIc1\nRrS32ITLKFpcDYXP22c3ikvAQrx0AyYM0u/A0kY/hbAY9TuRcuuGHj8a6F0/\n+e4i32qvO/fZjzN64lqH+NBquNmLrqrKoTnwlt0I7fAqS8IolMHQ4q9u9/1t\neSGUBCIkocN9o8uI09Jj7DCVp6KF631w0CKyp5SinbG/Z/2WdP2wqNOoPa/V\n3+tsLGVuL7H4SKXi8W1Sv7ByikEhtyeXwN0JBHlKZWk0lt0JtcBk1Z1qF/xN\nWRJspv7V83vHuzG4Oz96Z1ezpu9hTPrMEWFylcwtdUNzIHcXcGPclJoEkZCW\nNo5J/C0pn4TMBvN3D5Jlljmam3kLjuuawUT+5nEGC4uBpibq466dnyRrxeHj\nuRdWhX+w7z0jJDZiJzGZdqhZ34ate2QcIB6Go/fNzVSGTziSZC2A6SJSJ9FM\nL+N19t9R/ocSXojbG/IadeixsKtoK5Df7zuWY49zlgmXcsfBUlSeL2tCt7DB\nrkcwPf3oE7923O0ZmJ736+faOpnBGJE7HnUjteMQ51cUFCkJU836PrBicLjw\nUeVV\r\n=wFxx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"f0caa22ffcb26af2a2f05260f138a494e120a955","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-filtered-dependencies"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.17.5+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.17.5","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.11","@types/mocha":"8.2.3","@types/sinon":"10.0.2"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.25.1-alpha.13_1630356072427_0.07375279716748184","host":"s3://npm-registry-packages"}},"0.26.0":{"name":"@opentelemetry/semantic-conventions","version":"0.26.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@0.26.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"df94120f3a91001a55ed939d2d2a3f8c9148f27b","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.26.0.tgz","fileCount":39,"integrity":"sha512-iO26zEr7GCAG9/yernhSj/LcB4EudVcN8fiI/8B4lVnoqLZQ/qHaOVdyemdeXZ8IkIvoCifoJYPqIARJpqg42w==","signatures":[{"sig":"MEUCIEZzNnePvSJQqhTK/KXzAhJEtZzv6BcONnooMaNrU7ZuAiEA3MkEI2vLI4HwVn6WMweyGKbBd93K5qmVwMY9k5tXzCo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":278136},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"fa2e897587a2441205fd085772d80a0a225ee78e","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-filtered-dependencies"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.11","@types/mocha":"8.2.3","@types/sinon":"10.0.2"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_0.26.0_1633005324817_0.632934116737141","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@opentelemetry/semantic-conventions","version":"1.0.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.0.0","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"2b3aa897adabf8324585a5b9766268f0ceeb9fba","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.0.0.tgz","fileCount":39,"integrity":"sha512-XCZ6ZSmc8FOspxKUU+Ow9UtJeSSRcS5rFBYGpjzix02U2v+X9ofjOjgNRnpvxlSvkccYIhdTuwcvNskmZ46SeA==","signatures":[{"sig":"MEUCIEE3JbL0WzgObBf8YzADEjDli9gk0m0OvOtyRGs0W0NnAiEAsZwRsotvHXvA19/UyQ4bnwHXwM8XhO7yBecUjApBrP4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":278131},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"69b925d142a4405c7c6bec7deadd8b4e96c7d5d6","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-filtered-dependencies"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.8.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"11.1.2","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.11","@types/mocha":"8.2.3","@types/sinon":"10.0.2"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.0.0_1633035219834_0.44440266010986496","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@opentelemetry/semantic-conventions","version":"1.0.1","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.0.1","maintainers":[{"name":"mayurkale22","email":"mayurkale22@gmail.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"},{"name":"obecny","email":"bobecny@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"9349c3860a53468fa2108b5df09aa843f22dbf94","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.0.1.tgz","fileCount":39,"integrity":"sha512-7XU1sfQ8uCVcXLxtAHA8r3qaLJ2oq7sKtEwzZhzuEXqYmjW+n+J4yM3kNo0HQo3Xp1eUe47UM6Wy6yuAvIyllg==","signatures":[{"sig":"MEUCIQDpIdLmlqOcJN/Uv4rNEy7t1KvUUYCx1VQs2jLyusX1WQIgGXm6GJTtneXMmFF8m2j1x/xUx6t6b9U5CuLYRZ1Jtsg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":399543,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2UqvCRA9TVsSAnZWagAAjLYP+QDszzC8GJDUgTvtaWpJ\nr+xZCW0IojozhMQBLVJ7p7Z2RVInv+O9rFkImoZO7OS5/A0QXVLciOHLZTr/\n7osvcFQWdKTA8/Yer586/i6RXRsrD/I/VKIJf1TAoPDwss2HNiawxqpGKc9P\n5zb6j3ouMvGckmtUFutmVLrUyJpSL41LriWV0sI/eGbqLZR6egovfKa5Jymb\neu6R0QpkZ2xSp2p4ubpnwvPThFLBLsUUFnPv84vAHsE5klizESKrKZeU1mbs\nMWoSTxqQgvIVp6OMXZnJ4vBVBU4JjclJlKwe4nxepGkIMyZc/UjGYlgFdKcV\n43TJWRbuRCHSTRBH39F6APNzNzgkLU0fHqP4boz6bJa8fvS278AZd954U3LE\ntUyqcL/jOsYVgkfjNErfgdQstsL2XlEbG3WcHyxdsE27hDTuREuGtsfLr/j8\n6p8HBNs5TqBF3dnRtHTxFLFBU8xMQEpGfpCPOy81xEcH5YwHCzmVoQETmtzy\nDhvIRwcIR5cptMWjh8NJvqjiBkl1uVzceaalL/dQ/dcjRp5tQau/QjltMCGw\ndtgDC+z87CBtcM2Hu38DEfJwsshlbV3y9WnOdX4Ezlz3C7iikHWY0mBu66Lw\nMoN4zJhfLLaYUbHYsktgDaaVQwRJPD50OaBgKBN8V/J7N/URV66xv4hp5gIO\n7QaV\r\n=R+MP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"9cf402ee4231ee1446884b5f59958ceafc1b5188","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json","compile":"tsc --build tsconfig.json tsconfig.esm.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-filtered-dependencies"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.18.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"12.0.3","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.3.5","@types/node":"14.17.11","@types/mocha":"8.2.3","@types/sinon":"10.0.2"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.0.1_1636642278290_0.718750934722477","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@opentelemetry/semantic-conventions","version":"1.1.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.1.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"43f23a0892affdd4809a1a41396b25be919cc84a","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.1.0.tgz","fileCount":21,"integrity":"sha512-GzmijkVr3T00+VSeKBVK0uoVMSkmxUD6x6GQ3ZTBLDVYc9RCsr40KGdnPWZ5RdKl+/1mfrpthRSrzpfVUikKbA==","signatures":[{"sig":"MEUCICYaOq73N7lGpLqV14Eg4WvqSNZbNW26QIk2+n8/sstkAiEAuDtSQYN2cYitwXAkt2VsrSJXTrn725BKCNfgFf8ZcbA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":208127,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiND6SACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpLLQ/+PFEwWsEw6sNlE6VAvg5JRZ3p04p7qgi+Fi00jFyzKo+N4eRs\r\n8feceuolsdFrzXvZydCS3XROTo3NcD4N98VAxBqxiMCkbl+dmkV9INMHVppH\r\nBCtsqfZN1011lpgrUeQ7ks4uZiCm+DrmkKa3A1Md476KcFGH+UHlA7kjs+Q2\r\n6o3IyjViCTKUXDl9Xr1CzlVVvnncNblO7zhfUhvDsKQAelAn5i4DuzY22w8/\r\nhXM6WMUeoEj13E+dI+Yb4fpCFFBnBL2GCHsHs78Ed/s6PRmyLZBXJ3BMUCxY\r\nPycDOKk1jb/Qbj+O/fUb13q/SKFi/hLoaej/8oExzF7g5snGN1lP+dCx5EyJ\r\nXYIAzfAWySpdz7Sn9Ta/aN26vgynQo+MPX186fdfXfVrakqm7V3StV+yOtul\r\nzRRJSLfScaZBOmGx54ERGK0Vvb58iSHV/FXjXtLmQQkkhWbsYYE+QYta4udW\r\nRwlz7TIGI9cF6rUlTT1AIBYdcWmc/CWTPQ/ioPbQ51WHrF4Xyh4bUWiVZEHq\r\nd2/jcciYYJzwXxzw46Bey4HN54mZaM7+JiC7s52u+5lSfNXkD0amGfrBqsus\r\neIwmBoNJvW5uMLZpZe8E59lwkk9UCztnmjNjfv3dOMgvGP4uk7YXCXY+wkV7\r\nyo2GNGkbV7wKl/qyCnCISlboqyRVvRrAl2c=\r\n=WsYo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"f384303ac469914d0dbafde0758ccdae473f336e","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.18.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.4.4","@types/node":"14.17.33","@types/mocha":"8.2.3","@types/sinon":"10.0.6"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.1.0_1647591057845_0.38739990927527024","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"@opentelemetry/semantic-conventions","version":"1.1.1","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.1.1","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"8f09355039cf03ecd7a16b4e309c4a47cb8a8d30","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.1.1.tgz","fileCount":57,"integrity":"sha512-GdTwDHSaZ6iP5LUdvS/SLUjn3067xn1HcBsLZCh8YOsf22d/YWTBcnFl3buieBP4KiajwHLho4I8HSMDKACBSg==","signatures":[{"sig":"MEUCIGfIFyj8UygFDaAh+OCYIuMP3YpAtWge+qu1Mk31lKSsAiEAgGLgk7LPGjguK/i/Xa/N9FEQX+RtpKUySEnyqRW6Hvg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":590012,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiOij7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqvJg//UbOZDWdsvOKwsSDNLTQPJauS/ktQtJxvdbXuyNT8iL9QlgTk\r\ngp0xOMHvp//UgLYtJ3oHgE6HGW3ObdJAeZ9szSTBb4i0mJwyw7iX3KVx1R/s\r\nN9tykAOCMv3+6a1urOAw6DyDAvlBXtIXvVhGdeGQnktnJqpSahtU0lR84KXN\r\nxD8Y7X+hbPn5NwzJqVJX+yEse7Is0rpXBKo8t6mNXxPhfcyZ1dVU6RYgQP71\r\n3b8nIcvQdJa4aYwfCrWPKm0Ho/OflMKkdbrRNiAEwzZIXS7DTkysin9G8PUk\r\nBNHfCMj2AG3Q9JyeXkmzWNdXigqJAB5abRp0IewuNKX1I+DHYyvKfG4LhMOA\r\nyAb2B1IXa7+RyHNzzTrLmODke3VK/akscAh20qM33iz6fWn0GW8iygDgiDDg\r\n2pY1w6tW8ZjvBY+7a2SZ/FfAeE2Ce/Ur4dqaV39vlzkL3fsrI8b8HvRBH7Hx\r\non+AKyIfv4xpHDQhEv5ks7rvO+bsLFqG/dQV7ZrgAjgUoUpWH0CfztguYbZ5\r\nHOww51tdRg9ZPvXT5JYUF2YmbNguZ60gEE4SDF2hKoUB0G5J4TSUoKlHxODf\r\nGwYtMw37lwcRk5HglzmWFxkAg4NVWTxOzNr5DtMbLuEg6HNvTdEzxkhf0yAQ\r\nlzi6UZaZ9okjh1J+4AL8ihhNxhrp/2pgz2c=\r\n=EEL3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=8.0.0"},"gitHead":"b0f8a2d36e6d1d3090c3d2380608d2102c826e0b","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.18.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.4.4","@types/node":"14.17.33","@types/mocha":"8.2.3","@types/sinon":"10.0.6"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.1.1_1647978747425_0.08822007206401539","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"@opentelemetry/semantic-conventions","version":"1.2.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.2.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"1549c1d88dc45d720b8487e39077eacc69636c73","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.2.0.tgz","fileCount":57,"integrity":"sha512-BNKB9fiYVghALJzCuWO3eNYfdTExPVK4ykrtmfNfy0A6UWYhOYjGMXifUmkunDJNL8ju9tBobo8jF0WR9zGy1Q==","signatures":[{"sig":"MEUCIHEbBBwFyHq/89vMYu+572fG5m12OnFinPjoieek2kn9AiEAgYS61QOAOCzc1BXmFBsPTGxH/8cuUMBvlOwohwTZEMQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":590147,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiYsI7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpiCxAApNr4ePbHFopMUGcT4StKJo/Mg3PyK5pwctyWBE9hC8fbm897\r\nDPYOKZijeHaOvsaimqRe3Ub1gjpLEJMIJbdk1LESKErmyTSzY9D/EdwSFFVm\r\nvcBZ+4DD3lOvg11cBzRKH5spaIGBn0rYmwJCoQzSmc/xRo1JFNwJVzUNQPGj\r\nmg+GB/BznDHdllK8AdpvUr9zobaKaXcBweIOddxqMSGUiE54RuNhIVS8s4//\r\nDxkXFj/SA2pl0artOcWGkl2fTveLkt7MhlqMC4QnSVXd9C30idgvwj4BxIEZ\r\nuYCpA1OeNg2JJ7zlYiq/mBNwdEyWMqjnj1rnLhTomlBL4lzqdfsUj/6nbMNy\r\nvPAK2Y6qFEG+RhWIhf5dDFhVloGsa+JOAGh7qyms8EHy05OE2DZrw85D5bmV\r\nII8sMPfJ7g6dASldFDOaA270rhssP4qoyPEcBJUD1lDLbt7Zx3rJRN6AaEvI\r\n9A+ncryOaB3Pzz3XauVbzL7zGVKPHWs2WnV63YTiK2CmRckTLT7jK5QqGxnZ\r\nHKrF7EbvdqrUPSPVIgTbLpmUeFimIqu0BIPJuoXMHj2o6638moJeJYy0k+3A\r\n5Xti3GmeLU0dC6cWDp0dxe/+KsuxQJ147WNpDRxvpK4KGLsAfioJPbj3GdqO\r\nx34SIQVdgT5t2K8NO6Nbg0RyMCzd9PmtkGc=\r\n=FqpL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=8.12.0"},"gitHead":"a0a670a03fd35b0799bee8cc466f79e93b5b6dd2","scripts":{"tdd":"npm run test -- --watch-extensions ts --watch","lint":"eslint . --ext .ts","test":"nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.18.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"13.0.11","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"8.0.0","typescript":"4.4.4","@types/node":"14.17.33","@types/mocha":"8.2.3","@types/sinon":"10.0.6"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.2.0_1650639419497_0.41019781162448843","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"@opentelemetry/semantic-conventions","version":"1.3.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.3.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"0d740709fd65845c9cab215d5581e9fa80c59520","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.3.0.tgz","fileCount":57,"integrity":"sha512-7lmGpLL/7EHQcLVBxxOesgQQS7JSxzF/Xqx7VNMxAQbo14dzJEX6Ks0hb4LHqEMpCrKpErWXi4JxYCGrRJgx9A==","signatures":[{"sig":"MEUCIBo18Lo14ocO2DMSAReRp4bUYS6z5yInd3+Wgruj10ekAiEAgbHkfLooeAhGQzjZBGwoZ4uKromy+loFYKEV1VhBQLU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":590022,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJikSlZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo2PQ//e5tYBKgstsyU/0JWYYFmESj5rE3yW+1B72eZu65L2v48PKXb\r\nKweFmkZzyzqzUGJqCZzzjr+36GZaqtSwZ/ulzXVAqwxo28noVQerJqrmHor8\r\nZftpyrfN+84wKEJbFK96ZaSTv0h1lmrjniVGY6aAXjQe1cfT0wvTkFn16FAJ\r\nye1mtZ+LH0cShbHaQsHhvQwyc4TCnkPKTsMAvWcn6SDBL/fdnAhpO0ZsE3LJ\r\nL6QkRjxsnCauLK0iaULbgvlFToPU9BM/Wsb3pwDlKxa6q69fggRaMuT5Gxi1\r\nc3YLmdDIPUGsKJjqG4XHiyiLXmDYfjMfDhbfaQYWYzweXNlJOKjd5QwMpGcb\r\nMV2clA0Xs7ZbN9sarGTy/M3KuUQ+A+XO52mAHyyOw0EoHe6sJSBc2KUM84yI\r\n2e7WF2XD43nvCMv7R86Ao+wFBd25EQkz/anrpl6GlOxMta3NV1s76vfTXZgS\r\nu5qPWZcWRPhMXUqFbOqF4Py8HWxr7EIlhHF5VhLLp+dcjS06iCdQ3L3BL5N6\r\noLTEWVB6bF6hH1NOUi6SxdN0x8BQZ1XBzVEzJ6rGE5k0TzkY1zBcWtO87sYk\r\nflGoci6KnSIS/6Al3lhsD2Ie4JyjHnkqpNKOjdfkdeo137qkfjVcY4amxF5s\r\nKbOWe/TfuEG8KrZ+P87CW8yHSHPk6GCBP4g=\r\n=s0go\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=8.12.0"},"gitHead":"eda0b092db484855ded8b4837ba7fc19a377c5a7","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.18.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"9.0.2","typescript":"4.4.4","@types/node":"14.17.33","@types/mocha":"8.2.3","@types/sinon":"10.0.6"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.3.0_1653680473637_0.85702507392978","host":"s3://npm-registry-packages"}},"1.3.1":{"name":"@opentelemetry/semantic-conventions","version":"1.3.1","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.3.1","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"ba07b864a3c955f061aa30ea3ef7f4ae4449794a","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.3.1.tgz","fileCount":57,"integrity":"sha512-wU5J8rUoo32oSef/rFpOT1HIjLjAv3qIDHkw1QIhODV3OpAVHi5oVzlouozg9obUmZKtbZ0qUe/m7FP0y0yBzA==","signatures":[{"sig":"MEUCIQC1X+9BOJ95MIukizS0O8+oV2D8cZNScNK6vwdDGxIKNwIgEc1YUvzp3kRgSTsJeCs4nsIl0+rpMgWOua2kTCb5yEM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":590022,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJinmLdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpMkw//QW9yYPwZF4lrsaddD0PnxJFWaWmC8/Oveg4QGwjW+Z2aI2yg\r\nsQApK/L3SNess7JkOmTCya8m2c1hEZPZVwEJSvJu4QWQOGbfz8eSpagrlnlm\r\nguigz/YGUZcxEZWYX09o1E2YLVFKdj6Jan0NDsB5XF5UbJRD/Z2dcosVVP1g\r\nObiNTckxCHQBo0KmV3VmJsYnciQzfE/T+zABTCkBUCuqlLTppN8QfoBPEAGW\r\nbTMYL3k91o69sQPgrgy6ZPSJIZSV+hMt3VkhbWnxSH9VKoFTmkIIr+zJOPmi\r\ng+IECySK49vEPX24OHwWjOABc8QuiSfJ8R5hEjph7dCywiSDVh1TOn80diJR\r\ntPfbJH5GsTNryfzWDFOIgE0QPLQV0ATcAeeErt9fwbBICYAy5WNydevugY3t\r\nmYj57YUv/svK1Bz7A+8+HFwTiUF6LNU8t+sTZ0JApZ2ie49uACvs6sJHsjEf\r\nJX340FRtPUQKjtYoZoema39Imw8SO330AUXMrpBLMx799QUw/LFeafkCHDpk\r\n4LinOv15aCKFij62oCmj626x/Sit++OGx/6Wh1CJ8zro7zfmb9Q5egD2bXCj\r\nWxq0WA/tPx/YdN9pXfz8qy9WAdj3gxxINqz7Yn7X3bWQTXiqaQAf62QufTK0\r\nirm1f5uTgrn9aLPdQjfrRBlvjnD35uhNIVM=\r\n=EN7q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=8.12.0"},"gitHead":"51afd54bd63e46d5d530266761144c7be2f6b3a7","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.18.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"9.0.2","typescript":"4.4.4","@types/node":"14.17.33","@types/mocha":"8.2.3","@types/sinon":"10.0.6"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.3.1_1654547165611_0.9025819317593919","host":"s3://npm-registry-packages"}},"1.4.0":{"name":"@opentelemetry/semantic-conventions","version":"1.4.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.4.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js#readme","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"facf2c67d6063b9918d5a5e3fdf25f3a30d547b6","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.4.0.tgz","fileCount":57,"integrity":"sha512-Hzl8soGpmyzja9w3kiFFcYJ7n5HNETpplY6cb67KR4QPlxp4FTTresO06qXHgHDhyIInmbLJXuwARjjpsKYGuQ==","signatures":[{"sig":"MEQCIEHKgNa3L4qJAo3KAN3DGNjhfoj/aVI/uKodpaco4dd2AiBK1xG32tZU1jRLDPcSudOpIhNdhPITTWeXpeuSFzAj/Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":590018,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixe1kACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr5LBAApGaSxyOV2mE1MSgBaDSHyoVgf7XxMsI4naNKSPJWEOf7eX7X\r\nirbCuGrZiila67yIcpazFWUBTmmmZZuPWW7rrChpDQWB6sLvXMlVhgxnoSTX\r\nh+qrrU8XF/j7cIFbJtqsSpivTUmI4N/eF6J4ONxtRveoIbbao/5IMsUHlu0n\r\nXZIIPG+b7ouB2dIBx74TqNP0YqERnj6NONtgpYxD7yBaWbPv5b1DqIhOMKuJ\r\n2LrSi6aYgWakGUlD+jpf0cjIcLREUdTR1wom2zfr+ZL8A6EpZIwamxRBCtyF\r\nK5JDvgri/w+5XFLMxB0K6PZLETs2vVlU91zAnvLbuQqmnOXKA5JvW9Kgv21X\r\nPXQFeE1SYd6/w7Q3xQzcMqAsWJT9lLTsRSci2vJ1OiOJ3kVWcHO9DlOoSk8B\r\nTqu058qxnO+Rt7rwNylRKIugIYFJbdzgdKwo2+hTOFshq0+8sWMQqY1mP8Ho\r\ny6GtzD7+902tBbuTdIymcY1clHcrP9n9Cc350HbalvDrCD4QjOQAltyPBKan\r\nT09a9rhHn7iHsFvh2HzpwiJJKDt7jluFc6lXSL+criM5Pi6Ajl6J85Dluyqf\r\namJk1cEsP38mK74YT3dY6WMZly1FbKmzhwsHVjMWDHIbTtjyViNqo4DfCxcF\r\nNWBT29B6vb3HraLnunGjw8D4z2r1cJYrt4A=\r\n=dwhs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"e39ab883b18636238ef0fd741df4ce5ed53e8d04","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.18.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"9.0.2","typescript":"4.4.4","@types/node":"14.17.33","@types/mocha":"8.2.3","@types/sinon":"10.0.6"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.4.0_1657138532773_0.9541252335511041","host":"s3://npm-registry-packages"}},"1.5.0":{"name":"@opentelemetry/semantic-conventions","version":"1.5.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.5.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-semantic-conventions","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"cea9792bfcf556c87ded17c6ac729348697bb632","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.5.0.tgz","fileCount":57,"integrity":"sha512-wlYG/U6ddW1ilXslnDLLQYJ8nd97W8JJTTfwkGhubx6dzW6SUkd+N4/MzTjjyZlrHQunxHtkHFvVpUKiROvFDw==","signatures":[{"sig":"MEYCIQDzttY3YetkHgB05+OwvO+fBB59Eq7EhczVkfGrCDXfugIhAN061k8N4u9sRU/hT5MOg8wVfLjmF++/1kxJ0K/vKJwi","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":590140,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi4FP2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpg6w//UTMj8DBAPCMG2pFlOo1Kcy+ADy6LlwioLyKD75qaDKmTNNdw\r\n3Yn2PhePUqbOw6rxjVeIIC87AWHlFmEzcJm0Hj+OA8LmUKIHodBiS817JgXr\r\nezxNQquhkF7reIg52foL1s3qMe0sOpY/C/TcTxuqpbaUMdhjbCmiAscgRdfI\r\nglRpJZxPgyyrblbshvD27h/XtdUawZEmXwr7wp4ApGUfD37quGpZ0v29wno/\r\nrrO2a1sPAyjkqYDwehiGXAj0f4dbigfc5Azw0TlDrER41VH5LDUluf4mq5Sd\r\nBvphClYTVhLqCaPgOTekkz3uJEVUi+Q4rSYxcqlh2eIayZKuPtwWHXJk7c1F\r\na4PHnR9OoCrDSIv9BFxY4JgrCUOOyLp0Hw8AN7m2RaYQs1hZQs+Xi4z9qXMQ\r\nQLKIxCumCJEu4SO/y20UA6f2JJUg1erWPsAuhJtBNFRCzl+oWujKnYQz/eTo\r\nVZ8qaHGrEhP/70g7U/8mzwt1qDe6dnJhUuatix4i/Py5YsdY+zYU+BTBjKDH\r\nYVzxVeLZC00k6sfLkmGGlBoXQs8YTqLeqep/n2CMj+SQr6qjzFKEgjjVTJMD\r\niben6G938LWPSOlrdK1oYF17L9Pr1BvNaAN3UA5awt64KI4GYv9Db02uuTI9\r\nl8L0d4QMiZ+ginevN1tjGNN2sqSerRaMpzE=\r\n=5gAh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"776656b6e0cd0fc49a52b734702bc77110e483f1","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.18.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","mocha":"7.2.0","sinon":"12.0.1","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"9.0.2","typescript":"4.4.4","@types/node":"14.17.33","@types/mocha":"8.2.3","@types/sinon":"10.0.6"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.5.0_1658868725880_0.954744829950793","host":"s3://npm-registry-packages"}},"1.6.0":{"name":"@opentelemetry/semantic-conventions","version":"1.6.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.6.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-semantic-conventions","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"ed410c9eb0070491cff9fe914246ce41f88d6f74","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.6.0.tgz","fileCount":57,"integrity":"sha512-aPfcBeLErM/PPiAuAbNFLN5sNbZLc3KZlar27uohllN8Zs6jJbHyJU1y7cMA6W/zuq+thkaG8mujiS+3iD/FWQ==","signatures":[{"sig":"MEUCIQDGTKvws33g2xGZPLBiiEo6KIsUNxHGab5gjS+xstfy2AIgZXDOqCjuveWh4aCnCpS7Qz9UjMZYLrWNTqlVrjO0Lac=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":590141,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjBmN+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq7axAAmxqhuxCT5aT/A2OOQD7k+3durUuzQLfWZKiSlE4x9vjoxN7a\r\nQ5j3UkQSw7lpxfOyLBSDMqo1vRTa+bSvOagyksfldQKc8iyBeq8oXOzvvJpe\r\nAi3K4PPsBaHaB6wDz/EnmEmQ/bvqWWlAR20oYSgd82x962iuR4PCCsTHYJL+\r\nKhP8DcZkp76DqBvizBuTUr31Yd2AEBdN5dq68s27Ba7OM33Tti8VacMAzu1N\r\nSa0rfL+HXM2Cx7M83hVG/JhN7eL1VFX72D3MYia2vmDapRKf+dsc8KmZ79Pc\r\nhylAU6Kr5FwAXDSuB5aDIHL3lEUYEQnMNKTHDAZ0p1qZO5vm3gXdpsJfH6Fo\r\n8W2k/lSlpZgx0mbmSBqmD3fJcoLvQrJGZlzDpXvJtQYKXeFPPEUQifcPszer\r\najJHuh8f+LHaFIru2WknjU2apMONC3Sn3CG8sNzSIeDDpAS4VDv+yEi9V+4m\r\nCG59rl2ajo0y9YrMSX15ja89mrlEttSHPJGdZyx6ss0lVDQHR4VGD80Qkd7k\r\nBzoDHSE6vjZE6cqP7XlxQZv40mgLMJsWCKAmTzuVnwkk6k3aiuhjBgn6UwI5\r\niqJPPEf0nvWqXmkw1lYyR4AMGHWjrri6Rtv15lqQRBclzwbo6xNkQ4yKZOO6\r\n2tbquwvKlt2wz8+XruisTXr82qRNoXh4crc=\r\n=jrdx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"a5abee69119cc41d9d34f6beb5c1826eef1ac0dd","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/5.4.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.18.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","mocha":"10.0.0","sinon":"14.0.0","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","@types/mocha":"9.1.1","@types/sinon":"10.0.13"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.6.0_1661363070136_0.8745857523875822","host":"s3://npm-registry-packages"}},"1.7.0":{"name":"@opentelemetry/semantic-conventions","version":"1.7.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.7.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-semantic-conventions","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"af80a1ef7cf110ea3a68242acd95648991bcd763","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.7.0.tgz","fileCount":57,"integrity":"sha512-FGBx/Qd09lMaqQcogCHyYrFEpTx4cAjeS+48lMIR12z7LdH+zofGDVQSubN59nL6IpubfKqTeIDu9rNO28iHVA==","signatures":[{"sig":"MEUCIA44HKIkAon7GsXk12H7mHspUzjiZZJSAUL7k7Kl/SXnAiEAs7ayPcExvUqx+PVbKKsN0wQ5A8WvMCYwp/lPuOcKV3M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":590141,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJGi+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoDFA//QtPObWYyw8FB8kiul51fIQpkiCGJ9FM+IEF1q6vk5J+ja7Wk\r\n8mfjMYOr36EBI+BC+5yNaYM0kKwvn/0441ZSPIPjTWCYYV+VBwMNp4jKui6k\r\nv4hlyu9gkQdbF3T3WrW95ZX3dYn/4LzkDsMEhMRpS/3NTOAASIkrOEhEXiqF\r\nB8T6YSE2OCxkDMIzPqXKbl60mkU3pPR4wOB8YPbPqokUeZ21EidaCweFbvcM\r\nUvLd/RwmFPtOt6gtkAmBPX1BWw2cfByUFNzgrrHri8bI5UelpO+kcErXi4Bg\r\nFcAihcA1ysSkvveBMgB2yxvUI6+4PBxigyxBHpdl5LT0+aVy+oRsz3OxcZdT\r\nqKw9GeAXrNIsUCPQGSqE/OPpjjLeq4lGrZoV8O0Xog1NZgdA36TssE5M01XD\r\ncNS94pui9OnVMmTjZ7goQZCO/i+hafN1Uc6qZCCBG//1SmkB4en2XT2u9nIB\r\nsrcIz0IcsTxQt7pBCyyddzXEkcQDzorlpF9G6TVY8ltTXokNTHnjkpR3JkaE\r\n99AO6XEcg7bsBri3pZ34x6oMDReXKeXqFAkdQLIKqQjzNiI0V2kkTOLFZHvZ\r\nJm4RYABW1bSmYSCByOICc0Mwh4hwvXnikq+nsxi4DA9BZYNkD/2ZQ1rcchW2\r\n240ojIOCPGreWfoIm1boXCbPFiefA08rolY=\r\n=zzML\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"ad88c3d9aa0100fe259b93f4b660e84417b757ac","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/5.4.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"_nodeVersion":"14.18.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","mocha":"10.0.0","sinon":"14.0.0","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","@types/mocha":"9.1.1","@types/sinon":"10.0.13"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.7.0_1663330493875_0.2079332807892087","host":"s3://npm-registry-packages"}},"1.8.0":{"name":"@opentelemetry/semantic-conventions","version":"1.8.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.8.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-semantic-conventions","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"fe2aa90e6df050a11cd57f5c0f47b0641fd2cad3","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.8.0.tgz","fileCount":57,"integrity":"sha512-TYh1MRcm4JnvpqtqOwT9WYaBYY4KERHdToxs/suDTLviGRsQkIjS5yYROTYTSJQUnYLOn/TuOh5GoMwfLSU+Ew==","signatures":[{"sig":"MEUCIQDYuQD3kmG8fUOHCXMwCKSmQLtxh/bbqtlJhGNae8D9ZwIgWVWrxVsahlqRCOgmBWU9d8IWadZBK1H1XMe3Rr3Dk38=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":590166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbANYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoneA//Y4LiXLT6lPchgZDC/+4RWAnN04DTHaVOHKy/tM7/Zsd431F6\r\neJTEL35Nng62PI4xkP0IEVYvWadDBA6yG4wEtPBBeTD7OLrjib76+GnZ1uBS\r\nW3awsZUAZl/TGUYZZ8o2OpO+G6D4cZW/r5jvjPsSyogvYFq00pSARerg7OF1\r\nGQM5doHN98ZBE4KTTpwHeai+zDW/AKvHshPM43Tre8OgpRhCrMTDmcNSO+vW\r\nZ9XuPxK1YIicYv3VlBvVJAK8ff+GBAEuZVWU2GD58/VfTZtH0+j63QDYNOPf\r\nkI6GkURawL5GKAEnrI/K+kISNkp7JnnRtV7vAP57aU0+x9ja53XyH0CAHApZ\r\n3GeTCqRzSxVZRu7/aQYmia0jLbT1ju/jpJAFZBmPoxowOqVQrVrYz1B+HOKv\r\nWeyLonTAyr+0VpXYfhzBOVOwgTWTsRq8R1WbedFE0Ml37WEeT8XfYKiV/Wmc\r\nDIlyQot7j/7jLZmlV71zMtmD4Dr/nOZz+o/6NIlwgZd8YQIgpHnap66HL9Mn\r\nNlaGNe0FTCmpoPZKdZ2jP8Fj8HQBcQTmCPmH5gI35qgMLFCiysVKtJjjCXRX\r\nn1v/k5SoT4OGMHuui2pIxMmnTM0PSNq7oVAdCxCThhlJEl0P9Tvx/sN3YWH2\r\nVNg7eMV5x1rSms2vPdMwGd7i05P38J3J59g=\r\n=KAXN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"7972edf6659fb6e0d5928a5cf7a35f26683e168f","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.all.json","watch":"tsc --build --watch tsconfig.all.json","compile":"tsc --build tsconfig.all.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/5.4.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","nock":"13.0.11","mocha":"10.0.0","sinon":"14.0.0","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","@types/mocha":"10.0.0","@types/sinon":"10.0.13"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.8.0_1668023127838_0.08639594877714041","host":"s3://npm-registry-packages"}},"1.9.0":{"name":"@opentelemetry/semantic-conventions","version":"1.9.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.9.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-semantic-conventions","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"461a6061bc14922bb6ef268f883ac1afacc17e04","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.9.0.tgz","fileCount":57,"integrity":"sha512-po7penSfQ/Z8352lRVDpaBrd9znwA5mHGqXR7nDEiVnxkDFkBIhVf/tKeAJDIq/erFpcRowKFeCsr5eqqcSyFQ==","signatures":[{"sig":"MEQCIAHKpgFXFTKLXztoQsrW/ZDv/aH5srvkOLueAOPTTkAJAiB8yKVAHoOztBtQ+N9ORm6cbnCDUrKtRYadk0KMeeqgKg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":594483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvy4iACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpynA/8C2URQYe2kl++SNFqjWXYt0MQILSeNbLifkgIr2+gx51sdiDV\r\nHs/3hYaEn8/XsZFNmi6VnWjmy+C4G7smAVTEwFDOaCM+WKjqExPRUEcTgBHl\r\nWnDSgoeLx3uBwVzvQr8jBFXsn6nCtdnwXf4OfHDCIiG2MHLSaCbiHFwQdVdq\r\n74Fdhzaf21u2aDLYQbng2WDwxaVF/KQRAW8btuyqKQmXUVdvKrBi8R64xNIx\r\nVyy+MspT7OUcsJKcFts0nH3kuDwKhEbc/zlhAyBhtAacouNBC2Oygn6pmUoy\r\nAxN5yvt4s/8bhIEU0P11Q3rHZUj+MzRiWVqs1uKNTT93SYHqxRdG7BxI3VOl\r\nttCRkJVhiLeWwLzjzVmUQzU7dwrg++/j3IEuAxVyPjJ8ITYK6XYPSSetrbm9\r\nWU1IlIavEyz5J/e5yXiENDH6mMZE4a3PYbzq6ZtPvVcMC9yzYOmfikQREJcL\r\nsLbzVtrVQRsIQR0q0XL0+J42yEnIjaE0wjY1NbnosVu7uI6z5lGvHqck/RW1\r\nAc7/A0pKPUO6g5WfPf3fTYgK9nZQLHt4BEWcyfruJED5A2zouYpD46eIReOu\r\nCZwE+0cq+4LW/4oynPewn1amQyn/Vq9EIWOaFjFQDwupQNtdLvPgtkb93MF/\r\nYRTwTIfnOLDVn5YHck4nngMtEGfu7XDNaAU=\r\n=nRLy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"08f597f3a3d71a4852b0afbba120af15ca038121","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","mocha":"10.0.0","sinon":"15.0.0","rimraf":"3.0.2","codecov":"3.8.3","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","@types/mocha":"10.0.0","@types/sinon":"10.0.13"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.9.0_1673473570204_0.31266048799532054","host":"s3://npm-registry-packages"}},"1.9.1":{"name":"@opentelemetry/semantic-conventions","version":"1.9.1","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.9.1","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-semantic-conventions","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"ad3367684a57879392513479e0a436cb2ac46dad","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.9.1.tgz","fileCount":57,"integrity":"sha512-oPQdbFDmZvjXk5ZDoBGXG8B4tSB/qW5vQunJWQMFUBp7Xe8O1ByPANueJ+Jzg58esEBegyyxZ7LRmfJr7kFcFg==","signatures":[{"sig":"MEYCIQCFwnqFGNixxZh+lT1zf4lZB/fmgEWvXYy70MjuO7+lAAIhAL08m6X4ssZUpWJTSs6HNuF1A5DOS0PZ+tuuSR+NYZkc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":594483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj1+J7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmruzA//RaBlYe9JUGjERkeSjuoSG8YgHDGEyl4g7glNvFBDjvWEh2FL\r\n6FMOi16Kwp3HRzqphfE77McEPQKDir7xlBKQp1D4QGFdGAc5tQ3Oxc8V8hRX\r\n12vBhIwQpLjrCCCThVPbRD2cs3Br4/UwB+LQZvtb+6ddYFcHtGfV17u3+2Ju\r\nMF6zvQ2ZXaPlr2xOWYUNh03Q1HG/AOEp1hu9i2IuISkS65cGGMc4/5sugqZJ\r\nph28PuA4wPs0eA0SPodELsHQz41zVsmNOaDOJ0G45lkioLZrz3Y/udHnAL7N\r\ny53nkNiKAdESK+Fs7Y58rUtPUsmIyVHLibhTq7sEXzQMTyjcaS0Zg1lfFYfX\r\nsaSxxdDmooBz4AxlbB5hl6zYXfLypz1zFTVTOSAbIpJkHXex14iJruRZg2dG\r\nMCRFo+y9IxRNI/waPmqno+xppy48VMhJclBM2tskhsuB8zYhJYBkq9qrhDKD\r\nxYkSRZcg1SRfqVqQXivLRgrhvMM5BYZrx0TDBwVh0a969rZ+ok8EkXBqaxpr\r\n7AJ5BuCLSSH+2H0q8JapwNTcKa0r5LMGd65DkKHm/y7Gu2dwxiHo7Wvlla/4\r\nqQHVOqOF26q5aSXqwFvgDji8tsN9WZH91aI58hmJbYWzITfADFn+e9OgVS9M\r\nAUAvgYbtTeLcH5iY9/naDzZEofvPOQpWtrI=\r\n=a0S8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"279458e7ddf16f7ddca5fe60c78672e05fafce66","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","mocha":"10.0.0","sinon":"15.0.0","rimraf":"4.1.2","codecov":"3.8.3","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","@types/mocha":"10.0.0","@types/sinon":"10.0.13"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.9.1_1675092603206_0.694926289979769","host":"s3://npm-registry-packages"}},"1.10.0":{"name":"@opentelemetry/semantic-conventions","version":"1.10.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.10.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-semantic-conventions","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"2addef53b595c687c133922ecad0e850b9287fc9","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.10.0.tgz","fileCount":57,"integrity":"sha512-Mzo5IyrI59YuYWeNoOZRXfUCc3upjmxCmczSm+pUgWprvSNfdOX70SVde84UxmuzU7MF1MEkPXKXTYG3ymRw2w==","signatures":[{"sig":"MEUCIQD8nTmRqBkx1GIYZ1g9ErR5tqReizhiwDDo7M8NCzjRxQIgfv1mEiJYnHiUCvXktWHtGv2bUyJ3GyKw+ljCKHH88/M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":594493,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkD0b0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpGJQ//WzfrJf7FaNt8Mb/zBXkXHhHI7csGvNO8TIFpgR22U8subLBb\r\nRJ8wYpboIHHP7v73uahnDKiotIvnLiXFcB7exHKxbeCQFGXgTyEX9vJCQkrJ\r\n6bkpkYX5IaS0U/39sTzTYQd9dyAV/UO6asdG0q43d/a699Sh/18KVbP4HApw\r\nCAIAKLleFW+d/ccdcQ2KRSz0Adnxl9d/9fJ1t/mvdzjm1ewieZvUHbq3SPuW\r\nFHKGjDMY/ukq2OPM5WUde7xpMjW4qpoESGsdGjwoEJBeBbEBmggm4HfZ36UU\r\nTfMfsFyVjTuUodhBPJ555bjeXZ/380r6S+c7qltgHO3Hupdgj7ghRDvRxmMI\r\npHLOux5VUXqljovWcneYGJwQHW7ZveE1BsujbZHZ2G1P/Qn/p7J4eaJvIsdO\r\nX9XoeEaZ6juu5sD3n3mJhOUFxyGtvec3og16N4rFRQdXkWb8HhX8nf8lTO97\r\nrA7pmbLXUIkFrjcjE1lDnyN3kBtfSoQU8SNKZcn9PYq4XnKExENFr+5L3T+a\r\nTcsn4mCwAAq/tuCo29RgIPa/i7nX5FRJYkFts7UE1vV8f/bilidzSuLgN3dE\r\nk+4UyndmLgqQDDd+4S5obxzvEPJAnqmye6BVhe6ec6xh9wUE+sxnPJVbL6bo\r\nl03/GBmsGmh/wJ/VpX4Hz/bRejb3I1yh6H4=\r\n=UVna\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"56e6b1bb890f844b8963a146780d0b9cfa8abd0d","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","mocha":"10.0.0","sinon":"15.0.0","rimraf":"4.1.2","codecov":"3.8.3","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","@types/mocha":"10.0.0","@types/sinon":"10.0.13"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.10.0_1678722804197_0.717334361825287","host":"s3://npm-registry-packages"}},"1.10.1":{"name":"@opentelemetry/semantic-conventions","version":"1.10.1","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.10.1","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-semantic-conventions","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"b7a0f16d4131aee598e55814efea0ff11d99ef34","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.10.1.tgz","fileCount":57,"integrity":"sha512-qiAueuCoN+1YEuHNXnsct9bkbroZBPd7QwQgd56YURG0LBRVHwE/lF6FOprfUvp1n1tu0O6+E3s6x+dmUndXFQ==","signatures":[{"sig":"MEQCIEf57PzvW0MU8bJc1oIEpIGKGRoOvxikDInhlg8yhUqAAiAmDF5uh7yTv0wJ0PfZlJjRSYZJqf2b4A0+zrQwi0EtHQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":594493,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkGIV1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq3oQ//VNHmHIJzA26p9dARRBhg6Bm3xfJVVjS2fSxYAiMqGQ+t1ox5\r\nbJBhgd33RzK7QfkLow7LgIsldST6UETCfpl3dEgddHxl1DCUpJWJIEpf8nL7\r\nCAaEwIn4RJvblIX3o3SwgZj5aEp+zN1VtBkmLRP2c46XAgboGYDZPBOIVFq1\r\nytA0AlaZbzd2DaHGPdzmOqJcuG2FAyi0FVd+AHiInRPj5qJ02ZOx8g9vj9v7\r\n313SQrU4NiOcgKIm9HUV6nLc5HaAnJsbQtAagBfxAad/o0TpHqKJZkbFJTVH\r\npFtB6WOPYrqJgaGbqTsa9RluUv6NmX4rpI9v0PTqLXm1THb+SYWL3CRYp0RF\r\nmkfONrsEg6mjP3KA52cBKPo3qUjK1dfIJpIQsTBNfuWYinELOc6kf4E5dBhX\r\ntSh7cgTOM7EEq/WOWQdIOgK+hyrWCFby+oQjcHEr/Ol6Az1Sd4XjvljNt4Ak\r\nl9Bs5/jeph/wsGpjicn8AHxEeh17dvhmqQ7USLxtimo3z5gFzxIwN9BlivJC\r\nvzHVY0QWwnWePKr2GYkpvo5yklix1W4tts0eFDDcrSsWMKZO/RNZwYfSopdT\r\njynPht8Jn3SZYtOYpFT4St0MTQNd4qtXCXrnAyEe9F0VJqcs/V4Gmkn5RZLS\r\nbur+dWlvx0kimtlE+nxc1Dpu0OB5ROnvlto=\r\n=jKmJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"486df99906958de9b8b666839785b00160a6a229","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","mocha":"10.0.0","sinon":"15.0.0","rimraf":"4.1.2","codecov":"3.8.3","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","@types/mocha":"10.0.0","@types/sinon":"10.0.13"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.10.1_1679328629483_0.18880410539910875","host":"s3://npm-registry-packages"}},"1.11.0":{"name":"@opentelemetry/semantic-conventions","version":"1.11.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.11.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-semantic-conventions","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"b7ed9a601acb6e0aef67564b37e4f9abad449170","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.11.0.tgz","fileCount":57,"integrity":"sha512-fG4D0AktoHyHwGhFGv+PzKrZjxbKJfckJauTJdq2A+ej5cTazmNYjJVAODXXkYyrsI10muMl+B1iO2q1R6Lp+w==","signatures":[{"sig":"MEUCIQCMR5+oZCUuTCr3a4R1a0A+PWx6KDHJ8NJ/17K9XocnjgIgMJA9iNe4rJF0pbc9RVniHfSipgk/C6gHQKCu1Z/W65U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":594493,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkJasrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqDLw//fD7RM1roP11Vk9vF4oNvYqp3zZPg9wnQUS17SFJ5831/xOr3\r\nGupySmf3R9sulU72i9aSKcQ2UWRM0nGSVzVfzvtxlmAg7pbZIfvL/Do0sqNc\r\nAaSDNwrEeqMBhec82VHFBwr5DM6ub6Cd6FQQTv50uIc1NRRsgw07riJ4COjn\r\nogIWThaJBNkRcUUh81PBQIzlZ1WjACut3Z81ThdKsS2VGBlkhBFNgGNOyEVp\r\ng/wg2uUiIfWPRNxh2kt1JZakHDnBTbvGy3RD032jo3pUbxA8TjMvU4fezsKm\r\njX6/Tm1fYU7+fFcHwC3U0ko/997WGqwIlcB9g2yVG7h7FgUt5Jj1bJUI8Nui\r\n8EUBgQgeM56Qoa7cS6/20ZuoFP8PegdRbuPF1lq6TXZGK+DVyKnEuFX3IlEa\r\nHmJZTEtBZQ5qhC0yc6/4Bd2fAOVN5Lnl7TEnNkaLhDlzk58WGRrDr7zki7P+\r\ntwSPlPENTJLL2Eugo+k3UFZttbdHO0yry8tgEaqQE+JqQ08E29UUlf1xborW\r\nQ3x2MXVOzqkXouszjsGvI/X9HIoXgpny/FWxfG1NZ8XnStF7OOOOmiGavbpx\r\nOw7uManTUluUbQbn3ltd9Hq2ESOME2BJuua0MYaXEkLhyBYvhX6sbgzdSTHG\r\nhctk2Yes40Adeg93Yo5p6WPC+DRJofNA+4w=\r\n=Tj+h\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"1328ee04ae78f9f6cf143af7050c00aaa6d2eb3b","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","mocha":"10.0.0","sinon":"15.0.0","rimraf":"4.1.2","codecov":"3.8.3","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","@types/mocha":"10.0.0","@types/sinon":"10.0.13"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.11.0_1680190250751_0.8705637185785111","host":"s3://npm-registry-packages"}},"1.12.0":{"name":"@opentelemetry/semantic-conventions","version":"1.12.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.12.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-semantic-conventions","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"19c959bdb900986e74939d4227e757aa16936b91","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.12.0.tgz","fileCount":57,"integrity":"sha512-hO+bdeGOlJwqowUBoZF5LyP3ORUFOP1G0GRv8N45W/cztXbT2ZEXaAzfokRS9Xc9FWmYrDj32mF6SzH6wuoIyA==","signatures":[{"sig":"MEUCIQDhsBbJfrZQ59cXGW3zGoubfy4m6jJamQcV6y0VEA2UrgIgL2b7zM4uv0a4+VOBLgDFjbRpAATkVilc5jqgTfT0dNU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":594493,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkOEYWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmppMw/8DX8NOGOLk5F3/QLk4Lsw/DjXs61lUjDPnUaiU/ZGUKblHPPC\r\nAVdD/ciguL7EaJAC4ocXPdGZ7PLWM9KVFtmAigl+au2Zhgcae2wxW+co1pb+\r\nsa/KjbfsfCGJ6bFmVSf4VhwobXNzI7h0FBz6hDuiiwSH9YiRsy5CGiIy0F9j\r\nr9IDnxouChuzjo7U5u2txrv7zlQUg/fYjzdt0PwKq08W+UG2rDCgbIcIqWRN\r\nM9iB+GIlF4NtZU7OmnyboBSDdWFtqtE7J3HdO9eRvCn9wL+9vxl/zK9DYCjt\r\np6/llQm6pEke1sO8QRSC479VO89SlHUXMhNVZYobMHZlqxj2fg4x4M03nAro\r\n94t3L7/LBvhGqpEiBwDzccAG+5M2oEJ+Zj8h9KLzfysd9QF/UQQi3ps9WDN8\r\nzYK/s3pfdJtBPg44IZWViQK8U/nlzt3DBlnxNTpHAf8CuA1sHc7k+f0jbDz8\r\nTemZOLpf7tNL4xkrIisnoe79+Heh80nacAM3FxX5iIn12njQCkArzoyDKEa2\r\nHUl/e8nW7KQrAyC8YfwmVkJ9t051oXkw/ov2UljPKUGssFj53Aw737tVI2XD\r\nKZqXLJOwLU9zdtQ688qGqVPL+6S6wQeCjSfWvWWWtU/pdSDfGys8gYn3ZsaN\r\nJRyoKqk1XH85MQOZqRLTnrkrYUgVqnRU5Gs=\r\n=2pnD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"a04090010ee18e17487b449984807cc2b7b6e3e6","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v14.18.1+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","mocha":"10.0.0","sinon":"15.0.0","rimraf":"4.1.2","codecov":"3.8.3","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","@types/mocha":"10.0.0","@types/sinon":"10.0.13"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.12.0_1681409558496_0.34960947909528417","host":"s3://npm-registry-packages"}},"1.13.0":{"name":"@opentelemetry/semantic-conventions","version":"1.13.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.13.0","maintainers":[{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-semantic-conventions","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"0290398b3eaebc6029c348988a78c3b688fe9219","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.13.0.tgz","fileCount":57,"integrity":"sha512-LMGqfSZkaMQXqewO0o1wvWr/2fQdCh4a3Sqlxka/UsJCe0cfLulh6x2aqnKLnsrSGiCq5rSCwvINd152i0nCqw==","signatures":[{"sig":"MEYCIQCGiUmxUUPNeyeGVpxWyc5nLxvuwz3YLtIlWo+f8psHbQIhAOV9DnnPVl5cttoBwdTJX2CBPJESpYoV6sBKyMBUlb8D","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":594470},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"8fc76896595aac912bf9e15d4f19c167317844c8","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v18.12.1+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","mocha":"10.0.0","sinon":"15.0.0","codecov":"3.8.3","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","@types/mocha":"10.0.0","@types/sinon":"10.0.13"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.13.0_1683811800508_0.9751412645899713","host":"s3://npm-registry-packages"}},"1.14.0":{"name":"@opentelemetry/semantic-conventions","version":"1.14.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.14.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-semantic-conventions","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"6a729b7f372ce30f77a3f217c09bc216f863fccb","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.14.0.tgz","fileCount":57,"integrity":"sha512-rJfCY8rCWz3cb4KI6pEofnytvMPuj3YLQwoscCCYZ5DkdiPjo15IQ0US7+mjcWy9H3fcZIzf2pbJZ7ck/h4tug==","signatures":[{"sig":"MEYCIQCBwFrhFL5ID+Y1b3Whu2742CHOYi4+mUnO0zl53Sm0pQIhAO0xUxaXybUqjdLzBiZMxIDXQvE+g4Z1iuM/wgq2y+F8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":594461},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"edebbcc757535bc88f01340409dbbecc0bb6ccf8","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"lerna run version --scope $(npm pkg get name) --include-dependencies","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.0.3/node@v18.12.1+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.0.11","mocha":"10.0.0","sinon":"15.0.0","codecov":"3.8.3","ts-mocha":"10.0.0","typescript":"4.4.4","@types/node":"18.6.5","@types/mocha":"10.0.0","@types/sinon":"10.0.13"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.14.0_1686031249657_0.48171035305839105","host":"s3://npm-registry-packages"}},"1.15.0":{"name":"@opentelemetry/semantic-conventions","version":"1.15.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.15.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-semantic-conventions","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"e6173daa5fd61f353b02c858001388bf26e9d059","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.15.0.tgz","fileCount":57,"integrity":"sha512-f3wwFrFyCpGrFBrFs7lCUJSCSCGyeKG52c+EKeobs3Dd29M75yO6GYkt6PkYPfDawxSlV5p+4yJPPk8tPObzTQ==","signatures":[{"sig":"MEUCIGEeB9bFbmOzFB8rVpYcoWC/c6XMwB53AB8AEVFhSXHtAiEA/HPfRSFpC1+B9uI+TrB7RI7HuHcCuvniAoxqliqzPlw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":593400},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"06e919d6c909e8cc8e28b6624d9843f401d9b059","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.1/node@v18.12.1+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","dependencies":{"tslib":"^2.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.1","lerna":"7.1.1","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","ts-mocha":"10.0.0","cross-var":"1.1.0","typescript":"4.4.4","@types/node":"18.6.5","@types/mocha":"10.0.1","@types/sinon":"10.0.15"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.15.0_1688642823414_0.5620833094747975","host":"s3://npm-registry-packages"}},"1.15.1":{"name":"@opentelemetry/semantic-conventions","version":"1.15.1","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.15.1","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-semantic-conventions","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"3d745996b2bd11095b515515fd3d68d46092a02d","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.15.1.tgz","fileCount":57,"integrity":"sha512-n8Kur1/CZlYG32YCEj30CoUqA8R7UyDVZzoEU6SDP+13+kXDT2kFVu6MpcnEUTyGP3i058ID6Qjp5h6IJxdPPQ==","signatures":[{"sig":"MEUCIF+L4UE156TlCnnWUUGWyRVijEE6mhjUsE7f60cDgtoaAiEA5/WjFlP495rQYQi0gcSYahp5U6FsUrRVErDjMqmhM38=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":594762},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"9f71800fdc2a5ee5055684037a12498af71955f2","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"dyladan","email":"dyladan@gmail.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.3/node@v18.4.0+x64 (darwin)","description":"OpenTelemetry semantic conventions","directories":{},"sideEffects":false,"_nodeVersion":"18.4.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.2","lerna":"7.1.3","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","ts-mocha":"10.0.0","cross-var":"1.1.0","typescript":"4.4.4","@types/node":"18.6.5","@types/mocha":"10.0.1","@types/sinon":"10.0.15"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.15.1_1690209161930_0.5118401980611305","host":"s3://npm-registry-packages"}},"1.15.2":{"name":"@opentelemetry/semantic-conventions","version":"1.15.2","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.15.2","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-semantic-conventions","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"3bafb5de3e20e841dff6cb3c66f4d6e9694c4241","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.15.2.tgz","fileCount":57,"integrity":"sha512-CjbOKwk2s+3xPIMcd5UNYQzsf+v94RczbdNix9/kQh38WiQkM90sUOi3if8eyHFgiBjBjhwXrA7W3ydiSQP9mw==","signatures":[{"sig":"MEQCIDrGBIXy4O/MFUsjS4KRGO7ix+9Z6K2KiJDffxKpG2ovAiBICik2+ac9RAlYociP8PkfbIXQQStF6dv0s9Sg6yDoEw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":594762},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"48fb15862e801b742059a3e39dbcc8ef4c10b2e2","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.4/node@v18.12.1+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.2","lerna":"7.1.4","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","ts-mocha":"10.0.0","cross-var":"1.1.0","typescript":"4.4.4","@types/node":"18.6.5","@types/mocha":"10.0.1","@types/sinon":"10.0.16"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.15.2_1691500860254_0.3518645289242708","host":"s3://npm-registry-packages"}},"1.16.0":{"name":"@opentelemetry/semantic-conventions","version":"1.16.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.16.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-semantic-conventions","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"40b8261802ba76174100bdc3f04761c27b817b6b","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.16.0.tgz","fileCount":57,"integrity":"sha512-jpbpOY0ahD/uTF16h4/NkFatwlulCpkvecK8zVJgHRfjK/ymJAw1Cg45KXiVSJML8uiMmRBciea/+gebrD398g==","signatures":[{"sig":"MEUCIQCr28IfT47zOw2Ut90hdIxUVRkA4NmI1W07Z66AlG8ApwIgcTv1HAInEkP9ppwF3yBYy/NankdEcHcAiQRLN8lIE1Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":594762},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"5fcd8cf136e2235903dde3df9ba03ced594f0e95","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.5/node@v18.12.1+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.3","lerna":"7.1.5","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","ts-mocha":"10.0.0","cross-var":"1.1.0","typescript":"4.4.4","@types/node":"18.6.5","@types/mocha":"10.0.1","@types/sinon":"10.0.16"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.16.0_1694434462622_0.4698292953236438","host":"s3://npm-registry-packages"}},"1.17.0":{"name":"@opentelemetry/semantic-conventions","version":"1.17.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.17.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-semantic-conventions","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"af10baa9f05ce1e64a14065fc138b5739bfb65f6","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.17.0.tgz","fileCount":57,"integrity":"sha512-+fguCd2d8d2qruk0H0DsCEy2CTK3t0Tugg7MhZ/UQMvmewbZLNnJ6heSYyzIZWG5IPfAXzoj4f4F/qpM7l4VBA==","signatures":[{"sig":"MEUCIQD64H9jJonD8amcpmhB1peurgyIJubdgk7FXo3ztfvezAIgPOj43JujAySvZRTXjYYpiHOaiypMS+fUBrIrLz6d6Ak=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":594762},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"faf939c77591f709afbc23fadbe629c9d3607ef6","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.5/node@v18.12.1+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.3","lerna":"7.1.5","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","ts-mocha":"10.0.0","cross-var":"1.1.0","typescript":"4.4.4","@types/node":"18.6.5","@types/mocha":"10.0.1","@types/sinon":"10.0.16"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.17.0_1694524345236_0.8714125524536143","host":"s3://npm-registry-packages"}},"1.17.1":{"name":"@opentelemetry/semantic-conventions","version":"1.17.1","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.17.1","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-semantic-conventions","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"93d219935e967fbb9aa0592cc96b2c0ec817a56f","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.17.1.tgz","fileCount":57,"integrity":"sha512-xbR2U+2YjauIuo42qmE8XyJK6dYeRMLJuOlUP5SO4auET4VtOHOzgkRVOq+Ik18N+Xf3YPcqJs9dZMiDddz1eQ==","signatures":[{"sig":"MEUCIQC1KVv1+JdWnLRx/aW4O7YE72PMeVAwkgRFv12Dhh/g/gIgNnuoH27oX53HP80ia6C0M9rq8I0J01EzGDbifBqDCp4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":594762},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"f8e187b473274cc2011e7385992f07d319d667dc","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/7.1.5/node@v18.12.1+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"sideEffects":false,"_nodeVersion":"18.12.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.3","lerna":"7.1.5","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","ts-mocha":"10.0.0","cross-var":"1.1.0","typescript":"4.4.4","@types/node":"18.6.5","@types/mocha":"10.0.2","@types/sinon":"10.0.18"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.17.1_1696947487358_0.38016956677620306","host":"s3://npm-registry-packages"}},"1.18.0":{"name":"@opentelemetry/semantic-conventions","version":"1.18.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.18.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-semantic-conventions","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"f38f457922f6e112569561c4515797a70eb5f9dd","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.18.0.tgz","fileCount":57,"integrity":"sha512-Bxtd+h2+rBv3XBHZaoXq133/hzgAQvbl2Kg5a9cG4ozfiUJHC9Xkblt7PrLc9CbzwWQpSxUxWoZJHXT3lUlkOw==","signatures":[{"sig":"MEUCIAm9DgtTXz6a4ZscFX8D0RQLhe0i/xYmua9uJtrjjVeCAiEAoIyBfPLFypal9NW4tPuu88V0QEIomOtWnJojq89TdaE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":594762},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"73b446688f10fd8dc4cf403a085f0a39070df7b4","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.18.2+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"sideEffects":false,"_nodeVersion":"18.18.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.8","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","ts-mocha":"10.0.0","cross-var":"1.1.0","typescript":"4.4.4","@types/node":"18.6.5","@types/mocha":"10.0.3","@types/sinon":"10.0.20"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.18.0_1699353880577_0.27442579359423624","host":"s3://npm-registry-packages"}},"1.18.1":{"name":"@opentelemetry/semantic-conventions","version":"1.18.1","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.18.1","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-semantic-conventions","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"8e47caf57a84b1dcc1722b2025693348cdf443b4","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.18.1.tgz","fileCount":57,"integrity":"sha512-+NLGHr6VZwcgE/2lw8zDIufOCGnzsA5CbQIMleXZTrgkBd0TanCX+MiDYJ1TOS4KL/Tqk0nFRxawnaYr6pkZkA==","signatures":[{"sig":"MEUCIQC49w8od6zYVO7hoPk4XB2VZoRiNycvsrYiIlntEF6dYQIgC1zq0oNPLcPmkhURiFBVW0BeSejpJ1abXaEoCHHBfqs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":594762},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"f665499096189390e691cf1a772e677fa67812d7","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.18.2+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"sideEffects":false,"_nodeVersion":"18.18.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.8","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","ts-mocha":"10.0.0","cross-var":"1.1.0","typescript":"4.4.4","@types/node":"18.6.5","@types/mocha":"10.0.3","@types/sinon":"10.0.20"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.18.1_1699466940920_0.27246916449489755","host":"s3://npm-registry-packages"}},"1.19.0":{"name":"@opentelemetry/semantic-conventions","version":"1.19.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.19.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-semantic-conventions","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"0c17f80b45de1c8778dfdf17acb1e9d4c4aa4ba8","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.19.0.tgz","fileCount":57,"integrity":"sha512-14jRpC8f5c0gPSwoZ7SbEJni1PqI+AhAE8m1bMz6v+RPM4OlP1PT2UHBJj5Qh/ALLPjhVU/aZUK3YyjTUqqQVg==","signatures":[{"sig":"MEYCIQCeUhClXy+y7AOwZLH86IG2SKWfiZfU1p1Yh8tqETILDgIhANqoL+4pQmzlxA5sZaPkEnniOruHgXIVIaBtAVOjRQov","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":594762},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"d3c311aec24137084dc820805a2597e120335672","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.18.2+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"sideEffects":false,"_nodeVersion":"18.18.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.8","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","ts-mocha":"10.0.0","cross-var":"1.1.0","typescript":"4.4.4","@types/node":"18.6.5","@types/mocha":"10.0.6","@types/sinon":"10.0.20"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.19.0_1702557320060_0.753853088301319","host":"s3://npm-registry-packages"}},"1.20.0":{"name":"@opentelemetry/semantic-conventions","version":"1.20.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.20.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-semantic-conventions","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"4d9b88188e18056a218644ea30fae130a7857766","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.20.0.tgz","fileCount":57,"integrity":"sha512-3zLJJCgTKYpbqFX8drl8hOCHtdchELC+kGqlVcV4mHW1DiElTtv1Nt9EKBptTd1IfL56QkuYnWJ3DeHd2Gtu/A==","signatures":[{"sig":"MEUCIQCiRzsgIrIPn5hF+h2QfJpxXxBJMJxcmcw4CaDhcqjEbAIgAn6oJpIEcOHTdA5lj3oPdIGo7znfW8KjjlxFFZQ4tv0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":594762},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"57008533aba7ccd51ea80f38ff4f29404d47eb9c","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.8","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","ts-mocha":"10.0.0","cross-var":"1.1.0","typescript":"4.4.4","@types/node":"18.6.5","@types/mocha":"10.0.6","@types/sinon":"10.0.20"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.20.0_1705313739676_0.2669163245036539","host":"s3://npm-registry-packages"}},"1.21.0":{"name":"@opentelemetry/semantic-conventions","version":"1.21.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.21.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-semantic-conventions","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"83f7479c524ab523ac2df702ade30b9724476c72","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.21.0.tgz","fileCount":57,"integrity":"sha512-lkC8kZYntxVKr7b8xmjCVUgE0a8xgDakPyDo9uSWavXPyYqLgYYGdEd2j8NxihRyb6UwpX3G/hFUF4/9q2V+/g==","signatures":[{"sig":"MEYCIQD0X1TIchgEsPyGGBDeqVOyrwtTR0BPhOuI7gBOO45OkQIhALCZpW03Ox9SodUza+1Lg9XnyYF4+1IoOhDfx0I22qZj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":594762},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"828f2ed730e4d26d71f92e220f96b60a552a673a","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.8","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","ts-mocha":"10.0.0","cross-var":"1.1.0","typescript":"4.4.4","@types/node":"18.6.5","@types/mocha":"10.0.6","@types/sinon":"10.0.20"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.21.0_1706249463896_0.28284895115647846","host":"s3://npm-registry-packages"}},"1.22.0":{"name":"@opentelemetry/semantic-conventions","version":"1.22.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.22.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-semantic-conventions","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"d7502533a7c96e25baab86bac965468e0703a8b4","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.22.0.tgz","fileCount":66,"integrity":"sha512-CAOgFOKLybd02uj/GhCdEeeBjOS0yeoDeo/CA7ASBSmenpZHAKGB3iDm/rv3BQLcabb/OprDEsSQ1y0P8A7Siw==","signatures":[{"sig":"MEUCICXZu/6qodw3Ub1yy+pudl+FjT2/We3reCCNBbEdBs76AiEA/HIbgRdO8vVqP6hjNvK3hzdQGr99KGbqe0F47w28un8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1657719},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"7be35c7845e206b27b682e8ce1cee850b09cec04","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","size-check":"npm run compile && ts-mocha -p tsconfig.json 'test/**/*.test.ts'","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.8","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","ts-node":"10.9.2","ts-mocha":"10.0.0","cross-var":"1.1.0","size-limit":"^11.0.1","typescript":"4.4.4","@types/node":"18.6.5","@types/mocha":"10.0.6","@types/sinon":"10.0.20","@size-limit/file":"^11.0.1","@size-limit/time":"^11.0.1","@size-limit/webpack":"^11.0.1"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.22.0_1709198285010_0.13864475637089568","host":"s3://npm-registry-packages"}},"1.23.0":{"name":"@opentelemetry/semantic-conventions","version":"1.23.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.23.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-semantic-conventions","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"627f2721b960fe586b7f72a07912cb7699f06eef","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.23.0.tgz","fileCount":66,"integrity":"sha512-MiqFvfOzfR31t8cc74CTP1OZfz7MbqpAnLCra8NqQoaHJX6ncIRTdYOQYBDQ2uFISDq0WY8Y9dDTWvsgzzBYRg==","signatures":[{"sig":"MEUCIQDV8EgfRIK1KYuXoWe5vOIMwrLihfF+jEpl9FbBBudwmwIgNs/1rt0y4Oux/cmKOKJNdrVxEHFbYLLb8EJI+iLh6YQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1657719},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"5231aa255047fbc6ee3d6a299f4423ab2f8a5fbc","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","size-check":"npm run compile && ts-mocha -p tsconfig.json 'test/**/*.test.ts'","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.8","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","ts-node":"10.9.2","ts-mocha":"10.0.0","cross-var":"1.1.0","size-limit":"^11.0.1","typescript":"4.4.4","@types/node":"18.6.5","@types/mocha":"10.0.6","@types/sinon":"10.0.20","@size-limit/file":"^11.0.1","@size-limit/time":"^11.0.1","@size-limit/webpack":"^11.0.1"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.23.0_1712131798776_0.07862848771110786","host":"s3://npm-registry-packages"}},"1.24.0":{"name":"@opentelemetry/semantic-conventions","version":"1.24.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.24.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-semantic-conventions","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"f074db930a7feb4d64103a9a576c5fbad046fcac","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.24.0.tgz","fileCount":66,"integrity":"sha512-yL0jI6Ltuz8R+Opj7jClGrul6pOoYrdfVmzQS4SITXRPH7I5IRZbrwe/6/v8v4WYMa6MYZG480S1+uc/IGfqsA==","signatures":[{"sig":"MEUCIG5LZVmlmcAihJ85nbRhMO5e1Dpg6EsQO8Lx2pcUz2TLAiEAuJErOf33ClvHqy0LZItbOXxBJrTPuYdEi4hQ03kza4o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1657719},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"3ab4f765d8d696327b7d139ae6a45e7bd7edd924","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","size-check":"npm run compile && ts-mocha -p tsconfig.json 'test/**/*.test.ts'","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.8","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","ts-node":"10.9.2","ts-mocha":"10.0.0","cross-var":"1.1.0","size-limit":"^11.0.1","typescript":"4.4.4","@types/node":"18.6.5","@types/mocha":"10.0.6","@types/sinon":"10.0.20","@size-limit/file":"^11.0.1","@size-limit/time":"^11.0.1","@size-limit/webpack":"^11.0.1"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.24.0_1713968895543_0.04714739399092549","host":"s3://npm-registry-packages"}},"1.24.1":{"name":"@opentelemetry/semantic-conventions","version":"1.24.1","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.24.1","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-semantic-conventions","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"d4bcebda1cb5146d47a2a53daaa7922f8e084dfb","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.24.1.tgz","fileCount":66,"integrity":"sha512-VkliWlS4/+GHLLW7J/rVBA00uXus1SWvwFvcUDxDwmFxYfg/2VI6ekwdXS28cjI8Qz2ky2BzG8OUHo+WeYIWqw==","signatures":[{"sig":"MEYCIQCAJ/ejvHKWeiiVUSnPPje0c3eU1OWM93DXedC864v6hAIhAIq3i6iJ4u9M7LZp9oqRoffAs6scAbJlQ+swpPYjw/aD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1657719},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"41c2626fe0ed03e2e83bd79ee43c9bdf0ffd80d8","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","size-check":"npm run compile && ts-mocha -p tsconfig.json 'test/**/*.test.ts'","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.8","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","ts-node":"10.9.2","ts-mocha":"10.0.0","cross-var":"1.1.0","size-limit":"^11.0.1","typescript":"4.4.4","@types/node":"18.6.5","@types/mocha":"10.0.6","@types/sinon":"10.0.20","@size-limit/file":"^11.0.1","@size-limit/time":"^11.0.1","@size-limit/webpack":"^11.0.1"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.24.1_1715093551809_0.9803329268688605","host":"s3://npm-registry-packages"}},"1.25.0":{"name":"@opentelemetry/semantic-conventions","version":"1.25.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.25.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-semantic-conventions","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"390eb4d42a29c66bdc30066af9035645e9bb7270","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.25.0.tgz","fileCount":66,"integrity":"sha512-M+kkXKRAIAiAP6qYyesfrC5TOmDpDVtsxuGfPcqd9B/iBrac+E14jYwrgm0yZBUIbIP2OnqC3j+UgkXLm1vxUQ==","signatures":[{"sig":"MEQCIF9x0cPiI0aRboVgh/CEFHM+JFdJrpCqvQsyge+LZL0sAiAv9cKUsh31tuAi1YeO42pbNW+CbAPCrbXW/MNPzvBTEQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1657780},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"c4d3351b6b3f5593c8d7cbfec97b45cea9fe1511","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","size-check":"npm run compile && ts-mocha -p tsconfig.json 'test/**/*.test.ts'","align-api-deps":"node ../../scripts/align-api-deps.js","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.8","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","ts-node":"10.9.2","ts-mocha":"10.0.0","cross-var":"1.1.0","size-limit":"^11.0.1","typescript":"4.4.4","@types/node":"18.6.5","@types/mocha":"10.0.6","@types/sinon":"17.0.3","@size-limit/file":"^11.0.1","@size-limit/time":"^11.0.1","@size-limit/webpack":"^11.0.1"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.25.0_1717607727021_0.21878207211412048","host":"s3://npm-registry-packages"}},"1.25.1":{"name":"@opentelemetry/semantic-conventions","version":"1.25.1","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.25.1","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-semantic-conventions","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"0deecb386197c5e9c2c28f2f89f51fb8ae9f145e","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.25.1.tgz","fileCount":66,"integrity":"sha512-ZDjMJJQRlyk8A1KZFCc+bCbsyrn1wTwdNt56F7twdfUfnHUZUq77/WfONCj8p72NZOyP7pNTdUWSTYC3GTbuuQ==","signatures":[{"sig":"MEYCIQCwSWxdrbVYBBv5VFr3wOnGdT7cmcw8Zxbwc5i+efGPhQIhAK4v2VNhci/XFEbXAjCdeZukyrqUbX44tFIgGu0ovUvu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1657780},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"gitHead":"0608f405573901e54db01e44c533009cf28be262","scripts":{"lint":"eslint . --ext .ts","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../../scripts/version-update.js","lint:fix":"eslint . --ext .ts --fix","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","size-check":"npm run compile && ts-mocha -p tsconfig.json 'test/**/*.test.ts'","align-api-deps":"node ../../scripts/align-api-deps.js","peer-api-check":"node ../../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.19.0+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.8","lerna":"6.6.2","mocha":"10.2.0","sinon":"15.1.2","codecov":"3.8.3","ts-node":"10.9.2","ts-mocha":"10.0.0","cross-var":"1.1.0","size-limit":"^11.0.1","typescript":"4.4.4","@types/node":"18.6.5","@types/mocha":"10.0.6","@types/sinon":"17.0.3","@size-limit/file":"^11.0.1","@size-limit/time":"^11.0.1","@size-limit/webpack":"^11.0.1"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.25.1_1718875143959_0.351076030367109","host":"s3://npm-registry-packages"}},"1.26.0":{"name":"@opentelemetry/semantic-conventions","version":"1.26.0","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","_id":"@opentelemetry/semantic-conventions@1.26.0","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"dist":{"shasum":"42da14476529ca86d0af4c11f58910f242a0a232","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.26.0.tgz","fileCount":111,"integrity":"sha512-U9PJlOswJPSgQVPI+XEuNLElyFWkb0hAiMg+DExD9V0St03X2lPHGMdxMY/LrVmoukuIpXJ12oyrOtEZ4uXFkw==","signatures":[{"sig":"MEQCIEiI+l7l5H/KRCiiRwA2G89MxzwbGfPt7ansJp9Jj1N2AiB7Yaz/LbxFT7ghCVufa236xLl5MHp4DOlLssRzytacqw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5335726},"main":"build/src/index.js","types":"build/src/index.d.ts","esnext":"build/esnext/index.js","module":"build/esm/index.js","engines":{"node":">=14"},"exports":{".":{"types":"./build/src/index.d.ts","esnext":"./build/esnext/index.js","module":"./build/esm/index.js","default":"./build/src/index.js"},"./incubating":{"types":"./build/src/index-incubating.d.ts","esnext":"./build/esnext/index-incubating.js","module":"./build/esm/index-incubating.js","default":"./build/src/index-incubating.js"}},"gitHead":"3cf1c5215f2656ccb82e6a73cd9e6f2782f8d1cc","scripts":{"clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../scripts/version-update.js","prewatch":"npm run precompile","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","size-check":"npm run compile && mocha 'test/**/*.test.ts'","align-api-deps":"node ../scripts/align-api-deps.js","peer-api-check":"node ../scripts/peer-api-check.js","prepublishOnly":"npm run compile"},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"repository":{"url":"git+https://github.com/open-telemetry/opentelemetry-js.git","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.20.4+x64 (linux)","description":"OpenTelemetry semantic conventions","directories":{},"sideEffects":false,"_nodeVersion":"18.20.4","publishConfig":{"access":"public"},"typesVersions":{"*":{"*":["./build/src/index.d.ts"],"incubating":["./build/src/index-incubating.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","nock":"13.3.8","lerna":"6.6.2","mocha":"10.7.3","sinon":"15.1.2","codecov":"3.8.3","ts-node":"10.9.2","cross-var":"1.1.0","size-limit":"^11.0.1","typescript":"4.4.4","@types/node":"18.6.5","@types/mocha":"10.0.7","@types/sinon":"17.0.3","@size-limit/file":"^11.0.1","@size-limit/time":"^11.0.1","@size-limit/webpack":"^11.0.1"},"_npmOperationalInternal":{"tmp":"tmp/semantic-conventions_1.26.0_1724340582148_0.3437603752469778","host":"s3://npm-registry-packages"}},"1.27.0":{"name":"@opentelemetry/semantic-conventions","version":"1.27.0","description":"OpenTelemetry semantic conventions","main":"build/src/index.js","module":"build/esm/index.js","esnext":"build/esnext/index.js","types":"build/src/index.d.ts","exports":{".":{"module":"./build/esm/index.js","esnext":"./build/esnext/index.js","types":"./build/src/index.d.ts","default":"./build/src/index.js"},"./incubating":{"module":"./build/esm/index-incubating.js","esnext":"./build/esnext/index-incubating.js","types":"./build/src/index-incubating.d.ts","default":"./build/src/index-incubating.js"}},"typesVersions":{"*":{"*":["./build/src/index.d.ts"],"incubating":["./build/src/index-incubating.d.ts"]}},"repository":{"type":"git","url":"git+https://github.com/open-telemetry/opentelemetry-js.git"},"scripts":{"prepublishOnly":"npm run compile","compile":"tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json","clean":"tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json","version":"node ../scripts/version-update.js","watch":"tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json","precompile":"cross-var lerna run version --scope $npm_package_name --include-dependencies","prewatch":"npm run precompile","peer-api-check":"node ../scripts/peer-api-check.js","size-check":"npm run compile && mocha 'test/**/*.test.ts'","align-api-deps":"node ../scripts/align-api-deps.js"},"keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","engines":{"node":">=14"},"publishConfig":{"access":"public"},"devDependencies":{"@size-limit/file":"^11.0.1","@size-limit/time":"^11.0.1","@size-limit/webpack":"^11.0.1","@types/mocha":"10.0.7","@types/node":"18.6.5","@types/sinon":"17.0.3","codecov":"3.8.3","cross-var":"1.1.0","lerna":"6.6.2","mocha":"10.7.3","nock":"13.3.8","nyc":"15.1.0","sinon":"15.1.2","size-limit":"^11.0.1","ts-node":"10.9.2","typescript":"4.4.4"},"homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions","sideEffects":false,"gitHead":"720bc8c70d47029cb6b41a34ffdc3d25cbaa2f80","bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"_id":"@opentelemetry/semantic-conventions@1.27.0","_nodeVersion":"18.20.4","_npmVersion":"lerna/6.6.2/node@v18.20.4+x64 (linux)","dist":{"integrity":"sha512-sAay1RrB+ONOem0OZanAR1ZI/k7yDpnOQSQmTMuGImUQb2y8EbSaCJ94FQluM74xoU03vlb2d2U90hZluL6nQg==","shasum":"1a857dcc95a5ab30122e04417148211e6f945e6c","tarball":"https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.27.0.tgz","fileCount":111,"unpackedSize":5335726,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDmJFQaTgkN6XUuG93tb9a5AQ+WJnqCazn6YAQVayoymAIhALqM916mf7GjwncZAHyYNu5DI/mf4u7eu65AQXeF4l2X"}]},"_npmUser":{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},"directories":{},"maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/semantic-conventions_1.27.0_1724836620193_0.9558738333064525"},"_hasShrinkwrap":false}},"time":{"created":"2020-06-18T21:25:38.852Z","modified":"2024-08-28T09:17:00.614Z","0.9.0":"2020-06-18T21:25:39.243Z","0.10.0":"2020-07-27T20:58:54.467Z","0.10.1":"2020-07-28T15:12:20.779Z","0.10.2":"2020-08-03T23:25:26.246Z","0.10.3-canary.0":"2020-08-07T16:47:09.383Z","0.10.3-alpha.35":"2020-08-24T22:45:12.321Z","0.11.1-alpha.48":"2020-09-01T19:24:05.370Z","0.11.0":"2020-09-01T19:32:09.889Z","0.11.1-alpha.36":"2020-09-30T12:38:27.170Z","0.12.1-alpha.54":"2020-10-19T12:49:41.843Z","0.12.0":"2020-10-19T12:53:33.495Z","0.13.0":"2020-12-04T21:26:08.207Z","0.14.0":"2020-12-17T20:52:35.101Z","0.15.0":"2021-01-21T22:19:49.358Z","0.16.0":"2021-02-01T22:33:10.350Z","0.17.0":"2021-02-17T21:15:51.972Z","0.17.1-alpha.21":"2021-02-17T21:16:27.650Z","0.17.1-alpha.11":"2021-03-02T13:31:38.301Z","0.18.1-alpha.12":"2021-03-02T13:53:48.085Z","0.18.0":"2021-03-02T14:00:58.575Z","0.18.1-alpha.13":"2021-03-18T16:25:46.754Z","0.18.1-alpha.20":"2021-03-24T13:10:44.832Z","0.18.1-alpha.24":"2021-03-24T19:38:31.807Z","0.18.2-alpha.81":"2021-03-29T19:51:52.872Z","0.18.1":"2021-03-29T20:03:51.263Z","0.18.3-alpha.2":"2021-03-30T15:26:55.560Z","0.18.2":"2021-03-30T16:15:41.714Z","0.18.3-alpha.1":"2021-03-30T17:29:24.841Z","0.18.3-alpha.16":"2021-04-09T20:07:40.049Z","0.18.3-alpha.17":"2021-04-10T09:33:36.092Z","0.18.3-alpha.25":"2021-04-12T19:42:23.089Z","0.18.3-alpha.30":"2021-04-19T17:01:28.689Z","0.19.1-alpha.36":"2021-04-22T12:19:39.704Z","0.19.0":"2021-04-22T12:28:41.238Z","0.19.1-alpha.37":"2021-04-22T18:15:46.682Z","0.19.1-alpha.39":"2021-04-22T18:44:58.299Z","0.19.1-alpha.11":"2021-04-29T21:06:59.986Z","0.19.1-alpha.14":"2021-05-01T07:37:54.302Z","0.19.1-alpha.31":"2021-05-19T18:06:48.176Z","0.19.1-alpha.43":"2021-06-01T19:45:41.649Z","0.20.1-alpha.49":"2021-06-03T17:09:41.078Z","0.20.0":"2021-06-03T18:28:25.466Z","0.20.1-alpha.4":"2021-06-08T13:27:37.784Z","0.21.1-alpha.7":"2021-06-10T17:25:52.499Z","0.21.0":"2021-06-10T18:29:39.474Z","0.21.1-alpha.2":"2021-06-12T08:35:07.634Z","0.22.1-alpha.5":"2021-06-17T17:05:00.249Z","0.22.0":"2021-06-17T17:58:30.221Z","0.22.1-alpha.13":"2021-06-30T18:40:13.714Z","0.22.1-alpha.15":"2021-06-30T19:08:34.882Z","0.22.1-alpha.16":"2021-06-30T19:48:37.174Z","0.23.1-alpha.17":"2021-06-30T20:07:25.819Z","0.23.0":"2021-06-30T20:14:44.289Z","0.23.1-alpha.18":"2021-07-02T14:37:54.015Z","0.23.1-alpha.3":"2021-07-05T22:27:18.990Z","0.23.1-alpha.15":"2021-07-17T09:17:54.717Z","0.23.1-alpha.23":"2021-07-23T17:45:59.976Z","0.23.1-alpha.24":"2021-07-25T06:45:07.340Z","0.23.1-alpha.28":"2021-07-27T19:44:05.047Z","0.24.1-alpha.31":"2021-07-28T14:06:47.681Z","0.24.0":"2021-07-28T14:13:53.456Z","0.24.1-alpha.1":"2021-07-30T19:42:22.241Z","0.24.1-alpha.5":"2021-08-06T11:31:17.278Z","0.24.1-alpha.7":"2021-08-07T13:32:43.884Z","0.25.1-alpha.21":"2021-08-18T20:16:24.028Z","0.25.0":"2021-08-18T21:16:36.895Z","0.25.1-alpha.4":"2021-08-24T19:32:58.459Z","0.25.1-alpha.13":"2021-08-30T20:41:12.547Z","0.26.0":"2021-09-30T12:35:24.982Z","1.0.0":"2021-09-30T20:53:40.028Z","1.0.1":"2021-11-11T14:51:18.434Z","1.1.0":"2022-03-18T08:10:58.010Z","1.1.1":"2022-03-22T19:52:27.586Z","1.2.0":"2022-04-22T14:56:59.653Z","1.3.0":"2022-05-27T19:41:13.827Z","1.3.1":"2022-06-06T20:26:05.752Z","1.4.0":"2022-07-06T20:15:32.962Z","1.5.0":"2022-07-26T20:52:06.048Z","1.6.0":"2022-08-24T17:44:30.328Z","1.7.0":"2022-09-16T12:14:54.048Z","1.8.0":"2022-11-09T19:45:27.990Z","1.9.0":"2023-01-11T21:46:10.405Z","1.9.1":"2023-01-30T15:30:03.540Z","1.10.0":"2023-03-13T15:53:24.349Z","1.10.1":"2023-03-20T16:10:29.648Z","1.11.0":"2023-03-30T15:30:50.999Z","1.12.0":"2023-04-13T18:12:38.735Z","1.13.0":"2023-05-11T13:30:00.697Z","1.14.0":"2023-06-06T06:00:49.841Z","1.15.0":"2023-07-06T11:27:03.667Z","1.15.1":"2023-07-24T14:32:42.149Z","1.15.2":"2023-08-08T13:21:00.426Z","1.16.0":"2023-09-11T12:14:22.773Z","1.17.0":"2023-09-12T13:12:25.486Z","1.17.1":"2023-10-10T14:18:07.604Z","1.18.0":"2023-11-07T10:44:40.780Z","1.18.1":"2023-11-08T18:09:01.271Z","1.19.0":"2023-12-14T12:35:20.274Z","1.20.0":"2024-01-15T10:15:39.903Z","1.21.0":"2024-01-26T06:11:04.075Z","1.22.0":"2024-02-29T09:18:05.200Z","1.23.0":"2024-04-03T08:09:59.022Z","1.24.0":"2024-04-24T14:28:15.843Z","1.24.1":"2024-05-07T14:52:31.963Z","1.25.0":"2024-06-05T17:15:27.230Z","1.25.1":"2024-06-20T09:19:04.195Z","1.26.0":"2024-08-22T15:29:42.410Z","1.27.0":"2024-08-28T09:17:00.414Z"},"bugs":{"url":"https://github.com/open-telemetry/opentelemetry-js/issues"},"author":{"name":"OpenTelemetry Authors"},"license":"Apache-2.0","homepage":"https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions","keywords":["opentelemetry","nodejs","tracing","attributes","semantic conventions"],"repository":{"type":"git","url":"git+https://github.com/open-telemetry/opentelemetry-js.git"},"description":"OpenTelemetry semantic conventions","maintainers":[{"name":"pichlermarc","email":"marc.pichler@dynatrace.com"},{"name":"bogdandrutu","email":"bogdandrutu@gmail.com"},{"name":"dyladan","email":"dyladan@gmail.com"}],"readme":"# OpenTelemetry Semantic Conventions\n\n[![NPM Published Version][npm-img]][npm-url]\n[![Apache License][license-image]][license-image]\n\nSemantic Convention constants for use with the OpenTelemetry SDK/APIs. [This document][trace-semantic_conventions] defines standard attributes for traces.\n\n## Installation\n\n```bash\nnpm install --save @opentelemetry/semantic-conventions\n```\n\n## Import Structure\n\nThis package has 2 separate exports.\nThe main export (`@opentelemetry/semantic-conventions`) includes only stable semantic conventions.\nIt is subject to the restrictions of semantic versioning 2.0.\nThe `/incubating` export (`@opentelemetry/semantic-conventions/incubating`) contains all stable and unstable semantic conventions.\nIt is _NOT_ subject to the restrictions of semantic versioning and _MAY_ contain breaking changes in minor releases.\n\n## Usage\n\n### Stable SemConv\n\n```ts\nimport { \n ATTR_NETWORK_PEER_ADDRESS,\n ATTR_NETWORK_PEER_PORT,\n ATTR_NETWORK_PROTOCOL_NAME,\n ATTR_NETWORK_PROTOCOL_VERSION,\n NETWORK_TRANSPORT_VALUE_TCP,\n} from '@opentelemetry/semantic-conventions';\n\nconst span = tracer.startSpan(spanName, spanOptions)\n .setAttributes({\n [ATTR_NETWORK_PEER_ADDRESS]: 'localhost',\n [ATTR_NETWORK_PEER_PORT]: 8080,\n [ATTR_NETWORK_PROTOCOL_NAME]: 'http',\n [ATTR_NETWORK_PROTOCOL_VERSION]: '1.1',\n [ATTR_NETWORK_TRANSPORT]: NETWORK_TRANSPORT_VALUE_TCP,\n });\n```\n\n### Unstable SemConv\n\n```ts\nimport { \n ATTR_PROCESS_COMMAND,\n ATTR_PROCESS_COMMAND_ARGS,\n ATTR_PROCESS_COMMAND_LINE,\n} from '@opentelemetry/semantic-conventions/incubating';\n\nconst span = tracer.startSpan(spanName, spanOptions)\n .setAttributes({\n [ATTR_PROCESS_COMMAND]: 'cat',\n [ATTR_PROCESS_COMMAND_ARGS]: ['file1', 'file2'],\n [ATTR_CONTAINER_COMMAND_LINE]: 'cat file1 file2',\n });\n```\n\n## Useful links\n\n- For more information on OpenTelemetry, visit: \n- For more about OpenTelemetry JavaScript: \n- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]\n\n## License\n\nApache 2.0 - See [LICENSE][license-url] for more information.\n\n[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions\n[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE\n[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat\n[npm-url]: https://www.npmjs.com/package/@opentelemetry/semantic-conventions\n[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fsemantic-conventions.svg\n\n[trace-semantic_conventions]: https://github.com/open-telemetry/semantic-conventions/tree/main/specification/trace/semantic_conventions\n","readmeFilename":"README.md"} \ No newline at end of file diff --git a/tests/registry/npm/cli.ts/registry.json b/tests/registry/npm/cli.ts/registry.json new file mode 100644 index 00000000000000..d58dc8537820a5 --- /dev/null +++ b/tests/registry/npm/cli.ts/registry.json @@ -0,0 +1,32 @@ +{ + "name": "cli.ts", + "description": "Package with name like a file path", + "dist-tags": { + "latest": "2.2.0" + }, + "versions": { + "2.2.0": { + "name": "cli.ts", + "version": "2.2.0", + "description": "Package with name like a file path", + "license": "MIT", + "author": {}, + "engines": { + "node": ">=6" + }, + "gitHead": "91440c5a1615354fb9419354650937c434eb9f49", + "_id": "cli.ts@2.2.0", + "_nodeVersion": "10.16.0", + "_npmVersion": "6.9.0", + "dist": { + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "shasum": "ee8472dbb129e727b31e8a10a427dee9dfe4008b", + "tarball": "http://localhost:4260/cli.ts/cli.ts-2.2.0.tgz", + "fileCount": 5, + "unpackedSize": 5508 + }, + "directories": {}, + "_hasShrinkwrap": false + } + } +} diff --git a/tests/registry/npm/trim_registry_files.js b/tests/registry/npm/trim_registry_files.js index 608624b1d3e0ef..e6fbe1353f02c4 100644 --- a/tests/registry/npm/trim_registry_files.js +++ b/tests/registry/npm/trim_registry_files.js @@ -1,5 +1,5 @@ #!/usr/bin/env -S deno run --allow-write=. --allow-read=. -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Run this to trim the registry.json files diff --git a/tests/specs/add/add_with_subpath/wrong_constraint_jsr.out b/tests/specs/add/add_with_subpath/wrong_constraint_jsr.out index 7de7008e93e65b..5f6661920af922 100644 --- a/tests/specs/add/add_with_subpath/wrong_constraint_jsr.out +++ b/tests/specs/add/add_with_subpath/wrong_constraint_jsr.out @@ -1,4 +1,4 @@ -error: Failed to parse package required: jsr:@std/testing/bdd@1 +error: Failed to parse package: jsr:@std/testing/bdd@1 Caused by: - Invalid package specifier 'jsr:@std/testing/bdd@1'. Did you mean to write 'jsr:@std/testing@1/bdd'? + Invalid package specifier 'jsr:@std/testing/bdd@1'. Did you mean to write 'jsr:@std/testing@1/bdd'? If not, add a version requirement to the specifier. diff --git a/tests/specs/add/add_with_subpath/wrong_constraint_npm.out b/tests/specs/add/add_with_subpath/wrong_constraint_npm.out index 4adcf9ef6ae664..2298810bec319f 100644 --- a/tests/specs/add/add_with_subpath/wrong_constraint_npm.out +++ b/tests/specs/add/add_with_subpath/wrong_constraint_npm.out @@ -1,4 +1,4 @@ -error: Failed to parse package required: npm:preact/hooks@10 +error: Failed to parse package: npm:preact/hooks@10 Caused by: - Invalid package specifier 'npm:preact/hooks@10'. Did you mean to write 'npm:preact@10/hooks'? + Invalid package specifier 'npm:preact/hooks@10'. Did you mean to write 'npm:preact@10/hooks'? If not, add a version requirement to the specifier. diff --git a/tests/specs/cert/localhost_unsafe_ssl/localhost_unsafe_ssl.ts.out b/tests/specs/cert/localhost_unsafe_ssl/localhost_unsafe_ssl.ts.out index c7bdfde0ed6618..ffb84ebfdebb4a 100644 --- a/tests/specs/cert/localhost_unsafe_ssl/localhost_unsafe_ssl.ts.out +++ b/tests/specs/cert/localhost_unsafe_ssl/localhost_unsafe_ssl.ts.out @@ -1,3 +1,6 @@ DANGER: TLS certificate validation is disabled for: deno.land -error: Import 'https://localhost:5545/subdir/mod2.ts' failed: error sending request for url (https://localhost:5545/subdir/mod2.ts): client error[WILDCARD] - at file:///[WILDCARD]/cafile_url_imports.ts:[WILDCARD] +error: Import 'https://localhost:5545/subdir/mod2.ts' failed. + 0: error sending request for url (https://localhost:5545/subdir/mod2.ts): client error (Connect): invalid peer certificate: UnknownIssuer + 1: client error (Connect) + 2: invalid peer certificate: UnknownIssuer + at file:///[WILDLINE]/cafile_url_imports.ts:[WILDLINE] diff --git a/tests/specs/check/check_all/__test__.jsonc b/tests/specs/check/check_all/__test__.jsonc new file mode 100644 index 00000000000000..101e5aab9e8cec --- /dev/null +++ b/tests/specs/check/check_all/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "check --allow-import --quiet --all check_all.ts", + "output": "check_all.out", + "exitCode": 1 +} diff --git a/tests/testdata/check/all/check_all.out b/tests/specs/check/check_all/check_all.out similarity index 100% rename from tests/testdata/check/all/check_all.out rename to tests/specs/check/check_all/check_all.out diff --git a/tests/testdata/check/all/check_all.ts b/tests/specs/check/check_all/check_all.ts similarity index 100% rename from tests/testdata/check/all/check_all.ts rename to tests/specs/check/check_all/check_all.ts diff --git a/tests/specs/check/check_all_local/__test__.jsonc b/tests/specs/check/check_all_local/__test__.jsonc new file mode 100644 index 00000000000000..0cd1c16acb1d54 --- /dev/null +++ b/tests/specs/check/check_all_local/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "check --allow-import --quiet check_all_local.ts", + "output": "", + "exitCode": 0 +} diff --git a/tests/specs/check/check_all_local/check_all_local.ts b/tests/specs/check/check_all_local/check_all_local.ts new file mode 100644 index 00000000000000..2ae8c2692cc20c --- /dev/null +++ b/tests/specs/check/check_all_local/check_all_local.ts @@ -0,0 +1,3 @@ +import * as a from "http://localhost:4545/subdir/type_error.ts"; + +console.log(a.a); diff --git a/tests/specs/check/check_exclude_option/__test__.jsonc b/tests/specs/check/check_exclude_option/__test__.jsonc new file mode 100644 index 00000000000000..d8e41403c21663 --- /dev/null +++ b/tests/specs/check/check_exclude_option/__test__.jsonc @@ -0,0 +1,19 @@ +{ + "tests": { + "by_dir": { + "args": "check --quiet --config deno.exclude_dir.json ignored/index.ts", + "output": "", + "exitCode": 0 + }, + "by_glob": { + "args": "check --quiet --config deno.exclude_glob.json ignored/index.ts", + "output": "", + "exitCode": 0 + }, + "without": { + "args": "check --quiet --config deno.json ignored/index.ts", + "output": "exclude_option.ts.error.out", + "exitCode": 1 + } + } +} diff --git a/tests/specs/check/check_with_exclude_option_by_dir/exclude_option/deno.exclude_dir.json b/tests/specs/check/check_exclude_option/deno.exclude_dir.json similarity index 100% rename from tests/specs/check/check_with_exclude_option_by_dir/exclude_option/deno.exclude_dir.json rename to tests/specs/check/check_exclude_option/deno.exclude_dir.json diff --git a/tests/specs/check/check_with_exclude_option_by_dir/exclude_option/deno.exclude_glob.json b/tests/specs/check/check_exclude_option/deno.exclude_glob.json similarity index 100% rename from tests/specs/check/check_with_exclude_option_by_dir/exclude_option/deno.exclude_glob.json rename to tests/specs/check/check_exclude_option/deno.exclude_glob.json diff --git a/tests/specs/check/check_with_exclude_option_by_dir/exclude_option/deno.json b/tests/specs/check/check_exclude_option/deno.json similarity index 100% rename from tests/specs/check/check_with_exclude_option_by_dir/exclude_option/deno.json rename to tests/specs/check/check_exclude_option/deno.json diff --git a/tests/specs/check/check_with_exclude_option_by_dir/exclude_option/exclude_option.ts.error.out b/tests/specs/check/check_exclude_option/exclude_option.ts.error.out similarity index 100% rename from tests/specs/check/check_with_exclude_option_by_dir/exclude_option/exclude_option.ts.error.out rename to tests/specs/check/check_exclude_option/exclude_option.ts.error.out diff --git a/tests/specs/check/check_with_exclude_option_by_dir/exclude_option/ignored/index.ts b/tests/specs/check/check_exclude_option/ignored/index.ts similarity index 100% rename from tests/specs/check/check_with_exclude_option_by_dir/exclude_option/ignored/index.ts rename to tests/specs/check/check_exclude_option/ignored/index.ts diff --git a/tests/specs/check/check_with_exclude_option_by_dir/exclude_option/index.ts b/tests/specs/check/check_exclude_option/index.ts similarity index 100% rename from tests/specs/check/check_with_exclude_option_by_dir/exclude_option/index.ts rename to tests/specs/check/check_exclude_option/index.ts diff --git a/tests/specs/check/check_node_builtin_modules/__test__.jsonc b/tests/specs/check/check_node_builtin_modules/__test__.jsonc new file mode 100644 index 00000000000000..eb56845a19701d --- /dev/null +++ b/tests/specs/check/check_node_builtin_modules/__test__.jsonc @@ -0,0 +1,14 @@ +{ + "tests": { + "js": { + "args": "check --quiet mod.js", + "output": "mod.js.out", + "exitCode": 1 + }, + "ts": { + "args": "check --quiet mod.ts", + "output": "mod.ts.out", + "exitCode": 1 + } + } +} diff --git a/tests/specs/check/check_node_builtin_modules_js/node_builtin_modules/mod.js b/tests/specs/check/check_node_builtin_modules/mod.js similarity index 100% rename from tests/specs/check/check_node_builtin_modules_js/node_builtin_modules/mod.js rename to tests/specs/check/check_node_builtin_modules/mod.js diff --git a/tests/specs/check/check_node_builtin_modules/mod.js.out b/tests/specs/check/check_node_builtin_modules/mod.js.out new file mode 100644 index 00000000000000..646a2e5cc437c7 --- /dev/null +++ b/tests/specs/check/check_node_builtin_modules/mod.js.out @@ -0,0 +1,5 @@ +error: TS2769 [ERROR]: No overload matches this call. + [WILDCARD] +const _data = fs.readFileSync("./node_builtin.js", 123); + ~~~ + at file:///[WILDCARD]/mod.js:3:52 diff --git a/tests/specs/check/check_node_builtin_modules_js/node_builtin_modules/mod.ts b/tests/specs/check/check_node_builtin_modules/mod.ts similarity index 100% rename from tests/specs/check/check_node_builtin_modules_js/node_builtin_modules/mod.ts rename to tests/specs/check/check_node_builtin_modules/mod.ts diff --git a/tests/specs/check/check_node_builtin_modules/mod.ts.out b/tests/specs/check/check_node_builtin_modules/mod.ts.out new file mode 100644 index 00000000000000..38eef5edc73290 --- /dev/null +++ b/tests/specs/check/check_node_builtin_modules/mod.ts.out @@ -0,0 +1,13 @@ +error: TS2769 [ERROR]: No overload matches this call. + [WILDCARD] +const _data = fs.readFileSync("./node_builtin.js", 123); + ~~~ + at file:///[WILDCARD]/mod.ts:2:52 + +TS2322 [ERROR]: Type 'string[]' is not assignable to type 'number[]'. + Type 'string' is not assignable to type 'number'. +const _testString: number[] = builtinModules; + ~~~~~~~~~~~ + at file:///[WILDCARD]/mod.ts:9:7 + +Found 2 errors. diff --git a/tests/specs/check/check_node_builtin_modules_js/__test__.jsonc b/tests/specs/check/check_node_builtin_modules_js/__test__.jsonc deleted file mode 100644 index 8f7a2a65a601d0..00000000000000 --- a/tests/specs/check/check_node_builtin_modules_js/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "check --quiet node_builtin_modules/mod.js", - "output": "node_builtin_modules/mod.js.out", - "exitCode": 1 -} diff --git a/tests/specs/check/check_node_builtin_modules_js/node_builtin_modules/mod.js.out b/tests/specs/check/check_node_builtin_modules_js/node_builtin_modules/mod.js.out deleted file mode 100644 index 97786ebaeb2980..00000000000000 --- a/tests/specs/check/check_node_builtin_modules_js/node_builtin_modules/mod.js.out +++ /dev/null @@ -1,5 +0,0 @@ -error: TS2769 [ERROR]: No overload matches this call. - [WILDCARD] -const _data = fs.readFileSync("./node_builtin.js", 123); - ~~~ - at file:///[WILDCARD]/node_builtin_modules/mod.js:3:52 diff --git a/tests/specs/check/check_node_builtin_modules_js/node_builtin_modules/mod.ts.out b/tests/specs/check/check_node_builtin_modules_js/node_builtin_modules/mod.ts.out deleted file mode 100644 index 49b762cff88a4d..00000000000000 --- a/tests/specs/check/check_node_builtin_modules_js/node_builtin_modules/mod.ts.out +++ /dev/null @@ -1,13 +0,0 @@ -error: TS2769 [ERROR]: No overload matches this call. - [WILDCARD] -const _data = fs.readFileSync("./node_builtin.js", 123); - ~~~ - at file:///[WILDCARD]/node_builtin_modules/mod.ts:2:52 - -TS2322 [ERROR]: Type 'string[]' is not assignable to type 'number[]'. - Type 'string' is not assignable to type 'number'. -const _testString: number[] = builtinModules; - ~~~~~~~~~~~ - at file:///[WILDCARD]/node_builtin_modules/mod.ts:9:7 - -Found 2 errors. diff --git a/tests/specs/check/check_node_builtin_modules_ts/__test__.jsonc b/tests/specs/check/check_node_builtin_modules_ts/__test__.jsonc deleted file mode 100644 index 736885f2ec7d12..00000000000000 --- a/tests/specs/check/check_node_builtin_modules_ts/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "check --quiet node_builtin_modules/mod.ts", - "output": "node_builtin_modules/mod.ts.out", - "exitCode": 1 -} diff --git a/tests/specs/check/check_node_builtin_modules_ts/node_builtin_modules/mod.js b/tests/specs/check/check_node_builtin_modules_ts/node_builtin_modules/mod.js deleted file mode 100644 index 196fb9be98c008..00000000000000 --- a/tests/specs/check/check_node_builtin_modules_ts/node_builtin_modules/mod.js +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-check -import fs from "node:fs"; -const _data = fs.readFileSync("./node_builtin.js", 123); diff --git a/tests/specs/check/check_node_builtin_modules_ts/node_builtin_modules/mod.js.out b/tests/specs/check/check_node_builtin_modules_ts/node_builtin_modules/mod.js.out deleted file mode 100644 index 97786ebaeb2980..00000000000000 --- a/tests/specs/check/check_node_builtin_modules_ts/node_builtin_modules/mod.js.out +++ /dev/null @@ -1,5 +0,0 @@ -error: TS2769 [ERROR]: No overload matches this call. - [WILDCARD] -const _data = fs.readFileSync("./node_builtin.js", 123); - ~~~ - at file:///[WILDCARD]/node_builtin_modules/mod.js:3:52 diff --git a/tests/specs/check/check_node_builtin_modules_ts/node_builtin_modules/mod.ts b/tests/specs/check/check_node_builtin_modules_ts/node_builtin_modules/mod.ts deleted file mode 100644 index 0e62353fec5237..00000000000000 --- a/tests/specs/check/check_node_builtin_modules_ts/node_builtin_modules/mod.ts +++ /dev/null @@ -1,9 +0,0 @@ -import fs from "node:fs"; -const _data = fs.readFileSync("./node_builtin.js", 123); - -// check node:module specifically because for deno check it should -// resolve to the @types/node package, but at runtime it uses a different -// builtin object than deno_std -import { builtinModules } from "node:module"; -// should error about being string[] -const _testString: number[] = builtinModules; diff --git a/tests/specs/check/check_node_builtin_modules_ts/node_builtin_modules/mod.ts.out b/tests/specs/check/check_node_builtin_modules_ts/node_builtin_modules/mod.ts.out deleted file mode 100644 index 49b762cff88a4d..00000000000000 --- a/tests/specs/check/check_node_builtin_modules_ts/node_builtin_modules/mod.ts.out +++ /dev/null @@ -1,13 +0,0 @@ -error: TS2769 [ERROR]: No overload matches this call. - [WILDCARD] -const _data = fs.readFileSync("./node_builtin.js", 123); - ~~~ - at file:///[WILDCARD]/node_builtin_modules/mod.ts:2:52 - -TS2322 [ERROR]: Type 'string[]' is not assignable to type 'number[]'. - Type 'string' is not assignable to type 'number'. -const _testString: number[] = builtinModules; - ~~~~~~~~~~~ - at file:///[WILDCARD]/node_builtin_modules/mod.ts:9:7 - -Found 2 errors. diff --git a/tests/specs/check/check_with_exclude_option_by_dir/__test__.jsonc b/tests/specs/check/check_with_exclude_option_by_dir/__test__.jsonc deleted file mode 100644 index c7fe285da8730d..00000000000000 --- a/tests/specs/check/check_with_exclude_option_by_dir/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "check --quiet --config exclude_option/deno.exclude_dir.json exclude_option/ignored/index.ts", - "output": "", - "exitCode": 0 -} diff --git a/tests/specs/check/check_with_exclude_option_by_glob/__test__.jsonc b/tests/specs/check/check_with_exclude_option_by_glob/__test__.jsonc deleted file mode 100644 index 54700ca3d82bf9..00000000000000 --- a/tests/specs/check/check_with_exclude_option_by_glob/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "check --quiet --config exclude_option/deno.exclude_glob.json exclude_option/ignored/index.ts", - "output": "", - "exitCode": 0 -} diff --git a/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/deno.exclude_dir.json b/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/deno.exclude_dir.json deleted file mode 100644 index 2019f8953d3d50..00000000000000 --- a/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/deno.exclude_dir.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "exclude": [ - "ignored" - ] -} diff --git a/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/deno.exclude_glob.json b/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/deno.exclude_glob.json deleted file mode 100644 index 1d203ba089348e..00000000000000 --- a/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/deno.exclude_glob.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "exclude": [ - "ignored/**/*" - ] -} diff --git a/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/deno.json b/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/deno.json deleted file mode 100644 index a9eca74ca448a2..00000000000000 --- a/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/deno.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "exclude": [] -} diff --git a/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/exclude_option.ts.error.out b/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/exclude_option.ts.error.out deleted file mode 100644 index abd1c125861e33..00000000000000 --- a/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/exclude_option.ts.error.out +++ /dev/null @@ -1,4 +0,0 @@ -error: TS2304 [ERROR]: Cannot find name 'nothing'. -export { nothing }; - ~~~~~~~ - at [WILDCARD] diff --git a/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/ignored/index.ts b/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/ignored/index.ts deleted file mode 100644 index 0419cf073c4b29..00000000000000 --- a/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/ignored/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { nothing }; diff --git a/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/index.ts b/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/index.ts deleted file mode 100644 index 8335ca3a2e25a6..00000000000000 --- a/tests/specs/check/check_with_exclude_option_by_glob/exclude_option/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { nothing } from "./ignored/index.ts"; - -const foo = 1; - -export { foo, nothing }; diff --git a/tests/specs/check/check_without_exclude_option/__test__.jsonc b/tests/specs/check/check_without_exclude_option/__test__.jsonc deleted file mode 100644 index 801786fa3d24f6..00000000000000 --- a/tests/specs/check/check_without_exclude_option/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "check --quiet --config exclude_option/deno.json exclude_option/ignored/index.ts", - "output": "exclude_option/exclude_option.ts.error.out", - "exitCode": 1 -} diff --git a/tests/specs/check/check_without_exclude_option/exclude_option/deno.exclude_dir.json b/tests/specs/check/check_without_exclude_option/exclude_option/deno.exclude_dir.json deleted file mode 100644 index 2019f8953d3d50..00000000000000 --- a/tests/specs/check/check_without_exclude_option/exclude_option/deno.exclude_dir.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "exclude": [ - "ignored" - ] -} diff --git a/tests/specs/check/check_without_exclude_option/exclude_option/deno.exclude_glob.json b/tests/specs/check/check_without_exclude_option/exclude_option/deno.exclude_glob.json deleted file mode 100644 index 1d203ba089348e..00000000000000 --- a/tests/specs/check/check_without_exclude_option/exclude_option/deno.exclude_glob.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "exclude": [ - "ignored/**/*" - ] -} diff --git a/tests/specs/check/check_without_exclude_option/exclude_option/deno.json b/tests/specs/check/check_without_exclude_option/exclude_option/deno.json deleted file mode 100644 index a9eca74ca448a2..00000000000000 --- a/tests/specs/check/check_without_exclude_option/exclude_option/deno.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "exclude": [] -} diff --git a/tests/specs/check/check_without_exclude_option/exclude_option/exclude_option.ts.error.out b/tests/specs/check/check_without_exclude_option/exclude_option/exclude_option.ts.error.out deleted file mode 100644 index abd1c125861e33..00000000000000 --- a/tests/specs/check/check_without_exclude_option/exclude_option/exclude_option.ts.error.out +++ /dev/null @@ -1,4 +0,0 @@ -error: TS2304 [ERROR]: Cannot find name 'nothing'. -export { nothing }; - ~~~~~~~ - at [WILDCARD] diff --git a/tests/specs/check/check_without_exclude_option/exclude_option/ignored/index.ts b/tests/specs/check/check_without_exclude_option/exclude_option/ignored/index.ts deleted file mode 100644 index 0419cf073c4b29..00000000000000 --- a/tests/specs/check/check_without_exclude_option/exclude_option/ignored/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { nothing }; diff --git a/tests/specs/check/check_without_exclude_option/exclude_option/index.ts b/tests/specs/check/check_without_exclude_option/exclude_option/index.ts deleted file mode 100644 index 8335ca3a2e25a6..00000000000000 --- a/tests/specs/check/check_without_exclude_option/exclude_option/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { nothing } from "./ignored/index.ts"; - -const foo = 1; - -export { foo, nothing }; diff --git a/tests/specs/check/css_import/__test__.jsonc b/tests/specs/check/css_import/__test__.jsonc index 629dcd3833d07c..4e16560ec2214f 100644 --- a/tests/specs/check/css_import/__test__.jsonc +++ b/tests/specs/check/css_import/__test__.jsonc @@ -10,6 +10,10 @@ "args": "check not_exists.ts", "output": "not_exists.out", "exitCode": 1 + }, { + "args": "run --check not_exists.ts", + "output": "not_exists.out", + "exitCode": 1 }, { "args": "check exists_and_try_uses.ts", "output": "exists_and_try_uses.out", diff --git a/tests/specs/check/css_import/not_exists.out b/tests/specs/check/css_import/not_exists.out index 95fd14668ee4d5..1e9dce6b70586c 100644 --- a/tests/specs/check/css_import/not_exists.out +++ b/tests/specs/check/css_import/not_exists.out @@ -1,2 +1,3 @@ -error: Module not found "file:///[WILDLINE]/not_exists.css". +Check [WILDLINE]exists.ts +error: TS2307 [ERROR]: Cannot find module 'file:///[WILDLINE]/not_exists.css'. at file:///[WILDLINE]/not_exists.ts:1:8 diff --git a/tests/specs/check/dts_importing_non_existent/check.out b/tests/specs/check/dts_importing_non_existent/check.out index 80ec9593b07a38..65e27bce83412e 100644 --- a/tests/specs/check/dts_importing_non_existent/check.out +++ b/tests/specs/check/dts_importing_non_existent/check.out @@ -1,2 +1,3 @@ -error: Module not found "file:///[WILDLINE]/test". +Check file:///[WILDLINE]/dts_importing_non_existent/index.js +error: TS2307 [ERROR]: Cannot find module 'file:///[WILDLINE]/test'. at file:///[WILDLINE]/index.d.ts:1:22 diff --git a/tests/specs/check/import_non_existent_in_remote/__test__.jsonc b/tests/specs/check/import_non_existent_in_remote/__test__.jsonc new file mode 100644 index 00000000000000..39cd37ffc07c4c --- /dev/null +++ b/tests/specs/check/import_non_existent_in_remote/__test__.jsonc @@ -0,0 +1,14 @@ +{ + "tests": { + "not_all": { + "args": "check --allow-import import_remote.ts", + "output": "[WILDCARD]", + "exitCode": 0 + }, + "all": { + "args": "check --all --allow-import import_remote.ts", + "output": "check_all.out", + "exitCode": 1 + } + } +} diff --git a/tests/specs/check/import_non_existent_in_remote/check_all.out b/tests/specs/check/import_non_existent_in_remote/check_all.out new file mode 100644 index 00000000000000..a3c3b1759c3a90 --- /dev/null +++ b/tests/specs/check/import_non_existent_in_remote/check_all.out @@ -0,0 +1,5 @@ +Download http://localhost:4545/check/import_non_existent.ts +Download http://localhost:4545/check/non-existent-module.ts +Check file:///[WILDLINE]/import_remote.ts +error: TS2307 [ERROR]: Cannot find module 'http://localhost:4545/check/non-existent-module.ts'. + at http://localhost:4545/check/import_non_existent.ts:1:22 diff --git a/tests/specs/check/import_non_existent_in_remote/import_remote.ts b/tests/specs/check/import_non_existent_in_remote/import_remote.ts new file mode 100644 index 00000000000000..47c5c654b8533b --- /dev/null +++ b/tests/specs/check/import_non_existent_in_remote/import_remote.ts @@ -0,0 +1,3 @@ +import { Other } from "http://localhost:4545/check/import_non_existent.ts"; + +console.log(Other); diff --git a/tests/specs/check/jsdoc_import_decl/__test__.jsonc b/tests/specs/check/jsdoc_import_decl/__test__.jsonc new file mode 100644 index 00000000000000..fdbb52ab351157 --- /dev/null +++ b/tests/specs/check/jsdoc_import_decl/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "check --allow-import main.js", + "output": "check.out", + "exitCode": 1 +} diff --git a/tests/specs/check/jsdoc_import_decl/check.out b/tests/specs/check/jsdoc_import_decl/check.out new file mode 100644 index 00000000000000..657569bcd4f1bf --- /dev/null +++ b/tests/specs/check/jsdoc_import_decl/check.out @@ -0,0 +1,6 @@ +Download http://localhost:4545/add.ts +Check file:///[WILDLINE]main.js +error: TS2345 [ERROR]: Argument of type 'string' is not assignable to parameter of type '(a: number, b: number) => number'. +addHere(""); + ~~ + at file:///[WILDLINE]main.js:12:9 diff --git a/tests/specs/check/jsdoc_import_decl/main.js b/tests/specs/check/jsdoc_import_decl/main.js new file mode 100644 index 00000000000000..accfdb177a3283 --- /dev/null +++ b/tests/specs/check/jsdoc_import_decl/main.js @@ -0,0 +1,12 @@ +// @ts-check + +/** @import { add } from "http://localhost:4545/add.ts" */ + +/** + * @param {typeof add} myValue + */ +export function addHere(myValue) { + return myValue(1, 2); +} + +addHere(""); diff --git a/tests/specs/check/message_chain_formatting/__test__.jsonc b/tests/specs/check/message_chain_formatting/__test__.jsonc new file mode 100644 index 00000000000000..1b5b49d8a9b335 --- /dev/null +++ b/tests/specs/check/message_chain_formatting/__test__.jsonc @@ -0,0 +1,6 @@ +// Regression test for https://github.com/denoland/deno/issues/27411. +{ + "args": "check --quiet message_chain_formatting.ts", + "output": "message_chain_formatting.out", + "exitCode": 1 +} diff --git a/tests/specs/check/message_chain_formatting/message_chain_formatting.out b/tests/specs/check/message_chain_formatting/message_chain_formatting.out new file mode 100644 index 00000000000000..ca5c646ccba338 --- /dev/null +++ b/tests/specs/check/message_chain_formatting/message_chain_formatting.out @@ -0,0 +1,10 @@ +error: TS2769 [ERROR]: No overload matches this call. + Overload 1 of 3, '(s: string, b: boolean): void', gave the following error. + Argument of type 'number' is not assignable to parameter of type 'boolean'. + Overload 2 of 3, '(ss: string[], b: boolean): void', gave the following error. + Argument of type 'string' is not assignable to parameter of type 'string[]'. + Overload 3 of 3, '(ss: string[], b: Date): void', gave the following error. + Argument of type 'string' is not assignable to parameter of type 'string[]'. +foo("hello", 42); +~~~ + at [WILDLINE]/message_chain_formatting.ts:8:1 diff --git a/tests/specs/check/message_chain_formatting/message_chain_formatting.ts b/tests/specs/check/message_chain_formatting/message_chain_formatting.ts new file mode 100644 index 00000000000000..ed342629eaf609 --- /dev/null +++ b/tests/specs/check/message_chain_formatting/message_chain_formatting.ts @@ -0,0 +1,8 @@ +function foo(s: string, b: boolean): void; +function foo(ss: string[], b: boolean): void; +function foo(ss: string[], b: Date): void; +function foo(sOrSs: string | string[], b: boolean | Date): void { + console.log(sOrSs, b); +} + +foo("hello", 42); diff --git a/tests/specs/check/module_not_found/__test__.jsonc b/tests/specs/check/module_not_found/__test__.jsonc new file mode 100644 index 00000000000000..5e7cfa2e595889 --- /dev/null +++ b/tests/specs/check/module_not_found/__test__.jsonc @@ -0,0 +1,24 @@ +{ + "tests": { + "check": { + "args": "check --allow-import main.ts", + "output": "main.out", + "exitCode": 1 + }, + "run": { + "args": "run --check --allow-import main.ts", + "output": "main.out", + "exitCode": 1 + }, + "missing_local_root": { + "args": "check --allow-import non_existent.ts", + "output": "missing_local_root.out", + "exitCode": 1 + }, + "missing_remote_root": { + "args": "check --allow-import http://localhost:4545/missing_non_existent.ts", + "output": "missing_remote_root.out", + "exitCode": 1 + } + } +} diff --git a/tests/specs/check/module_not_found/main.out b/tests/specs/check/module_not_found/main.out new file mode 100644 index 00000000000000..6c161835603f1f --- /dev/null +++ b/tests/specs/check/module_not_found/main.out @@ -0,0 +1,9 @@ +Download http://localhost:4545/remote.ts +Check file:///[WILDLINE]/module_not_found/main.ts +error: TS2307 [ERROR]: Cannot find module 'file:///[WILDLINE]/other.js'. + at file:///[WILDLINE]/main.ts:1:22 + +TS2307 [ERROR]: Cannot find module 'http://localhost:4545/remote.ts'. + at file:///[WILDLINE]/main.ts:2:24 + +Found 2 errors. diff --git a/tests/specs/check/module_not_found/main.ts b/tests/specs/check/module_not_found/main.ts new file mode 100644 index 00000000000000..cec95125695dab --- /dev/null +++ b/tests/specs/check/module_not_found/main.ts @@ -0,0 +1,5 @@ +import { Test } from "./other.js"; +import { Remote } from "http://localhost:4545/remote.ts"; + +console.log(new Test()); +console.log(new Remote()); diff --git a/tests/specs/check/module_not_found/missing_local_root.out b/tests/specs/check/module_not_found/missing_local_root.out new file mode 100644 index 00000000000000..34b150c9a367f2 --- /dev/null +++ b/tests/specs/check/module_not_found/missing_local_root.out @@ -0,0 +1,2 @@ +Check file:///[WILDLINE]/non_existent.ts +error: TS2307 [ERROR]: Cannot find module 'file:///[WILDLINE]/non_existent.ts'. diff --git a/tests/specs/check/module_not_found/missing_remote_root.out b/tests/specs/check/module_not_found/missing_remote_root.out new file mode 100644 index 00000000000000..e408938e411408 --- /dev/null +++ b/tests/specs/check/module_not_found/missing_remote_root.out @@ -0,0 +1,3 @@ +Download http://localhost:4545/missing_non_existent.ts +Check http://localhost:4545/missing_non_existent.ts +error: TS2307 [ERROR]: Cannot find module 'http://localhost:4545/missing_non_existent.ts'. diff --git a/tests/specs/check/reject_string_in_readable_stream_from/__test__.jsonc b/tests/specs/check/reject_string_in_readable_stream_from/__test__.jsonc new file mode 100644 index 00000000000000..634dbac8503ab5 --- /dev/null +++ b/tests/specs/check/reject_string_in_readable_stream_from/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "check ./main.ts", + "output": "main.out", + "exitCode": 1 +} diff --git a/tests/specs/check/reject_string_in_readable_stream_from/main.out b/tests/specs/check/reject_string_in_readable_stream_from/main.out new file mode 100644 index 00000000000000..577c1fb059df7f --- /dev/null +++ b/tests/specs/check/reject_string_in_readable_stream_from/main.out @@ -0,0 +1,5 @@ +Check [WILDCARD]/main.ts +error: TS2345 [ERROR]: Argument of type 'string' is not assignable to parameter of type 'AsyncIterable | (Iterable> & object)'. +ReadableStream.from("string"); + ~~~~~~~~ + at [WILDCARD]/main.ts:1:21 diff --git a/tests/specs/check/reject_string_in_readable_stream_from/main.ts b/tests/specs/check/reject_string_in_readable_stream_from/main.ts new file mode 100644 index 00000000000000..5e7fc9c9563ec5 --- /dev/null +++ b/tests/specs/check/reject_string_in_readable_stream_from/main.ts @@ -0,0 +1 @@ +ReadableStream.from("string"); diff --git a/tests/specs/check/types_resolved_relative_config/main.out b/tests/specs/check/types_resolved_relative_config/main.out index 212e1224cac1a4..5763d3298c4e96 100644 --- a/tests/specs/check/types_resolved_relative_config/main.out +++ b/tests/specs/check/types_resolved_relative_config/main.out @@ -1,3 +1,4 @@ [# It should be resolving relative the config in sub_dir instead of the cwd] -error: Module not found "file:///[WILDLINE]/sub_dir/a.d.ts". +Check file:///[WILDLINE]/main.ts +error: TS2307 [ERROR]: Cannot find module 'file:///[WILDLINE]/sub_dir/a.d.ts'. at file:///[WILDLINE]/sub_dir/deno.json:1:1 diff --git a/tests/specs/check/wasm/__test__.jsonc b/tests/specs/check/wasm/__test__.jsonc new file mode 100644 index 00000000000000..cb11ce33bd7aca --- /dev/null +++ b/tests/specs/check/wasm/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "check --allow-import main.ts", + "output": "check.out", + "exitCode": 1 +} diff --git a/tests/specs/check/wasm/check.out b/tests/specs/check/wasm/check.out new file mode 100644 index 00000000000000..b3a23646db8645 --- /dev/null +++ b/tests/specs/check/wasm/check.out @@ -0,0 +1,6 @@ +Download http://localhost:4545/wasm/math.wasm +Check file:///[WILDLINE]/main.ts +error: TS2345 [ERROR]: Argument of type 'string' is not assignable to parameter of type 'number'. +console.log(add(1, "")); + ~~ + at file:///[WILDLINE]/main.ts:3:20 diff --git a/tests/specs/check/wasm/main.ts b/tests/specs/check/wasm/main.ts new file mode 100644 index 00000000000000..64a8f64d8dd010 --- /dev/null +++ b/tests/specs/check/wasm/main.ts @@ -0,0 +1,3 @@ +import { add } from "http://localhost:4545/wasm/math.wasm"; + +console.log(add(1, "")); diff --git a/tests/specs/cli/otel_basic/__test__.jsonc b/tests/specs/cli/otel_basic/__test__.jsonc index 5a27e92625307b..f9826671e831cf 100644 --- a/tests/specs/cli/otel_basic/__test__.jsonc +++ b/tests/specs/cli/otel_basic/__test__.jsonc @@ -1,32 +1,27 @@ { - "steps": [ - { + "tests": { + "basic": { "args": "run -A main.ts basic.ts", - "envs": { - "DENO_UNSTABLE_OTEL_DETERMINISTIC": "1" - }, "output": "basic.out" }, - { + "natural_exit": { "args": "run -A main.ts natural_exit.ts", - "envs": { - "DENO_UNSTABLE_OTEL_DETERMINISTIC": "1" - }, "output": "natural_exit.out" }, - { + "deno_dot_exit": { "args": "run -A main.ts deno_dot_exit.ts", - "envs": { - "DENO_UNSTABLE_OTEL_DETERMINISTIC": "1" - }, "output": "deno_dot_exit.out" }, - { + "uncaught": { "args": "run -A main.ts uncaught.ts", + "output": "uncaught.out" + }, + "metric": { "envs": { - "DENO_UNSTABLE_OTEL_DETERMINISTIC": "1" + "OTEL_METRIC_EXPORT_INTERVAL": "1000" }, - "output": "uncaught.out" + "args": "run -A main.ts metric.ts", + "output": "metric.out" } - ] + } } diff --git a/tests/specs/cli/otel_basic/basic.out b/tests/specs/cli/otel_basic/basic.out index 3f0554f96ade38..1e82ba59b39904 100644 --- a/tests/specs/cli/otel_basic/basic.out +++ b/tests/specs/cli/otel_basic/basic.out @@ -1,16 +1,53 @@ { "spans": [ { - "traceId": "00000000000000000000000000000002", - "spanId": "0000000000000003", + "traceId": "00000000000000000000000000000001", + "spanId": "0000000000000002", "traceState": "", - "parentSpanId": "0000000000000001", + "parentSpanId": "", "flags": 1, - "name": "inner span", - "kind": 1, + "name": "GET", + "kind": 3, "startTimeUnixNano": "[WILDCARD]", "endTimeUnixNano": "[WILDCARD]", - "attributes": [], + "attributes": [ + { + "key": "http.request.method", + "value": { + "stringValue": "GET" + } + }, + { + "key": "url.full", + "value": { + "stringValue": "http://localhost:[WILDCARD]/" + } + }, + { + "key": "url.scheme", + "value": { + "stringValue": "http" + } + }, + { + "key": "url.path", + "value": { + "stringValue": "/" + } + }, + { + "key": "url.query", + "value": { + "stringValue": "" + } + }, + { + "key": "http.response.status_code", + "value": { + "stringValue": "200" + } + } + ], "droppedAttributesCount": 0, "events": [], "droppedEventsCount": 0, @@ -22,11 +59,69 @@ } }, { - "traceId": "00000000000000000000000000000002", - "spanId": "0000000000000001", + "traceId": "00000000000000000000000000000003", + "spanId": "0000000000000004", "traceState": "", "parentSpanId": "", "flags": 1, + "name": "GET", + "kind": 2, + "startTimeUnixNano": "[WILDCARD]", + "endTimeUnixNano": "[WILDCARD]", + "attributes": [ + { + "key": "http.request.method", + "value": { + "stringValue": "GET" + } + }, + { + "key": "url.full", + "value": { + "stringValue": "http://localhost:[WILDCARD]/" + } + }, + { + "key": "url.scheme", + "value": { + "stringValue": "http" + } + }, + { + "key": "url.path", + "value": { + "stringValue": "/" + } + }, + { + "key": "url.query", + "value": { + "stringValue": "" + } + }, + { + "key": "http.response.status_code", + "value": { + "stringValue": "200" + } + } + ], + "droppedAttributesCount": 0, + "events": [], + "droppedEventsCount": 0, + "links": [], + "droppedLinksCount": 0, + "status": { + "message": "", + "code": 0 + } + }, + { + "traceId": "00000000000000000000000000000003", + "spanId": "1000000000000001", + "traceState": "", + "parentSpanId": "0000000000000004", + "flags": 1, "name": "outer span", "kind": 1, "startTimeUnixNano": "[WILDCARD]", @@ -41,6 +136,27 @@ "message": "", "code": 0 } + }, + { + "traceId": "00000000000000000000000000000003", + "spanId": "1000000000000002", + "traceState": "", + "parentSpanId": "1000000000000001", + "flags": 1, + "name": "inner span", + "kind": 1, + "startTimeUnixNano": "[WILDCARD]", + "endTimeUnixNano": "[WILDCARD]", + "attributes": [], + "droppedAttributesCount": 0, + "events": [], + "droppedEventsCount": 0, + "links": [], + "droppedLinksCount": 0, + "status": { + "message": "", + "code": 0 + } } ], "logs": [ @@ -55,8 +171,8 @@ "attributes": [], "droppedAttributesCount": 0, "flags": 1, - "traceId": "00000000000000000000000000000002", - "spanId": "0000000000000003" + "traceId": "00000000000000000000000000000003", + "spanId": "1000000000000002" }, { "timeUnixNano": "0", @@ -69,8 +185,9 @@ "attributes": [], "droppedAttributesCount": 0, "flags": 1, - "traceId": "00000000000000000000000000000002", - "spanId": "0000000000000003" + "traceId": "00000000000000000000000000000003", + "spanId": "1000000000000002" } - ] + ], + "metrics": [] } diff --git a/tests/specs/cli/otel_basic/basic.ts b/tests/specs/cli/otel_basic/basic.ts index 5a178794a3ea58..1f69277660efbd 100644 --- a/tests/specs/cli/otel_basic/basic.ts +++ b/tests/specs/cli/otel_basic/basic.ts @@ -1,10 +1,17 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +import { trace } from "npm:@opentelemetry/api@1.9.0"; +import "jsr:@deno/otel@0.0.2/register"; + +const tracer = trace.getTracer("example-tracer"); async function inner() { - using _span = new Deno.tracing.Span("inner span"); - console.log("log 1"); - await 1; - console.log("log 2"); + await tracer.startActiveSpan("inner span", async (span) => { + console.log("log 1"); + await 1; + console.log("log 2"); + span.end(); + }); } const server = Deno.serve({ @@ -17,8 +24,11 @@ const server = Deno.serve({ } }, handler: async (_req) => { - using _span = new Deno.tracing.Span("outer span"); - await inner(); - return new Response(null, { status: 200 }); + return await tracer.startActiveSpan("outer span", async (span) => { + await inner(); + const resp = new Response(null, { status: 200 }); + span.end(); + return resp; + }); }, }); diff --git a/tests/specs/cli/otel_basic/context.ts b/tests/specs/cli/otel_basic/context.ts new file mode 100644 index 00000000000000..cef0dbd81a0205 --- /dev/null +++ b/tests/specs/cli/otel_basic/context.ts @@ -0,0 +1,26 @@ +import { assertEquals } from "@std/assert"; + +const { ContextManager } = Deno.telemetry; + +const cm = new ContextManager(); + +const a = cm.active(); +const b = a.setValue("b", 1); +const c = b.setValue("c", 2); + +const subB = c.deleteValue("b"); +const subC = subB.deleteValue("c"); + +assertEquals(a.getValue("b"), undefined); +assertEquals(b.getValue("b"), 1); +assertEquals(c.getValue("b"), 1); + +assertEquals(a.getValue("c"), undefined); +assertEquals(b.getValue("c"), undefined); +assertEquals(c.getValue("c"), 2); + +assertEquals(subB.getValue("b"), undefined); +assertEquals(subB.getValue("c"), 2); + +assertEquals(subC.getValue("b"), undefined); +assertEquals(subC.getValue("c"), undefined); diff --git a/tests/specs/cli/otel_basic/deno_dot_exit.out b/tests/specs/cli/otel_basic/deno_dot_exit.out index 98a41cf6061f35..025fdfc8740f4d 100644 --- a/tests/specs/cli/otel_basic/deno_dot_exit.out +++ b/tests/specs/cli/otel_basic/deno_dot_exit.out @@ -15,5 +15,6 @@ "traceId": "", "spanId": "" } - ] + ], + "metrics": [] } diff --git a/tests/specs/cli/otel_basic/main.ts b/tests/specs/cli/otel_basic/main.ts index 6c49462a0bfd43..608d1d33410780 100644 --- a/tests/specs/cli/otel_basic/main.ts +++ b/tests/specs/cli/otel_basic/main.ts @@ -1,8 +1,9 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. const data = { spans: [], logs: [], + metrics: [], }; const server = Deno.serve( @@ -10,28 +11,47 @@ const server = Deno.serve( port: 0, onListen({ port }) { const command = new Deno.Command(Deno.execPath(), { - args: ["run", "-A", "--unstable-otel", Deno.args[0]], + args: ["run", "-A", "-q", "--unstable-otel", Deno.args[0]], env: { + OTEL_DENO: "true", + DENO_UNSTABLE_OTEL_DETERMINISTIC: "1", OTEL_EXPORTER_OTLP_PROTOCOL: "http/json", OTEL_EXPORTER_OTLP_ENDPOINT: `http://localhost:${port}`, }, stdout: "null", }); const child = command.spawn(); - child.output().then(() => { - server.shutdown(); - - console.log(JSON.stringify(data, null, 2)); - }); + child.output() + .then(() => server.shutdown()) + .then(() => { + data.logs.sort((a, b) => + Number( + BigInt(a.observedTimeUnixNano) - BigInt(b.observedTimeUnixNano), + ) + ); + data.spans.sort((a, b) => + Number(BigInt(`0x${a.spanId}`) - BigInt(`0x${b.spanId}`)) + ); + console.log(JSON.stringify(data, null, 2)); + }); }, async handler(req) { const body = await req.json(); - if (body.resourceLogs) { - data.logs.push(...body.resourceLogs[0].scopeLogs[0].logRecords); - } - if (body.resourceSpans) { - data.spans.push(...body.resourceSpans[0].scopeSpans[0].spans); - } + body.resourceLogs?.forEach((rLogs) => { + rLogs.scopeLogs.forEach((sLogs) => { + data.logs.push(...sLogs.logRecords); + }); + }); + body.resourceSpans?.forEach((rSpans) => { + rSpans.scopeSpans.forEach((sSpans) => { + data.spans.push(...sSpans.spans); + }); + }); + body.resourceMetrics?.forEach((rMetrics) => { + rMetrics.scopeMetrics.forEach((sMetrics) => { + data.metrics.push(...sMetrics.metrics); + }); + }); return Response.json({ partialSuccess: {} }, { status: 200 }); }, }, diff --git a/tests/specs/cli/otel_basic/metric.out b/tests/specs/cli/otel_basic/metric.out new file mode 100644 index 00000000000000..dd53734230aeb8 --- /dev/null +++ b/tests/specs/cli/otel_basic/metric.out @@ -0,0 +1,408 @@ +{ + "spans": [], + "logs": [], + "metrics": [ + { + "name": "counter", + "description": "Example of a Counter", + "unit": "", + "metadata": [], + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "attribute", + "value": { + "doubleValue": 1 + } + } + ], + "startTimeUnixNano": "[WILDCARD]", + "timeUnixNano": "[WILDCARD]", + "exemplars": [], + "flags": 0, + "asDouble": 1 + } + ], + "aggregationTemporality": 2, + "isMonotonic": true + } + }, + { + "name": "up_down_counter", + "description": "Example of a UpDownCounter", + "unit": "", + "metadata": [], + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "attribute", + "value": { + "doubleValue": 1 + } + } + ], + "startTimeUnixNano": "[WILDCARD]", + "timeUnixNano": "[WILDCARD]", + "exemplars": [], + "flags": 0, + "asDouble": -1 + } + ], + "aggregationTemporality": 2, + "isMonotonic": false + } + }, + { + "name": "gauge", + "description": "Example of a Gauge", + "unit": "", + "metadata": [], + "gauge": { + "dataPoints": [ + { + "attributes": [ + { + "key": "attribute", + "value": { + "doubleValue": 1 + } + } + ], + "startTimeUnixNano": "[WILDCARD]", + "timeUnixNano": "[WILDCARD]", + "exemplars": [], + "flags": 0, + "asDouble": 1 + } + ] + } + }, + { + "name": "histogram", + "description": "Example of a Histogram", + "unit": "", + "metadata": [], + "histogram": { + "dataPoints": [ + { + "attributes": [ + { + "key": "attribute", + "value": { + "doubleValue": 1 + } + } + ], + "startTimeUnixNano": "[WILDCARD]", + "timeUnixNano": "[WILDCARD]", + "count": 1, + "sum": 1, + "bucketCounts": [ + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "explicitBounds": [ + 0, + 5, + 10, + 25, + 50, + 75, + 100, + 250, + 500, + 750, + 1000, + 2500, + 5000, + 7500, + 10000 + ], + "exemplars": [], + "flags": 0, + "min": 1, + "max": 1 + } + ], + "aggregationTemporality": 2 + } + }, + { + "name": "observable_counter", + "description": "Example of a ObservableCounter", + "unit": "", + "metadata": [], + "sum": { + "dataPoints": [ + { + "attributes": [], + "startTimeUnixNano": "[WILDCARD]", + "timeUnixNano": "[WILDCARD]", + "exemplars": [], + "flags": 0, + "asDouble": 1 + } + ], + "aggregationTemporality": 2, + "isMonotonic": true + } + }, + { + "name": "observable_up_down_counter", + "description": "Example of a ObservableUpDownCounter", + "unit": "", + "metadata": [], + "sum": { + "dataPoints": [ + { + "attributes": [], + "startTimeUnixNano": "[WILDCARD]", + "timeUnixNano": "[WILDCARD]", + "exemplars": [], + "flags": 0, + "asDouble": 1 + } + ], + "aggregationTemporality": 2, + "isMonotonic": false + } + }, + { + "name": "observable_gauge", + "description": "Example of a ObservableGauge", + "unit": "", + "metadata": [], + "gauge": { + "dataPoints": [ + { + "attributes": [], + "startTimeUnixNano": "[WILDCARD]", + "timeUnixNano": "[WILDCARD]", + "exemplars": [], + "flags": 0, + "asDouble": 1 + } + ] + } + }, + { + "name": "counter", + "description": "Example of a Counter", + "unit": "", + "metadata": [], + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "attribute", + "value": { + "doubleValue": 1 + } + } + ], + "startTimeUnixNano": "[WILDCARD]", + "timeUnixNano": "[WILDCARD]", + "exemplars": [], + "flags": 0, + "asDouble": 1 + } + ], + "aggregationTemporality": 2, + "isMonotonic": true + } + }, + { + "name": "up_down_counter", + "description": "Example of a UpDownCounter", + "unit": "", + "metadata": [], + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "attribute", + "value": { + "doubleValue": 1 + } + } + ], + "startTimeUnixNano": "[WILDCARD]", + "timeUnixNano": "[WILDCARD]", + "exemplars": [], + "flags": 0, + "asDouble": -1 + } + ], + "aggregationTemporality": 2, + "isMonotonic": false + } + }, + { + "name": "gauge", + "description": "Example of a Gauge", + "unit": "", + "metadata": [], + "gauge": { + "dataPoints": [ + { + "attributes": [ + { + "key": "attribute", + "value": { + "doubleValue": 1 + } + } + ], + "startTimeUnixNano": "[WILDCARD]", + "timeUnixNano": "[WILDCARD]", + "exemplars": [], + "flags": 0, + "asDouble": 1 + } + ] + } + }, + { + "name": "histogram", + "description": "Example of a Histogram", + "unit": "", + "metadata": [], + "histogram": { + "dataPoints": [ + { + "attributes": [ + { + "key": "attribute", + "value": { + "doubleValue": 1 + } + } + ], + "startTimeUnixNano": "[WILDCARD]", + "timeUnixNano": "[WILDCARD]", + "count": 1, + "sum": 1, + "bucketCounts": [ + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "explicitBounds": [ + 0, + 5, + 10, + 25, + 50, + 75, + 100, + 250, + 500, + 750, + 1000, + 2500, + 5000, + 7500, + 10000 + ], + "exemplars": [], + "flags": 0, + "min": 1, + "max": 1 + } + ], + "aggregationTemporality": 2 + } + }, + { + "name": "observable_counter", + "description": "Example of a ObservableCounter", + "unit": "", + "metadata": [], + "sum": { + "dataPoints": [ + { + "attributes": [], + "startTimeUnixNano": "[WILDCARD]", + "timeUnixNano": "[WILDCARD]", + "exemplars": [], + "flags": 0, + "asDouble": 1 + } + ], + "aggregationTemporality": 2, + "isMonotonic": true + } + }, + { + "name": "observable_up_down_counter", + "description": "Example of a ObservableUpDownCounter", + "unit": "", + "metadata": [], + "sum": { + "dataPoints": [ + { + "attributes": [], + "startTimeUnixNano": "[WILDCARD]", + "timeUnixNano": "[WILDCARD]", + "exemplars": [], + "flags": 0, + "asDouble": 1 + } + ], + "aggregationTemporality": 2, + "isMonotonic": false + } + }, + { + "name": "observable_gauge", + "description": "Example of a ObservableGauge", + "unit": "", + "metadata": [], + "gauge": { + "dataPoints": [ + { + "attributes": [], + "startTimeUnixNano": "[WILDCARD]", + "timeUnixNano": "[WILDCARD]", + "exemplars": [], + "flags": 0, + "asDouble": 1 + } + ] + } + } + ] +} diff --git a/tests/specs/cli/otel_basic/metric.ts b/tests/specs/cli/otel_basic/metric.ts new file mode 100644 index 00000000000000..2b472a6fb8c29e --- /dev/null +++ b/tests/specs/cli/otel_basic/metric.ts @@ -0,0 +1,93 @@ +import { metrics } from "npm:@opentelemetry/api@1"; + +metrics.setGlobalMeterProvider(new Deno.telemetry.MeterProvider()); + +const meter = metrics.getMeter("m"); + +const counter = meter.createCounter("counter", { + description: "Example of a Counter", +}); + +const upDownCounter = meter.createUpDownCounter("up_down_counter", { + description: "Example of a UpDownCounter", +}); + +const gauge = meter.createGauge("gauge", { + description: "Example of a Gauge", +}); + +const histogram = meter.createHistogram("histogram", { + description: "Example of a Histogram", +}); + +const observableCounterPromise = Promise.withResolvers(); +const observableCounter = meter.createObservableCounter("observable_counter", { + description: "Example of a ObservableCounter", +}); +observableCounter.addCallback((res) => { + res.observe(1); + observableCounterPromise.resolve(); +}); + +const observableUpDownCounterPromise = Promise.withResolvers(); +const observableUpDownCounter = meter + .createObservableUpDownCounter("observable_up_down_counter", { + description: "Example of a ObservableUpDownCounter", + }); +observableUpDownCounter.addCallback((res) => { + res.observe(1); + observableUpDownCounterPromise.resolve(); +}); + +const observableGaugePromise = Promise.withResolvers(); +const observableGauge = meter.createObservableGauge("observable_gauge", { + description: "Example of a ObservableGauge", +}); +observableGauge.addCallback((res) => { + res.observe(1); + observableGaugePromise.resolve(); +}); + +const observableCounterBatch = meter.createObservableCounter( + "observable_counter_batch", + { description: "Example of a ObservableCounter, written in batch" }, +); +const observableUpDownCounterBatch = meter.createObservableUpDownCounter( + "observable_up_down_counter_batch", + { description: "Example of a ObservableUpDownCounter, written in batch" }, +); +const observableGaugeBatch = meter.createObservableGauge( + "observable_gauge_batch", + { + description: "Example of a ObservableGauge, written in batch", + }, +); + +const observableBatchPromise = Promise.withResolvers(); +meter.addBatchObservableCallback((observer) => { + observer.observe(observableCounter, 2); + observer.observe(observableUpDownCounter, 2); + observer.observe(observableGauge, 2); + observableBatchPromise.resolve(); +}, [ + observableCounterBatch, + observableUpDownCounterBatch, + observableGaugeBatch, +]); + +const attributes = { attribute: 1 }; +counter.add(1, attributes); +upDownCounter.add(-1, attributes); +gauge.record(1, attributes); +histogram.record(1, attributes); + +const timer = setTimeout(() => {}, 100000); + +await Promise.all([ + observableCounterPromise.promise, + observableUpDownCounterPromise.promise, + observableGaugePromise.promise, + observableBatchPromise.promise, +]); + +clearTimeout(timer); diff --git a/tests/specs/cli/otel_basic/natural_exit.out b/tests/specs/cli/otel_basic/natural_exit.out index 98a41cf6061f35..025fdfc8740f4d 100644 --- a/tests/specs/cli/otel_basic/natural_exit.out +++ b/tests/specs/cli/otel_basic/natural_exit.out @@ -15,5 +15,6 @@ "traceId": "", "spanId": "" } - ] + ], + "metrics": [] } diff --git a/tests/specs/cli/otel_basic/uncaught.out b/tests/specs/cli/otel_basic/uncaught.out index a5a886bfeb8b01..4ff08e6dba9a2c 100644 --- a/tests/specs/cli/otel_basic/uncaught.out +++ b/tests/specs/cli/otel_basic/uncaught.out @@ -33,5 +33,6 @@ throw new Error("uncaught"); "traceId": "", "spanId": "" } - ] + ], + "metrics": [] } diff --git a/tests/specs/compile/code_cache/__test__.jsonc b/tests/specs/compile/code_cache/__test__.jsonc new file mode 100644 index 00000000000000..f1c3461adc8df7 --- /dev/null +++ b/tests/specs/compile/code_cache/__test__.jsonc @@ -0,0 +1,35 @@ +{ + "tempDir": true, + "steps": [{ + "args": "run -A cleanup.ts", + "output": "[WILDCARD]" + }, { + "if": "unix", + "args": "compile --output using_code_cache --log-level=debug main.ts", + "output": "[WILDCARD]" + }, { + "if": "unix", + "commandName": "./using_code_cache", + "args": [], + "output": "first_run.out" + }, { + "if": "unix", + "commandName": "./using_code_cache", + "args": [], + "output": "second_run.out" + }, { + "if": "windows", + "args": "compile --output using_code_cache.exe --log-level=debug main.ts", + "output": "[WILDCARD]" + }, { + "if": "windows", + "commandName": "./using_code_cache.exe", + "args": [], + "output": "first_run.out" + }, { + "if": "windows", + "commandName": "./using_code_cache.exe", + "args": [], + "output": "second_run.out" + }] +} diff --git a/tests/specs/compile/code_cache/cleanup.ts b/tests/specs/compile/code_cache/cleanup.ts new file mode 100644 index 00000000000000..d9e7c805f80a5b --- /dev/null +++ b/tests/specs/compile/code_cache/cleanup.ts @@ -0,0 +1,11 @@ +import { tmpdir } from "node:os"; + +// cleanup the code cache file from a previous run +try { + if (Deno.build.os === "windows") { + Deno.removeSync(tmpdir() + "\\deno-compile-using_code_cache.exe.cache"); + } else { + Deno.removeSync(tmpdir() + "\\deno-compile-using_code_cache.cache"); + } +} catch { +} diff --git a/tests/specs/compile/code_cache/first_run.out b/tests/specs/compile/code_cache/first_run.out new file mode 100644 index 00000000000000..ca13e088f04428 --- /dev/null +++ b/tests/specs/compile/code_cache/first_run.out @@ -0,0 +1 @@ +[WILDCARD]Serialized 9 code cache entries[WILDCARD] \ No newline at end of file diff --git a/tests/specs/compile/code_cache/main.ts b/tests/specs/compile/code_cache/main.ts new file mode 100644 index 00000000000000..b1d552d30a9e03 --- /dev/null +++ b/tests/specs/compile/code_cache/main.ts @@ -0,0 +1,3 @@ +import { join } from "jsr:@std/url@0.220/join"; + +console.log(join); diff --git a/tests/specs/compile/code_cache/second_run.out b/tests/specs/compile/code_cache/second_run.out new file mode 100644 index 00000000000000..5f6afcf7e6f75e --- /dev/null +++ b/tests/specs/compile/code_cache/second_run.out @@ -0,0 +1 @@ +[WILDCARD]Loaded 9 code cache entries[WILDCARD][Function: join][WILDCARD] \ No newline at end of file diff --git a/tests/specs/compile/determinism/__test__.jsonc b/tests/specs/compile/determinism/__test__.jsonc index 97045744f1e619..b84a1fdf18a709 100644 --- a/tests/specs/compile/determinism/__test__.jsonc +++ b/tests/specs/compile/determinism/__test__.jsonc @@ -1,28 +1,31 @@ { "tempDir": true, "steps": [{ + "args": "run -A setup.ts", + "output": "[WILDCARD]" + }, { "if": "unix", - "args": "compile --output main1 main.ts", + "args": "compile --no-config --output a/main a/main.ts", "output": "[WILDCARD]" }, { "if": "unix", - "args": "compile --output main2 main.ts", + "args": "compile --no-config --output b/main b/main.ts", "output": "[WILDCARD]" }, { "if": "unix", - "args": "run --allow-read=. assert_equal.ts main1 main2", + "args": "run --allow-read=. assert_equal.ts a/main b/main", "output": "Same\n" }, { "if": "windows", - "args": "compile --output main1.exe main.ts", + "args": "compile --no-config --output a/main.exe a/main.ts", "output": "[WILDCARD]" }, { "if": "windows", - "args": "compile --output main2.exe main.ts", + "args": "compile --no-config --output b/main.exe b/main.ts", "output": "[WILDCARD]" }, { "if": "windows", - "args": "run --allow-read=. assert_equal.ts main1.exe main2.exe", + "args": "run --allow-read=. assert_equal.ts a/main.exe b/main.exe", "output": "Same\n" }] } diff --git a/tests/specs/compile/determinism/setup.ts b/tests/specs/compile/determinism/setup.ts new file mode 100644 index 00000000000000..8bb5753079967a --- /dev/null +++ b/tests/specs/compile/determinism/setup.ts @@ -0,0 +1,10 @@ +// for setup, we create two directories with the same file in each +// and then when compiling we ensure this directory name has no +// effect on the output +makeCopyDir("a"); +makeCopyDir("b"); + +function makeCopyDir(dirName) { + Deno.mkdirSync(dirName); + Deno.copyFileSync("main.ts", `${dirName}/main.ts`); +} diff --git a/tests/specs/compile/env_vars_support/compile.out b/tests/specs/compile/env_vars_support/compile.out index 2d004e7cb1dcab..cba114b1f7c55e 100644 --- a/tests/specs/compile/env_vars_support/compile.out +++ b/tests/specs/compile/env_vars_support/compile.out @@ -2,3 +2,11 @@ Warning Parsing failed within the specified environment file: environment.env at Check [WILDCARD]main.ts Compile [WILDCARD]main.ts to out[WILDCARD] Warning Environment variables from the file "environment.env" were embedded in the generated executable file + +Embedded Files + +out[WILDLINE] +└── main.ts ([WILDLINE]) + +Size: [WILDLINE] + diff --git a/tests/specs/compile/error/local/__test__.jsonc b/tests/specs/compile/error/local/__test__.jsonc new file mode 100644 index 00000000000000..8d6a015a510c09 --- /dev/null +++ b/tests/specs/compile/error/local/__test__.jsonc @@ -0,0 +1,24 @@ +{ + "tempDir": true, + "steps": [{ + "if": "unix", + "args": "compile --output main standalone_error.ts", + "output": "[WILDCARD]" + }, { + "if": "unix", + "commandName": "./main", + "args": [], + "output": "output.out", + "exitCode": 1 + }, { + "if": "windows", + "args": "compile --output main.exe standalone_error.ts", + "output": "[WILDCARD]" + }, { + "if": "windows", + "commandName": "./main.exe", + "args": [], + "output": "output.out", + "exitCode": 1 + }] +} diff --git a/tests/specs/compile/error/local/output.out b/tests/specs/compile/error/local/output.out new file mode 100644 index 00000000000000..b346734ae6f148 --- /dev/null +++ b/tests/specs/compile/error/local/output.out @@ -0,0 +1,6 @@ +error: Uncaught (in promise) Error: boom! + throw new Error("boom!"); + ^ + at boom (file:///[WILDLINE]standalone_error.ts:2:9) + at foo (file:///[WILDLINE]standalone_error.ts:6:3) + at file:///[WILDLINE]standalone_error.ts:9:1 diff --git a/tests/testdata/compile/standalone_error.ts b/tests/specs/compile/error/local/standalone_error.ts similarity index 100% rename from tests/testdata/compile/standalone_error.ts rename to tests/specs/compile/error/local/standalone_error.ts diff --git a/tests/specs/compile/error/remote/__test__.jsonc b/tests/specs/compile/error/remote/__test__.jsonc new file mode 100644 index 00000000000000..9ad9091ec6a76a --- /dev/null +++ b/tests/specs/compile/error/remote/__test__.jsonc @@ -0,0 +1,24 @@ +{ + "tempDir": true, + "steps": [{ + "if": "unix", + "args": "compile -A --output main main.ts", + "output": "[WILDCARD]" + }, { + "if": "unix", + "commandName": "./main", + "args": [], + "output": "output.out", + "exitCode": 1 + }, { + "if": "windows", + "args": "compile -A --output main.exe main.ts", + "output": "[WILDCARD]" + }, { + "if": "windows", + "commandName": "./main.exe", + "args": [], + "output": "output.out", + "exitCode": 1 + }] +} diff --git a/tests/specs/compile/error/remote/main.ts b/tests/specs/compile/error/remote/main.ts new file mode 100644 index 00000000000000..7a27276dd8751e --- /dev/null +++ b/tests/specs/compile/error/remote/main.ts @@ -0,0 +1 @@ +import "http://localhost:4545/compile/standalone_error_module_with_imports_1.ts"; diff --git a/tests/specs/compile/error/remote/output.out b/tests/specs/compile/error/remote/output.out new file mode 100644 index 00000000000000..3e23694c163456 --- /dev/null +++ b/tests/specs/compile/error/remote/output.out @@ -0,0 +1,5 @@ +hello +error: Uncaught (in promise) Error: boom! +throw new Error(value); + ^ + at http://localhost:4545/compile/standalone_error_module_with_imports_2.ts:7:7 diff --git a/tests/specs/compile/global_npm_cache_implicit_read_permission/__test__.jsonc b/tests/specs/compile/global_npm_cache_implicit_read_permission/__test__.jsonc new file mode 100644 index 00000000000000..d346c3ad202bc3 --- /dev/null +++ b/tests/specs/compile/global_npm_cache_implicit_read_permission/__test__.jsonc @@ -0,0 +1,22 @@ +{ + "tempDir": true, + "steps": [{ + "if": "unix", + "args": "compile --output main main.ts", + "output": "compile.out" + }, { + "if": "unix", + "commandName": "./main", + "args": [], + "output": "main.out" + }, { + "if": "windows", + "args": "compile --output main.exe main.ts", + "output": "compile.out" + }, { + "if": "windows", + "commandName": "./main.exe", + "args": [], + "output": "main.out" + }] +} diff --git a/tests/specs/compile/global_npm_cache_implicit_read_permission/compile.out b/tests/specs/compile/global_npm_cache_implicit_read_permission/compile.out new file mode 100644 index 00000000000000..fa1dd2bf9fb459 --- /dev/null +++ b/tests/specs/compile/global_npm_cache_implicit_read_permission/compile.out @@ -0,0 +1,49 @@ +[WILDCARD] +Compile file:///[WILDLINE]/main.ts to [WILDLINE] + +Embedded Files + +main[WILDLINE] +├─┬ .deno_compile_node_modules ([WILDLINE]) +│ └─┬ localhost ([WILDLINE]) +│ ├─┬ ansi-regex ([WILDLINE]) +│ │ ├── 3.0.1/* ([WILDLINE]) +│ │ └── 5.0.1/* ([WILDLINE]) +│ ├── ansi-styles/4.3.0/* ([WILDLINE]) +│ ├── camelcase/5.3.1/* ([WILDLINE]) +│ ├── cliui/6.0.0/* ([WILDLINE]) +│ ├── color-convert/2.0.1/* ([WILDLINE]) +│ ├── color-name/1.1.4/* ([WILDLINE]) +│ ├── cowsay/1.5.0/* ([WILDLINE]) +│ ├── decamelize/1.2.0/* ([WILDLINE]) +│ ├── emoji-regex/8.0.0/* ([WILDLINE]) +│ ├── find-up/4.1.0/* ([WILDLINE]) +│ ├── get-caller-file/2.0.5/* ([WILDLINE]) +│ ├── get-stdin/8.0.0/* ([WILDLINE]) +│ ├─┬ is-fullwidth-code-point ([WILDLINE]) +│ │ ├── 2.0.0/* ([WILDLINE]) +│ │ └── 3.0.0/* ([WILDLINE]) +│ ├── locate-path/5.0.0/* ([WILDLINE]) +│ ├── p-limit/2.3.0/* ([WILDLINE]) +│ ├── p-locate/4.1.0/* ([WILDLINE]) +│ ├── p-try/2.2.0/* ([WILDLINE]) +│ ├── path-exists/4.0.0/* ([WILDLINE]) +│ ├── require-directory/2.1.1/* ([WILDLINE]) +│ ├── require-main-filename/2.0.0/* ([WILDLINE]) +│ ├── set-blocking/2.0.0/* ([WILDLINE]) +│ ├─┬ string-width ([WILDLINE]) +│ │ ├── 2.1.1/* ([WILDLINE]) +│ │ └── 4.2.3/* ([WILDLINE]) +│ ├─┬ strip-ansi ([WILDLINE]) +│ │ ├── 4.0.0/* ([WILDLINE]) +│ │ └── 6.0.1/* ([WILDLINE]) +│ ├── strip-final-newline/2.0.0/* ([WILDLINE]) +│ ├── which-module/2.0.0/* ([WILDLINE]) +│ ├── wrap-ansi/6.2.0/* ([WILDLINE]) +│ ├── y18n/4.0.3/* ([WILDLINE]) +│ ├── yargs/15.4.1/* ([WILDLINE]) +│ └── yargs-parser/18.1.3/* ([WILDLINE]) +└── main.ts ([WILDLINE]) + +Size: [WILDLINE] + diff --git a/tests/testdata/compile/vfs_implicit_read_permission/main.out b/tests/specs/compile/global_npm_cache_implicit_read_permission/main.out similarity index 100% rename from tests/testdata/compile/vfs_implicit_read_permission/main.out rename to tests/specs/compile/global_npm_cache_implicit_read_permission/main.out diff --git a/tests/testdata/compile/vfs_implicit_read_permission/main.ts b/tests/specs/compile/global_npm_cache_implicit_read_permission/main.ts similarity index 100% rename from tests/testdata/compile/vfs_implicit_read_permission/main.ts rename to tests/specs/compile/global_npm_cache_implicit_read_permission/main.ts diff --git a/tests/specs/compile/include/buffered_reads/__test__.jsonc b/tests/specs/compile/include/buffered_reads/__test__.jsonc new file mode 100644 index 00000000000000..7640fed56b4565 --- /dev/null +++ b/tests/specs/compile/include/buffered_reads/__test__.jsonc @@ -0,0 +1,27 @@ +{ + "tempDir": true, + "steps": [{ + "args": "run -A setup.js", + "output": "[WILDCARD]" + }, { + "if": "unix", + "args": "compile --allow-read=data --include data --output main main.ts", + "output": "[WILDCARD]" + }, { + "if": "unix", + "commandName": "./main", + "args": [], + "output": "[WILDCARD]", + "exitCode": 0 + }, { + "if": "windows", + "args": "compile --allow-read=data --include data --output main.exe main.ts", + "output": "[WILDCARD]" + }, { + "if": "windows", + "commandName": "./main.exe", + "args": [], + "output": "[WILDCARD]", + "exitCode": 0 + }] +} diff --git a/tests/specs/compile/include/buffered_reads/main.ts b/tests/specs/compile/include/buffered_reads/main.ts new file mode 100644 index 00000000000000..7f78eab612ddeb --- /dev/null +++ b/tests/specs/compile/include/buffered_reads/main.ts @@ -0,0 +1,57 @@ +// buffer larger than file +{ + using file = Deno.openSync(import.meta.dirname + "/data/1.txt"); + const data = new Uint8Array(13); + const len = file.readSync(data); + if (len !== 13) { + throw new Error("Unexpected read length"); + } + if (file.readSync(new Uint8Array(1024)) !== null) { + throw new Error("Unexpected."); + } + const textData = new TextDecoder().decode(data); + if (textData !== "Hello, world!") { + throw new Error("Unexpected file data (1): " + textData); + } +} + +// buffer smaller than file +{ + using file = Deno.openSync(import.meta.dirname + "/data/1.txt"); + const finalData = new Uint8Array(13); + const data = new Uint8Array(2); + let pos = 0; + while (true) { + const len = file.readSync(data); + if (len === 0 || len == null) { + break; + } + finalData.set(data.subarray(0, len), pos); + pos += len; + } + const textData = new TextDecoder().decode(finalData); + if (textData !== "Hello, world!") { + throw new Error("Unexpected file data (2): " + textData); + } +} + +// large amount of data, small reads +{ + const bytes = new Uint8Array((1024 ** 2) * 20); + using file = Deno.openSync(import.meta.dirname + "/data/2.dat"); + const buffer = new Uint8Array(2); + let pos = 0; + while (true) { + const len = file.readSync(buffer); + if (len === 0 || len == null) { + break; + } + bytes.set(buffer.subarray(0, len), pos); + pos += len; + } + for (let i = 0; i < bytes.length; i++) { + if (bytes[i] !== i % 256) { + throw new Error("Unexpected data."); + } + } +} diff --git a/tests/specs/compile/include/buffered_reads/setup.js b/tests/specs/compile/include/buffered_reads/setup.js new file mode 100644 index 00000000000000..39cd5cb8b0d058 --- /dev/null +++ b/tests/specs/compile/include/buffered_reads/setup.js @@ -0,0 +1,7 @@ +Deno.mkdirSync("data"); +Deno.writeTextFileSync("data/1.txt", "Hello, world!"); +const bytes = new Uint8Array((1024 ** 2) * 20); +for (let i = 0; i < bytes.length; i++) { + bytes[i] = i % 256; +} +Deno.writeFileSync("data/2.dat", bytes); diff --git a/tests/specs/compile/include/data_files/__test__.jsonc b/tests/specs/compile/include/data_files/__test__.jsonc new file mode 100644 index 00000000000000..5d5d967ca2c308 --- /dev/null +++ b/tests/specs/compile/include/data_files/__test__.jsonc @@ -0,0 +1,41 @@ +{ + "tempDir": true, + "tests": { + "success": { + "steps": [{ + "if": "unix", + "args": "compile --allow-read=data-file.txt --include data-file.txt --output main main.js", + "output": "[WILDCARD]" + }, { + "if": "unix", + "commandName": "./main", + "args": [], + "output": "output.out", + "exitCode": 0 + }, { + "if": "windows", + "args": "compile --allow-read=data-file.txt --include data-file.txt --output main.exe main.js", + "output": "[WILDCARD]" + }, { + "if": "windows", + "commandName": "./main.exe", + "args": [], + "output": "output.out", + "exitCode": 0 + }] + }, + "non_existent": { + "steps": [{ + "if": "unix", + "args": "compile --include does_not_exist.txt --output main main.js", + "output": "non_existent.out", + "exitCode": 1 + }, { + "if": "windows", + "args": "compile --include does_not_exist.txt --output main.exe main.js", + "output": "non_existent.out", + "exitCode": 1 + }] + } + } +} diff --git a/tests/specs/compile/include/data_files/data-file.txt b/tests/specs/compile/include/data_files/data-file.txt new file mode 100644 index 00000000000000..b14df6442ea5a1 --- /dev/null +++ b/tests/specs/compile/include/data_files/data-file.txt @@ -0,0 +1 @@ +Hi diff --git a/tests/specs/compile/include/data_files/main.js b/tests/specs/compile/include/data_files/main.js new file mode 100644 index 00000000000000..4c1f1e98d5fa5f --- /dev/null +++ b/tests/specs/compile/include/data_files/main.js @@ -0,0 +1 @@ +console.log(Deno.readTextFileSync("./data-file.txt").trim()); diff --git a/tests/specs/compile/include/data_files/non_existent.out b/tests/specs/compile/include/data_files/non_existent.out new file mode 100644 index 00000000000000..54bc69ef09f49e --- /dev/null +++ b/tests/specs/compile/include/data_files/non_existent.out @@ -0,0 +1,7 @@ +Compile file:///[WILDLINE]/main.js to [WILDLINE] +error: Writing deno compile executable to temporary file 'main[WILDLINE]' + +Caused by: + 0: Including [WILDLINE]does_not_exist.txt + 1: Reading [WILDLINE]does_not_exist.txt + 2: [WILDLINE] diff --git a/tests/specs/compile/include/data_files/output.out b/tests/specs/compile/include/data_files/output.out new file mode 100644 index 00000000000000..b14df6442ea5a1 --- /dev/null +++ b/tests/specs/compile/include/data_files/output.out @@ -0,0 +1 @@ +Hi diff --git a/tests/specs/compile/include/folder/__test__.jsonc b/tests/specs/compile/include/folder/__test__.jsonc new file mode 100644 index 00000000000000..eeaea53b654d3c --- /dev/null +++ b/tests/specs/compile/include/folder/__test__.jsonc @@ -0,0 +1,24 @@ +{ + "tempDir": true, + "steps": [{ + "if": "unix", + "args": "compile --allow-read=data --include data --output main main.js", + "output": "[WILDCARD]" + }, { + "if": "unix", + "commandName": "./main", + "args": [], + "output": "output.out", + "exitCode": 0 + }, { + "if": "windows", + "args": "compile --allow-read=data --include data --output main.exe main.js", + "output": "[WILDCARD]" + }, { + "if": "windows", + "commandName": "./main.exe", + "args": [], + "output": "output.out", + "exitCode": 0 + }] +} diff --git a/tests/specs/compile/include/folder/data/a.txt b/tests/specs/compile/include/folder/data/a.txt new file mode 100644 index 00000000000000..78981922613b2a --- /dev/null +++ b/tests/specs/compile/include/folder/data/a.txt @@ -0,0 +1 @@ +a diff --git a/tests/specs/compile/include/folder/data/b.txt b/tests/specs/compile/include/folder/data/b.txt new file mode 100644 index 00000000000000..61780798228d17 --- /dev/null +++ b/tests/specs/compile/include/folder/data/b.txt @@ -0,0 +1 @@ +b diff --git a/tests/specs/compile/include/folder/main.js b/tests/specs/compile/include/folder/main.js new file mode 100644 index 00000000000000..831d26167f2070 --- /dev/null +++ b/tests/specs/compile/include/folder/main.js @@ -0,0 +1,8 @@ +const dataDir = import.meta.dirname + "/data"; +const files = Array.from( + Deno.readDirSync(dataDir).map((entry) => dataDir + "/" + entry.name), +); +files.sort(); +for (const file of files) { + console.log(Deno.readTextFileSync(file).trim()); +} diff --git a/tests/specs/compile/include/folder/output.out b/tests/specs/compile/include/folder/output.out new file mode 100644 index 00000000000000..422c2b7ab3b3c6 --- /dev/null +++ b/tests/specs/compile/include/folder/output.out @@ -0,0 +1,2 @@ +a +b diff --git a/tests/specs/compile/include/folder_ts_file/__test__.jsonc b/tests/specs/compile/include/folder_ts_file/__test__.jsonc new file mode 100644 index 00000000000000..f02ed1efc341b7 --- /dev/null +++ b/tests/specs/compile/include/folder_ts_file/__test__.jsonc @@ -0,0 +1,25 @@ +{ + "tempDir": true, + "steps": [{ + "if": "unix", + // notice how the math folder is not included + "args": "compile --allow-read=data --include src --output main main.js", + "output": "[WILDCARD]" + }, { + "if": "unix", + "commandName": "./main", + "args": [], + "output": "output.out", + "exitCode": 0 + }, { + "if": "windows", + "args": "compile --allow-read=data --include src --output main.exe main.js", + "output": "[WILDCARD]" + }, { + "if": "windows", + "commandName": "./main.exe", + "args": [], + "output": "output.out", + "exitCode": 0 + }] +} diff --git a/tests/specs/compile/include/folder_ts_file/main.js b/tests/specs/compile/include/folder_ts_file/main.js new file mode 100644 index 00000000000000..23b490e390e597 --- /dev/null +++ b/tests/specs/compile/include/folder_ts_file/main.js @@ -0,0 +1,14 @@ +const mathDir = import.meta.dirname + "/math"; +const files = Array.from( + Deno.readDirSync(mathDir).map((entry) => mathDir + "/" + entry.name), +); +files.sort(); +for (const file of files) { + console.log(file); +} + +function nonAnalyzable() { + return "./src/main.ts"; +} + +await import(nonAnalyzable()); diff --git a/tests/specs/lint/no_slow_types_entrypoint/a.ts b/tests/specs/compile/include/folder_ts_file/math/add.ts similarity index 100% rename from tests/specs/lint/no_slow_types_entrypoint/a.ts rename to tests/specs/compile/include/folder_ts_file/math/add.ts diff --git a/tests/specs/compile/include/folder_ts_file/output.out b/tests/specs/compile/include/folder_ts_file/output.out new file mode 100644 index 00000000000000..959e3d5c761faf --- /dev/null +++ b/tests/specs/compile/include/folder_ts_file/output.out @@ -0,0 +1,2 @@ +[WILDLINE]add.ts +3 diff --git a/tests/specs/compile/include/folder_ts_file/src/main.ts b/tests/specs/compile/include/folder_ts_file/src/main.ts new file mode 100644 index 00000000000000..38868c3d82ad29 --- /dev/null +++ b/tests/specs/compile/include/folder_ts_file/src/main.ts @@ -0,0 +1,2 @@ +import { add } from "../math/add.ts"; +console.log(add(1, 2)); diff --git a/tests/specs/compile/include/self/__test__.jsonc b/tests/specs/compile/include/self/__test__.jsonc new file mode 100644 index 00000000000000..5fb74534aa6cc3 --- /dev/null +++ b/tests/specs/compile/include/self/__test__.jsonc @@ -0,0 +1,24 @@ +{ + "tempDir": true, + "steps": [{ + "if": "unix", + "args": "compile --allow-read=. --include . --output main main.ts", + "output": "[WILDCARD]" + }, { + "if": "unix", + "commandName": "./main", + "args": [], + "output": "output.out", + "exitCode": 0 + }, { + "if": "windows", + "args": "compile --allow-read=. --include . --output main main.ts", + "output": "[WILDCARD]" + }, { + "if": "windows", + "commandName": "./main.exe", + "args": [], + "output": "output.out", + "exitCode": 0 + }] +} diff --git a/tests/specs/compile/include/self/main.ts b/tests/specs/compile/include/self/main.ts new file mode 100644 index 00000000000000..d86580e3d825e3 --- /dev/null +++ b/tests/specs/compile/include/self/main.ts @@ -0,0 +1,6 @@ +function add(a: number, b: number) { + return a + b; +} + +console.log(add(1, 2)); +console.log(Deno.readTextFileSync(import.meta.filename!).trim()); diff --git a/tests/specs/compile/include/self/output.out b/tests/specs/compile/include/self/output.out new file mode 100644 index 00000000000000..10c297caba155a --- /dev/null +++ b/tests/specs/compile/include/self/output.out @@ -0,0 +1,7 @@ +3 +function add(a: number, b: number) { + return a + b; +} + +console.log(add(1, 2)); +console.log(Deno.readTextFileSync(import.meta.filename!).trim()); diff --git a/tests/specs/compile/include/symlink_twice/__test__.jsonc b/tests/specs/compile/include/symlink_twice/__test__.jsonc new file mode 100644 index 00000000000000..f0f57292a615bf --- /dev/null +++ b/tests/specs/compile/include/symlink_twice/__test__.jsonc @@ -0,0 +1,27 @@ +{ + "tempDir": true, + "steps": [{ + "args": "run -A setup.js", + "output": "[WILDCARD]" + }, { + "if": "unix", + "args": "compile --allow-read=data --include . --output main link.js", + "output": "compile.out" + }, { + "if": "unix", + "commandName": "./main", + "args": [], + "output": "1\n", + "exitCode": 0 + }, { + "if": "windows", + "args": "compile --allow-read=data --include . --output main.exe link.js", + "output": "compile.out" + }, { + "if": "windows", + "commandName": "./main.exe", + "args": [], + "output": "1\n", + "exitCode": 0 + }] +} diff --git a/tests/specs/compile/include/symlink_twice/compile.out b/tests/specs/compile/include/symlink_twice/compile.out new file mode 100644 index 00000000000000..6ae93bf1cb6b92 --- /dev/null +++ b/tests/specs/compile/include/symlink_twice/compile.out @@ -0,0 +1,11 @@ +Compile [WILDLINE] + +Embedded Files + +main[WILDLINE] +├── index.js ([WILDLINE]) +├── link.js --> index.js +└── setup.js ([WILDLINE]) + +Size: [WILDLINE] + diff --git a/tests/specs/compile/include/symlink_twice/setup.js b/tests/specs/compile/include/symlink_twice/setup.js new file mode 100644 index 00000000000000..4c7cebfaf51080 --- /dev/null +++ b/tests/specs/compile/include/symlink_twice/setup.js @@ -0,0 +1,2 @@ +Deno.writeTextFileSync("index.js", "console.log(1);"); +Deno.symlinkSync("index.js", "link.js"); diff --git a/tests/specs/compile/no_code_cache/__test__.jsonc b/tests/specs/compile/no_code_cache/__test__.jsonc new file mode 100644 index 00000000000000..2589054ecb6739 --- /dev/null +++ b/tests/specs/compile/no_code_cache/__test__.jsonc @@ -0,0 +1,22 @@ +{ + "tempDir": true, + "steps": [{ + "if": "unix", + "args": "compile --output no_code_cache --no-code-cache --log-level=debug main.ts", + "output": "[WILDCARD]" + }, { + "if": "unix", + "commandName": "./no_code_cache", + "args": [], + "output": "main.out" + }, { + "if": "windows", + "args": "compile --output no_code_cache.exe --no-code-cache --log-level=debug main.ts", + "output": "[WILDCARD]" + }, { + "if": "windows", + "commandName": "./no_code_cache.exe", + "args": [], + "output": "main.out" + }] +} diff --git a/tests/specs/compile/no_code_cache/main.out b/tests/specs/compile/no_code_cache/main.out new file mode 100644 index 00000000000000..e91f132825e050 --- /dev/null +++ b/tests/specs/compile/no_code_cache/main.out @@ -0,0 +1 @@ +[WILDCARD]Code cache disabled.[WILDCARD] \ No newline at end of file diff --git a/tests/specs/compile/no_code_cache/main.ts b/tests/specs/compile/no_code_cache/main.ts new file mode 100644 index 00000000000000..b1d552d30a9e03 --- /dev/null +++ b/tests/specs/compile/no_code_cache/main.ts @@ -0,0 +1,3 @@ +import { join } from "jsr:@std/url@0.220/join"; + +console.log(join); diff --git a/tests/specs/compile/npm_fs/__test__.jsonc b/tests/specs/compile/npm_fs/__test__.jsonc new file mode 100644 index 00000000000000..a8198bfb5dc4bf --- /dev/null +++ b/tests/specs/compile/npm_fs/__test__.jsonc @@ -0,0 +1,24 @@ +{ + "tempDir": true, + // use this so the vfs output is all in the same folder + "canonicalizedTempDir": true, + "steps": [{ + "if": "unix", + "args": "compile -A --output main main.ts", + "output": "compile.out" + }, { + "if": "unix", + "commandName": "./main", + "args": [], + "output": "main.out" + }, { + "if": "windows", + "args": "compile -A --output main.exe main.ts", + "output": "compile.out" + }, { + "if": "windows", + "commandName": "./main.exe", + "args": [], + "output": "main.out" + }] +} diff --git a/tests/specs/compile/npm_fs/compile.out b/tests/specs/compile/npm_fs/compile.out new file mode 100644 index 00000000000000..c2ecef40155e20 --- /dev/null +++ b/tests/specs/compile/npm_fs/compile.out @@ -0,0 +1,10 @@ +[WILDCARD] + +Embedded Files + +main[WILDLINE] +├── main.ts ([WILDLINE]) +└── node_modules/* ([WILDLINE]) + +Size: [WILDLINE] + diff --git a/tests/specs/compile/npm_fs/deno.json b/tests/specs/compile/npm_fs/deno.json new file mode 100644 index 00000000000000..fbd70ec480291a --- /dev/null +++ b/tests/specs/compile/npm_fs/deno.json @@ -0,0 +1,3 @@ +{ + "nodeModulesDir": "auto" +} diff --git a/tests/testdata/compile/npm_fs/main.out b/tests/specs/compile/npm_fs/main.out similarity index 100% rename from tests/testdata/compile/npm_fs/main.out rename to tests/specs/compile/npm_fs/main.out diff --git a/tests/testdata/compile/npm_fs/main.ts b/tests/specs/compile/npm_fs/main.ts similarity index 100% rename from tests/testdata/compile/npm_fs/main.ts rename to tests/specs/compile/npm_fs/main.ts diff --git a/tests/specs/compile/package_json_type/compile.out b/tests/specs/compile/package_json_type/compile.out index 913e363c3ebdbf..c03e63b71a185a 100644 --- a/tests/specs/compile/package_json_type/compile.out +++ b/tests/specs/compile/package_json_type/compile.out @@ -1,2 +1,6 @@ Check file:///[WILDLINE]/main.js Compile file:///[WILDLINE] + +Embedded Files + +[WILDCARD] diff --git a/tests/specs/doc/html/__test__.jsonc b/tests/specs/doc/html/__test__.jsonc index 5114127cd61a09..78ced63744e82a 100644 --- a/tests/specs/doc/html/__test__.jsonc +++ b/tests/specs/doc/html/__test__.jsonc @@ -1,12 +1,21 @@ { "tempDir": true, - "args": [ - "doc", - "--html", - "--name=MyLib", - "--output=temp_dir_path_here", - "referenced_private_types_fixed.ts" - ], - "output": "[WILDCARD]", - "exitCode": 0 + "steps": [ + { + "args": [ + "doc", + "--html", + "--name=MyLib", + "a.ts", + "b.ts" + ], + "output": "Written 23 files to \"./docs/\"\n", + "exitCode": 0 + }, + { + "args": "run --allow-read check_file.ts", + "output": "", + "exitCode": 0 + } + ] } diff --git a/tests/specs/doc/html/referenced_private_types_fixed.ts b/tests/specs/doc/html/a.ts similarity index 100% rename from tests/specs/doc/html/referenced_private_types_fixed.ts rename to tests/specs/doc/html/a.ts diff --git a/tests/specs/doc/html/b.ts b/tests/specs/doc/html/b.ts new file mode 100644 index 00000000000000..bb385369923e67 --- /dev/null +++ b/tests/specs/doc/html/b.ts @@ -0,0 +1,11 @@ +/** Doc comment */ +export interface MyInterface2 { + /** Doc comment */ + prop?: string; +} + +/** Doc comment */ +export class MyClass2 { + /** Doc comment */ + prop: MyInterface2 = {}; +} diff --git a/tests/specs/doc/html/check_file.ts b/tests/specs/doc/html/check_file.ts new file mode 100644 index 00000000000000..7d2fdeff5f6256 --- /dev/null +++ b/tests/specs/doc/html/check_file.ts @@ -0,0 +1,5 @@ +const content = Deno.readTextFileSync("./docs/index.html"); + +if (content.includes("..")) { + throw new Error(); +} diff --git a/tests/specs/doc/html/deno.json b/tests/specs/doc/html/deno.json new file mode 100644 index 00000000000000..b466b28003a728 --- /dev/null +++ b/tests/specs/doc/html/deno.json @@ -0,0 +1,5 @@ +{ + "exports": { + ".": "./a.ts" + } +} diff --git a/tests/specs/doc/invalid_url/invalid_url.out b/tests/specs/doc/invalid_url/invalid_url.out index 038c53177a336c..17974318c7f019 100644 --- a/tests/specs/doc/invalid_url/invalid_url.out +++ b/tests/specs/doc/invalid_url/invalid_url.out @@ -1,4 +1,4 @@ error: Invalid URL 'https://raw.githubusercontent.com%2Fdyedgreen%2Fdeno-sqlite%2Frework_api%2Fmod.ts' Caused by: - invalid domain character + invalid international domain name diff --git a/tests/specs/doc/lint_html_success/lint_success_html.out b/tests/specs/doc/lint_html_success/lint_success_html.out index 783dd5927e269c..57b179e226efef 100644 --- a/tests/specs/doc/lint_html_success/lint_success_html.out +++ b/tests/specs/doc/lint_html_success/lint_success_html.out @@ -1 +1 @@ -Written 12 files to "./docs/" +Written 15 files to "./docs/" diff --git a/tests/specs/doc/wasm/__test__.jsonc b/tests/specs/doc/wasm/__test__.jsonc new file mode 100644 index 00000000000000..967bd08ea30aaa --- /dev/null +++ b/tests/specs/doc/wasm/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "doc http://localhost:4545/wasm/math.wasm", + "output": "doc.out" +} diff --git a/tests/specs/doc/wasm/doc.out b/tests/specs/doc/wasm/doc.out new file mode 100644 index 00000000000000..9e93f1b9389d01 --- /dev/null +++ b/tests/specs/doc/wasm/doc.out @@ -0,0 +1,21 @@ +Download http://localhost:4545/wasm/math.wasm +Defined in http://localhost:4545/wasm/math.wasm:2:1 + +function add(arg0: number, arg1: number): number + +Defined in http://localhost:4545/wasm/math.wasm:3:1 + +function subtract(arg0: number, arg1: number): number + +Defined in http://localhost:4545/wasm/math.wasm:4:22 + +const __data_end: number + +Defined in http://localhost:4545/wasm/math.wasm:5:22 + +const __heap_base: number + +Defined in http://localhost:4545/wasm/math.wasm:1:22 + +const memory: WebAssembly.Memory + diff --git a/tests/specs/fmt/gitignore/.gitignore b/tests/specs/fmt/gitignore/.gitignore new file mode 100644 index 00000000000000..838458f209ac53 --- /dev/null +++ b/tests/specs/fmt/gitignore/.gitignore @@ -0,0 +1 @@ +/dist/ \ No newline at end of file diff --git a/tests/specs/fmt/gitignore/__test__.jsonc b/tests/specs/fmt/gitignore/__test__.jsonc new file mode 100644 index 00000000000000..94804c3fe19168 --- /dev/null +++ b/tests/specs/fmt/gitignore/__test__.jsonc @@ -0,0 +1,6 @@ +{ + "tempDir": true, + "args": "fmt --check", + "output": "expected.out", + "exitCode": 1 +} diff --git a/tests/specs/fmt/gitignore/dist/file1.js b/tests/specs/fmt/gitignore/dist/file1.js new file mode 100644 index 00000000000000..3ecf5aa6a07b4f --- /dev/null +++ b/tests/specs/fmt/gitignore/dist/file1.js @@ -0,0 +1,6 @@ +// This file is in `.gitignore` simulating that it's generated by a build tool +// and should not be linted +function foo( ) { + console.log( "hello") + } + \ No newline at end of file diff --git a/tests/specs/fmt/gitignore/expected.out b/tests/specs/fmt/gitignore/expected.out new file mode 100644 index 00000000000000..73568ff3a7b289 --- /dev/null +++ b/tests/specs/fmt/gitignore/expected.out @@ -0,0 +1,10 @@ + +from [WILDCARD]file2.ts: +1 | -function foo( ): any { +1 | +function foo(): any { +2 | - console.log( "hello") +2 | + console.log("hello"); +3 | - } +3 | +} + +error: Found 1 not formatted file in 1 file diff --git a/tests/specs/fmt/gitignore/file2.ts b/tests/specs/fmt/gitignore/file2.ts new file mode 100644 index 00000000000000..0e5fdd36d2736e --- /dev/null +++ b/tests/specs/fmt/gitignore/file2.ts @@ -0,0 +1,3 @@ +function foo( ): any { + console.log( "hello") + } diff --git a/tests/specs/fmt/html/__test__.jsonc b/tests/specs/fmt/html/__test__.jsonc index 2e6d08d4cc5076..96b7f4ed926ce7 100644 --- a/tests/specs/fmt/html/__test__.jsonc +++ b/tests/specs/fmt/html/__test__.jsonc @@ -12,6 +12,10 @@ "broken": { "args": "fmt broken.html", "output": "broken.out" + }, + "with_js": { + "args": "fmt --check with_js.html", + "output": "Checked 1 file\n" } } } diff --git a/tests/specs/fmt/html/with_js.html b/tests/specs/fmt/html/with_js.html new file mode 100644 index 00000000000000..d956c6728bb2ad --- /dev/null +++ b/tests/specs/fmt/html/with_js.html @@ -0,0 +1,9 @@ + + + + + diff --git a/tests/specs/fmt/sql/__test__.jsonc b/tests/specs/fmt/sql/__test__.jsonc new file mode 100644 index 00000000000000..27c08abd835346 --- /dev/null +++ b/tests/specs/fmt/sql/__test__.jsonc @@ -0,0 +1,29 @@ +{ + "tempDir": true, + "tests": { + "nothing": { + "args": "fmt", + "output": "Checked 7 files\n" + }, + "flag": { + "args": "fmt --unstable-sql", + "output": "[UNORDERED_START]\n[WILDLINE]badly_formatted.sql\n[WILDLINE]wrong_file_ignore.sql\n[UNORDERED_END]\nChecked 7 files\n" + }, + "config_file": { + "steps": [{ + "args": [ + "eval", + "Deno.writeTextFile('deno.json', '{\\n \"unstable\": [\"fmt-sql\"]\\n}\\n')" + ], + "output": "[WILDCARD]" + }, { + "args": "fmt", + "output": "[UNORDERED_START]\n[WILDLINE]badly_formatted.sql\n[WILDLINE]wrong_file_ignore.sql\n[UNORDERED_END]\nChecked 8 files\n" + }] + }, + "well_formatted_check": { + "args": "fmt --unstable-sql --check well_formatted.sql", + "output": "Checked 1 file\n" + } + } +} diff --git a/tests/specs/fmt/sql/badly_formatted.sql b/tests/specs/fmt/sql/badly_formatted.sql new file mode 100644 index 00000000000000..619fc7afdd20b4 --- /dev/null +++ b/tests/specs/fmt/sql/badly_formatted.sql @@ -0,0 +1 @@ +select *; \ No newline at end of file diff --git a/tests/specs/fmt/sql/ignore_file.sql b/tests/specs/fmt/sql/ignore_file.sql new file mode 100644 index 00000000000000..62418c611b17a9 --- /dev/null +++ b/tests/specs/fmt/sql/ignore_file.sql @@ -0,0 +1,3 @@ +-- deno-fmt-ignore-file + +foo%! diff --git a/tests/specs/fmt/sql/ignore_file2.sql b/tests/specs/fmt/sql/ignore_file2.sql new file mode 100644 index 00000000000000..fe9969f1d3df80 --- /dev/null +++ b/tests/specs/fmt/sql/ignore_file2.sql @@ -0,0 +1,3 @@ +--deno-fmt-ignore-file + +foo%! diff --git a/tests/specs/fmt/sql/ignore_file3.sql b/tests/specs/fmt/sql/ignore_file3.sql new file mode 100644 index 00000000000000..c87da3e591a35f --- /dev/null +++ b/tests/specs/fmt/sql/ignore_file3.sql @@ -0,0 +1,6 @@ +-- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor +-- incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, +-- quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +-- deno-fmt-ignore-file + + foo%! diff --git a/tests/specs/fmt/sql/ignore_file4.sql b/tests/specs/fmt/sql/ignore_file4.sql new file mode 100644 index 00000000000000..2de65712a54ec7 --- /dev/null +++ b/tests/specs/fmt/sql/ignore_file4.sql @@ -0,0 +1,3 @@ +-- deno-fmt-ignore-file Foo bar biz + + foo%! diff --git a/tests/specs/fmt/sql/well_formatted.sql b/tests/specs/fmt/sql/well_formatted.sql new file mode 100644 index 00000000000000..92ce980185f9ea --- /dev/null +++ b/tests/specs/fmt/sql/well_formatted.sql @@ -0,0 +1,4 @@ +SELECT + * +FROM + foo; diff --git a/tests/specs/fmt/sql/wrong_file_ignore.sql b/tests/specs/fmt/sql/wrong_file_ignore.sql new file mode 100644 index 00000000000000..c124855dc285c1 --- /dev/null +++ b/tests/specs/fmt/sql/wrong_file_ignore.sql @@ -0,0 +1,6 @@ +-- File ignore directive only works if it's in the first cluster +-- of comment, ie. there are no empty lines after the first n-leading lines. + +-- deno-fmt-ignore-file + + foo \ No newline at end of file diff --git a/tests/specs/info/flag/041_info_flag.out b/tests/specs/info/flag/041_info_flag.out index 72a00be303f853..48a08de4d90685 100644 --- a/tests/specs/info/flag/041_info_flag.out +++ b/tests/specs/info/flag/041_info_flag.out @@ -4,3 +4,4 @@ npm modules cache: [WILDCARD]npm Emitted modules cache: [WILDCARD]gen Language server registries cache: [WILDCARD]registries Origin storage: [WILDCARD]location_data +Web cache storage: [WILDCARD]deno_cache diff --git a/tests/specs/info/flag_location/041_info_flag_location.out b/tests/specs/info/flag_location/041_info_flag_location.out index 684db2eec5d062..d3ba01ad3567cc 100644 --- a/tests/specs/info/flag_location/041_info_flag_location.out +++ b/tests/specs/info/flag_location/041_info_flag_location.out @@ -4,4 +4,5 @@ npm modules cache: [WILDCARD]npm Emitted modules cache: [WILDCARD]gen Language server registries cache: [WILDCARD]registries Origin storage: [WILDCARD]location_data[WILDCARD] +Web cache storage: [WILDCARD]deno_cache Local Storage: [WILDCARD]location_data[WILDCARD]local_storage diff --git a/tests/specs/info/import_map/__test__.jsonc b/tests/specs/info/import_map/__test__.jsonc index 7aba603e0bbd8b..725276925eaf1f 100644 --- a/tests/specs/info/import_map/__test__.jsonc +++ b/tests/specs/info/import_map/__test__.jsonc @@ -1,9 +1,5 @@ { - "steps": [ - { - "args": "info preact/debug", - "output": "with_import_map.out", - "exitCode": 0 - } - ] + "args": "info preact/debug", + "output": "with_import_map.out", + "exitCode": 0 } diff --git a/tests/specs/info/json/info_json.out b/tests/specs/info/json/info_json.out index 551f61026dad35..cc43c5f10aa4c0 100644 --- a/tests/specs/info/json/info_json.out +++ b/tests/specs/info/json/info_json.out @@ -5,5 +5,6 @@ "npmCache": "[WILDCARD]npm", "typescriptCache": "[WILDCARD]gen", "registryCache": "[WILDCARD]registries", - "originStorage": "[WILDCARD]location_data" + "originStorage": "[WILDCARD]location_data", + "webCacheStorage": [WILDCARD]deno_cache" } diff --git a/tests/specs/info/package_json_basic_auto_install/__test__.jsonc b/tests/specs/info/package_json_basic_auto_install/__test__.jsonc index a98f89e91318c7..4b5b9fb1a83bdc 100644 --- a/tests/specs/info/package_json_basic_auto_install/__test__.jsonc +++ b/tests/specs/info/package_json_basic_auto_install/__test__.jsonc @@ -1,9 +1,21 @@ { "tempDir": true, - "steps": [ - { - "args": "info --quiet main.ts", - "output": "info.out" + "tests": { + "resolves_npm_deps": { + "steps": [ + { + "args": "info --quiet main.ts", + "output": "info.out" + } + ] + }, + "bare_specifier": { + "steps": [ + { + "args": "info --quiet @denotest/esm-basic", + "output": "info_bare.out" + } + ] } - ] + } } diff --git a/tests/specs/info/package_json_basic_auto_install/info_bare.out b/tests/specs/info/package_json_basic_auto_install/info_bare.out new file mode 100644 index 00000000000000..4269e054136a68 --- /dev/null +++ b/tests/specs/info/package_json_basic_auto_install/info_bare.out @@ -0,0 +1,4 @@ +dependencies: 0 unique +size: 471B + +npm:/@denotest/esm-basic@1.0.0 (471B) diff --git a/tests/specs/info/wasm_module/__test__.jsonc b/tests/specs/info/wasm_module/__test__.jsonc new file mode 100644 index 00000000000000..37a02b4484e4f8 --- /dev/null +++ b/tests/specs/info/wasm_module/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "info --allow-import main.js", + "output": "main.out" +} diff --git a/tests/specs/info/wasm_module/main.js b/tests/specs/info/wasm_module/main.js new file mode 100644 index 00000000000000..9ad66df35bdb96 --- /dev/null +++ b/tests/specs/info/wasm_module/main.js @@ -0,0 +1,7 @@ +import { + add, + subtract, +} from "http://localhost:4545/wasm/math_with_import.wasm"; + +console.log(add(1, 2)); +console.log(subtract(100, 50)); diff --git a/tests/specs/info/wasm_module/main.out b/tests/specs/info/wasm_module/main.out new file mode 100644 index 00000000000000..d8daf39409e589 --- /dev/null +++ b/tests/specs/info/wasm_module/main.out @@ -0,0 +1,10 @@ +Download http://localhost:4545/wasm/math_with_import.wasm +Download http://localhost:4545/wasm/math.ts +local: [WILDLINE]main.js +type: JavaScript +dependencies: 2 unique +size: [WILDLINE] + +file:///[WILDLINE]/main.js ([WILDLINE]) +└─┬ http://localhost:4545/wasm/math_with_import.wasm ([WILDLINE]) + └── http://localhost:4545/wasm/math.ts ([WILDLINE]) diff --git a/tests/specs/info/workspace_member/__test__.jsonc b/tests/specs/info/workspace_member/__test__.jsonc index d13d3b03e80908..b62b3a3a596ef6 100644 --- a/tests/specs/info/workspace_member/__test__.jsonc +++ b/tests/specs/info/workspace_member/__test__.jsonc @@ -11,6 +11,18 @@ "cwd": "member/sub", "output": "info_workspace_member_sub.out", "exitCode": 0 + }, + "member_bare_specifier": { + "args": "info @denotest/workspace-member", + "output": "info_bare_specifier.out" + }, + "member_package_json_specifier": { + "args": "info @denotest/workspace-member-package-json", + "output": "info_bare_specifier_package_json.out" + }, + "member_package_json_specifier_subpath": { + "args": "info @denotest/workspace-member-package-json/foo", + "output": "info_bare_specifier_package_json_subpath.out" } } } diff --git a/tests/specs/info/workspace_member/deno.json b/tests/specs/info/workspace_member/deno.json index f88028aeab0b71..dc8a3f4ba562cc 100644 --- a/tests/specs/info/workspace_member/deno.json +++ b/tests/specs/info/workspace_member/deno.json @@ -1,3 +1,3 @@ { - "workspace": ["./member"] + "workspace": ["./member", "./member2", "./member3"] } diff --git a/tests/specs/info/workspace_member/info_bare_specifier.out b/tests/specs/info/workspace_member/info_bare_specifier.out new file mode 100644 index 00000000000000..e446407d506ffe --- /dev/null +++ b/tests/specs/info/workspace_member/info_bare_specifier.out @@ -0,0 +1,6 @@ +local: [WILDCARD]mod.ts +type: TypeScript +dependencies: 0 unique +size: [WILDCARD] + +file://[WILDCARD]member/mod.ts ([WILDCARD]) diff --git a/tests/specs/info/workspace_member/info_bare_specifier_package_json.out b/tests/specs/info/workspace_member/info_bare_specifier_package_json.out new file mode 100644 index 00000000000000..846305e4bb1c6b --- /dev/null +++ b/tests/specs/info/workspace_member/info_bare_specifier_package_json.out @@ -0,0 +1,6 @@ +local: [WILDCARD]mod.ts +type: TypeScript +dependencies: 0 unique +size: [WILDCARD] + +file://[WILDCARD]member3/mod.ts ([WILDCARD]) diff --git a/tests/specs/info/workspace_member/info_bare_specifier_package_json_subpath.out b/tests/specs/info/workspace_member/info_bare_specifier_package_json_subpath.out new file mode 100644 index 00000000000000..89c1a13b530e60 --- /dev/null +++ b/tests/specs/info/workspace_member/info_bare_specifier_package_json_subpath.out @@ -0,0 +1,6 @@ +local: [WILDCARD]bar.ts +type: TypeScript +dependencies: 0 unique +size: [WILDCARD] + +file://[WILDCARD]member3/bar.ts ([WILDCARD]) diff --git a/tests/specs/info/workspace_member/member/deno.json b/tests/specs/info/workspace_member/member/deno.json index 66aac290469038..5b8d7202a54870 100644 --- a/tests/specs/info/workspace_member/member/deno.json +++ b/tests/specs/info/workspace_member/member/deno.json @@ -1,4 +1,6 @@ { + "name": "@denotest/workspace-member", + "exports": "./mod.ts", "imports": { "foo": "./sub/file.ts" } diff --git a/tests/specs/info/workspace_member/member/mod.ts b/tests/specs/info/workspace_member/member/mod.ts new file mode 100644 index 00000000000000..e415f2ed64a54d --- /dev/null +++ b/tests/specs/info/workspace_member/member/mod.ts @@ -0,0 +1,3 @@ +export function hi() { + console.log("hi"); +} diff --git a/tests/specs/info/workspace_member/member2/deno.json b/tests/specs/info/workspace_member/member2/deno.json new file mode 100644 index 00000000000000..0967ef424bce67 --- /dev/null +++ b/tests/specs/info/workspace_member/member2/deno.json @@ -0,0 +1 @@ +{} diff --git a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/.deno/.deno.lock b/tests/specs/info/workspace_member/member3/bar.ts similarity index 100% rename from tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/.deno/.deno.lock rename to tests/specs/info/workspace_member/member3/bar.ts diff --git a/tests/specs/info/workspace_member/member3/mod.ts b/tests/specs/info/workspace_member/member3/mod.ts new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/tests/specs/info/workspace_member/member3/package.json b/tests/specs/info/workspace_member/member3/package.json new file mode 100644 index 00000000000000..7a4ddf9dd3e43b --- /dev/null +++ b/tests/specs/info/workspace_member/member3/package.json @@ -0,0 +1,7 @@ +{ + "name": "@denotest/workspace-member-package-json", + "exports": { + ".": "./mod.ts", + "./foo": "./bar.ts" + } +} diff --git a/tests/specs/init/npm/__test__.jsonc b/tests/specs/init/npm/__test__.jsonc new file mode 100644 index 00000000000000..ccc9d181ddb6ff --- /dev/null +++ b/tests/specs/init/npm/__test__.jsonc @@ -0,0 +1,6 @@ +{ + "tempDir": true, + "args": "init --npm vite my-project", + "output": "init.out", + "exitCode": 1 +} diff --git a/tests/specs/init/npm/init.out b/tests/specs/init/npm/init.out new file mode 100644 index 00000000000000..f4ba9394375f48 --- /dev/null +++ b/tests/specs/init/npm/init.out @@ -0,0 +1 @@ +You can initialize project manually by running deno run npm:create-vite my-project and applying desired permissions. diff --git a/tests/specs/install/entrypoint_only_used_packages/__test__.jsonc b/tests/specs/install/entrypoint_only_used_packages/__test__.jsonc new file mode 100644 index 00000000000000..9d24eb4de434f9 --- /dev/null +++ b/tests/specs/install/entrypoint_only_used_packages/__test__.jsonc @@ -0,0 +1,13 @@ +{ + "tempDir": true, + "steps": [ + { + "args": "install --unstable-npm-lazy-caching --entrypoint main.ts", + "output": "install-entrypoint.out" + }, + { + "args": "install", + "output": "install.out" + } + ] +} diff --git a/tests/specs/install/entrypoint_only_used_packages/install-entrypoint.out b/tests/specs/install/entrypoint_only_used_packages/install-entrypoint.out new file mode 100644 index 00000000000000..5f6c8247a54663 --- /dev/null +++ b/tests/specs/install/entrypoint_only_used_packages/install-entrypoint.out @@ -0,0 +1,6 @@ +[UNORDERED_START] +Download http://localhost:4260/@denotest%2fadd +Download http://localhost:4260/@denotest%2fsay-hello +Download http://localhost:4260/@denotest/add/1.0.0.tgz +[UNORDERED_END] +Initialize @denotest/add@1.0.0 diff --git a/tests/specs/install/entrypoint_only_used_packages/install.out b/tests/specs/install/entrypoint_only_used_packages/install.out new file mode 100644 index 00000000000000..5ea41bed4c8cb2 --- /dev/null +++ b/tests/specs/install/entrypoint_only_used_packages/install.out @@ -0,0 +1,2 @@ +Download http://localhost:4260/@denotest/say-hello/1.0.0.tgz +Initialize @denotest/say-hello@1.0.0 diff --git a/tests/specs/install/entrypoint_only_used_packages/main.ts b/tests/specs/install/entrypoint_only_used_packages/main.ts new file mode 100644 index 00000000000000..1ca631410fdfde --- /dev/null +++ b/tests/specs/install/entrypoint_only_used_packages/main.ts @@ -0,0 +1,3 @@ +import { add } from "@denotest/add"; + +console.log(add(1, 2)); diff --git a/tests/specs/install/entrypoint_only_used_packages/package.json b/tests/specs/install/entrypoint_only_used_packages/package.json new file mode 100644 index 00000000000000..2623bcc82ed4ea --- /dev/null +++ b/tests/specs/install/entrypoint_only_used_packages/package.json @@ -0,0 +1,6 @@ +{ + "dependencies": { + "@denotest/add": "1.0.0", + "@denotest/say-hello": "1.0.0" + } +} diff --git a/tests/specs/install/global/pkg_name_same_as_file/__test__.jsonc b/tests/specs/install/global/pkg_name_same_as_file/__test__.jsonc new file mode 100644 index 00000000000000..980361361a8c32 --- /dev/null +++ b/tests/specs/install/global/pkg_name_same_as_file/__test__.jsonc @@ -0,0 +1,20 @@ +{ + "tempDir": true, + "tests": { + "file_exists": { + "steps": [{ + "args": ["eval", "Deno.writeTextFileSync('cli.ts', '')"], + "output": "[WILDCARD]" + }, { + // success + "args": "install --root ./bins -g --name my-cli cli.ts", + "output": "[WILDCARD]" + }] + }, + "file_not_exists": { + "args": "install --root ./bins -g --name my-cli cli.ts", + "output": "file_not_exists.out", + "exitCode": 1 + } + } +} diff --git a/tests/specs/install/global/pkg_name_same_as_file/file_not_exists.out b/tests/specs/install/global/pkg_name_same_as_file/file_not_exists.out new file mode 100644 index 00000000000000..92a0bb8dcd7c62 --- /dev/null +++ b/tests/specs/install/global/pkg_name_same_as_file/file_not_exists.out @@ -0,0 +1 @@ +error: cli.ts is missing a prefix. Did you mean `deno install -g npm:cli.ts`? diff --git a/tests/specs/install/jsr_exports_uses_locked/__test__.jsonc b/tests/specs/install/jsr_exports_uses_locked/__test__.jsonc new file mode 100644 index 00000000000000..254fe8b9891410 --- /dev/null +++ b/tests/specs/install/jsr_exports_uses_locked/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "tempDir": true, + "steps": [ + { + "args": "install", + "output": "install.out" + } + ] +} diff --git a/tests/specs/install/jsr_exports_uses_locked/deno.json b/tests/specs/install/jsr_exports_uses_locked/deno.json new file mode 100644 index 00000000000000..0ede5a3a1df7f3 --- /dev/null +++ b/tests/specs/install/jsr_exports_uses_locked/deno.json @@ -0,0 +1,5 @@ +{ + "imports": { + "@denotest/multiple-exports": "jsr:@denotest/multiple-exports@^0.7.0" + } +} diff --git a/tests/specs/install/jsr_exports_uses_locked/deno.lock b/tests/specs/install/jsr_exports_uses_locked/deno.lock new file mode 100644 index 00000000000000..cd27474396b92a --- /dev/null +++ b/tests/specs/install/jsr_exports_uses_locked/deno.lock @@ -0,0 +1,28 @@ +{ + "version": "4", + "specifiers": { + "jsr:@denotest/add@1": "1.0.0", + "jsr:@denotest/multiple-exports@0.7": "0.7.0", + "jsr:@denotest/subtract@1": "1.0.0" + }, + "jsr": { + "@denotest/add@1.0.0": { + "integrity": "3b2e675c1ad7fba2a45bc251992e01aff08a3c974ac09079b11e6a5b95d4bfcb" + }, + "@denotest/multiple-exports@0.7.0": { + "integrity": "efe9748a0c0939c7ac245fee04acc0c42bd7a61874ff71a360c4543e4f5f6b36", + "dependencies": [ + "jsr:@denotest/add", + "jsr:@denotest/subtract" + ] + }, + "@denotest/subtract@1.0.0": { + "integrity": "e178a7101c073e93d9efa6833d5cbf83bc1bc8d509b7c2a5ecbf74265e917597" + } + }, + "workspace": { + "dependencies": [ + "jsr:@denotest/multiple-exports@0.7" + ] + } +} diff --git a/tests/specs/install/jsr_exports_uses_locked/install.out b/tests/specs/install/jsr_exports_uses_locked/install.out new file mode 100644 index 00000000000000..b4e8b640f648e8 --- /dev/null +++ b/tests/specs/install/jsr_exports_uses_locked/install.out @@ -0,0 +1,13 @@ +[UNORDERED_START] +Download http://127.0.0.1:4250/@denotest/multiple-exports/0.7.0_meta.json +Download http://127.0.0.1:4250/@denotest/multiple-exports/meta.json +Download http://127.0.0.1:4250/@denotest/multiple-exports/0.7.0/add.ts +Download http://127.0.0.1:4250/@denotest/multiple-exports/0.7.0/subtract.ts +Download http://127.0.0.1:4250/@denotest/multiple-exports/0.7.0/data.json +Download http://127.0.0.1:4250/@denotest/add/meta.json +Download http://127.0.0.1:4250/@denotest/subtract/meta.json +Download http://127.0.0.1:4250/@denotest/add/1.0.0_meta.json +Download http://127.0.0.1:4250/@denotest/subtract/1.0.0_meta.json +Download http://127.0.0.1:4250/@denotest/add/1.0.0/mod.ts +Download http://127.0.0.1:4250/@denotest/subtract/1.0.0/mod.ts +[UNORDERED_END] diff --git a/tests/specs/lint/gitignore/.gitignore b/tests/specs/lint/gitignore/.gitignore new file mode 100644 index 00000000000000..838458f209ac53 --- /dev/null +++ b/tests/specs/lint/gitignore/.gitignore @@ -0,0 +1 @@ +/dist/ \ No newline at end of file diff --git a/tests/specs/lint/gitignore/__test__.jsonc b/tests/specs/lint/gitignore/__test__.jsonc new file mode 100644 index 00000000000000..e777fb1c1ee58e --- /dev/null +++ b/tests/specs/lint/gitignore/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "lint", + "output": "expected.out", + "exitCode": 1 +} diff --git a/tests/specs/lint/gitignore/dist/file1.js b/tests/specs/lint/gitignore/dist/file1.js new file mode 100644 index 00000000000000..669c1e2c8c2d64 --- /dev/null +++ b/tests/specs/lint/gitignore/dist/file1.js @@ -0,0 +1,3 @@ +// This file is in `.gitignore` simulating that it's generated by a build tool +// and should not be linted +while (false) {} diff --git a/tests/specs/lint/gitignore/expected.out b/tests/specs/lint/gitignore/expected.out new file mode 100644 index 00000000000000..8024b51d199555 --- /dev/null +++ b/tests/specs/lint/gitignore/expected.out @@ -0,0 +1,12 @@ +error[no-empty]: Empty block statement + --> [WILDCARD]file2.ts:3:14 + | +3 | } catch (_e) {} + | ^^ + = hint: Add code or comment to the empty block + + docs: https://lint.deno.land/rules/no-empty + + +Found 1 problem +Checked 1 file diff --git a/tests/specs/lint/gitignore/file2.ts b/tests/specs/lint/gitignore/file2.ts new file mode 100644 index 00000000000000..73c612c35fb14f --- /dev/null +++ b/tests/specs/lint/gitignore/file2.ts @@ -0,0 +1,6 @@ +try { + await Deno.open("./some/file.txt"); +} catch (_e) {} + +// deno-lint-ignore no-explicit-any +function _foo(): any {} diff --git a/tests/specs/lint/json/expected_json.out b/tests/specs/lint/json/expected_json.out index 6712c891a592dd..242c47cf561cb8 100644 --- a/tests/specs/lint/json/expected_json.out +++ b/tests/specs/lint/json/expected_json.out @@ -61,5 +61,10 @@ "file_path": "[WILDCARD]malformed.js", "message": "Expected '{', got 'B' at [WILDCARD]malformed.js:4:16\n\n export class A B C\n ~" } + ], + "checked_files": [ + "[WILDCARD]file1.js", + "[WILDCARD]file2.ts", + "[WILDCARD]malformed.js" ] } diff --git a/tests/specs/lint/no_slow_types/__test__.jsonc b/tests/specs/lint/no_slow_types/__test__.jsonc index 2a5a340328373c..9d0358c8365c84 100644 --- a/tests/specs/lint/no_slow_types/__test__.jsonc +++ b/tests/specs/lint/no_slow_types/__test__.jsonc @@ -1,17 +1,26 @@ { - "steps": [{ - "args": "lint", - "output": "no_slow_types.out", - "exitCode": 1 - }, { - "args": "lint --rules-exclude=no-slow-types", - "output": "Checked 4 files\n" - }, { - "args": "lint --config=deno.non-package.json", - "output": "Checked 4 files\n" - }, { - // non-entrypoint - "args": "lint d.ts", - "output": "Checked 1 file\n" - }] + "tests": { + "no_entrypoint": { + "steps": [{ + "args": "lint", + "output": "no_slow_types.out", + "exitCode": 1 + }, { + "args": "lint --rules-exclude=no-slow-types", + "output": "Checked 4 files\n" + }, { + "args": "lint --config=deno.non-package.json", + "output": "Checked 4 files\n" + }, { + // non-entrypoint + "args": "lint d.ts", + "output": "Checked 1 file\n" + }] + }, + "entrypoint": { + "args": "lint a.ts", + "output": "no_slow_types_entrypoint.out", + "exitCode": 1 + } + } } diff --git a/tests/specs/lint/no_slow_types_entrypoint/__test__.jsonc b/tests/specs/lint/no_slow_types_entrypoint/__test__.jsonc deleted file mode 100644 index 2ba74c03fd6eb2..00000000000000 --- a/tests/specs/lint/no_slow_types_entrypoint/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "lint a.ts", - "output": "no_slow_types_entrypoint.out", - "exitCode": 1 -} diff --git a/tests/specs/lint/no_slow_types_entrypoint/b.ts b/tests/specs/lint/no_slow_types_entrypoint/b.ts deleted file mode 100644 index b96a794894c109..00000000000000 --- a/tests/specs/lint/no_slow_types_entrypoint/b.ts +++ /dev/null @@ -1,5 +0,0 @@ -export function addB(a: number, b: number) { - return a + b; -} - -export * from "./d.ts"; diff --git a/tests/specs/lint/no_slow_types_entrypoint/c.ts b/tests/specs/lint/no_slow_types_entrypoint/c.ts deleted file mode 100644 index 517aa3d2118283..00000000000000 --- a/tests/specs/lint/no_slow_types_entrypoint/c.ts +++ /dev/null @@ -1,4 +0,0 @@ -// this one won't error because it's not an export -export function addC(a: number, b: number) { - return a + b; -} diff --git a/tests/specs/lint/no_slow_types_entrypoint/d.ts b/tests/specs/lint/no_slow_types_entrypoint/d.ts deleted file mode 100644 index babe9d81b538a4..00000000000000 --- a/tests/specs/lint/no_slow_types_entrypoint/d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// this one is re-exported via b.ts -export function addD(a: number, b: number) { - return a + b; -} diff --git a/tests/specs/lint/no_slow_types_entrypoint/deno.json b/tests/specs/lint/no_slow_types_entrypoint/deno.json deleted file mode 100644 index 2fd0af5f0f03ac..00000000000000 --- a/tests/specs/lint/no_slow_types_entrypoint/deno.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "@pkg/pkg", - "version": "1.0.0", - "exports": { - "./a": "./a.ts", - "./b": "./b.ts" - } -} diff --git a/tests/specs/lint/no_slow_types_entrypoint/no_slow_types.out b/tests/specs/lint/no_slow_types_entrypoint/no_slow_types.out deleted file mode 100644 index 5828906e76952b..00000000000000 --- a/tests/specs/lint/no_slow_types_entrypoint/no_slow_types.out +++ /dev/null @@ -1,35 +0,0 @@ -error[no-slow-types]: missing explicit return type in the public API - --> [WILDCARD]a.ts:1:17 - | -1 | export function add(a: number, b: number) { - | ^^^ this function is missing an explicit return type - = hint: add an explicit return type to the function - - info: all functions in the public API must have an explicit return type - docs: https://jsr.io/go/slow-type-missing-explicit-return-type - - -error[no-slow-types]: missing explicit return type in the public API - --> [WILDCARD]b.ts:1:17 - | -1 | export function addB(a: number, b: number) { - | ^^^^ this function is missing an explicit return type - = hint: add an explicit return type to the function - - info: all functions in the public API must have an explicit return type - docs: https://jsr.io/go/slow-type-missing-explicit-return-type - - -error[no-slow-types]: missing explicit return type in the public API - --> [WILDCARD]d.ts:2:17 - | -2 | export function addD(a: number, b: number) { - | ^^^^ this function is missing an explicit return type - = hint: add an explicit return type to the function - - info: all functions in the public API must have an explicit return type - docs: https://jsr.io/go/slow-type-missing-explicit-return-type - - -Found 3 problems -Checked 4 files diff --git a/tests/specs/lint/no_slow_types_entrypoint/no_slow_types_entrypoint.out b/tests/specs/lint/no_slow_types_entrypoint/no_slow_types_entrypoint.out deleted file mode 100644 index 895dcb6cd90a69..00000000000000 --- a/tests/specs/lint/no_slow_types_entrypoint/no_slow_types_entrypoint.out +++ /dev/null @@ -1,38 +0,0 @@ -error[no-slow-types]: missing explicit return type in the public API - --> [WILDCARD]a.ts:1:17 - | -1 | export function add(a: number, b: number) { - | ^^^ this function is missing an explicit return type - | - = hint: add an explicit return type to the function - - info: all functions in the public API must have an explicit return type - docs: https://jsr.io/go/slow-type-missing-explicit-return-type - - -error[no-slow-types]: missing explicit return type in the public API - --> [WILDCARD]b.ts:1:17 - | -1 | export function addB(a: number, b: number) { - | ^^^^ this function is missing an explicit return type - | - = hint: add an explicit return type to the function - - info: all functions in the public API must have an explicit return type - docs: https://jsr.io/go/slow-type-missing-explicit-return-type - - -error[no-slow-types]: missing explicit return type in the public API - --> [WILDCARD]d.ts:2:17 - | -2 | export function addD(a: number, b: number) { - | ^^^^ this function is missing an explicit return type - | - = hint: add an explicit return type to the function - - info: all functions in the public API must have an explicit return type - docs: https://jsr.io/go/slow-type-missing-explicit-return-type - - -Found 3 problems -Checked 1 file diff --git a/tests/specs/lint/stdin_json/expected_from_stdin_json.out b/tests/specs/lint/stdin_json/expected_from_stdin_json.out index 5788248aa217c7..8db157bccbf35b 100644 --- a/tests/specs/lint/stdin_json/expected_from_stdin_json.out +++ b/tests/specs/lint/stdin_json/expected_from_stdin_json.out @@ -20,5 +20,8 @@ "hint": [WILDCARD] } ], - "errors": [] + "errors": [], + "checked_files": [ + "[WILDCARD]main.ts" + ] } diff --git a/tests/specs/lint/with_report_config_override/with_report_config_override.out b/tests/specs/lint/with_report_config_override/with_report_config_override.out index ad32e31236f25f..fb873f187e0c87 100644 --- a/tests/specs/lint/with_report_config_override/with_report_config_override.out +++ b/tests/specs/lint/with_report_config_override/with_report_config_override.out @@ -38,5 +38,8 @@ "hint": "If this is intentional, prefix it with an underscore like `_add`" } ], - "errors": [] + "errors": [], + "checked_files": [ + "[WILDCARD]a.ts" + ] } diff --git a/tests/specs/lockfile/config_file_lock_path/lock_check_err2.out b/tests/specs/lockfile/config_file_lock_path/lock_check_err2.out deleted file mode 100644 index 3043b102a51fdc..00000000000000 --- a/tests/specs/lockfile/config_file_lock_path/lock_check_err2.out +++ /dev/null @@ -1,11 +0,0 @@ -[WILDCARD]Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file. - - Specifier: http://localhost:4545/subdir/mt_text_ecmascript.j3.js - Actual: 3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18 - Expected: bad - -This could be caused by: - * the lock file may be corrupt - * the source itself may be corrupt - -Investigate the lockfile; delete it to regenerate the lockfile or --reload to reload the source code from the server. diff --git a/tests/specs/lockfile/external_import_map/__test__.jsonc b/tests/specs/lockfile/external_import_map/__test__.jsonc new file mode 100644 index 00000000000000..2bdffed334222d --- /dev/null +++ b/tests/specs/lockfile/external_import_map/__test__.jsonc @@ -0,0 +1,10 @@ +{ + "tempDir": true, + "steps": [{ + "args": "run -A main.ts", + "output": "[WILDCARD]" + }, { + "args": ["eval", "console.log(Deno.readTextFileSync('deno.lock').trim())"], + "output": "deno.lock.out" + }] +} diff --git a/tests/specs/lockfile/external_import_map/deno.json b/tests/specs/lockfile/external_import_map/deno.json new file mode 100644 index 00000000000000..ee44ba9472a033 --- /dev/null +++ b/tests/specs/lockfile/external_import_map/deno.json @@ -0,0 +1,3 @@ +{ + "importMap": "import_map.json" +} diff --git a/tests/specs/lockfile/external_import_map/deno.lock.out b/tests/specs/lockfile/external_import_map/deno.lock.out new file mode 100644 index 00000000000000..c811061125e7f4 --- /dev/null +++ b/tests/specs/lockfile/external_import_map/deno.lock.out @@ -0,0 +1,17 @@ +{ + "version": "4", + "specifiers": { + "jsr:@denotest/add@1.0.0": "1.0.0" + }, + "jsr": { + "@denotest/add@1.0.0": { + "integrity": "[WILDLINE]" + } + }, + "workspace": { + "dependencies": [ + "jsr:@denotest/add@1.0.0", + "npm:@denotest/esm-basic@1.0.0" + ] + } +} diff --git a/tests/specs/lockfile/external_import_map/import_map.json b/tests/specs/lockfile/external_import_map/import_map.json new file mode 100644 index 00000000000000..069b294ce47926 --- /dev/null +++ b/tests/specs/lockfile/external_import_map/import_map.json @@ -0,0 +1,10 @@ +{ + "imports": { + "@denotest/add": "jsr:@denotest/add@1.0.0" + }, + "scopes": { + "/foo/": { + "@denotest/esm-basic": "npm:@denotest/esm-basic@1.0.0" + } + } +} diff --git a/tests/specs/lockfile/external_import_map/main.ts b/tests/specs/lockfile/external_import_map/main.ts new file mode 100644 index 00000000000000..b75bbc03edd2ff --- /dev/null +++ b/tests/specs/lockfile/external_import_map/main.ts @@ -0,0 +1,2 @@ +import { add } from "@denotest/add"; +console.log(add(1, 2)); diff --git a/tests/specs/lockfile/jsx_import_source_and_types/__test__.jsonc b/tests/specs/lockfile/jsx_import_source_and_types/__test__.jsonc new file mode 100644 index 00000000000000..08ab2acf957f84 --- /dev/null +++ b/tests/specs/lockfile/jsx_import_source_and_types/__test__.jsonc @@ -0,0 +1,13 @@ +{ + "tempDir": true, + "steps": [{ + "args": "run index.tsx", + "output": "index.out" + }, { + "args": [ + "eval", + "console.log(Deno.readTextFileSync('deno.lock').trim())" + ], + "output": "deno.lock.out" + }] +} diff --git a/tests/specs/lockfile/jsx_import_source_and_types/deno.json b/tests/specs/lockfile/jsx_import_source_and_types/deno.json new file mode 100644 index 00000000000000..3755934a580804 --- /dev/null +++ b/tests/specs/lockfile/jsx_import_source_and_types/deno.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "jsx": "react-jsx", + "jsxImportSource": "npm:react", + "jsxImportSourceTypes": "npm:@types/react", + "types": [ + "npm:@types/node" + ] + } +} diff --git a/tests/specs/lockfile/jsx_import_source_and_types/deno.lock.out b/tests/specs/lockfile/jsx_import_source_and_types/deno.lock.out new file mode 100644 index 00000000000000..3a933a1aa28b9a --- /dev/null +++ b/tests/specs/lockfile/jsx_import_source_and_types/deno.lock.out @@ -0,0 +1,30 @@ +{ + "version": "4", + "specifiers": { + "npm:react@*": "18.2.0" + }, + "npm": { + "js-tokens@4.0.0": { + "integrity": "[WILDLINE]" + }, + "loose-envify@1.4.0": { + "integrity": "[WILDLINE]", + "dependencies": [ + "js-tokens" + ] + }, + "react@18.2.0": { + "integrity": "[WILDLINE]", + "dependencies": [ + "loose-envify" + ] + } + }, + "workspace": { + "dependencies": [ + "npm:@types/node@*", + "npm:@types/react@*", + "npm:react@*" + ] + } +} diff --git a/tests/specs/lockfile/jsx_import_source_and_types/index.out b/tests/specs/lockfile/jsx_import_source_and_types/index.out new file mode 100644 index 00000000000000..7fc82c71df2f74 --- /dev/null +++ b/tests/specs/lockfile/jsx_import_source_and_types/index.out @@ -0,0 +1,7 @@ +Download http://localhost:4260/react +Download http://localhost:4260/loose-envify +Download http://localhost:4260/js-tokens +Download http://localhost:4260/react/react-18.2.0.tgz +Download http://localhost:4260/loose-envify/loose-envify-1.4.0.tgz +Download http://localhost:4260/js-tokens/js-tokens-4.0.0.tgz +1 diff --git a/tests/specs/lockfile/jsx_import_source_and_types/index.tsx b/tests/specs/lockfile/jsx_import_source_and_types/index.tsx new file mode 100644 index 00000000000000..296d5492b0034a --- /dev/null +++ b/tests/specs/lockfile/jsx_import_source_and_types/index.tsx @@ -0,0 +1 @@ +console.log(1); diff --git a/tests/specs/mod.rs b/tests/specs/mod.rs index b4c8781d312caf..4da5a87d140f90 100644 --- a/tests/specs/mod.rs +++ b/tests/specs/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::cell::RefCell; use std::collections::BTreeMap; @@ -17,7 +17,6 @@ use file_test_runner::collection::CollectTestsError; use file_test_runner::collection::CollectedCategoryOrTest; use file_test_runner::collection::CollectedTest; use file_test_runner::collection::CollectedTestCategory; -use file_test_runner::SubTestResult; use file_test_runner::TestResult; use once_cell::sync::Lazy; use serde::Deserialize; @@ -119,6 +118,12 @@ struct MultiStepMetaData { /// steps. #[serde(default)] pub temp_dir: bool, + /// Whether the temporary directory should be canonicalized. + /// + /// This should be used sparingly, but is sometimes necessary + /// on the CI. + #[serde(default)] + pub canonicalized_temp_dir: bool, /// Whether the temporary directory should be symlinked to another path. #[serde(default)] pub symlinked_temp_dir: bool, @@ -145,6 +150,8 @@ struct SingleTestMetaData { #[serde(default)] pub temp_dir: bool, #[serde(default)] + pub canonicalized_temp_dir: bool, + #[serde(default)] pub symlinked_temp_dir: bool, #[serde(default)] pub repeat: Option, @@ -160,6 +167,7 @@ impl SingleTestMetaData { base: self.base, cwd: None, temp_dir: self.temp_dir, + canonicalized_temp_dir: self.canonicalized_temp_dir, symlinked_temp_dir: self.symlinked_temp_dir, repeat: self.repeat, envs: Default::default(), @@ -256,19 +264,10 @@ fn run_test(test: &CollectedTest) -> TestResult { if metadata.ignore { TestResult::Ignored } else if let Some(repeat) = metadata.repeat { - TestResult::SubTests( - (0..repeat) - .map(|i| { - let diagnostic_logger = diagnostic_logger.clone(); - SubTestResult { - name: format!("run {}", i + 1), - result: TestResult::from_maybe_panic(AssertUnwindSafe(|| { - run_test_inner(&metadata, &cwd, diagnostic_logger); - })), - } - }) - .collect(), - ) + for _ in 0..repeat { + run_test_inner(&metadata, &cwd, diagnostic_logger.clone()); + } + TestResult::Passed } else { run_test_inner(&metadata, &cwd, diagnostic_logger.clone()); TestResult::Passed @@ -336,6 +335,13 @@ fn test_context_from_metadata( builder = builder.cwd(cwd.to_string_lossy()); } + if metadata.canonicalized_temp_dir { + // not actually deprecated, we just want to discourage its use + #[allow(deprecated)] + { + builder = builder.use_canonicalized_temp_dir(); + } + } if metadata.symlinked_temp_dir { // not actually deprecated, we just want to discourage its use // because it's mostly used for testing purposes locally diff --git a/tests/specs/node/cjs_key_escaped_whitespace/__test__.jsonc b/tests/specs/node/cjs_key_escaped_whitespace/__test__.jsonc new file mode 100644 index 00000000000000..ebaae5bfd60e06 --- /dev/null +++ b/tests/specs/node/cjs_key_escaped_whitespace/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "run -A main.js", + "output": "output.out" +} diff --git a/tests/specs/node/cjs_key_escaped_whitespace/main.js b/tests/specs/node/cjs_key_escaped_whitespace/main.js new file mode 100644 index 00000000000000..9d4f2ee26cd730 --- /dev/null +++ b/tests/specs/node/cjs_key_escaped_whitespace/main.js @@ -0,0 +1,2 @@ +const bang = await import("./module.cjs"); +console.log("imported:", bang); diff --git a/tests/specs/node/cjs_key_escaped_whitespace/module.cjs b/tests/specs/node/cjs_key_escaped_whitespace/module.cjs new file mode 100644 index 00000000000000..5accc6196a82a4 --- /dev/null +++ b/tests/specs/node/cjs_key_escaped_whitespace/module.cjs @@ -0,0 +1,6 @@ +module.exports = { + "\nx": "test", + "\ty": "test", + "\rz": "test", + '"a': "test", +}; diff --git a/tests/specs/node/cjs_key_escaped_whitespace/output.out b/tests/specs/node/cjs_key_escaped_whitespace/output.out new file mode 100644 index 00000000000000..49e92abdec5879 --- /dev/null +++ b/tests/specs/node/cjs_key_escaped_whitespace/output.out @@ -0,0 +1,7 @@ +imported: [Module: null prototype] { + "\ty": "test", + "\nx": "test", + "\rz": "test", + '"a': "test", + default: { "\nx": "test", "\ty": "test", "\rz": "test", '"a': "test" } +} diff --git a/tests/specs/node/dynamic_import_and_require_dual/__test__.jsonc b/tests/specs/node/dynamic_import_and_require_dual/__test__.jsonc new file mode 100644 index 00000000000000..8e03984f0b341a --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/__test__.jsonc @@ -0,0 +1,44 @@ +{ + "tests": { + "cjs_check": { + "args": "check index.cts", + "output": "check.out", + "exitCode": 1 + }, + "cjs_run": { + "args": "run index.cts", + "output": "run_cjs.out" + }, + "mjs_run": { + "args": "run index.mjs", + "output": "run_mts.out" + }, + "jsdoc_import_decl": { + "args": "check jsdoc_import_decl.js", + "output": "jsdoc_import_decl.out", + "exitCode": 1 + }, + "resolution_mode_import": { + "args": "check resolution_mode_import.mts", + "output": "resolution_mode_import.out", + "exitCode": 1 + }, + "resolution_mode_require": { + "args": "check resolution_mode_require.mts", + "output": "resolution_mode_require.out", + "exitCode": 1 + }, + "resolution_mode_require_jsdoc": { + "args": "check resolution_mode_require_jsdoc.js", + "output": "resolution_mode_require_jsdoc.out", + "exitCode": 1 + }, + "resolution_mode_require_import_type": { + // waiting on https://github.com/swc-project/swc/issues/9377 + "ignore": true, + "args": "check resolution_mode_require_import_type.ts", + "output": "resolution_mode_require_import_type.out", + "exitCode": 1 + } + } +} diff --git a/tests/specs/node/dynamic_import_and_require_dual/check.out b/tests/specs/node/dynamic_import_and_require_dual/check.out new file mode 100644 index 00000000000000..bbea340cce6a2c --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/check.out @@ -0,0 +1,5 @@ +Check file:///[WILDLINE]/index.cts +error: TS2322 [ERROR]: Type '"mjs"' is not assignable to type '"value"'. + const value: "value" = mod.kind; + ~~~~~ + at file:///[WILDLINE]/index.cts:3:9 diff --git a/tests/specs/node/dynamic_import_and_require_dual/index.cts b/tests/specs/node/dynamic_import_and_require_dual/index.cts new file mode 100644 index 00000000000000..d3bc653c652539 --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/index.cts @@ -0,0 +1,8 @@ +async function main() { + const mod = await import("package"); + const value: "value" = mod.kind; + console.log(value); + console.log(mod); +} + +main(); diff --git a/tests/specs/node/dynamic_import_and_require_dual/index.mjs b/tests/specs/node/dynamic_import_and_require_dual/index.mjs new file mode 100644 index 00000000000000..76f21fec90ff59 --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/index.mjs @@ -0,0 +1,11 @@ +import { createRequire } from "node:module"; +{ + const mod = await import("package"); + console.log(mod.kind); + console.log(mod); +} +{ + const require = createRequire(import.meta.url); + const mod = require("package"); + console.log(mod); +} diff --git a/tests/specs/node/dynamic_import_and_require_dual/jsdoc_import_decl.js b/tests/specs/node/dynamic_import_and_require_dual/jsdoc_import_decl.js new file mode 100644 index 00000000000000..153b9fe3a6a092 --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/jsdoc_import_decl.js @@ -0,0 +1,12 @@ +// @ts-check + +/** @import { kind } from "package" */ + +/** + * @param {typeof kind} myValue + */ +export function log(myValue) { + console.log(myValue); +} + +log("value"); diff --git a/tests/specs/node/dynamic_import_and_require_dual/jsdoc_import_decl.out b/tests/specs/node/dynamic_import_and_require_dual/jsdoc_import_decl.out new file mode 100644 index 00000000000000..655d47117f3fe5 --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/jsdoc_import_decl.out @@ -0,0 +1,5 @@ +Check file:///[WILDLINE]/jsdoc_import_decl.js +error: TS2345 [ERROR]: Argument of type '"value"' is not assignable to parameter of type '"mjs"'. +log("value"); + ~~~~~~~ + at file:///[WILDLINE]/jsdoc_import_decl.js:12:5 diff --git a/tests/specs/node/dynamic_import_and_require_dual/node_modules/package/mod.d.mts b/tests/specs/node/dynamic_import_and_require_dual/node_modules/package/mod.d.mts new file mode 100644 index 00000000000000..bd4baa591949ae --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/node_modules/package/mod.d.mts @@ -0,0 +1 @@ +export const kind: "mjs"; diff --git a/tests/specs/node/dynamic_import_and_require_dual/node_modules/package/mod.mjs b/tests/specs/node/dynamic_import_and_require_dual/node_modules/package/mod.mjs new file mode 100644 index 00000000000000..cd2f5f05cb03e5 --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/node_modules/package/mod.mjs @@ -0,0 +1 @@ +export const kind = "esm"; diff --git a/tests/specs/node/dynamic_import_and_require_dual/node_modules/package/package.json b/tests/specs/node/dynamic_import_and_require_dual/node_modules/package/package.json new file mode 100644 index 00000000000000..f4adc7925ec0ef --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/node_modules/package/package.json @@ -0,0 +1,11 @@ +{ + "name": "package", + "version": "1.0.0", + "type": "module", + "exports": { + ".": { + "import": "./mod.mjs", + "require": "./require.cjs" + } + } +} \ No newline at end of file diff --git a/tests/specs/node/dynamic_import_and_require_dual/node_modules/package/require.cjs b/tests/specs/node/dynamic_import_and_require_dual/node_modules/package/require.cjs new file mode 100644 index 00000000000000..2b7ebd9693b702 --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/node_modules/package/require.cjs @@ -0,0 +1 @@ +module.exports.kind = "cjs"; diff --git a/tests/specs/node/dynamic_import_and_require_dual/node_modules/package/require.d.cts b/tests/specs/node/dynamic_import_and_require_dual/node_modules/package/require.d.cts new file mode 100644 index 00000000000000..604f6136b43315 --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/node_modules/package/require.d.cts @@ -0,0 +1 @@ +export const kind: "cjs"; diff --git a/tests/specs/node/dynamic_import_and_require_dual/package.json b/tests/specs/node/dynamic_import_and_require_dual/package.json new file mode 100644 index 00000000000000..ab1ab85da22618 --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/package.json @@ -0,0 +1,6 @@ +{ + "type": "commonjs", + "dependencies": { + "package": "*" + } +} diff --git a/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_import.mts b/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_import.mts new file mode 100644 index 00000000000000..86b06fb832705b --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_import.mts @@ -0,0 +1,6 @@ +import type { kind } from "package" with { + "resolution-mode": "import", +}; + +const test: typeof kind = "other"; +console.log(test); diff --git a/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_import.out b/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_import.out new file mode 100644 index 00000000000000..735cfe53aca14f --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_import.out @@ -0,0 +1,5 @@ +Check file:///[WILDLINE]/resolution_mode_import.mts +error: TS2322 [ERROR]: Type '"other"' is not assignable to type '"mjs"'. +const test: typeof kind = "other"; + ~~~~ + at file:///[WILDLINE]/resolution_mode_import.mts:5:7 diff --git a/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require.mts b/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require.mts new file mode 100644 index 00000000000000..1695f29adef18a --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require.mts @@ -0,0 +1,6 @@ +import type { kind } from "package" with { + "resolution-mode": "require", +}; + +const test: typeof kind = "other"; +console.log(test); diff --git a/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require.out b/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require.out new file mode 100644 index 00000000000000..32cdd86f0dd300 --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require.out @@ -0,0 +1,5 @@ +Check file:///[WILDLINE]/resolution_mode_require.mts +error: TS2322 [ERROR]: Type '"other"' is not assignable to type '"cjs"'. +const test: typeof kind = "other"; + ~~~~ + at file:///[WILDLINE]/resolution_mode_require.mts:5:7 diff --git a/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require_import_type.out b/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require_import_type.out new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require_import_type.ts b/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require_import_type.ts new file mode 100644 index 00000000000000..295bab0e9cdb66 --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require_import_type.ts @@ -0,0 +1,5 @@ +// deno-fmt-ignore-file +type Value = typeof import("package", { with: { 'resolution-mode': 'require' } }).kind; + +const value: Value = "value"; +console.log(value); \ No newline at end of file diff --git a/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require_jsdoc.js b/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require_jsdoc.js new file mode 100644 index 00000000000000..0d0040513f36d5 --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require_jsdoc.js @@ -0,0 +1,12 @@ +// @ts-check + +/** @import { kind } from "package" with { 'resolution-mode': 'require' } */ + +/** + * @param {typeof kind} myValue + */ +export function log(myValue) { + console.log(myValue); +} + +log("value"); diff --git a/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require_jsdoc.out b/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require_jsdoc.out new file mode 100644 index 00000000000000..924681fe8016be --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/resolution_mode_require_jsdoc.out @@ -0,0 +1,5 @@ +Check file:///[WILDLINE]/resolution_mode_require_jsdoc.js +error: TS2345 [ERROR]: Argument of type '"value"' is not assignable to parameter of type '"cjs"'. +log("value"); + ~~~~~~~ + at file:///[WILDLINE]/resolution_mode_require_jsdoc.js:12:5 diff --git a/tests/specs/node/dynamic_import_and_require_dual/run_cjs.out b/tests/specs/node/dynamic_import_and_require_dual/run_cjs.out new file mode 100644 index 00000000000000..d64c24da5d30c6 --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/run_cjs.out @@ -0,0 +1,2 @@ +esm +[Module: null prototype] { kind: "esm" } diff --git a/tests/specs/node/dynamic_import_and_require_dual/run_mts.out b/tests/specs/node/dynamic_import_and_require_dual/run_mts.out new file mode 100644 index 00000000000000..afd3f2e2777243 --- /dev/null +++ b/tests/specs/node/dynamic_import_and_require_dual/run_mts.out @@ -0,0 +1,3 @@ +esm +[Module: null prototype] { kind: "esm" } +{ kind: "cjs" } diff --git a/tests/specs/node/unstable_detect_cjs/no_pkg_json/__test__.jsonc b/tests/specs/node/unstable_detect_cjs/no_pkg_json/__test__.jsonc new file mode 100644 index 00000000000000..dde4f9a2c6b9a5 --- /dev/null +++ b/tests/specs/node/unstable_detect_cjs/no_pkg_json/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "run --check --quiet --allow-read=. main.ts", + "output": "main.out" +} diff --git a/tests/specs/node/unstable_detect_cjs/no_pkg_json/add.ts b/tests/specs/node/unstable_detect_cjs/no_pkg_json/add.ts new file mode 100644 index 00000000000000..3b399665dc81da --- /dev/null +++ b/tests/specs/node/unstable_detect_cjs/no_pkg_json/add.ts @@ -0,0 +1,3 @@ +export function add(a: number, b: number) { + return a + b; +} diff --git a/tests/specs/node/unstable_detect_cjs/no_pkg_json/deno.json b/tests/specs/node/unstable_detect_cjs/no_pkg_json/deno.json new file mode 100644 index 00000000000000..b786cd6aeb8948 --- /dev/null +++ b/tests/specs/node/unstable_detect_cjs/no_pkg_json/deno.json @@ -0,0 +1,3 @@ +{ + "unstable": ["detect-cjs"] +} diff --git a/tests/specs/node/unstable_detect_cjs/no_pkg_json/main.out b/tests/specs/node/unstable_detect_cjs/no_pkg_json/main.out new file mode 100644 index 00000000000000..00750edc07d641 --- /dev/null +++ b/tests/specs/node/unstable_detect_cjs/no_pkg_json/main.out @@ -0,0 +1 @@ +3 diff --git a/tests/specs/node/unstable_detect_cjs/no_pkg_json/main.ts b/tests/specs/node/unstable_detect_cjs/no_pkg_json/main.ts new file mode 100644 index 00000000000000..23ab21441bf61d --- /dev/null +++ b/tests/specs/node/unstable_detect_cjs/no_pkg_json/main.ts @@ -0,0 +1,3 @@ +import mod = require("./add.ts"); + +console.log(mod.add(1, 2)); diff --git a/tests/specs/node/unstable_detect_cjs/no_type_field/__test__.jsonc b/tests/specs/node/unstable_detect_cjs/no_type_field/__test__.jsonc new file mode 100644 index 00000000000000..9162484e8a5e57 --- /dev/null +++ b/tests/specs/node/unstable_detect_cjs/no_type_field/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "run --unstable-detect-cjs --check --quiet --allow-read=. main.ts", + "output": "main.out" +} diff --git a/tests/specs/node/unstable_detect_cjs/no_type_field/add.ts b/tests/specs/node/unstable_detect_cjs/no_type_field/add.ts new file mode 100644 index 00000000000000..3b399665dc81da --- /dev/null +++ b/tests/specs/node/unstable_detect_cjs/no_type_field/add.ts @@ -0,0 +1,3 @@ +export function add(a: number, b: number) { + return a + b; +} diff --git a/tests/specs/node/unstable_detect_cjs/no_type_field/main.out b/tests/specs/node/unstable_detect_cjs/no_type_field/main.out new file mode 100644 index 00000000000000..00750edc07d641 --- /dev/null +++ b/tests/specs/node/unstable_detect_cjs/no_type_field/main.out @@ -0,0 +1 @@ +3 diff --git a/tests/specs/node/unstable_detect_cjs/no_type_field/main.ts b/tests/specs/node/unstable_detect_cjs/no_type_field/main.ts new file mode 100644 index 00000000000000..23ab21441bf61d --- /dev/null +++ b/tests/specs/node/unstable_detect_cjs/no_type_field/main.ts @@ -0,0 +1,3 @@ +import mod = require("./add.ts"); + +console.log(mod.add(1, 2)); diff --git a/tests/specs/lint/no_slow_types_entrypoint/deno.non-package.json b/tests/specs/node/unstable_detect_cjs/no_type_field/package.json similarity index 100% rename from tests/specs/lint/no_slow_types_entrypoint/deno.non-package.json rename to tests/specs/node/unstable_detect_cjs/no_type_field/package.json diff --git a/tests/specs/node/unstable_detect_cjs/type_module/__test__.jsonc b/tests/specs/node/unstable_detect_cjs/type_module/__test__.jsonc new file mode 100644 index 00000000000000..f95a6fc8ec77d2 --- /dev/null +++ b/tests/specs/node/unstable_detect_cjs/type_module/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "run --unstable-detect-cjs --quiet --allow-read=. main.ts", + "output": "main.out", + "exitCode": 1 +} diff --git a/tests/specs/node/unstable_detect_cjs/type_module/add.ts b/tests/specs/node/unstable_detect_cjs/type_module/add.ts new file mode 100644 index 00000000000000..3b399665dc81da --- /dev/null +++ b/tests/specs/node/unstable_detect_cjs/type_module/add.ts @@ -0,0 +1,3 @@ +export function add(a: number, b: number) { + return a + b; +} diff --git a/tests/specs/node/unstable_detect_cjs/type_module/main.out b/tests/specs/node/unstable_detect_cjs/type_module/main.out new file mode 100644 index 00000000000000..6b9bcaa46b993c --- /dev/null +++ b/tests/specs/node/unstable_detect_cjs/type_module/main.out @@ -0,0 +1,4 @@ +error: Uncaught SyntaxError: Unexpected token '=' +import mod = require("./add.ts"); + ^ + at (file:///[WILDLINE]/main.ts:1:8) diff --git a/tests/specs/node/unstable_detect_cjs/type_module/main.ts b/tests/specs/node/unstable_detect_cjs/type_module/main.ts new file mode 100644 index 00000000000000..23ab21441bf61d --- /dev/null +++ b/tests/specs/node/unstable_detect_cjs/type_module/main.ts @@ -0,0 +1,3 @@ +import mod = require("./add.ts"); + +console.log(mod.add(1, 2)); diff --git a/tests/specs/node/unstable_detect_cjs/type_module/package.json b/tests/specs/node/unstable_detect_cjs/type_module/package.json new file mode 100644 index 00000000000000..3dbc1ca591c055 --- /dev/null +++ b/tests/specs/node/unstable_detect_cjs/type_module/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/tests/specs/npm/byonm/__test__.jsonc b/tests/specs/npm/byonm/__test__.jsonc index 011b4b6c820729..aa9dcb13517e4c 100644 --- a/tests/specs/npm/byonm/__test__.jsonc +++ b/tests/specs/npm/byonm/__test__.jsonc @@ -14,7 +14,7 @@ "output": "[WILDCARD]" }, { "args": "run -A invalid_sub_path.ts", - "output": "invalid_sub_path.out", + "output": "future_invalid_sub_path.out", "exitCode": 1 }] }, diff --git a/tests/specs/npm/byonm_npm_specifier_in_node_modules/__test__.jsonc b/tests/specs/npm/byonm_npm_specifier_in_node_modules/__test__.jsonc new file mode 100644 index 00000000000000..e2c5495387b104 --- /dev/null +++ b/tests/specs/npm/byonm_npm_specifier_in_node_modules/__test__.jsonc @@ -0,0 +1,18 @@ +{ + "tests": { + "matches": { + "args": "run -A matches.ts", + "output": "5\n" + }, + "not_matches": { + "args": "run -A not_matches.ts", + "output": "not_matches.out", + "exitCode": 1 + }, + "not_matches_aliased": { + "args": "run -A not_matches_aliased.ts", + "output": "not_matches_aliased.out", + "exitCode": 1 + } + } +} diff --git a/tests/specs/npm/byonm_npm_specifier_in_node_modules/matches.ts b/tests/specs/npm/byonm_npm_specifier_in_node_modules/matches.ts new file mode 100644 index 00000000000000..986e7baf4cd867 --- /dev/null +++ b/tests/specs/npm/byonm_npm_specifier_in_node_modules/matches.ts @@ -0,0 +1,3 @@ +import { add } from "npm:package@1"; + +console.log(add(2, 3)); diff --git a/tests/specs/npm/byonm_npm_specifier_in_node_modules/node_modules/aliased/index.js b/tests/specs/npm/byonm_npm_specifier_in_node_modules/node_modules/aliased/index.js new file mode 100644 index 00000000000000..efe826ba65ed2a --- /dev/null +++ b/tests/specs/npm/byonm_npm_specifier_in_node_modules/node_modules/aliased/index.js @@ -0,0 +1,3 @@ +module.exports.add = function(a, b) { + return a + b; +}; diff --git a/tests/specs/npm/byonm_npm_specifier_in_node_modules/node_modules/aliased/package.json b/tests/specs/npm/byonm_npm_specifier_in_node_modules/node_modules/aliased/package.json new file mode 100644 index 00000000000000..618960872f1f72 --- /dev/null +++ b/tests/specs/npm/byonm_npm_specifier_in_node_modules/node_modules/aliased/package.json @@ -0,0 +1,4 @@ +{ + "name": "not-same-name", + "version": "1.0.0" +} \ No newline at end of file diff --git a/tests/specs/npm/byonm_npm_specifier_in_node_modules/node_modules/package/index.js b/tests/specs/npm/byonm_npm_specifier_in_node_modules/node_modules/package/index.js new file mode 100644 index 00000000000000..efe826ba65ed2a --- /dev/null +++ b/tests/specs/npm/byonm_npm_specifier_in_node_modules/node_modules/package/index.js @@ -0,0 +1,3 @@ +module.exports.add = function(a, b) { + return a + b; +}; diff --git a/tests/specs/npm/byonm_npm_specifier_in_node_modules/node_modules/package/package.json b/tests/specs/npm/byonm_npm_specifier_in_node_modules/node_modules/package/package.json new file mode 100644 index 00000000000000..5723987e9f4279 --- /dev/null +++ b/tests/specs/npm/byonm_npm_specifier_in_node_modules/node_modules/package/package.json @@ -0,0 +1,4 @@ +{ + "name": "package", + "version": "1.0.0" +} \ No newline at end of file diff --git a/tests/specs/npm/byonm_npm_specifier_in_node_modules/not_matches.out b/tests/specs/npm/byonm_npm_specifier_in_node_modules/not_matches.out new file mode 100644 index 00000000000000..c549e13ff2b511 --- /dev/null +++ b/tests/specs/npm/byonm_npm_specifier_in_node_modules/not_matches.out @@ -0,0 +1,2 @@ +error: Could not find a matching package for 'npm:package@2' in the node_modules directory. Ensure you have all your JSR and npm dependencies listed in your deno.json or package.json, then run `deno install`. Alternatively, turn on auto-install by specifying `"nodeModulesDir": "auto"` in your deno.json file. + at file:///[WILDLINE] diff --git a/tests/specs/npm/byonm_npm_specifier_in_node_modules/not_matches.ts b/tests/specs/npm/byonm_npm_specifier_in_node_modules/not_matches.ts new file mode 100644 index 00000000000000..a337bd7d8654d6 --- /dev/null +++ b/tests/specs/npm/byonm_npm_specifier_in_node_modules/not_matches.ts @@ -0,0 +1,3 @@ +import { add } from "npm:package@2"; // won't match 2 + +console.log(add(2, 3)); diff --git a/tests/specs/npm/byonm_npm_specifier_in_node_modules/not_matches_aliased.out b/tests/specs/npm/byonm_npm_specifier_in_node_modules/not_matches_aliased.out new file mode 100644 index 00000000000000..93b52f64bce87c --- /dev/null +++ b/tests/specs/npm/byonm_npm_specifier_in_node_modules/not_matches_aliased.out @@ -0,0 +1,2 @@ +error: Could not find a matching package for 'npm:aliased@1' in the node_modules directory. Ensure you have all your JSR and npm dependencies listed in your deno.json or package.json, then run `deno install`. Alternatively, turn on auto-install by specifying `"nodeModulesDir": "auto"` in your deno.json file. + at file:///[WILDLINE] diff --git a/tests/specs/npm/byonm_npm_specifier_in_node_modules/not_matches_aliased.ts b/tests/specs/npm/byonm_npm_specifier_in_node_modules/not_matches_aliased.ts new file mode 100644 index 00000000000000..85fa11e31929f0 --- /dev/null +++ b/tests/specs/npm/byonm_npm_specifier_in_node_modules/not_matches_aliased.ts @@ -0,0 +1,3 @@ +import { add } from "npm:aliased@1"; + +console.log(add(2, 3)); diff --git a/tests/specs/npm/byonm_npm_specifier_in_node_modules/package.json b/tests/specs/npm/byonm_npm_specifier_in_node_modules/package.json new file mode 100644 index 00000000000000..2c63c0851048d8 --- /dev/null +++ b/tests/specs/npm/byonm_npm_specifier_in_node_modules/package.json @@ -0,0 +1,2 @@ +{ +} diff --git a/tests/specs/npm/cached_only/cached_only/main.out b/tests/specs/npm/cached_only/cached_only/main.out index 0d0cdad0947e4d..ea17167b147ea0 100644 --- a/tests/specs/npm/cached_only/cached_only/main.out +++ b/tests/specs/npm/cached_only/cached_only/main.out @@ -1,2 +1,3 @@ -error: Error getting response at http://localhost:4260/chalk for package "chalk": An npm specifier not found in cache: "chalk", --cached-only is specified. +error: Failed loading http://localhost:4260/chalk for package "chalk" + 0: npm package not found in cache: "chalk", --cached-only is specified. at file:///[WILDCARD]/main.ts:1:19 diff --git a/tests/specs/npm/check_all/__test__.jsonc b/tests/specs/npm/check_all/__test__.jsonc deleted file mode 100644 index e78f7e67d878ed..00000000000000 --- a/tests/specs/npm/check_all/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "check --all check_errors/main.ts", - "output": "check_errors/main_all.out", - "exitCode": 1 -} diff --git a/tests/specs/npm/check_all/check_errors/main_all.out b/tests/specs/npm/check_all/check_errors/main_all.out deleted file mode 100644 index c7797e43d2f763..00000000000000 --- a/tests/specs/npm/check_all/check_errors/main_all.out +++ /dev/null @@ -1,19 +0,0 @@ -Download http://localhost:4260/@denotest%2fcheck-error -Download http://localhost:4260/@denotest/check-error/1.0.0.tgz -Check file:///[WILDCARD]/check_errors/main.ts -error: TS2506 [ERROR]: 'Class1' is referenced directly or indirectly in its own base expression. -export class Class1 extends Class2 { - ~~~~~~ - at file:///[WILDCARD]/check-error/1.0.0/index.d.ts:2:14 - -TS2506 [ERROR]: 'Class2' is referenced directly or indirectly in its own base expression. -export class Class2 extends Class1 { - ~~~~~~ - at file:///[WILDCARD]/check-error/1.0.0/index.d.ts:5:14 - -TS2339 [ERROR]: Property 'Asdf' does not exist on type 'typeof import("file:///[WILDCARD]/@denotest/check-error/1.0.0/index.d.ts")'. -console.log(test.Asdf); // should error - ~~~~ - at file:///[WILDCARD]/check_errors/main.ts:3:18 - -Found 3 errors. diff --git a/tests/specs/npm/check_all/check_errors/main_local.out b/tests/specs/npm/check_all/check_errors/main_local.out deleted file mode 100644 index ac58a29c769a4b..00000000000000 --- a/tests/specs/npm/check_all/check_errors/main_local.out +++ /dev/null @@ -1,7 +0,0 @@ -Download http://localhost:4260/@denotest%2fcheck-error -Download http://localhost:4260/@denotest/check-error/1.0.0.tgz -Check file:///[WILDCARD]/check_errors/main.ts -error: TS2339 [ERROR]: Property 'Asdf' does not exist on type 'typeof import("file:///[WILDCARD]/@denotest/check-error/1.0.0/index.d.ts")'. -console.log(test.Asdf); // should error - ~~~~ - at file:///[WILDCARD]/npm/check_errors/main.ts:3:18 diff --git a/tests/specs/npm/check_all_local/__test__.jsonc b/tests/specs/npm/check_all_local/__test__.jsonc new file mode 100644 index 00000000000000..aaa0939b42655b --- /dev/null +++ b/tests/specs/npm/check_all_local/__test__.jsonc @@ -0,0 +1,14 @@ +{ + "tests": { + "all": { + "args": "check --all main.ts", + "output": "main_all.out", + "exitCode": 1 + }, + "local": { + "args": "check main.ts", + "output": "main_local.out", + "exitCode": 1 + } + } +} diff --git a/tests/specs/npm/check_all/check_errors/main.ts b/tests/specs/npm/check_all_local/main.ts similarity index 100% rename from tests/specs/npm/check_all/check_errors/main.ts rename to tests/specs/npm/check_all_local/main.ts diff --git a/tests/specs/npm/check_all_local/main_all.out b/tests/specs/npm/check_all_local/main_all.out new file mode 100644 index 00000000000000..a418396ee5bf2c --- /dev/null +++ b/tests/specs/npm/check_all_local/main_all.out @@ -0,0 +1,19 @@ +Download http://localhost:4260/@denotest%2fcheck-error +Download http://localhost:4260/@denotest/check-error/1.0.0.tgz +Check file:///[WILDCARD]/main.ts +error: TS2506 [ERROR]: 'Class1' is referenced directly or indirectly in its own base expression. +export class Class1 extends Class2 { + ~~~~~~ + at file:///[WILDCARD]/1.0.0/index.d.ts:2:14 + +TS2506 [ERROR]: 'Class2' is referenced directly or indirectly in its own base expression. +export class Class2 extends Class1 { + ~~~~~~ + at file:///[WILDCARD]/1.0.0/index.d.ts:5:14 + +TS2339 [ERROR]: Property 'Asdf' does not exist on type 'typeof import("file:///[WILDCARD]/@denotest/check-error/1.0.0/index.d.ts")'. +console.log(test.Asdf); // should error + ~~~~ + at file:///[WILDCARD]/main.ts:3:18 + +Found 3 errors. diff --git a/tests/specs/npm/check_all_local/main_local.out b/tests/specs/npm/check_all_local/main_local.out new file mode 100644 index 00000000000000..24b183b7adfc6c --- /dev/null +++ b/tests/specs/npm/check_all_local/main_local.out @@ -0,0 +1,7 @@ +Download http://localhost:4260/@denotest%2fcheck-error +Download http://localhost:4260/@denotest/check-error/1.0.0.tgz +Check file:///[WILDCARD]/main.ts +error: TS2339 [ERROR]: Property 'Asdf' does not exist on type 'typeof import("file:///[WILDCARD]/@denotest/check-error/1.0.0/index.d.ts")'. +console.log(test.Asdf); // should error + ~~~~ + at file:///[WILDCARD]/main.ts:3:18 diff --git a/tests/specs/npm/check_local/__test__.jsonc b/tests/specs/npm/check_local/__test__.jsonc deleted file mode 100644 index 2cf3ae5ef0881e..00000000000000 --- a/tests/specs/npm/check_local/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "check check_errors/main.ts", - "output": "check_errors/main_local.out", - "exitCode": 1 -} diff --git a/tests/specs/npm/check_local/check_errors/main.ts b/tests/specs/npm/check_local/check_errors/main.ts deleted file mode 100644 index 4b868419563494..00000000000000 --- a/tests/specs/npm/check_local/check_errors/main.ts +++ /dev/null @@ -1,3 +0,0 @@ -import * as test from "npm:@denotest/check-error"; - -console.log(test.Asdf); // should error diff --git a/tests/specs/npm/check_local/check_errors/main_all.out b/tests/specs/npm/check_local/check_errors/main_all.out deleted file mode 100644 index c7797e43d2f763..00000000000000 --- a/tests/specs/npm/check_local/check_errors/main_all.out +++ /dev/null @@ -1,19 +0,0 @@ -Download http://localhost:4260/@denotest%2fcheck-error -Download http://localhost:4260/@denotest/check-error/1.0.0.tgz -Check file:///[WILDCARD]/check_errors/main.ts -error: TS2506 [ERROR]: 'Class1' is referenced directly or indirectly in its own base expression. -export class Class1 extends Class2 { - ~~~~~~ - at file:///[WILDCARD]/check-error/1.0.0/index.d.ts:2:14 - -TS2506 [ERROR]: 'Class2' is referenced directly or indirectly in its own base expression. -export class Class2 extends Class1 { - ~~~~~~ - at file:///[WILDCARD]/check-error/1.0.0/index.d.ts:5:14 - -TS2339 [ERROR]: Property 'Asdf' does not exist on type 'typeof import("file:///[WILDCARD]/@denotest/check-error/1.0.0/index.d.ts")'. -console.log(test.Asdf); // should error - ~~~~ - at file:///[WILDCARD]/check_errors/main.ts:3:18 - -Found 3 errors. diff --git a/tests/specs/npm/check_local/check_errors/main_local.out b/tests/specs/npm/check_local/check_errors/main_local.out deleted file mode 100644 index 1eb8eef9fe7430..00000000000000 --- a/tests/specs/npm/check_local/check_errors/main_local.out +++ /dev/null @@ -1,7 +0,0 @@ -Download http://localhost:4260/@denotest%2fcheck-error -Download http://localhost:4260/@denotest/check-error/1.0.0.tgz -Check file:///[WILDCARD]/check_errors/main.ts -error: TS2339 [ERROR]: Property 'Asdf' does not exist on type 'typeof import("file:///[WILDCARD]/@denotest/check-error/1.0.0/index.d.ts")'. -console.log(test.Asdf); // should error - ~~~~ - at file:///[WILDCARD]/check_errors/main.ts:3:18 diff --git a/tests/specs/npm/cjs_with_deps/__test__.jsonc b/tests/specs/npm/cjs_with_deps/__test__.jsonc index e79fda5c77b66d..7441b5509f20ac 100644 --- a/tests/specs/npm/cjs_with_deps/__test__.jsonc +++ b/tests/specs/npm/cjs_with_deps/__test__.jsonc @@ -1,4 +1,37 @@ { - "args": "run --allow-read --allow-env cjs_with_deps/main.js", - "output": "cjs_with_deps/main.out" + "tempDir": true, + "tests": { + "cjs_with_deps": { + "args": "run --allow-read --allow-env main.js", + "output": "main.out" + }, + "cjs_with_deps_node_modules": { + "args": "run --allow-read --allow-env --node-modules-dir=auto main.js", + "output": "main_node_modules.out" + }, + "cjs_with_deps_info": { + "steps": [ + { + "args": "cache main.js", + "output": "[WILDCARD]" + }, + { + "args": "info main.js", + "output": "main_info.out" + } + ] + }, + "cjs_with_deps_info_json": { + "steps": [ + { + "args": "cache main.js", + "output": "[WILDCARD]" + }, + { + "args": "info --json main.js", + "output": "main_info_json.out" + } + ] + } + } } diff --git a/tests/specs/npm/cjs_with_deps/cjs_with_deps/main_info.out b/tests/specs/npm/cjs_with_deps/cjs_with_deps/main_info.out deleted file mode 100644 index 8e37c88eb00f0c..00000000000000 --- a/tests/specs/npm/cjs_with_deps/cjs_with_deps/main_info.out +++ /dev/null @@ -1,22 +0,0 @@ -local: [WILDCARD]main.js -type: JavaScript -dependencies: 14 unique -size: [WILDCARD] - -file:///[WILDCARD]/cjs_with_deps/main.js ([WILDCARD]) -├─┬ npm:/chalk@4.1.2 ([WILDCARD]) -│ ├─┬ npm:/ansi-styles@4.3.0 ([WILDCARD]) -│ │ └─┬ npm:/color-convert@2.0.1 ([WILDCARD]) -│ │ └── npm:/color-name@1.1.4 ([WILDCARD]) -│ └─┬ npm:/supports-color@7.2.0 ([WILDCARD]) -│ └── npm:/has-flag@4.0.0 ([WILDCARD]) -└─┬ npm:/chai@4.3.6 ([WILDCARD]) - ├── npm:/assertion-error@1.1.0 ([WILDCARD]) - ├── npm:/check-error@1.0.2 ([WILDCARD]) - ├─┬ npm:/deep-eql@3.0.1 ([WILDCARD]) - │ └── npm:/type-detect@4.0.8 ([WILDCARD]) - ├── npm:/get-func-name@2.0.0 ([WILDCARD]) - ├─┬ npm:/loupe@2.3.4 ([WILDCARD]) - │ └── npm:/get-func-name@2.0.0 ([WILDCARD]) - ├── npm:/pathval@1.1.1 ([WILDCARD]) - └── npm:/type-detect@4.0.8 ([WILDCARD]) diff --git a/tests/specs/npm/cjs_with_deps/cjs_with_deps/main_info_json.out b/tests/specs/npm/cjs_with_deps/cjs_with_deps/main_info_json.out deleted file mode 100644 index 137b9f8ce56c3d..00000000000000 --- a/tests/specs/npm/cjs_with_deps/cjs_with_deps/main_info_json.out +++ /dev/null @@ -1,148 +0,0 @@ -{ - "version": 1, - "roots": [ - "file://[WILDCARD]/main.js" - ], - "modules": [ - { - "kind": "esm", - "dependencies": [ - { - "specifier": "npm:chalk@4", - "code": { - "specifier": "npm:chalk@4", - "span": { - "start": { - "line": 0, - "character": 18 - }, - "end": { - "line": 0, - "character": 31 - } - } - }, - "npmPackage": "chalk@4.1.2" - }, - { - "specifier": "npm:chai@4.3", - "code": { - "specifier": "npm:chai@4.3", - "span": { - "start": { - "line": 1, - "character": 23 - }, - "end": { - "line": 1, - "character": 37 - } - } - }, - "npmPackage": "chai@4.3.6" - } - ], - "local": "[WILDCARD]main.js", - "size": 325, - "mediaType": "JavaScript", - "specifier": "[WILDCARD]/main.js" - } - ], - "redirects": { - "npm:chai@4.3": "npm:/chai@4.3.6", - "npm:chalk@4": "npm:/chalk@4.1.2" - }, - "npmPackages": { - "ansi-styles@4.3.0": { - "name": "ansi-styles", - "version": "4.3.0", - "dependencies": [ - "color-convert@2.0.1" - ] - }, - "assertion-error@1.1.0": { - "name": "assertion-error", - "version": "1.1.0", - "dependencies": [] - }, - "chai@4.3.6": { - "name": "chai", - "version": "4.3.6", - "dependencies": [ - "assertion-error@1.1.0", - "check-error@1.0.2", - "deep-eql@3.0.1", - "get-func-name@2.0.0", - "loupe@2.3.4", - "pathval@1.1.1", - "type-detect@4.0.8" - ] - }, - "chalk@4.1.2": { - "name": "chalk", - "version": "4.1.2", - "dependencies": [ - "ansi-styles@4.3.0", - "supports-color@7.2.0" - ] - }, - "check-error@1.0.2": { - "name": "check-error", - "version": "1.0.2", - "dependencies": [] - }, - "color-convert@2.0.1": { - "name": "color-convert", - "version": "2.0.1", - "dependencies": [ - "color-name@1.1.4" - ] - }, - "color-name@1.1.4": { - "name": "color-name", - "version": "1.1.4", - "dependencies": [] - }, - "deep-eql@3.0.1": { - "name": "deep-eql", - "version": "3.0.1", - "dependencies": [ - "type-detect@4.0.8" - ] - }, - "get-func-name@2.0.0": { - "name": "get-func-name", - "version": "2.0.0", - "dependencies": [] - }, - "has-flag@4.0.0": { - "name": "has-flag", - "version": "4.0.0", - "dependencies": [] - }, - "loupe@2.3.4": { - "name": "loupe", - "version": "2.3.4", - "dependencies": [ - "get-func-name@2.0.0" - ] - }, - "pathval@1.1.1": { - "name": "pathval", - "version": "1.1.1", - "dependencies": [] - }, - "supports-color@7.2.0": { - "name": "supports-color", - "version": "7.2.0", - "dependencies": [ - "has-flag@4.0.0" - ] - }, - "type-detect@4.0.8": { - "name": "type-detect", - "version": "4.0.8", - "dependencies": [] - } - } -} diff --git a/tests/specs/npm/cjs_with_deps/cjs_with_deps/main.js b/tests/specs/npm/cjs_with_deps/main.js similarity index 100% rename from tests/specs/npm/cjs_with_deps/cjs_with_deps/main.js rename to tests/specs/npm/cjs_with_deps/main.js diff --git a/tests/specs/npm/cjs_with_deps/cjs_with_deps/main.out b/tests/specs/npm/cjs_with_deps/main.out similarity index 100% rename from tests/specs/npm/cjs_with_deps/cjs_with_deps/main.out rename to tests/specs/npm/cjs_with_deps/main.out diff --git a/tests/specs/npm/cjs_with_deps/main_info.out b/tests/specs/npm/cjs_with_deps/main_info.out new file mode 100644 index 00000000000000..f1271ec1f11dfd --- /dev/null +++ b/tests/specs/npm/cjs_with_deps/main_info.out @@ -0,0 +1,22 @@ +local: [WILDCARD]main.js +type: JavaScript +dependencies: 14 unique +size: [WILDCARD] + +file:///[WILDCARD]/main.js ([WILDCARD]) +├─┬ npm:/chalk@4.1.2 ([WILDCARD]) +│ ├─┬ npm:/ansi-styles@4.3.0 ([WILDCARD]) +│ │ └─┬ npm:/color-convert@2.0.1 ([WILDCARD]) +│ │ └── npm:/color-name@1.1.4 ([WILDCARD]) +│ └─┬ npm:/supports-color@7.2.0 ([WILDCARD]) +│ └── npm:/has-flag@4.0.0 ([WILDCARD]) +└─┬ npm:/chai@4.3.6 ([WILDCARD]) + ├── npm:/assertion-error@1.1.0 ([WILDCARD]) + ├── npm:/check-error@1.0.2 ([WILDCARD]) + ├─┬ npm:/deep-eql@3.0.1 ([WILDCARD]) + │ └── npm:/type-detect@4.0.8 ([WILDCARD]) + ├── npm:/get-func-name@2.0.0 ([WILDCARD]) + ├─┬ npm:/loupe@2.3.4 ([WILDCARD]) + │ └── npm:/get-func-name@2.0.0 ([WILDCARD]) + ├── npm:/pathval@1.1.1 ([WILDCARD]) + └── npm:/type-detect@4.0.8 ([WILDCARD]) diff --git a/tests/specs/npm/cjs_with_deps/main_info_json.out b/tests/specs/npm/cjs_with_deps/main_info_json.out new file mode 100644 index 00000000000000..393e4a221a0929 --- /dev/null +++ b/tests/specs/npm/cjs_with_deps/main_info_json.out @@ -0,0 +1,172 @@ +{ + "version": 1, + "roots": [ + "file://[WILDCARD]/main.js" + ], + "modules": [ + { + "kind": "esm", + "dependencies": [ + { + "specifier": "npm:chalk@4", + "code": { + "specifier": "npm:chalk@4", + "span": { + "start": { + "line": 0, + "character": 18 + }, + "end": { + "line": 0, + "character": 31 + } + } + }, + "npmPackage": "chalk@4.1.2" + }, + { + "specifier": "npm:chai@4.3", + "code": { + "specifier": "npm:chai@4.3", + "span": { + "start": { + "line": 1, + "character": 23 + }, + "end": { + "line": 1, + "character": 37 + } + } + }, + "npmPackage": "chai@4.3.6" + } + ], + "local": "[WILDCARD]main.js", + "size": 325, + "mediaType": "JavaScript", + "specifier": "file:///[WILDCARD]/main.js" + }, + { + "kind": "npm", + "specifier": "npm:/chai@4.3.6", + "npmPackage": "chai@4.3.6" + }, + { + "kind": "npm", + "specifier": "npm:/chalk@4.1.2", + "npmPackage": "chalk@4.1.2" + } + ], + "redirects": { + "npm:chai@4.3": "npm:/chai@4.3.6", + "npm:chalk@4": "npm:/chalk@4.1.2" + }, + "npmPackages": { + "ansi-styles@4.3.0": { + "name": "ansi-styles", + "version": "4.3.0", + "dependencies": [ + "color-convert@2.0.1" + ], + "registryUrl": "http://localhost:4260/" + }, + "assertion-error@1.1.0": { + "name": "assertion-error", + "version": "1.1.0", + "dependencies": [], + "registryUrl": "http://localhost:4260/" + }, + "chai@4.3.6": { + "name": "chai", + "version": "4.3.6", + "dependencies": [ + "assertion-error@1.1.0", + "check-error@1.0.2", + "deep-eql@3.0.1", + "get-func-name@2.0.0", + "loupe@2.3.4", + "pathval@1.1.1", + "type-detect@4.0.8" + ], + "registryUrl": "http://localhost:4260/" + }, + "chalk@4.1.2": { + "name": "chalk", + "version": "4.1.2", + "dependencies": [ + "ansi-styles@4.3.0", + "supports-color@7.2.0" + ], + "registryUrl": "http://localhost:4260/" + }, + "check-error@1.0.2": { + "name": "check-error", + "version": "1.0.2", + "dependencies": [], + "registryUrl": "http://localhost:4260/" + }, + "color-convert@2.0.1": { + "name": "color-convert", + "version": "2.0.1", + "dependencies": [ + "color-name@1.1.4" + ], + "registryUrl": "http://localhost:4260/" + }, + "color-name@1.1.4": { + "name": "color-name", + "version": "1.1.4", + "dependencies": [], + "registryUrl": "http://localhost:4260/" + }, + "deep-eql@3.0.1": { + "name": "deep-eql", + "version": "3.0.1", + "dependencies": [ + "type-detect@4.0.8" + ], + "registryUrl": "http://localhost:4260/" + }, + "get-func-name@2.0.0": { + "name": "get-func-name", + "version": "2.0.0", + "dependencies": [], + "registryUrl": "http://localhost:4260/" + }, + "has-flag@4.0.0": { + "name": "has-flag", + "version": "4.0.0", + "dependencies": [], + "registryUrl": "http://localhost:4260/" + }, + "loupe@2.3.4": { + "name": "loupe", + "version": "2.3.4", + "dependencies": [ + "get-func-name@2.0.0" + ], + "registryUrl": "http://localhost:4260/" + }, + "pathval@1.1.1": { + "name": "pathval", + "version": "1.1.1", + "dependencies": [], + "registryUrl": "http://localhost:4260/" + }, + "supports-color@7.2.0": { + "name": "supports-color", + "version": "7.2.0", + "dependencies": [ + "has-flag@4.0.0" + ], + "registryUrl": "http://localhost:4260/" + }, + "type-detect@4.0.8": { + "name": "type-detect", + "version": "4.0.8", + "dependencies": [], + "registryUrl": "http://localhost:4260/" + } + } +} diff --git a/tests/specs/npm/cjs_with_deps/cjs_with_deps/main_node_modules.out b/tests/specs/npm/cjs_with_deps/main_node_modules.out similarity index 100% rename from tests/specs/npm/cjs_with_deps/cjs_with_deps/main_node_modules.out rename to tests/specs/npm/cjs_with_deps/main_node_modules.out diff --git a/tests/specs/npm/directory_import/__test__.jsonc b/tests/specs/npm/directory_import/__test__.jsonc new file mode 100644 index 00000000000000..b1aea547ba185d --- /dev/null +++ b/tests/specs/npm/directory_import/__test__.jsonc @@ -0,0 +1,14 @@ +{ + "tests": { + "directory_import": { + "args": "run folder_index_js.ts", + "output": "folder_index_js.out", + "exitCode": 1 + }, + "directory_import_folder_no_index": { + "args": "run folder_no_index.ts", + "output": "folder_no_index.out", + "exitCode": 1 + } + } +} diff --git a/tests/specs/npm/directory_import_folder_index_js/directory_import/folder_index_js.out b/tests/specs/npm/directory_import/folder_index_js.out similarity index 100% rename from tests/specs/npm/directory_import_folder_index_js/directory_import/folder_index_js.out rename to tests/specs/npm/directory_import/folder_index_js.out diff --git a/tests/specs/npm/directory_import_folder_index_js/directory_import/folder_index_js.ts b/tests/specs/npm/directory_import/folder_index_js.ts similarity index 100% rename from tests/specs/npm/directory_import_folder_index_js/directory_import/folder_index_js.ts rename to tests/specs/npm/directory_import/folder_index_js.ts diff --git a/tests/specs/npm/directory_import_folder_index_js/directory_import/folder_no_index.out b/tests/specs/npm/directory_import/folder_no_index.out similarity index 100% rename from tests/specs/npm/directory_import_folder_index_js/directory_import/folder_no_index.out rename to tests/specs/npm/directory_import/folder_no_index.out diff --git a/tests/specs/npm/directory_import_folder_index_js/directory_import/folder_no_index.ts b/tests/specs/npm/directory_import/folder_no_index.ts similarity index 100% rename from tests/specs/npm/directory_import_folder_index_js/directory_import/folder_no_index.ts rename to tests/specs/npm/directory_import/folder_no_index.ts diff --git a/tests/specs/npm/directory_import_folder_index_js/__test__.jsonc b/tests/specs/npm/directory_import_folder_index_js/__test__.jsonc deleted file mode 100644 index b3f7b64cbd9558..00000000000000 --- a/tests/specs/npm/directory_import_folder_index_js/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "run directory_import/folder_index_js.ts", - "output": "directory_import/folder_index_js.out", - "exitCode": 1 -} diff --git a/tests/specs/npm/directory_import_folder_no_index/__test__.jsonc b/tests/specs/npm/directory_import_folder_no_index/__test__.jsonc deleted file mode 100644 index e0bb868ad81c85..00000000000000 --- a/tests/specs/npm/directory_import_folder_no_index/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "run directory_import/folder_no_index.ts", - "output": "directory_import/folder_no_index.out", - "exitCode": 1 -} diff --git a/tests/specs/npm/directory_import_folder_no_index/directory_import/folder_index_js.out b/tests/specs/npm/directory_import_folder_no_index/directory_import/folder_index_js.out deleted file mode 100644 index c1eb2a4801acfd..00000000000000 --- a/tests/specs/npm/directory_import_folder_no_index/directory_import/folder_index_js.out +++ /dev/null @@ -1,7 +0,0 @@ -Download http://localhost:4260/@denotest%2fsub-folders -Download http://localhost:4260/@denotest/sub-folders/1.0.0.tgz -error: Directory import [WILDCARD]folder_index_js is not supported resolving import from file:///[WILDCARD]/directory_import/folder_index_js.ts -Did you mean to import index.js within the directory? - -Caused by: - [WILDCARD] diff --git a/tests/specs/npm/directory_import_folder_no_index/directory_import/folder_index_js.ts b/tests/specs/npm/directory_import_folder_no_index/directory_import/folder_index_js.ts deleted file mode 100644 index b0d51fcd97d9dc..00000000000000 --- a/tests/specs/npm/directory_import_folder_no_index/directory_import/folder_index_js.ts +++ /dev/null @@ -1,2 +0,0 @@ -import test from "npm:@denotest/sub-folders/folder_index_js"; -console.log(test); diff --git a/tests/specs/npm/directory_import_folder_no_index/directory_import/folder_no_index.out b/tests/specs/npm/directory_import_folder_no_index/directory_import/folder_no_index.out deleted file mode 100644 index c19c4bcaa4b688..00000000000000 --- a/tests/specs/npm/directory_import_folder_no_index/directory_import/folder_no_index.out +++ /dev/null @@ -1,6 +0,0 @@ -Download http://localhost:4260/@denotest%2fsub-folders -Download http://localhost:4260/@denotest/sub-folders/1.0.0.tgz -error: Directory import [WILDCARD]folder_no_index is not supported resolving import from file:///[WILDCARD]/folder_no_index.ts - -Caused by: - [WILDCARD] diff --git a/tests/specs/npm/directory_import_folder_no_index/directory_import/folder_no_index.ts b/tests/specs/npm/directory_import_folder_no_index/directory_import/folder_no_index.ts deleted file mode 100644 index 4c5fb7ec09e723..00000000000000 --- a/tests/specs/npm/directory_import_folder_no_index/directory_import/folder_no_index.ts +++ /dev/null @@ -1,2 +0,0 @@ -import test from "npm:@denotest/sub-folders/folder_no_index"; -console.log(test); diff --git a/tests/specs/npm/error_version_after_subpath/error_version_after_subpath/main.out b/tests/specs/npm/error_version_after_subpath/error_version_after_subpath/main.out index 4e5f03e23c067f..1804936f0f0bf6 100644 --- a/tests/specs/npm/error_version_after_subpath/error_version_after_subpath/main.out +++ b/tests/specs/npm/error_version_after_subpath/error_version_after_subpath/main.out @@ -1,2 +1,2 @@ -error: Invalid package specifier 'npm:react-dom/server@18.2.0'. Did you mean to write 'npm:react-dom@18.2.0/server'? +error: Invalid package specifier 'npm:react-dom/server@18.2.0'. Did you mean to write 'npm:react-dom@18.2.0/server'? If not, add a version requirement to the specifier. at [WILDCARD]/error_version_after_subpath/main.js:1:8 diff --git a/tests/specs/npm/imports_package_json/__test__.jsonc b/tests/specs/npm/imports_package_json/__test__.jsonc index 35eabd4e153032..068c62d8f59397 100644 --- a/tests/specs/npm/imports_package_json/__test__.jsonc +++ b/tests/specs/npm/imports_package_json/__test__.jsonc @@ -1,4 +1,18 @@ { - "args": "run --no-lock --node-modules-dir=none imports_package_json/main.js", - "output": "imports_package_json/main.out" + "tests": { + "imports_package_json": { + "args": "run --no-lock --node-modules-dir=none main.js", + "output": "main.out" + }, + "imports_package_json_import_not_defined": { + "args": "run --no-lock --node-modules-dir=none import_not_defined.js", + "output": "import_not_defined.out", + "exitCode": 1 + }, + "imports_package_json_sub_path_import_not_defined": { + "args": "run --no-lock --node-modules-dir=none sub_path_import_not_defined.js", + "output": "sub_path_import_not_defined.out", + "exitCode": 1 + } + } } diff --git a/tests/specs/npm/imports_package_json/imports_package_json/import_not_defined.js b/tests/specs/npm/imports_package_json/import_not_defined.js similarity index 100% rename from tests/specs/npm/imports_package_json/imports_package_json/import_not_defined.js rename to tests/specs/npm/imports_package_json/import_not_defined.js diff --git a/tests/specs/npm/imports_package_json/imports_package_json/import_not_defined.out b/tests/specs/npm/imports_package_json/import_not_defined.out similarity index 100% rename from tests/specs/npm/imports_package_json/imports_package_json/import_not_defined.out rename to tests/specs/npm/imports_package_json/import_not_defined.out diff --git a/tests/specs/npm/imports_package_json/imports_package_json/main.js b/tests/specs/npm/imports_package_json/main.js similarity index 100% rename from tests/specs/npm/imports_package_json/imports_package_json/main.js rename to tests/specs/npm/imports_package_json/main.js diff --git a/tests/specs/npm/imports_package_json/imports_package_json/main.out b/tests/specs/npm/imports_package_json/main.out similarity index 100% rename from tests/specs/npm/imports_package_json/imports_package_json/main.out rename to tests/specs/npm/imports_package_json/main.out diff --git a/tests/specs/npm/imports_package_json/imports_package_json/package.json b/tests/specs/npm/imports_package_json/package.json similarity index 100% rename from tests/specs/npm/imports_package_json/imports_package_json/package.json rename to tests/specs/npm/imports_package_json/package.json diff --git a/tests/specs/npm/imports_package_json/imports_package_json/sub_path_import_not_defined.js b/tests/specs/npm/imports_package_json/sub_path_import_not_defined.js similarity index 100% rename from tests/specs/npm/imports_package_json/imports_package_json/sub_path_import_not_defined.js rename to tests/specs/npm/imports_package_json/sub_path_import_not_defined.js diff --git a/tests/specs/npm/imports_package_json/imports_package_json/sub_path_import_not_defined.out b/tests/specs/npm/imports_package_json/sub_path_import_not_defined.out similarity index 100% rename from tests/specs/npm/imports_package_json/imports_package_json/sub_path_import_not_defined.out rename to tests/specs/npm/imports_package_json/sub_path_import_not_defined.out diff --git a/tests/specs/npm/imports_package_json_import_not_defined/__test__.jsonc b/tests/specs/npm/imports_package_json_import_not_defined/__test__.jsonc deleted file mode 100644 index 983ec312639a2d..00000000000000 --- a/tests/specs/npm/imports_package_json_import_not_defined/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "run --no-lock --node-modules-dir=none imports_package_json/import_not_defined.js", - "output": "imports_package_json/import_not_defined.out", - "exitCode": 1 -} diff --git a/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/import_not_defined.js b/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/import_not_defined.js deleted file mode 100644 index dc4d2df165e5d7..00000000000000 --- a/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/import_not_defined.js +++ /dev/null @@ -1,3 +0,0 @@ -import data from "@denotest/imports-package-json/import-not-defined"; - -console.log(data); diff --git a/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/import_not_defined.out b/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/import_not_defined.out deleted file mode 100644 index abfa414030877c..00000000000000 --- a/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/import_not_defined.out +++ /dev/null @@ -1,3 +0,0 @@ -Download http://localhost:4260/@denotest%2fimports-package-json -Download http://localhost:4260/@denotest/imports-package-json/1.0.0.tgz -error: [ERR_PACKAGE_IMPORT_NOT_DEFINED] Package import specifier "#not-defined" is not defined in package [WILDCARD]package.json imported from '[WILDCARD]import_not_defined.js' diff --git a/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/main.js b/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/main.js deleted file mode 100644 index 53090dd948b9af..00000000000000 --- a/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/main.js +++ /dev/null @@ -1,7 +0,0 @@ -import data from "@denotest/imports-package-json"; - -console.log(data.hi); -console.log(data.bye); -console.log(typeof data.fs.readFile); -console.log(typeof data.path.join); -console.log(typeof data.fs2.writeFile); diff --git a/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/main.out b/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/main.out deleted file mode 100644 index 70d787b251293f..00000000000000 --- a/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/main.out +++ /dev/null @@ -1,7 +0,0 @@ -Download http://localhost:4260/@denotest%2fimports-package-json -Download http://localhost:4260/@denotest/imports-package-json/1.0.0.tgz -hi -bye -function -function -function diff --git a/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/package.json b/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/package.json deleted file mode 100644 index cb6a08d1a51c02..00000000000000 --- a/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "my-test", - "dependencies": { - "@denotest/imports-package-json": "1.0.0" - } -} diff --git a/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.js b/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.js deleted file mode 100644 index f1097aa0646450..00000000000000 --- a/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.js +++ /dev/null @@ -1,3 +0,0 @@ -import data from "@denotest/imports-package-json/sub-path-import-not-defined"; - -console.log(data); diff --git a/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.out b/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.out deleted file mode 100644 index 95524202ae2f4a..00000000000000 --- a/tests/specs/npm/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.out +++ /dev/null @@ -1,3 +0,0 @@ -Download http://localhost:4260/@denotest%2fimports-package-json -Download http://localhost:4260/@denotest/imports-package-json/1.0.0.tgz -error: [ERR_PACKAGE_IMPORT_NOT_DEFINED] Package import specifier "#hi" is not defined in package [WILDCARD]sub_path[WILDCARD]package.json imported from '[WILDCARD]import_not_defined.js' diff --git a/tests/specs/npm/imports_package_json_sub_path_import_not_defined/__test__.jsonc b/tests/specs/npm/imports_package_json_sub_path_import_not_defined/__test__.jsonc deleted file mode 100644 index cd9b260f48f77a..00000000000000 --- a/tests/specs/npm/imports_package_json_sub_path_import_not_defined/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "run --no-lock --node-modules-dir=none imports_package_json/sub_path_import_not_defined.js", - "output": "imports_package_json/sub_path_import_not_defined.out", - "exitCode": 1 -} diff --git a/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.js b/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.js deleted file mode 100644 index dc4d2df165e5d7..00000000000000 --- a/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.js +++ /dev/null @@ -1,3 +0,0 @@ -import data from "@denotest/imports-package-json/import-not-defined"; - -console.log(data); diff --git a/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.out b/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.out deleted file mode 100644 index abfa414030877c..00000000000000 --- a/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.out +++ /dev/null @@ -1,3 +0,0 @@ -Download http://localhost:4260/@denotest%2fimports-package-json -Download http://localhost:4260/@denotest/imports-package-json/1.0.0.tgz -error: [ERR_PACKAGE_IMPORT_NOT_DEFINED] Package import specifier "#not-defined" is not defined in package [WILDCARD]package.json imported from '[WILDCARD]import_not_defined.js' diff --git a/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/main.js b/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/main.js deleted file mode 100644 index 53090dd948b9af..00000000000000 --- a/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/main.js +++ /dev/null @@ -1,7 +0,0 @@ -import data from "@denotest/imports-package-json"; - -console.log(data.hi); -console.log(data.bye); -console.log(typeof data.fs.readFile); -console.log(typeof data.path.join); -console.log(typeof data.fs2.writeFile); diff --git a/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/main.out b/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/main.out deleted file mode 100644 index 70d787b251293f..00000000000000 --- a/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/main.out +++ /dev/null @@ -1,7 +0,0 @@ -Download http://localhost:4260/@denotest%2fimports-package-json -Download http://localhost:4260/@denotest/imports-package-json/1.0.0.tgz -hi -bye -function -function -function diff --git a/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/package.json b/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/package.json deleted file mode 100644 index cb6a08d1a51c02..00000000000000 --- a/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "my-test", - "dependencies": { - "@denotest/imports-package-json": "1.0.0" - } -} diff --git a/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.js b/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.js deleted file mode 100644 index f1097aa0646450..00000000000000 --- a/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.js +++ /dev/null @@ -1,3 +0,0 @@ -import data from "@denotest/imports-package-json/sub-path-import-not-defined"; - -console.log(data); diff --git a/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.out b/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.out deleted file mode 100644 index 95524202ae2f4a..00000000000000 --- a/tests/specs/npm/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.out +++ /dev/null @@ -1,3 +0,0 @@ -Download http://localhost:4260/@denotest%2fimports-package-json -Download http://localhost:4260/@denotest/imports-package-json/1.0.0.tgz -error: [ERR_PACKAGE_IMPORT_NOT_DEFINED] Package import specifier "#hi" is not defined in package [WILDCARD]sub_path[WILDCARD]package.json imported from '[WILDCARD]import_not_defined.js' diff --git a/tests/specs/npm/info_chalk_display/__test__.jsonc b/tests/specs/npm/info_chalk_display/__test__.jsonc index 54b5b74396f1f4..717f1f9a15570f 100644 --- a/tests/specs/npm/info_chalk_display/__test__.jsonc +++ b/tests/specs/npm/info_chalk_display/__test__.jsonc @@ -1,5 +1,5 @@ { - "args": "info --quiet cjs_with_deps/main.js", - "output": "cjs_with_deps/main_info.out", + "args": "info --quiet main.js", + "output": "main_info.out", "exitCode": 0 } diff --git a/tests/specs/npm/info_chalk_display/cjs_with_deps/main_info.out b/tests/specs/npm/info_chalk_display/cjs_with_deps/main_info.out deleted file mode 100644 index 8e37c88eb00f0c..00000000000000 --- a/tests/specs/npm/info_chalk_display/cjs_with_deps/main_info.out +++ /dev/null @@ -1,22 +0,0 @@ -local: [WILDCARD]main.js -type: JavaScript -dependencies: 14 unique -size: [WILDCARD] - -file:///[WILDCARD]/cjs_with_deps/main.js ([WILDCARD]) -├─┬ npm:/chalk@4.1.2 ([WILDCARD]) -│ ├─┬ npm:/ansi-styles@4.3.0 ([WILDCARD]) -│ │ └─┬ npm:/color-convert@2.0.1 ([WILDCARD]) -│ │ └── npm:/color-name@1.1.4 ([WILDCARD]) -│ └─┬ npm:/supports-color@7.2.0 ([WILDCARD]) -│ └── npm:/has-flag@4.0.0 ([WILDCARD]) -└─┬ npm:/chai@4.3.6 ([WILDCARD]) - ├── npm:/assertion-error@1.1.0 ([WILDCARD]) - ├── npm:/check-error@1.0.2 ([WILDCARD]) - ├─┬ npm:/deep-eql@3.0.1 ([WILDCARD]) - │ └── npm:/type-detect@4.0.8 ([WILDCARD]) - ├── npm:/get-func-name@2.0.0 ([WILDCARD]) - ├─┬ npm:/loupe@2.3.4 ([WILDCARD]) - │ └── npm:/get-func-name@2.0.0 ([WILDCARD]) - ├── npm:/pathval@1.1.1 ([WILDCARD]) - └── npm:/type-detect@4.0.8 ([WILDCARD]) diff --git a/tests/specs/npm/info_chalk_display/cjs_with_deps/main_info_json.out b/tests/specs/npm/info_chalk_display/cjs_with_deps/main_info_json.out deleted file mode 100644 index 137b9f8ce56c3d..00000000000000 --- a/tests/specs/npm/info_chalk_display/cjs_with_deps/main_info_json.out +++ /dev/null @@ -1,148 +0,0 @@ -{ - "version": 1, - "roots": [ - "file://[WILDCARD]/main.js" - ], - "modules": [ - { - "kind": "esm", - "dependencies": [ - { - "specifier": "npm:chalk@4", - "code": { - "specifier": "npm:chalk@4", - "span": { - "start": { - "line": 0, - "character": 18 - }, - "end": { - "line": 0, - "character": 31 - } - } - }, - "npmPackage": "chalk@4.1.2" - }, - { - "specifier": "npm:chai@4.3", - "code": { - "specifier": "npm:chai@4.3", - "span": { - "start": { - "line": 1, - "character": 23 - }, - "end": { - "line": 1, - "character": 37 - } - } - }, - "npmPackage": "chai@4.3.6" - } - ], - "local": "[WILDCARD]main.js", - "size": 325, - "mediaType": "JavaScript", - "specifier": "[WILDCARD]/main.js" - } - ], - "redirects": { - "npm:chai@4.3": "npm:/chai@4.3.6", - "npm:chalk@4": "npm:/chalk@4.1.2" - }, - "npmPackages": { - "ansi-styles@4.3.0": { - "name": "ansi-styles", - "version": "4.3.0", - "dependencies": [ - "color-convert@2.0.1" - ] - }, - "assertion-error@1.1.0": { - "name": "assertion-error", - "version": "1.1.0", - "dependencies": [] - }, - "chai@4.3.6": { - "name": "chai", - "version": "4.3.6", - "dependencies": [ - "assertion-error@1.1.0", - "check-error@1.0.2", - "deep-eql@3.0.1", - "get-func-name@2.0.0", - "loupe@2.3.4", - "pathval@1.1.1", - "type-detect@4.0.8" - ] - }, - "chalk@4.1.2": { - "name": "chalk", - "version": "4.1.2", - "dependencies": [ - "ansi-styles@4.3.0", - "supports-color@7.2.0" - ] - }, - "check-error@1.0.2": { - "name": "check-error", - "version": "1.0.2", - "dependencies": [] - }, - "color-convert@2.0.1": { - "name": "color-convert", - "version": "2.0.1", - "dependencies": [ - "color-name@1.1.4" - ] - }, - "color-name@1.1.4": { - "name": "color-name", - "version": "1.1.4", - "dependencies": [] - }, - "deep-eql@3.0.1": { - "name": "deep-eql", - "version": "3.0.1", - "dependencies": [ - "type-detect@4.0.8" - ] - }, - "get-func-name@2.0.0": { - "name": "get-func-name", - "version": "2.0.0", - "dependencies": [] - }, - "has-flag@4.0.0": { - "name": "has-flag", - "version": "4.0.0", - "dependencies": [] - }, - "loupe@2.3.4": { - "name": "loupe", - "version": "2.3.4", - "dependencies": [ - "get-func-name@2.0.0" - ] - }, - "pathval@1.1.1": { - "name": "pathval", - "version": "1.1.1", - "dependencies": [] - }, - "supports-color@7.2.0": { - "name": "supports-color", - "version": "7.2.0", - "dependencies": [ - "has-flag@4.0.0" - ] - }, - "type-detect@4.0.8": { - "name": "type-detect", - "version": "4.0.8", - "dependencies": [] - } - } -} diff --git a/tests/specs/npm/info_chalk_display/cjs_with_deps/main.js b/tests/specs/npm/info_chalk_display/main.js similarity index 100% rename from tests/specs/npm/info_chalk_display/cjs_with_deps/main.js rename to tests/specs/npm/info_chalk_display/main.js diff --git a/tests/specs/npm/info_chalk_display/main_info.out b/tests/specs/npm/info_chalk_display/main_info.out new file mode 100644 index 00000000000000..f1271ec1f11dfd --- /dev/null +++ b/tests/specs/npm/info_chalk_display/main_info.out @@ -0,0 +1,22 @@ +local: [WILDCARD]main.js +type: JavaScript +dependencies: 14 unique +size: [WILDCARD] + +file:///[WILDCARD]/main.js ([WILDCARD]) +├─┬ npm:/chalk@4.1.2 ([WILDCARD]) +│ ├─┬ npm:/ansi-styles@4.3.0 ([WILDCARD]) +│ │ └─┬ npm:/color-convert@2.0.1 ([WILDCARD]) +│ │ └── npm:/color-name@1.1.4 ([WILDCARD]) +│ └─┬ npm:/supports-color@7.2.0 ([WILDCARD]) +│ └── npm:/has-flag@4.0.0 ([WILDCARD]) +└─┬ npm:/chai@4.3.6 ([WILDCARD]) + ├── npm:/assertion-error@1.1.0 ([WILDCARD]) + ├── npm:/check-error@1.0.2 ([WILDCARD]) + ├─┬ npm:/deep-eql@3.0.1 ([WILDCARD]) + │ └── npm:/type-detect@4.0.8 ([WILDCARD]) + ├── npm:/get-func-name@2.0.0 ([WILDCARD]) + ├─┬ npm:/loupe@2.3.4 ([WILDCARD]) + │ └── npm:/get-func-name@2.0.0 ([WILDCARD]) + ├── npm:/pathval@1.1.1 ([WILDCARD]) + └── npm:/type-detect@4.0.8 ([WILDCARD]) diff --git a/tests/specs/npm/info_chalk_display_node_modules_dir/__test__.jsonc b/tests/specs/npm/info_chalk_display_node_modules_dir/__test__.jsonc index 4358f64883032c..b5c36dc6c1c22e 100644 --- a/tests/specs/npm/info_chalk_display_node_modules_dir/__test__.jsonc +++ b/tests/specs/npm/info_chalk_display_node_modules_dir/__test__.jsonc @@ -1,6 +1,6 @@ { "tempDir": true, - "args": "info --quiet --node-modules-dir cjs_with_deps/main.js", - "output": "cjs_with_deps/main_info.out", + "args": "info --quiet --node-modules-dir main.js", + "output": "main_info.out", "exitCode": 0 } diff --git a/tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main.out b/tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main.out deleted file mode 100644 index 7051c239538def..00000000000000 --- a/tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main.out +++ /dev/null @@ -1,33 +0,0 @@ -[UNORDERED_START] -Download http://localhost:4260/chalk -Download http://localhost:4260/chai -Download http://localhost:4260/ansi-styles -Download http://localhost:4260/supports-color -Download http://localhost:4260/assertion-error -Download http://localhost:4260/check-error -Download http://localhost:4260/deep-eql -Download http://localhost:4260/get-func-name -Download http://localhost:4260/loupe -Download http://localhost:4260/pathval -Download http://localhost:4260/type-detect -Download http://localhost:4260/color-convert -Download http://localhost:4260/has-flag -Download http://localhost:4260/color-name -[UNORDERED_END] -[UNORDERED_START] -Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz -Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz -Download http://localhost:4260/chai/chai-4.3.6.tgz -Download http://localhost:4260/chalk/chalk-4.1.2.tgz -Download http://localhost:4260/check-error/check-error-1.0.2.tgz -Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz -Download http://localhost:4260/color-name/color-name-1.1.4.tgz -Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz -Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz -Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz -Download http://localhost:4260/loupe/loupe-2.3.4.tgz -Download http://localhost:4260/pathval/pathval-1.1.1.tgz -Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz -Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz -[UNORDERED_END] -chalk cjs loads diff --git a/tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main_info.out b/tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main_info.out deleted file mode 100644 index 8e37c88eb00f0c..00000000000000 --- a/tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main_info.out +++ /dev/null @@ -1,22 +0,0 @@ -local: [WILDCARD]main.js -type: JavaScript -dependencies: 14 unique -size: [WILDCARD] - -file:///[WILDCARD]/cjs_with_deps/main.js ([WILDCARD]) -├─┬ npm:/chalk@4.1.2 ([WILDCARD]) -│ ├─┬ npm:/ansi-styles@4.3.0 ([WILDCARD]) -│ │ └─┬ npm:/color-convert@2.0.1 ([WILDCARD]) -│ │ └── npm:/color-name@1.1.4 ([WILDCARD]) -│ └─┬ npm:/supports-color@7.2.0 ([WILDCARD]) -│ └── npm:/has-flag@4.0.0 ([WILDCARD]) -└─┬ npm:/chai@4.3.6 ([WILDCARD]) - ├── npm:/assertion-error@1.1.0 ([WILDCARD]) - ├── npm:/check-error@1.0.2 ([WILDCARD]) - ├─┬ npm:/deep-eql@3.0.1 ([WILDCARD]) - │ └── npm:/type-detect@4.0.8 ([WILDCARD]) - ├── npm:/get-func-name@2.0.0 ([WILDCARD]) - ├─┬ npm:/loupe@2.3.4 ([WILDCARD]) - │ └── npm:/get-func-name@2.0.0 ([WILDCARD]) - ├── npm:/pathval@1.1.1 ([WILDCARD]) - └── npm:/type-detect@4.0.8 ([WILDCARD]) diff --git a/tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main_info_json.out b/tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main_info_json.out deleted file mode 100644 index 137b9f8ce56c3d..00000000000000 --- a/tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main_info_json.out +++ /dev/null @@ -1,148 +0,0 @@ -{ - "version": 1, - "roots": [ - "file://[WILDCARD]/main.js" - ], - "modules": [ - { - "kind": "esm", - "dependencies": [ - { - "specifier": "npm:chalk@4", - "code": { - "specifier": "npm:chalk@4", - "span": { - "start": { - "line": 0, - "character": 18 - }, - "end": { - "line": 0, - "character": 31 - } - } - }, - "npmPackage": "chalk@4.1.2" - }, - { - "specifier": "npm:chai@4.3", - "code": { - "specifier": "npm:chai@4.3", - "span": { - "start": { - "line": 1, - "character": 23 - }, - "end": { - "line": 1, - "character": 37 - } - } - }, - "npmPackage": "chai@4.3.6" - } - ], - "local": "[WILDCARD]main.js", - "size": 325, - "mediaType": "JavaScript", - "specifier": "[WILDCARD]/main.js" - } - ], - "redirects": { - "npm:chai@4.3": "npm:/chai@4.3.6", - "npm:chalk@4": "npm:/chalk@4.1.2" - }, - "npmPackages": { - "ansi-styles@4.3.0": { - "name": "ansi-styles", - "version": "4.3.0", - "dependencies": [ - "color-convert@2.0.1" - ] - }, - "assertion-error@1.1.0": { - "name": "assertion-error", - "version": "1.1.0", - "dependencies": [] - }, - "chai@4.3.6": { - "name": "chai", - "version": "4.3.6", - "dependencies": [ - "assertion-error@1.1.0", - "check-error@1.0.2", - "deep-eql@3.0.1", - "get-func-name@2.0.0", - "loupe@2.3.4", - "pathval@1.1.1", - "type-detect@4.0.8" - ] - }, - "chalk@4.1.2": { - "name": "chalk", - "version": "4.1.2", - "dependencies": [ - "ansi-styles@4.3.0", - "supports-color@7.2.0" - ] - }, - "check-error@1.0.2": { - "name": "check-error", - "version": "1.0.2", - "dependencies": [] - }, - "color-convert@2.0.1": { - "name": "color-convert", - "version": "2.0.1", - "dependencies": [ - "color-name@1.1.4" - ] - }, - "color-name@1.1.4": { - "name": "color-name", - "version": "1.1.4", - "dependencies": [] - }, - "deep-eql@3.0.1": { - "name": "deep-eql", - "version": "3.0.1", - "dependencies": [ - "type-detect@4.0.8" - ] - }, - "get-func-name@2.0.0": { - "name": "get-func-name", - "version": "2.0.0", - "dependencies": [] - }, - "has-flag@4.0.0": { - "name": "has-flag", - "version": "4.0.0", - "dependencies": [] - }, - "loupe@2.3.4": { - "name": "loupe", - "version": "2.3.4", - "dependencies": [ - "get-func-name@2.0.0" - ] - }, - "pathval@1.1.1": { - "name": "pathval", - "version": "1.1.1", - "dependencies": [] - }, - "supports-color@7.2.0": { - "name": "supports-color", - "version": "7.2.0", - "dependencies": [ - "has-flag@4.0.0" - ] - }, - "type-detect@4.0.8": { - "name": "type-detect", - "version": "4.0.8", - "dependencies": [] - } - } -} diff --git a/tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main_node_modules.out b/tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main_node_modules.out deleted file mode 100644 index 1ab3679521744d..00000000000000 --- a/tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main_node_modules.out +++ /dev/null @@ -1,47 +0,0 @@ -[UNORDERED_START] -Download http://localhost:4260/chalk -Download http://localhost:4260/chai -Download http://localhost:4260/ansi-styles -Download http://localhost:4260/supports-color -Download http://localhost:4260/assertion-error -Download http://localhost:4260/check-error -Download http://localhost:4260/deep-eql -Download http://localhost:4260/get-func-name -Download http://localhost:4260/loupe -Download http://localhost:4260/pathval -Download http://localhost:4260/type-detect -Download http://localhost:4260/color-convert -Download http://localhost:4260/has-flag -Download http://localhost:4260/color-name -[UNORDERED_END] -[UNORDERED_START] -Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz -Initialize ansi-styles@4.3.0 -Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz -Initialize assertion-error@1.1.0 -Download http://localhost:4260/chai/chai-4.3.6.tgz -Initialize chai@4.3.6 -Download http://localhost:4260/chalk/chalk-4.1.2.tgz -Initialize chalk@4.1.2 -Download http://localhost:4260/check-error/check-error-1.0.2.tgz -Initialize check-error@1.0.2 -Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz -Initialize color-convert@2.0.1 -Download http://localhost:4260/color-name/color-name-1.1.4.tgz -Initialize color-name@1.1.4 -Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz -Initialize deep-eql@3.0.1 -Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz -Initialize get-func-name@2.0.0 -Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz -Initialize has-flag@4.0.0 -Download http://localhost:4260/loupe/loupe-2.3.4.tgz -Initialize loupe@2.3.4 -Download http://localhost:4260/pathval/pathval-1.1.1.tgz -Initialize pathval@1.1.1 -Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz -Initialize supports-color@7.2.0 -Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz -Initialize type-detect@4.0.8 -[UNORDERED_END] -chalk cjs loads diff --git a/tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main.js b/tests/specs/npm/info_chalk_display_node_modules_dir/main.js similarity index 100% rename from tests/specs/npm/info_chalk_display_node_modules_dir/cjs_with_deps/main.js rename to tests/specs/npm/info_chalk_display_node_modules_dir/main.js diff --git a/tests/specs/npm/info_chalk_display_node_modules_dir/main_info.out b/tests/specs/npm/info_chalk_display_node_modules_dir/main_info.out new file mode 100644 index 00000000000000..f1271ec1f11dfd --- /dev/null +++ b/tests/specs/npm/info_chalk_display_node_modules_dir/main_info.out @@ -0,0 +1,22 @@ +local: [WILDCARD]main.js +type: JavaScript +dependencies: 14 unique +size: [WILDCARD] + +file:///[WILDCARD]/main.js ([WILDCARD]) +├─┬ npm:/chalk@4.1.2 ([WILDCARD]) +│ ├─┬ npm:/ansi-styles@4.3.0 ([WILDCARD]) +│ │ └─┬ npm:/color-convert@2.0.1 ([WILDCARD]) +│ │ └── npm:/color-name@1.1.4 ([WILDCARD]) +│ └─┬ npm:/supports-color@7.2.0 ([WILDCARD]) +│ └── npm:/has-flag@4.0.0 ([WILDCARD]) +└─┬ npm:/chai@4.3.6 ([WILDCARD]) + ├── npm:/assertion-error@1.1.0 ([WILDCARD]) + ├── npm:/check-error@1.0.2 ([WILDCARD]) + ├─┬ npm:/deep-eql@3.0.1 ([WILDCARD]) + │ └── npm:/type-detect@4.0.8 ([WILDCARD]) + ├── npm:/get-func-name@2.0.0 ([WILDCARD]) + ├─┬ npm:/loupe@2.3.4 ([WILDCARD]) + │ └── npm:/get-func-name@2.0.0 ([WILDCARD]) + ├── npm:/pathval@1.1.1 ([WILDCARD]) + └── npm:/type-detect@4.0.8 ([WILDCARD]) diff --git a/tests/specs/npm/info_chalk_json/__test__.jsonc b/tests/specs/npm/info_chalk_json/__test__.jsonc index c6e65db94b6f5d..c5a4a95bf7324a 100644 --- a/tests/specs/npm/info_chalk_json/__test__.jsonc +++ b/tests/specs/npm/info_chalk_json/__test__.jsonc @@ -1,5 +1,5 @@ { - "args": "info --quiet --json cjs_with_deps/main.js", - "output": "cjs_with_deps/main_info_json.out", + "args": "info --quiet --json main.js", + "output": "main_info_json.out", "exitCode": 0 } diff --git a/tests/specs/npm/info_chalk_json/cjs_with_deps/main.out b/tests/specs/npm/info_chalk_json/cjs_with_deps/main.out deleted file mode 100644 index 7051c239538def..00000000000000 --- a/tests/specs/npm/info_chalk_json/cjs_with_deps/main.out +++ /dev/null @@ -1,33 +0,0 @@ -[UNORDERED_START] -Download http://localhost:4260/chalk -Download http://localhost:4260/chai -Download http://localhost:4260/ansi-styles -Download http://localhost:4260/supports-color -Download http://localhost:4260/assertion-error -Download http://localhost:4260/check-error -Download http://localhost:4260/deep-eql -Download http://localhost:4260/get-func-name -Download http://localhost:4260/loupe -Download http://localhost:4260/pathval -Download http://localhost:4260/type-detect -Download http://localhost:4260/color-convert -Download http://localhost:4260/has-flag -Download http://localhost:4260/color-name -[UNORDERED_END] -[UNORDERED_START] -Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz -Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz -Download http://localhost:4260/chai/chai-4.3.6.tgz -Download http://localhost:4260/chalk/chalk-4.1.2.tgz -Download http://localhost:4260/check-error/check-error-1.0.2.tgz -Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz -Download http://localhost:4260/color-name/color-name-1.1.4.tgz -Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz -Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz -Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz -Download http://localhost:4260/loupe/loupe-2.3.4.tgz -Download http://localhost:4260/pathval/pathval-1.1.1.tgz -Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz -Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz -[UNORDERED_END] -chalk cjs loads diff --git a/tests/specs/npm/info_chalk_json/cjs_with_deps/main_info.out b/tests/specs/npm/info_chalk_json/cjs_with_deps/main_info.out deleted file mode 100644 index 8e37c88eb00f0c..00000000000000 --- a/tests/specs/npm/info_chalk_json/cjs_with_deps/main_info.out +++ /dev/null @@ -1,22 +0,0 @@ -local: [WILDCARD]main.js -type: JavaScript -dependencies: 14 unique -size: [WILDCARD] - -file:///[WILDCARD]/cjs_with_deps/main.js ([WILDCARD]) -├─┬ npm:/chalk@4.1.2 ([WILDCARD]) -│ ├─┬ npm:/ansi-styles@4.3.0 ([WILDCARD]) -│ │ └─┬ npm:/color-convert@2.0.1 ([WILDCARD]) -│ │ └── npm:/color-name@1.1.4 ([WILDCARD]) -│ └─┬ npm:/supports-color@7.2.0 ([WILDCARD]) -│ └── npm:/has-flag@4.0.0 ([WILDCARD]) -└─┬ npm:/chai@4.3.6 ([WILDCARD]) - ├── npm:/assertion-error@1.1.0 ([WILDCARD]) - ├── npm:/check-error@1.0.2 ([WILDCARD]) - ├─┬ npm:/deep-eql@3.0.1 ([WILDCARD]) - │ └── npm:/type-detect@4.0.8 ([WILDCARD]) - ├── npm:/get-func-name@2.0.0 ([WILDCARD]) - ├─┬ npm:/loupe@2.3.4 ([WILDCARD]) - │ └── npm:/get-func-name@2.0.0 ([WILDCARD]) - ├── npm:/pathval@1.1.1 ([WILDCARD]) - └── npm:/type-detect@4.0.8 ([WILDCARD]) diff --git a/tests/specs/npm/info_chalk_json/cjs_with_deps/main_node_modules.out b/tests/specs/npm/info_chalk_json/cjs_with_deps/main_node_modules.out deleted file mode 100644 index 1ab3679521744d..00000000000000 --- a/tests/specs/npm/info_chalk_json/cjs_with_deps/main_node_modules.out +++ /dev/null @@ -1,47 +0,0 @@ -[UNORDERED_START] -Download http://localhost:4260/chalk -Download http://localhost:4260/chai -Download http://localhost:4260/ansi-styles -Download http://localhost:4260/supports-color -Download http://localhost:4260/assertion-error -Download http://localhost:4260/check-error -Download http://localhost:4260/deep-eql -Download http://localhost:4260/get-func-name -Download http://localhost:4260/loupe -Download http://localhost:4260/pathval -Download http://localhost:4260/type-detect -Download http://localhost:4260/color-convert -Download http://localhost:4260/has-flag -Download http://localhost:4260/color-name -[UNORDERED_END] -[UNORDERED_START] -Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz -Initialize ansi-styles@4.3.0 -Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz -Initialize assertion-error@1.1.0 -Download http://localhost:4260/chai/chai-4.3.6.tgz -Initialize chai@4.3.6 -Download http://localhost:4260/chalk/chalk-4.1.2.tgz -Initialize chalk@4.1.2 -Download http://localhost:4260/check-error/check-error-1.0.2.tgz -Initialize check-error@1.0.2 -Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz -Initialize color-convert@2.0.1 -Download http://localhost:4260/color-name/color-name-1.1.4.tgz -Initialize color-name@1.1.4 -Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz -Initialize deep-eql@3.0.1 -Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz -Initialize get-func-name@2.0.0 -Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz -Initialize has-flag@4.0.0 -Download http://localhost:4260/loupe/loupe-2.3.4.tgz -Initialize loupe@2.3.4 -Download http://localhost:4260/pathval/pathval-1.1.1.tgz -Initialize pathval@1.1.1 -Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz -Initialize supports-color@7.2.0 -Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz -Initialize type-detect@4.0.8 -[UNORDERED_END] -chalk cjs loads diff --git a/tests/specs/npm/info_chalk_json/cjs_with_deps/main.js b/tests/specs/npm/info_chalk_json/main.js similarity index 100% rename from tests/specs/npm/info_chalk_json/cjs_with_deps/main.js rename to tests/specs/npm/info_chalk_json/main.js diff --git a/tests/specs/npm/info_chalk_json/cjs_with_deps/main_info_json.out b/tests/specs/npm/info_chalk_json/main_info_json.out similarity index 100% rename from tests/specs/npm/info_chalk_json/cjs_with_deps/main_info_json.out rename to tests/specs/npm/info_chalk_json/main_info_json.out diff --git a/tests/specs/npm/info_chalk_json_node_modules_dir/__test__.jsonc b/tests/specs/npm/info_chalk_json_node_modules_dir/__test__.jsonc index 29c5e8bdff5952..ed9a96606e08f7 100644 --- a/tests/specs/npm/info_chalk_json_node_modules_dir/__test__.jsonc +++ b/tests/specs/npm/info_chalk_json_node_modules_dir/__test__.jsonc @@ -1,6 +1,6 @@ { "tempDir": true, - "args": "info --quiet --node-modules-dir --json cjs_with_deps/main.js", - "output": "cjs_with_deps/main_info_json.out", + "args": "info --quiet --node-modules-dir --json main.js", + "output": "main_info_json.out", "exitCode": 0 } diff --git a/tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main.out b/tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main.out deleted file mode 100644 index 7051c239538def..00000000000000 --- a/tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main.out +++ /dev/null @@ -1,33 +0,0 @@ -[UNORDERED_START] -Download http://localhost:4260/chalk -Download http://localhost:4260/chai -Download http://localhost:4260/ansi-styles -Download http://localhost:4260/supports-color -Download http://localhost:4260/assertion-error -Download http://localhost:4260/check-error -Download http://localhost:4260/deep-eql -Download http://localhost:4260/get-func-name -Download http://localhost:4260/loupe -Download http://localhost:4260/pathval -Download http://localhost:4260/type-detect -Download http://localhost:4260/color-convert -Download http://localhost:4260/has-flag -Download http://localhost:4260/color-name -[UNORDERED_END] -[UNORDERED_START] -Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz -Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz -Download http://localhost:4260/chai/chai-4.3.6.tgz -Download http://localhost:4260/chalk/chalk-4.1.2.tgz -Download http://localhost:4260/check-error/check-error-1.0.2.tgz -Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz -Download http://localhost:4260/color-name/color-name-1.1.4.tgz -Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz -Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz -Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz -Download http://localhost:4260/loupe/loupe-2.3.4.tgz -Download http://localhost:4260/pathval/pathval-1.1.1.tgz -Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz -Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz -[UNORDERED_END] -chalk cjs loads diff --git a/tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main_info.out b/tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main_info.out deleted file mode 100644 index 8e37c88eb00f0c..00000000000000 --- a/tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main_info.out +++ /dev/null @@ -1,22 +0,0 @@ -local: [WILDCARD]main.js -type: JavaScript -dependencies: 14 unique -size: [WILDCARD] - -file:///[WILDCARD]/cjs_with_deps/main.js ([WILDCARD]) -├─┬ npm:/chalk@4.1.2 ([WILDCARD]) -│ ├─┬ npm:/ansi-styles@4.3.0 ([WILDCARD]) -│ │ └─┬ npm:/color-convert@2.0.1 ([WILDCARD]) -│ │ └── npm:/color-name@1.1.4 ([WILDCARD]) -│ └─┬ npm:/supports-color@7.2.0 ([WILDCARD]) -│ └── npm:/has-flag@4.0.0 ([WILDCARD]) -└─┬ npm:/chai@4.3.6 ([WILDCARD]) - ├── npm:/assertion-error@1.1.0 ([WILDCARD]) - ├── npm:/check-error@1.0.2 ([WILDCARD]) - ├─┬ npm:/deep-eql@3.0.1 ([WILDCARD]) - │ └── npm:/type-detect@4.0.8 ([WILDCARD]) - ├── npm:/get-func-name@2.0.0 ([WILDCARD]) - ├─┬ npm:/loupe@2.3.4 ([WILDCARD]) - │ └── npm:/get-func-name@2.0.0 ([WILDCARD]) - ├── npm:/pathval@1.1.1 ([WILDCARD]) - └── npm:/type-detect@4.0.8 ([WILDCARD]) diff --git a/tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main_node_modules.out b/tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main_node_modules.out deleted file mode 100644 index 1ab3679521744d..00000000000000 --- a/tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main_node_modules.out +++ /dev/null @@ -1,47 +0,0 @@ -[UNORDERED_START] -Download http://localhost:4260/chalk -Download http://localhost:4260/chai -Download http://localhost:4260/ansi-styles -Download http://localhost:4260/supports-color -Download http://localhost:4260/assertion-error -Download http://localhost:4260/check-error -Download http://localhost:4260/deep-eql -Download http://localhost:4260/get-func-name -Download http://localhost:4260/loupe -Download http://localhost:4260/pathval -Download http://localhost:4260/type-detect -Download http://localhost:4260/color-convert -Download http://localhost:4260/has-flag -Download http://localhost:4260/color-name -[UNORDERED_END] -[UNORDERED_START] -Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz -Initialize ansi-styles@4.3.0 -Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz -Initialize assertion-error@1.1.0 -Download http://localhost:4260/chai/chai-4.3.6.tgz -Initialize chai@4.3.6 -Download http://localhost:4260/chalk/chalk-4.1.2.tgz -Initialize chalk@4.1.2 -Download http://localhost:4260/check-error/check-error-1.0.2.tgz -Initialize check-error@1.0.2 -Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz -Initialize color-convert@2.0.1 -Download http://localhost:4260/color-name/color-name-1.1.4.tgz -Initialize color-name@1.1.4 -Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz -Initialize deep-eql@3.0.1 -Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz -Initialize get-func-name@2.0.0 -Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz -Initialize has-flag@4.0.0 -Download http://localhost:4260/loupe/loupe-2.3.4.tgz -Initialize loupe@2.3.4 -Download http://localhost:4260/pathval/pathval-1.1.1.tgz -Initialize pathval@1.1.1 -Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz -Initialize supports-color@7.2.0 -Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz -Initialize type-detect@4.0.8 -[UNORDERED_END] -chalk cjs loads diff --git a/tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main.js b/tests/specs/npm/info_chalk_json_node_modules_dir/main.js similarity index 100% rename from tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main.js rename to tests/specs/npm/info_chalk_json_node_modules_dir/main.js diff --git a/tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main_info_json.out b/tests/specs/npm/info_chalk_json_node_modules_dir/main_info_json.out similarity index 100% rename from tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main_info_json.out rename to tests/specs/npm/info_chalk_json_node_modules_dir/main_info_json.out diff --git a/tests/specs/npm/info_cli_chalk_display/__test__.jsonc b/tests/specs/npm/info_cli_chalk_display/__test__.jsonc deleted file mode 100644 index 902bb2dae6211e..00000000000000 --- a/tests/specs/npm/info_cli_chalk_display/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "info --quiet npm:chalk@4", - "output": "info/chalk.out", - "exitCode": 0 -} diff --git a/tests/specs/npm/info_cli_chalk_display/info/chalk_json.out b/tests/specs/npm/info_cli_chalk_display/info/chalk_json.out deleted file mode 100644 index 21fc7edf1a1917..00000000000000 --- a/tests/specs/npm/info_cli_chalk_display/info/chalk_json.out +++ /dev/null @@ -1,57 +0,0 @@ -{ - "version": 1, - "roots": [ - "npm:chalk@4" - ], - "modules": [ - { - "kind": "npm", - "specifier": "npm:/chalk@4.1.2", - "npmPackage": "chalk@4.1.2" - } - ], - "redirects": { - "npm:chalk@4": "npm:/chalk@4.1.2" - }, - "npmPackages": { - "ansi-styles@4.3.0": { - "name": "ansi-styles", - "version": "4.3.0", - "dependencies": [ - "color-convert@2.0.1" - ] - }, - "chalk@4.1.2": { - "name": "chalk", - "version": "4.1.2", - "dependencies": [ - "ansi-styles@4.3.0", - "supports-color@7.2.0" - ] - }, - "color-convert@2.0.1": { - "name": "color-convert", - "version": "2.0.1", - "dependencies": [ - "color-name@1.1.4" - ] - }, - "color-name@1.1.4": { - "name": "color-name", - "version": "1.1.4", - "dependencies": [] - }, - "has-flag@4.0.0": { - "name": "has-flag", - "version": "4.0.0", - "dependencies": [] - }, - "supports-color@7.2.0": { - "name": "supports-color", - "version": "7.2.0", - "dependencies": [ - "has-flag@4.0.0" - ] - } - } -} diff --git a/tests/specs/npm/info_cli_chalk_json/__test__.jsonc b/tests/specs/npm/info_cli_chalk_json/__test__.jsonc index ee34abae7fbd61..b4b042dbdb7e7f 100644 --- a/tests/specs/npm/info_cli_chalk_json/__test__.jsonc +++ b/tests/specs/npm/info_cli_chalk_json/__test__.jsonc @@ -1,5 +1,14 @@ { - "args": "info --quiet --json npm:chalk@4", - "output": "info/chalk_json.out", - "exitCode": 0 + "tests": { + "info_cli_chalk": { + "args": "info --quiet npm:chalk@4", + "output": "chalk.out", + "exitCode": 0 + }, + "info_cli_chalk_json": { + "args": "info --quiet --json npm:chalk@4", + "output": "chalk_json.out", + "exitCode": 0 + } + } } diff --git a/tests/specs/npm/info_cli_chalk_display/info/chalk.out b/tests/specs/npm/info_cli_chalk_json/chalk.out similarity index 100% rename from tests/specs/npm/info_cli_chalk_display/info/chalk.out rename to tests/specs/npm/info_cli_chalk_json/chalk.out diff --git a/tests/specs/npm/info_cli_chalk_json/info/chalk_json.out b/tests/specs/npm/info_cli_chalk_json/chalk_json.out similarity index 100% rename from tests/specs/npm/info_cli_chalk_json/info/chalk_json.out rename to tests/specs/npm/info_cli_chalk_json/chalk_json.out diff --git a/tests/specs/npm/info_cli_chalk_json/info/chalk.out b/tests/specs/npm/info_cli_chalk_json/info/chalk.out deleted file mode 100644 index 63fa20da54a509..00000000000000 --- a/tests/specs/npm/info_cli_chalk_json/info/chalk.out +++ /dev/null @@ -1,9 +0,0 @@ -dependencies: 5 unique -size: [WILDCARD] - -npm:/chalk@4.1.2 ([WILDCARD]) -├─┬ npm:/ansi-styles@4.3.0 ([WILDCARD]) -│ └─┬ npm:/color-convert@2.0.1 ([WILDCARD]) -│ └── npm:/color-name@1.1.4 ([WILDCARD]) -└─┬ npm:/supports-color@7.2.0 ([WILDCARD]) - └── npm:/has-flag@4.0.0 ([WILDCARD]) diff --git a/tests/specs/npm/info_peer_deps/__test__.jsonc b/tests/specs/npm/info_peer_deps/__test__.jsonc index 00dfbc98b79f15..b726c50db1e7e6 100644 --- a/tests/specs/npm/info_peer_deps/__test__.jsonc +++ b/tests/specs/npm/info_peer_deps/__test__.jsonc @@ -1,5 +1,5 @@ { - "args": "info --quiet peer_deps_with_copied_folders/main.ts", - "output": "peer_deps_with_copied_folders/main_info.out", + "args": "info --quiet main.ts", + "output": "main_info.out", "exitCode": 0 } diff --git a/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main.ts b/tests/specs/npm/info_peer_deps/main.ts similarity index 100% rename from tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main.ts rename to tests/specs/npm/info_peer_deps/main.ts diff --git a/tests/specs/npm/info_peer_deps/main_info.out b/tests/specs/npm/info_peer_deps/main_info.out new file mode 100644 index 00000000000000..1269b1c1db0c76 --- /dev/null +++ b/tests/specs/npm/info_peer_deps/main_info.out @@ -0,0 +1,14 @@ +local: [WILDCARD]main.ts +type: TypeScript +dependencies: 6 unique +size: [WILDCARD] + +file:///[WILDCARD]/main.ts (171B) +├─┬ npm:/@denotest/peer-dep-test-child@1.0.0 ([WILDCARD]) +│ ├─┬ npm:/@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@1.0.0 ([WILDCARD]) +│ │ └── npm:/@denotest/peer-dep-test-peer@1.0.0 ([WILDCARD]) +│ └── npm:/@denotest/peer-dep-test-peer@1.0.0 ([WILDCARD]) +└─┬ npm:/@denotest/peer-dep-test-child@2.0.0 ([WILDCARD]) + ├─┬ npm:/@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@2.0.0 ([WILDCARD]) + │ └── npm:/@denotest/peer-dep-test-peer@2.0.0 ([WILDCARD]) + └── npm:/@denotest/peer-dep-test-peer@2.0.0 ([WILDCARD]) diff --git a/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main.out b/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main.out deleted file mode 100644 index b7a5835577b216..00000000000000 --- a/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main.out +++ /dev/null @@ -1,14 +0,0 @@ -[UNORDERED_START] -Download http://localhost:4260/@denotest%2fpeer-dep-test-child -Download http://localhost:4260/@denotest%2fpeer-dep-test-grandchild -Download http://localhost:4260/@denotest%2fpeer-dep-test-peer -[UNORDERED_END] -[UNORDERED_START] -Download http://localhost:4260/@denotest/peer-dep-test-child/1.0.0.tgz -Download http://localhost:4260/@denotest/peer-dep-test-child/2.0.0.tgz -Download http://localhost:4260/@denotest/peer-dep-test-grandchild/1.0.0.tgz -Download http://localhost:4260/@denotest/peer-dep-test-peer/1.0.0.tgz -Download http://localhost:4260/@denotest/peer-dep-test-peer/2.0.0.tgz -[UNORDERED_END] -1 -2 diff --git a/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_info.out b/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_info.out deleted file mode 100644 index e8b92399df6c47..00000000000000 --- a/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_info.out +++ /dev/null @@ -1,14 +0,0 @@ -local: [WILDCARD]main.ts -type: TypeScript -dependencies: 6 unique -size: [WILDCARD] - -file:///[WILDCARD]/peer_deps_with_copied_folders/main.ts (171B) -├─┬ npm:/@denotest/peer-dep-test-child@1.0.0 ([WILDCARD]) -│ ├─┬ npm:/@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@1.0.0 ([WILDCARD]) -│ │ └── npm:/@denotest/peer-dep-test-peer@1.0.0 ([WILDCARD]) -│ └── npm:/@denotest/peer-dep-test-peer@1.0.0 ([WILDCARD]) -└─┬ npm:/@denotest/peer-dep-test-child@2.0.0 ([WILDCARD]) - ├─┬ npm:/@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@2.0.0 ([WILDCARD]) - │ └── npm:/@denotest/peer-dep-test-peer@2.0.0 ([WILDCARD]) - └── npm:/@denotest/peer-dep-test-peer@2.0.0 ([WILDCARD]) diff --git a/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_info_json.out b/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_info_json.out deleted file mode 100644 index 46cc35c650e572..00000000000000 --- a/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_info_json.out +++ /dev/null @@ -1,97 +0,0 @@ -{ - "version": 1, - "roots": [ - "[WILDCARD]/peer_deps_with_copied_folders/main.ts" - ], - "modules": [ - { - "kind": "esm", - "dependencies": [ - { - "specifier": "npm:@denotest/peer-dep-test-child@1", - "code": { - "specifier": "npm:@denotest/peer-dep-test-child@1", - "span": { - "start": { - "line": 0, - "character": 21 - }, - "end": { - "line": 0, - "character": 58 - } - } - }, - "npmPackage": "@denotest/peer-dep-test-child@1.0.0_@denotest+peer-dep-test-peer@1.0.0" - }, - { - "specifier": "npm:@denotest/peer-dep-test-child@2", - "code": { - "specifier": "npm:@denotest/peer-dep-test-child@2", - "span": { - "start": { - "line": 1, - "character": 21 - }, - "end": { - "line": 1, - "character": 58 - } - } - }, - "npmPackage": "@denotest/peer-dep-test-child@2.0.0_@denotest+peer-dep-test-peer@2.0.0" - } - ], - "local": "[WILDCARD]main.ts", - "size": 171, - "mediaType": "TypeScript", - "specifier": "file://[WILDCARD]/main.ts" - } - ], - "redirects": { - "npm:@denotest/peer-dep-test-child@1": "npm:/@denotest/peer-dep-test-child@1.0.0", - "npm:@denotest/peer-dep-test-child@2": "npm:/@denotest/peer-dep-test-child@2.0.0" - }, - "npmPackages": { - "@denotest/peer-dep-test-child@1.0.0_@denotest+peer-dep-test-peer@1.0.0": { - "name": "@denotest/peer-dep-test-child", - "version": "1.0.0", - "dependencies": [ - "@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@1.0.0", - "@denotest/peer-dep-test-peer@1.0.0" - ] - }, - "@denotest/peer-dep-test-child@2.0.0_@denotest+peer-dep-test-peer@2.0.0": { - "name": "@denotest/peer-dep-test-child", - "version": "2.0.0", - "dependencies": [ - "@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@2.0.0", - "@denotest/peer-dep-test-peer@2.0.0" - ] - }, - "@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@1.0.0": { - "name": "@denotest/peer-dep-test-grandchild", - "version": "1.0.0", - "dependencies": [ - "@denotest/peer-dep-test-peer@1.0.0" - ] - }, - "@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@2.0.0": { - "name": "@denotest/peer-dep-test-grandchild", - "version": "1.0.0", - "dependencies": [ - "@denotest/peer-dep-test-peer@2.0.0" - ] - }, - "@denotest/peer-dep-test-peer@1.0.0": { - "name": "@denotest/peer-dep-test-peer", - "version": "1.0.0", - "dependencies": [] - }, - "@denotest/peer-dep-test-peer@2.0.0": { - "name": "@denotest/peer-dep-test-peer", - "version": "2.0.0", - "dependencies": [] - } - } -} diff --git a/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_node_modules.out b/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_node_modules.out deleted file mode 100644 index 02b5cbafd65ee9..00000000000000 --- a/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_node_modules.out +++ /dev/null @@ -1,9 +0,0 @@ -[UNORDERED_START] -Initialize @denotest/peer-dep-test-child@1.0.0 -Initialize @denotest/peer-dep-test-child@2.0.0 -Initialize @denotest/peer-dep-test-grandchild@1.0.0 -Initialize @denotest/peer-dep-test-peer@1.0.0 -Initialize @denotest/peer-dep-test-peer@2.0.0 -[UNORDERED_END] -1 -2 diff --git a/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_node_modules_reload.out b/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_node_modules_reload.out deleted file mode 100644 index 18d7f7865ba6f0..00000000000000 --- a/tests/specs/npm/info_peer_deps/peer_deps_with_copied_folders/main_node_modules_reload.out +++ /dev/null @@ -1,19 +0,0 @@ -[UNORDERED_START] -Download http://localhost:4260/@denotest%2fpeer-dep-test-child -Download http://localhost:4260/@denotest%2fpeer-dep-test-grandchild -Download http://localhost:4260/@denotest%2fpeer-dep-test-peer -[UNORDERED_END] -[UNORDERED_START] -Download http://localhost:4260/@denotest/peer-dep-test-child/1.0.0.tgz -Initialize @denotest/peer-dep-test-child@1.0.0 -Download http://localhost:4260/@denotest/peer-dep-test-child/2.0.0.tgz -Initialize @denotest/peer-dep-test-child@2.0.0 -Download http://localhost:4260/@denotest/peer-dep-test-grandchild/1.0.0.tgz -Initialize @denotest/peer-dep-test-grandchild@1.0.0 -Download http://localhost:4260/@denotest/peer-dep-test-peer/1.0.0.tgz -Initialize @denotest/peer-dep-test-peer@1.0.0 -Download http://localhost:4260/@denotest/peer-dep-test-peer/2.0.0.tgz -Initialize @denotest/peer-dep-test-peer@2.0.0 -[UNORDERED_END] -1 -2 diff --git a/tests/specs/npm/info_peer_deps_json/__test__.jsonc b/tests/specs/npm/info_peer_deps_json/__test__.jsonc index 5dd08c325f398c..6950448398a9bd 100644 --- a/tests/specs/npm/info_peer_deps_json/__test__.jsonc +++ b/tests/specs/npm/info_peer_deps_json/__test__.jsonc @@ -1,5 +1,5 @@ { - "args": "info --quiet --json peer_deps_with_copied_folders/main.ts", - "output": "peer_deps_with_copied_folders/main_info_json.out", + "args": "info --quiet --json main.ts", + "output": "main_info_json.out", "exitCode": 0 } diff --git a/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main.ts b/tests/specs/npm/info_peer_deps_json/main.ts similarity index 100% rename from tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main.ts rename to tests/specs/npm/info_peer_deps_json/main.ts diff --git a/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_info_json.out b/tests/specs/npm/info_peer_deps_json/main_info_json.out similarity index 100% rename from tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_info_json.out rename to tests/specs/npm/info_peer_deps_json/main_info_json.out diff --git a/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main.out b/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main.out deleted file mode 100644 index b7a5835577b216..00000000000000 --- a/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main.out +++ /dev/null @@ -1,14 +0,0 @@ -[UNORDERED_START] -Download http://localhost:4260/@denotest%2fpeer-dep-test-child -Download http://localhost:4260/@denotest%2fpeer-dep-test-grandchild -Download http://localhost:4260/@denotest%2fpeer-dep-test-peer -[UNORDERED_END] -[UNORDERED_START] -Download http://localhost:4260/@denotest/peer-dep-test-child/1.0.0.tgz -Download http://localhost:4260/@denotest/peer-dep-test-child/2.0.0.tgz -Download http://localhost:4260/@denotest/peer-dep-test-grandchild/1.0.0.tgz -Download http://localhost:4260/@denotest/peer-dep-test-peer/1.0.0.tgz -Download http://localhost:4260/@denotest/peer-dep-test-peer/2.0.0.tgz -[UNORDERED_END] -1 -2 diff --git a/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_info.out b/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_info.out deleted file mode 100644 index e8b92399df6c47..00000000000000 --- a/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_info.out +++ /dev/null @@ -1,14 +0,0 @@ -local: [WILDCARD]main.ts -type: TypeScript -dependencies: 6 unique -size: [WILDCARD] - -file:///[WILDCARD]/peer_deps_with_copied_folders/main.ts (171B) -├─┬ npm:/@denotest/peer-dep-test-child@1.0.0 ([WILDCARD]) -│ ├─┬ npm:/@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@1.0.0 ([WILDCARD]) -│ │ └── npm:/@denotest/peer-dep-test-peer@1.0.0 ([WILDCARD]) -│ └── npm:/@denotest/peer-dep-test-peer@1.0.0 ([WILDCARD]) -└─┬ npm:/@denotest/peer-dep-test-child@2.0.0 ([WILDCARD]) - ├─┬ npm:/@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@2.0.0 ([WILDCARD]) - │ └── npm:/@denotest/peer-dep-test-peer@2.0.0 ([WILDCARD]) - └── npm:/@denotest/peer-dep-test-peer@2.0.0 ([WILDCARD]) diff --git a/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules.out b/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules.out deleted file mode 100644 index 02b5cbafd65ee9..00000000000000 --- a/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules.out +++ /dev/null @@ -1,9 +0,0 @@ -[UNORDERED_START] -Initialize @denotest/peer-dep-test-child@1.0.0 -Initialize @denotest/peer-dep-test-child@2.0.0 -Initialize @denotest/peer-dep-test-grandchild@1.0.0 -Initialize @denotest/peer-dep-test-peer@1.0.0 -Initialize @denotest/peer-dep-test-peer@2.0.0 -[UNORDERED_END] -1 -2 diff --git a/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules_reload.out b/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules_reload.out deleted file mode 100644 index 18d7f7865ba6f0..00000000000000 --- a/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules_reload.out +++ /dev/null @@ -1,19 +0,0 @@ -[UNORDERED_START] -Download http://localhost:4260/@denotest%2fpeer-dep-test-child -Download http://localhost:4260/@denotest%2fpeer-dep-test-grandchild -Download http://localhost:4260/@denotest%2fpeer-dep-test-peer -[UNORDERED_END] -[UNORDERED_START] -Download http://localhost:4260/@denotest/peer-dep-test-child/1.0.0.tgz -Initialize @denotest/peer-dep-test-child@1.0.0 -Download http://localhost:4260/@denotest/peer-dep-test-child/2.0.0.tgz -Initialize @denotest/peer-dep-test-child@2.0.0 -Download http://localhost:4260/@denotest/peer-dep-test-grandchild/1.0.0.tgz -Initialize @denotest/peer-dep-test-grandchild@1.0.0 -Download http://localhost:4260/@denotest/peer-dep-test-peer/1.0.0.tgz -Initialize @denotest/peer-dep-test-peer@1.0.0 -Download http://localhost:4260/@denotest/peer-dep-test-peer/2.0.0.tgz -Initialize @denotest/peer-dep-test-peer@2.0.0 -[UNORDERED_END] -1 -2 diff --git a/tests/specs/npm/lifecycle_scripts/future_install_all_lifecycles.out b/tests/specs/npm/lifecycle_scripts/future_install_all_lifecycles.out deleted file mode 100644 index bdbb2b08eac8f4..00000000000000 --- a/tests/specs/npm/lifecycle_scripts/future_install_all_lifecycles.out +++ /dev/null @@ -1,3 +0,0 @@ -Initialize @denotest/node-lifecycle-scripts@1.0.0: running 'preinstall' script -Initialize @denotest/node-lifecycle-scripts@1.0.0: running 'install' script -Initialize @denotest/node-lifecycle-scripts@1.0.0: running 'postinstall' script diff --git a/tests/specs/npm/mixed_case_package_name/__test__.jsonc b/tests/specs/npm/mixed_case_package_name/__test__.jsonc new file mode 100644 index 00000000000000..ca688f0914138d --- /dev/null +++ b/tests/specs/npm/mixed_case_package_name/__test__.jsonc @@ -0,0 +1,15 @@ +{ + "tempDir": true, + "tests": { + "mixed_case_package_name": { + "args": "run --node-modules-dir=auto -A local.ts", + "output": "local.out", + "exitCode": 0 + }, + "mixed_case_package_name_global_dir": { + "args": "run global.ts", + "output": "global.out", + "exitCode": 0 + } + } +} diff --git a/tests/specs/npm/mixed_case_package_name_global_dir/mixed_case_package_name/global.out b/tests/specs/npm/mixed_case_package_name/global.out similarity index 100% rename from tests/specs/npm/mixed_case_package_name_global_dir/mixed_case_package_name/global.out rename to tests/specs/npm/mixed_case_package_name/global.out diff --git a/tests/specs/npm/mixed_case_package_name_global_dir/mixed_case_package_name/global.ts b/tests/specs/npm/mixed_case_package_name/global.ts similarity index 100% rename from tests/specs/npm/mixed_case_package_name_global_dir/mixed_case_package_name/global.ts rename to tests/specs/npm/mixed_case_package_name/global.ts diff --git a/tests/specs/npm/mixed_case_package_name_global_dir/mixed_case_package_name/local.out b/tests/specs/npm/mixed_case_package_name/local.out similarity index 100% rename from tests/specs/npm/mixed_case_package_name_global_dir/mixed_case_package_name/local.out rename to tests/specs/npm/mixed_case_package_name/local.out diff --git a/tests/specs/npm/mixed_case_package_name_global_dir/mixed_case_package_name/local.ts b/tests/specs/npm/mixed_case_package_name/local.ts similarity index 100% rename from tests/specs/npm/mixed_case_package_name_global_dir/mixed_case_package_name/local.ts rename to tests/specs/npm/mixed_case_package_name/local.ts diff --git a/tests/specs/npm/mixed_case_package_name_global_dir/__test__.jsonc b/tests/specs/npm/mixed_case_package_name_global_dir/__test__.jsonc deleted file mode 100644 index db980472de11d2..00000000000000 --- a/tests/specs/npm/mixed_case_package_name_global_dir/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "run mixed_case_package_name/global.ts", - "output": "mixed_case_package_name/global.out", - "exitCode": 0 -} diff --git a/tests/specs/npm/mixed_case_package_name_local_dir/__test__.jsonc b/tests/specs/npm/mixed_case_package_name_local_dir/__test__.jsonc deleted file mode 100644 index a214b6f4a39322..00000000000000 --- a/tests/specs/npm/mixed_case_package_name_local_dir/__test__.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "tempDir": true, - "args": "run --node-modules-dir=auto -A mixed_case_package_name/local.ts", - "output": "mixed_case_package_name/local.out", - "exitCode": 0 -} diff --git a/tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/global.out b/tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/global.out deleted file mode 100644 index a1d3a6e2c58ad7..00000000000000 --- a/tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/global.out +++ /dev/null @@ -1,9 +0,0 @@ -[UNORDERED_START] -Download http://localhost:4260/@denotest%2fMixedCase -Download http://localhost:4260/@denotest%2fCAPITALS -[UNORDERED_END] -[UNORDERED_START] -Download http://localhost:4260/@denotest/CAPITALS/1.0.0.tgz -Download http://localhost:4260/@denotest/MixedCase/1.0.0.tgz -[UNORDERED_END] -5 diff --git a/tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/global.ts b/tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/global.ts deleted file mode 100644 index a721b3d7846fee..00000000000000 --- a/tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/global.ts +++ /dev/null @@ -1,2 +0,0 @@ -import value from "npm:@denotest/MixedCase"; -console.log(value); diff --git a/tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/local.out b/tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/local.out deleted file mode 100644 index c8c9ed396c729b..00000000000000 --- a/tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/local.out +++ /dev/null @@ -1,13 +0,0 @@ -[UNORDERED_START] -Download http://localhost:4260/@denotest%2fMixedCase -Download http://localhost:4260/@denotest%2fCAPITALS -[UNORDERED_END] -[UNORDERED_START] -Download http://localhost:4260/@denotest/CAPITALS/1.0.0.tgz -Initialize @denotest/CAPITALS@1.0.0 -Download http://localhost:4260/@denotest/MixedCase/1.0.0.tgz -Initialize @denotest/MixedCase@1.0.0 -[UNORDERED_END] -5 -true -true diff --git a/tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/local.ts b/tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/local.ts deleted file mode 100644 index 6ca6cb581a503e..00000000000000 --- a/tests/specs/npm/mixed_case_package_name_local_dir/mixed_case_package_name/local.ts +++ /dev/null @@ -1,18 +0,0 @@ -import value from "npm:@denotest/MixedCase"; -console.log(value); -console.log(pathExists("./node_modules/.deno")); -console.log( - pathExists("./node_modules/.deno/_ibsgk3tporsxg5bpinavaskuifgfg@1.0.0"), -); - -function pathExists(filePath: string) { - try { - Deno.lstatSync(filePath); - return true; - } catch (error) { - if (error instanceof Deno.errors.NotFound) { - return false; - } - throw error; - } -} diff --git a/tests/specs/npm/node_modules_dir_with_deps/__test__.jsonc b/tests/specs/npm/node_modules_dir_with_deps/__test__.jsonc index 945a3f4d4bbd9c..27809f2d0b3a6b 100644 --- a/tests/specs/npm/node_modules_dir_with_deps/__test__.jsonc +++ b/tests/specs/npm/node_modules_dir_with_deps/__test__.jsonc @@ -1,5 +1,38 @@ { - "tempDir": true, - "args": "run --allow-read --allow-env --node-modules-dir=auto cjs_with_deps/main.js", - "output": "cjs_with_deps/main_node_modules.out" + "tests": { + "cjs_with_deps": { + "tempDir": true, + "args": "run --allow-read --allow-env main.js", + "output": "main.out" + }, + "cjs_with_deps_node_modules": { + "tempDir": true, + "args": "run --allow-read --allow-env --node-modules-dir=auto main.js", + "output": "main_node_modules.out" + }, + "cjs_with_deps_info": { + "steps": [ + { + "args": "cache main.js", + "output": "[WILDCARD]" + }, + { + "args": "info main.js", + "output": "main_info.out" + } + ] + }, + "cjs_with_deps_info_json": { + "steps": [ + { + "args": "cache main.js", + "output": "[WILDCARD]" + }, + { + "args": "info --json main.js", + "output": "main_info_json.out" + } + ] + } + } } diff --git a/tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main.out b/tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main.out deleted file mode 100644 index 7051c239538def..00000000000000 --- a/tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main.out +++ /dev/null @@ -1,33 +0,0 @@ -[UNORDERED_START] -Download http://localhost:4260/chalk -Download http://localhost:4260/chai -Download http://localhost:4260/ansi-styles -Download http://localhost:4260/supports-color -Download http://localhost:4260/assertion-error -Download http://localhost:4260/check-error -Download http://localhost:4260/deep-eql -Download http://localhost:4260/get-func-name -Download http://localhost:4260/loupe -Download http://localhost:4260/pathval -Download http://localhost:4260/type-detect -Download http://localhost:4260/color-convert -Download http://localhost:4260/has-flag -Download http://localhost:4260/color-name -[UNORDERED_END] -[UNORDERED_START] -Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz -Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz -Download http://localhost:4260/chai/chai-4.3.6.tgz -Download http://localhost:4260/chalk/chalk-4.1.2.tgz -Download http://localhost:4260/check-error/check-error-1.0.2.tgz -Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz -Download http://localhost:4260/color-name/color-name-1.1.4.tgz -Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz -Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz -Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz -Download http://localhost:4260/loupe/loupe-2.3.4.tgz -Download http://localhost:4260/pathval/pathval-1.1.1.tgz -Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz -Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz -[UNORDERED_END] -chalk cjs loads diff --git a/tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main_info.out b/tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main_info.out deleted file mode 100644 index bcaaf1eecf26fe..00000000000000 --- a/tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main_info.out +++ /dev/null @@ -1,22 +0,0 @@ -local: [WILDCARD]main.js -type: JavaScript -dependencies: 14 unique -size: [WILDCARD] - -file:///[WILDCARD]/npm/cjs_with_deps/main.js ([WILDCARD]) -├─┬ npm:/chalk@4.1.2 ([WILDCARD]) -│ ├─┬ npm:/ansi-styles@4.3.0 ([WILDCARD]) -│ │ └─┬ npm:/color-convert@2.0.1 ([WILDCARD]) -│ │ └── npm:/color-name@1.1.4 ([WILDCARD]) -│ └─┬ npm:/supports-color@7.2.0 ([WILDCARD]) -│ └── npm:/has-flag@4.0.0 ([WILDCARD]) -└─┬ npm:/chai@4.3.6 ([WILDCARD]) - ├── npm:/assertion-error@1.1.0 ([WILDCARD]) - ├── npm:/check-error@1.0.2 ([WILDCARD]) - ├─┬ npm:/deep-eql@3.0.1 ([WILDCARD]) - │ └── npm:/type-detect@4.0.8 ([WILDCARD]) - ├── npm:/get-func-name@2.0.0 ([WILDCARD]) - ├─┬ npm:/loupe@2.3.4 ([WILDCARD]) - │ └── npm:/get-func-name@2.0.0 ([WILDCARD]) - ├── npm:/pathval@1.1.1 ([WILDCARD]) - └── npm:/type-detect@4.0.8 ([WILDCARD]) diff --git a/tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main_info_json.out b/tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main_info_json.out deleted file mode 100644 index 137b9f8ce56c3d..00000000000000 --- a/tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main_info_json.out +++ /dev/null @@ -1,148 +0,0 @@ -{ - "version": 1, - "roots": [ - "file://[WILDCARD]/main.js" - ], - "modules": [ - { - "kind": "esm", - "dependencies": [ - { - "specifier": "npm:chalk@4", - "code": { - "specifier": "npm:chalk@4", - "span": { - "start": { - "line": 0, - "character": 18 - }, - "end": { - "line": 0, - "character": 31 - } - } - }, - "npmPackage": "chalk@4.1.2" - }, - { - "specifier": "npm:chai@4.3", - "code": { - "specifier": "npm:chai@4.3", - "span": { - "start": { - "line": 1, - "character": 23 - }, - "end": { - "line": 1, - "character": 37 - } - } - }, - "npmPackage": "chai@4.3.6" - } - ], - "local": "[WILDCARD]main.js", - "size": 325, - "mediaType": "JavaScript", - "specifier": "[WILDCARD]/main.js" - } - ], - "redirects": { - "npm:chai@4.3": "npm:/chai@4.3.6", - "npm:chalk@4": "npm:/chalk@4.1.2" - }, - "npmPackages": { - "ansi-styles@4.3.0": { - "name": "ansi-styles", - "version": "4.3.0", - "dependencies": [ - "color-convert@2.0.1" - ] - }, - "assertion-error@1.1.0": { - "name": "assertion-error", - "version": "1.1.0", - "dependencies": [] - }, - "chai@4.3.6": { - "name": "chai", - "version": "4.3.6", - "dependencies": [ - "assertion-error@1.1.0", - "check-error@1.0.2", - "deep-eql@3.0.1", - "get-func-name@2.0.0", - "loupe@2.3.4", - "pathval@1.1.1", - "type-detect@4.0.8" - ] - }, - "chalk@4.1.2": { - "name": "chalk", - "version": "4.1.2", - "dependencies": [ - "ansi-styles@4.3.0", - "supports-color@7.2.0" - ] - }, - "check-error@1.0.2": { - "name": "check-error", - "version": "1.0.2", - "dependencies": [] - }, - "color-convert@2.0.1": { - "name": "color-convert", - "version": "2.0.1", - "dependencies": [ - "color-name@1.1.4" - ] - }, - "color-name@1.1.4": { - "name": "color-name", - "version": "1.1.4", - "dependencies": [] - }, - "deep-eql@3.0.1": { - "name": "deep-eql", - "version": "3.0.1", - "dependencies": [ - "type-detect@4.0.8" - ] - }, - "get-func-name@2.0.0": { - "name": "get-func-name", - "version": "2.0.0", - "dependencies": [] - }, - "has-flag@4.0.0": { - "name": "has-flag", - "version": "4.0.0", - "dependencies": [] - }, - "loupe@2.3.4": { - "name": "loupe", - "version": "2.3.4", - "dependencies": [ - "get-func-name@2.0.0" - ] - }, - "pathval@1.1.1": { - "name": "pathval", - "version": "1.1.1", - "dependencies": [] - }, - "supports-color@7.2.0": { - "name": "supports-color", - "version": "7.2.0", - "dependencies": [ - "has-flag@4.0.0" - ] - }, - "type-detect@4.0.8": { - "name": "type-detect", - "version": "4.0.8", - "dependencies": [] - } - } -} diff --git a/tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main_node_modules.out b/tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main_node_modules.out deleted file mode 100644 index 1ab3679521744d..00000000000000 --- a/tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main_node_modules.out +++ /dev/null @@ -1,47 +0,0 @@ -[UNORDERED_START] -Download http://localhost:4260/chalk -Download http://localhost:4260/chai -Download http://localhost:4260/ansi-styles -Download http://localhost:4260/supports-color -Download http://localhost:4260/assertion-error -Download http://localhost:4260/check-error -Download http://localhost:4260/deep-eql -Download http://localhost:4260/get-func-name -Download http://localhost:4260/loupe -Download http://localhost:4260/pathval -Download http://localhost:4260/type-detect -Download http://localhost:4260/color-convert -Download http://localhost:4260/has-flag -Download http://localhost:4260/color-name -[UNORDERED_END] -[UNORDERED_START] -Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz -Initialize ansi-styles@4.3.0 -Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz -Initialize assertion-error@1.1.0 -Download http://localhost:4260/chai/chai-4.3.6.tgz -Initialize chai@4.3.6 -Download http://localhost:4260/chalk/chalk-4.1.2.tgz -Initialize chalk@4.1.2 -Download http://localhost:4260/check-error/check-error-1.0.2.tgz -Initialize check-error@1.0.2 -Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz -Initialize color-convert@2.0.1 -Download http://localhost:4260/color-name/color-name-1.1.4.tgz -Initialize color-name@1.1.4 -Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz -Initialize deep-eql@3.0.1 -Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz -Initialize get-func-name@2.0.0 -Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz -Initialize has-flag@4.0.0 -Download http://localhost:4260/loupe/loupe-2.3.4.tgz -Initialize loupe@2.3.4 -Download http://localhost:4260/pathval/pathval-1.1.1.tgz -Initialize pathval@1.1.1 -Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz -Initialize supports-color@7.2.0 -Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz -Initialize type-detect@4.0.8 -[UNORDERED_END] -chalk cjs loads diff --git a/tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main.js b/tests/specs/npm/node_modules_dir_with_deps/main.js similarity index 100% rename from tests/specs/npm/node_modules_dir_with_deps/cjs_with_deps/main.js rename to tests/specs/npm/node_modules_dir_with_deps/main.js diff --git a/tests/specs/npm/info_chalk_display/cjs_with_deps/main.out b/tests/specs/npm/node_modules_dir_with_deps/main.out similarity index 100% rename from tests/specs/npm/info_chalk_display/cjs_with_deps/main.out rename to tests/specs/npm/node_modules_dir_with_deps/main.out diff --git a/tests/specs/npm/node_modules_dir_with_deps/main_info.out b/tests/specs/npm/node_modules_dir_with_deps/main_info.out new file mode 100644 index 00000000000000..dd283c35406d54 --- /dev/null +++ b/tests/specs/npm/node_modules_dir_with_deps/main_info.out @@ -0,0 +1,22 @@ +local: [WILDCARD]main.js +type: JavaScript +dependencies: 14 unique +size: [WILDCARD] + +file:///[WILDCARD]/npm/node_modules_dir_with_deps/main.js ([WILDCARD]) +├─┬ npm:/chalk@4.1.2 ([WILDCARD]) +│ ├─┬ npm:/ansi-styles@4.3.0 ([WILDCARD]) +│ │ └─┬ npm:/color-convert@2.0.1 ([WILDCARD]) +│ │ └── npm:/color-name@1.1.4 ([WILDCARD]) +│ └─┬ npm:/supports-color@7.2.0 ([WILDCARD]) +│ └── npm:/has-flag@4.0.0 ([WILDCARD]) +└─┬ npm:/chai@4.3.6 ([WILDCARD]) + ├── npm:/assertion-error@1.1.0 ([WILDCARD]) + ├── npm:/check-error@1.0.2 ([WILDCARD]) + ├─┬ npm:/deep-eql@3.0.1 ([WILDCARD]) + │ └── npm:/type-detect@4.0.8 ([WILDCARD]) + ├── npm:/get-func-name@2.0.0 ([WILDCARD]) + ├─┬ npm:/loupe@2.3.4 ([WILDCARD]) + │ └── npm:/get-func-name@2.0.0 ([WILDCARD]) + ├── npm:/pathval@1.1.1 ([WILDCARD]) + └── npm:/type-detect@4.0.8 ([WILDCARD]) diff --git a/tests/specs/npm/node_modules_dir_with_deps/main_info_json.out b/tests/specs/npm/node_modules_dir_with_deps/main_info_json.out new file mode 100644 index 00000000000000..2f7dde2d985599 --- /dev/null +++ b/tests/specs/npm/node_modules_dir_with_deps/main_info_json.out @@ -0,0 +1,172 @@ +{ + "version": 1, + "roots": [ + "file://[WILDCARD]/main.js" + ], + "modules": [ + { + "kind": "esm", + "dependencies": [ + { + "specifier": "npm:chalk@4", + "code": { + "specifier": "npm:chalk@4", + "span": { + "start": { + "line": 0, + "character": 18 + }, + "end": { + "line": 0, + "character": 31 + } + } + }, + "npmPackage": "chalk@4.1.2" + }, + { + "specifier": "npm:chai@4.3", + "code": { + "specifier": "npm:chai@4.3", + "span": { + "start": { + "line": 1, + "character": 23 + }, + "end": { + "line": 1, + "character": 37 + } + } + }, + "npmPackage": "chai@4.3.6" + } + ], + "local": "[WILDCARD]main.js", + "size": 325, + "mediaType": "JavaScript", + "specifier": "[WILDCARD]/main.js" + }, + { + "kind": "npm", + "specifier": "npm:/chai@4.3.6", + "npmPackage": "chai@4.3.6" + }, + { + "kind": "npm", + "specifier": "npm:/chalk@4.1.2", + "npmPackage": "chalk@4.1.2" + } + ], + "redirects": { + "npm:chai@4.3": "npm:/chai@4.3.6", + "npm:chalk@4": "npm:/chalk@4.1.2" + }, + "npmPackages": { + "ansi-styles@4.3.0": { + "name": "ansi-styles", + "version": "4.3.0", + "dependencies": [ + "color-convert@2.0.1" + ], + "registryUrl": "http://localhost:4260/" + }, + "assertion-error@1.1.0": { + "name": "assertion-error", + "version": "1.1.0", + "dependencies": [], + "registryUrl": "http://localhost:4260/" + }, + "chai@4.3.6": { + "name": "chai", + "version": "4.3.6", + "dependencies": [ + "assertion-error@1.1.0", + "check-error@1.0.2", + "deep-eql@3.0.1", + "get-func-name@2.0.0", + "loupe@2.3.4", + "pathval@1.1.1", + "type-detect@4.0.8" + ], + "registryUrl": "http://localhost:4260/" + }, + "chalk@4.1.2": { + "name": "chalk", + "version": "4.1.2", + "dependencies": [ + "ansi-styles@4.3.0", + "supports-color@7.2.0" + ], + "registryUrl": "http://localhost:4260/" + }, + "check-error@1.0.2": { + "name": "check-error", + "version": "1.0.2", + "dependencies": [], + "registryUrl": "http://localhost:4260/" + }, + "color-convert@2.0.1": { + "name": "color-convert", + "version": "2.0.1", + "dependencies": [ + "color-name@1.1.4" + ], + "registryUrl": "http://localhost:4260/" + }, + "color-name@1.1.4": { + "name": "color-name", + "version": "1.1.4", + "dependencies": [], + "registryUrl": "http://localhost:4260/" + }, + "deep-eql@3.0.1": { + "name": "deep-eql", + "version": "3.0.1", + "dependencies": [ + "type-detect@4.0.8" + ], + "registryUrl": "http://localhost:4260/" + }, + "get-func-name@2.0.0": { + "name": "get-func-name", + "version": "2.0.0", + "dependencies": [], + "registryUrl": "http://localhost:4260/" + }, + "has-flag@4.0.0": { + "name": "has-flag", + "version": "4.0.0", + "dependencies": [], + "registryUrl": "http://localhost:4260/" + }, + "loupe@2.3.4": { + "name": "loupe", + "version": "2.3.4", + "dependencies": [ + "get-func-name@2.0.0" + ], + "registryUrl": "http://localhost:4260/" + }, + "pathval@1.1.1": { + "name": "pathval", + "version": "1.1.1", + "dependencies": [], + "registryUrl": "http://localhost:4260/" + }, + "supports-color@7.2.0": { + "name": "supports-color", + "version": "7.2.0", + "dependencies": [ + "has-flag@4.0.0" + ], + "registryUrl": "http://localhost:4260/" + }, + "type-detect@4.0.8": { + "name": "type-detect", + "version": "4.0.8", + "dependencies": [], + "registryUrl": "http://localhost:4260/" + } + } +} diff --git a/tests/specs/npm/info_chalk_display/cjs_with_deps/main_node_modules.out b/tests/specs/npm/node_modules_dir_with_deps/main_node_modules.out similarity index 100% rename from tests/specs/npm/info_chalk_display/cjs_with_deps/main_node_modules.out rename to tests/specs/npm/node_modules_dir_with_deps/main_node_modules.out diff --git a/tests/specs/npm/npmrc_bad_registry_config/main.out b/tests/specs/npm/npmrc_bad_registry_config/main.out index 5d778d32e95b13..d616829604e567 100644 --- a/tests/specs/npm/npmrc_bad_registry_config/main.out +++ b/tests/specs/npm/npmrc_bad_registry_config/main.out @@ -1,3 +1,5 @@ Download http://localhost:4261/@denotest%2fbasic -error: Error getting response at http://localhost:4261/@denotest%2fbasic for package "@denotest/basic": Bad response: 401 -[WILDCARD] \ No newline at end of file +error: Failed loading http://localhost:4261/@denotest%2fbasic for package "@denotest/basic" + +Caused by: + Bad response: 401 diff --git a/tests/specs/npm/npmrc_bad_token/main.out b/tests/specs/npm/npmrc_bad_token/main.out index 5d778d32e95b13..d616829604e567 100644 --- a/tests/specs/npm/npmrc_bad_token/main.out +++ b/tests/specs/npm/npmrc_bad_token/main.out @@ -1,3 +1,5 @@ Download http://localhost:4261/@denotest%2fbasic -error: Error getting response at http://localhost:4261/@denotest%2fbasic for package "@denotest/basic": Bad response: 401 -[WILDCARD] \ No newline at end of file +error: Failed loading http://localhost:4261/@denotest%2fbasic for package "@denotest/basic" + +Caused by: + Bad response: 401 diff --git a/tests/specs/npm/npmrc_password_no_username/install.out b/tests/specs/npm/npmrc_password_no_username/install.out index b198bcd27e6e2c..ceff6d5c9707d8 100644 --- a/tests/specs/npm/npmrc_password_no_username/install.out +++ b/tests/specs/npm/npmrc_password_no_username/install.out @@ -1,3 +1,4 @@ -[UNORDERED_START] -error: Error getting response at http://localhost:4261/@denotest%2fbasic for package "@denotest/basic": Both the username and password must be provided for basic auth -[UNORDERED_END] +error: Failed loading http://localhost:4261/@denotest%2fbasic for package "@denotest/basic" + +Caused by: + Both the username and password must be provided for basic auth diff --git a/tests/specs/npm/npmrc_username_no_password/install.out b/tests/specs/npm/npmrc_username_no_password/install.out index b198bcd27e6e2c..ceff6d5c9707d8 100644 --- a/tests/specs/npm/npmrc_username_no_password/install.out +++ b/tests/specs/npm/npmrc_username_no_password/install.out @@ -1,3 +1,4 @@ -[UNORDERED_START] -error: Error getting response at http://localhost:4261/@denotest%2fbasic for package "@denotest/basic": Both the username and password must be provided for basic auth -[UNORDERED_END] +error: Failed loading http://localhost:4261/@denotest%2fbasic for package "@denotest/basic" + +Caused by: + Both the username and password must be provided for basic auth diff --git a/tests/specs/npm/pkg_index_ts_and_js/__test__.jsonc b/tests/specs/npm/pkg_index_ts_and_js/__test__.jsonc new file mode 100644 index 00000000000000..689f6e1f41512e --- /dev/null +++ b/tests/specs/npm/pkg_index_ts_and_js/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "run index.js", + "output": "Hi\nWasm\nJSON\n" +} diff --git a/tests/specs/npm/pkg_index_ts_and_js/index.js b/tests/specs/npm/pkg_index_ts_and_js/index.js new file mode 100644 index 00000000000000..c6ef1486e6f64b --- /dev/null +++ b/tests/specs/npm/pkg_index_ts_and_js/index.js @@ -0,0 +1 @@ +import "package"; diff --git a/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/index.js b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/index.js new file mode 100644 index 00000000000000..4c83afcf50ad8e --- /dev/null +++ b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/index.js @@ -0,0 +1,3 @@ +require("./subdir"); +require("./wasm"); +require("./json"); diff --git a/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/json/index.js b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/json/index.js new file mode 100644 index 00000000000000..e998adfbdcc3b4 --- /dev/null +++ b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/json/index.js @@ -0,0 +1 @@ +console.log("JSON"); \ No newline at end of file diff --git a/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/json/index.json b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/json/index.json new file mode 100644 index 00000000000000..0967ef424bce67 --- /dev/null +++ b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/json/index.json @@ -0,0 +1 @@ +{} diff --git a/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/package.json b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/package.json new file mode 100644 index 00000000000000..028ddbb95b53eb --- /dev/null +++ b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/package.json @@ -0,0 +1,3 @@ +{ + "name": "package" +} \ No newline at end of file diff --git a/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/subdir/index.js b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/subdir/index.js new file mode 100644 index 00000000000000..1b8b5ee92b1f68 --- /dev/null +++ b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/subdir/index.js @@ -0,0 +1 @@ +console.log("Hi") \ No newline at end of file diff --git a/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/subdir/index.ts b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/subdir/index.ts new file mode 100644 index 00000000000000..e9cffd2de027b4 --- /dev/null +++ b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/subdir/index.ts @@ -0,0 +1 @@ +console.log("No"); \ No newline at end of file diff --git a/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/wasm/index.js b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/wasm/index.js new file mode 100644 index 00000000000000..9174e5fd65b085 --- /dev/null +++ b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/wasm/index.js @@ -0,0 +1 @@ +console.log("Wasm"); \ No newline at end of file diff --git a/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/wasm/index.wasm b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/wasm/index.wasm new file mode 100644 index 00000000000000..6b3950fcc5297b Binary files /dev/null and b/tests/specs/npm/pkg_index_ts_and_js/node_modules/package/wasm/index.wasm differ diff --git a/tests/specs/npm/pkg_index_ts_and_js/package.json b/tests/specs/npm/pkg_index_ts_and_js/package.json new file mode 100644 index 00000000000000..f0b3ee21dd5975 --- /dev/null +++ b/tests/specs/npm/pkg_index_ts_and_js/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "package": "*" + } +} diff --git a/tests/specs/npm/specifier_two_slashes/__test__.jsonc b/tests/specs/npm/specifier_two_slashes/__test__.jsonc new file mode 100644 index 00000000000000..bddbdbc1c8b227 --- /dev/null +++ b/tests/specs/npm/specifier_two_slashes/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "run --quiet main.ts", + "output": "3\n" +} diff --git a/tests/specs/npm/specifier_two_slashes/main.ts b/tests/specs/npm/specifier_two_slashes/main.ts new file mode 100644 index 00000000000000..ef1adceb5cad48 --- /dev/null +++ b/tests/specs/npm/specifier_two_slashes/main.ts @@ -0,0 +1,3 @@ +import { add } from "npm:@denotest/specifier-two-slashes"; + +console.log(add(1, 2)); diff --git a/tests/specs/npm/types_ambient_module/__test__.jsonc b/tests/specs/npm/types_ambient_module/__test__.jsonc index 966d8d8ed4d135..e69c163d5d8a6a 100644 --- a/tests/specs/npm/types_ambient_module/__test__.jsonc +++ b/tests/specs/npm/types_ambient_module/__test__.jsonc @@ -1,5 +1,14 @@ { - "args": "check --quiet types_ambient_module/main.ts", - "output": "types_ambient_module/main.out", - "exitCode": 1 + "tests": { + "types_ambient_module": { + "args": "check --quiet types_ambient_module/main.ts", + "output": "types_ambient_module/main.out", + "exitCode": 1 + }, + "types_ambient_module_import_map": { + "args": "check --quiet --import-map=types_ambient_module/import_map.json types_ambient_module/main_import_map.ts", + "output": "types_ambient_module/main_import_map.out", + "exitCode": 1 + } + } } diff --git a/tests/specs/npm/types_ambient_module_import_map/__test__.jsonc b/tests/specs/npm/types_ambient_module_import_map/__test__.jsonc deleted file mode 100644 index bbfa93a99b33cf..00000000000000 --- a/tests/specs/npm/types_ambient_module_import_map/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "check --quiet --import-map=types_ambient_module/import_map.json types_ambient_module/main_import_map.ts", - "output": "types_ambient_module/main_import_map.out", - "exitCode": 1 -} diff --git a/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/import_map.json b/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/import_map.json deleted file mode 100644 index f61d99b474f319..00000000000000 --- a/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/import_map.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "imports": { - "types-ambient": "npm:@denotest/types-ambient" - } -} diff --git a/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main.out b/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main.out deleted file mode 100644 index c84130707ef3b5..00000000000000 --- a/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main.out +++ /dev/null @@ -1,21 +0,0 @@ -error: TS2551 [ERROR]: Property 'Test2' does not exist on type 'typeof import("@denotest/types-ambient")'. Did you mean 'Test'? -console.log(import1.Test2); // should error - ~~~~~ - at file:///[WILDCARD]/types_ambient_module/main.ts:5:21 - - 'Test' is declared here. - class Test { - ~~~~ - at file:///[WILDCARD]/@denotest/types-ambient/1.0.0/index.d.ts:7:9 - -TS2551 [ERROR]: Property 'Test2' does not exist on type 'typeof import("@denotest/types-ambient")'. Did you mean 'Test'? -console.log(import2.Test2); // should error - ~~~~~ - at file:///[WILDCARD]/types_ambient_module/main.ts:7:21 - - 'Test' is declared here. - class Test { - ~~~~ - at file:///[WILDCARD]/@denotest/types-ambient/1.0.0/index.d.ts:7:9 - -Found 2 errors. diff --git a/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main.ts b/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main.ts deleted file mode 100644 index 8f77cabe8e7490..00000000000000 --- a/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import * as import1 from "npm:@denotest/types-ambient"; -import * as import2 from "npm:@denotest/types-ambient@1"; - -console.log(import1.Test); -console.log(import1.Test2); // should error -console.log(import2.Test); -console.log(import2.Test2); // should error diff --git a/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main_import_map.out b/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main_import_map.out deleted file mode 100644 index 548f9b479cfadb..00000000000000 --- a/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main_import_map.out +++ /dev/null @@ -1,9 +0,0 @@ -error: TS2551 [ERROR]: Property 'Test2' does not exist on type 'typeof import("@denotest/types-ambient")'. Did you mean 'Test'? -console.log(mod.Test2); // should error - ~~~~~ - at file:///[WILDCARD]/main_import_map.ts:4:17 - - 'Test' is declared here. - class Test { - ~~~~ - at file:///[WILDCARD]/@denotest/types-ambient/1.0.0/index.d.ts:7:9 diff --git a/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main_import_map.ts b/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main_import_map.ts deleted file mode 100644 index 2694c94b7aebaa..00000000000000 --- a/tests/specs/npm/types_ambient_module_import_map/types_ambient_module/main_import_map.ts +++ /dev/null @@ -1,4 +0,0 @@ -import * as mod from "npm:@denotest/types-ambient"; - -console.log(mod.Test); -console.log(mod.Test2); // should error diff --git a/tests/specs/npm/workspace_version_wildcards/__test__.jsonc b/tests/specs/npm/workspace_version_wildcards/__test__.jsonc new file mode 100644 index 00000000000000..1dfb3dc6a511b5 --- /dev/null +++ b/tests/specs/npm/workspace_version_wildcards/__test__.jsonc @@ -0,0 +1,10 @@ +{ + "tempDir": true, + "steps": [{ + "args": "install", + "output": "[WILDCARD]" + }, { + "args": "run e/main.ts", + "output": "main.out" + }] +} diff --git a/tests/specs/npm/workspace_version_wildcards/a/mod.ts b/tests/specs/npm/workspace_version_wildcards/a/mod.ts new file mode 100644 index 00000000000000..784e2aed807364 --- /dev/null +++ b/tests/specs/npm/workspace_version_wildcards/a/mod.ts @@ -0,0 +1,3 @@ +export function sayHello() { + console.log("Hello from a!"); +} diff --git a/tests/specs/npm/workspace_version_wildcards/a/package.json b/tests/specs/npm/workspace_version_wildcards/a/package.json new file mode 100644 index 00000000000000..0b4b7cedc63e7a --- /dev/null +++ b/tests/specs/npm/workspace_version_wildcards/a/package.json @@ -0,0 +1,7 @@ +{ + "name": "@denotest/a", + "version": "1.0.0", + "exports": { + ".": "./mod.ts" + } +} diff --git a/tests/specs/npm/workspace_version_wildcards/b/mod.ts b/tests/specs/npm/workspace_version_wildcards/b/mod.ts new file mode 100644 index 00000000000000..74b0441515e154 --- /dev/null +++ b/tests/specs/npm/workspace_version_wildcards/b/mod.ts @@ -0,0 +1,3 @@ +export function sayHello() { + console.log("Hello from b!"); +} diff --git a/tests/specs/npm/workspace_version_wildcards/b/package.json b/tests/specs/npm/workspace_version_wildcards/b/package.json new file mode 100644 index 00000000000000..d01d890f72270e --- /dev/null +++ b/tests/specs/npm/workspace_version_wildcards/b/package.json @@ -0,0 +1,7 @@ +{ + "name": "@denotest/b", + "version": "1.0.0", + "exports": { + ".": "./mod.ts" + } +} diff --git a/tests/specs/npm/workspace_version_wildcards/c/mod.ts b/tests/specs/npm/workspace_version_wildcards/c/mod.ts new file mode 100644 index 00000000000000..462fbd398cc602 --- /dev/null +++ b/tests/specs/npm/workspace_version_wildcards/c/mod.ts @@ -0,0 +1,3 @@ +export function sayHello() { + console.log("Hello from c!"); +} diff --git a/tests/specs/npm/workspace_version_wildcards/c/package.json b/tests/specs/npm/workspace_version_wildcards/c/package.json new file mode 100644 index 00000000000000..caf23c77cd7a32 --- /dev/null +++ b/tests/specs/npm/workspace_version_wildcards/c/package.json @@ -0,0 +1,7 @@ +{ + "name": "@denotest/c", + "version": "1.0.0", + "exports": { + ".": "./mod.ts" + } +} diff --git a/tests/specs/npm/workspace_version_wildcards/d/mod.ts b/tests/specs/npm/workspace_version_wildcards/d/mod.ts new file mode 100644 index 00000000000000..a21866ee898746 --- /dev/null +++ b/tests/specs/npm/workspace_version_wildcards/d/mod.ts @@ -0,0 +1,3 @@ +export function sayHello() { + console.log("Hello from d!"); +} diff --git a/tests/specs/npm/workspace_version_wildcards/d/package.json b/tests/specs/npm/workspace_version_wildcards/d/package.json new file mode 100644 index 00000000000000..b908366c25b603 --- /dev/null +++ b/tests/specs/npm/workspace_version_wildcards/d/package.json @@ -0,0 +1,7 @@ +{ + "name": "@denotest/d", + "version": "1.2.3", + "exports": { + ".": "./mod.ts" + } +} diff --git a/tests/specs/npm/workspace_version_wildcards/e/main.ts b/tests/specs/npm/workspace_version_wildcards/e/main.ts new file mode 100644 index 00000000000000..c626db09e8f536 --- /dev/null +++ b/tests/specs/npm/workspace_version_wildcards/e/main.ts @@ -0,0 +1,9 @@ +import * as a from "@denotest/a"; +import * as b from "@denotest/b"; +import * as c from "@denotest/c"; +import * as d from "@denotest/d"; + +a.sayHello(); +b.sayHello(); +c.sayHello(); +d.sayHello(); diff --git a/tests/specs/npm/workspace_version_wildcards/e/package.json b/tests/specs/npm/workspace_version_wildcards/e/package.json new file mode 100644 index 00000000000000..9dca2bb729eefa --- /dev/null +++ b/tests/specs/npm/workspace_version_wildcards/e/package.json @@ -0,0 +1,10 @@ +{ + "name": "@denotest/e", + "version": "1.0.0", + "dependencies": { + "@denotest/a": "workspace:*", + "@denotest/b": "workspace:~", + "@denotest/c": "workspace:^", + "@denotest/d": "workspace:1.2.3" + } +} diff --git a/tests/specs/npm/workspace_version_wildcards/main.out b/tests/specs/npm/workspace_version_wildcards/main.out new file mode 100644 index 00000000000000..ac501447e5c0c8 --- /dev/null +++ b/tests/specs/npm/workspace_version_wildcards/main.out @@ -0,0 +1,4 @@ +Hello from a! +Hello from b! +Hello from c! +Hello from d! diff --git a/tests/specs/npm/workspace_version_wildcards/main.ts b/tests/specs/npm/workspace_version_wildcards/main.ts new file mode 100644 index 00000000000000..316503b9ca7e92 --- /dev/null +++ b/tests/specs/npm/workspace_version_wildcards/main.ts @@ -0,0 +1,6 @@ +// should resolve these as bare specifiers within the workspace +import * as a from "@denotest/a"; +import * as c from "@denotest/c"; + +a.sayHello(); +c.sayHello(); diff --git a/tests/specs/npm/workspace_version_wildcards/package.json b/tests/specs/npm/workspace_version_wildcards/package.json new file mode 100644 index 00000000000000..0516fa6921f96c --- /dev/null +++ b/tests/specs/npm/workspace_version_wildcards/package.json @@ -0,0 +1,9 @@ +{ + "workspaces": [ + "./a", + "./b", + "./c", + "./d", + "./e" + ] +} diff --git a/tests/specs/permission/allow_import_cached_only/__test__.jsonc b/tests/specs/permission/allow_import_cached_only/__test__.jsonc new file mode 100644 index 00000000000000..a86a8796c22ece --- /dev/null +++ b/tests/specs/permission/allow_import_cached_only/__test__.jsonc @@ -0,0 +1,22 @@ +{ + "tempDir": true, + "tests": { + "no_flag": { + // ensure what we're testing will fail without the flags + "args": "run main.ts", + "output": "fail.out", + "exitCode": 1 + }, + "with_flags": { + "steps": [{ + "args": "cache --allow-import main.ts", + "output": "[WILDLINE]", + "exitCode": 0 + }, { + "args": "run --cached-only main.ts", + "output": "success.out", + "exitCode": 0 + }] + } + } +} diff --git a/tests/specs/permission/allow_import_cached_only/deno.jsonc b/tests/specs/permission/allow_import_cached_only/deno.jsonc new file mode 100644 index 00000000000000..090481af965b51 --- /dev/null +++ b/tests/specs/permission/allow_import_cached_only/deno.jsonc @@ -0,0 +1,3 @@ +{ + "lock": true +} diff --git a/tests/specs/permission/allow_import_cached_only/fail.out b/tests/specs/permission/allow_import_cached_only/fail.out new file mode 100644 index 00000000000000..517f53b9f4cbfa --- /dev/null +++ b/tests/specs/permission/allow_import_cached_only/fail.out @@ -0,0 +1,2 @@ +error: Requires import access to "localhost:4545", run again with the --allow-import flag + at file:///[WILDLINE]/main.ts:1:8 diff --git a/tests/specs/permission/allow_import_cached_only/main.ts b/tests/specs/permission/allow_import_cached_only/main.ts new file mode 100644 index 00000000000000..7556f226676137 --- /dev/null +++ b/tests/specs/permission/allow_import_cached_only/main.ts @@ -0,0 +1 @@ +import "http://localhost:4545/welcome.ts"; diff --git a/tests/specs/permission/allow_import_cached_only/success.out b/tests/specs/permission/allow_import_cached_only/success.out new file mode 100644 index 00000000000000..8432170eee9bdf --- /dev/null +++ b/tests/specs/permission/allow_import_cached_only/success.out @@ -0,0 +1 @@ +Welcome to Deno! diff --git a/tests/specs/permission/allow_import_info/__test__.jsonc b/tests/specs/permission/allow_import_info/__test__.jsonc new file mode 100644 index 00000000000000..adcd0f21903614 --- /dev/null +++ b/tests/specs/permission/allow_import_info/__test__.jsonc @@ -0,0 +1,22 @@ +{ + "envs": { + "JSR_URL": "" + }, + "tests": { + "implicit": { + "args": "info http://localhost:4545/welcome.ts", + "output": "success.out", + "exitCode": 0 + }, + "via_import_not_allowed": { + "args": "info main.ts", + "output": "import_not_allowed.out", + "exitCode": 0 + }, + "via_import_allowed": { + "args": "info --allow-import main.ts", + "output": "import_allowed.out", + "exitCode": 0 + } + } +} diff --git a/tests/specs/permission/allow_import_info/import_allowed.out b/tests/specs/permission/allow_import_info/import_allowed.out new file mode 100644 index 00000000000000..95b61b27ef40ba --- /dev/null +++ b/tests/specs/permission/allow_import_info/import_allowed.out @@ -0,0 +1,8 @@ +Download http://localhost:4545/welcome.ts +local: [WILDLINE] +type: TypeScript +dependencies: [WILDLINE] +size: [WILDLINE] + +file:///[WILDLINE]/main.ts ([WILDLINE]) +└── http://localhost:4545/welcome.ts ([WILDLINE]B) diff --git a/tests/specs/permission/allow_import_info/import_not_allowed.out b/tests/specs/permission/allow_import_info/import_not_allowed.out new file mode 100644 index 00000000000000..c73eced93a814e --- /dev/null +++ b/tests/specs/permission/allow_import_info/import_not_allowed.out @@ -0,0 +1,7 @@ +local: [WILDLINE] +type: TypeScript +dependencies: [WILDLINE] +size: [WILDLINE] + +file:///[WILDLINE]/allow_import_info/main.ts ([WILDLINE]) +└── http://localhost:4545/welcome.ts (not capable, requires --allow-import) diff --git a/tests/specs/permission/allow_import_info/main.ts b/tests/specs/permission/allow_import_info/main.ts new file mode 100644 index 00000000000000..7556f226676137 --- /dev/null +++ b/tests/specs/permission/allow_import_info/main.ts @@ -0,0 +1 @@ +import "http://localhost:4545/welcome.ts"; diff --git a/tests/specs/permission/allow_import_info/success.out b/tests/specs/permission/allow_import_info/success.out new file mode 100644 index 00000000000000..1b43d7144420fb --- /dev/null +++ b/tests/specs/permission/allow_import_info/success.out @@ -0,0 +1,7 @@ +Download http://localhost:4545/welcome.ts +local: [WILDLINE] +type: TypeScript +dependencies: [WILDLINE] +size: [WILDLINE] + +http://localhost:4545/welcome.ts ([WILDLINE]B) diff --git a/tests/specs/permission/allow_import_worker/denied.out b/tests/specs/permission/allow_import_worker/denied.out index 6e4dcaee09e08b..af44ae21ee180c 100644 --- a/tests/specs/permission/allow_import_worker/denied.out +++ b/tests/specs/permission/allow_import_worker/denied.out @@ -3,5 +3,4 @@ await import(specifier); ^ at async file:///[WILDLINE] error: Uncaught (in promise) Error: Unhandled error in child worker. - at [WILDLINE] - at [WILDLINE] \ No newline at end of file + at [WILDCARD] \ No newline at end of file diff --git a/tests/specs/permission/process_env_permissions/__test__.jsonc b/tests/specs/permission/process_env_permissions/__test__.jsonc new file mode 100644 index 00000000000000..d3c756e0dc7570 --- /dev/null +++ b/tests/specs/permission/process_env_permissions/__test__.jsonc @@ -0,0 +1,26 @@ +{ + "tempDir": true, + "tests": { + "deno_env_wildcard_tests": { + "envs": { + "MYAPP_HELLO": "Hello\tworld,", + "MYAPP_GOODBYE": "farewell", + "OTHER_VAR": "ignore" + }, + "steps": [ + { + "args": "run --allow-env=MYAPP_* main.js", + "output": "Hello\tworld,\nfarewell\ndone\n" + }, + { + "args": "run --allow-env main.js", + "output": "Hello\tworld,\nfarewell\ndone\n" + }, + { + "args": "run --allow-env=MYAPP_HELLO,MYAPP_GOODBYE,MYAPP_TEST,MYAPP_DONE main.js", + "output": "Hello\tworld,\nfarewell\ndone\n" + } + ] + } + } +} diff --git a/tests/specs/permission/process_env_permissions/main.js b/tests/specs/permission/process_env_permissions/main.js new file mode 100644 index 00000000000000..7a412659c9a314 --- /dev/null +++ b/tests/specs/permission/process_env_permissions/main.js @@ -0,0 +1,5 @@ +console.log(Deno.env.get("MYAPP_HELLO")); +console.log(Deno.env.get("MYAPP_GOODBYE")); +Deno.env.set("MYAPP_TEST", "done"); +Deno.env.set("MYAPP_DONE", "done"); +console.log(Deno.env.get("MYAPP_DONE")); diff --git a/tests/specs/publish/bun_specifier/__test__.jsonc b/tests/specs/publish/bun_specifier/__test__.jsonc new file mode 100644 index 00000000000000..4124845ba939a3 --- /dev/null +++ b/tests/specs/publish/bun_specifier/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "publish --token 'sadfasdf'", + "output": "bun_specifier.out" +} diff --git a/tests/specs/publish/bun_specifier/bun_specifier.out b/tests/specs/publish/bun_specifier/bun_specifier.out new file mode 100644 index 00000000000000..af45ed598b655f --- /dev/null +++ b/tests/specs/publish/bun_specifier/bun_specifier.out @@ -0,0 +1,6 @@ +Check file:///[WILDCARD]/mod.ts +Checking for slow types in the public API... +Check file:///[WILDCARD]/mod.ts +Publishing @foo/bar@1.0.0 ... +Successfully published @foo/bar@1.0.0 +Visit http://127.0.0.1:4250/@foo/bar@1.0.0 for details diff --git a/tests/specs/publish/bun_specifier/deno.json b/tests/specs/publish/bun_specifier/deno.json new file mode 100644 index 00000000000000..0657aefdbbdd99 --- /dev/null +++ b/tests/specs/publish/bun_specifier/deno.json @@ -0,0 +1,8 @@ +{ + "name": "@foo/bar", + "version": "1.0.0", + "exports": { + ".": "./mod.ts" + }, + "license": "MIT" +} diff --git a/tests/specs/publish/bun_specifier/mod.ts b/tests/specs/publish/bun_specifier/mod.ts new file mode 100644 index 00000000000000..ad7ca6152caf4f --- /dev/null +++ b/tests/specs/publish/bun_specifier/mod.ts @@ -0,0 +1 @@ +import "bun:sqlite"; diff --git a/tests/specs/publish/invalid_import/invalid_import.out b/tests/specs/publish/invalid_import/invalid_import.out index 6914dc51e08768..3b795ba2e9f918 100644 --- a/tests/specs/publish/invalid_import/invalid_import.out +++ b/tests/specs/publish/invalid_import/invalid_import.out @@ -12,7 +12,7 @@ error[invalid-external-import]: invalid import to a non-JSR 'http' specifier info: the import was resolved to 'http://localhost:4545/welcome.ts' info: this specifier is not allowed to be imported on jsr - info: jsr only supports importing `jsr:`, `npm:`, and `data:` specifiers + info: jsr only supports importing `jsr:`, `npm:`, `data:`, `bun:`, and `node:` specifiers docs: https://jsr.io/go/invalid-external-import error[invalid-external-import]: invalid import to a non-JSR 'http' specifier @@ -25,7 +25,7 @@ error[invalid-external-import]: invalid import to a non-JSR 'http' specifier info: the import was resolved to 'http://localhost:4545/echo.ts' info: this specifier is not allowed to be imported on jsr - info: jsr only supports importing `jsr:`, `npm:`, and `data:` specifiers + info: jsr only supports importing `jsr:`, `npm:`, `data:`, `bun:`, and `node:` specifiers docs: https://jsr.io/go/invalid-external-import error: Found 2 problems diff --git a/tests/specs/publish/invalid_import_esm_sh_suggestion/invalid_import_esm_sh_suggestion.out b/tests/specs/publish/invalid_import_esm_sh_suggestion/invalid_import_esm_sh_suggestion.out index b0a544df892885..1de23c0baec44c 100644 --- a/tests/specs/publish/invalid_import_esm_sh_suggestion/invalid_import_esm_sh_suggestion.out +++ b/tests/specs/publish/invalid_import_esm_sh_suggestion/invalid_import_esm_sh_suggestion.out @@ -13,7 +13,7 @@ error[invalid-external-import]: invalid import to a non-JSR 'http' specifier info: the import was resolved to 'http://esm.sh/react-dom@18.2.0/server' info: this specifier is not allowed to be imported on jsr - info: jsr only supports importing `jsr:`, `npm:`, and `data:` specifiers + info: jsr only supports importing `jsr:`, `npm:`, `data:`, `bun:`, and `node:` specifiers docs: https://jsr.io/go/invalid-external-import error: Found 1 problem diff --git a/tests/specs/publish/missing_exports/LICENSE b/tests/specs/publish/missing_exports/LICENSE new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/tests/specs/publish/missing_exports/__test__.jsonc b/tests/specs/publish/missing_exports/__test__.jsonc new file mode 100644 index 00000000000000..241bb87e044023 --- /dev/null +++ b/tests/specs/publish/missing_exports/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "publish --token 'sadfasdf'", + "output": "publish.out", + "exitCode": 1 +} diff --git a/tests/specs/publish/missing_exports/deno.json b/tests/specs/publish/missing_exports/deno.json new file mode 100644 index 00000000000000..4a66546360ceee --- /dev/null +++ b/tests/specs/publish/missing_exports/deno.json @@ -0,0 +1,7 @@ +{ + "name": "@foo/bar", + "version": "1.0.0", + "imports": { + "@std/http": "./std_http.ts" + } +} diff --git a/tests/specs/publish/missing_exports/mod.ts b/tests/specs/publish/missing_exports/mod.ts new file mode 100644 index 00000000000000..8d9b8a22a101a9 --- /dev/null +++ b/tests/specs/publish/missing_exports/mod.ts @@ -0,0 +1,3 @@ +export function add(a: number, b: number): number { + return a + b; +} diff --git a/tests/specs/publish/missing_exports/publish.out b/tests/specs/publish/missing_exports/publish.out new file mode 100644 index 00000000000000..ded06f638baef6 --- /dev/null +++ b/tests/specs/publish/missing_exports/publish.out @@ -0,0 +1,8 @@ +Warning "exports" field should be specified when specifying a "name". + at file:///[WILDLINE]/deno.json +error: You did not specify an entrypoint in file:///[WILDLINE]/deno.json. Add `exports` mapping in the configuration file, eg: +{ + "name": "@foo/bar", + "version": "@foo/bar", + "exports": "mod.ts" +} diff --git a/tests/specs/publish/missing_name/__test__.jsonc b/tests/specs/publish/missing_name/__test__.jsonc new file mode 100644 index 00000000000000..241bb87e044023 --- /dev/null +++ b/tests/specs/publish/missing_name/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "publish --token 'sadfasdf'", + "output": "publish.out", + "exitCode": 1 +} diff --git a/tests/specs/publish/missing_name/deno.json b/tests/specs/publish/missing_name/deno.json new file mode 100644 index 00000000000000..4b0018cf627cca --- /dev/null +++ b/tests/specs/publish/missing_name/deno.json @@ -0,0 +1,4 @@ +{ + "version": "1.0.0", + "exports": "./mod.ts" +} diff --git a/tests/specs/publish/missing_name/mod.ts b/tests/specs/publish/missing_name/mod.ts new file mode 100644 index 00000000000000..8d9b8a22a101a9 --- /dev/null +++ b/tests/specs/publish/missing_name/mod.ts @@ -0,0 +1,3 @@ +export function add(a: number, b: number): number { + return a + b; +} diff --git a/tests/specs/publish/missing_name/publish.out b/tests/specs/publish/missing_name/publish.out new file mode 100644 index 00000000000000..10e0688ef2f415 --- /dev/null +++ b/tests/specs/publish/missing_name/publish.out @@ -0,0 +1 @@ +error: Missing 'name' field in 'file:///[WILDCARD]deno.json'. diff --git a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/__test__.jsonc b/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/__test__.jsonc index 91408a73020a2e..b0ec62143678e3 100644 --- a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/__test__.jsonc +++ b/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/__test__.jsonc @@ -1,4 +1,5 @@ { + "tempDir": true, "tests": { "dep_and_workspace_dep": { "steps": [{ diff --git a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/.deno/.deno.lock.poll b/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/.deno/.deno.lock.poll deleted file mode 100644 index 56a6051ca2b02b..00000000000000 --- a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/.deno/.deno.lock.poll +++ /dev/null @@ -1 +0,0 @@ -1 \ No newline at end of file diff --git a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/.deno/.setup-cache.bin b/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/.deno/.setup-cache.bin deleted file mode 100644 index 4ac5fc6cf890b4..00000000000000 Binary files a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/.deno/.setup-cache.bin and /dev/null differ diff --git a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/add b/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/add deleted file mode 120000 index 7b086589dfdbd9..00000000000000 --- a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/add +++ /dev/null @@ -1 +0,0 @@ -../add \ No newline at end of file diff --git a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/add-dep b/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/add-dep deleted file mode 120000 index 7b086589dfdbd9..00000000000000 --- a/tests/specs/publish/npm_workspace_jsr_pkg_with_npm_dep/node_modules/add-dep +++ /dev/null @@ -1 +0,0 @@ -../add \ No newline at end of file diff --git a/tests/specs/publish/prefer_fast_check_graph/main.out b/tests/specs/publish/prefer_fast_check_graph/main.out index dd7d052c923a67..3ff4d33a30c416 100644 --- a/tests/specs/publish/prefer_fast_check_graph/main.out +++ b/tests/specs/publish/prefer_fast_check_graph/main.out @@ -13,7 +13,7 @@ error[invalid-external-import]: invalid import to a non-JSR 'https' specifier info: the import was resolved to 'https://deno.land/std/assert/assert.ts' info: this specifier is not allowed to be imported on jsr - info: jsr only supports importing `jsr:`, `npm:`, and `data:` specifiers + info: jsr only supports importing `jsr:`, `npm:`, `data:`, `bun:`, and `node:` specifiers docs: https://jsr.io/go/invalid-external-import error: Found 1 problem diff --git a/tests/specs/publish/set_version/multiple_packages/LICENSE b/tests/specs/publish/set_version/multiple_packages/LICENSE new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/tests/specs/publish/set_version/multiple_packages/__test__.jsonc b/tests/specs/publish/set_version/multiple_packages/__test__.jsonc new file mode 100644 index 00000000000000..c191386d80fbc3 --- /dev/null +++ b/tests/specs/publish/set_version/multiple_packages/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "publish --set-version 1.1.0 --token 'sadfasdf'", + "output": "error_set_version.out", + "exitCode": 1 +} diff --git a/tests/specs/publish/set_version/multiple_packages/deno.json b/tests/specs/publish/set_version/multiple_packages/deno.json new file mode 100644 index 00000000000000..4b3ffe44da36d4 --- /dev/null +++ b/tests/specs/publish/set_version/multiple_packages/deno.json @@ -0,0 +1,8 @@ +{ + "workspace": { + "members": [ + "packages/package1", + "packages/package2" + ] + } +} diff --git a/tests/specs/publish/set_version/multiple_packages/error_set_version.out b/tests/specs/publish/set_version/multiple_packages/error_set_version.out new file mode 100644 index 00000000000000..098692c4c6256b --- /dev/null +++ b/tests/specs/publish/set_version/multiple_packages/error_set_version.out @@ -0,0 +1 @@ +error: Cannot use --set-version when publishing a workspace. Change your cwd to an individual package instead. diff --git a/tests/specs/publish/set_version/multiple_packages/packages/package1/deno.json b/tests/specs/publish/set_version/multiple_packages/packages/package1/deno.json new file mode 100644 index 00000000000000..737fc9c1393dc7 --- /dev/null +++ b/tests/specs/publish/set_version/multiple_packages/packages/package1/deno.json @@ -0,0 +1,7 @@ +{ + "name": "@foo/package1", + "version": "1.0.0", + "exports": { + ".": "./mod.ts" + } +} diff --git a/tests/specs/publish/set_version/multiple_packages/packages/package1/mod.ts b/tests/specs/publish/set_version/multiple_packages/packages/package1/mod.ts new file mode 100644 index 00000000000000..a2cd81bed7f3ce --- /dev/null +++ b/tests/specs/publish/set_version/multiple_packages/packages/package1/mod.ts @@ -0,0 +1,3 @@ +export function package1() { + return "package1"; +} diff --git a/tests/specs/publish/set_version/multiple_packages/packages/package2/deno.json b/tests/specs/publish/set_version/multiple_packages/packages/package2/deno.json new file mode 100644 index 00000000000000..16987e6194f3e9 --- /dev/null +++ b/tests/specs/publish/set_version/multiple_packages/packages/package2/deno.json @@ -0,0 +1,7 @@ +{ + "name": "@foo/package2", + "version": "1.0.0", + "exports": { + ".": "./mod.ts" + } +} diff --git a/tests/specs/publish/set_version/multiple_packages/packages/package2/mod.ts b/tests/specs/publish/set_version/multiple_packages/packages/package2/mod.ts new file mode 100644 index 00000000000000..6c1361aa42afdb --- /dev/null +++ b/tests/specs/publish/set_version/multiple_packages/packages/package2/mod.ts @@ -0,0 +1,3 @@ +export function package2() { + return "package2"; +} diff --git a/tests/specs/publish/set_version/success/LICENSE b/tests/specs/publish/set_version/success/LICENSE new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/tests/specs/publish/set_version/success/__test__.jsonc b/tests/specs/publish/set_version/success/__test__.jsonc new file mode 100644 index 00000000000000..6f0bf802e7290c --- /dev/null +++ b/tests/specs/publish/set_version/success/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "publish --set-version 1.1.0 --token 'sadfasdf'", + "output": "successful_set_version.out" +} diff --git a/tests/specs/publish/set_version/success/deno.json b/tests/specs/publish/set_version/success/deno.json new file mode 100644 index 00000000000000..fefab899bdbebf --- /dev/null +++ b/tests/specs/publish/set_version/success/deno.json @@ -0,0 +1,10 @@ +{ + "name": "@foo/bar", + "version": "1.0.0", + "exports": { + ".": "./mod.ts" + }, + "imports": { + "@std/http": "./std_http.ts" + } +} diff --git a/tests/specs/publish/set_version/success/mod.ts b/tests/specs/publish/set_version/success/mod.ts new file mode 100644 index 00000000000000..6e8a61bae92273 --- /dev/null +++ b/tests/specs/publish/set_version/success/mod.ts @@ -0,0 +1,7 @@ +import http from "@std/http"; + +export function foobar(): { fileServer(): void } { + return { + fileServer: http.fileServer, + }; +} diff --git a/tests/specs/publish/set_version/success/std_http.ts b/tests/specs/publish/set_version/success/std_http.ts new file mode 100644 index 00000000000000..9d57b36f34eaf9 --- /dev/null +++ b/tests/specs/publish/set_version/success/std_http.ts @@ -0,0 +1,6 @@ +// temp until we get jsr:@std/http in the test server +export default { + fileServer() { + console.log("Hi"); + }, +}; diff --git a/tests/specs/publish/set_version/success/successful_set_version.out b/tests/specs/publish/set_version/success/successful_set_version.out new file mode 100644 index 00000000000000..a5cb9aa821043e --- /dev/null +++ b/tests/specs/publish/set_version/success/successful_set_version.out @@ -0,0 +1,6 @@ +Check file:///[WILDCARD]/success/mod.ts +Checking for slow types in the public API... +Check file:///[WILDCARD]/success/mod.ts +Publishing @foo/bar@1.1.0 ... +Successfully published @foo/bar@1.1.0 +Visit http://127.0.0.1:4250/@foo/bar@1.1.0 for details diff --git a/tests/specs/publish/sloppy_imports/sloppy_imports_not_enabled.out b/tests/specs/publish/sloppy_imports/sloppy_imports_not_enabled.out index 4eacbea65503e4..8388e4751e99c0 100644 --- a/tests/specs/publish/sloppy_imports/sloppy_imports_not_enabled.out +++ b/tests/specs/publish/sloppy_imports/sloppy_imports_not_enabled.out @@ -1,2 +1,3 @@ -error: [WILDCARD] Maybe specify path to 'index.ts' file in directory instead or run with --unstable-sloppy-imports - at file:///[WILDCARD]/mod.ts:1:20 +Check file:///[WILDLINE]/mod.ts +error: TS2307 [ERROR]: Cannot find module 'file:///[WILDLINE]/b'. Maybe specify path to 'index.ts' file in directory instead or run with --unstable-sloppy-imports + at file:///[WILDLINE]/mod.ts:1:20 diff --git a/tests/specs/repl/console_log/093_console_log_format.js b/tests/specs/repl/console_log/093_console_log_format.js index 15022411ca3e90..3ac998802344ef 100644 --- a/tests/specs/repl/console_log/093_console_log_format.js +++ b/tests/specs/repl/console_log/093_console_log_format.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. class Frac { constructor(num, den) { this.num = num; diff --git a/tests/specs/run/045_proxy/programmatic_proxy_client.ts b/tests/specs/run/045_proxy/programmatic_proxy_client.ts index 73af590c71e0ea..c2384407550129 100644 --- a/tests/specs/run/045_proxy/programmatic_proxy_client.ts +++ b/tests/specs/run/045_proxy/programmatic_proxy_client.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. const client = Deno.createHttpClient({ proxy: { diff --git a/tests/specs/run/045_proxy/proxy_client.ts b/tests/specs/run/045_proxy/proxy_client.ts index 41deae2a5dbc6d..13fcc134ba94c0 100644 --- a/tests/specs/run/045_proxy/proxy_client.ts +++ b/tests/specs/run/045_proxy/proxy_client.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. const res = await fetch( "http://localhost:4545/run/045_mod.ts", ); diff --git a/tests/specs/run/045_proxy/proxy_test.ts b/tests/specs/run/045_proxy/proxy_test.ts index 22115a3aa81143..04f4c9d06dff63 100644 --- a/tests/specs/run/045_proxy/proxy_test.ts +++ b/tests/specs/run/045_proxy/proxy_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. const addr = Deno.args[1] || "localhost:4555"; function proxyServer() { diff --git a/tests/specs/run/_070_location/070_location.ts.out b/tests/specs/run/_070_location/070_location.ts.out index a03cf6477c092d..c5750973fb256a 100644 --- a/tests/specs/run/_070_location/070_location.ts.out +++ b/tests/specs/run/_070_location/070_location.ts.out @@ -11,5 +11,5 @@ Location { protocol: "https:", search: "?baz" } -NotSupportedError: Cannot set "location". -NotSupportedError: Cannot set "location.hostname". +NotSupportedError: Cannot set "location" +NotSupportedError: Cannot set "location.hostname" diff --git a/tests/specs/run/allow_env_wildcard_worker/__test__.jsonc b/tests/specs/run/allow_env_wildcard_worker/__test__.jsonc new file mode 100644 index 00000000000000..6cfde6207f746a --- /dev/null +++ b/tests/specs/run/allow_env_wildcard_worker/__test__.jsonc @@ -0,0 +1,10 @@ +{ + "envs": { + "DENO_HELLO": "hello", + "DENO_BYE": "bye", + "AWS_HELLO": "aws" + }, + "args": "run --allow-env --allow-read --unstable-worker-options main.js", + "output": "main.out", + "exitCode": 1 +} diff --git a/tests/specs/run/allow_env_wildcard_worker/main.js b/tests/specs/run/allow_env_wildcard_worker/main.js new file mode 100644 index 00000000000000..8d1a45fa61fc52 --- /dev/null +++ b/tests/specs/run/allow_env_wildcard_worker/main.js @@ -0,0 +1,12 @@ +console.log("main1", Deno.env.get("DENO_HELLO")); +console.log("main2", Deno.env.get("DENO_BYE")); +console.log("main3", Deno.env.get("AWS_HELLO")); + +new Worker(import.meta.resolve("./worker.js"), { + type: "module", + deno: { + permissions: { + env: ["DENO_*"], + }, + }, +}); diff --git a/tests/specs/run/allow_env_wildcard_worker/main.out b/tests/specs/run/allow_env_wildcard_worker/main.out new file mode 100644 index 00000000000000..01a7c42e398be3 --- /dev/null +++ b/tests/specs/run/allow_env_wildcard_worker/main.out @@ -0,0 +1,11 @@ +main1 hello +main2 bye +main3 aws +worker1 hello +worker2 bye +error: Uncaught (in worker "") (in promise) NotCapable: Requires env access to "AWS_HELLO", run again with the --allow-env flag +console.log("worker3", Deno.env.get("AWS_HELLO")); + ^ +[WILDCARD] +error: Uncaught (in promise) Error: Unhandled error in child worker. +[WILDCARD] diff --git a/tests/specs/run/allow_env_wildcard_worker/worker.js b/tests/specs/run/allow_env_wildcard_worker/worker.js new file mode 100644 index 00000000000000..0238cbf6dc7b2d --- /dev/null +++ b/tests/specs/run/allow_env_wildcard_worker/worker.js @@ -0,0 +1,3 @@ +console.log("worker1", Deno.env.get("DENO_HELLO")); +console.log("worker2", Deno.env.get("DENO_BYE")); +console.log("worker3", Deno.env.get("AWS_HELLO")); diff --git a/tests/specs/run/decorators/experimental/__test__.jsonc b/tests/specs/run/decorators/experimental/__test__.jsonc new file mode 100644 index 00000000000000..c84a16bbaa886e --- /dev/null +++ b/tests/specs/run/decorators/experimental/__test__.jsonc @@ -0,0 +1,16 @@ +{ + "tests": { + "no_check": { + "args": "run --quiet --reload --no-check no_check/main.ts", + "output": "no_check/main.out" + }, + "ts": { + "args": "run --reload --check ts/main.ts", + "output": "ts/main.out" + }, + "runtime": { + "args": "run --quiet --reload --no-check runtime/main.ts", + "output": "runtime/main.out" + } + } +} diff --git a/tests/specs/run/decorators_tc39_proposal/decorators/experimental/deno.json b/tests/specs/run/decorators/experimental/deno.json similarity index 100% rename from tests/specs/run/decorators_tc39_proposal/decorators/experimental/deno.json rename to tests/specs/run/decorators/experimental/deno.json diff --git a/tests/specs/run/decorators_tc39_proposal/decorators/experimental/no_check/main.out b/tests/specs/run/decorators/experimental/no_check/main.out similarity index 100% rename from tests/specs/run/decorators_tc39_proposal/decorators/experimental/no_check/main.out rename to tests/specs/run/decorators/experimental/no_check/main.out diff --git a/tests/specs/run/decorators_tc39_proposal/decorators/experimental/no_check/main.ts b/tests/specs/run/decorators/experimental/no_check/main.ts similarity index 100% rename from tests/specs/run/decorators_tc39_proposal/decorators/experimental/no_check/main.ts rename to tests/specs/run/decorators/experimental/no_check/main.ts diff --git a/tests/specs/run/decorators_tc39_proposal/decorators/experimental/runtime/main.out b/tests/specs/run/decorators/experimental/runtime/main.out similarity index 100% rename from tests/specs/run/decorators_tc39_proposal/decorators/experimental/runtime/main.out rename to tests/specs/run/decorators/experimental/runtime/main.out diff --git a/tests/specs/run/decorators_tc39_proposal/decorators/experimental/runtime/main.ts b/tests/specs/run/decorators/experimental/runtime/main.ts similarity index 100% rename from tests/specs/run/decorators_tc39_proposal/decorators/experimental/runtime/main.ts rename to tests/specs/run/decorators/experimental/runtime/main.ts diff --git a/tests/specs/run/decorators_tc39_proposal/decorators/experimental/ts/main.out b/tests/specs/run/decorators/experimental/ts/main.out similarity index 100% rename from tests/specs/run/decorators_tc39_proposal/decorators/experimental/ts/main.out rename to tests/specs/run/decorators/experimental/ts/main.out diff --git a/tests/specs/run/decorators_tc39_proposal/decorators/experimental/ts/main.ts b/tests/specs/run/decorators/experimental/ts/main.ts similarity index 100% rename from tests/specs/run/decorators_tc39_proposal/decorators/experimental/ts/main.ts rename to tests/specs/run/decorators/experimental/ts/main.ts diff --git a/tests/specs/run/decorators/tc39_proposal/__test__.jsonc b/tests/specs/run/decorators/tc39_proposal/__test__.jsonc new file mode 100644 index 00000000000000..4ee3c2207a9e95 --- /dev/null +++ b/tests/specs/run/decorators/tc39_proposal/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "run --quiet --reload --check main.ts", + "output": "main.out" +} diff --git a/tests/specs/run/decorators_tc39_proposal/decorators/tc39_proposal/main.out b/tests/specs/run/decorators/tc39_proposal/main.out similarity index 100% rename from tests/specs/run/decorators_tc39_proposal/decorators/tc39_proposal/main.out rename to tests/specs/run/decorators/tc39_proposal/main.out diff --git a/tests/specs/run/decorators_tc39_proposal/decorators/tc39_proposal/main.ts b/tests/specs/run/decorators/tc39_proposal/main.ts similarity index 100% rename from tests/specs/run/decorators_tc39_proposal/decorators/tc39_proposal/main.ts rename to tests/specs/run/decorators/tc39_proposal/main.ts diff --git a/tests/specs/run/decorators_tc39_proposal/__test__.jsonc b/tests/specs/run/decorators_tc39_proposal/__test__.jsonc deleted file mode 100644 index 8e529695d9bda2..00000000000000 --- a/tests/specs/run/decorators_tc39_proposal/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --quiet --reload --check decorators/tc39_proposal/main.ts", - "output": "decorators/tc39_proposal/main.out" -} diff --git a/tests/specs/run/error_import_map_unable_to_load/import_maps/test_data.ts b/tests/specs/run/error_import_map_unable_to_load/import_maps/test_data.ts deleted file mode 100644 index 5e8efea69b7019..00000000000000 --- a/tests/specs/run/error_import_map_unable_to_load/import_maps/test_data.ts +++ /dev/null @@ -1 +0,0 @@ -import "test_server/import_maps/lodash/lodash.ts"; diff --git a/tests/specs/run/error_import_map_unable_to_load/import_maps/test_data.ts.out b/tests/specs/run/error_import_map_unable_to_load/import_maps/test_data.ts.out deleted file mode 100644 index da996dc0d9ef23..00000000000000 --- a/tests/specs/run/error_import_map_unable_to_load/import_maps/test_data.ts.out +++ /dev/null @@ -1 +0,0 @@ -Hello from remapped lodash! diff --git a/tests/specs/run/finalization_registry/finalization_registry.js b/tests/specs/run/finalization_registry/finalization_registry.js index ee9dc384f51cef..76d68d6df51436 100644 --- a/tests/specs/run/finalization_registry/finalization_registry.js +++ b/tests/specs/run/finalization_registry/finalization_registry.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. "use strict"; function assertEquals(a, b) { diff --git a/tests/specs/run/heapstats/heapstats.js b/tests/specs/run/heapstats/heapstats.js index b93c9c120d6b1e..c0dc0da81c7948 100644 --- a/tests/specs/run/heapstats/heapstats.js +++ b/tests/specs/run/heapstats/heapstats.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. "use strict"; function allocTest(alloc, allocAssert, deallocAssert) { diff --git a/tests/specs/run/import_common_js/exports_error.out b/tests/specs/run/import_common_js/exports_error.out index baa44682be52f6..b0bb7acebcc037 100644 --- a/tests/specs/run/import_common_js/exports_error.out +++ b/tests/specs/run/import_common_js/exports_error.out @@ -7,5 +7,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); package.json has a "type": "commonjs" option. hint: Rewrite this module to ESM, or change the file extension to .cjs, - or add package.json next to the file with "type": "commonjs" option. + or add package.json next to the file with "type": "commonjs" option, + or pass --unstable-detect-cjs flag to detect CommonJS when loading. docs: https://docs.deno.com/go/commonjs diff --git a/tests/specs/run/import_common_js/module_error.out b/tests/specs/run/import_common_js/module_error.out index 957b19cb1e6857..c1e9802520b9e7 100644 --- a/tests/specs/run/import_common_js/module_error.out +++ b/tests/specs/run/import_common_js/module_error.out @@ -7,5 +7,6 @@ module.exports = { package.json has a "type": "commonjs" option. hint: Rewrite this module to ESM, or change the file extension to .cjs, - or add package.json next to the file with "type": "commonjs" option. + or add package.json next to the file with "type": "commonjs" option, + or pass --unstable-detect-cjs flag to detect CommonJS when loading. docs: https://docs.deno.com/go/commonjs diff --git a/tests/specs/run/import_common_js/require_error.out b/tests/specs/run/import_common_js/require_error.out index e13db85e8e85df..f89adf082d1621 100644 --- a/tests/specs/run/import_common_js/require_error.out +++ b/tests/specs/run/import_common_js/require_error.out @@ -7,5 +7,6 @@ const process = require("process"); package.json has a "type": "commonjs" option. hint: Rewrite this module to ESM, or change the file extension to .cjs, - or add package.json next to the file with "type": "commonjs" option. + or add package.json next to the file with "type": "commonjs" option, + or pass --unstable-detect-cjs flag to detect CommonJS when loading. docs: https://docs.deno.com/go/commonjs diff --git a/tests/specs/run/jsx_import_source/__test__.jsonc b/tests/specs/run/jsx_import_source/__test__.jsonc new file mode 100644 index 00000000000000..0350df7f1782b0 --- /dev/null +++ b/tests/specs/run/jsx_import_source/__test__.jsonc @@ -0,0 +1,79 @@ +{ + "tempDir": true, + "tests": { + "jsx_import_source_error": { + "args": "run --config jsx/deno-jsx-error.jsonc --check jsx_import_source_no_pragma.tsx", + "output": "jsx_import_source_error.out", + "exitCode": 1 + }, + "jsx_import_source_precompile_import_map": { + "args": "run --allow-import --reload --check --import-map jsx/import-map.json --no-lock --config jsx/deno-jsx-precompile.jsonc jsx_precompile/no_pragma.tsx", + "output": "jsx_precompile/no_pragma.out" + }, + "jsx_import_source_precompile_import_map_skip_element": { + "args": "run --allow-import --reload --check --import-map jsx/import-map.json --no-lock --config jsx/deno-jsx-precompile-skip.jsonc jsx_precompile/skip.tsx", + "output": "jsx_precompile/skip.out" + }, + "jsx_import_source_pragma_with_dev_config": { + "args": "run --reload --allow-import --config jsx/deno-jsxdev.jsonc --no-lock jsx_import_source_pragma.tsx", + "output": "jsx_import_source_dev.out" + }, + "jsx_import_source_pragma_with_config_vendor_dir": { + "tempDir": true, + "args": "run --allow-import --reload --config jsx/deno-jsx.jsonc --no-lock --vendor jsx_import_source_pragma.tsx", + "output": "jsx_import_source.out" + }, + "jsx_import_source_pragma_with_config_no_check": { + "args": "run --allow-import --reload --config jsx/deno-jsx.jsonc --no-lock --no-check jsx_import_source_pragma.tsx", + "output": "jsx_import_source.out" + }, + "jsx_import_source_pragma_with_config": { + "args": "run --reload --allow-import --config jsx/deno-jsx.jsonc --no-lock jsx_import_source_pragma.tsx", + "output": "jsx_import_source.out" + }, + "jsx_import_source_pragma_no_check": { + "args": "run --allow-import --reload --no-check jsx_import_source_pragma.tsx", + "output": "jsx_import_source.out" + }, + "jsx_import_source_pragma_import_map_no_check": { + "args": "run --allow-import --reload --import-map jsx/import-map.json --no-check jsx_import_source_pragma_import_map.tsx", + "output": "jsx_import_source_import_map.out" + }, + "jsx_import_source_pragma_import_map_dev": { + "args": "run --allow-import --reload --import-map jsx/import-map.json --config jsx/deno-jsxdev-import-map.jsonc jsx_import_source_pragma_import_map.tsx", + "output": "jsx_import_source_import_map_dev.out" + }, + "jsx_import_source_pragma_import_map": { + "args": "run --allow-import --reload --import-map jsx/import-map.json jsx_import_source_pragma_import_map.tsx", + "output": "jsx_import_source_import_map.out" + }, + "jsx_import_source_pragma": { + "args": "run --reload --allow-import jsx_import_source_pragma.tsx", + "output": "jsx_import_source.out" + }, + "jsx_import_source_no_pragma_no_check": { + "args": "run --allow-import --reload --config jsx/deno-jsx.jsonc --no-lock --no-check jsx_import_source_no_pragma.tsx", + "output": "jsx_import_source.out" + }, + "jsx_import_source_no_pragma_dev": { + "args": "run --allow-import --reload --config jsx/deno-jsxdev.jsonc --no-lock jsx_import_source_no_pragma.tsx", + "output": "jsx_import_source_dev.out" + }, + "jsx_import_source_no_pragma": { + "args": "run --allow-import --reload --config jsx/deno-jsx.jsonc --no-lock jsx_import_source_no_pragma.tsx", + "output": "jsx_import_source.out" + }, + "jsx_import_source_import_map_no_check": { + "args": "run --allow-import --reload --import-map jsx/import-map.json --no-lock --config jsx/deno-jsx-import-map.jsonc --no-check jsx_import_source_no_pragma.tsx", + "output": "jsx_import_source_import_map.out" + }, + "jsx_import_source_import_map_dev": { + "args": "run --allow-import --reload --import-map jsx/import-map.json --no-lock --config jsx/deno-jsxdev-import-map.jsonc jsx_import_source_no_pragma.tsx", + "output": "jsx_import_source_import_map_dev.out" + }, + "jsx_import_source_import_map": { + "args": "run --allow-import --reload --import-map jsx/import-map.json --no-lock --config jsx/deno-jsx-import-map.jsonc jsx_import_source_no_pragma.tsx", + "output": "jsx_import_source_import_map.out" + } + } +} diff --git a/tests/specs/run/jsx_import_source_error/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source/jsx/deno-jsx-error.jsonc similarity index 100% rename from tests/specs/run/jsx_import_source_error/jsx/deno-jsx-error.jsonc rename to tests/specs/run/jsx_import_source/jsx/deno-jsx-error.jsonc diff --git a/tests/specs/run/jsx_import_source_error/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source/jsx/deno-jsx-import-map.jsonc similarity index 100% rename from tests/specs/run/jsx_import_source_error/jsx/deno-jsx-import-map.jsonc rename to tests/specs/run/jsx_import_source/jsx/deno-jsx-import-map.jsonc diff --git a/tests/specs/run/jsx_import_source_error/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source/jsx/deno-jsx-precompile-skip.jsonc similarity index 100% rename from tests/specs/run/jsx_import_source_error/jsx/deno-jsx-precompile-skip.jsonc rename to tests/specs/run/jsx_import_source/jsx/deno-jsx-precompile-skip.jsonc diff --git a/tests/specs/run/jsx_import_source_error/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source/jsx/deno-jsx-precompile.jsonc similarity index 100% rename from tests/specs/run/jsx_import_source_error/jsx/deno-jsx-precompile.jsonc rename to tests/specs/run/jsx_import_source/jsx/deno-jsx-precompile.jsonc diff --git a/tests/specs/run/jsx_import_source_error/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source/jsx/deno-jsx.json similarity index 100% rename from tests/specs/run/jsx_import_source_error/jsx/deno-jsx.json rename to tests/specs/run/jsx_import_source/jsx/deno-jsx.json diff --git a/tests/specs/run/jsx_import_source_error/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source/jsx/deno-jsx.jsonc similarity index 100% rename from tests/specs/run/jsx_import_source_error/jsx/deno-jsx.jsonc rename to tests/specs/run/jsx_import_source/jsx/deno-jsx.jsonc diff --git a/tests/specs/run/jsx_import_source_error/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source/jsx/deno-jsxdev-import-map.jsonc similarity index 100% rename from tests/specs/run/jsx_import_source_error/jsx/deno-jsxdev-import-map.jsonc rename to tests/specs/run/jsx_import_source/jsx/deno-jsxdev-import-map.jsonc diff --git a/tests/specs/run/jsx_import_source_error/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source/jsx/deno-jsxdev.jsonc similarity index 100% rename from tests/specs/run/jsx_import_source_error/jsx/deno-jsxdev.jsonc rename to tests/specs/run/jsx_import_source/jsx/deno-jsxdev.jsonc diff --git a/tests/specs/run/jsx_import_source_error/jsx/deno.lock b/tests/specs/run/jsx_import_source/jsx/deno.lock similarity index 100% rename from tests/specs/run/jsx_import_source_error/jsx/deno.lock rename to tests/specs/run/jsx_import_source/jsx/deno.lock diff --git a/tests/specs/run/jsx_import_source_error/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source/jsx/import-map-scoped.json similarity index 100% rename from tests/specs/run/jsx_import_source_error/jsx/import-map-scoped.json rename to tests/specs/run/jsx_import_source/jsx/import-map-scoped.json diff --git a/tests/specs/run/jsx_import_source_error/jsx/import-map.json b/tests/specs/run/jsx_import_source/jsx/import-map.json similarity index 100% rename from tests/specs/run/jsx_import_source_error/jsx/import-map.json rename to tests/specs/run/jsx_import_source/jsx/import-map.json diff --git a/tests/specs/run/jsx_import_source_error/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source/jsx/jsx-dev-runtime/index.ts similarity index 100% rename from tests/specs/run/jsx_import_source_error/jsx/jsx-dev-runtime/index.ts rename to tests/specs/run/jsx_import_source/jsx/jsx-dev-runtime/index.ts diff --git a/tests/specs/run/jsx_import_source_error/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source/jsx/jsx-precompile/index.ts similarity index 100% rename from tests/specs/run/jsx_import_source_error/jsx/jsx-precompile/index.ts rename to tests/specs/run/jsx_import_source/jsx/jsx-precompile/index.ts diff --git a/tests/specs/run/jsx_import_source_error/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source/jsx/jsx-runtime/index.ts similarity index 100% rename from tests/specs/run/jsx_import_source_error/jsx/jsx-runtime/index.ts rename to tests/specs/run/jsx_import_source/jsx/jsx-runtime/index.ts diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx_import_source.out b/tests/specs/run/jsx_import_source/jsx_import_source.out similarity index 100% rename from tests/specs/run/jsx_import_source_no_pragma/jsx_import_source.out rename to tests/specs/run/jsx_import_source/jsx_import_source.out diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx_import_source_dev.out b/tests/specs/run/jsx_import_source/jsx_import_source_dev.out similarity index 100% rename from tests/specs/run/jsx_import_source_no_pragma_dev/jsx_import_source_dev.out rename to tests/specs/run/jsx_import_source/jsx_import_source_dev.out diff --git a/tests/specs/run/jsx_import_source/jsx_import_source_error.out b/tests/specs/run/jsx_import_source/jsx_import_source_error.out new file mode 100644 index 00000000000000..cb673c6bc92ab5 --- /dev/null +++ b/tests/specs/run/jsx_import_source/jsx_import_source_error.out @@ -0,0 +1,3 @@ +Check file:///[WILDLINE]/jsx_import_source_no_pragma.tsx +error: TS2307 [ERROR]: Cannot find module 'file:///[WILDCARD]/nonexistent/jsx-runtime'. + at file:///[WILDLINE]/jsx_import_source_no_pragma.tsx:1:1 diff --git a/tests/specs/run/jsx_import_source_import_map/jsx_import_source_import_map.out b/tests/specs/run/jsx_import_source/jsx_import_source_import_map.out similarity index 100% rename from tests/specs/run/jsx_import_source_import_map/jsx_import_source_import_map.out rename to tests/specs/run/jsx_import_source/jsx_import_source_import_map.out diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx_import_source_import_map_dev.out b/tests/specs/run/jsx_import_source/jsx_import_source_import_map_dev.out similarity index 100% rename from tests/specs/run/jsx_import_source_import_map_dev/jsx_import_source_import_map_dev.out rename to tests/specs/run/jsx_import_source/jsx_import_source_import_map_dev.out diff --git a/tests/specs/run/jsx_import_source_error/jsx_import_source_no_pragma.tsx b/tests/specs/run/jsx_import_source/jsx_import_source_no_pragma.tsx similarity index 100% rename from tests/specs/run/jsx_import_source_error/jsx_import_source_no_pragma.tsx rename to tests/specs/run/jsx_import_source/jsx_import_source_no_pragma.tsx diff --git a/tests/specs/run/jsx_import_source_pragma/jsx_import_source_pragma.tsx b/tests/specs/run/jsx_import_source/jsx_import_source_pragma.tsx similarity index 100% rename from tests/specs/run/jsx_import_source_pragma/jsx_import_source_pragma.tsx rename to tests/specs/run/jsx_import_source/jsx_import_source_pragma.tsx diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx_import_source_pragma_import_map.tsx b/tests/specs/run/jsx_import_source/jsx_import_source_pragma_import_map.tsx similarity index 100% rename from tests/specs/run/jsx_import_source_pragma_import_map/jsx_import_source_pragma_import_map.tsx rename to tests/specs/run/jsx_import_source/jsx_import_source_pragma_import_map.tsx diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx_precompile/no_pragma.out b/tests/specs/run/jsx_import_source/jsx_precompile/no_pragma.out similarity index 100% rename from tests/specs/run/jsx_import_source_precompile_import_map/jsx_precompile/no_pragma.out rename to tests/specs/run/jsx_import_source/jsx_precompile/no_pragma.out diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx_precompile/no_pragma.tsx b/tests/specs/run/jsx_import_source/jsx_precompile/no_pragma.tsx similarity index 100% rename from tests/specs/run/jsx_import_source_precompile_import_map/jsx_precompile/no_pragma.tsx rename to tests/specs/run/jsx_import_source/jsx_precompile/no_pragma.tsx diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx_precompile/skip.out b/tests/specs/run/jsx_import_source/jsx_precompile/skip.out similarity index 100% rename from tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx_precompile/skip.out rename to tests/specs/run/jsx_import_source/jsx_precompile/skip.out diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx_precompile/skip.tsx b/tests/specs/run/jsx_import_source/jsx_precompile/skip.tsx similarity index 100% rename from tests/specs/run/jsx_import_source_precompile_import_map/jsx_precompile/skip.tsx rename to tests/specs/run/jsx_import_source/jsx_precompile/skip.tsx diff --git a/tests/specs/run/jsx_import_source_error/__test__.jsonc b/tests/specs/run/jsx_import_source_error/__test__.jsonc deleted file mode 100644 index 22b1d29cab11d5..00000000000000 --- a/tests/specs/run/jsx_import_source_error/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "run --config jsx/deno-jsx-error.jsonc --check jsx_import_source_no_pragma.tsx", - "output": "jsx_import_source_error.out", - "exitCode": 1 -} diff --git a/tests/specs/run/jsx_import_source_error/jsx_import_source_error.out b/tests/specs/run/jsx_import_source_error/jsx_import_source_error.out deleted file mode 100644 index 634a5b09badfb4..00000000000000 --- a/tests/specs/run/jsx_import_source_error/jsx_import_source_error.out +++ /dev/null @@ -1,2 +0,0 @@ -error: Module not found "file:///[WILDCARD]/nonexistent/jsx-runtime". - at file:///[WILDCARD]/jsx_import_source_no_pragma.tsx:1:1 diff --git a/tests/specs/run/jsx_import_source_import_map/__test__.jsonc b/tests/specs/run/jsx_import_source_import_map/__test__.jsonc deleted file mode 100644 index 8a62c5243bf8c4..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-import --reload --import-map jsx/import-map.json --no-lock --config jsx/deno-jsx-import-map.jsonc jsx_import_source_no_pragma.tsx", - "output": "jsx_import_source_import_map.out" -} diff --git a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map/jsx/deno.lock b/tests/specs/run/jsx_import_source_import_map/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_import_map/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_import_map/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_import_map/jsx/import-map.json b/tests/specs/run/jsx_import_source_import_map/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_import_map/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_import_map/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_import_map/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_import_map/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_import_map/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_import_map/jsx_import_source_no_pragma.tsx b/tests/specs/run/jsx_import_source_import_map/jsx_import_source_no_pragma.tsx deleted file mode 100644 index 2c756054fbccf2..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map/jsx_import_source_no_pragma.tsx +++ /dev/null @@ -1,7 +0,0 @@ -function A() { - return "hello"; -} - -export function B() { - return ; -} diff --git a/tests/specs/run/jsx_import_source_import_map_dev/__test__.jsonc b/tests/specs/run/jsx_import_source_import_map_dev/__test__.jsonc deleted file mode 100644 index b62e7cb6f36ed8..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-import --reload --import-map jsx/import-map.json --no-lock --config jsx/deno-jsxdev-import-map.jsonc jsx_import_source_no_pragma.tsx", - "output": "jsx_import_source_import_map_dev.out" -} diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno.lock b/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_import_map_dev/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx/import-map.json b/tests/specs/run/jsx_import_source_import_map_dev/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_import_map_dev/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_import_map_dev/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_import_map_dev/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_import_map_dev/jsx_import_source_no_pragma.tsx b/tests/specs/run/jsx_import_source_import_map_dev/jsx_import_source_no_pragma.tsx deleted file mode 100644 index 2c756054fbccf2..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_dev/jsx_import_source_no_pragma.tsx +++ /dev/null @@ -1,7 +0,0 @@ -function A() { - return "hello"; -} - -export function B() { - return ; -} diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/__test__.jsonc b/tests/specs/run/jsx_import_source_import_map_no_check/__test__.jsonc deleted file mode 100644 index ea426548484603..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-import --reload --import-map jsx/import-map.json --no-lock --config jsx/deno-jsx-import-map.jsonc --no-check jsx_import_source_no_pragma.tsx", - "output": "jsx_import_source_import_map.out" -} diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno.lock b/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_import_map_no_check/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/import-map.json b/tests/specs/run/jsx_import_source_import_map_no_check/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_import_map_no_check/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_import_map_no_check/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_import_map_no_check/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx_import_source_import_map.out b/tests/specs/run/jsx_import_source_import_map_no_check/jsx_import_source_import_map.out deleted file mode 100644 index 0d32389677a130..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx_import_source_import_map.out +++ /dev/null @@ -1,2 +0,0 @@ -[WILDCARD] -imported http://localhost:4545/jsx/jsx-runtime/index.ts diff --git a/tests/specs/run/jsx_import_source_import_map_no_check/jsx_import_source_no_pragma.tsx b/tests/specs/run/jsx_import_source_import_map_no_check/jsx_import_source_no_pragma.tsx deleted file mode 100644 index 2c756054fbccf2..00000000000000 --- a/tests/specs/run/jsx_import_source_import_map_no_check/jsx_import_source_no_pragma.tsx +++ /dev/null @@ -1,7 +0,0 @@ -function A() { - return "hello"; -} - -export function B() { - return ; -} diff --git a/tests/specs/run/jsx_import_source_no_pragma/__test__.jsonc b/tests/specs/run/jsx_import_source_no_pragma/__test__.jsonc deleted file mode 100644 index 7678e18f46c8fe..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-import --reload --config jsx/deno-jsx.jsonc --no-lock jsx_import_source_no_pragma.tsx", - "output": "jsx_import_source.out" -} diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno.lock b/tests/specs/run/jsx_import_source_no_pragma/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_no_pragma/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx/import-map.json b/tests/specs/run/jsx_import_source_no_pragma/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_no_pragma/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_no_pragma/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_no_pragma/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_no_pragma/jsx_import_source_no_pragma.tsx b/tests/specs/run/jsx_import_source_no_pragma/jsx_import_source_no_pragma.tsx deleted file mode 100644 index 2c756054fbccf2..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma/jsx_import_source_no_pragma.tsx +++ /dev/null @@ -1,7 +0,0 @@ -function A() { - return "hello"; -} - -export function B() { - return ; -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/__test__.jsonc b/tests/specs/run/jsx_import_source_no_pragma_dev/__test__.jsonc deleted file mode 100644 index 8f9ee81f69b46b..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-import --reload --config jsx/deno-jsxdev.jsonc --no-lock jsx_import_source_no_pragma.tsx", - "output": "jsx_import_source_dev.out" -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno.lock b/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/import-map.json b/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx_import_source_no_pragma.tsx b/tests/specs/run/jsx_import_source_no_pragma_dev/jsx_import_source_no_pragma.tsx deleted file mode 100644 index 2c756054fbccf2..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_dev/jsx_import_source_no_pragma.tsx +++ /dev/null @@ -1,7 +0,0 @@ -function A() { - return "hello"; -} - -export function B() { - return ; -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/__test__.jsonc b/tests/specs/run/jsx_import_source_no_pragma_no_check/__test__.jsonc deleted file mode 100644 index 12cc9b07641fcd..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-import --reload --config jsx/deno-jsx.jsonc --no-lock --no-check jsx_import_source_no_pragma.tsx", - "output": "jsx_import_source.out" -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno.lock b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/import-map.json b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx_import_source.out b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx_import_source.out deleted file mode 100644 index b9555987a65550..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx_import_source.out +++ /dev/null @@ -1,2 +0,0 @@ -[WILDCARD] -imported http://localhost:4545/jsx/jsx-runtime diff --git a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx_import_source_no_pragma.tsx b/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx_import_source_no_pragma.tsx deleted file mode 100644 index 2c756054fbccf2..00000000000000 --- a/tests/specs/run/jsx_import_source_no_pragma_no_check/jsx_import_source_no_pragma.tsx +++ /dev/null @@ -1,7 +0,0 @@ -function A() { - return "hello"; -} - -export function B() { - return ; -} diff --git a/tests/specs/run/jsx_import_source_pragma/__test__.jsonc b/tests/specs/run/jsx_import_source_pragma/__test__.jsonc deleted file mode 100644 index 9d704c06504c40..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --reload --allow-import jsx_import_source_pragma.tsx", - "output": "jsx_import_source.out" -} diff --git a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma/jsx/deno.lock b/tests/specs/run/jsx_import_source_pragma/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_pragma/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_pragma/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma/jsx/import-map.json b/tests/specs/run/jsx_import_source_pragma/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_pragma/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma/jsx_import_source.out b/tests/specs/run/jsx_import_source_pragma/jsx_import_source.out deleted file mode 100644 index b9555987a65550..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma/jsx_import_source.out +++ /dev/null @@ -1,2 +0,0 @@ -[WILDCARD] -imported http://localhost:4545/jsx/jsx-runtime diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/__test__.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map/__test__.jsonc deleted file mode 100644 index 9eafe519688224..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-import --reload --import-map jsx/import-map.json jsx_import_source_pragma_import_map.tsx", - "output": "jsx_import_source_import_map.out" -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno.lock b/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_pragma_import_map/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/import-map.json b/tests/specs/run/jsx_import_source_pragma_import_map/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_import_map/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_pragma_import_map/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_import_map/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_import_map/jsx_import_source_import_map.out b/tests/specs/run/jsx_import_source_pragma_import_map/jsx_import_source_import_map.out deleted file mode 100644 index 0d32389677a130..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map/jsx_import_source_import_map.out +++ /dev/null @@ -1,2 +0,0 @@ -[WILDCARD] -imported http://localhost:4545/jsx/jsx-runtime/index.ts diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/__test__.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_dev/__test__.jsonc deleted file mode 100644 index bb271c0eef96fe..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-import --reload --import-map jsx/import-map.json --config jsx/deno-jsxdev-import-map.jsonc jsx_import_source_pragma_import_map.tsx", - "output": "jsx_import_source_import_map_dev.out" -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno.lock b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/import-map.json b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx_import_source_import_map_dev.out b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx_import_source_import_map_dev.out deleted file mode 100644 index 56f514d90cefbc..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx_import_source_import_map_dev.out +++ /dev/null @@ -1,2 +0,0 @@ -[WILDCARD] -imported http://localhost:4545/jsx/jsx-dev-runtime/index.ts diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx_import_source_pragma_import_map.tsx b/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx_import_source_pragma_import_map.tsx deleted file mode 100644 index 548365f182a1cd..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_dev/jsx_import_source_pragma_import_map.tsx +++ /dev/null @@ -1,9 +0,0 @@ -/** @jsxImportSource jsx */ - -function A() { - return "hello"; -} - -export function B() { - return ; -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/__test__.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/__test__.jsonc deleted file mode 100644 index dd42b71fda4ea5..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-import --reload --import-map jsx/import-map.json --no-check jsx_import_source_pragma_import_map.tsx", - "output": "jsx_import_source_import_map.out" -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno.lock b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/import-map.json b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx_import_source_import_map.out b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx_import_source_import_map.out deleted file mode 100644 index 0d32389677a130..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx_import_source_import_map.out +++ /dev/null @@ -1,2 +0,0 @@ -[WILDCARD] -imported http://localhost:4545/jsx/jsx-runtime/index.ts diff --git a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx_import_source_pragma_import_map.tsx b/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx_import_source_pragma_import_map.tsx deleted file mode 100644 index 548365f182a1cd..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_import_map_no_check/jsx_import_source_pragma_import_map.tsx +++ /dev/null @@ -1,9 +0,0 @@ -/** @jsxImportSource jsx */ - -function A() { - return "hello"; -} - -export function B() { - return ; -} diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/__test__.jsonc b/tests/specs/run/jsx_import_source_pragma_no_check/__test__.jsonc deleted file mode 100644 index 0956b94a7600b1..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-import --reload --no-check jsx_import_source_pragma.tsx", - "output": "jsx_import_source.out" -} diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno.lock b/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_pragma_no_check/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/import-map.json b/tests/specs/run/jsx_import_source_pragma_no_check/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_no_check/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_pragma_no_check/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_no_check/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx_import_source.out b/tests/specs/run/jsx_import_source_pragma_no_check/jsx_import_source.out deleted file mode 100644 index b9555987a65550..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx_import_source.out +++ /dev/null @@ -1,2 +0,0 @@ -[WILDCARD] -imported http://localhost:4545/jsx/jsx-runtime diff --git a/tests/specs/run/jsx_import_source_pragma_no_check/jsx_import_source_pragma.tsx b/tests/specs/run/jsx_import_source_pragma_no_check/jsx_import_source_pragma.tsx deleted file mode 100644 index c19e53d4ff5e6b..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_no_check/jsx_import_source_pragma.tsx +++ /dev/null @@ -1,9 +0,0 @@ -/** @jsxImportSource http://localhost:4545/jsx */ - -function A() { - return "hello"; -} - -export function B() { - return ; -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/__test__.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config/__test__.jsonc deleted file mode 100644 index aeaf209c3a2a35..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --reload --allow-import --config jsx/deno-jsx.jsonc --no-lock jsx_import_source_pragma.tsx", - "output": "jsx_import_source.out" -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno.lock b/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_pragma_with_config/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/import-map.json b/tests/specs/run/jsx_import_source_pragma_with_config/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_with_config/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_pragma_with_config/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_with_config/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx_import_source.out b/tests/specs/run/jsx_import_source_pragma_with_config/jsx_import_source.out deleted file mode 100644 index b9555987a65550..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx_import_source.out +++ /dev/null @@ -1,2 +0,0 @@ -[WILDCARD] -imported http://localhost:4545/jsx/jsx-runtime diff --git a/tests/specs/run/jsx_import_source_pragma_with_config/jsx_import_source_pragma.tsx b/tests/specs/run/jsx_import_source_pragma_with_config/jsx_import_source_pragma.tsx deleted file mode 100644 index c19e53d4ff5e6b..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config/jsx_import_source_pragma.tsx +++ /dev/null @@ -1,9 +0,0 @@ -/** @jsxImportSource http://localhost:4545/jsx */ - -function A() { - return "hello"; -} - -export function B() { - return ; -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/__test__.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/__test__.jsonc deleted file mode 100644 index 3e8089fd2cd2d8..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-import --reload --config jsx/deno-jsx.jsonc --no-lock --no-check jsx_import_source_pragma.tsx", - "output": "jsx_import_source.out" -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno.lock b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/import-map.json b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx_import_source.out b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx_import_source.out deleted file mode 100644 index b9555987a65550..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx_import_source.out +++ /dev/null @@ -1,2 +0,0 @@ -[WILDCARD] -imported http://localhost:4545/jsx/jsx-runtime diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx_import_source_pragma.tsx b/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx_import_source_pragma.tsx deleted file mode 100644 index c19e53d4ff5e6b..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_no_check/jsx_import_source_pragma.tsx +++ /dev/null @@ -1,9 +0,0 @@ -/** @jsxImportSource http://localhost:4545/jsx */ - -function A() { - return "hello"; -} - -export function B() { - return ; -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/__test__.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/__test__.jsonc deleted file mode 100644 index 03ed1af1b63ac6..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-import --reload --config jsx/deno-jsx.jsonc --no-lock --vendor jsx_import_source_pragma.tsx", - "output": "jsx_import_source.out" -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno.lock b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/import-map.json b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/vendor/http_localhost_4545/jsx/#jsx-runtime_62ac8.js b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/vendor/http_localhost_4545/jsx/#jsx-runtime_62ac8.js deleted file mode 100644 index c8f0a908db2091..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/vendor/http_localhost_4545/jsx/#jsx-runtime_62ac8.js +++ /dev/null @@ -1,11 +0,0 @@ -export function jsx( - _type, - _props, - _key, - _source, - _self, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/vendor/manifest.json b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/vendor/manifest.json deleted file mode 100644 index a770c3366900ca..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx/vendor/manifest.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "modules": { - "http://localhost:4545/jsx/jsx-runtime": { - "headers": { - "content-type": "application/javascript" - } - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx_import_source.out b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx_import_source.out deleted file mode 100644 index b9555987a65550..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx_import_source.out +++ /dev/null @@ -1,2 +0,0 @@ -[WILDCARD] -imported http://localhost:4545/jsx/jsx-runtime diff --git a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx_import_source_pragma.tsx b/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx_import_source_pragma.tsx deleted file mode 100644 index c19e53d4ff5e6b..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_config_vendor_dir/jsx_import_source_pragma.tsx +++ /dev/null @@ -1,9 +0,0 @@ -/** @jsxImportSource http://localhost:4545/jsx */ - -function A() { - return "hello"; -} - -export function B() { - return ; -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/__test__.jsonc b/tests/specs/run/jsx_import_source_pragma_with_dev_config/__test__.jsonc deleted file mode 100644 index 56734e4678051c..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --reload --allow-import --config jsx/deno-jsxdev.jsonc --no-lock jsx_import_source_pragma.tsx", - "output": "jsx_import_source_dev.out" -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno.lock b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/import-map.json b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx_import_source_dev.out b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx_import_source_dev.out deleted file mode 100644 index 38d7a12f0585e3..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx_import_source_dev.out +++ /dev/null @@ -1,2 +0,0 @@ -[WILDCARD] -imported http://localhost:4545/jsx/jsx-dev-runtime diff --git a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx_import_source_pragma.tsx b/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx_import_source_pragma.tsx deleted file mode 100644 index c19e53d4ff5e6b..00000000000000 --- a/tests/specs/run/jsx_import_source_pragma_with_dev_config/jsx_import_source_pragma.tsx +++ /dev/null @@ -1,9 +0,0 @@ -/** @jsxImportSource http://localhost:4545/jsx */ - -function A() { - return "hello"; -} - -export function B() { - return ; -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/__test__.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map/__test__.jsonc deleted file mode 100644 index c795a9d8e69e36..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-import --reload --check --import-map jsx/import-map.json --no-lock --config jsx/deno-jsx-precompile.jsonc jsx_precompile/no_pragma.tsx", - "output": "jsx_precompile/no_pragma.out" -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno.lock b/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_precompile_import_map/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/import-map.json b/tests/specs/run/jsx_import_source_precompile_import_map/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_precompile_import_map/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_precompile_import_map/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_precompile_import_map/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_precompile_import_map/jsx_precompile/skip.out b/tests/specs/run/jsx_import_source_precompile_import_map/jsx_precompile/skip.out deleted file mode 100644 index a32b616f06f186..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map/jsx_precompile/skip.out +++ /dev/null @@ -1,3 +0,0 @@ -Download http://localhost:4545/jsx/jsx-precompile/index.ts -Check file:///[WILDCARD]/run/jsx_precompile/skip.tsx -imported http://localhost:4545/jsx/jsx-precompile/index.ts diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/__test__.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/__test__.jsonc deleted file mode 100644 index 7163c83d00db09..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-import --reload --check --import-map jsx/import-map.json --no-lock --config jsx/deno-jsx-precompile-skip.jsonc jsx_precompile/skip.tsx", - "output": "jsx_precompile/skip.out" -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx-error.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx-error.jsonc deleted file mode 100644 index 37cb4dd912cfd4..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx-error.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "./nonexistent" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx-import-map.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx-import-map.jsonc deleted file mode 100644 index 5adbfa8b5afc9b..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx-precompile-skip.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx-precompile-skip.jsonc deleted file mode 100644 index 3c9e4fa1f862aa..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx-precompile-skip.jsonc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile", - "jsxPrecompileSkipElements": ["a", "img"] - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx-precompile.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx-precompile.jsonc deleted file mode 100644 index 95ae1b9f316bd5..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx-precompile.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "precompile", - "jsxImportSource": "jsx-precompile" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx.json b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx.json deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx.jsonc deleted file mode 100644 index 311409ea370e75..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsx.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsxdev-import-map.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsxdev-import-map.jsonc deleted file mode 100644 index 7481d5a2d8b0af..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsxdev-import-map.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsxdev.jsonc b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsxdev.jsonc deleted file mode 100644 index ae5bdf9f16d1e2..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno-jsxdev.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsxdev", - "jsxImportSource": "http://localhost:4545/jsx" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno.lock b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno.lock deleted file mode 100644 index 011e8fe1081682..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/jsx/jsx-dev-runtime/index.ts": "183c5bf1cfb82b15fc1e8cca15593d4816035759532d851abd4476df378c8412" - } -} \ No newline at end of file diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/import-map-scoped.json b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/import-map-scoped.json deleted file mode 100644 index 9b2005128f16d4..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/import-map-scoped.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scopes": { - "../subdir/": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" - } - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/import-map.json b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/import-map.json deleted file mode 100644 index 1bfa04e2f0857e..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/import-map.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", - "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts", - "jsx-precompile/jsx-runtime": "http://localhost:4545/jsx/jsx-precompile/index.ts" - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/jsx-dev-runtime/index.ts b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/jsx-dev-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/jsx-dev-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/jsx-precompile/index.ts b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/jsx-precompile/index.ts deleted file mode 100644 index 0d56095e0bd3e0..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/jsx-precompile/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -// deno-lint-ignore-file no-explicit-any -export const jsxAttr = (name: string, value: any) => `${name}="${value}"`; -// deno-lint-ignore-file no-explicit-any -export const jsxTemplate = (_template: string[], ..._exprs: any[]) => ""; -// deno-lint-ignore-file no-explicit-any -export const jsxEscape = (_value: any) => ""; -console.log("imported", import.meta.url); - -declare global { - namespace JSX { - interface IntrinsicElements { - [tagName: string]: Record; - } - } -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/jsx-runtime/index.ts b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/jsx-runtime/index.ts deleted file mode 100644 index 15e2029c8ad4c2..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx/jsx-runtime/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -export function jsx( - _type: any, - _props: any, - _key: any, - _source: any, - _self: any, -) {} -export const jsxs = jsx; -export const jsxDEV = jsx; -export const Fragment = Symbol("Fragment"); -console.log("imported", import.meta.url); diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx_precompile/no_pragma.out b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx_precompile/no_pragma.out deleted file mode 100644 index f26984258cdb27..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx_precompile/no_pragma.out +++ /dev/null @@ -1,3 +0,0 @@ -Download http://localhost:4545/jsx/jsx-precompile/index.ts -Check file:///[WILDCARD]/jsx_precompile/no_pragma.tsx -imported http://localhost:4545/jsx/jsx-precompile/index.ts diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx_precompile/no_pragma.tsx b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx_precompile/no_pragma.tsx deleted file mode 100644 index 7ba21d80d260c4..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx_precompile/no_pragma.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export function A() { - return

hello

; -} diff --git a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx_precompile/skip.tsx b/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx_precompile/skip.tsx deleted file mode 100644 index 49bc4e2b7a82da..00000000000000 --- a/tests/specs/run/jsx_import_source_precompile_import_map_skip_element/jsx_precompile/skip.tsx +++ /dev/null @@ -1,9 +0,0 @@ -export function A() { - return ( -
- foo -

hello

- -
- ); -} diff --git a/tests/specs/run/lazy_npm/__test__.jsonc b/tests/specs/run/lazy_npm/__test__.jsonc new file mode 100644 index 00000000000000..8212addd5c927a --- /dev/null +++ b/tests/specs/run/lazy_npm/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "tempDir": true, + "steps": [ + { + "args": "run --unstable-npm-lazy-caching -A main.ts", + "output": "main.out" + } + ] +} diff --git a/tests/specs/run/lazy_npm/deno.json b/tests/specs/run/lazy_npm/deno.json new file mode 100644 index 00000000000000..fbd70ec480291a --- /dev/null +++ b/tests/specs/run/lazy_npm/deno.json @@ -0,0 +1,3 @@ +{ + "nodeModulesDir": "auto" +} diff --git a/tests/specs/run/lazy_npm/main.out b/tests/specs/run/lazy_npm/main.out new file mode 100644 index 00000000000000..d1aab68e90a2e8 --- /dev/null +++ b/tests/specs/run/lazy_npm/main.out @@ -0,0 +1,7 @@ +[UNORDERED_START] +Download http://localhost:4260/@denotest%2fadd +Download http://localhost:4260/@denotest%2fsay-hello +Download http://localhost:4260/@denotest/add/1.0.0.tgz +[UNORDERED_END] +Initialize @denotest/add@1.0.0 +3 diff --git a/tests/specs/run/lazy_npm/main.ts b/tests/specs/run/lazy_npm/main.ts new file mode 100644 index 00000000000000..1ca631410fdfde --- /dev/null +++ b/tests/specs/run/lazy_npm/main.ts @@ -0,0 +1,3 @@ +import { add } from "@denotest/add"; + +console.log(add(1, 2)); diff --git a/tests/specs/run/lazy_npm/package.json b/tests/specs/run/lazy_npm/package.json new file mode 100644 index 00000000000000..2623bcc82ed4ea --- /dev/null +++ b/tests/specs/run/lazy_npm/package.json @@ -0,0 +1,6 @@ +{ + "dependencies": { + "@denotest/add": "1.0.0", + "@denotest/say-hello": "1.0.0" + } +} diff --git a/tests/specs/run/no_check_decorators/__test__.jsonc b/tests/specs/run/no_check_decorators/__test__.jsonc deleted file mode 100644 index da50d30a054090..00000000000000 --- a/tests/specs/run/no_check_decorators/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --quiet --reload --no-check decorators/experimental/no_check/main.ts", - "output": "decorators/experimental/no_check/main.out" -} diff --git a/tests/specs/run/no_check_decorators/decorators/experimental/deno.json b/tests/specs/run/no_check_decorators/decorators/experimental/deno.json deleted file mode 100644 index 504cd646e14906..00000000000000 --- a/tests/specs/run/no_check_decorators/decorators/experimental/deno.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "compilerOptions": { - "experimentalDecorators": true - } -} diff --git a/tests/specs/run/no_check_decorators/decorators/experimental/no_check/main.out b/tests/specs/run/no_check_decorators/decorators/experimental/no_check/main.out deleted file mode 100644 index 015f7076e8ba48..00000000000000 --- a/tests/specs/run/no_check_decorators/decorators/experimental/no_check/main.out +++ /dev/null @@ -1,3 +0,0 @@ -a(): evaluated -a(): called -method diff --git a/tests/specs/run/no_check_decorators/decorators/experimental/no_check/main.ts b/tests/specs/run/no_check_decorators/decorators/experimental/no_check/main.ts deleted file mode 100644 index 9f7ec550d5c354..00000000000000 --- a/tests/specs/run/no_check_decorators/decorators/experimental/no_check/main.ts +++ /dev/null @@ -1,21 +0,0 @@ -// deno-lint-ignore-file -function a() { - console.log("a(): evaluated"); - return ( - _target: any, - _propertyKey: string, - _descriptor: PropertyDescriptor, - ) => { - console.log("a(): called"); - }; -} - -class B { - @a() - method() { - console.log("method"); - } -} - -const b = new B(); -b.method(); diff --git a/tests/specs/run/no_check_decorators/decorators/experimental/runtime/main.out b/tests/specs/run/no_check_decorators/decorators/experimental/runtime/main.out deleted file mode 100644 index 0fc1d4590e0a58..00000000000000 --- a/tests/specs/run/no_check_decorators/decorators/experimental/runtime/main.out +++ /dev/null @@ -1,7 +0,0 @@ -@A evaluated -@B evaluated -@B called -@A called -fn() called from @A -fn() called from @B -C.test() called diff --git a/tests/specs/run/no_check_decorators/decorators/experimental/runtime/main.ts b/tests/specs/run/no_check_decorators/decorators/experimental/runtime/main.ts deleted file mode 100644 index 40a26bbd4d1948..00000000000000 --- a/tests/specs/run/no_check_decorators/decorators/experimental/runtime/main.ts +++ /dev/null @@ -1,42 +0,0 @@ -// deno-lint-ignore-file -function a() { - console.log("@A evaluated"); - return function ( - target: any, - propertyKey: string, - descriptor: PropertyDescriptor, - ) { - console.log("@A called"); - const fn = descriptor.value; - descriptor.value = function () { - console.log("fn() called from @A"); - fn(); - }; - }; -} - -function b() { - console.log("@B evaluated"); - return function ( - target: any, - propertyKey: string, - descriptor: PropertyDescriptor, - ) { - console.log("@B called"); - const fn = descriptor.value; - descriptor.value = function () { - console.log("fn() called from @B"); - fn(); - }; - }; -} - -class C { - @a() - @b() - static test() { - console.log("C.test() called"); - } -} - -C.test(); diff --git a/tests/specs/run/no_check_decorators/decorators/experimental/ts/main.out b/tests/specs/run/no_check_decorators/decorators/experimental/ts/main.out deleted file mode 100644 index ea64fbaa63ea1b..00000000000000 --- a/tests/specs/run/no_check_decorators/decorators/experimental/ts/main.out +++ /dev/null @@ -1,3 +0,0 @@ -Warning experimentalDecorators compiler option is deprecated and may be removed at any time -Check [WILDCARD] -SomeClass { someField: "asdf" } diff --git a/tests/specs/run/no_check_decorators/decorators/experimental/ts/main.ts b/tests/specs/run/no_check_decorators/decorators/experimental/ts/main.ts deleted file mode 100644 index 95fba6cd48b224..00000000000000 --- a/tests/specs/run/no_check_decorators/decorators/experimental/ts/main.ts +++ /dev/null @@ -1,14 +0,0 @@ -// deno-lint-ignore-file - -function Decorate() { - return function (constructor: any): any { - return class extends constructor { - protected someField: string = "asdf"; - }; - }; -} - -@Decorate() -class SomeClass {} - -console.log(new SomeClass()); diff --git a/tests/specs/run/no_check_decorators/decorators/tc39_proposal/main.out b/tests/specs/run/no_check_decorators/decorators/tc39_proposal/main.out deleted file mode 100644 index 39394952e88d9c..00000000000000 --- a/tests/specs/run/no_check_decorators/decorators/tc39_proposal/main.out +++ /dev/null @@ -1,3 +0,0 @@ -starting m with arguments 1 -C.m 1 -ending m diff --git a/tests/specs/run/no_check_decorators/decorators/tc39_proposal/main.ts b/tests/specs/run/no_check_decorators/decorators/tc39_proposal/main.ts deleted file mode 100644 index 00c8a850256498..00000000000000 --- a/tests/specs/run/no_check_decorators/decorators/tc39_proposal/main.ts +++ /dev/null @@ -1,21 +0,0 @@ -// deno-lint-ignore no-explicit-any -function logged(value: any, { kind, name }: { kind: string; name: string }) { - if (kind === "method") { - return function (...args: unknown[]) { - console.log(`starting ${name} with arguments ${args.join(", ")}`); - // @ts-ignore this has implicit any type - const ret = value.call(this, ...args); - console.log(`ending ${name}`); - return ret; - }; - } -} - -class C { - @logged - m(arg: number) { - console.log("C.m", arg); - } -} - -new C().m(1); diff --git a/tests/specs/run/npm_pkg_requires_esm_js/output.out b/tests/specs/run/npm_pkg_requires_esm_js/output.out index 2cae7108b073d8..59b34e5c9e40b6 100644 --- a/tests/specs/run/npm_pkg_requires_esm_js/output.out +++ b/tests/specs/run/npm_pkg_requires_esm_js/output.out @@ -8,5 +8,6 @@ console.log(require); package.json has a "type": "commonjs" option. hint: Rewrite this module to ESM, or change the file extension to .cjs, - or add package.json next to the file with "type": "commonjs" option. + or add package.json next to the file with "type": "commonjs" option, + or pass --unstable-detect-cjs flag to detect CommonJS when loading. docs: https://docs.deno.com/go/commonjs diff --git a/tests/specs/run/package_json/invalid_value/__test__.jsonc b/tests/specs/run/package_json/invalid_value/__test__.jsonc index 195734d95f6f3f..9752f32143a907 100644 --- a/tests/specs/run/package_json/invalid_value/__test__.jsonc +++ b/tests/specs/run/package_json/invalid_value/__test__.jsonc @@ -12,6 +12,11 @@ "exitCode": 1, "output": "error_auto.out" }, + "run_error": { + "args": "run error.ts", + "exitCode": 1, + "output": "error.out" + }, "install_error_byonm": { "args": "install", "output": "install.out", diff --git a/tests/specs/run/package_json_type/commonjs/basic/main_mix.out b/tests/specs/run/package_json_type/commonjs/basic/main_mix.out index 65671fd618a9a2..a3c0cfc4d42bee 100644 --- a/tests/specs/run/package_json_type/commonjs/basic/main_mix.out +++ b/tests/specs/run/package_json_type/commonjs/basic/main_mix.out @@ -8,5 +8,6 @@ console.log(require("./add").add(1, 2)); package.json has a "type": "commonjs" option. hint: Rewrite this module to ESM, or change the file extension to .cjs, - or add package.json next to the file with "type": "commonjs" option. + or add package.json next to the file with "type": "commonjs" option, + or pass --unstable-detect-cjs flag to detect CommonJS when loading. docs: https://docs.deno.com/go/commonjs diff --git a/tests/specs/run/package_json_type/none/main_cjs.out b/tests/specs/run/package_json_type/none/main_cjs.out index afa5028f4f814f..06511fed7396e4 100644 --- a/tests/specs/run/package_json_type/none/main_cjs.out +++ b/tests/specs/run/package_json_type/none/main_cjs.out @@ -7,5 +7,6 @@ const { add } = require("./add"); package.json has a "type": "commonjs" option. hint: Rewrite this module to ESM, or change the file extension to .cjs, - or add package.json next to the file with "type": "commonjs" option. + or add package.json next to the file with "type": "commonjs" option, + or pass --unstable-detect-cjs flag to detect CommonJS when loading. docs: https://docs.deno.com/go/commonjs diff --git a/tests/specs/run/reference_types_error/reference_types_error.js.out b/tests/specs/run/reference_types_error/reference_types_error.js.out index 86055f3ac3f683..3f22354915d8a8 100644 --- a/tests/specs/run/reference_types_error/reference_types_error.js.out +++ b/tests/specs/run/reference_types_error/reference_types_error.js.out @@ -1,2 +1,3 @@ -error: Module not found "file:///[WILDCARD]/nonexistent.d.ts". - at file:///[WILDCARD]/reference_types_error.js:1:22 +Check file:///[WILDLINE]/reference_types_error.js +error: TS2307 [ERROR]: Cannot find module 'file:///[WILDLINE]/nonexistent.d.ts'. + at file:///[WILDLINE]/reference_types_error.js:1:22 diff --git a/tests/specs/run/reference_types_error_vendor_dir/reference_types_error.js.out b/tests/specs/run/reference_types_error_vendor_dir/reference_types_error.js.out index 86055f3ac3f683..3f22354915d8a8 100644 --- a/tests/specs/run/reference_types_error_vendor_dir/reference_types_error.js.out +++ b/tests/specs/run/reference_types_error_vendor_dir/reference_types_error.js.out @@ -1,2 +1,3 @@ -error: Module not found "file:///[WILDCARD]/nonexistent.d.ts". - at file:///[WILDCARD]/reference_types_error.js:1:22 +Check file:///[WILDLINE]/reference_types_error.js +error: TS2307 [ERROR]: Cannot find module 'file:///[WILDLINE]/nonexistent.d.ts'. + at file:///[WILDLINE]/reference_types_error.js:1:22 diff --git a/tests/specs/run/runtime_decorators/__test__.jsonc b/tests/specs/run/runtime_decorators/__test__.jsonc deleted file mode 100644 index 286fd377d8b24e..00000000000000 --- a/tests/specs/run/runtime_decorators/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --quiet --reload --no-check decorators/experimental/runtime/main.ts", - "output": "decorators/experimental/runtime/main.out" -} diff --git a/tests/specs/run/runtime_decorators/decorators/experimental/deno.json b/tests/specs/run/runtime_decorators/decorators/experimental/deno.json deleted file mode 100644 index 504cd646e14906..00000000000000 --- a/tests/specs/run/runtime_decorators/decorators/experimental/deno.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "compilerOptions": { - "experimentalDecorators": true - } -} diff --git a/tests/specs/run/runtime_decorators/decorators/experimental/no_check/main.out b/tests/specs/run/runtime_decorators/decorators/experimental/no_check/main.out deleted file mode 100644 index 015f7076e8ba48..00000000000000 --- a/tests/specs/run/runtime_decorators/decorators/experimental/no_check/main.out +++ /dev/null @@ -1,3 +0,0 @@ -a(): evaluated -a(): called -method diff --git a/tests/specs/run/runtime_decorators/decorators/experimental/no_check/main.ts b/tests/specs/run/runtime_decorators/decorators/experimental/no_check/main.ts deleted file mode 100644 index 9f7ec550d5c354..00000000000000 --- a/tests/specs/run/runtime_decorators/decorators/experimental/no_check/main.ts +++ /dev/null @@ -1,21 +0,0 @@ -// deno-lint-ignore-file -function a() { - console.log("a(): evaluated"); - return ( - _target: any, - _propertyKey: string, - _descriptor: PropertyDescriptor, - ) => { - console.log("a(): called"); - }; -} - -class B { - @a() - method() { - console.log("method"); - } -} - -const b = new B(); -b.method(); diff --git a/tests/specs/run/runtime_decorators/decorators/experimental/runtime/main.out b/tests/specs/run/runtime_decorators/decorators/experimental/runtime/main.out deleted file mode 100644 index 0fc1d4590e0a58..00000000000000 --- a/tests/specs/run/runtime_decorators/decorators/experimental/runtime/main.out +++ /dev/null @@ -1,7 +0,0 @@ -@A evaluated -@B evaluated -@B called -@A called -fn() called from @A -fn() called from @B -C.test() called diff --git a/tests/specs/run/runtime_decorators/decorators/experimental/runtime/main.ts b/tests/specs/run/runtime_decorators/decorators/experimental/runtime/main.ts deleted file mode 100644 index 40a26bbd4d1948..00000000000000 --- a/tests/specs/run/runtime_decorators/decorators/experimental/runtime/main.ts +++ /dev/null @@ -1,42 +0,0 @@ -// deno-lint-ignore-file -function a() { - console.log("@A evaluated"); - return function ( - target: any, - propertyKey: string, - descriptor: PropertyDescriptor, - ) { - console.log("@A called"); - const fn = descriptor.value; - descriptor.value = function () { - console.log("fn() called from @A"); - fn(); - }; - }; -} - -function b() { - console.log("@B evaluated"); - return function ( - target: any, - propertyKey: string, - descriptor: PropertyDescriptor, - ) { - console.log("@B called"); - const fn = descriptor.value; - descriptor.value = function () { - console.log("fn() called from @B"); - fn(); - }; - }; -} - -class C { - @a() - @b() - static test() { - console.log("C.test() called"); - } -} - -C.test(); diff --git a/tests/specs/run/runtime_decorators/decorators/experimental/ts/main.out b/tests/specs/run/runtime_decorators/decorators/experimental/ts/main.out deleted file mode 100644 index ea64fbaa63ea1b..00000000000000 --- a/tests/specs/run/runtime_decorators/decorators/experimental/ts/main.out +++ /dev/null @@ -1,3 +0,0 @@ -Warning experimentalDecorators compiler option is deprecated and may be removed at any time -Check [WILDCARD] -SomeClass { someField: "asdf" } diff --git a/tests/specs/run/runtime_decorators/decorators/experimental/ts/main.ts b/tests/specs/run/runtime_decorators/decorators/experimental/ts/main.ts deleted file mode 100644 index 95fba6cd48b224..00000000000000 --- a/tests/specs/run/runtime_decorators/decorators/experimental/ts/main.ts +++ /dev/null @@ -1,14 +0,0 @@ -// deno-lint-ignore-file - -function Decorate() { - return function (constructor: any): any { - return class extends constructor { - protected someField: string = "asdf"; - }; - }; -} - -@Decorate() -class SomeClass {} - -console.log(new SomeClass()); diff --git a/tests/specs/run/runtime_decorators/decorators/tc39_proposal/main.out b/tests/specs/run/runtime_decorators/decorators/tc39_proposal/main.out deleted file mode 100644 index 39394952e88d9c..00000000000000 --- a/tests/specs/run/runtime_decorators/decorators/tc39_proposal/main.out +++ /dev/null @@ -1,3 +0,0 @@ -starting m with arguments 1 -C.m 1 -ending m diff --git a/tests/specs/run/runtime_decorators/decorators/tc39_proposal/main.ts b/tests/specs/run/runtime_decorators/decorators/tc39_proposal/main.ts deleted file mode 100644 index 00c8a850256498..00000000000000 --- a/tests/specs/run/runtime_decorators/decorators/tc39_proposal/main.ts +++ /dev/null @@ -1,21 +0,0 @@ -// deno-lint-ignore no-explicit-any -function logged(value: any, { kind, name }: { kind: string; name: string }) { - if (kind === "method") { - return function (...args: unknown[]) { - console.log(`starting ${name} with arguments ${args.join(", ")}`); - // @ts-ignore this has implicit any type - const ret = value.call(this, ...args); - console.log(`ending ${name}`); - return ret; - }; - } -} - -class C { - @logged - m(arg: number) { - console.log("C.m", arg); - } -} - -new C().m(1); diff --git a/tests/specs/run/sloppy_imports/no_sloppy.out b/tests/specs/run/sloppy_imports/no_sloppy.out index d3a205e9908a36..f28d9181ff5c56 100644 --- a/tests/specs/run/sloppy_imports/no_sloppy.out +++ b/tests/specs/run/sloppy_imports/no_sloppy.out @@ -1,2 +1,26 @@ -error: Module not found "file:///[WILDCARD]/a.js". Maybe change the extension to '.ts' or run with --unstable-sloppy-imports +Check file:///[WILDLINE]/main.ts +error: TS2307 [ERROR]: Cannot find module 'file:///[WILDLINE]/a.js'. Maybe change the extension to '.ts' or run with --unstable-sloppy-imports at file:///[WILDLINE]/main.ts:1:20 + +TS2307 [ERROR]: Cannot find module 'file:///[WILDLINE]/b'. Maybe add a '.js' extension or run with --unstable-sloppy-imports + at file:///[WILDLINE]/main.ts:2:20 + +TS2307 [ERROR]: Cannot find module 'file:///[WILDLINE]/c'. Maybe add a '.mts' extension or run with --unstable-sloppy-imports + at file:///[WILDLINE]/main.ts:3:20 + +TS2307 [ERROR]: Cannot find module 'file:///[WILDLINE]/d'. Maybe add a '.mjs' extension or run with --unstable-sloppy-imports + at file:///[WILDLINE]/main.ts:4:20 + +TS2307 [ERROR]: Cannot find module 'file:///[WILDLINE]/e'. Maybe add a '.tsx' extension or run with --unstable-sloppy-imports + at file:///[WILDLINE]/main.ts:5:20 + +TS2307 [ERROR]: Cannot find module 'file:///[WILDLINE]/e.js'. Maybe change the extension to '.tsx' or run with --unstable-sloppy-imports + at file:///[WILDLINE]/main.ts:6:21 + +TS2307 [ERROR]: Cannot find module 'file:///[WILDLINE]/f'. Maybe add a '.jsx' extension or run with --unstable-sloppy-imports + at file:///[WILDLINE]/main.ts:7:20 + +TS2307 [ERROR]: Cannot find module 'file:///[WILDLINE]/dir'. Maybe specify path to 'index.tsx' file in directory instead or run with --unstable-sloppy-imports + at file:///[WILDLINE]/main.ts:8:20 + +Found 8 errors. diff --git a/tests/specs/run/tls_connecttls/textproto.ts b/tests/specs/run/tls_connecttls/textproto.ts index 9e0f5f5f0a55cf..6b8ac92ecbfb15 100644 --- a/tests/specs/run/tls_connecttls/textproto.ts +++ b/tests/specs/run/tls_connecttls/textproto.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/tests/specs/run/tls_starttls/textproto.ts b/tests/specs/run/tls_starttls/textproto.ts index 9e0f5f5f0a55cf..6b8ac92ecbfb15 100644 --- a/tests/specs/run/tls_starttls/textproto.ts +++ b/tests/specs/run/tls_starttls/textproto.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/tests/specs/run/top_level_await/__test__.jsonc b/tests/specs/run/top_level_await/__test__.jsonc index 25537db5f4b5a0..c05786075ab111 100644 --- a/tests/specs/run/top_level_await/__test__.jsonc +++ b/tests/specs/run/top_level_await/__test__.jsonc @@ -1,4 +1,42 @@ { - "args": "run --allow-read top_level_await/top_level_await.js", - "output": "top_level_await/top_level_await.out" + "tests": { + "top_level_for_await": { + "args": "run --quiet top_level_for_await.js", + "output": "top_level_for_await.out" + }, + "top_level_for_await_ts": { + "args": "run --quiet top_level_for_await.ts", + "output": "top_level_for_await.out" + }, + "top_level_await_unresolved": { + "args": "run unresolved.js", + "output": "unresolved.out", + "exitCode": 1 + }, + "top_level_await": { + "args": "run --allow-read top_level_await.js", + "output": "top_level_await.out" + }, + "top_level_await_ts": { + "args": "run --quiet --allow-read top_level_await.ts", + "output": "top_level_await.out" + }, + "top_level_await_order": { + "args": "run --allow-read order.js", + "output": "order.out" + }, + "top_level_await_nested": { + "args": "run --allow-read nested/main.js", + "output": "nested.out" + }, + "top_level_await_loop": { + "args": "run --allow-read loop.js", + "output": "loop.out" + }, + "top_level_await_circular": { + "args": "run --allow-read circular.js", + "output": "circular.out", + "exitCode": 1 + } + } } diff --git a/tests/specs/run/top_level_await/top_level_await/circular.js b/tests/specs/run/top_level_await/circular.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/circular.js rename to tests/specs/run/top_level_await/circular.js diff --git a/tests/specs/run/top_level_await/top_level_await/circular.out b/tests/specs/run/top_level_await/circular.out similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/circular.out rename to tests/specs/run/top_level_await/circular.out diff --git a/tests/specs/run/top_level_await/hello.txt b/tests/specs/run/top_level_await/hello.txt index 6769dd60bdf536..cd0875583aabe8 100644 --- a/tests/specs/run/top_level_await/hello.txt +++ b/tests/specs/run/top_level_await/hello.txt @@ -1 +1 @@ -Hello world! \ No newline at end of file +Hello world! diff --git a/tests/specs/run/top_level_await/loop.js b/tests/specs/run/top_level_await/loop.js new file mode 100644 index 00000000000000..401ef0ecd25ffb --- /dev/null +++ b/tests/specs/run/top_level_await/loop.js @@ -0,0 +1,20 @@ +const importsDir = Deno.readDirSync( + Deno.realPathSync("./tla2"), +); + +const resolvedPaths = []; + +for (const { name } of importsDir) { + const filePath = Deno.realPathSync(`./tla2/${name}`); + resolvedPaths.push(filePath); +} + +resolvedPaths.sort(); + +for (const filePath of resolvedPaths) { + console.log("loading", filePath); + const mod = await import(`file://${filePath}`); + console.log("loaded", mod); +} + +console.log("all loaded"); diff --git a/tests/specs/run/top_level_await/top_level_await/loop.out b/tests/specs/run/top_level_await/loop.out similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/loop.out rename to tests/specs/run/top_level_await/loop.out diff --git a/tests/specs/run/top_level_await/top_level_await/nested.out b/tests/specs/run/top_level_await/nested.out similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/nested.out rename to tests/specs/run/top_level_await/nested.out diff --git a/tests/specs/run/top_level_await/top_level_await/nested/a.js b/tests/specs/run/top_level_await/nested/a.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/nested/a.js rename to tests/specs/run/top_level_await/nested/a.js diff --git a/tests/specs/run/top_level_await/top_level_await/nested/b.js b/tests/specs/run/top_level_await/nested/b.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/nested/b.js rename to tests/specs/run/top_level_await/nested/b.js diff --git a/tests/specs/run/top_level_await/top_level_await/nested/main.js b/tests/specs/run/top_level_await/nested/main.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/nested/main.js rename to tests/specs/run/top_level_await/nested/main.js diff --git a/tests/specs/run/top_level_await/top_level_await/order.js b/tests/specs/run/top_level_await/order.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/order.js rename to tests/specs/run/top_level_await/order.js diff --git a/tests/specs/run/top_level_await/top_level_await/order.out b/tests/specs/run/top_level_await/order.out similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/order.out rename to tests/specs/run/top_level_await/order.out diff --git a/tests/specs/run/top_level_await/top_level_await/tla/a.js b/tests/specs/run/top_level_await/tla/a.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/tla/a.js rename to tests/specs/run/top_level_await/tla/a.js diff --git a/tests/specs/run/top_level_await/top_level_await/tla/b.js b/tests/specs/run/top_level_await/tla/b.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/tla/b.js rename to tests/specs/run/top_level_await/tla/b.js diff --git a/tests/specs/run/top_level_await/top_level_await/tla/c.js b/tests/specs/run/top_level_await/tla/c.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/tla/c.js rename to tests/specs/run/top_level_await/tla/c.js diff --git a/tests/specs/run/top_level_await/top_level_await/tla/d.js b/tests/specs/run/top_level_await/tla/d.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/tla/d.js rename to tests/specs/run/top_level_await/tla/d.js diff --git a/tests/specs/run/top_level_await/top_level_await/tla/order.js b/tests/specs/run/top_level_await/tla/order.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/tla/order.js rename to tests/specs/run/top_level_await/tla/order.js diff --git a/tests/specs/run/top_level_await/top_level_await/tla/parent.js b/tests/specs/run/top_level_await/tla/parent.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/tla/parent.js rename to tests/specs/run/top_level_await/tla/parent.js diff --git a/tests/specs/run/top_level_await/top_level_await/tla2/a.js b/tests/specs/run/top_level_await/tla2/a.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/tla2/a.js rename to tests/specs/run/top_level_await/tla2/a.js diff --git a/tests/specs/run/top_level_await/top_level_await/tla2/b.js b/tests/specs/run/top_level_await/tla2/b.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/tla2/b.js rename to tests/specs/run/top_level_await/tla2/b.js diff --git a/tests/specs/run/top_level_await/top_level_await/tla3/b.js b/tests/specs/run/top_level_await/tla3/b.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/tla3/b.js rename to tests/specs/run/top_level_await/tla3/b.js diff --git a/tests/specs/run/top_level_await/top_level_await/tla3/timeout_loop.js b/tests/specs/run/top_level_await/tla3/timeout_loop.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/tla3/timeout_loop.js rename to tests/specs/run/top_level_await/tla3/timeout_loop.js diff --git a/tests/specs/run/top_level_await/top_level_await/top_level_await.js b/tests/specs/run/top_level_await/top_level_await.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/top_level_await.js rename to tests/specs/run/top_level_await/top_level_await.js diff --git a/tests/specs/run/top_level_await/top_level_await.out b/tests/specs/run/top_level_await/top_level_await.out new file mode 100644 index 00000000000000..ae1f5594ea9a85 --- /dev/null +++ b/tests/specs/run/top_level_await/top_level_await.out @@ -0,0 +1,4 @@ +Hello world! + + +write 13 diff --git a/tests/specs/run/top_level_await_ts/top_level_await/top_level_await.ts b/tests/specs/run/top_level_await/top_level_await.ts similarity index 100% rename from tests/specs/run/top_level_await_ts/top_level_await/top_level_await.ts rename to tests/specs/run/top_level_await/top_level_await.ts diff --git a/tests/specs/run/top_level_await/top_level_await/loop.js b/tests/specs/run/top_level_await/top_level_await/loop.js deleted file mode 100644 index f229e03f61dd0e..00000000000000 --- a/tests/specs/run/top_level_await/top_level_await/loop.js +++ /dev/null @@ -1,20 +0,0 @@ -const importsDir = Deno.readDirSync( - Deno.realPathSync("./top_level_await/tla2"), -); - -const resolvedPaths = []; - -for (const { name } of importsDir) { - const filePath = Deno.realPathSync(`./top_level_await/tla2/${name}`); - resolvedPaths.push(filePath); -} - -resolvedPaths.sort(); - -for (const filePath of resolvedPaths) { - console.log("loading", filePath); - const mod = await import(`file://${filePath}`); - console.log("loaded", mod); -} - -console.log("all loaded"); diff --git a/tests/specs/run/top_level_await/top_level_await/top_level_await.out b/tests/specs/run/top_level_await/top_level_await/top_level_await.out deleted file mode 100644 index 4b65d15fe3c0d6..00000000000000 --- a/tests/specs/run/top_level_await/top_level_await/top_level_await.out +++ /dev/null @@ -1,3 +0,0 @@ -Hello world! - -write 12 diff --git a/tests/specs/run/top_level_await/top_level_await/top_level_await.ts b/tests/specs/run/top_level_await/top_level_await/top_level_await.ts deleted file mode 100644 index 8d47ceb21e1cf8..00000000000000 --- a/tests/specs/run/top_level_await/top_level_await/top_level_await.ts +++ /dev/null @@ -1,3 +0,0 @@ -const buf: Uint8Array = await Deno.readFile("./assets/hello.txt"); -const n: number = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_await/top_level_await/top_level_for_await.js b/tests/specs/run/top_level_await/top_level_for_await.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/top_level_for_await.js rename to tests/specs/run/top_level_await/top_level_for_await.js diff --git a/tests/specs/run/top_level_await/top_level_await/top_level_for_await.out b/tests/specs/run/top_level_await/top_level_for_await.out similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/top_level_for_await.out rename to tests/specs/run/top_level_await/top_level_for_await.out diff --git a/tests/specs/run/top_level_await/top_level_await/top_level_for_await.ts b/tests/specs/run/top_level_await/top_level_for_await.ts similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/top_level_for_await.ts rename to tests/specs/run/top_level_await/top_level_for_await.ts diff --git a/tests/specs/run/top_level_await/top_level_await/unresolved.js b/tests/specs/run/top_level_await/unresolved.js similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/unresolved.js rename to tests/specs/run/top_level_await/unresolved.js diff --git a/tests/specs/run/top_level_await/top_level_await/unresolved.out b/tests/specs/run/top_level_await/unresolved.out similarity index 100% rename from tests/specs/run/top_level_await/top_level_await/unresolved.out rename to tests/specs/run/top_level_await/unresolved.out diff --git a/tests/specs/run/top_level_await_circular/__test__.jsonc b/tests/specs/run/top_level_await_circular/__test__.jsonc deleted file mode 100644 index 3e236b2107f744..00000000000000 --- a/tests/specs/run/top_level_await_circular/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "run --allow-read top_level_await/circular.js", - "output": "top_level_await/circular.out", - "exitCode": 1 -} diff --git a/tests/specs/run/top_level_await_circular/top_level_await/circular.js b/tests/specs/run/top_level_await_circular/top_level_await/circular.js deleted file mode 100644 index ff2964b6a5f794..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/circular.js +++ /dev/null @@ -1,8 +0,0 @@ -import { foo } from "./tla3/timeout_loop.js"; - -export const collection = []; - -const mod = await import("./tla3/b.js"); - -console.log("foo in main", foo); -console.log("mod", mod); diff --git a/tests/specs/run/top_level_await_circular/top_level_await/circular.out b/tests/specs/run/top_level_await_circular/top_level_await/circular.out deleted file mode 100644 index c88978961382c2..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/circular.out +++ /dev/null @@ -1,10 +0,0 @@ -timeout loop 0 -timeout loop 1 -timeout loop 2 -timeout loop 3 -timeout loop 4 -timeout loop 5 -error: Top-level await promise never resolved -const mod = await import("./tla3/b.js"); - ^ - at ([WILDCARD]/top_level_await/circular.js:5:13) diff --git a/tests/specs/run/top_level_await_circular/top_level_await/loop.js b/tests/specs/run/top_level_await_circular/top_level_await/loop.js deleted file mode 100644 index f229e03f61dd0e..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/loop.js +++ /dev/null @@ -1,20 +0,0 @@ -const importsDir = Deno.readDirSync( - Deno.realPathSync("./top_level_await/tla2"), -); - -const resolvedPaths = []; - -for (const { name } of importsDir) { - const filePath = Deno.realPathSync(`./top_level_await/tla2/${name}`); - resolvedPaths.push(filePath); -} - -resolvedPaths.sort(); - -for (const filePath of resolvedPaths) { - console.log("loading", filePath); - const mod = await import(`file://${filePath}`); - console.log("loaded", mod); -} - -console.log("all loaded"); diff --git a/tests/specs/run/top_level_await_circular/top_level_await/loop.out b/tests/specs/run/top_level_await_circular/top_level_await/loop.out deleted file mode 100644 index 1bdffbf6607757..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/loop.out +++ /dev/null @@ -1,5 +0,0 @@ -loading [WILDCARD]a.js -loaded [Module: null prototype] { default: [class Foo] } -loading [WILDCARD]b.js -loaded [Module: null prototype] { default: [class Bar] } -all loaded diff --git a/tests/specs/run/top_level_await_circular/top_level_await/nested.out b/tests/specs/run/top_level_await_circular/top_level_await/nested.out deleted file mode 100644 index 8a1218a1024a21..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/nested.out +++ /dev/null @@ -1,5 +0,0 @@ -1 -2 -3 -4 -5 diff --git a/tests/specs/run/top_level_await_circular/top_level_await/nested/a.js b/tests/specs/run/top_level_await_circular/top_level_await/nested/a.js deleted file mode 100644 index 74837d4ba16833..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/nested/a.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(2); -await import("./b.js"); -console.log(4); diff --git a/tests/specs/run/top_level_await_circular/top_level_await/nested/b.js b/tests/specs/run/top_level_await_circular/top_level_await/nested/b.js deleted file mode 100644 index 3bd241b50e7c44..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/nested/b.js +++ /dev/null @@ -1 +0,0 @@ -console.log(3); diff --git a/tests/specs/run/top_level_await_circular/top_level_await/nested/main.js b/tests/specs/run/top_level_await_circular/top_level_await/nested/main.js deleted file mode 100644 index ed46a47175b330..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/nested/main.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(1); -await import("./a.js"); -console.log(5); diff --git a/tests/specs/run/top_level_await_circular/top_level_await/order.js b/tests/specs/run/top_level_await_circular/top_level_await/order.js deleted file mode 100644 index 30659cdfbfb6ef..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/order.js +++ /dev/null @@ -1,21 +0,0 @@ -// Ported from Node -// https://github.com/nodejs/node/blob/54746bb763ebea0dc7e99d88ff4b379bcd680964/test/es-module/test-esm-tla.mjs - -const { default: order } = await import("./tla/parent.js"); - -console.log("order", JSON.stringify(order)); - -if ( - !( - order[0] === "order" && - order[1] === "b" && - order[2] === "c" && - order[3] === "d" && - order[4] === "a" && - order[5] === "parent" - ) -) { - throw new Error("TLA wrong order"); -} - -console.log("TLA order correct"); diff --git a/tests/specs/run/top_level_await_circular/top_level_await/order.out b/tests/specs/run/top_level_await_circular/top_level_await/order.out deleted file mode 100644 index 4cc27858cff9ff..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/order.out +++ /dev/null @@ -1,2 +0,0 @@ -order ["order","b","c","d","a","parent"] -TLA order correct diff --git a/tests/specs/run/top_level_await_circular/top_level_await/tla/a.js b/tests/specs/run/top_level_await_circular/top_level_await/tla/a.js deleted file mode 100644 index c3ef3f7dbcfd64..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/tla/a.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("b"); diff --git a/tests/specs/run/top_level_await_circular/top_level_await/tla/b.js b/tests/specs/run/top_level_await_circular/top_level_await/tla/b.js deleted file mode 100644 index 3271c92d8f42b5..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/tla/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import order from "./order.js"; - -await new Promise((resolve) => { - setTimeout(resolve, 200); -}); - -order.push("a"); diff --git a/tests/specs/run/top_level_await_circular/top_level_await/tla/c.js b/tests/specs/run/top_level_await_circular/top_level_await/tla/c.js deleted file mode 100644 index 806eb0a8bea39d..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/tla/c.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("c"); diff --git a/tests/specs/run/top_level_await_circular/top_level_await/tla/d.js b/tests/specs/run/top_level_await_circular/top_level_await/tla/d.js deleted file mode 100644 index 283ebf817fa805..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/tla/d.js +++ /dev/null @@ -1,8 +0,0 @@ -import order from "./order.js"; - -const end = Date.now() + 500; -while (end < Date.now()) { - // pass -} - -order.push("d"); diff --git a/tests/specs/run/top_level_await_circular/top_level_await/tla/order.js b/tests/specs/run/top_level_await_circular/top_level_await/tla/order.js deleted file mode 100644 index f213a562ce6e35..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/tla/order.js +++ /dev/null @@ -1 +0,0 @@ -export default ["order"]; diff --git a/tests/specs/run/top_level_await_circular/top_level_await/tla/parent.js b/tests/specs/run/top_level_await_circular/top_level_await/tla/parent.js deleted file mode 100644 index 1ecc154634d375..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/tla/parent.js +++ /dev/null @@ -1,9 +0,0 @@ -import order from "./order.js"; -import "./a.js"; -import "./b.js"; -import "./c.js"; -import "./d.js"; - -order.push("parent"); - -export default order; diff --git a/tests/specs/run/top_level_await_circular/top_level_await/tla2/a.js b/tests/specs/run/top_level_await_circular/top_level_await/tla2/a.js deleted file mode 100644 index d07bcb94db30e4..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/tla2/a.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Foo { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_await_circular/top_level_await/tla2/b.js b/tests/specs/run/top_level_await_circular/top_level_await/tla2/b.js deleted file mode 100644 index 68e357c1e96de3..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/tla2/b.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Bar { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_await_circular/top_level_await/tla3/b.js b/tests/specs/run/top_level_await_circular/top_level_await/tla3/b.js deleted file mode 100644 index d0349545e9d2af..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/tla3/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import { foo } from "./timeout_loop.js"; -import { collection } from "../circular.js"; - -console.log("collection in b", collection); -console.log("foo in b", foo); - -export const a = "a"; diff --git a/tests/specs/run/top_level_await_circular/top_level_await/tla3/timeout_loop.js b/tests/specs/run/top_level_await_circular/top_level_await/tla3/timeout_loop.js deleted file mode 100644 index 860e6cd2ae718e..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/tla3/timeout_loop.js +++ /dev/null @@ -1,23 +0,0 @@ -export const foo = "foo"; - -export function delay(ms) { - return new Promise((res) => - setTimeout(() => { - res(); - }, ms) - ); -} - -let i = 0; - -async function timeoutLoop() { - await delay(1000); - console.log("timeout loop", i); - i++; - if (i > 5) { - return; - } - timeoutLoop(); -} - -timeoutLoop(); diff --git a/tests/specs/run/top_level_await_circular/top_level_await/top_level_await.js b/tests/specs/run/top_level_await_circular/top_level_await/top_level_await.js deleted file mode 100644 index ea319ea124bd6f..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/top_level_await.js +++ /dev/null @@ -1,3 +0,0 @@ -const buf = await Deno.readFile("./assets/hello.txt"); -const n = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_await_circular/top_level_await/top_level_await.out b/tests/specs/run/top_level_await_circular/top_level_await/top_level_await.out deleted file mode 100644 index 4b65d15fe3c0d6..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/top_level_await.out +++ /dev/null @@ -1,3 +0,0 @@ -Hello world! - -write 12 diff --git a/tests/specs/run/top_level_await_circular/top_level_await/top_level_await.ts b/tests/specs/run/top_level_await_circular/top_level_await/top_level_await.ts deleted file mode 100644 index 8d47ceb21e1cf8..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/top_level_await.ts +++ /dev/null @@ -1,3 +0,0 @@ -const buf: Uint8Array = await Deno.readFile("./assets/hello.txt"); -const n: number = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_await_circular/top_level_await/top_level_for_await.js b/tests/specs/run/top_level_await_circular/top_level_await/top_level_for_await.js deleted file mode 100644 index a330f6c7116d2b..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/top_level_for_await.js +++ /dev/null @@ -1,10 +0,0 @@ -function* asyncGenerator() { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_await_circular/top_level_await/top_level_for_await.out b/tests/specs/run/top_level_await_circular/top_level_await/top_level_for_await.out deleted file mode 100644 index 4539bbf2d22d5c..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/top_level_for_await.out +++ /dev/null @@ -1,3 +0,0 @@ -0 -1 -2 diff --git a/tests/specs/run/top_level_await_circular/top_level_await/top_level_for_await.ts b/tests/specs/run/top_level_await_circular/top_level_await/top_level_for_await.ts deleted file mode 100644 index 9179322d78f4b1..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/top_level_for_await.ts +++ /dev/null @@ -1,10 +0,0 @@ -async function* asyncGenerator(): AsyncIterableIterator { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_await_circular/top_level_await/unresolved.js b/tests/specs/run/top_level_await_circular/top_level_await/unresolved.js deleted file mode 100644 index 231a8cd634825c..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/unresolved.js +++ /dev/null @@ -1 +0,0 @@ -await new Promise(() => {}); diff --git a/tests/specs/run/top_level_await_circular/top_level_await/unresolved.out b/tests/specs/run/top_level_await_circular/top_level_await/unresolved.out deleted file mode 100644 index 1f4ea5d382955e..00000000000000 --- a/tests/specs/run/top_level_await_circular/top_level_await/unresolved.out +++ /dev/null @@ -1,4 +0,0 @@ -error: Top-level await promise never resolved -await new Promise(() => {}); -^ - at ([WILDCARD]top_level_await/unresolved.js:1:1) diff --git a/tests/specs/run/top_level_await_loop/__test__.jsonc b/tests/specs/run/top_level_await_loop/__test__.jsonc deleted file mode 100644 index b2f5c84c0371bf..00000000000000 --- a/tests/specs/run/top_level_await_loop/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-read top_level_await/loop.js", - "output": "top_level_await/loop.out" -} diff --git a/tests/specs/run/top_level_await_loop/top_level_await/circular.js b/tests/specs/run/top_level_await_loop/top_level_await/circular.js deleted file mode 100644 index ff2964b6a5f794..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/circular.js +++ /dev/null @@ -1,8 +0,0 @@ -import { foo } from "./tla3/timeout_loop.js"; - -export const collection = []; - -const mod = await import("./tla3/b.js"); - -console.log("foo in main", foo); -console.log("mod", mod); diff --git a/tests/specs/run/top_level_await_loop/top_level_await/circular.out b/tests/specs/run/top_level_await_loop/top_level_await/circular.out deleted file mode 100644 index c88978961382c2..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/circular.out +++ /dev/null @@ -1,10 +0,0 @@ -timeout loop 0 -timeout loop 1 -timeout loop 2 -timeout loop 3 -timeout loop 4 -timeout loop 5 -error: Top-level await promise never resolved -const mod = await import("./tla3/b.js"); - ^ - at ([WILDCARD]/top_level_await/circular.js:5:13) diff --git a/tests/specs/run/top_level_await_loop/top_level_await/loop.js b/tests/specs/run/top_level_await_loop/top_level_await/loop.js deleted file mode 100644 index f229e03f61dd0e..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/loop.js +++ /dev/null @@ -1,20 +0,0 @@ -const importsDir = Deno.readDirSync( - Deno.realPathSync("./top_level_await/tla2"), -); - -const resolvedPaths = []; - -for (const { name } of importsDir) { - const filePath = Deno.realPathSync(`./top_level_await/tla2/${name}`); - resolvedPaths.push(filePath); -} - -resolvedPaths.sort(); - -for (const filePath of resolvedPaths) { - console.log("loading", filePath); - const mod = await import(`file://${filePath}`); - console.log("loaded", mod); -} - -console.log("all loaded"); diff --git a/tests/specs/run/top_level_await_loop/top_level_await/loop.out b/tests/specs/run/top_level_await_loop/top_level_await/loop.out deleted file mode 100644 index 1bdffbf6607757..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/loop.out +++ /dev/null @@ -1,5 +0,0 @@ -loading [WILDCARD]a.js -loaded [Module: null prototype] { default: [class Foo] } -loading [WILDCARD]b.js -loaded [Module: null prototype] { default: [class Bar] } -all loaded diff --git a/tests/specs/run/top_level_await_loop/top_level_await/nested.out b/tests/specs/run/top_level_await_loop/top_level_await/nested.out deleted file mode 100644 index 8a1218a1024a21..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/nested.out +++ /dev/null @@ -1,5 +0,0 @@ -1 -2 -3 -4 -5 diff --git a/tests/specs/run/top_level_await_loop/top_level_await/nested/a.js b/tests/specs/run/top_level_await_loop/top_level_await/nested/a.js deleted file mode 100644 index 74837d4ba16833..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/nested/a.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(2); -await import("./b.js"); -console.log(4); diff --git a/tests/specs/run/top_level_await_loop/top_level_await/nested/b.js b/tests/specs/run/top_level_await_loop/top_level_await/nested/b.js deleted file mode 100644 index 3bd241b50e7c44..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/nested/b.js +++ /dev/null @@ -1 +0,0 @@ -console.log(3); diff --git a/tests/specs/run/top_level_await_loop/top_level_await/nested/main.js b/tests/specs/run/top_level_await_loop/top_level_await/nested/main.js deleted file mode 100644 index ed46a47175b330..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/nested/main.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(1); -await import("./a.js"); -console.log(5); diff --git a/tests/specs/run/top_level_await_loop/top_level_await/order.js b/tests/specs/run/top_level_await_loop/top_level_await/order.js deleted file mode 100644 index 30659cdfbfb6ef..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/order.js +++ /dev/null @@ -1,21 +0,0 @@ -// Ported from Node -// https://github.com/nodejs/node/blob/54746bb763ebea0dc7e99d88ff4b379bcd680964/test/es-module/test-esm-tla.mjs - -const { default: order } = await import("./tla/parent.js"); - -console.log("order", JSON.stringify(order)); - -if ( - !( - order[0] === "order" && - order[1] === "b" && - order[2] === "c" && - order[3] === "d" && - order[4] === "a" && - order[5] === "parent" - ) -) { - throw new Error("TLA wrong order"); -} - -console.log("TLA order correct"); diff --git a/tests/specs/run/top_level_await_loop/top_level_await/order.out b/tests/specs/run/top_level_await_loop/top_level_await/order.out deleted file mode 100644 index 4cc27858cff9ff..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/order.out +++ /dev/null @@ -1,2 +0,0 @@ -order ["order","b","c","d","a","parent"] -TLA order correct diff --git a/tests/specs/run/top_level_await_loop/top_level_await/tla/a.js b/tests/specs/run/top_level_await_loop/top_level_await/tla/a.js deleted file mode 100644 index c3ef3f7dbcfd64..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/tla/a.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("b"); diff --git a/tests/specs/run/top_level_await_loop/top_level_await/tla/b.js b/tests/specs/run/top_level_await_loop/top_level_await/tla/b.js deleted file mode 100644 index 3271c92d8f42b5..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/tla/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import order from "./order.js"; - -await new Promise((resolve) => { - setTimeout(resolve, 200); -}); - -order.push("a"); diff --git a/tests/specs/run/top_level_await_loop/top_level_await/tla/c.js b/tests/specs/run/top_level_await_loop/top_level_await/tla/c.js deleted file mode 100644 index 806eb0a8bea39d..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/tla/c.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("c"); diff --git a/tests/specs/run/top_level_await_loop/top_level_await/tla/d.js b/tests/specs/run/top_level_await_loop/top_level_await/tla/d.js deleted file mode 100644 index 283ebf817fa805..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/tla/d.js +++ /dev/null @@ -1,8 +0,0 @@ -import order from "./order.js"; - -const end = Date.now() + 500; -while (end < Date.now()) { - // pass -} - -order.push("d"); diff --git a/tests/specs/run/top_level_await_loop/top_level_await/tla/order.js b/tests/specs/run/top_level_await_loop/top_level_await/tla/order.js deleted file mode 100644 index f213a562ce6e35..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/tla/order.js +++ /dev/null @@ -1 +0,0 @@ -export default ["order"]; diff --git a/tests/specs/run/top_level_await_loop/top_level_await/tla/parent.js b/tests/specs/run/top_level_await_loop/top_level_await/tla/parent.js deleted file mode 100644 index 1ecc154634d375..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/tla/parent.js +++ /dev/null @@ -1,9 +0,0 @@ -import order from "./order.js"; -import "./a.js"; -import "./b.js"; -import "./c.js"; -import "./d.js"; - -order.push("parent"); - -export default order; diff --git a/tests/specs/run/top_level_await_loop/top_level_await/tla2/a.js b/tests/specs/run/top_level_await_loop/top_level_await/tla2/a.js deleted file mode 100644 index d07bcb94db30e4..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/tla2/a.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Foo { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_await_loop/top_level_await/tla2/b.js b/tests/specs/run/top_level_await_loop/top_level_await/tla2/b.js deleted file mode 100644 index 68e357c1e96de3..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/tla2/b.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Bar { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_await_loop/top_level_await/tla3/b.js b/tests/specs/run/top_level_await_loop/top_level_await/tla3/b.js deleted file mode 100644 index d0349545e9d2af..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/tla3/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import { foo } from "./timeout_loop.js"; -import { collection } from "../circular.js"; - -console.log("collection in b", collection); -console.log("foo in b", foo); - -export const a = "a"; diff --git a/tests/specs/run/top_level_await_loop/top_level_await/tla3/timeout_loop.js b/tests/specs/run/top_level_await_loop/top_level_await/tla3/timeout_loop.js deleted file mode 100644 index 860e6cd2ae718e..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/tla3/timeout_loop.js +++ /dev/null @@ -1,23 +0,0 @@ -export const foo = "foo"; - -export function delay(ms) { - return new Promise((res) => - setTimeout(() => { - res(); - }, ms) - ); -} - -let i = 0; - -async function timeoutLoop() { - await delay(1000); - console.log("timeout loop", i); - i++; - if (i > 5) { - return; - } - timeoutLoop(); -} - -timeoutLoop(); diff --git a/tests/specs/run/top_level_await_loop/top_level_await/top_level_await.js b/tests/specs/run/top_level_await_loop/top_level_await/top_level_await.js deleted file mode 100644 index ea319ea124bd6f..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/top_level_await.js +++ /dev/null @@ -1,3 +0,0 @@ -const buf = await Deno.readFile("./assets/hello.txt"); -const n = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_await_loop/top_level_await/top_level_await.out b/tests/specs/run/top_level_await_loop/top_level_await/top_level_await.out deleted file mode 100644 index 4b65d15fe3c0d6..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/top_level_await.out +++ /dev/null @@ -1,3 +0,0 @@ -Hello world! - -write 12 diff --git a/tests/specs/run/top_level_await_loop/top_level_await/top_level_await.ts b/tests/specs/run/top_level_await_loop/top_level_await/top_level_await.ts deleted file mode 100644 index 8d47ceb21e1cf8..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/top_level_await.ts +++ /dev/null @@ -1,3 +0,0 @@ -const buf: Uint8Array = await Deno.readFile("./assets/hello.txt"); -const n: number = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_await_loop/top_level_await/top_level_for_await.js b/tests/specs/run/top_level_await_loop/top_level_await/top_level_for_await.js deleted file mode 100644 index a330f6c7116d2b..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/top_level_for_await.js +++ /dev/null @@ -1,10 +0,0 @@ -function* asyncGenerator() { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_await_loop/top_level_await/top_level_for_await.out b/tests/specs/run/top_level_await_loop/top_level_await/top_level_for_await.out deleted file mode 100644 index 4539bbf2d22d5c..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/top_level_for_await.out +++ /dev/null @@ -1,3 +0,0 @@ -0 -1 -2 diff --git a/tests/specs/run/top_level_await_loop/top_level_await/top_level_for_await.ts b/tests/specs/run/top_level_await_loop/top_level_await/top_level_for_await.ts deleted file mode 100644 index 9179322d78f4b1..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/top_level_for_await.ts +++ /dev/null @@ -1,10 +0,0 @@ -async function* asyncGenerator(): AsyncIterableIterator { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_await_loop/top_level_await/unresolved.js b/tests/specs/run/top_level_await_loop/top_level_await/unresolved.js deleted file mode 100644 index 231a8cd634825c..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/unresolved.js +++ /dev/null @@ -1 +0,0 @@ -await new Promise(() => {}); diff --git a/tests/specs/run/top_level_await_loop/top_level_await/unresolved.out b/tests/specs/run/top_level_await_loop/top_level_await/unresolved.out deleted file mode 100644 index 1f4ea5d382955e..00000000000000 --- a/tests/specs/run/top_level_await_loop/top_level_await/unresolved.out +++ /dev/null @@ -1,4 +0,0 @@ -error: Top-level await promise never resolved -await new Promise(() => {}); -^ - at ([WILDCARD]top_level_await/unresolved.js:1:1) diff --git a/tests/specs/run/top_level_await_nested/__test__.jsonc b/tests/specs/run/top_level_await_nested/__test__.jsonc deleted file mode 100644 index 376180ecdc8ba1..00000000000000 --- a/tests/specs/run/top_level_await_nested/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-read top_level_await/nested/main.js", - "output": "top_level_await/nested.out" -} diff --git a/tests/specs/run/top_level_await_nested/top_level_await/circular.js b/tests/specs/run/top_level_await_nested/top_level_await/circular.js deleted file mode 100644 index ff2964b6a5f794..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/circular.js +++ /dev/null @@ -1,8 +0,0 @@ -import { foo } from "./tla3/timeout_loop.js"; - -export const collection = []; - -const mod = await import("./tla3/b.js"); - -console.log("foo in main", foo); -console.log("mod", mod); diff --git a/tests/specs/run/top_level_await_nested/top_level_await/circular.out b/tests/specs/run/top_level_await_nested/top_level_await/circular.out deleted file mode 100644 index c88978961382c2..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/circular.out +++ /dev/null @@ -1,10 +0,0 @@ -timeout loop 0 -timeout loop 1 -timeout loop 2 -timeout loop 3 -timeout loop 4 -timeout loop 5 -error: Top-level await promise never resolved -const mod = await import("./tla3/b.js"); - ^ - at ([WILDCARD]/top_level_await/circular.js:5:13) diff --git a/tests/specs/run/top_level_await_nested/top_level_await/loop.js b/tests/specs/run/top_level_await_nested/top_level_await/loop.js deleted file mode 100644 index 415db5ec781111..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/loop.js +++ /dev/null @@ -1,20 +0,0 @@ -const importsDir = Deno.readDirSync( - Deno.realPathSync("./run/top_level_await/tla2"), -); - -const resolvedPaths = []; - -for (const { name } of importsDir) { - const filePath = Deno.realPathSync(`./run/top_level_await/tla2/${name}`); - resolvedPaths.push(filePath); -} - -resolvedPaths.sort(); - -for (const filePath of resolvedPaths) { - console.log("loading", filePath); - const mod = await import(`file://${filePath}`); - console.log("loaded", mod); -} - -console.log("all loaded"); diff --git a/tests/specs/run/top_level_await_nested/top_level_await/loop.out b/tests/specs/run/top_level_await_nested/top_level_await/loop.out deleted file mode 100644 index 1bdffbf6607757..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/loop.out +++ /dev/null @@ -1,5 +0,0 @@ -loading [WILDCARD]a.js -loaded [Module: null prototype] { default: [class Foo] } -loading [WILDCARD]b.js -loaded [Module: null prototype] { default: [class Bar] } -all loaded diff --git a/tests/specs/run/top_level_await_nested/top_level_await/nested.out b/tests/specs/run/top_level_await_nested/top_level_await/nested.out deleted file mode 100644 index 8a1218a1024a21..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/nested.out +++ /dev/null @@ -1,5 +0,0 @@ -1 -2 -3 -4 -5 diff --git a/tests/specs/run/top_level_await_nested/top_level_await/nested/a.js b/tests/specs/run/top_level_await_nested/top_level_await/nested/a.js deleted file mode 100644 index 74837d4ba16833..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/nested/a.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(2); -await import("./b.js"); -console.log(4); diff --git a/tests/specs/run/top_level_await_nested/top_level_await/nested/b.js b/tests/specs/run/top_level_await_nested/top_level_await/nested/b.js deleted file mode 100644 index 3bd241b50e7c44..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/nested/b.js +++ /dev/null @@ -1 +0,0 @@ -console.log(3); diff --git a/tests/specs/run/top_level_await_nested/top_level_await/nested/main.js b/tests/specs/run/top_level_await_nested/top_level_await/nested/main.js deleted file mode 100644 index ed46a47175b330..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/nested/main.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(1); -await import("./a.js"); -console.log(5); diff --git a/tests/specs/run/top_level_await_nested/top_level_await/order.js b/tests/specs/run/top_level_await_nested/top_level_await/order.js deleted file mode 100644 index 30659cdfbfb6ef..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/order.js +++ /dev/null @@ -1,21 +0,0 @@ -// Ported from Node -// https://github.com/nodejs/node/blob/54746bb763ebea0dc7e99d88ff4b379bcd680964/test/es-module/test-esm-tla.mjs - -const { default: order } = await import("./tla/parent.js"); - -console.log("order", JSON.stringify(order)); - -if ( - !( - order[0] === "order" && - order[1] === "b" && - order[2] === "c" && - order[3] === "d" && - order[4] === "a" && - order[5] === "parent" - ) -) { - throw new Error("TLA wrong order"); -} - -console.log("TLA order correct"); diff --git a/tests/specs/run/top_level_await_nested/top_level_await/order.out b/tests/specs/run/top_level_await_nested/top_level_await/order.out deleted file mode 100644 index 4cc27858cff9ff..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/order.out +++ /dev/null @@ -1,2 +0,0 @@ -order ["order","b","c","d","a","parent"] -TLA order correct diff --git a/tests/specs/run/top_level_await_nested/top_level_await/tla/a.js b/tests/specs/run/top_level_await_nested/top_level_await/tla/a.js deleted file mode 100644 index c3ef3f7dbcfd64..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/tla/a.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("b"); diff --git a/tests/specs/run/top_level_await_nested/top_level_await/tla/b.js b/tests/specs/run/top_level_await_nested/top_level_await/tla/b.js deleted file mode 100644 index 3271c92d8f42b5..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/tla/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import order from "./order.js"; - -await new Promise((resolve) => { - setTimeout(resolve, 200); -}); - -order.push("a"); diff --git a/tests/specs/run/top_level_await_nested/top_level_await/tla/c.js b/tests/specs/run/top_level_await_nested/top_level_await/tla/c.js deleted file mode 100644 index 806eb0a8bea39d..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/tla/c.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("c"); diff --git a/tests/specs/run/top_level_await_nested/top_level_await/tla/d.js b/tests/specs/run/top_level_await_nested/top_level_await/tla/d.js deleted file mode 100644 index 283ebf817fa805..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/tla/d.js +++ /dev/null @@ -1,8 +0,0 @@ -import order from "./order.js"; - -const end = Date.now() + 500; -while (end < Date.now()) { - // pass -} - -order.push("d"); diff --git a/tests/specs/run/top_level_await_nested/top_level_await/tla/order.js b/tests/specs/run/top_level_await_nested/top_level_await/tla/order.js deleted file mode 100644 index f213a562ce6e35..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/tla/order.js +++ /dev/null @@ -1 +0,0 @@ -export default ["order"]; diff --git a/tests/specs/run/top_level_await_nested/top_level_await/tla/parent.js b/tests/specs/run/top_level_await_nested/top_level_await/tla/parent.js deleted file mode 100644 index 1ecc154634d375..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/tla/parent.js +++ /dev/null @@ -1,9 +0,0 @@ -import order from "./order.js"; -import "./a.js"; -import "./b.js"; -import "./c.js"; -import "./d.js"; - -order.push("parent"); - -export default order; diff --git a/tests/specs/run/top_level_await_nested/top_level_await/tla2/a.js b/tests/specs/run/top_level_await_nested/top_level_await/tla2/a.js deleted file mode 100644 index d07bcb94db30e4..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/tla2/a.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Foo { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_await_nested/top_level_await/tla2/b.js b/tests/specs/run/top_level_await_nested/top_level_await/tla2/b.js deleted file mode 100644 index 68e357c1e96de3..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/tla2/b.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Bar { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_await_nested/top_level_await/tla3/b.js b/tests/specs/run/top_level_await_nested/top_level_await/tla3/b.js deleted file mode 100644 index d0349545e9d2af..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/tla3/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import { foo } from "./timeout_loop.js"; -import { collection } from "../circular.js"; - -console.log("collection in b", collection); -console.log("foo in b", foo); - -export const a = "a"; diff --git a/tests/specs/run/top_level_await_nested/top_level_await/tla3/timeout_loop.js b/tests/specs/run/top_level_await_nested/top_level_await/tla3/timeout_loop.js deleted file mode 100644 index 860e6cd2ae718e..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/tla3/timeout_loop.js +++ /dev/null @@ -1,23 +0,0 @@ -export const foo = "foo"; - -export function delay(ms) { - return new Promise((res) => - setTimeout(() => { - res(); - }, ms) - ); -} - -let i = 0; - -async function timeoutLoop() { - await delay(1000); - console.log("timeout loop", i); - i++; - if (i > 5) { - return; - } - timeoutLoop(); -} - -timeoutLoop(); diff --git a/tests/specs/run/top_level_await_nested/top_level_await/top_level_await.js b/tests/specs/run/top_level_await_nested/top_level_await/top_level_await.js deleted file mode 100644 index ea319ea124bd6f..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/top_level_await.js +++ /dev/null @@ -1,3 +0,0 @@ -const buf = await Deno.readFile("./assets/hello.txt"); -const n = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_await_nested/top_level_await/top_level_await.out b/tests/specs/run/top_level_await_nested/top_level_await/top_level_await.out deleted file mode 100644 index 4b65d15fe3c0d6..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/top_level_await.out +++ /dev/null @@ -1,3 +0,0 @@ -Hello world! - -write 12 diff --git a/tests/specs/run/top_level_await_nested/top_level_await/top_level_await.ts b/tests/specs/run/top_level_await_nested/top_level_await/top_level_await.ts deleted file mode 100644 index 8d47ceb21e1cf8..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/top_level_await.ts +++ /dev/null @@ -1,3 +0,0 @@ -const buf: Uint8Array = await Deno.readFile("./assets/hello.txt"); -const n: number = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_await_nested/top_level_await/top_level_for_await.js b/tests/specs/run/top_level_await_nested/top_level_await/top_level_for_await.js deleted file mode 100644 index a330f6c7116d2b..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/top_level_for_await.js +++ /dev/null @@ -1,10 +0,0 @@ -function* asyncGenerator() { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_await_nested/top_level_await/top_level_for_await.out b/tests/specs/run/top_level_await_nested/top_level_await/top_level_for_await.out deleted file mode 100644 index 4539bbf2d22d5c..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/top_level_for_await.out +++ /dev/null @@ -1,3 +0,0 @@ -0 -1 -2 diff --git a/tests/specs/run/top_level_await_nested/top_level_await/top_level_for_await.ts b/tests/specs/run/top_level_await_nested/top_level_await/top_level_for_await.ts deleted file mode 100644 index 9179322d78f4b1..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/top_level_for_await.ts +++ /dev/null @@ -1,10 +0,0 @@ -async function* asyncGenerator(): AsyncIterableIterator { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_await_nested/top_level_await/unresolved.js b/tests/specs/run/top_level_await_nested/top_level_await/unresolved.js deleted file mode 100644 index 231a8cd634825c..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/unresolved.js +++ /dev/null @@ -1 +0,0 @@ -await new Promise(() => {}); diff --git a/tests/specs/run/top_level_await_nested/top_level_await/unresolved.out b/tests/specs/run/top_level_await_nested/top_level_await/unresolved.out deleted file mode 100644 index 1f4ea5d382955e..00000000000000 --- a/tests/specs/run/top_level_await_nested/top_level_await/unresolved.out +++ /dev/null @@ -1,4 +0,0 @@ -error: Top-level await promise never resolved -await new Promise(() => {}); -^ - at ([WILDCARD]top_level_await/unresolved.js:1:1) diff --git a/tests/specs/run/top_level_await_order/__test__.jsonc b/tests/specs/run/top_level_await_order/__test__.jsonc deleted file mode 100644 index 65d00d607d836f..00000000000000 --- a/tests/specs/run/top_level_await_order/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --allow-read top_level_await/order.js", - "output": "top_level_await/order.out" -} diff --git a/tests/specs/run/top_level_await_order/top_level_await/circular.js b/tests/specs/run/top_level_await_order/top_level_await/circular.js deleted file mode 100644 index ff2964b6a5f794..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/circular.js +++ /dev/null @@ -1,8 +0,0 @@ -import { foo } from "./tla3/timeout_loop.js"; - -export const collection = []; - -const mod = await import("./tla3/b.js"); - -console.log("foo in main", foo); -console.log("mod", mod); diff --git a/tests/specs/run/top_level_await_order/top_level_await/circular.out b/tests/specs/run/top_level_await_order/top_level_await/circular.out deleted file mode 100644 index c88978961382c2..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/circular.out +++ /dev/null @@ -1,10 +0,0 @@ -timeout loop 0 -timeout loop 1 -timeout loop 2 -timeout loop 3 -timeout loop 4 -timeout loop 5 -error: Top-level await promise never resolved -const mod = await import("./tla3/b.js"); - ^ - at ([WILDCARD]/top_level_await/circular.js:5:13) diff --git a/tests/specs/run/top_level_await_order/top_level_await/loop.js b/tests/specs/run/top_level_await_order/top_level_await/loop.js deleted file mode 100644 index 415db5ec781111..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/loop.js +++ /dev/null @@ -1,20 +0,0 @@ -const importsDir = Deno.readDirSync( - Deno.realPathSync("./run/top_level_await/tla2"), -); - -const resolvedPaths = []; - -for (const { name } of importsDir) { - const filePath = Deno.realPathSync(`./run/top_level_await/tla2/${name}`); - resolvedPaths.push(filePath); -} - -resolvedPaths.sort(); - -for (const filePath of resolvedPaths) { - console.log("loading", filePath); - const mod = await import(`file://${filePath}`); - console.log("loaded", mod); -} - -console.log("all loaded"); diff --git a/tests/specs/run/top_level_await_order/top_level_await/loop.out b/tests/specs/run/top_level_await_order/top_level_await/loop.out deleted file mode 100644 index 1bdffbf6607757..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/loop.out +++ /dev/null @@ -1,5 +0,0 @@ -loading [WILDCARD]a.js -loaded [Module: null prototype] { default: [class Foo] } -loading [WILDCARD]b.js -loaded [Module: null prototype] { default: [class Bar] } -all loaded diff --git a/tests/specs/run/top_level_await_order/top_level_await/nested.out b/tests/specs/run/top_level_await_order/top_level_await/nested.out deleted file mode 100644 index 8a1218a1024a21..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/nested.out +++ /dev/null @@ -1,5 +0,0 @@ -1 -2 -3 -4 -5 diff --git a/tests/specs/run/top_level_await_order/top_level_await/nested/a.js b/tests/specs/run/top_level_await_order/top_level_await/nested/a.js deleted file mode 100644 index 74837d4ba16833..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/nested/a.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(2); -await import("./b.js"); -console.log(4); diff --git a/tests/specs/run/top_level_await_order/top_level_await/nested/b.js b/tests/specs/run/top_level_await_order/top_level_await/nested/b.js deleted file mode 100644 index 3bd241b50e7c44..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/nested/b.js +++ /dev/null @@ -1 +0,0 @@ -console.log(3); diff --git a/tests/specs/run/top_level_await_order/top_level_await/nested/main.js b/tests/specs/run/top_level_await_order/top_level_await/nested/main.js deleted file mode 100644 index ed46a47175b330..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/nested/main.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(1); -await import("./a.js"); -console.log(5); diff --git a/tests/specs/run/top_level_await_order/top_level_await/order.js b/tests/specs/run/top_level_await_order/top_level_await/order.js deleted file mode 100644 index 30659cdfbfb6ef..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/order.js +++ /dev/null @@ -1,21 +0,0 @@ -// Ported from Node -// https://github.com/nodejs/node/blob/54746bb763ebea0dc7e99d88ff4b379bcd680964/test/es-module/test-esm-tla.mjs - -const { default: order } = await import("./tla/parent.js"); - -console.log("order", JSON.stringify(order)); - -if ( - !( - order[0] === "order" && - order[1] === "b" && - order[2] === "c" && - order[3] === "d" && - order[4] === "a" && - order[5] === "parent" - ) -) { - throw new Error("TLA wrong order"); -} - -console.log("TLA order correct"); diff --git a/tests/specs/run/top_level_await_order/top_level_await/order.out b/tests/specs/run/top_level_await_order/top_level_await/order.out deleted file mode 100644 index 4cc27858cff9ff..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/order.out +++ /dev/null @@ -1,2 +0,0 @@ -order ["order","b","c","d","a","parent"] -TLA order correct diff --git a/tests/specs/run/top_level_await_order/top_level_await/tla/a.js b/tests/specs/run/top_level_await_order/top_level_await/tla/a.js deleted file mode 100644 index c3ef3f7dbcfd64..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/tla/a.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("b"); diff --git a/tests/specs/run/top_level_await_order/top_level_await/tla/b.js b/tests/specs/run/top_level_await_order/top_level_await/tla/b.js deleted file mode 100644 index 3271c92d8f42b5..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/tla/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import order from "./order.js"; - -await new Promise((resolve) => { - setTimeout(resolve, 200); -}); - -order.push("a"); diff --git a/tests/specs/run/top_level_await_order/top_level_await/tla/c.js b/tests/specs/run/top_level_await_order/top_level_await/tla/c.js deleted file mode 100644 index 806eb0a8bea39d..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/tla/c.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("c"); diff --git a/tests/specs/run/top_level_await_order/top_level_await/tla/d.js b/tests/specs/run/top_level_await_order/top_level_await/tla/d.js deleted file mode 100644 index 283ebf817fa805..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/tla/d.js +++ /dev/null @@ -1,8 +0,0 @@ -import order from "./order.js"; - -const end = Date.now() + 500; -while (end < Date.now()) { - // pass -} - -order.push("d"); diff --git a/tests/specs/run/top_level_await_order/top_level_await/tla/order.js b/tests/specs/run/top_level_await_order/top_level_await/tla/order.js deleted file mode 100644 index f213a562ce6e35..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/tla/order.js +++ /dev/null @@ -1 +0,0 @@ -export default ["order"]; diff --git a/tests/specs/run/top_level_await_order/top_level_await/tla/parent.js b/tests/specs/run/top_level_await_order/top_level_await/tla/parent.js deleted file mode 100644 index 1ecc154634d375..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/tla/parent.js +++ /dev/null @@ -1,9 +0,0 @@ -import order from "./order.js"; -import "./a.js"; -import "./b.js"; -import "./c.js"; -import "./d.js"; - -order.push("parent"); - -export default order; diff --git a/tests/specs/run/top_level_await_order/top_level_await/tla2/a.js b/tests/specs/run/top_level_await_order/top_level_await/tla2/a.js deleted file mode 100644 index d07bcb94db30e4..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/tla2/a.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Foo { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_await_order/top_level_await/tla2/b.js b/tests/specs/run/top_level_await_order/top_level_await/tla2/b.js deleted file mode 100644 index 68e357c1e96de3..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/tla2/b.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Bar { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_await_order/top_level_await/tla3/b.js b/tests/specs/run/top_level_await_order/top_level_await/tla3/b.js deleted file mode 100644 index d0349545e9d2af..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/tla3/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import { foo } from "./timeout_loop.js"; -import { collection } from "../circular.js"; - -console.log("collection in b", collection); -console.log("foo in b", foo); - -export const a = "a"; diff --git a/tests/specs/run/top_level_await_order/top_level_await/tla3/timeout_loop.js b/tests/specs/run/top_level_await_order/top_level_await/tla3/timeout_loop.js deleted file mode 100644 index 860e6cd2ae718e..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/tla3/timeout_loop.js +++ /dev/null @@ -1,23 +0,0 @@ -export const foo = "foo"; - -export function delay(ms) { - return new Promise((res) => - setTimeout(() => { - res(); - }, ms) - ); -} - -let i = 0; - -async function timeoutLoop() { - await delay(1000); - console.log("timeout loop", i); - i++; - if (i > 5) { - return; - } - timeoutLoop(); -} - -timeoutLoop(); diff --git a/tests/specs/run/top_level_await_order/top_level_await/top_level_await.js b/tests/specs/run/top_level_await_order/top_level_await/top_level_await.js deleted file mode 100644 index ea319ea124bd6f..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/top_level_await.js +++ /dev/null @@ -1,3 +0,0 @@ -const buf = await Deno.readFile("./assets/hello.txt"); -const n = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_await_order/top_level_await/top_level_await.out b/tests/specs/run/top_level_await_order/top_level_await/top_level_await.out deleted file mode 100644 index 4b65d15fe3c0d6..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/top_level_await.out +++ /dev/null @@ -1,3 +0,0 @@ -Hello world! - -write 12 diff --git a/tests/specs/run/top_level_await_order/top_level_await/top_level_await.ts b/tests/specs/run/top_level_await_order/top_level_await/top_level_await.ts deleted file mode 100644 index 8d47ceb21e1cf8..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/top_level_await.ts +++ /dev/null @@ -1,3 +0,0 @@ -const buf: Uint8Array = await Deno.readFile("./assets/hello.txt"); -const n: number = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_await_order/top_level_await/top_level_for_await.js b/tests/specs/run/top_level_await_order/top_level_await/top_level_for_await.js deleted file mode 100644 index a330f6c7116d2b..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/top_level_for_await.js +++ /dev/null @@ -1,10 +0,0 @@ -function* asyncGenerator() { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_await_order/top_level_await/top_level_for_await.out b/tests/specs/run/top_level_await_order/top_level_await/top_level_for_await.out deleted file mode 100644 index 4539bbf2d22d5c..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/top_level_for_await.out +++ /dev/null @@ -1,3 +0,0 @@ -0 -1 -2 diff --git a/tests/specs/run/top_level_await_order/top_level_await/top_level_for_await.ts b/tests/specs/run/top_level_await_order/top_level_await/top_level_for_await.ts deleted file mode 100644 index 9179322d78f4b1..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/top_level_for_await.ts +++ /dev/null @@ -1,10 +0,0 @@ -async function* asyncGenerator(): AsyncIterableIterator { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_await_order/top_level_await/unresolved.js b/tests/specs/run/top_level_await_order/top_level_await/unresolved.js deleted file mode 100644 index 231a8cd634825c..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/unresolved.js +++ /dev/null @@ -1 +0,0 @@ -await new Promise(() => {}); diff --git a/tests/specs/run/top_level_await_order/top_level_await/unresolved.out b/tests/specs/run/top_level_await_order/top_level_await/unresolved.out deleted file mode 100644 index 1f4ea5d382955e..00000000000000 --- a/tests/specs/run/top_level_await_order/top_level_await/unresolved.out +++ /dev/null @@ -1,4 +0,0 @@ -error: Top-level await promise never resolved -await new Promise(() => {}); -^ - at ([WILDCARD]top_level_await/unresolved.js:1:1) diff --git a/tests/specs/run/top_level_await_ts/__test__.jsonc b/tests/specs/run/top_level_await_ts/__test__.jsonc deleted file mode 100644 index 15f937df19b363..00000000000000 --- a/tests/specs/run/top_level_await_ts/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --quiet --allow-read top_level_await/top_level_await.ts", - "output": "top_level_await/top_level_await.out" -} diff --git a/tests/specs/run/top_level_await_ts/hello.txt b/tests/specs/run/top_level_await_ts/hello.txt deleted file mode 100644 index 6769dd60bdf536..00000000000000 --- a/tests/specs/run/top_level_await_ts/hello.txt +++ /dev/null @@ -1 +0,0 @@ -Hello world! \ No newline at end of file diff --git a/tests/specs/run/top_level_await_ts/top_level_await/circular.js b/tests/specs/run/top_level_await_ts/top_level_await/circular.js deleted file mode 100644 index ff2964b6a5f794..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/circular.js +++ /dev/null @@ -1,8 +0,0 @@ -import { foo } from "./tla3/timeout_loop.js"; - -export const collection = []; - -const mod = await import("./tla3/b.js"); - -console.log("foo in main", foo); -console.log("mod", mod); diff --git a/tests/specs/run/top_level_await_ts/top_level_await/circular.out b/tests/specs/run/top_level_await_ts/top_level_await/circular.out deleted file mode 100644 index c88978961382c2..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/circular.out +++ /dev/null @@ -1,10 +0,0 @@ -timeout loop 0 -timeout loop 1 -timeout loop 2 -timeout loop 3 -timeout loop 4 -timeout loop 5 -error: Top-level await promise never resolved -const mod = await import("./tla3/b.js"); - ^ - at ([WILDCARD]/top_level_await/circular.js:5:13) diff --git a/tests/specs/run/top_level_await_ts/top_level_await/loop.js b/tests/specs/run/top_level_await_ts/top_level_await/loop.js deleted file mode 100644 index 415db5ec781111..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/loop.js +++ /dev/null @@ -1,20 +0,0 @@ -const importsDir = Deno.readDirSync( - Deno.realPathSync("./run/top_level_await/tla2"), -); - -const resolvedPaths = []; - -for (const { name } of importsDir) { - const filePath = Deno.realPathSync(`./run/top_level_await/tla2/${name}`); - resolvedPaths.push(filePath); -} - -resolvedPaths.sort(); - -for (const filePath of resolvedPaths) { - console.log("loading", filePath); - const mod = await import(`file://${filePath}`); - console.log("loaded", mod); -} - -console.log("all loaded"); diff --git a/tests/specs/run/top_level_await_ts/top_level_await/loop.out b/tests/specs/run/top_level_await_ts/top_level_await/loop.out deleted file mode 100644 index 1bdffbf6607757..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/loop.out +++ /dev/null @@ -1,5 +0,0 @@ -loading [WILDCARD]a.js -loaded [Module: null prototype] { default: [class Foo] } -loading [WILDCARD]b.js -loaded [Module: null prototype] { default: [class Bar] } -all loaded diff --git a/tests/specs/run/top_level_await_ts/top_level_await/nested.out b/tests/specs/run/top_level_await_ts/top_level_await/nested.out deleted file mode 100644 index 8a1218a1024a21..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/nested.out +++ /dev/null @@ -1,5 +0,0 @@ -1 -2 -3 -4 -5 diff --git a/tests/specs/run/top_level_await_ts/top_level_await/nested/a.js b/tests/specs/run/top_level_await_ts/top_level_await/nested/a.js deleted file mode 100644 index 74837d4ba16833..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/nested/a.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(2); -await import("./b.js"); -console.log(4); diff --git a/tests/specs/run/top_level_await_ts/top_level_await/nested/b.js b/tests/specs/run/top_level_await_ts/top_level_await/nested/b.js deleted file mode 100644 index 3bd241b50e7c44..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/nested/b.js +++ /dev/null @@ -1 +0,0 @@ -console.log(3); diff --git a/tests/specs/run/top_level_await_ts/top_level_await/nested/main.js b/tests/specs/run/top_level_await_ts/top_level_await/nested/main.js deleted file mode 100644 index ed46a47175b330..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/nested/main.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(1); -await import("./a.js"); -console.log(5); diff --git a/tests/specs/run/top_level_await_ts/top_level_await/order.js b/tests/specs/run/top_level_await_ts/top_level_await/order.js deleted file mode 100644 index 30659cdfbfb6ef..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/order.js +++ /dev/null @@ -1,21 +0,0 @@ -// Ported from Node -// https://github.com/nodejs/node/blob/54746bb763ebea0dc7e99d88ff4b379bcd680964/test/es-module/test-esm-tla.mjs - -const { default: order } = await import("./tla/parent.js"); - -console.log("order", JSON.stringify(order)); - -if ( - !( - order[0] === "order" && - order[1] === "b" && - order[2] === "c" && - order[3] === "d" && - order[4] === "a" && - order[5] === "parent" - ) -) { - throw new Error("TLA wrong order"); -} - -console.log("TLA order correct"); diff --git a/tests/specs/run/top_level_await_ts/top_level_await/order.out b/tests/specs/run/top_level_await_ts/top_level_await/order.out deleted file mode 100644 index 4cc27858cff9ff..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/order.out +++ /dev/null @@ -1,2 +0,0 @@ -order ["order","b","c","d","a","parent"] -TLA order correct diff --git a/tests/specs/run/top_level_await_ts/top_level_await/tla/a.js b/tests/specs/run/top_level_await_ts/top_level_await/tla/a.js deleted file mode 100644 index c3ef3f7dbcfd64..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/tla/a.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("b"); diff --git a/tests/specs/run/top_level_await_ts/top_level_await/tla/b.js b/tests/specs/run/top_level_await_ts/top_level_await/tla/b.js deleted file mode 100644 index 3271c92d8f42b5..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/tla/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import order from "./order.js"; - -await new Promise((resolve) => { - setTimeout(resolve, 200); -}); - -order.push("a"); diff --git a/tests/specs/run/top_level_await_ts/top_level_await/tla/c.js b/tests/specs/run/top_level_await_ts/top_level_await/tla/c.js deleted file mode 100644 index 806eb0a8bea39d..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/tla/c.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("c"); diff --git a/tests/specs/run/top_level_await_ts/top_level_await/tla/d.js b/tests/specs/run/top_level_await_ts/top_level_await/tla/d.js deleted file mode 100644 index 283ebf817fa805..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/tla/d.js +++ /dev/null @@ -1,8 +0,0 @@ -import order from "./order.js"; - -const end = Date.now() + 500; -while (end < Date.now()) { - // pass -} - -order.push("d"); diff --git a/tests/specs/run/top_level_await_ts/top_level_await/tla/order.js b/tests/specs/run/top_level_await_ts/top_level_await/tla/order.js deleted file mode 100644 index f213a562ce6e35..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/tla/order.js +++ /dev/null @@ -1 +0,0 @@ -export default ["order"]; diff --git a/tests/specs/run/top_level_await_ts/top_level_await/tla/parent.js b/tests/specs/run/top_level_await_ts/top_level_await/tla/parent.js deleted file mode 100644 index 1ecc154634d375..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/tla/parent.js +++ /dev/null @@ -1,9 +0,0 @@ -import order from "./order.js"; -import "./a.js"; -import "./b.js"; -import "./c.js"; -import "./d.js"; - -order.push("parent"); - -export default order; diff --git a/tests/specs/run/top_level_await_ts/top_level_await/tla2/a.js b/tests/specs/run/top_level_await_ts/top_level_await/tla2/a.js deleted file mode 100644 index d07bcb94db30e4..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/tla2/a.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Foo { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_await_ts/top_level_await/tla2/b.js b/tests/specs/run/top_level_await_ts/top_level_await/tla2/b.js deleted file mode 100644 index 68e357c1e96de3..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/tla2/b.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Bar { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_await_ts/top_level_await/tla3/b.js b/tests/specs/run/top_level_await_ts/top_level_await/tla3/b.js deleted file mode 100644 index d0349545e9d2af..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/tla3/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import { foo } from "./timeout_loop.js"; -import { collection } from "../circular.js"; - -console.log("collection in b", collection); -console.log("foo in b", foo); - -export const a = "a"; diff --git a/tests/specs/run/top_level_await_ts/top_level_await/tla3/timeout_loop.js b/tests/specs/run/top_level_await_ts/top_level_await/tla3/timeout_loop.js deleted file mode 100644 index 860e6cd2ae718e..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/tla3/timeout_loop.js +++ /dev/null @@ -1,23 +0,0 @@ -export const foo = "foo"; - -export function delay(ms) { - return new Promise((res) => - setTimeout(() => { - res(); - }, ms) - ); -} - -let i = 0; - -async function timeoutLoop() { - await delay(1000); - console.log("timeout loop", i); - i++; - if (i > 5) { - return; - } - timeoutLoop(); -} - -timeoutLoop(); diff --git a/tests/specs/run/top_level_await_ts/top_level_await/top_level_await.js b/tests/specs/run/top_level_await_ts/top_level_await/top_level_await.js deleted file mode 100644 index ea319ea124bd6f..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/top_level_await.js +++ /dev/null @@ -1,3 +0,0 @@ -const buf = await Deno.readFile("./assets/hello.txt"); -const n = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_await_ts/top_level_await/top_level_await.out b/tests/specs/run/top_level_await_ts/top_level_await/top_level_await.out deleted file mode 100644 index 4b65d15fe3c0d6..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/top_level_await.out +++ /dev/null @@ -1,3 +0,0 @@ -Hello world! - -write 12 diff --git a/tests/specs/run/top_level_await_ts/top_level_await/top_level_for_await.js b/tests/specs/run/top_level_await_ts/top_level_await/top_level_for_await.js deleted file mode 100644 index a330f6c7116d2b..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/top_level_for_await.js +++ /dev/null @@ -1,10 +0,0 @@ -function* asyncGenerator() { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_await_ts/top_level_await/top_level_for_await.out b/tests/specs/run/top_level_await_ts/top_level_await/top_level_for_await.out deleted file mode 100644 index 4539bbf2d22d5c..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/top_level_for_await.out +++ /dev/null @@ -1,3 +0,0 @@ -0 -1 -2 diff --git a/tests/specs/run/top_level_await_ts/top_level_await/top_level_for_await.ts b/tests/specs/run/top_level_await_ts/top_level_await/top_level_for_await.ts deleted file mode 100644 index 9179322d78f4b1..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/top_level_for_await.ts +++ /dev/null @@ -1,10 +0,0 @@ -async function* asyncGenerator(): AsyncIterableIterator { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_await_ts/top_level_await/unresolved.js b/tests/specs/run/top_level_await_ts/top_level_await/unresolved.js deleted file mode 100644 index 231a8cd634825c..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/unresolved.js +++ /dev/null @@ -1 +0,0 @@ -await new Promise(() => {}); diff --git a/tests/specs/run/top_level_await_ts/top_level_await/unresolved.out b/tests/specs/run/top_level_await_ts/top_level_await/unresolved.out deleted file mode 100644 index 1f4ea5d382955e..00000000000000 --- a/tests/specs/run/top_level_await_ts/top_level_await/unresolved.out +++ /dev/null @@ -1,4 +0,0 @@ -error: Top-level await promise never resolved -await new Promise(() => {}); -^ - at ([WILDCARD]top_level_await/unresolved.js:1:1) diff --git a/tests/specs/run/top_level_await_unresolved/__test__.jsonc b/tests/specs/run/top_level_await_unresolved/__test__.jsonc deleted file mode 100644 index a92774c1b8aee2..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/__test__.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "args": "run top_level_await/unresolved.js", - "output": "top_level_await/unresolved.out", - "exitCode": 1 -} diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/circular.js b/tests/specs/run/top_level_await_unresolved/top_level_await/circular.js deleted file mode 100644 index ff2964b6a5f794..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/circular.js +++ /dev/null @@ -1,8 +0,0 @@ -import { foo } from "./tla3/timeout_loop.js"; - -export const collection = []; - -const mod = await import("./tla3/b.js"); - -console.log("foo in main", foo); -console.log("mod", mod); diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/circular.out b/tests/specs/run/top_level_await_unresolved/top_level_await/circular.out deleted file mode 100644 index c88978961382c2..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/circular.out +++ /dev/null @@ -1,10 +0,0 @@ -timeout loop 0 -timeout loop 1 -timeout loop 2 -timeout loop 3 -timeout loop 4 -timeout loop 5 -error: Top-level await promise never resolved -const mod = await import("./tla3/b.js"); - ^ - at ([WILDCARD]/top_level_await/circular.js:5:13) diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/loop.js b/tests/specs/run/top_level_await_unresolved/top_level_await/loop.js deleted file mode 100644 index 415db5ec781111..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/loop.js +++ /dev/null @@ -1,20 +0,0 @@ -const importsDir = Deno.readDirSync( - Deno.realPathSync("./run/top_level_await/tla2"), -); - -const resolvedPaths = []; - -for (const { name } of importsDir) { - const filePath = Deno.realPathSync(`./run/top_level_await/tla2/${name}`); - resolvedPaths.push(filePath); -} - -resolvedPaths.sort(); - -for (const filePath of resolvedPaths) { - console.log("loading", filePath); - const mod = await import(`file://${filePath}`); - console.log("loaded", mod); -} - -console.log("all loaded"); diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/loop.out b/tests/specs/run/top_level_await_unresolved/top_level_await/loop.out deleted file mode 100644 index 1bdffbf6607757..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/loop.out +++ /dev/null @@ -1,5 +0,0 @@ -loading [WILDCARD]a.js -loaded [Module: null prototype] { default: [class Foo] } -loading [WILDCARD]b.js -loaded [Module: null prototype] { default: [class Bar] } -all loaded diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/nested.out b/tests/specs/run/top_level_await_unresolved/top_level_await/nested.out deleted file mode 100644 index 8a1218a1024a21..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/nested.out +++ /dev/null @@ -1,5 +0,0 @@ -1 -2 -3 -4 -5 diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/nested/a.js b/tests/specs/run/top_level_await_unresolved/top_level_await/nested/a.js deleted file mode 100644 index 74837d4ba16833..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/nested/a.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(2); -await import("./b.js"); -console.log(4); diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/nested/b.js b/tests/specs/run/top_level_await_unresolved/top_level_await/nested/b.js deleted file mode 100644 index 3bd241b50e7c44..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/nested/b.js +++ /dev/null @@ -1 +0,0 @@ -console.log(3); diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/nested/main.js b/tests/specs/run/top_level_await_unresolved/top_level_await/nested/main.js deleted file mode 100644 index ed46a47175b330..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/nested/main.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(1); -await import("./a.js"); -console.log(5); diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/order.js b/tests/specs/run/top_level_await_unresolved/top_level_await/order.js deleted file mode 100644 index 30659cdfbfb6ef..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/order.js +++ /dev/null @@ -1,21 +0,0 @@ -// Ported from Node -// https://github.com/nodejs/node/blob/54746bb763ebea0dc7e99d88ff4b379bcd680964/test/es-module/test-esm-tla.mjs - -const { default: order } = await import("./tla/parent.js"); - -console.log("order", JSON.stringify(order)); - -if ( - !( - order[0] === "order" && - order[1] === "b" && - order[2] === "c" && - order[3] === "d" && - order[4] === "a" && - order[5] === "parent" - ) -) { - throw new Error("TLA wrong order"); -} - -console.log("TLA order correct"); diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/order.out b/tests/specs/run/top_level_await_unresolved/top_level_await/order.out deleted file mode 100644 index 4cc27858cff9ff..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/order.out +++ /dev/null @@ -1,2 +0,0 @@ -order ["order","b","c","d","a","parent"] -TLA order correct diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/tla/a.js b/tests/specs/run/top_level_await_unresolved/top_level_await/tla/a.js deleted file mode 100644 index c3ef3f7dbcfd64..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/tla/a.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("b"); diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/tla/b.js b/tests/specs/run/top_level_await_unresolved/top_level_await/tla/b.js deleted file mode 100644 index 3271c92d8f42b5..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/tla/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import order from "./order.js"; - -await new Promise((resolve) => { - setTimeout(resolve, 200); -}); - -order.push("a"); diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/tla/c.js b/tests/specs/run/top_level_await_unresolved/top_level_await/tla/c.js deleted file mode 100644 index 806eb0a8bea39d..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/tla/c.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("c"); diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/tla/d.js b/tests/specs/run/top_level_await_unresolved/top_level_await/tla/d.js deleted file mode 100644 index 283ebf817fa805..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/tla/d.js +++ /dev/null @@ -1,8 +0,0 @@ -import order from "./order.js"; - -const end = Date.now() + 500; -while (end < Date.now()) { - // pass -} - -order.push("d"); diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/tla/order.js b/tests/specs/run/top_level_await_unresolved/top_level_await/tla/order.js deleted file mode 100644 index f213a562ce6e35..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/tla/order.js +++ /dev/null @@ -1 +0,0 @@ -export default ["order"]; diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/tla/parent.js b/tests/specs/run/top_level_await_unresolved/top_level_await/tla/parent.js deleted file mode 100644 index 1ecc154634d375..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/tla/parent.js +++ /dev/null @@ -1,9 +0,0 @@ -import order from "./order.js"; -import "./a.js"; -import "./b.js"; -import "./c.js"; -import "./d.js"; - -order.push("parent"); - -export default order; diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/tla2/a.js b/tests/specs/run/top_level_await_unresolved/top_level_await/tla2/a.js deleted file mode 100644 index d07bcb94db30e4..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/tla2/a.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Foo { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/tla2/b.js b/tests/specs/run/top_level_await_unresolved/top_level_await/tla2/b.js deleted file mode 100644 index 68e357c1e96de3..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/tla2/b.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Bar { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/tla3/b.js b/tests/specs/run/top_level_await_unresolved/top_level_await/tla3/b.js deleted file mode 100644 index d0349545e9d2af..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/tla3/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import { foo } from "./timeout_loop.js"; -import { collection } from "../circular.js"; - -console.log("collection in b", collection); -console.log("foo in b", foo); - -export const a = "a"; diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/tla3/timeout_loop.js b/tests/specs/run/top_level_await_unresolved/top_level_await/tla3/timeout_loop.js deleted file mode 100644 index 860e6cd2ae718e..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/tla3/timeout_loop.js +++ /dev/null @@ -1,23 +0,0 @@ -export const foo = "foo"; - -export function delay(ms) { - return new Promise((res) => - setTimeout(() => { - res(); - }, ms) - ); -} - -let i = 0; - -async function timeoutLoop() { - await delay(1000); - console.log("timeout loop", i); - i++; - if (i > 5) { - return; - } - timeoutLoop(); -} - -timeoutLoop(); diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_await.js b/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_await.js deleted file mode 100644 index ea319ea124bd6f..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_await.js +++ /dev/null @@ -1,3 +0,0 @@ -const buf = await Deno.readFile("./assets/hello.txt"); -const n = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_await.out b/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_await.out deleted file mode 100644 index 4b65d15fe3c0d6..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_await.out +++ /dev/null @@ -1,3 +0,0 @@ -Hello world! - -write 12 diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_await.ts b/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_await.ts deleted file mode 100644 index 8d47ceb21e1cf8..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_await.ts +++ /dev/null @@ -1,3 +0,0 @@ -const buf: Uint8Array = await Deno.readFile("./assets/hello.txt"); -const n: number = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_for_await.js b/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_for_await.js deleted file mode 100644 index a330f6c7116d2b..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_for_await.js +++ /dev/null @@ -1,10 +0,0 @@ -function* asyncGenerator() { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_for_await.out b/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_for_await.out deleted file mode 100644 index 4539bbf2d22d5c..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_for_await.out +++ /dev/null @@ -1,3 +0,0 @@ -0 -1 -2 diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_for_await.ts b/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_for_await.ts deleted file mode 100644 index 9179322d78f4b1..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/top_level_for_await.ts +++ /dev/null @@ -1,10 +0,0 @@ -async function* asyncGenerator(): AsyncIterableIterator { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/unresolved.js b/tests/specs/run/top_level_await_unresolved/top_level_await/unresolved.js deleted file mode 100644 index 231a8cd634825c..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/unresolved.js +++ /dev/null @@ -1 +0,0 @@ -await new Promise(() => {}); diff --git a/tests/specs/run/top_level_await_unresolved/top_level_await/unresolved.out b/tests/specs/run/top_level_await_unresolved/top_level_await/unresolved.out deleted file mode 100644 index 1f4ea5d382955e..00000000000000 --- a/tests/specs/run/top_level_await_unresolved/top_level_await/unresolved.out +++ /dev/null @@ -1,4 +0,0 @@ -error: Top-level await promise never resolved -await new Promise(() => {}); -^ - at ([WILDCARD]top_level_await/unresolved.js:1:1) diff --git a/tests/specs/run/top_level_for_await/__test__.jsonc b/tests/specs/run/top_level_for_await/__test__.jsonc deleted file mode 100644 index 198008560b2d7b..00000000000000 --- a/tests/specs/run/top_level_for_await/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --quiet top_level_await/top_level_for_await.js", - "output": "top_level_await/top_level_for_await.out" -} diff --git a/tests/specs/run/top_level_for_await/top_level_await/circular.js b/tests/specs/run/top_level_for_await/top_level_await/circular.js deleted file mode 100644 index ff2964b6a5f794..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/circular.js +++ /dev/null @@ -1,8 +0,0 @@ -import { foo } from "./tla3/timeout_loop.js"; - -export const collection = []; - -const mod = await import("./tla3/b.js"); - -console.log("foo in main", foo); -console.log("mod", mod); diff --git a/tests/specs/run/top_level_for_await/top_level_await/circular.out b/tests/specs/run/top_level_for_await/top_level_await/circular.out deleted file mode 100644 index c88978961382c2..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/circular.out +++ /dev/null @@ -1,10 +0,0 @@ -timeout loop 0 -timeout loop 1 -timeout loop 2 -timeout loop 3 -timeout loop 4 -timeout loop 5 -error: Top-level await promise never resolved -const mod = await import("./tla3/b.js"); - ^ - at ([WILDCARD]/top_level_await/circular.js:5:13) diff --git a/tests/specs/run/top_level_for_await/top_level_await/loop.js b/tests/specs/run/top_level_for_await/top_level_await/loop.js deleted file mode 100644 index 415db5ec781111..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/loop.js +++ /dev/null @@ -1,20 +0,0 @@ -const importsDir = Deno.readDirSync( - Deno.realPathSync("./run/top_level_await/tla2"), -); - -const resolvedPaths = []; - -for (const { name } of importsDir) { - const filePath = Deno.realPathSync(`./run/top_level_await/tla2/${name}`); - resolvedPaths.push(filePath); -} - -resolvedPaths.sort(); - -for (const filePath of resolvedPaths) { - console.log("loading", filePath); - const mod = await import(`file://${filePath}`); - console.log("loaded", mod); -} - -console.log("all loaded"); diff --git a/tests/specs/run/top_level_for_await/top_level_await/loop.out b/tests/specs/run/top_level_for_await/top_level_await/loop.out deleted file mode 100644 index 1bdffbf6607757..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/loop.out +++ /dev/null @@ -1,5 +0,0 @@ -loading [WILDCARD]a.js -loaded [Module: null prototype] { default: [class Foo] } -loading [WILDCARD]b.js -loaded [Module: null prototype] { default: [class Bar] } -all loaded diff --git a/tests/specs/run/top_level_for_await/top_level_await/nested.out b/tests/specs/run/top_level_for_await/top_level_await/nested.out deleted file mode 100644 index 8a1218a1024a21..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/nested.out +++ /dev/null @@ -1,5 +0,0 @@ -1 -2 -3 -4 -5 diff --git a/tests/specs/run/top_level_for_await/top_level_await/nested/a.js b/tests/specs/run/top_level_for_await/top_level_await/nested/a.js deleted file mode 100644 index 74837d4ba16833..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/nested/a.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(2); -await import("./b.js"); -console.log(4); diff --git a/tests/specs/run/top_level_for_await/top_level_await/nested/b.js b/tests/specs/run/top_level_for_await/top_level_await/nested/b.js deleted file mode 100644 index 3bd241b50e7c44..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/nested/b.js +++ /dev/null @@ -1 +0,0 @@ -console.log(3); diff --git a/tests/specs/run/top_level_for_await/top_level_await/nested/main.js b/tests/specs/run/top_level_for_await/top_level_await/nested/main.js deleted file mode 100644 index ed46a47175b330..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/nested/main.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(1); -await import("./a.js"); -console.log(5); diff --git a/tests/specs/run/top_level_for_await/top_level_await/order.js b/tests/specs/run/top_level_for_await/top_level_await/order.js deleted file mode 100644 index 30659cdfbfb6ef..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/order.js +++ /dev/null @@ -1,21 +0,0 @@ -// Ported from Node -// https://github.com/nodejs/node/blob/54746bb763ebea0dc7e99d88ff4b379bcd680964/test/es-module/test-esm-tla.mjs - -const { default: order } = await import("./tla/parent.js"); - -console.log("order", JSON.stringify(order)); - -if ( - !( - order[0] === "order" && - order[1] === "b" && - order[2] === "c" && - order[3] === "d" && - order[4] === "a" && - order[5] === "parent" - ) -) { - throw new Error("TLA wrong order"); -} - -console.log("TLA order correct"); diff --git a/tests/specs/run/top_level_for_await/top_level_await/order.out b/tests/specs/run/top_level_for_await/top_level_await/order.out deleted file mode 100644 index 4cc27858cff9ff..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/order.out +++ /dev/null @@ -1,2 +0,0 @@ -order ["order","b","c","d","a","parent"] -TLA order correct diff --git a/tests/specs/run/top_level_for_await/top_level_await/tla/a.js b/tests/specs/run/top_level_for_await/top_level_await/tla/a.js deleted file mode 100644 index c3ef3f7dbcfd64..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/tla/a.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("b"); diff --git a/tests/specs/run/top_level_for_await/top_level_await/tla/b.js b/tests/specs/run/top_level_for_await/top_level_await/tla/b.js deleted file mode 100644 index 3271c92d8f42b5..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/tla/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import order from "./order.js"; - -await new Promise((resolve) => { - setTimeout(resolve, 200); -}); - -order.push("a"); diff --git a/tests/specs/run/top_level_for_await/top_level_await/tla/c.js b/tests/specs/run/top_level_for_await/top_level_await/tla/c.js deleted file mode 100644 index 806eb0a8bea39d..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/tla/c.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("c"); diff --git a/tests/specs/run/top_level_for_await/top_level_await/tla/d.js b/tests/specs/run/top_level_for_await/top_level_await/tla/d.js deleted file mode 100644 index 283ebf817fa805..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/tla/d.js +++ /dev/null @@ -1,8 +0,0 @@ -import order from "./order.js"; - -const end = Date.now() + 500; -while (end < Date.now()) { - // pass -} - -order.push("d"); diff --git a/tests/specs/run/top_level_for_await/top_level_await/tla/order.js b/tests/specs/run/top_level_for_await/top_level_await/tla/order.js deleted file mode 100644 index f213a562ce6e35..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/tla/order.js +++ /dev/null @@ -1 +0,0 @@ -export default ["order"]; diff --git a/tests/specs/run/top_level_for_await/top_level_await/tla/parent.js b/tests/specs/run/top_level_for_await/top_level_await/tla/parent.js deleted file mode 100644 index 1ecc154634d375..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/tla/parent.js +++ /dev/null @@ -1,9 +0,0 @@ -import order from "./order.js"; -import "./a.js"; -import "./b.js"; -import "./c.js"; -import "./d.js"; - -order.push("parent"); - -export default order; diff --git a/tests/specs/run/top_level_for_await/top_level_await/tla2/a.js b/tests/specs/run/top_level_for_await/top_level_await/tla2/a.js deleted file mode 100644 index d07bcb94db30e4..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/tla2/a.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Foo { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_for_await/top_level_await/tla2/b.js b/tests/specs/run/top_level_for_await/top_level_await/tla2/b.js deleted file mode 100644 index 68e357c1e96de3..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/tla2/b.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Bar { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_for_await/top_level_await/tla3/b.js b/tests/specs/run/top_level_for_await/top_level_await/tla3/b.js deleted file mode 100644 index d0349545e9d2af..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/tla3/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import { foo } from "./timeout_loop.js"; -import { collection } from "../circular.js"; - -console.log("collection in b", collection); -console.log("foo in b", foo); - -export const a = "a"; diff --git a/tests/specs/run/top_level_for_await/top_level_await/tla3/timeout_loop.js b/tests/specs/run/top_level_for_await/top_level_await/tla3/timeout_loop.js deleted file mode 100644 index 860e6cd2ae718e..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/tla3/timeout_loop.js +++ /dev/null @@ -1,23 +0,0 @@ -export const foo = "foo"; - -export function delay(ms) { - return new Promise((res) => - setTimeout(() => { - res(); - }, ms) - ); -} - -let i = 0; - -async function timeoutLoop() { - await delay(1000); - console.log("timeout loop", i); - i++; - if (i > 5) { - return; - } - timeoutLoop(); -} - -timeoutLoop(); diff --git a/tests/specs/run/top_level_for_await/top_level_await/top_level_await.js b/tests/specs/run/top_level_for_await/top_level_await/top_level_await.js deleted file mode 100644 index ea319ea124bd6f..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/top_level_await.js +++ /dev/null @@ -1,3 +0,0 @@ -const buf = await Deno.readFile("./assets/hello.txt"); -const n = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_for_await/top_level_await/top_level_await.out b/tests/specs/run/top_level_for_await/top_level_await/top_level_await.out deleted file mode 100644 index 4b65d15fe3c0d6..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/top_level_await.out +++ /dev/null @@ -1,3 +0,0 @@ -Hello world! - -write 12 diff --git a/tests/specs/run/top_level_for_await/top_level_await/top_level_await.ts b/tests/specs/run/top_level_for_await/top_level_await/top_level_await.ts deleted file mode 100644 index 8d47ceb21e1cf8..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/top_level_await.ts +++ /dev/null @@ -1,3 +0,0 @@ -const buf: Uint8Array = await Deno.readFile("./assets/hello.txt"); -const n: number = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_for_await/top_level_await/top_level_for_await.js b/tests/specs/run/top_level_for_await/top_level_await/top_level_for_await.js deleted file mode 100644 index a330f6c7116d2b..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/top_level_for_await.js +++ /dev/null @@ -1,10 +0,0 @@ -function* asyncGenerator() { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_for_await/top_level_await/top_level_for_await.out b/tests/specs/run/top_level_for_await/top_level_await/top_level_for_await.out deleted file mode 100644 index 4539bbf2d22d5c..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/top_level_for_await.out +++ /dev/null @@ -1,3 +0,0 @@ -0 -1 -2 diff --git a/tests/specs/run/top_level_for_await/top_level_await/top_level_for_await.ts b/tests/specs/run/top_level_for_await/top_level_await/top_level_for_await.ts deleted file mode 100644 index 9179322d78f4b1..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/top_level_for_await.ts +++ /dev/null @@ -1,10 +0,0 @@ -async function* asyncGenerator(): AsyncIterableIterator { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_for_await/top_level_await/unresolved.js b/tests/specs/run/top_level_for_await/top_level_await/unresolved.js deleted file mode 100644 index 231a8cd634825c..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/unresolved.js +++ /dev/null @@ -1 +0,0 @@ -await new Promise(() => {}); diff --git a/tests/specs/run/top_level_for_await/top_level_await/unresolved.out b/tests/specs/run/top_level_for_await/top_level_await/unresolved.out deleted file mode 100644 index 1f4ea5d382955e..00000000000000 --- a/tests/specs/run/top_level_for_await/top_level_await/unresolved.out +++ /dev/null @@ -1,4 +0,0 @@ -error: Top-level await promise never resolved -await new Promise(() => {}); -^ - at ([WILDCARD]top_level_await/unresolved.js:1:1) diff --git a/tests/specs/run/top_level_for_await_ts/__test__.jsonc b/tests/specs/run/top_level_for_await_ts/__test__.jsonc deleted file mode 100644 index 22314e8e0d80e9..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --quiet top_level_await/top_level_for_await.ts", - "output": "top_level_await/top_level_for_await.out" -} diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/circular.js b/tests/specs/run/top_level_for_await_ts/top_level_await/circular.js deleted file mode 100644 index ff2964b6a5f794..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/circular.js +++ /dev/null @@ -1,8 +0,0 @@ -import { foo } from "./tla3/timeout_loop.js"; - -export const collection = []; - -const mod = await import("./tla3/b.js"); - -console.log("foo in main", foo); -console.log("mod", mod); diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/circular.out b/tests/specs/run/top_level_for_await_ts/top_level_await/circular.out deleted file mode 100644 index c88978961382c2..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/circular.out +++ /dev/null @@ -1,10 +0,0 @@ -timeout loop 0 -timeout loop 1 -timeout loop 2 -timeout loop 3 -timeout loop 4 -timeout loop 5 -error: Top-level await promise never resolved -const mod = await import("./tla3/b.js"); - ^ - at ([WILDCARD]/top_level_await/circular.js:5:13) diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/loop.js b/tests/specs/run/top_level_for_await_ts/top_level_await/loop.js deleted file mode 100644 index 415db5ec781111..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/loop.js +++ /dev/null @@ -1,20 +0,0 @@ -const importsDir = Deno.readDirSync( - Deno.realPathSync("./run/top_level_await/tla2"), -); - -const resolvedPaths = []; - -for (const { name } of importsDir) { - const filePath = Deno.realPathSync(`./run/top_level_await/tla2/${name}`); - resolvedPaths.push(filePath); -} - -resolvedPaths.sort(); - -for (const filePath of resolvedPaths) { - console.log("loading", filePath); - const mod = await import(`file://${filePath}`); - console.log("loaded", mod); -} - -console.log("all loaded"); diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/loop.out b/tests/specs/run/top_level_for_await_ts/top_level_await/loop.out deleted file mode 100644 index 1bdffbf6607757..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/loop.out +++ /dev/null @@ -1,5 +0,0 @@ -loading [WILDCARD]a.js -loaded [Module: null prototype] { default: [class Foo] } -loading [WILDCARD]b.js -loaded [Module: null prototype] { default: [class Bar] } -all loaded diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/nested.out b/tests/specs/run/top_level_for_await_ts/top_level_await/nested.out deleted file mode 100644 index 8a1218a1024a21..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/nested.out +++ /dev/null @@ -1,5 +0,0 @@ -1 -2 -3 -4 -5 diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/nested/a.js b/tests/specs/run/top_level_for_await_ts/top_level_await/nested/a.js deleted file mode 100644 index 74837d4ba16833..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/nested/a.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(2); -await import("./b.js"); -console.log(4); diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/nested/b.js b/tests/specs/run/top_level_for_await_ts/top_level_await/nested/b.js deleted file mode 100644 index 3bd241b50e7c44..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/nested/b.js +++ /dev/null @@ -1 +0,0 @@ -console.log(3); diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/nested/main.js b/tests/specs/run/top_level_for_await_ts/top_level_await/nested/main.js deleted file mode 100644 index ed46a47175b330..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/nested/main.js +++ /dev/null @@ -1,3 +0,0 @@ -console.log(1); -await import("./a.js"); -console.log(5); diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/order.js b/tests/specs/run/top_level_for_await_ts/top_level_await/order.js deleted file mode 100644 index 30659cdfbfb6ef..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/order.js +++ /dev/null @@ -1,21 +0,0 @@ -// Ported from Node -// https://github.com/nodejs/node/blob/54746bb763ebea0dc7e99d88ff4b379bcd680964/test/es-module/test-esm-tla.mjs - -const { default: order } = await import("./tla/parent.js"); - -console.log("order", JSON.stringify(order)); - -if ( - !( - order[0] === "order" && - order[1] === "b" && - order[2] === "c" && - order[3] === "d" && - order[4] === "a" && - order[5] === "parent" - ) -) { - throw new Error("TLA wrong order"); -} - -console.log("TLA order correct"); diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/order.out b/tests/specs/run/top_level_for_await_ts/top_level_await/order.out deleted file mode 100644 index 4cc27858cff9ff..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/order.out +++ /dev/null @@ -1,2 +0,0 @@ -order ["order","b","c","d","a","parent"] -TLA order correct diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/tla/a.js b/tests/specs/run/top_level_for_await_ts/top_level_await/tla/a.js deleted file mode 100644 index c3ef3f7dbcfd64..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/tla/a.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("b"); diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/tla/b.js b/tests/specs/run/top_level_for_await_ts/top_level_await/tla/b.js deleted file mode 100644 index 3271c92d8f42b5..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/tla/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import order from "./order.js"; - -await new Promise((resolve) => { - setTimeout(resolve, 200); -}); - -order.push("a"); diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/tla/c.js b/tests/specs/run/top_level_for_await_ts/top_level_await/tla/c.js deleted file mode 100644 index 806eb0a8bea39d..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/tla/c.js +++ /dev/null @@ -1,3 +0,0 @@ -import order from "./order.js"; - -order.push("c"); diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/tla/d.js b/tests/specs/run/top_level_for_await_ts/top_level_await/tla/d.js deleted file mode 100644 index 283ebf817fa805..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/tla/d.js +++ /dev/null @@ -1,8 +0,0 @@ -import order from "./order.js"; - -const end = Date.now() + 500; -while (end < Date.now()) { - // pass -} - -order.push("d"); diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/tla/order.js b/tests/specs/run/top_level_for_await_ts/top_level_await/tla/order.js deleted file mode 100644 index f213a562ce6e35..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/tla/order.js +++ /dev/null @@ -1 +0,0 @@ -export default ["order"]; diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/tla/parent.js b/tests/specs/run/top_level_for_await_ts/top_level_await/tla/parent.js deleted file mode 100644 index 1ecc154634d375..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/tla/parent.js +++ /dev/null @@ -1,9 +0,0 @@ -import order from "./order.js"; -import "./a.js"; -import "./b.js"; -import "./c.js"; -import "./d.js"; - -order.push("parent"); - -export default order; diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/tla2/a.js b/tests/specs/run/top_level_for_await_ts/top_level_await/tla2/a.js deleted file mode 100644 index d07bcb94db30e4..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/tla2/a.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Foo { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/tla2/b.js b/tests/specs/run/top_level_for_await_ts/top_level_await/tla2/b.js deleted file mode 100644 index 68e357c1e96de3..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/tla2/b.js +++ /dev/null @@ -1,5 +0,0 @@ -export default class Bar { - constructor(message) { - this.message = message; - } -} diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/tla3/b.js b/tests/specs/run/top_level_for_await_ts/top_level_await/tla3/b.js deleted file mode 100644 index d0349545e9d2af..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/tla3/b.js +++ /dev/null @@ -1,7 +0,0 @@ -import { foo } from "./timeout_loop.js"; -import { collection } from "../circular.js"; - -console.log("collection in b", collection); -console.log("foo in b", foo); - -export const a = "a"; diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/tla3/timeout_loop.js b/tests/specs/run/top_level_for_await_ts/top_level_await/tla3/timeout_loop.js deleted file mode 100644 index 860e6cd2ae718e..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/tla3/timeout_loop.js +++ /dev/null @@ -1,23 +0,0 @@ -export const foo = "foo"; - -export function delay(ms) { - return new Promise((res) => - setTimeout(() => { - res(); - }, ms) - ); -} - -let i = 0; - -async function timeoutLoop() { - await delay(1000); - console.log("timeout loop", i); - i++; - if (i > 5) { - return; - } - timeoutLoop(); -} - -timeoutLoop(); diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_await.js b/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_await.js deleted file mode 100644 index ea319ea124bd6f..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_await.js +++ /dev/null @@ -1,3 +0,0 @@ -const buf = await Deno.readFile("./assets/hello.txt"); -const n = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_await.out b/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_await.out deleted file mode 100644 index 4b65d15fe3c0d6..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_await.out +++ /dev/null @@ -1,3 +0,0 @@ -Hello world! - -write 12 diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_await.ts b/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_await.ts deleted file mode 100644 index 8d47ceb21e1cf8..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_await.ts +++ /dev/null @@ -1,3 +0,0 @@ -const buf: Uint8Array = await Deno.readFile("./assets/hello.txt"); -const n: number = await Deno.stdout.write(buf); -console.log(`\n\nwrite ${n}`); diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_for_await.js b/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_for_await.js deleted file mode 100644 index a330f6c7116d2b..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_for_await.js +++ /dev/null @@ -1,10 +0,0 @@ -function* asyncGenerator() { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_for_await.out b/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_for_await.out deleted file mode 100644 index 4539bbf2d22d5c..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_for_await.out +++ /dev/null @@ -1,3 +0,0 @@ -0 -1 -2 diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_for_await.ts b/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_for_await.ts deleted file mode 100644 index 9179322d78f4b1..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/top_level_for_await.ts +++ /dev/null @@ -1,10 +0,0 @@ -async function* asyncGenerator(): AsyncIterableIterator { - let i = 0; - while (i < 3) { - yield i++; - } -} - -for await (const num of asyncGenerator()) { - console.log(num); -} diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/unresolved.js b/tests/specs/run/top_level_for_await_ts/top_level_await/unresolved.js deleted file mode 100644 index 231a8cd634825c..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/unresolved.js +++ /dev/null @@ -1 +0,0 @@ -await new Promise(() => {}); diff --git a/tests/specs/run/top_level_for_await_ts/top_level_await/unresolved.out b/tests/specs/run/top_level_for_await_ts/top_level_await/unresolved.out deleted file mode 100644 index 1f4ea5d382955e..00000000000000 --- a/tests/specs/run/top_level_for_await_ts/top_level_await/unresolved.out +++ /dev/null @@ -1,4 +0,0 @@ -error: Top-level await promise never resolved -await new Promise(() => {}); -^ - at ([WILDCARD]top_level_await/unresolved.js:1:1) diff --git a/tests/specs/run/ts_decorators/__test__.jsonc b/tests/specs/run/ts_decorators/__test__.jsonc deleted file mode 100644 index 96e7cdf308c735..00000000000000 --- a/tests/specs/run/ts_decorators/__test__.jsonc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "args": "run --reload --check decorators/experimental/ts/main.ts", - "output": "decorators/experimental/ts/main.out" -} diff --git a/tests/specs/run/ts_decorators/decorators/experimental/deno.json b/tests/specs/run/ts_decorators/decorators/experimental/deno.json deleted file mode 100644 index 504cd646e14906..00000000000000 --- a/tests/specs/run/ts_decorators/decorators/experimental/deno.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "compilerOptions": { - "experimentalDecorators": true - } -} diff --git a/tests/specs/run/ts_decorators/decorators/experimental/no_check/main.out b/tests/specs/run/ts_decorators/decorators/experimental/no_check/main.out deleted file mode 100644 index 015f7076e8ba48..00000000000000 --- a/tests/specs/run/ts_decorators/decorators/experimental/no_check/main.out +++ /dev/null @@ -1,3 +0,0 @@ -a(): evaluated -a(): called -method diff --git a/tests/specs/run/ts_decorators/decorators/experimental/no_check/main.ts b/tests/specs/run/ts_decorators/decorators/experimental/no_check/main.ts deleted file mode 100644 index 9f7ec550d5c354..00000000000000 --- a/tests/specs/run/ts_decorators/decorators/experimental/no_check/main.ts +++ /dev/null @@ -1,21 +0,0 @@ -// deno-lint-ignore-file -function a() { - console.log("a(): evaluated"); - return ( - _target: any, - _propertyKey: string, - _descriptor: PropertyDescriptor, - ) => { - console.log("a(): called"); - }; -} - -class B { - @a() - method() { - console.log("method"); - } -} - -const b = new B(); -b.method(); diff --git a/tests/specs/run/ts_decorators/decorators/experimental/runtime/main.out b/tests/specs/run/ts_decorators/decorators/experimental/runtime/main.out deleted file mode 100644 index 0fc1d4590e0a58..00000000000000 --- a/tests/specs/run/ts_decorators/decorators/experimental/runtime/main.out +++ /dev/null @@ -1,7 +0,0 @@ -@A evaluated -@B evaluated -@B called -@A called -fn() called from @A -fn() called from @B -C.test() called diff --git a/tests/specs/run/ts_decorators/decorators/experimental/runtime/main.ts b/tests/specs/run/ts_decorators/decorators/experimental/runtime/main.ts deleted file mode 100644 index 40a26bbd4d1948..00000000000000 --- a/tests/specs/run/ts_decorators/decorators/experimental/runtime/main.ts +++ /dev/null @@ -1,42 +0,0 @@ -// deno-lint-ignore-file -function a() { - console.log("@A evaluated"); - return function ( - target: any, - propertyKey: string, - descriptor: PropertyDescriptor, - ) { - console.log("@A called"); - const fn = descriptor.value; - descriptor.value = function () { - console.log("fn() called from @A"); - fn(); - }; - }; -} - -function b() { - console.log("@B evaluated"); - return function ( - target: any, - propertyKey: string, - descriptor: PropertyDescriptor, - ) { - console.log("@B called"); - const fn = descriptor.value; - descriptor.value = function () { - console.log("fn() called from @B"); - fn(); - }; - }; -} - -class C { - @a() - @b() - static test() { - console.log("C.test() called"); - } -} - -C.test(); diff --git a/tests/specs/run/ts_decorators/decorators/experimental/ts/main.out b/tests/specs/run/ts_decorators/decorators/experimental/ts/main.out deleted file mode 100644 index ea64fbaa63ea1b..00000000000000 --- a/tests/specs/run/ts_decorators/decorators/experimental/ts/main.out +++ /dev/null @@ -1,3 +0,0 @@ -Warning experimentalDecorators compiler option is deprecated and may be removed at any time -Check [WILDCARD] -SomeClass { someField: "asdf" } diff --git a/tests/specs/run/ts_decorators/decorators/experimental/ts/main.ts b/tests/specs/run/ts_decorators/decorators/experimental/ts/main.ts deleted file mode 100644 index 95fba6cd48b224..00000000000000 --- a/tests/specs/run/ts_decorators/decorators/experimental/ts/main.ts +++ /dev/null @@ -1,14 +0,0 @@ -// deno-lint-ignore-file - -function Decorate() { - return function (constructor: any): any { - return class extends constructor { - protected someField: string = "asdf"; - }; - }; -} - -@Decorate() -class SomeClass {} - -console.log(new SomeClass()); diff --git a/tests/specs/run/ts_decorators/decorators/tc39_proposal/main.out b/tests/specs/run/ts_decorators/decorators/tc39_proposal/main.out deleted file mode 100644 index 39394952e88d9c..00000000000000 --- a/tests/specs/run/ts_decorators/decorators/tc39_proposal/main.out +++ /dev/null @@ -1,3 +0,0 @@ -starting m with arguments 1 -C.m 1 -ending m diff --git a/tests/specs/run/ts_decorators/decorators/tc39_proposal/main.ts b/tests/specs/run/ts_decorators/decorators/tc39_proposal/main.ts deleted file mode 100644 index 00c8a850256498..00000000000000 --- a/tests/specs/run/ts_decorators/decorators/tc39_proposal/main.ts +++ /dev/null @@ -1,21 +0,0 @@ -// deno-lint-ignore no-explicit-any -function logged(value: any, { kind, name }: { kind: string; name: string }) { - if (kind === "method") { - return function (...args: unknown[]) { - console.log(`starting ${name} with arguments ${args.join(", ")}`); - // @ts-ignore this has implicit any type - const ret = value.call(this, ...args); - console.log(`ending ${name}`); - return ret; - }; - } -} - -class C { - @logged - m(arg: number) { - console.log("C.m", arg); - } -} - -new C().m(1); diff --git a/tests/specs/run/unsafe_proto/__test__.jsonc b/tests/specs/run/unsafe_proto/__test__.jsonc index d1c608b5155551..88d13e76937c54 100644 --- a/tests/specs/run/unsafe_proto/__test__.jsonc +++ b/tests/specs/run/unsafe_proto/__test__.jsonc @@ -1,5 +1,5 @@ { - "args": "run -A unsafe_proto/main.js", - "output": "unsafe_proto/main.out", + "args": "run -A main.js", + "output": "main.out", "exitCode": 0 } diff --git a/tests/specs/run/unsafe_proto/unsafe_proto/main.js b/tests/specs/run/unsafe_proto/main.js similarity index 100% rename from tests/specs/run/unsafe_proto/unsafe_proto/main.js rename to tests/specs/run/unsafe_proto/main.js diff --git a/tests/specs/run/unsafe_proto/unsafe_proto/main.out b/tests/specs/run/unsafe_proto/main.out similarity index 100% rename from tests/specs/run/unsafe_proto/unsafe_proto/main.out rename to tests/specs/run/unsafe_proto/main.out diff --git a/tests/specs/run/unsafe_proto/unsafe_proto/worker.js b/tests/specs/run/unsafe_proto/worker.js similarity index 100% rename from tests/specs/run/unsafe_proto/unsafe_proto/worker.js rename to tests/specs/run/unsafe_proto/worker.js diff --git a/tests/specs/run/unsafe_proto_flag/__test__.jsonc b/tests/specs/run/unsafe_proto_flag/__test__.jsonc index 8bd2b56ffc9611..db2918f1d826fc 100644 --- a/tests/specs/run/unsafe_proto_flag/__test__.jsonc +++ b/tests/specs/run/unsafe_proto_flag/__test__.jsonc @@ -1,5 +1,5 @@ { - "args": "run -A --unstable-unsafe-proto unsafe_proto/main.js", - "output": "unsafe_proto/main_with_unsafe_proto_flag.out", + "args": "run -A --unstable-unsafe-proto main.js", + "output": "main_with_unsafe_proto_flag.out", "exitCode": 0 } diff --git a/tests/specs/run/unsafe_proto_flag/unsafe_proto/main.js b/tests/specs/run/unsafe_proto_flag/main.js similarity index 100% rename from tests/specs/run/unsafe_proto_flag/unsafe_proto/main.js rename to tests/specs/run/unsafe_proto_flag/main.js diff --git a/tests/specs/run/unsafe_proto/unsafe_proto/main_with_unsafe_proto_flag.out b/tests/specs/run/unsafe_proto_flag/main_with_unsafe_proto_flag.out similarity index 100% rename from tests/specs/run/unsafe_proto/unsafe_proto/main_with_unsafe_proto_flag.out rename to tests/specs/run/unsafe_proto_flag/main_with_unsafe_proto_flag.out diff --git a/tests/specs/run/unsafe_proto_flag/unsafe_proto/main.out b/tests/specs/run/unsafe_proto_flag/unsafe_proto/main.out deleted file mode 100644 index 4b095fd0ff9ca0..00000000000000 --- a/tests/specs/run/unsafe_proto_flag/unsafe_proto/main.out +++ /dev/null @@ -1,2 +0,0 @@ -false -false diff --git a/tests/specs/run/unsafe_proto_flag/unsafe_proto/main_with_unsafe_proto_flag.out b/tests/specs/run/unsafe_proto_flag/unsafe_proto/main_with_unsafe_proto_flag.out deleted file mode 100644 index bb101b641b9bd8..00000000000000 --- a/tests/specs/run/unsafe_proto_flag/unsafe_proto/main_with_unsafe_proto_flag.out +++ /dev/null @@ -1,2 +0,0 @@ -true -true diff --git a/tests/specs/run/unsafe_proto_flag/unsafe_proto/worker.js b/tests/specs/run/unsafe_proto_flag/worker.js similarity index 100% rename from tests/specs/run/unsafe_proto_flag/unsafe_proto/worker.js rename to tests/specs/run/unsafe_proto_flag/worker.js diff --git a/tests/specs/run/unstable/node_globals.out b/tests/specs/run/unstable/node_globals.out index 77045c7cbd785d..8262ace2712274 100644 --- a/tests/specs/run/unstable/node_globals.out +++ b/tests/specs/run/unstable/node_globals.out @@ -1,4 +1,10 @@ global: true -Buffer: true +Buffer: function from( + value, + encodingOrOffset, + length, +) { + return _from(value, encodingOrOffset, length); +} setImmediate: true clearImmediate: true diff --git a/tests/specs/run/unstable/node_globals.ts b/tests/specs/run/unstable/node_globals.ts index 706b7eb6549ed1..3a000ea3417f61 100644 --- a/tests/specs/run/unstable/node_globals.ts +++ b/tests/specs/run/unstable/node_globals.ts @@ -2,6 +2,6 @@ import * as nodeBuffer from "node:buffer"; import * as nodeTimers from "node:timers"; console.log(`global: ${globalThis === global}`); -console.log(`Buffer: ${Buffer === nodeBuffer.default}`); +console.log(`Buffer: ${Buffer.from}`); console.log(`setImmediate: ${setImmediate === nodeTimers.setImmediate}`); console.log(`clearImmediate: ${clearImmediate === nodeTimers.clearImmediate}`); diff --git a/tests/specs/run/unstable_temporal_api_patch/main.out b/tests/specs/run/unstable_temporal_api_patch/main.out index a17d3a9e207903..ec12b9e4630cd4 100644 --- a/tests/specs/run/unstable_temporal_api_patch/main.out +++ b/tests/specs/run/unstable_temporal_api_patch/main.out @@ -5,3 +5,4 @@ iso8601 UTC undefined undefined +1 day, 6 hr, 30 min diff --git a/tests/specs/run/unstable_temporal_api_patch/main.ts b/tests/specs/run/unstable_temporal_api_patch/main.ts index 6a40780535bf71..ff92cf91c265e4 100644 --- a/tests/specs/run/unstable_temporal_api_patch/main.ts +++ b/tests/specs/run/unstable_temporal_api_patch/main.ts @@ -9,3 +9,6 @@ console.log(zoned.timeZoneId); console.log(zoned.calendar); // @ts-expect-error: undefined check console.log(zoned.timeZone); + +const duration = Temporal.Duration.from("P1DT6H30M"); +console.log(duration.toLocaleString("en-US")); diff --git a/tests/specs/run/wasm_module/cjs_importing/__test__.jsonc b/tests/specs/run/wasm_module/cjs_importing/__test__.jsonc new file mode 100644 index 00000000000000..9c91b736925c30 --- /dev/null +++ b/tests/specs/run/wasm_module/cjs_importing/__test__.jsonc @@ -0,0 +1,12 @@ +{ + "steps": [{ + "args": "run -A setup.ts", + "output": "[WILDCARD]" + }, { + "args": "run -A --check main.cts", + "output": "main.out" + }, { + "args": "run -A --check main.cjs", + "output": "main.out" + }] +} diff --git a/tests/specs/run/wasm_module/cjs_importing/main.cjs b/tests/specs/run/wasm_module/cjs_importing/main.cjs new file mode 100644 index 00000000000000..51d253203e735d --- /dev/null +++ b/tests/specs/run/wasm_module/cjs_importing/main.cjs @@ -0,0 +1,5 @@ +// @ts-check +const { add, subtract } = require("./math.wasm"); + +console.log(add(1, 2)); +console.log(subtract(9, 3)); diff --git a/tests/specs/run/wasm_module/cjs_importing/main.cts b/tests/specs/run/wasm_module/cjs_importing/main.cts new file mode 100644 index 00000000000000..2b22d48500aaab --- /dev/null +++ b/tests/specs/run/wasm_module/cjs_importing/main.cts @@ -0,0 +1,4 @@ +import WasmModule = require("./math.wasm"); + +console.log(WasmModule.add(1, 2)); +console.log(WasmModule.subtract(9, 3)); diff --git a/tests/specs/run/wasm_module/cjs_importing/main.out b/tests/specs/run/wasm_module/cjs_importing/main.out new file mode 100644 index 00000000000000..69dbf8112737c5 --- /dev/null +++ b/tests/specs/run/wasm_module/cjs_importing/main.out @@ -0,0 +1,3 @@ +Check file:///[WILDLINE] +3 +6 diff --git a/tests/specs/run/wasm_module/cjs_importing/math.wasm b/tests/specs/run/wasm_module/cjs_importing/math.wasm new file mode 100644 index 00000000000000..6b3950fcc5297b Binary files /dev/null and b/tests/specs/run/wasm_module/cjs_importing/math.wasm differ diff --git a/tests/specs/run/wasm_module/cjs_importing/package.json b/tests/specs/run/wasm_module/cjs_importing/package.json new file mode 100644 index 00000000000000..b04e77362d7650 --- /dev/null +++ b/tests/specs/run/wasm_module/cjs_importing/package.json @@ -0,0 +1,4 @@ +{ + "args": "run -A main.cjs", + "output": "main.out" +} diff --git a/tests/specs/run/wasm_module/cjs_importing/setup.ts b/tests/specs/run/wasm_module/cjs_importing/setup.ts new file mode 100644 index 00000000000000..6f5c0e77819096 --- /dev/null +++ b/tests/specs/run/wasm_module/cjs_importing/setup.ts @@ -0,0 +1,7 @@ +fetch("http://localhost:4545/wasm/math.wasm").then(async (response) => { + if (!response.ok) { + throw new Error(`Failed to fetch WASM module: ${response.statusText}`); + } + using file = Deno.openSync("math.wasm", { write: true, create: true }); + await response.body!.pipeTo(file.writable); +}); diff --git a/tests/specs/run/wasm_module/import_file_not_found/__test__.jsonc b/tests/specs/run/wasm_module/import_file_not_found/__test__.jsonc new file mode 100644 index 00000000000000..0141f9828c8fa8 --- /dev/null +++ b/tests/specs/run/wasm_module/import_file_not_found/__test__.jsonc @@ -0,0 +1,14 @@ +{ + "tests": { + "run": { + "args": "--allow-import main.js", + "output": "main.out", + "exitCode": 1 + }, + "check": { + "args": "check --all --allow-import main.js", + "output": "check.out", + "exitCode": 1 + } + } +} diff --git a/tests/specs/run/wasm_module/import_file_not_found/check.out b/tests/specs/run/wasm_module/import_file_not_found/check.out new file mode 100644 index 00000000000000..59c052297c31bb --- /dev/null +++ b/tests/specs/run/wasm_module/import_file_not_found/check.out @@ -0,0 +1,4 @@ +Download http://localhost:4545/wasm/math_with_import.wasm +Check file:///[WILDLINE]/main.js +error: TS2307 [ERROR]: Cannot find module 'file:///[WILDLINE]/local_math.ts'. + at http://localhost:4545/wasm/math_with_import.wasm:1:87 diff --git a/tests/specs/run/wasm_module/import_file_not_found/deno.jsonc b/tests/specs/run/wasm_module/import_file_not_found/deno.jsonc new file mode 100644 index 00000000000000..d24935d1788e63 --- /dev/null +++ b/tests/specs/run/wasm_module/import_file_not_found/deno.jsonc @@ -0,0 +1,9 @@ +{ + "lock": false, + "scopes": { + "http://localhost:4545/wasm/": { + // file won't exist + "http://localhost:4545/wasm/math.ts": "./local_math.ts" + } + } +} diff --git a/tests/specs/run/wasm_module/import_file_not_found/main.js b/tests/specs/run/wasm_module/import_file_not_found/main.js new file mode 100644 index 00000000000000..b55405bd311593 --- /dev/null +++ b/tests/specs/run/wasm_module/import_file_not_found/main.js @@ -0,0 +1,8 @@ +// @ts-check +import { + add, + subtract, +} from "http://localhost:4545/wasm/math_with_import.wasm"; + +console.log(add(1, 2)); +console.log(subtract(100, 50)); diff --git a/tests/specs/run/wasm_module/import_file_not_found/main.out b/tests/specs/run/wasm_module/import_file_not_found/main.out new file mode 100644 index 00000000000000..ed021b9a210ad0 --- /dev/null +++ b/tests/specs/run/wasm_module/import_file_not_found/main.out @@ -0,0 +1,3 @@ +Download http://localhost:4545/wasm/math_with_import.wasm +error: Module not found "file:///[WILDLINE]/local_math.ts". + at http://localhost:4545/wasm/math_with_import.wasm:1:87 diff --git a/tests/specs/run/wasm_module/import_named_export_not_found/__test__.jsonc b/tests/specs/run/wasm_module/import_named_export_not_found/__test__.jsonc new file mode 100644 index 00000000000000..0141f9828c8fa8 --- /dev/null +++ b/tests/specs/run/wasm_module/import_named_export_not_found/__test__.jsonc @@ -0,0 +1,14 @@ +{ + "tests": { + "run": { + "args": "--allow-import main.js", + "output": "main.out", + "exitCode": 1 + }, + "check": { + "args": "check --all --allow-import main.js", + "output": "check.out", + "exitCode": 1 + } + } +} diff --git a/tests/specs/run/wasm_module/import_named_export_not_found/check.out b/tests/specs/run/wasm_module/import_named_export_not_found/check.out new file mode 100644 index 00000000000000..d7cc2ea0fbf41d --- /dev/null +++ b/tests/specs/run/wasm_module/import_named_export_not_found/check.out @@ -0,0 +1,9 @@ +Download http://localhost:4545/wasm/math_with_import.wasm +Check file:///[WILDLINE]/main.js +error: TS2305 [ERROR]: Module '"file:///[WILDLINE]/local_math.ts"' has no exported member '"add"'. + at http://localhost:4545/wasm/math_with_import.wasm:1:1 + +TS2305 [ERROR]: Module '"file:///[WILDLINE]/local_math.ts"' has no exported member '"subtract"'. + at http://localhost:4545/wasm/math_with_import.wasm:1:1 + +Found 2 errors. diff --git a/tests/specs/run/wasm_module/import_named_export_not_found/deno.jsonc b/tests/specs/run/wasm_module/import_named_export_not_found/deno.jsonc new file mode 100644 index 00000000000000..a8f541dcec215e --- /dev/null +++ b/tests/specs/run/wasm_module/import_named_export_not_found/deno.jsonc @@ -0,0 +1,8 @@ +{ + "lock": false, + "scopes": { + "http://localhost:4545/wasm/": { + "http://localhost:4545/wasm/math.ts": "./local_math.ts" + } + } +} diff --git a/tests/specs/run/wasm_module/import_named_export_not_found/local_math.ts b/tests/specs/run/wasm_module/import_named_export_not_found/local_math.ts new file mode 100644 index 00000000000000..8a72ea008be64b --- /dev/null +++ b/tests/specs/run/wasm_module/import_named_export_not_found/local_math.ts @@ -0,0 +1,7 @@ +export function addTest(a: number, b: number) { + return (a + b) * 2; +} + +export function subtractTest(a: number, b: number) { + return (a - b) / 2; +} diff --git a/tests/specs/run/wasm_module/import_named_export_not_found/main.js b/tests/specs/run/wasm_module/import_named_export_not_found/main.js new file mode 100644 index 00000000000000..b55405bd311593 --- /dev/null +++ b/tests/specs/run/wasm_module/import_named_export_not_found/main.js @@ -0,0 +1,8 @@ +// @ts-check +import { + add, + subtract, +} from "http://localhost:4545/wasm/math_with_import.wasm"; + +console.log(add(1, 2)); +console.log(subtract(100, 50)); diff --git a/tests/specs/run/wasm_module/import_named_export_not_found/main.out b/tests/specs/run/wasm_module/import_named_export_not_found/main.out new file mode 100644 index 00000000000000..f79dab7a05dbd5 --- /dev/null +++ b/tests/specs/run/wasm_module/import_named_export_not_found/main.out @@ -0,0 +1,3 @@ +Download http://localhost:4545/wasm/math_with_import.wasm +error: Uncaught SyntaxError: The requested module './math.ts' does not provide an export named 'add' + at (http://localhost:4545/wasm/math_with_import.wasm:[WILDLINE]) diff --git a/tests/specs/run/wasm_module/imports/__test__.jsonc b/tests/specs/run/wasm_module/imports/__test__.jsonc new file mode 100644 index 00000000000000..744ae74d3ec1ec --- /dev/null +++ b/tests/specs/run/wasm_module/imports/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "--allow-import main.js", + "output": "main.out" +} diff --git a/tests/specs/run/wasm_module/imports/main.js b/tests/specs/run/wasm_module/imports/main.js new file mode 100644 index 00000000000000..9ad66df35bdb96 --- /dev/null +++ b/tests/specs/run/wasm_module/imports/main.js @@ -0,0 +1,7 @@ +import { + add, + subtract, +} from "http://localhost:4545/wasm/math_with_import.wasm"; + +console.log(add(1, 2)); +console.log(subtract(100, 50)); diff --git a/tests/specs/run/wasm_module/imports/main.out b/tests/specs/run/wasm_module/imports/main.out new file mode 100644 index 00000000000000..1b1210ded47bb0 --- /dev/null +++ b/tests/specs/run/wasm_module/imports/main.out @@ -0,0 +1,4 @@ +Download http://localhost:4545/wasm/math_with_import.wasm +Download http://localhost:4545/wasm/math.ts +3 +50 diff --git a/tests/specs/run/wasm_module/integrity_check_failed/__test__.jsonc b/tests/specs/run/wasm_module/integrity_check_failed/__test__.jsonc new file mode 100644 index 00000000000000..711016d2599686 --- /dev/null +++ b/tests/specs/run/wasm_module/integrity_check_failed/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "--allow-import main.js", + "output": "main.out", + "exitCode": 10 +} diff --git a/tests/specs/run/wasm_module/integrity_check_failed/deno.json b/tests/specs/run/wasm_module/integrity_check_failed/deno.json new file mode 100644 index 00000000000000..2c63c0851048d8 --- /dev/null +++ b/tests/specs/run/wasm_module/integrity_check_failed/deno.json @@ -0,0 +1,2 @@ +{ +} diff --git a/tests/specs/run/wasm_module/integrity_check_failed/deno.lock b/tests/specs/run/wasm_module/integrity_check_failed/deno.lock new file mode 100644 index 00000000000000..adb4b91ee93934 --- /dev/null +++ b/tests/specs/run/wasm_module/integrity_check_failed/deno.lock @@ -0,0 +1,6 @@ +{ + "version": "4", + "remote": { + "http://localhost:4545/wasm/math.wasm": "c4fdd49432f1517835b93274447890007947f9d30674ab7f1474091860113d95" + } +} diff --git a/tests/specs/run/wasm_module/integrity_check_failed/main.js b/tests/specs/run/wasm_module/integrity_check_failed/main.js new file mode 100644 index 00000000000000..1e1b2629d1756d --- /dev/null +++ b/tests/specs/run/wasm_module/integrity_check_failed/main.js @@ -0,0 +1,4 @@ +import { add, subtract } from "http://localhost:4545/wasm/math.wasm"; + +console.log(add(1, 2)); +console.log(subtract(100, 50)); diff --git a/tests/specs/run/wasm_module/integrity_check_failed/main.out b/tests/specs/run/wasm_module/integrity_check_failed/main.out new file mode 100644 index 00000000000000..6434bfcf937062 --- /dev/null +++ b/tests/specs/run/wasm_module/integrity_check_failed/main.out @@ -0,0 +1,12 @@ +Download http://localhost:4545/wasm/math.wasm +error: Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file. + + Specifier: http://localhost:4545/wasm/math.wasm + Actual: d1643d9d4ba8f34ee5198717860cbc629013179addba6d4e347b68eb721c73b4 + Expected: c4fdd49432f1517835b93274447890007947f9d30674ab7f1474091860113d95 + +This could be caused by: + * the lock file may be corrupt + * the source itself may be corrupt + +Investigate the lockfile; delete it to regenerate the lockfile or --reload to reload the source code from the server. diff --git a/tests/specs/run/wasm_module/map_imports_via_import_map/__test__.jsonc b/tests/specs/run/wasm_module/map_imports_via_import_map/__test__.jsonc new file mode 100644 index 00000000000000..744ae74d3ec1ec --- /dev/null +++ b/tests/specs/run/wasm_module/map_imports_via_import_map/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "--allow-import main.js", + "output": "main.out" +} diff --git a/tests/specs/run/wasm_module/map_imports_via_import_map/deno.json b/tests/specs/run/wasm_module/map_imports_via_import_map/deno.json new file mode 100644 index 00000000000000..a8f541dcec215e --- /dev/null +++ b/tests/specs/run/wasm_module/map_imports_via_import_map/deno.json @@ -0,0 +1,8 @@ +{ + "lock": false, + "scopes": { + "http://localhost:4545/wasm/": { + "http://localhost:4545/wasm/math.ts": "./local_math.ts" + } + } +} diff --git a/tests/specs/run/wasm_module/map_imports_via_import_map/local_math.ts b/tests/specs/run/wasm_module/map_imports_via_import_map/local_math.ts new file mode 100644 index 00000000000000..e681c2d7dad320 --- /dev/null +++ b/tests/specs/run/wasm_module/map_imports_via_import_map/local_math.ts @@ -0,0 +1,7 @@ +export function add(a: number, b: number) { + return (a + b) * 2; +} + +export function subtract(a: number, b: number) { + return (a - b) / 2; +} diff --git a/tests/specs/run/wasm_module/map_imports_via_import_map/main.js b/tests/specs/run/wasm_module/map_imports_via_import_map/main.js new file mode 100644 index 00000000000000..9ad66df35bdb96 --- /dev/null +++ b/tests/specs/run/wasm_module/map_imports_via_import_map/main.js @@ -0,0 +1,7 @@ +import { + add, + subtract, +} from "http://localhost:4545/wasm/math_with_import.wasm"; + +console.log(add(1, 2)); +console.log(subtract(100, 50)); diff --git a/tests/specs/run/wasm_module/map_imports_via_import_map/main.out b/tests/specs/run/wasm_module/map_imports_via_import_map/main.out new file mode 100644 index 00000000000000..3a90c739aab72d --- /dev/null +++ b/tests/specs/run/wasm_module/map_imports_via_import_map/main.out @@ -0,0 +1,3 @@ +Download http://localhost:4545/wasm/math_with_import.wasm +6 +25 diff --git a/tests/specs/run/wasm_module/no_imports/__test__.jsonc b/tests/specs/run/wasm_module/no_imports/__test__.jsonc new file mode 100644 index 00000000000000..29c4a86f31dc6a --- /dev/null +++ b/tests/specs/run/wasm_module/no_imports/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "run --allow-import main.ts", + "output": "main.out" +} diff --git a/tests/specs/run/wasm_module/no_imports/main.out b/tests/specs/run/wasm_module/no_imports/main.out new file mode 100644 index 00000000000000..ce0d170ffdf80b --- /dev/null +++ b/tests/specs/run/wasm_module/no_imports/main.out @@ -0,0 +1,3 @@ +Download http://localhost:4545/wasm/math.wasm +3 +6 diff --git a/tests/specs/run/wasm_module/no_imports/main.ts b/tests/specs/run/wasm_module/no_imports/main.ts new file mode 100644 index 00000000000000..3cd3f675d26ba1 --- /dev/null +++ b/tests/specs/run/wasm_module/no_imports/main.ts @@ -0,0 +1,4 @@ +import { add, subtract } from "http://localhost:4545/wasm/math.wasm"; + +console.log(add(1, 2)); +console.log(subtract(8, 2)); diff --git a/tests/specs/run/wasm_module/table_global_memory/__test__.jsonc b/tests/specs/run/wasm_module/table_global_memory/__test__.jsonc new file mode 100644 index 00000000000000..55f16ed0c2eee1 --- /dev/null +++ b/tests/specs/run/wasm_module/table_global_memory/__test__.jsonc @@ -0,0 +1,13 @@ +{ + "tests": { + "run": { + "args": "run main.js", + "output": "main.out" + }, + "check": { + "args": "check check.ts", + "output": "check.out", + "exitCode": 1 + } + } +} diff --git a/tests/specs/run/wasm_module/table_global_memory/check.out b/tests/specs/run/wasm_module/table_global_memory/check.out new file mode 100644 index 00000000000000..e335a7c9070ba8 --- /dev/null +++ b/tests/specs/run/wasm_module/table_global_memory/check.out @@ -0,0 +1,14 @@ +Check file:///[WILDLINE]/check.ts +error: TS2322 [ERROR]: Type 'Function | null' is not assignable to type 'number'. + Type 'null' is not assignable to type 'number'. +const value1: number = table.get(0); + ~~~~~~ + at file:///[WILDLINE]/check.ts:2:7 + +TS2322 [ERROR]: Type 'ArrayBuffer | SharedArrayBuffer' is not assignable to type 'number'. + Type 'ArrayBuffer' is not assignable to type 'number'. +const value2: number = memory.buffer; + ~~~~~~ + at file:///[WILDLINE]/check.ts:3:7 + +Found 2 errors. diff --git a/tests/specs/run/wasm_module/table_global_memory/check.ts b/tests/specs/run/wasm_module/table_global_memory/check.ts new file mode 100644 index 00000000000000..c0e43ed2aa380d --- /dev/null +++ b/tests/specs/run/wasm_module/table_global_memory/check.ts @@ -0,0 +1,4 @@ +import { memory, table } from "./mod.wasm"; +const value1: number = table.get(0); +const value2: number = memory.buffer; +console.log(value1, value2); diff --git a/tests/specs/run/wasm_module/table_global_memory/main.js b/tests/specs/run/wasm_module/table_global_memory/main.js new file mode 100644 index 00000000000000..a5ff412a922246 --- /dev/null +++ b/tests/specs/run/wasm_module/table_global_memory/main.js @@ -0,0 +1,2 @@ +import * as wasm from "./mod.wasm"; +console.log(wasm); diff --git a/tests/specs/run/wasm_module/table_global_memory/main.out b/tests/specs/run/wasm_module/table_global_memory/main.out new file mode 100644 index 00000000000000..c095b0dd9298d2 --- /dev/null +++ b/tests/specs/run/wasm_module/table_global_memory/main.out @@ -0,0 +1,6 @@ +[Module: null prototype] { + func: [Function: 0], + global: Global [WebAssembly.Global] {}, + memory: Memory [WebAssembly.Memory] {}, + table: Table [WebAssembly.Table] {} +} diff --git a/tests/specs/run/wasm_module/table_global_memory/mod.wasm b/tests/specs/run/wasm_module/table_global_memory/mod.wasm new file mode 100644 index 00000000000000..a99e01c5dc23e9 Binary files /dev/null and b/tests/specs/run/wasm_module/table_global_memory/mod.wasm differ diff --git a/tests/specs/run/wasm_module/table_global_memory/mod.wat b/tests/specs/run/wasm_module/table_global_memory/mod.wat new file mode 100644 index 00000000000000..d2a92f0ac1518b --- /dev/null +++ b/tests/specs/run/wasm_module/table_global_memory/mod.wat @@ -0,0 +1,6 @@ +(module + (func (export "func") unreachable) + (table (export "table") 0 funcref) + (memory (export "memory") 0) + (global (export "global") i32 i32.const 0) +) diff --git a/tests/specs/run/worker_close_in_wasm_reactions/close_in_wasm_reactions.js b/tests/specs/run/worker_close_in_wasm_reactions/close_in_wasm_reactions.js index abe5731085bff8..2cb0e4a7680217 100644 --- a/tests/specs/run/worker_close_in_wasm_reactions/close_in_wasm_reactions.js +++ b/tests/specs/run/worker_close_in_wasm_reactions/close_in_wasm_reactions.js @@ -1,6 +1,6 @@ // https://github.com/denoland/deno/issues/12263 // Test for a panic that happens when a worker is closed in the reactions of a -// WASM async operation. +// Wasm async operation. // The minimum valid wasm module, plus two additional zero bytes. const buffer = new Uint8Array([ diff --git a/tests/specs/run/worker_close_in_wasm_reactions/worker_close_in_wasm_reactions.js b/tests/specs/run/worker_close_in_wasm_reactions/worker_close_in_wasm_reactions.js index 828320a240b1fa..38508c31c43713 100644 --- a/tests/specs/run/worker_close_in_wasm_reactions/worker_close_in_wasm_reactions.js +++ b/tests/specs/run/worker_close_in_wasm_reactions/worker_close_in_wasm_reactions.js @@ -1,8 +1,8 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // https://github.com/denoland/deno/issues/12263 // Test for a panic that happens when a worker is closed in the reactions of a -// WASM async operation. +// Wasm async operation. new Worker( import.meta.resolve("./close_in_wasm_reactions.js"), diff --git a/tests/specs/run/worker_close_nested/close_nested_child.js b/tests/specs/run/worker_close_nested/close_nested_child.js index 97980c689e07e0..1f2b2091a672d5 100644 --- a/tests/specs/run/worker_close_nested/close_nested_child.js +++ b/tests/specs/run/worker_close_nested/close_nested_child.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. console.log("Starting the child worker"); diff --git a/tests/specs/run/worker_close_nested/close_nested_parent.js b/tests/specs/run/worker_close_nested/close_nested_parent.js index d1fe47553e4b6d..ddb9aec26df04b 100644 --- a/tests/specs/run/worker_close_nested/close_nested_parent.js +++ b/tests/specs/run/worker_close_nested/close_nested_parent.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. console.log("Starting the parent worker"); diff --git a/tests/specs/run/worker_close_nested/worker_close_nested.js b/tests/specs/run/worker_close_nested/worker_close_nested.js index 8d9c88d1cf24a8..179eb48fa1b1ef 100644 --- a/tests/specs/run/worker_close_nested/worker_close_nested.js +++ b/tests/specs/run/worker_close_nested/worker_close_nested.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Test that closing a worker which has living child workers will automatically // close the children. diff --git a/tests/specs/run/worker_close_race/close_race_worker.js b/tests/specs/run/worker_close_race/close_race_worker.js index 6964be34a08803..945fed9dd06724 100644 --- a/tests/specs/run/worker_close_race/close_race_worker.js +++ b/tests/specs/run/worker_close_race/close_race_worker.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. setTimeout(() => { self.postMessage(""); diff --git a/tests/specs/run/worker_close_race/worker_close_race.js b/tests/specs/run/worker_close_race/worker_close_race.js index 188cd9ed880fe5..b39062df50db9c 100644 --- a/tests/specs/run/worker_close_race/worker_close_race.js +++ b/tests/specs/run/worker_close_race/worker_close_race.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // https://github.com/denoland/deno/issues/11416 // Test for a race condition between a worker's `close()` and the main thread's diff --git a/tests/specs/run/worker_drop_handle_race/worker_drop_handle_race.js b/tests/specs/run/worker_drop_handle_race/worker_drop_handle_race.js index ef9bcbe072d865..bfacc332acf81b 100644 --- a/tests/specs/run/worker_drop_handle_race/worker_drop_handle_race.js +++ b/tests/specs/run/worker_drop_handle_race/worker_drop_handle_race.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // https://github.com/denoland/deno/issues/11342 // Test for a panic that happens when the main thread's event loop finishes diff --git a/tests/specs/run/worker_drop_handle_race_terminate/worker_drop_handle_race_terminate.js b/tests/specs/run/worker_drop_handle_race_terminate/worker_drop_handle_race_terminate.js index 7c4e0b1099cbcc..85a3c51072e4e5 100644 --- a/tests/specs/run/worker_drop_handle_race_terminate/worker_drop_handle_race_terminate.js +++ b/tests/specs/run/worker_drop_handle_race_terminate/worker_drop_handle_race_terminate.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Test that the panic in https://github.com/denoland/deno/issues/11342 does not // happen when calling worker.terminate() after fixing diff --git a/tests/specs/schema.json b/tests/specs/schema.json index 2b35d9bd7dba4b..77ffc595304104 100644 --- a/tests/specs/schema.json +++ b/tests/specs/schema.json @@ -36,6 +36,9 @@ "flaky": { "type": "boolean" }, + "canonicalizedTempDir": { + "type": "boolean" + }, "symlinkedTempDir": { "type": "boolean" }, @@ -66,6 +69,12 @@ "tempDir": { "type": "boolean" }, + "canonicalizedTempDir": { + "type": "boolean" + }, + "symlinkedTempDir": { + "type": "boolean" + }, "base": { "type": "string" }, @@ -94,6 +103,12 @@ "tempDir": { "type": "boolean" }, + "canonicalizedTempDir": { + "type": "boolean" + }, + "symlinkedTempDir": { + "type": "boolean" + }, "base": { "type": "string" }, diff --git a/tests/specs/task/bin_pkg_with_scope_auto/bin_none.out b/tests/specs/task/bin_pkg_with_scope_auto/bin_none.out deleted file mode 100644 index f44b234bf3453e..00000000000000 --- a/tests/specs/task/bin_pkg_with_scope_auto/bin_none.out +++ /dev/null @@ -1,12 +0,0 @@ -Download http://localhost:4260/@denotest%2fbin -[UNORDERED_START] -Download http://localhost:4260/@denotest/bin/0.5.0.tgz -Download http://localhost:4260/@denotest/bin/1.0.0.tgz -[UNORDERED_END] -Task bin bin hi && cli-esm testing this out && npx cli-cjs test "extra" -hi -testing -this -out -test -extra diff --git a/tests/specs/task/deno_json_lifecycle_script_names/__test__.jsonc b/tests/specs/task/deno_json_lifecycle_script_names/__test__.jsonc new file mode 100644 index 00000000000000..d22f77cc2b759e --- /dev/null +++ b/tests/specs/task/deno_json_lifecycle_script_names/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "task test", + "output": "bin.out", + "exitCode": 0 +} diff --git a/tests/specs/task/deno_json_lifecycle_script_names/bin.out b/tests/specs/task/deno_json_lifecycle_script_names/bin.out new file mode 100644 index 00000000000000..ad66595f1ed77e --- /dev/null +++ b/tests/specs/task/deno_json_lifecycle_script_names/bin.out @@ -0,0 +1,2 @@ +Task test echo 'test' +test diff --git a/tests/specs/task/deno_json_lifecycle_script_names/deno.jsonc b/tests/specs/task/deno_json_lifecycle_script_names/deno.jsonc new file mode 100644 index 00000000000000..de2f8be880b051 --- /dev/null +++ b/tests/specs/task/deno_json_lifecycle_script_names/deno.jsonc @@ -0,0 +1,7 @@ +{ + "task": { + // should not execute this one because it's in a deno.json + // and not in the package.json + "pretest": "echo 'should not be in output'" + } +} diff --git a/tests/specs/task/deno_json_lifecycle_script_names/package.json b/tests/specs/task/deno_json_lifecycle_script_names/package.json new file mode 100644 index 00000000000000..e66cb27e3d21fe --- /dev/null +++ b/tests/specs/task/deno_json_lifecycle_script_names/package.json @@ -0,0 +1,5 @@ +{ + "scripts": { + "test": "echo 'test'" + } +} diff --git a/tests/specs/task/dependencies/__test__.jsonc b/tests/specs/task/dependencies/__test__.jsonc new file mode 100644 index 00000000000000..c9032153b3a5ea --- /dev/null +++ b/tests/specs/task/dependencies/__test__.jsonc @@ -0,0 +1,78 @@ +{ + "tests": { + "basic1": { + "cwd": "basic1", + "tempDir": true, + "args": "task run", + "output": "./basic1.out" + }, + "basic2": { + "cwd": "basic2", + "tempDir": true, + "args": "task run", + "output": "./basic2.out" + }, + "cross_package": { + "cwd": "cross_package/package1", + "tempDir": true, + "args": "task run", + "output": "./cross_package.out", + "exitCode": 1 + }, + "diamond": { + "cwd": "diamond", + "tempDir": true, + "args": "task a", + "output": "./diamond.out" + }, + "diamond_list": { + "cwd": "diamond", + "tempDir": true, + "args": "task", + "output": "./diamond_list.out" + }, + "diamond_big": { + "cwd": "diamond_big", + "tempDir": true, + "args": "task a", + "output": "./diamond_big.out" + }, + "diamond_big_list": { + "cwd": "diamond_big", + "tempDir": true, + "args": "task", + "output": "./diamond_big_list.out" + }, + "cycle": { + "cwd": "cycle", + "tempDir": true, + "output": "./cycle.out", + "args": "task a", + "exitCode": 1 + }, + "cycle_2": { + "cwd": "cycle_2", + "tempDir": true, + "args": "task a", + "output": "./cycle_2.out", + "exitCode": 1 + }, + "arg_task_with_deps": { + "cwd": "arg_task_with_deps", + "args": "task a a", + "output": "./arg_task_with_deps.out" + }, + "no_command": { + "cwd": "no_command", + "args": "task a", + "output": "./no_command.out", + "exitCode": 0 + }, + "no_command_list": { + "cwd": "no_command", + "args": "task", + "output": "./no_command_list.out", + "exitCode": 0 + } + } +} diff --git a/tests/specs/task/dependencies/arg_task_with_deps.out b/tests/specs/task/dependencies/arg_task_with_deps.out new file mode 100644 index 00000000000000..ce4a26f447c5b8 --- /dev/null +++ b/tests/specs/task/dependencies/arg_task_with_deps.out @@ -0,0 +1,4 @@ +Task b echo 'b' +b +Task a echo "a" +a diff --git a/tests/specs/task/dependencies/arg_task_with_deps/deno.json b/tests/specs/task/dependencies/arg_task_with_deps/deno.json new file mode 100644 index 00000000000000..3b6dcf7c801b2c --- /dev/null +++ b/tests/specs/task/dependencies/arg_task_with_deps/deno.json @@ -0,0 +1,9 @@ +{ + "tasks": { + "a": { + "command": "echo", + "dependencies": ["b"] + }, + "b": "echo 'b'" + } +} diff --git a/tests/specs/task/dependencies/basic1.out b/tests/specs/task/dependencies/basic1.out new file mode 100644 index 00000000000000..8c31d02b4efcf0 --- /dev/null +++ b/tests/specs/task/dependencies/basic1.out @@ -0,0 +1,12 @@ +Task build1 deno run ../build1.js +Task build2 deno run ../build2.js +[UNORDERED_START] +Starting build1 +build1 performing more work... +build1 finished +Starting build2 +build2 performing more work... +build2 finished +[UNORDERED_END] +Task run deno run ../run.js +run finished diff --git a/tests/specs/task/dependencies/basic1/deno.json b/tests/specs/task/dependencies/basic1/deno.json new file mode 100644 index 00000000000000..16bb9937e47047 --- /dev/null +++ b/tests/specs/task/dependencies/basic1/deno.json @@ -0,0 +1,10 @@ +{ + "tasks": { + "build1": "deno run ../build1.js", + "build2": "deno run ../build2.js", + "run": { + "command": "deno run ../run.js", + "dependencies": ["build1", "build2"] + } + } +} diff --git a/tests/specs/task/dependencies/basic2.out b/tests/specs/task/dependencies/basic2.out new file mode 100644 index 00000000000000..24ccd0eb03ace0 --- /dev/null +++ b/tests/specs/task/dependencies/basic2.out @@ -0,0 +1,10 @@ +Task build1 deno run ../build1.js +Starting build1 +build1 performing more work... +build1 finished +Task build2 deno run ../build2.js +Starting build2 +build2 performing more work... +build2 finished +Task run deno run ../run.js +run finished diff --git a/tests/specs/task/dependencies/basic2/deno.json b/tests/specs/task/dependencies/basic2/deno.json new file mode 100644 index 00000000000000..9a54926dd393a1 --- /dev/null +++ b/tests/specs/task/dependencies/basic2/deno.json @@ -0,0 +1,13 @@ +{ + "tasks": { + "build1": "deno run ../build1.js", + "build2": { + "command": "deno run ../build2.js", + "dependencies": ["build1"] + }, + "run": { + "command": "deno run ../run.js", + "dependencies": ["build2"] + } + } +} diff --git a/tests/specs/task/dependencies/build1.js b/tests/specs/task/dependencies/build1.js new file mode 100644 index 00000000000000..d14fb401a31995 --- /dev/null +++ b/tests/specs/task/dependencies/build1.js @@ -0,0 +1,9 @@ +import { randomTimeout } from "./util.js"; + +console.log("Starting build1"); + +await randomTimeout(500, 750); +console.log("build1 performing more work..."); +await randomTimeout(500, 750); + +console.log("build1 finished"); diff --git a/tests/specs/task/dependencies/build2.js b/tests/specs/task/dependencies/build2.js new file mode 100644 index 00000000000000..3032a099ae31d9 --- /dev/null +++ b/tests/specs/task/dependencies/build2.js @@ -0,0 +1,9 @@ +import { randomTimeout } from "./util.js"; + +console.log("Starting build2"); + +await randomTimeout(250, 750); +console.log("build2 performing more work..."); +await randomTimeout(250, 750); + +console.log("build2 finished"); diff --git a/tests/specs/task/dependencies/cross_package.out b/tests/specs/task/dependencies/cross_package.out new file mode 100644 index 00000000000000..a57f4de9ff6fe5 --- /dev/null +++ b/tests/specs/task/dependencies/cross_package.out @@ -0,0 +1,5 @@ +Task not found: ../package2:run +Available tasks: +- run + deno run.js + depends on: ../package2:run diff --git a/tests/specs/task/dependencies/cross_package/package1/deno.json b/tests/specs/task/dependencies/cross_package/package1/deno.json new file mode 100644 index 00000000000000..6684a1e2c4490f --- /dev/null +++ b/tests/specs/task/dependencies/cross_package/package1/deno.json @@ -0,0 +1,8 @@ +{ + "tasks": { + "run": { + "command": "deno run.js", + "dependencies": ["../package2:run"] + } + } +} diff --git a/tests/specs/task/dependencies/cross_package/package2/deno.json b/tests/specs/task/dependencies/cross_package/package2/deno.json new file mode 100644 index 00000000000000..e45ec398f61065 --- /dev/null +++ b/tests/specs/task/dependencies/cross_package/package2/deno.json @@ -0,0 +1,5 @@ +{ + "tasks": { + "run": "deno run.js" + } +} diff --git a/tests/specs/task/dependencies/cycle.out b/tests/specs/task/dependencies/cycle.out new file mode 100644 index 00000000000000..33352b0bbc5f2c --- /dev/null +++ b/tests/specs/task/dependencies/cycle.out @@ -0,0 +1 @@ +Task cycle detected: a -> a diff --git a/tests/specs/task/dependencies/cycle/a.js b/tests/specs/task/dependencies/cycle/a.js new file mode 100644 index 00000000000000..688695558e9ffc --- /dev/null +++ b/tests/specs/task/dependencies/cycle/a.js @@ -0,0 +1 @@ +console.log("Running a"); diff --git a/tests/specs/task/dependencies/cycle/deno.jsonc b/tests/specs/task/dependencies/cycle/deno.jsonc new file mode 100644 index 00000000000000..31e67488cbd7c5 --- /dev/null +++ b/tests/specs/task/dependencies/cycle/deno.jsonc @@ -0,0 +1,8 @@ +{ + "tasks": { + "a": { + "command": "deno run a.js", + "dependencies": ["a"] + } + } +} diff --git a/tests/specs/task/dependencies/cycle_2.out b/tests/specs/task/dependencies/cycle_2.out new file mode 100644 index 00000000000000..89ef04a00ba922 --- /dev/null +++ b/tests/specs/task/dependencies/cycle_2.out @@ -0,0 +1 @@ +Task cycle detected: a -> b -> a diff --git a/tests/specs/task/dependencies/cycle_2/a.js b/tests/specs/task/dependencies/cycle_2/a.js new file mode 100644 index 00000000000000..688695558e9ffc --- /dev/null +++ b/tests/specs/task/dependencies/cycle_2/a.js @@ -0,0 +1 @@ +console.log("Running a"); diff --git a/tests/specs/task/dependencies/cycle_2/b.js b/tests/specs/task/dependencies/cycle_2/b.js new file mode 100644 index 00000000000000..ed1addf1a70e1d --- /dev/null +++ b/tests/specs/task/dependencies/cycle_2/b.js @@ -0,0 +1 @@ +console.log("Running b"); diff --git a/tests/specs/task/dependencies/cycle_2/deno.jsonc b/tests/specs/task/dependencies/cycle_2/deno.jsonc new file mode 100644 index 00000000000000..5a5d38ec9cd9e7 --- /dev/null +++ b/tests/specs/task/dependencies/cycle_2/deno.jsonc @@ -0,0 +1,12 @@ +{ + "tasks": { + "a": { + "command": "deno run a.js", + "dependencies": ["b"] + }, + "b": { + "command": "deno run b.js", + "dependencies": ["a"] + } + } +} diff --git a/tests/specs/task/dependencies/diamond.out b/tests/specs/task/dependencies/diamond.out new file mode 100644 index 00000000000000..75b06a35b2051c --- /dev/null +++ b/tests/specs/task/dependencies/diamond.out @@ -0,0 +1,10 @@ +Task d deno run d.js +Running d +[UNORDERED_START] +Task b deno run b.js +Running b +Task c deno run c.js +Running c +[UNORDERED_END] +Task a deno run a.js +Running a diff --git a/tests/specs/task/dependencies/diamond/a.js b/tests/specs/task/dependencies/diamond/a.js new file mode 100644 index 00000000000000..688695558e9ffc --- /dev/null +++ b/tests/specs/task/dependencies/diamond/a.js @@ -0,0 +1 @@ +console.log("Running a"); diff --git a/tests/specs/task/dependencies/diamond/b.js b/tests/specs/task/dependencies/diamond/b.js new file mode 100644 index 00000000000000..ed1addf1a70e1d --- /dev/null +++ b/tests/specs/task/dependencies/diamond/b.js @@ -0,0 +1 @@ +console.log("Running b"); diff --git a/tests/specs/task/dependencies/diamond/c.js b/tests/specs/task/dependencies/diamond/c.js new file mode 100644 index 00000000000000..194d656be66e5a --- /dev/null +++ b/tests/specs/task/dependencies/diamond/c.js @@ -0,0 +1 @@ +console.log("Running c"); diff --git a/tests/specs/task/dependencies/diamond/d.js b/tests/specs/task/dependencies/diamond/d.js new file mode 100644 index 00000000000000..a9f231f83d9e3b --- /dev/null +++ b/tests/specs/task/dependencies/diamond/d.js @@ -0,0 +1 @@ +console.log("Running d"); diff --git a/tests/specs/task/dependencies/diamond/deno.jsonc b/tests/specs/task/dependencies/diamond/deno.jsonc new file mode 100644 index 00000000000000..07d0a917752d88 --- /dev/null +++ b/tests/specs/task/dependencies/diamond/deno.jsonc @@ -0,0 +1,22 @@ +{ + // a + // / \ + // b c + // \ / + // d + "tasks": { + "a": { + "command": "deno run a.js", + "dependencies": ["b", "c"] + }, + "b": { + "command": "deno run b.js", + "dependencies": ["d"] + }, + "c": { + "command": "deno run c.js", + "dependencies": ["d"] + }, + "d": "deno run d.js" + } +} diff --git a/tests/specs/task/dependencies/diamond_big.out b/tests/specs/task/dependencies/diamond_big.out new file mode 100644 index 00000000000000..f0b827b0da7291 --- /dev/null +++ b/tests/specs/task/dependencies/diamond_big.out @@ -0,0 +1,13 @@ +Task e deno run e.js +Running e +[UNORDERED_START] +Task b deno run b.js +Running b +Task d deno run d.js +Running d +Task c deno run c.js +Running c +Finished b +[UNORDERED_END] +Task a deno run a.js +Running a diff --git a/tests/specs/task/dependencies/diamond_big/a.js b/tests/specs/task/dependencies/diamond_big/a.js new file mode 100644 index 00000000000000..688695558e9ffc --- /dev/null +++ b/tests/specs/task/dependencies/diamond_big/a.js @@ -0,0 +1 @@ +console.log("Running a"); diff --git a/tests/specs/task/dependencies/diamond_big/b.js b/tests/specs/task/dependencies/diamond_big/b.js new file mode 100644 index 00000000000000..4b00ef56923cf9 --- /dev/null +++ b/tests/specs/task/dependencies/diamond_big/b.js @@ -0,0 +1,4 @@ +console.log("Running b"); +setTimeout(() => { + console.log("Finished b"); +}, 10); diff --git a/tests/specs/task/dependencies/diamond_big/c.js b/tests/specs/task/dependencies/diamond_big/c.js new file mode 100644 index 00000000000000..194d656be66e5a --- /dev/null +++ b/tests/specs/task/dependencies/diamond_big/c.js @@ -0,0 +1 @@ +console.log("Running c"); diff --git a/tests/specs/task/dependencies/diamond_big/d.js b/tests/specs/task/dependencies/diamond_big/d.js new file mode 100644 index 00000000000000..a9f231f83d9e3b --- /dev/null +++ b/tests/specs/task/dependencies/diamond_big/d.js @@ -0,0 +1 @@ +console.log("Running d"); diff --git a/tests/specs/task/dependencies/diamond_big/deno.jsonc b/tests/specs/task/dependencies/diamond_big/deno.jsonc new file mode 100644 index 00000000000000..28ea7f69546c90 --- /dev/null +++ b/tests/specs/task/dependencies/diamond_big/deno.jsonc @@ -0,0 +1,28 @@ +{ + // a + // / \ + // b c + // | | + // | d + // \ / + // e + "tasks": { + "a": { + "command": "deno run a.js", + "dependencies": ["b", "c"] + }, + "b": { + "command": "deno run b.js", + "dependencies": ["e"] + }, + "c": { + "command": "deno run c.js", + "dependencies": ["d"] + }, + "d": { + "command": "deno run d.js", + "dependencies": ["e"] + }, + "e": "deno run e.js" + } +} diff --git a/tests/specs/task/dependencies/diamond_big/e.js b/tests/specs/task/dependencies/diamond_big/e.js new file mode 100644 index 00000000000000..b36066c3d7303f --- /dev/null +++ b/tests/specs/task/dependencies/diamond_big/e.js @@ -0,0 +1 @@ +console.log("Running e"); diff --git a/tests/specs/task/dependencies/diamond_big_list.out b/tests/specs/task/dependencies/diamond_big_list.out new file mode 100644 index 00000000000000..c95bcd272d9147 --- /dev/null +++ b/tests/specs/task/dependencies/diamond_big_list.out @@ -0,0 +1,15 @@ +Available tasks: +- a + deno run a.js + depends on: b, c +- b + deno run b.js + depends on: e +- c + deno run c.js + depends on: d +- d + deno run d.js + depends on: e +- e + deno run e.js diff --git a/tests/specs/task/dependencies/diamond_list.out b/tests/specs/task/dependencies/diamond_list.out new file mode 100644 index 00000000000000..dfd725a4053429 --- /dev/null +++ b/tests/specs/task/dependencies/diamond_list.out @@ -0,0 +1,12 @@ +Available tasks: +- a + deno run a.js + depends on: b, c +- b + deno run b.js + depends on: d +- c + deno run c.js + depends on: d +- d + deno run d.js diff --git a/tests/specs/task/dependencies/no_command.out b/tests/specs/task/dependencies/no_command.out new file mode 100644 index 00000000000000..521b3541df0a62 --- /dev/null +++ b/tests/specs/task/dependencies/no_command.out @@ -0,0 +1,5 @@ +Task b echo 'b' +b +Task c echo 'c' +c +Task a (no command) diff --git a/tests/specs/task/dependencies/no_command/deno.json b/tests/specs/task/dependencies/no_command/deno.json new file mode 100644 index 00000000000000..5588365a92dae8 --- /dev/null +++ b/tests/specs/task/dependencies/no_command/deno.json @@ -0,0 +1,13 @@ +{ + "tasks": { + "a": { + "dependencies": ["b", "c"] + }, + "b": { + "command": "echo 'b'" + }, + "c": { + "command": "echo 'c'" + } + } +} diff --git a/tests/specs/task/dependencies/no_command_list.out b/tests/specs/task/dependencies/no_command_list.out new file mode 100644 index 00000000000000..3d58c1cb06025d --- /dev/null +++ b/tests/specs/task/dependencies/no_command_list.out @@ -0,0 +1,7 @@ +Available tasks: +- a + depends on: b, c +- b + echo 'b' +- c + echo 'c' diff --git a/tests/specs/task/dependencies/run.js b/tests/specs/task/dependencies/run.js new file mode 100644 index 00000000000000..f457de6ab06309 --- /dev/null +++ b/tests/specs/task/dependencies/run.js @@ -0,0 +1 @@ +console.log("run finished"); diff --git a/tests/specs/task/dependencies/util.js b/tests/specs/task/dependencies/util.js new file mode 100644 index 00000000000000..9579eb9c9fc86a --- /dev/null +++ b/tests/specs/task/dependencies/util.js @@ -0,0 +1,4 @@ +export async function randomTimeout(min, max) { + const timeout = Math.floor(Math.random() * (max - min + 1) + min); + return new Promise((resolve) => setTimeout(resolve, timeout)); +} diff --git a/tests/specs/task/dependencies_root_not_cycle/__test__.jsonc b/tests/specs/task/dependencies_root_not_cycle/__test__.jsonc new file mode 100644 index 00000000000000..073210358209a1 --- /dev/null +++ b/tests/specs/task/dependencies_root_not_cycle/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "task a", + "cwd": "member", + "output": "task.out" +} diff --git a/tests/specs/task/dependencies_root_not_cycle/deno.json b/tests/specs/task/dependencies_root_not_cycle/deno.json new file mode 100644 index 00000000000000..43a4952f938732 --- /dev/null +++ b/tests/specs/task/dependencies_root_not_cycle/deno.json @@ -0,0 +1,10 @@ +{ + "tasks": { + "a": "echo root-a", + "b": { + "dependencies": ["a"], + "command": "echo b" + } + }, + "workspace": ["./member"] +} diff --git a/tests/specs/task/dependencies_root_not_cycle/member/deno.json b/tests/specs/task/dependencies_root_not_cycle/member/deno.json new file mode 100644 index 00000000000000..08c3493c73a1da --- /dev/null +++ b/tests/specs/task/dependencies_root_not_cycle/member/deno.json @@ -0,0 +1,8 @@ +{ + "tasks": { + "a": { + "dependencies": ["b"], + "command": "echo a" + } + } +} diff --git a/tests/specs/task/dependencies_root_not_cycle/task.out b/tests/specs/task/dependencies_root_not_cycle/task.out new file mode 100644 index 00000000000000..0194f31e4e3fad --- /dev/null +++ b/tests/specs/task/dependencies_root_not_cycle/task.out @@ -0,0 +1,6 @@ +Task a echo root-a +root-a +Task b echo b +b +Task a echo a +a diff --git a/tests/specs/task/dependencies_shadowed_root_name/__test__.jsonc b/tests/specs/task/dependencies_shadowed_root_name/__test__.jsonc new file mode 100644 index 00000000000000..9d3d50582c5f11 --- /dev/null +++ b/tests/specs/task/dependencies_shadowed_root_name/__test__.jsonc @@ -0,0 +1,14 @@ +{ + "tests": { + "root_dependending_root": { + "args": "task root-depending-root", + "cwd": "member", + "output": "root_dependending_root.out" + }, + "member_depending_root_and_member": { + "args": "task member-dependending-root-and-member", + "cwd": "member", + "output": "member_depending_root_and_member.out" + } + } +} diff --git a/tests/specs/task/dependencies_shadowed_root_name/deno.jsonc b/tests/specs/task/dependencies_shadowed_root_name/deno.jsonc new file mode 100644 index 00000000000000..88f0ee4e9eef09 --- /dev/null +++ b/tests/specs/task/dependencies_shadowed_root_name/deno.jsonc @@ -0,0 +1,12 @@ +{ + "tasks": { + "build": "echo root", + "root-depending-root": { + "dependencies": [ + "build" + ], + "command": "echo test" + } + }, + "workspace": ["./member"] +} diff --git a/tests/specs/task/dependencies_shadowed_root_name/member/deno.jsonc b/tests/specs/task/dependencies_shadowed_root_name/member/deno.jsonc new file mode 100644 index 00000000000000..df5ac047a3842d --- /dev/null +++ b/tests/specs/task/dependencies_shadowed_root_name/member/deno.jsonc @@ -0,0 +1,12 @@ +{ + "tasks": { + "build": "echo member", + "member-dependending-root-and-member": { + "dependencies": [ + "build", + "root-depending-root" + ], + "command": "echo member-test" + } + } +} diff --git a/tests/specs/task/dependencies_shadowed_root_name/member_depending_root_and_member.out b/tests/specs/task/dependencies_shadowed_root_name/member_depending_root_and_member.out new file mode 100644 index 00000000000000..3b6fd0e0a440f0 --- /dev/null +++ b/tests/specs/task/dependencies_shadowed_root_name/member_depending_root_and_member.out @@ -0,0 +1,10 @@ +[UNORDERED_START] +Task build echo member +member +Task build echo root +root +Task root-depending-root echo test +test +[UNORDERED_END] +Task member-dependending-root-and-member echo member-test +member-test diff --git a/tests/specs/task/dependencies_shadowed_root_name/root_dependending_root.out b/tests/specs/task/dependencies_shadowed_root_name/root_dependending_root.out new file mode 100644 index 00000000000000..2b8d9d5efebf22 --- /dev/null +++ b/tests/specs/task/dependencies_shadowed_root_name/root_dependending_root.out @@ -0,0 +1,4 @@ +Task build echo root +root +Task root-depending-root echo test +test diff --git a/tests/specs/task/description/deno.json b/tests/specs/task/description/deno.json index a86b7a5dcb3bda..028ae8621065a2 100644 --- a/tests/specs/task/description/deno.json +++ b/tests/specs/task/description/deno.json @@ -3,6 +3,14 @@ "echo_emoji": { "description": "This is some task", "command": "echo 1" + }, + "multiline_description": { + "description": "This is a multiline\ndescription", + "command": "echo 2" + }, + "multiline_description_carriage_return": { + "description": "This is a multiline\r\ndescription\r\n", + "command": "echo 3" } } } diff --git a/tests/specs/task/description/main.out b/tests/specs/task/description/main.out index ed28506567d03e..edc7535f2cd97a 100644 --- a/tests/specs/task/description/main.out +++ b/tests/specs/task/description/main.out @@ -2,3 +2,11 @@ Available tasks: - echo_emoji // This is some task echo 1 +- multiline_description + // This is a multiline + // description + echo 2 +- multiline_description_carriage_return + // This is a multiline + // description + echo 3 diff --git a/tests/specs/task/eval/__test__.jsonc b/tests/specs/task/eval/__test__.jsonc new file mode 100644 index 00000000000000..394db3052a04f1 --- /dev/null +++ b/tests/specs/task/eval/__test__.jsonc @@ -0,0 +1,35 @@ +{ + "tests": { + "no_arg": { + "args": "task --eval", + "output": "no_arg.out", + "exitCode": 1 + }, + "echo_pwd": { + "args": ["task", "--eval", "echo $(pwd)"], + "output": "echo_pwd.out" + }, + "piped": { + "args": [ + "task", + "--eval", + "echo 12345 | (deno eval 'const b = new Uint8Array(1);Deno.stdin.readSync(b);console.log(b)' && deno eval 'const b = new Uint8Array(1);Deno.stdin.readSync(b);console.log(b)')" + ], + "output": "piped.out" + }, + "node_modules_bin": { + "tempDir": true, + "steps": [{ + "args": "install", + "output": "[WILDCARD]Initialize @denotest/bin[WILDCARD]" + }, { + "args": [ + "task", + "--eval", + "cli-esm hi hello" + ], + "output": "bin.out" + }] + } + } +} diff --git a/tests/specs/task/eval/bin.out b/tests/specs/task/eval/bin.out new file mode 100644 index 00000000000000..7663216bf79ee8 --- /dev/null +++ b/tests/specs/task/eval/bin.out @@ -0,0 +1,3 @@ +Task cli-esm hi hello +hi +hello diff --git a/tests/specs/task/eval/echo_pwd.out b/tests/specs/task/eval/echo_pwd.out new file mode 100644 index 00000000000000..f0c53d8b49d5d3 --- /dev/null +++ b/tests/specs/task/eval/echo_pwd.out @@ -0,0 +1,2 @@ +Task echo $(pwd) +[WILDCARD] diff --git a/tests/specs/task/eval/no_arg.out b/tests/specs/task/eval/no_arg.out new file mode 100644 index 00000000000000..e46285576246d0 --- /dev/null +++ b/tests/specs/task/eval/no_arg.out @@ -0,0 +1,4 @@ +error: [TASK] must be specified when using --eval + +Usage: deno task [OPTIONS] [TASK] + diff --git a/tests/specs/task/eval/package.json b/tests/specs/task/eval/package.json new file mode 100644 index 00000000000000..c0a34548f57001 --- /dev/null +++ b/tests/specs/task/eval/package.json @@ -0,0 +1,9 @@ +{ + "name": "bin_package", + "devDependencies": { + "@denotest/bin": "1.0.0" + }, + "scripts": { + "sayhi": "cli-esm hi hello" + } +} diff --git a/tests/specs/task/eval/piped.out b/tests/specs/task/eval/piped.out new file mode 100644 index 00000000000000..64ccd7ab72e8f5 --- /dev/null +++ b/tests/specs/task/eval/piped.out @@ -0,0 +1,3 @@ +Task echo 12345 | (deno eval 'const b = new Uint8Array(1);Deno.stdin.readSync(b);console.log(b)' && deno eval 'const b = new Uint8Array(1);Deno.stdin.readSync(b);console.log(b)') +Uint8Array(1) [ 49 ] +Uint8Array(1) [ 50 ] diff --git a/tests/specs/task/filter/__test__.jsonc b/tests/specs/task/filter/__test__.jsonc new file mode 100644 index 00000000000000..10e2e8f6db9b77 --- /dev/null +++ b/tests/specs/task/filter/__test__.jsonc @@ -0,0 +1,109 @@ +{ + "tests": { + "npm_all": { + "cwd": "./npm", + "args": "task --filter * dev", + "output": "npm_all.out" + }, + "npm_exact": { + "cwd": "./npm", + "args": "task --filter foo dev", + "output": "npm_exact.out" + }, + "npm_multi": { + "cwd": "./npm_multi", + "args": "task --filter multi-* dev", + "output": "npm_multi.out" + }, + "npm_scoped_exact": { + "cwd": "./npm_scoped", + "args": "task --filter @foo/bar dev", + "output": "npm_scoped_exact.out" + }, + "npm_scoped_multi": { + "cwd": "./npm_scoped", + "args": "task --filter @foo/* dev", + "output": "npm_scoped_multi.out" + }, + "npm_workspace_order": { + "cwd": "./npm_workspace_order", + "args": "task --filter @foo/* dev", + "output": "npm_workspace_order.out" + }, + "npm_filter_no_match_no_task": { + "cwd": "./npm", + "args": "task --filter @asdf", + "output": "npm_filter_no_match_no_task.out" + }, + "npm_filter_no_task": { + "cwd": "./npm", + "args": "task --filter *", + "output": "npm_filter_no_task.out" + }, + "npm_recursive": { + "cwd": "./npm", + "args": "task -r dev", + "output": "npm_recursive.out" + }, + "npm_recursive_no_pkg": { + "cwd": "./npm_recursive_no_pkg", + "args": "task -r dev", + "output": "npm_recursive_no_pkg.out" + }, + "npm_filter_recursive": { + "cwd": "./npm", + "args": "task -r --filter foo dev", + "output": "npm_filter_recursive.out" + }, + "deno_all": { + "cwd": "./deno", + "args": "task --filter * dev", + "output": "deno_all.out" + }, + "deno_exact": { + "cwd": "./deno", + "args": "task --filter foo dev", + "output": "deno_exact.out" + }, + "deno_scoped_exact": { + "cwd": "./deno_scoped", + "args": "task --filter @foo/bar dev", + "output": "deno_scoped_exact.out" + }, + "deno_scoped_multi": { + "cwd": "./deno_scoped", + "args": "task --filter @foo/* dev", + "output": "deno_scoped_multi.out" + }, + "deno_workspace_order": { + "cwd": "./deno_workspace_order", + "args": "task --filter @foo/* dev", + "output": "deno_workspace_order.out" + }, + "deno_filter_no_match_no_task": { + "cwd": "./deno", + "args": "task --filter @asdf", + "output": "deno_filter_no_match_no_task.out" + }, + "deno_filter_no_task": { + "cwd": "./deno", + "args": "task --filter *", + "output": "deno_filter_no_task.out" + }, + "deno_recursive": { + "cwd": "./deno", + "args": "task -r dev", + "output": "deno_recursive.out" + }, + "deno_recursive_no_pkg": { + "cwd": "./deno_recursive_no_pkg", + "args": "task -r dev", + "output": "deno_recursive_no_pkg.out" + }, + "deno_filter_recursive": { + "cwd": "./deno", + "args": "task -r --filter @deno/foo dev", + "output": "deno_filter_recursive.out" + } + } +} diff --git a/tests/specs/task/filter/deno/bar/deno.json b/tests/specs/task/filter/deno/bar/deno.json new file mode 100644 index 00000000000000..9bc7d54233bb1c --- /dev/null +++ b/tests/specs/task/filter/deno/bar/deno.json @@ -0,0 +1,7 @@ +{ + "name": "@deno/bar", + "tasks": { + "dev": "echo '@deno/bar'" + }, + "exports": {} +} diff --git a/tests/specs/task/filter/deno/deno.json b/tests/specs/task/filter/deno/deno.json new file mode 100644 index 00000000000000..133ab666b4abd5 --- /dev/null +++ b/tests/specs/task/filter/deno/deno.json @@ -0,0 +1,6 @@ +{ + "workspace": [ + "./foo", + "./bar" + ] +} diff --git a/tests/specs/task/filter/deno/foo/deno.json b/tests/specs/task/filter/deno/foo/deno.json new file mode 100644 index 00000000000000..6efb2125b7447f --- /dev/null +++ b/tests/specs/task/filter/deno/foo/deno.json @@ -0,0 +1,7 @@ +{ + "name": "@deno/foo", + "tasks": { + "dev": "echo '@deno/foo'" + }, + "exports": {} +} diff --git a/tests/specs/task/filter/deno_all.out b/tests/specs/task/filter/deno_all.out new file mode 100644 index 00000000000000..c3c34415597c3a --- /dev/null +++ b/tests/specs/task/filter/deno_all.out @@ -0,0 +1,4 @@ +Task dev echo '@deno/bar' +@deno/bar +Task dev echo '@deno/foo' +@deno/foo diff --git a/tests/specs/task/filter/deno_exact.out b/tests/specs/task/filter/deno_exact.out new file mode 100644 index 00000000000000..4bfebd6e929077 --- /dev/null +++ b/tests/specs/task/filter/deno_exact.out @@ -0,0 +1,2 @@ +Task dev echo '@deno/foo' +@deno/foo diff --git a/tests/specs/task/filter/deno_filter_no_match_no_task.out b/tests/specs/task/filter/deno_filter_no_match_no_task.out new file mode 100644 index 00000000000000..b2cf6371b0a267 --- /dev/null +++ b/tests/specs/task/filter/deno_filter_no_match_no_task.out @@ -0,0 +1 @@ +No package name matched the filter '@asdf' in available 'deno.json' or 'package.json' files. diff --git a/tests/specs/task/filter/deno_filter_no_task.out b/tests/specs/task/filter/deno_filter_no_task.out new file mode 100644 index 00000000000000..b24b6641e9e0d0 --- /dev/null +++ b/tests/specs/task/filter/deno_filter_no_task.out @@ -0,0 +1,6 @@ +Available tasks (@deno/bar): +- dev + echo '@deno/bar' +Available tasks (@deno/foo): +- dev + echo '@deno/foo' diff --git a/tests/specs/task/filter/deno_filter_recursive.out b/tests/specs/task/filter/deno_filter_recursive.out new file mode 100644 index 00000000000000..4bfebd6e929077 --- /dev/null +++ b/tests/specs/task/filter/deno_filter_recursive.out @@ -0,0 +1,2 @@ +Task dev echo '@deno/foo' +@deno/foo diff --git a/tests/specs/task/filter/deno_recursive.out b/tests/specs/task/filter/deno_recursive.out new file mode 100644 index 00000000000000..c3c34415597c3a --- /dev/null +++ b/tests/specs/task/filter/deno_recursive.out @@ -0,0 +1,4 @@ +Task dev echo '@deno/bar' +@deno/bar +Task dev echo '@deno/foo' +@deno/foo diff --git a/tests/specs/task/filter/deno_recursive_no_pkg.out b/tests/specs/task/filter/deno_recursive_no_pkg.out new file mode 100644 index 00000000000000..592d4640cd1e25 --- /dev/null +++ b/tests/specs/task/filter/deno_recursive_no_pkg.out @@ -0,0 +1,4 @@ +Task dev echo 'bar' +bar +Task dev echo 'foo' +foo diff --git a/tests/specs/task/filter/deno_recursive_no_pkg/bar/deno.json b/tests/specs/task/filter/deno_recursive_no_pkg/bar/deno.json new file mode 100644 index 00000000000000..6a93295d979b2d --- /dev/null +++ b/tests/specs/task/filter/deno_recursive_no_pkg/bar/deno.json @@ -0,0 +1,5 @@ +{ + "tasks": { + "dev": "echo 'bar'" + } +} diff --git a/tests/specs/task/filter/deno_recursive_no_pkg/deno.json b/tests/specs/task/filter/deno_recursive_no_pkg/deno.json new file mode 100644 index 00000000000000..133ab666b4abd5 --- /dev/null +++ b/tests/specs/task/filter/deno_recursive_no_pkg/deno.json @@ -0,0 +1,6 @@ +{ + "workspace": [ + "./foo", + "./bar" + ] +} diff --git a/tests/specs/task/filter/deno_recursive_no_pkg/foo/deno.json b/tests/specs/task/filter/deno_recursive_no_pkg/foo/deno.json new file mode 100644 index 00000000000000..64a4cbccf01048 --- /dev/null +++ b/tests/specs/task/filter/deno_recursive_no_pkg/foo/deno.json @@ -0,0 +1,5 @@ +{ + "tasks": { + "dev": "echo 'foo'" + } +} diff --git a/tests/specs/task/filter/deno_scoped/deno.json b/tests/specs/task/filter/deno_scoped/deno.json new file mode 100644 index 00000000000000..7a26f9ca68dbb5 --- /dev/null +++ b/tests/specs/task/filter/deno_scoped/deno.json @@ -0,0 +1,3 @@ +{ + "workspace": ["./foo_bar", "./foo_baz"] +} diff --git a/tests/specs/task/filter/deno_scoped/foo_bar/deno.json b/tests/specs/task/filter/deno_scoped/foo_bar/deno.json new file mode 100644 index 00000000000000..1773d76c260307 --- /dev/null +++ b/tests/specs/task/filter/deno_scoped/foo_bar/deno.json @@ -0,0 +1,7 @@ +{ + "name": "@foo/bar", + "exports": {}, + "tasks": { + "dev": "echo '@foo/bar'" + } +} diff --git a/tests/specs/task/filter/deno_scoped/foo_baz/deno.json b/tests/specs/task/filter/deno_scoped/foo_baz/deno.json new file mode 100644 index 00000000000000..f3e59719e50c66 --- /dev/null +++ b/tests/specs/task/filter/deno_scoped/foo_baz/deno.json @@ -0,0 +1,7 @@ +{ + "name": "@foo/baz", + "exports": {}, + "tasks": { + "dev": "echo '@foo/baz'" + } +} diff --git a/tests/specs/task/filter/deno_scoped_exact.out b/tests/specs/task/filter/deno_scoped_exact.out new file mode 100644 index 00000000000000..f7d61e87149d5b --- /dev/null +++ b/tests/specs/task/filter/deno_scoped_exact.out @@ -0,0 +1,2 @@ +Task dev echo '@foo/bar' +@foo/bar diff --git a/tests/specs/task/filter/deno_scoped_multi.out b/tests/specs/task/filter/deno_scoped_multi.out new file mode 100644 index 00000000000000..f4609e94b6aef7 --- /dev/null +++ b/tests/specs/task/filter/deno_scoped_multi.out @@ -0,0 +1,4 @@ +Task dev echo '@foo/bar' +@foo/bar +Task dev echo '@foo/baz' +@foo/baz diff --git a/tests/specs/task/filter/deno_workspace_order.out b/tests/specs/task/filter/deno_workspace_order.out new file mode 100644 index 00000000000000..f4609e94b6aef7 --- /dev/null +++ b/tests/specs/task/filter/deno_workspace_order.out @@ -0,0 +1,4 @@ +Task dev echo '@foo/bar' +@foo/bar +Task dev echo '@foo/baz' +@foo/baz diff --git a/tests/specs/task/filter/deno_workspace_order/deno.json b/tests/specs/task/filter/deno_workspace_order/deno.json new file mode 100644 index 00000000000000..cd73d72b22a353 --- /dev/null +++ b/tests/specs/task/filter/deno_workspace_order/deno.json @@ -0,0 +1,6 @@ +{ + "workspace": [ + "./foo_bar", + "./foo_baz" + ] +} diff --git a/tests/specs/task/filter/deno_workspace_order/foo_bar/deno.json b/tests/specs/task/filter/deno_workspace_order/foo_bar/deno.json new file mode 100644 index 00000000000000..5be2ceac7f9a42 --- /dev/null +++ b/tests/specs/task/filter/deno_workspace_order/foo_bar/deno.json @@ -0,0 +1,7 @@ +{ + "name": "@foo/bar", + "tasks": { + "dev": "echo '@foo/bar'" + }, + "exports": {} +} diff --git a/tests/specs/task/filter/deno_workspace_order/foo_baz/deno.json b/tests/specs/task/filter/deno_workspace_order/foo_baz/deno.json new file mode 100644 index 00000000000000..083cea5bf00895 --- /dev/null +++ b/tests/specs/task/filter/deno_workspace_order/foo_baz/deno.json @@ -0,0 +1,10 @@ +{ + "name": "@foo/baz", + "tasks": { + "dev": "echo '@foo/baz'" + }, + "imports": { + "@foo/bar": "jsr:@foo/bar" + }, + "exports": {} +} diff --git a/tests/specs/task/filter/npm/bar/package.json b/tests/specs/task/filter/npm/bar/package.json new file mode 100644 index 00000000000000..3723db6f01daff --- /dev/null +++ b/tests/specs/task/filter/npm/bar/package.json @@ -0,0 +1,6 @@ +{ + "name": "bar", + "scripts": { + "dev": "echo 'bar'" + } +} diff --git a/tests/specs/task/filter/npm/foo/package.json b/tests/specs/task/filter/npm/foo/package.json new file mode 100644 index 00000000000000..86fa20d1118966 --- /dev/null +++ b/tests/specs/task/filter/npm/foo/package.json @@ -0,0 +1,6 @@ +{ + "name": "foo", + "scripts": { + "dev": "echo 'foo'" + } +} diff --git a/tests/specs/task/filter/npm/package.json b/tests/specs/task/filter/npm/package.json new file mode 100644 index 00000000000000..2d70009f2ca46b --- /dev/null +++ b/tests/specs/task/filter/npm/package.json @@ -0,0 +1,3 @@ +{ + "workspaces": ["./foo", "./bar"] +} diff --git a/tests/specs/task/filter/npm_all.out b/tests/specs/task/filter/npm_all.out new file mode 100644 index 00000000000000..592d4640cd1e25 --- /dev/null +++ b/tests/specs/task/filter/npm_all.out @@ -0,0 +1,4 @@ +Task dev echo 'bar' +bar +Task dev echo 'foo' +foo diff --git a/tests/specs/task/filter/npm_exact.out b/tests/specs/task/filter/npm_exact.out new file mode 100644 index 00000000000000..f879b66df86830 --- /dev/null +++ b/tests/specs/task/filter/npm_exact.out @@ -0,0 +1,2 @@ +Task dev echo 'foo' +foo diff --git a/tests/specs/task/filter/npm_filter_no_match_no_task.out b/tests/specs/task/filter/npm_filter_no_match_no_task.out new file mode 100644 index 00000000000000..b2cf6371b0a267 --- /dev/null +++ b/tests/specs/task/filter/npm_filter_no_match_no_task.out @@ -0,0 +1 @@ +No package name matched the filter '@asdf' in available 'deno.json' or 'package.json' files. diff --git a/tests/specs/task/filter/npm_filter_no_task.out b/tests/specs/task/filter/npm_filter_no_task.out new file mode 100644 index 00000000000000..7863c0f9d6643f --- /dev/null +++ b/tests/specs/task/filter/npm_filter_no_task.out @@ -0,0 +1,6 @@ +Available tasks (bar): +- dev (package.json) + echo 'bar' +Available tasks (foo): +- dev (package.json) + echo 'foo' diff --git a/tests/specs/task/filter/npm_filter_recursive.out b/tests/specs/task/filter/npm_filter_recursive.out new file mode 100644 index 00000000000000..f879b66df86830 --- /dev/null +++ b/tests/specs/task/filter/npm_filter_recursive.out @@ -0,0 +1,2 @@ +Task dev echo 'foo' +foo diff --git a/tests/specs/task/filter/npm_multi.out b/tests/specs/task/filter/npm_multi.out new file mode 100644 index 00000000000000..58898a59650190 --- /dev/null +++ b/tests/specs/task/filter/npm_multi.out @@ -0,0 +1,4 @@ +Task dev echo 'multi-a' +multi-a +Task dev echo 'multi-b' +multi-b diff --git a/tests/specs/task/filter/npm_multi/multi-a/package.json b/tests/specs/task/filter/npm_multi/multi-a/package.json new file mode 100644 index 00000000000000..348d7273ff074a --- /dev/null +++ b/tests/specs/task/filter/npm_multi/multi-a/package.json @@ -0,0 +1,6 @@ +{ + "name": "multi-a", + "scripts": { + "dev": "echo 'multi-a'" + } +} diff --git a/tests/specs/task/filter/npm_multi/multi-b/package.json b/tests/specs/task/filter/npm_multi/multi-b/package.json new file mode 100644 index 00000000000000..f11006aea471c9 --- /dev/null +++ b/tests/specs/task/filter/npm_multi/multi-b/package.json @@ -0,0 +1,6 @@ +{ + "name": "multi-b", + "scripts": { + "dev": "echo 'multi-b'" + } +} diff --git a/tests/specs/task/filter/npm_multi/package.json b/tests/specs/task/filter/npm_multi/package.json new file mode 100644 index 00000000000000..b6000c04870f44 --- /dev/null +++ b/tests/specs/task/filter/npm_multi/package.json @@ -0,0 +1,3 @@ +{ + "workspaces": ["./multi-a", "./multi-b"] +} diff --git a/tests/specs/task/filter/npm_recursive.out b/tests/specs/task/filter/npm_recursive.out new file mode 100644 index 00000000000000..592d4640cd1e25 --- /dev/null +++ b/tests/specs/task/filter/npm_recursive.out @@ -0,0 +1,4 @@ +Task dev echo 'bar' +bar +Task dev echo 'foo' +foo diff --git a/tests/specs/task/filter/npm_recursive_no_pkg.out b/tests/specs/task/filter/npm_recursive_no_pkg.out new file mode 100644 index 00000000000000..592d4640cd1e25 --- /dev/null +++ b/tests/specs/task/filter/npm_recursive_no_pkg.out @@ -0,0 +1,4 @@ +Task dev echo 'bar' +bar +Task dev echo 'foo' +foo diff --git a/tests/specs/task/filter/npm_recursive_no_pkg/bar/package.json b/tests/specs/task/filter/npm_recursive_no_pkg/bar/package.json new file mode 100644 index 00000000000000..cc1907fab4d3d4 --- /dev/null +++ b/tests/specs/task/filter/npm_recursive_no_pkg/bar/package.json @@ -0,0 +1,5 @@ +{ + "scripts": { + "dev": "echo 'bar'" + } +} diff --git a/tests/specs/task/filter/npm_recursive_no_pkg/foo/package.json b/tests/specs/task/filter/npm_recursive_no_pkg/foo/package.json new file mode 100644 index 00000000000000..636dcd13bd3cbb --- /dev/null +++ b/tests/specs/task/filter/npm_recursive_no_pkg/foo/package.json @@ -0,0 +1,5 @@ +{ + "scripts": { + "dev": "echo 'foo'" + } +} diff --git a/tests/specs/task/filter/npm_recursive_no_pkg/package.json b/tests/specs/task/filter/npm_recursive_no_pkg/package.json new file mode 100644 index 00000000000000..2d70009f2ca46b --- /dev/null +++ b/tests/specs/task/filter/npm_recursive_no_pkg/package.json @@ -0,0 +1,3 @@ +{ + "workspaces": ["./foo", "./bar"] +} diff --git a/tests/specs/task/filter/npm_scoped/foo_bar/package.json b/tests/specs/task/filter/npm_scoped/foo_bar/package.json new file mode 100644 index 00000000000000..0e2c92c8beab5d --- /dev/null +++ b/tests/specs/task/filter/npm_scoped/foo_bar/package.json @@ -0,0 +1,6 @@ +{ + "name": "@foo/bar", + "scripts": { + "dev": "echo '@foo/bar'" + } +} diff --git a/tests/specs/task/filter/npm_scoped/foo_baz/package.json b/tests/specs/task/filter/npm_scoped/foo_baz/package.json new file mode 100644 index 00000000000000..77ec9209b19884 --- /dev/null +++ b/tests/specs/task/filter/npm_scoped/foo_baz/package.json @@ -0,0 +1,6 @@ +{ + "name": "@foo/baz", + "scripts": { + "dev": "echo '@foo/baz'" + } +} diff --git a/tests/specs/task/filter/npm_scoped/package.json b/tests/specs/task/filter/npm_scoped/package.json new file mode 100644 index 00000000000000..d02abfb3f84613 --- /dev/null +++ b/tests/specs/task/filter/npm_scoped/package.json @@ -0,0 +1,3 @@ +{ + "workspaces": ["./foo_bar", "./foo_baz"] +} diff --git a/tests/specs/task/filter/npm_scoped_exact.out b/tests/specs/task/filter/npm_scoped_exact.out new file mode 100644 index 00000000000000..f7d61e87149d5b --- /dev/null +++ b/tests/specs/task/filter/npm_scoped_exact.out @@ -0,0 +1,2 @@ +Task dev echo '@foo/bar' +@foo/bar diff --git a/tests/specs/task/filter/npm_scoped_multi.out b/tests/specs/task/filter/npm_scoped_multi.out new file mode 100644 index 00000000000000..f4609e94b6aef7 --- /dev/null +++ b/tests/specs/task/filter/npm_scoped_multi.out @@ -0,0 +1,4 @@ +Task dev echo '@foo/bar' +@foo/bar +Task dev echo '@foo/baz' +@foo/baz diff --git a/tests/specs/task/filter/npm_workspace_order.out b/tests/specs/task/filter/npm_workspace_order.out new file mode 100644 index 00000000000000..f4609e94b6aef7 --- /dev/null +++ b/tests/specs/task/filter/npm_workspace_order.out @@ -0,0 +1,4 @@ +Task dev echo '@foo/bar' +@foo/bar +Task dev echo '@foo/baz' +@foo/baz diff --git a/tests/specs/task/filter/npm_workspace_order/foo_bar/package.json b/tests/specs/task/filter/npm_workspace_order/foo_bar/package.json new file mode 100644 index 00000000000000..0e2c92c8beab5d --- /dev/null +++ b/tests/specs/task/filter/npm_workspace_order/foo_bar/package.json @@ -0,0 +1,6 @@ +{ + "name": "@foo/bar", + "scripts": { + "dev": "echo '@foo/bar'" + } +} diff --git a/tests/specs/task/filter/npm_workspace_order/foo_baz/package.json b/tests/specs/task/filter/npm_workspace_order/foo_baz/package.json new file mode 100644 index 00000000000000..79f4b4b793d5a3 --- /dev/null +++ b/tests/specs/task/filter/npm_workspace_order/foo_baz/package.json @@ -0,0 +1,9 @@ +{ + "name": "@foo/baz", + "scripts": { + "dev": "echo '@foo/baz'" + }, + "dependencies": { + "@foo/bar": "workspace:*" + } +} diff --git a/tests/specs/task/filter/npm_workspace_order/package.json b/tests/specs/task/filter/npm_workspace_order/package.json new file mode 100644 index 00000000000000..d02abfb3f84613 --- /dev/null +++ b/tests/specs/task/filter/npm_workspace_order/package.json @@ -0,0 +1,3 @@ +{ + "workspaces": ["./foo_bar", "./foo_baz"] +} diff --git a/tests/specs/task/kill_task_windows_kills_children/__test__.jsonc b/tests/specs/task/kill_task_windows_kills_children/__test__.jsonc new file mode 100644 index 00000000000000..f83d24e9aa6555 --- /dev/null +++ b/tests/specs/task/kill_task_windows_kills_children/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "if": "windows", + "args": "run --check -A main.ts", + "output": "[WILDCARD]" // just ensure no failure +} diff --git a/tests/specs/task/kill_task_windows_kills_children/deno.jsonc b/tests/specs/task/kill_task_windows_kills_children/deno.jsonc new file mode 100644 index 00000000000000..ee8102bed5b0b3 --- /dev/null +++ b/tests/specs/task/kill_task_windows_kills_children/deno.jsonc @@ -0,0 +1,5 @@ +{ + "tasks": { + "start": "deno run -A script.js" + } +} diff --git a/tests/specs/task/kill_task_windows_kills_children/main.ts b/tests/specs/task/kill_task_windows_kills_children/main.ts new file mode 100644 index 00000000000000..351a7db6a36cba --- /dev/null +++ b/tests/specs/task/kill_task_windows_kills_children/main.ts @@ -0,0 +1,75 @@ +class StdoutReader { + readonly #reader: ReadableStreamDefaultReader; + text = ""; + + constructor(stream: ReadableStream) { + const textStream = stream.pipeThrough(new TextDecoderStream()); + this.#reader = textStream.getReader(); + } + + [Symbol.dispose]() { + this.#reader.releaseLock(); + } + + async waitForText(waitingText: string) { + if (this.text.includes(waitingText)) { + return; + } + + while (true) { + const { value, done } = await this.#reader.read(); + if (value) { + this.text += value; + if (this.text.includes(waitingText)) { + break; + } + } + if (done) { + throw new Error("Did not find text: " + waitingText); + } + } + } +} + +const command = new Deno.Command("deno", { + args: ["task", "start"], + stdout: "piped", +}); + +const child = command.spawn(); + +const reader = new StdoutReader(child.stdout!); +console.log("Waiting..."); +await reader.waitForText("Ready"); +console.log("Received."); +const pid = parseInt(reader.text.split("\n")[0], 10); +console.log("PID", pid); +// ensure this function works +if (!isPidAlive(child.pid)) { + throw new Error("Unexpected."); +} +if (!isPidAlive(pid)) { + throw new Error("Unexpected."); +} +child.kill(); +// now the grandchild shouldn't be alive +if (isPidAlive(pid)) { + throw new Error("Unexpected."); +} + +function isPidAlive(pid: number) { + const command = new Deno.Command("cmd", { + args: ["/c", `wmic process where processid=${pid} get processid`], + }); + + try { + const { stdout } = command.outputSync(); // Execute the command + const output = new TextDecoder().decode(stdout); + + console.log("wmic output:", output.trim()); + return output.includes(pid.toString()); + } catch (error) { + console.error("Error checking PID:", error); + return false; + } +} diff --git a/tests/specs/task/kill_task_windows_kills_children/script.js b/tests/specs/task/kill_task_windows_kills_children/script.js new file mode 100644 index 00000000000000..1a98d7280e23eb --- /dev/null +++ b/tests/specs/task/kill_task_windows_kills_children/script.js @@ -0,0 +1,3 @@ +console.log(Deno.pid); +console.log("Ready"); +setInterval(() => {}, 10_000); // stay alive diff --git a/tests/specs/task/signals/__test__.jsonc b/tests/specs/task/signals/__test__.jsonc new file mode 100644 index 00000000000000..69801c46bfc6c8 --- /dev/null +++ b/tests/specs/task/signals/__test__.jsonc @@ -0,0 +1,8 @@ +{ + // signals don't really exist on windows + "if": "unix", + // this runs a deno task + "args": "run -A --check sender.ts", + // just ensure this doesn't hang and completes successfully + "output": "[WILDCARD]" +} diff --git a/tests/specs/task/signals/deno.jsonc b/tests/specs/task/signals/deno.jsonc new file mode 100644 index 00000000000000..18057558eee927 --- /dev/null +++ b/tests/specs/task/signals/deno.jsonc @@ -0,0 +1,5 @@ +{ + "tasks": { + "listener": "deno run listener.ts" + } +} diff --git a/tests/specs/task/signals/listener.ts b/tests/specs/task/signals/listener.ts new file mode 100644 index 00000000000000..e4f54c21172680 --- /dev/null +++ b/tests/specs/task/signals/listener.ts @@ -0,0 +1,16 @@ +import { signals } from "./signals.ts"; + +for (const signal of signals) { + Deno.addSignalListener(signal, () => { + console.log("Received", signal); + if (signal === "SIGTERM") { + Deno.exit(0); + } + }); +} + +setInterval(() => { + // keep alive +}, 1000); + +console.log("Ready"); diff --git a/tests/specs/task/signals/sender.ts b/tests/specs/task/signals/sender.ts new file mode 100644 index 00000000000000..70f4dd788dca78 --- /dev/null +++ b/tests/specs/task/signals/sender.ts @@ -0,0 +1,55 @@ +import { signals } from "./signals.ts"; + +class StdoutReader { + readonly #reader: ReadableStreamDefaultReader; + #text = ""; + + constructor(stream: ReadableStream) { + const textStream = stream.pipeThrough(new TextDecoderStream()); + this.#reader = textStream.getReader(); + } + + [Symbol.dispose]() { + this.#reader.releaseLock(); + } + + async waitForText(waitingText: string) { + if (this.#text.includes(waitingText)) { + return; + } + + while (true) { + const { value, done } = await this.#reader.read(); + if (value) { + this.#text += value; + if (this.#text.includes(waitingText)) { + break; + } + } + if (done) { + throw new Error("Did not find text: " + waitingText); + } + } + } +} + +const command = new Deno.Command(Deno.execPath(), { + args: ["task", "listener"], + stdout: "piped", +}); + +const child = command.spawn(); +const reader = new StdoutReader(child.stdout!); +await reader.waitForText("Ready"); + +for (const signal of signals) { + if (signal === "SIGTERM") { + continue; + } + console.error("Sending", signal); + child.kill(signal); + await reader.waitForText("Received " + signal); +} + +console.error("Sending SIGTERM"); +child.kill("SIGTERM"); diff --git a/tests/specs/task/signals/signals.ts b/tests/specs/task/signals/signals.ts new file mode 100644 index 00000000000000..dd05ee1d179f22 --- /dev/null +++ b/tests/specs/task/signals/signals.ts @@ -0,0 +1,65 @@ +const signals = [ + "SIGABRT", + "SIGALRM", + "SIGBUS", + "SIGCHLD", + "SIGCONT", + "SIGEMT", + "SIGFPE", + "SIGHUP", + "SIGILL", + "SIGINFO", + "SIGINT", + "SIGIO", + "SIGPOLL", + "SIGPIPE", + "SIGPROF", + "SIGPWR", + "SIGQUIT", + "SIGSEGV", + "SIGSTKFLT", + "SIGSYS", + "SIGTERM", + "SIGTRAP", + "SIGTSTP", + "SIGTTIN", + "SIGTTOU", + "SIGURG", + "SIGUSR1", + "SIGUSR2", + "SIGVTALRM", + "SIGWINCH", + "SIGXCPU", + "SIGXFSZ", +] as const; + +// SIGKILL and SIGSTOP are not stoppable, SIGBREAK is for windows, and SIGUNUSED is not defined +type SignalsToTest = Exclude< + Deno.Signal, + "SIGKILL" | "SIGSTOP" | "SIGBREAK" | "SIGUNUSED" +>; +type EnsureAllSignalsIncluded = SignalsToTest extends typeof signals[number] + ? typeof signals[number] extends SignalsToTest ? true + : never + : never; +const _checkSignals: EnsureAllSignalsIncluded = true; + +const osSpecificSignals = signals.filter((s) => { + switch (s) { + case "SIGEMT": + return Deno.build.os === "darwin"; + case "SIGINFO": + case "SIGFPE": + case "SIGILL": + case "SIGSEGV": + return Deno.build.os === "freebsd"; + case "SIGPOLL": + case "SIGPWR": + case "SIGSTKFLT": + return Deno.build.os === "linux"; + default: + return true; + } +}); + +export { osSpecificSignals as signals }; diff --git a/tests/specs/task/workspace_regex_match/__test__.jsonc b/tests/specs/task/workspace_regex_match/__test__.jsonc new file mode 100644 index 00000000000000..258c288d44b815 --- /dev/null +++ b/tests/specs/task/workspace_regex_match/__test__.jsonc @@ -0,0 +1,11 @@ +{ + "tempDir": true, + "tests": { + // Regression test for https://github.com/denoland/deno/issues/27370 + "root": { + "args": "task test-all", + "output": "root.out", + "exitCode": 0 + } + } +} diff --git a/tests/specs/task/workspace_regex_match/deno.json b/tests/specs/task/workspace_regex_match/deno.json new file mode 100644 index 00000000000000..ce040ba5ab95ce --- /dev/null +++ b/tests/specs/task/workspace_regex_match/deno.json @@ -0,0 +1,6 @@ +{ + "workspace": ["./subdir"], + "tasks": { + "test-all": "deno task --recursive test" + } +} diff --git a/tests/specs/task/workspace_regex_match/root.out b/tests/specs/task/workspace_regex_match/root.out new file mode 100644 index 00000000000000..9da724a5c05024 --- /dev/null +++ b/tests/specs/task/workspace_regex_match/root.out @@ -0,0 +1,3 @@ +Task test-all deno task --recursive test +Task test echo 'ok' +ok diff --git a/tests/specs/task/workspace_regex_match/subdir/deno.json b/tests/specs/task/workspace_regex_match/subdir/deno.json new file mode 100644 index 00000000000000..78d768e3968285 --- /dev/null +++ b/tests/specs/task/workspace_regex_match/subdir/deno.json @@ -0,0 +1,5 @@ +{ + "tasks": { + "test": "echo 'ok'" + } +} diff --git a/tests/specs/update/deno_json/__test__.jsonc b/tests/specs/update/deno_json/__test__.jsonc new file mode 100644 index 00000000000000..7983d2c56f98b9 --- /dev/null +++ b/tests/specs/update/deno_json/__test__.jsonc @@ -0,0 +1,116 @@ +{ + "tempDir": true, + "tests": { + // just to make sure install doesn't change the lockfile + "sanity_lockfile_up_to_date": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": [ + "eval", + "const now = Deno.readTextFileSync('./deno.lock'); console.log(now.trim());" + ], + "output": "deno.lock.orig.out" + } + ] + }, + "print_outdated": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "outdated", + "output": "outdated.out" + }, + { + // Filtering that matches nothing, should exit cleanly + "args": "outdated foobar", + "output": "" + }, + { + // Respect `--quiet flag and don't print hint how to update + "args": "outdated --quiet", + "output": "outdated_quiet.out" + } + ] + }, + "print_outdated_compatible": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "outdated --compatible", + "output": "outdated_compatible.out" + }, + { + // Filtering that matches nothing, should exit cleanly + "args": "outdated --compatible foobar", + "output": "" + } + ] + }, + "update_compatible": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "outdated --update", + "output": "./update_compatible/update.out" + }, + { + "args": "-A print_file.ts ./deno.json", + "output": "./update_compatible/deno.json.out" + }, + { + "args": "-A print_file.ts ./deno.lock", + "output": "./update_compatible/deno.lock.out" + } + ] + }, + "update_latest": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "outdated --update --latest", + "output": "update_latest/update.out" + }, + { + "args": "-A print_file.ts ./deno.json", + "output": "./update_latest/deno.json.out" + }, + { + "args": "-A print_file.ts ./deno.lock", + "output": "./update_latest/deno.lock.out" + } + ] + }, + "update_filtered": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "outdated --update --latest @denotest/add @denotest/b* !@denotest/breaking* @denotest/with-subpath@0.5.0", + "output": "filtered/update.out" + }, + { + "args": "-A print_file.ts ./deno.json", + "output": "filtered/deno.json.out" + } + ] + } + } +} diff --git a/tests/specs/update/deno_json/deno.json b/tests/specs/update/deno_json/deno.json new file mode 100644 index 00000000000000..4f880e6db9108d --- /dev/null +++ b/tests/specs/update/deno_json/deno.json @@ -0,0 +1,19 @@ +{ + "imports": { + "@denotest/add": "jsr:@denotest/add@^0.2.0", + "@denotest/add/": "jsr:/@denotest/add@^0.2.0/", + "@denotest/subtract": "jsr:@denotest/subtract@^0.2.0", + "@denotest/with-subpath": "jsr:@denotest/multiple-exports@0.2.0/data-json", + "@denotest/breaking-change-between-versions": "npm:@denotest/breaking-change-between-versions@1.0.0", + "@denotest/bin": "npm:@denotest/bin@0.6.0", + "@denotest/has-patch-versions": "npm:@denotest/has-patch-versions@^0.1.0" + }, + "scopes": { + "/foo/": { + "@denotest/add": "jsr:@denotest/add@^0.2.0", + "@denotest/add/": "jsr:/@denotest/add@^0.2.0/", + "@denotest/subtract": "jsr:@denotest/subtract@^0.2.0", + "@denotest/with-subpath": "jsr:@denotest/multiple-exports@0.2.0/data-json" + } + } +} diff --git a/tests/specs/update/deno_json/deno.lock b/tests/specs/update/deno_json/deno.lock new file mode 100644 index 00000000000000..7c4d5e36906fb7 --- /dev/null +++ b/tests/specs/update/deno_json/deno.lock @@ -0,0 +1,43 @@ +{ + "version": "4", + "specifiers": { + "jsr:@denotest/add@0.2": "0.2.0", + "jsr:@denotest/multiple-exports@0.2.0": "0.2.0", + "jsr:@denotest/subtract@0.2": "0.2.0", + "npm:@denotest/bin@0.6.0": "0.6.0", + "npm:@denotest/breaking-change-between-versions@1.0.0": "1.0.0", + "npm:@denotest/has-patch-versions@0.1": "0.1.0" + }, + "jsr": { + "@denotest/add@0.2.0": { + "integrity": "a9076d30ecb42b2fc6dd95e7055fbf4e6358b53f550741bd7f60089d19f68848" + }, + "@denotest/multiple-exports@0.2.0": { + "integrity": "efe9748a0c0939c7ac245fee04acc0c42bd7a61874ff71a360c4543e4f5f6b36" + }, + "@denotest/subtract@0.2.0": { + "integrity": "c9650fc559ab2430effc0c7fb1540e3aa89888fbdd926335ccfdeac57eb3a64d" + } + }, + "npm": { + "@denotest/bin@0.6.0": { + "integrity": "sha512-vCNpxFgQN4fw4ZOp63nbTX1ilcDqNpvXCvYyC8nmfxQQAezsEt095I/YXwMIoMGzWtjCvlMf9kVEYfLuT5oEGQ==" + }, + "@denotest/breaking-change-between-versions@1.0.0": { + "integrity": "sha512-bzMGYx+DxxPlI74n/VsDAN7Db1BY7Sz2XqxXruMo9dEznsBZu7Ez3i8YQ8n0leTxAiiMk1RCG4zQHPG1aj3xRw==" + }, + "@denotest/has-patch-versions@0.1.0": { + "integrity": "sha512-H/MBo0jKDdMsX4AAGEGQbZj70nfNe3oUNZXbohYHhqf9EfpLnXp/7FC29ZdfV4+p6VjEcOGdCtXc6rilE6iYpg==" + } + }, + "workspace": { + "dependencies": [ + "jsr:@denotest/add@0.2", + "jsr:@denotest/multiple-exports@0.2.0", + "jsr:@denotest/subtract@0.2", + "npm:@denotest/bin@0.6.0", + "npm:@denotest/breaking-change-between-versions@1.0.0", + "npm:@denotest/has-patch-versions@0.1" + ] + } +} diff --git a/tests/specs/update/deno_json/deno.lock.orig.out b/tests/specs/update/deno_json/deno.lock.orig.out new file mode 100644 index 00000000000000..7c4d5e36906fb7 --- /dev/null +++ b/tests/specs/update/deno_json/deno.lock.orig.out @@ -0,0 +1,43 @@ +{ + "version": "4", + "specifiers": { + "jsr:@denotest/add@0.2": "0.2.0", + "jsr:@denotest/multiple-exports@0.2.0": "0.2.0", + "jsr:@denotest/subtract@0.2": "0.2.0", + "npm:@denotest/bin@0.6.0": "0.6.0", + "npm:@denotest/breaking-change-between-versions@1.0.0": "1.0.0", + "npm:@denotest/has-patch-versions@0.1": "0.1.0" + }, + "jsr": { + "@denotest/add@0.2.0": { + "integrity": "a9076d30ecb42b2fc6dd95e7055fbf4e6358b53f550741bd7f60089d19f68848" + }, + "@denotest/multiple-exports@0.2.0": { + "integrity": "efe9748a0c0939c7ac245fee04acc0c42bd7a61874ff71a360c4543e4f5f6b36" + }, + "@denotest/subtract@0.2.0": { + "integrity": "c9650fc559ab2430effc0c7fb1540e3aa89888fbdd926335ccfdeac57eb3a64d" + } + }, + "npm": { + "@denotest/bin@0.6.0": { + "integrity": "sha512-vCNpxFgQN4fw4ZOp63nbTX1ilcDqNpvXCvYyC8nmfxQQAezsEt095I/YXwMIoMGzWtjCvlMf9kVEYfLuT5oEGQ==" + }, + "@denotest/breaking-change-between-versions@1.0.0": { + "integrity": "sha512-bzMGYx+DxxPlI74n/VsDAN7Db1BY7Sz2XqxXruMo9dEznsBZu7Ez3i8YQ8n0leTxAiiMk1RCG4zQHPG1aj3xRw==" + }, + "@denotest/has-patch-versions@0.1.0": { + "integrity": "sha512-H/MBo0jKDdMsX4AAGEGQbZj70nfNe3oUNZXbohYHhqf9EfpLnXp/7FC29ZdfV4+p6VjEcOGdCtXc6rilE6iYpg==" + } + }, + "workspace": { + "dependencies": [ + "jsr:@denotest/add@0.2", + "jsr:@denotest/multiple-exports@0.2.0", + "jsr:@denotest/subtract@0.2", + "npm:@denotest/bin@0.6.0", + "npm:@denotest/breaking-change-between-versions@1.0.0", + "npm:@denotest/has-patch-versions@0.1" + ] + } +} diff --git a/tests/specs/update/deno_json/filtered/deno.json.out b/tests/specs/update/deno_json/filtered/deno.json.out new file mode 100644 index 00000000000000..4458e2d037b92b --- /dev/null +++ b/tests/specs/update/deno_json/filtered/deno.json.out @@ -0,0 +1,19 @@ +{ + "imports": { + "@denotest/add": "jsr:@denotest/add@^1.0.0", + "@denotest/add/": "jsr:/@denotest/add@^1.0.0/", + "@denotest/subtract": "jsr:@denotest/subtract@^0.2.0", + "@denotest/with-subpath": "jsr:@denotest/multiple-exports@0.5.0/data-json", + "@denotest/breaking-change-between-versions": "npm:@denotest/breaking-change-between-versions@1.0.0", + "@denotest/bin": "npm:@denotest/bin@^1.0.0", + "@denotest/has-patch-versions": "npm:@denotest/has-patch-versions@^0.1.0" + }, + "scopes": { + "/foo/": { + "@denotest/add": "jsr:@denotest/add@^1.0.0", + "@denotest/add/": "jsr:/@denotest/add@^1.0.0/", + "@denotest/subtract": "jsr:@denotest/subtract@^0.2.0", + "@denotest/with-subpath": "jsr:@denotest/multiple-exports@0.5.0/data-json" + } + } +} diff --git a/tests/specs/update/deno_json/filtered/update.out b/tests/specs/update/deno_json/filtered/update.out new file mode 100644 index 00000000000000..ce16c6f6b710f7 --- /dev/null +++ b/tests/specs/update/deno_json/filtered/update.out @@ -0,0 +1,10 @@ +[UNORDERED_START] +Download http://localhost:4260/@denotest/bin/1.0.0.tgz +Download http://127.0.0.1:4250/@denotest/multiple-exports/0.5.0_meta.json +Download http://127.0.0.1:4250/@denotest/multiple-exports/0.5.0/data.json +Download http://127.0.0.1:4250/@denotest/add/1.0.0/mod.ts +[UNORDERED_END] +Updated 3 dependencies: + - jsr:@denotest/add 0.2.0 -> 1.0.0 + - jsr:@denotest/multiple-exports 0.2.0 -> 0.5.0 + - npm:@denotest/bin 0.6.0 -> 1.0.0 diff --git a/tests/specs/update/deno_json/outdated.out b/tests/specs/update/deno_json/outdated.out new file mode 100644 index 00000000000000..dd86ed8e87f39e --- /dev/null +++ b/tests/specs/update/deno_json/outdated.out @@ -0,0 +1,18 @@ +┌────────────────────────────────────────────────┬─────────┬────────┬────────┐ +│ Package │ Current │ Update │ Latest │ +├────────────────────────────────────────────────┼─────────┼────────┼────────┤ +│ jsr:@denotest/multiple-exports │ 0.2.0 │ 0.2.0 │ 1.0.0 │ +├────────────────────────────────────────────────┼─────────┼────────┼────────┤ +│ jsr:@denotest/subtract │ 0.2.0 │ 0.2.0 │ 1.0.0 │ +├────────────────────────────────────────────────┼─────────┼────────┼────────┤ +│ jsr:@denotest/add │ 0.2.0 │ 0.2.1 │ 1.0.0 │ +├────────────────────────────────────────────────┼─────────┼────────┼────────┤ +│ npm:@denotest/has-patch-versions │ 0.1.0 │ 0.1.1 │ 0.2.0 │ +├────────────────────────────────────────────────┼─────────┼────────┼────────┤ +│ npm:@denotest/bin │ 0.6.0 │ 0.6.0 │ 1.0.0 │ +├────────────────────────────────────────────────┼─────────┼────────┼────────┤ +│ npm:@denotest/breaking-change-between-versions │ 1.0.0 │ 1.0.0 │ 2.0.0 │ +└────────────────────────────────────────────────┴─────────┴────────┴────────┘ + +Run deno outdated --update --latest to update to the latest available versions, +or deno outdated --help for more information. diff --git a/tests/specs/update/deno_json/outdated_compatible.out b/tests/specs/update/deno_json/outdated_compatible.out new file mode 100644 index 00000000000000..8b67e0750edf67 --- /dev/null +++ b/tests/specs/update/deno_json/outdated_compatible.out @@ -0,0 +1,10 @@ +┌──────────────────────────────────┬─────────┬────────┬────────┐ +│ Package │ Current │ Update │ Latest │ +├──────────────────────────────────┼─────────┼────────┼────────┤ +│ jsr:@denotest/add │ 0.2.0 │ 0.2.1 │ 1.0.0 │ +├──────────────────────────────────┼─────────┼────────┼────────┤ +│ npm:@denotest/has-patch-versions │ 0.1.0 │ 0.1.1 │ 0.2.0 │ +└──────────────────────────────────┴─────────┴────────┴────────┘ + +Run deno outdated --update to update to the latest compatible versions, +or deno outdated --help for more information. diff --git a/tests/specs/update/deno_json/outdated_quiet.out b/tests/specs/update/deno_json/outdated_quiet.out new file mode 100644 index 00000000000000..07ff9f3416a8f1 --- /dev/null +++ b/tests/specs/update/deno_json/outdated_quiet.out @@ -0,0 +1,15 @@ +┌────────────────────────────────────────────────┬─────────┬────────┬────────┐ +│ Package │ Current │ Update │ Latest │ +├────────────────────────────────────────────────┼─────────┼────────┼────────┤ +│ jsr:@denotest/multiple-exports │ 0.2.0 │ 0.2.0 │ 1.0.0 │ +├────────────────────────────────────────────────┼─────────┼────────┼────────┤ +│ jsr:@denotest/subtract │ 0.2.0 │ 0.2.0 │ 1.0.0 │ +├────────────────────────────────────────────────┼─────────┼────────┼────────┤ +│ jsr:@denotest/add │ 0.2.0 │ 0.2.1 │ 1.0.0 │ +├────────────────────────────────────────────────┼─────────┼────────┼────────┤ +│ npm:@denotest/has-patch-versions │ 0.1.0 │ 0.1.1 │ 0.2.0 │ +├────────────────────────────────────────────────┼─────────┼────────┼────────┤ +│ npm:@denotest/bin │ 0.6.0 │ 0.6.0 │ 1.0.0 │ +├────────────────────────────────────────────────┼─────────┼────────┼────────┤ +│ npm:@denotest/breaking-change-between-versions │ 1.0.0 │ 1.0.0 │ 2.0.0 │ +└────────────────────────────────────────────────┴─────────┴────────┴────────┘ diff --git a/tests/specs/update/deno_json/print_file.ts b/tests/specs/update/deno_json/print_file.ts new file mode 100644 index 00000000000000..c57b6c3a4e56f3 --- /dev/null +++ b/tests/specs/update/deno_json/print_file.ts @@ -0,0 +1,2 @@ +const file = Deno.args[0]; +console.log(Deno.readTextFileSync(file).trim()); diff --git a/tests/specs/update/deno_json/update_compatible/deno.json.out b/tests/specs/update/deno_json/update_compatible/deno.json.out new file mode 100644 index 00000000000000..e453eff3c9c566 --- /dev/null +++ b/tests/specs/update/deno_json/update_compatible/deno.json.out @@ -0,0 +1,19 @@ +{ + "imports": { + "@denotest/add": "jsr:@denotest/add@^0.2.1", + "@denotest/add/": "jsr:/@denotest/add@^0.2.1/", + "@denotest/subtract": "jsr:@denotest/subtract@^0.2.0", + "@denotest/with-subpath": "jsr:@denotest/multiple-exports@0.2.0/data-json", + "@denotest/breaking-change-between-versions": "npm:@denotest/breaking-change-between-versions@1.0.0", + "@denotest/bin": "npm:@denotest/bin@0.6.0", + "@denotest/has-patch-versions": "npm:@denotest/has-patch-versions@^0.1.1" + }, + "scopes": { + "/foo/": { + "@denotest/add": "jsr:@denotest/add@^0.2.1", + "@denotest/add/": "jsr:/@denotest/add@^0.2.1/", + "@denotest/subtract": "jsr:@denotest/subtract@^0.2.0", + "@denotest/with-subpath": "jsr:@denotest/multiple-exports@0.2.0/data-json" + } + } +} diff --git a/tests/specs/update/deno_json/update_compatible/deno.lock.out b/tests/specs/update/deno_json/update_compatible/deno.lock.out new file mode 100644 index 00000000000000..994d6f7ac9c992 --- /dev/null +++ b/tests/specs/update/deno_json/update_compatible/deno.lock.out @@ -0,0 +1,43 @@ +{ + "version": "4", + "specifiers": { + "jsr:@denotest/add@~0.2.1": "0.2.1", + "jsr:@denotest/multiple-exports@0.2.0": "0.2.0", + "jsr:@denotest/subtract@0.2": "0.2.0", + "npm:@denotest/bin@0.6.0": "0.6.0", + "npm:@denotest/breaking-change-between-versions@1.0.0": "1.0.0", + "npm:@denotest/has-patch-versions@~0.1.1": "0.1.1" + }, + "jsr": { + "@denotest/add@0.2.1": { + "integrity": "a9076d30ecb42b2fc6dd95e7055fbf4e6358b53f550741bd7f60089d19f68848" + }, + "@denotest/multiple-exports@0.2.0": { + "integrity": "efe9748a0c0939c7ac245fee04acc0c42bd7a61874ff71a360c4543e4f5f6b36" + }, + "@denotest/subtract@0.2.0": { + "integrity": "c9650fc559ab2430effc0c7fb1540e3aa89888fbdd926335ccfdeac57eb3a64d" + } + }, + "npm": { + "@denotest/bin@0.6.0": { + "integrity": "sha512-vCNpxFgQN4fw4ZOp63nbTX1ilcDqNpvXCvYyC8nmfxQQAezsEt095I/YXwMIoMGzWtjCvlMf9kVEYfLuT5oEGQ==" + }, + "@denotest/breaking-change-between-versions@1.0.0": { + "integrity": "sha512-bzMGYx+DxxPlI74n/VsDAN7Db1BY7Sz2XqxXruMo9dEznsBZu7Ez3i8YQ8n0leTxAiiMk1RCG4zQHPG1aj3xRw==" + }, + "@denotest/has-patch-versions@0.1.1": { + "integrity": "sha512-slUqYhu6DrPiSdNzmW5aMdW2/osIYnDP0yY3CwgLzAiyK0/cwb0epSpTSyZEmTKXA3rezxxC7ASSsnD34uH1/w==" + } + }, + "workspace": { + "dependencies": [ + "jsr:@denotest/add@~0.2.1", + "jsr:@denotest/multiple-exports@0.2.0", + "jsr:@denotest/subtract@0.2", + "npm:@denotest/bin@0.6.0", + "npm:@denotest/breaking-change-between-versions@1.0.0", + "npm:@denotest/has-patch-versions@~0.1.1" + ] + } +} diff --git a/tests/specs/update/deno_json/update_compatible/update.out b/tests/specs/update/deno_json/update_compatible/update.out new file mode 100644 index 00000000000000..17c5358fe650d5 --- /dev/null +++ b/tests/specs/update/deno_json/update_compatible/update.out @@ -0,0 +1,7 @@ +[UNORDERED_START] +Download http://127.0.0.1:4250/@denotest/add/0.2.1/mod.ts +Download http://localhost:4260/@denotest/has-patch-versions/0.1.1.tgz +[UNORDERED_END] +Updated 2 dependencies: + - jsr:@denotest/add 0.2.0 -> 0.2.1 + - npm:@denotest/has-patch-versions 0.1.0 -> 0.1.1 diff --git a/tests/specs/update/deno_json/update_latest/deno.json.out b/tests/specs/update/deno_json/update_latest/deno.json.out new file mode 100644 index 00000000000000..5e4e99bd66f1e2 --- /dev/null +++ b/tests/specs/update/deno_json/update_latest/deno.json.out @@ -0,0 +1,19 @@ +{ + "imports": { + "@denotest/add": "jsr:@denotest/add@^1.0.0", + "@denotest/add/": "jsr:/@denotest/add@^1.0.0/", + "@denotest/subtract": "jsr:@denotest/subtract@^1.0.0", + "@denotest/with-subpath": "jsr:@denotest/multiple-exports@^1.0.0/data-json", + "@denotest/breaking-change-between-versions": "npm:@denotest/breaking-change-between-versions@^2.0.0", + "@denotest/bin": "npm:@denotest/bin@^1.0.0", + "@denotest/has-patch-versions": "npm:@denotest/has-patch-versions@^0.2.0" + }, + "scopes": { + "/foo/": { + "@denotest/add": "jsr:@denotest/add@^1.0.0", + "@denotest/add/": "jsr:/@denotest/add@^1.0.0/", + "@denotest/subtract": "jsr:@denotest/subtract@^1.0.0", + "@denotest/with-subpath": "jsr:@denotest/multiple-exports@^1.0.0/data-json" + } + } +} diff --git a/tests/specs/update/deno_json/update_latest/deno.lock.out b/tests/specs/update/deno_json/update_latest/deno.lock.out new file mode 100644 index 00000000000000..ad83546ab194b3 --- /dev/null +++ b/tests/specs/update/deno_json/update_latest/deno.lock.out @@ -0,0 +1,43 @@ +{ + "version": "4", + "specifiers": { + "jsr:@denotest/add@1": "1.0.0", + "jsr:@denotest/multiple-exports@1": "1.0.0", + "jsr:@denotest/subtract@1": "1.0.0", + "npm:@denotest/bin@1": "1.0.0", + "npm:@denotest/breaking-change-between-versions@2": "2.0.0", + "npm:@denotest/has-patch-versions@0.2": "0.2.0" + }, + "jsr": { + "@denotest/add@1.0.0": { + "integrity": "3b2e675c1ad7fba2a45bc251992e01aff08a3c974ac09079b11e6a5b95d4bfcb" + }, + "@denotest/multiple-exports@1.0.0": { + "integrity": "efe9748a0c0939c7ac245fee04acc0c42bd7a61874ff71a360c4543e4f5f6b36" + }, + "@denotest/subtract@1.0.0": { + "integrity": "e178a7101c073e93d9efa6833d5cbf83bc1bc8d509b7c2a5ecbf74265e917597" + } + }, + "npm": { + "@denotest/bin@1.0.0": { + "integrity": "sha512-ZtrWnYYPIzw4a9H1uNeZRZRWuLCpHZZU/SllIyFLqcTLH/3zdRI8UH4Z1Kf+8N++bWGO3fg8Ev4vvS1LoLlidg==" + }, + "@denotest/breaking-change-between-versions@2.0.0": { + "integrity": "sha512-3eQpPhhJYbSHaAmpgyVT8IM3+MkxcAQl90Uw8zmuTiFs64Wt3HGzSz74cwPlvfqqesRktm8fBZMmrtxVo3ENzw==" + }, + "@denotest/has-patch-versions@0.2.0": { + "integrity": "sha512-7XIVGrBMyqnts5/wcc7dn7rVl4IWrCiGUT2GLDSLWnogOMIZBapJJLW9n8Leq1bDTJ3U6aDTEFKz9fVSOwZfLQ==" + } + }, + "workspace": { + "dependencies": [ + "jsr:@denotest/add@1", + "jsr:@denotest/multiple-exports@1", + "jsr:@denotest/subtract@1", + "npm:@denotest/bin@1", + "npm:@denotest/breaking-change-between-versions@2", + "npm:@denotest/has-patch-versions@0.2" + ] + } +} diff --git a/tests/specs/update/deno_json/update_latest/update.out b/tests/specs/update/deno_json/update_latest/update.out new file mode 100644 index 00000000000000..35e1ef9fe5dacb --- /dev/null +++ b/tests/specs/update/deno_json/update_latest/update.out @@ -0,0 +1,16 @@ +[UNORDERED_START] +Download http://127.0.0.1:4250/@denotest/add/1.0.0/mod.ts +Download http://127.0.0.1:4250/@denotest/subtract/1.0.0/mod.ts +Download http://127.0.0.1:4250/@denotest/multiple-exports/1.0.0_meta.json +Download http://127.0.0.1:4250/@denotest/multiple-exports/1.0.0/data.json +Download http://localhost:4260/@denotest/has-patch-versions/0.2.0.tgz +Download http://localhost:4260/@denotest/bin/1.0.0.tgz +Download http://localhost:4260/@denotest/breaking-change-between-versions/2.0.0.tgz +[UNORDERED_END] +Updated 6 dependencies: + - jsr:@denotest/add 0.2.0 -> 1.0.0 + - jsr:@denotest/multiple-exports 0.2.0 -> 1.0.0 + - jsr:@denotest/subtract 0.2.0 -> 1.0.0 + - npm:@denotest/bin 0.6.0 -> 1.0.0 + - npm:@denotest/breaking-change-between-versions 1.0.0 -> 2.0.0 + - npm:@denotest/has-patch-versions 0.1.0 -> 0.2.0 diff --git a/tests/specs/update/external_import_map/__test__.jsonc b/tests/specs/update/external_import_map/__test__.jsonc new file mode 100644 index 00000000000000..66dc55cc5759c9 --- /dev/null +++ b/tests/specs/update/external_import_map/__test__.jsonc @@ -0,0 +1,24 @@ +{ + "tempDir": true, + "steps": [ + { + "args": "i", + "output": "[WILDCARD]" + }, + { + "args": "outdated", + "output": "outdated.out" + }, + { + "args": "outdated --update --latest", + "output": "update.out" + }, + { + "args": [ + "eval", + "console.log(Deno.readTextFileSync('import_map.json').trim())" + ], + "output": "import_map.json.out" + } + ] +} diff --git a/tests/specs/update/external_import_map/deno.json b/tests/specs/update/external_import_map/deno.json new file mode 100644 index 00000000000000..ee44ba9472a033 --- /dev/null +++ b/tests/specs/update/external_import_map/deno.json @@ -0,0 +1,3 @@ +{ + "importMap": "import_map.json" +} diff --git a/tests/specs/update/external_import_map/deno.lock b/tests/specs/update/external_import_map/deno.lock new file mode 100644 index 00000000000000..940f2527d8760c --- /dev/null +++ b/tests/specs/update/external_import_map/deno.lock @@ -0,0 +1,33 @@ +{ + "version": "4", + "specifiers": { + "jsr:@denotest/add@0.2": "0.2.0", + "jsr:@denotest/subtract@0.2": "0.2.0", + "npm:@denotest/breaking-change-between-versions@1.0.0": "1.0.0", + "npm:@denotest/has-patch-versions@0.1": "0.1.0" + }, + "jsr": { + "@denotest/add@0.2.0": { + "integrity": "a9076d30ecb42b2fc6dd95e7055fbf4e6358b53f550741bd7f60089d19f68848" + }, + "@denotest/subtract@0.2.0": { + "integrity": "c9650fc559ab2430effc0c7fb1540e3aa89888fbdd926335ccfdeac57eb3a64d" + } + }, + "npm": { + "@denotest/breaking-change-between-versions@1.0.0": { + "integrity": "sha512-bzMGYx+DxxPlI74n/VsDAN7Db1BY7Sz2XqxXruMo9dEznsBZu7Ez3i8YQ8n0leTxAiiMk1RCG4zQHPG1aj3xRw==" + }, + "@denotest/has-patch-versions@0.1.0": { + "integrity": "sha512-H/MBo0jKDdMsX4AAGEGQbZj70nfNe3oUNZXbohYHhqf9EfpLnXp/7FC29ZdfV4+p6VjEcOGdCtXc6rilE6iYpg==" + } + }, + "workspace": { + "dependencies": [ + "jsr:@denotest/add@0.2", + "jsr:@denotest/subtract@0.2", + "npm:@denotest/breaking-change-between-versions@1.0.0", + "npm:@denotest/has-patch-versions@0.1" + ] + } +} diff --git a/tests/specs/update/external_import_map/import_map.json b/tests/specs/update/external_import_map/import_map.json new file mode 100644 index 00000000000000..9cc5c77e24b88a --- /dev/null +++ b/tests/specs/update/external_import_map/import_map.json @@ -0,0 +1,8 @@ +{ + "imports": { + "@denotest/add": "jsr:@denotest/add@^0.2.0", + "@denotest/subtract": "jsr:@denotest/subtract@^0.2.0", + "@denotest/breaking-change-between-versions": "npm:@denotest/breaking-change-between-versions@1.0.0", + "@denotest/has-patch-versions": "npm:@denotest/has-patch-versions@^0.1.0" + } +} diff --git a/tests/specs/update/external_import_map/import_map.json.out b/tests/specs/update/external_import_map/import_map.json.out new file mode 100644 index 00000000000000..b4e24decbcbd31 --- /dev/null +++ b/tests/specs/update/external_import_map/import_map.json.out @@ -0,0 +1,8 @@ +{ + "imports": { + "@denotest/add": "jsr:@denotest/add@^1.0.0", + "@denotest/subtract": "jsr:@denotest/subtract@^1.0.0", + "@denotest/breaking-change-between-versions": "npm:@denotest/breaking-change-between-versions@^2.0.0", + "@denotest/has-patch-versions": "npm:@denotest/has-patch-versions@^0.2.0" + } +} diff --git a/tests/specs/update/external_import_map/main.ts b/tests/specs/update/external_import_map/main.ts new file mode 100644 index 00000000000000..b008bb0d41b74e --- /dev/null +++ b/tests/specs/update/external_import_map/main.ts @@ -0,0 +1 @@ +import { add } from "@denotest/add"; diff --git a/tests/specs/update/external_import_map/outdated.out b/tests/specs/update/external_import_map/outdated.out new file mode 100644 index 00000000000000..8752b132bf2429 --- /dev/null +++ b/tests/specs/update/external_import_map/outdated.out @@ -0,0 +1,14 @@ +┌────────────────────────────────────────────────┬─────────┬────────┬────────┐ +│ Package │ Current │ Update │ Latest │ +├────────────────────────────────────────────────┼─────────┼────────┼────────┤ +│ jsr:@denotest/subtract │ 0.2.0 │ 0.2.0 │ 1.0.0 │ +├────────────────────────────────────────────────┼─────────┼────────┼────────┤ +│ jsr:@denotest/add │ 0.2.0 │ 0.2.1 │ 1.0.0 │ +├────────────────────────────────────────────────┼─────────┼────────┼────────┤ +│ npm:@denotest/has-patch-versions │ 0.1.0 │ 0.1.1 │ 0.2.0 │ +├────────────────────────────────────────────────┼─────────┼────────┼────────┤ +│ npm:@denotest/breaking-change-between-versions │ 1.0.0 │ 1.0.0 │ 2.0.0 │ +└────────────────────────────────────────────────┴─────────┴────────┴────────┘ + +Run deno outdated --update --latest to update to the latest available versions, +or deno outdated --help for more information. diff --git a/tests/specs/update/external_import_map/update.out b/tests/specs/update/external_import_map/update.out new file mode 100644 index 00000000000000..d075cff2961704 --- /dev/null +++ b/tests/specs/update/external_import_map/update.out @@ -0,0 +1,11 @@ +[UNORDERED_START] +Download http://127.0.0.1:4250/@denotest/subtract/1.0.0/mod.ts +Download http://127.0.0.1:4250/@denotest/add/1.0.0/mod.ts +Download http://localhost:4260/@denotest/has-patch-versions/0.2.0.tgz +Download http://localhost:4260/@denotest/breaking-change-between-versions/2.0.0.tgz +[UNORDERED_END] +Updated 4 dependencies: + - jsr:@denotest/add 0.2.0 -> 1.0.0 + - jsr:@denotest/subtract 0.2.0 -> 1.0.0 + - npm:@denotest/breaking-change-between-versions 1.0.0 -> 2.0.0 + - npm:@denotest/has-patch-versions 0.1.0 -> 0.2.0 diff --git a/tests/specs/update/mixed_workspace/__test__.jsonc b/tests/specs/update/mixed_workspace/__test__.jsonc new file mode 100644 index 00000000000000..9810e15bdd6eac --- /dev/null +++ b/tests/specs/update/mixed_workspace/__test__.jsonc @@ -0,0 +1,163 @@ +{ + "tempDir": true, + "tests": { + // just to make sure install doesn't change the lockfile + "sanity_lockfile_up_to_date": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": [ + "eval", + "const now = Deno.readTextFileSync('./deno.lock'); console.log(now.trim());" + ], + "output": "deno.lock.orig.out" + } + ] + }, + "print_outdated_root": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "outdated", + "output": "print_outdated/root.out" + }, + { + // Filtering that matches nothing, should exit cleanly + "args": "outdated foobar", + "output": "" + } + ] + }, + "print_outdated_recursive": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "outdated --recursive", + "output": "print_outdated/recursive.out" + }, + { + // Filtering that matches nothing, should exit cleanly + "args": "outdated foobar", + "output": "" + } + ] + }, + "print_outdated_subdir": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "cwd": "member-a", + "args": "outdated", + "output": "print_outdated/member_a.out" + }, + { + "cwd": "member-b", + "args": "outdated", + "output": "print_outdated/member_b.out" + } + ] + }, + "update_latest_root": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "outdated --update --latest", + "output": "update_latest/root/update.out" + }, + { + "args": "-A print_file.ts ./deno.json", + "output": "./update_latest/root/deno.json.out" + } + ] + }, + "update_latest_subdir": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "cwd": "member-a", + "args": "outdated --update --latest", + "output": "update_latest/subdir/member_a.out" + }, + { + "args": "-A print_file.ts ./member-a/deno.json", + "output": "update_latest/subdir/member_a_deno.json.out" + }, + { + "cwd": "member-b", + "args": "outdated --update --latest", + "output": "update_latest/subdir/member_b.out" + }, + { + "args": "-A print_file.ts ./member-b/package.json", + "output": "update_latest/subdir/member_b_package.json.out" + } + ] + }, + "update_latest_recursive": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "outdated --update --latest --recursive", + "output": "update_latest/recursive/update.out" + }, + { + "args": "-A print_file.ts ./deno.json", + "output": "update_latest/root/deno.json.out" + }, + { + "args": "-A print_file.ts ./member-a/deno.json", + "output": "update_latest/subdir/member_a_deno.json.out" + }, + { + "args": "-A print_file.ts ./member-b/package.json", + "output": "update_latest/subdir/member_b_package.json.out" + } + ] + }, + "update_filtered": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "outdated --update --latest --recursive @denotest/add @denotest/sub* !@denotest/breaking* aliased @denotest/with-subpath@0.5.0", + "output": "filtered/update.out" + }, + { + "args": "-A print_file.ts ./deno.json", + "output": "./update_latest/root/deno.json.out" + }, + { + "args": "-A print_file.ts ./member-a/deno.json", + "output": "./filtered/member_a_deno.json.out" + }, + { + "args": "-A print_file.ts ./member-b/package.json", + "output": "./filtered/member_b_package.json.out" + } + ] + } + } +} diff --git a/tests/specs/update/mixed_workspace/deno.json b/tests/specs/update/mixed_workspace/deno.json new file mode 100644 index 00000000000000..e4034d3a31f0e9 --- /dev/null +++ b/tests/specs/update/mixed_workspace/deno.json @@ -0,0 +1,6 @@ +{ + "workspace": ["./member-a", "./member-b"], + "imports": { + "@denotest/subtract": "jsr:@denotest/subtract@^0.2.0" + } +} diff --git a/tests/specs/update/mixed_workspace/deno.lock b/tests/specs/update/mixed_workspace/deno.lock new file mode 100644 index 00000000000000..23613ce58dfb2f --- /dev/null +++ b/tests/specs/update/mixed_workspace/deno.lock @@ -0,0 +1,55 @@ +{ + "version": "4", + "specifiers": { + "jsr:@denotest/add@0.2": "0.2.1", + "jsr:@denotest/multiple-exports@0.2.0": "0.2.0", + "jsr:@denotest/subtract@0.2": "0.2.0", + "npm:@denotest/bin@0.6.0": "0.6.0", + "npm:@denotest/breaking-change-between-versions@1.0.0": "1.0.0", + "npm:@denotest/has-patch-versions@0.1.0": "0.1.0" + }, + "jsr": { + "@denotest/add@0.2.1": { + "integrity": "a9076d30ecb42b2fc6dd95e7055fbf4e6358b53f550741bd7f60089d19f68848" + }, + "@denotest/multiple-exports@0.2.0": { + "integrity": "efe9748a0c0939c7ac245fee04acc0c42bd7a61874ff71a360c4543e4f5f6b36" + }, + "@denotest/subtract@0.2.0": { + "integrity": "c9650fc559ab2430effc0c7fb1540e3aa89888fbdd926335ccfdeac57eb3a64d" + } + }, + "npm": { + "@denotest/bin@0.6.0": { + "integrity": "sha512-vCNpxFgQN4fw4ZOp63nbTX1ilcDqNpvXCvYyC8nmfxQQAezsEt095I/YXwMIoMGzWtjCvlMf9kVEYfLuT5oEGQ==" + }, + "@denotest/breaking-change-between-versions@1.0.0": { + "integrity": "sha512-bzMGYx+DxxPlI74n/VsDAN7Db1BY7Sz2XqxXruMo9dEznsBZu7Ez3i8YQ8n0leTxAiiMk1RCG4zQHPG1aj3xRw==" + }, + "@denotest/has-patch-versions@0.1.0": { + "integrity": "sha512-H/MBo0jKDdMsX4AAGEGQbZj70nfNe3oUNZXbohYHhqf9EfpLnXp/7FC29ZdfV4+p6VjEcOGdCtXc6rilE6iYpg==" + } + }, + "workspace": { + "dependencies": [ + "jsr:@denotest/subtract@0.2" + ], + "members": { + "member-a": { + "dependencies": [ + "jsr:@denotest/add@0.2", + "jsr:@denotest/multiple-exports@0.2.0", + "npm:@denotest/breaking-change-between-versions@1.0.0" + ] + }, + "member-b": { + "packageJson": { + "dependencies": [ + "npm:@denotest/bin@0.6.0", + "npm:@denotest/has-patch-versions@0.1.0" + ] + } + } + } + } +} diff --git a/tests/specs/update/mixed_workspace/deno.lock.orig.out b/tests/specs/update/mixed_workspace/deno.lock.orig.out new file mode 100644 index 00000000000000..23613ce58dfb2f --- /dev/null +++ b/tests/specs/update/mixed_workspace/deno.lock.orig.out @@ -0,0 +1,55 @@ +{ + "version": "4", + "specifiers": { + "jsr:@denotest/add@0.2": "0.2.1", + "jsr:@denotest/multiple-exports@0.2.0": "0.2.0", + "jsr:@denotest/subtract@0.2": "0.2.0", + "npm:@denotest/bin@0.6.0": "0.6.0", + "npm:@denotest/breaking-change-between-versions@1.0.0": "1.0.0", + "npm:@denotest/has-patch-versions@0.1.0": "0.1.0" + }, + "jsr": { + "@denotest/add@0.2.1": { + "integrity": "a9076d30ecb42b2fc6dd95e7055fbf4e6358b53f550741bd7f60089d19f68848" + }, + "@denotest/multiple-exports@0.2.0": { + "integrity": "efe9748a0c0939c7ac245fee04acc0c42bd7a61874ff71a360c4543e4f5f6b36" + }, + "@denotest/subtract@0.2.0": { + "integrity": "c9650fc559ab2430effc0c7fb1540e3aa89888fbdd926335ccfdeac57eb3a64d" + } + }, + "npm": { + "@denotest/bin@0.6.0": { + "integrity": "sha512-vCNpxFgQN4fw4ZOp63nbTX1ilcDqNpvXCvYyC8nmfxQQAezsEt095I/YXwMIoMGzWtjCvlMf9kVEYfLuT5oEGQ==" + }, + "@denotest/breaking-change-between-versions@1.0.0": { + "integrity": "sha512-bzMGYx+DxxPlI74n/VsDAN7Db1BY7Sz2XqxXruMo9dEznsBZu7Ez3i8YQ8n0leTxAiiMk1RCG4zQHPG1aj3xRw==" + }, + "@denotest/has-patch-versions@0.1.0": { + "integrity": "sha512-H/MBo0jKDdMsX4AAGEGQbZj70nfNe3oUNZXbohYHhqf9EfpLnXp/7FC29ZdfV4+p6VjEcOGdCtXc6rilE6iYpg==" + } + }, + "workspace": { + "dependencies": [ + "jsr:@denotest/subtract@0.2" + ], + "members": { + "member-a": { + "dependencies": [ + "jsr:@denotest/add@0.2", + "jsr:@denotest/multiple-exports@0.2.0", + "npm:@denotest/breaking-change-between-versions@1.0.0" + ] + }, + "member-b": { + "packageJson": { + "dependencies": [ + "npm:@denotest/bin@0.6.0", + "npm:@denotest/has-patch-versions@0.1.0" + ] + } + } + } + } +} diff --git a/tests/specs/update/mixed_workspace/filtered/member_a_deno.json.out b/tests/specs/update/mixed_workspace/filtered/member_a_deno.json.out new file mode 100644 index 00000000000000..2b622efee554c2 --- /dev/null +++ b/tests/specs/update/mixed_workspace/filtered/member_a_deno.json.out @@ -0,0 +1,10 @@ +{ + "name": "@denotest/member-a", + "exports": "./mod.ts", + "imports": { + "@denotest/add": "jsr:@denotest/add@^1.0.0", + "@denotest/add/": "jsr:/@denotest/add@^1.0.0/", + "@denotest/with-subpath": "jsr:@denotest/multiple-exports@0.5.0/data-json", + "@denotest/breaking-change-between-versions": "npm:@denotest/breaking-change-between-versions@1.0.0" + } +} diff --git a/tests/specs/update/mixed_workspace/filtered/member_b_package.json.out b/tests/specs/update/mixed_workspace/filtered/member_b_package.json.out new file mode 100644 index 00000000000000..7e582feeabb116 --- /dev/null +++ b/tests/specs/update/mixed_workspace/filtered/member_b_package.json.out @@ -0,0 +1,8 @@ +{ + "name": "@denotest/member-b", + "version": "0.1.0", + "dependencies": { + "@denotest/has-patch-versions": "0.1.0", + "aliased": "npm:@denotest/bin@^1.0.0" + } +} diff --git a/tests/specs/update/mixed_workspace/filtered/update.out b/tests/specs/update/mixed_workspace/filtered/update.out new file mode 100644 index 00000000000000..26543e51676186 --- /dev/null +++ b/tests/specs/update/mixed_workspace/filtered/update.out @@ -0,0 +1,12 @@ +[UNORDERED_START] +Download http://localhost:4260/@denotest/bin/1.0.0.tgz +Download http://127.0.0.1:4250/@denotest/multiple-exports/0.5.0_meta.json +Download http://127.0.0.1:4250/@denotest/multiple-exports/0.5.0/data.json +Download http://127.0.0.1:4250/@denotest/add/1.0.0/mod.ts +Download http://127.0.0.1:4250/@denotest/subtract/1.0.0/mod.ts +[UNORDERED_END] +Updated 4 dependencies: + - jsr:@denotest/add 0.2.1 -> 1.0.0 + - jsr:@denotest/multiple-exports 0.2.0 -> 0.5.0 + - jsr:@denotest/subtract 0.2.0 -> 1.0.0 + - npm:@denotest/bin 0.6.0 -> 1.0.0 diff --git a/tests/specs/update/mixed_workspace/member-a/deno.json b/tests/specs/update/mixed_workspace/member-a/deno.json new file mode 100644 index 00000000000000..0340d3bb920117 --- /dev/null +++ b/tests/specs/update/mixed_workspace/member-a/deno.json @@ -0,0 +1,10 @@ +{ + "name": "@denotest/member-a", + "exports": "./mod.ts", + "imports": { + "@denotest/add": "jsr:@denotest/add@^0.2.0", + "@denotest/add/": "jsr:/@denotest/add@^0.2.0/", + "@denotest/with-subpath": "jsr:@denotest/multiple-exports@0.2.0/data-json", + "@denotest/breaking-change-between-versions": "npm:@denotest/breaking-change-between-versions@1.0.0" + } +} diff --git a/tests/specs/update/mixed_workspace/member-a/mod.ts b/tests/specs/update/mixed_workspace/member-a/mod.ts new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/tests/specs/update/mixed_workspace/member-b/package.json b/tests/specs/update/mixed_workspace/member-b/package.json new file mode 100644 index 00000000000000..0f9929a478c962 --- /dev/null +++ b/tests/specs/update/mixed_workspace/member-b/package.json @@ -0,0 +1,8 @@ +{ + "name": "@denotest/member-b", + "version": "0.1.0", + "dependencies": { + "@denotest/has-patch-versions": "0.1.0", + "aliased": "npm:@denotest/bin@0.6.0" + } +} diff --git a/tests/specs/update/mixed_workspace/print_file.ts b/tests/specs/update/mixed_workspace/print_file.ts new file mode 100644 index 00000000000000..c57b6c3a4e56f3 --- /dev/null +++ b/tests/specs/update/mixed_workspace/print_file.ts @@ -0,0 +1,2 @@ +const file = Deno.args[0]; +console.log(Deno.readTextFileSync(file).trim()); diff --git a/tests/specs/update/mixed_workspace/print_outdated/member_a.out b/tests/specs/update/mixed_workspace/print_outdated/member_a.out new file mode 100644 index 00000000000000..9abfd127c0870f --- /dev/null +++ b/tests/specs/update/mixed_workspace/print_outdated/member_a.out @@ -0,0 +1,12 @@ +┌────────────────────────────────────────────────┬─────────┬────────┬────────┐ +│ Package │ Current │ Update │ Latest │ +├────────────────────────────────────────────────┼─────────┼────────┼────────┤ +│ jsr:@denotest/multiple-exports │ 0.2.0 │ 0.2.0 │ 1.0.0 │ +├────────────────────────────────────────────────┼─────────┼────────┼────────┤ +│ jsr:@denotest/add │ 0.2.1 │ 0.2.1 │ 1.0.0 │ +├────────────────────────────────────────────────┼─────────┼────────┼────────┤ +│ npm:@denotest/breaking-change-between-versions │ 1.0.0 │ 1.0.0 │ 2.0.0 │ +└────────────────────────────────────────────────┴─────────┴────────┴────────┘ + +Run deno outdated --update --latest to update to the latest available versions, +or deno outdated --help for more information. diff --git a/tests/specs/update/mixed_workspace/print_outdated/member_b.out b/tests/specs/update/mixed_workspace/print_outdated/member_b.out new file mode 100644 index 00000000000000..80548e4ac308e4 --- /dev/null +++ b/tests/specs/update/mixed_workspace/print_outdated/member_b.out @@ -0,0 +1,10 @@ +┌──────────────────────────────────┬─────────┬────────┬────────┐ +│ Package │ Current │ Update │ Latest │ +├──────────────────────────────────┼─────────┼────────┼────────┤ +│ npm:@denotest/has-patch-versions │ 0.1.0 │ 0.1.0 │ 0.2.0 │ +├──────────────────────────────────┼─────────┼────────┼────────┤ +│ npm:@denotest/bin │ 0.6.0 │ 0.6.0 │ 1.0.0 │ +└──────────────────────────────────┴─────────┴────────┴────────┘ + +Run deno outdated --update --latest to update to the latest available versions, +or deno outdated --help for more information. diff --git a/tests/specs/update/mixed_workspace/print_outdated/recursive.out b/tests/specs/update/mixed_workspace/print_outdated/recursive.out new file mode 100644 index 00000000000000..1c4f4d06e28358 --- /dev/null +++ b/tests/specs/update/mixed_workspace/print_outdated/recursive.out @@ -0,0 +1,18 @@ +┌────────────────────────────────────────────────┬─────────┬────────┬────────┐ +│ Package │ Current │ Update │ Latest │ +├────────────────────────────────────────────────┼─────────┼────────┼────────┤ +│ jsr:@denotest/multiple-exports │ 0.2.0 │ 0.2.0 │ 1.0.0 │ +├────────────────────────────────────────────────┼─────────┼────────┼────────┤ +│ jsr:@denotest/subtract │ 0.2.0 │ 0.2.0 │ 1.0.0 │ +├────────────────────────────────────────────────┼─────────┼────────┼────────┤ +│ jsr:@denotest/add │ 0.2.1 │ 0.2.1 │ 1.0.0 │ +├────────────────────────────────────────────────┼─────────┼────────┼────────┤ +│ npm:@denotest/has-patch-versions │ 0.1.0 │ 0.1.0 │ 0.2.0 │ +├────────────────────────────────────────────────┼─────────┼────────┼────────┤ +│ npm:@denotest/bin │ 0.6.0 │ 0.6.0 │ 1.0.0 │ +├────────────────────────────────────────────────┼─────────┼────────┼────────┤ +│ npm:@denotest/breaking-change-between-versions │ 1.0.0 │ 1.0.0 │ 2.0.0 │ +└────────────────────────────────────────────────┴─────────┴────────┴────────┘ + +Run deno outdated --update --latest to update to the latest available versions, +or deno outdated --help for more information. diff --git a/tests/specs/update/mixed_workspace/print_outdated/root.out b/tests/specs/update/mixed_workspace/print_outdated/root.out new file mode 100644 index 00000000000000..ef8df6dbe1d519 --- /dev/null +++ b/tests/specs/update/mixed_workspace/print_outdated/root.out @@ -0,0 +1,8 @@ +┌────────────────────────┬─────────┬────────┬────────┐ +│ Package │ Current │ Update │ Latest │ +├────────────────────────┼─────────┼────────┼────────┤ +│ jsr:@denotest/subtract │ 0.2.0 │ 0.2.0 │ 1.0.0 │ +└────────────────────────┴─────────┴────────┴────────┘ + +Run deno outdated --update --latest to update to the latest available versions, +or deno outdated --help for more information. diff --git a/tests/specs/update/mixed_workspace/update_latest/recursive/update.out b/tests/specs/update/mixed_workspace/update_latest/recursive/update.out new file mode 100644 index 00000000000000..ef6e36ded5e732 --- /dev/null +++ b/tests/specs/update/mixed_workspace/update_latest/recursive/update.out @@ -0,0 +1,16 @@ +[UNORDERED_START] +Download http://localhost:4260/@denotest/breaking-change-between-versions/2.0.0.tgz +Download http://localhost:4260/@denotest/has-patch-versions/0.2.0.tgz +Download http://localhost:4260/@denotest/bin/1.0.0.tgz +Download http://127.0.0.1:4250/@denotest/multiple-exports/1.0.0_meta.json +Download http://127.0.0.1:4250/@denotest/multiple-exports/1.0.0/data.json +Download http://127.0.0.1:4250/@denotest/subtract/1.0.0/mod.ts +Download http://127.0.0.1:4250/@denotest/add/1.0.0/mod.ts +[UNORDERED_END] +Updated 6 dependencies: + - jsr:@denotest/add 0.2.1 -> 1.0.0 + - jsr:@denotest/multiple-exports 0.2.0 -> 1.0.0 + - jsr:@denotest/subtract 0.2.0 -> 1.0.0 + - npm:@denotest/bin 0.6.0 -> 1.0.0 + - npm:@denotest/breaking-change-between-versions 1.0.0 -> 2.0.0 + - npm:@denotest/has-patch-versions 0.1.0 -> 0.2.0 diff --git a/tests/specs/update/mixed_workspace/update_latest/root/deno.json.out b/tests/specs/update/mixed_workspace/update_latest/root/deno.json.out new file mode 100644 index 00000000000000..0317e6c39f66e6 --- /dev/null +++ b/tests/specs/update/mixed_workspace/update_latest/root/deno.json.out @@ -0,0 +1,6 @@ +{ + "workspace": ["./member-a", "./member-b"], + "imports": { + "@denotest/subtract": "jsr:@denotest/subtract@^1.0.0" + } +} diff --git a/tests/specs/update/mixed_workspace/update_latest/root/update.out b/tests/specs/update/mixed_workspace/update_latest/root/update.out new file mode 100644 index 00000000000000..15d21621e8604c --- /dev/null +++ b/tests/specs/update/mixed_workspace/update_latest/root/update.out @@ -0,0 +1,3 @@ +Download http://127.0.0.1:4250/@denotest/subtract/1.0.0/mod.ts +Updated 1 dependency: + - jsr:@denotest/subtract 0.2.0 -> 1.0.0 diff --git a/tests/specs/update/mixed_workspace/update_latest/subdir/member_a.out b/tests/specs/update/mixed_workspace/update_latest/subdir/member_a.out new file mode 100644 index 00000000000000..f16e0b7f2a940a --- /dev/null +++ b/tests/specs/update/mixed_workspace/update_latest/subdir/member_a.out @@ -0,0 +1,10 @@ +[UNORDERED_START] +Download http://localhost:4260/@denotest/breaking-change-between-versions/2.0.0.tgz +Download http://127.0.0.1:4250/@denotest/multiple-exports/1.0.0_meta.json +Download http://127.0.0.1:4250/@denotest/multiple-exports/1.0.0/data.json +Download http://127.0.0.1:4250/@denotest/add/1.0.0/mod.ts +[UNORDERED_END] +Updated 3 dependencies: + - jsr:@denotest/add 0.2.1 -> 1.0.0 + - jsr:@denotest/multiple-exports 0.2.0 -> 1.0.0 + - npm:@denotest/breaking-change-between-versions 1.0.0 -> 2.0.0 diff --git a/tests/specs/update/mixed_workspace/update_latest/subdir/member_a_deno.json.out b/tests/specs/update/mixed_workspace/update_latest/subdir/member_a_deno.json.out new file mode 100644 index 00000000000000..9210123b828976 --- /dev/null +++ b/tests/specs/update/mixed_workspace/update_latest/subdir/member_a_deno.json.out @@ -0,0 +1,10 @@ +{ + "name": "@denotest/member-a", + "exports": "./mod.ts", + "imports": { + "@denotest/add": "jsr:@denotest/add@^1.0.0", + "@denotest/add/": "jsr:/@denotest/add@^1.0.0/", + "@denotest/with-subpath": "jsr:@denotest/multiple-exports@^1.0.0/data-json", + "@denotest/breaking-change-between-versions": "npm:@denotest/breaking-change-between-versions@^2.0.0" + } +} diff --git a/tests/specs/update/mixed_workspace/update_latest/subdir/member_b.out b/tests/specs/update/mixed_workspace/update_latest/subdir/member_b.out new file mode 100644 index 00000000000000..5ca3297e20ee84 --- /dev/null +++ b/tests/specs/update/mixed_workspace/update_latest/subdir/member_b.out @@ -0,0 +1,7 @@ +[UNORDERED_START] +Download http://localhost:4260/@denotest/bin/1.0.0.tgz +Download http://localhost:4260/@denotest/has-patch-versions/0.2.0.tgz +[UNORDERED_END] +Updated 2 dependencies: + - npm:@denotest/bin 0.6.0 -> 1.0.0 + - npm:@denotest/has-patch-versions 0.1.0 -> 0.2.0 diff --git a/tests/specs/update/mixed_workspace/update_latest/subdir/member_b_package.json.out b/tests/specs/update/mixed_workspace/update_latest/subdir/member_b_package.json.out new file mode 100644 index 00000000000000..1426fcd7f8114f --- /dev/null +++ b/tests/specs/update/mixed_workspace/update_latest/subdir/member_b_package.json.out @@ -0,0 +1,8 @@ +{ + "name": "@denotest/member-b", + "version": "0.1.0", + "dependencies": { + "@denotest/has-patch-versions": "^0.2.0", + "aliased": "npm:@denotest/bin@^1.0.0" + } +} diff --git a/tests/specs/update/no_config_file/__test__.jsonc b/tests/specs/update/no_config_file/__test__.jsonc new file mode 100644 index 00000000000000..1032e79279f0b2 --- /dev/null +++ b/tests/specs/update/no_config_file/__test__.jsonc @@ -0,0 +1,6 @@ +{ + "tempDir": true, + "args": "outdated", + "exitCode": 1, + "output": "error: No deno.json or package.json in \"[WILDLINE]\".\n" +} diff --git a/tests/specs/update/package_json/__test__.jsonc b/tests/specs/update/package_json/__test__.jsonc new file mode 100644 index 00000000000000..b86b9956cc7b86 --- /dev/null +++ b/tests/specs/update/package_json/__test__.jsonc @@ -0,0 +1,110 @@ +{ + "tempDir": true, + "tests": { + "sanity_lockfile_up_to_date": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": [ + "eval", + "const now = Deno.readTextFileSync('./deno.lock'); console.log(now.trim());" + ], + "output": "deno.lock.orig.out" + } + ] + }, + "print_outdated": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "outdated", + "output": "outdated.out" + }, + { + // Filtering that matches nothing, should exit cleanly + "args": "outdated foobar", + "output": "" + } + ] + }, + "print_outdated_compatible": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "outdated --compatible", + "output": "outdated_compatible.out" + }, + { + // Filtering that matches nothing, should exit cleanly + "args": "outdated --compatible foobar", + "output": "" + } + ] + }, + "update_compatible": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "outdated --update", + "output": "./update_compatible/update.out" + }, + { + "args": "-A ./print_file.ts ./package.json", + "output": "./update_compatible/package.json.out" + }, + { + "args": "-A ./print_file.ts ./deno.lock", + "output": "./update_compatible/deno.lock.out" + } + ] + }, + "update_latest": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "outdated --update --latest", + "output": "update_latest/update.out" + }, + { + "args": "-A ./print_file.ts ./package.json", + "output": "update_latest/package.json.out" + }, + { + "args": "-A ./print_file.ts ./deno.lock", + "output": "update_latest/deno.lock.out" + } + ] + }, + "update_filtered": { + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "outdated --update --latest @denotest/has-patch* aliased@0.7.0", + "output": "filtered/update.out" + }, + { + "args": "-A print_file.ts ./package.json", + "output": "filtered/package.json.out" + } + ] + } + } +} diff --git a/tests/specs/update/package_json/deno.lock b/tests/specs/update/package_json/deno.lock new file mode 100644 index 00000000000000..05253094db79a0 --- /dev/null +++ b/tests/specs/update/package_json/deno.lock @@ -0,0 +1,28 @@ +{ + "version": "4", + "specifiers": { + "npm:@denotest/bin@0.6": "0.6.0", + "npm:@denotest/breaking-change-between-versions@1.0.0": "1.0.0", + "npm:@denotest/has-patch-versions@0.1": "0.1.0" + }, + "npm": { + "@denotest/bin@0.6.0": { + "integrity": "sha512-vCNpxFgQN4fw4ZOp63nbTX1ilcDqNpvXCvYyC8nmfxQQAezsEt095I/YXwMIoMGzWtjCvlMf9kVEYfLuT5oEGQ==" + }, + "@denotest/breaking-change-between-versions@1.0.0": { + "integrity": "sha512-bzMGYx+DxxPlI74n/VsDAN7Db1BY7Sz2XqxXruMo9dEznsBZu7Ez3i8YQ8n0leTxAiiMk1RCG4zQHPG1aj3xRw==" + }, + "@denotest/has-patch-versions@0.1.0": { + "integrity": "sha512-H/MBo0jKDdMsX4AAGEGQbZj70nfNe3oUNZXbohYHhqf9EfpLnXp/7FC29ZdfV4+p6VjEcOGdCtXc6rilE6iYpg==" + } + }, + "workspace": { + "packageJson": { + "dependencies": [ + "npm:@denotest/bin@0.6", + "npm:@denotest/breaking-change-between-versions@1.0.0", + "npm:@denotest/has-patch-versions@0.1" + ] + } + } +} diff --git a/tests/specs/update/package_json/deno.lock.orig.out b/tests/specs/update/package_json/deno.lock.orig.out new file mode 100644 index 00000000000000..05253094db79a0 --- /dev/null +++ b/tests/specs/update/package_json/deno.lock.orig.out @@ -0,0 +1,28 @@ +{ + "version": "4", + "specifiers": { + "npm:@denotest/bin@0.6": "0.6.0", + "npm:@denotest/breaking-change-between-versions@1.0.0": "1.0.0", + "npm:@denotest/has-patch-versions@0.1": "0.1.0" + }, + "npm": { + "@denotest/bin@0.6.0": { + "integrity": "sha512-vCNpxFgQN4fw4ZOp63nbTX1ilcDqNpvXCvYyC8nmfxQQAezsEt095I/YXwMIoMGzWtjCvlMf9kVEYfLuT5oEGQ==" + }, + "@denotest/breaking-change-between-versions@1.0.0": { + "integrity": "sha512-bzMGYx+DxxPlI74n/VsDAN7Db1BY7Sz2XqxXruMo9dEznsBZu7Ez3i8YQ8n0leTxAiiMk1RCG4zQHPG1aj3xRw==" + }, + "@denotest/has-patch-versions@0.1.0": { + "integrity": "sha512-H/MBo0jKDdMsX4AAGEGQbZj70nfNe3oUNZXbohYHhqf9EfpLnXp/7FC29ZdfV4+p6VjEcOGdCtXc6rilE6iYpg==" + } + }, + "workspace": { + "packageJson": { + "dependencies": [ + "npm:@denotest/bin@0.6", + "npm:@denotest/breaking-change-between-versions@1.0.0", + "npm:@denotest/has-patch-versions@0.1" + ] + } + } +} diff --git a/tests/specs/update/package_json/filtered/package.json.out b/tests/specs/update/package_json/filtered/package.json.out new file mode 100644 index 00000000000000..39faff22d668ce --- /dev/null +++ b/tests/specs/update/package_json/filtered/package.json.out @@ -0,0 +1,9 @@ +{ + "dependencies": { + "@denotest/has-patch-versions": "^0.2.0", + "@denotest/breaking-change-between-versions": "1.0.0" + }, + "devDependencies": { + "aliased": "npm:@denotest/bin@0.7.0" + } +} diff --git a/tests/specs/update/package_json/filtered/update.out b/tests/specs/update/package_json/filtered/update.out new file mode 100644 index 00000000000000..3093281f10fb84 --- /dev/null +++ b/tests/specs/update/package_json/filtered/update.out @@ -0,0 +1,9 @@ +[UNORDERED_START] +Download http://localhost:4260/@denotest/bin/0.7.0.tgz +Download http://localhost:4260/@denotest/has-patch-versions/0.2.0.tgz +Initialize @denotest/has-patch-versions@0.2.0 +Initialize @denotest/bin@0.7.0 +[UNORDERED_END] +Updated 2 dependencies: + - npm:@denotest/bin 0.6.0 -> 0.7.0 + - npm:@denotest/has-patch-versions 0.1.0 -> 0.2.0 diff --git a/tests/specs/update/package_json/outdated.out b/tests/specs/update/package_json/outdated.out new file mode 100644 index 00000000000000..cf61af80656d6f --- /dev/null +++ b/tests/specs/update/package_json/outdated.out @@ -0,0 +1,12 @@ +┌────────────────────────────────────────────────┬─────────┬────────┬────────┐ +│ Package │ Current │ Update │ Latest │ +├────────────────────────────────────────────────┼─────────┼────────┼────────┤ +│ npm:@denotest/has-patch-versions │ 0.1.0 │ 0.1.1 │ 0.2.0 │ +├────────────────────────────────────────────────┼─────────┼────────┼────────┤ +│ npm:@denotest/bin │ 0.6.0 │ 0.6.0 │ 1.0.0 │ +├────────────────────────────────────────────────┼─────────┼────────┼────────┤ +│ npm:@denotest/breaking-change-between-versions │ 1.0.0 │ 1.0.0 │ 2.0.0 │ +└────────────────────────────────────────────────┴─────────┴────────┴────────┘ + +Run deno outdated --update --latest to update to the latest available versions, +or deno outdated --help for more information. diff --git a/tests/specs/update/package_json/outdated_compatible.out b/tests/specs/update/package_json/outdated_compatible.out new file mode 100644 index 00000000000000..812e9ba0f4fbd8 --- /dev/null +++ b/tests/specs/update/package_json/outdated_compatible.out @@ -0,0 +1,8 @@ +┌──────────────────────────────────┬─────────┬────────┬────────┐ +│ Package │ Current │ Update │ Latest │ +├──────────────────────────────────┼─────────┼────────┼────────┤ +│ npm:@denotest/has-patch-versions │ 0.1.0 │ 0.1.1 │ 0.2.0 │ +└──────────────────────────────────┴─────────┴────────┴────────┘ + +Run deno outdated --update to update to the latest compatible versions, +or deno outdated --help for more information. diff --git a/tests/specs/update/package_json/package.json b/tests/specs/update/package_json/package.json new file mode 100644 index 00000000000000..9cd8cf59dcd60a --- /dev/null +++ b/tests/specs/update/package_json/package.json @@ -0,0 +1,9 @@ +{ + "dependencies": { + "@denotest/has-patch-versions": "^0.1.0", + "@denotest/breaking-change-between-versions": "1.0.0" + }, + "devDependencies": { + "aliased": "npm:@denotest/bin@^0.6.0" + } +} diff --git a/tests/specs/update/package_json/print_file.ts b/tests/specs/update/package_json/print_file.ts new file mode 100644 index 00000000000000..c57b6c3a4e56f3 --- /dev/null +++ b/tests/specs/update/package_json/print_file.ts @@ -0,0 +1,2 @@ +const file = Deno.args[0]; +console.log(Deno.readTextFileSync(file).trim()); diff --git a/tests/specs/update/package_json/update_compatible/deno.lock.out b/tests/specs/update/package_json/update_compatible/deno.lock.out new file mode 100644 index 00000000000000..f82a21ee46c785 --- /dev/null +++ b/tests/specs/update/package_json/update_compatible/deno.lock.out @@ -0,0 +1,28 @@ +{ + "version": "4", + "specifiers": { + "npm:@denotest/bin@0.6": "0.6.0", + "npm:@denotest/breaking-change-between-versions@1.0.0": "1.0.0", + "npm:@denotest/has-patch-versions@~0.1.1": "0.1.1" + }, + "npm": { + "@denotest/bin@0.6.0": { + "integrity": "sha512-vCNpxFgQN4fw4ZOp63nbTX1ilcDqNpvXCvYyC8nmfxQQAezsEt095I/YXwMIoMGzWtjCvlMf9kVEYfLuT5oEGQ==" + }, + "@denotest/breaking-change-between-versions@1.0.0": { + "integrity": "sha512-bzMGYx+DxxPlI74n/VsDAN7Db1BY7Sz2XqxXruMo9dEznsBZu7Ez3i8YQ8n0leTxAiiMk1RCG4zQHPG1aj3xRw==" + }, + "@denotest/has-patch-versions@0.1.1": { + "integrity": "sha512-slUqYhu6DrPiSdNzmW5aMdW2/osIYnDP0yY3CwgLzAiyK0/cwb0epSpTSyZEmTKXA3rezxxC7ASSsnD34uH1/w==" + } + }, + "workspace": { + "packageJson": { + "dependencies": [ + "npm:@denotest/bin@0.6", + "npm:@denotest/breaking-change-between-versions@1.0.0", + "npm:@denotest/has-patch-versions@~0.1.1" + ] + } + } +} diff --git a/tests/specs/update/package_json/update_compatible/package.json.out b/tests/specs/update/package_json/update_compatible/package.json.out new file mode 100644 index 00000000000000..6f822ee5d61457 --- /dev/null +++ b/tests/specs/update/package_json/update_compatible/package.json.out @@ -0,0 +1,9 @@ +{ + "dependencies": { + "@denotest/has-patch-versions": "^0.1.1", + "@denotest/breaking-change-between-versions": "1.0.0" + }, + "devDependencies": { + "aliased": "npm:@denotest/bin@^0.6.0" + } +} diff --git a/tests/specs/update/package_json/update_compatible/update.out b/tests/specs/update/package_json/update_compatible/update.out new file mode 100644 index 00000000000000..4c3c740791992a --- /dev/null +++ b/tests/specs/update/package_json/update_compatible/update.out @@ -0,0 +1,4 @@ +Download http://localhost:4260/@denotest/has-patch-versions/0.1.1.tgz +Initialize @denotest/has-patch-versions@0.1.1 +Updated 1 dependency: + - npm:@denotest/has-patch-versions 0.1.0 -> 0.1.1 diff --git a/tests/specs/update/package_json/update_latest/deno.lock.out b/tests/specs/update/package_json/update_latest/deno.lock.out new file mode 100644 index 00000000000000..9a9b1bad5ebcbc --- /dev/null +++ b/tests/specs/update/package_json/update_latest/deno.lock.out @@ -0,0 +1,28 @@ +{ + "version": "4", + "specifiers": { + "npm:@denotest/bin@1": "1.0.0", + "npm:@denotest/breaking-change-between-versions@2": "2.0.0", + "npm:@denotest/has-patch-versions@0.2": "0.2.0" + }, + "npm": { + "@denotest/bin@1.0.0": { + "integrity": "sha512-ZtrWnYYPIzw4a9H1uNeZRZRWuLCpHZZU/SllIyFLqcTLH/3zdRI8UH4Z1Kf+8N++bWGO3fg8Ev4vvS1LoLlidg==" + }, + "@denotest/breaking-change-between-versions@2.0.0": { + "integrity": "sha512-3eQpPhhJYbSHaAmpgyVT8IM3+MkxcAQl90Uw8zmuTiFs64Wt3HGzSz74cwPlvfqqesRktm8fBZMmrtxVo3ENzw==" + }, + "@denotest/has-patch-versions@0.2.0": { + "integrity": "sha512-7XIVGrBMyqnts5/wcc7dn7rVl4IWrCiGUT2GLDSLWnogOMIZBapJJLW9n8Leq1bDTJ3U6aDTEFKz9fVSOwZfLQ==" + } + }, + "workspace": { + "packageJson": { + "dependencies": [ + "npm:@denotest/bin@1", + "npm:@denotest/breaking-change-between-versions@2", + "npm:@denotest/has-patch-versions@0.2" + ] + } + } +} diff --git a/tests/specs/update/package_json/update_latest/package.json.out b/tests/specs/update/package_json/update_latest/package.json.out new file mode 100644 index 00000000000000..fb483d78bd7cdf --- /dev/null +++ b/tests/specs/update/package_json/update_latest/package.json.out @@ -0,0 +1,9 @@ +{ + "dependencies": { + "@denotest/has-patch-versions": "^0.2.0", + "@denotest/breaking-change-between-versions": "^2.0.0" + }, + "devDependencies": { + "aliased": "npm:@denotest/bin@^1.0.0" + } +} diff --git a/tests/specs/update/package_json/update_latest/update.out b/tests/specs/update/package_json/update_latest/update.out new file mode 100644 index 00000000000000..a24ae1e32b36cf --- /dev/null +++ b/tests/specs/update/package_json/update_latest/update.out @@ -0,0 +1,14 @@ +[UNORDERED_START] +Download http://localhost:4260/@denotest/bin/1.0.0.tgz +Download http://localhost:4260/@denotest/has-patch-versions/0.2.0.tgz +Download http://localhost:4260/@denotest/breaking-change-between-versions/2.0.0.tgz +Initialize @denotest/has-patch-versions@0.2.0 +Initialize @denotest/breaking-change-between-versions@2.0.0 +Initialize @denotest/bin@1.0.0 +[UNORDERED_END] +Updated 3 dependencies: +[UNORDERED_START] + - npm:@denotest/bin 0.6.0 -> 1.0.0 + - npm:@denotest/breaking-change-between-versions 1.0.0 -> 2.0.0 + - npm:@denotest/has-patch-versions 0.1.0 -> 0.2.0 +[UNORDERED_END] diff --git a/tests/specs/update/pre_release/__test__.jsonc b/tests/specs/update/pre_release/__test__.jsonc new file mode 100644 index 00000000000000..7e2ea39dabc5ef --- /dev/null +++ b/tests/specs/update/pre_release/__test__.jsonc @@ -0,0 +1,21 @@ +{ + "tempDir": true, + "steps": [ + { + "args": "i", + "output": "[WILDCARD]" + }, + { + "args": "outdated", + "output": "outdated.out" + }, + { + "args": "outdated --compatible", + "output": "outdated.out" + }, + { + "args": "outdated --update --latest", + "output": "update.out" + } + ] +} diff --git a/tests/specs/update/pre_release/deno.json b/tests/specs/update/pre_release/deno.json new file mode 100644 index 00000000000000..07646b50593dce --- /dev/null +++ b/tests/specs/update/pre_release/deno.json @@ -0,0 +1,7 @@ +{ + "imports": { + "@denotest/npm-has-pre-release": "npm:@denotest/has-pre-release@^2.0.0-beta.1", + "@denotest/jsr-has-pre-release": "jsr:@denotest/has-pre-release@^2.0.0-beta.1", + "@denotest/has-only-pre-release": "jsr:@denotest/has-only-pre-release@^2.0.0-beta.1" + } +} diff --git a/tests/specs/update/pre_release/deno.lock b/tests/specs/update/pre_release/deno.lock new file mode 100644 index 00000000000000..33b136dd53dc20 --- /dev/null +++ b/tests/specs/update/pre_release/deno.lock @@ -0,0 +1,28 @@ +{ + "version": "4", + "specifiers": { + "jsr:@denotest/has-only-pre-release@^2.0.0-beta.1": "2.0.0-beta.1", + "jsr:@denotest/has-pre-release@^2.0.0-beta.1": "2.0.0-beta.1", + "npm:@denotest/has-pre-release@^2.0.0-beta.1": "2.0.0-beta.1" + }, + "jsr": { + "@denotest/has-only-pre-release@2.0.0-beta.1": { + "integrity": "43fd680ea94bb5db5fe1a2d86101c47d0e2cc77323b881755cea9a0372e49537" + }, + "@denotest/has-pre-release@2.0.0-beta.1": { + "integrity": "43fd680ea94bb5db5fe1a2d86101c47d0e2cc77323b881755cea9a0372e49537" + } + }, + "npm": { + "@denotest/has-pre-release@2.0.0-beta.1": { + "integrity": "sha512-K1fHe1L2EUSLgijtzzALNpkkIO0SrX3z+IXvVjjOIE8HKd4T7lkpzDdoUp+WllwS3KXmuJh+9vIfY5lFp38pew==" + } + }, + "workspace": { + "dependencies": [ + "jsr:@denotest/has-only-pre-release@^2.0.0-beta.1", + "jsr:@denotest/has-pre-release@^2.0.0-beta.1", + "npm:@denotest/has-pre-release@^2.0.0-beta.1" + ] + } +} diff --git a/tests/specs/update/pre_release/outdated.out b/tests/specs/update/pre_release/outdated.out new file mode 100644 index 00000000000000..b8369b25f7a568 --- /dev/null +++ b/tests/specs/update/pre_release/outdated.out @@ -0,0 +1,11 @@ +┌────────────────────────────────────┬──────────────┬──────────────┬──────────────┐ +│ Package │ Current │ Update │ Latest │ +├────────────────────────────────────┼──────────────┼──────────────┼──────────────┤ +│ jsr:@denotest/has-only-pre-release │ 2.0.0-beta.1 │ 2.0.0-beta.2 │ 2.0.0-beta.2 │ +├────────────────────────────────────┼──────────────┼──────────────┼──────────────┤ +│ jsr:@denotest/has-pre-release │ 2.0.0-beta.1 │ 2.0.0-beta.2 │ 2.0.0-beta.2 │ +├────────────────────────────────────┼──────────────┼──────────────┼──────────────┤ +│ npm:@denotest/has-pre-release │ 2.0.0-beta.1 │ 2.0.0-beta.2 │ 2.0.0-beta.2 │ +└────────────────────────────────────┴──────────────┴──────────────┴──────────────┘ + +[WILDCARD] diff --git a/tests/specs/update/pre_release/update.out b/tests/specs/update/pre_release/update.out new file mode 100644 index 00000000000000..d019457f0a4e46 --- /dev/null +++ b/tests/specs/update/pre_release/update.out @@ -0,0 +1,5 @@ +[WILDCARD] +Updated 3 dependencies: + - jsr:@denotest/has-only-pre-release 2.0.0-beta.1 -> 2.0.0-beta.2 + - jsr:@denotest/has-pre-release 2.0.0-beta.1 -> 2.0.0-beta.2 + - npm:@denotest/has-pre-release 2.0.0-beta.1 -> 2.0.0-beta.2 diff --git a/tests/testdata/cache/037_fetch_multiple.out b/tests/testdata/cache/037_fetch_multiple.out deleted file mode 100644 index f4c0c314bc4aa4..00000000000000 --- a/tests/testdata/cache/037_fetch_multiple.out +++ /dev/null @@ -1,5 +0,0 @@ -Download http://localhost:4545/subdir/mod2.ts -Download http://localhost:4545/subdir/mt_text_typescript.t1.ts -Download http://localhost:4545/subdir/print_hello.ts -Check [WILDCARD]/fetch/test.ts -Check [WILDCARD]/fetch/other.ts diff --git a/tests/testdata/check/import_non_existent.ts b/tests/testdata/check/import_non_existent.ts new file mode 100644 index 00000000000000..ae511bca8a6ae3 --- /dev/null +++ b/tests/testdata/check/import_non_existent.ts @@ -0,0 +1,5 @@ +import { Test } from "./non-existent-module.ts"; + +console.log(Test); + +export class Other {} diff --git a/tests/testdata/commonjs/example.js b/tests/testdata/commonjs/example.js index d2f89d3f02357e..0feedb12d42c02 100644 --- a/tests/testdata/commonjs/example.js +++ b/tests/testdata/commonjs/example.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore no-undef const processMod = require("process"); const osMod = require("node:os"); diff --git a/tests/testdata/compile/node_modules_symlink_outside/main_compile_file.out b/tests/testdata/compile/node_modules_symlink_outside/main_compile_file.out index e5b39a75274ea3..a96f1f71e17f4e 100644 --- a/tests/testdata/compile/node_modules_symlink_outside/main_compile_file.out +++ b/tests/testdata/compile/node_modules_symlink_outside/main_compile_file.out @@ -1,2 +1,5 @@ Compile file:///[WILDCARD]/node_modules_symlink_outside/main.ts to [WILDCARD] -Warning Symlink target is outside '[WILDCARD]compile'. Inlining symlink at '[WILDCARD]node_modules_symlink_outside[WILDCARD]node_modules[WILDCARD]test.txt' to '[WILDCARD]target.txt' as file. + +Embedded Files + +[WILDCARD] diff --git a/tests/testdata/compile/node_modules_symlink_outside/main_compile_folder.out b/tests/testdata/compile/node_modules_symlink_outside/main_compile_folder.out index 1a7eb0a4f28187..538aaa414c6904 100644 --- a/tests/testdata/compile/node_modules_symlink_outside/main_compile_folder.out +++ b/tests/testdata/compile/node_modules_symlink_outside/main_compile_folder.out @@ -3,4 +3,15 @@ Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz Initialize @denotest/esm-basic@1.0.0 Check file:///[WILDCARD]/node_modules_symlink_outside/main.ts Compile file:///[WILDCARD]/node_modules_symlink_outside/main.ts to [WILDLINE] -Warning Symlink target is outside '[WILDLINE]compile'. Excluding symlink at '[WILDLINE]node_modules_symlink_outside[WILDLINE]node_modules[WILDLINE]symlink_dir' with target '[WILDLINE]some_folder'. + +Embedded Files + +bin[WILDLINE] +├─┬ compile ([WILDLINE]) +│ └─┬ node_modules_symlink_outside ([WILDLINE]) +│ ├── main.ts ([WILDLINE]) +│ └── node_modules/* ([WILDLINE]) +└── some_folder/* ([WILDLINE]) + +Size: [WILDLINE] + diff --git a/tests/testdata/compile/standalone_error_module_with_imports_2.ts b/tests/testdata/compile/standalone_error_module_with_imports_2.ts index ef052b512e07f6..c83d7ceea623a3 100644 --- a/tests/testdata/compile/standalone_error_module_with_imports_2.ts +++ b/tests/testdata/compile/standalone_error_module_with_imports_2.ts @@ -1,2 +1,7 @@ +// file has blank lines to make the input line +// different than the output console.log("hello"); -throw new Error("boom!"); + +const value: string = "boom!"; + +throw new Error(value); diff --git a/tests/testdata/file_extensions/ts_with_extension.out b/tests/testdata/file_extensions/ts_with_extension.out deleted file mode 100644 index 181959ee231dd9..00000000000000 --- a/tests/testdata/file_extensions/ts_with_extension.out +++ /dev/null @@ -1 +0,0 @@ -executing typescript with extension diff --git a/tests/testdata/fmt/badly_formatted.md b/tests/testdata/fmt/badly_formatted.md index 642918ceae89a4..be90ff845faca6 100644 --- a/tests/testdata/fmt/badly_formatted.md +++ b/tests/testdata/fmt/badly_formatted.md @@ -63,3 +63,15 @@ function foo(): number { let a:number ``` + + +```sql + seLect * , biz, buz +from baz; +``` + +```sql +-- deno-fmt-ignore-file + seLect * , biz, buz +from baz; +``` diff --git a/tests/testdata/fmt/badly_formatted.sql b/tests/testdata/fmt/badly_formatted.sql new file mode 100644 index 00000000000000..8b4cb978f0c896 --- /dev/null +++ b/tests/testdata/fmt/badly_formatted.sql @@ -0,0 +1,21 @@ +select * from foo; +update foo set a = 'b'Where id = 'biz'; + + + create table foo(id text not null +bar text, + biz int, + buz number NOT NULL +); + +INSERT + into + user_data + (first_name, +last_name, address, phone, email) +VALUES + ('foo', 'bar', + 'biz', 1, 'bix'); + + + diff --git a/tests/testdata/fmt/badly_formatted_fixed.md b/tests/testdata/fmt/badly_formatted_fixed.md index 21176742bbdf7a..7a482e058f632e 100644 --- a/tests/testdata/fmt/badly_formatted_fixed.md +++ b/tests/testdata/fmt/badly_formatted_fixed.md @@ -56,3 +56,18 @@ function foo(): number { let a: number; ``` + +```sql +SELECT + *, + biz, + buz +FROM + baz; +``` + +```sql +-- deno-fmt-ignore-file + seLect * , biz, buz +from baz; +``` diff --git a/tests/testdata/fmt/badly_formatted_fixed.sql b/tests/testdata/fmt/badly_formatted_fixed.sql new file mode 100644 index 00000000000000..d50c6192161949 --- /dev/null +++ b/tests/testdata/fmt/badly_formatted_fixed.sql @@ -0,0 +1,22 @@ +SELECT + * +FROM + foo; + +UPDATE + foo +SET + a = 'b' +WHERE + id = 'biz'; + +CREATE TABLE foo( + id text NOT NULL bar text, + biz int, + buz number NOT NULL +); + +INSERT INTO + user_data (first_name, last_name, address, phone, email) +VALUES + ('foo', 'bar', 'biz', 1, 'bix'); diff --git a/tests/testdata/fmt/expected_fmt_check_verbose_formatted_files.out b/tests/testdata/fmt/expected_fmt_check_verbose_formatted_files.out deleted file mode 100644 index 158c556c2968ff..00000000000000 --- a/tests/testdata/fmt/expected_fmt_check_verbose_formatted_files.out +++ /dev/null @@ -1 +0,0 @@ -Checked 2 files diff --git a/tests/testdata/fmt/fmt_with_config_default.out b/tests/testdata/fmt/fmt_with_config_default.out deleted file mode 100644 index faad9352bbb63b..00000000000000 --- a/tests/testdata/fmt/fmt_with_config_default.out +++ /dev/null @@ -1,2 +0,0 @@ -Config file found at '[WILDCARD]deno.jsonc' -Checked 2 files diff --git a/tests/testdata/npm/cached_only/main.out b/tests/testdata/npm/cached_only/main.out index c4bfc1fc43f3c5..99ded2ec76f3fc 100644 --- a/tests/testdata/npm/cached_only/main.out +++ b/tests/testdata/npm/cached_only/main.out @@ -1,2 +1,2 @@ -error: Error getting response at http://localhost:4260/chalk for package "chalk": An npm specifier not found in cache: "chalk", --cached-only is specified. +error: Failed loading http://localhost:4260/chalk for package "chalk": npm package not found in cache: "chalk", --cached-only is specified. at file:///[WILDCARD]/testdata/npm/cached_only/main.ts:1:19 diff --git a/tests/testdata/run/permissions_trace.ts b/tests/testdata/run/permissions_trace.ts new file mode 100644 index 00000000000000..d061ac6bf86280 --- /dev/null +++ b/tests/testdata/run/permissions_trace.ts @@ -0,0 +1,9 @@ +function foo() { + Deno.hostname(); +} + +function bar() { + foo(); +} + +bar(); diff --git a/tests/testdata/run/textproto.ts b/tests/testdata/run/textproto.ts index 9e0f5f5f0a55cf..6b8ac92ecbfb15 100644 --- a/tests/testdata/run/textproto.ts +++ b/tests/testdata/run/textproto.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/tests/testdata/wasm/math.ts b/tests/testdata/wasm/math.ts new file mode 100644 index 00000000000000..5a1de0865e775b --- /dev/null +++ b/tests/testdata/wasm/math.ts @@ -0,0 +1,8 @@ +// this file is imported by math_with_import.wasm +export function add(a: number, b: number) { + return a + b; +} + +export function subtract(a: number, b: number) { + return a - b; +} diff --git a/tests/testdata/wasm/math.wasm b/tests/testdata/wasm/math.wasm new file mode 100644 index 00000000000000..6b3950fcc5297b Binary files /dev/null and b/tests/testdata/wasm/math.wasm differ diff --git a/tests/testdata/wasm/math_with_import.wasm b/tests/testdata/wasm/math_with_import.wasm new file mode 100644 index 00000000000000..64e195e42b6a2e Binary files /dev/null and b/tests/testdata/wasm/math_with_import.wasm differ diff --git a/tests/testdata/workers/close_in_wasm_reactions.js b/tests/testdata/workers/close_in_wasm_reactions.js index abe5731085bff8..2cb0e4a7680217 100644 --- a/tests/testdata/workers/close_in_wasm_reactions.js +++ b/tests/testdata/workers/close_in_wasm_reactions.js @@ -1,6 +1,6 @@ // https://github.com/denoland/deno/issues/12263 // Test for a panic that happens when a worker is closed in the reactions of a -// WASM async operation. +// Wasm async operation. // The minimum valid wasm module, plus two additional zero bytes. const buffer = new Uint8Array([ diff --git a/tests/testdata/workers/close_nested_child.js b/tests/testdata/workers/close_nested_child.js index 97980c689e07e0..1f2b2091a672d5 100644 --- a/tests/testdata/workers/close_nested_child.js +++ b/tests/testdata/workers/close_nested_child.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. console.log("Starting the child worker"); diff --git a/tests/testdata/workers/close_nested_parent.js b/tests/testdata/workers/close_nested_parent.js index d1fe47553e4b6d..ddb9aec26df04b 100644 --- a/tests/testdata/workers/close_nested_parent.js +++ b/tests/testdata/workers/close_nested_parent.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. console.log("Starting the parent worker"); diff --git a/tests/testdata/workers/close_race_worker.js b/tests/testdata/workers/close_race_worker.js index 6964be34a08803..945fed9dd06724 100644 --- a/tests/testdata/workers/close_race_worker.js +++ b/tests/testdata/workers/close_race_worker.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. setTimeout(() => { self.postMessage(""); diff --git a/tests/testdata/workers/http_worker.js b/tests/testdata/workers/http_worker.js index 27bc9c038c2b2f..fd11641febe25e 100644 --- a/tests/testdata/workers/http_worker.js +++ b/tests/testdata/workers/http_worker.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-deprecated-deno-api diff --git a/tests/unit/abort_controller_test.ts b/tests/unit/abort_controller_test.ts index 60ea6aa24552e4..52a1bad80313b5 100644 --- a/tests/unit/abort_controller_test.ts +++ b/tests/unit/abort_controller_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals } from "./test_util.ts"; diff --git a/tests/unit/blob_test.ts b/tests/unit/blob_test.ts index b578253142af1d..b89f4703e20ea5 100644 --- a/tests/unit/blob_test.ts +++ b/tests/unit/blob_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, assertStringIncludes } from "./test_util.ts"; import { concat } from "@std/bytes/concat"; diff --git a/tests/unit/body_test.ts b/tests/unit/body_test.ts index 18cdb22be0b089..28a1c697b1e953 100644 --- a/tests/unit/body_test.ts +++ b/tests/unit/body_test.ts @@ -1,5 +1,5 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assert, assertEquals } from "./test_util.ts"; +// Copyright 2018-2025 the Deno authors. MIT license. +import { assert, assertEquals, assertRejects } from "./test_util.ts"; // just a hack to get a body object // deno-lint-ignore no-explicit-any @@ -187,3 +187,14 @@ Deno.test( assertEquals(file.size, 1); }, ); + +Deno.test(async function bodyBadResourceError() { + const file = await Deno.open("README.md"); + file.close(); + const body = buildBody(file.readable); + await assertRejects( + () => body.arrayBuffer(), + Deno.errors.BadResource, + "Cannot read body as underlying resource unavailable", + ); +}); diff --git a/tests/unit/broadcast_channel_test.ts b/tests/unit/broadcast_channel_test.ts index dce5f10867bf57..f4efe68c4f7eb8 100644 --- a/tests/unit/broadcast_channel_test.ts +++ b/tests/unit/broadcast_channel_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals } from "@std/assert"; Deno.test("BroadcastChannel worker", async () => { diff --git a/tests/unit/build_test.ts b/tests/unit/build_test.ts index f697b64d39c66d..9f4e3a5cbfccb7 100644 --- a/tests/unit/build_test.ts +++ b/tests/unit/build_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert } from "./test_util.ts"; Deno.test(function buildInfo() { diff --git a/tests/unit/cache_api_test.ts b/tests/unit/cache_api_test.ts index 08f768e3340fa7..ec84e9c9080289 100644 --- a/tests/unit/cache_api_test.ts +++ b/tests/unit/cache_api_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, diff --git a/tests/unit/chmod_test.ts b/tests/unit/chmod_test.ts index 9ff6301e285814..6d815ea1eb0fc3 100644 --- a/tests/unit/chmod_test.ts +++ b/tests/unit/chmod_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, diff --git a/tests/unit/chown_test.ts b/tests/unit/chown_test.ts index eda4d340370448..99e7dd445a227e 100644 --- a/tests/unit/chown_test.ts +++ b/tests/unit/chown_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, assertRejects, assertThrows } from "./test_util.ts"; // chown on Windows is noop for now, so ignore its testing on Windows diff --git a/tests/unit/command_test.ts b/tests/unit/command_test.ts index 8345548f8559d0..268b0c25baf1f2 100644 --- a/tests/unit/command_test.ts +++ b/tests/unit/command_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, diff --git a/tests/unit/console_test.ts b/tests/unit/console_test.ts index 06f5dd7e6198e5..7b19e49cbd37e9 100644 --- a/tests/unit/console_test.ts +++ b/tests/unit/console_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // TODO(ry) The unit test functions in this module are too coarse. They should // be broken up into smaller bits. diff --git a/tests/unit/copy_file_test.ts b/tests/unit/copy_file_test.ts index 9405184e3311d1..fa4a9d837c12ba 100644 --- a/tests/unit/copy_file_test.ts +++ b/tests/unit/copy_file_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, assertRejects, assertThrows } from "./test_util.ts"; function readFileString(filename: string | URL): string { diff --git a/tests/unit/cron_test.ts b/tests/unit/cron_test.ts index 5f14f6c7842f85..325ee5535d18e0 100644 --- a/tests/unit/cron_test.ts +++ b/tests/unit/cron_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, assertThrows } from "./test_util.ts"; // @ts-ignore This is not publicly typed namespace, but it's there for sure. diff --git a/tests/unit/custom_event_test.ts b/tests/unit/custom_event_test.ts index b72084eb2335f2..ddefd4cce6ee29 100644 --- a/tests/unit/custom_event_test.ts +++ b/tests/unit/custom_event_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals } from "./test_util.ts"; Deno.test(function customEventInitializedWithDetail() { diff --git a/tests/unit/dir_test.ts b/tests/unit/dir_test.ts index 1e702f549a4552..dbf88609c227bf 100644 --- a/tests/unit/dir_test.ts +++ b/tests/unit/dir_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, assertThrows } from "./test_util.ts"; Deno.test({ permissions: { read: true } }, function dirCwdNotNull() { diff --git a/tests/unit/dom_exception_test.ts b/tests/unit/dom_exception_test.ts index 4e894f5fc88874..2e0c9f71e17db6 100644 --- a/tests/unit/dom_exception_test.ts +++ b/tests/unit/dom_exception_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, diff --git a/tests/unit/error_stack_test.ts b/tests/unit/error_stack_test.ts index 7188b9f53d7f02..fea891349477bf 100644 --- a/tests/unit/error_stack_test.ts +++ b/tests/unit/error_stack_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, assertMatch } from "./test_util.ts"; Deno.test(function errorStackMessageLine() { diff --git a/tests/unit/error_test.ts b/tests/unit/error_test.ts index bf0ef5062746fe..48e1f7879bfa7c 100644 --- a/tests/unit/error_test.ts +++ b/tests/unit/error_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertThrows, fail } from "./test_util.ts"; Deno.test("Errors work", () => { diff --git a/tests/unit/esnext_test.ts b/tests/unit/esnext_test.ts index 1d5759aafaf5a3..2c597ef7ba6293 100644 --- a/tests/unit/esnext_test.ts +++ b/tests/unit/esnext_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals } from "./test_util.ts"; // TODO(@kitsonk) remove when we are no longer patching TypeScript to have diff --git a/tests/unit/event_source_test.ts b/tests/unit/event_source_test.ts index 242c12d6e85b83..2ce7178b00b152 100644 --- a/tests/unit/event_source_test.ts +++ b/tests/unit/event_source_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertStrictEquals } from "./test_util.ts"; Deno.test( diff --git a/tests/unit/event_target_test.ts b/tests/unit/event_target_test.ts index 3f7d8ee24a4695..ca1c4961436310 100644 --- a/tests/unit/event_target_test.ts +++ b/tests/unit/event_target_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, assertThrows } from "./test_util.ts"; diff --git a/tests/unit/event_test.ts b/tests/unit/event_test.ts index bd398fd410c7a8..d022e1c1d161c1 100644 --- a/tests/unit/event_test.ts +++ b/tests/unit/event_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, assertStringIncludes } from "./test_util.ts"; Deno.test(function eventInitializedWithType() { diff --git a/tests/unit/fetch_test.ts b/tests/unit/fetch_test.ts index 6d3fd8cc1d538d..094b963e19adf7 100644 --- a/tests/unit/fetch_test.ts +++ b/tests/unit/fetch_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-console @@ -439,6 +439,58 @@ Deno.test( }, ); +Deno.test( + { + permissions: { net: true }, + }, + async function fetchWithAuthorizationHeaderRedirection() { + const response = await fetch("http://localhost:4546/echo_server", { + headers: { authorization: "Bearer foo" }, + }); + assertEquals(response.status, 200); + assertEquals(response.statusText, "OK"); + assertEquals(response.url, "http://localhost:4545/echo_server"); + assertEquals(response.headers.get("authorization"), null); + assertEquals(await response.text(), ""); + }, +); + +Deno.test( + { + permissions: { net: true }, + }, + async function fetchWithCookieHeaderRedirection() { + const response = await fetch("http://localhost:4546/echo_server", { + headers: { Cookie: "sessionToken=verySecret" }, + }); + assertEquals(response.status, 200); + assertEquals(response.statusText, "OK"); + assertEquals(response.url, "http://localhost:4545/echo_server"); + assertEquals(response.headers.get("cookie"), null); + assertEquals(await response.text(), ""); + }, +); + +Deno.test( + { + permissions: { net: true }, + }, + async function fetchWithProxyAuthorizationHeaderRedirection() { + const response = await fetch("http://localhost:4546/echo_server", { + headers: { + "proxy-authorization": "Basic ZXNwZW46a29rb3M=", + "accept": "application/json", + }, + }); + assertEquals(response.status, 200); + assertEquals(response.statusText, "OK"); + assertEquals(response.url, "http://localhost:4545/echo_server"); + assertEquals(response.headers.get("proxy-authorization"), null); + assertEquals(response.headers.get("accept"), "application/json"); + assertEquals(await response.text(), ""); + }, +); + Deno.test( { permissions: { net: true } }, async function fetchInitStringBody() { diff --git a/tests/unit/ffi_test.ts b/tests/unit/ffi_test.ts index 98338b15e60929..9db0ad0c26fa1e 100644 --- a/tests/unit/ffi_test.ts +++ b/tests/unit/ffi_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, assertRejects, assertThrows } from "./test_util.ts"; diff --git a/tests/unit/file_test.ts b/tests/unit/file_test.ts index 1af3a3f84d0f55..38e4dce64a81da 100644 --- a/tests/unit/file_test.ts +++ b/tests/unit/file_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals } from "./test_util.ts"; // deno-lint-ignore no-explicit-any diff --git a/tests/unit/filereader_test.ts b/tests/unit/filereader_test.ts index 158cf53835a279..21ca25ed480c2e 100644 --- a/tests/unit/filereader_test.ts +++ b/tests/unit/filereader_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals } from "./test_util.ts"; Deno.test(function fileReaderConstruct() { diff --git a/tests/unit/files_test.ts b/tests/unit/files_test.ts index a847104c280650..aa211b224d0bf9 100644 --- a/tests/unit/files_test.ts +++ b/tests/unit/files_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, @@ -137,7 +137,7 @@ Deno.test(async function openOptions() { await Deno.open(filename, { write: false }); }, Error, - "OpenOptions requires at least one option to be true", + "'options' requires at least one option to be true", ); await assertRejects( @@ -145,7 +145,7 @@ Deno.test(async function openOptions() { await Deno.open(filename, { truncate: true, write: false }); }, Error, - "'truncate' option requires 'write' option", + "'truncate' option requires 'write' to be true", ); await assertRejects( @@ -153,7 +153,7 @@ Deno.test(async function openOptions() { await Deno.open(filename, { create: true, write: false }); }, Error, - "'create' or 'createNew' options require 'write' or 'append' option", + "'create' or 'createNew' options require 'write' or 'append' to be true", ); await assertRejects( @@ -161,7 +161,7 @@ Deno.test(async function openOptions() { await Deno.open(filename, { createNew: true, append: false }); }, Error, - "'create' or 'createNew' options require 'write' or 'append' option", + "'create' or 'createNew' options require 'write' or 'append' to be true", ); }); diff --git a/tests/unit/fs_events_test.ts b/tests/unit/fs_events_test.ts index cc2f2cd5711242..d9bdf454d54fee 100644 --- a/tests/unit/fs_events_test.ts +++ b/tests/unit/fs_events_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, assertThrows, delay } from "./test_util.ts"; @@ -45,6 +45,14 @@ async function makeTempDir(): Promise { return testDir; } +async function makeTempFile(): Promise { + const testFile = await Deno.makeTempFile(); + // The watcher sometimes witnesses the creation of it's own root + // directory. Delay a bit. + await delay(100); + return testFile; +} + Deno.test( { permissions: { read: true, write: true } }, async function watchFsBasic() { @@ -155,3 +163,25 @@ Deno.test( assert(done); }, ); + +Deno.test( + { permissions: { read: true, write: true } }, + async function watchFsRemove() { + const testFile = await makeTempFile(); + using watcher = Deno.watchFs(testFile); + async function waitForRemove() { + for await (const event of watcher) { + if (event.kind === "remove") { + return event; + } + } + } + const eventPromise = waitForRemove(); + + await Deno.remove(testFile); + + // Expect zero events. + const event = await eventPromise; + assertEquals(event!.kind, "remove"); + }, +); diff --git a/tests/unit/get_random_values_test.ts b/tests/unit/get_random_values_test.ts index 75aaf4c1b21b01..47ba78a325fc20 100644 --- a/tests/unit/get_random_values_test.ts +++ b/tests/unit/get_random_values_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertNotEquals, assertStrictEquals } from "./test_util.ts"; Deno.test(function getRandomValuesInt8Array() { diff --git a/tests/unit/globals_test.ts b/tests/unit/globals_test.ts index 6de228e1c904f2..84773dbf478a3a 100644 --- a/tests/unit/globals_test.ts +++ b/tests/unit/globals_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-node-globals import { diff --git a/tests/unit/headers_test.ts b/tests/unit/headers_test.ts index ea72f784b5fa8c..969b2a36f4d82e 100644 --- a/tests/unit/headers_test.ts +++ b/tests/unit/headers_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, assertThrows } from "./test_util.ts"; const { inspectArgs, diff --git a/tests/unit/http_test.ts b/tests/unit/http_test.ts index 355b155afd5afd..809b36227bf6c6 100644 --- a/tests/unit/http_test.ts +++ b/tests/unit/http_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // @ts-nocheck `Deno.serveHttp()` was soft-removed in Deno 2. // deno-lint-ignore-file no-deprecated-deno-api diff --git a/tests/unit/image_bitmap_test.ts b/tests/unit/image_bitmap_test.ts index 0066311820eff3..ca5b85c178f989 100644 --- a/tests/unit/image_bitmap_test.ts +++ b/tests/unit/image_bitmap_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals } from "./test_util.ts"; diff --git a/tests/unit/image_data_test.ts b/tests/unit/image_data_test.ts index 7156301a05ad91..c6dfb0d372ff07 100644 --- a/tests/unit/image_data_test.ts +++ b/tests/unit/image_data_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals } from "./test_util.ts"; diff --git a/tests/unit/internals_test.ts b/tests/unit/internals_test.ts index bb4c21793e92bc..7ca9b6d336a5d1 100644 --- a/tests/unit/internals_test.ts +++ b/tests/unit/internals_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert } from "./test_util.ts"; Deno.test(function internalsExists() { diff --git a/tests/unit/intl_test.ts b/tests/unit/intl_test.ts index 6e4de378c94d3b..e177dc45b09ffd 100644 --- a/tests/unit/intl_test.ts +++ b/tests/unit/intl_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals } from "./test_util.ts"; Deno.test("Intl.v8BreakIterator should be undefined", () => { diff --git a/tests/unit/jupyter_test.ts b/tests/unit/jupyter_test.ts index 07defe23054504..e29bb2b300dd1d 100644 --- a/tests/unit/jupyter_test.ts +++ b/tests/unit/jupyter_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, assertThrows } from "./test_util.ts"; diff --git a/tests/unit/kv_queue_test.ts b/tests/unit/kv_queue_test.ts index d92977169f18f1..569eb928006aac 100644 --- a/tests/unit/kv_queue_test.ts +++ b/tests/unit/kv_queue_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, assertFalse } from "./test_util.ts"; Deno.test({}, async function queueTestDbClose() { diff --git a/tests/unit/kv_queue_test_no_db_close.ts b/tests/unit/kv_queue_test_no_db_close.ts index 947e1c5e62b2ec..7c4bbf271e666e 100644 --- a/tests/unit/kv_queue_test_no_db_close.ts +++ b/tests/unit/kv_queue_test_no_db_close.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, assertNotEquals } from "./test_util.ts"; Deno.test({ diff --git a/tests/unit/kv_queue_undelivered_test.ts b/tests/unit/kv_queue_undelivered_test.ts index 1fcefe7e26a9d0..2fbfefbd690ddb 100644 --- a/tests/unit/kv_queue_undelivered_test.ts +++ b/tests/unit/kv_queue_undelivered_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals } from "./test_util.ts"; const sleep = (time: number) => new Promise((r) => setTimeout(r, time)); diff --git a/tests/unit/kv_test.ts b/tests/unit/kv_test.ts index e603bc196d83a8..47e1305c947e8f 100644 --- a/tests/unit/kv_test.ts +++ b/tests/unit/kv_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, @@ -1951,14 +1951,14 @@ dbTest("Invalid backoffSchedule", async (db) => { await db.enqueue("foo", { backoffSchedule: [1, 1, 1, 1, 1, 1] }); }, TypeError, - "Invalid backoffSchedule", + "Invalid backoffSchedule, max 5 intervals allowed", ); await assertRejects( async () => { await db.enqueue("foo", { backoffSchedule: [3600001] }); }, TypeError, - "Invalid backoffSchedule", + "Invalid backoffSchedule, interval at index 0 is invalid", ); }); diff --git a/tests/unit/link_test.ts b/tests/unit/link_test.ts index dfa72479c5ffda..5093c5720db23c 100644 --- a/tests/unit/link_test.ts +++ b/tests/unit/link_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, diff --git a/tests/unit/lint_plugin_test.ts b/tests/unit/lint_plugin_test.ts new file mode 100644 index 00000000000000..5b00f49d014366 --- /dev/null +++ b/tests/unit/lint_plugin_test.ts @@ -0,0 +1,769 @@ +// Copyright 2018-2025 the Deno authors. MIT license. + +import { assertEquals } from "./test_util.ts"; + +// TODO(@marvinhagemeister) Remove once we land "official" types +export interface LintReportData { + // deno-lint-ignore no-explicit-any + node: any; + message: string; +} +// TODO(@marvinhagemeister) Remove once we land "official" types +interface LintContext { + id: string; +} +// TODO(@marvinhagemeister) Remove once we land "official" types +// deno-lint-ignore no-explicit-any +type LintVisitor = Record void>; + +// TODO(@marvinhagemeister) Remove once we land "official" types +interface LintRule { + create(ctx: LintContext): LintVisitor; + destroy?(): void; +} + +// TODO(@marvinhagemeister) Remove once we land "official" types +interface LintPlugin { + name: string; + rules: Record; +} + +function runLintPlugin(plugin: LintPlugin, fileName: string, source: string) { + // deno-lint-ignore no-explicit-any + return (Deno as any)[(Deno as any).internal].runLintPlugin( + plugin, + fileName, + source, + ); +} + +function testPlugin( + source: string, + rule: LintRule, +) { + const plugin = { + name: "test-plugin", + rules: { + testRule: rule, + }, + }; + + return runLintPlugin(plugin, "source.tsx", source); +} + +interface VisitResult { + selector: string; + kind: "enter" | "exit"; + // deno-lint-ignore no-explicit-any + node: any; +} + +function testVisit( + source: string, + ...selectors: string[] +): VisitResult[] { + const result: VisitResult[] = []; + + testPlugin(source, { + create() { + const visitor: LintVisitor = {}; + + for (const s of selectors) { + visitor[s] = (node) => { + result.push({ + kind: s.endsWith(":exit") ? "exit" : "enter", + selector: s, + node, + }); + }; + } + + return visitor; + }, + }); + + return result; +} + +function testLintNode(source: string, ...selectors: string[]) { + // deno-lint-ignore no-explicit-any + const log: any[] = []; + + testPlugin(source, { + create() { + const visitor: LintVisitor = {}; + + for (const s of selectors) { + visitor[s] = (node) => { + log.push(node[Symbol.for("Deno.lint.toJsValue")]()); + }; + } + + return visitor; + }, + }); + + return log; +} + +Deno.test("Plugin - visitor enter/exit", () => { + const enter = testVisit( + "foo", + "Identifier", + ); + assertEquals(enter[0].node.type, "Identifier"); + + const exit = testVisit( + "foo", + "Identifier:exit", + ); + assertEquals(exit[0].node.type, "Identifier"); + + const both = testVisit("foo", "Identifier", "Identifier:exit"); + assertEquals(both.map((t) => t.selector), ["Identifier", "Identifier:exit"]); +}); + +Deno.test("Plugin - visitor descendant", () => { + let result = testVisit( + "if (false) foo; if (false) bar()", + "IfStatement CallExpression", + ); + assertEquals(result[0].node.type, "CallExpression"); + assertEquals(result[0].node.callee.name, "bar"); + + result = testVisit( + "if (false) foo; foo()", + "IfStatement IfStatement", + ); + assertEquals(result, []); + + result = testVisit( + "if (false) foo; foo()", + "* CallExpression", + ); + assertEquals(result[0].node.type, "CallExpression"); +}); + +Deno.test("Plugin - visitor child combinator", () => { + let result = testVisit( + "if (false) foo; if (false) { bar; }", + "IfStatement > ExpressionStatement > Identifier", + ); + assertEquals(result[0].node.name, "foo"); + + result = testVisit( + "if (false) foo; foo()", + "IfStatement IfStatement", + ); + assertEquals(result, []); +}); + +Deno.test("Plugin - visitor next sibling", () => { + const result = testVisit( + "if (false) foo; if (false) bar;", + "IfStatement + IfStatement Identifier", + ); + assertEquals(result[0].node.name, "bar"); +}); + +Deno.test("Plugin - visitor subsequent sibling", () => { + const result = testVisit( + "if (false) foo; if (false) bar; if (false) baz;", + "IfStatement ~ IfStatement Identifier", + ); + assertEquals(result.map((r) => r.node.name), ["bar", "baz"]); +}); + +Deno.test("Plugin - visitor attr", () => { + let result = testVisit( + "for (const a of b) {}", + "[await]", + ); + assertEquals(result[0].node.await, false); + + result = testVisit( + "for await (const a of b) {}", + "[await=true]", + ); + assertEquals(result[0].node.await, true); + + result = testVisit( + "for await (const a of b) {}", + "ForOfStatement[await=true]", + ); + assertEquals(result[0].node.await, true); + + result = testVisit( + "for (const a of b) {}", + "ForOfStatement[await != true]", + ); + assertEquals(result[0].node.await, false); + + result = testVisit( + "async function *foo() {}", + "FunctionDeclaration[async=true][generator=true]", + ); + assertEquals(result[0].node.type, "FunctionDeclaration"); + + result = testVisit( + "foo", + "[name='foo']", + ); + assertEquals(result[0].node.name, "foo"); +}); + +Deno.test("Plugin - visitor attr to check type", () => { + let result = testVisit( + "foo", + "Identifier[type]", + ); + assertEquals(result[0].node.type, "Identifier"); + + result = testVisit( + "foo", + "Identifier[type='Identifier']", + ); + assertEquals(result[0].node.type, "Identifier"); +}); + +Deno.test("Plugin - visitor attr non-existing", () => { + const result = testVisit( + "foo", + "[non-existing]", + ); + assertEquals(result, []); +}); + +Deno.test("Plugin - visitor attr length special case", () => { + let result = testVisit( + "foo(1); foo(1, 2);", + "CallExpression[arguments.length=2]", + ); + assertEquals(result[0].node.arguments.length, 2); + + result = testVisit( + "foo(1); foo(1, 2);", + "CallExpression[arguments.length>1]", + ); + assertEquals(result[0].node.arguments.length, 2); + + result = testVisit( + "foo(1); foo(1, 2);", + "CallExpression[arguments.length<2]", + ); + assertEquals(result[0].node.arguments.length, 1); + + result = testVisit( + "foo(1); foo(1, 2);", + "CallExpression[arguments.length<=3]", + ); + assertEquals(result[0].node.arguments.length, 1); + assertEquals(result[1].node.arguments.length, 2); + + result = testVisit( + "foo(1); foo(1, 2);", + "CallExpression[arguments.length>=1]", + ); + assertEquals(result[0].node.arguments.length, 1); + assertEquals(result[1].node.arguments.length, 2); +}); + +Deno.test("Plugin - visitor :first-child", () => { + const result = testVisit( + "{ foo; bar }", + "BlockStatement ExpressionStatement:first-child Identifier", + ); + assertEquals(result[0].node.name, "foo"); +}); + +Deno.test("Plugin - visitor :last-child", () => { + const result = testVisit( + "{ foo; bar }", + "BlockStatement ExpressionStatement:last-child Identifier", + ); + assertEquals(result[0].node.name, "bar"); +}); + +Deno.test("Plugin - visitor :nth-child", () => { + let result = testVisit( + "{ foo; bar; baz; foobar; }", + "BlockStatement ExpressionStatement:nth-child(2) Identifier", + ); + assertEquals(result[0].node.name, "bar"); + + result = testVisit( + "{ foo; bar; baz; foobar; }", + "BlockStatement ExpressionStatement:nth-child(2n) Identifier", + ); + assertEquals(result[0].node.name, "foo"); + assertEquals(result[1].node.name, "baz"); + + result = testVisit( + "{ foo; bar; baz; foobar; }", + "BlockStatement ExpressionStatement:nth-child(2n + 1) Identifier", + ); + assertEquals(result[0].node.name, "bar"); + assertEquals(result[1].node.name, "foobar"); + + result = testVisit( + "{ foo; bar; baz; foobar; }", + "BlockStatement *:nth-child(2n + 1 of ExpressionStatement) Identifier", + ); + assertEquals(result[0].node.name, "bar"); + assertEquals(result[1].node.name, "foobar"); +}); + +Deno.test("Plugin - Program", () => { + const node = testLintNode("", "Program"); + assertEquals(node[0], { + type: "Program", + sourceType: "script", + range: [1, 1], + body: [], + }); +}); + +Deno.test("Plugin - BlockStatement", () => { + const node = testLintNode("{ foo; }", "BlockStatement"); + assertEquals(node[0], { + type: "BlockStatement", + range: [1, 9], + body: [{ + type: "ExpressionStatement", + range: [3, 7], + expression: { + type: "Identifier", + name: "foo", + range: [3, 6], + }, + }], + }); +}); + +Deno.test("Plugin - BreakStatement", () => { + let node = testLintNode("break;", "BreakStatement"); + assertEquals(node[0], { + type: "BreakStatement", + range: [1, 7], + label: null, + }); + + node = testLintNode("break foo;", "BreakStatement"); + assertEquals(node[0], { + type: "BreakStatement", + range: [1, 11], + label: { + type: "Identifier", + range: [7, 10], + name: "foo", + }, + }); +}); + +Deno.test("Plugin - ContinueStatement", () => { + let node = testLintNode("continue;", "ContinueStatement"); + assertEquals(node[0], { + type: "ContinueStatement", + range: [1, 10], + label: null, + }); + + node = testLintNode("continue foo;", "ContinueStatement"); + assertEquals(node[0], { + type: "ContinueStatement", + range: [1, 14], + label: { + type: "Identifier", + range: [10, 13], + name: "foo", + }, + }); +}); + +Deno.test("Plugin - DebuggerStatement", () => { + const node = testLintNode("debugger;", "DebuggerStatement"); + assertEquals(node[0], { + type: "DebuggerStatement", + range: [1, 10], + }); +}); + +Deno.test("Plugin - DoWhileStatement", () => { + const node = testLintNode("do {} while (foo);", "DoWhileStatement"); + assertEquals(node[0], { + type: "DoWhileStatement", + range: [1, 19], + test: { + type: "Identifier", + range: [14, 17], + name: "foo", + }, + body: { + type: "BlockStatement", + range: [4, 6], + body: [], + }, + }); +}); + +Deno.test("Plugin - ExpressionStatement", () => { + const node = testLintNode("foo;", "ExpressionStatement"); + assertEquals(node[0], { + type: "ExpressionStatement", + range: [1, 5], + expression: { + type: "Identifier", + range: [1, 4], + name: "foo", + }, + }); +}); + +Deno.test("Plugin - ForInStatement", () => { + const node = testLintNode("for (a in b) {}", "ForInStatement"); + assertEquals(node[0], { + type: "ForInStatement", + range: [1, 16], + left: { + type: "Identifier", + range: [6, 7], + name: "a", + }, + right: { + type: "Identifier", + range: [11, 12], + name: "b", + }, + body: { + type: "BlockStatement", + range: [14, 16], + body: [], + }, + }); +}); + +Deno.test("Plugin - ForOfStatement", () => { + let node = testLintNode("for (a of b) {}", "ForOfStatement"); + assertEquals(node[0], { + type: "ForOfStatement", + range: [1, 16], + await: false, + left: { + type: "Identifier", + range: [6, 7], + name: "a", + }, + right: { + type: "Identifier", + range: [11, 12], + name: "b", + }, + body: { + type: "BlockStatement", + range: [14, 16], + body: [], + }, + }); + + node = testLintNode("for await (a of b) {}", "ForOfStatement"); + assertEquals(node[0], { + type: "ForOfStatement", + range: [1, 22], + await: true, + left: { + type: "Identifier", + range: [12, 13], + name: "a", + }, + right: { + type: "Identifier", + range: [17, 18], + name: "b", + }, + body: { + type: "BlockStatement", + range: [20, 22], + body: [], + }, + }); +}); + +Deno.test("Plugin - ForStatement", () => { + let node = testLintNode("for (;;) {}", "ForStatement"); + assertEquals(node[0], { + type: "ForStatement", + range: [1, 12], + init: null, + test: null, + update: null, + body: { + type: "BlockStatement", + range: [10, 12], + body: [], + }, + }); + + node = testLintNode("for (a; b; c) {}", "ForStatement"); + assertEquals(node[0], { + type: "ForStatement", + range: [1, 17], + init: { + type: "Identifier", + range: [6, 7], + name: "a", + }, + test: { + type: "Identifier", + range: [9, 10], + name: "b", + }, + update: { + type: "Identifier", + range: [12, 13], + name: "c", + }, + body: { + type: "BlockStatement", + range: [15, 17], + body: [], + }, + }); +}); + +Deno.test("Plugin - IfStatement", () => { + let node = testLintNode("if (foo) {}", "IfStatement"); + assertEquals(node[0], { + type: "IfStatement", + range: [1, 12], + test: { + type: "Identifier", + name: "foo", + range: [5, 8], + }, + consequent: { + type: "BlockStatement", + range: [10, 12], + body: [], + }, + alternate: null, + }); + + node = testLintNode("if (foo) {} else {}", "IfStatement"); + assertEquals(node[0], { + type: "IfStatement", + range: [1, 20], + test: { + type: "Identifier", + name: "foo", + range: [5, 8], + }, + consequent: { + type: "BlockStatement", + range: [10, 12], + body: [], + }, + alternate: { + type: "BlockStatement", + range: [18, 20], + body: [], + }, + }); +}); + +Deno.test("Plugin - LabeledStatement", () => { + const node = testLintNode("foo: {};", "LabeledStatement"); + assertEquals(node[0], { + type: "LabeledStatement", + range: [1, 8], + label: { + type: "Identifier", + name: "foo", + range: [1, 4], + }, + body: { + type: "BlockStatement", + range: [6, 8], + body: [], + }, + }); +}); + +Deno.test("Plugin - ReturnStatement", () => { + let node = testLintNode("return", "ReturnStatement"); + assertEquals(node[0], { + type: "ReturnStatement", + range: [1, 7], + argument: null, + }); + + node = testLintNode("return foo;", "ReturnStatement"); + assertEquals(node[0], { + type: "ReturnStatement", + range: [1, 12], + argument: { + type: "Identifier", + name: "foo", + range: [8, 11], + }, + }); +}); + +Deno.test("Plugin - SwitchStatement", () => { + const node = testLintNode( + `switch (foo) { + case foo: + case bar: + break; + default: + {} + }`, + "SwitchStatement", + ); + assertEquals(node[0], { + type: "SwitchStatement", + range: [1, 94], + discriminant: { + type: "Identifier", + range: [9, 12], + name: "foo", + }, + cases: [ + { + type: "SwitchCase", + range: [22, 31], + test: { + type: "Identifier", + range: [27, 30], + name: "foo", + }, + consequent: [], + }, + { + type: "SwitchCase", + range: [38, 62], + test: { + type: "Identifier", + range: [43, 46], + name: "bar", + }, + consequent: [ + { + type: "BreakStatement", + label: null, + range: [56, 62], + }, + ], + }, + { + type: "SwitchCase", + range: [69, 88], + test: null, + consequent: [ + { + type: "BlockStatement", + range: [86, 88], + body: [], + }, + ], + }, + ], + }); +}); + +Deno.test("Plugin - ThrowStatement", () => { + const node = testLintNode("throw foo;", "ThrowStatement"); + assertEquals(node[0], { + type: "ThrowStatement", + range: [1, 11], + argument: { + type: "Identifier", + range: [7, 10], + name: "foo", + }, + }); +}); + +Deno.test("Plugin - TryStatement", () => { + let node = testLintNode("try {} catch {};", "TryStatement"); + assertEquals(node[0], { + type: "TryStatement", + range: [1, 16], + block: { + type: "BlockStatement", + range: [5, 7], + body: [], + }, + handler: { + type: "CatchClause", + range: [8, 16], + param: null, + body: { + type: "BlockStatement", + range: [14, 16], + body: [], + }, + }, + finalizer: null, + }); + + node = testLintNode("try {} catch (e) {};", "TryStatement"); + assertEquals(node[0], { + type: "TryStatement", + range: [1, 20], + block: { + type: "BlockStatement", + range: [5, 7], + body: [], + }, + handler: { + type: "CatchClause", + range: [8, 20], + param: { + type: "Identifier", + range: [15, 16], + name: "e", + }, + body: { + type: "BlockStatement", + range: [18, 20], + body: [], + }, + }, + finalizer: null, + }); + + node = testLintNode("try {} finally {};", "TryStatement"); + assertEquals(node[0], { + type: "TryStatement", + range: [1, 18], + block: { + type: "BlockStatement", + range: [5, 7], + body: [], + }, + handler: null, + finalizer: { + type: "BlockStatement", + range: [16, 18], + body: [], + }, + }); +}); + +Deno.test("Plugin - WhileStatement", () => { + const node = testLintNode("while (foo) {}", "WhileStatement"); + assertEquals(node[0], { + type: "WhileStatement", + range: [1, 15], + test: { + type: "Identifier", + range: [8, 11], + name: "foo", + }, + body: { + type: "BlockStatement", + range: [13, 15], + body: [], + }, + }); +}); diff --git a/tests/unit/lint_selectors_test.ts b/tests/unit/lint_selectors_test.ts new file mode 100644 index 00000000000000..c1168713189414 --- /dev/null +++ b/tests/unit/lint_selectors_test.ts @@ -0,0 +1,610 @@ +// Copyright 2018-2025 the Deno authors. MIT license. + +import { assertEquals } from "@std/assert/equals"; +import { + ATTR_BIN_NODE, + ATTR_EXISTS_NODE, + BinOp, + ELEM_NODE, + Lexer, + parseSelector, + PSEUDO_FIRST_CHILD, + PSEUDO_HAS, + PSEUDO_LAST_CHILD, + PSEUDO_NOT, + PSEUDO_NTH_CHILD, + RELATION_NODE, + splitSelectors, + Token, +} from "../../cli/js/40_lint_selector.js"; +import { assertThrows } from "@std/assert"; + +Deno.test("splitSelectors", () => { + assertEquals(splitSelectors("foo"), ["foo"]); + assertEquals(splitSelectors("foo, bar"), ["foo", "bar"]); + assertEquals(splitSelectors("foo:f(bar, baz)"), ["foo:f(bar, baz)"]); + assertEquals(splitSelectors("foo:f(bar, baz), foobar"), [ + "foo:f(bar, baz)", + "foobar", + ]); +}); + +interface LexState { + token: number; + value: string; +} + +function testLexer(input: string): LexState[] { + const out: LexState[] = []; + const l = new Lexer(input); + + while (l.token !== Token.EOF) { + out.push({ token: l.token, value: l.value }); + l.next(); + } + + return out; +} + +const Tags: Record = { Foo: 1, Bar: 2, FooBar: 3 }; +const Attrs: Record = { foo: 1, bar: 2, foobar: 3, attr: 4 }; +const toTag = (name: string): number => Tags[name]; +const toAttr = (name: string): number => Attrs[name]; + +const testParse = (input: string) => parseSelector(input, toTag, toAttr); + +Deno.test("Lexer - Elem", () => { + assertEquals(testLexer("Foo"), [ + { token: Token.Word, value: "Foo" }, + ]); + assertEquals(testLexer("foo-bar"), [ + { token: Token.Word, value: "foo-bar" }, + ]); + assertEquals(testLexer("foo_bar"), [ + { token: Token.Word, value: "foo_bar" }, + ]); + assertEquals(testLexer("Foo Bar Baz"), [ + { token: Token.Word, value: "Foo" }, + { token: Token.Space, value: "" }, + { token: Token.Word, value: "Bar" }, + { token: Token.Space, value: "" }, + { token: Token.Word, value: "Baz" }, + ]); + assertEquals(testLexer("Foo Bar Baz"), [ + { token: Token.Word, value: "Foo" }, + { token: Token.Space, value: "" }, + { token: Token.Word, value: "Bar" }, + { token: Token.Space, value: "" }, + { token: Token.Word, value: "Baz" }, + ]); +}); + +Deno.test("Lexer - Relation >", () => { + assertEquals(testLexer("Foo > Bar"), [ + { token: Token.Word, value: "Foo" }, + { token: Token.Op, value: ">" }, + { token: Token.Word, value: "Bar" }, + ]); + assertEquals(testLexer("Foo>Bar"), [ + { token: Token.Word, value: "Foo" }, + { token: Token.Op, value: ">" }, + { token: Token.Word, value: "Bar" }, + ]); + assertEquals(testLexer(">Bar"), [ + { token: Token.Op, value: ">" }, + { token: Token.Word, value: "Bar" }, + ]); +}); + +Deno.test("Lexer - Relation +", () => { + assertEquals(testLexer("Foo + Bar"), [ + { token: Token.Word, value: "Foo" }, + { token: Token.Op, value: "+" }, + { token: Token.Word, value: "Bar" }, + ]); + assertEquals(testLexer("Foo+Bar"), [ + { token: Token.Word, value: "Foo" }, + { token: Token.Op, value: "+" }, + { token: Token.Word, value: "Bar" }, + ]); + assertEquals(testLexer("+Bar"), [ + { token: Token.Op, value: "+" }, + { token: Token.Word, value: "Bar" }, + ]); +}); + +Deno.test("Lexer - Relation ~", () => { + assertEquals(testLexer("Foo ~ Bar"), [ + { token: Token.Word, value: "Foo" }, + { token: Token.Op, value: "~" }, + { token: Token.Word, value: "Bar" }, + ]); + assertEquals(testLexer("Foo~Bar"), [ + { token: Token.Word, value: "Foo" }, + { token: Token.Op, value: "~" }, + { token: Token.Word, value: "Bar" }, + ]); + assertEquals(testLexer("~Bar"), [ + { token: Token.Op, value: "~" }, + { token: Token.Word, value: "Bar" }, + ]); + + assertEquals(testLexer("Foo Bar ~ Bar"), [ + { token: Token.Word, value: "Foo" }, + { token: Token.Space, value: "" }, + { token: Token.Word, value: "Bar" }, + { token: Token.Op, value: "~" }, + { token: Token.Word, value: "Bar" }, + ]); +}); + +Deno.test("Lexer - Attr", () => { + assertEquals(testLexer("[attr]"), [ + { token: Token.BracketOpen, value: "" }, + { token: Token.Word, value: "attr" }, + { token: Token.BracketClose, value: "" }, + ]); + assertEquals(testLexer("[attr=1]"), [ + { token: Token.BracketOpen, value: "" }, + { token: Token.Word, value: "attr" }, + { token: Token.Op, value: "=" }, + { token: Token.Word, value: "1" }, + { token: Token.BracketClose, value: "" }, + ]); + assertEquals(testLexer("[attr='foo']"), [ + { token: Token.BracketOpen, value: "" }, + { token: Token.Word, value: "attr" }, + { token: Token.Op, value: "=" }, + { token: Token.String, value: "foo" }, + { token: Token.BracketClose, value: "" }, + ]); + assertEquals(testLexer("[attr>=2]"), [ + { token: Token.BracketOpen, value: "" }, + { token: Token.Word, value: "attr" }, + { token: Token.Op, value: ">=" }, + { token: Token.Word, value: "2" }, + { token: Token.BracketClose, value: "" }, + ]); + assertEquals(testLexer("[attr<=2]"), [ + { token: Token.BracketOpen, value: "" }, + { token: Token.Word, value: "attr" }, + { token: Token.Op, value: "<=" }, + { token: Token.Word, value: "2" }, + { token: Token.BracketClose, value: "" }, + ]); + assertEquals(testLexer("[attr>2]"), [ + { token: Token.BracketOpen, value: "" }, + { token: Token.Word, value: "attr" }, + { token: Token.Op, value: ">" }, + { token: Token.Word, value: "2" }, + { token: Token.BracketClose, value: "" }, + ]); + assertEquals(testLexer("[attr<2]"), [ + { token: Token.BracketOpen, value: "" }, + { token: Token.Word, value: "attr" }, + { token: Token.Op, value: "<" }, + { token: Token.Word, value: "2" }, + { token: Token.BracketClose, value: "" }, + ]); + assertEquals(testLexer("[attr!=2]"), [ + { token: Token.BracketOpen, value: "" }, + { token: Token.Word, value: "attr" }, + { token: Token.Op, value: "!=" }, + { token: Token.Word, value: "2" }, + { token: Token.BracketClose, value: "" }, + ]); + assertEquals(testLexer("[attr.foo=1]"), [ + { token: Token.BracketOpen, value: "" }, + { token: Token.Word, value: "attr" }, + { token: Token.Dot, value: "" }, + { token: Token.Word, value: "foo" }, + { token: Token.Op, value: "=" }, + { token: Token.Word, value: "1" }, + { token: Token.BracketClose, value: "" }, + ]); + assertEquals(testLexer("[attr] [attr]"), [ + { token: Token.BracketOpen, value: "" }, + { token: Token.Word, value: "attr" }, + { token: Token.BracketClose, value: "" }, + { token: Token.Space, value: "" }, + { token: Token.BracketOpen, value: "" }, + { token: Token.Word, value: "attr" }, + { token: Token.BracketClose, value: "" }, + ]); + assertEquals(testLexer("Foo[attr][attr2=1]"), [ + { token: Token.Word, value: "Foo" }, + { token: Token.BracketOpen, value: "" }, + { token: Token.Word, value: "attr" }, + { token: Token.BracketClose, value: "" }, + { token: Token.BracketOpen, value: "" }, + { token: Token.Word, value: "attr2" }, + { token: Token.Op, value: "=" }, + { token: Token.Word, value: "1" }, + { token: Token.BracketClose, value: "" }, + ]); +}); + +Deno.test("Lexer - Pseudo", () => { + assertEquals(testLexer(":foo-bar"), [ + { token: Token.Colon, value: "" }, + { token: Token.Word, value: "foo-bar" }, + ]); + assertEquals(testLexer("Foo:foo-bar"), [ + { token: Token.Word, value: "Foo" }, + { token: Token.Colon, value: "" }, + { token: Token.Word, value: "foo-bar" }, + ]); + assertEquals(testLexer(":foo-bar(baz)"), [ + { token: Token.Colon, value: "" }, + { token: Token.Word, value: "foo-bar" }, + { token: Token.BraceOpen, value: "" }, + { token: Token.Word, value: "baz" }, + { token: Token.BraceClose, value: "" }, + ]); + assertEquals(testLexer(":foo-bar(2n + 1)"), [ + { token: Token.Colon, value: "" }, + { token: Token.Word, value: "foo-bar" }, + { token: Token.BraceOpen, value: "" }, + { token: Token.Word, value: "2n" }, + { token: Token.Op, value: "+" }, + { token: Token.Word, value: "1" }, + { token: Token.BraceClose, value: "" }, + ]); +}); + +Deno.test("Parser - Elem", () => { + assertEquals(testParse("Foo"), [[ + { + type: ELEM_NODE, + elem: 1, + wildcard: false, + }, + ]]); +}); + +Deno.test("Parser - Relation (descendant)", () => { + assertEquals(testParse("Foo Bar"), [[ + { + type: ELEM_NODE, + elem: 1, + wildcard: false, + }, + { + type: RELATION_NODE, + op: BinOp.Space, + }, + { + type: ELEM_NODE, + elem: 2, + wildcard: false, + }, + ]]); +}); + +Deno.test("Parser - Relation", () => { + assertEquals(testParse("Foo > Bar"), [[ + { + type: ELEM_NODE, + elem: 1, + wildcard: false, + }, + { + type: RELATION_NODE, + op: BinOp.Greater, + }, + { + type: ELEM_NODE, + elem: 2, + wildcard: false, + }, + ]]); + + assertEquals(testParse("Foo ~ Bar"), [[ + { + type: ELEM_NODE, + elem: 1, + wildcard: false, + }, + { + type: RELATION_NODE, + op: BinOp.Tilde, + }, + { + type: ELEM_NODE, + elem: 2, + wildcard: false, + }, + ]]); + + assertEquals(testParse("Foo + Bar"), [[ + { + type: ELEM_NODE, + elem: 1, + wildcard: false, + }, + { + type: RELATION_NODE, + op: BinOp.Plus, + }, + { + type: ELEM_NODE, + elem: 2, + wildcard: false, + }, + ]]); +}); + +Deno.test("Parser - Attr", () => { + assertEquals(testParse("[foo]"), [[ + { + type: ATTR_EXISTS_NODE, + prop: [1], + }, + ]]); + + assertEquals(testParse("[foo][bar]"), [[ + { + type: ATTR_EXISTS_NODE, + prop: [1], + }, + { + type: ATTR_EXISTS_NODE, + prop: [2], + }, + ]]); + + assertEquals(testParse("[foo=1]"), [[ + { + type: ATTR_BIN_NODE, + op: BinOp.Equal, + prop: [1], + value: 1, + }, + ]]); + assertEquals(testParse("[foo=true]"), [[ + { + type: ATTR_BIN_NODE, + op: BinOp.Equal, + prop: [1], + value: true, + }, + ]]); + assertEquals(testParse("[foo=false]"), [[ + { + type: ATTR_BIN_NODE, + op: BinOp.Equal, + prop: [1], + value: false, + }, + ]]); + assertEquals(testParse("[foo=null]"), [[ + { + type: ATTR_BIN_NODE, + op: BinOp.Equal, + prop: [1], + value: null, + }, + ]]); + assertEquals(testParse("[foo='str']"), [[ + { + type: ATTR_BIN_NODE, + op: BinOp.Equal, + prop: [1], + value: "str", + }, + ]]); + assertEquals(testParse('[foo="str"]'), [[ + { + type: ATTR_BIN_NODE, + op: BinOp.Equal, + prop: [1], + value: "str", + }, + ]]); + assertEquals(testParse("[foo=/str/]"), [[ + { + type: ATTR_BIN_NODE, + op: BinOp.Equal, + prop: [1], + value: /str/, + }, + ]]); + assertEquals(testParse("[foo=/str/g]"), [[ + { + type: ATTR_BIN_NODE, + op: BinOp.Equal, + prop: [1], + value: /str/g, + }, + ]]); +}); + +Deno.test("Parser - Attr nested", () => { + assertEquals(testParse("[foo.bar]"), [[ + { + type: ATTR_EXISTS_NODE, + prop: [1, 2], + }, + ]]); + + assertEquals(testParse("[foo.bar = 2]"), [[ + { + type: ATTR_BIN_NODE, + op: BinOp.Equal, + prop: [1, 2], + value: 2, + }, + ]]); +}); + +Deno.test("Parser - Pseudo no value", () => { + assertEquals(testParse(":first-child"), [[ + { + type: PSEUDO_FIRST_CHILD, + }, + ]]); + assertEquals(testParse(":last-child"), [[ + { + type: PSEUDO_LAST_CHILD, + }, + ]]); +}); + +Deno.test("Parser - Pseudo nth-child", () => { + assertEquals(testParse(":nth-child(2)"), [[ + { + type: PSEUDO_NTH_CHILD, + of: null, + op: null, + step: 0, + stepOffset: 1, + repeat: false, + }, + ]]); + assertEquals(testParse(":nth-child(2n)"), [[ + { + type: PSEUDO_NTH_CHILD, + of: null, + op: null, + step: 2, + stepOffset: 0, + repeat: true, + }, + ]]); + assertEquals(testParse(":nth-child(-2n)"), [[ + { + type: PSEUDO_NTH_CHILD, + of: null, + op: null, + step: -2, + stepOffset: 0, + repeat: true, + }, + ]]); + assertEquals(testParse(":nth-child(2n + 1)"), [[ + { + type: PSEUDO_NTH_CHILD, + of: null, + op: "+", + step: 2, + stepOffset: 1, + repeat: true, + }, + ]]); + assertEquals(testParse(":nth-child(2n + 1 of Foo[attr])"), [[ + { + type: PSEUDO_NTH_CHILD, + of: [ + { type: ELEM_NODE, elem: 1, wildcard: false }, + { type: ATTR_EXISTS_NODE, prop: [4] }, + ], + op: "+", + step: 2, + stepOffset: 1, + repeat: true, + }, + ]]); + + // Invalid selectors + assertThrows(() => testParse(":nth-child(2n + 1 of Foo[attr], Bar)")); + assertThrows(() => testParse(":nth-child(2n - 1 foo)")); +}); + +Deno.test("Parser - Pseudo has/is/where", () => { + assertEquals(testParse(":has(Foo:has(Foo), Bar)"), [[ + { + type: PSEUDO_HAS, + selectors: [ + [ + { type: ELEM_NODE, elem: 1, wildcard: false }, + { + type: PSEUDO_HAS, + selectors: [ + [{ type: ELEM_NODE, elem: 1, wildcard: false }], + ], + }, + ], + [ + { type: ELEM_NODE, elem: 2, wildcard: false }, + ], + ], + }, + ]]); + assertEquals(testParse(":where(Foo:where(Foo), Bar)"), [[ + { + type: PSEUDO_HAS, + selectors: [ + [ + { type: ELEM_NODE, elem: 1, wildcard: false }, + { + type: PSEUDO_HAS, + selectors: [ + [{ type: ELEM_NODE, elem: 1, wildcard: false }], + ], + }, + ], + [ + { type: ELEM_NODE, elem: 2, wildcard: false }, + ], + ], + }, + ]]); + assertEquals(testParse(":is(Foo:is(Foo), Bar)"), [[ + { + type: PSEUDO_HAS, + selectors: [ + [ + { type: ELEM_NODE, elem: 1, wildcard: false }, + { + type: PSEUDO_HAS, + selectors: [ + [{ type: ELEM_NODE, elem: 1, wildcard: false }], + ], + }, + ], + [ + { type: ELEM_NODE, elem: 2, wildcard: false }, + ], + ], + }, + ]]); +}); + +Deno.test("Parser - Pseudo not", () => { + assertEquals(testParse(":not(Foo:not(Foo), Bar)"), [[ + { + type: PSEUDO_NOT, + selectors: [ + [ + { type: ELEM_NODE, elem: 1, wildcard: false }, + { + type: PSEUDO_NOT, + selectors: [ + [{ type: ELEM_NODE, elem: 1, wildcard: false }], + ], + }, + ], + [ + { type: ELEM_NODE, elem: 2, wildcard: false }, + ], + ], + }, + ]]); +}); + +Deno.test("Parser - mixed", () => { + assertEquals(testParse("Foo[foo=true] Bar"), [[ + { + type: ELEM_NODE, + elem: 1, + wildcard: false, + }, + { type: ATTR_BIN_NODE, op: BinOp.Equal, prop: [1], value: true }, + { type: RELATION_NODE, op: BinOp.Space }, + { + type: ELEM_NODE, + elem: 2, + wildcard: false, + }, + ]]); +}); diff --git a/tests/unit/make_temp_test.ts b/tests/unit/make_temp_test.ts index 32383387b5aac3..d22b6330917c09 100644 --- a/tests/unit/make_temp_test.ts +++ b/tests/unit/make_temp_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, diff --git a/tests/unit/message_channel_test.ts b/tests/unit/message_channel_test.ts index 0fcbc5e95d470b..bf7bb6443aee81 100644 --- a/tests/unit/message_channel_test.ts +++ b/tests/unit/message_channel_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // NOTE: these are just sometests to test the TypeScript types. Real coverage is // provided by WPT. import { assert, assertEquals } from "@std/assert"; diff --git a/tests/unit/mkdir_test.ts b/tests/unit/mkdir_test.ts index def77cd3e4534a..7b71e4a7998523 100644 --- a/tests/unit/mkdir_test.ts +++ b/tests/unit/mkdir_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, diff --git a/tests/unit/navigator_test.ts b/tests/unit/navigator_test.ts index 5dcc423fa53d21..955c34dcc46881 100644 --- a/tests/unit/navigator_test.ts +++ b/tests/unit/navigator_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert } from "./test_util.ts"; Deno.test(function navigatorNumCpus() { diff --git a/tests/unit/net_test.ts b/tests/unit/net_test.ts index cfa42b3d360135..9c2819c30a48a9 100644 --- a/tests/unit/net_test.ts +++ b/tests/unit/net_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, diff --git a/tests/unit/network_interfaces_test.ts b/tests/unit/network_interfaces_test.ts index 160efbfe6001dc..675400365f65a7 100644 --- a/tests/unit/network_interfaces_test.ts +++ b/tests/unit/network_interfaces_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert } from "./test_util.ts"; diff --git a/tests/unit/ops_test.ts b/tests/unit/ops_test.ts index 6de55f8b667918..60f67cdca67ae8 100644 --- a/tests/unit/ops_test.ts +++ b/tests/unit/ops_test.ts @@ -1,6 +1,6 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -const EXPECTED_OP_COUNT = 12; +const EXPECTED_OP_COUNT = 13; Deno.test(function checkExposedOps() { // @ts-ignore TS doesn't allow to index with symbol diff --git a/tests/unit/os_test.ts b/tests/unit/os_test.ts index a70796505f96da..36b6daad2fbd08 100644 --- a/tests/unit/os_test.ts +++ b/tests/unit/os_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, diff --git a/tests/unit/path_from_url_test.ts b/tests/unit/path_from_url_test.ts index b3a6406bcb5eae..3785f2bbb50fec 100644 --- a/tests/unit/path_from_url_test.ts +++ b/tests/unit/path_from_url_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, assertThrows } from "./test_util.ts"; diff --git a/tests/unit/performance_test.ts b/tests/unit/performance_test.ts index fa056c7f545301..22f51a4ce66fe9 100644 --- a/tests/unit/performance_test.ts +++ b/tests/unit/performance_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, diff --git a/tests/unit/permissions_test.ts b/tests/unit/permissions_test.ts index f981b10fd6975a..8bb1633423253b 100644 --- a/tests/unit/permissions_test.ts +++ b/tests/unit/permissions_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, diff --git a/tests/unit/process_test.ts b/tests/unit/process_test.ts index 5cbab3b4c58216..17589d8581413f 100644 --- a/tests/unit/process_test.ts +++ b/tests/unit/process_test.ts @@ -1,5 +1,5 @@ // deno-lint-ignore-file no-deprecated-deno-api -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, diff --git a/tests/unit/progressevent_test.ts b/tests/unit/progressevent_test.ts index 809c2ad3919a5c..3e7aa9ec15e802 100644 --- a/tests/unit/progressevent_test.ts +++ b/tests/unit/progressevent_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals } from "./test_util.ts"; Deno.test(function progressEventConstruct() { diff --git a/tests/unit/promise_hooks_test.ts b/tests/unit/promise_hooks_test.ts index f7c44155d1666e..7fd7a8f51da570 100644 --- a/tests/unit/promise_hooks_test.ts +++ b/tests/unit/promise_hooks_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals } from "./test_util.ts"; diff --git a/tests/unit/quic_test.ts b/tests/unit/quic_test.ts new file mode 100644 index 00000000000000..63163e15d6c50e --- /dev/null +++ b/tests/unit/quic_test.ts @@ -0,0 +1,172 @@ +// Copyright 2018-2025 the Deno authors. MIT license. + +import { assertEquals } from "./test_util.ts"; + +const cert = Deno.readTextFileSync("tests/testdata/tls/localhost.crt"); +const key = Deno.readTextFileSync("tests/testdata/tls/localhost.key"); +const caCerts = [Deno.readTextFileSync("tests/testdata/tls/RootCA.pem")]; + +async function pair(opt?: Deno.QuicTransportOptions): Promise< + [Deno.QuicConn, Deno.QuicConn, Deno.QuicListener] +> { + const listener = await Deno.listenQuic({ + hostname: "localhost", + port: 0, + cert, + key, + alpnProtocols: ["deno-test"], + ...opt, + }); + + const [server, client] = await Promise.all([ + listener.accept(), + Deno.connectQuic({ + hostname: "localhost", + port: listener.addr.port, + caCerts, + alpnProtocols: ["deno-test"], + ...opt, + }), + ]); + + assertEquals(server.protocol, "deno-test"); + assertEquals(client.protocol, "deno-test"); + assertEquals(client.remoteAddr, listener.addr); + + return [server, client, listener]; +} + +Deno.test("bidirectional stream", async () => { + const [server, client, listener] = await pair(); + + const encoded = (new TextEncoder()).encode("hi!"); + + { + const bi = await server.createBidirectionalStream({ sendOrder: 42 }); + assertEquals(bi.writable.sendOrder, 42); + bi.writable.sendOrder = 0; + assertEquals(bi.writable.sendOrder, 0); + await bi.writable.getWriter().write(encoded); + } + + { + const { value: bi } = await client.incomingBidirectionalStreams + .getReader() + .read(); + const { value: data } = await bi!.readable.getReader().read(); + assertEquals(data, encoded); + } + + listener.close({ closeCode: 0, reason: "" }); + client.close({ closeCode: 0, reason: "" }); +}); + +Deno.test("unidirectional stream", async () => { + const [server, client, listener] = await pair(); + + const encoded = (new TextEncoder()).encode("hi!"); + + { + const uni = await server.createUnidirectionalStream({ sendOrder: 42 }); + assertEquals(uni.sendOrder, 42); + uni.sendOrder = 0; + assertEquals(uni.sendOrder, 0); + await uni.getWriter().write(encoded); + } + + { + const { value: uni } = await client.incomingUnidirectionalStreams + .getReader() + .read(); + const { value: data } = await uni!.getReader().read(); + assertEquals(data, encoded); + } + + listener.close({ closeCode: 0, reason: "" }); + client.close({ closeCode: 0, reason: "" }); +}); + +Deno.test("datagrams", async () => { + const [server, client, listener] = await pair(); + + const encoded = (new TextEncoder()).encode("hi!"); + + await server.sendDatagram(encoded); + + const data = await client.readDatagram(); + assertEquals(data, encoded); + + listener.close({ closeCode: 0, reason: "" }); + client.close({ closeCode: 0, reason: "" }); +}); + +Deno.test("closing", async () => { + const [server, client, listener] = await pair(); + + server.close({ closeCode: 42, reason: "hi!" }); + + assertEquals(await client.closed, { closeCode: 42, reason: "hi!" }); + + listener.close({ closeCode: 0, reason: "" }); +}); + +Deno.test("max concurrent streams", async () => { + const [server, client, listener] = await pair({ + maxConcurrentBidirectionalStreams: 1, + maxConcurrentUnidirectionalStreams: 1, + }); + + { + await server.createBidirectionalStream(); + await server.createBidirectionalStream() + .then(() => { + throw new Error("expected failure"); + }, () => { + // success! + }); + } + + { + await server.createUnidirectionalStream(); + await server.createUnidirectionalStream() + .then(() => { + throw new Error("expected failure"); + }, () => { + // success! + }); + } + + listener.close({ closeCode: 0, reason: "" }); + server.close({ closeCode: 0, reason: "" }); + client.close({ closeCode: 0, reason: "" }); +}); + +Deno.test("incoming", async () => { + const listener = await Deno.listenQuic({ + hostname: "localhost", + port: 0, + cert, + key, + alpnProtocols: ["deno-test"], + }); + + const connect = () => + Deno.connectQuic({ + hostname: "localhost", + port: listener.addr.port, + caCerts, + alpnProtocols: ["deno-test"], + }); + + const c1p = connect(); + const i1 = await listener.incoming(); + const server = await i1.accept(); + const client = await c1p; + + assertEquals(server.protocol, "deno-test"); + assertEquals(client.protocol, "deno-test"); + assertEquals(client.remoteAddr, listener.addr); + + listener.close({ closeCode: 0, reason: "" }); + client.close({ closeCode: 0, reason: "" }); +}); diff --git a/tests/unit/read_dir_test.ts b/tests/unit/read_dir_test.ts index b00495eb459e27..9c5e6da79f8af3 100644 --- a/tests/unit/read_dir_test.ts +++ b/tests/unit/read_dir_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, diff --git a/tests/unit/read_file_test.ts b/tests/unit/read_file_test.ts index 7123833e9c5591..5716816b374de1 100644 --- a/tests/unit/read_file_test.ts +++ b/tests/unit/read_file_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, diff --git a/tests/unit/read_link_test.ts b/tests/unit/read_link_test.ts index c89ffe4927d3ec..7ecee2d567cefb 100644 --- a/tests/unit/read_link_test.ts +++ b/tests/unit/read_link_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, assertRejects, diff --git a/tests/unit/read_text_file_test.ts b/tests/unit/read_text_file_test.ts index 1ec57bde3578f5..39cd3e798c7db4 100644 --- a/tests/unit/read_text_file_test.ts +++ b/tests/unit/read_text_file_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, diff --git a/tests/unit/real_path_test.ts b/tests/unit/real_path_test.ts index 7832846308b553..79dd0c084f420f 100644 --- a/tests/unit/real_path_test.ts +++ b/tests/unit/real_path_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, diff --git a/tests/unit/ref_unref_test.ts b/tests/unit/ref_unref_test.ts index 6f5bcf0a7793ba..751f2af387fda1 100644 --- a/tests/unit/ref_unref_test.ts +++ b/tests/unit/ref_unref_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertNotEquals, execCode } from "./test_util.ts"; diff --git a/tests/unit/remove_test.ts b/tests/unit/remove_test.ts index 261ff6bd05e3cd..38421f8610f643 100644 --- a/tests/unit/remove_test.ts +++ b/tests/unit/remove_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertRejects, assertThrows } from "./test_util.ts"; const REMOVE_METHODS = ["remove", "removeSync"] as const; diff --git a/tests/unit/rename_test.ts b/tests/unit/rename_test.ts index 3162c699c68d46..bacd54c6759de0 100644 --- a/tests/unit/rename_test.ts +++ b/tests/unit/rename_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, diff --git a/tests/unit/request_test.ts b/tests/unit/request_test.ts index fe34c20a506c10..fa7619cd93315b 100644 --- a/tests/unit/request_test.ts +++ b/tests/unit/request_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, assertStringIncludes } from "./test_util.ts"; Deno.test(async function fromInit() { diff --git a/tests/unit/response_test.ts b/tests/unit/response_test.ts index bbdd5f481ddca0..383790af3ab327 100644 --- a/tests/unit/response_test.ts +++ b/tests/unit/response_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, diff --git a/tests/unit/serve_test.ts b/tests/unit/serve_test.ts index 7d8c6ca06d1d37..88aecefbcb280c 100644 --- a/tests/unit/serve_test.ts +++ b/tests/unit/serve_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-console @@ -387,7 +387,7 @@ Deno.test(async function httpServerCanResolveHostnames() { const ac = new AbortController(); const { promise, resolve } = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: (_req) => new Response("ok"), hostname: "localhost", port: servePort, @@ -410,7 +410,7 @@ Deno.test(async function httpServerRejectsOnAddrInUse() { const ac = new AbortController(); const { promise, resolve } = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: (_req) => new Response("ok"), hostname: "localhost", port: servePort, @@ -441,7 +441,7 @@ Deno.test({ permissions: { net: true } }, async function httpServerBasic() { const deferred = Promise.withResolvers(); const listeningDeferred = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: async (request, { remoteAddr }) => { // FIXME(bartlomieju): // make sure that request can be inspected @@ -483,7 +483,7 @@ Deno.test( const deferred = Promise.withResolvers(); const listeningDeferred = Promise.withResolvers(); const listener = Deno.listen({ port: servePort }); - const server = serveHttpOnListener( + await using server = serveHttpOnListener( listener, ac.signal, async ( @@ -532,7 +532,7 @@ Deno.test( headers: { "connection": "close" }, }); - const server = serveHttpOnConnection( + await using server = serveHttpOnConnection( await acceptPromise, ac.signal, async ( @@ -572,7 +572,7 @@ Deno.test({ permissions: { net: true } }, async function httpServerOnError() { const { promise, resolve } = Promise.withResolvers(); let requestStash: Request | null; - const server = Deno.serve({ + await using server = Deno.serve({ handler: async (request: Request) => { requestStash = request; await new Promise((r) => setTimeout(r, 100)); @@ -607,7 +607,7 @@ Deno.test( // deno-lint-ignore no-unused-vars let requestStash: Request | null; - const server = Deno.serve({ + await using server = Deno.serve({ handler: async (request: Request) => { requestStash = request; await new Promise((r) => setTimeout(r, 100)); @@ -640,7 +640,7 @@ Deno.test( const { promise, resolve } = Promise.withResolvers(); const response = new Response("Hello World"); let hadError = false; - const server = Deno.serve({ + await using server = Deno.serve({ handler: () => { return response; }, @@ -684,7 +684,7 @@ Deno.test( const ac = new AbortController(); const { promise, resolve } = Promise.withResolvers(); let hadError = false; - const server = Deno.serve({ + await using server = Deno.serve({ handler: () => { return Response.error(); }, @@ -717,7 +717,7 @@ Deno.test({ permissions: { net: true } }, async function httpServerOverload1() { const deferred = Promise.withResolvers(); const listeningDeferred = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ port: servePort, signal: ac.signal, onListen: onListen(listeningDeferred.resolve), @@ -752,7 +752,7 @@ Deno.test({ permissions: { net: true } }, async function httpServerOverload2() { const deferred = Promise.withResolvers(); const listeningDeferred = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ port: servePort, signal: ac.signal, onListen: onListen(listeningDeferred.resolve), @@ -807,7 +807,7 @@ Deno.test( Deno.test({ permissions: { net: true } }, async function httpServerPort0() { const ac = new AbortController(); - const server = Deno.serve({ + await using server = Deno.serve({ handler() { return new Response("Hello World"); }, @@ -841,7 +841,7 @@ Deno.test( }; try { - const server = Deno.serve({ + await using server = Deno.serve({ handler() { return new Response("Hello World"); }, @@ -866,7 +866,7 @@ Deno.test( const ac = new AbortController(); let headers: Headers; - const server = Deno.serve({ + await using server = Deno.serve({ handler: async (request) => { await request.text(); headers = request.headers; @@ -896,7 +896,7 @@ Deno.test( ); Deno.test({ permissions: { net: true } }, async function validPortString() { - const server = Deno.serve({ + await using server = Deno.serve({ handler: (_request) => new Response(), port: "4501" as unknown as number, }); @@ -921,7 +921,7 @@ Deno.test({ permissions: { net: true } }, async function ipv6Hostname() { }; try { - const server = Deno.serve({ + await using server = Deno.serve({ handler: () => new Response(), hostname: "::1", port: 0, @@ -1017,7 +1017,7 @@ function createUrlTest( const listeningDeferred = Promise.withResolvers(); const urlDeferred = Promise.withResolvers(); const ac = new AbortController(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: (request: Request) => { urlDeferred.resolve(request.url); return new Response(""); @@ -1117,7 +1117,7 @@ Deno.test( const ac = new AbortController(); const listeningDeferred = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: (request) => { assertEquals(request.body, null); deferred.resolve(); @@ -1157,7 +1157,7 @@ Deno.test( const ac = new AbortController(); const listeningDeferred = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: async (request) => { await assertRejects(async () => { await request.text(); @@ -1221,7 +1221,7 @@ function createStreamTest(count: number, delay: number, action: string) { Deno.test(`httpServerStreamCount${count}Delay${delay}${action}`, async () => { const ac = new AbortController(); const { promise, resolve } = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: (_request) => { return new Response(makeStream(count, delay)); }, @@ -1275,7 +1275,7 @@ Deno.test( writer.close(); const { promise, resolve } = Promise.withResolvers(); const ac = new AbortController(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: async (request) => { const reqBody = await request.text(); assertEquals("hello world", reqBody); @@ -1303,7 +1303,7 @@ Deno.test( Deno.test({ permissions: { net: true } }, async function httpServerClose() { const ac = new AbortController(); const { promise, resolve } = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: () => new Response("ok"), port: servePort, signal: ac.signal, @@ -1323,7 +1323,7 @@ Deno.test({ permissions: { net: true } }, async function httpServerCloseGet() { const listeningDeferred = Promise.withResolvers(); const requestDeferred = Promise.withResolvers(); const responseDeferred = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: async () => { requestDeferred.resolve(); await new Promise((r) => setTimeout(r, 500)); @@ -1349,13 +1349,12 @@ Deno.test({ permissions: { net: true } }, async function httpServerCloseGet() { await server.finished; }); -// FIXME: Deno.test( { permissions: { net: true } }, async function httpServerEmptyBlobResponse() { const ac = new AbortController(); const { promise, resolve } = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: () => new Response(new Blob([])), port: servePort, signal: ac.signal, @@ -1380,7 +1379,7 @@ Deno.test( const ac = new AbortController(); const listeningDeferred = Promise.withResolvers(); const errorDeferred = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: () => { const body = new ReadableStream({ start(controller) { @@ -1421,7 +1420,7 @@ Deno.test( const ac = new AbortController(); const { promise, resolve } = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: () => new Response("韓國".repeat(10)), port: servePort, signal: ac.signal, @@ -1456,7 +1455,7 @@ Deno.test({ permissions: { net: true } }, async function httpServerWebSocket() { const ac = new AbortController(); const listeningDeferred = Promise.withResolvers(); const doneDeferred = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: (request) => { const { response, @@ -1501,7 +1500,7 @@ Deno.test( async function httpServerWebSocketRaw() { const ac = new AbortController(); const { promise, resolve } = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: async (request) => { const { conn, response } = upgradeHttpRaw(request); const buf = new Uint8Array(1024); @@ -1581,7 +1580,7 @@ Deno.test( const ac = new AbortController(); const done = Promise.withResolvers(); const listeningDeferred = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: (request) => { const { response, @@ -1635,7 +1634,7 @@ Deno.test( const ac = new AbortController(); const done = Promise.withResolvers(); const listeningDeferred = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: (request) => { const { response, @@ -1673,7 +1672,7 @@ Deno.test( const ac = new AbortController(); const done = Promise.withResolvers(); const listeningDeferred = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: (request) => { const { response, @@ -1723,7 +1722,7 @@ Deno.test( const ac = new AbortController(); let headers: Headers; - const server = Deno.serve({ + await using server = Deno.serve({ handler: (request) => { headers = request.headers; deferred.resolve(); @@ -1762,7 +1761,7 @@ Deno.test( let headers: Headers; let text: string; - const server = Deno.serve({ + await using server = Deno.serve({ handler: async (request) => { headers = request.headers; text = await request.text(); @@ -1807,7 +1806,7 @@ Deno.test( const ac = new AbortController(); const listeningDeferred = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: () => { deferred.resolve(); return new Response(""); @@ -1858,7 +1857,7 @@ Deno.test( const { promise, resolve } = Promise.withResolvers(); const ac = new AbortController(); - const server = Deno.serve( + await using server = Deno.serve( { port: servePort, signal: ac.signal }, (request: Request) => { assert(request.body); @@ -1889,7 +1888,7 @@ Deno.test( const { promise, resolve } = Promise.withResolvers(); const ac = new AbortController(); - const server = Deno.serve( + await using server = Deno.serve( { port: servePort, signal: ac.signal }, (request: Request) => { assert(request.body); @@ -2005,7 +2004,7 @@ Deno.test( }).pipeThrough(new TextEncoderStream()); } - const server = Deno.serve({ + await using server = Deno.serve({ handler: () => { deferred.resolve(); return new Response(periodicStream()); @@ -2037,7 +2036,7 @@ Deno.test( { permissions: { net: true } }, async function httpLargeReadableStreamChunk() { const ac = new AbortController(); - const server = Deno.serve({ + await using server = Deno.serve({ handler() { return new Response( new ReadableStream({ @@ -2077,7 +2076,7 @@ Deno.test( const listeningDeferred = Promise.withResolvers(); const deferred = Promise.withResolvers(); const ac = new AbortController(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: (request) => { assertEquals(request.headers.get("X-Header-Test"), "á"); deferred.resolve(); @@ -2123,7 +2122,7 @@ Deno.test( const listeningDeferred = Promise.withResolvers(); const ac = new AbortController(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: async (request) => { // FIXME: // assertEquals(new URL(request.url).href, `http://127.0.0.1:${servePort}/`); @@ -2177,7 +2176,7 @@ Deno.test( const listeningDeferred = Promise.withResolvers(); const ac = new AbortController(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: async (request) => { assertEquals(await request.text(), ""); assertEquals(request.headers.get("cookie"), "foo=bar; bar=foo"); @@ -2221,7 +2220,7 @@ Deno.test( const hostname = "localhost"; - const server = Deno.serve({ + await using server = Deno.serve({ handler: () => { deferred.resolve(); return new Response("ok"); @@ -2256,7 +2255,7 @@ Deno.test( const listeningDeferred = Promise.withResolvers(); const ac = new AbortController(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: (request) => { assertEquals(request.body, null); deferred.resolve(); @@ -2292,7 +2291,7 @@ Deno.test( const listeningDeferred = Promise.withResolvers(); const ac = new AbortController(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: (request) => { assertEquals(request.method, "GET"); assertEquals(request.headers.get("host"), "deno.land"); @@ -2326,7 +2325,7 @@ Deno.test( const listeningDeferred = Promise.withResolvers(); const ac = new AbortController(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: (request) => { assertEquals(request.method, "GET"); assertEquals(request.headers.get("server"), "hello\tworld"); @@ -2360,7 +2359,7 @@ Deno.test( const listeningDeferred = Promise.withResolvers(); const ac = new AbortController(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: async (request) => { assertEquals(request.method, "GET"); assertEquals(await request.text(), ""); @@ -2396,7 +2395,7 @@ Deno.test( const listeningDeferred = Promise.withResolvers(); const ac = new AbortController(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: async (request) => { assertEquals(request.method, "POST"); assertEquals(await request.text(), "I'm a good request."); @@ -2443,7 +2442,7 @@ function createServerLengthTest(name: string, testCase: TestCase) { const listeningDeferred = Promise.withResolvers(); const ac = new AbortController(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: (request) => { assertEquals(request.method, "GET"); deferred.resolve(); @@ -2575,7 +2574,7 @@ Deno.test( const listeningDeferred = Promise.withResolvers(); const ac = new AbortController(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: async (request) => { assertEquals(request.method, "POST"); assertEquals(request.headers.get("content-length"), "5"); @@ -2611,7 +2610,7 @@ Deno.test( async function httpServerPostWithInvalidPrefixContentLength() { const ac = new AbortController(); const { promise, resolve } = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: () => { throw new Error("unreachable"); }, @@ -2651,7 +2650,7 @@ Deno.test( const listeningDeferred = Promise.withResolvers(); const ac = new AbortController(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: async (request) => { assertEquals(request.method, "POST"); assertEquals(await request.text(), "qwert"); @@ -2688,7 +2687,7 @@ Deno.test( const listeningDeferred = Promise.withResolvers(); const ac = new AbortController(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: async (r) => { deferred.resolve(); assertEquals(await r.text(), "12345"); @@ -2724,7 +2723,7 @@ Deno.test( const listeningDeferred = Promise.withResolvers(); const ac = new AbortController(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: () => { deferred.resolve(); return new Response("NaN".repeat(100)); @@ -2867,7 +2866,7 @@ for (const testCase of compressionTestCases) { const deferred = Promise.withResolvers(); const listeningDeferred = Promise.withResolvers(); const ac = new AbortController(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: async (_request) => { const f = await makeTempFile(testCase.length); deferred.resolve(); @@ -2923,7 +2922,7 @@ Deno.test( const listeningDeferred = Promise.withResolvers(); const ac = new AbortController(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: async (request) => { assertEquals( await request.bytes(), @@ -2971,7 +2970,7 @@ for (const delay of ["delay", "nodelay"]) { const listeningDeferred = Promise.withResolvers(); const waitForAbort = Promise.withResolvers(); const waitForRequest = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ port: servePort, signal: ac.signal, onListen: onListen(listeningDeferred.resolve), @@ -3121,7 +3120,7 @@ Deno.test( const { promise, resolve } = Promise.withResolvers(); const hostname = "127.0.0.1"; - const server = Deno.serve({ + await using server = Deno.serve({ handler: () => new Response("Hello World"), hostname, port: servePort, @@ -3151,7 +3150,7 @@ Deno.test( const { promise, resolve } = Promise.withResolvers(); const hostname = "127.0.0.1"; - const server = Deno.serve({ + await using server = Deno.serve({ handler: () => new Response("Hello World"), hostname, port: servePort, @@ -3186,7 +3185,7 @@ Deno.test( const listeningDeferred = Promise.withResolvers(); const deferred = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: async (req) => { assertEquals(await req.text(), ""); deferred.resolve(); @@ -3221,7 +3220,7 @@ Deno.test( const ac = new AbortController(); const { promise, resolve } = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: () => { throw new Error("oops"); }, @@ -3268,7 +3267,7 @@ Deno.test( async function httpServer204ResponseDoesntSendContentLength() { const { promise, resolve } = Promise.withResolvers(); const ac = new AbortController(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: (_request) => new Response(null, { status: 204 }), port: servePort, signal: ac.signal, @@ -3298,7 +3297,7 @@ Deno.test( const ac = new AbortController(); const listeningDeferred = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: () => { deferred.resolve(); return new Response(null, { status: 304 }); @@ -3343,7 +3342,7 @@ Deno.test( const ac = new AbortController(); const listeningDeferred = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: async (req) => { deferred.resolve(); assertEquals(await req.text(), "hello"); @@ -3404,7 +3403,7 @@ Deno.test( const listeningDeferred = Promise.withResolvers(); const ac = new AbortController(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: async (req) => { deferred.resolve(); assertEquals(await req.text(), ""); @@ -3458,7 +3457,7 @@ for (const [name, req] of badRequests) { const ac = new AbortController(); const { promise, resolve } = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: () => { throw new Error("oops"); }, @@ -3505,7 +3504,7 @@ Deno.test( let reqCount = -1; let timerId: number | undefined; - const server = Deno.serve({ + await using server = Deno.serve({ handler: (_req) => { reqCount++; if (reqCount === 0) { @@ -3600,7 +3599,7 @@ Deno.test( const ac = new AbortController(); const { promise, resolve } = Promise.withResolvers(); let count = 0; - const server = Deno.serve({ + await using server = Deno.serve({ async onListen({ port }: { port: number }) { const res1 = await fetch(`http://localhost:${port}/`); assertEquals(await res1.text(), "hello world 1"); @@ -3630,7 +3629,7 @@ Deno.test( const ac = new AbortController(); const { promise, resolve } = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: async (req) => { const cloned = req.clone(); assertEquals(req.headers, cloned.headers); @@ -3684,7 +3683,7 @@ Deno.test( const ac = new AbortController(); const { promise, resolve } = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: async (req) => { await req.text(); @@ -3733,7 +3732,7 @@ Deno.test({ const ac = new AbortController(); const { promise, resolve } = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: async (req) => { const _reader = req.body?.getReader(); @@ -3780,7 +3779,7 @@ Deno.test( async function testIssue16567() { const ac = new AbortController(); const { promise, resolve } = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ async onListen({ port }) { const res1 = await fetch(`http://localhost:${port}/`); assertEquals((await res1.text()).length, 40 * 50_000); @@ -3947,7 +3946,7 @@ Deno.test( }, async function httpServeCurlH2C() { const ac = new AbortController(); - const server = Deno.serve( + await using server = Deno.serve( { port: servePort, signal: ac.signal }, () => new Response("hello world!"), ); @@ -3982,7 +3981,7 @@ Deno.test( const ac = new AbortController(); const { resolve } = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: () => { const response = new Response("Hello World", { headers: { @@ -4025,7 +4024,7 @@ Deno.test( }, async function httpsServeCurlH2C() { const ac = new AbortController(); - const server = Deno.serve( + await using server = Deno.serve( { signal: ac.signal, port: servePort, @@ -4082,7 +4081,7 @@ Deno.test( const { promise, resolve } = Promise.withResolvers(); const ac = new AbortController(); const filePath = tmpUnixSocketPath(); - const server = Deno.serve( + await using server = Deno.serve( { signal: ac.signal, path: filePath, @@ -4115,7 +4114,7 @@ Deno.test( const listeningDeferred = Promise.withResolvers(); const ac = new AbortController(); - const server = Deno.serve( + await using server = Deno.serve( { port: servePort, onListen: onListen(listeningDeferred.resolve), @@ -4151,7 +4150,7 @@ Deno.test( const { promise, resolve } = Promise.withResolvers(); const ac = new AbortController(); - const server = Deno.serve( + await using server = Deno.serve( { port: servePort, onListen: onListen(resolve), @@ -4187,7 +4186,7 @@ Deno.test( let timer: number | undefined = undefined; let _controller; - const server = Deno.serve( + await using server = Deno.serve( { port: servePort, onListen: onListen(resolve), @@ -4237,7 +4236,7 @@ Deno.test({ await assertRejects( async () => { const ac = new AbortController(); - const server = Deno.serve({ + await using server = Deno.serve({ path: "path/to/socket", handler: (_req) => new Response("Hello, world"), signal: ac.signal, @@ -4260,7 +4259,7 @@ Deno.test({ }, async () => { const { promise, resolve } = Promise.withResolvers<{ hostname: string }>(); - const server = Deno.serve({ + await using server = Deno.serve({ handler: (_) => new Response("ok"), hostname: "0.0.0.0", port: 0, @@ -4278,7 +4277,7 @@ Deno.test({ let cancelled = false; - const server = Deno.serve({ + await using server = Deno.serve({ hostname: "0.0.0.0", port: servePort, onListen: () => resolve(), @@ -4305,7 +4304,7 @@ Deno.test({ }, async () => { const { promise, resolve } = Promise.withResolvers(); - const server = Deno.serve({ + await using server = Deno.serve({ hostname: "0.0.0.0", port: servePort, onListen: () => resolve(), @@ -4327,3 +4326,55 @@ Deno.test({ await server.shutdown(); }); + +// https://github.com/denoland/deno/issues/27083 +Deno.test( + { permissions: { net: true } }, + async function httpServerWebSocketInspectRequest() { + const ac = new AbortController(); + const listeningDeferred = Promise.withResolvers(); + const doneDeferred = Promise.withResolvers(); + await using server = Deno.serve({ + handler: (request) => { + const { + response, + socket, + } = Deno.upgradeWebSocket(request); + + socket.onopen = () => { + Deno.inspect(request); // should not throw + }; + socket.onerror = (e) => { + console.error(e); + fail(); + }; + socket.onmessage = (m) => { + socket.send(m.data); + socket.close(1001); + }; + socket.onclose = () => doneDeferred.resolve(); + return response; + }, + port: servePort, + signal: ac.signal, + onListen: onListen(listeningDeferred.resolve), + onError: createOnErrorCb(ac), + }); + + await listeningDeferred.promise; + const def = Promise.withResolvers(); + const ws = new WebSocket(`ws://localhost:${servePort}`); + ws.onmessage = (m) => assertEquals(m.data, "foo"); + ws.onerror = (e) => { + console.error(e); + fail(); + }; + ws.onclose = () => def.resolve(); + ws.onopen = () => ws.send("foo"); + + await def.promise; + await doneDeferred.promise; + ac.abort(); + await server.finished; + }, +); diff --git a/tests/unit/signal_test.ts b/tests/unit/signal_test.ts index 8923aa75bf5441..bfaa9aac909b0b 100644 --- a/tests/unit/signal_test.ts +++ b/tests/unit/signal_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, assertThrows, delay } from "./test_util.ts"; Deno.test( diff --git a/tests/unit/stat_test.ts b/tests/unit/stat_test.ts index 0609035b41779a..0f10f6e2d67d51 100644 --- a/tests/unit/stat_test.ts +++ b/tests/unit/stat_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, diff --git a/tests/unit/stdio_test.ts b/tests/unit/stdio_test.ts index d24fdc8efabcdb..c605ccb9adc04e 100644 --- a/tests/unit/stdio_test.ts +++ b/tests/unit/stdio_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals } from "./test_util.ts"; Deno.test(async function stdioStdinRead() { diff --git a/tests/unit/streams_test.ts b/tests/unit/streams_test.ts index 73f9a60953c84b..84a87d166d68ca 100644 --- a/tests/unit/streams_test.ts +++ b/tests/unit/streams_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, assertRejects, @@ -541,6 +541,7 @@ Deno.test(async function decompressionStreamInvalidGzipStillReported() { Deno.test(function readableStreamFromWithStringThrows() { assertThrows( + // @ts-expect-error: primitives are not acceptable () => ReadableStream.from("string"), TypeError, "Failed to execute 'ReadableStream.from': Argument 1 can not be converted to async iterable.", diff --git a/tests/unit/structured_clone_test.ts b/tests/unit/structured_clone_test.ts index 6e0473f9a93ddd..fc5d68e9dad4e9 100644 --- a/tests/unit/structured_clone_test.ts +++ b/tests/unit/structured_clone_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, assertThrows } from "./test_util.ts"; diff --git a/tests/unit/symbol_test.ts b/tests/unit/symbol_test.ts index 54db7f5bae19ed..2dca022b14d11f 100644 --- a/tests/unit/symbol_test.ts +++ b/tests/unit/symbol_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert } from "./test_util.ts"; // Test that `Symbol.metadata` is defined. This file can be removed when V8 diff --git a/tests/unit/symlink_test.ts b/tests/unit/symlink_test.ts index 47a685ec61260a..cdf0ea5bbdfe7f 100644 --- a/tests/unit/symlink_test.ts +++ b/tests/unit/symlink_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertRejects, diff --git a/tests/unit/test_util.ts b/tests/unit/test_util.ts index a987cb54272136..6e7865ea7a43d4 100644 --- a/tests/unit/test_util.ts +++ b/tests/unit/test_util.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import * as colors from "@std/fmt/colors"; import { assert } from "@std/assert"; diff --git a/tests/unit/testing_test.ts b/tests/unit/testing_test.ts index 51372c42b02c6f..96104df9c4d708 100644 --- a/tests/unit/testing_test.ts +++ b/tests/unit/testing_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, assertRejects, assertThrows } from "./test_util.ts"; Deno.test(function testWrongOverloads() { diff --git a/tests/unit/text_encoding_test.ts b/tests/unit/text_encoding_test.ts index 719e5907e4fede..1f378b2125d113 100644 --- a/tests/unit/text_encoding_test.ts +++ b/tests/unit/text_encoding_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, diff --git a/tests/unit/timers_test.ts b/tests/unit/timers_test.ts index 580d8c524e8fbb..29d338c761b62b 100644 --- a/tests/unit/timers_test.ts +++ b/tests/unit/timers_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-console diff --git a/tests/unit/tls_sni_test.ts b/tests/unit/tls_sni_test.ts index a8d51108e7f48e..3874753dedf6b8 100644 --- a/tests/unit/tls_sni_test.ts +++ b/tests/unit/tls_sni_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, assertRejects } from "./test_util.ts"; // @ts-expect-error TypeScript (as of 3.7) does not support indexing namespaces by symbol const { resolverSymbol, serverNameSymbol } = Deno[Deno.internal]; diff --git a/tests/unit/tls_test.ts b/tests/unit/tls_test.ts index 219f4a450831a6..53db347a131a8d 100644 --- a/tests/unit/tls_test.ts +++ b/tests/unit/tls_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, diff --git a/tests/unit/truncate_test.ts b/tests/unit/truncate_test.ts index cebd6e8ee124c6..ae41b822711e61 100644 --- a/tests/unit/truncate_test.ts +++ b/tests/unit/truncate_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, assertRejects, assertThrows } from "./test_util.ts"; Deno.test( diff --git a/tests/unit/tty_color_test.ts b/tests/unit/tty_color_test.ts index 6f26891e372310..a1ca43951c8edc 100644 --- a/tests/unit/tty_color_test.ts +++ b/tests/unit/tty_color_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals } from "./test_util.ts"; // Note tests for Deno.stdin.setRaw is in integration tests. diff --git a/tests/unit/tty_test.ts b/tests/unit/tty_test.ts index 1d29a0b706e8db..352c313b433493 100644 --- a/tests/unit/tty_test.ts +++ b/tests/unit/tty_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-deprecated-deno-api diff --git a/tests/unit/umask_test.ts b/tests/unit/umask_test.ts index 0e97f0d353b7a6..c7cdd68e4ca73b 100644 --- a/tests/unit/umask_test.ts +++ b/tests/unit/umask_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals } from "./test_util.ts"; Deno.test( diff --git a/tests/unit/url_search_params_test.ts b/tests/unit/url_search_params_test.ts index d682c291a9ddd8..9846c7a91cd3ff 100644 --- a/tests/unit/url_search_params_test.ts +++ b/tests/unit/url_search_params_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals } from "./test_util.ts"; Deno.test(function urlSearchParamsWithMultipleSpaces() { diff --git a/tests/unit/url_test.ts b/tests/unit/url_test.ts index b0dc86232b7592..5643fbd2584f02 100644 --- a/tests/unit/url_test.ts +++ b/tests/unit/url_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, diff --git a/tests/unit/urlpattern_test.ts b/tests/unit/urlpattern_test.ts index 3c1fb0cf19a55f..4d815cd04209c5 100644 --- a/tests/unit/urlpattern_test.ts +++ b/tests/unit/urlpattern_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals } from "./test_util.ts"; import { assertType, IsExact } from "@std/testing/types"; diff --git a/tests/unit/utime_test.ts b/tests/unit/utime_test.ts index 7a1fee74eb4b36..5669499aafc2d6 100644 --- a/tests/unit/utime_test.ts +++ b/tests/unit/utime_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, diff --git a/tests/unit/version_test.ts b/tests/unit/version_test.ts index 307295ad87f796..fd570fb16d9725 100644 --- a/tests/unit/version_test.ts +++ b/tests/unit/version_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals } from "./test_util.ts"; diff --git a/tests/unit/wasm_test.ts b/tests/unit/wasm_test.ts index e0db41ed0edb62..80bc468f7dfdff 100644 --- a/tests/unit/wasm_test.ts +++ b/tests/unit/wasm_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, assertRejects } from "./test_util.ts"; @@ -32,7 +32,7 @@ Deno.test(async function wasmInstantiateWorksWithBuffer() { }); // V8's default implementation of `WebAssembly.instantiateStreaming()` if you -// don't set the WASM streaming callback, is to take a byte source. Here we +// don't set the Wasm streaming callback, is to take a byte source. Here we // check that our implementation of the callback disallows it. Deno.test( async function wasmInstantiateStreamingFailsWithBuffer() { @@ -95,7 +95,7 @@ Deno.test( Deno.test( { permissions: { net: true } }, async function wasmStreamingNonTrivial() { - // deno-dom's WASM file is a real-world non-trivial case that gave us + // deno-dom's Wasm file is a real-world non-trivial case that gave us // trouble when implementing this. await WebAssembly.instantiateStreaming(fetch( "http://localhost:4545/assets/deno_dom_0.1.3-alpha2.wasm", diff --git a/tests/unit/webcrypto_test.ts b/tests/unit/webcrypto_test.ts index 09552a05871b91..bc5b307de5e49b 100644 --- a/tests/unit/webcrypto_test.ts +++ b/tests/unit/webcrypto_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, diff --git a/tests/unit/webgpu_test.ts b/tests/unit/webgpu_test.ts index 6c91abe4ade1b5..f7bfc0bbc2e873 100644 --- a/tests/unit/webgpu_test.ts +++ b/tests/unit/webgpu_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, assertThrows } from "./test_util.ts"; @@ -553,6 +553,57 @@ Deno.test({ device.destroy(); }); +Deno.test({ + ignore: isWsl || isCIWithoutGPU, +}, async function adapterLimitsAreNumbers() { + const limitNames = [ + "maxTextureDimension1D", + "maxTextureDimension2D", + "maxTextureDimension3D", + "maxTextureArrayLayers", + "maxBindGroups", + "maxDynamicUniformBuffersPerPipelineLayout", + "maxDynamicStorageBuffersPerPipelineLayout", + "maxSampledTexturesPerShaderStage", + "maxSamplersPerShaderStage", + "maxStorageBuffersPerShaderStage", + "maxStorageTexturesPerShaderStage", + "maxUniformBuffersPerShaderStage", + "maxUniformBufferBindingSize", + "maxStorageBufferBindingSize", + "minUniformBufferOffsetAlignment", + "minStorageBufferOffsetAlignment", + "maxVertexBuffers", + "maxVertexAttributes", + "maxVertexBufferArrayStride", + "maxInterStageShaderComponents", + "maxComputeWorkgroupStorageSize", + "maxComputeInvocationsPerWorkgroup", + "maxComputeWorkgroupSizeX", + "maxComputeWorkgroupSizeY", + "maxComputeWorkgroupSizeZ", + "maxComputeWorkgroupsPerDimension", + ]; + + const adapter = await navigator.gpu.requestAdapter(); + assert(adapter); + + for (const limitName of limitNames) { + // deno-lint-ignore ban-ts-comment + // @ts-ignore + assertEquals(typeof adapter.limits[limitName], "number"); + } + + const device = await adapter.requestDevice({ + // deno-lint-ignore ban-ts-comment + // @ts-ignore + requiredLimits: adapter.limits, + }); + assert(device); + + device.destroy(); +}); + async function checkIsWsl() { return Deno.build.os === "linux" && await hasMicrosoftProcVersion(); diff --git a/tests/unit/websocket_test.ts b/tests/unit/websocket_test.ts index 3aafe8da22dbfa..1c8c4581bf3de1 100644 --- a/tests/unit/websocket_test.ts +++ b/tests/unit/websocket_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, assertThrows, fail } from "./test_util.ts"; const servePort = 4248; @@ -806,3 +806,18 @@ Deno.test("Close connection", async () => { await server.finished; conn.close(); }); + +Deno.test("send to a closed socket", async () => { + const { promise, resolve } = Promise.withResolvers(); + const ws = new WebSocket("ws://localhost:4242"); + const blob = new Blob(["foo"]); + ws.onerror = () => fail(); + ws.onopen = () => { + ws.close(); + ws.send(blob); + }; + ws.onclose = () => { + resolve(); + }; + await promise; +}); diff --git a/tests/unit/websocketstream_test.ts.disabled b/tests/unit/websocketstream_test.ts.disabled index 4f8c321c927c63..7a64318d4722d1 100644 --- a/tests/unit/websocketstream_test.ts.disabled +++ b/tests/unit/websocketstream_test.ts.disabled @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, diff --git a/tests/unit/webstorage_test.ts b/tests/unit/webstorage_test.ts index aa832b1c4b2e37..1c2f9cfa34c338 100644 --- a/tests/unit/webstorage_test.ts +++ b/tests/unit/webstorage_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-explicit-any import { assert, assertEquals, assertThrows } from "./test_util.ts"; diff --git a/tests/unit/worker_permissions_test.ts b/tests/unit/worker_permissions_test.ts index 28bf9f92af8b7c..20736357f5f3b8 100644 --- a/tests/unit/worker_permissions_test.ts +++ b/tests/unit/worker_permissions_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals } from "./test_util.ts"; Deno.test( diff --git a/tests/unit/worker_test.ts b/tests/unit/worker_test.ts index 42c257282cb518..c0777bb78bbc5f 100644 --- a/tests/unit/worker_test.ts +++ b/tests/unit/worker_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-console diff --git a/tests/unit/write_file_test.ts b/tests/unit/write_file_test.ts index 15e462cca91be1..53a5434e049f3e 100644 --- a/tests/unit/write_file_test.ts +++ b/tests/unit/write_file_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, diff --git a/tests/unit/write_text_file_test.ts b/tests/unit/write_text_file_test.ts index 9e1b75326b7fe7..f8209250a1e2a6 100644 --- a/tests/unit/write_text_file_test.ts +++ b/tests/unit/write_text_file_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, diff --git a/tests/unit_node/_fs/_fs_access_test.ts b/tests/unit_node/_fs/_fs_access_test.ts index f8010b0b8b389e..1333d9b7c829bf 100644 --- a/tests/unit_node/_fs/_fs_access_test.ts +++ b/tests/unit_node/_fs/_fs_access_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import * as fs from "node:fs"; import { assertRejects, assertThrows } from "@std/assert"; @@ -28,6 +28,8 @@ Deno.test( try { await fs.promises.access(file, fs.constants.R_OK); await fs.promises.access(file, fs.constants.W_OK); + await fs.promises.access(file, fs.constants.X_OK); + await fs.promises.access(file, fs.constants.F_OK); } finally { await Deno.remove(file); } @@ -60,6 +62,8 @@ Deno.test( try { fs.accessSync(file, fs.constants.R_OK); fs.accessSync(file, fs.constants.W_OK); + fs.accessSync(file, fs.constants.X_OK); + fs.accessSync(file, fs.constants.F_OK); } finally { Deno.removeSync(file); } diff --git a/tests/unit_node/_fs/_fs_appendFile_test.ts b/tests/unit_node/_fs/_fs_appendFile_test.ts index 5ee8eabed40163..d6f45786cba565 100644 --- a/tests/unit_node/_fs/_fs_appendFile_test.ts +++ b/tests/unit_node/_fs/_fs_appendFile_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, assertThrows, fail } from "@std/assert"; import { appendFile, appendFileSync } from "node:fs"; import { fromFileUrl } from "@std/path"; diff --git a/tests/unit_node/_fs/_fs_chmod_test.ts b/tests/unit_node/_fs/_fs_chmod_test.ts index 97dc9ecdda1287..db097397e2c85c 100644 --- a/tests/unit_node/_fs/_fs_chmod_test.ts +++ b/tests/unit_node/_fs/_fs_chmod_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertRejects, assertThrows, fail } from "@std/assert"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { chmod, chmodSync } from "node:fs"; diff --git a/tests/unit_node/_fs/_fs_chown_test.ts b/tests/unit_node/_fs/_fs_chown_test.ts index 6cb2f576ad0b35..d9e6870ac69e59 100644 --- a/tests/unit_node/_fs/_fs_chown_test.ts +++ b/tests/unit_node/_fs/_fs_chown_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, fail } from "@std/assert"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { chown, chownSync } from "node:fs"; diff --git a/tests/unit_node/_fs/_fs_close_test.ts b/tests/unit_node/_fs/_fs_close_test.ts index 8880bc04610a25..62f2d4f05ebb05 100644 --- a/tests/unit_node/_fs/_fs_close_test.ts +++ b/tests/unit_node/_fs/_fs_close_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertThrows, fail } from "@std/assert"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { close, closeSync } from "node:fs"; diff --git a/tests/unit_node/_fs/_fs_copy_test.ts b/tests/unit_node/_fs/_fs_copy_test.ts index 22f30ea373ba80..b52f1951c6ba01 100644 --- a/tests/unit_node/_fs/_fs_copy_test.ts +++ b/tests/unit_node/_fs/_fs_copy_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import * as path from "@std/path"; import { assert } from "@std/assert"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; diff --git a/tests/unit_node/_fs/_fs_dir_test.ts b/tests/unit_node/_fs/_fs_dir_test.ts index 0f41543e92bd4b..7da76e50fba4af 100644 --- a/tests/unit_node/_fs/_fs_dir_test.ts +++ b/tests/unit_node/_fs/_fs_dir_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, fail } from "@std/assert"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { Dir as DirOrig, type Dirent } from "node:fs"; diff --git a/tests/unit_node/_fs/_fs_dirent_test.ts b/tests/unit_node/_fs/_fs_dirent_test.ts index 093617fafda2db..a709163f4a7c00 100644 --- a/tests/unit_node/_fs/_fs_dirent_test.ts +++ b/tests/unit_node/_fs/_fs_dirent_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, assertThrows } from "@std/assert"; import { Dirent as Dirent_ } from "node:fs"; diff --git a/tests/unit_node/_fs/_fs_exists_test.ts b/tests/unit_node/_fs/_fs_exists_test.ts index 7ed7584ae6df68..3de7afdc188958 100644 --- a/tests/unit_node/_fs/_fs_exists_test.ts +++ b/tests/unit_node/_fs/_fs_exists_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, assertStringIncludes } from "@std/assert"; import { exists, existsSync } from "node:fs"; import { promisify } from "node:util"; diff --git a/tests/unit_node/_fs/_fs_fdatasync_test.ts b/tests/unit_node/_fs/_fs_fdatasync_test.ts index 40ca2969f91b9d..59c2b5657ff009 100644 --- a/tests/unit_node/_fs/_fs_fdatasync_test.ts +++ b/tests/unit_node/_fs/_fs_fdatasync_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, fail } from "@std/assert"; import { fdatasync, fdatasyncSync } from "node:fs"; diff --git a/tests/unit_node/_fs/_fs_fstat_test.ts b/tests/unit_node/_fs/_fs_fstat_test.ts index afcac836f6e019..79e5106525f923 100644 --- a/tests/unit_node/_fs/_fs_fstat_test.ts +++ b/tests/unit_node/_fs/_fs_fstat_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { fstat, fstatSync } from "node:fs"; import { fail } from "@std/assert"; diff --git a/tests/unit_node/_fs/_fs_fsync_test.ts b/tests/unit_node/_fs/_fs_fsync_test.ts index 3c1509410ede8d..cd01786a2fcbdb 100644 --- a/tests/unit_node/_fs/_fs_fsync_test.ts +++ b/tests/unit_node/_fs/_fs_fsync_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, fail } from "@std/assert"; import { fsync, fsyncSync } from "node:fs"; diff --git a/tests/unit_node/_fs/_fs_ftruncate_test.ts b/tests/unit_node/_fs/_fs_ftruncate_test.ts index 974f8f168e6d69..b51ac6c2ca913e 100644 --- a/tests/unit_node/_fs/_fs_ftruncate_test.ts +++ b/tests/unit_node/_fs/_fs_ftruncate_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, assertThrows, fail } from "@std/assert"; import { ftruncate, ftruncateSync } from "node:fs"; diff --git a/tests/unit_node/_fs/_fs_futimes_test.ts b/tests/unit_node/_fs/_fs_futimes_test.ts index 9b0c64efd6c109..207610abede10a 100644 --- a/tests/unit_node/_fs/_fs_futimes_test.ts +++ b/tests/unit_node/_fs/_fs_futimes_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, assertThrows, fail } from "@std/assert"; import { futimes, futimesSync } from "node:fs"; diff --git a/tests/unit_node/_fs/_fs_handle_test.ts b/tests/unit_node/_fs/_fs_handle_test.ts index 755e091fd7a505..61214bde26fed7 100644 --- a/tests/unit_node/_fs/_fs_handle_test.ts +++ b/tests/unit_node/_fs/_fs_handle_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import * as path from "@std/path"; import { Buffer } from "node:buffer"; import * as fs from "node:fs/promises"; @@ -93,3 +93,109 @@ Deno.test("[node/fs filehandle.write] Write from string", async function () { assertEquals(res.bytesWritten, 11); assertEquals(decoder.decode(data), "hello world"); }); + +Deno.test("[node/fs filehandle.stat] Get file status", async function () { + const fileHandle = await fs.open(testData); + const stat = await fileHandle.stat(); + + assertEquals(stat.isFile(), true); + assertEquals(stat.size, "hello world".length); + + await fileHandle.close(); +}); + +Deno.test("[node/fs filehandle.writeFile] Write to file", async function () { + const tempFile: string = await Deno.makeTempFile(); + const fileHandle = await fs.open(tempFile, "w"); + + const str = "hello world"; + await fileHandle.writeFile(str); + + const data = Deno.readFileSync(tempFile); + await Deno.remove(tempFile); + await fileHandle.close(); + + assertEquals(decoder.decode(data), "hello world"); +}); + +Deno.test( + "[node/fs filehandle.truncate] Truncate file with length", + async function () { + const tempFile: string = await Deno.makeTempFile(); + const fileHandle = await fs.open(tempFile, "w+"); + + await fileHandle.writeFile("hello world"); + + await fileHandle.truncate(5); + + const data = Deno.readFileSync(tempFile); + await Deno.remove(tempFile); + await fileHandle.close(); + + assertEquals(decoder.decode(data), "hello"); + }, +); + +Deno.test( + "[node/fs filehandle.truncate] Truncate file without length", + async function () { + const tempFile: string = await Deno.makeTempFile(); + const fileHandle = await fs.open(tempFile, "w+"); + + await fileHandle.writeFile("hello world"); + + await fileHandle.truncate(); + + const data = Deno.readFileSync(tempFile); + await Deno.remove(tempFile); + await fileHandle.close(); + + assertEquals(decoder.decode(data), ""); + }, +); + +Deno.test( + "[node/fs filehandle.truncate] Truncate file with extension", + async function () { + const tempFile: string = await Deno.makeTempFile(); + const fileHandle = await fs.open(tempFile, "w+"); + + await fileHandle.writeFile("hi"); + + await fileHandle.truncate(5); + + const data = Deno.readFileSync(tempFile); + await Deno.remove(tempFile); + await fileHandle.close(); + + const expected = new Uint8Array(5); + expected.set(new TextEncoder().encode("hi")); + + assertEquals(data, expected); + assertEquals(data.length, 5); + assertEquals(decoder.decode(data.subarray(0, 2)), "hi"); + // Verify null bytes + assertEquals(data[2], 0); + assertEquals(data[3], 0); + assertEquals(data[4], 0); + }, +); + +Deno.test( + "[node/fs filehandle.truncate] Truncate file with negative length", + async function () { + const tempFile: string = await Deno.makeTempFile(); + const fileHandle = await fs.open(tempFile, "w+"); + + await fileHandle.writeFile("hello world"); + + await fileHandle.truncate(-1); + + const data = Deno.readFileSync(tempFile); + await Deno.remove(tempFile); + await fileHandle.close(); + + assertEquals(decoder.decode(data), ""); + assertEquals(data.length, 0); + }, +); diff --git a/tests/unit_node/_fs/_fs_link_test.ts b/tests/unit_node/_fs/_fs_link_test.ts index 3062db7a67bb2b..fca1dfe869c585 100644 --- a/tests/unit_node/_fs/_fs_link_test.ts +++ b/tests/unit_node/_fs/_fs_link_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import * as path from "@std/path"; import { assert, assertEquals, fail } from "@std/assert"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; diff --git a/tests/unit_node/_fs/_fs_lstat_test.ts b/tests/unit_node/_fs/_fs_lstat_test.ts index 6a42443452b529..196d5f23b73a10 100644 --- a/tests/unit_node/_fs/_fs_lstat_test.ts +++ b/tests/unit_node/_fs/_fs_lstat_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { lstat, lstatSync } from "node:fs"; import { fail } from "@std/assert"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; diff --git a/tests/unit_node/_fs/_fs_mkdir_test.ts b/tests/unit_node/_fs/_fs_mkdir_test.ts index b9f6adf44c2e72..d3476a23a76a41 100644 --- a/tests/unit_node/_fs/_fs_mkdir_test.ts +++ b/tests/unit_node/_fs/_fs_mkdir_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import * as path from "@std/path"; import { assert } from "@std/assert"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; diff --git a/tests/unit_node/_fs/_fs_mkdtemp_test.ts b/tests/unit_node/_fs/_fs_mkdtemp_test.ts index 47530b495a7db0..4e130d4b9df917 100644 --- a/tests/unit_node/_fs/_fs_mkdtemp_test.ts +++ b/tests/unit_node/_fs/_fs_mkdtemp_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertRejects, assertThrows } from "@std/assert"; import { EncodingOption, existsSync, mkdtemp, mkdtempSync } from "node:fs"; import { env } from "node:process"; diff --git a/tests/unit_node/_fs/_fs_open_test.ts b/tests/unit_node/_fs/_fs_open_test.ts index b4679cbab66e44..cd8cdf791bc5c4 100644 --- a/tests/unit_node/_fs/_fs_open_test.ts +++ b/tests/unit_node/_fs/_fs_open_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { O_APPEND, O_CREAT, diff --git a/tests/unit_node/_fs/_fs_opendir_test.ts b/tests/unit_node/_fs/_fs_opendir_test.ts index e22a47a70285e0..37200d364f8a6b 100644 --- a/tests/unit_node/_fs/_fs_opendir_test.ts +++ b/tests/unit_node/_fs/_fs_opendir_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, diff --git a/tests/unit_node/_fs/_fs_readFile_test.ts b/tests/unit_node/_fs/_fs_readFile_test.ts index ea36b9d866af4d..0903777bca3f7b 100644 --- a/tests/unit_node/_fs/_fs_readFile_test.ts +++ b/tests/unit_node/_fs/_fs_readFile_test.ts @@ -1,8 +1,8 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { promises, readFile, readFileSync } from "node:fs"; import * as path from "@std/path"; -import { assert, assertEquals } from "@std/assert"; +import { assert, assertEquals, assertMatch } from "@std/assert"; const moduleDir = path.dirname(path.fromFileUrl(import.meta.url)); const testData = path.resolve(moduleDir, "testdata", "hello.txt"); @@ -121,3 +121,26 @@ Deno.test("fs.promises.readFile with no arg call rejects with error correctly", // @ts-ignore no arg call needs to be supported await promises.readFile().catch((_e) => {}); }); + +Deno.test("fs.readFile error message contains path + syscall", async () => { + const path = "/does/not/exist"; + const err = await new Promise((resolve) => { + readFile(path, "utf-8", (err) => resolve(err)); + }); + if (err instanceof Error) { + assert(err.message.includes(path), "Path not found in error message"); + assertMatch(err.message, /[,\s]open\s/); + } +}); + +Deno.test("fs.readFileSync error message contains path + syscall", () => { + const path = "/does/not/exist"; + try { + readFileSync(path, "utf-8"); + } catch (err) { + if (err instanceof Error) { + assert(err.message.includes(path), "Path not found in error message"); + assertMatch(err.message, /[,\s]open\s/); + } + } +}); diff --git a/tests/unit_node/_fs/_fs_read_test.ts b/tests/unit_node/_fs/_fs_read_test.ts index 867ec01c5c1a10..6def1ff71daf67 100644 --- a/tests/unit_node/_fs/_fs_read_test.ts +++ b/tests/unit_node/_fs/_fs_read_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /// import { assert, diff --git a/tests/unit_node/_fs/_fs_readdir_test.ts b/tests/unit_node/_fs/_fs_readdir_test.ts index 8e5b46fc8aab04..b5071b577733fe 100644 --- a/tests/unit_node/_fs/_fs_readdir_test.ts +++ b/tests/unit_node/_fs/_fs_readdir_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, assertNotEquals, fail } from "@std/assert"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { readdir, readdirSync } from "node:fs"; @@ -53,6 +53,29 @@ Deno.test({ }, }); +Deno.test("ASYNC: read dirs recursively", async () => { + const dir = Deno.makeTempDirSync(); + Deno.writeTextFileSync(join(dir, "file1.txt"), "hi"); + Deno.mkdirSync(join(dir, "sub")); + Deno.writeTextFileSync(join(dir, "sub", "file2.txt"), "hi"); + + try { + const files = await new Promise((resolve, reject) => { + readdir(dir, { recursive: true }, (err, files) => { + if (err) reject(err); + resolve(files.map((f) => f.toString())); + }); + }); + + assertEqualsArrayAnyOrder( + files, + ["file1.txt", "sub", join("sub", "file2.txt")], + ); + } finally { + Deno.removeSync(dir, { recursive: true }); + } +}); + Deno.test({ name: "SYNC: reading empty the directory", fn() { @@ -75,6 +98,26 @@ Deno.test({ }, }); +Deno.test("SYNC: read dirs recursively", () => { + const dir = Deno.makeTempDirSync(); + Deno.writeTextFileSync(join(dir, "file1.txt"), "hi"); + Deno.mkdirSync(join(dir, "sub")); + Deno.writeTextFileSync(join(dir, "sub", "file2.txt"), "hi"); + + try { + const files = readdirSync(dir, { recursive: true }).map((f) => + f.toString() + ); + + assertEqualsArrayAnyOrder( + files, + ["file1.txt", "sub", join("sub", "file2.txt")], + ); + } finally { + Deno.removeSync(dir, { recursive: true }); + } +}); + Deno.test("[std/node/fs] readdir callback isn't called twice if error is thrown", async () => { // The correct behaviour is not to catch any errors thrown, // but that means there'll be an uncaught error and the test will fail. diff --git a/tests/unit_node/_fs/_fs_readlink_test.ts b/tests/unit_node/_fs/_fs_readlink_test.ts index 23c5e3896ef93e..9443f2903ff0c9 100644 --- a/tests/unit_node/_fs/_fs_readlink_test.ts +++ b/tests/unit_node/_fs/_fs_readlink_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { readlink, readlinkSync } from "node:fs"; import { assert, assertEquals } from "@std/assert"; diff --git a/tests/unit_node/_fs/_fs_realpath_test.ts b/tests/unit_node/_fs/_fs_realpath_test.ts index b0285cf545423b..25d266c4bf90e7 100644 --- a/tests/unit_node/_fs/_fs_realpath_test.ts +++ b/tests/unit_node/_fs/_fs_realpath_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import * as path from "@std/path"; import { assertEquals } from "@std/assert"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; diff --git a/tests/unit_node/_fs/_fs_rename_test.ts b/tests/unit_node/_fs/_fs_rename_test.ts index 76d2e1314119c4..91185e02a2df07 100644 --- a/tests/unit_node/_fs/_fs_rename_test.ts +++ b/tests/unit_node/_fs/_fs_rename_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, fail } from "@std/assert"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { rename, renameSync } from "node:fs"; diff --git a/tests/unit_node/_fs/_fs_rm_test.ts b/tests/unit_node/_fs/_fs_rm_test.ts index 6ded2e5645d878..da02b60f30ebd6 100644 --- a/tests/unit_node/_fs/_fs_rm_test.ts +++ b/tests/unit_node/_fs/_fs_rm_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, assertRejects, assertThrows, fail } from "@std/assert"; import { rm, rmSync } from "node:fs"; import { existsSync } from "node:fs"; diff --git a/tests/unit_node/_fs/_fs_rmdir_test.ts b/tests/unit_node/_fs/_fs_rmdir_test.ts index db0c692a4095be..90d2c7c8a8114a 100644 --- a/tests/unit_node/_fs/_fs_rmdir_test.ts +++ b/tests/unit_node/_fs/_fs_rmdir_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, fail } from "@std/assert"; import { rmdir, rmdirSync } from "node:fs"; import { existsSync } from "node:fs"; diff --git a/tests/unit_node/_fs/_fs_stat_test.ts b/tests/unit_node/_fs/_fs_stat_test.ts index e42aa34a9a1145..d10521d0cde12e 100644 --- a/tests/unit_node/_fs/_fs_stat_test.ts +++ b/tests/unit_node/_fs/_fs_stat_test.ts @@ -1,7 +1,7 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { BigIntStats, stat, Stats, statSync } from "node:fs"; -import { assertEquals, fail } from "@std/assert"; +import { assert, assertEquals, fail } from "@std/assert"; export function assertStats(actual: Stats, expected: Deno.FileInfo) { assertEquals(actual.dev, expected.dev); @@ -152,3 +152,38 @@ Deno.test({ assertEquals(stats.isSocket(), false); }, }); + +Deno.test({ + name: "[node/fs] stat invalid path error", + async fn() { + try { + await new Promise((resolve, reject) => { + stat( + // deno-lint-ignore no-explicit-any + undefined as any, + (err, stats) => err ? reject(err) : resolve(stats), + ); + }); + fail(); + } catch (err) { + assert(err instanceof TypeError); + // deno-lint-ignore no-explicit-any + assertEquals((err as any).code, "ERR_INVALID_ARG_TYPE"); + } + }, +}); + +Deno.test({ + name: "[node/fs] statSync invalid path error", + fn() { + try { + // deno-lint-ignore no-explicit-any + statSync(undefined as any); + fail(); + } catch (err) { + assert(err instanceof TypeError); + // deno-lint-ignore no-explicit-any + assertEquals((err as any).code, "ERR_INVALID_ARG_TYPE"); + } + }, +}); diff --git a/tests/unit_node/_fs/_fs_statfs_test.ts b/tests/unit_node/_fs/_fs_statfs_test.ts index fc85bcf174ec5f..51cbb0e552de1b 100644 --- a/tests/unit_node/_fs/_fs_statfs_test.ts +++ b/tests/unit_node/_fs/_fs_statfs_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import * as fs from "node:fs"; import { assertEquals, assertRejects } from "@std/assert"; diff --git a/tests/unit_node/_fs/_fs_symlink_test.ts b/tests/unit_node/_fs/_fs_symlink_test.ts index dfd6adb51a25a6..d4a86bfc0fac79 100644 --- a/tests/unit_node/_fs/_fs_symlink_test.ts +++ b/tests/unit_node/_fs/_fs_symlink_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertThrows, fail } from "@std/assert"; import { symlink, symlinkSync } from "node:fs"; diff --git a/tests/unit_node/_fs/_fs_truncate_test.ts b/tests/unit_node/_fs/_fs_truncate_test.ts index 67bd021e450827..ebb33a0c29dd56 100644 --- a/tests/unit_node/_fs/_fs_truncate_test.ts +++ b/tests/unit_node/_fs/_fs_truncate_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, assertThrows, fail } from "@std/assert"; import { truncate, truncateSync } from "node:fs"; diff --git a/tests/unit_node/_fs/_fs_unlink_test.ts b/tests/unit_node/_fs/_fs_unlink_test.ts index f96217f8ef4b8a..a48ef58bc72470 100644 --- a/tests/unit_node/_fs/_fs_unlink_test.ts +++ b/tests/unit_node/_fs/_fs_unlink_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, fail } from "@std/assert"; import { existsSync } from "node:fs"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; diff --git a/tests/unit_node/_fs/_fs_utimes_test.ts b/tests/unit_node/_fs/_fs_utimes_test.ts index 717d511c06514a..56233973ac3074 100644 --- a/tests/unit_node/_fs/_fs_utimes_test.ts +++ b/tests/unit_node/_fs/_fs_utimes_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, assertThrows, fail } from "@std/assert"; import { utimes, utimesSync } from "node:fs"; diff --git a/tests/unit_node/_fs/_fs_watch_test.ts b/tests/unit_node/_fs/_fs_watch_test.ts index 963e0889f111c4..d61120206613a6 100644 --- a/tests/unit_node/_fs/_fs_watch_test.ts +++ b/tests/unit_node/_fs/_fs_watch_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { unwatchFile, watch, watchFile } from "node:fs"; import { watch as watchPromise } from "node:fs/promises"; import { assert, assertEquals } from "@std/assert"; diff --git a/tests/unit_node/_fs/_fs_writeFile_test.ts b/tests/unit_node/_fs/_fs_writeFile_test.ts index 2733a2df0bdd86..503faf8f4c477b 100644 --- a/tests/unit_node/_fs/_fs_writeFile_test.ts +++ b/tests/unit_node/_fs/_fs_writeFile_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, diff --git a/tests/unit_node/_fs/_fs_write_test.ts b/tests/unit_node/_fs/_fs_write_test.ts index 400fce73aa09a5..6a5d4c9c268202 100644 --- a/tests/unit_node/_fs/_fs_write_test.ts +++ b/tests/unit_node/_fs/_fs_write_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-console diff --git a/tests/unit_node/_test_utils.ts b/tests/unit_node/_test_utils.ts index c451ccd84b4e0a..a78444fd4ad19e 100644 --- a/tests/unit_node/_test_utils.ts +++ b/tests/unit_node/_test_utils.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertStringIncludes } from "@std/assert"; diff --git a/tests/unit_node/assert_test.ts b/tests/unit_node/assert_test.ts index dc565458f63068..f6dc18836ddfb2 100644 --- a/tests/unit_node/assert_test.ts +++ b/tests/unit_node/assert_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import * as assert from "node:assert"; Deno.test("[node/assert] .throws() compares Error instance", () => { diff --git a/tests/unit_node/assertion_error_test.ts b/tests/unit_node/assertion_error_test.ts index 4f8fe70ba55286..60b0020d90bac4 100644 --- a/tests/unit_node/assertion_error_test.ts +++ b/tests/unit_node/assertion_error_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { stripAnsiCode } from "@std/fmt/colors"; import { assert, assertStrictEquals } from "@std/assert"; import { AssertionError } from "node:assert"; diff --git a/tests/unit_node/async_hooks_test.ts b/tests/unit_node/async_hooks_test.ts index edad57bf7654cb..d76898bcf51886 100644 --- a/tests/unit_node/async_hooks_test.ts +++ b/tests/unit_node/async_hooks_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { AsyncLocalStorage, AsyncResource } from "node:async_hooks"; import process from "node:process"; import { setImmediate } from "node:timers"; diff --git a/tests/unit_node/buffer_test.ts b/tests/unit_node/buffer_test.ts index bd7f6edb17f393..3929769ffa3590 100644 --- a/tests/unit_node/buffer_test.ts +++ b/tests/unit_node/buffer_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { Buffer } from "node:buffer"; import { assertEquals, assertThrows } from "@std/assert"; diff --git a/tests/unit_node/child_process_test.ts b/tests/unit_node/child_process_test.ts index 0ea3c46cf0c03c..bd875ad4195c13 100644 --- a/tests/unit_node/child_process_test.ts +++ b/tests/unit_node/child_process_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import CP from "node:child_process"; import { Buffer } from "node:buffer"; diff --git a/tests/unit_node/cluster_test.ts b/tests/unit_node/cluster_test.ts index d9a59ae63a3b3d..e0335c48241a44 100644 --- a/tests/unit_node/cluster_test.ts +++ b/tests/unit_node/cluster_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals } from "@std/assert"; import cluster from "node:cluster"; import * as clusterNamed from "node:cluster"; diff --git a/tests/unit_node/console_test.ts b/tests/unit_node/console_test.ts index 25d4a78e57cf48..a9e3551074e7e0 100644 --- a/tests/unit_node/console_test.ts +++ b/tests/unit_node/console_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import vm from "node:vm"; import { stripAnsiCode } from "@std/fmt/colors"; diff --git a/tests/unit_node/crypto/crypto_cipher_gcm_test.ts b/tests/unit_node/crypto/crypto_cipher_gcm_test.ts index b379a43696bf0b..dd02ee5e321bae 100644 --- a/tests/unit_node/crypto/crypto_cipher_gcm_test.ts +++ b/tests/unit_node/crypto/crypto_cipher_gcm_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import crypto from "node:crypto"; import { Buffer } from "node:buffer"; @@ -119,3 +119,23 @@ Deno.test({ ); }, }); + +// Issue #27441 +// https://github.com/denoland/deno/issues/27441 +Deno.test({ + name: "aes-256-gcm supports IV of non standard length", + fn() { + const decipher = crypto.createDecipheriv( + "aes-256-gcm", + Buffer.from("eYLEiLFQnpjYksWTiKpwv2sKhw+WJb5Fo/aY2YqXswc=", "base64"), + Buffer.from("k5oP3kb8tTbZaL3PxbFWN8ToOb8vfv2b1EuPz1LbmYU=", "base64"), // 256 bits IV + ); + const decrypted = decipher.update( + "s0/KBsFec29XLrGbAnLiNA==", + "base64", + "utf-8", + ); + assertEquals(decrypted, "this is a secret"); + decipher.final(); + }, +}); diff --git a/tests/unit_node/crypto/crypto_cipher_test.ts b/tests/unit_node/crypto/crypto_cipher_test.ts index 65a5b29eeb6cd4..bc001c8d0f187d 100644 --- a/tests/unit_node/crypto/crypto_cipher_test.ts +++ b/tests/unit_node/crypto/crypto_cipher_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import crypto from "node:crypto"; import { Buffer } from "node:buffer"; import { Readable } from "node:stream"; @@ -361,6 +361,19 @@ Deno.test({ name: "getCiphers", fn() { assertEquals(crypto.getCiphers().includes("aes-128-cbc"), true); + + const getZeroKey = (cipher: string) => zeros(+cipher.match(/\d+/)![0] / 8); + const getZeroIv = (cipher: string) => { + if (cipher.includes("gcm") || cipher.includes("ecb")) { + return zeros(12); + } + return zeros(16); + }; + + for (const cipher of crypto.getCiphers()) { + crypto.createCipheriv(cipher, getZeroKey(cipher), getZeroIv(cipher)) + .final(); + } }, }); diff --git a/tests/unit_node/crypto/crypto_hash_test.ts b/tests/unit_node/crypto/crypto_hash_test.ts index 0d4e3070966609..0a3fd2245ecd12 100644 --- a/tests/unit_node/crypto/crypto_hash_test.ts +++ b/tests/unit_node/crypto/crypto_hash_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { createHash, createHmac, getHashes } from "node:crypto"; import { Buffer } from "node:buffer"; import { Readable } from "node:stream"; diff --git a/tests/unit_node/crypto/crypto_hkdf_test.ts b/tests/unit_node/crypto/crypto_hkdf_test.ts index 34102fd03d7456..dc128db584a432 100644 --- a/tests/unit_node/crypto/crypto_hkdf_test.ts +++ b/tests/unit_node/crypto/crypto_hkdf_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { hkdfSync } from "node:crypto"; import { assertEquals } from "@std/assert"; import { Buffer } from "node:buffer"; diff --git a/tests/unit_node/crypto/crypto_import_export.ts b/tests/unit_node/crypto/crypto_import_export.ts index fc41cbacc29764..458178d5784b96 100644 --- a/tests/unit_node/crypto/crypto_import_export.ts +++ b/tests/unit_node/crypto/crypto_import_export.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import crypto, { KeyFormat } from "node:crypto"; import path from "node:path"; import { Buffer } from "node:buffer"; diff --git a/tests/unit_node/crypto/crypto_key_test.ts b/tests/unit_node/crypto/crypto_key_test.ts index 3c7ad4423278b6..ac54a354194c52 100644 --- a/tests/unit_node/crypto/crypto_key_test.ts +++ b/tests/unit_node/crypto/crypto_key_test.ts @@ -1,6 +1,6 @@ // deno-lint-ignore-file no-explicit-any -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { createECDH, createHmac, @@ -677,3 +677,42 @@ Deno.test("generateKeyPair large pem", function () { }, }); }); + +Deno.test("generateKeyPair promisify", async () => { + const passphrase = "mypassphrase"; + const cipher = "aes-256-cbc"; + const modulusLength = 4096; + + const { privateKey, publicKey } = await promisify(generateKeyPair)("rsa", { + modulusLength, + publicKeyEncoding: { + type: "spki", + format: "pem", + }, + privateKeyEncoding: { + type: "pkcs8", + format: "pem", + cipher, + passphrase, + }, + }); + + assert(publicKey.startsWith("-----BEGIN PUBLIC KEY-----")); + assert(privateKey.startsWith("-----BEGIN PRIVATE KEY-----")); +}); + +Deno.test("RSA export private JWK", function () { + // @ts-ignore @types/node broken + const { privateKey, publicKey } = generateKeyPairSync("rsa", { + modulusLength: 4096, + publicKeyEncoding: { + format: "jwk", + }, + privateKeyEncoding: { + format: "jwk", + }, + }); + + assertEquals((privateKey as any).kty, "RSA"); + assertEquals((privateKey as any).n, (publicKey as any).n); +}); diff --git a/tests/unit_node/crypto/crypto_misc_test.ts b/tests/unit_node/crypto/crypto_misc_test.ts index 007009339d423b..3c49edd388c3b1 100644 --- a/tests/unit_node/crypto/crypto_misc_test.ts +++ b/tests/unit_node/crypto/crypto_misc_test.ts @@ -1,7 +1,7 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { randomFillSync, randomUUID, timingSafeEqual } from "node:crypto"; import { Buffer } from "node:buffer"; -import { assert, assertEquals } from "../../unit/test_util.ts"; +import { assert, assertEquals, assertThrows } from "../../unit/test_util.ts"; import { assertNotEquals } from "@std/assert"; Deno.test("[node/crypto.getRandomUUID] works the same way as Web Crypto API", () => { @@ -36,3 +36,10 @@ Deno.test("[node/crypto.timingSafeEqual] compares equal Buffer with different by assert(timingSafeEqual(a, b)); }); + +Deno.test("[node/crypto.timingSafeEqual] RangeError on Buffer with different byteLength", () => { + const a = Buffer.from([212, 213]); + const b = Buffer.from([0, 0, 0, 0, 0, 0, 0, 0, 212, 213, 0]); + + assertThrows(() => timingSafeEqual(a, b), RangeError); +}); diff --git a/tests/unit_node/crypto/crypto_pbkdf2_test.ts b/tests/unit_node/crypto/crypto_pbkdf2_test.ts index c937eb0c47e146..5eb4b82210e1c3 100644 --- a/tests/unit_node/crypto/crypto_pbkdf2_test.ts +++ b/tests/unit_node/crypto/crypto_pbkdf2_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { pbkdf2, pbkdf2Sync } from "node:crypto"; import { assert, assertEquals } from "@std/assert"; import nodeFixtures from "../testdata/crypto_digest_fixtures.json" with { diff --git a/tests/unit_node/crypto/crypto_scrypt_test.ts b/tests/unit_node/crypto/crypto_scrypt_test.ts index 03c08909eac122..3f4d1437f02df7 100644 --- a/tests/unit_node/crypto/crypto_scrypt_test.ts +++ b/tests/unit_node/crypto/crypto_scrypt_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { scrypt, scryptSync } from "node:crypto"; import { Buffer } from "node:buffer"; import { assertEquals } from "@std/assert"; diff --git a/tests/unit_node/crypto/crypto_sign_test.ts b/tests/unit_node/crypto/crypto_sign_test.ts index 97c80b28afb0cf..24b049ca361a2f 100644 --- a/tests/unit_node/crypto/crypto_sign_test.ts +++ b/tests/unit_node/crypto/crypto_sign_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals } from "@std/assert"; import { diff --git a/tests/unit_node/crypto/gcmEncryptExtIV128.json b/tests/unit_node/crypto/gcmEncryptExtIV128.json index 64896642d4b951..f0b4bca1f13237 100644 --- a/tests/unit_node/crypto/gcmEncryptExtIV128.json +++ b/tests/unit_node/crypto/gcmEncryptExtIV128.json @@ -51373,5 +51373,322 @@ 102, 238 ] + }, + { + "key": [ + 131, + 249, + 217, + 125, + 74, + 183, + 89, + 253, + 220, + 195, + 239, + 84, + 160, + 226, + 168, + 236 + ], + "nonce": [ + 207 + ], + "aad": [ + 109, + 212, + 158, + 174, + 180, + 16, + 61, + 172, + 143, + 151, + 227, + 35, + 73, + 70, + 221, + 45 + ], + "plaintext": [ + 119, + 230, + 50, + 156, + 249, + 66, + 79, + 113, + 200, + 8, + 223, + 145, + 112, + 191, + 210, + 152 + ], + "ciphertext": [ + 80, + 222, + 134, + 167, + 169, + 42, + 138, + 94, + 163, + 61, + 181, + 105, + 107, + 150, + 205, + 119 + ], + "tag": [ + 170, + 24, + 30, + 132, + 188, + 139, + 75, + 245, + 166, + 137, + 39, + 196, + 9, + 212, + 34, + 203 + ] + }, + { + "key": [ + 202, + 145, + 226, + 65, + 68, + 9, + 164, + 57, + 176, + 101, + 115, + 215, + 114, + 249, + 10, + 251 + ], + "nonce": [ + 23, + 112, + 8, + 249, + 32, + 160, + 97, + 105, + 204, + 223, + 117, + 58, + 51, + 133, + 83, + 254, + 253, + 70, + 132, + 88, + 105, + 201, + 36, + 77, + 164, + 73, + 151, + 248, + 61, + 76, + 232, + 5, + 161, + 135, + 7, + 200, + 77, + 17, + 79, + 156, + 104, + 66, + 123, + 34, + 132, + 21, + 145, + 230, + 202, + 236, + 245, + 195, + 231, + 42, + 37, + 22, + 122, + 168, + 96, + 197, + 27, + 220, + 26, + 165, + 109, + 205, + 105, + 242, + 154, + 47, + 53, + 231, + 10, + 50, + 43, + 158, + 186, + 9, + 42, + 152, + 214, + 106, + 149, + 107, + 77, + 41, + 67, + 131, + 160, + 235, + 171, + 38, + 247, + 196, + 223, + 26, + 93, + 64, + 96, + 223, + 196, + 90, + 20, + 21, + 81, + 0, + 234, + 125, + 158, + 50, + 222, + 187, + 101, + 55, + 64, + 107, + 117, + 114, + 145, + 113, + 5, + 5, + 20, + 46, + 118, + 89, + 252, + 119 + ], + "aad": [ + 191, + 235, + 21, + 252, + 247, + 177, + 95, + 14, + 20, + 192, + 68, + 57, + 182, + 121, + 80, + 189 + ], + "plaintext": [ + 40, + 0, + 62, + 48, + 196, + 164, + 202, + 158, + 65, + 170, + 254, + 250, + 193, + 225, + 195, + 222 + ], + "ciphertext": [ + 0, + 228, + 114, + 151, + 31, + 58, + 119, + 112, + 170, + 113, + 88, + 253, + 146, + 241, + 123, + 183 + ], + "tag": [ + 22, + 102, + 27, + 133, + 235, + 81, + 100, + 108, + 148, + 207, + 43, + 228, + 228, + 45, + 122, + 142 + ] } ] diff --git a/tests/unit_node/crypto/gcmEncryptExtIV256.json b/tests/unit_node/crypto/gcmEncryptExtIV256.json index cb8ba308692e98..808c47ec6ee5ca 100644 --- a/tests/unit_node/crypto/gcmEncryptExtIV256.json +++ b/tests/unit_node/crypto/gcmEncryptExtIV256.json @@ -57373,5 +57373,354 @@ 246, 57 ] + }, + { + "key": [ + 187, + 70, + 53, + 215, + 102, + 221, + 14, + 74, + 112, + 25, + 209, + 114, + 76, + 115, + 110, + 31, + 44, + 1, + 106, + 249, + 226, + 158, + 125, + 58, + 162, + 192, + 222, + 35, + 231, + 128, + 175, + 38 + ], + "nonce": [ + 171 + ], + "aad": [ + 15, + 133, + 199, + 219, + 235, + 103, + 75, + 122, + 112, + 195, + 81, + 37, + 211, + 97, + 147, + 80 + ], + "plaintext": [ + 208, + 92, + 232, + 120, + 217, + 70, + 98, + 209, + 82, + 11, + 24, + 75, + 75, + 239, + 60, + 69 + ], + "ciphertext": [ + 81, + 186, + 162, + 106, + 106, + 113, + 156, + 22, + 0, + 100, + 95, + 243, + 191, + 223, + 165, + 59 + ], + "tag": [ + 107, + 213, + 78, + 81, + 132, + 235, + 48, + 9, + 52, + 179, + 146, + 195, + 43, + 124, + 26, + 110 + ] + }, + { + "key": [ + 252, + 188, + 126, + 182, + 39, + 22, + 220, + 127, + 121, + 43, + 97, + 148, + 210, + 109, + 109, + 86, + 158, + 174, + 224, + 122, + 157, + 60, + 55, + 202, + 66, + 133, + 64, + 144, + 102, + 30, + 24, + 69 + ], + "nonce": [ + 76, + 140, + 70, + 36, + 39, + 155, + 35, + 180, + 149, + 199, + 136, + 132, + 76, + 118, + 210, + 37, + 235, + 242, + 56, + 38, + 89, + 156, + 62, + 28, + 244, + 219, + 29, + 162, + 214, + 90, + 127, + 117, + 68, + 216, + 232, + 111, + 204, + 51, + 251, + 17, + 61, + 49, + 116, + 184, + 199, + 144, + 49, + 34, + 203, + 89, + 103, + 246, + 16, + 115, + 130, + 204, + 90, + 198, + 231, + 160, + 228, + 202, + 79, + 8, + 222, + 62, + 145, + 29, + 72, + 62, + 104, + 37, + 61, + 63, + 136, + 108, + 254, + 52, + 155, + 249, + 50, + 153, + 162, + 142, + 102, + 91, + 192, + 150, + 165, + 28, + 232, + 76, + 230, + 148, + 11, + 52, + 160, + 55, + 114, + 36, + 131, + 185, + 106, + 123, + 37, + 80, + 127, + 90, + 4, + 100, + 60, + 103, + 48, + 250, + 170, + 182, + 24, + 230, + 35, + 26, + 114, + 119, + 20, + 214, + 243, + 102, + 250, + 155 + ], + "aad": [ + 60, + 24, + 42, + 241, + 156, + 70, + 255, + 74, + 203, + 218, + 206, + 207, + 112, + 180, + 47, + 181 + ], + "plaintext": [ + 34, + 20, + 79, + 193, + 47, + 123, + 197, + 82, + 43, + 136, + 183, + 108, + 141, + 237, + 28, + 118 + ], + "ciphertext": [ + 200, + 217, + 129, + 7, + 192, + 203, + 60, + 15, + 210, + 24, + 154, + 233, + 114, + 128, + 213, + 98 + ], + "tag": [ + 41, + 6, + 119, + 35, + 48, + 236, + 217, + 163, + 184, + 168, + 40, + 118, + 164, + 235, + 222, + 234 + ] } ] diff --git a/tests/unit_node/crypto/generate_fixture.mjs b/tests/unit_node/crypto/generate_fixture.mjs index 3724fe4aff76ab..3fb78e82c4ce52 100644 --- a/tests/unit_node/crypto/generate_fixture.mjs +++ b/tests/unit_node/crypto/generate_fixture.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Run this file with `node` to regenerate the testdata/crypto_digest_fixtures.json file. import { readFileSync, writeFileSync } from "node:fs"; diff --git a/tests/unit_node/crypto/generate_keys.mjs b/tests/unit_node/crypto/generate_keys.mjs index 29d9f570f3b2a4..d422729a29b0fe 100644 --- a/tests/unit_node/crypto/generate_keys.mjs +++ b/tests/unit_node/crypto/generate_keys.mjs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { writeFileSync } from "node:fs"; import { join } from "node:path"; diff --git a/tests/unit_node/dgram_test.ts b/tests/unit_node/dgram_test.ts index 2ccdfbfb7adc94..521b2448adcd09 100644 --- a/tests/unit_node/dgram_test.ts +++ b/tests/unit_node/dgram_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals } from "@std/assert"; import { execCode } from "../unit/test_util.ts"; diff --git a/tests/unit_node/domain_test.ts b/tests/unit_node/domain_test.ts index ddc56efae3d5c8..59b2c57b77e021 100644 --- a/tests/unit_node/domain_test.ts +++ b/tests/unit_node/domain_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Copyright © Benjamin Lupton // This code has been forked by https://github.com/bevry/domain-browser/commit/8bce7f4a093966ca850da75b024239ad5d0b33c6 diff --git a/tests/unit_node/events_test.ts b/tests/unit_node/events_test.ts index 8cfef6319aeda0..152ace787bddf5 100644 --- a/tests/unit_node/events_test.ts +++ b/tests/unit_node/events_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import events, { addAbortListener, EventEmitter } from "node:events"; diff --git a/tests/unit_node/fetch_test.ts b/tests/unit_node/fetch_test.ts index 399d6052a56377..d005fd1d6edad7 100644 --- a/tests/unit_node/fetch_test.ts +++ b/tests/unit_node/fetch_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals } from "@std/assert"; import { createReadStream } from "node:fs"; diff --git a/tests/unit_node/fs_test.ts b/tests/unit_node/fs_test.ts index 631608d7ccc5fc..2dcd45529f8888 100644 --- a/tests/unit_node/fs_test.ts +++ b/tests/unit_node/fs_test.ts @@ -1,8 +1,9 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /// import { assert, assertEquals, assertRejects, assertThrows } from "@std/assert"; import { join } from "node:path"; +import { fileURLToPath } from "node:url"; import { tmpdir } from "node:os"; import { closeSync, @@ -160,7 +161,9 @@ Deno.test( } catch (error: unknown) { assertEquals( `${error}`, - `Error: ENOENT: no such file or directory, stat '${fileUrl.pathname}'`, + `Error: ENOENT: no such file or directory, stat '${ + fileURLToPath(fileUrl) + }'`, ); } }, diff --git a/tests/unit_node/http2_test.ts b/tests/unit_node/http2_test.ts index c540c90f7e56e0..698e6b4ebedd9b 100644 --- a/tests/unit_node/http2_test.ts +++ b/tests/unit_node/http2_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-console @@ -152,6 +152,7 @@ Deno.test("[node/http2.createServer()]", { // TODO(satyarohith): enable the test on windows. ignore: Deno.build.os === "windows", }, async () => { + const serverListening = Promise.withResolvers(); const server = http2.createServer((_req, res) => { res.setHeader("Content-Type", "text/html"); res.setHeader("X-Foo", "bar"); @@ -159,8 +160,10 @@ Deno.test("[node/http2.createServer()]", { res.write("Hello, World!"); res.end(); }); - server.listen(0); - const port = (server.address() as net.AddressInfo).port; + server.listen(0, () => { + serverListening.resolve((server.address() as net.AddressInfo).port); + }); + const port = await serverListening.promise; const endpoint = `http://localhost:${port}`; const response = await curlRequest([ diff --git a/tests/unit_node/http_test.ts b/tests/unit_node/http_test.ts index 2b3b8f509f6800..747854661708d4 100644 --- a/tests/unit_node/http_test.ts +++ b/tests/unit_node/http_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-console @@ -10,6 +10,7 @@ import http, { } from "node:http"; import url from "node:url"; import https from "node:https"; +import zlib from "node:zlib"; import net, { Socket } from "node:net"; import fs from "node:fs"; import { text } from "node:stream/consumers"; @@ -499,7 +500,6 @@ Deno.test("[node/http] send request with non-chunked body", async () => { assert(socket.writable); assert(socket.readable); socket.setKeepAlive(); - socket.destroy(); socket.setTimeout(100); }); req.write("hello "); @@ -512,6 +512,11 @@ Deno.test("[node/http] send request with non-chunked body", async () => { // in order to not cause a flaky test sanitizer failure await new Promise((resolve) => setTimeout(resolve, 100)), ]); + + if (Deno.build.os === "windows") { + // FIXME(kt3k): This is necessary for preventing op leak on windows + await new Promise((resolve) => setTimeout(resolve, 4000)); + } }); Deno.test("[node/http] send request with chunked body", async () => { @@ -559,6 +564,11 @@ Deno.test("[node/http] send request with chunked body", async () => { req.end(); await servePromise; + + if (Deno.build.os === "windows") { + // FIXME(kt3k): This is necessary for preventing op leak on windows + await new Promise((resolve) => setTimeout(resolve, 4000)); + } }); Deno.test("[node/http] send request with chunked body as default", async () => { @@ -604,6 +614,11 @@ Deno.test("[node/http] send request with chunked body as default", async () => { req.end(); await servePromise; + + if (Deno.build.os === "windows") { + // FIXME(kt3k): This is necessary for preventing op leak on windows + await new Promise((resolve) => setTimeout(resolve, 4000)); + } }); Deno.test("[node/http] ServerResponse _implicitHeader", async () => { @@ -689,7 +704,7 @@ Deno.test("[node/http] ClientRequest handle non-string headers", async () => { assertEquals(headers!["1"], "2"); }); -Deno.test("[node/http] ClientRequest uses HTTP/1.1", async () => { +Deno.test("[node/https] ClientRequest uses HTTP/1.1", async () => { let body = ""; const { promise, resolve, reject } = Promise.withResolvers(); const req = https.request("https://localhost:5545/http_version", { @@ -800,8 +815,9 @@ Deno.test("[node/http] ClientRequest search params", async () => { let body = ""; const { promise, resolve, reject } = Promise.withResolvers(); const req = http.request({ - host: "localhost:4545", - path: "search_params?foo=bar", + host: "localhost", + port: 4545, + path: "/search_params?foo=bar", }, (resp) => { resp.on("data", (chunk) => { body += chunk; @@ -1011,28 +1027,50 @@ Deno.test( Deno.test( "[node/http] client destroy before sending request should not error", - () => { + async () => { + const { resolve, promise } = Promise.withResolvers(); const request = http.request("http://localhost:5929/"); // Calling this would throw request.destroy(); + request.on("error", (e) => { + assertEquals(e.message, "socket hang up"); + }); + request.on("close", () => resolve()); + await promise; + + if (Deno.build.os === "windows") { + // FIXME(kt3k): This is necessary for preventing op leak on windows + await new Promise((resolve) => setTimeout(resolve, 4000)); + } }, ); +const isWindows = Deno.build.os === "windows"; + Deno.test( "[node/http] destroyed requests should not be sent", + { sanitizeResources: !isWindows, sanitizeOps: !isWindows }, async () => { let receivedRequest = false; - const server = Deno.serve(() => { + const requestClosed = Promise.withResolvers(); + const ac = new AbortController(); + const server = Deno.serve({ port: 0, signal: ac.signal }, () => { receivedRequest = true; return new Response(null); }); const request = http.request(`http://localhost:${server.addr.port}/`); request.destroy(); request.end("hello"); - - await new Promise((r) => setTimeout(r, 500)); + request.on("error", (err) => { + assert(err.message.includes("socket hang up")); + ac.abort(); + }); + request.on("close", () => { + requestClosed.resolve(); + }); + await requestClosed.promise; assertEquals(receivedRequest, false); - await server.shutdown(); + await server.finished; }, ); @@ -1060,22 +1098,33 @@ Deno.test("[node/https] node:https exports globalAgent", async () => { ); }); -Deno.test("[node/http] node:http request.setHeader(header, null) doesn't throw", () => { +Deno.test("[node/http] node:http request.setHeader(header, null) doesn't throw", async () => { { - const req = http.request("http://localhost:4545/"); - req.on("error", () => {}); + const { promise, resolve } = Promise.withResolvers(); + const req = http.request("http://localhost:4545/", (res) => { + res.on("data", () => {}); + res.on("end", () => { + resolve(); + }); + }); // @ts-expect-error - null is not a valid header value req.setHeader("foo", null); req.end(); - req.destroy(); + await promise; } { - const req = https.request("https://localhost:4545/"); - req.on("error", () => {}); + const { promise, resolve } = Promise.withResolvers(); + const req = http.request("http://localhost:4545/", (res) => { + res.on("data", () => {}); + res.on("end", () => { + resolve(); + }); + }); // @ts-expect-error - null is not a valid header value req.setHeader("foo", null); req.end(); - req.destroy(); + + await promise; } }); @@ -1151,6 +1200,7 @@ Deno.test("[node/http] ServerResponse header names case insensitive", async () = const { promise, resolve } = Promise.withResolvers(); const server = http.createServer((_req, res) => { res.setHeader("Content-Length", "12345"); + assert(res.hasHeader("Content-Length")); res.removeHeader("content-length"); assertEquals(res.getHeader("Content-Length"), undefined); assert(!res.hasHeader("Content-Length")); @@ -1369,6 +1419,7 @@ Deno.test("[node/http] client closing a streaming request doesn't terminate serv let interval: number; let uploadedData = ""; let requestError: Error | null = null; + const deferred1 = Promise.withResolvers(); const server = http.createServer((req, res) => { res.writeHead(200, { "Content-Type": "text/plain" }); interval = setInterval(() => { @@ -1381,13 +1432,13 @@ Deno.test("[node/http] client closing a streaming request doesn't terminate serv clearInterval(interval); }); req.on("error", (err) => { + deferred1.resolve(); requestError = err; clearInterval(interval); res.end(); }); }); - const deferred1 = Promise.withResolvers(); server.listen(0, () => { // deno-lint-ignore no-explicit-any const port = (server.address() as any).port; @@ -1417,9 +1468,6 @@ Deno.test("[node/http] client closing a streaming request doesn't terminate serv if (sentChunks >= 3) { client.destroy(); - setTimeout(() => { - deferred1.resolve(); - }, 40); } else { setTimeout(writeChunk, 10); } @@ -1776,3 +1824,60 @@ Deno.test("[node/http] ServerResponse socket", async () => { await promise; }); + +Deno.test("[node/http] decompress brotli response", { + permissions: { net: true }, +}, async () => { + let received = false; + const ac = new AbortController(); + const server = Deno.serve({ port: 5928, signal: ac.signal }, (_req) => { + received = true; + return Response.json([ + ["accept-language", "*"], + ["host", "localhost:3000"], + ["user-agent", "Deno/2.1.1"], + ], {}); + }); + const { promise, resolve, reject } = Promise.withResolvers(); + let body = ""; + + const request = http.get( + "http://localhost:5928/", + { + headers: { + "accept-encoding": "gzip, deflate, br, zstd", + }, + }, + (resp) => { + const decompress = zlib.createBrotliDecompress(); + resp.on("data", (chunk) => { + decompress.write(chunk); + }); + + resp.on("end", () => { + decompress.end(); + }); + + decompress.on("data", (chunk) => { + body += chunk; + }); + + decompress.on("end", () => { + resolve(); + }); + }, + ); + request.on("error", reject); + request.end(() => { + assert(received); + }); + + await promise; + ac.abort(); + await server.finished; + + assertEquals(JSON.parse(body), [["accept-language", "*"], [ + "host", + "localhost:3000", + ], ["user-agent", "Deno/2.1.1"]]); +}); diff --git a/tests/unit_node/inspector_test.ts b/tests/unit_node/inspector_test.ts index a53e977bb656c4..ed943321081bac 100644 --- a/tests/unit_node/inspector_test.ts +++ b/tests/unit_node/inspector_test.ts @@ -1,5 +1,8 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import inspector, { Session } from "node:inspector"; +import inspectorPromises, { + Session as SessionPromise, +} from "node:inspector/promises"; import { assertEquals } from "@std/assert/equals"; Deno.test("[node/inspector] - importing inspector works", () => { @@ -9,3 +12,11 @@ Deno.test("[node/inspector] - importing inspector works", () => { Deno.test("[node/inspector] - Session constructor should not throw", () => { new Session(); }); + +Deno.test("[node/inspector/promises] - importing inspector works", () => { + assertEquals(typeof inspectorPromises.open, "function"); +}); + +Deno.test("[node/inspector/promises] - Session constructor should not throw", () => { + new SessionPromise(); +}); diff --git a/tests/unit_node/internal/_randomBytes_test.ts b/tests/unit_node/internal/_randomBytes_test.ts index ff3acf5e389c25..d479f44e7656c3 100644 --- a/tests/unit_node/internal/_randomBytes_test.ts +++ b/tests/unit_node/internal/_randomBytes_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals, assertRejects, assertThrows } from "@std/assert"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { pseudoRandomBytes, randomBytes } from "node:crypto"; diff --git a/tests/unit_node/internal/_randomFill_test.ts b/tests/unit_node/internal/_randomFill_test.ts index 7b590666cd3b61..d865b75f390a65 100644 --- a/tests/unit_node/internal/_randomFill_test.ts +++ b/tests/unit_node/internal/_randomFill_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { Buffer } from "node:buffer"; import { randomFill, randomFillSync } from "node:crypto"; import { assertEquals, assertNotEquals, assertThrows } from "@std/assert"; diff --git a/tests/unit_node/internal/_randomInt_test.ts b/tests/unit_node/internal/_randomInt_test.ts index b0d9d771eefcee..ec2f8695514550 100644 --- a/tests/unit_node/internal/_randomInt_test.ts +++ b/tests/unit_node/internal/_randomInt_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { randomInt } from "node:crypto"; import { assert, assertThrows } from "@std/assert"; diff --git a/tests/unit_node/module_test.ts b/tests/unit_node/module_test.ts index 96c3504bd24feb..728a339fb653a5 100644 --- a/tests/unit_node/module_test.ts +++ b/tests/unit_node/module_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { builtinModules, diff --git a/tests/unit_node/net_test.ts b/tests/unit_node/net_test.ts index 83d751866f99c8..1142e6201d04fa 100644 --- a/tests/unit_node/net_test.ts +++ b/tests/unit_node/net_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-console diff --git a/tests/unit_node/os_test.ts b/tests/unit_node/os_test.ts index 78636e755d5608..99ad82c0310d9c 100644 --- a/tests/unit_node/os_test.ts +++ b/tests/unit_node/os_test.ts @@ -1,5 +1,5 @@ // deno-lint-ignore-file no-undef -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import os from "node:os"; import { diff --git a/tests/unit_node/path_test.ts b/tests/unit_node/path_test.ts index bd0711334dff4c..63aa5ee2c10ff7 100644 --- a/tests/unit_node/path_test.ts +++ b/tests/unit_node/path_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import path from "node:path"; import posix from "node:path/posix"; diff --git a/tests/unit_node/perf_hooks_test.ts b/tests/unit_node/perf_hooks_test.ts index 8247f9fd3aa561..a77dd08538204f 100644 --- a/tests/unit_node/perf_hooks_test.ts +++ b/tests/unit_node/perf_hooks_test.ts @@ -1,11 +1,11 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import * as perfHooks from "node:perf_hooks"; import { monitorEventLoopDelay, performance, PerformanceObserver, } from "node:perf_hooks"; -import { assertEquals, assertThrows } from "@std/assert"; +import { assert, assertEquals, assertThrows } from "@std/assert"; Deno.test({ name: "[perf_hooks] performance", @@ -73,11 +73,16 @@ Deno.test("[perf_hooks]: eventLoopUtilization", () => { assertEquals(typeof obj.utilization, "number"); }); -Deno.test("[perf_hooks]: monitorEventLoopDelay", () => { - const e = assertThrows(() => { - monitorEventLoopDelay({ resolution: 1 }); - }); +Deno.test("[perf_hooks]: monitorEventLoopDelay", async () => { + const e = monitorEventLoopDelay(); + assertEquals(e.count, 0); + e.enable(); - // deno-lint-ignore no-explicit-any - assertEquals((e as any).code, "ERR_NOT_IMPLEMENTED"); + await new Promise((resolve) => setTimeout(resolve, 100)); + + assert(e.min > 0); + assert(e.minBigInt > 0n); + assert(e.count > 0); + + e.disable(); }); diff --git a/tests/unit_node/process_test.ts b/tests/unit_node/process_test.ts index 49de2dce1dd7e2..592bd6497fc956 100644 --- a/tests/unit_node/process_test.ts +++ b/tests/unit_node/process_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-undef no-console diff --git a/tests/unit_node/punycode_test.ts b/tests/unit_node/punycode_test.ts index fffa26164f6d35..d4fa5b50a0a91b 100644 --- a/tests/unit_node/punycode_test.ts +++ b/tests/unit_node/punycode_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import * as punycode from "node:punycode"; import { assertEquals } from "@std/assert"; diff --git a/tests/unit_node/querystring_test.ts b/tests/unit_node/querystring_test.ts index 09672df370efa8..d57941264cffa3 100644 --- a/tests/unit_node/querystring_test.ts +++ b/tests/unit_node/querystring_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals } from "@std/assert"; import { parse, stringify } from "node:querystring"; diff --git a/tests/unit_node/readline_test.ts b/tests/unit_node/readline_test.ts index 68f0cd7c920a61..02fd6958bfb419 100644 --- a/tests/unit_node/readline_test.ts +++ b/tests/unit_node/readline_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { createInterface, Interface } from "node:readline"; import { assertInstanceOf } from "@std/assert"; import { Readable, Writable } from "node:stream"; diff --git a/tests/unit_node/repl_test.ts b/tests/unit_node/repl_test.ts index 693fdcc9eb4093..d0759f442f02a0 100644 --- a/tests/unit_node/repl_test.ts +++ b/tests/unit_node/repl_test.ts @@ -1,5 +1,5 @@ // deno-lint-ignore-file no-undef -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import repl from "node:repl"; import { assert } from "@std/assert"; diff --git a/tests/unit_node/stream_test.ts b/tests/unit_node/stream_test.ts index b8542f6cfd3aad..9c58ae03d681db 100644 --- a/tests/unit_node/stream_test.ts +++ b/tests/unit_node/stream_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals } from "@std/assert"; import { fromFileUrl, relative } from "@std/path"; diff --git a/tests/unit_node/string_decoder_test.ts b/tests/unit_node/string_decoder_test.ts index 34fbdd881007f6..10623734220c57 100644 --- a/tests/unit_node/string_decoder_test.ts +++ b/tests/unit_node/string_decoder_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals } from "@std/assert"; import { Buffer } from "node:buffer"; import { StringDecoder } from "node:string_decoder"; diff --git a/tests/unit_node/timers_test.ts b/tests/unit_node/timers_test.ts index ddc6dc0d85dd45..43a33380965d18 100644 --- a/tests/unit_node/timers_test.ts +++ b/tests/unit_node/timers_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, fail } from "@std/assert"; import * as timers from "node:timers"; @@ -100,6 +100,16 @@ Deno.test("[node/timers refresh cancelled timer]", () => { p.refresh(); }); +Deno.test("[node/timers] clearTimeout with number", () => { + const timer = +timers.setTimeout(() => fail(), 10); + timers.clearTimeout(timer); +}); + +Deno.test("[node/timers] clearInterval with number", () => { + const timer = +timers.setInterval(() => fail(), 10); + timers.clearInterval(timer); +}); + Deno.test("[node/timers setImmediate returns Immediate object]", () => { const { clearImmediate, setImmediate } = timers; @@ -118,7 +128,7 @@ Deno.test({ expectedValue: 42, intervalMs: 100, iterations: 3, - tolerancePercent: 50, + tolerancePercent: Deno.env.get("CI") != null ? 75 : 50, }; const { setInterval } = timersPromises; @@ -200,6 +210,7 @@ Deno.test({ const INTERVAL_MS = 500; const TOTAL_DURATION_MS = 3000; const TOLERANCE_MS = 500; + const DELTA_TOLERANCE_MS = Deno.env.get("CI") != null ? 100 : 50; const abortController = new AbortController(); const { setInterval } = timersPromises; @@ -247,14 +258,14 @@ Deno.test({ ); intervalDeltas.forEach((delta, i) => { - const isIntervalValid = delta >= (INTERVAL_MS - 50) && - delta <= (INTERVAL_MS + 50); + const isIntervalValid = delta >= (INTERVAL_MS - DELTA_TOLERANCE_MS) && + delta <= (INTERVAL_MS + DELTA_TOLERANCE_MS); assertEquals( isIntervalValid, true, `Interval ${ i + 1 - } duration (${delta}ms) should be within ±50ms of ${INTERVAL_MS}ms`, + } duration (${delta}ms) should be within ±${DELTA_TOLERANCE_MS}ms of ${INTERVAL_MS}ms`, ); }); }, diff --git a/tests/unit_node/tls_test.ts b/tests/unit_node/tls_test.ts index 43d6205b0bbcc4..f34d9efb5b7857 100644 --- a/tests/unit_node/tls_test.ts +++ b/tests/unit_node/tls_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, @@ -257,3 +257,17 @@ Deno.test("TLSSocket.alpnProtocol is set for client", async () => { listener.close(); await new Promise((resolve) => outgoing.on("close", resolve)); }); + +Deno.test("tls connect upgrade tcp", async () => { + const { promise, resolve } = Promise.withResolvers(); + + const socket = new net.Socket(); + socket.connect(443, "google.com"); + socket.on("connect", () => { + const secure = tls.connect({ socket }); + secure.on("secureConnect", () => resolve()); + }); + + await promise; + socket.destroy(); +}); diff --git a/tests/unit_node/tty_test.ts b/tests/unit_node/tty_test.ts index df2888ddd05ce7..9acf9be614d2a8 100644 --- a/tests/unit_node/tty_test.ts +++ b/tests/unit_node/tty_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-explicit-any import { assert } from "@std/assert"; diff --git a/tests/unit_node/util_test.ts b/tests/unit_node/util_test.ts index 6267018b126f7c..0f83bb1b9a005b 100644 --- a/tests/unit_node/util_test.ts +++ b/tests/unit_node/util_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, @@ -224,7 +224,7 @@ Deno.test({ fn() { assert(util.types.isNativeError(new Error())); assert(util.types.isNativeError(new TypeError())); - assert(!util.types.isNativeError(new DOMException())); + assert(util.types.isNativeError(new DOMException())); }, }); diff --git a/tests/unit_node/v8_test.ts b/tests/unit_node/v8_test.ts index f7208fb0eff32a..7262ccd1fb8bc9 100644 --- a/tests/unit_node/v8_test.ts +++ b/tests/unit_node/v8_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { cachedDataVersionTag, deserialize, diff --git a/tests/unit_node/vm_test.ts b/tests/unit_node/vm_test.ts index 85b9556637d090..2876208e2f907b 100644 --- a/tests/unit_node/vm_test.ts +++ b/tests/unit_node/vm_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assertEquals, assertThrows } from "@std/assert"; import { createContext, diff --git a/tests/unit_node/wasi_test.ts b/tests/unit_node/wasi_test.ts index 6af2d4b1db5880..ae174e961b874c 100644 --- a/tests/unit_node/wasi_test.ts +++ b/tests/unit_node/wasi_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import wasi from "node:wasi"; import { assertThrows } from "@std/assert"; diff --git a/tests/unit_node/worker_threads_test.ts b/tests/unit_node/worker_threads_test.ts index 24a910789894c1..c994b91eb133f4 100644 --- a/tests/unit_node/worker_threads_test.ts +++ b/tests/unit_node/worker_threads_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, @@ -136,6 +136,25 @@ Deno.test({ }, }); +Deno.test({ + name: "[node/worker_threads] Worker eval", + async fn() { + // Check that newlines are encoded properly + const worker = new workerThreads.Worker( + ` + import { parentPort } from "node:worker_threads" + console.log("hey, foo") // comment + parentPort.postMessage("It works!"); + `, + { + eval: true, + }, + ); + assertEquals((await once(worker, "message"))[0], "It works!"); + worker.terminate(); + }, +}); + Deno.test({ name: "[node/worker_threads] worker thread with type module", async fn() { @@ -822,3 +841,26 @@ Deno.test({ assertEquals(result, true); }, }); + +Deno.test("[node/worker_threads] Worker runs async ops correctly", async () => { + const recvMessage = Promise.withResolvers(); + const timer = setTimeout(() => recvMessage.reject(), 1000); + const worker = new workerThreads.Worker( + ` + import { parentPort } from "node:worker_threads"; + setTimeout(() => { + parentPort.postMessage("Hello from worker"); + }, 10); + `, + { eval: true }, + ); + + worker.on("message", (msg) => { + assertEquals(msg, "Hello from worker"); + worker.terminate(); + recvMessage.resolve(); + clearTimeout(timer); + }); + + await recvMessage.promise; +}); diff --git a/tests/unit_node/zlib_test.ts b/tests/unit_node/zlib_test.ts index de2d2450d1cc20..fb066a30d1535a 100644 --- a/tests/unit_node/zlib_test.ts +++ b/tests/unit_node/zlib_test.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { assert, assertEquals } from "@std/assert"; import { fromFileUrl, relative } from "@std/path"; diff --git a/tests/util/server/Cargo.toml b/tests/util/server/Cargo.toml index efc81da17c55f5..aec9f6e91c8d85 100644 --- a/tests/util/server/Cargo.toml +++ b/tests/util/server/Cargo.toml @@ -1,4 +1,4 @@ -# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +# Copyright 2018-2025 the Deno authors. MIT license. [package] name = "test_server" diff --git a/tests/util/server/src/assertions.rs b/tests/util/server/src/assertions.rs index c8b8845f4c4573..9eb39fb4a8cd84 100644 --- a/tests/util/server/src/assertions.rs +++ b/tests/util/server/src/assertions.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::io::Write; diff --git a/tests/util/server/src/builders.rs b/tests/util/server/src/builders.rs index 4a1510ce4c1017..d5df8d09c87193 100644 --- a/tests/util/server/src/builders.rs +++ b/tests/util/server/src/builders.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::cell::RefCell; use std::collections::HashMap; @@ -325,6 +325,15 @@ impl TestContext { builder } + pub fn run_deno(&self, args: impl AsRef) { + self + .new_command() + .name("deno") + .args(args) + .run() + .skip_output_check(); + } + pub fn run_npm(&self, args: impl AsRef) { self .new_command() diff --git a/tests/util/server/src/factory.rs b/tests/util/server/src/factory.rs index 5b796fbc1d63ca..a13d673971082a 100644 --- a/tests/util/server/src/factory.rs +++ b/tests/util/server/src/factory.rs @@ -1,8 +1,9 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -use glob::glob; +// Copyright 2018-2025 the Deno authors. MIT license. use std::collections::HashSet; use std::path::PathBuf; +use glob::glob; + /// Generate a unit test factory verified and backed by a glob. #[macro_export] macro_rules! unit_test_factory { diff --git a/tests/util/server/src/fs.rs b/tests/util/server/src/fs.rs index 7feb0799ae45b9..19b94731eb26a9 100644 --- a/tests/util/server/src/fs.rs +++ b/tests/util/server/src/fs.rs @@ -1,7 +1,5 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use lsp_types::Uri; -use pretty_assertions::assert_eq; use std::borrow::Cow; use std::collections::HashSet; use std::ffi::OsStr; @@ -15,6 +13,8 @@ use std::str::FromStr; use std::sync::Arc; use anyhow::Context; +use lsp_types::Uri; +use pretty_assertions::assert_eq; use serde::de::DeserializeOwned; use serde::Serialize; use url::Url; diff --git a/tests/util/server/src/https.rs b/tests/util/server/src/https.rs index 617fd5cae29d44..f3fc1291fe74d4 100644 --- a/tests/util/server/src/https.rs +++ b/tests/util/server/src/https.rs @@ -1,4 +1,9 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. +use std::io; +use std::num::NonZeroUsize; +use std::result::Result; +use std::sync::Arc; + use anyhow::anyhow; use futures::Stream; use futures::StreamExt; @@ -6,10 +11,6 @@ use rustls_tokio_stream::rustls; use rustls_tokio_stream::rustls::pki_types::CertificateDer; use rustls_tokio_stream::rustls::pki_types::PrivateKeyDer; use rustls_tokio_stream::TlsStream; -use std::io; -use std::num::NonZeroUsize; -use std::result::Result; -use std::sync::Arc; use tokio::net::TcpStream; use crate::get_tcp_listener_stream; diff --git a/tests/util/server/src/lib.rs b/tests/util/server/src/lib.rs index 89dc1ffc3b796d..477568ab1b3416 100644 --- a/tests/util/server/src/lib.rs +++ b/tests/util/server/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::collections::HashMap; use std::env; @@ -816,15 +816,17 @@ pub fn wildcard_match_detailed( } let actual_next_text = ¤t_text[max_current_text_found_index..]; - let max_next_text_len = 40; - let next_text_len = - std::cmp::min(max_next_text_len, actual_next_text.len()); + let next_text_len = actual_next_text + .chars() + .take(40) + .map(|c| c.len_utf8()) + .sum::(); output_lines.push(format!( "==== NEXT ACTUAL TEXT ====\n{}{}", colors::red(annotate_whitespace( &actual_next_text[..next_text_len] )), - if actual_next_text.len() > max_next_text_len { + if actual_next_text.len() > next_text_len { "[TRUNCATED]" } else { "" @@ -919,6 +921,11 @@ pub fn wildcard_match_detailed( if was_last_wildcard || was_last_wildline || current_text.is_empty() { WildcardMatchResult::Success + } else if current_text == "\n" { + WildcardMatchResult::Fail( + "\n!!!! PROBLEM: Missing final newline at end of expected output !!!!" + .to_string(), + ) } else { output_lines.push("==== HAD TEXT AT END OF FILE ====".to_string()); output_lines.push(colors::red(annotate_whitespace(current_text))); @@ -1289,9 +1296,10 @@ pub(crate) mod colors { #[cfg(test)] mod tests { - use super::*; use pretty_assertions::assert_eq; + use super::*; + #[test] fn parse_wrk_output_1() { const TEXT: &str = include_str!("./testdata/wrk1.txt"); diff --git a/tests/util/server/src/lsp.rs b/tests/util/server/src/lsp.rs index d34deb21619a37..12593578c3c661 100644 --- a/tests/util/server/src/lsp.rs +++ b/tests/util/server/src/lsp.rs @@ -1,11 +1,24 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::deno_exe_path; -use crate::jsr_registry_url; -use crate::npm_registry_url; -use crate::PathRef; - -use super::TempDir; +use std::collections::HashMap; +use std::collections::HashSet; +use std::ffi::OsStr; +use std::ffi::OsString; +use std::io; +use std::io::BufRead; +use std::io::BufReader; +use std::io::Write; +use std::path::Path; +use std::process::Child; +use std::process::ChildStdin; +use std::process::ChildStdout; +use std::process::Command; +use std::process::Stdio; +use std::str::FromStr; +use std::sync::mpsc; +use std::sync::Arc; +use std::time::Duration; +use std::time::Instant; use anyhow::Result; use lsp_types as lsp; @@ -32,27 +45,14 @@ use serde::Serialize; use serde_json::json; use serde_json::to_value; use serde_json::Value; -use std::collections::HashMap; -use std::collections::HashSet; -use std::ffi::OsStr; -use std::ffi::OsString; -use std::io; -use std::io::BufRead; -use std::io::BufReader; -use std::io::Write; -use std::path::Path; -use std::process::Child; -use std::process::ChildStdin; -use std::process::ChildStdout; -use std::process::Command; -use std::process::Stdio; -use std::str::FromStr; -use std::sync::mpsc; -use std::sync::Arc; -use std::time::Duration; -use std::time::Instant; use url::Url; +use super::TempDir; +use crate::deno_exe_path; +use crate::jsr_registry_url; +use crate::npm_registry_url; +use crate::PathRef; + static CONTENT_TYPE_REG: Lazy = lazy_regex::lazy_regex!(r"(?i)^content-length:\s+(\d+)"); @@ -1289,7 +1289,18 @@ impl SourceFile { "md" => "markdown", "html" => "html", "css" => "css", + "scss" => "scss", + "sass" => "sass", + "less" => "less", "yaml" => "yaml", + "sql" => "sql", + "svelte" => "svelte", + "vue" => "vue", + "astro" => "astro", + "vto" => "vento", + "vento" => "vento", + "njk" => "nunjucks", + "nunjucks" => "nunjucks", other => panic!("unsupported file extension: {other}"), }; Self { diff --git a/tests/util/server/src/macros.rs b/tests/util/server/src/macros.rs index e076583f19b306..52c84acf008536 100644 --- a/tests/util/server/src/macros.rs +++ b/tests/util/server/src/macros.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. #[macro_export] // https://stackoverflow.com/questions/38088067/equivalent-of-func-or-function-in-rust diff --git a/tests/util/server/src/npm.rs b/tests/util/server/src/npm.rs index 31686fa8543dfb..da9a59cf2ffc9b 100644 --- a/tests/util/server/src/npm.rs +++ b/tests/util/server/src/npm.rs @@ -1,7 +1,8 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::collections::HashMap; use std::fs; +use std::path::Path; use anyhow::Context; use anyhow::Result; @@ -189,6 +190,60 @@ impl TestNpmRegistry { } } +// NOTE: extracted out partially from the `tar` crate, all credits to the original authors +fn append_dir_all( + builder: &mut tar::Builder, + path: &Path, + src_path: &Path, +) -> Result<()> { + builder.follow_symlinks(true); + let mode = tar::HeaderMode::Deterministic; + builder.mode(mode); + let mut stack = vec![(src_path.to_path_buf(), true, false)]; + let mut entries = Vec::new(); + while let Some((src, is_dir, is_symlink)) = stack.pop() { + let dest = path.join(src.strip_prefix(src_path).unwrap()); + // In case of a symlink pointing to a directory, is_dir is false, but src.is_dir() will return true + if is_dir || (is_symlink && src.is_dir()) { + for entry in fs::read_dir(&src)? { + let entry = entry?; + let file_type = entry.file_type()?; + stack.push((entry.path(), file_type.is_dir(), file_type.is_symlink())); + } + if dest != Path::new("") { + entries.push((src, dest)); + } + } else { + entries.push((src, dest)); + } + } + entries.sort_by(|(_, a), (_, b)| a.cmp(b)); + for (src, dest) in entries { + let mut header = tar::Header::new_gnu(); + let metadata = src.metadata().with_context(|| { + format!("trying to get metadata for {}", src.display()) + })?; + header.set_metadata_in_mode(&metadata, mode); + // this is what `tar` sets the mtime to on unix in deterministic mode, on windows it uses a different + // value, which causes the tarball to have a different hash on windows. force it to be the same + // to ensure the same output on all platforms + header.set_mtime(1153704088); + + let data = if src.is_file() { + Box::new( + fs::File::open(&src) + .with_context(|| format!("trying to open file {}", src.display()))?, + ) as Box + } else { + Box::new(std::io::empty()) as Box + }; + builder + .append_data(&mut header, dest, data) + .with_context(|| "appending data")?; + } + Ok(()) +} + fn get_npm_package( registry_hostname: &str, local_path: &str, @@ -212,6 +267,7 @@ fn get_npm_package( let mut tarballs = HashMap::new(); let mut versions = serde_json::Map::new(); let mut latest_version = semver::Version::parse("0.0.0").unwrap(); + let mut dist_tags = serde_json::Map::new(); for entry in fs::read_dir(&package_folder)? { let entry = entry?; let file_type = entry.file_type()?; @@ -228,11 +284,14 @@ fn get_npm_package( GzEncoder::new(&mut tarball_bytes, Compression::default()); { let mut builder = Builder::new(&mut encoder); - builder - .append_dir_all("package", &version_folder) - .with_context(|| { - format!("Error adding tarball for directory: {}", version_folder) - })?; + append_dir_all( + &mut builder, + Path::new("package"), + version_folder.as_path(), + ) + .with_context(|| { + format!("Error adding tarball for directory {}", version_folder,) + })?; builder.finish()?; } encoder.finish()?; @@ -287,6 +346,14 @@ fn get_npm_package( } } + if let Some(publish_config) = version_info.get("publishConfig") { + if let Some(tag) = publish_config.get("tag") { + if let Some(tag) = tag.as_str() { + dist_tags.insert(tag.to_string(), version.clone().into()); + } + } + } + versions.insert(version.clone(), version_info.into()); let version = semver::Version::parse(&version)?; if version.cmp(&latest_version).is_gt() { @@ -294,8 +361,9 @@ fn get_npm_package( } } - let mut dist_tags = serde_json::Map::new(); - dist_tags.insert("latest".to_string(), latest_version.to_string().into()); + if !dist_tags.contains_key("latest") { + dist_tags.insert("latest".to_string(), latest_version.to_string().into()); + } // create the registry file for this package let mut registry_file = serde_json::Map::new(); diff --git a/tests/util/server/src/pty.rs b/tests/util/server/src/pty.rs index 07659262cf4e4c..d72617cd5e1083 100644 --- a/tests/util/server/src/pty.rs +++ b/tests/util/server/src/pty.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use std::borrow::Cow; use std::collections::HashMap; @@ -323,9 +323,10 @@ fn create_pty( cwd: &Path, env_vars: Option>, ) -> Box { - use crate::pty::unix::UnixPty; use std::os::unix::process::CommandExt; + use crate::pty::unix::UnixPty; + // Manually open pty main/secondary sides in the test process. Since we're not actually // changing uid/gid here, this is the easiest way to do it. diff --git a/tests/util/server/src/servers/grpc.rs b/tests/util/server/src/servers/grpc.rs index 144afc06a38054..f097fbd5955ec9 100644 --- a/tests/util/server/src/servers/grpc.rs +++ b/tests/util/server/src/servers/grpc.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. use futures::StreamExt; use h2; diff --git a/tests/util/server/src/servers/hyper_utils.rs b/tests/util/server/src/servers/hyper_utils.rs index 8e01151ed494bb..a8b30ac24e53eb 100644 --- a/tests/util/server/src/servers/hyper_utils.rs +++ b/tests/util/server/src/servers/hyper_utils.rs @@ -1,4 +1,10 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::convert::Infallible; +use std::io; +use std::net::SocketAddr; +use std::pin::Pin; +use std::result::Result; use bytes::Bytes; use futures::Future; @@ -10,11 +16,6 @@ use http::Request; use http::Response; use http_body_util::combinators::UnsyncBoxBody; use hyper_util::rt::TokioIo; -use std::convert::Infallible; -use std::io; -use std::net::SocketAddr; -use std::pin::Pin; -use std::result::Result; use tokio::net::TcpListener; #[derive(Debug, Clone, Copy)] diff --git a/tests/util/server/src/servers/jsr_registry.rs b/tests/util/server/src/servers/jsr_registry.rs index 8970750a2811be..b4b045087c0c32 100644 --- a/tests/util/server/src/servers/jsr_registry.rs +++ b/tests/util/server/src/servers/jsr_registry.rs @@ -1,10 +1,12 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::tests_path; +use std::collections::BTreeMap; +use std::collections::HashMap; +use std::convert::Infallible; +use std::net::SocketAddr; +use std::path::Path; +use std::sync::Mutex; -use super::run_server; -use super::ServerKind; -use super::ServerOptions; use base64::engine::general_purpose::STANDARD_NO_PAD; use base64::Engine as _; use bytes::Bytes; @@ -17,12 +19,11 @@ use hyper::Response; use hyper::StatusCode; use once_cell::sync::Lazy; use serde_json::json; -use std::collections::BTreeMap; -use std::collections::HashMap; -use std::convert::Infallible; -use std::net::SocketAddr; -use std::path::Path; -use std::sync::Mutex; + +use super::run_server; +use super::ServerKind; +use super::ServerOptions; +use crate::tests_path; pub async fn registry_server(port: u16) { let registry_server_addr = SocketAddr::from(([127, 0, 0, 1], port)); diff --git a/tests/util/server/src/servers/mod.rs b/tests/util/server/src/servers/mod.rs index 0b1d99aeb92751..03f327319c25f6 100644 --- a/tests/util/server/src/servers/mod.rs +++ b/tests/util/server/src/servers/mod.rs @@ -1,7 +1,14 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // Usage: provide a port as argument to run hyper_hello benchmark server // otherwise this starts multiple servers on many ports for test endpoints. +use std::collections::HashMap; +use std::convert::Infallible; +use std::env; +use std::net::SocketAddr; +use std::result::Result; +use std::time::Duration; + use base64::prelude::BASE64_STANDARD; use base64::Engine; use bytes::Bytes; @@ -27,12 +34,6 @@ use http_body_util::Empty; use http_body_util::Full; use pretty_assertions::assert_eq; use prost::Message; -use std::collections::HashMap; -use std::convert::Infallible; -use std::env; -use std::net::SocketAddr; -use std::result::Result; -use std::time::Duration; use tokio::io::AsyncWriteExt; use tokio::net::TcpStream; @@ -48,12 +49,11 @@ use hyper_utils::run_server_with_acceptor; use hyper_utils::ServerKind; use hyper_utils::ServerOptions; -use crate::TEST_SERVERS_COUNT; - use super::https::get_tls_listener_stream; use super::https::SupportedHttpVersions; use super::std_path; use super::testdata_path; +use crate::TEST_SERVERS_COUNT; pub(crate) const PORT: u16 = 4545; const TEST_AUTH_TOKEN: &str = "abcdef123456789"; @@ -577,11 +577,6 @@ async fn main_server( ); Ok(res) } - (_, "/bad_redirect") => { - let mut res = Response::new(empty_body()); - *res.status_mut() = StatusCode::FOUND; - Ok(res) - } (_, "/server_error") => { let mut res = Response::new(empty_body()); *res.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; diff --git a/tests/util/server/src/servers/nodejs_org_mirror.rs b/tests/util/server/src/servers/nodejs_org_mirror.rs index 521e79d3c458fa..e3e94757c033c8 100644 --- a/tests/util/server/src/servers/nodejs_org_mirror.rs +++ b/tests/util/server/src/servers/nodejs_org_mirror.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. //! Server for NodeJS header tarballs, used by `node-gyp` in tests to download headers //! diff --git a/tests/util/server/src/servers/npm_registry.rs b/tests/util/server/src/servers/npm_registry.rs index 4ada468fac4577..c814b83340c9f4 100644 --- a/tests/util/server/src/servers/npm_registry.rs +++ b/tests/util/server/src/servers/npm_registry.rs @@ -1,14 +1,11 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. -use crate::npm; +use std::convert::Infallible; +use std::net::Ipv6Addr; +use std::net::SocketAddr; +use std::net::SocketAddrV6; +use std::path::PathBuf; -use super::custom_headers; -use super::empty_body; -use super::hyper_utils::HandlerOutput; -use super::run_server; -use super::string_body; -use super::ServerKind; -use super::ServerOptions; use bytes::Bytes; use futures::future::LocalBoxFuture; use futures::Future; @@ -18,11 +15,15 @@ use hyper::body::Incoming; use hyper::Request; use hyper::Response; use hyper::StatusCode; -use std::convert::Infallible; -use std::net::Ipv6Addr; -use std::net::SocketAddr; -use std::net::SocketAddrV6; -use std::path::PathBuf; + +use super::custom_headers; +use super::empty_body; +use super::hyper_utils::HandlerOutput; +use super::run_server; +use super::string_body; +use super::ServerKind; +use super::ServerOptions; +use crate::npm; pub fn public_npm_registry(port: u16) -> Vec> { run_npm_server(port, "npm registry server error", { diff --git a/tests/util/server/src/servers/ws.rs b/tests/util/server/src/servers/ws.rs index dd4efbf659809e..2b9189f3e127ed 100644 --- a/tests/util/server/src/servers/ws.rs +++ b/tests/util/server/src/servers/ws.rs @@ -1,4 +1,7 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. + +use std::pin::Pin; +use std::result::Result; use anyhow::anyhow; use bytes::Bytes; @@ -22,8 +25,6 @@ use hyper::Response; use hyper::StatusCode; use hyper_util::rt::TokioIo; use pretty_assertions::assert_eq; -use std::pin::Pin; -use std::result::Result; use tokio::io::AsyncReadExt; use tokio::io::AsyncWriteExt; diff --git a/tests/util/server/src/spawn.rs b/tests/util/server/src/spawn.rs index bfd83e9b26a878..936da7c785a496 100644 --- a/tests/util/server/src/spawn.rs +++ b/tests/util/server/src/spawn.rs @@ -1,7 +1,8 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -use anyhow::Error; +// Copyright 2018-2025 the Deno authors. MIT license. use std::convert::Infallible; +use anyhow::Error; + /// For unix targets, we just replace our current process with the desired cargo process. #[cfg(unix)] pub fn exec_replace_inner( @@ -30,6 +31,7 @@ pub fn exec_replace_inner( ) -> Result { use std::os::windows::io::AsRawHandle; use std::process::Command; + use win32job::ExtendedLimitInfo; use win32job::Job; diff --git a/tests/util/server/src/test_server.rs b/tests/util/server/src/test_server.rs index 3ae3eaa7d94949..a118318e6f3556 100644 --- a/tests/util/server/src/test_server.rs +++ b/tests/util/server/src/test_server.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. #![allow(clippy::print_stdout)] #![allow(clippy::print_stderr)] diff --git a/tests/wpt/runner/expectation.json b/tests/wpt/runner/expectation.json index 23cc85b498811f..6025ce42a46d81 100644 --- a/tests/wpt/runner/expectation.json +++ b/tests/wpt/runner/expectation.json @@ -3594,16 +3594,13 @@ "DOMException-constructor-behavior.any.html": true, "DOMException-constructor-behavior.any.worker.html": true, "DOMException-custom-bindings.any.html": true, - "DOMException-custom-bindings.any.worker.html": true + "DOMException-custom-bindings.any.worker.html": true, + "exceptions.html": false }, "class-string-interface.any.html": true, "class-string-interface.any.worker.html": true, - "class-string-iterator-prototype-object.any.html": [ - "Object.prototype.toString applied after deleting @@toStringTag" - ], - "class-string-iterator-prototype-object.any.worker.html": [ - "Object.prototype.toString applied after deleting @@toStringTag" - ], + "class-string-iterator-prototype-object.any.html": true, + "class-string-iterator-prototype-object.any.worker.html": true, "class-string-named-properties-object.window.html": false, "global-immutable-prototype.any.html": [ "Setting to a different prototype" @@ -3741,18 +3738,12 @@ "ab--c.ß (using .hostname)", "ab--c.ß (using .host)", "ab--c.ß (using .hostname)", - "‍.example (using URL)", - "‍.example (using URL.host)", - "‍.example (using URL.hostname)", "‍.example (using )", "‍.example (using .host)", "‍.example (using .hostname)", "‍.example (using )", "‍.example (using .host)", "‍.example (using .hostname)", - "xn--1ug.example (using URL)", - "xn--1ug.example (using URL.host)", - "xn--1ug.example (using URL.hostname)", "xn--1ug.example (using )", "xn--1ug.example (using .host)", "xn--1ug.example (using .hostname)", @@ -3874,18 +3865,8 @@ ], "url-searchparams.any.html": true, "url-searchparams.any.worker.html": true, - "url-setters-stripping.any.html": [ - "Setting port with leading U+0000 (https:)", - "Setting port with leading U+001F (https:)", - "Setting port with leading U+0000 (wpt++:)", - "Setting port with leading U+001F (wpt++:)" - ], - "url-setters-stripping.any.worker.html": [ - "Setting port with leading U+0000 (https:)", - "Setting port with leading U+001F (https:)", - "Setting port with leading U+0000 (wpt++:)", - "Setting port with leading U+001F (wpt++:)" - ], + "url-setters-stripping.any.html": true, + "url-setters-stripping.any.worker.html": true, "url-tojson.any.html": true, "url-tojson.any.worker.html": true, "urlencoded-parser.any.html": true, @@ -3894,12 +3875,8 @@ "urlsearchparams-append.any.worker.html": true, "urlsearchparams-constructor.any.html": true, "urlsearchparams-constructor.any.worker.html": true, - "urlsearchparams-delete.any.html": [ - "Changing the query of a URL with an opaque path can impact the path if the URL has no fragment" - ], - "urlsearchparams-delete.any.worker.html": [ - "Changing the query of a URL with an opaque path can impact the path if the URL has no fragment" - ], + "urlsearchparams-delete.any.html": true, + "urlsearchparams-delete.any.worker.html": true, "urlsearchparams-foreach.any.html": true, "urlsearchparams-foreach.any.worker.html": true, "urlsearchparams-get.any.html": true, @@ -3932,182 +3909,7 @@ "Input − with encoding utf-8", "Input á| with encoding utf-8" ], - "IdnaTestV2.window.html": [ - "ToASCII(\"a‌b\") C1", - "ToASCII(\"A‌B\") C1", - "ToASCII(\"A‌b\") C1", - "ToASCII(\"xn--ab-j1t\") C1", - "ToASCII(\"a‍b\") C2", - "ToASCII(\"A‍B\") C2", - "ToASCII(\"A‍b\") C2", - "ToASCII(\"xn--ab-m1t\") C2", - "ToASCII(\"1.aß‌‍b‌‍cßßßßdςσßßßßßßßßeßßßßßßßßßßxßßßßßßßßßßyßßßßßßßß̂ßz\") C1; C2; A4_2 (ignored)", - "ToASCII(\"1.ASS‌‍B‌‍CSSSSSSSSDΣΣSSSSSSSSSSSSSSSSESSSSSSSSSSSSSSSSSSSSXSSSSSSSSSSSSSSSSSSSSYSSSSSSSSSSSSSSSŜSSZ\") C1; C2; A4_2 (ignored)", - "ToASCII(\"1.ASS‌‍B‌‍CSSSSSSSSDΣΣSSSSSSSSSSSSSSSSESSSSSSSSSSSSSSSSSSSSXSSSSSSSSSSSSSSSSSSSSYSSSSSSSSSSSSSSSŜSSZ\") C1; C2; A4_2 (ignored)", - "ToASCII(\"1.ass‌‍b‌‍cssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz\") C1; C2; A4_2 (ignored)", - "ToASCII(\"1.ass‌‍b‌‍cssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz\") C1; C2; A4_2 (ignored)", - "ToASCII(\"1.Ass‌‍b‌‍cssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz\") C1; C2; A4_2 (ignored)", - "ToASCII(\"1.Ass‌‍b‌‍cssssssssdσσssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssŝssz\") C1; C2; A4_2 (ignored)", - "ToASCII(\"1.xn--assbcssssssssdssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssssz-pxq1419aa69989dba9gc\") C1; C2; A4_2 (ignored)", - "ToASCII(\"1.Aß‌‍b‌‍cßßßßdςσßßßßßßßßeßßßßßßßßßßxßßßßßßßßßßyßßßßßßßß̂ßz\") C1; C2; A4_2 (ignored)", - "ToASCII(\"1.xn--abcdexyz-qyacaaabaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaa010ze2isb1140zba8cc\") C1; C2; A4_2 (ignored)", - "ToASCII(\"‌x‍n‌-‍-bß\") C1; C2", - "ToASCII(\"‌X‍N‌-‍-BSS\") C1; C2", - "ToASCII(\"‌x‍n‌-‍-bss\") C1; C2", - "ToASCII(\"‌X‍n‌-‍-Bss\") C1; C2", - "ToASCII(\"xn--xn--bss-7z6ccid\") C1; C2", - "ToASCII(\"‌X‍n‌-‍-Bß\") C1; C2", - "ToASCII(\"xn--xn--b-pqa5796ccahd\") C1; C2", - "ToASCII(\"ஹ‍\") C2", - "ToASCII(\"xn--dmc225h\") C2", - "ToASCII(\"‍\") C2", - "ToASCII(\"xn--1ug\") C2", - "ToASCII(\"ஹ‌\") C1", - "ToASCII(\"xn--dmc025h\") C1", - "ToASCII(\"‌\") C1", - "ToASCII(\"xn--0ug\") C1", - "ToASCII(\"ۯ‌ۯ\") C1", - "ToASCII(\"xn--cmba004q\") C1", - "ToASCII(\"ß۫。‍\") C2", - "ToASCII(\"SS۫。‍\") C2", - "ToASCII(\"ss۫。‍\") C2", - "ToASCII(\"Ss۫。‍\") C2", - "ToASCII(\"xn--ss-59d.xn--1ug\") C2", - "ToASCII(\"xn--zca012a.xn--1ug\") C2", - "ToASCII(\"‌긃.榶-\") C1; V3 (ignored)", - "ToASCII(\"‌긃.榶-\") C1; V3 (ignored)", - "ToASCII(\"xn--0ug3307c.xn----d87b\") C1; V3 (ignored)", - "ToASCII(\"Å둄-.‌\") C1; V3 (ignored)", - "ToASCII(\"Å둄-.‌\") C1; V3 (ignored)", - "ToASCII(\"Å둄-.‌\") C1; V3 (ignored)", - "ToASCII(\"Å둄-.‌\") C1; V3 (ignored)", - "ToASCII(\"å둄-.‌\") C1; V3 (ignored)", - "ToASCII(\"å둄-.‌\") C1; V3 (ignored)", - "ToASCII(\"xn----1fa1788k.xn--0ug\") C1; V3 (ignored)", - "ToASCII(\"å둄-.‌\") C1; V3 (ignored)", - "ToASCII(\"å둄-.‌\") C1; V3 (ignored)", - "ToASCII(\"ꡦᡑ‍1.。𐋣-\") C2; V3 (ignored); A4_2 (ignored)", - "ToASCII(\"xn--1-o7j663bdl7m..xn----381i\") C2; V3 (ignored); A4_2 (ignored)", - "ToASCII(\"1.䰹‍-。웈\") C2; V3 (ignored)", - "ToASCII(\"1.䰹‍-。웈\") C2; V3 (ignored)", - "ToASCII(\"1.xn----tgnz80r.xn--kp5b\") C2; V3 (ignored)", - "ToASCII(\"-3.‍ヌᢕ\") C2; V3 (ignored)", - "ToASCII(\"-3.xn--fbf739aq5o\") C2; V3 (ignored)", - "ToASCII(\"ς-。‌𝟭-\") C1; V3 (ignored)", - "ToASCII(\"ς-。‌1-\") C1; V3 (ignored)", - "ToASCII(\"Σ-。‌1-\") C1; V3 (ignored)", - "ToASCII(\"σ-。‌1-\") C1; V3 (ignored)", - "ToASCII(\"xn----zmb.xn--1--i1t\") C1; V3 (ignored)", - "ToASCII(\"xn----xmb.xn--1--i1t\") C1; V3 (ignored)", - "ToASCII(\"Σ-。‌𝟭-\") C1; V3 (ignored)", - "ToASCII(\"σ-。‌𝟭-\") C1; V3 (ignored)", - "ToASCII(\"ᡯ⚉姶🄉.۷‍🎪‍\") C2; P1; V6", - "ToASCII(\"𝟵隁⯮.᠍‌\") C1", - "ToASCII(\"9隁⯮.᠍‌\") C1", - "ToASCII(\"xn--9-mfs8024b.xn--0ug\") C1", - "ToASCII(\"ß‌꫶ᢥ.⊶ⴡⴖ\") C1", - "ToASCII(\"ss‌꫶ᢥ.⊶ⴡⴖ\") C1", - "ToASCII(\"xn--ss-4ep585bkm5p.xn--ifh802b6a\") C1", - "ToASCII(\"xn--zca682johfi89m.xn--ifh802b6a\") C1", - "ToASCII(\"ß‌꫶ᢥ.⊶ⴡⴖ\") C1", - "ToASCII(\"ss‌꫶ᢥ.⊶ⴡⴖ\") C1", - "ToASCII(\"-。‍\") C2; V3 (ignored)", - "ToASCII(\"-。‍\") C2; V3 (ignored)", - "ToASCII(\"-.xn--1ug\") C2; V3 (ignored)", - "ToASCII(\"ς‍-.ⴣ𦟙\") C2; V3 (ignored)", - "ToASCII(\"σ‍-.ⴣ𦟙\") C2; V3 (ignored)", - "ToASCII(\"xn----zmb048s.xn--rlj2573p\") C2; V3 (ignored)", - "ToASCII(\"xn----xmb348s.xn--rlj2573p\") C2; V3 (ignored)", - "ToASCII(\"鱊。‌\") C1", - "ToASCII(\"xn--rt6a.xn--0ug\") C1", - "ToASCII(\"‌ⴚ。ς\") C1", - "ToASCII(\"‌ⴚ。σ\") C1", - "ToASCII(\"xn--0ug262c.xn--4xa\") C1", - "ToASCII(\"xn--0ug262c.xn--3xa\") C1", - "ToASCII(\"‌ⴚ。ς\") C1", - "ToASCII(\"‌ⴚ。σ\") C1", - "ToASCII(\"‍⾕。‌꥓̐ꡎ\") C1; C2", - "ToASCII(\"‍⾕。‌꥓̐ꡎ\") C1; C2", - "ToASCII(\"‍谷。‌꥓̐ꡎ\") C1; C2", - "ToASCII(\"xn--1ug0273b.xn--0sa359l6n7g13a\") C1; C2", - "ToASCII(\"‍。‌\") C1; C2", - "ToASCII(\"xn--1ug.xn--0ug\") C1; C2", - "ToASCII(\"‌。。\") C1; A4_2 (ignored)", - "ToASCII(\"xn--0ug..\") C1; A4_2 (ignored)", - "ToASCII(\"ᡲ-𝟹.ß-‌-\") C1; V3 (ignored)", - "ToASCII(\"ᡲ-3.ß-‌-\") C1; V3 (ignored)", - "ToASCII(\"ᡲ-3.SS-‌-\") C1; V3 (ignored)", - "ToASCII(\"ᡲ-3.ss-‌-\") C1; V3 (ignored)", - "ToASCII(\"ᡲ-3.Ss-‌-\") C1; V3 (ignored)", - "ToASCII(\"xn---3-p9o.xn--ss---276a\") C1; V3 (ignored)", - "ToASCII(\"xn---3-p9o.xn-----fia9303a\") C1; V3 (ignored)", - "ToASCII(\"ᡲ-𝟹.SS-‌-\") C1; V3 (ignored)", - "ToASCII(\"ᡲ-𝟹.ss-‌-\") C1; V3 (ignored)", - "ToASCII(\"ᡲ-𝟹.Ss-‌-\") C1; V3 (ignored)", - "ToASCII(\"𝟙。‍𝟸‍⁷\") C2", - "ToASCII(\"1。‍2‍7\") C2", - "ToASCII(\"1.xn--27-l1tb\") C2", - "ToASCII(\"‌.ßⴉ-\") C1; V3 (ignored)", - "ToASCII(\"‌.ssⴉ-\") C1; V3 (ignored)", - "ToASCII(\"‌.Ssⴉ-\") C1; V3 (ignored)", - "ToASCII(\"xn--0ug.xn--ss--bi1b\") C1; V3 (ignored)", - "ToASCII(\"xn--0ug.xn----pfa2305a\") C1; V3 (ignored)", - "ToASCII(\"ⴏ󠅋-.‍ⴉ\") C2; V3 (ignored)", - "ToASCII(\"xn----3vs.xn--1ug532c\") C2; V3 (ignored)", - "ToASCII(\"ⴏ󠅋-.‍ⴉ\") C2; V3 (ignored)", - "ToASCII(\"。ⴖͦ.‌\") C1; A4_2 (ignored)", - "ToASCII(\".xn--hva754s.xn--0ug\") C1; A4_2 (ignored)", - "ToASCII(\"‍攌꯭。ᢖ-ⴘ\") C2", - "ToASCII(\"xn--1ug592ykp6b.xn----mck373i\") C2", - "ToASCII(\"‌ꖨ.16.3툒۳\") C1", - "ToASCII(\"‌ꖨ.16.3툒۳\") C1", - "ToASCII(\"xn--0ug2473c.16.xn--3-nyc0117m\") C1", - "ToASCII(\"𝟏𝨙⸖.‍\") C2", - "ToASCII(\"1𝨙⸖.‍\") C2", - "ToASCII(\"xn--1-5bt6845n.xn--1ug\") C2", - "ToASCII(\"-‍.ⴞ𐋷\") C2; V3 (ignored)", - "ToASCII(\"xn----ugn.xn--mlj8559d\") C2; V3 (ignored)", - "ToASCII(\"嬃𝍌.‍ୄ\") C2", - "ToASCII(\"嬃𝍌.‍ୄ\") C2", - "ToASCII(\"xn--b6s0078f.xn--0ic557h\") C2", - "ToASCII(\"‍.F\") C2", - "ToASCII(\"‍.f\") C2", - "ToASCII(\"xn--1ug.f\") C2", - "ToASCII(\"‍㨲。ß\") C2", - "ToASCII(\"‍㨲。ß\") C2", - "ToASCII(\"‍㨲。SS\") C2", - "ToASCII(\"‍㨲。ss\") C2", - "ToASCII(\"‍㨲。Ss\") C2", - "ToASCII(\"xn--1ug914h.ss\") C2", - "ToASCII(\"xn--1ug914h.xn--zca\") C2", - "ToASCII(\"‍㨲。SS\") C2", - "ToASCII(\"‍㨲。ss\") C2", - "ToASCII(\"‍㨲。Ss\") C2", - "ToASCII(\"璼𝨭。‌󠇟\") C1", - "ToASCII(\"璼𝨭。‌󠇟\") C1", - "ToASCII(\"xn--gky8837e.xn--0ug\") C1", - "ToASCII(\"‌.‌\") C1", - "ToASCII(\"xn--0ug.xn--0ug\") C1", - "ToASCII(\"𝟠4󠇗𝈻.‍𐋵⛧‍\") C2", - "ToASCII(\"84󠇗𝈻.‍𐋵⛧‍\") C2", - "ToASCII(\"xn--84-s850a.xn--1uga573cfq1w\") C2", - "ToASCII(\"‍‌󠆪。ß𑓃\") C1; C2", - "ToASCII(\"‍‌󠆪。ß𑓃\") C1; C2", - "ToASCII(\"‍‌󠆪。SS𑓃\") C1; C2", - "ToASCII(\"‍‌󠆪。ss𑓃\") C1; C2", - "ToASCII(\"‍‌󠆪。Ss𑓃\") C1; C2", - "ToASCII(\"xn--0ugb.xn--ss-bh7o\") C1; C2", - "ToASCII(\"xn--0ugb.xn--zca0732l\") C1; C2", - "ToASCII(\"‍‌󠆪。SS𑓃\") C1; C2", - "ToASCII(\"‍‌󠆪。ss𑓃\") C1; C2", - "ToASCII(\"‍‌󠆪。Ss𑓃\") C1; C2", - "ToASCII(\"。‌ヶ䒩.ꡪ\") C1; A4_2 (ignored)", - "ToASCII(\".xn--0ug287dj0o.xn--gd9a\") C1; A4_2 (ignored)", - "ToASCII(\"梉。‌\") C1", - "ToASCII(\"xn--7zv.xn--0ug\") C1", - "ToASCII(\"𐋷。‍\") C2", - "ToASCII(\"xn--r97c.xn--1ug\") C2" - ], + "IdnaTestV2.window.html": true, "javascript-urls.window.html": false, "url-constructor.any.html?exclude=(file|javascript|mailto)": [ "Parsing: without base", @@ -4760,21 +4562,11 @@ ": Setting .pathname = '/foo' Opaque paths cannot be set" ], "url-setters.any.html?exclude=(file|javascript|mailto)": [ - "URL: Setting .host = 'example.com:invalid' Anything other than ASCII digit stops the port parser in a setter but is not an error", - "URL: Setting .host = '[::1]:invalid' Anything other than ASCII digit stops the port parser in a setter but is not an error", "URL: Setting .hostname = 'example.com:8080' : delimiter invalidates entire value", "URL: Setting .hostname = 'example.com:' : delimiter invalidates entire value", "URL: Setting .hostname = 'h' Drop /. from path", "URL: Setting .hostname = ''", - "URL: Setting .port = 'randomstring' Setting port to a string that doesn't parse as a number", - "URL: Setting .pathname = '' Non-special URLs can have their paths erased", - "URL: Setting .pathname = '' Non-special URLs with an empty host can have their paths erased", - "URL: Setting .pathname = '/.//p' Serialize /. in path", - "URL: Setting .pathname = '/..//p'", - "URL: Setting .pathname = '//p'", - "URL: Setting .pathname = 'p' Drop /. from path", - "URL: Setting .search = '' Do not drop trailing spaces from non-trailing opaque paths", - "URL: Setting .search = ''" + "URL: Setting .pathname = '' Non-special URLs with an empty host can have their paths erased" ], "url-setters.any.html?include=file": [ "URL: Setting .pathname = '\\\\' File URLs and (back)slashes", @@ -4784,21 +4576,11 @@ "url-setters.any.html?include=javascript": true, "url-setters.any.html?include=mailto": true, "url-setters.any.worker.html?exclude=(file|javascript|mailto)": [ - "URL: Setting .host = 'example.com:invalid' Anything other than ASCII digit stops the port parser in a setter but is not an error", - "URL: Setting .host = '[::1]:invalid' Anything other than ASCII digit stops the port parser in a setter but is not an error", "URL: Setting .hostname = 'example.com:8080' : delimiter invalidates entire value", "URL: Setting .hostname = 'example.com:' : delimiter invalidates entire value", "URL: Setting .hostname = 'h' Drop /. from path", "URL: Setting .hostname = ''", - "URL: Setting .port = 'randomstring' Setting port to a string that doesn't parse as a number", - "URL: Setting .pathname = '' Non-special URLs can have their paths erased", - "URL: Setting .pathname = '' Non-special URLs with an empty host can have their paths erased", - "URL: Setting .pathname = '/.//p' Serialize /. in path", - "URL: Setting .pathname = '/..//p'", - "URL: Setting .pathname = '//p'", - "URL: Setting .pathname = 'p' Drop /. from path", - "URL: Setting .search = '' Do not drop trailing spaces from non-trailing opaque paths", - "URL: Setting .search = ''" + "URL: Setting .pathname = '' Non-special URLs with an empty host can have their paths erased" ], "url-setters.any.worker.html?include=file": [ "URL: Setting .pathname = '\\\\' File URLs and (back)slashes", @@ -9969,7 +9751,6 @@ "structured-cloning-error-stack-optional.sub.window.html": [ "page-created Error (cross-site iframe)", "page-created Error (same-origin iframe)", - "page-created DOMException (structuredClone())", "page-created DOMException (cross-site iframe)", "page-created DOMException (same-origin iframe)", "JS-engine-created TypeError (cross-site iframe)", @@ -9977,8 +9758,7 @@ "web API-created TypeError (cross-site iframe)", "web API-created TypeError (same-origin iframe)", "web API-created DOMException (cross-site iframe)", - "web API-created DOMException (same-origin iframe)", - "page-created DOMException (worker)" + "web API-created DOMException (same-origin iframe)" ], "transfer-errors.window.html": false, "window-postmessage.window.html": false @@ -10004,7 +9784,7 @@ "event_constructor.window.html": false, "event_initstorageevent.window.html": false, "missing_arguments.window.html": true, - "storage_builtins.window.html": true, + "storage_builtins.window.html": false, "storage_clear.window.html": true, "storage_functions_not_overwritten.window.html": true, "storage_getitem.window.html": true, @@ -11518,10 +11298,10 @@ "006.html?default": true, "006.html?wpt_flags=h2": false, "006.html?wss": false, - "007.html?default": false, + "007.html?default": true, "007.html?wpt_flags=h2": false, "007.html?wss": false, - "008.html?default": false, + "008.html?default": true, "008.html?wss": false, "009.html?default": { "ignore": true diff --git a/tests/wpt/runner/runner.ts b/tests/wpt/runner/runner.ts index 6e654fd334dd53..e124d28c7ac11d 100644 --- a/tests/wpt/runner/runner.ts +++ b/tests/wpt/runner/runner.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { delay, join, diff --git a/tests/wpt/runner/testharnessreport.js b/tests/wpt/runner/testharnessreport.js index 7cc6a9e2dd13cd..f5fce1efe30e66 100644 --- a/tests/wpt/runner/testharnessreport.js +++ b/tests/wpt/runner/testharnessreport.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. window.add_result_callback(({ message, name, stack, status }) => { const data = new TextEncoder().encode( diff --git a/tests/wpt/runner/utils.ts b/tests/wpt/runner/utils.ts index 140c388ec2118b..1d9426aed9c955 100644 --- a/tests/wpt/runner/utils.ts +++ b/tests/wpt/runner/utils.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. /// FLAGS import { parseArgs } from "@std/cli/parse-args"; diff --git a/tests/wpt/wpt.ts b/tests/wpt/wpt.ts index b13a10cf4c3690..ec4a77fba1b52a 100755 --- a/tests/wpt/wpt.ts +++ b/tests/wpt/wpt.ts @@ -1,5 +1,5 @@ #!/usr/bin/env -S deno run --allow-write --allow-read --allow-net --allow-env --allow-run --config=tests/config/deno.json -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-console diff --git a/tools/build_bench.ts b/tools/build_bench.ts index 400737561beace..ccc72410ba1766 100755 --- a/tools/build_bench.ts +++ b/tools/build_bench.ts @@ -1,5 +1,5 @@ #!/usr/bin/env -S deno run --allow-env --allow-read --allow-write --allow-run=git,cargo -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import $ from "https://deno.land/x/dax@0.32.0/mod.ts"; diff --git a/tools/build_benchmark_jsons.js b/tools/build_benchmark_jsons.js index 64310f75a7e157..6ed7cb0d83aad8 100755 --- a/tools/build_benchmark_jsons.js +++ b/tools/build_benchmark_jsons.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { buildPath, existsSync, join } from "./util.js"; const currentDataFile = join(buildPath(), "bench.json"); diff --git a/tools/copyright_checker.js b/tools/copyright_checker.js index 24afe1dfd73eec..9ac84e3ec567d0 100755 --- a/tools/copyright_checker.js +++ b/tools/copyright_checker.js @@ -1,11 +1,11 @@ #!/usr/bin/env -S deno run --allow-read=. --allow-run=git --config=tests/config/deno.json -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-console import { getSources, ROOT_PATH } from "./util.js"; -const copyrightYear = 2024; +const copyrightYear = 2025; const buffer = new Uint8Array(1024); const textDecoder = new TextDecoder(); @@ -31,6 +31,8 @@ export async function checkCopyright() { ":!:.github/mtime_cache/action.js", ":!:cli/bench/testdata/**", ":!:cli/tools/bench/mitata.rs", + ":!:cli/tools/doc/prism.css", + ":!:cli/tools/doc/prism.js", ":!:cli/tools/init/templates/**", ":!:cli/tsc/*typescript.js", ":!:cli/tsc/compiler.d.ts", @@ -61,7 +63,7 @@ export async function checkCopyright() { const ACCEPTABLE_LINES = /^(\/\/ deno-lint-.*|\/\/ Copyright.*|\/\/ Ported.*|\s*|#!\/.*)\n/; const COPYRIGHT_LINE = - `Copyright 2018-${copyrightYear} the Deno authors. All rights reserved. MIT license.`; + `Copyright 2018-${copyrightYear} the Deno authors. MIT license.`; const TOML_COPYRIGHT_LINE = "# " + COPYRIGHT_LINE; const C_STYLE_COPYRIGHT_LINE = "// " + COPYRIGHT_LINE; diff --git a/tools/core_import_map.json b/tools/core_import_map.json index 0811672b16f63d..d38221eb4c8a04 100644 --- a/tools/core_import_map.json +++ b/tools/core_import_map.json @@ -247,8 +247,10 @@ "ext:runtime/41_prompt.js": "../runtime/js/41_prompt.js", "ext:runtime/90_deno_ns.js": "../runtime/js/90_deno_ns.js", "ext:runtime/98_global_scope.js": "../runtime/js/98_global_scope.js", - "ext:runtime/telemetry.js": "../runtime/js/telemetry.js", "ext:deno_node/_util/std_fmt_colors.ts": "../ext/node/polyfills/_util/std_fmt_colors.ts", + "ext:deno_telemetry/telemetry.ts": "../ext/deno_telemetry/telemetry.ts", + "ext:deno_telemetry/util.ts": "../ext/deno_telemetry/util.ts", + "ext:cli/40_lint_selector.js": "../cli/js/40_lint_selector.js", "@std/archive": "../tests/util/std/archive/mod.ts", "@std/archive/tar": "../tests/util/std/archive/tar.ts", "@std/archive/untar": "../tests/util/std/archive/untar.ts", diff --git a/tools/deno.lock.json b/tools/deno.lock.json index 46c09ce24be9d8..3d21e5c9f60373 100644 --- a/tools/deno.lock.json +++ b/tools/deno.lock.json @@ -1,81 +1,365 @@ { - "version": "3", - "packages": { - "specifiers": { - "jsr:@david/dax@0.41.0": "jsr:@david/dax@0.41.0", - "jsr:@david/which@^0.4.1": "jsr:@david/which@0.4.1", - "jsr:@deno/patchver@0.1.0": "jsr:@deno/patchver@0.1.0", - "jsr:@std/assert@^0.221.0": "jsr:@std/assert@0.221.0", - "jsr:@std/bytes@^0.221.0": "jsr:@std/bytes@0.221.0", - "jsr:@std/fmt@1": "jsr:@std/fmt@1.0.0", - "jsr:@std/fmt@^0.221.0": "jsr:@std/fmt@0.221.0", - "jsr:@std/fs@0.221.0": "jsr:@std/fs@0.221.0", - "jsr:@std/io@0.221.0": "jsr:@std/io@0.221.0", - "jsr:@std/io@^0.221.0": "jsr:@std/io@0.221.0", - "jsr:@std/path@0.221.0": "jsr:@std/path@0.221.0", - "jsr:@std/path@^0.221.0": "jsr:@std/path@0.221.0", - "jsr:@std/streams@0.221.0": "jsr:@std/streams@0.221.0", - "jsr:@std/yaml@^0.221": "jsr:@std/yaml@0.221.0" - }, - "jsr": { - "@david/dax@0.41.0": { - "integrity": "9e1ecf66a0415962cc8ad3ba4e3fa93ce0f1a1cc797dd95c36fdfb6977dc7fc8", - "dependencies": [ - "jsr:@david/which@^0.4.1", - "jsr:@std/fmt@^0.221.0", - "jsr:@std/fs@0.221.0", - "jsr:@std/io@0.221.0", - "jsr:@std/path@0.221.0", - "jsr:@std/streams@0.221.0" - ] - }, - "@david/which@0.4.1": { - "integrity": "896a682b111f92ab866cc70c5b4afab2f5899d2f9bde31ed00203b9c250f225e" - }, - "@deno/patchver@0.1.0": { - "integrity": "3102aa1b751a9fb85ef6cf7d4c0a1ec6624c85a77facc140c5748d82126d66a6" - }, - "@std/assert@0.221.0": { - "integrity": "a5f1aa6e7909dbea271754fd4ab3f4e687aeff4873b4cef9a320af813adb489a" - }, - "@std/bytes@0.221.0": { - "integrity": "64a047011cf833890a4a2ab7293ac55a1b4f5a050624ebc6a0159c357de91966" - }, - "@std/fmt@0.221.0": { - "integrity": "379fed69bdd9731110f26b9085aeb740606b20428ce6af31ef6bd45ef8efa62a" - }, - "@std/fmt@1.0.0": { - "integrity": "8a95c9fdbb61559418ccbc0f536080cf43341655e1444f9d375a66886ceaaa3d" - }, - "@std/fs@0.221.0": { - "integrity": "028044450299de8ed5a716ade4e6d524399f035513b85913794f4e81f07da286", - "dependencies": [ - "jsr:@std/assert@^0.221.0", - "jsr:@std/path@^0.221.0" - ] - }, - "@std/io@0.221.0": { - "integrity": "faf7f8700d46ab527fa05cc6167f4b97701a06c413024431c6b4d207caa010da", - "dependencies": [ - "jsr:@std/assert@^0.221.0", - "jsr:@std/bytes@^0.221.0" - ] - }, - "@std/path@0.221.0": { - "integrity": "0a36f6b17314ef653a3a1649740cc8db51b25a133ecfe838f20b79a56ebe0095", - "dependencies": [ - "jsr:@std/assert@^0.221.0" - ] - }, - "@std/streams@0.221.0": { - "integrity": "47f2f74634b47449277c0ee79fe878da4424b66bd8975c032e3afdca88986e61", - "dependencies": [ - "jsr:@std/io@^0.221.0" - ] - }, - "@std/yaml@0.221.0": { - "integrity": "bac8913ee4f6fc600d4b92cc020f755070e22687ad242341f31d123ff690ae98" - } + "version": "4", + "specifiers": { + "jsr:@david/dax@0.41.0": "0.41.0", + "jsr:@david/dax@0.42": "0.42.0", + "jsr:@david/path@0.2": "0.2.0", + "jsr:@david/which@~0.4.1": "0.4.1", + "jsr:@deno/patchver@0.1.0": "0.1.0", + "jsr:@std/assert@0.221": "0.221.0", + "jsr:@std/bytes@0.221": "0.221.0", + "jsr:@std/fmt@0.221": "0.221.0", + "jsr:@std/fmt@1": "1.0.0", + "jsr:@std/fs@0.221.0": "0.221.0", + "jsr:@std/fs@1": "1.0.5", + "jsr:@std/io@0.221": "0.221.0", + "jsr:@std/io@0.221.0": "0.221.0", + "jsr:@std/path@0.221": "0.221.0", + "jsr:@std/path@0.221.0": "0.221.0", + "jsr:@std/path@1": "1.0.8", + "jsr:@std/path@^1.0.7": "1.0.8", + "jsr:@std/streams@0.221": "0.221.0", + "jsr:@std/streams@0.221.0": "0.221.0", + "jsr:@std/yaml@0.221": "0.221.0", + "npm:decompress@4.2.1": "4.2.1" + }, + "jsr": { + "@david/dax@0.41.0": { + "integrity": "9e1ecf66a0415962cc8ad3ba4e3fa93ce0f1a1cc797dd95c36fdfb6977dc7fc8", + "dependencies": [ + "jsr:@david/which", + "jsr:@std/fmt@0.221", + "jsr:@std/fs@0.221.0", + "jsr:@std/io@0.221.0", + "jsr:@std/path@0.221.0", + "jsr:@std/streams@0.221.0" + ] + }, + "@david/dax@0.42.0": { + "integrity": "0c547c9a20577a6072b90def194c159c9ddab82280285ebfd8268a4ebefbd80b", + "dependencies": [ + "jsr:@david/path", + "jsr:@david/which", + "jsr:@std/fmt@1", + "jsr:@std/fs@1", + "jsr:@std/io@0.221", + "jsr:@std/path@1", + "jsr:@std/streams@0.221" + ] + }, + "@david/path@0.2.0": { + "integrity": "f2d7aa7f02ce5a55e27c09f9f1381794acb09d328f8d3c8a2e3ab3ffc294dccd", + "dependencies": [ + "jsr:@std/fs@1", + "jsr:@std/path@1" + ] + }, + "@david/which@0.4.1": { + "integrity": "896a682b111f92ab866cc70c5b4afab2f5899d2f9bde31ed00203b9c250f225e" + }, + "@deno/patchver@0.1.0": { + "integrity": "3102aa1b751a9fb85ef6cf7d4c0a1ec6624c85a77facc140c5748d82126d66a6" + }, + "@std/assert@0.221.0": { + "integrity": "a5f1aa6e7909dbea271754fd4ab3f4e687aeff4873b4cef9a320af813adb489a" + }, + "@std/bytes@0.221.0": { + "integrity": "64a047011cf833890a4a2ab7293ac55a1b4f5a050624ebc6a0159c357de91966" + }, + "@std/fmt@0.221.0": { + "integrity": "379fed69bdd9731110f26b9085aeb740606b20428ce6af31ef6bd45ef8efa62a" + }, + "@std/fmt@1.0.0": { + "integrity": "8a95c9fdbb61559418ccbc0f536080cf43341655e1444f9d375a66886ceaaa3d" + }, + "@std/fs@0.221.0": { + "integrity": "028044450299de8ed5a716ade4e6d524399f035513b85913794f4e81f07da286", + "dependencies": [ + "jsr:@std/assert", + "jsr:@std/path@0.221" + ] + }, + "@std/fs@1.0.5": { + "integrity": "41806ad6823d0b5f275f9849a2640d87e4ef67c51ee1b8fb02426f55e02fd44e", + "dependencies": [ + "jsr:@std/path@^1.0.7" + ] + }, + "@std/io@0.221.0": { + "integrity": "faf7f8700d46ab527fa05cc6167f4b97701a06c413024431c6b4d207caa010da", + "dependencies": [ + "jsr:@std/assert", + "jsr:@std/bytes" + ] + }, + "@std/path@0.221.0": { + "integrity": "0a36f6b17314ef653a3a1649740cc8db51b25a133ecfe838f20b79a56ebe0095", + "dependencies": [ + "jsr:@std/assert" + ] + }, + "@std/path@1.0.8": { + "integrity": "548fa456bb6a04d3c1a1e7477986b6cffbce95102d0bb447c67c4ee70e0364be" + }, + "@std/streams@0.221.0": { + "integrity": "47f2f74634b47449277c0ee79fe878da4424b66bd8975c032e3afdca88986e61", + "dependencies": [ + "jsr:@std/io@0.221" + ] + }, + "@std/yaml@0.221.0": { + "integrity": "bac8913ee4f6fc600d4b92cc020f755070e22687ad242341f31d123ff690ae98" + } + }, + "npm": { + "base64-js@1.5.1": { + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, + "bl@1.2.3": { + "integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==", + "dependencies": [ + "readable-stream", + "safe-buffer@5.2.1" + ] + }, + "buffer-alloc-unsafe@1.1.0": { + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==" + }, + "buffer-alloc@1.2.0": { + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "dependencies": [ + "buffer-alloc-unsafe", + "buffer-fill" + ] + }, + "buffer-crc32@0.2.13": { + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==" + }, + "buffer-fill@1.0.0": { + "integrity": "sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ==" + }, + "buffer@5.7.1": { + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dependencies": [ + "base64-js", + "ieee754" + ] + }, + "commander@2.20.3": { + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "core-util-is@1.0.3": { + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "decompress-tar@4.1.1": { + "integrity": "sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==", + "dependencies": [ + "file-type@5.2.0", + "is-stream", + "tar-stream" + ] + }, + "decompress-tarbz2@4.1.1": { + "integrity": "sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==", + "dependencies": [ + "decompress-tar", + "file-type@6.2.0", + "is-stream", + "seek-bzip", + "unbzip2-stream" + ] + }, + "decompress-targz@4.1.1": { + "integrity": "sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==", + "dependencies": [ + "decompress-tar", + "file-type@5.2.0", + "is-stream" + ] + }, + "decompress-unzip@4.0.1": { + "integrity": "sha512-1fqeluvxgnn86MOh66u8FjbtJpAFv5wgCT9Iw8rcBqQcCo5tO8eiJw7NNTrvt9n4CRBVq7CstiS922oPgyGLrw==", + "dependencies": [ + "file-type@3.9.0", + "get-stream", + "pify@2.3.0", + "yauzl" + ] + }, + "decompress@4.2.1": { + "integrity": "sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==", + "dependencies": [ + "decompress-tar", + "decompress-tarbz2", + "decompress-targz", + "decompress-unzip", + "graceful-fs", + "make-dir", + "pify@2.3.0", + "strip-dirs" + ] + }, + "end-of-stream@1.4.4": { + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dependencies": [ + "once" + ] + }, + "fd-slicer@1.1.0": { + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dependencies": [ + "pend" + ] + }, + "file-type@3.9.0": { + "integrity": "sha512-RLoqTXE8/vPmMuTI88DAzhMYC99I8BWv7zYP4A1puo5HIjEJ5EX48ighy4ZyKMG9EDXxBgW6e++cn7d1xuFghA==" + }, + "file-type@5.2.0": { + "integrity": "sha512-Iq1nJ6D2+yIO4c8HHg4fyVb8mAJieo1Oloy1mLLaB2PvezNedhBVm+QU7g0qM42aiMbRXTxKKwGD17rjKNJYVQ==" + }, + "file-type@6.2.0": { + "integrity": "sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==" + }, + "fs-constants@1.0.0": { + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, + "get-stream@2.3.1": { + "integrity": "sha512-AUGhbbemXxrZJRD5cDvKtQxLuYaIbNtDTK8YqupCI393Q2KSTreEsLUN3ZxAWFGiKTzL6nKuzfcIvieflUX9qA==", + "dependencies": [ + "object-assign", + "pinkie-promise" + ] + }, + "graceful-fs@4.2.11": { + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + }, + "ieee754@1.2.1": { + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + }, + "inherits@2.0.4": { + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "is-natural-number@4.0.1": { + "integrity": "sha512-Y4LTamMe0DDQIIAlaer9eKebAlDSV6huy+TWhJVPlzZh2o4tRP5SQWFlLn5N0To4mDD22/qdOq+veo1cSISLgQ==" + }, + "is-stream@1.1.0": { + "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==" + }, + "isarray@1.0.0": { + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "make-dir@1.3.0": { + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dependencies": [ + "pify@3.0.0" + ] + }, + "object-assign@4.1.1": { + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==" + }, + "once@1.4.0": { + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": [ + "wrappy" + ] + }, + "pend@1.2.0": { + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==" + }, + "pify@2.3.0": { + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==" + }, + "pify@3.0.0": { + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==" + }, + "pinkie-promise@2.0.1": { + "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", + "dependencies": [ + "pinkie" + ] + }, + "pinkie@2.0.4": { + "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==" + }, + "process-nextick-args@2.0.1": { + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "readable-stream@2.3.8": { + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dependencies": [ + "core-util-is", + "inherits", + "isarray", + "process-nextick-args", + "safe-buffer@5.1.2", + "string_decoder", + "util-deprecate" + ] + }, + "safe-buffer@5.1.2": { + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safe-buffer@5.2.1": { + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "seek-bzip@1.0.6": { + "integrity": "sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ==", + "dependencies": [ + "commander" + ] + }, + "string_decoder@1.1.1": { + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": [ + "safe-buffer@5.1.2" + ] + }, + "strip-dirs@2.1.0": { + "integrity": "sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==", + "dependencies": [ + "is-natural-number" + ] + }, + "tar-stream@1.6.2": { + "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "dependencies": [ + "bl", + "buffer-alloc", + "end-of-stream", + "fs-constants", + "readable-stream", + "to-buffer", + "xtend" + ] + }, + "through@2.3.8": { + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==" + }, + "to-buffer@1.1.1": { + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==" + }, + "unbzip2-stream@1.4.3": { + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", + "dependencies": [ + "buffer", + "through" + ] + }, + "util-deprecate@1.0.2": { + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "wrappy@1.0.2": { + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "xtend@4.0.2": { + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + }, + "yauzl@2.10.0": { + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dependencies": [ + "buffer-crc32", + "fd-slicer" + ] } }, "remote": { diff --git a/tools/format.js b/tools/format.js index b29667ca77a6a2..02211cdaf83e4a 100755 --- a/tools/format.js +++ b/tools/format.js @@ -1,5 +1,5 @@ #!/usr/bin/env -S deno run --allow-all --config=tests/config/deno.json -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { join, ROOT_PATH } from "./util.js"; const subcommand = Deno.args.includes("--check") ? "check" : "fmt"; diff --git a/tools/generate_types_deno.ts b/tools/generate_types_deno.ts index 265b6f53711ed6..fa60f51a4ba64f 100755 --- a/tools/generate_types_deno.ts +++ b/tools/generate_types_deno.ts @@ -1,5 +1,5 @@ #!/usr/bin/env -S deno run -A -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // This script is used to generate the @types/deno package on DefinitelyTyped. @@ -76,7 +76,7 @@ async function createDenoDtsFile() { file.insertStatements( 0, - "// Copyright 2018-2024 the Deno authors. MIT license.\n\n", + "// Copyright 2018-2025 the Deno authors. MIT license.\n\n", ); file.saveSync(); diff --git a/tools/install_prebuilt.js b/tools/install_prebuilt.js index 0c983d405d4b1c..c7a58c4691ea61 100755 --- a/tools/install_prebuilt.js +++ b/tools/install_prebuilt.js @@ -1,5 +1,5 @@ #!/usr/bin/env -S deno run --unstable --allow-write --allow-read --allow-net --config=tests/config/deno.json -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { getPrebuilt } from "./util.js"; const args = Deno.args.slice(); diff --git a/tools/jsdoc_checker.js b/tools/jsdoc_checker.js index 241d04273b96a3..034782136c13e7 100755 --- a/tools/jsdoc_checker.js +++ b/tools/jsdoc_checker.js @@ -1,5 +1,5 @@ #!/usr/bin/env -S deno run --allow-read --allow-env --allow-sys --config=tests/config/deno.json -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { Node, Project, ts } from "npm:ts-morph@22.0.0"; import { join, ROOT_PATH } from "./util.js"; diff --git a/tools/lint.js b/tools/lint.js index 604dee9b308989..3f548d5c3a958c 100755 --- a/tools/lint.js +++ b/tools/lint.js @@ -1,9 +1,18 @@ #!/usr/bin/env -S deno run --allow-all --config=tests/config/deno.json -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-console -import { buildMode, getPrebuilt, getSources, join, ROOT_PATH } from "./util.js"; +import { + buildMode, + dirname, + getPrebuilt, + getSources, + join, + parseJSONC, + ROOT_PATH, + walk, +} from "./util.js"; import { checkCopyright } from "./copyright_checker.js"; import * as ciFile from "../.github/workflows/ci.generate.ts"; @@ -25,6 +34,7 @@ if (js) { promises.push(dlintPreferPrimordials()); promises.push(ensureCiYmlUpToDate()); promises.push(ensureNoNewITests()); + promises.push(ensureNoUnusedOutFiles()); if (rs) { promises.push(checkCopyright()); @@ -51,6 +61,8 @@ async function dlint() { ":!:cli/bench/testdata/express-router.js", ":!:cli/bench/testdata/react-dom.js", ":!:cli/compilers/wasm_wrap.js", + ":!:cli/tools/doc/prism.css", + ":!:cli/tools/doc/prism.js", ":!:cli/tsc/dts/**", ":!:cli/tsc/*typescript.js", ":!:cli/tsc/compiler.d.ts", @@ -199,7 +211,7 @@ async function ensureNoNewITests() { "bench_tests.rs": 0, "cache_tests.rs": 0, "cert_tests.rs": 0, - "check_tests.rs": 2, + "check_tests.rs": 0, "compile_tests.rs": 0, "coverage_tests.rs": 0, "eval_tests.rs": 0, @@ -249,3 +261,49 @@ async function ensureNoNewITests() { } } } + +async function ensureNoUnusedOutFiles() { + const specsDir = join(ROOT_PATH, "tests", "specs"); + const outFilePaths = new Set( + (await Array.fromAsync( + walk(specsDir, { exts: [".out"] }), + )).map((entry) => entry.path), + ); + const testFiles = (await Array.fromAsync( + walk(specsDir, { exts: [".jsonc"] }), + )).filter((entry) => { + return entry.path.endsWith("__test__.jsonc"); + }); + + function checkObject(baseDirPath, obj) { + for (const [key, value] of Object.entries(obj)) { + if (typeof value === "object") { + checkObject(baseDirPath, value); + } else if (key === "output" && typeof value === "string") { + const outFilePath = join(baseDirPath, value); + outFilePaths.delete(outFilePath); + } + } + } + + for (const testFile of testFiles) { + try { + const text = await Deno.readTextFile(testFile.path); + const data = parseJSONC(text); + checkObject(dirname(testFile.path), data); + } catch (err) { + throw new Error("Failed reading: " + testFile.path, { + cause: err, + }); + } + } + + const notFoundPaths = Array.from(outFilePaths); + if (notFoundPaths.length > 0) { + notFoundPaths.sort(); // be deterministic + for (const file of notFoundPaths) { + console.error(`Unreferenced .out file: ${file}`); + } + throw new Error(`${notFoundPaths.length} unreferenced .out files`); + } +} diff --git a/tools/napi/generate_symbols_lists.js b/tools/napi/generate_symbols_lists.js index efb0edc0436930..42942777f6af8d 100755 --- a/tools/napi/generate_symbols_lists.js +++ b/tools/napi/generate_symbols_lists.js @@ -1,5 +1,5 @@ #!/usr/bin/env -S deno run --allow-read --allow-write -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import exports from "../../ext/napi/sym/symbol_exports.json" with { type: "json", diff --git a/tools/ops.d.ts b/tools/ops.d.ts index 8acb1e5883cfdf..1d6dc8304ac1c1 100644 --- a/tools/ops.d.ts +++ b/tools/ops.d.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // This file is intentionally empty - that puts this file into script mode, // which then allows all symbols to be imported from the file. diff --git a/tools/release/00_start_release.ts b/tools/release/00_start_release.ts index 125a76af66f825..a7a5d22a4079b8 100755 --- a/tools/release/00_start_release.ts +++ b/tools/release/00_start_release.ts @@ -1,5 +1,5 @@ #!/usr/bin/env -S deno run -A --quiet --lock=tools/deno.lock.json -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-console diff --git a/tools/release/01_bump_crate_versions.ts b/tools/release/01_bump_crate_versions.ts index bef8011ba1f204..ddbc785c756335 100755 --- a/tools/release/01_bump_crate_versions.ts +++ b/tools/release/01_bump_crate_versions.ts @@ -1,5 +1,5 @@ #!/usr/bin/env -S deno run -A --lock=tools/deno.lock.json -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { DenoWorkspace } from "./deno_workspace.ts"; import { $, GitLogOutput, semver } from "./deps.ts"; diff --git a/tools/release/02_create_pr.ts b/tools/release/02_create_pr.ts index 5ef64cd1440534..97f50f0d44098d 100755 --- a/tools/release/02_create_pr.ts +++ b/tools/release/02_create_pr.ts @@ -1,5 +1,5 @@ #!/usr/bin/env -S deno run -A --lock=tools/deno.lock.json -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { DenoWorkspace } from "./deno_workspace.ts"; import { $, createOctoKit, getGitHubRepository } from "./deps.ts"; diff --git a/tools/release/03_publish_crates.ts b/tools/release/03_publish_crates.ts index ecfb75e796431f..17ab2f71f76dc8 100755 --- a/tools/release/03_publish_crates.ts +++ b/tools/release/03_publish_crates.ts @@ -1,5 +1,5 @@ #!/usr/bin/env -S deno run -A --lock=tools/deno.lock.json -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-console diff --git a/tools/release/04_post_publish.ts b/tools/release/04_post_publish.ts index 2fa9e73561f54d..42bf2dbafdea14 100755 --- a/tools/release/04_post_publish.ts +++ b/tools/release/04_post_publish.ts @@ -1,5 +1,5 @@ #!/usr/bin/env -S deno run -A --lock=tools/deno.lock.json -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { DenoWorkspace } from "./deno_workspace.ts"; import { $, createOctoKit, getGitHubRepository } from "./deps.ts"; diff --git a/tools/release/05_create_release_notes.ts b/tools/release/05_create_release_notes.ts index 9ea9ade31fd1b1..383f5ba0891d84 100755 --- a/tools/release/05_create_release_notes.ts +++ b/tools/release/05_create_release_notes.ts @@ -1,5 +1,5 @@ #!/usr/bin/env -S deno run -A --lock=tools/deno.lock.json -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { $ } from "./deps.ts"; import { DenoWorkspace } from "./deno_workspace.ts"; diff --git a/tools/release/deno_workspace.ts b/tools/release/deno_workspace.ts index e55a02b73fa187..e5d9f1b9288539 100644 --- a/tools/release/deno_workspace.ts +++ b/tools/release/deno_workspace.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { $, ReleasesMdFile, Repo } from "./deps.ts"; diff --git a/tools/release/deps.ts b/tools/release/deps.ts index 568830a74b341a..17177870d7a1f0 100644 --- a/tools/release/deps.ts +++ b/tools/release/deps.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. export * from "https://raw.githubusercontent.com/denoland/automation/0.19.0/mod.ts"; export * from "https://raw.githubusercontent.com/denoland/automation/0.19.0/github_actions.ts"; diff --git a/tools/release/npm/.gitignore b/tools/release/npm/.gitignore new file mode 100644 index 00000000000000..1521c8b7652b1e --- /dev/null +++ b/tools/release/npm/.gitignore @@ -0,0 +1 @@ +dist diff --git a/tools/release/npm/bin.cjs b/tools/release/npm/bin.cjs new file mode 100644 index 00000000000000..aaa9dd343c4d64 --- /dev/null +++ b/tools/release/npm/bin.cjs @@ -0,0 +1,54 @@ +#!/usr/bin/env node +// Copyright 2018-2025 the Deno authors. MIT license. + +// @ts-check +const path = require("path"); +const child_process = require("child_process"); +const os = require("os"); +const fs = require("fs"); + +const exePath = path.join( + __dirname, + os.platform() === "win32" ? "deno.exe" : "deno", +); + +if (!fs.existsSync(exePath)) { + try { + const resolvedExePath = require("./install_api.cjs").runInstall(); + runDenoExe(resolvedExePath); + } catch (err) { + if (err !== undefined && typeof err.message === "string") { + console.error(err.message); + } else { + console.error(err); + } + process.exit(1); + } +} else { + runDenoExe(exePath); +} + +/** @param exePath {string} */ +function runDenoExe(exePath) { + const result = child_process.spawnSync( + exePath, + process.argv.slice(2), + { stdio: "inherit" }, + ); + if (result.error) { + throw result.error; + } + + throwIfNoExePath(); + + process.exitCode = result.status; + + function throwIfNoExePath() { + if (!fs.existsSync(exePath)) { + throw new Error( + "Could not find exe at path '" + exePath + + "'. Maybe try running deno again.", + ); + } + } +} diff --git a/tools/release/npm/build.ts b/tools/release/npm/build.ts new file mode 100755 index 00000000000000..606ff6dbe8ca2b --- /dev/null +++ b/tools/release/npm/build.ts @@ -0,0 +1,237 @@ +#!/usr/bin/env -S deno run -A --lock=tools/deno.lock.json +// Copyright 2018-2025 the Deno authors. MIT license. +// NOTICE: This deployment/npm folder was lifted from https://github.com/dprint/dprint/blob/0ba79811cc96d2dee8e0cf766a8c8c0fc44879c2/deployment/npm/ +// with permission (Copyright 2019-2023 David Sherret) +import $ from "jsr:@david/dax@^0.42.0"; +// @ts-types="npm:@types/decompress@4.2.7" +import decompress from "npm:decompress@4.2.1"; +import { parseArgs } from "@std/cli/parse-args"; + +interface Package { + zipFileName: string; + os: "win32" | "darwin" | "linux"; + cpu: "x64" | "arm64"; + libc?: "glibc" | "musl"; +} + +const args = parseArgs(Deno.args, { + boolean: ["publish"], +}); +const packages: Package[] = [{ + zipFileName: "deno-x86_64-pc-windows-msvc.zip", + os: "win32", + cpu: "x64", +}, { + // use x64_64 until there's an arm64 build + zipFileName: "deno-x86_64-pc-windows-msvc.zip", + os: "win32", + cpu: "arm64", +}, { + zipFileName: "deno-x86_64-apple-darwin.zip", + os: "darwin", + cpu: "x64", +}, { + zipFileName: "deno-aarch64-apple-darwin.zip", + os: "darwin", + cpu: "arm64", +}, { + zipFileName: "deno-x86_64-unknown-linux-gnu.zip", + os: "linux", + cpu: "x64", + libc: "glibc", +}, { + zipFileName: "deno-aarch64-unknown-linux-gnu.zip", + os: "linux", + cpu: "arm64", + libc: "glibc", +}]; + +const markdownText = `# Deno + +[Deno](https://www.deno.com) +([/ˈdiːnoʊ/](http://ipa-reader.xyz/?text=%CB%88di%CB%90no%CA%8A), pronounced +\`dee-no\`) is a JavaScript, TypeScript, and WebAssembly runtime with secure +defaults and a great developer experience. It's built on [V8](https://v8.dev/), +[Rust](https://www.rust-lang.org/), and [Tokio](https://tokio.rs/). + +Learn more about the Deno runtime +[in the documentation](https://docs.deno.com/runtime/manual). +`; + +const currentDir = $.path(import.meta.url).parentOrThrow(); +const rootDir = currentDir.parentOrThrow().parentOrThrow().parentOrThrow(); +const outputDir = currentDir.join("./dist"); +const scopeDir = outputDir.join("@deno"); +const denoDir = outputDir.join("deno"); +const version = resolveVersion(); + +$.logStep(`Publishing ${version}...`); + +await $`rm -rf ${outputDir}`; +await $`mkdir -p ${denoDir} ${scopeDir}`; + +// setup Deno packages +{ + $.logStep(`Setting up deno ${version}...`); + const pkgJson = { + "name": "deno", + "version": version, + "description": "A modern runtime for JavaScript and TypeScript.", + "bin": "bin.cjs", + "repository": { + "type": "git", + "url": "git+https://github.com/denoland/deno.git", + }, + "keywords": [ + "runtime", + "typescript", + ], + "author": "the Deno authors", + "license": "MIT", + "bugs": { + "url": "https://github.com/denoland/deno/issues", + }, + "homepage": "https://deno.com", + // for yarn berry (https://github.com/dprint/dprint/issues/686) + "preferUnplugged": true, + "scripts": { + "postinstall": "node ./install.cjs", + }, + optionalDependencies: packages + .map((pkg) => `@deno/${getPackageNameNoScope(pkg)}`) + .reduce((obj, pkgName) => ({ ...obj, [pkgName]: version }), {}), + }; + currentDir.join("bin.cjs").copyFileToDirSync(denoDir); + currentDir.join("install_api.cjs").copyFileToDirSync(denoDir); + currentDir.join("install.cjs").copyFileToDirSync(denoDir); + denoDir.join("package.json").writeJsonPrettySync(pkgJson); + rootDir.join("LICENSE.md").copyFileSync(denoDir.join("LICENSE")); + denoDir.join("README.md").writeTextSync(markdownText); + // ensure the test files don't get published + denoDir.join(".npmignore").writeTextSync("deno\ndeno.exe\n"); + + // setup each binary package + for (const pkg of packages) { + const pkgName = getPackageNameNoScope(pkg); + $.logStep(`Setting up @deno/${pkgName}...`); + const pkgDir = scopeDir.join(pkgName); + const zipPath = pkgDir.join("output.zip"); + + await $`mkdir -p ${pkgDir}`; + + // download and extract the zip file + const zipUrl = + `https://github.com/denoland/deno/releases/download/v${version}/${pkg.zipFileName}`; + await $.request(zipUrl).showProgress().pipeToPath(zipPath); + await decompress(zipPath.toString(), pkgDir.toString()); + zipPath.removeSync(); + + // create the package.json and readme + pkgDir.join("README.md").writeTextSync( + `# @denoland/${pkgName}\n\n${pkgName} distribution of [Deno](https://deno.land).\n`, + ); + pkgDir.join("package.json").writeJsonPrettySync({ + "name": `@deno/${pkgName}`, + "version": version, + "description": `${pkgName} distribution of Deno`, + "repository": { + "type": "git", + "url": "git+https://github.com/denoland/deno.git", + }, + // force yarn to unpack + "preferUnplugged": true, + "author": "David Sherret", + "license": "MIT", + "bugs": { + "url": "https://github.com/denoland/deno/issues", + }, + "homepage": "https://deno.land", + "os": [pkg.os], + "cpu": [pkg.cpu], + libc: pkg.libc == null ? undefined : [pkg.libc], + }); + } +} + +// verify that the package is created correctly +{ + $.logStep("Verifying packages..."); + const testPlatform = Deno.build.os == "windows" + ? (Deno.build.arch === "x86_64" ? "@deno/win32-x64" : "@deno/win32-arm64") + : Deno.build.os === "darwin" + ? (Deno.build.arch === "x86_64" ? "@deno/darwin-x64" : "@deno/darwin-arm64") + : "@deno/linux-x64-glibc"; + outputDir.join("package.json").writeJsonPrettySync({ + workspaces: [ + "deno", + // There seems to be a bug with npm workspaces where this doesn't + // work, so for now make some assumptions and only include the package + // that works on the CI for the current operating system + // ...packages.map(p => `@deno/${getPackageNameNoScope(p)}`), + testPlatform, + ], + }); + + const denoExe = Deno.build.os === "windows" ? "deno.exe" : "deno"; + await $`npm install`.cwd(denoDir); + + // ensure the post-install script adds the executable to the deno package, + // which is necessary for faster caching and to ensure the vscode extension + // picks it up + if (!denoDir.join(denoExe).existsSync()) { + throw new Error("Deno executable did not exist after post install"); + } + + // run once after post install created deno, once with a simulated readonly file system, once creating the cache and once with + await $`node bin.cjs -v && rm ${denoExe} && DENO_SIMULATED_READONLY_FILE_SYSTEM=1 node bin.cjs -v && node bin.cjs -v && node bin.cjs -v` + .cwd(denoDir); + + if (!denoDir.join(denoExe).existsSync()) { + throw new Error("Deno executable did not exist when lazily initialized"); + } +} + +// publish if necessary +if (args.publish) { + for (const pkg of packages) { + const pkgName = getPackageNameNoScope(pkg); + $.logStep(`Publishing @deno/${pkgName}...`); + if (await checkPackagePublished(`@deno/${pkgName}`)) { + $.logLight(" Already published."); + continue; + } + const pkgDir = scopeDir.join(pkgName); + await $`cd ${pkgDir} && npm publish --provenance --access public`; + } + + $.logStep(`Publishing deno...`); + await $`cd ${denoDir} && npm publish --provenance --access public`; +} + +function getPackageNameNoScope(name: Package) { + const libc = name.libc == null ? "" : `-${name.libc}`; + return `${name.os}-${name.cpu}${libc}`; +} + +function resolveVersion() { + const firstArg = args._[0]; + if ( + firstArg != null && + typeof firstArg === "string" && + firstArg.trim().length > 0 + ) { + return firstArg; + } + const version = (rootDir.join("cli/Cargo.toml").readTextSync().match( + /version = "(.*?)"/, + ))?.[1]; + if (version == null) { + throw new Error("Could not resolve version."); + } + return version; +} + +async function checkPackagePublished(pkgName: string) { + const result = await $`npm info ${pkgName}@${version}`.quiet().noThrow(); + return result.code === 0; +} diff --git a/tools/release/npm/install.cjs b/tools/release/npm/install.cjs new file mode 100644 index 00000000000000..554681894176aa --- /dev/null +++ b/tools/release/npm/install.cjs @@ -0,0 +1,5 @@ +// @ts-check +// Copyright 2018-2025 the Deno authors. MIT license. +"use strict"; + +require("./install_api.cjs").runInstall(); diff --git a/tools/release/npm/install_api.cjs b/tools/release/npm/install_api.cjs new file mode 100644 index 00000000000000..d2571839bc691a --- /dev/null +++ b/tools/release/npm/install_api.cjs @@ -0,0 +1,196 @@ +// @ts-check +// Copyright 2018-2025 the Deno authors. MIT license. +"use strict"; + +const fs = require("fs"); +const os = require("os"); +const path = require("path"); +/** @type {string | undefined} */ +let cachedIsMusl = undefined; + +module.exports = { + runInstall() { + const denoFileName = os.platform() === "win32" ? "deno.exe" : "deno"; + const targetExecutablePath = path.join( + __dirname, + denoFileName, + ); + + if (fs.existsSync(targetExecutablePath)) { + return targetExecutablePath; + } + + const target = getTarget(); + const sourcePackagePath = path.dirname( + require.resolve("@deno/" + target + "/package.json"), + ); + const sourceExecutablePath = path.join(sourcePackagePath, denoFileName); + + if (!fs.existsSync(sourceExecutablePath)) { + throw new Error( + "Could not find executable for @deno/" + target + " at " + + sourceExecutablePath, + ); + } + + try { + if (process.env.DPRINT_SIMULATED_READONLY_FILE_SYSTEM === "1") { + console.warn("Simulating readonly file system for testing."); + throw new Error("Throwing for testing purposes."); + } + + // in order to make things faster the next time we run and to allow the + // deno vscode extension to easily pick this up, copy the executable + // into the deno package folder + hardLinkOrCopy(sourceExecutablePath, targetExecutablePath); + if (os.platform() !== "win32") { + // chomd +x + chmodX(targetExecutablePath); + } + return targetExecutablePath; + } catch (err) { + // this may fail on readonly file systems... in this case, fall + // back to using the resolved package path + if (process.env.DENO_DEBUG === "1") { + console.warn( + "Failed to copy executable from " + + sourceExecutablePath + " to " + targetExecutablePath + + ". Using resolved package path instead.", + err, + ); + } + // use the path found in the specific package + try { + chmodX(sourceExecutablePath); + } catch (_err) { + // ignore + } + return sourceExecutablePath; + } + }, +}; + +/** @filePath {string} */ +function chmodX(filePath) { + const perms = fs.statSync(filePath).mode; + fs.chmodSync(filePath, perms | 0o111); +} + +function getTarget() { + const platform = os.platform(); + if (platform === "linux") { + return platform + "-" + getArch() + "-" + getLinuxFamily(); + } else { + return platform + "-" + getArch(); + } +} + +function getArch() { + const arch = os.arch(); + if (arch !== "arm64" && arch !== "x64") { + throw new Error( + "Unsupported architecture " + os.arch() + + ". Only x64 and aarch64 binaries are available.", + ); + } + return arch; +} + +function getLinuxFamily() { + if (getIsMusl()) { + throw new Error( + "Musl is not supported. It's one of our priorities. Please upvote this issue: https://github.com/denoland/deno/issues/3711", + ); + // return "musl"; + } + return "glibc"; + + function getIsMusl() { + // code adapted from https://github.com/lovell/detect-libc + // Copyright Apache 2.0 license, the detect-libc maintainers + if (cachedIsMusl == null) { + cachedIsMusl = innerGet(); + } + return cachedIsMusl; + + function innerGet() { + try { + if (os.platform() !== "linux") { + return false; + } + return isProcessReportMusl() || isConfMusl(); + } catch (err) { + // just in case + console.warn("Error checking if musl.", err); + return false; + } + } + + function isProcessReportMusl() { + if (!process.report) { + return false; + } + const rawReport = process.report.getReport(); + const report = typeof rawReport === "string" + ? JSON.parse(rawReport) + : rawReport; + if (!report || !(report.sharedObjects instanceof Array)) { + return false; + } + return report.sharedObjects.some((o) => + o.includes("libc.musl-") || o.includes("ld-musl-") + ); + } + + function isConfMusl() { + const output = getCommandOutput(); + const [_, ldd1] = output.split(/[\r\n]+/); + return ldd1 && ldd1.includes("musl"); + } + + function getCommandOutput() { + try { + const command = + "getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true"; + return require("child_process").execSync(command, { encoding: "utf8" }); + } catch (_err) { + return ""; + } + } + } +} + +/** + * @param sourcePath {string} + * @param destinationPath {string} + */ +function hardLinkOrCopy(sourcePath, destinationPath) { + try { + fs.linkSync(sourcePath, destinationPath); + } catch { + atomicCopyFile(sourcePath, destinationPath); + } +} + +/** + * @param sourcePath {string} + * @param destinationPath {string} + */ +function atomicCopyFile(sourcePath, destinationPath) { + const crypto = require("crypto"); + const rand = crypto.randomBytes(4).toString("hex"); + const tempFilePath = destinationPath + "." + rand; + fs.copyFileSync(sourcePath, tempFilePath); + try { + fs.renameSync(tempFilePath, destinationPath); + } catch (err) { + // will maybe throw when another process had already done this + // so just ignore and delete the created temporary file + try { + fs.unlinkSync(tempFilePath); + } catch (_err2) { + // ignore + } + throw err; + } +} diff --git a/tools/release/promote_to_release.ts b/tools/release/promote_to_release.ts index 046f4d33a8070f..bca798d22c2659 100755 --- a/tools/release/promote_to_release.ts +++ b/tools/release/promote_to_release.ts @@ -1,5 +1,5 @@ #!/usr/bin/env -S deno run -A --lock=tools/deno.lock.json -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-console diff --git a/tools/upload_wptfyi.js b/tools/upload_wptfyi.js index 23dd4c660232aa..b08f352329364e 100644 --- a/tools/upload_wptfyi.js +++ b/tools/upload_wptfyi.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // This script pushes new WPT results to wpt.fyi. When the `--ghstatus` flag is // passed, will automatically add a status check to the commit with a link to diff --git a/tools/util.js b/tools/util.js index 8c7cea15d8e4da..07f405098cb426 100644 --- a/tools/util.js +++ b/tools/util.js @@ -1,13 +1,21 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-console -import { dirname, fromFileUrl, join, resolve, toFileUrl } from "@std/path"; +import { + dirname, + extname, + fromFileUrl, + join, + resolve, + toFileUrl, +} from "@std/path"; import { wait } from "https://deno.land/x/wait@0.1.13/mod.ts"; -export { dirname, fromFileUrl, join, resolve, toFileUrl }; -export { existsSync, walk } from "@std/fs"; +export { dirname, extname, fromFileUrl, join, resolve, toFileUrl }; +export { existsSync, expandGlobSync, walk } from "@std/fs"; export { TextLineStream } from "@std/streams/text-line-stream"; export { delay } from "@std/async/delay"; +export { parse as parseJSONC } from "@std/jsonc/parse"; // [toolName] --version output const versions = { diff --git a/tools/verify_pr_title.js b/tools/verify_pr_title.js index 90a045d3f45fa3..dd623bb6302ef3 100644 --- a/tools/verify_pr_title.js +++ b/tools/verify_pr_title.js @@ -1,4 +1,4 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. // deno-lint-ignore-file no-console diff --git a/tools/wgpu_sync.js b/tools/wgpu_sync.js index 1d9e180d52865e..995a4b59750cd4 100755 --- a/tools/wgpu_sync.js +++ b/tools/wgpu_sync.js @@ -1,5 +1,5 @@ #!/usr/bin/env -S deno run --unstable --allow-read --allow-write --allow-run --config=tests/config/deno.json -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +// Copyright 2018-2025 the Deno authors. MIT license. import { join, ROOT_PATH } from "./util.js";

\n \n API Documentation\n   •  \n Getting In Touch (GitHub Discussions)\n \n