We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 93298ca commit 5fa7708Copy full SHA for 5fa7708
1 file changed
scripts/generate.mjs
@@ -74,16 +74,21 @@ async function getJsonSchemaToTypescript() {
74
75
execSync(
76
`
77
- set -eu
+ set -eux
78
+
79
cd ./node_modules/json-schema-to-typescript
80
rm -rf dist
- # due to installation on node_modules, some of these steps can fail
81
- # built version still behaves correctly though
82
- set +e
83
- yarn
84
- yarn run clean
85
- yarn run build:server
86
- set -e
+ npm install
+ npm run clean
+ # With yarn 3, the 'test/' folder is not present, so all built files are put directly in the
+ # 'dist/' folder instead of 'dist/src/'.
87
+ #
88
+ # Using an explicit '--rootDir' fixes this issue.
89
90
+ # Also, tsc fails with type errors, but the built files are fine.
91
+ npm exec -- tsc --declaration --rootDir . || true
92
`,
93
{
94
stdio: 'inherit',
0 commit comments