Compare commits

..

3 Commits

Author SHA1 Message Date
8780245986 v1.0.2 2018-09-13 16:32:43 -07:00
90f3fba45a chore: sync version on version bump 2018-09-13 16:19:25 -07:00
b1d244e34c chore: add version sync script 2018-09-13 16:19:25 -07:00
5 changed files with 40 additions and 7 deletions

View File

@@ -1,6 +1,13 @@
### Changelog ### Changelog
#### 1.0.0 (9 September 2018) #### [v1.0.2](https://git.w33ble.com/w33ble/strain-tools/compare/v1.0.1...v1.0.2) (13 September 2018)
#### [v1.0.1](https://git.w33ble.com/w33ble/strain-tools/compare/v1.0.0...v1.0.1) (13 September 2018)
- fix: correct localstorage fallback [`d5b0cd0`](https://git.w33ble.com/w33ble/strain-tools/commit/d5b0cd07307dbf06d8d4530803a00c2b2ab8c4c5)
- docs: update readme with usable scripts [`5bdd35b`](https://git.w33ble.com/w33ble/strain-tools/commit/5bdd35b74b417706c76bd50d7162567b60dbdcb2)
- fix: scrape strains alphabetically [`fa2db8d`](https://git.w33ble.com/w33ble/strain-tools/commit/fa2db8d4304b0b0d91221b4ef942daa74ab3df94)
#### v1.0.0 (9 September 2018)
- fix: assign key to strain cards [`e3e95e7`](https://git.w33ble.com/w33ble/strain-tools/commit/e3e95e7c2b390ca52633e84604cf6a4a9b239d54) - fix: assign key to strain cards [`e3e95e7`](https://git.w33ble.com/w33ble/strain-tools/commit/e3e95e7c2b390ca52633e84604cf6a4a9b239d54)
- fix: remove listener on form unmount [`4591a47`](https://git.w33ble.com/w33ble/strain-tools/commit/4591a47dbaa62cbd330bbc9b96ace2be1ace8bd6) - fix: remove listener on form unmount [`4591a47`](https://git.w33ble.com/w33ble/strain-tools/commit/4591a47dbaa62cbd330bbc9b96ace2be1ace8bd6)
- feat: add fav/unfav control [`50a3b1d`](https://git.w33ble.com/w33ble/strain-tools/commit/50a3b1db92a64fcd7e10e35ba045a3970a1440ba) - feat: add fav/unfav control [`50a3b1d`](https://git.w33ble.com/w33ble/strain-tools/commit/50a3b1db92a64fcd7e10e35ba045a3970a1440ba)

View File

@@ -1,6 +1,6 @@
{ {
"name": "strain-tools", "name": "strain-tools",
"version": "1.0.1", "version": "1.0.2",
"description": "strain tools", "description": "strain tools",
"main": "index", "main": "index",
"module": "index.mjs", "module": "index.mjs",
@@ -9,10 +9,10 @@
"lint": "eslint \"packages/*/*.{js,mjs,vue}\" \"packages/*/src/**/*.{js,mjs,vue}\"", "lint": "eslint \"packages/*/*.{js,mjs,vue}\" \"packages/*/src/**/*.{js,mjs,vue}\"",
"precommit": "lint-staged", "precommit": "lint-staged",
"prepush": "npm run lint", "prepush": "npm run lint",
"version": "auto-changelog -p && auto-authors && git add CHANGELOG.md AUTHORS.md", "sync-versions": "node -r esm scripts/version-sync.mjs",
"version": "npm run sync-versions && auto-changelog -p && auto-authors && git add CHANGELOG.md AUTHORS.md packages",
"start": "node .", "start": "node .",
"dev": "nodemon --ignore db.json .", "dev": "nodemon --ignore db.json ."
"setversion": "npx oao reset-all-versions"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View File

@@ -1,6 +1,6 @@
{ {
"name": "scraper", "name": "scraper",
"version": "1.0.1", "version": "1.0.2",
"private": true, "private": true,
"description": "scrapes strain info, stores for later reference", "description": "scrapes strain info, stores for later reference",
"main": "index", "main": "index",

View File

@@ -1,6 +1,6 @@
{ {
"name": "search-site", "name": "search-site",
"version": "1.0.1", "version": "1.0.2",
"private": true, "private": true,
"main": "index", "main": "index",
"module": "index.mjs", "module": "index.mjs",

26
scripts/version-sync.mjs Normal file
View File

@@ -0,0 +1,26 @@
import fs from 'fs';
import { promisify } from 'util';
import { join } from 'path';
import pkg from '../package.json';
const readDir = promisify(fs.readdir);
const readFile = promisify(fs.readFile);
const writeFile = promisify(fs.writeFile);
async function syncPackageVersions() {
const packagesPath = 'packages'; // path for all packages
const { version } = pkg;
const packages = await readDir(packagesPath);
packages.forEach(async pack => {
const packagePath = join(packagesPath, pack, 'package.json');
const p = JSON.parse(await readFile(packagePath, 'utf-8'));
p.version = version;
await writeFile(packagePath, `${JSON.stringify(p, null, 2)}\n`);
});
console.log(`Versions with root: ${version}`);
}
syncPackageVersions();