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

Add named export for Docusaurus and improve alpha publishing workflow #198

Merged
merged 8 commits into from
Aug 28, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions .github/workflows/alpha-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,19 @@ jobs:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
run: npm whoami

- name: Generate alpha version string and modify packages
- name: Install dependencies
run: npm ci

- name: Generate alpha prerelease and bump package.json @web5/* versions
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
run: |
SHORT_COMMIT_SHA=$(git rev-parse --short HEAD)
YYYYMMDD=$(date +'%Y%m%d')
for dir in packages/*; do
cd $dir
REPO_VERSION=$(node -p "require('./package.json').version")
ALPHA_VERSION="${REPO_VERSION}-alpha-$YYYYMMDD-$SHORT_COMMIT_SHA"
npm version $ALPHA_VERSION --no-git-tag-version
cd ../..
done
ALPHA_PRERELEASE="alpha-$YYYYMMDD-$SHORT_COMMIT_SHA"
node ./scripts/bump-workspace.mjs --prerelease=$ALPHA_PRERELEASE
shell: bash

- name: Bump package.json @web5/* dependency versions
run: node ./scripts/bump-workspace.mjs

- name: Install dependencies
run: npm ci

- name: Build all workspace packages
run: npm run build

Expand Down
92 changes: 46 additions & 46 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/TBD54566975/web5-js"
"url": "git+https://github.com/TBD54566975/web5-js.git"
},
"license": "Apache-2.0",
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"bugs": "https://github.com/TBD54566975/web5-js/issues",
"repository": {
"type": "git",
"url": "git+https://github.com/TBD54566975/web5-js",
"url": "git+https://github.com/TBD54566975/web5-js.git",
"directory": "packages/agent"
},
"license": "Apache-2.0",
Expand Down
7 changes: 6 additions & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"bugs": "https://github.com/TBD54566975/web5-js/issues",
"repository": {
"type": "git",
"url": "git+https://github.com/TBD54566975/web5-js",
"url": "git+https://github.com/TBD54566975/web5-js.git",
"directory": "packages/api"
},
"license": "Apache-2.0",
Expand All @@ -49,6 +49,11 @@
"types": "./dist/types/index.d.ts",
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.js"
},
"./browser": {
"types": "./dist/types/index.d.ts",
"import": "./dist/browser.mjs",
"require": "./dist/browser.js"
}
},
"react-native": "./dist/esm/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"bugs": "https://github.com/TBD54566975/web5-js/issues",
"repository": {
"type": "git",
"url": "git+https://github.com/TBD54566975/web5-js",
"url": "git+https://github.com/TBD54566975/web5-js.git",
"directory": "packages/common"
},
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/credentials/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"bugs": "https://github.com/TBD54566975/web5-js/issues",
"repository": {
"type": "git",
"url": "git+https://github.com/TBD54566975/web5-js",
"url": "git+https://github.com/TBD54566975/web5-js.git",
"directory": "packages/credentials"
},
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/crypto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"bugs": "https://github.com/TBD54566975/web5-js/issues",
"repository": {
"type": "git",
"url": "git+https://github.com/TBD54566975/web5-js",
"url": "git+https://github.com/TBD54566975/web5-js.git",
"directory": "packages/crypto"
},
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/dids/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"bugs": "https://github.com/TBD54566975/web5-js/issues",
"repository": {
"type": "git",
"url": "git+https://github.com/TBD54566975/web5-js",
"url": "git+https://github.com/TBD54566975/web5-js.git",
"directory": "packages/dids"
},
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/identity-agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"bugs": "https://github.com/TBD54566975/web5-js/issues",
"repository": {
"type": "git",
"url": "git+https://github.com/TBD54566975/web5-js",
"url": "git+https://github.com/TBD54566975/web5-js.git",
"directory": "packages/identity-agent"
},
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/proxy-agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"bugs": "https://github.com/TBD54566975/web5-js/issues",
"repository": {
"type": "git",
"url": "git+https://github.com/TBD54566975/web5-js",
"url": "git+https://github.com/TBD54566975/web5-js.git",
"directory": "packages/proxy-agent"
},
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/user-agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"bugs": "https://github.com/TBD54566975/web5-js/issues",
"repository": {
"type": "git",
"url": "git+https://github.com/TBD54566975/web5-js",
"url": "git+https://github.com/TBD54566975/web5-js.git",
"directory": "packages/user-agent"
},
"license": "Apache-2.0",
Expand Down
Loading
Loading