Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

chore: use npm7 workspaces instead of lerna bootstrap #3565

Merged
merged 4 commits into from
Aug 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/bundlesize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ jobs:
runs-on: ubuntu-latest # https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu1804-README.md
strategy:
matrix:
node-version: [16.x]
project:
- packages/ipfs
- packages/ipfs-core
Expand All @@ -20,10 +19,9 @@ jobs:
- packages/ipfs-message-port-client
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
node-version: '16'
- uses: actions/checkout@v2
- run: npm install
- name: Bundlesize ${{ matrix.project }}
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
project:
- packages/ipfs
- packages/ipfs-cli
Expand All @@ -28,10 +27,9 @@ jobs:
- packages/ipfs-message-port-server
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
node-version: '16'
- name: Install dependencies
run: npm install
- name: Build types
Expand All @@ -40,4 +38,3 @@ jobs:
uses: gozala/typescript-error-reporter-action@v1.0.8
with:
project: ${{ matrix.project }}

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ logs
npm-debug.log*
package-lock.json
yarn.lock
tsconfig-types.aegir.json

# Coverage directory used by tools like istanbul
coverage
Expand Down
61 changes: 60 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,17 @@ addons:

before_install:
# prevents windows error: npm ERR! ... git-sh-setup: file not found
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then export PATH=/c/PROGRA~1/Git/usr/bin:/c/PROGRA~1/Git/mingw64/libexec/git-core:$PATH ; fi
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then export PATH=/c/PROGRA~1/Git/usr/bin:/c/PROGRA~1/Git/mingw64/libexec/git-core:$PATH ; fi
# upgrading npm on travis/windows/node 14 is completely broken
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then export NODE_INSTALL_DIR=`npm prefix -g` ; fi
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then mv $NODE_INSTALL_DIR/node_modules $NODE_INSTALL_DIR/node_modules_old ; fi
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then mkdir $NODE_INSTALL_DIR/node_modules ; fi
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then rm -f $NODE_INSTALL_DIR/npm $NODE_INSTALL_DIR/npm.cmd $NODE_INSTALL_DIR/npm.ps1 $NODE_INSTALL_DIR/npx $NODE_INSTALL_DIR/npx.cmd $NODE_INSTALL_DIR/npx.ps1 ; fi
# workspaces require npm 7 or above
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then node $NODE_INSTALL_DIR/node_modules_old/npm/bin/npm-cli.js i -g npm@latest ; fi
- if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then npm install -g npm@latest ; fi
# allow windows to run scripts with node 14 and npm 7 (may not be necessary when node 14 is no longer lts)
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then npm config set script-shell c:/PROGRA~1/Git/bin/bash.exe ; fi
# only run jobs in packages that have changed since master in PR builds
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then export RUN_SINCE='--since master' ; fi

Expand All @@ -83,87 +93,104 @@ jobs:
include:
- stage: test
name: lint
node_js: 'node'
script:
- npm run build
- npm run lint -- $RUN_SINCE --concurrency 1

- stage: test
name: dep-check (production deps)
node_js: 'node'
script:
- npm run dep-check -- $RUN_SINCE -- -- -p

- stage: test
name: dep-check (unused deps)
node_js: 'node'
script:
- npm run dep-check -- $RUN_SINCE -- -- -- --unused

- stage: test
name: chrome
node_js: 'node'
script:
- npm run test:browser -- $RUN_SINCE -- -- --bail

- stage: test
name: chrome webworker
node_js: 'node'
script:
- npm run test:webworker -- $RUN_SINCE -- -- --bail --timeout 60000

- stage: test
name: firefox
node_js: 'node'
script:
- npm run test:browser -- $RUN_SINCE -- -- --bail -- --browser firefox

- stage: test
name: firefox webworker
node_js: 'node'
script:
- npm run test:webworker -- $RUN_SINCE -- -- --bail --timeout 60000 -- --browser firefox

- stage: test
name: electron-main
node_js: 'node'
script:
- npm run test:electron-main -- $RUN_SINCE -- -- --bail --timeout 60000

