Skip to content

Commit e7d6c65

Browse files
committed
pnpm workspace file
1 parent 906f293 commit e7d6c65

7 files changed

Lines changed: 121 additions & 67 deletions

File tree

.npmrc

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

Dockerfile

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,33 +15,32 @@ FROM base as base_deps
1515

1616
ENV CI=1
1717

18-
COPY .npmrc package.json pnpm-lock.yaml ./
18+
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
1919
COPY patches/ patches/
2020

2121
RUN corepack enable
2222
RUN corepack prepare --activate
2323

2424
# Install dependencies
25-
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
26-
pnpm install --frozen-lockfile
25+
RUN pnpm install --frozen-lockfile --ignore-scripts
26+
RUN pnpm rebuild --pending
2727

2828
FROM base_deps as build
2929

30-
COPY knexfile.js tsconfig.json tsup.config.ts ./
30+
COPY knexfile.js tsconfig.json tsdown.config.ts ./
3131
COPY src/ src/
3232

33-
RUN pnpm run build
33+
RUN node --run build
3434

3535
FROM base_deps AS docs
3636

3737
COPY docs/openapi.yaml docs/openapi.yaml
3838

39-
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
40-
pnpm run docs
39+
RUN node --run docs
4140

4241
FROM base
4342

44-
COPY .npmrc knexfile.js package.json pnpm-lock.yaml ./
43+
COPY knexfile.js package.json pnpm-lock.yaml ./
4544
COPY src/ src/
4645
COPY migrations/ migrations/
4746

@@ -54,4 +53,4 @@ ENV NODE_OPTIONS="--enable-source-maps"
5453
# Warnings disabled, we know what we're doing and they're annoying
5554
ENV NODE_NO_WARNINGS=1
5655

57-
CMD ["node", "dist/index.js"]
56+
CMD ["node", "--run", "start"]

eslint.config.js

Lines changed: 39 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,61 @@
11
import antfu from "@antfu/eslint-config"
22

3+
const sortImports = {
4+
"perfectionist/sort-imports": [
5+
"error",
6+
{
7+
type: "natural",
8+
internalPattern: ["^@/", "^~/", "^#[a-zA-Z0-9-]+/"],
9+
newlinesBetween: "always",
10+
groups: [
11+
["builtin", "builtin-type"],
12+
["external", "external-type"],
13+
["internal", "internal-type"],
14+
["parent", "parent-type"],
15+
["sibling", "sibling-type"],
16+
["index", "index-type"],
17+
"object",
18+
"unknown",
19+
],
20+
},
21+
],
22+
}
23+
324
export default antfu({
425
ignores: ["**/*.json"],
526
markdown: false,
627
stylistic: false,
728
jsonc: false,
829
jsx: false,
930
toml: false,
10-
yaml: false,
1131
test: { overrides: { "test/no-import-node-test": "off" } },
1232
typescript: {
1333
tsconfigPath: "tsconfig.json",
34+
ignoresTypeAware: ["copy.ts", "*.config.*"],
35+
36+
overridesTypeAware: {
37+
"ts/no-floating-promises": [
38+
"error",
39+
{
40+
allowForKnownSafeCalls: [
41+
{ from: "package", package: "node:test", name: ["describe", "it", "test"] },
42+
],
43+
},
44+
],
45+
},
46+
1447
overrides: {
1548
"no-console": "off",
16-
"ts/no-use-before-define": "off",
49+
"antfu/no-top-level-await": "off",
50+
"node/prefer-global/process": "off",
1751
"ts/consistent-type-definitions": "off",
1852
"ts/consistent-type-imports": ["error", { fixStyle: "inline-type-imports" }],
1953
"ts/no-unsafe-argument": "off",
2054
"ts/no-unsafe-assignment": "off",
21-
"node/prefer-global/process": "off",
22-
"antfu/no-top-level-await": "off",
23-
"import/consistent-type-specifier-style": "off",
55+
"ts/no-use-before-define": "off",
56+
"unused-imports/no-unused-vars": "off",
2457

25-
"perfectionist/sort-imports": [
26-
"error",
27-
{
28-
type: "natural",
29-
internalPattern: ["^@/", "^~/", "^#[a-zA-Z0-9-]+/"],
30-
newlinesBetween: "always",
31-
groups: [
32-
["builtin", "builtin-type"],
33-
["external", "external-type"],
34-
["internal", "internal-type"],
35-
["parent", "parent-type"],
36-
["sibling", "sibling-type"],
37-
["index", "index-type"],
38-
"object",
39-
"unknown",
40-
],
41-
},
42-
],
58+
...sortImports,
4359
},
4460
},
4561
})

package.json

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -62,26 +62,5 @@
6262
"valibot": "1.1.0",
6363
"vitest": "3.2.3",
6464
"xior": "0.7.8"
65-
},
66-
"pnpm": {
67-
"overrides": {
68-
"@eslint/markdown": "-",
69-
"@stylistic/eslint-plugin": "-",
70-
"eslint-plugin-jsonc": "-",
71-
"eslint-plugin-toml": "-",
72-
"eslint-plugin-vue": "-",
73-
"eslint-plugin-yml": "-",
74-
"eslint-processor-vue-blocks": "-",
75-
"jsonc-eslint-parser": "-",
76-
"toml-eslint-parser": "-",
77-
"yaml-eslint-parser": "-",
78-
"is-core-module": "npm:@nolyfill/is-core-module@^1",
79-
"safe-buffer": "npm:@nolyfill/safe-buffer@^1"
80-
},
81-
"onlyBuiltDependencies": ["better-sqlite3"],
82-
"ignoredBuiltDependencies": ["@biomejs/biome", "esbuild", "simple-git-hooks"],
83-
"patchedDependencies": {
84-
"knex": "patches/knex.patch"
85-
}
8665
}
8766
}

pnpm-lock.yaml

Lines changed: 50 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
packages: []
2+
3+
ignoredBuiltDependencies: ["@biomejs/biome", esbuild, simple-git-hooks]
4+
onlyBuiltDependencies: [better-sqlite3]
5+
6+
overrides:
7+
"@antfu/eslint-config>@eslint/markdown": "-"
8+
"@antfu/eslint-config>@stylistic/eslint-plugin": "-"
9+
"@antfu/eslint-config>eslint-plugin-jsonc": "-"
10+
"@antfu/eslint-config>eslint-plugin-toml": "-"
11+
"@antfu/eslint-config>eslint-plugin-vue": "-"
12+
"@antfu/eslint-config>eslint-processor-vue-blocks": "-"
13+
"@antfu/eslint-config>jsonc-eslint-parser": "-"
14+
"@antfu/eslint-config>toml-eslint-parser": "-"
15+
"@antfu/eslint-config>vitest": "-"
16+
eslint-plugin-pnpm>jsonc-eslint-parser: "-"
17+
is-core-module: npm:@nolyfill/is-core-module@^1
18+
safe-buffer: npm:@nolyfill/safe-buffer@^1
19+
patchedDependencies:
20+
knex: patches/knex.patch
21+
22+
registry: https://npm.h.haglund.dev
23+
savePrefix: ""
24+
shellEmulator: true

tsdown.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ export default defineConfig({
3333
cpSync(
3434
"node_modules/better-sqlite3/build/Release/better_sqlite3.node",
3535
"dist/better_sqlite3.node",
36-
{ recursive: true },
3736
)
3837
},
3938
},

0 commit comments

Comments
 (0)