This repository has been archived by the owner on Feb 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b97ccce
commit f0fcc9e
Showing
14 changed files
with
14,935 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#! /usr/bin/env node | ||
|
||
const { readdirSync, writeFileSync } = require('fs'); | ||
const { resolve, join } = require('path'); | ||
const { inc } = require('semver'); | ||
const rootPkg = require('../package.json'); | ||
|
||
const releases = ['major', 'minor', 'patch']; | ||
const packages = resolve(__dirname, '../packages'); | ||
const [,,release] = process.argv; | ||
|
||
if (!releases.includes(release)) { | ||
throw new Error(`Release must be one of: major, minor, patch`); | ||
} | ||
|
||
const version = inc(rootPkg.version, release); | ||
|
||
readdirSync(packages) | ||
.map(name => { | ||
const pkgPath = join(packages, name, 'package.json'); | ||
const pkg = require(pkgPath); | ||
|
||
console.log(`Bumping ${name} to v${version}`); | ||
pkg.version = version; | ||
|
||
if (pkg.peerDependencies && pkg.peerDependencies.neutrino) { | ||
console.log(` Bumping neutrino peer dependency to v${version}`); | ||
pkg.peerDependencies.neutrino = `^${version}`; | ||
} | ||
|
||
Object | ||
.keys(pkg.linkDependencies || {}) | ||
.map(key => { | ||
console.log(` Bumping ${key} linked dependency to v${version}`); | ||
pkg.linkDependencies[key].version = version; | ||
}); | ||
|
||
writeFileSync(pkgPath, `${JSON.stringify(pkg, null, 2)}\n`); | ||
}); | ||
|
||
rootPkg.version = version; | ||
writeFileSync(resolve(__dirname, '../package.json'), `${JSON.stringify(rootPkg, null, 2)}\n`); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,23 @@ | ||
{ | ||
"name": "neutrino-dev", | ||
"version": "1.0.0", | ||
"version": "4.0.0", | ||
"private": true, | ||
"keywords": ["neutrino"], | ||
"keywords": [ | ||
"neutrino" | ||
], | ||
"author": "Eli Perelman <eli@eliperelman.com>", | ||
"license": "MPL-2.0", | ||
"scripts": { | ||
"postinstall": "lerna clean && lerna bootstrap", | ||
"link-all": "lerna exec -- yarn link" | ||
"postinstall": "autolink bootstrap", | ||
"clean-all": "autolink clean", | ||
"link-all": "autolink link", | ||
"bump:major": ".scripts/version-all major", | ||
"bump:minor": ".scripts/version-all minor", | ||
"bump:patch": ".scripts/version-all patch", | ||
"publish-all": ".scripts/publish-all" | ||
}, | ||
"devDependencies": { | ||
"lerna": "2.0.0-beta.36" | ||
"semver": "^5.3.0", | ||
"yarn-autolink": "^1.1.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,6 @@ | |
"webpack-merge": "2.4.0" | ||
}, | ||
"peerDependencies": { | ||
"neutrino": "^3.0.0" | ||
"neutrino": "^4.0.0" | ||
} | ||
} |
Oops, something went wrong.