Skip to content

Commit 3236bff

Browse files
authored
refactor monorepo structure (#829)
Signed-off-by: Brian DeHamer <bdehamer@github.com>
1 parent c8fbf99 commit 3236bff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+142
-101
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ node_modules
33
coverage
44
examples/client/targets
55
examples/client/metadata
6-
tsconfig.tsbuildinfo
6+
tsconfig.build.tsbuildinfo
77
*.code-workspace

package-lock.json

Lines changed: 11 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
},
1818
"devDependencies": {
1919
"@changesets/cli": "^2.27.10",
20-
"@tsconfig/node16": "^16.1.3",
20+
"@tsconfig/node18": "^18.2.4",
2121
"@types/jest": "^29.5.14",
2222
"@types/node": "^22.10.2",
2323
"@typescript-eslint/eslint-plugin": "^8.18.0",

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"provenance": true
2020
},
2121
"scripts": {
22-
"clean": "shx rm -rf dist",
22+
"clean": "shx rm -rf dist && shx rm tsconfig.build.tsbuildinfo",
2323
"prebuild": "npm run clean",
2424
"build": "tsc --build",
2525
"postpack": "shx rm -f oclif.manifest.json",

packages/cli/tsconfig.build.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": "../../tsconfig.base.json",
3+
"compilerOptions": {
4+
"outDir": "dist",
5+
"rootDir": "src"
6+
},
7+
"include": ["src"],
8+
"references": [
9+
{ "path": "../client/tsconfig.build.json" }
10+
]
11+
}

packages/cli/tsconfig.json

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
11
{
2-
"extends": "../../tsconfig.base.json",
3-
"compilerOptions": {
4-
"rootDir": "src",
5-
"outDir": "dist"
6-
},
7-
"exclude": ["./dist", "**/__tests__"],
8-
"references": [
9-
{ "path": "../client" }
10-
]
2+
"extends": "./tsconfig.json"
113
}

packages/client/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
77
"scripts": {
8-
"build": "tsc --build",
9-
"clean": "rm -rf dist && rm tsconfig.tsbuildinfo",
8+
"build": "tsc --build tsconfig.build.json",
9+
"clean": "rm -rf dist && rm tsconfig.build.tsbuildinfo",
1010
"test": "jest"
1111
},
1212
"repository": {

packages/client/src/__tests__/error.test.ts renamed to packages/client/tests/error.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as error from '../error';
1+
import * as error from '../src/error';
22

33
describe('Error Test', () => {
44
describe('Value Error', () => {

packages/client/src/__tests__/fetcher.test.ts renamed to packages/client/tests/fetcher.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import nock from 'nock';
2-
import { DownloadHTTPError, DownloadLengthMismatchError } from '../error';
3-
import { DefaultFetcher } from '../fetcher';
2+
import { DownloadHTTPError, DownloadLengthMismatchError } from '../src/error';
3+
import { DefaultFetcher } from '../src/fetcher';
44

55
describe('Fetcher Test', () => {
66
const baseURL = 'http://localhost:8080';

packages/client/src/__tests__/index.test.ts renamed to packages/client/tests/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as tuf from '..';
1+
import * as tuf from '../src';
22

33
it('exports classes', () => {
44
expect(tuf.BaseFetcher).toBeInstanceOf(Function);

0 commit comments

Comments
 (0)