Skip to content

Commit

Permalink
[Chore] Remove backwards-compatible hacks for main target
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Romero <[email protected]>
  • Loading branch information
joshuarrrr committed Dec 28, 2022
1 parent 8dbc4a7 commit 1d3823a
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 85 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Adding @zhongnansu as maintainer. ([#2590](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2590))
- Removes `minimatch` manual resolution ([#3019](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3019))
- Remove `github-checks-reporter`, an unused dependency ([#3126](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3126))
- Add `vega-lite` v5 dependency aliased as `vega-lite-next` ([#3076](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3076))
- Upgrade `vega-lite` dependency to ^5.6.0 ([#3076](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3076))

### 🪛 Refactoring

Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,7 @@
"ui-select": "0.19.8",
"vega": "^5.17.3",
"vega-interpreter": "npm:@amoo-miki/[email protected]",
"vega-lite": "^4.16.8",
"vega-lite-next": "npm:vega-lite@^5.6.0",
"vega-lite": "^5.6.0",
"vega-schema-url-parser": "^2.1.0",
"vega-tooltip": "^0.24.2",
"vinyl-fs": "^3.0.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/osd-optimizer/src/worker/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ export function getWebpackConfig(bundle: Bundle, bundleRefs: BundleRefs, worker:
},
{
test: /\.(js|tsx?)$/,
// vega-lite and some dependencies don't have es5 builds
// so we need to build from source
// vega-lite and some of its dependencies don't have es5 builds
// so we need to build from source and transpiled for webpack v4
exclude: /[\/\\]node_modules[\/\\](?!vega-(lite-next|label|functions)[\/\\])/,
use: {
loader: 'babel-loader',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jest.mock('../services');

jest.mock('../lib/vega', () => ({
vega: jest.requireActual('vega'),
vegaLite: jest.requireActual('vega-lite'),
vegaLite: jest.requireActual('vega-lite/src'),
}));

describe(`VegaParser.parseAsync`, () => {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/vis_type_vega/public/lib/vega.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*/

// Build vega-lite from source for es5 compatibility
import { compile, version } from 'vega-lite-next/src';
import { compile, version } from 'vega-lite/src';
import * as vega from 'vega/build-es5/vega';
import { expressionInterpreter as vegaExpressionInterpreter } from 'vega-interpreter/build/vega-interpreter.module';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jest.mock('./default_spec', () => ({

jest.mock('./lib/vega', () => ({
vega: jest.requireActual('vega'),
vegaLite: jest.requireActual('vega-lite-next/src'),
vegaLite: jest.requireActual('vega-lite/src'),
}));

// FLAKY: https://github.com/elastic/kibana/issues/71713
Expand Down
84 changes: 7 additions & 77 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2755,7 +2755,7 @@
resolved "https://registry.yarnpkg.com/@types/chroma-js/-/chroma-js-2.1.3.tgz#0b03d737ff28fad10eb884e0c6cedd5ffdc4ba0a"
integrity sha512-1xGPhoSGY1CPmXLCBcjVZSQinFjL26vlR8ZqprsBWiFyED4JacJJ9zHhh5aaUXqbY9B37mKQ73nlydVAXmr1+g==

"@types/clone@~2.1.0", "@types/clone@~2.1.1":
"@types/clone@~2.1.1":
version "2.1.1"
resolved "https://registry.yarnpkg.com/@types/clone/-/clone-2.1.1.tgz#9b880d0ce9b1f209b5e0bd6d9caa38209db34024"
integrity sha512-BZIU34bSYye0j/BFcPraiDZ5ka6MJADjcDVELGf7glr9K+iE8NYVjFslJFVWzskSxkLLyCrSPScE82/UUoBSvg==
Expand Down Expand Up @@ -2904,13 +2904,6 @@
resolved "https://registry.yarnpkg.com/@types/extract-zip/-/extract-zip-1.6.2.tgz#5c7eb441c41136167a42b88b64051e6260c29e86"
integrity sha1-XH60QcQRNhZ6QriLZAUeYmDCnoY=

"@types/fast-json-stable-stringify@^2.0.0":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@types/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#c4d9c003d546b7ca9496ea924e9e9faca72873b4"
integrity sha512-IyNhGHu71jH1jCXTHmafuoAAdsbBON3kDh7u/UUhLmjYgN5TYB54e1R8ckTCiIevl2UuZaCsi9XRxineY5yUjw==
dependencies:
fast-json-stable-stringify "*"

"@types/fetch-mock@^7.3.1":
version "7.3.5"
resolved "https://registry.yarnpkg.com/@types/fetch-mock/-/fetch-mock-7.3.5.tgz#7aee678c4e7c7e1a168bae8fdab5b8d712e377f6"
Expand Down Expand Up @@ -4475,11 +4468,6 @@ array-find@^1.0.0:
resolved "https://registry.yarnpkg.com/array-find/-/array-find-1.0.0.tgz#6c8e286d11ed768327f8e62ecee87353ca3e78b8"
integrity sha1-bI4obRHtdoMn+OYuzuhzU8o+eLg=

array-flat-polyfill@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/array-flat-polyfill/-/array-flat-polyfill-1.0.1.tgz#1e3a4255be619dfbffbfd1d635c1cf357cd034e7"
integrity sha512-hfJmKupmQN0lwi0xG6FQ5U8Rd97RnIERplymOv/qpq8AoNKPPAnxJadjFA23FNWm88wykh9HmpLJUUwUtNU/iw==

array-from@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/array-from/-/array-from-2.1.1.tgz#cfe9d8c26628b9dc5aecc62a9f5d8f1f352c1195"
Expand Down Expand Up @@ -5704,7 +5692,7 @@ cliui@^6.0.0:
strip-ansi "^6.0.0"
wrap-ansi "^6.2.0"

cliui@^7.0.0, cliui@^7.0.2:
cliui@^7.0.2:
version "7.0.4"
resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f"
integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==
Expand Down Expand Up @@ -7651,7 +7639,7 @@ es6-weak-map@^2.0.3:
es6-iterator "^2.0.3"
es6-symbol "^3.1.1"

escalade@^3.0.2, escalade@^3.1.1:
escalade@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==
Expand Down Expand Up @@ -8283,7 +8271,7 @@ fast-glob@^3.0.3, fast-glob@^3.2.11, fast-glob@^3.2.4, fast-glob@^3.2.9:
merge2 "^1.3.0"
micromatch "^4.0.4"

fast-json-stable-stringify@*, fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@~2.1.0:
fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@~2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==
Expand Down Expand Up @@ -11405,11 +11393,6 @@ [email protected]:
resolved "https://registry.yarnpkg.com/json-stringify-pretty-compact/-/json-stringify-pretty-compact-1.2.0.tgz#0bc316b5e6831c07041fc35612487fb4e9ab98b8"
integrity sha512-/11Pj1OyX814QMKO7K8l85SHPTr/KsFxHp8GE2zVa0BtJgGimDjXHfM3FhC7keQdWDea7+nXf+f1de7ATZcZkQ==

json-stringify-pretty-compact@~2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/json-stringify-pretty-compact/-/json-stringify-pretty-compact-2.0.0.tgz#e77c419f52ff00c45a31f07f4c820c2433143885"
integrity sha512-WRitRfs6BGq4q8gTgOy4ek7iPFXjbra0H3PmDLKm2xnZ+Gh1HUhiKGgCZkSPNULlP7mvfu6FV/mOLhCarspADQ==

json-stringify-pretty-compact@~3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/json-stringify-pretty-compact/-/json-stringify-pretty-compact-3.0.0.tgz#f71ef9d82ef16483a407869556588e91b681d9ab"
Expand Down Expand Up @@ -17005,11 +16988,6 @@ tslib@^2.0.0, tslib@^2.0.3, tslib@^2.2.0, tslib@^2.3.0, tslib@^2.3.1:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01"
integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==

tslib@~2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.3.tgz#8e0741ac45fc0c226e58a17bfc3e64b9bc6ca61c"
integrity sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==

tslib@~2.4.0:
version "2.4.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e"
Expand Down Expand Up @@ -17629,11 +17607,6 @@ vega-event-selector@^3.0.0, vega-event-selector@~3.0.0:
resolved "https://registry.yarnpkg.com/vega-event-selector/-/vega-event-selector-3.0.0.tgz#7b855ac0c3ddb59bc5b5caa0d96dbbc9fbd33a4c"
integrity sha512-Gls93/+7tEJGE3kUuUnxrBIxtvaNeF01VIFB2Q2Of2hBIBvtHX74jcAdDtkh5UhhoYGD8Q1J30P5cqEBEwtPoQ==

vega-event-selector@~2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/vega-event-selector/-/vega-event-selector-2.0.6.tgz#6beb00e066b78371dde1a0f40cb5e0bbaecfd8bc"
integrity sha512-UwCu50Sqd8kNZ1X/XgiAY+QAyQUmGFAwyDu7y0T5fs6/TPQnDo/Bo346NgSgINBEhEKOAMY1Nd/rPOk4UEm/ew==

vega-expression@^5.0.0, vega-expression@~5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/vega-expression/-/vega-expression-5.0.0.tgz#938f26689693a1e0d26716030cdaed43ca7abdfb"
Expand All @@ -17642,13 +17615,6 @@ vega-expression@^5.0.0, vega-expression@~5.0.0:
"@types/estree" "^0.0.50"
vega-util "^1.16.0"

vega-expression@~3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/vega-expression/-/vega-expression-3.0.1.tgz#bbccd8f59371a537eab16f3d9eff5cbeaa27532d"
integrity sha512-+UwOFEkBnAWo8Zud6i8O4Pd2W6QqmPUOaAhjNtj0OxRL+d+Duoy7M4edUDZ+YuoUcMnjjBFfDQu7oRAA1fIMEQ==
dependencies:
vega-util "^1.15.2"

vega-force@~4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/vega-force/-/vega-force-4.1.0.tgz#cc8dea972baa52adc60840ff744ebb9e57d8f1f5"
Expand Down Expand Up @@ -17724,7 +17690,7 @@ vega-label@~1.2.0:
vega-scenegraph "^4.9.2"
vega-util "^1.15.2"

"vega-lite-next@npm:vega-lite@^5.6.0":
vega-lite@^5.6.0:
version "5.6.0"
resolved "https://registry.yarnpkg.com/vega-lite/-/vega-lite-5.6.0.tgz#0f0adfc8b86f5eea071df186b2877d828c870c11"
integrity sha512-aTjQk//SzL9ctHY4ItA8yZSGflHMWPJmCXEs8LeRlixuOaAbamZmeL8xNMbQpS/vAZQeFAqjcJ32Fuztz/oGww==
Expand All @@ -17740,24 +17706,6 @@ vega-label@~1.2.0:
vega-util "~1.17.0"
yargs "~17.6.0"

vega-lite@^4.16.8:
version "4.17.0"
resolved "https://registry.yarnpkg.com/vega-lite/-/vega-lite-4.17.0.tgz#01ad4535e92f28c3852c1071711de272ddfb4631"
integrity sha512-MO2XsaVZqx6iWWmVA5vwYFamvhRUsKfVp7n0pNlkZ2/21cuxelSl92EePZ2YGmzL6z4/3K7r/45zaG8p+qNHeg==
dependencies:
"@types/clone" "~2.1.0"
"@types/fast-json-stable-stringify" "^2.0.0"
array-flat-polyfill "^1.0.1"
clone "~2.1.2"
fast-deep-equal "~3.1.3"
fast-json-stable-stringify "~2.1.0"
json-stringify-pretty-compact "~2.0.0"
tslib "~2.0.3"
vega-event-selector "~2.0.6"
vega-expression "~3.0.0"
vega-util "~1.16.0"
yargs "~16.0.3"

vega-loader@^4.3.2, vega-loader@^4.4.0, vega-loader@~4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/vega-loader/-/vega-loader-4.5.0.tgz#b15acc4c8f84191f500e94d35ddfb9721ac943ad"
Expand Down Expand Up @@ -17896,11 +17844,6 @@ vega-util@^1.15.2, vega-util@^1.16.0, vega-util@^1.16.1, vega-util@^1.17.0, vega
resolved "https://registry.yarnpkg.com/vega-util/-/vega-util-1.17.0.tgz#b72ae0baa97f943bf591f8f5bb27ceadf06834ac"
integrity sha512-HTaydZd9De3yf+8jH66zL4dXJ1d1p5OIFyoBzFiOli4IJbwkL1jrefCKz6AHDm1kYBzDJ0X4bN+CzZSCTvNk1w==

vega-util@~1.16.0:
version "1.16.1"
resolved "https://registry.yarnpkg.com/vega-util/-/vega-util-1.16.1.tgz#992bf3c3b6e145797214d99862841baea417ba39"
integrity sha512-FdgD72fmZMPJE99FxvFXth0IL4BbLA93WmBg/lvcJmfkK4Uf90WIlvGwaIUdSePIsdpkZjBPyQcHMQ8OcS8Smg==

vega-view-transforms@~4.5.8:
version "4.5.8"
resolved "https://registry.yarnpkg.com/vega-view-transforms/-/vega-view-transforms-4.5.8.tgz#c8dc42c3c7d4aa725d40b8775180c9f23bc98f4e"
Expand Down Expand Up @@ -18558,7 +18501,7 @@ y18n@^4.0.0:
resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf"
integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==

y18n@^5.0.1, y18n@^5.0.5:
y18n@^5.0.5:
version "5.0.8"
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"
integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==
Expand Down Expand Up @@ -18601,7 +18544,7 @@ yargs-parser@^18.1.2, yargs-parser@^18.1.3:
camelcase "^5.0.0"
decamelize "^1.2.0"

yargs-parser@^20.0.0, yargs-parser@^20.2.2, yargs-parser@^20.2.3:
yargs-parser@^20.2.2, yargs-parser@^20.2.3:
version "20.2.9"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"
integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==
Expand Down Expand Up @@ -18651,19 +18594,6 @@ yargs@^15.0.2, yargs@^15.3.1:
y18n "^4.0.0"
yargs-parser "^18.1.2"

yargs@~16.0.3:
version "16.0.3"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.0.3.tgz#7a919b9e43c90f80d4a142a89795e85399a7e54c"
integrity sha512-6+nLw8xa9uK1BOEOykaiYAJVh6/CjxWXK/q9b5FpRgNslt8s22F2xMBqVIKgCRjNgGvGPBy8Vog7WN7yh4amtA==
dependencies:
cliui "^7.0.0"
escalade "^3.0.2"
get-caller-file "^2.0.5"
require-directory "^2.1.1"
string-width "^4.2.0"
y18n "^5.0.1"
yargs-parser "^20.0.0"

yargs@~17.6.0:
version "17.6.2"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.6.2.tgz#2e23f2944e976339a1ee00f18c77fedee8332541"
Expand Down

0 comments on commit 1d3823a

Please sign in to comment.