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

chore: dependency cleanup #2776

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions .lintstagedrc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ export default {
[`*`]: (allChanges) => {
const commands = [];

// if (micromatch.some(allChanges, '**/package.json')) {
// commands.push(`yarn syncpack format`);
// }
if (micromatch.some(allChanges, '**/package.json')) {
commands.push(`yarn syncpack format`);
}

// if (micromatch.some(allChanges, 'yarn.lock')) {
// commands.push(`npx yarn-deduplicate`);
Expand Down
108 changes: 53 additions & 55 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,60 +1,14 @@
{
"name": "gamut-repo",
"private": true,
"description": "Modules and components for Codecademy",
"version": "1.2.0",
"license": "MIT",
"author": "Codecademy Engineers <dev@codecademy.com>",
"engines": {
"node": "^16.17",
"yarn": "^1.21.1"
},
"scripts": {
"test": "nx run-many --target=test --all",
"lint": "eslint --ignore-path .eslintignore \"./**/*.{mdx,js,ts,tsx,json}\" --max-warnings 0",
"lint:fix": "yarn lint --fix",
"prettier": "prettier --ignore-path .prettierignore \"./**/*.{mdx,js,ts,tsx,json,css,scss}\"",
"format": "yarn lint:fix && yarn prettier --write",
"format:verify": "yarn prettier --check",
"verify": "nx run-many --target=verify --parallel=3 --all",
"verify-all": "yarn verify",
"clear-modules": "lerna clean -y && rm -rf node_modules",
"build": "nx run-many --target=build --all",
"build:graph": "nx graph",
"build-all": "yarn build",
"start": "yarn && yarn start:storybook",
"start:storybook": "cd ./packages/styleguide && yarn start",
"build-storybook": "nx run styleguide:build-storybook && lerna run copy-storybook",
"deploy": "cp -r ./dist/static/* ./dist/docs && gh-pages -b gh-pages -d dist"
},
"lint-staged": {
"**/*.{mdx,js,ts,tsx,json}": [
"node_modules/@codecademy/eslint-config/bin/eslint-fix.js",
"prettier --ignore-path .prettierignore --write"
],
"**/*.{css,scss}": [
"prettier --ignore-path .prettierignore --write"
]
},
"repository": {
"type": "git",
"url": "git@github.com:Codecademy/gamut.git"
},
"workspaces": {
"packages": [
"packages/*"
],
"nohoist": [
"**/@storybook",
"**/@storybook/**",
"**/storybook-*",
"**/storybook-*/**"
]
},
"dependencies": {
"@babel/cli": "7.20.7",
"@babel/core": "7.20.12",
"@babel/preset-typescript": "^7.18.6",
"@babel/cli": "7.22.15",
"@babel/core": "7.22.17",
"@babel/preset-env": "^7.22.15",
"@babel/preset-react": "^7.22.15",
"@babel/preset-typescript": "^7.22.15",
"@codecademy/eslint-config": "8.0.0",
"@codecademy/prettier-config": "^0.2.0",
"@codecademy/tsconfig": "^0.2.0",
Expand Down Expand Up @@ -82,7 +36,6 @@
"@typescript-eslint/parser": "^5.15.0",
"babel-jest": "29.6.4",
"babel-plugin-macros": "3.0.1",
"babel-preset-codecademy": "7.0.0",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because babel-preset-codecademy wasn't getting updated it ended up making our lockfile a mess. At this point it's very easy to set up a simple babel config that does what we need, without needing to manage all of the different dependencies that babel-preset-codecademy does.

"component-test-setup": "^0.3.1",
"conventional-changelog-cli": "^2.0.34",
"conventional-changelog-conventionalcommits": "^4.3.0",
Expand Down Expand Up @@ -117,11 +70,56 @@
"tslib": "2.4.0",
"typescript": "5.1.3"
},
"devDependencies": {
"onchange": "^7.0.2"
},
"engines": {
"node": "^16.17",
"yarn": "^1.21.1"
},
"license": "MIT",
"lint-staged": {
"**/*.{mdx,js,ts,tsx,json}": [
"node_modules/@codecademy/eslint-config/bin/eslint-fix.js",
"prettier --ignore-path .prettierignore --write"
],
"**/*.{css,scss}": [
"prettier --ignore-path .prettierignore --write"
]
},
"packageManager": "yarn@1.22.10",
"private": true,
"repository": "git@github.com:Codecademy/gamut.git",
"resolutions": {
"@typescript-eslint/utils": "^5.15.0"
},
"packageManager": "yarn@1.22.10",
"devDependencies": {
"onchange": "^7.0.2"
"scripts": {
"build": "nx run-many --target=build --all",
"build-all": "yarn build",
"build-storybook": "nx run styleguide:build-storybook && lerna run copy-storybook",
"build:graph": "nx graph",
"clear-modules": "lerna clean -y && rm -rf node_modules",
"deploy": "cp -r ./dist/static/* ./dist/docs && gh-pages -b gh-pages -d dist",
"format": "yarn lint:fix && yarn prettier --write",
"format:verify": "yarn prettier --check",
"lint": "eslint --ignore-path .eslintignore \"./**/*.{mdx,js,ts,tsx,json}\" --max-warnings 0",
"lint:fix": "yarn lint --fix",
"prettier": "prettier --ignore-path .prettierignore \"./**/*.{mdx,js,ts,tsx,json,css,scss}\"",
"start": "yarn && yarn start:storybook",
"start:storybook": "cd ./packages/styleguide && yarn start",
"test": "nx run-many --target=test --all",
"verify": "nx run-many --target=verify --parallel=3 --all",
"verify-all": "yarn verify"
},
"workspaces": {
"packages": [
"packages/*"
],
"nohoist": [
"**/@storybook",
"**/@storybook/**",
"**/storybook-*",
"**/storybook-*/**"
]
}
}
35 changes: 16 additions & 19 deletions packages/eslint-plugin-gamut/package.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,30 @@
{
"author": "Codecademy Engineering <dev@codecademy.com>",
"name": "eslint-plugin-gamut",
"description": "Shared eslint plugin for Gamut applications",
"keywords": [
"gamut",
"eslint",
"styles",
"gamut-styles"
],
"version": "2.0.4",
"author": "Codecademy Engineering <dev@codecademy.com>",
"dependencies": {
"@typescript-eslint/utils": "^5.15.0"
},
"files": [
"dist"
],
"name": "eslint-plugin-gamut",
"version": "2.0.4",
"keywords": [
"eslint",
"gamut",
"gamut-styles",
"styles"
],
"license": "MIT",
"main": "./dist/index.js",
"module": "dist/index.js",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Codecademy/gamut.git"
},
"repository": "Codecademy/gamut.git",
"scripts": {
"verify": "tsc --noEmit",
"build": "nx build eslint-plugin-gamut"
"build": "nx build eslint-plugin-gamut",
"verify": "tsc --noEmit"
},
"types": "./dist/index.d.ts",
"dependencies": {
"@typescript-eslint/utils": "^5.15.0"
}
"types": "./dist/index.d.ts"
}
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',
],
};
37 changes: 17 additions & 20 deletions packages/gamut-icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,30 @@
"description": "Icon library for codecademy.com",
"version": "9.4.1",
"author": "Codecademy <dev@codecademy.com>",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"sideEffects": false,
"files": [
"dist"
],
"scripts": {
"format": "svgo -f ./src/svg --pretty --config=.svgo.yml",
"build": "nx build @codecademy/gamut-icons"
},
"repository": {
"type": "git",
"url": "git@github.com:Codecademy/gamut.git"
},
"license": "MIT",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@codecademy/gamut-styles": "16.1.3",
"@codecademy/variance": "0.21.1"
},
"files": [
"dist"
],
"license": "MIT",
"main": "dist/index.js",
"module": "dist/index.js",
"peerDependencies": {
"@emotion/react": "^11.4.0",
"@emotion/styled": "^11.3.0",
"lodash": "^4.17.5",
"react": "^17.0.2 || ^18.2.0"
}
},
"publishConfig": {
"access": "public"
},
"repository": "git@github.com:Codecademy/gamut.git",
"scripts": {
"build": "nx build @codecademy/gamut-icons",
"format": "svgo -f ./src/svg --pretty --config=.svgo.yml"
},
"sideEffects": false,
"types": "dist/index.d.ts"
}
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
23 changes: 9 additions & 14 deletions packages/gamut-illustrations/package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
{
"name": "@codecademy/gamut-illustrations",
"description": "Illustrations library for Codecademy",
"version": "0.39.1",
"author": "Codecademy Engineering <dev@codecademy.com>",
"bugs": {
"url": "https://github.com/Codecademy/gamut/issues"
},
"bugs": "https://github.com/Codecademy/gamut/issues",
"dependencies": {
"@codecademy/gamut-styles": "16.1.3",
"classnames": "^2.2.5"
},
"description": "Illustrations library for Codecademy",
"homepage": "https://github.com/Codecademy/gamut#readme",
"name": "@codecademy/gamut-illustrations",
"module": "./dist/index.js",
"main": "./dist/index.js",
"files": [
"dist"
],
"homepage": "https://github.com/Codecademy/gamut#readme",
"license": "MIT",
"main": "./dist/index.js",
"module": "./dist/index.js",
"peerDependencies": {
"@emotion/react": "^11.4.0",
"@emotion/styled": "^11.3.0",
Expand All @@ -25,16 +24,12 @@
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/Codecademy/gamut.git"
},
"repository": "Codecademy/gamut.git",
"scripts": {
"build": "nx build @codecademy/gamut-illustrations"
},
"sideEffects": [
"dist/**/[A-Z]**/[A-Z]*.js",
"dist/**/[A-Z]**/index.js"
],
"version": "0.39.1"
]
}
7 changes: 2 additions & 5 deletions packages/gamut-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
"description": "Styleguide & Component library for Codecademy",
"version": "0.6.343",
"author": "Codecademy Engineering <dev@codecademy.com>",
"repository": {
"type": "git",
"url": "git@github.com:Codecademy/gamut.git"
},
"dependencies": {
"@codecademy/gamut": "55.4.1",
"@codecademy/gamut-icons": "9.4.1",
Expand All @@ -20,5 +16,6 @@
"license": "MIT",
"publishConfig": {
"access": "public"
}
},
"repository": "git@github.com:Codecademy/gamut.git"
}
27 changes: 26 additions & 1 deletion packages/gamut-patterns/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
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',
{
sourceMap: true,
autoLabel: 'always',
labelFormat: '[local]',
},
],
],
};