Skip to content

Commit a5988c5

Browse files
committed
chore: convert to monorepo
Converts this repository to a monorepo - in the initial pass the only monorepo package is libp2p itself.
1 parent a2c4350 commit a5988c5

File tree

155 files changed

+524
-347
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+524
-347
lines changed

.github/workflows/main.yml

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -143,18 +143,34 @@ jobs:
143143

144144
release:
145145
runs-on: ubuntu-latest
146-
needs: [test-node, test-chrome, test-chrome-webworker, test-firefox, test-firefox-webworker, test-electron-main, test-electron-renderer, test-interop]
146+
needs: [
147+
test-node,
148+
test-chrome,
149+
test-chrome-webworker,
150+
test-firefox,
151+
test-firefox-webworker,
152+
test-electron-main,
153+
test-electron-renderer,
154+
test-interop
155+
]
147156
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
148157
steps:
149158
- uses: GoogleCloudPlatform/release-please-action@v2
150159
id: release
151160
with:
152161
token: ${{ secrets.GITHUB_TOKEN }}
162+
command: manifest
153163
release-type: node
154-
# breaking changes should rev the minor (remove after v1)
155-
bump-minor-pre-major: true
156-
# features should rev the patch (remove after v1)
157-
bump-patch-for-minor-pre-major: true
164+
manifest-file: .release-please-manifest.json
165+
config-file: .release-please.json
166+
changelog-types: |
167+
[
168+
{ "type": "feat", "section": "Features", "hidden": false },
169+
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
170+
{ "type": "chore", "section": "Trivial Changes", "hidden": false },
171+
{ "type": "docs", "section": "Documentation", "hidden": false },
172+
{ "type": "deps", "section": "Dependencies", "hidden": false }
173+
]
158174
- uses: actions/checkout@v3
159175
with:
160176
fetch-depth: 0
@@ -163,23 +179,21 @@ jobs:
163179
node-version: lts/*
164180
registry-url: 'https://registry.npmjs.org'
165181
- uses: ipfs/aegir/actions/cache-node-modules@master
166-
- if: ${{ steps.release.outputs.release_created }}
167-
name: Generate typedoc URLs
168-
run: npm --if-present run docs -- --publish false
169-
- if: ${{ steps.release.outputs.release_created }}
182+
- uses: ipfs/aegir/actions/docker-login@master
183+
with:
184+
docker-token: ${{ secrets.DOCKER_TOKEN }}
185+
docker-username: ${{ secrets.DOCKER_USERNAME }}
186+
- if: ${{ steps.release.outputs.releases_created }}
170187
name: Run release version
171-
run: npm publish
188+
run: |
189+
git update-index --assume-unchanged packages/libp2p/src/version.ts
190+
npm run --if-present release
172191
env:
173192
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
174-
- if: ${{ steps.release.outputs.release_created }}
175-
name: Publish docs
176-
run: npm run --if-present docs
177-
env:
178-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
179-
- if: ${{ !steps.release.outputs.release_created }}
193+
- if: ${{ !steps.release.outputs.releases_created }}
180194
name: Run release rc
181195
run: |
182-
npm version `node -p -e "require('./package.json').version"`-`git rev-parse --short HEAD` --no-git-tag-version
183-
npm publish --tag next
196+
git update-index --assume-unchanged packages/libp2p/src/version.ts
197+
npm run --if-present release:rc
184198
env:
185199
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"packages/libp2p":"0.45.4"
3+
}

.release-please.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"plugins": ["node-workspace"],
3+
"bump-minor-pre-major": true,
4+
"bump-patch-for-minor-pre-major": true,
5+
"group-pull-request-title-pattern": "chore: release ${component}",
6+
"packages": {
7+
"packages/libp2p": {}
8+
}
9+
}

ISSUE_TEMPLATE.md

Lines changed: 0 additions & 43 deletions
This file was deleted.

MIGRATION_TEMPLATE.md

Lines changed: 0 additions & 45 deletions
This file was deleted.

OKR.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

examples/auto-relay/dialer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { webSockets } from '@libp2p/websockets'
33
import { noise } from '@chainsafe/libp2p-noise'
44
import { mplex } from '@libp2p/mplex'
55
import { multiaddr } from '@multiformats/multiaddr'
6-
import { yamux } from '@chainsafe/libp2p-yamux/dist/src'
6+
import { yamux } from '@chainsafe/libp2p-yamux'
77
import { circuitRelayTransport } from 'libp2p/circuit-relay'
88
import { identifyService } from 'libp2p/identify'
99

examples/auto-relay/listener.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { webSockets } from '@libp2p/websockets'
33
import { noise } from '@chainsafe/libp2p-noise'
44
import { mplex } from '@libp2p/mplex'
55
import { multiaddr } from '@multiformats/multiaddr'
6-
import { yamux } from '@chainsafe/libp2p-yamux/dist/src'
6+
import { yamux } from '@chainsafe/libp2p-yamux'
77
import { circuitRelayTransport } from 'libp2p/circuit-relay'
88
import { identifyService } from 'libp2p/identify'
99

examples/connection-encryption/1.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createLibp2p } from '../../dist/src/index.js'
1+
import { createLibp2p } from '../../packages/libp2p/dist/src/index.js'
22
import { tcp } from '@libp2p/tcp'
33
import { mplex } from '@libp2p/mplex'
44
import { yamux } from '@chainsafe/libp2p-yamux'

examples/delegated-routing/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"@chainsafe/libp2p-noise": "^12.0.0",
77
"ipfs-core": "^0.15.4",
88
"ipfs-http-client": "^58.0.1",
9-
"libp2p": "file:../../",
9+
"libp2p": "file:../../packages/libp2p",
1010
"@libp2p/delegated-content-routing": "^4.0.0",
1111
"@libp2p/delegated-peer-routing": "^4.0.0",
1212
"@libp2p/kad-dht": "^9.2.0",

0 commit comments

Comments
 (0)