Skip to content

Commit 66b4d32

Browse files
committed
merge in jh branch
2 parents 563235d + 61491bf commit 66b4d32

File tree

9 files changed

+284
-145
lines changed

9 files changed

+284
-145
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
5454
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
5555
run: |
56-
npx lerna publish --yes --canary --dist-tag=alpha.${GITHUB_SHA:0:6} --preid=alpha.${GITHUB_SHA:0:6}
56+
npx lerna publish --yes --canary --include-merged-tags --dist-tag=alpha.${GITHUB_SHA:0:6} --preid=alpha.${GITHUB_SHA:0:6}
5757
5858
- name: Publish
5959
# Only publish the non-alpha version on main

.github/workflows/push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
command: ['format:verify', 'lint', 'verify']
16+
command: ['format:verify', 'lint', 'verify', 'syncpack:lint']

.syncpackrc.js

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
// @ts-check
2+
3+
/**
4+
* Syncpack configuration file
5+
* Controls version management and package.json formatting across the monorepo
6+
* @see https://github.com/JamieMason/syncpack
7+
* @type {import("syncpack").RcFile}
8+
*/
9+
const config = {
10+
/**
11+
* Glob patterns for package.json files to process
12+
* Includes root, apps, libs, and tools directories
13+
*/
14+
source: ['package.json', 'packages/*/package.json'],
15+
16+
/**
17+
* Fields to sort alphabetically in package.json
18+
*/
19+
sortAz: [
20+
'contributors',
21+
'dependencies',
22+
'devDependencies',
23+
'keywords',
24+
'peerDependencies',
25+
'resolutions',
26+
'scripts',
27+
],
28+
29+
/**
30+
* Fields that should appear first in package.json, in this order
31+
*/
32+
sortFirst: ['name', 'description', 'version', 'author'],
33+
34+
/**
35+
* Version management rules for different package groups
36+
*/
37+
versionGroups: [
38+
{
39+
/** Ignore version syncing for peer dependencies */
40+
label: 'ignore peer dependencies',
41+
packages: ['**'],
42+
dependencyTypes: ['peer'],
43+
isIgnored: true,
44+
},
45+
// {
46+
// /** Align all package versions with those defined in @mono/root */
47+
// packages: ['**'],
48+
// dependencies: ['**'],
49+
// dependencyTypes: ['dev', 'prod', 'overrides', 'resolutions'],
50+
// snapTo: ['client-modules'],
51+
// },
52+
],
53+
};
54+
55+
module.exports = config;

