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

feat: Upgrade to Node 18 [Feature Branch][JOB-62820] #1141

Merged
merged 11 commits into from
Mar 24, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
35 changes: 21 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ orbs:
references:
container_config: &container_config
docker:
- image: circleci/node:14
- image: cimg/node:18.15.0
working_directory: ~/atlantis

restore_repo: &restore_repo
Expand All @@ -19,16 +19,10 @@ references:
- v1-repo-{{ .Branch }}
- v1-repo

sum_lockfiles: &sum_lockfiles
run:
name: Sum Lockfiles
command: md5sum package-lock.json packages/*/package-lock.json > /tmp/lock-sums

restore_npm_cache: &restore_npm_cache
restore_cache:
name: Restore npm cache
keys:
- npm-cache-v1-{{ arch }}-{{ checksum "/tmp/lock-sums" }}
- npm-cache-v1

attach_workspace: &attach_workspace
Expand All @@ -44,7 +38,7 @@ references:
npm_install: &npm_install
run:
name: Install Dependencies
command: export IGNORE_OPTIONAL_DEPENDENCIES=true; npm ci --no-optional
command: export IGNORE_OPTIONAL_DEPENDENCIES=true; npm ci -omit=optional --legacy-peer-deps

github_authenticity: &github_authenticity
run:
Expand Down Expand Up @@ -74,18 +68,12 @@ jobs:
<<: *container_config
steps:
- *attach_workspace
- *sum_lockfiles
- *restore_npm_cache
- run:
name: Authenticate with npm
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/atlantis/.npmrc
- *npm_install
- *persist_to_workspace
- save_cache:
name: Save npm cache
key: npm-cache-v1-{{ arch }}-{{ checksum "/tmp/lock-sums" }}
paths:
- ~/.npm

check_for_manual_release:
<<: *container_config
Expand Down Expand Up @@ -147,6 +135,22 @@ jobs:
- *generate_base_path
- run:
command: npm run build
- *persist_to_workspace

upload_to_cloudflare:
<<: *container_config
environment:
ATLANTIS_BRANCH: << pipeline.git.branch >>
steps:
- *attach_workspace
- *generate_base_path
- run:
command: |
if [ "$ATLANTIS_BRANCH" = "master" ]; then
npx wrangler pages publish storybook-static --project-name=atlantis
else
npx wrangler pages publish storybook-static --project-name=atlantis --branch=$ATLANTIS_BRANCH
fi

release:
<<: *container_config
Expand Down Expand Up @@ -189,6 +193,9 @@ workflows:
- build_docs:
requires:
- check_for_manual_release
- upload_to_cloudflare:
requires:
- build_docs
- release:
filters:
branches:
Expand Down
1 change: 1 addition & 0 deletions .npmrc.pages
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
//registry.npmjs.org/:_authToken=${JOBBER_NPM_TOKEN}
legacy-peer-deps=true
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14
18
10 changes: 4 additions & 6 deletions .storybook/main.ts → .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import type { StorybookConfig } from "@storybook/react/types";
import * as webpack from "webpack";
const path = require("path");

const config: StorybookConfig = {
const config = {
stories: [
"../packages/**/*.stories.mdx",
"../packages/**/*.stories.@(js|jsx|ts|tsx)",
Expand All @@ -26,7 +24,7 @@ const config: StorybookConfig = {
* Separate existing rules for CSS files
*/
if (config.module?.rules) {
const matcher = (rule: webpack.RuleSetRule): boolean =>
const matcher = (rule) =>
rule.test?.toString() === "/\\.css$/";
const existingRule = config.module.rules.find(matcher);

Expand All @@ -37,15 +35,15 @@ const config: StorybookConfig = {
const atlantisCssRule = {
...existingRule,
exclude: /node_modules/,
use: (existingRule?.use as webpack.RuleSetLoader[])?.map(item => {
use: existingRule?.use?.map(item => {
let newItem = item;
if (newItem.loader?.includes("/css-loader/")) {
const modules = {
localIdentName: "[name]__[local]--[hash:base64:5]",
};
newItem = {
...newItem,
options: { ...(newItem.options as Record<any, any>), modules },
options: { ...newItem.options, modules },
};
}
return newItem;
Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ developers to quickly build beautiful and consistent interfaces for our users.

### Prerequisites

- `node@14`
- `npm@6`
- `node@18`
- `npm@9`

To install Atlantis locally for development:

Expand Down
11 changes: 8 additions & 3 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
{
"version": "independent",
"packages": ["packages/*"],
"packages": [
"packages/*"
],
"command": {
"version": {
"conventionalCommits": true,
"message": "chore(release): Publish",
"allowBranch": ["master"]
"allowBranch": [
"master"
]
},
"publish": {
"ignoreChanges": [
Expand All @@ -15,5 +19,6 @@
"CHANGELOG.md"
]
}
}
},
"useWorkspaces": true
}
Loading