diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 7ad7b3803..74f6e4a9c 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -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: @@ -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/ent-email@0.1.0-alpha1' + npm install @snowtop/ent@0.2.0-alpha.10-test1 --force + npm install '@snowtop/ent-email@0.1.0-alpha1' --force mkdir -p src/schema cat ../.github/testdata/schema1.json | tsent generate schemas tsent codegen @@ -102,7 +103,7 @@ jobs: - name: add new field run: | cd ent-starter - npm install @snowtop/ent-phonenumber@0.1.0-alpha1 + npm install @snowtop/ent-phonenumber@0.1.0-alpha1 --force cat ../.github/testdata/schema2.json | tsent generate schemas --force tsent codegen env: @@ -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' diff --git a/ts/package.json b/ts/package.json index 5658bd910..45862dd56 100644 --- a/ts/package.json +++ b/ts/package.json @@ -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", diff --git a/ts/src/tsc/compilerOptions.ts b/ts/src/tsc/compilerOptions.ts index 272797f71..e520ff9a1 100644 --- a/ts/src/tsc/compilerOptions.ts +++ b/ts/src/tsc/compilerOptions.ts @@ -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; } @@ -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) {