-
Notifications
You must be signed in to change notification settings - Fork 558
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
128 additions
and
79 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
**/dist | ||
**/*__GENERATED* | ||
**/*__GENERATED__* | ||
|
||
# sed backup files | ||
*.*-e | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
{ | ||
"extends": "../../tsconfig.packages.json", | ||
"references": [{ "path": "../execution-environments" }], | ||
"compilerOptions": { | ||
"allowJs": true, | ||
"composite": true, | ||
"lib": ["DOM", "ES2020"], | ||
"outDir": "dist", | ||
"outDir": "./dist", | ||
"resolveJsonModule": true, | ||
"rootDir": "src", | ||
"rootDir": "./src", | ||
"typeRoots": ["../../node_modules/@types", "./node_modules/@types"] | ||
}, | ||
"include": ["./src", "./src/snaps/json-schemas"], | ||
"exclude": ["**/*.test.ts"] | ||
"references": [{ "path": "../execution-environments" }] | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
{ | ||
"extends": "../../tsconfig.packages.json", | ||
"compilerOptions": { | ||
"composite": true, | ||
"outDir": "dist", | ||
"rootDir": "src", | ||
"sourceMap": true, | ||
"outDir": "./dist", | ||
"rootDir": "./src", | ||
"typeRoots": ["./node_modules/@types", "../../node_modules/@types"], | ||
"resolveJsonModule": true | ||
}, | ||
"include": ["./src", "./src/openrpc.json"], | ||
"exclude": ["**/*.test.ts"] | ||
"include": ["./src", "./src/openrpc.json"] | ||
} |
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"extends": "../../tsconfig.packages.json", | ||
"compilerOptions": { | ||
"composite": false, | ||
"outDir": "./dist", | ||
"rootDir": "./src", | ||
"typeRoots": ["./node_modules/@types"] | ||
}, | ||
"include": ["./src"] | ||
"include": ["./src"], | ||
"references": [{ "path": "../utils" }] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"composite": false | ||
} | ||
} |
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"extends": "../../tsconfig.packages.json", | ||
"compilerOptions": { | ||
"composite": false, | ||
"outDir": "./dist", | ||
"rootDir": "./src", | ||
"typeRoots": ["./node_modules/@types"] | ||
}, | ||
"include": ["./src"] | ||
"include": ["./src"], | ||
"references": [{ "path": "../utils" }] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"composite": false | ||
} | ||
} |
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"extends": "../../tsconfig.packages.json", | ||
"compilerOptions": { | ||
"composite": false, | ||
"outDir": "./dist", | ||
"rootDir": "./src", | ||
"typeRoots": ["./node_modules/@types"] | ||
}, | ||
"include": ["./src"] | ||
"include": ["./src"], | ||
"references": [{ "path": "../utils" }] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"composite": false | ||
} | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
{ | ||
"extends": "../../tsconfig.packages.json", | ||
"references": [{ "path": "../controllers" }], | ||
"compilerOptions": { | ||
"composite": true, | ||
"outDir": "dist", | ||
"rootDir": "src", | ||
"outDir": "./dist", | ||
"rootDir": "./src", | ||
"typeRoots": ["../../node_modules/@types", "./types"] | ||
}, | ||
"include": ["./src"] | ||
"include": ["./src"], | ||
"references": [{ "path": "../controllers" }] | ||
} |
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"composite": false | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { promises as fs } from 'fs'; | ||
import pathUtils from 'path'; | ||
import { fileURLToPath } from 'url'; | ||
|
||
const cwd = pathUtils.dirname(fileURLToPath(import.meta.url)) | ||
|
||
// These are the packages we expect to _not_ be referenced in the root tsconfig. | ||
const IGNORE_LIST = new Set(['examples', 'types']); | ||
|
||
// Get reference paths from root tsconfig.json | ||
const rootTsconfig = JSON.parse(await fs.readFile('./tsconfig.json', { encoding: 'utf8'})); | ||
const rootTsconfigReferences = new Set(rootTsconfig.references.map( | ||
({ path }) => path.split('/').pop() | ||
)) | ||
|
||
// Get the names of all directories in the packages directory | ||
const packagesPath = pathUtils.resolve(cwd, '../packages'); | ||
const packageDirNames = (await fs.readdir(packagesPath, { withFileTypes: true })) | ||
.filter((dirent) => dirent.isDirectory()) | ||
.map((dirent) => dirent.name); | ||
|
||
// Any unreferenced package dirs must either be referenced or ignored | ||
const unreferencedPackageDirs = packageDirNames.filter((name) => !rootTsconfigReferences.has(name) && !IGNORE_LIST.has(name)) | ||
if (unreferencedPackageDirs.length > 0) { | ||
throw new Error(`Found unreferenced package directories not in ignore list:\n\n\t${ | ||
unreferencedPackageDirs.join('\n\t') | ||
}\n\nEither reference or ignore the packages to continue.`) | ||
} |
Oops, something went wrong.