Skip to content

Commit 4c053cc

Browse files
committed
Downgrade es target to 2021
1 parent 89a2ad2 commit 4c053cc

12 files changed

Lines changed: 14 additions & 208 deletions

File tree

docs/basics/installation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sidebar_position: 1
44
---
55

66
:::info
7-
Be aware that due to usage of some ES2022 and newer Node.js features, you also have to use **Node.js v16.13.0 or newer**.
7+
Be aware that due to usage of some ES2021 and newer Node.js features, you also have to use **Node.js v16.13.0 or newer**.
88
:::
99

1010
### TypeGraphQL
@@ -66,9 +66,9 @@ As prisma emits multiple files, make sure you have your tsconfig set properly to
6666
```json {4}
6767
{
6868
"compilerOptions": {
69-
"target": "es2022",
69+
"target": "es2021",
7070
"module": "commonjs",
71-
"lib": ["es2022"],
71+
"lib": ["es2021"],
7272
"experimentalDecorators": true,
7373
"emitDecoratorMetadata": true
7474
}

examples/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"compilerOptions": {
3-
"target": "es2022",
3+
"target": "es2021",
44
"module": "commonjs",
5-
"lib": ["es2022"],
5+
"lib": ["es2021"],
66
"strict": true,
77
"esModuleInterop": true,
88
"experimentalDecorators": true,

experiments/mongodb/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"compilerOptions": {
33
/* Basic Options */
44
// "incremental": true, /* Enable incremental compilation */
5-
"target": "ES2022", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
5+
"target": "ES2021", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
66
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
7-
"lib": ["ES2022"], /* Specify library files to be included in the compilation. */
7+
"lib": ["ES2021"], /* Specify library files to be included in the compilation. */
88
// "allowJs": true, /* Allow javascript files to be compiled. */
99
// "checkJs": true, /* Report errors in .js files. */
1010
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */

experiments/postgres/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"compilerOptions": {
33
/* Basic Options */
44
// "incremental": true, /* Enable incremental compilation */
5-
"target": "ES2022", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
5+
"target": "ES2021", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
66
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
7-
"lib": ["ES2022"], /* Specify library files to be included in the compilation. */
7+
"lib": ["ES2021"], /* Specify library files to be included in the compilation. */
88
// "allowJs": true, /* Allow javascript files to be compiled. */
99
// "checkJs": true, /* Report errors in .js files. */
1010
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */

src/generator/generate-code.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ import { DMMF } from "./dmmf/types";
5353
import { getBlocksToEmit } from "./emit-block";
5454

5555
const baseCompilerOptions: CompilerOptions = {
56-
target: ScriptTarget.ES2022,
56+
target: ScriptTarget.ES2021,
5757
module: ModuleKind.CommonJS,
5858
emitDecoratorMetadata: true,
5959
experimentalDecorators: true,

tests/functional/__snapshots__/crud.ts.snap

Lines changed: 0 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -56,32 +56,17 @@ Array [
5656
"floatField": true,
5757
"intField": true,
5858
},
59-
"cursor": undefined,
6059
"orderBy": Array [
6160
UserOrderByWithRelationInput {
62-
"floatField": undefined,
63-
"idField": undefined,
6461
"intField": "desc",
6562
},
6663
],
6764
"skip": 1,
6865
"take": 1,
6966
"where": UserWhereInput {
70-
"AND": undefined,
71-
"NOT": undefined,
72-
"OR": undefined,
7367
"floatField": IntFilter {
74-
"equals": undefined,
75-
"gt": undefined,
76-
"gte": undefined,
77-
"in": undefined,
78-
"lt": undefined,
7968
"lte": 50,
80-
"not": undefined,
81-
"notIn": undefined,
8269
},
83-
"idField": undefined,
84-
"intField": undefined,
8570
},
8671
},
8772
],
@@ -105,32 +90,17 @@ Array [
10590
"_count": Object {
10691
"_all": true,
10792
},
108-
"cursor": undefined,
10993
"orderBy": Array [
11094
UserOrderByWithRelationInput {
111-
"floatField": undefined,
112-
"idField": undefined,
11395
"intField": "desc",
11496
},
11597
],
11698
"skip": 1,
11799
"take": 1,
118100
"where": UserWhereInput {
119-
"AND": undefined,
120-
"NOT": undefined,
121-
"OR": undefined,
122101
"floatField": IntFilter {
123-
"equals": undefined,
124-
"gt": undefined,
125-
"gte": undefined,
126-
"in": undefined,
127-
"lt": undefined,
128102
"lte": 50,
129-
"not": undefined,
130-
"notIn": undefined,
131103
},
132-
"idField": undefined,
133-
"intField": undefined,
134104
},
135105
},
136106
],
@@ -171,26 +141,10 @@ Array [
171141
"by": Array [
172142
"intField",
173143
],
174-
"having": undefined,
175-
"orderBy": undefined,
176-
"skip": undefined,
177-
"take": undefined,
178144
"where": UserWhereInput {
179-
"AND": undefined,
180-
"NOT": undefined,
181-
"OR": undefined,
182145
"floatField": IntFilter {
183-
"equals": undefined,
184-
"gt": undefined,
185146
"gte": 0,
186-
"in": undefined,
187-
"lt": undefined,
188-
"lte": undefined,
189-
"not": undefined,
190-
"notIn": undefined,
191147
},
192-
"idField": undefined,
193-
"intField": undefined,
194148
},
195149
},
196150
],
@@ -201,19 +155,13 @@ exports[`crud resolvers execution basic operations _count for relations should p
201155
Array [
202156
Array [
203157
Object {
204-
"cursor": undefined,
205-
"distinct": undefined,
206158
"include": Object {
207159
"_count": Object {
208160
"select": Object {
209161
"secondModelsField": true,
210162
},
211163
},
212164
},
213-
"orderBy": undefined,
214-
"skip": undefined,
215-
"take": undefined,
216-
"where": undefined,
217165
},
218166
],
219167
]
@@ -258,12 +206,6 @@ Array [
258206
Array [
259207
Object {
260208
"where": UserWhereUniqueInput {
261-
"AND": undefined,
262-
"NOT": undefined,
263-
"OR": undefined,
264-
"dateField": undefined,
265-
"intIdField": undefined,
266-
"optionalStringField": undefined,
267209
"uniqueStringField": "unique",
268210
},
269211
},
@@ -285,22 +227,9 @@ Array [
285227
Array [
286228
Object {
287229
"where": UserWhereInput {
288-
"AND": undefined,
289-
"NOT": undefined,
290-
"OR": undefined,
291230
"dateField": DateTimeFilter {
292-
"equals": undefined,
293-
"gt": undefined,
294-
"gte": undefined,
295-
"in": undefined,
296-
"lt": undefined,
297231
"lte": 2019-12-31T19:16:02.572Z,
298-
"not": undefined,
299-
"notIn": undefined,
300232
},
301-
"intIdField": undefined,
302-
"optionalStringField": undefined,
303-
"uniqueStringField": undefined,
304233
},
305234
},
306235
],
@@ -319,35 +248,17 @@ exports[`crud resolvers execution basic operations should properly call PrismaCl
319248
Array [
320249
Array [
321250
Object {
322-
"cursor": undefined,
323-
"distinct": undefined,
324251
"orderBy": Array [
325252
UserOrderByWithRelationInput {
326-
"dateField": undefined,
327253
"intIdField": "desc",
328-
"optionalStringField": undefined,
329-
"uniqueStringField": undefined,
330254
},
331255
],
332256
"skip": 1,
333257
"take": 1,
334258
"where": UserWhereInput {
335-
"AND": undefined,
336-
"NOT": undefined,
337-
"OR": undefined,
338259
"dateField": DateTimeFilter {
339-
"equals": undefined,
340-
"gt": undefined,
341-
"gte": undefined,
342-
"in": undefined,
343-
"lt": undefined,
344260
"lte": 2019-12-31T19:16:02.572Z,
345-
"not": undefined,
346-
"notIn": undefined,
347261
},
348-
"intIdField": undefined,
349-
"optionalStringField": undefined,
350-
"uniqueStringField": undefined,
351262
},
352263
},
353264
],
@@ -370,12 +281,6 @@ Array [
370281
Array [
371282
Object {
372283
"where": UserWhereUniqueInput {
373-
"AND": undefined,
374-
"NOT": undefined,
375-
"OR": undefined,
376-
"dateField": undefined,
377-
"intIdField": undefined,
378-
"optionalStringField": undefined,
379284
"uniqueStringField": "uniqueValue",
380285
},
381286
},
@@ -400,16 +305,8 @@ Array [
400305
"dateField": DateTimeFieldUpdateOperationsInput {
401306
"set": 2019-12-31T14:16:02.572Z,
402307
},
403-
"optionalStringField": undefined,
404-
"uniqueStringField": undefined,
405308
},
406309
"where": UserWhereUniqueInput {
407-
"AND": undefined,
408-
"NOT": undefined,
409-
"OR": undefined,
410-
"dateField": undefined,
411-
"intIdField": undefined,
412-
"optionalStringField": undefined,
413310
"uniqueStringField": "unique",
414311
},
415312
},
@@ -431,27 +328,12 @@ Array [
431328
Array [
432329
Object {
433330
"data": UserUpdateManyMutationInput {
434-
"dateField": undefined,
435331
"optionalStringField": null,
436-
"uniqueStringField": undefined,
437332
},
438333
"where": UserWhereInput {
439-
"AND": undefined,
440-
"NOT": undefined,
441-
"OR": undefined,
442334
"dateField": DateTimeFilter {
443-
"equals": undefined,
444-
"gt": undefined,
445-
"gte": undefined,
446-
"in": undefined,
447-
"lt": undefined,
448335
"lte": 2019-12-31T19:16:02.572Z,
449-
"not": undefined,
450-
"notIn": undefined,
451336
},
452-
"intIdField": undefined,
453-
"optionalStringField": undefined,
454-
"uniqueStringField": undefined,
455337
},
456338
},
457339
],
@@ -476,17 +358,9 @@ Array [
476358
"uniqueStringField": "unique",
477359
},
478360
"update": UserUpdateInput {
479-
"dateField": undefined,
480361
"optionalStringField": null,
481-
"uniqueStringField": undefined,
482362
},
483363
"where": UserWhereUniqueInput {
484-
"AND": undefined,
485-
"NOT": undefined,
486-
"OR": undefined,
487-
"dateField": undefined,
488-
"intIdField": undefined,
489-
"optionalStringField": undefined,
490364
"uniqueStringField": "unique",
491365
},
492366
},

tests/functional/__snapshots__/custom-resolvers.ts.snap

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,37 +19,17 @@ exports[`custom resolvers execution should be possible to use generated inputs,
1919
Array [
2020
Array [
2121
FindManyPostArgs {
22-
"cursor": undefined,
23-
"distinct": undefined,
2422
"orderBy": Array [
2523
PostOrderByWithRelationInput {
2624
"color": "desc",
27-
"content": undefined,
28-
"uuid": undefined,
2925
},
3026
],
3127
"skip": 1,
3228
"take": 1,
3329
"where": PostWhereInput {
34-
"AND": undefined,
35-
"NOT": undefined,
36-
"OR": undefined,
37-
"color": undefined,
3830
"content": StringFilter {
39-
"contains": undefined,
40-
"endsWith": undefined,
41-
"equals": undefined,
42-
"gt": undefined,
43-
"gte": undefined,
44-
"in": undefined,
45-
"lt": undefined,
46-
"lte": undefined,
47-
"mode": undefined,
48-
"not": undefined,
49-
"notIn": undefined,
5031
"startsWith": "Test",
5132
},
52-
"uuid": undefined,
5333
},
5434
},
5535
],

tests/functional/__snapshots__/reference-count.ts.snap

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ exports[`relation counts querying should properly call PrismaClient on getting r
44
Array [
55
Array [
66
Object {
7-
"cursor": undefined,
8-
"distinct": undefined,
97
"include": Object {
108
"_count": Object {
119
"select": Object {
@@ -19,10 +17,6 @@ Array [
1917
},
2018
},
2119
},
22-
"orderBy": undefined,
23-
"skip": undefined,
24-
"take": undefined,
25-
"where": undefined,
2620
},
2721
],
2822
]

0 commit comments

Comments
 (0)