mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-25 08:48:08 +02:00
Fix pnpm artifact smoke build approvals
This commit is contained in:
parent
301b061937
commit
d62304a068
4 changed files with 15 additions and 3 deletions
|
|
@ -462,12 +462,13 @@ export function npmSmokePackageJson(layout) {
|
|||
devDependencies: {
|
||||
'better-sqlite3': '^12.6.2',
|
||||
},
|
||||
pnpm: {
|
||||
onlyBuiltDependencies: ['better-sqlite3'],
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export function npmSmokePnpmWorkspaceYaml() {
|
||||
return ['packages:', ' - "."', 'allowBuilds:', ' better-sqlite3: true', ''].join('\n');
|
||||
}
|
||||
|
||||
export function npmVerifySource() {
|
||||
return `
|
||||
const cli = await import('@kaelio/ktx');
|
||||
|
|
@ -1172,6 +1173,7 @@ async function verifyNpmArtifacts(layout, tmpRoot) {
|
|||
join(projectDir, 'package.json'),
|
||||
`${JSON.stringify(npmSmokePackageJson(layout), null, 2)}\n`,
|
||||
);
|
||||
await writeFile(join(projectDir, 'pnpm-workspace.yaml'), npmSmokePnpmWorkspaceYaml());
|
||||
await writeFile(join(projectDir, 'verify-npm.mjs'), npmVerifySource());
|
||||
await writeFile(join(projectDir, 'verify-installed-cli.mjs'), npmRuntimeSmokeSource());
|
||||
await writeFile(join(projectDir, 'verify-installed-demo.mjs'), npmDemoSmokeSource());
|
||||
|
|
@ -1192,6 +1194,7 @@ async function verifyNpmDemoArtifacts(layout, tmpRoot) {
|
|||
const projectDir = join(tmpRoot, 'npm-demo-clean-install');
|
||||
await mkdir(projectDir, { recursive: true });
|
||||
await writeFile(join(projectDir, 'package.json'), `${JSON.stringify(npmSmokePackageJson(layout), null, 2)}\n`);
|
||||
await writeFile(join(projectDir, 'pnpm-workspace.yaml'), npmSmokePnpmWorkspaceYaml());
|
||||
await writeFile(join(projectDir, 'verify-installed-demo.mjs'), npmDemoSmokeSource());
|
||||
|
||||
await runCommand('pnpm', ['install'], { cwd: projectDir });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue