0befb021d0
- moves workspace:* dependencies to dev-dependencies to avoid spreading them in npm releases - remove fix on rollup.external - remove prepublishOnly and postpublish scripts - set bundle packages to private - add release-dump-version that update package.json version before releasing to npm - add release-verify-build that check no externalized twenty package exists in `dist` before releasing to npm - works with new release github action here -> https://github.com/twentyhq/twenty-infra/pull/397
28 lines
798 B
TypeScript
28 lines
798 B
TypeScript
import { readFileSync } from 'fs';
|
|
import { resolve } from 'path';
|
|
|
|
const packages = ['twenty-sdk', 'create-twenty-app'];
|
|
|
|
const verifyUniquePackageVersion = () => {
|
|
const packageVersions = packages.map((pkg) => {
|
|
const packageJsonPath = resolve('packages', pkg, 'package.json');
|
|
|
|
const packageJsonFile = JSON.parse(readFileSync(packageJsonPath, 'utf8'));
|
|
|
|
return packageJsonFile.version as string;
|
|
});
|
|
|
|
if (new Set(packageVersions).size !== 1) {
|
|
console.error(
|
|
`Build check failed: "${packages.join('", "')}" should have the same package.json version. Got ${packageVersions.join(', ')}`,
|
|
);
|
|
process.exit(1);
|
|
return;
|
|
}
|
|
console.log(
|
|
`"${packages.join('", "')}" share the same version ${packageVersions[0]}: OK`,
|
|
);
|
|
};
|
|
|
|
verifyUniquePackageVersion();
|