forked from opensearch-project/OpenSearch-Dashboards
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Node.js >=14.20.1 <19 (opensearch-project#4071)
* Bump Node.js requirements to 18 Signed-off-by: Miki <[email protected]> * Replace `lmdb-store` with `lmdb` Signed-off-by: Miki <[email protected]> Co-authored-by: Anan Zhuang <[email protected]> * Bump `elastic-apm-node` to the latest minor Signed-off-by: Miki <[email protected]> * Replace webpack and plugins with a patched version that uses xxhash64 * Use `xxhash64` as the hashing algorithm of webpack * Upgrade `globby` * Remove `fibers` Signed-off-by: Miki <[email protected]> * Replace `fs.rmdir` with `fs.rm` in cross-platform tests Signed-off-by: Miki <[email protected]> * Increase listener limit Signed-off-by: Miki <[email protected]> Co-authored-by: Anan Zhuang <[email protected]> * Add promise-stripping serializer Signed-off-by: Miki <[email protected]> * Bump heap for CI Signed-off-by: Miki <[email protected]> * Correct use of fs/promises in @osd/pm Signed-off-by: Miki <[email protected]> * Use fs/promise in plugin post-install cleanup Signed-off-by: Miki <[email protected]> * Set the test server's host to `0.0.0.0` Signed-off-by: Miki <[email protected]> * Sync `.node-version` file Signed-off-by: Miki <[email protected]> * Support both `isPrimary`, for Node 18, and `isMaster`, for Node 14 Signed-off-by: Miki <[email protected]> * Add types when using `isDeepStrictEqual` Signed-off-by: Miki <[email protected]> Co-authored-by: Anan Zhuang <[email protected]> * Add names to `SchemaError` to log more specific errors Signed-off-by: Miki <[email protected]> * Fix failing vega visualization tests outside the CI Signed-off-by: Miki <[email protected]> * Fix snapshot of errors thrown for undefined accessors Signed-off-by: Miki <[email protected]> * Fix flakiness of log_rotator Signed-off-by: Miki <[email protected]> * Fix asynchronous `fs` usafe in plugin discover Signed-off-by: Miki <[email protected]> * Fix mocks in @osd/optimizer Signed-off-by: Miki <[email protected]> * Fix memory leaks caused by setting states on unloaded components Signed-off-by: Miki <[email protected]> Co-authored-by: Anan Zhuang <[email protected]> * Bump Node in Dockerfile Signed-off-by: Miki <[email protected]> Co-authored-by: Anan Zhuang <[email protected]> * Remove the response `close` event as an indicator of the requesting finishing opensearch-project#3601 (comment) Signed-off-by: Miki <[email protected]> Co-authored-by: Anan Zhuang <[email protected]> * [BWC] Timeout after 3 mins of waiting for OSD to be running in tests Signed-off-by: Miki <[email protected]> * Make build use the same node version that tests are run against Signed-off-by: Miki <[email protected]> * Make Node resolve DNS by IPv4 first * This is helpful to resolve `locahost` to `127.0.0.1` Signed-off-by: Miki <[email protected]> * Standardize patterns used by plugin discovery * Enhance absolute path serialization on Windows Signed-off-by: Miki <[email protected]> * Mock fetch in SenseEditor tests Signed-off-by: Miki <[email protected]> * Restore node-sass usage to fix build performance * `sass-loader@10` is the last version that supports webpack@4 * `sass` is extremely slow when using the legacy API (`render`) and to use the "Modern API" (`compileStringAsync`), `sass-loader@13` would be needed. * The performance of `sass@10` is made acceptable only with `fibers` but that is deprecated and doesn't work on Node 18 Signed-off-by: Anan Zhuang <[email protected]> Signed-off-by: Miki <[email protected]> * Revert "[CI] setup Chrome and utilize binary path (opensearch-project#3997)" This reverts commit 0188d05 Signed-off-by: Miki <[email protected]> * Prevent fast-fail while running functional test in CI Signed-off-by: Miki <[email protected]> * Revert "Temporarily hardcode chromedriver to 112.0.0 to enable all ftr tests (opensearch-project#3976)" This reverts commit 5ea0cbe. Signed-off-by: Miki <[email protected]> * Save Cypress results artifacts during CI Signed-off-by: Miki <[email protected]> * Add missing required dependency on `set-value` * Also force all to ^4.1.0 due to a vulnerability fixed in 3.1.0. Signed-off-by: Miki <[email protected]> * Prevent multiple calls to bootstrap's shutdown Signed-off-by: Miki <[email protected]> * Use Node 18.16.0 in distributions * Bump jest-canvas-mock to fix failing tests * Extend Node engines versions Signed-off-by: Miki <[email protected]> * Normalize test snapshots across Node 14, 16, and 18 Signed-off-by: Miki <[email protected]> * Update CHANGELOG for Node.js >=14.20.1 <19 support Signed-off-by: Miki <[email protected]> --------- Signed-off-by: Miki <[email protected]> Signed-off-by: Miki <[email protected]> Signed-off-by: Anan Zhuang <[email protected]> Co-authored-by: Anan Zhuang <[email protected]>
- Loading branch information
Showing
78 changed files
with
4,328 additions
and
3,882 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
14.21.3 | ||
18.16.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
14.21.3 | ||
18.16.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
ARG NODE_VERSION=14.20.1 | ||
ARG NODE_VERSION=18.16.0 | ||
FROM node:${NODE_VERSION} AS base | ||
|
||
ENV HOME '.' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,7 +47,7 @@ | |
"test:jest:ci": "scripts/use_node scripts/jest --ci --colors --runInBand", | ||
"test:jest:ci:coverage": "scripts/use_node scripts/jest --ci --colors --runInBand --coverage", | ||
"test:jest_integration": "scripts/use_node scripts/jest_integration", | ||
"test:jest_integration:ci": "scripts/use_node scripts/jest_integration --ci --colors --max-old-space-size=5120", | ||
"test:jest_integration:ci": "scripts/use_node scripts/jest_integration --ci --colors", | ||
"test:mocha": "scripts/use_node scripts/mocha", | ||
"test:mocha:coverage": "yarn nyc --reporter=text-summary --reporter=lcov --report-dir=./target/opensearch-dashboards-coverage/mocha scripts/use_node scripts/mocha", | ||
"test:ftr": "scripts/use_node scripts/functional_tests", | ||
|
@@ -79,7 +79,7 @@ | |
"url": "https://github.com/opensearch-project/opensearch-dashboards.git" | ||
}, | ||
"resolutions": { | ||
"**/@types/node": "^14.17.32", | ||
"**/@types/node": "~18.7.0", | ||
"**/ansi-regex": "^5.0.1", | ||
"**/async": "^3.2.3", | ||
"**/d3-color": "^3.1.0", | ||
|
@@ -99,6 +99,7 @@ | |
"**/minimatch": "^3.0.5", | ||
"**/jest-config": "npm:@amoo-miki/[email protected]", | ||
"**/jest-jasmine2": "npm:@amoo-miki/[email protected]", | ||
"**/set-value": "^4.1.0", | ||
"**/xml2js": "^0.5.0", | ||
"**/yaml": "^2.2.2" | ||
}, | ||
|
@@ -170,7 +171,7 @@ | |
"deep-freeze-strict": "^1.1.1", | ||
"del": "^6.1.1", | ||
"dns-sync": "^0.2.1", | ||
"elastic-apm-node": "^3.7.0", | ||
"elastic-apm-node": "^3.43.0", | ||
"elasticsearch": "^16.7.0", | ||
"http-aws-es": "npm:@zhongnansu/[email protected]", | ||
"execa": "^4.0.2", | ||
|
@@ -180,7 +181,7 @@ | |
"getos": "^3.2.1", | ||
"glob": "^7.1.7", | ||
"glob-all": "^3.2.1", | ||
"globby": "^8.0.1", | ||
"globby": "^11.1.0", | ||
"handlebars": "4.7.7", | ||
"hjson": "3.2.1", | ||
"http-proxy-agent": "^2.1.0", | ||
|
@@ -215,6 +216,7 @@ | |
"rison-node": "1.0.2", | ||
"rxjs": "^6.5.5", | ||
"semver": "^5.7.0", | ||
"set-value": "^4.1.0", | ||
"source-map-support": "^0.5.19", | ||
"symbol-observable": "^1.2.0", | ||
"tar": "^6.1.11", | ||
|
@@ -305,7 +307,7 @@ | |
"@types/mock-fs": "^4.10.0", | ||
"@types/moment-timezone": "^0.5.12", | ||
"@types/mustache": "^0.8.31", | ||
"@types/node": "^14.17.32", | ||
"@types/node": "~18.7.0", | ||
"@types/node-forge": "^1.0.1", | ||
"@types/normalize-path": "^3.0.0", | ||
"@types/pegjs": "^0.10.1", | ||
|
@@ -400,7 +402,7 @@ | |
"immer": "^9.0.6", | ||
"intl-messageformat-parser": "^1.4.0", | ||
"jest": "^27.5.1", | ||
"jest-canvas-mock": "^2.3.1", | ||
"jest-canvas-mock": "^2.5.1", | ||
"jest-raw-loader": "^1.0.1", | ||
"jimp": "^0.14.0", | ||
"jquery": "^3.5.0", | ||
|
@@ -473,7 +475,7 @@ | |
"zlib": "^1.0.5" | ||
}, | ||
"engines": { | ||
"node": "^14.20.1", | ||
"yarn": "^1.21.1" | ||
"node": ">=14.20.1 <19", | ||
"yarn": "^1.22.10" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,6 @@ | |
"@osd/babel-preset": "1.0.0", | ||
"raw-loader": "^4.0.2", | ||
"typescript": "4.0.2", | ||
"webpack": "^4.41.5" | ||
"webpack": "npm:@amoo-miki/[email protected]" | ||
} | ||
} |
5 changes: 2 additions & 3 deletions
5
packages/osd-config-schema/src/errors/__snapshots__/schema_error.test.ts.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
packages/osd-dev-utils/src/serializers/strip_promises_serizlizer.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
export const createStripPromisesSerializer = () => ({ | ||
serialize: (value: string) => value.replace(/("value": Promise) \{[^}]+}/gm, '$1 {}'), | ||
test: (value: any) => typeof value === 'string', | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,6 @@ | |
"glob-all": "^3.2.1", | ||
"lru-cache": "^4.1.5", | ||
"resolve": "^1.7.1", | ||
"webpack": "^4.41.5" | ||
"webpack": "npm:@amoo-miki/[email protected]" | ||
} | ||
} |
Oops, something went wrong.