- stage: test
name: electron-renderer
node_js: 'node'
script:
- npm run test:electron-renderer -- $RUN_SINCE -- -- --bail --timeout 60000

- stage: test
name: interop - node
node_js: 'node'
script:
- npm run test:interop -- $RUN_SINCE -- -- -- -t node --bail

- stage: test
name: interop - browser
node_js: 'node'
script:
- npm run test:interop -- $RUN_SINCE -- -- -- -t browser --bail

- stage: test
name: interop - electron-main
node_js: 'node'
script:
- npm run test:interop -- $RUN_SINCE -- -- -- -t electron-main -f ./test/node.js --bail --timeout 60000

- stage: test
name: interop - electron-renderer
node_js: 'node'
script:
- npm run test:interop -- $RUN_SINCE -- -- -- -t electron-renderer -f ./test/browser.js -bail --timeout 60000

- stage: test
name: js-ipfs interface tests - node
node_js: 'node'
script:
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t node -- --exit # TODO remove --exit https://mochajs.org/#-exit

- stage: test
name: js-ipfs interface tests - chrome
node_js: 'node'
script:
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t browser

- stage: test
name: js-ipfs interface tests - chrome webworker
node_js: 'node'
script:
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t webworker --timeout 60000

- stage: test
name: js-ipfs interface tests - firefox
node_js: 'node'
script:
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t browser -- --browser firefox

Expand All @@ -174,116 +201,139 @@ jobs:

- stage: test
name: js-ipfs interface tests - electron main
node_js: 'node'
script:
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t electron-main --timeout 60000

- stage: test
name: js-ipfs interface tests - electron renderer
node_js: 'node'
script:
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t electron-renderer --timeout 60000

- stage: test
name: js-ipfs interface tests - ipfs-client - node
node_js: 'node'
script:
- npm run test:interface:client -- $RUN_SINCE -- -- --bail -t node -- --exit # TODO remove --exit https://mochajs.org/#-exit

- stage: test
name: js-ipfs interface tests - ipfs-client - chrome
node_js: 'node'
script:
- npm run test:interface:client -- $RUN_SINCE -- -- --bail -t browser

- stage: test
name: js-ipfs interface tests - ipfs-client - chrome webworker
node_js: 'node'
script:
- npm run test:interface:client -- $RUN_SINCE -- -- --bail -t webworker --timeout 60000

- stage: test
name: js-ipfs interface tests - ipfs-client - firefox
node_js: 'node'
script:
- npm run test:interface:client -- $RUN_SINCE -- -- --bail -t browser -- --browser firefox

- stage: test
name: js-ipfs interface tests - ipfs-client - firefox webworker
node_js: 'node'
script:
- npm run test:interface:client -- $RUN_SINCE -- -- --bail -t webworker --timeout 60000 -- --browser firefox

- stage: test
name: js-ipfs interface tests - ipfs-client - electron main
node_js: 'node'
script:
- npm run test:interface:client -- $RUN_SINCE -- -- --bail -t electron-main --timeout 60000

- stage: test
name: js-ipfs interface tests - ipfs-client - electron renderer
node_js: 'node'
script:
- npm run test:interface:client -- $RUN_SINCE -- -- --bail -t electron-renderer --timeout 60000

- stage: test
name: http-api-client interface tests vs go-ipfs - node
node_js: 'node'
script:
- npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t node -- --exit # TODO remove --exit https://mochajs.org/#-exit

- stage: test
name: http-api-client interface tests vs go-ipfs - chrome
node_js: 'node'
script:
- npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t browser

- stage: test
name: http-api-client interface tests vs go-ipfs - chrome webworker
node_js: 'node'
script:
- npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t webworker --timeout 60000

- stage: test
name: http-api-client interface tests vs go-ipfs - firefox
node_js: 'node'
script:
- npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t browser -- --browser firefox

- stage: test
name: http-api-client interface tests vs go-ipfs - firefox webworker
node_js: 'node'
script:
- npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t webworker --timeout 60000 -- --browser firefox

