Skip to content

Commit 47550d3

Browse files
authored
Revert "Separate typechecking and building type declarations" (#1652)
* Revert "Separate typechecking and building type declarations (#1588)" This reverts commit 25cec73. * Create mean-shoes-rule.md
1 parent b131536 commit 47550d3

File tree

7 files changed

+28
-34
lines changed

7 files changed

+28
-34
lines changed

.changeset/mean-shoes-rule.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@primer/components": patch
3+
---
4+
5+
Fix preval of `theme-preval.js`

.github/workflows/ci.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,8 @@ jobs:
2424
- name: Lint
2525
run: npm run lint
2626

27-
- name: Type check
28-
run: npm run typecheck
27+
- name: Build
28+
run: npm run build
2929

3030
- name: Test
3131
run: npm run test
32-
33-
- name: Build
34-
run: npm run build

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
"test": "jest",
2121
"test:update": "npm run test -- --updateSnapshot",
2222
"release": "npm run build && changeset publish",
23-
"size": "size-limit",
24-
"typecheck": "npx tsc --project tsconfig.json"
23+
"size": "size-limit"
2524
},
2625
"repository": "primer/react",
2726
"keywords": [

script/build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ npx cross-env NODE_ENV=production rollup -c
1414
npx cross-env BABEL_MODULE=commonjs babel src --out-dir lib --extensions ".js,.ts,.jsx,.tsx"
1515
npx babel src --out-dir lib-esm --extensions ".js,.ts,.jsx,.tsx"
1616

17-
# Build type declarations
17+
# Type check
1818
npx tsc --project tsconfig.build.json
1919

2020
# Copy type declarations

tsconfig.base.json

Lines changed: 0 additions & 20 deletions
This file was deleted.

tsconfig.build.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"extends": "./tsconfig.base.json",
2+
"extends": "./tsconfig.json",
33
// NOTE: We exclude Storybook stories — in part because we don't want their type definitions
44
// included in our build, but also because _something_ in Storybook mucks with the type definitions
55
// of Primer components. See also https://github.com/primer/react/issues/1163.
6-
"exclude": ["**/*.stories.tsx"],
6+
"exclude": ["**/*.stories.tsx"]
77
}

tsconfig.json

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
11
{
2-
"extends": "./tsconfig.base.json",
32
"compilerOptions": {
4-
"noEmit": true,
5-
"emitDeclarationOnly": false
3+
"target": "esnext",
4+
"module": "commonjs",
5+
"allowJs": true,
6+
"checkJs": false,
7+
"jsx": "preserve",
8+
"declaration": true,
9+
"outDir": "./lib",
10+
"emitDeclarationOnly": true,
11+
"strict": true,
12+
"moduleResolution": "node",
13+
"rootDirs": ["src"],
14+
"esModuleInterop": true,
15+
"skipLibCheck": true,
16+
"forceConsistentCasingInFileNames": true,
17+
"typeRoots": ["./node_modules/@types", "./@types"]
618
},
7-
}
19+
"include": ["@types/**/*.ts", "src/**/*.js", "src/**/*.ts", "src/**/*.tsx"]
20+
}

0 commit comments

Comments
 (0)