Skip to content

Commit

Permalink
fix: remove many build steps
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed May 12, 2020
1 parent c1ddd4a commit 6c7d3bb
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 21 deletions.
23 changes: 19 additions & 4 deletions packages/agoric-cli/integration-tests/test-workflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,32 @@ test('workflow', async t => {
// Kill an entire process group.
const pkill = (cp, signal = 'SIGINT') => process.kill(-cp.pid, signal);

function pspawnStdout(...args) {
let output = '';
const ps = pspawn(...args);
ps.cp.stdout.on('data', chunk => {
output += chunk.toString('utf-8');
});
ps.then(ret => {
if (ret !== 0) {
process.stdout.write(output);
}
});
return ps;
}

// Run all main programs with the '--sdk' flag if we are in agoric-sdk.
const extraArgs = fs.existsSync(`${__dirname}/../../cosmic-swingset`)
? ['--sdk']
: [];
const myMain = args => {
function myMain(args) {
// console.error('running agoric-cli', ...extraArgs, ...args);
return pspawn(`agoric`, [...extraArgs, ...args], {
return pspawnStdout(`agoric`, [...extraArgs, ...args], {
stdio: ['ignore', 'pipe', 'inherit'],
env: { ...process.env, DEBUG: 'agoric' },
detached: true,
});
};
}

const olddir = process.cwd();
const { name, removeCallback } = tmp.dirSync({
Expand Down Expand Up @@ -150,7 +165,7 @@ test('workflow', async t => {

// ==============
// cd ui && yarn install
const instRet = await pspawn(`yarn`, ['install'], {
const instRet = await pspawnStdout(`yarn`, ['install'], {
stdio: ['ignore', 'pipe', 'inherit'],
cwd: 'ui',
detached: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/bundle-source/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ function getExportWithNestedEvaluate(filePrefix) {
${computeExports}
// Evaluate the entrypoint recursively.
return computeExports(entrypoint, { require, log(...args) { return console.log(...args); } });
return computeExports(entrypoint, { require });
}
${sourceMap}`;
}
Expand Down
7 changes: 3 additions & 4 deletions packages/default-evaluate-options/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
"name": "@agoric/default-evaluate-options",
"version": "0.3.5",
"description": "Agoric default evaluation options for Realms and SES",
"main": "dist/default-evaluate-options.cjs.js",
"module": "src/index.js",
"browser": "dist/default-evaluate-options.umd.js",
"main": "src/index.js",
"scripts": {
"build": "rollup -c",
"build": "exit 0",
"build:rollup": "rollup -c",
"test": "tape -r esm 'test/**/*.js'",
"lint-fix": "eslint --fix '**/*.js'",
"lint-check": "eslint '**/*.js'",
Expand Down
6 changes: 2 additions & 4 deletions packages/eventual-send/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
"name": "@agoric/eventual-send",
"version": "0.9.1",
"description": "Extend a Promise class to implement the eventual-send API",
"main": "dist/eventual-send.cjs.js",
"module": "src/index.js",
"browser": "dist/eventual-send.umd.js",
"main": "src/index.js",
"types": "src/index.d.ts",
"scripts": {
"test": "tape -r esm 'test/**/test*.js'",
"build": "rollup -c",
"build": "exit 0",
"lint-fix": "eslint --fix '**/*.js'",
"lint-check": "eslint '**/*.js'"
},
Expand Down
6 changes: 2 additions & 4 deletions packages/transform-eventual-send/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
"name": "@agoric/transform-eventual-send",
"version": "1.2.4",
"description": "transform-eventual-send",
"main": "dist/transform-eventual-send.cjs.js",
"module": "src/index.js",
"browser": "dist/transform-eventual-send.umd.js",
"main": "src/index.js",
"scripts": {
"test": "tape -r esm 'test/**/*.js'",
"lint-fix": "eslint --fix '**/*.js'",
"lint-check": "eslint '**/*.js'",
"build": "node -r esm ./scripts/build-esend.js && rollup -c rollup.config.js"
"build": "node -r esm ./scripts/build-esend.js"
},
"devDependencies": {
"@agoric/acorn-eventual-send": "^2.0.4",
Expand Down
6 changes: 2 additions & 4 deletions packages/transform-metering/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
"name": "@agoric/transform-metering",
"version": "1.2.4",
"description": "transform-metering",
"main": "dist/transform-metering.cjs.js",
"module": "src/index.js",
"browser": "dist/transform-metering.umd.js",
"main": "src/index.js",
"scripts": {
"test": "tape -r esm 'test/**/*.js'",
"lint-fix": "eslint --fix '**/*.{js,jsx}'",
"lint-check": "eslint '**/*.{js,jsx}'",
"build": "rollup -c rollup.config.js"
"build": "exit 0"
},
"devDependencies": {
"@babel/core": "^7.5.0",
Expand Down

0 comments on commit 6c7d3bb

Please sign in to comment.