Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: extract @waku/create and @waku/interfaces from @waku/core #990

Merged
merged 23 commits into from
Nov 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,10 @@ jobs:
with:
node-version: ${{ env.NODE_JS }}
- uses: bahmutov/npm-install@v1
- run: npm run build
- run: npm run check
- run: npm run doc

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_JS }}
- uses: bahmutov/npm-install@v1
- run: npm run build

proto:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -61,6 +52,7 @@ jobs:
with:
node-version: ${{ env.NODE_JS }}
- uses: bahmutov/npm-install@v1
- run: npm run build
- run: npm run test:browser

node:
Expand All @@ -84,6 +76,7 @@ jobs:
with:
node-version: ${{ env.NODE_JS }}
- uses: bahmutov/npm-install@v1
- run: npm run build
- run: npm run test:node
env:
DEBUG: "waku:nwaku*,waku:test*"
Expand Down Expand Up @@ -130,7 +123,7 @@ jobs:
node-version: ${{ env.NODE_JS }}

- uses: bahmutov/npm-install@v1

- run: npm run build
- run: npm run test:node
env:
DEBUG: "waku:nwaku*,waku:test*"
Expand All @@ -146,7 +139,7 @@ jobs:
name: Release
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
needs: [check, build, proto, browser, node]
needs: [check, proto, browser, node]
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ src/**.js
coverage
*.log
*.tsbuildinfo
docs
6 changes: 3 additions & 3 deletions .size-limit.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ module.exports = [
{
name: "Waku default setup",
path: [
"packages/core/bundle/index.js",
"packages/core/bundle/lib/create_waku.js",
"packages/create/bundle/index.js",
"packages/core/bundle/lib/wait_for_remote_peer.js"
],
import: {
"./packages/core/bundle/lib/create_waku.js": "{ createLightNode }",
"./packages/create/bundle/index.js": "{ createLightNode }",
"./packages/core/bundle/lib/wait_for_remote_peer.js":
"{ waitForRemotePeer }",
"./packages/core/bundle/lib/waku_message/version_0.js":
Expand Down
1 change: 0 additions & 1 deletion bors.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
status = [
"check",
"build",
"proto",
"browser",
"node",
Expand Down
51 changes: 28 additions & 23 deletions ci/deploy.js
Original file line number Diff line number Diff line change
@@ -1,40 +1,45 @@
import { promisify } from 'util'
import { publish } from 'gh-pages'
import { promisify } from "util";

import { publish } from "gh-pages";

/* fix for "Unhandled promise rejections" */
process.on('unhandledRejection', err => { throw err })
process.on("unhandledRejection", (err) => {
throw err;
});

const ghpublish = promisify(publish)
const ghpublish = promisify(publish);

const Args = process.argv.slice(2)
const USE_HTTPS = Args[0] && Args[0].toUpperCase() === 'HTTPS'
const Args = process.argv.slice(2);
const USE_HTTPS = Args[0] && Args[0].toUpperCase() === "HTTPS";

const branch = 'gh-pages'
const org = 'waku-org'
const repo = 'js-waku'
const branch = "gh-pages";
const org = "waku-org";
const repo = "js-waku";
/* use SSH auth by default */
let repoUrl = USE_HTTPS
? `https://github.com/${org}/${repo}.git`
: `git@github.com:${org}/${repo}.git`
: `git@github.com:${org}/${repo}.git`;

/* alternative auth using GitHub user and API token */
if (typeof process.env.GH_USER !== "undefined") {
repoUrl = (
'https://' + process.env.GH_USER +
':' + process.env.GH_TOKEN +
'@' + `github.com/${org}/${repo}.git`
)
repoUrl =
"https://" +
process.env.GH_USER +
":" +
process.env.GH_TOKEN +
"@" +
`github.com/${org}/${repo}.git`;
}

const main = async (url, branch)=> {
console.log(`Pushing to: ${url}`)
console.log(`On branch: ${branch}`)
await ghpublish('build/docs', {
const main = async (url, branch) => {
console.log(`Pushing to: ${url}`);
console.log(`On branch: ${branch}`);
await ghpublish("docs", {
repo: url,
branch: branch,
dotfiles: true,
silent: false
})
}
silent: false,
});
};

main(repoUrl, branch)
main(repoUrl, branch);
Loading