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

merge v2 to dev #1281

Merged
merged 139 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
139 commits
Select commit Hold shift + click to select a range
a3722b0
chore: bump version v2
ymc9 Dec 18, 2023
76bbe95
Merge remote-tracking branch 'origin/dev' into v2
ymc9 Jan 2, 2024
50e5dbc
Merge remote-tracking branch 'origin/dev' into v2
ymc9 Jan 8, 2024
e574048
refactor: generate `enhance` API and avoid dynamic `require` in runti…
ymc9 Jan 8, 2024
d2d07ae
refactor: merge core plugins (#939)
ymc9 Jan 9, 2024
e6e2171
refactor: unify enhancement API to `enhance` (#940)
ymc9 Jan 10, 2024
7048b0f
Merge remote-tracking branch 'origin/dev' into v2
ymc9 Jan 10, 2024
e2c2867
Merge remote-tracking branch 'origin/dev' into v2
ymc9 Jan 17, 2024
445dbca
Merge remote-tracking branch 'origin/dev' into v2
ymc9 Jan 26, 2024
2b3cf70
Support for auth() in @default attribute (#958)
Azzerty23 Jan 26, 2024
9f2dfb1
refactor: simplify zmodel linking by improving scope computation; mak…
ymc9 Jan 27, 2024
21e1061
Merge remote-tracking branch 'origin/dev' into v2
ymc9 Jan 31, 2024
a8fb39c
Merge remote-tracking branch 'origin/dev' into v2
ymc9 Feb 5, 2024
c8a19e9
Merge remote-tracking branch 'origin/dev' into v2
ymc9 Feb 10, 2024
bac3683
feat: polymorphism (#990)
ymc9 Feb 12, 2024
57316df
chore: remove CLI config (#999)
ymc9 Feb 13, 2024
c1da257
merge from dev (#1001)
ymc9 Feb 13, 2024
7b453f7
fix: improve generated typing for polymorphic models (#1002)
ymc9 Feb 14, 2024
56e4744
chore: merge from dev (#1017)
ymc9 Feb 21, 2024
3aa1f22
chore(dependabot.yml): add Dependabot configuration file to manage da…
TGTGamer Feb 19, 2024
24b6c26
feat(release): add release manifest and main config files for version…
TGTGamer Feb 19, 2024
5fc4572
feat(codeql.yml): add CodeQL workflow for security analysis on push, …
TGTGamer Feb 19, 2024
520b469
feat(workflows): add management-changelog.yml file for release workflow
TGTGamer Feb 19, 2024
545f668
feat(security-defender-for-devops.yml): add GitHub Actions workflow f…
TGTGamer Feb 19, 2024
2b43adc
feat(security-dependency-review.yml): add security dependency review …
TGTGamer Feb 19, 2024
2d8452d
feat(security-ossar.yml): add GitHub workflow for security scanning u…
TGTGamer Feb 19, 2024
30e5a02
feat(security-scorecard.yml): add GitHub Actions workflow for securit…
TGTGamer Feb 19, 2024
6335688
chore(workflows): update workflow files to include v2 branch in branch
TGTGamer Feb 19, 2024
b9b784c
fix(workflows): correct paths for config-file and manifest-file in re…
TGTGamer Feb 19, 2024
e3596ee
chore(release-main-config.json): update component names to use unders…
TGTGamer Feb 19, 2024
440da31
chore(release-main-config.json): update component value for SWR Plugi…
TGTGamer Feb 19, 2024
0a83a6e
Apply suggestions from code review
TGTGamer Feb 20, 2024
d296e5f
Apply suggestions from code review
TGTGamer Feb 20, 2024
6867e79
fix: merge errors in github workflow files and formatting issues
ymc9 Feb 21, 2024
252151c
fix: merge errors in github workflow files and formatting issues (#1022)
ymc9 Feb 21, 2024
889b7d9
chore: try out release flow (#1023)
ymc9 Feb 21, 2024
1b77635
chore: tweak settings of release-please (#1036)
ymc9 Feb 21, 2024
18645df
chore: try trimming initial changelog (#1038)
ymc9 Feb 21, 2024
f40d7e3
chore: release 2.0.0-alpha.2
ymc9 Feb 21, 2024
32380ff
chore: release 2.0.0-alpha.2
ymc9 Feb 21, 2024
175bbc1
chore: release 2.0.0-alpha.2
ymc9 Feb 21, 2024
432752b
chore: release 2.0.0-alpha.2
ymc9 Feb 21, 2024
c2f84f9
chore: release v2.0.0-alpha.2 (#1043)
github-actions[bot] Feb 21, 2024
3001759
chore: remove temp hard-coded sha from release-please config (#1044)
ymc9 Feb 21, 2024
06342d2
chore: fix missing pnpm install in release workflow (#1045)
ymc9 Feb 21, 2024
6d043a5
chore: fix missing version bumps (#1047)
ymc9 Feb 21, 2024
e5b5a0f
fix: default auth without user context (#1015)
Azzerty23 Feb 22, 2024
6edfd66
chore: merge from dev (#1054)
ymc9 Feb 25, 2024
ca2a314
fix: foreign key constraint ambiguity in generated delegate prisma sc…
ymc9 Feb 27, 2024
0ac596f
chore: merge from dev (#1072)
ymc9 Mar 2, 2024
5b103ba
perf: improve polymorphism code generation speed (#1073)
ymc9 Mar 4, 2024
430ab62
chore: temporarily disable release-please (#1074)
ymc9 Mar 4, 2024
6e7993a
fix: clean up generation of logical prisma client (#1082)
ymc9 Mar 6, 2024
2e81a08
fix(polymorphism): support `orderBy` with base fields (#1086)
ymc9 Mar 6, 2024
36e515e
fix: several issues with using `auth()` in `@default` (#1088)
ymc9 Mar 7, 2024
d3629be
fix: prisma.d.ts is not properly saved (#1090)
ymc9 Mar 7, 2024
d11d4ba
fix: more robust calculation of default location for code generation …
ymc9 Mar 7, 2024
9f9d277
fix(polymorphism): relation name disambiguation (#1107)
ymc9 Mar 9, 2024
df07830
merge from dev (#1110)
ymc9 Mar 9, 2024
557163f
fix(polymorphism): include submodel relations when reading a concrete…
ymc9 Mar 9, 2024
c0a9a02
chore: bump version (#1113)
ymc9 Mar 9, 2024
e34c530
fix(hooks): include delegate base models when calculating models affe…
ymc9 Mar 11, 2024
dc6901a
fix(polymorphism): wrong query result when selecting "_count" (#1124)
ymc9 Mar 11, 2024
b63589a
chore: bump version (#1127)
ymc9 Mar 11, 2024
a662107
fix: disallow extending from multiple delegate models (#1117)
ymc9 Mar 13, 2024
ea4442b
merge from dev (#1132)
ymc9 Mar 13, 2024
6db11e2
refactor: remove legacy swr mutation generation (#1134)
ymc9 Mar 13, 2024
0d6674d
refactor(tanstack): merge zenstack query/mutation options into tansta…
ymc9 Mar 14, 2024
7229316
refactor(server): remove deprecated useSuperJSON flag (#1137)
ymc9 Mar 14, 2024
bbea0a9
refactor(swr): remove deprecated initialData option (#1138)
ymc9 Mar 14, 2024
8099793
refactor(zod): clean up optionality of generated schema fields (#1139)
ymc9 Mar 14, 2024
bab5195
feat: generate strong typing for the `user` context of `enhance` API …
ymc9 Mar 15, 2024
7ec9b8f
feat(tanstack-query): allow to pass in a custom callback for computin…
ymc9 Mar 15, 2024
95b8495
feat(swr): allow to provide a custom optimistic update data provider …
ymc9 Mar 15, 2024
01e372e
fix(polymorphism): incorrect typing generated for nested create/updat…
ymc9 Mar 16, 2024
b3fa1ed
fix: preserve prisma client extensions's typing (#1148)
ymc9 Mar 17, 2024
2d82218
chore: improve `enhance` API code generation (#1150)
ymc9 Mar 17, 2024
1488bcf
fix(polymorphism): `createMany` is handled incorrectly (#1151)
ymc9 Mar 18, 2024
aa8b182
chore: bump version (#1152)
ymc9 Mar 18, 2024
13f8c73
fix: issue with locating .zenstack package (#1157)
ymc9 Mar 19, 2024
16cceda
chore: bump version (#1158)
ymc9 Mar 19, 2024
213fdf3
Merge remote-tracking branch 'origin/dev' into v2
ymc9 Mar 21, 2024
c13a1fd
fix(api-handler): return http 422 when the request is rejected due to…
ymc9 Mar 24, 2024
a0ca15d
chore: remove prettier dependency (#1171)
ymc9 Mar 24, 2024
f14f21b
fix(zmodel): don't inherit `@@map` attribute from base (#1172)
ymc9 Mar 25, 2024
35b4be9
chore: bump version (#1175)
ymc9 Mar 25, 2024
6e9d242
chore: disallow `this` in collection predicate (#1176)
ymc9 Mar 25, 2024
5222c6c
feat: add Nest.js module for enhancing Prisma service (#1180)
ymc9 Mar 27, 2024
9813668
chore: change nestjs dependency from peer to dev (#1182)
ymc9 Mar 27, 2024
a1ed389
chore: add more exports to nestjs (#1183)
ymc9 Mar 27, 2024
be2aec9
chore: bump version (#1184)
ymc9 Mar 27, 2024
1b2f48e
refactor(runtime): unify the handling of fluent api calls (#1187)
ymc9 Mar 30, 2024
0f558cb
fix: `auth()` field from a base model is not properly resolved (#1192)
ymc9 Mar 30, 2024
a28d592
fix(zmodel): fix linking error post-merging imported declarations (#1…
ymc9 Mar 30, 2024
f8700cd
chore: bump version (#1195)
ymc9 Mar 31, 2024
ee3c716
chore(server): change default exports to named ones for compatibility…
ymc9 Mar 31, 2024
ee0166b
refactor(policy): optimize post-create read to only use id fields to …
ymc9 Mar 31, 2024
e3209c7
chore: update readme (#1204)
ymc9 Apr 1, 2024
ef4d5e1
chore: merge from dev (#1205)
ymc9 Apr 2, 2024
c3e2db1
feat: support for edge runtime (#1209)
ymc9 Apr 5, 2024
92bc731
chore: bump version (#1212)
ymc9 Apr 5, 2024
4e8427d
chore: upgrade ts-japi (#1214)
ymc9 Apr 6, 2024
08af2e5
fix: generate zod input/object stub code even if not generating them …
ymc9 Apr 6, 2024
c78aee2
chore: bump version (#1218)
ymc9 Apr 6, 2024
17c5e5a
Merge remote-tracking branch 'origin/dev' into v2
ymc9 Apr 6, 2024
793478e
fix: $containerIndex is not updated after merging imported declaratio…
ymc9 Apr 9, 2024
2abe481
fix: clear output dir before plugins run (#1224)
ymc9 Apr 9, 2024
101e642
chore: add prisma as peer dependency (#1225)
ymc9 Apr 9, 2024
0a2aaf7
refactor: make data validation a separate enhancement kind (#1226)
ymc9 Apr 9, 2024
c22803d
chore: bump version
ymc9 Apr 9, 2024
bf688f0
chore: fix npm install warnings (#1228)
ymc9 Apr 10, 2024
b6f4a9e
chore: rename runtime/prisma module to runtime/models (#1230)
ymc9 Apr 10, 2024
9334a2d
chore: unify prisma internals package to v5 (#1231)
ymc9 Apr 10, 2024
f04824e
chore: bump version
ymc9 Apr 10, 2024
482912b
chore: stricter Prisma peer dependencies (#1234)
ymc9 Apr 10, 2024
f3796a8
chore: merge from dev (#1240)
ymc9 Apr 11, 2024
81c7e87
chore: pin version of @prisma/internals and @prisma/generator-helper …
ymc9 Apr 11, 2024
2a8db68
fix: issue with `auth()` in `@default` accidentally overrides "connec…
ymc9 Apr 13, 2024
0355193
fix(zmodel): clean up logic for detecting what attributes should be i…
ymc9 Apr 13, 2024
d97c89b
chore: bump version (#1251)
ymc9 Apr 13, 2024
70903d3
merge from dev (#1250)
ymc9 Apr 13, 2024
f05a052
fix: properly set fields with default auth value to optional in creat…
ymc9 Apr 13, 2024
618cc9d
chore: bump version
ymc9 Apr 14, 2024
b702a10
chore: format generated PLS automatically by default (#1253)
ymc9 Apr 14, 2024
c37bf92
fix(sdk): exclude prisma module from barrel file to avoid eager loadi…
ymc9 Apr 14, 2024
b0f5d3b
feat: support prisma format indentation (#1256)
jiashengguo Apr 15, 2024
8044a54
feat: support format switch in VSCode extension (#1259)
jiashengguo Apr 15, 2024
5af5b69
fix(zmodel): member access from `auth()` is not properly resolved whe…
ymc9 Apr 15, 2024
5addf06
chore: bump version (#1261)
ymc9 Apr 15, 2024
7960595
chore(zmodel): add vscode prerelease command (#1262)
ymc9 Apr 15, 2024
c557dc9
fix: enhancer generation issue with auth model with ignored fields (#…
ymc9 Apr 15, 2024
b19bbab
fix(zod): field with `auth()` and `@default()` should be generated as…
ymc9 Apr 17, 2024
334b8d3
chore: remove the unused prisma.d.ts (#1269)
ymc9 Apr 19, 2024
12d8b2a
chore(runtime): create a separate export for edge (#1272)
ymc9 Apr 19, 2024
8310000
chore: split test runs in CI (#1277)
ymc9 Apr 24, 2024
7c4d86c
chore: merge from dev (#1276)
ymc9 Apr 24, 2024
386580e
fix(zod): make typing of `Bytes` field compatible with both `Buffer` …
ymc9 Apr 24, 2024
f6dc32a
chore: bump version (#1280)
ymc9 Apr 24, 2024
dc332c0
Merge remote-tracking branch 'origin/dev' into v2
ymc9 Apr 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"plugin:jest/recommended"
],
"rules": {
"jest/expect-expect": "off",
"@typescript-eslint/no-unused-vars": ["error", { "varsIgnorePattern": "^_", "argsIgnorePattern": "^_" }]
"@typescript-eslint/no-unused-vars": ["error", { "varsIgnorePattern": "^_", "argsIgnorePattern": "^_" }],
"jest/expect-expect": "off"
}
}
118 changes: 118 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
version: 2
updates:
- package-ecosystem: 'npm'
schedule:
interval: 'daily'
time: '02:00'
commit-message:
prefix: ':arrow_up: maint'
include: scope
directory: '/'

- package-ecosystem: 'npm'
schedule:
interval: 'daily'
time: '02:00'
commit-message:
prefix: ':arrow_up: maint'
include: scope
directory: '/packages/ide/jetbrains'

- package-ecosystem: 'npm'
schedule:
interval: 'daily'
time: '02:00'
commit-message:
prefix: ':arrow_up: maint'
include: scope
directory: '/packages/language'

- package-ecosystem: 'npm'
schedule:
interval: 'daily'
time: '02:00'
commit-message:
prefix: ':arrow_up: maint'
include: scope
directory: '/packages/misc/redwood'

- package-ecosystem: 'npm'
schedule:
interval: 'daily'
time: '02:00'
commit-message:
prefix: ':arrow_up: maint'
include: scope
directory: '/packages/plugins/openapi'

- package-ecosystem: 'npm'
schedule:
interval: 'daily'
time: '02:00'
commit-message:
prefix: ':arrow_up: maint'
include: scope
directory: '/packages/plugins/swr'

- package-ecosystem: 'npm'
schedule:
interval: 'daily'
time: '02:00'
commit-message:
prefix: ':arrow_up: maint'
include: scope
directory: '/packages/plugins/tanstack-query'

- package-ecosystem: 'npm'
schedule:
interval: 'daily'
time: '02:00'
commit-message:
prefix: ':arrow_up: maint'
include: scope
directory: '/packages/plugins/trpc'

- package-ecosystem: 'npm'
schedule:
interval: 'daily'
time: '02:00'
commit-message:
prefix: ':arrow_up: maint'
include: scope
directory: '/packages/runtime'

- package-ecosystem: 'npm'
schedule:
interval: 'daily'
time: '02:00'
commit-message:
prefix: ':arrow_up: maint'
include: scope
directory: '/packages/sdk'

- package-ecosystem: 'npm'
schedule:
interval: 'daily'
time: '02:00'
commit-message:
prefix: ':arrow_up: maint'
include: scope
directory: '/packages/server'

- package-ecosystem: 'npm'
schedule:
interval: 'daily'
time: '02:00'
commit-message:
prefix: ':arrow_up: maint'
include: scope
directory: '/packages/testtools'

- package-ecosystem: 'github-actions'
schedule:
interval: 'daily'
time: '02:00'
commit-message:
prefix: ':arrow_up: maint'
include: scope
directory: '/'
14 changes: 14 additions & 0 deletions .github/release/.release-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
".": "2.0.0-alpha.1",
"packages/ide/jetbrains": "2.0.0-alpha.2",
"packages/language": "2.0.0-alpha.2",
"packages/misc/redwood": "2.0.0-alpha.2",
"packages/plugins/openapi": "2.0.0-alpha.2",
"packages/plugins/swr": "2.0.0-alpha.2",
"packages/plugins/tanstack-query": "2.0.0-alpha.2",
"packages/plugins/trpc": "2.0.0-alpha.2",
"packages/runtime": "2.0.0-alpha.2",
"packages/sdk": "2.0.0-alpha.2",
"packages/server": "2.0.0-alpha.2",
"packages/testtools": "2.0.0-alpha.2"
}
63 changes: 63 additions & 0 deletions .github/release/release-main-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"packages": {
".": {
"package-name": "zenstack-monorepo",
"component": "Monorepo",
"exclude-paths": ["tests", ".github"]
},
"packages/ide/jetbrains": {
"package-name": "jetbrains",
"component": "JetBrains_IDE"
},
"packages/language": {
"package-name": "@zenstackhq/language",
"component": "Language"
},
"packages/misc/redwood": {
"package-name": "@zenstackhq/redwood",
"component": "Redwood"
},
"packages/plugins/openapi": {
"package-name": "@zenstackhq/openapi",
"component": "OpenAPI_Plugin"
},
"packages/plugins/swr": {
"package-name": "@zenstackhq/swr",
"component": "SWR_Plugin"
},
"packages/plugins/tanstack-query": {
"package-name": "@zenstackhq/tanstack-query",
"component": "Tanstack_Query_Plugin"
},
"packages/plugins/trpc": {
"package-name": "@zenstackhq/trpc",
"component": "tRPC_Plugin"
},
"packages/runtime": {
"package-name": "@zenstackhq/runtime",
"component": "Runtime"
},
"packages/sdk": {
"package-name": "@zenstackhq/sdk",
"component": "SDK"
},
"packages/server": {
"package-name": "@zenstackhq/server",
"component": "Server"
},
"packages/testtools": {
"package-name": "@zenstackhq/testtools",
"component": "Test_Tools"
}
},
"include-component-in-tag": false,
"pull-request-footer": "This PR was generated by [Release-Please](https://github.com/googleapis/release-please).",
"prerelease": true,
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"sequential-calls": true,
"separate-pull-requests": false,
"versioning": "prerelease",
"release-type": "node",
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}
23 changes: 15 additions & 8 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,22 @@ env:
DO_NOT_TRACK: '1'

on:
merge_group:
push:
branches:
- main
- dev
- release/*
- v2
pull_request:
branches: ['dev', 'main']
branches:
- main
- dev
- release/*
- v2

permissions:
contents: read

jobs:
build-test:
Expand All @@ -32,18 +46,11 @@ jobs:
strategy:
matrix:
node-version: [20.x]
prisma-version: [v4, v5]

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set Prisma Version
if: ${{ matrix.prisma-version == 'v5' }}
shell: bash
run: |
bash ./script/test-prisma-v5.sh

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Security - CodeQL

on:
merge_group:
push:
branches:
- main
- dev
- release/*
- v2
pull_request:
branches:
- main
- dev
- release/*
- v2
schedule:
- cron: '0 0 * * 1'

permissions:
contents: read

jobs:
analyze:
permissions:
actions: read
contents: read
security-events: write
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: ['javascript', 'typescript']
# CodeQL supports [ $supported-codeql-languages ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Harden Runner
uses: step-security/[email protected]
with:
egress-policy: audit

- name: Checkout repository
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/[email protected]
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/[email protected]

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/[email protected]
with:
category: '/language:${{matrix.language}}'
Loading
Loading