Skip to content

Commit

Permalink
chore: refactor workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
iCrawl committed May 3, 2023
1 parent c429763 commit 7e875f6
Show file tree
Hide file tree
Showing 129 changed files with 1,662 additions and 1,371 deletions.
75 changes: 43 additions & 32 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
# Packages
node_modules/
**/node_modules

# Log files
logs/
*.log
npm-debug.log*
**/logs
**/*.log
**/npm-debug.log*

# Runtime data
pids
*.pid
*.seed
**/pids
**/*.pid
**/*.seed

# Env
.env
**/.env

# Dist
dist/
**/dist/
**/dist-docs/

# Miscellaneous
.tmp/
.vscode/*
.idea/
.DS_Store
.turbo
tsconfig.tsbuildinfo
coverage/
__tests__/
**/.tmp
**/.vscode
**/.idea
**/.DS_Store
**/.turbo
**/tsconfig.tsbuildinfo
**/coverage
**/__tests__
**/out

# yarn
.pnp.*
Expand All @@ -37,20 +39,29 @@ __tests__/
!.yarn/versions

# Cache
.prettiercache
.eslintcache
**/.prettiercache
**/.eslintcache
**/.vercel

# Docker specific
.cliff-jumperrc.json
api-extractor.json
.eslintrc.json
.lintstagedrc.cjs
.lintstagedrc.cjs
.prettierignore
.prettierrc.js
.prettierrc.cjs
cliff.toml
CHANGELOG.md
README.md
tsconfig.eslint.json
docs/
**/.cliff-jumperrc.json
**/api-extractor.json
**/api-extractor-docs.json
**/.eslintignore
**/.eslintrc.json
**/.lintstagedrc.js
**/.lintstagedrc.cjs
**/.lintstagedrc.json
**/.prettierignore
**/.prettierrc.js
**/.prettierrc.cjs
**/.prettierrc.json
**/cliff.toml
**/CHANGELOG.md
**/README.md
**/LICENSE
**/tsconfig.eslint.json
**/tsconfig.docs.json
**/docs/
**/vitest.config.ts

