Skip to content

Commit 7e875f6

Browse files
committed
chore: refactor workspace
1 parent c429763 commit 7e875f6

File tree

129 files changed

+1662
-1371
lines changed

Some content is hidden

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

129 files changed

+1662
-1371
lines changed

.dockerignore

+43-32
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,33 @@
11
# Packages
2-
node_modules/
2+
**/node_modules
33

44
# Log files
5-
logs/
6-
*.log
7-
npm-debug.log*
5+
**/logs
6+
**/*.log
7+
**/npm-debug.log*
88

99
# Runtime data
10-
pids
11-
*.pid
12-
*.seed
10+
**/pids
11+
**/*.pid
12+
**/*.seed
1313

1414
# Env
15-
.env
15+
**/.env
1616

1717
# Dist
18-
dist/
18+
**/dist/
19+
**/dist-docs/
1920

2021
# Miscellaneous
21-
.tmp/
22-
.vscode/*
23-
.idea/
24-
.DS_Store
25-
.turbo
26-
tsconfig.tsbuildinfo
27-
coverage/
28-
__tests__/
22+
**/.tmp
23+
**/.vscode
24+
**/.idea
25+
**/.DS_Store
26+
**/.turbo
27+
**/tsconfig.tsbuildinfo
28+
**/coverage
29+
**/__tests__
30+
**/out
2931

3032
# yarn
3133
.pnp.*
@@ -37,20 +39,29 @@ __tests__/
3739
!.yarn/versions
3840

3941
# Cache
40-
.prettiercache
41-
.eslintcache
42+
**/.prettiercache
43+
**/.eslintcache
44+
**/.vercel
4245

4346
# Docker specific
44-
.cliff-jumperrc.json
45-
api-extractor.json
46-
.eslintrc.json
47-
.lintstagedrc.cjs
48-
.lintstagedrc.cjs
49-
.prettierignore
50-
.prettierrc.js
51-
.prettierrc.cjs
52-
cliff.toml
53-
CHANGELOG.md
54-
README.md
55-
tsconfig.eslint.json
56-
docs/
47+
**/.cliff-jumperrc.json
48+
**/api-extractor.json
49+
**/api-extractor-docs.json
50+
**/.eslintignore
51+
**/.eslintrc.json
52+
**/.lintstagedrc.js
53+
**/.lintstagedrc.cjs
54+
**/.lintstagedrc.json
55+
**/.prettierignore
56+
**/.prettierrc.js
57+
**/.prettierrc.cjs
58+
**/.prettierrc.json
59+
**/cliff.toml
60+
**/CHANGELOG.md
61+
**/README.md
62+
**/LICENSE
63+
**/tsconfig.eslint.json
64+
**/tsconfig.docs.json
65+
**/docs/
66+
**/vitest.config.ts
67+

