-
-
Notifications
You must be signed in to change notification settings - Fork 17
chore: bump version 3.0.0 #522
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,109 @@ | ||
| # Contributing to ZenStack | ||
|
|
||
| I want to thank you first for considering contributing to ZenStack 🙏🏻. It's people like you who make ZenStack a better toolkit that benefits more developers! | ||
|
|
||
| Before you start working on anything major, please make sure to open an issue or discuss with us in our [Discord](https://discord.gg/Ykhr738dUe) first. This will help ensure your work aligns with the project's goals and avoid duplication of effort. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Node.js: v20 or above | ||
| - PNPM: as specified in [package.json](./package.json) | ||
|
|
||
| Test cases are run against both SQLite and Postgres. You should have a postgres server (16 or above) running (either natively or via Docker). The default connection is: | ||
|
|
||
| `postgresql://${TEST_PG_USER}:${TEST_PG_PASSWORD}$@${TEST_PG_HOST}$:${TEST_PG_PORT}$` | ||
|
|
||
| The default values for the environment variables (if not set) are: | ||
|
|
||
| - `TEST_PG_HOST`: localhost | ||
| - `TEST_PG_PORT`: 5432 | ||
| - `TEST_PG_USER`: postgres | ||
| - `TEST_PG_PASSWORD`: postgres | ||
|
|
||
| ## Get started | ||
|
|
||
| 1. Install dependencies: `pnpm install` | ||
| 2. Build all packages: `pnpm build` | ||
| 3. Run all tests: `pnpm test` | ||
|
|
||
| ## Development workflow | ||
|
|
||
| ZenStack adopts a very simple development workflow: | ||
|
|
||
| 1. Changes should be made in branches created off the "dev" branch. | ||
|
|
||
| 1. Non-trivial changes should include test cases. Bug-fixes should include regression tests that refer to GitHub issues if applicable. | ||
|
|
||
| 1. After coding and testing, create a PR to merge the changes into the "dev" branch. | ||
|
|
||
| 1. After code review is done, maintainer will squash and merge the PR into the "dev" branch. | ||
|
|
||
| 1. Periodically, the "dev" branch is merged back to the "main" branch to create a new release. | ||
|
|
||
| ## Project structure | ||
|
|
||
| ZenStack is a monorepo consisting of multiple NPM packages managed by [pnpm workspace](https://pnpm.io/workspaces). | ||
|
|
||
| ### Packages | ||
|
|
||
| The source and tests of ZenStack npm packages reside in the "packages" folder: | ||
|
|
||
| #### [language](./packages/language) | ||
|
|
||
| The ZModel language's definition, including its syntax definition and parser/linker implementation. The compiler is implemented with the [Langium](https://github.com/langium/langium) toolkit. | ||
|
|
||
| #### [cli](./packages/cli) | ||
|
|
||
| The `zen` CLI and built-in plugins. | ||
|
|
||
| #### [schema](./packages/schema) | ||
|
|
||
| The runtime representation of ZModel schema. | ||
|
|
||
| #### [orm](./packages/orm) | ||
|
|
||
| The ORM runtime built on top of [Kysely](https://kysely.dev). | ||
|
|
||
| #### [server](./packages/server) | ||
|
|
||
| The `server` package implements the automatic CRUD services and contains two main parts: | ||
|
|
||
| 1. Framework-agnostic API handlers: defining input/output format and API routes in a framework-independent way. Currently supports "rpc" and "rest" styles. | ||
|
|
||
| 1. Framework-specific adapters: translating framework-dependent request and response formats. | ||
|
|
||
| #### [clients/tanstack-query](./packages/clients/tanstack-query) | ||
|
|
||
| TanStack Query client for consuming the automatic CRUD services. | ||
|
|
||
| #### [sdk](./packages/sdk) | ||
|
|
||
| Utilities for building ZenStack plugins. | ||
|
|
||
| #### [plugins/policy](./plugins/policy) | ||
|
|
||
| The access policy plugin implementation. | ||
|
|
||
| #### [ide/vscode](./packages/ide/vscode) | ||
|
|
||
| VSCode extension for ZModel. | ||
|
|
||
| #### [testtools](./packages/testtools) | ||
|
|
||
| Test utilities. | ||
|
|
||
| ### Tests | ||
|
|
||
| #### [e2e](./tests/e2e/) | ||
|
|
||
| End-to-end tests covering essential features (ORM, access policies, etc.). | ||
|
|
||
| #### [regression](./tests/regression/) | ||
|
|
||
| Regression tests for previously reported issues. | ||
|
|
||
| ## Testing changed packages locally | ||
|
|
||
| The [samples](./samples) folder contains sample projects that directly reference the packages in the workspace. Once you make changes to a package and rebuild it, the sample projects will automatically pick up the changes. They are handy for quick manual testing. | ||
|
|
||
| If you prefer to test against your own project, simply copy the built bundles (from the `dist` folder of each package) to your project's `node_modules` folder to overwrite the installed packages. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| { | ||
| "name": "zenstack-v3", | ||
| "version": "3.0.0-beta.34", | ||
| "version": "3.0.0", | ||
| "description": "ZenStack", | ||
| "packageManager": "[email protected]", | ||
| "type": "module", | ||
|
|
@@ -9,12 +9,15 @@ | |
| "watch": "turbo run watch build", | ||
| "lint": "turbo run lint", | ||
| "test": "turbo run test", | ||
| "test:all": "pnpm run test:sqlite && pnpm run test:pg", | ||
| "test:pg": "TEST_DB_PROVIDER=postgresql turbo run test", | ||
| "test:sqlite": "TEST_DB_PROVIDER=sqlite turbo run test", | ||
| "format": "prettier --write \"**/*.{ts,tsx,md}\"", | ||
| "pr": "gh pr create --fill-first --base dev", | ||
| "merge-main": "gh pr create --title \"merge dev to main\" --body \"\" --base main --head dev", | ||
| "bump-version": "gh workflow run .github/workflows/bump-version.yml --ref dev", | ||
| "publish-all": "pnpm --filter \"./packages/**\" -r publish --access public --tag next", | ||
| "publish-preview": "pnpm --filter \"./packages/**\" -r publish --tag next --force --registry https://preview.registry.zenstack.dev/", | ||
| "publish-all": "pnpm --filter \"./packages/**\" -r publish --access public", | ||
| "publish-preview": "pnpm --filter \"./packages/**\" -r publish --force --registry https://preview.registry.zenstack.dev/", | ||
| "unpublish-preview": "pnpm --filter \"./packages/**\" -r --shell-mode exec -- npm unpublish -f --registry https://preview.registry.zenstack.dev/ \"\\$PNPM_PACKAGE_NAME\"" | ||
| }, | ||
| "keywords": [], | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| { | ||
| "name": "@zenstackhq/typescript-config", | ||
| "version": "3.0.0-beta.34", | ||
| "version": "3.0.0", | ||
| "private": true, | ||
| "license": "MIT" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.