Skip to content

Commit 9313dca

Browse files
authored
chore: remove obsolete prepublish hook (#4002)
The prepublish hook was previously needed to merge onPublish fields into package.json before publishing (changing 'main' from src/index.ts to lib-commonjs/index.js). This is no longer needed because: 1. All packages now have proper exports field pointing to built files 2. main, module, and types fields already point to lib/ and lib-commonjs/ 3. No packages have onPublish fields anymore (verified with grep) The postbump hook is retained as it's still needed for updating dependency-profiles after version bumps.
1 parent 1dee074 commit 9313dca

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

beachball.config.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,6 @@ const execSync = require('child_process').execSync;
55
module.exports = {
66
disallowedChangeTypes: ['major'],
77
hooks: {
8-
prepublish: (packagePath) => {
9-
const packageJsonPath = path.join(packagePath, 'package.json');
10-
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
11-
if (packageJson.onPublish) {
12-
Object.assign(packageJson, packageJson.onPublish);
13-
delete packageJson.onPublish;
14-
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2) + '\n');
15-
}
16-
},
178
postbump: (packagePath, name) => {
189
if (name === '@fluentui-react-native/dependency-profiles') {
1910
console.log(`Updating ${name} to use latest published versions`);

0 commit comments

Comments
 (0)