chore(repo): hide vite from being pubished publically (#13060)

This commit is contained in:
Jason Jean 2022-11-08 11:31:56 -05:00 committed by GitHub
parent 8c7ecff6c2
commit cb0ccea9a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 1 deletions

View File

@ -1,7 +1,7 @@
{
"name": "@nrwl/vite",
"version": "0.0.1",
"private": false,
"private": true,
"description": "The Nx Plugin for building and testing applications using Vite (Early Release)",
"repository": {
"type": "git",

View File

@ -36,6 +36,24 @@ function hideFromGitIndex(uncommittedFiles: string[]) {
stdio: [0, 1, 2],
});
if (options.local) {
// Force all projects to be not private
const projects = JSON.parse(
execSync('npx lerna list --json --all').toString()
);
for (const proj of projects) {
if (proj.private) {
console.log('Publishing private package locally:', proj.name);
const packageJsonPath = join(proj.location, 'package.json');
const original = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
writeFileSync(
packageJsonPath,
JSON.stringify({ ...original, private: false })
);
}
}
}
const versionOptions = {
bump: options.version ? options.version : undefined,
conventionalCommits: true,