Skip to content

Commit 3a8b5aa

Browse files
authored
Maintenance (#205)
* pnpm 10 * update eslint * update deps * improve exports * fix build
1 parent 31cfeb5 commit 3a8b5aa

File tree

12 files changed

+1914
-2812
lines changed

12 files changed

+1914
-2812
lines changed

.changeset/chilled-walls-try.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"esbuild-cf-functions-plugin": patch
3+
---
4+
5+
Improved pkg.json `exports`

.eslintrc.js

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

.github/workflows/ci.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
with:
1818
node-version: 18
1919

20+
- run: npm i -g corepack
21+
2022
- run: corepack enable
2123

2224
- name: find pnpm cache path
@@ -33,7 +35,7 @@ jobs:
3335
- name: Install dependencies
3436
run: pnpm install --frozen-lockfile
3537

36-
- run: pnpm lint --format compact
38+
- run: pnpm lint
3739

3840
typecheck:
3941
runs-on: ubuntu-latest
@@ -45,6 +47,8 @@ jobs:
4547
with:
4648
node-version: 18
4749

50+
- run: npm i -g corepack
51+
4852
- run: corepack enable
4953

5054
- name: find pnpm cache path
@@ -73,6 +77,8 @@ jobs:
7377
with:
7478
node-version: 18
7579

80+
- run: npm i -g corepack
81+
7682
- run: corepack enable
7783

7884
- name: find pnpm cache path
@@ -107,6 +113,8 @@ jobs:
107113
with:
108114
node-version: 18
109115

116+
- run: npm i -g corepack
117+
110118
- run: corepack enable
111119

112120
- name: find pnpm cache path

eslint.config.js

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
import antfu from "@antfu/eslint-config"
2+
3+
export default antfu(
4+
{
5+
ignores: ["**/*.json"],
6+
markdown: false,
7+
stylistic: false,
8+
jsonc: false,
9+
jsx: false,
10+
toml: false,
11+
yaml: false,
12+
test: { overrides: { "test/no-import-node-test": "off" } },
13+
typescript: {
14+
tsconfigPath: "tsconfig.json",
15+
overrides: {
16+
"no-console": "off",
17+
"ts/no-use-before-define": "off",
18+
"ts/consistent-type-definitions": "off",
19+
"ts/consistent-type-imports": ["error", { fixStyle: "inline-type-imports" }],
20+
"ts/no-unsafe-argument": "off",
21+
"ts/no-unsafe-assignment": "off",
22+
"node/prefer-global/process": "off",
23+
"antfu/no-top-level-await": "off",
24+
"import/consistent-type-specifier-style": "off",
25+
26+
"perfectionist/sort-imports": [
27+
"error",
28+
{
29+
type: "natural",
30+
internalPattern: ["@/.+?", "~/.+?"],
31+
newlinesBetween: "always",
32+
groups: [
33+
["builtin", "builtin-type"],
34+
["external", "external-type"],
35+
["internal", "internal-type"],
36+
["parent", "parent-type"],
37+
["sibling", "sibling-type"],
38+
["index", "index-type"],
39+
"object",
40+
"unknown",
41+
],
42+
},
43+
],
44+
},
45+
},
46+
},
47+
{
48+
files: ["example/**"],
49+
rules: {
50+
"no-var": "off",
51+
"vars-on-top": "off",
52+
"no-console": "off",
53+
"prefer-destructuring": "off",
54+
"unused-imports/no-unused-vars": "off",
55+
"unicorn/prefer-node-protocol": "off",
56+
},
57+
},
58+
)

example/.eslintrc.js

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

example/infra/terraform.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = "1.9.6"
2+
required_version = "1.10.5"
33

44
required_providers {
55
aws = {

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"plan": "pnpm build && terraform -chdir=infra plan"
1010
},
1111
"devDependencies": {
12-
"@types/aws-lambda": "8.10.146",
12+
"@types/aws-lambda": "8.10.147",
1313
"esbuild-cf-functions-plugin": "workspace:*"
1414
}
1515
}

package.json

Lines changed: 41 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "esbuild-cf-functions-plugin",
3+
"type": "module",
34
"description": "A plugin to configure ESBuild for building code compatible with CloudFront Functions",
45
"version": "1.1.0",
56
"author": "BeeeQueue <adam@haglund.dev>",
@@ -20,7 +21,7 @@
2021
"bundler",
2122
"plugin"
2223
],
23-
"packageManager": "pnpm@9.15.2",
24+
"packageManager": "pnpm@10.4.0",
2425
"engines": {
2526
"node": ">=18"
2627
},
@@ -33,10 +34,16 @@
3334
"types": "./dist/plugin.d.ts",
3435
"exports": {
3536
".": {
36-
"require": "./dist/plugin.js",
37-
"import": "./dist/plugin.mjs",
38-
"types": "./dist/plugin.d.ts"
39-
}
37+
"require": {
38+
"types": "./dist/plugin.d.ts",
39+
"default": "./dist/plugin.js"
40+
},
41+
"import": {
42+
"types": "./dist/plugin.d.mts",
43+
"default": "./dist/plugin.mjs"
44+
}
45+
},
46+
"./package.json": "./package.json"
4047
},
4148
"simple-git-hooks": {
4249
"pre-commit": "pnpm lint-staged"
@@ -60,30 +67,43 @@
6067
"esbuild": ">=0.14.46"
6168
},
6269
"devDependencies": {
63-
"@beequeue/eslint-plugin": "4.0.1",
70+
"@antfu/eslint-config": "4.2.0",
6471
"@changesets/changelog-github": "0.5.0",
65-
"@changesets/cli": "2.27.11",
72+
"@changesets/cli": "2.27.12",
6673
"@tsconfig/node18": "18.2.4",
67-
"@types/node": "20.17.10",
68-
"@vitest/coverage-v8": "2.1.8",
74+
"@types/node": "22.13.4",
75+
"@vitest/coverage-v8": "3.0.5",
6976
"dotenv": "16.4.7",
70-
"eslint": "8.57.0",
71-
"lint-staged": "15.2.9",
77+
"eslint": "9.20.1",
78+
"lint-staged": "15.4.3",
7279
"nanoid": "5.0.9",
73-
"prettier": "3.4.2",
80+
"prettier": "4.0.0-alpha.10",
7481
"simple-git-hooks": "2.11.1",
7582
"ts-dedent": "2.2.0",
76-
"tsup": "8.3.5",
77-
"typescript": "5.7.2",
78-
"vitest": "2.1.8"
83+
"tsup": "8.3.6",
84+
"typescript": "5.7.3",
85+
"vitest": "3.0.5"
7986
},
8087
"pnpm": {
8188
"overrides": {
82-
"array-includes": "npm:@nolyfill/array-includes@latest",
83-
"array.prototype.flat": "npm:@nolyfill/array.prototype.flat@latest",
84-
"hasown": "npm:@nolyfill/hasown@latest",
85-
"object.assign": "npm:@nolyfill/object.assign@latest",
86-
"object.values": "npm:@nolyfill/object.values@latest"
87-
}
89+
"@eslint/markdown": "-",
90+
"@stylistic/eslint-plugin": "-",
91+
"eslint-plugin-jsonc": "-",
92+
"eslint-plugin-toml": "-",
93+
"eslint-plugin-vue": "-",
94+
"eslint-processor-vue-blocks": "-",
95+
"eslint-plugin-yml": "-",
96+
"jsonc-eslint-parser": "-",
97+
"toml-eslint-parser": "-",
98+
"yaml-eslint-parser": "-",
99+
"is-core-module": "npm:@nolyfill/is-core-module@^1",
100+
"safer-buffer": "npm:@nolyfill/safer-buffer@^1"
101+
},
102+
"ignoredBuiltDependencies": [
103+
"simple-git-hooks"
104+
],
105+
"onlyBuiltDependencies": [
106+
"esbuild"
107+
]
88108
}
89109
}

0 commit comments

Comments
 (0)