Skip to content

Commit 623ae88

Browse files
authored
Merge pull request #2288 from system-ui/opt-in-mdx
Pull out MDX to be opt-in
2 parents 9a9aad4 + cd66918 commit 623ae88

File tree

182 files changed

+24845
-23898
lines changed

Some content is hidden

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

182 files changed

+24845
-23898
lines changed

.codesandbox/ci.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"installCommand": "codesandbox-ci:install",
23
"buildCommand": "build",
34
"packages": ["packages/theme-ui", "packages/core"],
45
"sandboxes": ["/examples/next", "/examples/gatsby-plugin"],

.eslintrc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ module.exports = {
2626
// TypeScript checks this
2727
'no-undef': 'off',
2828
'no-lone-blocks': 'off',
29+
30+
'react/jsx-pascal-case': 'off', // needs a fix in @theme-ui/mdx
2931
},
3032
overrides: [
3133
{

.github/dependabot.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,6 @@ updates:
8181
- dependency-name: reakit
8282
versions:
8383
- 1.3.6
84-
- dependency-name: lerna
85-
versions:
86-
- 4.0.0
8784
- dependency-name: prism-react-renderer
8885
versions:
8986
- 1.2.0

.github/workflows/ci.yml

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,36 +15,32 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v2
1717

18-
- uses: actions/setup-node@v2
18+
- uses: pnpm/action-setup@v2
1919
with:
20-
node-version: 14.x
20+
version: 7
2121

22-
- uses: bahmutov/npm-install@v1
22+
- uses: actions/setup-node@v2
2323
with:
24-
# By default, bahmutov/npm-install uses --frozen-lockfile
25-
install-command:
26-
yarn --ignore-optional --pure-lockfile --non-interactive
24+
node-version: 18.x
25+
cache: 'pnpm'
26+
27+
- name: Install
28+
run: pnpm install --no-optional --no-frozen-lockfile
2729

2830
- name: Run linter
29-
run: yarn lint --quiet
31+
run: pnpm lint --quiet
3032

3133
- name: Run tests and collect coverage
32-
run: yarn test --coverage
34+
run: pnpm test:coverage
3335

3436
- name: Typecheck
35-
run: yarn typecheck
37+
run: pnpm typecheck
3638

3739
- name: Build
38-
run: yarn build
39-
40-
- name: Typecheck built files
41-
run: |
42-
cd scripts/typecheck-built-files
43-
yarn
44-
yarn start
40+
run: pnpm build
4541

4642
- name: Run Codechecks
47-
run: yarn codechecks
43+
run: pnpm codechecks
4844
env:
4945
CC_SECRET: ${{ secrets.CC_SECRET }}
5046
if: ${{ env.CC_SECRET != '' }}
@@ -80,14 +76,17 @@ jobs:
8076
- name: Prepare repository
8177
run: git fetch --unshallow --tags
8278

83-
- uses: actions/setup-node@v2
79+
- uses: pnpm/action-setup@v2
8480
with:
85-
node-version: 14.x
81+
version: 7
8682

87-
- uses: bahmutov/npm-install@v1
83+
- uses: actions/setup-node@v2
8884
with:
89-
install-command:
90-
yarn --ignore-optional --pure-lockfile --non-interactive
85+
node-version: 18.x
86+
cache: 'pnpm'
87+
88+
- name: Install
89+
run: pnpm install --no-optional --no-frozen-lockfile
9190

9291
- name: Queue in release turnstile
9392
id: turnstyle
@@ -104,4 +103,10 @@ jobs:
104103
GITHUB_TOKEN: ${{ secrets.AUTO_RELEASE_GH_TOKEN }}
105104
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
106105
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
107-
run: yarn release
106+
run: pnpm release
107+
108+
- name: Check published prerelease
109+
if: github.ref == 'refs/heads/develop'
110+
run: |
111+
cd scripts/typecheck-built-files
112+
pnpm start

.github/workflows/e2e.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,29 @@ jobs:
2121
steps:
2222
- uses: actions/checkout@v2
2323

24-
- uses: actions/setup-node@v2
24+
- uses: pnpm/action-setup@v2
2525
with:
26-
node-version: 14.x
26+
version: 7
2727

28-
- uses: bahmutov/npm-install@v1
28+
- uses: actions/setup-node@v2
2929
with:
30-
install-command: yarn --pure-lockfile --non-interactive
30+
node-version: 18.x
31+
cache: 'pnpm'
32+
33+
- name: Install
34+
run: pnpm install --no-frozen-lockfile
3135

32-
- run: yarn build # build preconstruct libs
33-
- run: yarn build:docs
36+
- run: pnpm build:docs
3437

35-
- uses: cypress-io/github-action@v4
38+
- uses: cypress-io/github-action@v4.2.0
3639
with:
3740
record: true
3841
parallel: true
3942
working-directory: packages/e2e
40-
command: yarn record
41-
start: yarn serve-docs
42-
wait-on: 'http://localhost:9000'
43+
command: pnpm record
44+
start: pnpm serve-docs
4345
tag: ${{ github.event_name }}
46+
install: false
4447
env:
4548
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
4649
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}

.gitignore

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.cache
22
public
3-
package-lock.json
43
node_modules
54
dist
65
coverage
@@ -11,8 +10,5 @@ coverage
1110
.envrc
1211
.envrc.ps1
1312
.publish-log.txt
14-
.yarn-error.log
15-
yarn-error.log
16-
13+
yarn.lock
1714
.vercel
18-
/examples/**/yarn.lock

.npmrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
auto-install-peers=true
2+
public-hoist-pattern[]='*eslint*'
3+
public-hoist-pattern[]='*prettier*'
4+
public-hoist-pattern[]='@emotion/react'

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18

.pnpmfile.cjs

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
const PACKAGES_WITH_ENFORCED_SINGLE_VERSION = ['@emotion/react']
2+
3+
/**
4+
* @author remorses
5+
* @see https://github.com/pnpm/pnpm/issues/2713#issuecomment-1141000426
6+
*/
7+
function afterAllResolved(lockfile, context) {
8+
context.log('Checking duplicate packages...')
9+
10+
const packagesKeys = Object.keys(lockfile.packages)
11+
const found = {}
12+
for (let p of packagesKeys) {
13+
for (let x of PACKAGES_WITH_ENFORCED_SINGLE_VERSION) {
14+
if (p.startsWith(`/${x}/`)) {
15+
if (found[x]) {
16+
found[x] += 1
17+
} else {
18+
found[x] = 1
19+
}
20+
}
21+
}
22+
}
23+
24+
let msg = ''
25+
26+
for (let p in found) {
27+
const count = found[p]
28+
if (count > 1) {
29+
msg += `${p} found ${count} times\n`
30+
}
31+
}
32+
33+
if (msg) console.warn('\n\n\n🔥\n', '🔥', msg, '\n🔥\n\n\n')
34+
35+
return lockfile
36+
}
37+
38+
module.exports = {
39+
hooks: {
40+
afterAllResolved,
41+
},
42+
}

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
public
33
package-lock.json
44
yarn.lock
5+
pnpm-lock.yaml
56
node_modules
67
dist
78
coverage

0 commit comments

Comments
 (0)