Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ipfs/aegir
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 712c85353d19c323c9147c6be8ce56e2d592d6b6
Choose a base ref
...
head repository: ipfs/aegir
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5d448e73da8b5ce755877703de13b959902755bb
Choose a head ref
Loading
Showing with 36,464 additions and 37,294 deletions.
  1. +2 −2 .aegir.js
  2. +1 −78 .github/dependabot.yml
  3. +50 −0 .github/workflows/automerge.yml
  4. +152 −0 .github/workflows/js-test-and-release.yml
  5. +0 −43 .github/workflows/main.yml
  6. +2 −1 .gitignore
  7. +253 −3 CHANGELOG.md
  8. +3 −20 LICENSE
  9. +5 −0 LICENSE-APACHE
  10. +19 −0 LICENSE-MIT
  11. +8 −11 README.md
  12. +1 −1 actions/bundle-size/action.yml
  13. +33,206 −35,368 actions/bundle-size/dist/index.js
  14. +1 −1 actions/bundle-size/utils.js
  15. +38 −0 actions/cache-node-modules/action.yml
  16. +17 −0 actions/docker-login/action.yml
  17. +11 −0 actions/install-browser-deps/action.yml
  18. +0 −68 cli.js
  19. +15 −0 md/esm.md
  20. +23 −23 md/ts-jsdoc.md
  21. +199 −111 package.json
  22. +34 −36 src/build/index.js
  23. +77 −0 src/check-project/check-build-files.js
  24. +29 −0 src/check-project/check-licence-files.js
  25. +31 −0 src/check-project/check-monorepo-files.js
  26. +8 −0 src/check-project/files/.github/dependabot.yml
  27. +4 −0 src/check-project/files/LICENSE
  28. +5 −0 src/check-project/files/LICENSE-APACHE
  29. +19 −0 src/check-project/files/LICENSE-MIT
  30. +12 −0 src/check-project/files/lerna.json
  31. +420 −0 src/check-project/index.js
  32. +32 −0 src/check-project/manifests/monorepo.js
  33. +60 −0 src/check-project/manifests/typed-cjs.js
  34. +74 −0 src/check-project/manifests/typed-esm.js
  35. +84 −0 src/check-project/manifests/typescript.js
  36. +45 −0 src/check-project/manifests/untyped-cjs.js
  37. +69 −0 src/check-project/semantic-release-config.js
  38. +218 −0 src/check-project/utils.js
  39. +12 −0 src/clean.js
  40. +18 −11 src/cmds/build.js
  41. +30 −0 src/cmds/check-project.js
  42. +24 −16 src/cmds/check.js
  43. +30 −0 src/cmds/clean.js
  44. +17 −12 src/cmds/{z-dependency-check.js → dependency-check.js}
  45. +0 −44 src/cmds/docs.js
  46. +16 −10 src/cmds/{z-lint-package-json.js → lint-package-json.js}
  47. +15 −11 src/cmds/lint.js
  48. +37 −112 src/cmds/release.js
  49. +69 −40 src/cmds/test-dependant.js
  50. +30 −12 src/cmds/test.js
  51. +0 −61 src/cmds/ts.js
  52. +12 −20 src/config/.npmpackagejsonlintrc.json
  53. +6 −3 src/config/pw-test.js
  54. +8 −3 src/config/tsconfig.aegir.json
  55. +44 −23 src/config/user.js
  56. +18 −10 src/dependency-check.js
  57. +0 −112 src/docs/index.js
  58. +88 −6 src/index.js
  59. +51 −6 src/lint.js
  60. +47 −0 src/release.js
  61. +0 −31 src/release/bump.js
  62. +0 −45 src/release/changelog.js
  63. +0 −18 src/release/commit.js
  64. +0 −28 src/release/contributors.js
  65. +0 −23 src/release/github.js
  66. +0 −150 src/release/index.js
  67. +0 −41 src/release/prerelease.js
  68. +0 −40 src/release/publish.js
  69. +0 −24 src/release/push.js
  70. +0 −12 src/release/tag.js
  71. +41 −52 src/test-dependant/index.js
  72. +10 −8 src/test/browser.js
  73. +13 −8 src/test/electron.js
  74. +31 −15 src/test/index.js
  75. +14 −11 src/test/node.js
  76. +10 −8 src/test/react-native.js
  77. +0 −165 src/ts/index.js
  78. +0 −39 src/ts/typedoc-plugin.js
  79. +5 −17 src/{types.d.ts → types.ts}
  80. +65 −40 src/utils.js
  81. +7 −7 test/browser.spec.js
  82. +35 −0 test/build.js
  83. +1 −1 test/config/fixtures/.aegir.js
  84. +11 −8 test/config/user.js
  85. +50 −8 test/dependants.js
  86. +52 −62 test/dependency-check.js
  87. +5 −5 test/fixtures.js
  88. +0 −1 test/fixtures/{.aegir.js → .aegir.cjs}
  89. +11 −0 test/fixtures/dependency-check/esm-fail/package.json
  90. +3 −0 test/fixtures/dependency-check/esm-fail/src/index.js
  91. +3 −0 test/fixtures/dependency-check/esm-fail/src/other.cjs
  92. +15 −0 test/fixtures/dependency-check/esm-pass/package.json
  93. +3 −0 test/fixtures/dependency-check/esm-pass/src/index.js
  94. +3 −0 test/fixtures/dependency-check/esm-pass/src/other.cjs
  95. +2 −2 test/fixtures/dependency-check/fail-prod/index.js
  96. +2 −2 test/fixtures/dependency-check/fail/index.js
  97. +2 −2 test/fixtures/dependency-check/pass-certain-files/derp/foo.js
  98. +1 −1 test/fixtures/dependency-check/pass-certain-files/index.js
  99. +2 −2 test/fixtures/dependency-check/pass/index.js
  100. +2 −2 test/fixtures/dependency-check/with-aegir-config/.aegir.js
  101. +2 −2 test/fixtures/dependency-check/with-aegir-config/index.js
  102. +1 −0 test/fixtures/dependency-check/with-aegir-config/package.json
  103. +12 −0 test/fixtures/esm/an-esm-project/node_modules/a-cjs-dep/package.json
  104. +2 −0 test/fixtures/esm/an-esm-project/node_modules/a-cjs-dep/src/index.d.ts
  105. +4 −0 test/fixtures/esm/an-esm-project/node_modules/a-cjs-dep/src/index.js
  106. +18 −0 test/fixtures/esm/an-esm-project/node_modules/an-esm-dep/package.json
  107. +4 −0 test/fixtures/esm/an-esm-project/node_modules/an-esm-dep/src/index.cjs
  108. +2 −0 test/fixtures/esm/an-esm-project/node_modules/an-esm-dep/src/index.d.ts
  109. +4 −0 test/fixtures/esm/an-esm-project/node_modules/an-esm-dep/src/index.js
  110. +18 −0 test/fixtures/esm/an-esm-project/package.json
  111. +10 −0 test/fixtures/esm/an-esm-project/src/index.js
  112. +9 −0 test/fixtures/esm/an-esm-project/test/esm-test.spec.js
  113. +1 −4 test/fixtures/js+ts/src/some.js
  114. +3 −1 test/fixtures/test-dependant/monorepo/packages/submodule/package.json
  115. +0 −1 test/fixtures/test-dependant/monorepo/packages/submodule/test.js
  116. +3 −1 test/fixtures/test-dependant/project/package.json
  117. +0 −1 test/fixtures/test-dependant/project/test.js
  118. +1 −2 test/fixtures/tests/context-access.js
  119. +0 −1 test/fixtures/tests/unhandled-promise-rejection.js
  120. +23 −20 test/lint.js
  121. +9 −9 test/node.js
  122. +32 −0 test/test.js
  123. +14 −16 test/utils/echo-server.js
  124. +4 −4 test/utils/get-port.js
  125. +2 −2 tsconfig.json
  126. +13 −13 utils/chai.js
  127. +9 −13 utils/echo-server.js
  128. +3 −6 utils/fixtures.browser.js
  129. +5 −35 utils/fixtures.js
  130. +2 −7 utils/get-port.js
  131. +56 −0 utils/resolve.js
