Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop official support for Node 14/16 #839

Merged
merged 14 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .babelrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
jobs:
build:
docker:
- image: cimg/node:16.18.0
- image: cimg/node:lts
resource_class: xlarge

working_directory: ~/repo
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
'plugin:@typescript-eslint/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:json/recommended',
'plugin:json/recommended-with-comments',
'plugin:react/recommended',
],
parser: '@typescript-eslint/parser',
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/chromatic-main-and-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: lts/*
ghengeveld marked this conversation as resolved.
Show resolved Hide resolved
- name: install
run: yarn install --frozen-lockfile
- uses: chromaui/action@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/chromatic-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: lts/*
- name: install
run: yarn install --frozen-lockfile
- uses: chromaui/action-next@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/chromatic-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: lts/*
- name: install
run: yarn install --frozen-lockfile
- uses: chromaui/action-canary@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/smoke-test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: lts/*
- run: yarn
- run: yarn build
- uses: ./
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/smoke-test-node-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: latest
- run: yarn
- name: run chromatic via node
run: yarn ts-node ./scripts/run-via-node.ts
run: ./scripts/run-via-node.mjs
env:
LOG_LEVEL: debug
DEBUG: chromatic-cli
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/smoke-test-node14.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/smoke-test-node16.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/smoke-test-npx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: lts/*
- name: install
run: yarn && git status --porcelain
- name: prep package
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/smoke-test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: lts/*
- name: install
run: yarn
run: yarn && git status --porcelain
- name: prep package
run: node ./scripts/rename.js storybook-chromatic
run: ./scripts/rename.js storybook-chromatic
- run: yarn build
- name: run chromatic
run: npx -p . chromatic --build-script-name build-test-storybook --exit-zero-on-changes --force-rebuild
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/smoke-test-yarn-berry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: lts/*
- run: rm -rf subdir # remove conflicting subproject
- run: yarn set version berry
- name: install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/smoke-test-yarn-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: lts/*
- run: rm -rf subdir # remove conflicting subproject
- run: yarn set version canary
- name: install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/smoke-test-yarn-classic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: lts/*
- run: rm -rf subdir # remove conflicting subproject
- run: yarn set version 1.x.x
- run: yarn install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/smoke-test-yarn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: lts/*
- run: yarn
- run: yarn build
- run: yarn chromatic --build-script-name build-test-storybook --exit-zero-on-changes --force-rebuild
Expand Down
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,17 @@ Publishes your Storybook to Chromatic and kicks off tests if they're enabled.

👉 Read the [Chromatic CLI docs](https://www.chromatic.com/docs/cli)

📝 View the [Changelog](https://github.com/chromaui/chromatic-cli/blob/main/CHANGELOG.md#readme)
📝 View the [Changelog](https://github.com/chromaui/chromatic-cli/blob/main/CHANGELOG.md)

## System requirements

The Chromatic CLI (and GitHub Action) is built to run in a variety of environments. We provide support for the following platforms:

- Latest (LTS) versions of Ubuntu, Windows (Server), macOS
- Node.js Current, Active or Maintenance (LTS) versions, according to their [release schedule](https://github.com/nodejs/release#release-schedule)
- Storybook 6.5+

Other platforms/versions may work, but are not officially supported. Certain features may not be available on certain platforms/versions, even if otherwise supported.

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,4 @@ outputs:

runs:
main: action/register.js
using: node16
using: node20 # Sync with `target` in tsup.config.ts
20 changes: 6 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,38 +108,31 @@
"@actions/core": "^1.10.0",
"@actions/github": "^5.0.0",
"@antfu/ni": "^0.21.5",
"@babel/cli": "^7.14.8",
"@babel/core": "^7.15.0",
"@babel/node": "^7.15.4",
"@babel/plugin-transform-runtime": "^7.15.0",
"@babel/preset-env": "^7.15.0",
"@babel/preset-typescript": "^7.15.0",
"@babel/runtime": "^7.15.3",
"@discoveryjs/json-ext": "^0.5.7",
"@storybook/addon-essentials": "^6.5.6",
"@storybook/builder-webpack5": "^6.5.6",
"@storybook/csf-tools": "^7.0.12",
"@storybook/linter-config": "^3.1.2",
"@storybook/manager-webpack5": "^6.5.6",
"@storybook/react": "^6.5.6",
"@tsconfig/node18": "^18.2.2",
"@types/archiver": "^5.3.1",
"@types/async-retry": "^1.4.3",
"@types/cross-spawn": "^6.0.2",
"@types/fs-extra": "^9.0.13",
"@types/jsonfile": "^6.0.1",
"@types/listr": "^0.14.4",
"@types/node": "^14.14.25",
"@types/node": "18.x",
"@types/picomatch": "^2.3.0",
"@types/progress-stream": "^2.0.2",
"@types/semver": "^7.3.9",
"@typescript-eslint/eslint-plugin": "^5.59.8",
"@typescript-eslint/parser": "^5.59.8",
"@typescript-eslint/eslint-plugin": "^6.8.0",
"@typescript-eslint/parser": "^6.8.0",
"ansi-html": "0.0.8",
"any-observable": "^0.5.1",
"archiver": "^5.3.0",
"async-retry": "^1.3.3",
"auto": "^11.0.4",
"babel-preset-minify": "^0.5.1",
"chalk": "^4.1.2",
"cpy": "^8.1.2",
"cross-env": "^7.0.3",
Expand Down Expand Up @@ -189,9 +182,8 @@
"tmp-promise": "3.0.2",
"ts-dedent": "^1.0.0",
"ts-loader": "^9.2.5",
"ts-node": "^10.9.1",
"tsup": "^6.7.0",
"typescript": "^4.3.5",
"tsup": "^7.2.0",
"typescript": "^5.2.2",
"util-deprecate": "^1.0.2",
"uuid": "^8.3.2",
"vite": "^4.4.9",
Expand Down
4 changes: 3 additions & 1 deletion scripts/run-via-node.ts → scripts/run-via-node.mjs
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env node

import process from 'process';
import { run } from '../dist/node';
import { run } from '../dist/node.js';

run({
flags: {
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.eslint.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"allowJs": true,
"resolveJsonModule": true
"allowJs": true
},
"include": [
".*.js",
Expand Down
9 changes: 5 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"exclude": ["node_modules"],
"extends": "@tsconfig/node18/tsconfig.json",
"compilerOptions": {
"target": "ES6",
"module": "commonjs",
"moduleResolution": "node",
// Override module/moduleResolution since we're using tsup/esbuild
"module": "es2022",
"moduleResolution": "Bundler",
"strict": false,
"noImplicitAny": false,
"esModuleInterop": true,
"resolveJsonModule": true,
"types": ["webpack-env"]
}
Expand Down
4 changes: 2 additions & 2 deletions tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default defineConfig((options) => [
sourcemap: false,
clean: true,
platform: 'node',
target: 'node16',
target: 'node16', // Storybook still supports Node 16
},
{
entry: ['action-src/register.js'],
Expand All @@ -29,6 +29,6 @@ export default defineConfig((options) => [
sourcemap: false,
clean: true,
platform: 'node',
target: 'node16',
target: 'node20', // Sync with `runs.using` in action.yml
},
]);
Loading
Loading