Skip to content

Commit

Permalink
chore: give lerna-lite another try
Browse files Browse the repository at this point in the history
  • Loading branch information
StarpTech committed Jun 12, 2022
1 parent 984a714 commit 6de82cb
Show file tree
Hide file tree
Showing 14 changed files with 395 additions and 1,291 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/engine-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
version: '3.x'
repo-token: ${{ secrets.GITHUB_TOKEN }}

- run: pnpm boot
- run: pnpm install --ignore-scripts
- run: make engine-dev
- run: make test-go
- run: make build
2 changes: 1 addition & 1 deletion .github/workflows/engine-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ jobs:
with:
working-directory: ${{ env.WORKING_DIRECTORY }}

- run: pnpm boot
- run: pnpm install --ignore-scripts

- run: pnpm run build

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/packages-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
version: '3.x'
repo-token: ${{ secrets.GITHUB_TOKEN }}

- run: pnpm boot
- run: pnpm install --ignore-scripts

- run: pnpm build

Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/packages-release-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ jobs:
with:
working-directory: ${{ env.WORKING_DIRECTORY }}

- run: pnpm boot --ignore-scripts
- name: Install
run: |
pnpm install --ignore-scripts
pnpm run patch
- name: Generate next release (dry-run)
run: pnpm run preview:version:packages --yes
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/packages-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ jobs:
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- run: pnpm boot --ignore-scripts
- name: Install
run: |
pnpm install --ignore-scripts
pnpm run patch
- run: pnpm build

Expand Down Expand Up @@ -65,7 +68,7 @@ jobs:
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- run: pnpm boot --ignore-scripts
- run: pnpm install --ignore-scripts

- run: pnpm build

Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Welcome to the WunderGraph Community contributing guide. We are excited to havin
This guide assumes you have already installed the following software:

- make (should be installed on all linux / IOS systems)
- [protoc](https://grpc.io/docs/protoc-installation/)
- golang `>= 1.18`
- Node.js [LTS](https://nodejs.org/en/about/releases/)
- pnpm `7`
Expand Down
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
all: engine-dev
pnpm boot
all: check-setup engine-dev
pnpm install
pnpm run build

engine-dev: codegen
go mod tidy
go mod download

check-setup:
$(shell ./scripts/check-setup.sh)

test-go:
go test ./...

Expand Down Expand Up @@ -36,4 +39,4 @@ install:
update-examples:
cd examples && rm -rf simple && mkdir simple && cd simple && wunderctl init

.PHONY: codegen build run tag install-proto format-templates dev all
.PHONY: codegen build run tag install-proto format-templates dev all check-local
6 changes: 2 additions & 4 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
{
"command": {
"publish": {
"conventionalCommits": true,
"registry": "https://registry.npmjs.org"
},
"version": {
"changelogPreset": "conventionalcommits"
}
},
"loglevel": "verbose",
"changelogPreset": "conventional-changelog-conventionalcommits",
"packages": ["packages/nextjs", "packages/sdk", "packages/protobuf"],
"npmClient": "pnpm",
"version": "independent"
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@
},
"homepage": "https://wundergraph.com",
"scripts": {
"boot": "pnpm install --filter='!./packages/*-testapp' --ignore-scripts",
"build": "pnpm -r run --filter='!./packages/*-testapp' build",
"test": "pnpm run -r test",
"format": "prettier --write --loglevel silent **/*.{js,jsx,ts,tsx,md,mdx,yml,yaml,css,json,graphql,gql}",
"codegen": "pnpm run --filter='./packages/protobuf' build",
"preview:version:packages": "lerna version --conventional-commits --no-git-tag-version --no-push",
"preview:version:packages-next": "lerna version prerelease --no-git-tag-version --no-push",
"ci:publish:packages": "lerna publish --conventional-commits --create-release github --allow-branch main --yes --message=\"chore(release): Publish [skip ci]\"",
"ci:publish:packages-next": "lerna publish prerelease --conventional-commits --create-release github --allow-branch next --yes --message=\"chore(release): Publish next [skip ci]\"",
"preview:version:packages": "lerna version --conventional-commits --git-dry-run --sync-workspace-lock",
"preview:version:packages-next": "lerna version prerelease --git-dry-run --sync-workspace-lock",
"ci:publish:packages": "lerna publish --conventional-commits --sync-workspace-lock --create-release github --allow-branch main --yes --message=\"chore(release): Publish [skip ci]\"",
"ci:publish:packages-next": "lerna publish prerelease --sync-workspace-lock --conventional-commits --create-release github --allow-branch next --yes --message=\"chore(release): Publish next [skip ci]\"",
"publish:engine": "release-it --git.requireBranch=main",
"publish:engine-next": "release-it --git.requireBranch=next --preRelease=next",
"prepare": "husky install"
"prepare": "husky install && pnpm run patch",
"patch": "node scripts/patch-lerna.js"
},
"engines": {
"node": ">=16.0.0",
Expand Down Expand Up @@ -63,7 +63,7 @@
"devDependencies": {
"@commitlint/cli": "^17.0.1",
"@commitlint/config-conventional": "^17.0.0",
"lerna": "^5.0.0",
"@lerna-lite/cli": "1.5.1",
"@release-it/bumper": "^4.0.0",
"husky": "^8.0.1",
"lint-staged": "^12.4.2",
Expand Down
5 changes: 2 additions & 3 deletions packages/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@
"url": "https://github.com/wundergraph/wundergraph/issues"
},
"scripts": {
"version": "pnpm install --filter=\"@wundergraph/nextjs\" --lockfile-only && git add ../../pnpm-lock.yaml",
"build": "tsc"
},
"devDependencies": {
"@types/node": "^17.0.32",
"@types/object-hash": "^1.3.4",
"@types/react": "^18.0.5",
"@wundergraph/sdk": "^0.92.5",
"@wundergraph/sdk": "workspace:^0.92.5",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"typescript": "^4.7.2"
Expand All @@ -43,7 +42,7 @@
"react-dom": "^16.8.0 || ^17.0.2 || ^18.0.0"
},
"dependencies": {
"@wundergraph/protobuf": "^0.91.1",
"@wundergraph/protobuf": "workspace:^0.91.1",
"handlebars": "^4.7.7",
"next": "^12.1.6",
"object-hash": "^2.2.0",
Expand Down
5 changes: 2 additions & 3 deletions packages/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"clean": "rimraf ./dist",
"build": "tsc",
"test": "jest",
"version": "pnpm install --filter=\"@wundergraph/sdk\" --lockfile-only && git add ../../pnpm-lock.yaml",
"test:int": "TEST_INTEGRATION=true jest"
},
"devDependencies": {
Expand All @@ -56,8 +55,8 @@
"@apollo/federation": "^0.36.2",
"@graphql-tools/schema": "^8.3.10",
"@prisma/generator-helper": "^3.9.2",
"@wundergraph/protobuf": "^0.91.1",
"@wundergraph/wunderctl": "^0.91.3",
"@wundergraph/protobuf": "workspace:^0.91.1",
"@wundergraph/wunderctl": "workspace:^0.91.3",
"axios": "^0.26.1",
"colors": "^1.4.0",
"execa": "5.1.1",
Expand Down
Loading

0 comments on commit 6de82cb

Please sign in to comment.