Skip to content

Commit 471793a

Browse files
chore: Move tanstack.config.js to root directory (#39)
* Move tanstack.config.js to root * Fix missing exit code 1 for errors
1 parent 40a089a commit 471793a

4 files changed

Lines changed: 20 additions & 11 deletions

File tree

bin/config.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,15 @@ Config.prepare(
115115
})
116116
})
117117

118-
program.parseAsync().catch(console.error)
118+
program.parseAsync().catch((error) => {
119+
console.error(error)
120+
process.exit(1)
121+
})
122+
})
123+
.catch((error) => {
124+
console.error(error)
125+
process.exit(1)
119126
})
120-
.catch(console.error)
121127
})
122128
},
123129
)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
],
4444
"packageManager": "pnpm@8.15.1",
4545
"scripts": {
46-
"cipublish": "node bin/config.js publish --cwd config",
46+
"cipublish": "node ./bin/config.js publish --cwd .",
4747
"cipublishforce": "CI=true pnpm cipublish",
4848
"prettier": "prettier --ignore-unknown '**/*'",
4949
"prettier:write": "pnpm run prettier --write",
Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
// @ts-check
22

3-
import { resolve } from 'node:path'
43
import { fileURLToPath } from 'node:url'
54

65
/**
7-
* @type {import('../src/types.js').RunOptions["packages"]}
6+
* @type {import('./src/publish/types.js').RunOptions["packages"]}
87
*/
98
export const packages = [
109
{
@@ -14,7 +13,7 @@ export const packages = [
1413
]
1514

1615
/**
17-
* @type {import('../src/types.js').RunOptions["branchConfigs"]}
16+
* @type {import('./src/publish/types.js').RunOptions["branchConfigs"]}
1817
*/
1918
export const branchConfigs = {
2019
main: {
@@ -31,9 +30,7 @@ export const branchConfigs = {
3130
},
3231
}
3332

34-
const __dirname = fileURLToPath(new URL('.', import.meta.url))
35-
3633
/**
37-
* @type {import('../src/types.js').RunOptions["rootDir"]}
34+
* @type {import('./src/publish/types.js').RunOptions["rootDir"]}
3835
*/
39-
export const rootDir = resolve(__dirname, '..')
36+
export const rootDir = fileURLToPath(new URL('.', import.meta.url))

tsconfig.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,11 @@
2323
"strict": true,
2424
"target": "ES2020"
2525
},
26-
"include": [".eslintrc.cjs", "bin", "prettier.config.js", "src"]
26+
"include": [
27+
"bin",
28+
"src",
29+
".eslintrc.cjs",
30+
"prettier.config.js",
31+
"tanstack.config.js"
32+
]
2733
}

0 commit comments

Comments
 (0)