Skip to content

Commit

Permalink
chore: mergeback next -> identity-provider/2021-01-04 (#216)
Browse files Browse the repository at this point in the history
* feat: add support for bigint in leb128 (#200)

For now we just re-parse it in BigNumber.

* chore: add more files to gitignore (#203)

This is a split from #132.

* chore: remove scripts and move closer to lerna (#202)

This includes a change to request_id from the identity-provider PR
(#132) that I thought was related to something else, but is essential
here with the new lerna packages.

This moves the CI to using lerna entirely, and prevents running
npm install (instead telling the user to run npx lerna bootstrap).

* fix auth-demo missing dep

* use the right versions of packages

* fix tests for apps

* fix linting

* .

* rm subpackage package-lock.json

* regenerate /package-lock.json without subpackage package-lock.json

* rm package-lock.json

* try explicitly opting-in packages to lerna

* add hoist,ci to lerna.json

* gh nodejs-ci runs npm install

* fix npm install at monorepo now that subpackage ci scripts dont try to build

* package.json devDeps on packages/agent-js-devtools to provide typescript dep

* see if lerna installs devtools as dep not devDep

* Add typescript as monorepo devDep

* agent,bootstrap lint scripts dont call tslint (which isnt installed on gh actions)

* monorepo doesnt do its own lint, it just does lerna run lint

* @dfinity/agent package.json includes types key

* use lockfileVersion 1 since our github action for node 14 doesnt always know how to deal with lockfileVersion 2

* try with 'lerna bootstrap', ci=false, meaning each subpackage gets its own package-lock.json

* only use one version of typescript-eslint/eslint-plugin, not two

* hoist eslint and use one version

* hoist typescript

* hoist eslint-plugin-jsdoc

* hoist @typescript-eslint/parser

* disable new request_id sender_delegation test (will make it pass once ci works)

* rm file dependencies from /package.json (#217)

Co-authored-by: Hans <hans@larsen.online>
  • Loading branch information
Benjamin Goering and hansl committed Feb 17, 2021
1 parent 47e40d1 commit 0ee52c2
Show file tree
Hide file tree
Showing 31 changed files with 22,935 additions and 18,675 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/nodejs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,14 @@ jobs:
with:
node-version: ${{ matrix.node }}

# See if we can lint before full build/test
- run: npm ci --ignore-scripts
- run: npm run lint --if-present
- run: npx lerna bootstrap
- run: npx lerna run lint

# full install, including npm postinstall, prepare
- run: npm ci
# build monorepo incl. each subpackage
- run: npm run build --if-present
- run: npx lerna run build

# test monorepo incl. each subpackage
- run: npm test
- run: npx lerna run test
env:
CI: true

Expand Down Expand Up @@ -99,7 +96,7 @@ jobs:
&
sleep 1
- run: npm run e2e
- run: npx lerna run e2e
env:
CI: true
IC_REF_PORT: ${{ steps.ic_ref.outputs.IC_REF_PORT }}
Expand All @@ -109,7 +106,7 @@ jobs:
CI: true
IC_REF_PORT: 8888
MITM: true
run: npm run mitm
run: npx lerna run mitm

- name: clean up
run: |
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ typings/
# TypeScript cache
*.tsbuildinfo
build_info.json
.tsc-out/

# TypeScript output
.tsc-out/
Expand Down Expand Up @@ -114,3 +115,4 @@ dist
# IDE Settings
.code
.idea
.vscode
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,28 @@ This source code repository contains multiple npm packages, each under `./packag
### Getting Started

1. Clone the git repository.
2. Run `npm install`
2. Run `npx lerna bootstrap`

After that, you probably want to dive into a specific package in [./packages](./packages).

#### Lerna

We use [lerna](https://github.com/lerna/lerna) to manage this repo and its packages. A few useful
commands to keep in mind;

- To run the unit tests locally, you can use `npx lerna run test`.
- To run e2e tests, you can use `npx lerna run e2e`. **WARNING:** You need to have a running
replica locally. In our CI runs, we use the `ic-ref` which is not (at this time) available
publicly. Normally you can use a replica distributed with dfx (ie. dfx start in a project),
but there is no guarantee that the `next` branch will work with the latest published dfx.
Once you have a replica running locally, you must pass the port to the e2e tests using the
`IC_REF_PORT` environment vairable. If that variable is not set, the tests will fail.
- To run the entire ci, use `npx lerna run ci`. This will validate syntax and linting, as well
as running tests (both unit and e2e).

You can also install lerna globally and not use `npx` if you wish; run `npm install -g lerna` then
skip the `npx` part of the example commands.

### GitHub Actions

GitHub Actions for this repo are configured in [./.github/workflows](./.github/workflows).
Expand Down
13 changes: 0 additions & 13 deletions bin/e2e

This file was deleted.

13 changes: 0 additions & 13 deletions bin/mitm

This file was deleted.

16 changes: 0 additions & 16 deletions bin/npm-postinstall

This file was deleted.

0 comments on commit 0ee52c2

Please sign in to comment.