more consistency with agoric/new-repo
ADD
packages/error-stack-shim/.circleci/config.yml
+version: 2.0
+
+references:
+
+ node11: &node11image
+ docker:
+ - image: circleci/node:11
+
+ node10: &node10image
+ docker:
+ - image: circleci/node:10
+
+ node9: &node9image
+ docker:
+ - image: circleci/node:9
+
+ node8: &node8image
+ docker:
+ - image: circleci/node:8
+
+ node7: &node7image
+ docker:
+ - image: circleci/node:7
+
+ node11browser: &node11browsersimage
+ docker:
+ - image: circleci/node:11-browsers
+
+ node10browser: &node10browsersimage
+ docker:
+ - image: circleci/node:10-browsers
+
+ node9browser: &node9browsersimage
+ docker:
+ - image: circleci/node:9-browsers
+
+ node8browser: &node8browsersimage
+ docker:
+ - image: circleci/node:8-browsers
+
+ node7browser: &node7browsersimage
+ docker:
+ - image: circleci/node:7-browsers
+
+ install_npm_default: &install_npm
+ run:
+ name: Update npm
+ command: 'sudo npm install -g npm@latest'
+ restore_cache_default: &restore_cache # special step to restore the dependency cache
+ restore_cache:
+ # Read about caching dependencies: https://circleci.com/docs/2.0/caching/
+ key: dependency-cache-{{ checksum "package.json" }}
+ install_npm_packages_default: &install_npm_packages
+ run:
+ name: Install npm packages
+ command: npm install
+ save_cache_default: &save_cache # special step to save the dependency cache
+ save_cache:
+ key: dependency-cache-{{ checksum "package.json" }}
+ paths:
+ - ./node_modules
+ update_realm_submodule_default: &update_realm_submodule
+ run:
+ name: Git Submodule Update
+ command: git submodule update --init --recursive
+
+
+jobs:
+
+ # Lint and Test
+
+ lint_and_test_node_11: &lint_and_test
+ <<: *node11image
+ steps:
+ - checkout
+ - *update_realm_submodule
+ - *install_npm
+ - *restore_cache
+ - *install_npm_packages
+ - *save_cache
+ - run: &lint
+ name: Lint
+ command: npm run lint-check
+ - run: &test
+ name: Test
+ command: npm test
+
+ lint_and_test_node_10:
+ <<: *lint_and_test
+ <<: *node10image
+
+ lint_and_test_node_9:
+ <<: *lint_and_test
+ <<: *node9image
+
+ lint_and_test_node_8:
+ <<: *lint_and_test
+ <<: *node8image
+
+ lint_and_test_node_7:
+ <<: *lint_and_test
+ <<: *node7image
+
+ # Pre-Release Test Integration
+
+ pre_release_test_integration_node_11: &pre_release_test_integration
+ <<: *node11browsersimage
+ steps:
+ - checkout
+ - *update_realm_submodule
+ - *install_npm
+ - *restore_cache
+ - *install_npm_packages
+ - *save_cache
+ - run:
+ name: Build browser tests and bundle
+ command: ./integration-test/scripts/build-pre-release-test.sh
+ - run:
+ name: Test bundles
+ command: |
+ cd integration-test
+ npm run test:pre-release
+
+ pre_release_test_integration_node_10:
+ <<: *pre_release_test_integration
+ <<: *node10browsersimage
+
+ pre_release_test_integration_node_9:
+ <<: *pre_release_test_integration
+ <<: *node9browsersimage
+
+ pre_release_test_integration_node_8:
+ <<: *pre_release_test_integration
+ <<: *node8browsersimage
+
+ pre_release_test_integration_node_7:
+ <<: *pre_release_test_integration
+ <<: *node7browsersimage
+
+ # Post-Release Test Integration
+
+ post_release_test_integration_node_11: &post_release_test_integration
+ <<: *node11browsersimage
+ steps:
+ - checkout
+ - *update_realm_submodule
+ - *install_npm
+ - *restore_cache
+ - *install_npm_packages
+ - *save_cache
+ - run:
+ name: Build browser tests
+ command: ./integration-test/scripts/build-post-release-test.sh
+ - run:
+ name: Test unpkg
+ command: |
+ cd integration-test
+ npm run test:post-release
+
+ post_release_test_integration_node_10:
+ <<: *post_release_test_integration
+ <<: *node10browsersimage
+
+ post_release_test_integration_node_9:
+ <<: *post_release_test_integration
+ <<: *node9browsersimage
+
+ post_release_test_integration_node_8:
+ <<: *post_release_test_integration
+ <<: *node8browsersimage
+
+ post_release_test_integration_node_7:
+ <<: *post_release_test_integration
+ <<: *node7browsersimage
+
+ npm_audit_node_11: &npm_audit
+ docker:
+ - image: circleci/golang:1.12.0-node
+ steps:
+ - checkout
+ - run:
+ name: Update npm
+ command: 'sudo npm install -g npm@latest'
+ - run:
+ name: install hub
+ command: |
+ set -xe
+ go get -u -d github.com/github/hub
+ cd /go/src/github.com/github/hub
+ go install github.com/github/hub
+ - run:
+ name: Submit PR if npm audit fix makes changes
+ command: ./scripts/npm-audit-fix.sh
+
+
+workflows:
+ version: 2
+ test_all:
+ jobs:
+ - lint_and_test_node_11
+ - lint_and_test_node_10
+ - pre_release_test_integration_node_11
+ - pre_release_test_integration_node_10
+ nightly:
+ triggers:
+ - schedule:
+ cron: "0 0 * * *"
+ filters:
+ branches:
+ only:
+ - master
+ jobs:
+ - npm_audit_node_11
+ - post_release_test_integration_node_11
+ - post_release_test_integration_node_10

