Skip to content

Commit 7039e2e

Browse files
authored
setup repo with yarn v4 (#4)
renames packages from `@stitches/*` to `@sigmacomputing/stitches-*` for publishing, and updates supporting files to work with yarn v4 and node 20
1 parent 9d02bde commit 7039e2e

30 files changed

+4304
-58282
lines changed

.codesandbox/ci.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/CODEOWNERS

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
name: CI
2-
on: push
2+
on:
3+
push:
4+
branches:
5+
- canary
6+
- main
7+
pull_request:
38
jobs:
49
build:
510
runs-on: ubuntu-latest
611
steps:
7-
- uses: actions/checkout@v2
8-
- uses: actions/setup-node@v2
12+
- uses: actions/checkout@v4
13+
- name: Enable Corepack
14+
run: corepack enable && yarn --version
15+
- uses: actions/setup-node@v4
916
with:
10-
node-version: '16'
17+
node-version: '20'
18+
cache: 'yarn'
1119
- name: Install modules
12-
run: yarn
20+
run: yarn install --immutable
1321
- name: Run tests
1422
run: yarn test

.gitignore

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
1414

1515
# Runtime data
1616
pids
17-
package-lock.json
18-
yarn.lock
1917
*.pid
2018
*.seed
2119
*.pid.lock
@@ -71,8 +69,13 @@ typings/
7169
# Output of 'npm pack'
7270
*.tgz
7371

74-
# Yarn Integrity file
75-
.yarn-integrity
72+
# Yarn 4 files
73+
.yarn/*
74+
!.yarn/patches
75+
!.yarn/plugins
76+
!.yarn/releases
77+
!.yarn/sdks
78+
!.yarn/versions
7679

7780
# dotenv environment variables file
7881
.env

.npmrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

.nvmrc

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

.task/release.js

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ const main = async () => {
1010

1111
const state = {}
1212

13-
const q1option = new Set(['major', 'minor', 'patch', 'prerelease'])
13+
const q1option = new Set(['major', 'minor', 'patch', 'premajor', 'preminor', 'prepatch', 'prerelease'])
1414

15-
state.release = await rl.question(`Release Type ${co.dim('(major, minor, patch, prerelease)')}:`)
16-
state.npmtag = state.release === 'prerelease' ? 'canary' : 'latest'
15+
state.release = await rl.question(`Release Type ${co.dim('(major, minor, patch, premajor, preminor, prepatch, prerelease)')}:`)
16+
state.npmtag = state.release.startsWith('pre') ? 'canary' : 'latest'
1717

1818
if (!q1option.has(state.release)) return
1919

20-
await cp.spawn('npm', ['version', state.release, '--workspaces'], { stdio: 'pipe' })
20+
await cp.spawn('yarn', ['workspaces', 'foreach', '-A', '--exclude', 'stitches', 'version', state.release, '--immediate'], { stdio: 'pipe' })
2121

2222
const workspacepkgpaths = new Set
2323
const workspacetags = new Set
@@ -46,22 +46,16 @@ const main = async () => {
4646
return
4747
}
4848

49-
await cp.spawn('npm', ['run', 'build'], { stdio: 'ignore' })
50-
51-
state.otp = await rl.question(`OTP:`)
52-
53-
if (!state.otp) return
49+
await cp.spawn('yarn', ['build'], { stdio: 'ignore' })
5450

5551
for (const workspacepkgpath of workspacepkgpaths) {
5652
await cp.spawn('git', ['add', workspacepkgpath.ospathname])
5753
}
5854

5955
await cp.spawn('git', ['commit', '-m', state.version])
60-
await cp.spawn('git', ['tag', state.version])
6156
await cp.spawn('git', ['push'])
62-
await cp.spawn('git', ['push', '--tags'])
6357

64-
await cp.spawn('npm', ['publish', '--tag', state.npmtag, '--workspaces', '--otp', state.otp])
58+
await cp.spawn('yarn', ['workspaces', 'foreach', '-A', '--exclude', 'stitches', '--no-private', 'npm', 'publish', '--tag', state.npmtag])
6559
}
6660

6761
main()

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"editor.snippetSuggestions": "none",
66
"editor.suggest.snippetsPreventQuickSuggestions": false,
77
"editor.suggestSelection": "recentlyUsedByPrefix",
8-
"editor.wordBasedSuggestions": false,
8+
"editor.wordBasedSuggestions": "off",
99
"emmet.showAbbreviationSuggestions": false,
1010
"emmet.showExpandedAbbreviation": "never",
1111
"files.exclude": {

0 commit comments

Comments
 (0)