4 changes: 2 additions & 2 deletions .aegir.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @type {import("./src/types").PartialOptions} */
module.exports = {
export default {
docs: {
entryPoint: 'utils'
}
}
}
79 changes: 1 addition & 78 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -4,82 +4,5 @@ updates:
directory: "/"
schedule:
interval: daily
time: "11:00"
time: "10:00"
open-pull-requests-limit: 10
reviewers:
- hugomrdias
labels:
- topic/dependencies
ignore:
- dependency-name: "@types/node"
versions:
- 15.0.0
- dependency-name: esbuild
versions:
- 0.10.0
- 0.10.1
- 0.11.0
- 0.11.10
- 0.11.11
- 0.11.12
- 0.11.13
- 0.11.15
- 0.11.2
- 0.11.3
- 0.11.5
- 0.11.6
- 0.11.9
- 0.9.0
- 0.9.1
- 0.9.3
- 0.9.4
- 0.9.6
- dependency-name: electron
versions:
- 12.0.0
- 12.0.1
- 12.0.2
- dependency-name: typescript
versions:
- 4.2.2
- 4.2.3
- dependency-name: sinon
versions:
- 10.0.0
- dependency-name: "@commitlint/load"
versions:
- 12.0.0
- dependency-name: "@commitlint/config-conventional"
versions:
- 12.0.0
- dependency-name: "@commitlint/travis-cli"
versions:
- 12.0.0
- dependency-name: "@commitlint/cli"
versions:
- 12.0.0
- dependency-name: "@commitlint/lint"
versions:
- 12.0.0
- dependency-name: "@commitlint/read"
versions:
- 12.0.0
- dependency-name: eslint-config-ipfs
versions:
- 2.0.0
- dependency-name: webpack-cli
versions:
- 4.4.0
- 4.5.0
- dependency-name: "@types/yargs"
versions:
- 16.0.0
- dependency-name: terser-webpack-plugin
versions:
- 4.2.3
- dependency-name: webpack-bundle-analyzer
versions:
- 4.4.0
- dependency-name: webpack-merge
versions:
- 5.7.3
50 changes: 50 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Automatically merge pull requests opened by web3-bot, as soon as (and only if) all tests pass.
# This reduces the friction associated with updating with our workflows.