auto.config.js

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
const npmOptions = {
2+
exact: true,
3+
};
4+
5+
/** Auto configuration */
6+
module.exports = function rc() {
7+
return {
8+
author: 'Release Bot <[email protected]>',
9+
baseBranch: 'main',
10+
plugins: [
11+
[
12+
'all-contributors',
13+
{
14+
exclude: ['dependabot', 'codecademydev'],
15+
},
16+
],
17+
['npm', npmOptions],
18+
[
19+
'released',
20+
{
21+
label: ':shipit:',
22+
},
23+
],
24+
'first-time-contributor',
25+
],
26+
noDefaultLabels: true,
27+
labels: [
28+
{
29+
name: 'release/major',
30+
changelogTitle: '💥 Breaking Change',
31+
description: 'Increment the major version when merged',
32+
releaseType: 'major',
33+
color: '#C5000B',
34+
},
35+
{
36+
name: 'release/minor',
37+
changelogTitle: '🚀 Enhancement',
38+
description: 'Increment the minor version when merged',
39+
releaseType: 'minor',
40+
color: '#F1A60E',
41+
},
42+
{
43+
name: 'release/patch',
44+
changelogTitle: '🐛 Bug Fix',
45+
description: 'Increment the patch version when merged',
46+
releaseType: 'patch',
47+
color: '#870048',
48+
},
49+
{
50+
name: 'release/skip',
51+
description: 'Preserve the current version when merged',
52+
releaseType: 'skip',
53+
color: '#bf5416',
54+
},
55+
{
56+
name: 'release',
57+
description: 'Create a release when this pr is merged',
58+
releaseType: 'release',
59+
color: '#007f70',
60+
},
61+
{
62+
name: 'release/internal',
63+
changelogTitle: '🏠 Internal',
64+
description: 'Changes only affect the internal API',
65+
releaseType: 'none',
66+
color: '#696969',
67+
},
68+
{
69+
name: 'release/documentation',
70+
changelogTitle: '📝 Documentation',
71+
description: 'Changes only affect the documentation',
72+
releaseType: 'none',
73+
color: '#cfd3d7',
74+
},
75+
{
76+
name: 'release/tests',
77+
changelogTitle: '🧪 Tests',
78+
description: 'Add or improve existing tests',
79+
releaseType: 'none',
80+
color: '#ffd3cc',
81+
},
82+
{
83+
name: 'release/dependencies',
84+
changelogTitle: '🔩 Dependency Updates',
85+
description: 'Update one or more dependencies version',
86+
releaseType: 'patch',
87+
color: '#8732bc',
88+
},
89+
{
90+
name: 'release/performance',
91+
changelogTitle: '🏎 Performance',
92+
description: 'Improve performance of an existing feature',
93+
releaseType: 'patch',
94+
color: '#f4b2d8',
95+
},
96+
],
97+
};
98+
};

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
"clear-modules": "lerna clean -y && rm -rf node_modules",
2525
"build": "turbo run build --concurrency=3",
2626
"build-all": "yarn build",
27-
"prepare": "husky install"
27+
"prepare": "husky install",
28+
"syncpack:lint": "syncpack lint"
2829
},
2930
"lint-staged": {
3031
"**/*.{js,ts,tsx,json}": [
@@ -51,7 +52,7 @@
5152
"@babel/cli": "7.13.10",
5253
"@babel/core": "7.19.6",
5354
"@babel/preset-typescript": "^7.13.0",
54-
"@codecademy/webpack-config": "^6.0.0",
55+
"@codecademy/webpack-config": "6.4.2",
5556
"@emotion/babel-plugin": "^11.3.0",
5657
"@emotion/jest": "^11.3.0",
5758
"@emotion/react": "^11.4.0",
@@ -73,7 +74,7 @@
7374
"@typescript-eslint/parser": "^8.31.0",
7475
"babel-jest": "29.6.4",
7576
"babel-plugin-macros": "3.1.0",
76-
"babel-preset-codecademy": "2.3.0",
77+
"babel-preset-codecademy": "7.0.1",
7778
"component-test-setup": "^0.3.1",
7879
"core-js": "3.32.1",
7980
"enzyme": "3.11.0",
@@ -102,6 +103,7 @@
102103
"react-helmet": "6.1.0",
103104
"react-test-renderer": "18.2.0",
104105
"semver": "7.7.1",
106+
"syncpack": "^14.0.0-alpha.10",
105107
"turbo": "^1.1.2",
106108
"typescript": "4.4.2"
107109
},

packages/babel-preset-codecademy/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"babel-plugin-transform-dynamic-import": "^2.1.0"
3939
},
4040
"devDependencies": {
41-
"@babel/cli": "^7.13.10",
42-
"@babel/core": "^7.19.6"
41+
"@babel/cli": "7.13.10",
42+
"@babel/core": "7.19.6"
4343
}
4444
}

packages/eslint-config/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ module.exports = {
108108
'@typescript-eslint/no-magic-numbers': 'off',
109109
'@typescript-eslint/no-type-alias': 'off',
110110
'@typescript-eslint/typedef': 'off',
111+
'@typescript-eslint/no-require-imports': 'off',
111112

112113
'arrow-body-style': 'off',
113114
camelcase: 'off',

packages/webpack-config/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
"webpack-dev-server": "^3.1.9"
3131
},
3232
"devDependencies": {
33-
"@babel/core": "7.12.9",
34-
"babel-preset-codecademy": "^2.3.0",
33+
"@babel/core": "7.19.6",
34+
"babel-preset-codecademy": "7.0.1",
3535
"webpack": "^5.88.2"
3636
},
3737
"dependencies": {

0 commit comments

Comments
 (0)