Skip to content

Commit ee9c1ad

Browse files
authored
fix: remove CustomEvent import (#499)
* fix: remove CustomEvent import `CustomEvent` is [global as of Node.js 18.7.0](https://nodejs.org/docs/latest/api/globals.html#customevent) and the polyfill will be removed in `[email protected]` so remove the import here for forwards compatibility with the js-libp2p monorepo. * chore: use lts node when publishing * chore: use lts node for tests and checks
1 parent bd5460c commit ee9c1ad

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

.github/workflows/main.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
strategy:
2626
matrix:
2727
os: [windows-latest, ubuntu-latest, macos-latest]
28-
node: [16]
28+
node: [lts/*]
2929
fail-fast: false
3030
steps:
3131
- uses: actions/checkout@v2
@@ -41,15 +41,15 @@ jobs:
4141
strategy:
4242
matrix:
4343
os: [ubuntu-latest]
44-
node: [16]
44+
node: [lts/*]
4545
fail-fast: false
4646
steps:
4747
- uses: actions/checkout@v2
4848
- uses: actions/setup-node@v2
4949
with:
5050
node-version: ${{ matrix.node }}
5151
- run: npm install
52-
- run: npm run test:e2e -- --target node --bail -- --exit
52+
- run: npm run test:e2e -- --target node --bail -- --exit
5353
test-chrome:
5454
needs: check
5555
runs-on: ubuntu-latest
@@ -76,29 +76,29 @@ jobs:
7676
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
7777
needs: [check, test-node, test-chrome]
7878
steps:
79-
- uses: google-github-actions/release-please-action@v3
79+
- uses: google-github-actions/release-please-action@v3
8080
id: release
8181
with:
8282
release-type: node
8383
package-name: release-please-action
8484
changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"chore","section":"Miscellaneous","hidden":false}]'
85-
85+
8686
- uses: actions/checkout@v3
8787
if: ${{ steps.release.outputs.release_created }}
88-
88+
8989
- uses: actions/setup-node@v3
9090
with:
91-
node-version: 16
91+
node-version: lts/*
9292
registry-url: 'https://registry.npmjs.org'
9393
if: ${{ steps.release.outputs.release_created }}
94-
94+
9595
- run: npm install
9696
if: ${{ steps.release.outputs.release_created }}
97-
97+
9898
- run: npm run build
9999
if: ${{ steps.release.outputs.release_created }}
100100

101-
- run: npm publish --access public
101+
- run: npm publish --access public
102102
if: ${{ steps.release.outputs.release_created }}
103103
env:
104104
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CustomEvent, TypedEventEmitter, StrictSign, StrictNoSign, TopicValidatorResult, serviceCapabilities, serviceDependencies } from '@libp2p/interface'
1+
import { TypedEventEmitter, StrictSign, StrictNoSign, TopicValidatorResult, serviceCapabilities, serviceDependencies } from '@libp2p/interface'
22
import { peerIdFromBytes, peerIdFromString } from '@libp2p/peer-id'
33
import { encode } from 'it-length-prefixed'
44
import { pipe } from 'it-pipe'

0 commit comments

Comments
 (0)