- stage: test
name: http-api-client interface tests vs js-ipfs - node
node_js: 'node'
script:
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t node -- --exit # TODO remove --exit https://mochajs.org/#-exit

- stage: test
name: http-api-client interface tests vs js-ipfs - chrome
node_js: 'node'
script:
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t browser

- stage: test
name: http-api-client interface tests vs js-ipfs - chrome webworker
node_js: 'node'
script:
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t webworker --timeout 60000

- stage: test
name: http-api-client interface tests vs js-ipfs - firefox
node_js: 'node'
script:
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t browser --browser firefox

- stage: test
name: http-api-client interface tests vs js-ipfs - firefox webworker
node_js: 'node'
script:
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t webworker --timeout 60000 -- --browser firefox

- stage: test
name: http-api-client interface tests vs js-ipfs - electron main
node_js: 'node'
script:
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t electron-main --timeout 60000

- stage: test
name: http-api-client interface tests vs js-ipfs - electron renderer
node_js: 'node'
script:
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t electron-renderer --timeout 60000

- stage: test
name: ipfs-message-port-client interface tests - chrome
node_js: 'node'
script:
- npm run test:interface:message-port-client -- $RUN_SINCE -- -- --bail -t browser

- stage: test
name: ipfs-message-port-client interface tests - firefox
node_js: 'node'
script:
- npm run test:interface:message-port-client -- $RUN_SINCE -- -- --bail -t browser -- --browser firefox

Expand Down Expand Up @@ -446,6 +496,7 @@ jobs:
# only run on changes to master
if: branch = master AND type = push AND fork = false
name: release rc
node_js: 'node'
script:
# travis does not fetch the whole repo history, but we need that to work out the
# ref count to publish canary releases properly
Expand All @@ -459,6 +510,7 @@ jobs:
# only run on changes to master
if: branch = master AND type = push AND fork = false
name: release docker
node_js: 'node'
script:
# travis does not fetch the whole repo history, but we need that to work out the
# ref count to publish canary releases properly
Expand All @@ -472,48 +524,55 @@ jobs:
# only run on changes to master
if: branch = master AND type = push AND fork = false
name: external - ipfs-webui
node_js: 'node'
script:
- E2E_IPFSD_TYPE=js npm run test:external -- -- -- https://github.com/ipfs-shipyard/ipfs-webui.git --deps=ipfs@next

- stage: test-external
# only run on changes to master
if: branch = master AND type = push AND fork = false
name: external - ipfs-companion
node_js: 'node'
script:
- npm run test:external -- -- -- https://github.com/ipfs-shipyard/ipfs-companion.git --deps=ipfs@next

- stage: test-external
# only run on changes to master
if: branch = master AND type = push AND fork = false
name: external - npm-on-ipfs
node_js: 'node'
script:
- npm run test:external -- -- -- https://github.com/ipfs-shipyard/npm-on-ipfs.git --deps=ipfs@next

- stage: test-external
# only run on changes to master
if: branch = master AND type = push AND fork = false
name: external - peer-base
node_js: 'node'
script:
- npm run test:external -- -- -- https://github.com/achingbrain/peer-base.git --branch upgrade-to-latest-ipfs-rc --deps=ipfs@next

- stage: test-external
# only run on changes to master
if: branch = master AND type = push AND fork = false
name: external - service-worker-gateway
node_js: 'node'
script:
- npm run test:external -- -- -- https://github.com/ipfs-shipyard/service-worker-gateway.git --deps=ipfs@next

- stage: test-external
# only run on changes to master
if: branch = master AND type = push AND fork = false
name: external - orbit-db
node_js: 'node'
script:
- npm run test:external -- -- -- https://github.com/orbitdb/orbit-db.git --deps=ipfs@next

- stage: test-external
# only run on changes to master
if: branch = master AND type = push AND fork = false
name: external - ipfs-log
node_js: 'node'
script:
- npm run test:external -- -- -- https://github.com/orbitdb/ipfs-log.git --deps=ipfs@next

Expand Down