diff --git a/bin/config.js b/bin/config.js index e380e78..2d1b388 100755 --- a/bin/config.js +++ b/bin/config.js @@ -115,9 +115,15 @@ Config.prepare( }) }) - program.parseAsync().catch(console.error) + program.parseAsync().catch((error) => { + console.error(error) + process.exit(1) + }) + }) + .catch((error) => { + console.error(error) + process.exit(1) }) - .catch(console.error) }) }, ) diff --git a/package.json b/package.json index ecfa6b9..4cf0c4d 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ ], "packageManager": "pnpm@8.15.1", "scripts": { - "cipublish": "node bin/config.js publish --cwd config", + "cipublish": "node ./bin/config.js publish --cwd .", "cipublishforce": "CI=true pnpm cipublish", "prettier": "prettier --ignore-unknown '**/*'", "prettier:write": "pnpm run prettier --write", diff --git a/config/tanstack.config.js b/tanstack.config.js similarity index 51% rename from config/tanstack.config.js rename to tanstack.config.js index 1b534c4..6e9ee42 100644 --- a/config/tanstack.config.js +++ b/tanstack.config.js @@ -1,10 +1,9 @@ // @ts-check -import { resolve } from 'node:path' import { fileURLToPath } from 'node:url' /** - * @type {import('../src/types.js').RunOptions["packages"]} + * @type {import('./src/publish/types.js').RunOptions["packages"]} */ export const packages = [ { @@ -14,7 +13,7 @@ export const packages = [ ] /** - * @type {import('../src/types.js').RunOptions["branchConfigs"]} + * @type {import('./src/publish/types.js').RunOptions["branchConfigs"]} */ export const branchConfigs = { main: { @@ -31,9 +30,7 @@ export const branchConfigs = { }, } -const __dirname = fileURLToPath(new URL('.', import.meta.url)) - /** - * @type {import('../src/types.js').RunOptions["rootDir"]} + * @type {import('./src/publish/types.js').RunOptions["rootDir"]} */ -export const rootDir = resolve(__dirname, '..') +export const rootDir = fileURLToPath(new URL('.', import.meta.url)) diff --git a/tsconfig.json b/tsconfig.json index b0b23c3..3fc8ae6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -23,5 +23,11 @@ "strict": true, "target": "ES2020" }, - "include": [".eslintrc.cjs", "bin", "prettier.config.js", "src"] + "include": [ + "bin", + "src", + ".eslintrc.cjs", + "prettier.config.js", + "tanstack.config.js" + ] }