Skip to content

Commit

Permalink
chore(node): Upgrade to node 18 (#3347)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Upgrade to node 18
  • Loading branch information
greg-in-a-box authored Jun 8, 2023
1 parent 80c795a commit cbb3840
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 39 deletions.
32 changes: 9 additions & 23 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@

aliases:
- &curl-install
name: Install curl
command: apt-get update && apt-get install curl -y

- &yarn
name: Installing dependencies
command: yarn install --non-interactive --frozen-lockfile --cache-folder ~/.cache/yarn
Expand All @@ -14,21 +17,22 @@ aliases:

- &restore-yarn-cache
keys:
- yarn-{{ checksum "yarn.lock" }}-{{ checksum ".circleci/config.yml" }}
- yarn-{{ arch }}-{{ checksum "yarn.lock" }}-{{ checksum ".circleci/config.yml" }}

- &save-yarn-cache
paths:
- node_modules
- ~/.npm
- ~/.cache
key: yarn-{{ checksum "yarn.lock" }}-{{ checksum ".circleci/config.yml" }}
key: yarn-{{ arch }}-{{ checksum "yarn.lock" }}-{{ checksum ".circleci/config.yml" }}

defaults: &defaults
working_directory: ~/buie
docker:
- image: cypress/base:14.19.0
- image: cypress/included:12.13.0

version: 2

jobs:
lint:
<<: *defaults
Expand All @@ -39,6 +43,7 @@ jobs:
- save-cache: *save-yarn-cache
- run: *clean
- run: *i18n
- run: *curl-install
- run:
name: Commit lint
command: ./scripts/commitlint.sh
Expand Down Expand Up @@ -83,25 +88,6 @@ jobs:
name: E2E tests
command: yarn test:e2e

visual-tests:
<<: *defaults
steps:
- checkout
- restore-cache: *restore-yarn-cache
- run: *yarn
- save-cache: *save-yarn-cache
- run:
name: Visual tests
command: yarn test:visuals
- run:
name: Copy diff artifacts
command: |
mkdir -p /tmp/visual-diff-artifacts
find src/. -name '*-diff.png' -exec cp {} /tmp/visual-diff-artifacts/ \;
when: on_fail
- store_artifacts:
path: /tmp/visual-diff-artifacts

workflows:
version: 2
lint_test_build:
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/fermium
lts/hydrogen
1 change: 1 addition & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
registry "https://registry.yarnpkg.com"
--install.ignore-optional true
2 changes: 1 addition & 1 deletion DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Our development setup assumes a LINUX/BSD environemnt.

## Project Setup

1. Install Node v14.
1. Install Node v18.
2. Install Yarn package manager `https://yarnpkg.com/en/docs/install` v1.10 or higher.
3. Fork the upstream repo `https://github.com/box/box-ui-elements` via github.
4. Clone your fork locally `git clone [email protected]:[YOUR GITHUB USERNAME]/box-ui-elements.git`.
Expand Down
23 changes: 13 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,18 @@
"build": "yarn build:dev:dist",
"build:ci:es": "yarn build:prod:es",
"build:ci:dist": "LANGUAGE=en-US ENTRY=explorer REACT=true yarn build:prod:dist",
"build:dev:dist": "LANGUAGE=en-US BABEL_ENV=development NODE_ENV=development webpack --config scripts/webpack.config.js --mode development --progress --colors",
"build:dev:dist": "LANGUAGE=en-US BABEL_ENV=development NODE_ENV=development NODE_OPTIONS=--openssl-legacy-provider webpack --config scripts/webpack.config.js --mode development --progress --colors",
"build:dev:es": "BABEL_ENV=development NODE_ENV=development yarn build:es --copy-files --source-maps inline --watch --ignore \"**/*.d.ts,**/__tests__/**,**/__mocks__/**\"",
"build:es": "babel src --extensions '.js,.tsx,.ts' --out-dir es",
"build:i18n": "props2es",
"build:npm": "npm-run-all clean build:i18n build:prod:npm build:prod:es",
"build:prod:analyze": "BUNDLE_ANALYSIS=true npm-run-all setup build:prod:npm",
"build:prod:es": "BABEL_ENV=npm NODE_ENV=production yarn build:es --source-maps --ignore \"**/*.d.ts,**/__tests__/**,**/__mocks__/**\"",
"build:prod:dist": "NODE_ENV=production webpack --config scripts/webpack.config.js --mode production",
"build:prod:examples": "LANGUAGE=en-US REACT=true NODE_ENV=production node --max_old_space_size=8192 node_modules/react-styleguidist/bin/styleguidist.js build --config scripts/styleguide.config.js --mode production",
"build:prod:dist": "NODE_ENV=production NODE_OPTIONS=--openssl-legacy-provider webpack --config scripts/webpack.config.js --mode production",
"build:prod:examples": "LANGUAGE=en-US REACT=true NODE_ENV=production NODE_OPTIONS=--openssl-legacy-provider node --max_old_space_size=8192 node_modules/react-styleguidist/bin/styleguidist.js build --config scripts/styleguide.config.js --mode production",
"build:prod:npm": "BABEL_ENV=production OUTPUT=dist LANGUAGE=en-US REACT=true yarn build:prod:dist",
"build:prod:storybook": "LANGUAGE=en-US REACT=true BROWSERSLIST_ENV=production BABEL_ENV=development NODE_ENV=development build-storybook -c .storybook -o styleguide/storybook",
"build:sync": "LANGUAGE=en-US BABEL_ENV=development NODE_ENV=development RSYNC=true webpack --config scripts/webpack.config.js --mode development",
"build:prod:storybook": "LANGUAGE=en-US REACT=true BROWSERSLIST_ENV=production BABEL_ENV=development NODE_ENV=development NODE_OPTIONS=--openssl-legacy-provider build-storybook -c .storybook -o styleguide/storybook",
"build:sync": "LANGUAGE=en-US BABEL_ENV=development NODE_ENV=development NODE_OPTIONS=--openssl-legacy-provider RSYNC=true webpack --config scripts/webpack.config.js --mode development",
"build:assets": "./scripts/asset-import/cli.js",
"clean": "rm -rf dist es i18n/json i18n/*.js reports styleguide",
"copy:flow": "flow-copy-source --ignore \"**/__tests__/**\" --ignore \"**/__mocks__/**\" --ignore \"**/*.ts\" ./src ./es && copyfiles './src/**/*.js.flow' es --up 1",
Expand All @@ -72,13 +72,13 @@
"release:latest": "DIST=latest BRANCH=master ./scripts/release.sh",
"release:next": "DIST=next BRANCH=next ./scripts/release.sh",
"release:cdn": "yarn setup; node ./scripts/prod.js",
"setup": "yarn install --frozen-lockfile --ignore-optional; npm-run-all clean build:i18n",
"setup": "yarn install --frozen-lockfile; npm-run-all clean build:i18n",
"start": "npm-run-all setup start:examples",
"start:dev": "yarn setup; LANGUAGE=en-US BABEL_ENV=development NODE_ENV=development node --max_old_space_size=8192 node_modules/webpack-dev-server/bin/webpack-dev-server.js --config scripts/webpack.config.js --mode development",
"start:examples": "EXAMPLES=true LANGUAGE=en-US REACT=true BABEL_ENV=development NODE_ENV=development node --max_old_space_size=8192 node_modules/react-styleguidist/bin/styleguidist.js server --config scripts/styleguide.config.js --mode development",
"start:dev": "yarn setup; LANGUAGE=en-US BABEL_ENV=development NODE_ENV=development NODE_OPTIONS=--openssl-legacy-provider node --max_old_space_size=8192 node_modules/webpack-dev-server/bin/webpack-dev-server.js --config scripts/webpack.config.js --mode development",
"start:examples": "EXAMPLES=true LANGUAGE=en-US REACT=true BABEL_ENV=development NODE_ENV=development NODE_OPTIONS=--openssl-legacy-provider node --max_old_space_size=8192 node_modules/react-styleguidist/bin/styleguidist.js server --config scripts/styleguide.config.js --mode development",
"start:examples:legacy": "BROWSERSLIST_ENV=production yarn start:examples",
"start:npm": "yarn setup; yarn build:dev:es",
"start:storybook": "LANGUAGE=en-US REACT=true BABEL_ENV=development NODE_ENV=development start-storybook -p 6061",
"start:storybook": "LANGUAGE=en-US REACT=true BABEL_ENV=development NODE_ENV=development NODE_OPTIONS=--openssl-legacy-provider start-storybook -p 6061",
"start:storybook:ci": "yarn start:storybook --ci",
"start:storybook:legacy": "BROWSERSLIST_ENV=production yarn start:storybook",
"test": "BABEL_ENV=test NODE_ENV=test yarn jest -c scripts/jest/jest.config.js",
Expand Down Expand Up @@ -119,7 +119,7 @@
}
},
"engines": {
"node": ">=14.0.0 <15.0.0",
"node": ">=18.x",
"yarn": ">=1.10.0"
},
"devDependencies": {
Expand Down Expand Up @@ -373,5 +373,8 @@
"@hapi/address": "Version 2.1.2+ requires a polyfill for TextEncoder. Pinning to version 2.1.1 prevents IE11 from breaking.",
"react-tether": "Version 2.x has too many breaking changes and requires forwardRef on all components"
}
},
"resolutions": {
"ip": "1.1.8"
}
}
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15111,10 +15111,10 @@ ip-regex@^3.0.0:
resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-3.0.0.tgz#0a934694b4066558c46294244a23cc33116bf732"
integrity sha512-T8wDtjy+Qf2TAPDQmBp0eGKJ8GavlWlUnamr3wRn6vvdZlKVuJXXMlSncYFRYgVHOM3If5NR1H4+OvVQU9Idvg==

ip@^1.1.0, ip@^1.1.5:
version "1.1.5"
resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a"
integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=
ip@1.1.8, ip@^1.1.0, ip@^1.1.5:
version "1.1.8"
resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.8.tgz#ae05948f6b075435ed3307acce04629da8cdbf48"
integrity sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==

[email protected]:
version "1.8.0"
Expand Down

0 comments on commit cbb3840

Please sign in to comment.