.eslintrc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"root": true,
33
"extends": ["neon/common", "neon/node", "neon/typescript", "neon/prettier"],
44
"parserOptions": {
5-
"project": "./tsconfig.eslint.json"
5+
"project": ["./tsconfig.eslint.json", "./apps/*/tsconfig.eslint.json", "./packages/*/tsconfig.eslint.json"]
66
},
77
"rules": {
88
"@typescript-eslint/consistent-type-definitions": ["error", "interface"]

.github/workflows/publish-dev-docker.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
run: echo ${{ secrets.DOCKER_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
3131

3232
- name: Build the image
33-
run: yarn docker build @discordjs/proxy-container -t discordjs/proxy:latest
33+
run: yarn docker build --buildkit @discordjs/proxy-container -t discordjs/proxy:latest
3434

3535
- name: Push image to DockerHub
3636
run: docker push discordjs/proxy:latest

.github/workflows/publish-docker.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@ jobs:
2727
run: echo ${{ secrets.DOCKER_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
2828

2929
- name: Build docker image
30-
run: yarn docker build @discordjs/proxy-container -t discordjs/proxy:latest
31-
32-
- name: Tag image with major
33-
run: docker tag discordjs/proxy discordjs/proxy:$(cut -d '.' -f1 <<< $(jq --raw-output '.version' packages/proxy-container/package.json))
30+
run: yarn docker build --buildkit @discordjs/proxy-container -t discordjs/proxy:$(cut -d '.' -f1 <<< $(jq --raw-output '.version' packages/proxy-container/package.json))
3431

3532
- name: Push image to DockerHub
3633
run: docker push --all-tags discordjs/proxy

.gitignore

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Packages
2-
node_modules/
2+
node_modules
33

44
# Log files
5-
logs/
5+
logs
66
*.log
77
npm-debug.log*
88

@@ -15,20 +15,20 @@ pids
1515
.env
1616

1717
# Dist
18-
dist/
19-
dist-docs/
18+
dist
19+
dist-docs
2020

2121
# Miscellaneous
22-
.tmp/
23-
.vscode/*
22+
.tmp
23+
.vscode
2424
!.vscode/extensions.json
2525
!.vscode/settings.json
26-
.idea/
26+
.idea
2727
.DS_Store
2828
.turbo
2929
tsconfig.tsbuildinfo
30-
coverage/
31-
out/
30+
coverage
31+
out
3232

3333
# yarn
3434
.pnp.*

.yarn/plugins/@yarnpkg/plugin-docker-build.cjs

+4-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,8 @@ module.exports = {
215215
await c({ workspace: e, report: t, destination: u });
216216
});
217217
}
218-
await i.execUtils.pipevp('docker', ['build', ...this.args, '-f', s, '.'], {
218+
const h = this.buildKit ? ['buildx', 'build'] : ['build'];
219+
await i.execUtils.pipevp('docker', [...h, ...this.args, '-f', s, '.'], {
219220
cwd: o,
220221
strict: !0,
221222
stdin: this.context.stdin,
@@ -241,13 +242,15 @@ module.exports = {
241242
'yarn docker build --copy secret.key --copy config.json @foo/bar',
242243
],
243244
['Install production dependencies only', 'yarn docker build --production @foo/bar'],
245+
['Build a Docker image using BuildKit', 'yarn docker build --buildkit @foo/bar'],
244246
],
245247
})),
246248
d([r.Command.String()], f.prototype, 'workspaceName', void 0),
247249
d([r.Command.Proxy()], f.prototype, 'args', void 0),
248250
d([r.Command.String('-f,--file')], f.prototype, 'dockerFilePath', void 0),
249251
d([r.Command.Array('--copy')], f.prototype, 'copyFiles', void 0),
250252
d([r.Command.Boolean('--production')], f.prototype, 'production', void 0),
253+
d([r.Command.Boolean('--buildkit')], f.prototype, 'buildKit', void 0),
251254
d([r.Command.Path('docker', 'build')], f.prototype, 'execute', null);
252255
const u = { commands: [f] };
253256
plugin = e;

.yarn/releases/yarn-3.5.0.cjs .yarn/releases/yarn-3.5.1.cjs

+266-266
Large diffs are not rendered by default.

.yarnrc.yml

+20-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
1+
logFilters:
2+
# MISSING_PEER_DEPENDENCY
3+
- code: YN0002
4+
level: discard
5+
# FETCH_NOT_CACHED
6+
- code: YN0013
7+
level: discard
8+
# NODE_GYP_INJECTED
9+
- code: YN0032
10+
level: discard
11+
# INCOMPATIBLE_PEER_DEPENDENCY
12+
- code: YN0060
13+
level: discard
14+
115
nodeLinker: node-modules
216

17+
packageExtensions:
18+
'@storybook/core-common@*':
19+
dependencies:
20+
'@storybook/react-vite': 7.0.7
21+
322
plugins:
423
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
524
spec: '@yarnpkg/plugin-interactive-tools'
@@ -10,9 +29,4 @@ plugins:
1029
- path: .yarn/plugins/@yarnpkg/plugin-docker-build.cjs
1130
spec: 'https://github.com/Dcard/yarn-plugins/releases/latest/download/plugin-docker-build.js'
1231

13-
yarnPath: .yarn/releases/yarn-3.5.0.cjs
14-
15-
packageExtensions:
16-
'@storybook/core-common@*':
17-
dependencies:
18-
'@storybook/react-vite': '7.0.7'
32+
yarnPath: .yarn/releases/yarn-3.5.1.cjs

apps/guide/.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
next-env.d.ts

apps/guide/.gitignore

+8-13
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Packages
2-
node_modules/
2+
node_modules
33

44
# Log files
5-
logs/
5+
logs
66
*.log
77
npm-debug.log*
88

@@ -16,18 +16,13 @@ pids
1616
.env*.local
1717

1818
# Dist
19-
dist/
20-
typings/
21-
.cache/
22-
build/
19+
.contentlayer
20+
.next
21+
public/searchIndex
2322
src/styles/unocss.css
24-
.next/
2523

2624
# Miscellaneous
27-
.tmp/
28-
coverage/
29-
.vercel
30-
public/searchIndex
25+
.tmp
3126
.vscode
32-
lighthouse-results/
33-
.contentlayer
27+
lighthouse-results
28+

apps/guide/.prettierignore

+5-13
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
1-
# Autogenerated
2-
CHANGELOG.md
1+
.contentlayer
2+
.next
33
.turbo
4-
dist/
5-
docs/**/*
6-
!docs/index.yml
7-
!docs/README.md
8-
coverage/
9-
.cache
10-
build/
4+
.vscode
5+
coverage
116
src/styles/unocss.css
12-
api/
13-
.next/
14-
.vercel/
15-
.cache/
7+
next-env.d.ts

apps/guide/package.json

+8-12
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@
77
"test": "vitest run",
88
"test:lighthouse": "lighthouse http://localhost:3000 --output-path=./lighthouse-results",
99
"build:local": "yarn build:prod",
10-
"build:prod": "yarn workspaces foreach -ptR run build && yarn build:css && yarn build:next",
10+
"build:prod": "yarn build:css && yarn build:next",
1111
"build:next": "next build",
1212
"build:css": "yarn generate:css",
13-
"build:analyze": "cross-env-shell ANALYZE=true yarn build:prod",
13+
"build:analyze": "cross-env ANALYZE=true yarn build:prod",
1414
"preview": "next start",
15-
"dev": "concurrently 'yarn dev:contentlayer' 'yarn dev:css' 'yarn dev:next'",
15+
"dev": "concurrently 'yarn dev:css' 'yarn dev:next'",
1616
"dev:next": "next dev",
1717
"dev:css": "yarn generate:css --watch",
18-
"dev:contentlayer": "contentlayer dev",
1918
"generate:css": "unocss 'src/**/*.tsx' 'contentlayer.config.ts' '../../packages/ui/src/lib/components/**/*.tsx' --out-file ./src/styles/unocss.css --config ../../unocss.config.ts",
2019
"lint": "prettier --check . && cross-env TIMING=1 eslint src --ext .mjs,.js,.cjs,.ts,.tsx --format=pretty",
2120
"format": "prettier --write . && cross-env TIMING=1 eslint src --ext .mjs,.js,.cjs,.ts,.tsx --fix --format=pretty",
@@ -49,7 +48,7 @@
4948
"@discordjs/ui": "workspace:^",
5049
"@react-icons/all-files": "^4.1.0",
5150
"@vercel/analytics": "^1.0.0",
52-
"@vercel/edge-config": "^0.1.8",
51+
"@vercel/edge-config": "^0.1.9",
5352
"@vercel/og": "^0.5.4",
5453
"ariakit": "^2.0.0-next.44",
5554
"cmdk": "^0.2.0",
@@ -60,13 +59,9 @@
6059
"react": "^18.2.0",
6160
"react-custom-scrollbars-2": "^4.5.0",
6261
"react-dom": "^18.2.0",
63-
"react-use": "^17.4.0",
6462
"rehype-autolink-headings": "^6.1.1",
65-
"rehype-ignore": "^1.0.5",
66-
"rehype-raw": "^6.1.1",
6763
"rehype-slug": "^5.1.0",
6864
"remark-gfm": "^3.0.1",
69-
"server-only": "^0.0.1",
7065
"sharp": "^0.32.1"
7166
},
7267
"devDependencies": {
@@ -85,18 +80,19 @@
8580
"concurrently": "^8.0.1",
8681
"cross-env": "^7.0.3",
8782
"eslint": "^8.39.0",
88-
"eslint-config-neon": "^0.1.42",
83+
"eslint-config-neon": "^0.1.45",
8984
"eslint-formatter-pretty": "^5.0.0",
90-
"happy-dom": "^9.10.1",
85+
"happy-dom": "^9.10.6",
9186
"hast-util-to-string": "^2.0.0",
9287
"hastscript": "^7.2.0",
9388
"html-escaper": "^3.0.3",
9489
"lighthouse": "^10.1.1",
9590
"prettier": "^2.8.8",
91+
"turbo": "^1.9.4-canary.7",
9692
"typescript": "^5.0.4",
9793
"unocss": "^0.51.8",
9894
"vercel": "^29.0.3",
99-
"vitest": "^0.29.8"
95+
"vitest": "^0.30.1"
10096
},
10197
"engines": {
10298
"node": ">=18.13.0"

apps/guide/tsconfig.json

+1-8
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@
2222
"strictNullChecks": true,
2323
"moduleResolution": "node"
2424
},
25-
"include": [
26-
"src/**/*.ts",
27-
"src/**/*.tsx",
28-
"next-env.d.ts",
29-
"types.d.ts",
30-
".next/types/**/*.ts",
31-
".contentlayer/generated"
32-
],
25+
"include": ["src/**/*.ts", "src/**/*.tsx", "next-env.d.ts", ".next/types/**/*.ts", ".contentlayer/generated"],
3326
"exclude": ["node_modules"]
3427
}

apps/guide/types.d.ts

-1
This file was deleted.

apps/website/.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
next-env.d.ts

0 commit comments

Comments
 (0)