aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/monorepo-scripts')
-rw-r--r--packages/monorepo-scripts/package.json7
-rw-r--r--packages/monorepo-scripts/src/doc_gen_configs.ts7
-rw-r--r--packages/monorepo-scripts/src/publish_release_notes.ts20
-rw-r--r--packages/monorepo-scripts/src/utils/utils.ts7
-rw-r--r--packages/monorepo-scripts/tsconfig.json3
5 files changed, 31 insertions, 13 deletions
diff --git a/packages/monorepo-scripts/package.json b/packages/monorepo-scripts/package.json
index a2f2343b8..e776569b1 100644
--- a/packages/monorepo-scripts/package.json
+++ b/packages/monorepo-scripts/package.json
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@0xproject/monorepo-scripts",
- "version": "1.0.7",
+ "version": "1.0.9",
"engines": {
"node": ">=6.12"
},
@@ -9,8 +9,7 @@
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
- "watch_without_deps": "tsc -w",
- "build": "tsc",
+ "build": "tsc -b",
"lint": "tslint --project .",
"clean": "shx rm -rf lib",
"test:publish": "run-s build script:publish",
@@ -34,7 +33,7 @@
"devDependencies": {
"@types/glob": "^5.0.33",
"@types/mkdirp": "^0.5.2",
- "@types/node": "^8.0.53",
+ "@types/node": "*",
"@types/opn": "^5.1.0",
"@types/rimraf": "^2.0.2",
"@types/semver": "5.5.0",
diff --git a/packages/monorepo-scripts/src/doc_gen_configs.ts b/packages/monorepo-scripts/src/doc_gen_configs.ts
index 6d7560943..e3ddeddc9 100644
--- a/packages/monorepo-scripts/src/doc_gen_configs.ts
+++ b/packages/monorepo-scripts/src/doc_gen_configs.ts
@@ -16,10 +16,8 @@ export const docGenConfigs: DocGenConfigs = {
Schema:
'https://github.com/tdegrunt/jsonschema/blob/5c2edd4baba149964aec0f23c87ad12c25a50dfb/lib/index.d.ts#L49',
Uint8Array: 'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array',
- 'Ganache.GanacheOpts':
- 'https://github.com/0xProject/0x-monorepo/blob/ddf85112d7e4eb1581e0d82ce6eedad429641106/packages/typescript-typings/types/ganache-core/index.d.ts#L3',
- 'lightwallet.keystore':
- 'https://github.com/0xProject/0x-monorepo/blob/ddf85112d7e4eb1581e0d82ce6eedad429641106/packages/typescript-typings/types/eth-lightwallet/index.d.ts#L32',
+ GanacheOpts: 'https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/ganache-core/index.d.ts#L8',
+ keystore: 'https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/eth-lightwallet/index.d.ts#L36',
},
// If a 0x package re-exports an external package, we should add a link to it's exported items here
EXTERNAL_EXPORT_TO_LINK: {
@@ -39,6 +37,7 @@ export const docGenConfigs: DocGenConfigs = {
'EtherTokenWrapper',
'ExchangeWrapper',
'ForwarderWrapper',
+ 'OrderValidatorWrapper',
'TransactionEncoder',
],
// Some types are not explicitly part of the public interface like params, return values, etc... But we still
diff --git a/packages/monorepo-scripts/src/publish_release_notes.ts b/packages/monorepo-scripts/src/publish_release_notes.ts
index a9bc8fe75..6090498e0 100644
--- a/packages/monorepo-scripts/src/publish_release_notes.ts
+++ b/packages/monorepo-scripts/src/publish_release_notes.ts
@@ -1,3 +1,4 @@
+import * as _ from 'lodash';
import * as yargs from 'yargs';
import { publishReleaseNotesAsync } from './utils/github_release_utils';
@@ -9,14 +10,25 @@ const args = yargs
type: 'boolean',
demandOption: true,
})
- .example('$0 --isDryRun true', 'Full usage example').argv;
+ .option('packages', {
+ describe:
+ 'Space-separated list of packages to generated release notes for. If not supplied, it does all `Lerna updated` packages.',
+ type: 'string',
+ })
+ .example('$0 --isDryRun true --packages "0x.js @0xproject/web3-wrapper"', 'Full usage example').argv;
(async () => {
const isDryRun = args.isDryRun;
- const shouldIncludePrivate = false;
- const allUpdatedPackages = await utils.getUpdatedPackagesAsync(shouldIncludePrivate);
+ let packages;
+ if (_.isUndefined(args.packages)) {
+ const shouldIncludePrivate = false;
+ packages = await utils.getUpdatedPackagesAsync(shouldIncludePrivate);
+ } else {
+ const packageNames = args.packages.split(' ');
+ packages = await utils.getPackagesByNameAsync(packageNames);
+ }
- await publishReleaseNotesAsync(allUpdatedPackages, isDryRun);
+ await publishReleaseNotesAsync(packages, isDryRun);
process.exit(0);
})().catch(err => {
utils.log(err);
diff --git a/packages/monorepo-scripts/src/utils/utils.ts b/packages/monorepo-scripts/src/utils/utils.ts
index 2ce36942c..5e2e877c7 100644
--- a/packages/monorepo-scripts/src/utils/utils.ts
+++ b/packages/monorepo-scripts/src/utils/utils.ts
@@ -54,6 +54,13 @@ export const utils = {
}
return packages;
},
+ async getPackagesByNameAsync(packageNames: string[]): Promise<Package[]> {
+ const allPackages = utils.getPackages(constants.monorepoRootPath);
+ const updatedPackages = _.filter(allPackages, pkg => {
+ return _.includes(packageNames, pkg.packageJson.name);
+ });
+ return updatedPackages;
+ },
async getUpdatedPackagesAsync(shouldIncludePrivate: boolean): Promise<Package[]> {
const updatedPublicPackages = await utils.getLernaUpdatedPackagesAsync(shouldIncludePrivate);
const updatedPackageNames = _.map(updatedPublicPackages, pkg => pkg.name);
diff --git a/packages/monorepo-scripts/tsconfig.json b/packages/monorepo-scripts/tsconfig.json
index 332d3a5e1..c8b1d23e5 100644
--- a/packages/monorepo-scripts/tsconfig.json
+++ b/packages/monorepo-scripts/tsconfig.json
@@ -2,7 +2,8 @@
"extends": "../../tsconfig",
"compilerOptions": {
"typeRoots": ["../../node_modules/@types", "node_modules/@types"],
- "outDir": "lib"
+ "outDir": "lib",
+ "rootDir": "src"
},
"include": ["./src/**/*"]
}