* Bump Node.js requirements to 18
Signed-off-by: Miki <miki@amazon.com>
* Replace `lmdb-store` with `lmdb`
Signed-off-by: Miki <miki@amazon.com>
Co-authored-by: Anan Zhuang <ananzh@amazon.com>
* Bump `elastic-apm-node` to the latest minor
Signed-off-by: Miki <miki@amazon.com>
* 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 <miki@amazon.com>
* Replace `fs.rmdir` with `fs.rm` in cross-platform tests
Signed-off-by: Miki <miki@amazon.com>
* Increase listener limit
Signed-off-by: Miki <miki@amazon.com>
Co-authored-by: Anan Zhuang <ananzh@amazon.com>
* Add promise-stripping serializer
Signed-off-by: Miki <miki@amazon.com>
* Bump heap for CI
Signed-off-by: Miki <miki@amazon.com>
* Correct use of fs/promises in @osd/pm
Signed-off-by: Miki <miki@amazon.com>
* Use fs/promise in plugin post-install cleanup
Signed-off-by: Miki <miki@amazon.com>
* Set the test server's host to `0.0.0.0`
Signed-off-by: Miki <miki@amazon.com>
* Sync `.node-version` file
Signed-off-by: Miki <miki@amazon.com>
* Support both `isPrimary`, for Node 18, and `isMaster`, for Node 14
Signed-off-by: Miki <miki@amazon.com>
* Add types when using `isDeepStrictEqual`
Signed-off-by: Miki <miki@amazon.com>
Co-authored-by: Anan Zhuang <ananzh@amazon.com>
* Add names to `SchemaError` to log more specific errors
Signed-off-by: Miki <miki@amazon.com>
* Fix failing vega visualization tests outside the CI
Signed-off-by: Miki <miki@amazon.com>
* Fix snapshot of errors thrown for undefined accessors
Signed-off-by: Miki <miki@amazon.com>
* Fix flakiness of log_rotator
Signed-off-by: Miki <miki@amazon.com>
* Fix asynchronous `fs` usafe in plugin discover
Signed-off-by: Miki <miki@amazon.com>
* Fix mocks in @osd/optimizer
Signed-off-by: Miki <miki@amazon.com>
* Fix memory leaks caused by setting states on unloaded components
Signed-off-by: Miki <miki@amazon.com>
Co-authored-by: Anan Zhuang <ananzh@amazon.com>
* Bump Node in Dockerfile
Signed-off-by: Miki <miki@amazon.com>
Co-authored-by: Anan Zhuang <ananzh@amazon.com>
* Remove the response `close` event as an indicator of the requesting finishing
https://github.com/opensearch-project/OpenSearch-Dashboards/issues/3601#issuecomment-1515110477
Signed-off-by: Miki <miki@amazon.com>
Co-authored-by: Anan Zhuang <ananzh@amazon.com>
* [BWC] Timeout after 3 mins of waiting for OSD to be running in tests
Signed-off-by: Miki <miki@amazon.com>
* Make build use the same node version that tests are run against
Signed-off-by: Miki <miki@amazon.com>
* Make Node resolve DNS by IPv4 first
* This is helpful to resolve `locahost` to `127.0.0.1`
Signed-off-by: Miki <miki@amazon.com>
* Standardize patterns used by plugin discovery
* Enhance absolute path serialization on Windows
Signed-off-by: Miki <amoo_miki@yahoo.com>
* Mock fetch in SenseEditor tests
Signed-off-by: Miki <amoo_miki@yahoo.com>
* 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 <ananzh@amazon.com>
Signed-off-by: Miki <miki@amazon.com>
* Revert "[CI] setup Chrome and utilize binary path (#3997)"
This reverts commit 0188d052
Signed-off-by: Miki <miki@amazon.com>
* Prevent fast-fail while running functional test in CI
Signed-off-by: Miki <miki@amazon.com>
* Revert "Temporarily hardcode chromedriver to 112.0.0 to enable all ftr tests (#3976)"
This reverts commit 5ea0cbe25223e24badfe27f79813ee313c9af0b0.
Signed-off-by: Miki <miki@amazon.com>
* Save Cypress results artifacts during CI
Signed-off-by: Miki <miki@amazon.com>
* 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 <miki@amazon.com>
* Prevent multiple calls to bootstrap's shutdown
Signed-off-by: Miki <miki@amazon.com>
* Use Node 18.16.0 in distributions
* Bump jest-canvas-mock to fix failing tests
* Extend Node engines versions
Signed-off-by: Miki <miki@amazon.com>
* Normalize test snapshots across Node 14, 16, and 18
Signed-off-by: Miki <miki@amazon.com>
* Update CHANGELOG for Node.js >=14.20.1 <19 support
Signed-off-by: Miki <miki@amazon.com>
---------
Signed-off-by: Miki <miki@amazon.com>
Signed-off-by: Miki <amoo_miki@yahoo.com>
Signed-off-by: Anan Zhuang <ananzh@amazon.com>
Co-authored-by: Anan Zhuang <ananzh@amazon.com>
* Fixes the linting rules to accept only the approved copyright headers
* Fixes the license headers
New files with no open source origins:
* Short 2-liner block
Modified or Unmodified files with open source origins:
* Large header block
* Updates the snapshots that changed with updates to the license headers
Signed-off-by: Miki <miki@amazon.com>
In order to make the license that applies to each file as clear as possible, and to be consistent with elasticsearch, we are adding Apache 2.0 license headers to the top of each file.
Existence of this header is enforced by eslint and tslint and missing headers were automatically added in the last commit by running:
```
node scripts/eslint --fix && node scripts/tslint --fix
```
* feat(12976): node version validation at runtime.
* refact(12976): move the code into a static utilities class.
* test(12976): added first test case using jest.
* test(12976): added test cases for node_version.
* feat(12976): create setup env node to bootstrap babel, ts-node and node version validator.
* refact(12976): migrated node version code from es6 to es5.
* feat(12976): node version validation at runtime.
* refact(12976): move the code into a static utilities class.
* test(12976): added first test case using jest.
* test(12976): added test cases for node_version.
* feat(12976): create setup env node to bootstrap babel, ts-node and node version validator.
* refact(12976): migrated node version code from es6 to es5.
* fix(12976): remove one level from ts node register cache directory link.
* chore(12976): added caret to semver dependecy in order to support minor versions.
* refact(12976): small change from named import to default import on node version validator.
* refact(12976): removed ts_node_register and add the code to babel_register.
* feat(12976): split eslint config in order to properly support files built to run before and after node version validator. refact(12976): convert script files to es5 code. refact(12976): delete inline eslint configs from node version check related files.
* refact(12976): remove ts node register file.
* refact(12976): completely port setup_node_env to es5.
* refact(12976): remove babel_register invokation from external dependencies in scripts.
* refact(12976): move node_version code directly into node_version_validator inside setup_node_env folder.
* refact(12976): only node version validator for kbn script.