Skip to content

Commit 4188543

Browse files
committed
Update typescript import syntax
1 parent 8b753b5 commit 4188543

File tree

5 files changed

+9
-23
lines changed

5 files changed

+9
-23
lines changed

testsuites/lbt-plutus/lbt-plutus-typescript/src/Json-test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { describe, it } from "node:test";
22

3-
import * as Utils from "./Utils.js";
3+
import * as Utils from "./Utils.ts";
44

5-
import * as Goldens from "./Goldens.js";
5+
import * as Goldens from "./Goldens.ts";
66

77
import * as LbrPrelude from "lbr-prelude";
88
import * as PreludeJson from "prelude/Json.js";

testsuites/lbt-plutus/lbt-plutus-typescript/src/PlutusData-test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { describe, it } from "node:test";
22

3-
import * as Utils from "./Utils.js";
3+
import * as Utils from "./Utils.ts";
44

5-
import * as Goldens from "./Goldens.js";
5+
import * as Goldens from "./Goldens.ts";
66

77
import * as LbrPrelude from "lbr-prelude";
88
import * as PreludeJson from "prelude/Json.js";

testsuites/lbt-plutus/lbt-plutus-typescript/tsconfig-base.json

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
{
22
"compilerOptions": {
33
/* Visit https://aka.ms/tsconfig to read more about this file */
4-
54
/* Projects */
65
"incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
76
"composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
87
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
98
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
109
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
1110
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
12-
1311
/* Language and Environment */
1412
"target": "es2020", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
1513
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
@@ -23,7 +21,6 @@
2321
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
2422
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
2523
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
26-
2724
/* Modules */
2825
"module": "node16", /* Specify what module code is generated. */
2926
"rootDir": "./", /* Specify the root folder within your source files. */
@@ -42,12 +39,10 @@
4239
// "resolveJsonModule": true, /* Enable importing .json files. */
4340
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
4441
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
45-
4642
/* JavaScript Support */
4743
// "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
4844
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
4945
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
50-
5146
/* Emit */
5247
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
5348
"declarationMap": true, /* Create sourcemaps for d.ts files. */
@@ -72,15 +67,13 @@
7267
// "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
7368
/// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
7469
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
75-
7670
/* Interop Constraints */
7771
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
7872
// "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
7973
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
8074
// "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
8175
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
8276
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
83-
8477
/* Type Checking */
8578
"strict": true, /* Enable all strict type-checking options. */
8679
"noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
@@ -101,9 +94,9 @@
10194
"noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
10295
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
10396
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
104-
10597
/* Completeness */
10698
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
107-
"skipLibCheck": true /* Skip type checking all .d.ts files. */
99+
"skipLibCheck": true, /* Skip type checking all .d.ts files. */
100+
"rewriteRelativeImportExtensions": true
108101
}
109102
}

testsuites/lbt-prelude/lbt-prelude-typescript/src/Json-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Unit tests for functionality in `src/Prelude/Runtime/Json.ts`
22
import { describe, it } from "node:test";
33
import * as assert from "node:assert/strict";
4-
import * as Goldens from "./Goldens.js";
4+
import * as Goldens from "./Goldens.ts";
55
import * as Fs from "node:fs/promises";
66
import * as Path from "node:path";
77
import * as Prelude from "prelude";

testsuites/lbt-prelude/lbt-prelude-typescript/tsconfig-base.json

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
{
22
"compilerOptions": {
33
/* Visit https://aka.ms/tsconfig to read more about this file */
4-
54
/* Projects */
65
"incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
76
"composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
87
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
98
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
109
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
1110
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
12-
1311
/* Language and Environment */
1412
"target": "es2020", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
1513
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
@@ -23,7 +21,6 @@
2321
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
2422
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
2523
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
26-
2724
/* Modules */
2825
"module": "node16", /* Specify what module code is generated. */
2926
"rootDir": "./", /* Specify the root folder within your source files. */
@@ -42,12 +39,10 @@
4239
// "resolveJsonModule": true, /* Enable importing .json files. */
4340
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
4441
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
45-
4642
/* JavaScript Support */
4743
// "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
4844
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
4945
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
50-
5146
/* Emit */
5247
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
5348
"declarationMap": true, /* Create sourcemaps for d.ts files. */
@@ -72,15 +67,13 @@
7267
// "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
7368
/// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
7469
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
75-
7670
/* Interop Constraints */
7771
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
7872
// "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
7973
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
8074
// "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
8175
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
8276
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
83-
8477
/* Type Checking */
8578
"strict": true, /* Enable all strict type-checking options. */
8679
"noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
@@ -101,9 +94,9 @@
10194
"noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
10295
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
10396
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
104-
10597
/* Completeness */
10698
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
107-
"skipLibCheck": true /* Skip type checking all .d.ts files. */
99+
"skipLibCheck": true, /* Skip type checking all .d.ts files. */
100+
"rewriteRelativeImportExtensions": true
108101
}
109102
}

0 commit comments

Comments
 (0)