on: [ pull_request ]
name: Automerge

jobs:
automerge-check:
if: github.event.pull_request.user.login == 'web3-bot'
runs-on: ubuntu-latest
outputs:
status: ${{ steps.should-automerge.outputs.status }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Check if we should automerge
id: should-automerge
run: |
for commit in $(git rev-list --first-parent origin/${{ github.event.pull_request.base.ref }}..${{ github.event.pull_request.head.sha }}); do
committer=$(git show --format=$'%ce' -s $commit)
echo "Committer: $committer"
if [[ "$committer" != "web3-bot@users.noreply.github.com" ]]; then
echo "Commit $commit wasn't committed by web3-bot, but by $committer."
echo "::set-output name=status::false"
exit
fi
done
echo "::set-output name=status::true"
automerge:
needs: automerge-check
runs-on: ubuntu-latest
# The check for the user is redundant here, as this job depends on the automerge-check job,
# but it prevents this job from spinning up, just to be skipped shortly after.
if: github.event.pull_request.user.login == 'web3-bot' && needs.automerge-check.outputs.status == 'true'
steps:
- name: Wait on tests
uses: lewagon/wait-on-check-action@bafe56a6863672c681c3cf671f5e10b20abf2eaa # v0.2
with:
ref: ${{ github.event.pull_request.head.sha }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
running-workflow-name: 'automerge' # the name of this job
- name: Merge PR
uses: pascalgn/automerge-action@741c311a47881be9625932b0a0de1b0937aab1ae # v0.13.1
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
MERGE_LABELS: ""
MERGE_METHOD: "squash"
MERGE_DELETE_BRANCH: true
152 changes: 152 additions & 0 deletions .github/workflows/js-test-and-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
name: test & maybe release
on:
push:
branches:
- master # with #262 - ${{{ github.default_branch }}}
pull_request:
branches:
- master # with #262 - ${{{ github.default_branch }}}

jobs:

check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present lint
- run: npm run --if-present dep-check

test-node:
needs: check
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
node: [16]
fail-fast: true
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:node
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
with:
directory: ./.nyc_output
flags: node

test-chrome:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:chrome
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
with:
directory: ./.nyc_output
flags: chrome

test-chrome-webworker:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:chrome-webworker
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
with:
directory: ./.nyc_output
flags: chrome-webworker

test-firefox:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:firefox
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
with:
directory: ./.nyc_output
flags: firefox

test-firefox-webworker:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:firefox-webworker
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
with:
directory: ./.nyc_output
flags: firefox-webworker

test-electron-main:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npx xvfb-maybe npm run --if-present test:electron-main
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
with:
directory: ./.nyc_output
flags: electron-main

test-electron-renderer:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npx xvfb-maybe npm run --if-present test:electron-renderer
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
with:
directory: ./.nyc_output
flags: electron-renderer

release:
needs: [test-node, test-chrome, test-chrome-webworker, test-firefox, test-firefox-webworker, test-electron-main, test-electron-renderer]
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/master' # with #262 - 'refs/heads/${{{ github.default_branch }}}'
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- uses: ipfs/aegir/actions/docker-login@master
with:
docker-token: ${{ secrets.DOCKER_TOKEN }}
docker-username: ${{ secrets.DOCKER_USERNAME }}
- run: npm run --if-present release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
43 changes: 0 additions & 43 deletions .github/workflows/main.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package-lock.json
yarn.lock
node_modules
/node_modules
/actions/bundle-size/node_modules
/coverage
/dist
/docs
Loading