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

No storybook nx old storybook #2949

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ orbs:
references:
default_env: &default_env
docker:
- image: cimg/node:16.17.0
- image: cimg/node:20.15.0
working_directory: ~/repo
environment:
IGNORE_COMMIT_MESSAGE: 'chore(release): publish'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ jobs:
steps:
- uses: Codecademy/[email protected]
with:
node-version: 16
node-version: 20
- run: yarn format:verify

lint:
runs-on: ubuntu-latest
steps:
- uses: Codecademy/[email protected]
with:
node-version: 16
node-version: 20
- run: yarn build
- run: yarn ${{ matrix.command }}

Expand Down
12 changes: 6 additions & 6 deletions .lintstagedrc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ export default {
commands.push(`yarn syncpack format`);
}

// if (micromatch.some(allChanges, 'yarn.lock')) {
// commands.push(`npx yarn-deduplicate`);
// }
if (micromatch.some(allChanges, 'yarn.lock')) {
commands.push(`npx yarn-deduplicate`);
}

const eslintExtensions = `{mdx,ts,tsx,js,jsx,json}`;
const eslintFiles = micromatch(
Expand All @@ -22,9 +22,9 @@ export default {

if (eslintFiles.length) {
commands.push(
`node_modules/@codecademy/eslint-config/bin/eslint-fix.js ${eslintFiles.join(
' '
)}`
`node_modules/@codecademy/eslint-config/bin/eslint-fix.js "${eslintFiles.join(
'" "'
)}"`
);
}

Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.17.0
18.18.2
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ node_modules
packages/gamut-icons/src/icons
packages/gamut-styles/**/*.d.ts
packages/styleguide/stories/Core/Atoms/Markdown/*.md

/.nx/cache
/.nx/workspace-data
47 changes: 23 additions & 24 deletions nx.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,5 @@
{
"tasksRunnerOptions": {
"default": {
"runner": "nx-cloud",
"options": {
"cacheableOperations": [
"lint",
"build",
"test",
"verify",
"build-storybook"
],
"parallel": 3,
"useDaemonProcess": false,
"accessToken": "ZmVjZWYxNzctYTdmZC00ODYzLTg4MzEtZTE1YTVmZDdkZmY1fHJlYWQ="
}
}
},
"extends": "nx/presets/npm.json",
"affected": {
"defaultBase": "main"
},
"workspaceLayout": {
"appsDir": "packages",
"libsDir": "packages"
Expand All @@ -37,16 +17,30 @@
"targetDefaults": {
"build": {
"dependsOn": ["^build"],
"inputs": ["production", "^production", "babelConfig"]
"inputs": ["production", "^production", "babelConfig"],
"cache": true
},
"verify": {
"cache": true
},
"test": {
"@nx/jest:jest": {
"dependsOn": ["^build"],
"inputs": [
"default",
"^production",
"{workspaceRoot}/jest.preset.js",
"babelConfig"
]
],
"cache": true,
"options": {
"passWithNoTests": true
},
"configurations": {
"ci": {
"ci": true,
"codeCoverage": true
}
}
}
},
"generators": {
Expand All @@ -60,5 +54,10 @@
"linter": "eslint"
}
},
"$schema": "./node_modules/nx/schemas/nx-schema.json"
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"useDaemonProcess": false,
"nxCloudAccessToken": "ZmVjZWYxNzctYTdmZC00ODYzLTg4MzEtZTE1YTVmZDdkZmY1fHJlYWQ=",
"parallel": 3,
"useInferencePlugins": false,
"defaultBase": "main"
}
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,38 @@
"version": "1.2.0",
"author": "Codecademy Engineers <[email protected]>",
"dependencies": {
"@babel/cli": "7.20.7",
"@babel/core": "7.20.12",
"@babel/preset-typescript": "^7.18.6",
"@babel/cli": "7.24.7",
"@babel/core": "7.24.7",
"@babel/preset-env": "^7.24.7",
"@babel/preset-react": "^7.24.7",
"@babel/preset-typescript": "^7.24.7",
"@codecademy/eslint-config": "8.0.0",
"@codecademy/prettier-config": "^0.2.0",
"@codecademy/tsconfig": "^0.2.0",
"@emotion/babel-plugin": "11.11.0",
"@emotion/jest": "^11.11.0",
"@emotion/react": "11.11.1",
"@emotion/styled": "11.11.0",
"@nx/jest": "16.8.1",
"@nx/react": "16.8.1",
"@nx/jest": "19.3.2",
"@nx/react": "19.3.2",
"@svgr/cli": "5.5.0",
"@testing-library/dom": "^8.11.1",
"@testing-library/jest-dom": "^5.16.1",
"@testing-library/react": "^12.1.2",
"@testing-library/react": "15.0.6",
"@testing-library/react-hooks": "^7.0.2",
"@testing-library/user-event": "^13.5.0",
"@testing-library/user-event": "^14.5.2",
"@types/classnames": "2.2.10",
"@types/invariant": "2.2.29",
"@types/konami-code-js": "^0.8.0",
"@types/lodash": "4.17.0",
"@types/react": "^17",
"@types/react-dom": "^17",
"@types/react": "18.3.1",
"@types/react-dom": "18.3.0",
"@types/react-test-renderer": "^17.0.1",
"@types/stylis": "^4.2.0",
"@typescript-eslint/eslint-plugin": "^5.15.0",
"@typescript-eslint/parser": "^5.15.0",
"babel-jest": "29.6.4",
"babel-plugin-macros": "3.0.1",
"babel-preset-codecademy": "7.0.0",
"component-test-setup": "^0.3.1",
"conventional-changelog-cli": "^2.0.34",
"conventional-changelog-conventionalcommits": "^4.3.0",
Expand All @@ -55,13 +56,12 @@
"lodash": "^4.17.5",
"micromatch": "^4.0.5",
"mutationobserver-shim": "^0.3.3",
"nx": "16.8.1",
"nx-cloud": "16.4.0",
"nx": "19.3.2",
"prettier": "2.2.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-helmet": "6.1.0",
"react-test-renderer": "^17.0.2",
"react-test-renderer": "18.3.1",
"svgo": "^1.3.2",
"syncpack": "^10.9.3",
"ts-jest": "29.1.1",
Expand All @@ -75,7 +75,7 @@
"webpack": "4.46.0"
},
"engines": {
"node": "^16.17",
"node": "^18.18",
"yarn": "^1.21.1"
},
"license": "MIT",
Expand Down
7 changes: 3 additions & 4 deletions packages/eslint-plugin-gamut/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/eslint-plugin-gamut/src",
"projectType": "library",
"tags": [],
"targets": {
"build": {
"executor": "nx:run-commands",
Expand All @@ -16,10 +17,8 @@
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/packages/eslint-plugin-gamut"],
"options": {
"jestConfig": "packages/eslint-plugin-gamut/jest.config.ts",
"passWithNoTests": true
"jestConfig": "packages/eslint-plugin-gamut/jest.config.ts"
}
}
},
"tags": []
}
}
17 changes: 16 additions & 1 deletion packages/gamut-icons/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
module.exports = {
extends: '../../babel.defaults.js',
presets: ['codecademy', '@babel/preset-typescript'],
presets: [
[
'@babel/env',
{
modules: process.env.NODE_ENV === 'test' ? 'commonjs' : false,
targets: 'defaults',
},
],
[
'@babel/react',
{
runtime: 'automatic',
},
],
'@babel/preset-typescript',
],
};
7 changes: 3 additions & 4 deletions packages/gamut-icons/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/gamut-icons/src",
"projectType": "library",
"tags": [],
"targets": {
"build": {
"outputs": [
Expand Down Expand Up @@ -30,10 +31,8 @@
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/packages/gamut-icons"],
"options": {
"jestConfig": "packages/gamut-icons/jest.config.ts",
"passWithNoTests": true
"jestConfig": "packages/gamut-icons/jest.config.ts"
}
}
},
"tags": []
}
}
17 changes: 16 additions & 1 deletion packages/gamut-illustrations/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
module.exports = {
extends: '../../babel.defaults.js',
presets: ['codecademy', '@babel/preset-typescript'],
presets: [
[
'@babel/env',
{
modules: process.env.NODE_ENV === 'test' ? 'commonjs' : false,
targets: 'defaults',
},
],
[
'@babel/react',
{
runtime: 'automatic',
},
],
'@babel/preset-typescript',
],
plugins: [
[
'@emotion/babel-plugin',
Expand Down
7 changes: 3 additions & 4 deletions packages/gamut-illustrations/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/gamut-illustrations/src",
"projectType": "library",
"tags": [],
"targets": {
"build": {
"outputs": ["{projectRoot}/dist"],
Expand All @@ -21,10 +22,8 @@
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/packages/gamut-illustrations"],
"options": {
"jestConfig": "packages/gamut-illustrations/jest.config.ts",
"passWithNoTests": true
"jestConfig": "packages/gamut-illustrations/jest.config.ts"
}
}
},
"tags": []
}
}
17 changes: 16 additions & 1 deletion packages/gamut-patterns/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
module.exports = {
extends: '../../babel.defaults.js',
presets: ['codecademy', '@babel/preset-typescript'],
presets: [
[
'@babel/env',
{
modules: process.env.NODE_ENV === 'test' ? 'commonjs' : false,
targets: 'defaults',
},
],
[
'@babel/react',
{
runtime: 'automatic',
},
],
'@babel/preset-typescript',
],
};
7 changes: 3 additions & 4 deletions packages/gamut-patterns/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/gamut-patterns/src",
"projectType": "library",
"tags": [],
"targets": {
"build": {
"outputs": [
Expand Down Expand Up @@ -30,10 +31,8 @@
"outputs": ["{workspaceRoot}/coverage/packages/gamut-patterns"],
"dependsOn": ["build"],
"options": {
"jestConfig": "packages/gamut-patterns/jest.config.ts",
"passWithNoTests": true
"jestConfig": "packages/gamut-patterns/jest.config.ts"
}
}
},
"tags": []
}
}
4 changes: 2 additions & 2 deletions packages/gamut-styles/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/gamut-styles/src",
"projectType": "library",
"tags": [],
"targets": {
"build": {
"outputs": ["{projectRoot}/dist"],
Expand All @@ -26,6 +27,5 @@
"passWithNoTests": false
}
}
},
"tags": []
}
}
17 changes: 16 additions & 1 deletion packages/gamut-tests/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
module.exports = {
extends: '../../babel.defaults.js',
presets: ['codecademy', '@babel/preset-typescript'],
presets: [
[
'@babel/env',
{
modules: process.env.NODE_ENV === 'test' ? 'commonjs' : false,
targets: 'defaults',
},
],
[
'@babel/react',
{
runtime: 'automatic',
},
],
'@babel/preset-typescript',
],
plugins: [
[
'@emotion/babel-plugin',
Expand Down
Loading