-
-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: change the build config to bundle deps correctly, fix #111 #112
Changes from all commits
69ec774
2b2012c
109a70b
a9b084b
97ed2be
ed6c34a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ | |
"typecheck": "tsc", | ||
"prepublishOnly": "nr build", | ||
"release": "bumpp && pnpm publish --no-git-checks", | ||
"test": "vitest" | ||
"test": "unbuild && vitest" | ||
}, | ||
"dependencies": { | ||
"@antfu/ni": "^0.21.12", | ||
|
@@ -41,7 +41,6 @@ | |
"execa": "^8.0.1", | ||
"picocolors": "^1.0.0", | ||
"prompts": "^2.4.2", | ||
"semver": "^7.6.0", | ||
"ufo": "^1.5.3", | ||
"unconfig": "^0.3.13", | ||
"yargs": "^17.7.2" | ||
|
@@ -67,6 +66,7 @@ | |
"npm-package-arg": "^11.0.2", | ||
"npm-registry-fetch": "^16.2.1", | ||
"rimraf": "^5.0.5", | ||
"semver": "^7.6.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Rollup has trouble handling a CommonJS external from a transitive dependency, so let's bundle |
||
"taze": "workspace:*", | ||
"typescript": "^5.4.5", | ||
"unbuild": "^2.0.0", | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ import type { Argv } from 'yargs' | |
import yargs from 'yargs' | ||
import { hideBin } from 'yargs/helpers' | ||
import c from 'picocolors' | ||
import { version } from '../package.json' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since we've disabled the |
||
import pkgJson from '../package.json' | ||
import { check } from './commands/check' | ||
import { usage } from './commands/usage' | ||
import { resolveConfig } from './config' | ||
|
@@ -142,7 +142,7 @@ yargs(hideBin(process.argv)) | |
) | ||
.showHelpOnFail(false) | ||
.alias('h', 'help') | ||
.version('version', version) | ||
.version('version', pkgJson.version) | ||
.alias('v', 'version') | ||
.help() | ||
.argv |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import path from 'node:path' | ||
import { expect, it } from 'vitest' | ||
import { execa } from 'execa' | ||
|
||
it('taze cli should just works', async () => { | ||
const binPath = path.resolve(__dirname, '../bin/taze.mjs') | ||
|
||
const proc = await execa(process.execPath, [binPath], { stdio: 'pipe' }) | ||
|
||
expect(proc.stderr).toBe('') | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new test case is against the
dist
, so thedist
needs to be built before the test happens.