2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"root": true,
"extends": ["neon/common", "neon/node", "neon/typescript", "neon/prettier"],
"parserOptions": {
"project": "./tsconfig.eslint.json"
"project": ["./tsconfig.eslint.json", "./apps/*/tsconfig.eslint.json", "./packages/*/tsconfig.eslint.json"]
},
"rules": {
"@typescript-eslint/consistent-type-definitions": ["error", "interface"]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-dev-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
run: echo ${{ secrets.DOCKER_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin

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

- name: Push image to DockerHub
run: docker push discordjs/proxy:latest
5 changes: 1 addition & 4 deletions .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ jobs:
run: echo ${{ secrets.DOCKER_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin

- name: Build docker image
run: yarn docker build @discordjs/proxy-container -t discordjs/proxy:latest

- name: Tag image with major
run: docker tag discordjs/proxy discordjs/proxy:$(cut -d '.' -f1 <<< $(jq --raw-output '.version' packages/proxy-container/package.json))
run: yarn docker build --buildkit @discordjs/proxy-container -t discordjs/proxy:$(cut -d '.' -f1 <<< $(jq --raw-output '.version' packages/proxy-container/package.json))

- name: Push image to DockerHub
run: docker push --all-tags discordjs/proxy
18 changes: 9 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Packages
node_modules/
node_modules

# Log files
logs/
logs
*.log
npm-debug.log*

Expand All @@ -15,20 +15,20 @@ pids
.env

# Dist
dist/
dist-docs/
dist
dist-docs

# Miscellaneous
.tmp/
.vscode/*
.tmp
.vscode
!.vscode/extensions.json
!.vscode/settings.json
.idea/
.idea
.DS_Store
.turbo
tsconfig.tsbuildinfo
coverage/
out/
coverage
out

# yarn
.pnp.*
Expand Down
5 changes: 4 additions & 1 deletion .yarn/plugins/@yarnpkg/plugin-docker-build.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,8 @@ module.exports = {
await c({ workspace: e, report: t, destination: u });
});
}
await i.execUtils.pipevp('docker', ['build', ...this.args, '-f', s, '.'], {
const h = this.buildKit ? ['buildx', 'build'] : ['build'];
await i.execUtils.pipevp('docker', [...h, ...this.args, '-f', s, '.'], {
cwd: o,
strict: !0,
stdin: this.context.stdin,
Expand All @@ -241,13 +242,15 @@ module.exports = {
'yarn docker build --copy secret.key --copy config.json @foo/bar',
],
['Install production dependencies only', 'yarn docker build --production @foo/bar'],
['Build a Docker image using BuildKit', 'yarn docker build --buildkit @foo/bar'],
],
})),
d([r.Command.String()], f.prototype, 'workspaceName', void 0),
d([r.Command.Proxy()], f.prototype, 'args', void 0),
d([r.Command.String('-f,--file')], f.prototype, 'dockerFilePath', void 0),
d([r.Command.Array('--copy')], f.prototype, 'copyFiles', void 0),
d([r.Command.Boolean('--production')], f.prototype, 'production', void 0),
d([r.Command.Boolean('--buildkit')], f.prototype, 'buildKit', void 0),
d([r.Command.Path('docker', 'build')], f.prototype, 'execute', null);
const u = { commands: [f] };
plugin = e;
Expand Down
532 changes: 266 additions & 266 deletions .yarn/releases/yarn-3.5.0.cjs → .yarn/releases/yarn-3.5.1.cjs

Large diffs are not rendered by default.

26 changes: 20 additions & 6 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
logFilters:
# MISSING_PEER_DEPENDENCY
- code: YN0002
level: discard
# FETCH_NOT_CACHED
- code: YN0013
level: discard
# NODE_GYP_INJECTED
- code: YN0032
level: discard
# INCOMPATIBLE_PEER_DEPENDENCY
- code: YN0060
level: discard

nodeLinker: node-modules

packageExtensions:
'@storybook/core-common@*':
dependencies:
'@storybook/react-vite': 7.0.7

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: '@yarnpkg/plugin-interactive-tools'
Expand All @@ -10,9 +29,4 @@ plugins:
- path: .yarn/plugins/@yarnpkg/plugin-docker-build.cjs
spec: 'https://github.com/Dcard/yarn-plugins/releases/latest/download/plugin-docker-build.js'

yarnPath: .yarn/releases/yarn-3.5.0.cjs

packageExtensions:
'@storybook/core-common@*':
dependencies:
'@storybook/react-vite': '7.0.7'
yarnPath: .yarn/releases/yarn-3.5.1.cjs
1 change: 1 addition & 0 deletions apps/guide/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
next-env.d.ts
21 changes: 8 additions & 13 deletions apps/guide/.gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Packages
node_modules/
node_modules

# Log files
logs/
logs
*.log
npm-debug.log*

Expand All @@ -16,18 +16,13 @@ pids
.env*.local

# Dist
dist/
typings/
.cache/
build/
.contentlayer
.next
public/searchIndex
src/styles/unocss.css
.next/

# Miscellaneous
.tmp/
coverage/
.vercel
public/searchIndex
.tmp
.vscode
lighthouse-results/
.contentlayer
lighthouse-results

18 changes: 5 additions & 13 deletions apps/guide/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
# Autogenerated
CHANGELOG.md
.contentlayer
.next
.turbo
dist/
docs/**/*
!docs/index.yml
!docs/README.md
coverage/
.cache
build/
.vscode
coverage
src/styles/unocss.css
api/
.next/
.vercel/
.cache/
next-env.d.ts
20 changes: 8 additions & 12 deletions apps/guide/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@
"test": "vitest run",
"test:lighthouse": "lighthouse http://localhost:3000 --output-path=./lighthouse-results",
"build:local": "yarn build:prod",
"build:prod": "yarn workspaces foreach -ptR run build && yarn build:css && yarn build:next",
"build:prod": "yarn build:css && yarn build:next",
"build:next": "next build",
"build:css": "yarn generate:css",
"build:analyze": "cross-env-shell ANALYZE=true yarn build:prod",
"build:analyze": "cross-env ANALYZE=true yarn build:prod",
"preview": "next start",
"dev": "concurrently 'yarn dev:contentlayer' 'yarn dev:css' 'yarn dev:next'",
"dev": "concurrently 'yarn dev:css' 'yarn dev:next'",
"dev:next": "next dev",
"dev:css": "yarn generate:css --watch",
"dev:contentlayer": "contentlayer dev",
"generate:css": "unocss 'src/**/*.tsx' 'contentlayer.config.ts' '../../packages/ui/src/lib/components/**/*.tsx' --out-file ./src/styles/unocss.css --config ../../unocss.config.ts",
"lint": "prettier --check . && cross-env TIMING=1 eslint src --ext .mjs,.js,.cjs,.ts,.tsx --format=pretty",
"format": "prettier --write . && cross-env TIMING=1 eslint src --ext .mjs,.js,.cjs,.ts,.tsx --fix --format=pretty",
Expand Down Expand Up @@ -49,7 +48,7 @@
"@discordjs/ui": "workspace:^",
"@react-icons/all-files": "^4.1.0",
"@vercel/analytics": "^1.0.0",
"@vercel/edge-config": "^0.1.8",
"@vercel/edge-config": "^0.1.9",
"@vercel/og": "^0.5.4",
"ariakit": "^2.0.0-next.44",
"cmdk": "^0.2.0",
Expand All @@ -60,13 +59,9 @@
"react": "^18.2.0",
"react-custom-scrollbars-2": "^4.5.0",
"react-dom": "^18.2.0",
"react-use": "^17.4.0",
"rehype-autolink-headings": "^6.1.1",
"rehype-ignore": "^1.0.5",
"rehype-raw": "^6.1.1",
"rehype-slug": "^5.1.0",
"remark-gfm": "^3.0.1",
"server-only": "^0.0.1",
"sharp": "^0.32.1"
},
"devDependencies": {
Expand All @@ -85,18 +80,19 @@
"concurrently": "^8.0.1",
"cross-env": "^7.0.3",
"eslint": "^8.39.0",
"eslint-config-neon": "^0.1.42",
"eslint-config-neon": "^0.1.45",
"eslint-formatter-pretty": "^5.0.0",
"happy-dom": "^9.10.1",
"happy-dom": "^9.10.6",
"hast-util-to-string": "^2.0.0",
"hastscript": "^7.2.0",
"html-escaper": "^3.0.3",
"lighthouse": "^10.1.1",
"prettier": "^2.8.8",
"turbo": "^1.9.4-canary.7",
"typescript": "^5.0.4",
"unocss": "^0.51.8",
"vercel": "^29.0.3",
"vitest": "^0.29.8"
"vitest": "^0.30.1"
},
"engines": {
"node": ">=18.13.0"
Expand Down
9 changes: 1 addition & 8 deletions apps/guide/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@
"strictNullChecks": true,
"moduleResolution": "node"
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"next-env.d.ts",
"types.d.ts",
".next/types/**/*.ts",
".contentlayer/generated"
],
"include": ["src/**/*.ts", "src/**/*.tsx", "next-env.d.ts", ".next/types/**/*.ts", ".contentlayer/generated"],
"exclude": ["node_modules"]
}
1 change: 0 additions & 1 deletion apps/guide/types.d.ts

This file was deleted.

1 change: 1 addition & 0 deletions apps/website/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
next-env.d.ts
Loading

0 comments on commit 7e875f6

Please sign in to comment.