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: use changeset instead of lerna #369

Merged
merged 1 commit into from
Jan 10, 2025
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
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
13 changes: 13 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [
"example-*"
]
}
15 changes: 15 additions & 0 deletions .changeset/seven-elephants-serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
"@dojoengine/core": patch
"@dojoengine/create-burner": patch
"@dojoengine/create-dojo": patch
"@dojoengine/predeployed-connector": patch
"@dojoengine/react": patch
"@dojoengine/sdk": patch
"@dojoengine/state": patch
"@dojoengine/torii-client": patch
"@dojoengine/torii-wasm": patch
"@dojoengine/utils": patch
"@dojoengine/utils-wasm": patch
---

change from lerna to changeset
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: oven-sh/setup-bun@v1
- uses: pnpm/action-setup@v3
with:
version: 9.8.0
version: 10.0.0

- name: Update Submodules
run: git submodule update --init --recursive
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2
with:
version: 9.8.0
version: 10.0.0

- name: Install Protobuf Compiler
run: sudo apt-get install -y protobuf-compiler
Expand Down
36 changes: 7 additions & 29 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- uses: pnpm/action-setup@v3
with:
version: 9.8.0
version: 10.0.0

- name: Configure Git
run: |
Expand All @@ -39,33 +39,11 @@ jobs:
- name: Build packages
run: pnpm run build

- name: Tag and Publish Packages
id: tag_publish
run: |
pnpx lerna version ${{ github.event.inputs.release_type }} --conventional-commits --yes --no-private --force-publish --ignore-scripts
pnpx lerna publish from-git --yes --dist-tag ${{ github.event.inputs.release_type == 'preminor' && 'next' || 'latest' }}

- name: Get Version Tag
id: get_tag
run: echo "TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT

- name: Generate Release Body
id: release_body
run: |
if [ -f CHANGELOG.md ]; then
echo "body=$(cat CHANGELOG.md)" >> $GITHUB_OUTPUT
else
echo "body=No changelog provided for this release." >> $GITHUB_OUTPUT
fi

- name: Create GitHub Release
uses: actions/create-release@v1
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PNPM_HOME: /home/runner/setup-pnpm/node_modules/.bin
with:
tag_name: ${{ steps.get_tag.outputs.TAG }}
release_name: Release
body_path: CHANGELOG.md
draft: false
prerelease: false
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion examples/example-nodejs-bot/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "torii-bot",
"name": "example-nodejs-bot",
"module": "index.ts",
"version": "0.0.0",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion examples/example-vanillajs-phaser-recs/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "phaser",
"name": "example-vanillajs-phaser-recs",
"private": true,
"version": "0.0.0",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion examples/example-vite-kitchen-sink/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "sink",
"name": "example-vite-kitchen-sink",
"version": "0.1.0",
"private": true,
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion examples/example-vite-react-app-recs/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "react-example",
"name": "example-vite-react-app-recs",
"private": false,
"version": "0.0.1",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion examples/example-vite-react-phaser-recs/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "react-phaser-example",
"name": "example-vite-react-phaser-recs",
"private": false,
"version": "0.1.0",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion examples/example-vite-react-pwa-recs/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "react-pwa-example",
"name": "example-vite-react-pwa-recs",
"private": false,
"version": "0.0.1",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion examples/example-vite-react-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "react-sdk",
"name": "example-vite-react-sdk",
"private": true,
"version": "0.0.0",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion examples/example-vite-react-threejs-recs/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "react-threejs",
"name": "example-vite-react-threejs-recs",
"private": true,
"version": "0.0.1",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion examples/example-vite-svelte-recs/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "svelte-starter",
"name": "example-vite-svelte-recs",
"private": true,
"version": "0.0.0",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion examples/example-vue-app-recs/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "vue-app",
"name": "example-vue-app-recs",
"private": true,
"version": "0.0.0",
"type": "module",
Expand Down
15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,23 @@
"clean": "bash ./scripts/clean.sh",
"prettier-check": "pnpx prettier --check packages examples",
"prettier": "pnpx prettier --write packages examples",
"release": "pnpm build && pnpm prettier && npx lerna publish --no-private --force-publish",
"release": "pnpm prettier && pnpm build && pnpm -F './packages/**' publish -r --force",
"docs": "npx typedoc --out docs",
"prepare": "husky install"
},
"devDependencies": {
"@commitlint/cli": "^18.4.4",
"@commitlint/config-conventional": "^18.4.4",
"@ianvs/prettier-plugin-sort-imports": "^4.3.1",
"@typhonjs-typedoc/typedoc-theme-dmt": "^0.2.1",
"husky": "^9.1.7",
"lerna": "^8.1.9",
"prettier": "^3.3.3",
"tsup": "^8.1.0",
"typedoc": "^0.26.7",
"@typhonjs-typedoc/typedoc-theme-dmt": "^0.2.1",
"typedoc-plugin-coverage": "^3.3.0",
"@commitlint/cli": "^18.4.4",
"@commitlint/config-conventional": "^18.4.4",
"@ianvs/prettier-plugin-sort-imports": "^4.3.1"
"typedoc-plugin-coverage": "^3.3.0"
},
"dependencies": {
"@changesets/cli": "^2.27.11"
Comment on lines +25 to +26
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Move @changesets/cli to devDependencies

The @changesets/cli package is a development tool and should be in devDependencies instead of dependencies.

-  "dependencies": {
-    "@changesets/cli": "^2.27.11"
-  }
+  "devDependencies": {
+    "@changesets/cli": "^2.27.11",
+    ...existing devDependencies...
+  }

Committable suggestion skipped: line range outside the PR's diff.

}
}
Loading
Loading