Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
node_modules
**/dist
@app/*/types
/data/schema.graphql
/data/schema.sql
/@app/graphql/index.*
/@app/graphql/src
/@app/client/.next
.next
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
.next
node_modules
dist
@app/*/types/**
/heroku-setup
/yarn-error.log
/@app/e2e/cypress/videos
/@app/e2e/cypress/screenshots
/@app/graphql/index.*
/@app/graphql/src/index.*
.agignore
*.tsbuildinfo
.ethereal
Expand Down
3 changes: 3 additions & 0 deletions @app/client/src/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ if (!process.env.ROOT_URL) {
// config bloat in next.js 15
// https://nextjs.org/docs/15/pages/api-reference/config/next-config-js/bundlePagesRouterDependencies
transpilePackages: [
"@app/components",
"@app/graphql",
"@app/lib",
"@ant-design/icons",
"@ant-design/icons-svg",
"rc-cascader",
Expand Down
20 changes: 5 additions & 15 deletions @app/client/src/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,18 @@
"compilerOptions": {
"composite": false,
"incremental": false,
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"target": "es2024",
"lib": ["es2024", "dom", "dom.iterable"],
"noEmit": true,
"esModuleInterop": true,
"declaration": false,
"declarationMap": false,
"isolatedModules": true,
"module": "esnext",
"moduleResolution": "node"
"moduleResolution": "bundler"
},
"exclude": [
"node_modules"
],
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx"
],
"exclude": ["node_modules"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"references": [
{
"path": "../../config"
Expand Down
8 changes: 4 additions & 4 deletions @app/components/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ that Next.js depends upon.

## Compilation

Note that these components are compiled to on-disk JS in the same way as the
other packages (except client) so that Next.js can require them as if they were
regular NPM dependencies (thus Next does not need to know about monorepos, or
how to transpile this code).
Note that these components are not compiled to on-disk JS in the same way as the
other packages. `tsc -b` only generates types declarations into /types. This is
because we delegate responsibility for compiling the sources to Next.js, which
is opinionated about optimizing the dependency graph.
8 changes: 7 additions & 1 deletion @app/components/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
{
"name": "@app/components",
"version": "0.0.0",
"main": "dist/index.js",
"type": "module",
"types": "types/index.d.ts",
"exports": {
".": {
"types": "./types/index.d.ts",
"default": "./src/index.tsx"
}
},
"scripts": {
"build": "tsc -b",
"test": "cross-env NODE_ENV=test NODE_OPTIONS=\"${NODE_OPTIONS:-} --require @app/config/env\" jest"
Expand Down
18 changes: 8 additions & 10 deletions @app/components/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,21 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"noEmit": false,
"emitDeclarationOnly": true,
"rootDir": "src",
"outDir": "dist",
"tsBuildInfoFile": "dist/tsconfig.tsbuildinfo",
"declarationDir": "dist",
"lib": ["dom", "dom.iterable", "esnext"],
"target": "es5",
"declarationDir": "types",
"declarationMap": false,
"tsBuildInfoFile": "types/tsconfig.tsbuildinfo",
"target": "es2024",
"lib": ["es2024", "dom", "dom.iterable"],
"jsx": "preserve",
"module": "esnext",
"moduleResolution": "bundler",
"jsx": "react"
"moduleResolution": "bundler"
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
"references": [
{
"path": "../graphql"
},
{
"path": "../lib"
}
]
}
4 changes: 2 additions & 2 deletions @app/config/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"outDir": "dist",
"tsBuildInfoFile": "dist/tsconfig.tsbuildinfo",
"declarationDir": "dist",
"lib": ["es2018", "esnext.asynciterable"],
"target": "es2018"
"lib": ["es2024"],
"target": "es2024"
},
"include": ["src"]
}
4 changes: 2 additions & 2 deletions @app/e2e/cypress/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"esModuleInterop": true,
"strict": true,
"baseUrl": "node_modules",
"target": "es5",
"lib": ["es5", "dom"],
"target": "es2024",
"lib": ["es2024", "dom"],
"types": ["cypress"]
},
"include": ["**/*.ts"]
Expand Down
2 changes: 1 addition & 1 deletion @app/graphql/codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ config:
withHooks: true
reactApolloVersion: 3
generates:
index.tsx:
src/index.tsx:
plugins:
- add:
content: "/* DO NOT EDIT! This file is auto-generated by graphql-code-generator - see `codegen.yml` */"
Expand Down
9 changes: 7 additions & 2 deletions @app/graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@
"private": true,
"version": "0.0.0",
"type": "module",
"main": "index.js",
"types": "index.d.ts",
"types": "types/index.d.ts",
"exports": {
".": {
"types": "./types/index.d.ts",
"default": "./src/index.tsx"
}
},
"scripts": {
"build": "yarn codegen && tsc -b",
"watch": "yarn codegen --watch",
Expand Down
17 changes: 9 additions & 8 deletions @app/graphql/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"noEmit": false,
"rootDir": ".",
"outDir": ".",
"tsBuildInfoFile": "tsconfig.tsbuildinfo",
"declarationDir": ".",
"lib": ["es2018", "esnext.asynciterable"],
"target": "es2018",
"jsx": "react",
"emitDeclarationOnly": true,
"rootDir": "src",
"declarationDir": "types",
"declarationMap": false,
"tsBuildInfoFile": "types/tsconfig.tsbuildinfo",
"lib": ["es2024"],
"target": "es2024",
"jsx": "preserve",
"module": "esnext",
"moduleResolution": "bundler"
},
"include": ["index.tsx"]
"include": ["src/**/*.ts", "src/**/*.tsx"]
}
8 changes: 4 additions & 4 deletions @app/lib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Various utilities, mostly React hooks.

