Skip to content

Commit a23ed8a

Browse files
author
zbeyens
committed
upgrade
1 parent d7bfed4 commit a23ed8a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+8249
-12970
lines changed

.changeset/changelog-config.js

+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
const { config } = require("dotenv");
2+
const { getInfo, getInfoFromPullRequest } = require("@changesets/get-github-info");
3+
4+
config();
5+
6+
module.exports = {
7+
getDependencyReleaseLine: async (
8+
) => {
9+
return ""
10+
},
11+
getReleaseLine: async (changeset, type, options) => {
12+
if (!options || !options.repo) {
13+
throw new Error(
14+
'Please provide a repo to this changelog generator like this:\n"changelog": ["@changesets/changelog-github", { "repo": "org/repo" }]'
15+
);
16+
}
17+
18+
let prFromSummary;
19+
let commitFromSummary;
20+
let usersFromSummary = [];
21+
22+
const replacedChangelog = changeset.summary
23+
.replace(/^\s*(?:pr|pull|pull\s+request):\s*#?(\d+)/im, (_, pr) => {
24+
let num = Number(pr);
25+
if (!isNaN(num)) prFromSummary = num;
26+
return "";
27+
})
28+
.replace(/^\s*commit:\s*([^\s]+)/im, (_, commit) => {
29+
commitFromSummary = commit;
30+
return "";
31+
})
32+
.replace(/^\s*(?:author|user):\s*@?([^\s]+)/gim, (_, user) => {
33+
usersFromSummary.push(user);
34+
return "";
35+
})
36+
.trim();
37+
38+
const [firstLine, ...futureLines] = replacedChangelog
39+
.split("\n")
40+
.map(l => l.trimRight());
41+
42+
const links = await (async () => {
43+
if (prFromSummary !== undefined) {
44+
let { links } = await getInfoFromPullRequest({
45+
repo: options.repo,
46+
pull: prFromSummary
47+
});
48+
if (commitFromSummary) {
49+
links = {
50+
...links,
51+
commit: `[\`${commitFromSummary}\`](https://github.com/${options.repo}/commit/${commitFromSummary})`
52+
};
53+
}
54+
return links;
55+
}
56+
const commitToFetchFrom = commitFromSummary || changeset.commit;
57+
if (commitToFetchFrom) {
58+
let { links } = await getInfo({
59+
repo: options.repo,
60+
commit: commitToFetchFrom
61+
});
62+
return links;
63+
}
64+
return {
65+
commit: null,
66+
pull: null,
67+
user: null
68+
};
69+
})();
70+
71+
const users = usersFromSummary.length
72+
? usersFromSummary
73+
.map(
74+
userFromSummary =>
75+
`[@${userFromSummary}](https://github.com/${userFromSummary})`
76+
)
77+
.join(", ")
78+
: links.user;
79+
80+
const pull = links.pull === null ? "" : ` ${links.pull}`
81+
const commit = !!pull || links.commit === null ? "" : ` ${links.commit}`
82+
83+
const prefix = [
84+
pull,
85+
commit,
86+
users === null ? "" : ` by ${users}`
87+
].join("");
88+
89+
let lines = `${firstLine}\n${futureLines
90+
.map(l => ` ${l}`)
91+
.join("\n")}`;
92+
93+
if (firstLine[0] === '-') {
94+
lines = `\n ${firstLine}\n${futureLines
95+
.map(l => ` ${l}`)
96+
.join("\n")}`;
97+
}
98+
99+
return `\n\n-${prefix ? `${prefix} –` : ""} ${lines}`;
100+
}
101+
};

.changeset/config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://unpkg.com/@changesets/config@1.6.0/schema.json",
3-
"changelog": ["@changesets/changelog-github", { "repo": "udecode/zustand-x" }],
3+
"changelog": ["./changelog-github", { "repo": "udecode/zustand-x" }],
44
"commit": false,
55
"linked": [["zustand-x"]],
66
"access": "public",

