From f589e9750a46f525c36376402e2c01d5e5c6dedf Mon Sep 17 00:00:00 2001 From: Akshat Jawne Date: Fri, 17 May 2024 08:50:47 -0600 Subject: [PATCH 01/10] Replace shortid with nanoid --- jest.config.base.cjs | 1 + package-lock.json | 130 +++++++++--------- package.json | 1 + packages/code-studio/package.json | 4 +- .../code-studio/src/main/AppMainContainer.tsx | 4 +- packages/components/package.json | 4 +- packages/components/src/Checkbox.tsx | 4 +- packages/components/src/RadioGroup.tsx | 4 +- packages/components/src/RadioItem.tsx | 4 +- .../src/theme/SpectrumThemeProvider.tsx | 4 +- .../components/src/theme/ThemeUtils.test.ts | 2 +- packages/console/package.json | 4 +- packages/console/src/monaco/MonacoUtils.ts | 4 +- packages/dashboard-core-plugins/package.json | 4 +- .../src/ChartBuilderPlugin.tsx | 4 +- .../src/ConsolePlugin.tsx | 4 +- .../src/FilterPlugin.tsx | 8 +- .../src/MarkdownPlugin.tsx | 4 +- .../src/WidgetLoaderPlugin.tsx | 4 +- .../dropdown-filter/DropdownFilter.tsx | 4 +- .../src/linker/Linker.tsx | 4 +- .../src/linker/LinkerUtils.ts | 6 +- .../src/panels/ConsolePanel.tsx | 4 +- .../src/panels/FilterSetManager.tsx | 4 +- packages/dashboard/package.json | 4 +- packages/dashboard/src/layout/LayoutUtils.ts | 8 +- .../dashboard/src/layout/useDashboardPanel.ts | 8 +- packages/embed-widget/package.json | 4 +- packages/embed-widget/src/App.tsx | 4 +- packages/golden-layout/src/utils/utils.ts | 4 +- packages/iris-grid/package.json | 4 +- .../iris-grid/src/AdvancedFilterCreator.tsx | 6 +- packages/iris-grid/src/GotoRow.tsx | 4 +- .../iris-grid/src/sidebar/ChartBuilder.tsx | 6 +- .../src/sidebar/CustomColumnBuilder.tsx | 6 +- .../src/sidebar/TableCsvExporter.tsx | 4 +- packages/jsapi-utils/package.json | 2 +- packages/jsapi-utils/src/MessageUtils.ts | 6 +- packages/jsapi-utils/src/SessionUtils.ts | 4 +- packages/react-hooks/package.json | 2 +- .../src/useEffectNTimesWhen.test.ts | 4 +- .../useFormWithDetachedSubmitButton.test.ts | 22 +-- .../src/useFormWithDetachedSubmitButton.ts | 4 +- tests/console.spec.ts | 4 +- tests/notebook.spec.ts | 9 +- tests/utils.ts | 4 +- 46 files changed, 171 insertions(+), 172 deletions(-) diff --git a/jest.config.base.cjs b/jest.config.base.cjs index 07be8cfdab..73b599fb5f 100644 --- a/jest.config.base.cjs +++ b/jest.config.base.cjs @@ -33,6 +33,7 @@ const nodeModulesToTransform = [ 'rehype.*', 'web-namespaces', 'hastscript', + 'nanoid', ]; module.exports = { diff --git a/package-lock.json b/package-lock.json index 88e426698c..fbf6b7ec93 100644 --- a/package-lock.json +++ b/package-lock.json @@ -114,6 +114,7 @@ "karma-cli": "^2.0.0", "karma-jasmine": "~0.1.5", "lerna": "^7.1.4", + "nanoid": "^5.0.7", "npm-run-all": "^4.1.5", "prettier": "3.0.0", "react": "^17.0.2", @@ -21670,9 +21671,9 @@ "dev": true }, "node_modules/nanoid": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", - "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.0.7.tgz", + "integrity": "sha512-oLxFY2gd2IqnjcYyOXD8XGCftpGtZP2AbHbOkthDkvRywH5ayNtPVy9YlOPcHckXzbLTCHpkb7FB+yuxKV13pQ==", "funding": [ { "type": "github", @@ -21680,10 +21681,10 @@ } ], "bin": { - "nanoid": "bin/nanoid.cjs" + "nanoid": "bin/nanoid.js" }, "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + "node": "^18 || >=20" } }, "node_modules/native-promise-only": { @@ -23903,6 +23904,23 @@ "version": "4.2.0", "license": "MIT" }, + "node_modules/postcss/node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, "node_modules/potpack": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/potpack/-/potpack-1.0.2.tgz", @@ -25659,18 +25677,6 @@ "version": "1.7.3", "license": "MIT" }, - "node_modules/shortid": { - "version": "2.2.16", - "resolved": "https://registry.npmjs.org/shortid/-/shortid-2.2.16.tgz", - "integrity": "sha512-Ugt+GIZqvGXCIItnsL+lvFJOiN7RYqlGy7QE41O3YC1xbNSeDGIRO7xg2JJXIAj1cAGnOeC1r7/T9pgrtQbv4g==", - "dependencies": { - "nanoid": "^2.1.0" - } - }, - "node_modules/shortid/node_modules/nanoid": { - "version": "2.1.11", - "license": "MIT" - }, "node_modules/side-channel": { "version": "1.0.4", "license": "MIT", @@ -28792,6 +28798,7 @@ "memoize-one": "^5.1.1", "memoizee": "^0.4.15", "monaco-editor": "^0.41.0", + "nanoid": "^5.0.7", "pouchdb-browser": "^7.2.2", "pouchdb-find": "^7.2.2", "prop-types": "^15.7.2", @@ -28802,8 +28809,7 @@ "react-router-dom": "^5.1.2", "react-transition-group": "^4.4.2", "redux": "^4.2.0", - "redux-thunk": "^2.4.1", - "shortid": "^2.2.16" + "redux-thunk": "^2.4.1" }, "devDependencies": { "@deephaven/eslint-config": "file:../eslint-config", @@ -28868,13 +28874,13 @@ "lodash.debounce": "^4.0.8", "lodash.flatten": "^4.4.0", "memoizee": "^0.4.15", + "nanoid": "^5.0.7", "popper.js": "^1.16.1", "prop-types": "^15.7.2", "react-beautiful-dnd": "^13.1.0", "react-transition-group": "^4.4.2", "react-virtualized-auto-sizer": "1.0.6", - "react-window": "^1.8.6", - "shortid": "^2.2.16" + "react-window": "^1.8.6" }, "devDependencies": { "@deephaven/mocks": "file:../mocks" @@ -28909,11 +28915,11 @@ "memoize-one": "^5.1.1", "memoizee": "^0.4.15", "monaco-editor": "^0.41.0", + "nanoid": "^5.0.7", "papaparse": "5.3.2", "popper.js": "^1.16.1", "prop-types": "^15.7.2", - "shell-quote": "^1.7.2", - "shortid": "^2.2.16" + "shell-quote": "^1.7.2" }, "devDependencies": { "@deephaven/jsapi-shim": "file:../jsapi-shim", @@ -28941,8 +28947,8 @@ "fast-deep-equal": "^3.1.3", "lodash.ismatch": "^4.1.1", "lodash.throttle": "^4.1.1", - "prop-types": "^15.7.2", - "shortid": "^2.2.16" + "nanoid": "^5.0.7", + "prop-types": "^15.7.2" }, "devDependencies": { "@deephaven/mocks": "file:../mocks", @@ -28991,14 +28997,14 @@ "lodash.throttle": "^4.1.1", "memoize-one": "^5.1.1", "memoizee": "^0.4.15", + "nanoid": "^5.0.7", "prop-types": "^15.7.2", "react-markdown": "^8.0.7", "redux": "^4.2.0", "redux-thunk": "^2.4.1", "rehype-mathjax": "^4.0.3", "remark-gfm": "^3.0.1", - "remark-math": "^5.1.1", - "shortid": "^2.2.16" + "remark-math": "^5.1.1" }, "devDependencies": { "@deephaven/jsapi-shim": "file:../jsapi-shim", @@ -29424,10 +29430,10 @@ "@deephaven/utils": "file:../utils", "@fontsource/fira-mono": "5.0.13", "@fontsource/fira-sans": "5.0.20", + "nanoid": "5.0.7", "react": "^17.0.2", "react-dom": "^17.0.2", - "react-redux": "^7.2.4", - "shortid": "^2.2.16" + "react-redux": "^7.2.4" }, "devDependencies": { "@deephaven/eslint-config": "file:../eslint-config", @@ -29576,10 +29582,10 @@ "memoize-one": "^5.1.1", "memoizee": "^0.4.15", "monaco-editor": "^0.41.0", + "nanoid": "^5.0.7", "prop-types": "^15.7.2", "react-beautiful-dnd": "^13.1.0", - "react-transition-group": "^4.4.2", - "shortid": "^2.2.16" + "react-transition-group": "^4.4.2" }, "devDependencies": { "@deephaven/jsapi-shim": "file:../jsapi-shim", @@ -29674,7 +29680,7 @@ "@deephaven/log": "file:../log", "@deephaven/utils": "file:../utils", "lodash.clamp": "^4.0.3", - "shortid": "^2.2.16" + "nanoid": "^5.0.7" }, "devDependencies": { "@deephaven/jsapi-shim": "file:../jsapi-shim" @@ -29791,7 +29797,7 @@ "@deephaven/utils": "file:../utils", "lodash.debounce": "^4.0.8", "lodash.throttle": "^4.1.1", - "shortid": "^2.2.16" + "nanoid": "^5.0.7" }, "engines": { "node": ">=16" @@ -31254,6 +31260,7 @@ "memoize-one": "^5.1.1", "memoizee": "^0.4.15", "monaco-editor": "^0.41.0", + "nanoid": "^5.0.7", "pouchdb-browser": "^7.2.2", "pouchdb-find": "^7.2.2", "prop-types": "^15.7.2", @@ -31264,8 +31271,7 @@ "react-router-dom": "^5.1.2", "react-transition-group": "^4.4.2", "redux": "^4.2.0", - "redux-thunk": "^2.4.1", - "shortid": "^2.2.16" + "redux-thunk": "^2.4.1" }, "dependencies": { "autoprefixer": { @@ -31304,13 +31310,13 @@ "lodash.debounce": "^4.0.8", "lodash.flatten": "^4.4.0", "memoizee": "^0.4.15", + "nanoid": "^5.0.7", "popper.js": "^1.16.1", "prop-types": "^15.7.2", "react-beautiful-dnd": "^13.1.0", "react-transition-group": "^4.4.2", "react-virtualized-auto-sizer": "1.0.6", - "react-window": "^1.8.6", - "shortid": "^2.2.16" + "react-window": "^1.8.6" } }, "@deephaven/console": { @@ -31335,11 +31341,11 @@ "memoize-one": "^5.1.1", "memoizee": "^0.4.15", "monaco-editor": "^0.41.0", + "nanoid": "^5.0.7", "papaparse": "5.3.2", "popper.js": "^1.16.1", "prop-types": "^15.7.2", - "shell-quote": "^1.7.2", - "shortid": "^2.2.16" + "shell-quote": "^1.7.2" } }, "@deephaven/dashboard": { @@ -31356,8 +31362,8 @@ "fast-deep-equal": "^3.1.3", "lodash.ismatch": "^4.1.1", "lodash.throttle": "^4.1.1", - "prop-types": "^15.7.2", - "shortid": "^2.2.16" + "nanoid": "^5.0.7", + "prop-types": "^15.7.2" }, "dependencies": { "@deephaven/utils": { @@ -31411,14 +31417,14 @@ "lodash.throttle": "^4.1.1", "memoize-one": "^5.1.1", "memoizee": "^0.4.15", + "nanoid": "^5.0.7", "prop-types": "^15.7.2", "react-markdown": "^8.0.7", "redux": "^4.2.0", "redux-thunk": "^2.4.1", "rehype-mathjax": "^4.0.3", "remark-gfm": "^3.0.1", - "remark-math": "^5.1.1", - "shortid": "^2.2.16" + "remark-math": "^5.1.1" }, "dependencies": { "escape-string-regexp": { @@ -31718,10 +31724,10 @@ "@deephaven/utils": "file:../utils", "@fontsource/fira-mono": "5.0.13", "@fontsource/fira-sans": "5.0.20", + "nanoid": "5.0.7", "react": "^17.0.2", "react-dom": "^17.0.2", - "react-redux": "^7.2.4", - "shortid": "^2.2.16" + "react-redux": "^7.2.4" } }, "@deephaven/eslint-config": { @@ -31815,10 +31821,10 @@ "memoize-one": "^5.1.1", "memoizee": "^0.4.15", "monaco-editor": "^0.41.0", + "nanoid": "^5.0.7", "prop-types": "^15.7.2", "react-beautiful-dnd": "^13.1.0", - "react-transition-group": "^4.4.2", - "shortid": "^2.2.16" + "react-transition-group": "^4.4.2" } }, "@deephaven/jsapi-bootstrap": { @@ -31871,7 +31877,7 @@ "@deephaven/log": "file:../log", "@deephaven/utils": "file:../utils", "lodash.clamp": "^4.0.3", - "shortid": "^2.2.16" + "nanoid": "^5.0.7" } }, "@deephaven/log": { @@ -31923,7 +31929,7 @@ "@deephaven/utils": "file:../utils", "lodash.debounce": "^4.0.8", "lodash.throttle": "^4.1.1", - "shortid": "^2.2.16" + "nanoid": "^5.0.7" } }, "@deephaven/redux": { @@ -46185,9 +46191,9 @@ "dev": true }, "nanoid": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", - "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==" + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.0.7.tgz", + "integrity": "sha512-oLxFY2gd2IqnjcYyOXD8XGCftpGtZP2AbHbOkthDkvRywH5ayNtPVy9YlOPcHckXzbLTCHpkb7FB+yuxKV13pQ==" }, "native-promise-only": { "version": "0.8.1", @@ -47779,6 +47785,13 @@ "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" + }, + "dependencies": { + "nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==" + } } }, "postcss-media-query-parser": { @@ -49108,19 +49121,6 @@ "shell-quote": { "version": "1.7.3" }, - "shortid": { - "version": "2.2.16", - "resolved": "https://registry.npmjs.org/shortid/-/shortid-2.2.16.tgz", - "integrity": "sha512-Ugt+GIZqvGXCIItnsL+lvFJOiN7RYqlGy7QE41O3YC1xbNSeDGIRO7xg2JJXIAj1cAGnOeC1r7/T9pgrtQbv4g==", - "requires": { - "nanoid": "^2.1.0" - }, - "dependencies": { - "nanoid": { - "version": "2.1.11" - } - } - }, "side-channel": { "version": "1.0.4", "requires": { diff --git a/package.json b/package.json index 021ff2a817..ece3bdea3c 100644 --- a/package.json +++ b/package.json @@ -123,6 +123,7 @@ "karma-cli": "^2.0.0", "karma-jasmine": "~0.1.5", "lerna": "^7.1.4", + "nanoid": "^5.0.7", "npm-run-all": "^4.1.5", "prettier": "3.0.0", "react": "^17.0.2", diff --git a/packages/code-studio/package.json b/packages/code-studio/package.json index 4096be3a8c..f1d18ee006 100644 --- a/packages/code-studio/package.json +++ b/packages/code-studio/package.json @@ -48,6 +48,7 @@ "memoize-one": "^5.1.1", "memoizee": "^0.4.15", "monaco-editor": "^0.41.0", + "nanoid": "^5.0.7", "pouchdb-browser": "^7.2.2", "pouchdb-find": "^7.2.2", "prop-types": "^15.7.2", @@ -58,8 +59,7 @@ "react-router-dom": "^5.1.2", "react-transition-group": "^4.4.2", "redux": "^4.2.0", - "redux-thunk": "^2.4.1", - "shortid": "^2.2.16" + "redux-thunk": "^2.4.1" }, "homepage": ".", "main": "build/index.html", diff --git a/packages/code-studio/src/main/AppMainContainer.tsx b/packages/code-studio/src/main/AppMainContainer.tsx index 93abb77ba2..eb70ab603c 100644 --- a/packages/code-studio/src/main/AppMainContainer.tsx +++ b/packages/code-studio/src/main/AppMainContainer.tsx @@ -9,7 +9,7 @@ import classNames from 'classnames'; import memoize from 'memoize-one'; import { connect } from 'react-redux'; import { RouteComponentProps, withRouter } from 'react-router-dom'; -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { ContextActions, @@ -529,7 +529,7 @@ export class AppMainContainer extends Component< title, data, }: CreateDashboardPayload): void { - const newId = shortid(); + const newId = nanoid(); const { setDashboardPluginData } = this.props; setDashboardPluginData(newId, pluginId, data); this.setState(({ tabs }) => ({ diff --git a/packages/components/package.json b/packages/components/package.json index 358821f8cf..19f4b3e06a 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -42,13 +42,13 @@ "lodash.debounce": "^4.0.8", "lodash.flatten": "^4.4.0", "memoizee": "^0.4.15", + "nanoid": "^5.0.7", "popper.js": "^1.16.1", "prop-types": "^15.7.2", "react-beautiful-dnd": "^13.1.0", "react-transition-group": "^4.4.2", "react-virtualized-auto-sizer": "1.0.6", - "react-window": "^1.8.6", - "shortid": "^2.2.16" + "react-window": "^1.8.6" }, "peerDependencies": { "react": ">=16.8.0", diff --git a/packages/components/src/Checkbox.tsx b/packages/components/src/Checkbox.tsx index 791c0ba61c..1b6ee46416 100644 --- a/packages/components/src/Checkbox.tsx +++ b/packages/components/src/Checkbox.tsx @@ -1,7 +1,7 @@ import React, { useState, useEffect, useCallback } from 'react'; import classNames from 'classnames'; import PropTypes from 'prop-types'; -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; import { useForwardedRef } from '@deephaven/react-hooks'; interface CheckboxProps { @@ -35,7 +35,7 @@ const Checkbox = React.forwardRef( 'data-testid': dataTestId, } = props; - const [id] = useState(shortid()); + const [id] = useState(nanoid()); const ref = useForwardedRef(forwardedRef); diff --git a/packages/components/src/RadioGroup.tsx b/packages/components/src/RadioGroup.tsx index 7657d3776c..d085583b43 100644 --- a/packages/components/src/RadioGroup.tsx +++ b/packages/components/src/RadioGroup.tsx @@ -1,5 +1,5 @@ import React, { useState } from 'react'; -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; type RadioGroupProps = { /** The radio items to populate this radio. Should be of type RadioItem. */ @@ -34,7 +34,7 @@ function RadioGroup(props: RadioGroupProps): JSX.Element { value = '', 'data-testid': dataTestId, } = props; - const [name] = useState(propsName ?? shortid()); + const [name] = useState(propsName ?? nanoid()); // Need to use "text" type so we can apply a pattern and make selection properly return ( diff --git a/packages/components/src/RadioItem.tsx b/packages/components/src/RadioItem.tsx index 2eb55ebe06..fa57c38793 100644 --- a/packages/components/src/RadioItem.tsx +++ b/packages/components/src/RadioItem.tsx @@ -1,6 +1,6 @@ import React, { useState } from 'react'; import classNames from 'classnames'; -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; type RadioItemProps = { /** Whether this value is currently checked or not */ @@ -56,7 +56,7 @@ const RadioItem = React.forwardRef( 'data-testid': dataTestId, } = props; - const [id] = useState(shortid()); + const [id] = useState(nanoid()); return (
diff --git a/packages/components/src/theme/SpectrumThemeProvider.tsx b/packages/components/src/theme/SpectrumThemeProvider.tsx index 91dc7d1986..7998643a21 100644 --- a/packages/components/src/theme/SpectrumThemeProvider.tsx +++ b/packages/components/src/theme/SpectrumThemeProvider.tsx @@ -1,7 +1,7 @@ import { ReactNode, useState } from 'react'; import { Provider } from '@adobe/react-spectrum'; import type { Theme } from '@react-types/provider'; -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; import { themeDHDefault } from '../spectrum/utils'; export interface SpectrumThemeProviderProps { @@ -27,7 +27,7 @@ export function SpectrumThemeProvider({ // a unique ID is used per provider to force it to render the theme wrapper element inside portals // based on https://github.com/adobe/react-spectrum/issues/1697#issuecomment-999827266 // won't be needed if https://github.com/adobe/react-spectrum/pull/2669 is merged - const [id] = useState(isPortal ? shortid() : null); + const [id] = useState(isPortal ? nanoid() : null); return ( =16.8.0", diff --git a/packages/console/src/monaco/MonacoUtils.ts b/packages/console/src/monaco/MonacoUtils.ts index 41dd953ac9..99011839e6 100644 --- a/packages/console/src/monaco/MonacoUtils.ts +++ b/packages/console/src/monaco/MonacoUtils.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */ -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; /** * Exports a function for initializing monaco with the deephaven theme/config */ @@ -444,7 +444,7 @@ class MonacoUtils { ): void { editor.addAction({ // This shouldn't be referenced by anything so using an arbitrary unique id - id: `disable-keybindings-${shortid()}`, + id: `disable-keybindings-${nanoid()}`, label: '', // This action won't be shown in the UI so no need for a label keybindings, run: () => undefined, diff --git a/packages/dashboard-core-plugins/package.json b/packages/dashboard-core-plugins/package.json index 991084e409..f6c80226ad 100644 --- a/packages/dashboard-core-plugins/package.json +++ b/packages/dashboard-core-plugins/package.json @@ -50,14 +50,14 @@ "lodash.throttle": "^4.1.1", "memoize-one": "^5.1.1", "memoizee": "^0.4.15", + "nanoid": "^5.0.7", "prop-types": "^15.7.2", "react-markdown": "^8.0.7", "redux": "^4.2.0", "redux-thunk": "^2.4.1", "rehype-mathjax": "^4.0.3", "remark-gfm": "^3.0.1", - "remark-math": "^5.1.1", - "shortid": "^2.2.16" + "remark-math": "^5.1.1" }, "peerDependencies": { "react": ">=16.8.0", diff --git a/packages/dashboard-core-plugins/src/ChartBuilderPlugin.tsx b/packages/dashboard-core-plugins/src/ChartBuilderPlugin.tsx index 9beda73c41..488862e44f 100644 --- a/packages/dashboard-core-plugins/src/ChartBuilderPlugin.tsx +++ b/packages/dashboard-core-plugins/src/ChartBuilderPlugin.tsx @@ -13,7 +13,7 @@ import { } from '@deephaven/dashboard'; import { useApi } from '@deephaven/jsapi-bootstrap'; import type { dh } from '@deephaven/jsapi-types'; -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; import { IrisGridEvent } from './events'; import { ChartPanel } from './panels'; @@ -33,7 +33,7 @@ export function ChartBuilderPlugin( const handleCreateChart = useCallback( ({ metadata, - panelId = shortid.generate(), + panelId = nanoid(), table, }: { metadata: { diff --git a/packages/dashboard-core-plugins/src/ConsolePlugin.tsx b/packages/dashboard-core-plugins/src/ConsolePlugin.tsx index 646c635ad9..0aad73effb 100644 --- a/packages/dashboard-core-plugins/src/ConsolePlugin.tsx +++ b/packages/dashboard-core-plugins/src/ConsolePlugin.tsx @@ -15,7 +15,7 @@ import { CloseOptions, isComponent } from '@deephaven/golden-layout'; import Log from '@deephaven/log'; import { useCallback, useRef, useState } from 'react'; import { useDispatch } from 'react-redux'; -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; import { ConsoleEvent, NotebookEvent } from './events'; import { ConsolePanel, @@ -166,7 +166,7 @@ export function ConsolePlugin( return previewFileMap.get(fileId); } if (createIfNecessary as boolean) { - return shortid.generate(); + return nanoid(); } return undefined; }, diff --git a/packages/dashboard-core-plugins/src/FilterPlugin.tsx b/packages/dashboard-core-plugins/src/FilterPlugin.tsx index 64768c4290..3ee7e29170 100644 --- a/packages/dashboard-core-plugins/src/FilterPlugin.tsx +++ b/packages/dashboard-core-plugins/src/FilterPlugin.tsx @@ -1,6 +1,6 @@ import { Component, useCallback, useEffect, useState } from 'react'; import { useDispatch } from 'react-redux'; -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; import { assertIsDashboardPluginProps, DashboardPluginComponentProps, @@ -143,7 +143,7 @@ export function FilterPlugin(props: FilterPluginProps): JSX.Element | null { title = 'DropdownFilter', metadata = {}, panelState = null, - id = shortid.generate(), + id = nanoid(), focusElement = LayoutUtils.DEFAULT_FOCUS_SELECTOR, createNewStack = false, dragEvent = null, @@ -173,7 +173,7 @@ export function FilterPlugin(props: FilterPluginProps): JSX.Element | null { title = 'InputFilter', metadata = {}, panelState = null, - id = shortid.generate(), + id = nanoid(), focusElement = LayoutUtils.DEFAULT_FOCUS_SELECTOR, createNewStack = false, dragEvent = undefined, @@ -203,7 +203,7 @@ export function FilterPlugin(props: FilterPluginProps): JSX.Element | null { title = 'FilterSets', metadata = {}, panelState = null, - id = shortid.generate(), + id = nanoid(), focusElement = LayoutUtils.DEFAULT_FOCUS_SELECTOR, createNewStack = false, dragEvent = null, diff --git a/packages/dashboard-core-plugins/src/MarkdownPlugin.tsx b/packages/dashboard-core-plugins/src/MarkdownPlugin.tsx index e9a3ab33c6..e49aa9ad08 100644 --- a/packages/dashboard-core-plugins/src/MarkdownPlugin.tsx +++ b/packages/dashboard-core-plugins/src/MarkdownPlugin.tsx @@ -1,5 +1,5 @@ import { useCallback, useEffect } from 'react'; -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; import { assertIsDashboardPluginProps, DashboardPluginComponentProps, @@ -44,7 +44,7 @@ export function MarkdownPlugin(props: MarkdownPluginProps): JSX.Element | null { ({ title = '', metadata = {}, - id: panelId = shortid.generate(), + id: panelId = nanoid(), focusElement = LayoutUtils.DEFAULT_FOCUS_SELECTOR, createNewStack = false, dragEvent = null, diff --git a/packages/dashboard-core-plugins/src/WidgetLoaderPlugin.tsx b/packages/dashboard-core-plugins/src/WidgetLoaderPlugin.tsx index 52e3570ff3..8fcfd8d86f 100644 --- a/packages/dashboard-core-plugins/src/WidgetLoaderPlugin.tsx +++ b/packages/dashboard-core-plugins/src/WidgetLoaderPlugin.tsx @@ -1,6 +1,6 @@ import { useMemo, useCallback, useEffect, forwardRef } from 'react'; import type { ReactComponentConfig } from '@deephaven/golden-layout'; -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; import { assertIsDashboardPluginProps, DashboardPluginComponentProps, @@ -106,7 +106,7 @@ export function WidgetLoaderPlugin( const handlePanelOpen = useCallback( ({ dragEvent, - panelId = shortid.generate(), + panelId = nanoid(), fetch, widget, }: PanelOpenEventDetail) => { diff --git a/packages/dashboard-core-plugins/src/controls/dropdown-filter/DropdownFilter.tsx b/packages/dashboard-core-plugins/src/controls/dropdown-filter/DropdownFilter.tsx index a96c163a23..b8ede97897 100644 --- a/packages/dashboard-core-plugins/src/controls/dropdown-filter/DropdownFilter.tsx +++ b/packages/dashboard-core-plugins/src/controls/dropdown-filter/DropdownFilter.tsx @@ -22,7 +22,7 @@ import { TableUtils } from '@deephaven/jsapi-utils'; import memoizee from 'memoizee'; import memoize from 'memoize-one'; import debounce from 'lodash.debounce'; -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; import Log from '@deephaven/log'; import './DropdownFilter.scss'; import { LinkPoint } from '../../linker/LinkerUtils'; @@ -107,7 +107,7 @@ export class DropdownFilter extends Component< const { column, isValueShown, value } = props; this.state = { column, - id: shortid(), + id: nanoid(), selectedColumn: column, disableCancel: !isValueShown, isValueShown, diff --git a/packages/dashboard-core-plugins/src/linker/Linker.tsx b/packages/dashboard-core-plugins/src/linker/Linker.tsx index f360d2a433..a2a1996051 100644 --- a/packages/dashboard-core-plugins/src/linker/Linker.tsx +++ b/packages/dashboard-core-plugins/src/linker/Linker.tsx @@ -1,6 +1,6 @@ import React, { Component, ErrorInfo } from 'react'; import { connect, ConnectedProps } from 'react-redux'; -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; import memoize from 'memoize-one'; import { FadeTransition } from '@deephaven/components'; import { @@ -306,7 +306,7 @@ export class Linker extends Component { const { name: columnName, type: columnType } = column; if (linkInProgress == null || linkInProgress.start == null) { const newLink: Link = { - id: shortid.generate(), + id: nanoid(), start: { panelId, panelComponent, diff --git a/packages/dashboard-core-plugins/src/linker/LinkerUtils.ts b/packages/dashboard-core-plugins/src/linker/LinkerUtils.ts index 393eb28a9b..770bef84fd 100644 --- a/packages/dashboard-core-plugins/src/linker/LinkerUtils.ts +++ b/packages/dashboard-core-plugins/src/linker/LinkerUtils.ts @@ -1,4 +1,4 @@ -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; import { LayoutUtils, PanelComponent } from '@deephaven/dashboard'; import { TableUtils } from '@deephaven/jsapi-utils'; import { TypeValue as FilterTypeValue } from '@deephaven/filters'; @@ -200,13 +200,13 @@ class LinkerUtils { if (link.start.panelId === panelId && link.type !== 'filterSource') { clonedLinks.push({ ...link, - id: shortid.generate(), + id: nanoid(), start: { ...link.start, panelId: cloneId }, }); } else if (link.end?.panelId === panelId) { clonedLinks.push({ ...link, - id: shortid.generate(), + id: nanoid(), end: { ...link.end, panelId: cloneId }, }); } diff --git a/packages/dashboard-core-plugins/src/panels/ConsolePanel.tsx b/packages/dashboard-core-plugins/src/panels/ConsolePanel.tsx index 3257573c8e..0a4d3fe27b 100644 --- a/packages/dashboard-core-plugins/src/panels/ConsolePanel.tsx +++ b/packages/dashboard-core-plugins/src/panels/ConsolePanel.tsx @@ -1,7 +1,7 @@ // Wrapper for the Console for use in a golden layout container // Will probably need to handle window popping out from golden layout here. import React, { PureComponent, ReactElement, RefObject } from 'react'; -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; import debounce from 'lodash.debounce'; import { connect } from 'react-redux'; import { LoadingOverlay } from '@deephaven/components'; @@ -209,7 +209,7 @@ export class ConsolePanel extends PureComponent< const { itemIds } = this.state; let id = itemIds.get(name); if (id == null && createIfNecessary) { - id = shortid.generate(); + id = nanoid(); this.setItemId(name, id); } return id; diff --git a/packages/dashboard-core-plugins/src/panels/FilterSetManager.tsx b/packages/dashboard-core-plugins/src/panels/FilterSetManager.tsx index 8c18d3f53d..b7192f726f 100644 --- a/packages/dashboard-core-plugins/src/panels/FilterSetManager.tsx +++ b/packages/dashboard-core-plugins/src/panels/FilterSetManager.tsx @@ -10,7 +10,7 @@ import React, { MouseEvent, } from 'react'; import memoizeOne from 'memoize-one'; -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { vsEdit, @@ -240,7 +240,7 @@ class FilterSetManager extends Component< handleCaptureNewSet(): void { const { getFilterState } = this.props; FilterSetManager.animateScreenFlash(); - const id = shortid(); + const id = nanoid(); const panels = getFilterState(); const renameSet = { id, diff --git a/packages/dashboard/package.json b/packages/dashboard/package.json index ea0d476e70..c9b4644966 100644 --- a/packages/dashboard/package.json +++ b/packages/dashboard/package.json @@ -29,10 +29,10 @@ "@deephaven/redux": "file:../redux", "@deephaven/utils": "file:../utils", "fast-deep-equal": "^3.1.3", + "nanoid": "^5.0.7", "lodash.ismatch": "^4.1.1", "lodash.throttle": "^4.1.1", - "prop-types": "^15.7.2", - "shortid": "^2.2.16" + "prop-types": "^15.7.2" }, "peerDependencies": { "react": ">=16.8.0", diff --git a/packages/dashboard/src/layout/LayoutUtils.ts b/packages/dashboard/src/layout/LayoutUtils.ts index 1d48029a80..e63689f807 100644 --- a/packages/dashboard/src/layout/LayoutUtils.ts +++ b/packages/dashboard/src/layout/LayoutUtils.ts @@ -1,6 +1,6 @@ import { DragEvent } from 'react'; import deepEqual from 'fast-deep-equal'; -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; import isMatch from 'lodash.ismatch'; import Log from '@deephaven/log'; import GoldenLayout, { @@ -458,7 +458,7 @@ class LayoutUtils { const { component, props = {} } = itemConfig; hydratedConfig.push({ ...itemConfig, - id: itemConfig?.id ?? shortid(), + id: itemConfig?.id ?? nanoid(), props: hydrateComponent(component, props), }); } else if (itemConfig.content !== undefined) { @@ -526,7 +526,7 @@ class LayoutUtils { const config = { ...configParam } as ReactComponentConfig; if (config.id == null) { - config.id = shortid.generate(); + config.id = nanoid(); } if (dragEvent != null) { @@ -716,7 +716,7 @@ class LayoutUtils { panelState, }, title: `${config.title} Copy`, - id: shortid.generate(), + id: nanoid(), }; LayoutUtils.openComponentInStack(stack, cloneConfig); return cloneConfig; diff --git a/packages/dashboard/src/layout/useDashboardPanel.ts b/packages/dashboard/src/layout/useDashboardPanel.ts index b597cf31b6..54ab26ca09 100644 --- a/packages/dashboard/src/layout/useDashboardPanel.ts +++ b/packages/dashboard/src/layout/useDashboardPanel.ts @@ -1,6 +1,6 @@ import { ComponentType, useCallback } from 'react'; import type { ReactComponentConfig } from '@deephaven/golden-layout'; -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; import { DashboardPanelProps, DashboardPluginComponentProps, @@ -49,11 +49,7 @@ export function useDashboardPanel< const { id, layout, registerComponent } = dashboardProps; const handlePanelOpen = useCallback( - ({ - dragEvent, - panelId = shortid.generate(), - widget, - }: PanelOpenEventDetail) => { + ({ dragEvent, panelId = nanoid(), widget }: PanelOpenEventDetail) => { const { name, type } = widget; const isSupportedType = type != null && diff --git a/packages/embed-widget/package.json b/packages/embed-widget/package.json index 737401701f..fbeb7eb202 100644 --- a/packages/embed-widget/package.json +++ b/packages/embed-widget/package.json @@ -30,10 +30,10 @@ "@deephaven/utils": "file:../utils", "@fontsource/fira-mono": "5.0.13", "@fontsource/fira-sans": "5.0.20", + "nanoid": "5.0.7", "react": "^17.0.2", "react-dom": "^17.0.2", - "react-redux": "^7.2.4", - "shortid": "^2.2.16" + "react-redux": "^7.2.4" }, "scripts": { "analyze": "source-map-explorer build/assets/*.js --no-border-checks", diff --git a/packages/embed-widget/src/App.tsx b/packages/embed-widget/src/App.tsx index 08cc8bf196..a427ee19a3 100644 --- a/packages/embed-widget/src/App.tsx +++ b/packages/embed-widget/src/App.tsx @@ -1,6 +1,6 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { useDispatch, useSelector } from 'react-redux'; -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; import { AppDashboards, useConnection, useUser } from '@deephaven/app-utils'; import type GoldenLayout from '@deephaven/golden-layout'; import type { ItemConfigType } from '@deephaven/golden-layout'; @@ -106,7 +106,7 @@ function App(): JSX.Element { pluginId, data, }: CreateDashboardPayload) { - const id = shortid(); + const id = nanoid(); dispatch(setDashboardPluginData(id, pluginId, data)); setDashboardId(id); } diff --git a/packages/golden-layout/src/utils/utils.ts b/packages/golden-layout/src/utils/utils.ts index 45478a85bc..41068ebcef 100644 --- a/packages/golden-layout/src/utils/utils.ts +++ b/packages/golden-layout/src/utils/utils.ts @@ -1,5 +1,5 @@ import $ from 'jquery'; -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; export function getHashValue(key: string) { var matches = location.hash.match(new RegExp(key + '=([^&]*)')); @@ -41,7 +41,7 @@ export function removeFromArray(item: T, array: T[]) { } export function getUniqueId() { - return shortid(); + return nanoid(); } /** diff --git a/packages/iris-grid/package.json b/packages/iris-grid/package.json index 93f2299750..f2c54b536a 100644 --- a/packages/iris-grid/package.json +++ b/packages/iris-grid/package.json @@ -54,11 +54,11 @@ "lodash.throttle": "^4.1.1", "memoize-one": "^5.1.1", "memoizee": "^0.4.15", + "nanoid": "^5.0.7", "monaco-editor": "^0.41.0", "prop-types": "^15.7.2", "react-beautiful-dnd": "^13.1.0", - "react-transition-group": "^4.4.2", - "shortid": "^2.2.16" + "react-transition-group": "^4.4.2" }, "peerDependencies": { "react": ">=16.8.0", diff --git a/packages/iris-grid/src/AdvancedFilterCreator.tsx b/packages/iris-grid/src/AdvancedFilterCreator.tsx index 751235b892..3747c05011 100644 --- a/packages/iris-grid/src/AdvancedFilterCreator.tsx +++ b/packages/iris-grid/src/AdvancedFilterCreator.tsx @@ -26,7 +26,7 @@ import { PromiseUtils, } from '@deephaven/utils'; import type { dh } from '@deephaven/jsapi-types'; -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; import AdvancedFilterCreatorFilterItem from './AdvancedFilterCreatorFilterItem'; import AdvancedFilterCreatorSelectValue from './AdvancedFilterCreatorSelectValue'; import './AdvancedFilterCreator.scss'; @@ -100,7 +100,7 @@ class AdvancedFilterCreator extends PureComponent< }; static makeFilterItem(): AdvancedFilterItem { - return { key: shortid() }; + return { key: nanoid() }; } constructor(props: AdvancedFilterCreatorProps) { @@ -132,7 +132,7 @@ class AdvancedFilterCreator extends PureComponent< options.filterItems?.map(({ selectedType, value }) => ({ selectedType, value, - key: shortid(), + key: nanoid(), })) ?? []; if (filterItems.length === 0) { filterItems.push(AdvancedFilterCreator.makeFilterItem()); diff --git a/packages/iris-grid/src/GotoRow.tsx b/packages/iris-grid/src/GotoRow.tsx index 47827889a4..942a2c3cdc 100644 --- a/packages/iris-grid/src/GotoRow.tsx +++ b/packages/iris-grid/src/GotoRow.tsx @@ -20,7 +20,7 @@ import { Button, DateTimeInput, Select } from '@deephaven/components'; import { TableUtils } from '@deephaven/jsapi-utils'; import classNames from 'classnames'; import './GotoRow.scss'; -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; import IrisGridModel from './IrisGridModel'; import IrisGridProxyModel from './IrisGridProxyModel'; import IrisGridBottomBar from './IrisGridBottomBar'; @@ -96,7 +96,7 @@ const GotoRow = forwardRef( const { dh, rowCount } = model; - const gotoRowInputId = useMemo(() => `goto-row-input-${shortid()}`, []); + const gotoRowInputId = useMemo(() => `goto-row-input-${nanoid()}`, []); const handleGotoValueNumberKeyDown = ( e: KeyboardEvent diff --git a/packages/iris-grid/src/sidebar/ChartBuilder.tsx b/packages/iris-grid/src/sidebar/ChartBuilder.tsx index 4cbe1ef722..2da633a5fd 100644 --- a/packages/iris-grid/src/sidebar/ChartBuilder.tsx +++ b/packages/iris-grid/src/sidebar/ChartBuilder.tsx @@ -13,7 +13,7 @@ import { import type { dh as DhType } from '@deephaven/jsapi-types'; import Log from '@deephaven/log'; import { bindAllMethods } from '@deephaven/utils'; -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; import { BarIcon, HistogramIcon, @@ -74,7 +74,7 @@ class ChartBuilder extends PureComponent { } static makeSeriesItem(value: string): SeriesItem { - return { id: shortid.generate(), value }; + return { id: nanoid(), value }; } static makeDefaultSeriesItems( @@ -218,7 +218,7 @@ class ChartBuilder extends PureComponent { const { model } = this.props; const { columns } = model; newSeriesItems.push({ - id: shortid.generate(), + id: nanoid(), value: columns[0].name, }); diff --git a/packages/iris-grid/src/sidebar/CustomColumnBuilder.tsx b/packages/iris-grid/src/sidebar/CustomColumnBuilder.tsx index ac32679873..5f302ca42d 100644 --- a/packages/iris-grid/src/sidebar/CustomColumnBuilder.tsx +++ b/packages/iris-grid/src/sidebar/CustomColumnBuilder.tsx @@ -1,6 +1,6 @@ import React, { Component, ReactElement } from 'react'; import classNames from 'classnames'; -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; import memoize from 'memoize-one'; import { DragDropContext, Droppable, DropResult } from 'react-beautiful-dnd'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; @@ -39,12 +39,12 @@ class CustomColumnBuilder extends Component< static SUCCESS_SHOW_DURATION = 750; static makeCustomColumnInputEventKey(): string { - return shortid.generate(); + return nanoid(); } static createCustomColumnInput(): Input { return { - eventKey: shortid.generate(), + eventKey: nanoid(), name: '', formula: '', }; diff --git a/packages/iris-grid/src/sidebar/TableCsvExporter.tsx b/packages/iris-grid/src/sidebar/TableCsvExporter.tsx index 5e1a55f4d0..5a33be9bd2 100644 --- a/packages/iris-grid/src/sidebar/TableCsvExporter.tsx +++ b/packages/iris-grid/src/sidebar/TableCsvExporter.tsx @@ -18,7 +18,7 @@ import { import { vsWarning } from '@deephaven/icons'; import type { dh as DhType } from '@deephaven/jsapi-types'; import { TimeUtils } from '@deephaven/utils'; -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; import './TableCsvExporter.scss'; import Log from '@deephaven/log'; import IrisGridModel from '../IrisGridModel'; @@ -135,7 +135,7 @@ class TableCsvExporter extends Component< useUnformattedValues: false, errorMessage: null, - id: shortid.generate(), + id: nanoid(), }; } diff --git a/packages/jsapi-utils/package.json b/packages/jsapi-utils/package.json index 50e7e02167..2aea6094d1 100644 --- a/packages/jsapi-utils/package.json +++ b/packages/jsapi-utils/package.json @@ -26,7 +26,7 @@ "@deephaven/log": "file:../log", "@deephaven/utils": "file:../utils", "lodash.clamp": "^4.0.3", - "shortid": "^2.2.16" + "nanoid": "^5.0.7" }, "devDependencies": { "@deephaven/jsapi-shim": "file:../jsapi-shim" diff --git a/packages/jsapi-utils/src/MessageUtils.ts b/packages/jsapi-utils/src/MessageUtils.ts index affa4360d1..e3c8e24f8f 100644 --- a/packages/jsapi-utils/src/MessageUtils.ts +++ b/packages/jsapi-utils/src/MessageUtils.ts @@ -1,4 +1,4 @@ -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; import Log from '@deephaven/log'; import { TimeoutError } from '@deephaven/utils'; @@ -79,7 +79,7 @@ export function isResponse(obj: unknown): obj is Response { */ export function makeMessage( message: string, - id = shortid(), + id = nanoid(), payload?: T ): Message { return { message, id, payload }; @@ -121,7 +121,7 @@ export async function requestParentResponse( } return new Promise((resolve, reject) => { let timeoutId: number; - const id = shortid(); + const id = nanoid(); const listener = (event: MessageEvent): void => { const { data } = event; if (!isResponse(data)) { diff --git a/packages/jsapi-utils/src/SessionUtils.ts b/packages/jsapi-utils/src/SessionUtils.ts index 4f66dd9950..4b3228700e 100644 --- a/packages/jsapi-utils/src/SessionUtils.ts +++ b/packages/jsapi-utils/src/SessionUtils.ts @@ -1,6 +1,6 @@ import type { dh as DhType } from '@deephaven/jsapi-types'; import Log from '@deephaven/log'; -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; import { requestParentResponse, SESSION_DETAILS_REQUEST } from './MessageUtils'; import NoConsolesError, { isNoConsolesError } from './NoConsolesError'; @@ -61,7 +61,7 @@ export async function createSessionWrapper( const session = await connection.startSession(type); - const config = { type, id: shortid.generate() }; + const config = { type, id: nanoid() }; log.info('Console session established', config); diff --git a/packages/react-hooks/package.json b/packages/react-hooks/package.json index 909f6f90a2..47b428e40c 100644 --- a/packages/react-hooks/package.json +++ b/packages/react-hooks/package.json @@ -26,7 +26,7 @@ "@deephaven/utils": "file:../utils", "lodash.debounce": "^4.0.8", "lodash.throttle": "^4.1.1", - "shortid": "^2.2.16" + "nanoid": "^5.0.7" }, "peerDependencies": { "react": ">=16.8.0" diff --git a/packages/react-hooks/src/useEffectNTimesWhen.test.ts b/packages/react-hooks/src/useEffectNTimesWhen.test.ts index 9daab4dd47..f1e9e85f27 100644 --- a/packages/react-hooks/src/useEffectNTimesWhen.test.ts +++ b/packages/react-hooks/src/useEffectNTimesWhen.test.ts @@ -1,13 +1,13 @@ import { renderHook } from '@testing-library/react-hooks'; import { DependencyList } from 'react'; -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; import useEffectNTimesWhen from './useEffectNTimesWhen'; const conditionTrue = true; const conditionFalse = false; // Creates unique dependencies array to ensure useEffect fires on every render -const dependencies = (): DependencyList => [shortid()]; +const dependencies = (): DependencyList => [nanoid()]; const effectFn = jest.fn().mockName('effectFn'); beforeEach(() => { diff --git a/packages/react-hooks/src/useFormWithDetachedSubmitButton.test.ts b/packages/react-hooks/src/useFormWithDetachedSubmitButton.test.ts index 53cd18096c..9f241401c6 100644 --- a/packages/react-hooks/src/useFormWithDetachedSubmitButton.test.ts +++ b/packages/react-hooks/src/useFormWithDetachedSubmitButton.test.ts @@ -1,40 +1,40 @@ -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; import { TestUtils } from '@deephaven/utils'; import { renderHook } from '@testing-library/react-hooks'; import type { FocusableRefValue } from '@react-types/shared'; import useFormWithDetachedSubmitButton from './useFormWithDetachedSubmitButton'; -jest.mock('shortid'); +jest.mock('nanoid'); -let shortIdCount = 0; +let nanoIdCount = 0; beforeEach(() => { jest.clearAllMocks(); - TestUtils.asMock(shortid).mockImplementation(() => { - shortIdCount += 1; - return String(shortIdCount); + TestUtils.asMock(nanoid).mockImplementation(() => { + nanoIdCount += 1; + return String(nanoIdCount); }); }); describe('useFormWithDetachedSubmitButton', () => { it('should generate new formId on mount', () => { const { rerender } = renderHook(() => useFormWithDetachedSubmitButton()); - expect(shortIdCount).toEqual(1); + expect(nanoIdCount).toEqual(1); // Should not generate new id on re-render rerender(); - expect(shortIdCount).toEqual(1); + expect(nanoIdCount).toEqual(1); // Should generate new id if fresh mount renderHook(() => useFormWithDetachedSubmitButton()); - expect(shortIdCount).toEqual(2); + expect(nanoIdCount).toEqual(2); }); it('should generate form and button props', () => { const { result } = renderHook(() => useFormWithDetachedSubmitButton()); - const formId = `useSubmitButtonRef-${shortIdCount}`; + const formId = `useSubmitButtonRef-${nanoIdCount}`; expect(result.current).toEqual({ formProps: { @@ -81,7 +81,7 @@ describe('useFormWithDetachedSubmitButton', () => { result.current.submitButtonProps.ref(buttonRef); - const formId = `useSubmitButtonRef-${shortIdCount}`; + const formId = `useSubmitButtonRef-${nanoIdCount}`; expect(button.setAttribute).toHaveBeenCalledWith('form', formId); }); diff --git a/packages/react-hooks/src/useFormWithDetachedSubmitButton.ts b/packages/react-hooks/src/useFormWithDetachedSubmitButton.ts index bdc1550497..0e4f1e9f03 100644 --- a/packages/react-hooks/src/useFormWithDetachedSubmitButton.ts +++ b/packages/react-hooks/src/useFormWithDetachedSubmitButton.ts @@ -1,5 +1,5 @@ import { FormEvent, useCallback, useMemo } from 'react'; -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; import type { FocusableRefValue } from '@react-types/shared'; function preventDefault(event: FormEvent): void { @@ -36,7 +36,7 @@ export interface UseFormWithDetachedSubmitButtonResult { export default function useFormWithDetachedSubmitButton( enableDefaultFormSubmitBehavior = false ): UseFormWithDetachedSubmitButtonResult { - const formId = useMemo(() => `useSubmitButtonRef-${shortid()}`, []); + const formId = useMemo(() => `useSubmitButtonRef-${nanoid()}`, []); const submitButtonRef = useCallback( (buttonEl: FocusableRefValue | null) => { diff --git a/tests/console.spec.ts b/tests/console.spec.ts index d0e27f7ced..0ce21c401c 100644 --- a/tests/console.spec.ts +++ b/tests/console.spec.ts @@ -1,5 +1,5 @@ import { test, expect, Page, Locator } from '@playwright/test'; -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; import { generateVarName, pasteInMonaco, makeTableCommand } from './utils'; let page: Page; @@ -21,7 +21,7 @@ test.afterAll(async () => { test.describe('console input tests', () => { test('print commands get logged', async ({ browserName }) => { - const message = `Hello ${browserName} ${shortid()}!`; + const message = `Hello ${browserName} ${nanoid()}!`; const command = `print("${message}")`; await pasteInMonaco(consoleInput, command); diff --git a/tests/notebook.spec.ts b/tests/notebook.spec.ts index 64008e0daa..daf3793e65 100644 --- a/tests/notebook.spec.ts +++ b/tests/notebook.spec.ts @@ -1,12 +1,13 @@ import { test, expect } from '@playwright/test'; -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; import { pasteInMonaco } from './utils'; // keep this as serial becomes it runs commands test.describe.configure({ mode: 'serial' }); test('test creating a file, saving it, reloading the page, closing it, re-opening it, running it, then deleting it', async ({ - page, browserName + page, + browserName, }) => { await page.goto(''); @@ -19,7 +20,7 @@ test('test creating a file, saving it, reloading the page, closing it, re-openin // Click editor container await page.locator('.editor-container').click(); - const message = `Hello notebook ${browserName} ${shortid()}!`; + const message = `Hello notebook ${browserName} ${nanoid()}!`; const command = `print("${message}")`; await pasteInMonaco(page.locator('.editor-container'), command); @@ -28,7 +29,7 @@ test('test creating a file, saving it, reloading the page, closing it, re-openin await page.locator('[aria-label="Save"]').click(); // Generate a unique filename so it doesn't conflict with any previously created files - const filename = `__playwright_test${shortid()}.py`; + const filename = `__playwright_test${nanoid()}.py`; // Fill id=file-name-input await page.locator('id=file-name-input').fill(filename); diff --git a/tests/utils.ts b/tests/utils.ts index 5ab1be2371..a3b964dac3 100644 --- a/tests/utils.ts +++ b/tests/utils.ts @@ -7,7 +7,7 @@ import { webkit, } from '@playwright/test'; import os from 'node:os'; -import shortid from 'shortid'; +import { nanoid } from 'nanoid'; export const HIDE_FROM_E2E_TESTS_CLASS = 'hide-from-e2e-tests'; @@ -134,7 +134,7 @@ export function generateVarName(prefix = 'v'): string { // Don't allow a `-` in variable names let id: string; do { - id = shortid(); + id = nanoid(); } while (id.includes('-')); return `${prefix}_${id}`; } From f82218699fd1898877f7364efb72251aec909158 Mon Sep 17 00:00:00 2001 From: Akshat Jawne Date: Fri, 17 May 2024 14:50:57 -0600 Subject: [PATCH 02/10] Make changes to fix e2e and unit tests failing --- packages/golden-layout/karma.conf.cjs | 1 + tests/utils.ts | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/golden-layout/karma.conf.cjs b/packages/golden-layout/karma.conf.cjs index 6e3d414805..e0c0bb0103 100644 --- a/packages/golden-layout/karma.conf.cjs +++ b/packages/golden-layout/karma.conf.cjs @@ -21,6 +21,7 @@ module.exports = function (config) { preprocessors: { // '../src/**': 'coverage' './test/helper.js': ['browserify'], + nanoid: ['browserify'], }, browserify: { diff --git a/tests/utils.ts b/tests/utils.ts index a3b964dac3..e48e2c6223 100644 --- a/tests/utils.ts +++ b/tests/utils.ts @@ -7,7 +7,6 @@ import { webkit, } from '@playwright/test'; import os from 'node:os'; -import { nanoid } from 'nanoid'; export const HIDE_FROM_E2E_TESTS_CLASS = 'hide-from-e2e-tests'; @@ -125,6 +124,19 @@ export async function openPlot( } } +/** + * Generate a unique Id + * @param length Length to give id + * @returns A unique valid id + */ +function generateId(length = 21) { + let id = ''; + for (let i = 0; i < length; i += 1) { + id += Math.random().toString(36).substr(2, 1); + } + return id; +} + /** * Generate a unique python variable name * @param prefix Prefix to give the variable name @@ -134,7 +146,7 @@ export function generateVarName(prefix = 'v'): string { // Don't allow a `-` in variable names let id: string; do { - id = nanoid(); + id = generateId(); } while (id.includes('-')); return `${prefix}_${id}`; } From 8996bc75eadfed30016e147506a4b0c5a3145087 Mon Sep 17 00:00:00 2001 From: Akshat Jawne Date: Fri, 17 May 2024 14:56:17 -0600 Subject: [PATCH 03/10] Use generateId function in other spec files --- tests/console.spec.ts | 10 +++++++--- tests/notebook.spec.ts | 7 +++---- tests/utils.ts | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/tests/console.spec.ts b/tests/console.spec.ts index 0ce21c401c..8681712784 100644 --- a/tests/console.spec.ts +++ b/tests/console.spec.ts @@ -1,6 +1,10 @@ import { test, expect, Page, Locator } from '@playwright/test'; -import { nanoid } from 'nanoid'; -import { generateVarName, pasteInMonaco, makeTableCommand } from './utils'; +import { + generateVarName, + pasteInMonaco, + makeTableCommand, + generateId, +} from './utils'; let page: Page; let consoleInput: Locator; @@ -21,7 +25,7 @@ test.afterAll(async () => { test.describe('console input tests', () => { test('print commands get logged', async ({ browserName }) => { - const message = `Hello ${browserName} ${nanoid()}!`; + const message = `Hello ${browserName} ${generateId()}!`; const command = `print("${message}")`; await pasteInMonaco(consoleInput, command); diff --git a/tests/notebook.spec.ts b/tests/notebook.spec.ts index daf3793e65..7f7f8ed6da 100644 --- a/tests/notebook.spec.ts +++ b/tests/notebook.spec.ts @@ -1,6 +1,5 @@ import { test, expect } from '@playwright/test'; -import { nanoid } from 'nanoid'; -import { pasteInMonaco } from './utils'; +import { generateId, pasteInMonaco } from './utils'; // keep this as serial becomes it runs commands test.describe.configure({ mode: 'serial' }); @@ -20,7 +19,7 @@ test('test creating a file, saving it, reloading the page, closing it, re-openin // Click editor container await page.locator('.editor-container').click(); - const message = `Hello notebook ${browserName} ${nanoid()}!`; + const message = `Hello notebook ${browserName} ${generateId()}!`; const command = `print("${message}")`; await pasteInMonaco(page.locator('.editor-container'), command); @@ -29,7 +28,7 @@ test('test creating a file, saving it, reloading the page, closing it, re-openin await page.locator('[aria-label="Save"]').click(); // Generate a unique filename so it doesn't conflict with any previously created files - const filename = `__playwright_test${nanoid()}.py`; + const filename = `__playwright_test${generateId()}.py`; // Fill id=file-name-input await page.locator('id=file-name-input').fill(filename); diff --git a/tests/utils.ts b/tests/utils.ts index e48e2c6223..ea520c7ae5 100644 --- a/tests/utils.ts +++ b/tests/utils.ts @@ -129,7 +129,7 @@ export async function openPlot( * @param length Length to give id * @returns A unique valid id */ -function generateId(length = 21) { +export function generateId(length = 21): string { let id = ''; for (let i = 0; i < length; i += 1) { id += Math.random().toString(36).substr(2, 1); From 4db4d1f4661dc77d2b19357049e873964a4c16ca Mon Sep 17 00:00:00 2001 From: Akshat Jawne Date: Fri, 17 May 2024 15:53:57 -0600 Subject: [PATCH 04/10] Try different name for nanoid in preprocessors object --- packages/golden-layout/karma.conf.cjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/golden-layout/karma.conf.cjs b/packages/golden-layout/karma.conf.cjs index e0c0bb0103..466c139fcc 100644 --- a/packages/golden-layout/karma.conf.cjs +++ b/packages/golden-layout/karma.conf.cjs @@ -21,7 +21,7 @@ module.exports = function (config) { preprocessors: { // '../src/**': 'coverage' './test/helper.js': ['browserify'], - nanoid: ['browserify'], + './node_modules/nanoid/nanoid.js': ['browserify'], }, browserify: { From 9f038bb89ff6ed7aed49ae85bf109228e1ed2e94 Mon Sep 17 00:00:00 2001 From: Akshat Jawne Date: Fri, 17 May 2024 16:04:04 -0600 Subject: [PATCH 05/10] Try string nanoid format --- packages/golden-layout/karma.conf.cjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/golden-layout/karma.conf.cjs b/packages/golden-layout/karma.conf.cjs index 466c139fcc..07c292285a 100644 --- a/packages/golden-layout/karma.conf.cjs +++ b/packages/golden-layout/karma.conf.cjs @@ -21,7 +21,7 @@ module.exports = function (config) { preprocessors: { // '../src/**': 'coverage' './test/helper.js': ['browserify'], - './node_modules/nanoid/nanoid.js': ['browserify'], + 'nanoid': ['browserify'], }, browserify: { From 64ae1483a852420ff2ca232c220694ddedc0e883 Mon Sep 17 00:00:00 2001 From: Akshat Jawne Date: Tue, 21 May 2024 07:21:50 -0600 Subject: [PATCH 06/10] Add babelify as a dev dependency and transform --- packages/golden-layout/karma.conf.cjs | 6 ++++-- packages/golden-layout/package.json | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/golden-layout/karma.conf.cjs b/packages/golden-layout/karma.conf.cjs index 07c292285a..7f9f12c74e 100644 --- a/packages/golden-layout/karma.conf.cjs +++ b/packages/golden-layout/karma.conf.cjs @@ -21,11 +21,13 @@ module.exports = function (config) { preprocessors: { // '../src/**': 'coverage' './test/helper.js': ['browserify'], - 'nanoid': ['browserify'], + nanoid: ['browserify'], }, browserify: { - plugin: ['esmify'], + transform: [ + ['babelify', { presets: ['@babel/preset-env'], global: true }], + ], // ignored because it doesn't understand the scss import in GoldenLayoutThemeExport configure: function (bundle) { bundle.on('prebundle', function () { diff --git a/packages/golden-layout/package.json b/packages/golden-layout/package.json index aa6b920bc3..f132ed7c20 100644 --- a/packages/golden-layout/package.json +++ b/packages/golden-layout/package.json @@ -50,8 +50,8 @@ "access": "public" }, "devDependencies": { + "babelify": "^10.0.0", "browserify": "^17.0.0", - "esmify": "^2.1.1", "karma-browserify": "^8.1.0", "watchify": "^4.0.0" } From 7959a0829d92c185ce0fe0be9d26ca489dbe7277 Mon Sep 17 00:00:00 2001 From: Akshat Jawne Date: Tue, 21 May 2024 08:35:44 -0600 Subject: [PATCH 07/10] Fix sync of package.json and package-lock.json --- package-lock.json | 530 ++-------------------------------------------- 1 file changed, 15 insertions(+), 515 deletions(-) diff --git a/package-lock.json b/package-lock.json index fbf6b7ec93..ba92a56ae5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9706,78 +9706,6 @@ "version": "2.2.0", "license": "Apache-2.0" }, - "node_modules/babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha512-XqYMR2dfdGMW+hd0IUZ2PwK+fGeFkOxZJ0wY+JaQAHzt1Zx8LcvpiZD2NiGkEG8qx0CfkAOr5xt76d1e8vG90g==", - "dev": true, - "dependencies": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - } - }, - "node_modules/babel-code-frame/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/babel-code-frame/node_modules/ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/babel-code-frame/node_modules/chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", - "dev": true, - "dependencies": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/babel-code-frame/node_modules/js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha512-RjTcuD4xjtthQkaWH7dFlH85L+QaVtSoOyGdZ3g6HFhS9dFNDfLyqgm2NFe2X6cQpeFmt0452FJjFG5UameExg==", - "dev": true - }, - "node_modules/babel-code-frame/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/babel-code-frame/node_modules/supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/babel-jest": { "version": "29.3.1", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.3.1.tgz", @@ -9854,15 +9782,6 @@ "node": ">=8" } }, - "node_modules/babel-messages": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", - "integrity": "sha512-Bl3ZiA+LjqaMtNYopA9TYE9HP1tQ+E5dLxE0XrAzcIJeK2UqF0/EaqXwBn9esd4UmTfEab+P+UYQ1GnioFIb/w==", - "dev": true, - "dependencies": { - "babel-runtime": "^6.22.0" - } - }, "node_modules/babel-plugin-add-import-extension": { "version": "1.6.0", "license": "MIT", @@ -9873,15 +9792,6 @@ "@babel/core": ">=7.0.0" } }, - "node_modules/babel-plugin-import-to-require": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-import-to-require/-/babel-plugin-import-to-require-1.0.0.tgz", - "integrity": "sha512-dc843CwrFivjO8AVgxcHvxl0cb7J7Ed8ZGFP8+PjH3X1CnyzYtAU1WL1349m9Wc/+oqk4ETx2+cIEO2jlp3XyQ==", - "dev": true, - "dependencies": { - "babel-template": "^6.26.0" - } - }, "node_modules/babel-plugin-istanbul": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", @@ -10057,104 +9967,16 @@ "babel-plugin-transform-react-remove-prop-types": "^0.4.24" } }, - "node_modules/babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==", - "dev": true, - "dependencies": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - } - }, - "node_modules/babel-runtime/node_modules/regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", - "dev": true - }, - "node_modules/babel-template": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", - "integrity": "sha512-PCOcLFW7/eazGUKIoqH97sO9A2UYMahsn/yRQ7uOk37iutwjq7ODtcTNF+iFDSHNfkctqsLRjLP7URnOx0T1fg==", - "dev": true, - "dependencies": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" - } - }, - "node_modules/babel-traverse": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", - "integrity": "sha512-iSxeXx7apsjCHe9c7n8VtRXGzI2Bk1rBSOJgCCjfyXb6v1aCqE1KSEpq/8SXuVN8Ka/Rh1WDTF0MDzkvTA4MIA==", - "dev": true, - "dependencies": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" - } - }, - "node_modules/babel-traverse/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/babel-traverse/node_modules/globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/babel-traverse/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/babel-types": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", - "integrity": "sha512-zhe3V/26rCWsEZK8kZN+HaQj5yQ1CilTObixFzKW1UWjqG7618Twz6YEsCnjfg5gBcJh02DrpCkS9h98ZqDY+g==", - "dev": true, - "dependencies": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" - } - }, - "node_modules/babel-types/node_modules/to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha512-lxrWP8ejsq+7E3nNjwYmUBMAgjMTZoTI+sdBOpvNyijeDLa29LUn9QaoXAHv4+Z578hbmHHJKZknzxVtvo77og==", + "node_modules/babelify": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/babelify/-/babelify-10.0.0.tgz", + "integrity": "sha512-X40FaxyH7t3X+JFAKvb1H9wooWKLRCi8pg3m8poqtdZaIng+bjzp9RvKQCvRjF9isHiPkXspbbXT/zwXLtwgwg==", "dev": true, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", - "dev": true, - "bin": { - "babylon": "bin/babylon.js" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, "node_modules/bail": { @@ -11734,14 +11556,6 @@ "node": ">= 0.6" } }, - "node_modules/core-js": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", - "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", - "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.", - "dev": true, - "hasInstallScript": true - }, "node_modules/core-js-compat": { "version": "3.26.1", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.26.1.tgz", @@ -14149,49 +13963,6 @@ "node": ">=6" } }, - "node_modules/esmify": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/esmify/-/esmify-2.1.1.tgz", - "integrity": "sha512-GyOVgjG7sNyYB5Mbo15Ll4aGrcXZzZ3LI22rbLOjCI7L/wYelzQpBHRZkZkqbPNZ/QIRilcaHqzgNCLcEsi1lQ==", - "dev": true, - "dependencies": { - "@babel/core": "^7.2.2", - "@babel/plugin-syntax-async-generators": "^7.2.0", - "@babel/plugin-syntax-dynamic-import": "^7.2.0", - "@babel/plugin-syntax-object-rest-spread": "^7.2.0", - "@babel/plugin-transform-modules-commonjs": "^7.2.0", - "babel-plugin-import-to-require": "^1.0.0", - "cached-path-relative": "^1.0.2", - "concat-stream": "^1.6.2", - "duplexer2": "^0.1.4", - "through2": "^2.0.5" - } - }, - "node_modules/esmify/node_modules/concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "engines": [ - "node >= 0.8" - ], - "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "node_modules/esmify/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, "node_modules/esniff": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", @@ -15531,27 +15302,6 @@ "node": ">= 0.4.0" } }, - "node_modules/has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", - "dev": true, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-ansi/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/has-bigints": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", @@ -16359,15 +16109,6 @@ "tslib": "^2.4.0" } }, - "node_modules/invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "dev": true, - "dependencies": { - "loose-envify": "^1.0.0" - } - }, "node_modules/ip-address": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", @@ -29504,8 +29245,8 @@ "jquery": "^3.6.0" }, "devDependencies": { + "babelify": "^10.0.0", "browserify": "^17.0.0", - "esmify": "^2.1.1", "karma-browserify": "^8.1.0", "watchify": "^4.0.0" }, @@ -31761,8 +31502,8 @@ "version": "file:packages/golden-layout", "requires": { "@deephaven/components": "file:../components", + "babelify": "^10.0.0", "browserify": "^17.0.0", - "esmify": "^2.1.1", "jquery": "^3.6.0", "karma-browserify": "^8.1.0", "watchify": "^4.0.0" @@ -37543,65 +37284,6 @@ "axobject-query": { "version": "2.2.0" }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha512-XqYMR2dfdGMW+hd0IUZ2PwK+fGeFkOxZJ0wY+JaQAHzt1Zx8LcvpiZD2NiGkEG8qx0CfkAOr5xt76d1e8vG90g==", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha512-RjTcuD4xjtthQkaWH7dFlH85L+QaVtSoOyGdZ3g6HFhS9dFNDfLyqgm2NFe2X6cQpeFmt0452FJjFG5UameExg==", - "dev": true - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", - "dev": true - } - } - }, "babel-jest": { "version": "29.3.1", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.3.1.tgz", @@ -37653,30 +37335,12 @@ } } }, - "babel-messages": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", - "integrity": "sha512-Bl3ZiA+LjqaMtNYopA9TYE9HP1tQ+E5dLxE0XrAzcIJeK2UqF0/EaqXwBn9esd4UmTfEab+P+UYQ1GnioFIb/w==", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, "babel-plugin-add-import-extension": { "version": "1.6.0", "requires": { "@babel/helper-plugin-utils": "^7.14.5" } }, - "babel-plugin-import-to-require": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-import-to-require/-/babel-plugin-import-to-require-1.0.0.tgz", - "integrity": "sha512-dc843CwrFivjO8AVgxcHvxl0cb7J7Ed8ZGFP8+PjH3X1CnyzYtAU1WL1349m9Wc/+oqk4ETx2+cIEO2jlp3XyQ==", - "dev": true, - "requires": { - "babel-template": "^6.26.0" - } - }, "babel-plugin-istanbul": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", @@ -37819,102 +37483,12 @@ "babel-plugin-transform-react-remove-prop-types": "^0.4.24" } }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==", - "dev": true, - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - }, - "dependencies": { - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", - "dev": true - } - } - }, - "babel-template": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", - "integrity": "sha512-PCOcLFW7/eazGUKIoqH97sO9A2UYMahsn/yRQ7uOk37iutwjq7ODtcTNF+iFDSHNfkctqsLRjLP7URnOx0T1fg==", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" - } - }, - "babel-traverse": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", - "integrity": "sha512-iSxeXx7apsjCHe9c7n8VtRXGzI2Bk1rBSOJgCCjfyXb6v1aCqE1KSEpq/8SXuVN8Ka/Rh1WDTF0MDzkvTA4MIA==", - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - } - } - }, - "babel-types": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", - "integrity": "sha512-zhe3V/26rCWsEZK8kZN+HaQj5yQ1CilTObixFzKW1UWjqG7618Twz6YEsCnjfg5gBcJh02DrpCkS9h98ZqDY+g==", + "babelify": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/babelify/-/babelify-10.0.0.tgz", + "integrity": "sha512-X40FaxyH7t3X+JFAKvb1H9wooWKLRCi8pg3m8poqtdZaIng+bjzp9RvKQCvRjF9isHiPkXspbbXT/zwXLtwgwg==", "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" - }, - "dependencies": { - "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha512-lxrWP8ejsq+7E3nNjwYmUBMAgjMTZoTI+sdBOpvNyijeDLa29LUn9QaoXAHv4+Z578hbmHHJKZknzxVtvo77og==", - "dev": true - } - } - }, - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", - "dev": true + "requires": {} }, "bail": { "version": "2.0.2", @@ -39108,12 +38682,6 @@ "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", "dev": true }, - "core-js": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", - "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", - "dev": true - }, "core-js-compat": { "version": "3.26.1", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.26.1.tgz", @@ -40852,48 +40420,6 @@ "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz", "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==" }, - "esmify": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/esmify/-/esmify-2.1.1.tgz", - "integrity": "sha512-GyOVgjG7sNyYB5Mbo15Ll4aGrcXZzZ3LI22rbLOjCI7L/wYelzQpBHRZkZkqbPNZ/QIRilcaHqzgNCLcEsi1lQ==", - "dev": true, - "requires": { - "@babel/core": "^7.2.2", - "@babel/plugin-syntax-async-generators": "^7.2.0", - "@babel/plugin-syntax-dynamic-import": "^7.2.0", - "@babel/plugin-syntax-object-rest-spread": "^7.2.0", - "@babel/plugin-transform-modules-commonjs": "^7.2.0", - "babel-plugin-import-to-require": "^1.0.0", - "cached-path-relative": "^1.0.2", - "concat-stream": "^1.6.2", - "duplexer2": "^0.1.4", - "through2": "^2.0.5" - }, - "dependencies": { - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - } - } - }, "esniff": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", @@ -41917,23 +41443,6 @@ "function-bind": "^1.1.1" } }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true - } - } - }, "has-bigints": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", @@ -42524,15 +42033,6 @@ "tslib": "^2.4.0" } }, - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - }, "ip-address": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", From a4d668c028eb6d67ed3db205833e87f740fa08ef Mon Sep 17 00:00:00 2001 From: Akshat Jawne Date: Tue, 21 May 2024 14:44:45 -0600 Subject: [PATCH 08/10] Add nanoid to dev dependencies --- packages/golden-layout/karma.conf.cjs | 1 - packages/golden-layout/package.json | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/golden-layout/karma.conf.cjs b/packages/golden-layout/karma.conf.cjs index 7f9f12c74e..956854223a 100644 --- a/packages/golden-layout/karma.conf.cjs +++ b/packages/golden-layout/karma.conf.cjs @@ -21,7 +21,6 @@ module.exports = function (config) { preprocessors: { // '../src/**': 'coverage' './test/helper.js': ['browserify'], - nanoid: ['browserify'], }, browserify: { diff --git a/packages/golden-layout/package.json b/packages/golden-layout/package.json index f132ed7c20..8534cdfa14 100644 --- a/packages/golden-layout/package.json +++ b/packages/golden-layout/package.json @@ -53,6 +53,7 @@ "babelify": "^10.0.0", "browserify": "^17.0.0", "karma-browserify": "^8.1.0", + "nanoid": "^5.0.7", "watchify": "^4.0.0" } } From c173f98ac7249b2ba2bab507f990f03ce775e08f Mon Sep 17 00:00:00 2001 From: Akshat Jawne Date: Tue, 21 May 2024 14:53:25 -0600 Subject: [PATCH 09/10] make nanoid a dependency --- packages/golden-layout/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/golden-layout/package.json b/packages/golden-layout/package.json index 8534cdfa14..04af54781c 100644 --- a/packages/golden-layout/package.json +++ b/packages/golden-layout/package.json @@ -11,7 +11,8 @@ "type": "module", "dependencies": { "@deephaven/components": "file:../components", - "jquery": "^3.6.0" + "jquery": "^3.6.0", + "nanoid": "^5.0.7" }, "peerDependencies": { "react": ">=16.8.0", @@ -53,7 +54,6 @@ "babelify": "^10.0.0", "browserify": "^17.0.0", "karma-browserify": "^8.1.0", - "nanoid": "^5.0.7", "watchify": "^4.0.0" } } From 0d849b1096c89bd74ae331249b0b9cc2f553aa4e Mon Sep 17 00:00:00 2001 From: Akshat Jawne Date: Thu, 23 May 2024 13:30:22 -0600 Subject: [PATCH 10/10] remove shortid types from package.json --- package-lock.json | 14 +++----------- package.json | 1 - 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 29593ff609..af7f220517 100644 --- a/package-lock.json +++ b/package-lock.json @@ -94,7 +94,6 @@ "@types/react-virtualized-auto-sizer": "^1.0.1", "@types/react-window": "^1.8.5", "@types/shell-quote": "^1.7.1", - "@types/shortid": "0.0.29", "@vitejs/plugin-react-swc": "^3.3.0", "@vscode/codicons": "0.0.36", "chokidar-cli": "^2.1.0", @@ -8606,11 +8605,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/shortid": { - "version": "0.0.29", - "dev": true, - "license": "MIT" - }, "node_modules/@types/sizzle": { "version": "2.3.3", "dev": true, @@ -29256,7 +29250,8 @@ "license": "Apache-2.0", "dependencies": { "@deephaven/components": "file:../components", - "jquery": "^3.6.0" + "jquery": "^3.6.0", + "nanoid": "^5.0.7" }, "devDependencies": { "babelify": "^10.0.0", @@ -31520,6 +31515,7 @@ "browserify": "^17.0.0", "jquery": "^3.6.0", "karma-browserify": "^8.1.0", + "nanoid": "^5.0.7", "watchify": "^4.0.0" } }, @@ -36565,10 +36561,6 @@ "version": "1.7.1", "dev": true }, - "@types/shortid": { - "version": "0.0.29", - "dev": true - }, "@types/sizzle": { "version": "2.3.3", "dev": true diff --git a/package.json b/package.json index 37684b79f9..32c2be6017 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,6 @@ "@types/react-virtualized-auto-sizer": "^1.0.1", "@types/react-window": "^1.8.5", "@types/shell-quote": "^1.7.1", - "@types/shortid": "0.0.29", "@vitejs/plugin-react-swc": "^3.3.0", "@vscode/codicons": "0.0.36", "chokidar-cli": "^2.1.0",