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

debug and fix e2ee #1846

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
9 changes: 5 additions & 4 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: End to end codegen
on:
pull_request:
# disable e2e tests on PRs to the main branch until fixed
branches: [main2]
branches: [main]


jobs:
Expand Down Expand Up @@ -85,7 +85,8 @@ jobs:
# clone ent-starter
git clone https://github.com/lolopinto/ent-starter.git
cd ent-starter
npm install @snowtop/ent '@snowtop/[email protected]'
npm install @snowtop/[email protected] --force
npm install '@snowtop/[email protected]' --force
mkdir -p src/schema
cat ../.github/testdata/schema1.json | tsent generate schemas
tsent codegen
Expand All @@ -102,7 +103,7 @@ jobs:
- name: add new field
run: |
cd ent-starter
npm install @snowtop/[email protected]
npm install @snowtop/[email protected] --force
cat ../.github/testdata/schema2.json | tsent generate schemas --force
tsent codegen
env:
Expand All @@ -116,7 +117,7 @@ jobs:
tsent codegen
cp ../.github/testdata/jest.config.js.example jest.config.js
cp ../.github/testdata/verify_graphql_schema.test.ts.example src/verify_graphql_schema.test.ts
npm install ts-jest jest @types/jest
npm install ts-jest jest @types/jest --force
jest
env:
DB_CONNECTION_STRING: 'postgres://postgres:postgres@localhost:5432/postgres'
Expand Down
2 changes: 1 addition & 1 deletion ts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@snowtop/ent",
"version": "0.2.0-alpha.9",
"version": "0.2.0-alpha.10-test1",
"description": "snowtop ent framework",
"main": "index.js",
"types": "index.d.ts",
Expand Down
5 changes: 4 additions & 1 deletion ts/src/tsc/compilerOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ export function readCompilerOptions(filePath: string) {
if (options.moduleResolution === "node") {
options.moduleResolution = ts.ModuleResolutionKind.NodeJs;
}
if (options.target) {
options.target = getTarget(options.target.toString());
}
return options;
}

Expand Down Expand Up @@ -67,7 +70,7 @@ export function getTarget(target?: string): ts.ScriptTarget {

export function getTargetFromCurrentDir(): ts.ScriptTarget {
const options = readCompilerOptions(".");
return getTarget(options.target?.toString());
return options.target ?? ts.ScriptTarget.ESNext;
}

export function createSourceFile(target: ts.ScriptTarget, file: string) {
Expand Down
Loading