Skip to content

Commit

Permalink
fix: resolve to package.json only if tsup key exists (#622)
Browse files Browse the repository at this point in the history
Co-authored-by: EGOIST <hi@egoist.sh>
  • Loading branch information
schelmo and EGOIST committed May 5, 2022
1 parent f4a56ed commit 67eea53
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [14.x, 12.20.0]
node-version: [14.x, 16.x]

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

Expand Down
9 changes: 5 additions & 4 deletions src/load.ts
Expand Up @@ -36,8 +36,8 @@ export async function loadTsupConfig(
cwd: string
): Promise<{ path?: string; data?: ReturnType<typeof defineConfig> }> {
const configJoycon = new JoyCon()
const configPath = await configJoycon.resolve(
[
const configPath = await configJoycon.resolve({
files: [
'tsup.config.ts',
'tsup.config.js',
'tsup.config.cjs',
Expand All @@ -46,8 +46,9 @@ export async function loadTsupConfig(
'package.json',
],
cwd,
path.parse(cwd).root
)
stopDir: path.parse(cwd).root,
packageKey: 'tsup',
})

if (configPath) {
if (configPath.endsWith('.json')) {
Expand Down
3 changes: 2 additions & 1 deletion test/package.json
Expand Up @@ -5,5 +5,6 @@
"graphql": "^15.3.0",
"graphql-tools": "^5.0.0",
"vue": "3.0.5"
}
},
"tsup": {}
}

1 comment on commit 67eea53

@vercel
Copy link

@vercel vercel bot commented on 67eea53 May 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

tsup – ./

tsup-egoist.vercel.app
tsup.vercel.app
tsup.egoist.sh
tsup-git-main-egoist.vercel.app

Please sign in to comment.