.eslintrc.cjs

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
const {
2+
getDefaultIgnorePatterns,
3+
} = require('./config/eslint/helpers/getDefaultIgnorePatterns.cjs');
4+
5+
/** @type {import("eslint").Linter.Config} */
6+
module.exports = {
7+
root: true,
8+
extends: [
9+
'turbo',
10+
11+
'./config/eslint/bases/javascript.cjs',
12+
'./config/eslint/bases/typescript.cjs',
13+
'./config/eslint/bases/regexp.cjs',
14+
'./config/eslint/bases/jest.cjs',
15+
'./config/eslint/bases/react.cjs',
16+
'./config/eslint/bases/rtl.cjs',
17+
18+
'./config/eslint/bases/unicorn.cjs',
19+
20+
'./config/eslint/bases/prettier.cjs',
21+
],
22+
ignorePatterns: [
23+
...getDefaultIgnorePatterns(),
24+
'.next',
25+
'.out',
26+
'**/__registry__',
27+
],
28+
env: {
29+
browser: true,
30+
es6: true,
31+
jest: true,
32+
node: true,
33+
webextensions: false,
34+
},
35+
settings: {
36+
'import/parsers': {
37+
'@typescript-eslint/parser': ['.ts', '.tsx'],
38+
},
39+
'import/resolver': {
40+
node: {
41+
moduleDirectory: ['node_modules'],
42+
typescript: {
43+
alwaysTryTypes: true,
44+
},
45+
},
46+
typescript: {},
47+
},
48+
react: { version: 'detect' },
49+
},
50+
rules: {},
51+
overrides: [
52+
{
53+
files: ['**/*.spec.*'],
54+
extends: ['./config/eslint/bases/prettier.cjs'],
55+
rules: {
56+
'react/jsx-key': 'off',
57+
'import/no-relative-packages': 'off',
58+
'import/no-unresolved': 'off',
59+
},
60+
},
61+
{
62+
files: ['**/*.test.*', '**/*.spec.*', '**/*.fixture.*'],
63+
env: {
64+
jest: true,
65+
},
66+
rules: {
67+
'@typescript-eslint/no-unused-vars': 'off',
68+
'react-hooks/rules-of-hooks': 'off',
69+
'no-restricted-imports': [
70+
'error',
71+
{
72+
paths: [],
73+
},
74+
],
75+
},
76+
},
77+
{
78+
files: '**/*.mdx',
79+
rules: {
80+
'prettier/prettier': 'off',
81+
},
82+
},
83+
],
84+
};

.eslintrc.js

-18
This file was deleted.

.gitignore

+18-14
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,31 @@
11
# See https://help.github.com/ignore-files/ for more about ignoring files.
22

3+
packages/cli/components
4+
**/tsconfig.tsbuildinfo
35

6+
.yarn/*
7+
!.yarn/cache
8+
!.yarn/patches
9+
!.yarn/plugins
10+
!.yarn/releases
11+
!.yarn/sdks
12+
!.yarn/versions
13+
14+
# Generated files
415
.history
516
node_modules/
617
report.*
718

819
# Dependency directories
920
jspm_packages/
1021
/packages/*/node_modules
11-
/packages/*/LICENSE
12-
**/lib
1322
**/dist
1423

1524
# compiled output
1625
/dist
1726
/tmp
1827
/out-tsc
19-
/build
28+
**/build
2029

2130
# Runtime data
2231
pids
@@ -102,16 +111,11 @@ connect.lock
102111
storybook-static/
103112

104113
# Local
105-
typedoc/
106-
!typedoc/_redirects
114+
packages/plate/docs/
107115
# Local Netlify folder
108116
.netlify
109-
110-
# Recommendation from https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored (not using Zero-installs)
111-
.yarn/*
112-
!.yarn/patches
113-
!.yarn/releases
114-
!.yarn/plugins
115-
!.yarn/sdks
116-
!.yarn/versions
117-
.pnp.*
117+
/test-results/
118+
/playwright-report/
119+
/playwright/.cache/
120+
.turbo
121+
.vercel

.prettierrc

-1
This file was deleted.

.yarn/releases/yarn-berry.cjs

-631
This file was deleted.

.yarnrc.yml

+22-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,28 @@
1+
changesetBaseRefs:
2+
- main
3+
- origin/main
4+
- upstream/main
5+
6+
changesetIgnorePatterns:
7+
- "**/*.test.{js,jsx,ts,tsx}"
8+
- "**/*.spec.{js,jsx,ts,tsx}"
9+
10+
defaultSemverRangePrefix: ""
11+
112
nodeLinker: node-modules
213

14+
npmRegistryServer: "https://registry.npmjs.org/"
15+
316
plugins:
417
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
5-
spec: '@yarnpkg/plugin-interactive-tools'
18+
spec: "@yarnpkg/plugin-interactive-tools"
619
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
7-
spec: '@yarnpkg/plugin-workspace-tools'
20+
spec: "@yarnpkg/plugin-workspace-tools"
21+
22+
supportedArchitectures:
23+
cpu:
24+
- current
25+
os:
26+
- current
827

9-
yarnPath: '.yarn/releases/yarn-berry.cjs'
28+
yarnPath: .yarn/releases/yarn-4.0.0-rc.43.cjs

config/.ncurc.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# npm-check-updates configuration used by yarn deps:check && yarn deps:update
2+
# convenience scripts.
3+
# @link https://github.com/raineorshine/npm-check-updates
4+
5+
# Add here exclusions on packages if any
6+
reject: []

0 commit comments

Comments
 (0)