Skip to content
Permalink
Browse files
fix: resolve to package.json only if tsup key exists (#622)
Co-authored-by: EGOIST <hi@egoist.sh>
  • Loading branch information
schelmo and egoist committed May 5, 2022
1 parent f4a56ed commit 67eea535838e4419cdda1ac4a9c591170d71bf90
Showing 3 changed files with 8 additions and 6 deletions.
@@ -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 }}

@@ -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',
@@ -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')) {
@@ -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.