ADD
packages/error-stack-shim/.eslintignore
+/dist/
+/scripts/

ADD
packages/error-stack-shim/.npmignore
+# Demo
+demo
+
+# scripts
+scripts
+
+# test
+test
+
+# Travis CI
+.travis.yml

ADD
packages/error-stack-shim/scripts/npm-audit-fix.sh
+git clone https://github.com/AgoricBot/???.git
+cd ???
+git remote add upstream https://github.com/Agoric/???.git
+git remote set-url origin https://AgoricBot:$GITHUB_TOKEN@github.com/AgoricBot/???.git
+git fetch upstream
+git checkout master
+git rebase upstream/master
+git config user.email "kate+agoricbot@agoric.com"
+git config user.name "AgoricBot"
+git config --global hub.protocol https
+hub push origin master
+
+if git ls-remote --heads --exit-code origin npm-audit-fix ; then
+ git push --delete origin npm-audit-fix
+fi
+
+git checkout -b npm-audit-fix
+
+if npm audit ; then
+ echo "Nothing to fix"
+else
+ npm audit fix
+ files_changed=true
+fi
+
+if [ "$files_changed" = true ] ; then
+ git add .
+ git commit -m "results of running npm audit fix"
+ git push origin npm-audit-fix
+ hub pull-request --no-edit --base Agoric/???:master
+fi

ADD
packages/error-stack-shim/scripts/setup-agoric-bot.md
+# AgoricBot
+
+AgoricBot is a github user that we've created to automatically create
+Pull Requests for anything that can be automatically fixed as a result
+of npm audit.
+
+# Setting up AgoricBot
+
+1. Sign in as AgoricBot on Github (see Kate for the password)
+2. Go to the github page for the Agoric repo that you have just
+ created
+3. Fork the repo as AgoricBot
+4. Change npm-audit-fix.sh (in this folder) to use this forked repo
+ and the actual Agoric repo instead of the '???' fillers
+5. On CircleCI (see setup-circleci.md in the root directory for more),
+ go to your project's settings and look for 'Environmental
+ Variables' under Build Settings
+6. Import the environmental variable from another repo, like SES. The
+ variable should be named GITHUB_TOKEN and have a value that ends
+ with "c166". (Note that the UI may not change once you have
+ imported until you reload the page.)
+

ADD
packages/error-stack-shim/setup-circleci.md
+# Setting up CircleCI
+
+1. Go to https://circleci.com/gh/Agoric
+2. Click the "Add Project" button to the left
+3. Make sure that your repo has the `.circleci/config.yml` file that new-repo has

ADD
packages/error-stack-shim/test/sample-test.js
+import { test } from 'tape-promise/tape';
+
+test('unique test description', t => {
+ t.true('various tests');
+ t.end();
+});

more consistency with agoric/new-repo