-
Notifications
You must be signed in to change notification settings - Fork 383
Switch cli from commonjs to esm #2917
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
Draft
stwiname
wants to merge
2
commits into
main
Choose a base branch
from
cli-esm
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
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
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
---|---|---|---|
🔴 | Statements | 21.07% (-49.03% 🔻) |
17076/81032 |
🟡 | Branches | 77.44% (-0.85% 🔻) |
2485/3209 |
🟡 | Functions | 66.18% (+3.68% 🔼) |
1004/1517 |
🔴 | Lines | 21.07% (-49.03% 🔻) |
17076/81032 |
⚠️ Details were not displayed: the report size has exceeded the limit.
Test suite run failed
Failed tests: 1/572. Failed suites: 29/116.
● Test suite failed to run
packages/cli/src/controller/generate-controller.ts:8:34 - error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.
8 const __filename = fileURLToPath(import.meta.url);
~~~~~~~~~~~
● Test suite failed to run
packages/node/src/indexer/apiPromise.connection.ts:136:46 - error TS2345: Argument of type '{ hasher?: (data: Uint8Array) => Uint8Array; types?: RegistryTypes; typesAlias?: AliasDefinition; typesBundle?: OverrideBundleType; ... 16 more ...; throwOnUnknown?: boolean; }' is not assignable to parameter of type 'ApiOptions'.
Types of property 'source' are incompatible.
Type 'import("/home/runner/work/subql/subql/node_modules/@polkadot/api/base/index").ApiBase<any> | undefined' is not assignable to type 'import("/home/runner/work/subql/subql/node_modules/@polkadot/api/cjs/base/index").ApiBase<any> | undefined'.
Type 'ApiBase<any>' is missing the following properties from type 'ApiBase<any>': #private, #private, #private
136 this.unsafeApi = await ApiPromise.create(apiOption);
~~~~~~~~~
● Test suite failed to run
packages/cli/src/controller/generate-controller.ts:8:34 - error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.
8 const __filename = fileURLToPath(import.meta.url);
~~~~~~~~~~~
● Test suite failed to run
packages/query/src/graphql/graphql.test.ts:13:33 - error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ name: string; aggregate: boolean; }'.
No index signature with a parameter of type 'string' was found on type '{ name: string; aggregate: boolean; }'.
13 const argv = (arg: string) => getYargsOption().argv[arg];
~~~~~~~~~~~~~~~~~~~~~~~~~~
● Test suite failed to run
packages/node/src/indexer/apiPromise.connection.ts:136:46 - error TS2345: Argument of type '{ hasher?: (data: Uint8Array) => Uint8Array; types?: RegistryTypes; typesAlias?: AliasDefinition; typesBundle?: OverrideBundleType; ... 16 more ...; throwOnUnknown?: boolean; }' is not assignable to parameter of type 'ApiOptions'.
Types of property 'source' are incompatible.
Type 'import("/home/runner/work/subql/subql/node_modules/@polkadot/api/base/index").ApiBase<any> | undefined' is not assignable to type 'import("/home/runner/work/subql/subql/node_modules/@polkadot/api/cjs/base/index").ApiBase<any> | undefined'.
Type 'ApiBase<any>' is missing the following properties from type 'ApiBase<any>': #private, #private, #private
136 this.unsafeApi = await ApiPromise.create(apiOption);
~~~~~~~~~
● Test suite failed to run
packages/node/src/indexer/apiPromise.connection.ts:136:46 - error TS2345: Argument of type '{ hasher?: (data: Uint8Array) => Uint8Array; types?: RegistryTypes; typesAlias?: AliasDefinition; typesBundle?: OverrideBundleType; ... 16 more ...; throwOnUnknown?: boolean; }' is not assignable to parameter of type 'ApiOptions'.
Types of property 'source' are incompatible.
Type 'import("/home/runner/work/subql/subql/node_modules/@polkadot/api/base/index").ApiBase<any> | undefined' is not assignable to type 'import("/home/runner/work/subql/subql/node_modules/@polkadot/api/cjs/base/index").ApiBase<any> | undefined'.
Type 'ApiBase<any>' is missing the following properties from type 'ApiBase<any>': #private, #private, #private
136 this.unsafeApi = await ApiPromise.create(apiOption);
~~~~~~~~~
● SubqueryProject › convert manifest to project object › check loadProjectTemplates
TypeError: received is not iterable
126 | },
127 | );
> 128 | expect(project_v1).not.toContain('template');
| ^
129 | expect(project.templates.length).toBe(1);
130 | });
131 | });
at Object.<anonymous> (packages/node/src/configure/SubqueryProject.spec.ts:128:30)
● Test suite failed to run
packages/cli/src/controller/deploy-controller.ts:25:61 - error TS2749: 'Axios' refers to a value, but is being used as a type here. Did you mean 'typeof Axios'?
25 function getAxiosInstance(url: string, authToken?: string): Axios {
~~~~~
packages/cli/src/controller/deploy-controller.ts:130:27 - error TS7006: Parameter 'element' implicitly has an 'any' type.
130 return res.data.find((element) => element.projectKey === `${key}` && element.type === type);
~~~~~~~
● Test suite failed to run
Outdated guide link: The snapshot guide link is outdated.Please update all snapshots while upgrading of Jest
Expected: https://jestjs.io/docs/snapshot-testing
Received: https://goo.gl/fbAQLP
at validateSnapshotHeader (node_modules/@jest/snapshot-utils/build/index.js:104:12)
at getSnapshotData (node_modules/@jest/snapshot-utils/build/index.js:156:28)
● Test suite failed to run
packages/node/src/indexer/apiPromise.connection.ts:136:46 - error TS2345: Argument of type '{ hasher?: (data: Uint8Array) => Uint8Array; types?: RegistryTypes; typesAlias?: AliasDefinition; typesBundle?: OverrideBundleType; ... 16 more ...; throwOnUnknown?: boolean; }' is not assignable to parameter of type 'ApiOptions'.
Types of property 'source' are incompatible.
Type 'import("/home/runner/work/subql/subql/node_modules/@polkadot/api/base/index").ApiBase<any> | undefined' is not assignable to type 'import("/home/runner/work/subql/subql/node_modules/@polkadot/api/cjs/base/index").ApiBase<any> | undefined'.
Type 'ApiBase<any>' is missing the following properties from type 'ApiBase<any>': #private, #private, #private
136 this.unsafeApi = await ApiPromise.create(apiOption);
~~~~~~~~~
● Test suite failed to run
packages/node/src/indexer/apiPromise.connection.ts:136:46 - error TS2345: Argument of type '{ hasher?: (data: Uint8Array) => Uint8Array; types?: RegistryTypes; typesAlias?: AliasDefinition; typesBundle?: OverrideBundleType; ... 16 more ...; throwOnUnknown?: boolean; }' is not assignable to parameter of type 'ApiOptions'.
Types of property 'source' are incompatible.
Type 'import("/home/runner/work/subql/subql/node_modules/@polkadot/api/base/index").ApiBase<any> | undefined' is not assignable to type 'import("/home/runner/work/subql/subql/node_modules/@polkadot/api/cjs/base/index").ApiBase<any> | undefined'.
Type 'ApiBase<any>' is missing the following properties from type 'ApiBase<any>': #private, #private, #private
136 this.unsafeApi = await ApiPromise.create(apiOption);
~~~~~~~~~
● Test suite failed to run
packages/cli/src/controller/codegen-controller.ts:8:34 - error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.
8 const __filename = fileURLToPath(import.meta.url);
~~~~~~~~~~~
● Test suite failed to run
packages/node/src/indexer/apiPromise.connection.ts:136:46 - error TS2345: Argument of type '{ hasher?: (data: Uint8Array) => Uint8Array; types?: RegistryTypes; typesAlias?: AliasDefinition; typesBundle?: OverrideBundleType; ... 16 more ...; throwOnUnknown?: boolean; }' is not assignable to parameter of type 'ApiOptions'.
Types of property 'source' are incompatible.
Type 'import("/home/runner/work/subql/subql/node_modules/@polkadot/api/base/index").ApiBase<any> | undefined' is not assignable to type 'import("/home/runner/work/subql/subql/node_modules/@polkadot/api/cjs/base/index").ApiBase<any> | undefined'.
Type 'ApiBase<any>' is missing the following properties from type 'ApiBase<any>': #private, #private, #private
136 this.unsafeApi = await ApiPromise.create(apiOption);
~~~~~~~~~
● Test suite failed to run
Outdated guide link: The snapshot guide link is outdated.Please update all snapshots while upgrading of Jest
Expected: https://jestjs.io/docs/snapshot-testing
Received: https://goo.gl/fbAQLP
at validateSnapshotHeader (node_modules/@jest/snapshot-utils/build/index.js:104:12)
at getSnapshotData (node_modules/@jest/snapshot-utils/build/index.js:156:28)
● Test suite failed to run
packages/node/src/indexer/apiPromise.connection.ts:136:46 - error TS2345: Argument of type '{ hasher?: (data: Uint8Array) => Uint8Array; types?: RegistryTypes; typesAlias?: AliasDefinition; typesBundle?: OverrideBundleType; ... 16 more ...; throwOnUnknown?: boolean; }' is not assignable to parameter of type 'ApiOptions'.
Types of property 'source' are incompatible.
Type 'import("/home/runner/work/subql/subql/node_modules/@polkadot/api/base/index").ApiBase<any> | undefined' is not assignable to type 'import("/home/runner/work/subql/subql/node_modules/@polkadot/api/cjs/base/index").ApiBase<any> | undefined'.
Type 'ApiBase<any>' is missing the following properties from type 'ApiBase<any>': #private, #private, #private
136 this.unsafeApi = await ApiPromise.create(apiOption);
~~~~~~~~~
● Test suite failed to run
packages/cli/src/controller/generate-controller.ts:8:34 - error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.
8 const __filename = fileURLToPath(import.meta.url);
~~~~~~~~~~~
● Test suite failed to run
packages/query/src/graphql/plugins/index.ts:16:8 - error TS7016: Could not find a declaration file for module 'graphile-build/node8plus/plugins'. '/home/runner/work/subql/subql/packages/query/node_modules/graphile-build/node8plus/plugins/index.js' implicitly has an 'any' type.
If the 'graphile-build' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module 'graphile-build/node8plus/plugins';`
16 } from 'graphile-build/node8plus/plugins';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:17:28 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgBasicsPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgBasicsPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgBasicsPlugin';`
17 import PgBasicsPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgBasicsPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:19:27 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgTypesPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgTypesPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgTypesPlugin';`
19 import PgTypesPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgTypesPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:20:28 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgTablesPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgTablesPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgTablesPlugin';`
20 import PgTablesPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgTablesPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:21:48 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgConnectionArgOrderByDefaultValue'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgConnectionArgOrderByDefaultValue.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgConnectionArgOrderByDefaultValue';`
21 import PgConnectionArgOrderByDefaultValue from '@subql/x-graphile-build-pg/node8plus/plugins/PgConnectionArgOrderByDefaultValue';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:22:45 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgConditionComputedColumnPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgConditionComputedColumnPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgConditionComputedColumnPlugin';`
22 import PgConditionComputedColumnPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgConditionComputedColumnPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:23:23 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgAllRows'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgAllRows.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgAllRows';`
23 import PgAllRows from '@subql/x-graphile-build-pg/node8plus/plugins/PgAllRows';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:24:29 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgColumnsPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgColumnsPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgColumnsPlugin';`
24 import PgColumnsPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgColumnsPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:25:39 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgColumnDeprecationPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgColumnDeprecationPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgColumnDeprecationPlugin';`
25 import PgColumnDeprecationPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgColumnDeprecationPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:26:37 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgForwardRelationPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgForwardRelationPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgForwardRelationPlugin';`
26 import PgForwardRelationPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgForwardRelationPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:27:37 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgRowByUniqueConstraint'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgRowByUniqueConstraint.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgRowByUniqueConstraint';`
27 import PgRowByUniqueConstraint from '@subql/x-graphile-build-pg/node8plus/plugins/PgRowByUniqueConstraint';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:28:37 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgComputedColumnsPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgComputedColumnsPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgComputedColumnsPlugin';`
28 import PgComputedColumnsPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgComputedColumnsPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:29:37 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgQueryProceduresPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgQueryProceduresPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgQueryProceduresPlugin';`
29 import PgQueryProceduresPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgQueryProceduresPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:30:37 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgOrderAllColumnsPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgOrderAllColumnsPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgOrderAllColumnsPlugin';`
30 import PgOrderAllColumnsPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgOrderAllColumnsPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:31:42 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgOrderComputedColumnsPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgOrderComputedColumnsPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgOrderComputedColumnsPlugin';`
31 import PgOrderComputedColumnsPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgOrderComputedColumnsPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:32:39 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgOrderByPrimaryKeyPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgOrderByPrimaryKeyPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgOrderByPrimaryKeyPlugin';`
32 import PgOrderByPrimaryKeyPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgOrderByPrimaryKeyPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:33:23 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgRowNode'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgRowNode.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgRowNode';`
33 import PgRowNode from '@subql/x-graphile-build-pg/node8plus/plugins/PgRowNode';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:34:37 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgNodeAliasPostGraphile'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgNodeAliasPostGraphile.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgNodeAliasPostGraphile';`
34 import PgNodeAliasPostGraphile from '@subql/x-graphile-build-pg/node8plus/plugins/PgNodeAliasPostGraphile';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:35:39 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgRecordReturnTypesPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgRecordReturnTypesPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgRecordReturnTypesPlugin';`
35 import PgRecordReturnTypesPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgRecordReturnTypesPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:36:46 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgRecordFunctionConnectionPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgRecordFunctionConnectionPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgRecordFunctionConnectionPlugin';`
36 import PgRecordFunctionConnectionPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgRecordFunctionConnectionPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:37:46 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgScalarFunctionConnectionPlugin'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgScalarFunctionConnectionPlugin.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgScalarFunctionConnectionPlugin';`
37 import PgScalarFunctionConnectionPlugin from '@subql/x-graphile-build-pg/node8plus/plugins/PgScalarFunctionConnectionPlugin';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:38:36 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PageInfoStartEndCursor'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PageInfoStartEndCursor.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PageInfoStartEndCursor';`
38 import PageInfoStartEndCursor from '@subql/x-graphile-build-pg/node8plus/plugins/PageInfoStartEndCursor';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/query/src/graphql/plugins/index.ts:39:36 - error TS7016: Could not find a declaration file for module '@subql/x-graphile-build-pg/node8plus/plugins/PgConnectionTotalCount'. '/home/runner/work/subql/subql/node_modules/@subql/x-graphile-build-pg/node8plus/plugins/PgConnectionTotalCount.js' implicitly has an 'any' type.
If the '@subql/x-graphile-build-pg' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@subql/x-graphile-build-pg/node8plus/plugins/PgConnectionTotalCount';`
39 import PgConnectionTotalCount from '@subql/x-graphile-build-pg/node8plus/plugins/PgConnectionTotalCount';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
● Test suite failed to run
packages/cli/src/controller/generate-controller.ts:8:34 - error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.
8 const __filename = fileURLToPath(import.meta.url);
~~~~~~~~~~~
● Test suite failed to run
packages/cli/src/controller/codegen-controller.ts:8:34 - error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.
8 const __filename = fileURLToPath(import.meta.url);
~~~~~~~~~~~
● Test suite failed to run
Outdated guide link: The snapshot guide link is outdated.Please update all snapshots while upgrading of Jest
Expected: https://jestjs.io/docs/snapshot-testing
Received: https://goo.gl/fbAQLP
at validateSnapshotHeader (node_modules/@jest/snapshot-utils/build/index.js:104:12)
at getSnapshotData (node_modules/@jest/snapshot-utils/build/index.js:156:28)
● Test suite failed to run
packages/cli/src/controller/codegen-controller.ts:8:34 - error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.
8 const __filename = fileURLToPath(import.meta.url);
~~~~~~~~~~~
● Test suite failed to run
packages/cli/src/controller/codegen-controller.ts:8:34 - error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.
8 const __filename = fileURLToPath(import.meta.url);
~~~~~~~~~~~
● Test suite failed to run
packages/node/src/indexer/apiPromise.connection.ts:136:46 - error TS2345: Argument of type '{ hasher?: (data: Uint8Array) => Uint8Array; types?: RegistryTypes; typesAlias?: AliasDefinition; typesBundle?: OverrideBundleType; ... 16 more ...; throwOnUnknown?: boolean; }' is not assignable to parameter of type 'ApiOptions'.
Types of property 'source' are incompatible.
Type 'import("/home/runner/work/subql/subql/node_modules/@polkadot/api/base/index").ApiBase<any> | undefined' is not assignable to type 'import("/home/runner/work/subql/subql/node_modules/@polkadot/api/cjs/base/index").ApiBase<any> | undefined'.
Type 'ApiBase<any>' is missing the following properties from type 'ApiBase<any>': #private, #private, #private
136 this.unsafeApi = await ApiPromise.create(apiOption);
~~~~~~~~~
● Test suite failed to run
packages/cli/src/controller/generate-controller.ts:8:34 - error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.
8 const __filename = fileURLToPath(import.meta.url);
~~~~~~~~~~~
● Test suite failed to run
packages/node/src/indexer/apiPromise.connection.ts:136:46 - error TS2345: Argument of type '{ hasher?: (data: Uint8Array) => Uint8Array; types?: RegistryTypes; typesAlias?: AliasDefinition; typesBundle?: OverrideBundleType; ... 16 more ...; throwOnUnknown?: boolean; }' is not assignable to parameter of type 'ApiOptions'.
Types of property 'source' are incompatible.
Type 'import("/home/runner/work/subql/subql/node_modules/@polkadot/api/base/index").ApiBase<any> | undefined' is not assignable to type 'import("/home/runner/work/subql/subql/node_modules/@polkadot/api/cjs/base/index").ApiBase<any> | undefined'.
Type 'ApiBase<any>' is missing the following properties from type 'ApiBase<any>': #private, #private, #private
136 this.unsafeApi = await ApiPromise.create(apiOption);
~~~~~~~~~
● Test suite failed to run
packages/node/src/indexer/apiPromise.connection.ts:136:46 - error TS2345: Argument of type '{ hasher?: (data: Uint8Array) => Uint8Array; types?: RegistryTypes; typesAlias?: AliasDefinition; typesBundle?: OverrideBundleType; ... 16 more ...; throwOnUnknown?: boolean; }' is not assignable to parameter of type 'ApiOptions'.
Types of property 'source' are incompatible.
Type 'import("/home/runner/work/subql/subql/node_modules/@polkadot/api/base/index").ApiBase<any> | undefined' is not assignable to type 'import("/home/runner/work/subql/subql/node_modules/@polkadot/api/cjs/base/index").ApiBase<any> | undefined'.
Type 'ApiBase<any>' is missing the following properties from type 'ApiBase<any>': #private, #private, #private
136 this.unsafeApi = await ApiPromise.create(apiOption);
~~~~~~~~~
● Test suite failed to run
packages/cli/src/controller/generate-controller.ts:8:34 - error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.
8 const __filename = fileURLToPath(import.meta.url);
~~~~~~~~~~~
● Test suite failed to run
packages/query/src/graphql/plugins/QueryDepthLimitPlugin.ts:41:5 - error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{}'.
No index signature with a parameter of type 'string' was found on type '{}'.
41 frags[def.name.value] = def;
~~~~~~~~~~~~~~~~~~~~~
● Test suite failed to run
packages/cli/src/controller/deploy-controller.ts:25:61 - error TS2749: 'Axios' refers to a value, but is being used as a type here. Did you mean 'typeof Axios'?
25 function getAxiosInstance(url: string, authToken?: string): Axios {
~~~~~
packages/cli/src/controller/deploy-controller.ts:130:27 - error TS7006: Parameter 'element' implicitly has an 'any' type.
130 return res.data.find((element) => element.projectKey === `${key}` && element.type === type);
~~~~~~~
Report generated by 🧪jest coverage report action from 28646e6
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Switches the CLI package from CommonJS to ESM
Type of change
Please delete options that are not relevant.
Checklist