| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1e32520 commit a749ced
7 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,6 @@ | |||
| 1 | + // This is an auto generated file, please do not edit. | ||
| 2 | + // Refer to tools/update-acorn.sh | ||
| 3 | + #ifndef SRC_ACORN_VERSION_H_ | ||
| 4 | + #define SRC_ACORN_VERSION_H_ | ||
| 5 | + #define ACORN_VERSION "8.8.1" | ||
| 6 | + #endif // SRC_ACORN_VERSION_H_ | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,9 +1,11 @@ | |||
| 1 | 1 | #include "node_metadata.h" | |
| 2 | + #include "acorn_version.h" | ||
| 2 | 3 | #include "ares.h" | |
| 3 | 4 | #include "brotli/encode.h" | |
| 4 | 5 | #include "llhttp.h" | |
| 5 | 6 | #include "nghttp2/nghttp2ver.h" | |
| 6 | 7 | #include "node.h" | |
| 8 | + #include "undici_version.h" | ||
| 7 | 9 | #include "util.h" | |
| 8 | 10 | #include "uv.h" | |
| 9 | 11 | #include "uvwasi.h" | |
@@ -90,6 +92,10 @@ Metadata::Versions::Versions() { | |||
| 90 | 92 | std::to_string((BrotliEncoderVersion() & 0xFFF000) >> 12) + | |
| 91 | 93 | "." + | |
| 92 | 94 | std::to_string(BrotliEncoderVersion() & 0xFFF); | |
| 95 | + #ifndef NODE_SHARED_BUILTIN_UNDICI_UNDICI_PATH | ||
| 96 | + undici = UNDICI_VERSION; | ||
| 97 | + #endif | ||
| 98 | + acorn = ACORN_VERSION; | ||
| 93 | 99 | ||
| 94 | 100 | uvwasi = UVWASI_VERSION_STRING; | |
| 95 | 101 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -27,6 +27,12 @@ namespace node { | |||
| 27 | 27 | #define NODE_HAS_RELEASE_URLS | |
| 28 | 28 | #endif | |
| 29 | 29 | ||
| 30 | + #ifndef NODE_SHARED_BUILTIN_UNDICI_UNDICI_PATH | ||
| 31 | + #define NODE_VERSIONS_KEY_UNDICI(V) V(undici) | ||
| 32 | + #else | ||
| 33 | + #define NODE_VERSIONS_KEY_UNDICI(V) | ||
| 34 | + #endif | ||
| 35 | + | ||
| 30 | 36 | #define NODE_VERSIONS_KEYS_BASE(V) \ | |
| 31 | 37 | V(node) \ | |
| 32 | 38 | V(v8) \ | |
@@ -38,7 +44,9 @@ namespace node { | |||
| 38 | 44 | V(nghttp2) \ | |
| 39 | 45 | V(napi) \ | |
| 40 | 46 | V(llhttp) \ | |
| 41 | - V(uvwasi) | ||
| 47 | + V(uvwasi) \ | ||
| 48 | + V(acorn) \ | ||
| 49 | + NODE_VERSIONS_KEY_UNDICI(V) | ||
| 42 | 50 | ||
| 43 | 51 | #if HAVE_OPENSSL | |
| 44 | 52 | #define NODE_VERSIONS_KEY_CRYPTO(V) V(openssl) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,6 @@ | |||
| 1 | + // This is an auto generated file, please do not edit. | ||
| 2 | + // Refer to tools/update-undici.sh | ||
| 3 | + #ifndef SRC_UNDICI_VERSION_H_ | ||
| 4 | + #define SRC_UNDICI_VERSION_H_ | ||
| 5 | + #define UNDICI_VERSION "5.14.0" | ||
| 6 | + #endif // SRC_UNDICI_VERSION_H_ | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,6 +2,9 @@ | |||
| 2 | 2 | const common = require('../common'); | |
| 3 | 3 | const assert = require('assert'); | |
| 4 | 4 | ||
| 5 | + // Import of pure js (non-shared) deps for comparison | ||
| 6 | + const acorn = require('../../deps/acorn/acorn/package.json'); | ||
| 7 | + | ||
| 5 | 8 | const expected_keys = [ | |
| 6 | 9 | 'ares', | |
| 7 | 10 | 'brotli', | |
@@ -14,8 +17,15 @@ const expected_keys = [ | |||
| 14 | 17 | 'napi', | |
| 15 | 18 | 'llhttp', | |
| 16 | 19 | 'uvwasi', | |
| 20 | + 'acorn', | ||
| 17 | 21 | ]; | |
| 18 | 22 | ||
| 23 | + const hasUndici = process.config.variables.node_builtin_shareable_builtins.includes('deps/undici/undici.js'); | ||
| 24 | + | ||
| 25 | + if (hasUndici) { | ||
| 26 | + expected_keys.push('undici'); | ||
| 27 | + } | ||
| 28 | + | ||
| 19 | 29 | if (common.hasCrypto) { | |
| 20 | 30 | expected_keys.push('openssl'); | |
| 21 | 31 | } | |
@@ -39,13 +49,18 @@ assert.deepStrictEqual(actual_keys, expected_keys); | |||
| 39 | 49 | ||
| 40 | 50 | const commonTemplate = /^\d+\.\d+\.\d+(?:-.*)?$/; | |
| 41 | 51 | ||
| 52 | + assert.match(process.versions.acorn, commonTemplate); | ||
| 42 | 53 | assert.match(process.versions.ares, commonTemplate); | |
| 43 | 54 | assert.match(process.versions.brotli, commonTemplate); | |
| 44 | 55 | assert.match(process.versions.llhttp, commonTemplate); | |
| 45 | 56 | assert.match(process.versions.node, commonTemplate); | |
| 46 | 57 | assert.match(process.versions.uv, commonTemplate); | |
| 47 | 58 | assert.match(process.versions.zlib, commonTemplate); | |
| 48 | 59 | ||
| 60 | + if (hasUndici) { | ||
| 61 | + assert.match(process.versions.undici, commonTemplate); | ||
| 62 | + } | ||
| 63 | + | ||
| 49 | 64 | assert.match( | |
| 50 | 65 | process.versions.v8, | |
| 51 | 66 | /^\d+\.\d+\.\d+(?:\.\d+)?-node\.\d+(?: \(candidate\))?$/ | |
@@ -70,3 +85,12 @@ for (let i = 0; i < expected_keys.length; i++) { | |||
| 70 | 85 | ||
| 71 | 86 | assert.strictEqual(process.config.variables.napi_build_version, | |
| 72 | 87 | process.versions.napi); | |
| 88 | + | ||
| 89 | + if (hasUndici) { | ||
| 90 | + const undici = require('../../deps/undici/src/package.json'); | ||
| 91 | + const expectedUndiciVersion = undici.version; | ||
| 92 | + assert.strictEqual(process.versions.undici, expectedUndiciVersion); | ||
| 93 | + } | ||
| 94 | + | ||
| 95 | + const expectedAcornVersion = acorn.version; | ||
| 96 | + assert.strictEqual(process.versions.acorn, expectedAcornVersion); | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,6 +23,17 @@ rm -rf deps/acorn/acorn | |||
| 23 | 23 | "$NODE" "$NPM" init --yes | |
| 24 | 24 | ||
| 25 | 25 | "$NODE" "$NPM" install --global-style --no-bin-links --ignore-scripts acorn | |
| 26 | + cd node_modules/acorn | ||
| 27 | + # get acorn version | ||
| 28 | + ACORN_VERSION=$("$NODE" -p "require('./package.json').version") | ||
| 29 | + # update this version information in src/acorn_version.h | ||
| 30 | + FILE_PATH="$ROOT/src/acorn_version.h" | ||
| 31 | + echo "// This is an auto generated file, please do not edit." > "$FILE_PATH" | ||
| 32 | + echo "// Refer to tools/update-acorn.sh" >> "$FILE_PATH" | ||
| 33 | + echo "#ifndef SRC_ACORN_VERSION_H_" >> "$FILE_PATH" | ||
| 34 | + echo "#define SRC_ACORN_VERSION_H_" >> "$FILE_PATH" | ||
| 35 | + echo "#define ACORN_VERSION \"$ACORN_VERSION\"" >> "$FILE_PATH" | ||
| 36 | + echo "#endif // SRC_ACORN_VERSION_H_" >> "$FILE_PATH" | ||
| 26 | 37 | ) | |
| 27 | 38 | ||
| 28 | 39 | mv acorn-tmp/node_modules/acorn deps/acorn | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,6 +26,16 @@ rm -f deps/undici/undici.js | |||
| 26 | 26 | "$NODE" "$NPM" install --global-style --no-bin-links --ignore-scripts undici | |
| 27 | 27 | cd node_modules/undici | |
| 28 | 28 | "$NODE" "$NPM" run build:node | |
| 29 | + # get the new version of undici | ||
| 30 | + UNDICI_VERSION=$("$NODE" -p "require('./package.json').version") | ||
| 31 | + # update this version information in src/undici_version.h | ||
| 32 | + FILE_PATH="$ROOT/src/undici_version.h" | ||
| 33 | + echo "// This is an auto generated file, please do not edit." > "$FILE_PATH" | ||
| 34 | + echo "// Refer to tools/update-undici.sh" >> "$FILE_PATH" | ||
| 35 | + echo "#ifndef SRC_ACORN_VERSION_H_" >> "$FILE_PATH" | ||
| 36 | + echo "#define SRC_ACORN_VERSION_H_" >> "$FILE_PATH" | ||
| 37 | + echo "#define UNDICI_VERSION \"$UNDICI_VERSION\"" >> "$FILE_PATH" | ||
| 38 | + echo "#endif // SRC_ACORN_VERSION_H_" >> "$FILE_PATH" | ||
| 29 | 39 | ) | |
| 30 | 40 | ||
| 31 | 41 | mv undici-tmp/node_modules/undici deps/undici/src | |
| Back | FazBrowse Home | New Git URL |
0 commit comments