Skip to content

Commit

Permalink
chore: upgrade uuid (#367)
Browse files Browse the repository at this point in the history
* chore: upgrade uuid

Upgrading uuid should solve the build issues in argo-cd#11006. As is
usual in JS land, a single upgrade has a bunch of follow-on effects,
the main one being that node needs to be upgraded to at least `14.15`
in order for this to build at all.

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>

* fix: typescript tweaks

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>

---------

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
  • Loading branch information
blakepettersson committed May 30, 2023
1 parent e918bac commit 06d0e88
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 12
node-version: 14.15
- run: yarn install
- run: yarn build-v2
2 changes: 1 addition & 1 deletion .github/workflows/build-v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 12
node-version: 14.15
- run: yarn install
- run: yarn build
- run: yarn lint
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/npm-publish-v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 12
node-version: 14.15
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
2 changes: 1 addition & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
ref: ${{ github.event.inputs.tag }}
- uses: actions/setup-node@v3
with:
node-version: 12
node-version: 14.15
- run: cd v2 && npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v12.18.4
v14.15
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"react-toastify": "^9.0.8",
"rxjs": "^7.5.6",
"typescript": "^4.8.3",
"uuid": "^9.0.0",
"xterm": "^4.18.0",
"xterm-addon-fit": "^0.5.0"
},
Expand Down Expand Up @@ -79,6 +80,7 @@
"@types/storybook__addon-actions": "^5.2.1",
"@types/storybook__addon-links": "^3.3.0",
"@types/storybook__react": "^3.0.7",
"@types/uuid": "^9.0.1",
"@types/yamljs": "^0.2.31",
"babel-loader": "^8.2.5",
"chai": "^4.3.7",
Expand Down
9 changes: 5 additions & 4 deletions src/components/autocomplete/autocomplete.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {default as classNames} from 'classnames';
import {CSSProperties, ReactNode} from 'react';
import * as React from 'react';
import * as ReactAutocomplete from 'react-autocomplete';
import ReactAutocomplete from 'react-autocomplete';

require('./autocomplete.scss');
export interface AutocompleteApi {
Expand Down Expand Up @@ -106,16 +107,16 @@ export const Autocomplete = (props: AutocompleteProps) => {
shouldItemRender={(item: AutocompleteOption, val: string) => {
return !props.filterSuggestions || item.label.toLowerCase().includes(val.toLowerCase());
}}
renderMenu={function(menuItems, _, style) {
renderMenu={function(menuItems: ReactNode[], _: string, style: CSSProperties) {
if (menuItems.length === 0) {
return <div style={{display: 'none'}} />;
}
return <div style={{...style, ...this.menuStyle, background: 'white', zIndex: 10, maxHeight: '20em'}} children={menuItems} />;
}}
getItemValue={(item) => item.label}
getItemValue={(item: any) => item.label}
items={items}
value={props.value}
renderItem={(item, isSelected) => (
renderItem={(item: any, isSelected: boolean) => (
<div className={classNames('select__option', {selected: isSelected})} key={item.label}>
{(props.renderItem && props.renderItem(item)) || item.label}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/form-field/form-field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as ReactForm from 'react-form';

import { Select as ArgoSelect, SelectOption, SelectProps } from '../select/select';

const uuid = require('uuid/v1');
import { v1 as uuid } from 'uuid';

require('./form-field.scss');

Expand Down
2 changes: 1 addition & 1 deletion src/components/ticker.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as moment from 'moment';
import moment from 'moment';
import * as React from 'react';
import {interval, Subscription} from 'rxjs';

Expand Down
2 changes: 1 addition & 1 deletion src/setupTests.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {configure } from 'enzyme';
import * as Adapter from 'enzyme-adapter-react-16';
import Adapter from 'enzyme-adapter-react-16';

configure({ adapter: new Adapter() });
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"module": "commonjs",
"target": "es6",
"jsx": "react",
"esModuleInterop": true,
"experimentalDecorators": true,
"noUnusedLocals": true,
"declaration": true,
Expand Down
2 changes: 1 addition & 1 deletion v2/utils/utils.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as moment from 'moment';
import moment from 'moment';
import * as React from 'react';

export interface Error {
Expand Down
10 changes: 10 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3988,6 +3988,11 @@
resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d"
integrity sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==

"@types/uuid@^9.0.1":
version "9.0.1"
resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-9.0.1.tgz#98586dc36aee8dacc98cc396dbca8d0429647aa6"
integrity sha512-rFT3ak0/2trgvp4yYZo5iKFEPsET7vKydKF+VRCxlQ9bpheehyAJH89dAkaLEq/j/RZXJIqcgsmPJKUP1Z28HA==

"@types/webpack-env@*", "@types/webpack-env@^1.16.0":
version "1.16.2"
resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.16.2.tgz#8db514b059c1b2ae14ce9d7bb325296de6a9a0fa"
Expand Down Expand Up @@ -17699,6 +17704,11 @@ uuid@^8.3.2:
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==

uuid@^9.0.0:
version "9.0.0"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5"
integrity sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==

v8-compile-cache-lib@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf"
Expand Down

0 comments on commit 06d0e88

Please sign in to comment.