## Compilation

Note that these components are compiled to on-disk JS in the same way as the
other packages (except client) so that Next.js can require them as if they were
regular NPM dependencies (thus Next does not need to know about monorepos, or
how to transpile this code).
Note that these components are not compiled to on-disk JS in the same way as the
other packages. `tsc -b` only generates types declarations into /types. This is
because we delegate responsibility for compiling the sources to Next.js, which
is opinionated about optimizing the dependency graph.
9 changes: 7 additions & 2 deletions @app/lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@
"name": "@app/lib",
"version": "0.0.0",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"types": "types/index.d.ts",
"exports": {
".": {
"types": "./types/index.d.ts",
"default": "./src/index.tsx"
}
},
"scripts": {
"build": "tsc -b",
"test": "cross-env NODE_ENV=test NODE_OPTIONS=\"${NODE_OPTIONS:-} --require @app/config/env\" jest"
Expand Down
13 changes: 7 additions & 6 deletions @app/lib/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"noEmit": false,
"emitDeclarationOnly": true,
"rootDir": "src",
"outDir": "dist",
"tsBuildInfoFile": "dist/tsconfig.tsbuildinfo",
"declarationDir": "dist",
"lib": ["dom", "dom.iterable", "esnext"],
"target": "es5",
"jsx": "react",
"declarationDir": "types",
"declarationMap": false,
"tsBuildInfoFile": "types/tsconfig.tsbuildinfo",
"lib": ["es2024", "dom", "dom.iterable"],
"target": "es2024",
"jsx": "preserve",
"module": "esnext",
"moduleResolution": "bundler"
},
Expand Down
4 changes: 2 additions & 2 deletions @app/server/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"outDir": "dist",
"tsBuildInfoFile": "dist/tsconfig.tsbuildinfo",
"declarationDir": "dist",
"lib": ["es2018", "esnext.asynciterable"],
"target": "es2018"
"lib": ["es2024"],
"target": "es2024"
},
"include": ["src"],
"references": [{ "path": "../config" }, { "path": "../lib" }],
Expand Down
4 changes: 2 additions & 2 deletions @app/worker/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"outDir": "dist",
"tsBuildInfoFile": "dist/tsconfig.tsbuildinfo",
"declarationDir": "dist",
"lib": ["es2018", "esnext.asynciterable"],
"target": "es2018"
"lib": ["es2024"],
"target": "es2024"
},
"include": ["src"],
"references": [{ "path": "../config" }]
Expand Down
3 changes: 1 addition & 2 deletions production.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ COPY --from=builder /app/@app/config/ /app/@app/config/
COPY --from=builder /app/@app/db/ /app/@app/db/
COPY --from=builder /app/@app/graphql/ /app/@app/graphql/
COPY --from=builder /app/@app/lib/ /app/@app/lib/
COPY --from=builder /app/@app/components/package.json /app/@app/components/
COPY --from=builder /app/@app/components/dist/ /app/@app/components/dist/
COPY --from=builder /app/@app/components/ /app/@app/components/
COPY --from=builder /app/@app/client/package.json /app/@app/client/package.json
COPY --from=builder /app/@app/client/src/next.config.js /app/@app/client/src/next.config.js
COPY --from=builder /app/@app/client/.next /app/@app/client/.next
Expand Down
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"jsx": "preserve",
"lib": ["dom", "es2017"],
"target": "esnext",
"lib": ["es2024", "dom"],
"target": "es2024",
"module": "nodenext",
"moduleResolution": "nodenext",
"noFallthroughCasesInSwitch": true,
Expand Down Expand Up @@ -42,6 +42,7 @@
{ "path": "@app/config" },
{ "path": "@app/components" },
{ "path": "@app/graphql" },
{ "path": "@app/lib" },
{ "path": "@app/server" },
{ "path": "@app/worker" }
]
Expand Down
Loading