Skip to content

Commit

Permalink
fix tsconfig errors (#306)
Browse files Browse the repository at this point in the history
* cleanup tsc settings
* add base tsconfig to DRY up tsconfigs. build sourcemaps for all.
* DRY up remaining repeated fields
* strict false for web5spec
* Minor fix to remove trailing commas from JSON
---------


Co-authored-by: Frank Hinek <[email protected]>
  • Loading branch information
shamilovtim and frankhinek authored Nov 30, 2023
1 parent dce370d commit d4bf741
Show file tree
Hide file tree
Showing 21 changed files with 67 additions and 178 deletions.
17 changes: 2 additions & 15 deletions .web5-spec/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,9 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
// "strict": true,
"lib": [
"DOM",
"ES6"
],
"allowJs": true,
"target": "es6",
"module": "NodeNext",
"declaration": true,
"declarationMap": true,
"declarationDir": "dist/types",
"outDir": "dist",
// `NodeNext` will throw compilation errors if relative import paths are missing file extension
// reference: https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#ecmascript-module-support-in-node-js
"moduleResolution": "NodeNext",
"esModuleInterop": true,
"resolveJsonModule": true
"strict": false
},
"include": [
"main.ts",
Expand Down
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/agent/src/dwn-manager.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type { Readable } from 'readable-stream';

import {
Signer,
GenericMessage,
Expand All @@ -10,7 +12,6 @@ import {
import { Jose } from '@web5/crypto';
import { Convert } from '@web5/common';
import { DidResolver } from '@web5/dids';
import { Readable } from 'readable-stream';
import { utils as didUtils } from '@web5/dids';

import {
Expand Down
2 changes: 1 addition & 1 deletion packages/agent/tsconfig.cjs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"lib": [
"DOM",
"ES5",
"ES5"
],
"target": "ES5",
"module": "CommonJS",
Expand Down
20 changes: 3 additions & 17 deletions packages/agent/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"strict": true,
"lib": [
"DOM",
"ES6"
],
"allowJs": true,
"target": "es6",
"module": "ESNext", // Required for enabling JavaScript import assertion support
"declaration": true,
"declarationMap": true,
"declarationDir": "dist/types",
"outDir": "dist/esm",
"sourceMap": true,
// `NodeNext` will throw compilation errors if relative import paths are missing file extension
// reference: https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#ecmascript-module-support-in-node-js
"moduleResolution": "NodeNext",
"esModuleInterop": true
"outDir": "dist/esm"
},
"include": [
"src",
"src"
],
"exclude": [
"node_modules"
Expand Down
2 changes: 1 addition & 1 deletion packages/api/tsconfig.cjs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"lib": [
"DOM",
"ES5",
"ES5"
],
"target": "ES5",
"module": "CommonJS",
Expand Down
21 changes: 4 additions & 17 deletions packages/api/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
// "strict": true,
"lib": [
"DOM",
"ES6"
],
"allowJs": true,
"target": "es6",
"module": "ESNext",
"declaration": true,
"declarationMap": true,
"strict": false,
"declarationDir": "dist/types",
"outDir": "dist/esm",
// `NodeNext` will throw compilation errors if relative import paths are missing file extension
// reference: https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#ecmascript-module-support-in-node-js
"moduleResolution": "NodeNext",
"esModuleInterop": true,
"resolveJsonModule": true
"outDir": "dist/esm"
},
"include": [
"src",
"src"
],
"exclude": [
"node_modules"
Expand Down
20 changes: 3 additions & 17 deletions packages/common/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"strict": true,
"lib": [
"DOM",
"ES6"
],
"allowJs": true,
"target": "es6",
"module": "ESNext", // Required for enabling JavaScript import assertion support
"declaration": true,
"declarationMap": true,
"declarationDir": "dist/types",
"outDir": "dist/esm",
"sourceMap": true,
// `NodeNext` will throw compilation errors if relative import paths are missing file extension
// reference: https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#ecmascript-module-support-in-node-js
"moduleResolution": "NodeNext",
"esModuleInterop": true
"outDir": "dist/esm"
},
"include": [
"src",
"src"
],
"exclude": [
"node_modules"
Expand Down
2 changes: 1 addition & 1 deletion packages/credentials/tsconfig.cjs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"lib": [
"DOM",
"ES5",
"ES5"
],
"target": "ES5",
"module": "CommonJS",
Expand Down
20 changes: 3 additions & 17 deletions packages/credentials/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"strict": true,
"lib": [
"DOM",
"ES6"
],
"allowJs": true,
"target": "es6",
"module": "ESNext", // Required for enabling JavaScript import assertion support
"declaration": true,
"declarationMap": true,
"declarationDir": "dist/types",
"outDir": "dist/esm",
"sourceMap": true,
// `NodeNext` will throw compilation errors if relative import paths are missing file extension
// reference: https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#ecmascript-module-support-in-node-js
"moduleResolution": "NodeNext",
"esModuleInterop": true
"outDir": "dist/esm"
},
"include": [
"src",
"src"
],
"exclude": [
"node_modules"
Expand Down
2 changes: 1 addition & 1 deletion packages/crypto/tsconfig.cjs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"lib": [
"DOM",
"ES5",
"ES5"
],
"target": "ES5",
"module": "CommonJS",
Expand Down
17 changes: 2 additions & 15 deletions packages/crypto/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"strict": true,
"lib": [
"DOM",
"ES6"
],
"allowJs": true,
"target": "es6",
"module": "ESNext", // Required for enabling JavaScript import assertion support
"declaration": true,
"declarationMap": true,
"declarationDir": "dist/types",
"outDir": "dist/esm",
// `NodeNext` will throw compilation errors if relative import paths are missing file extension
// reference: https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#ecmascript-module-support-in-node-js
"moduleResolution": "NodeNext",
"esModuleInterop": true
"outDir": "dist/esm"
},
"include": [
"src"
Expand Down
2 changes: 1 addition & 1 deletion packages/dids/tsconfig.cjs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"lib": [
"DOM",
"ES5",
"ES5"
],
"target": "ES5",
"module": "CommonJS",
Expand Down
18 changes: 4 additions & 14 deletions packages/dids/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"lib": [
"DOM",
"ES6"
],
"target": "es6",
"module": "ESNext", // Required for enabling JavaScript import assertion support
"declaration": true,
"declarationMap": true,
"strict": false,
"declarationDir": "dist/types",
"outDir": "dist/esm",
// `NodeNext` will throw compilation errors if relative import paths are missing file extension
// reference: https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#ecmascript-module-support-in-node-js
"moduleResolution": "NodeNext",
"esModuleInterop": true
"outDir": "dist/esm"
},
"include": [
"src",
Expand All @@ -22,4 +12,4 @@
"exclude": [
"node_modules"
]
}
}
2 changes: 1 addition & 1 deletion packages/identity-agent/tsconfig.cjs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"lib": [
"DOM",
"ES5",
"ES5"
],
"target": "ES5",
"module": "CommonJS",
Expand Down
18 changes: 2 additions & 16 deletions packages/identity-agent/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"strict": true,
"lib": [
"DOM",
"ES6"
],
"allowJs": true,
"target": "es6",
"module": "ESNext", // Required for enabling JavaScript import assertion support
"declaration": true,
"declarationMap": true,
"declarationDir": "dist/types",
"outDir": "dist/esm",
"sourceMap": true,
// `NodeNext` will throw compilation errors if relative import paths are missing file extension
// reference: https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#ecmascript-module-support-in-node-js
"moduleResolution": "NodeNext",
"esModuleInterop": true
"outDir": "dist/esm"
},
"include": [
"src",
Expand Down
2 changes: 1 addition & 1 deletion packages/proxy-agent/tsconfig.cjs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"lib": [
"DOM",
"ES5",
"ES5"
],
"target": "ES5",
"module": "CommonJS",
Expand Down
17 changes: 2 additions & 15 deletions packages/proxy-agent/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"strict": true,
"lib": [
"DOM",
"ES6"
],
"target": "es6",
"module": "ESNext", // Required for enabling JavaScript import assertion support
"declaration": true,
"declarationMap": true,
"declarationDir": "dist/types",
"outDir": "dist/esm",
"sourceMap": true,
// `NodeNext` will throw compilation errors if relative import paths are missing file extension
// reference: https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#ecmascript-module-support-in-node-js
"moduleResolution": "NodeNext",
"esModuleInterop": true
"outDir": "dist/esm"
},
"include": [
"src",
Expand Down
2 changes: 1 addition & 1 deletion packages/user-agent/tsconfig.cjs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"lib": [
"DOM",
"ES5",
"ES5"
],
"target": "ES5",
"module": "CommonJS",
Expand Down
20 changes: 3 additions & 17 deletions packages/user-agent/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"strict": true,
"lib": [
"DOM",
"ES6"
],
"allowJs": true,
"target": "es6",
"module": "ESNext", // Required for enabling JavaScript import assertion support
"declaration": true,
"declarationMap": true,
"declarationDir": "dist/types",
"outDir": "dist/esm",
"sourceMap": true,
// `NodeNext` will throw compilation errors if relative import paths are missing file extension
// reference: https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#ecmascript-module-support-in-node-js
"moduleResolution": "NodeNext",
"esModuleInterop": true
"outDir": "dist/esm"
},
"include": [
"src",
"src"
],
"exclude": [
"node_modules"
Expand Down
Loading

0 comments on commit d4bf741

Please sign in to comment.