Skip to content

Commit 67eea53

Browse files
schelmoEGOIST
andauthored
fix: resolve to package.json only if tsup key exists (#622)
Co-authored-by: EGOIST <hi@egoist.sh>
1 parent f4a56ed commit 67eea53

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
matrix:
1515
os: [ubuntu-latest, windows-latest]
16-
node-version: [14.x, 12.20.0]
16+
node-version: [14.x, 16.x]
1717

1818
runs-on: ${{ matrix.os }}
1919

src/load.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ export async function loadTsupConfig(
3636
cwd: string
3737
): Promise<{ path?: string; data?: ReturnType<typeof defineConfig> }> {
3838
const configJoycon = new JoyCon()
39-
const configPath = await configJoycon.resolve(
40-
[
39+
const configPath = await configJoycon.resolve({
40+
files: [
4141
'tsup.config.ts',
4242
'tsup.config.js',
4343
'tsup.config.cjs',
@@ -46,8 +46,9 @@ export async function loadTsupConfig(
4646
'package.json',
4747
],
4848
cwd,
49-
path.parse(cwd).root
50-
)
49+
stopDir: path.parse(cwd).root,
50+
packageKey: 'tsup',
51+
})
5152

5253
if (configPath) {
5354
if (configPath.endsWith('.json')) {

test/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
"graphql": "^15.3.0",
66
"graphql-tools": "^5.0.0",
77
"vue": "3.0.5"
8-
}
8+
},
9+
"tsup": {}
910
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy